]> scripts.mit.edu Git - autoinstalls/wordpress.git/commitdiff
Wordpress 4.6-scripts wordpress-4.6-scripts
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Sat, 3 Sep 2016 00:47:55 +0000 (17:47 -0700)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Sat, 3 Sep 2016 00:47:55 +0000 (17:47 -0700)
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
678 files changed:
readme.html
wp-activate.php
wp-admin/about.php
wp-admin/admin-ajax.php
wp-admin/admin-footer.php
wp-admin/admin-functions.php
wp-admin/admin-header.php
wp-admin/admin.php
wp-admin/async-upload.php
wp-admin/comment.php
wp-admin/credits.php
wp-admin/css/about-rtl.css
wp-admin/css/about-rtl.min.css
wp-admin/css/about.css
wp-admin/css/about.min.css
wp-admin/css/admin-menu-rtl.css
wp-admin/css/admin-menu-rtl.min.css
wp-admin/css/admin-menu.css
wp-admin/css/admin-menu.min.css
wp-admin/css/common-rtl.css
wp-admin/css/common-rtl.min.css
wp-admin/css/common.css
wp-admin/css/common.min.css
wp-admin/css/customize-controls-rtl.css
wp-admin/css/customize-controls-rtl.min.css
wp-admin/css/customize-controls.css
wp-admin/css/customize-controls.min.css
wp-admin/css/customize-nav-menus-rtl.css
wp-admin/css/customize-nav-menus-rtl.min.css
wp-admin/css/customize-nav-menus.css
wp-admin/css/customize-nav-menus.min.css
wp-admin/css/dashboard-rtl.css
wp-admin/css/dashboard.css
wp-admin/css/deprecated-media-rtl.css
wp-admin/css/deprecated-media-rtl.min.css
wp-admin/css/deprecated-media.css
wp-admin/css/deprecated-media.min.css
wp-admin/css/edit-rtl.css
wp-admin/css/edit-rtl.min.css
wp-admin/css/edit.css
wp-admin/css/edit.min.css
wp-admin/css/forms-rtl.css
wp-admin/css/forms-rtl.min.css
wp-admin/css/forms.css
wp-admin/css/forms.min.css
wp-admin/css/ie-rtl.css
wp-admin/css/ie.css
wp-admin/css/install-rtl.css
wp-admin/css/install-rtl.min.css
wp-admin/css/install.css
wp-admin/css/install.min.css
wp-admin/css/l10n-rtl.css
wp-admin/css/l10n-rtl.min.css
wp-admin/css/l10n.css
wp-admin/css/l10n.min.css
wp-admin/css/list-tables-rtl.css
wp-admin/css/list-tables-rtl.min.css
wp-admin/css/list-tables.css
wp-admin/css/list-tables.min.css
wp-admin/css/login-rtl.css
wp-admin/css/login-rtl.min.css
wp-admin/css/login.css
wp-admin/css/login.min.css
wp-admin/css/media-rtl.css
wp-admin/css/media-rtl.min.css
wp-admin/css/media.css
wp-admin/css/media.min.css
wp-admin/css/nav-menus-rtl.css
wp-admin/css/nav-menus-rtl.min.css
wp-admin/css/nav-menus.css
wp-admin/css/nav-menus.min.css
wp-admin/css/press-this-editor-rtl.css
wp-admin/css/press-this-editor-rtl.min.css
wp-admin/css/press-this-editor.css
wp-admin/css/press-this-editor.min.css
wp-admin/css/press-this-rtl.css
wp-admin/css/press-this-rtl.min.css
wp-admin/css/press-this.css
wp-admin/css/press-this.min.css
wp-admin/css/revisions-rtl.css
wp-admin/css/revisions-rtl.min.css
wp-admin/css/revisions.css
wp-admin/css/revisions.min.css
wp-admin/css/site-icon-rtl.css
wp-admin/css/site-icon-rtl.min.css
wp-admin/css/site-icon.css
wp-admin/css/site-icon.min.css
wp-admin/css/themes-rtl.css
wp-admin/css/themes-rtl.min.css
wp-admin/css/themes.css
wp-admin/css/themes.min.css
wp-admin/css/widgets-rtl.css
wp-admin/css/widgets-rtl.min.css
wp-admin/css/widgets.css
wp-admin/css/widgets.min.css
wp-admin/custom-background.php
wp-admin/custom-header.php
wp-admin/customize.php
wp-admin/edit-comments.php
wp-admin/edit-form-advanced.php
wp-admin/edit-form-comment.php
wp-admin/edit-tag-form.php
wp-admin/edit-tags.php
wp-admin/edit.php
wp-admin/export.php
wp-admin/freedoms.php
wp-admin/images/browser-rtl.png [new file with mode: 0644]
wp-admin/import.php
wp-admin/includes/admin-filters.php
wp-admin/includes/ajax-actions.php
wp-admin/includes/bookmark.php
wp-admin/includes/class-automatic-upgrader-skin.php [new file with mode: 0644]
wp-admin/includes/class-bulk-plugin-upgrader-skin.php [new file with mode: 0644]
wp-admin/includes/class-bulk-theme-upgrader-skin.php [new file with mode: 0644]
wp-admin/includes/class-bulk-upgrader-skin.php [new file with mode: 0644]
wp-admin/includes/class-core-upgrader.php [new file with mode: 0644]
wp-admin/includes/class-file-upload-upgrader.php [new file with mode: 0644]
wp-admin/includes/class-language-pack-upgrader-skin.php [new file with mode: 0644]
wp-admin/includes/class-language-pack-upgrader.php [new file with mode: 0644]
wp-admin/includes/class-pclzip.php
wp-admin/includes/class-plugin-installer-skin.php [new file with mode: 0644]
wp-admin/includes/class-plugin-upgrader-skin.php [new file with mode: 0644]
wp-admin/includes/class-plugin-upgrader.php [new file with mode: 0644]
wp-admin/includes/class-theme-installer-skin.php [new file with mode: 0644]
wp-admin/includes/class-theme-upgrader-skin.php [new file with mode: 0644]
wp-admin/includes/class-theme-upgrader.php [new file with mode: 0644]
wp-admin/includes/class-walker-nav-menu-edit.php
wp-admin/includes/class-wp-ajax-upgrader-skin.php [new file with mode: 0644]
wp-admin/includes/class-wp-automatic-updater.php [new file with mode: 0644]
wp-admin/includes/class-wp-comments-list-table.php
wp-admin/includes/class-wp-filesystem-base.php
wp-admin/includes/class-wp-filesystem-ftpext.php
wp-admin/includes/class-wp-filesystem-ftpsockets.php
wp-admin/includes/class-wp-filesystem-ssh2.php
wp-admin/includes/class-wp-list-table.php
wp-admin/includes/class-wp-media-list-table.php
wp-admin/includes/class-wp-ms-sites-list-table.php
wp-admin/includes/class-wp-ms-themes-list-table.php
wp-admin/includes/class-wp-ms-users-list-table.php
wp-admin/includes/class-wp-plugin-install-list-table.php
wp-admin/includes/class-wp-plugins-list-table.php
wp-admin/includes/class-wp-posts-list-table.php
wp-admin/includes/class-wp-press-this.php
wp-admin/includes/class-wp-screen.php
wp-admin/includes/class-wp-site-icon.php
wp-admin/includes/class-wp-terms-list-table.php
wp-admin/includes/class-wp-theme-install-list-table.php
wp-admin/includes/class-wp-themes-list-table.php
wp-admin/includes/class-wp-upgrader-skin.php [new file with mode: 0644]
wp-admin/includes/class-wp-upgrader-skins.php
wp-admin/includes/class-wp-upgrader.php
wp-admin/includes/class-wp-users-list-table.php
wp-admin/includes/comment.php
wp-admin/includes/continents-cities.php
wp-admin/includes/dashboard.php
wp-admin/includes/deprecated.php
wp-admin/includes/edit-tag-messages.php
wp-admin/includes/export.php
wp-admin/includes/file.php
wp-admin/includes/image-edit.php
wp-admin/includes/image.php
wp-admin/includes/import.php
wp-admin/includes/media.php
wp-admin/includes/menu.php
wp-admin/includes/meta-boxes.php
wp-admin/includes/misc.php
wp-admin/includes/ms-deprecated.php
wp-admin/includes/ms.php
wp-admin/includes/nav-menu.php
wp-admin/includes/network.php
wp-admin/includes/plugin-install.php
wp-admin/includes/plugin.php
wp-admin/includes/post.php
wp-admin/includes/revision.php
wp-admin/includes/schema.php
wp-admin/includes/screen.php
wp-admin/includes/taxonomy.php
wp-admin/includes/template.php
wp-admin/includes/theme-install.php
wp-admin/includes/theme.php
wp-admin/includes/translation-install.php
wp-admin/includes/update-core.php
wp-admin/includes/update.php
wp-admin/includes/upgrade.php
wp-admin/includes/user.php
wp-admin/index.php
wp-admin/js/accordion.min.js
wp-admin/js/bookmarklet.min.js
wp-admin/js/color-picker.min.js
wp-admin/js/common.js
wp-admin/js/common.min.js
wp-admin/js/customize-controls.js
wp-admin/js/customize-controls.min.js
wp-admin/js/customize-nav-menus.js
wp-admin/js/customize-nav-menus.min.js
wp-admin/js/customize-widgets.js
wp-admin/js/customize-widgets.min.js
wp-admin/js/dashboard.min.js
wp-admin/js/edit-comments.js
wp-admin/js/edit-comments.min.js
wp-admin/js/editor-expand.js
wp-admin/js/editor-expand.min.js
wp-admin/js/editor.js
wp-admin/js/editor.min.js
wp-admin/js/image-edit.js
wp-admin/js/image-edit.min.js
wp-admin/js/inline-edit-post.min.js
wp-admin/js/inline-edit-tax.js
wp-admin/js/inline-edit-tax.min.js
wp-admin/js/media-upload.min.js
wp-admin/js/media.js
wp-admin/js/media.min.js
wp-admin/js/nav-menu.min.js
wp-admin/js/password-strength-meter.js
wp-admin/js/password-strength-meter.min.js
wp-admin/js/plugin-install.js
wp-admin/js/plugin-install.min.js
wp-admin/js/post.js
wp-admin/js/post.min.js
wp-admin/js/postbox.js
wp-admin/js/postbox.min.js
wp-admin/js/press-this.min.js
wp-admin/js/revisions.min.js
wp-admin/js/svg-painter.min.js
wp-admin/js/tags-box.min.js
wp-admin/js/tags.min.js
wp-admin/js/theme.js
wp-admin/js/theme.min.js
wp-admin/js/updates.js
wp-admin/js/updates.min.js
wp-admin/js/user-profile.js
wp-admin/js/user-profile.min.js
wp-admin/js/wp-fullscreen-stub.js
wp-admin/link-add.php
wp-admin/link-manager.php
wp-admin/link.php
wp-admin/load-scripts.php
wp-admin/load-styles.php
wp-admin/maint/repair.php
wp-admin/media-new.php
wp-admin/media-upload.php
wp-admin/media.php
wp-admin/menu-header.php
wp-admin/menu.php
wp-admin/ms-delete-site.php
wp-admin/my-sites.php
wp-admin/nav-menus.php
wp-admin/network.php
wp-admin/network/admin.php
wp-admin/network/index.php
wp-admin/network/menu.php
wp-admin/network/settings.php
wp-admin/network/site-info.php
wp-admin/network/site-new.php
wp-admin/network/site-settings.php
wp-admin/network/site-themes.php
wp-admin/network/site-users.php
wp-admin/network/sites.php
wp-admin/network/themes.php
wp-admin/network/upgrade.php
wp-admin/network/user-new.php
wp-admin/network/users.php
wp-admin/options-discussion.php
wp-admin/options-general.php
wp-admin/options-head.php
wp-admin/options-media.php
wp-admin/options-permalink.php
wp-admin/options-reading.php
wp-admin/options-writing.php
wp-admin/options.php
wp-admin/plugin-editor.php
wp-admin/plugin-install.php
wp-admin/plugins.php
wp-admin/post-new.php
wp-admin/post.php
wp-admin/press-this.php
wp-admin/revision.php
wp-admin/setup-config.php
wp-admin/term.php
wp-admin/theme-editor.php
wp-admin/theme-install.php
wp-admin/themes.php
wp-admin/update-core.php
wp-admin/update.php
wp-admin/upgrade-functions.php
wp-admin/upload.php
wp-admin/user-edit.php
wp-admin/user-new.php
wp-admin/user/admin.php
wp-admin/users.php
wp-admin/widgets.php
wp-comments-post.php
wp-content/themes/twentyfifteen/functions.php
wp-content/themes/twentyfifteen/languages/twentyfifteen.pot [deleted file]
wp-content/themes/twentyfifteen/readme.txt
wp-content/themes/twentyfifteen/style.css
wp-content/themes/twentyfourteen/functions.php
wp-content/themes/twentyfourteen/languages/twentyfourteen.pot [deleted file]
wp-content/themes/twentyfourteen/readme.txt
wp-content/themes/twentyfourteen/style.css
wp-content/themes/twentysixteen/css/editor-style.css
wp-content/themes/twentysixteen/functions.php
wp-content/themes/twentysixteen/inc/customizer.php
wp-content/themes/twentysixteen/inc/template-tags.php
wp-content/themes/twentysixteen/languages/twentysixteen.pot [deleted file]
wp-content/themes/twentysixteen/readme.txt
wp-content/themes/twentysixteen/style.css
wp-includes/Requests/Auth.php [new file with mode: 0644]
wp-includes/Requests/Auth/Basic.php [new file with mode: 0644]
wp-includes/Requests/Cookie.php [new file with mode: 0644]
wp-includes/Requests/Cookie/Jar.php [new file with mode: 0644]
wp-includes/Requests/Exception.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/304.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/305.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/306.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/400.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/401.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/402.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/403.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/404.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/405.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/406.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/407.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/408.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/409.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/410.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/411.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/412.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/413.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/414.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/415.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/416.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/417.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/418.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/428.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/429.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/431.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/500.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/501.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/502.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/503.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/504.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/505.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/511.php [new file with mode: 0644]
wp-includes/Requests/Exception/HTTP/Unknown.php [new file with mode: 0644]
wp-includes/Requests/Exception/Transport.php [new file with mode: 0644]
wp-includes/Requests/Exception/Transport/cURL.php [new file with mode: 0644]
wp-includes/Requests/Hooker.php [new file with mode: 0644]
wp-includes/Requests/Hooks.php [new file with mode: 0644]
wp-includes/Requests/IDNAEncoder.php [new file with mode: 0644]
wp-includes/Requests/IPv6.php [new file with mode: 0644]
wp-includes/Requests/IRI.php [new file with mode: 0644]
wp-includes/Requests/Proxy.php [new file with mode: 0644]
wp-includes/Requests/Proxy/HTTP.php [new file with mode: 0644]
wp-includes/Requests/Response.php [new file with mode: 0644]
wp-includes/Requests/Response/Headers.php [new file with mode: 0644]
wp-includes/Requests/SSL.php [new file with mode: 0644]
wp-includes/Requests/Session.php [new file with mode: 0644]
wp-includes/Requests/Transport.php [new file with mode: 0644]
wp-includes/Requests/Transport/cURL.php [new file with mode: 0644]
wp-includes/Requests/Transport/fsockopen.php [new file with mode: 0644]
wp-includes/Requests/Utility/CaseInsensitiveDictionary.php [new file with mode: 0644]
wp-includes/Requests/Utility/FilteredIterator.php [new file with mode: 0644]
wp-includes/admin-bar.php
wp-includes/atomlib.php
wp-includes/author-template.php
wp-includes/bookmark-template.php
wp-includes/bookmark.php
wp-includes/cache.php
wp-includes/canonical.php
wp-includes/capabilities.php
wp-includes/category-template.php
wp-includes/category.php
wp-includes/certificates/ca-bundle.crt
wp-includes/class-IXR.php
wp-includes/class-feed.php
wp-includes/class-http.php
wp-includes/class-oembed.php
wp-includes/class-requests.php [new file with mode: 0644]
wp-includes/class-simplepie.php
wp-includes/class-snoopy.php
wp-includes/class-walker-category.php
wp-includes/class-walker-comment.php
wp-includes/class-walker-nav-menu.php [new file with mode: 0644]
wp-includes/class-walker-page-dropdown.php
wp-includes/class-walker-page.php
wp-includes/class-wp-admin-bar.php
wp-includes/class-wp-ajax-response.php
wp-includes/class-wp-comment-query.php
wp-includes/class-wp-customize-control.php
wp-includes/class-wp-customize-manager.php
wp-includes/class-wp-customize-nav-menus.php
wp-includes/class-wp-customize-panel.php
wp-includes/class-wp-customize-section.php
wp-includes/class-wp-customize-setting.php
wp-includes/class-wp-customize-widgets.php
wp-includes/class-wp-editor.php
wp-includes/class-wp-embed.php
wp-includes/class-wp-error.php
wp-includes/class-wp-http-cookie.php
wp-includes/class-wp-http-curl.php
wp-includes/class-wp-http-encoding.php
wp-includes/class-wp-http-ixr-client.php
wp-includes/class-wp-http-proxy.php
wp-includes/class-wp-http-requests-response.php [new file with mode: 0644]
wp-includes/class-wp-http-streams.php
wp-includes/class-wp-image-editor-gd.php
wp-includes/class-wp-image-editor-imagick.php
wp-includes/class-wp-image-editor.php
wp-includes/class-wp-locale.php [new file with mode: 0644]
wp-includes/class-wp-meta-query.php
wp-includes/class-wp-metadata-lazyloader.php
wp-includes/class-wp-network-query.php [new file with mode: 0644]
wp-includes/class-wp-network.php
wp-includes/class-wp-oembed-controller.php
wp-includes/class-wp-post-type.php [new file with mode: 0644]
wp-includes/class-wp-rewrite.php
wp-includes/class-wp-role.php
wp-includes/class-wp-roles.php
wp-includes/class-wp-site-query.php [new file with mode: 0644]
wp-includes/class-wp-site.php
wp-includes/class-wp-tax-query.php
wp-includes/class-wp-term-query.php [new file with mode: 0644]
wp-includes/class-wp-term.php
wp-includes/class-wp-theme.php
wp-includes/class-wp-user-query.php
wp-includes/class-wp-user.php
wp-includes/class-wp-walker.php
wp-includes/class-wp-widget-factory.php
wp-includes/class-wp-widget.php
wp-includes/class-wp-xmlrpc-server.php
wp-includes/class-wp.php
wp-includes/class.wp-scripts.php
wp-includes/class.wp-styles.php
wp-includes/comment-template.php
wp-includes/comment.php
wp-includes/compat.php
wp-includes/cron.php
wp-includes/css/admin-bar-rtl.css
wp-includes/css/admin-bar-rtl.min.css
wp-includes/css/admin-bar.css
wp-includes/css/admin-bar.min.css
wp-includes/css/buttons-rtl.css
wp-includes/css/buttons.css
wp-includes/css/editor-rtl.css
wp-includes/css/editor-rtl.min.css
wp-includes/css/editor.css
wp-includes/css/editor.min.css
wp-includes/css/media-views-rtl.css
wp-includes/css/media-views-rtl.min.css
wp-includes/css/media-views.css
wp-includes/css/media-views.min.css
wp-includes/css/wp-embed-template.css
wp-includes/css/wp-embed-template.min.css
wp-includes/customize/class-wp-customize-header-image-control.php
wp-includes/customize/class-wp-customize-media-control.php
wp-includes/customize/class-wp-customize-nav-menu-auto-add-control.php
wp-includes/customize/class-wp-customize-nav-menu-control.php
wp-includes/customize/class-wp-customize-nav-menu-item-setting.php
wp-includes/customize/class-wp-customize-nav-menu-location-control.php
wp-includes/customize/class-wp-customize-nav-menu-section.php
wp-includes/customize/class-wp-customize-nav-menu-setting.php
wp-includes/customize/class-wp-customize-selective-refresh.php
wp-includes/customize/class-wp-customize-site-icon-control.php
wp-includes/date.php
wp-includes/default-constants.php
wp-includes/default-filters.php
wp-includes/deprecated.php
wp-includes/embed-template.php
wp-includes/embed.php
wp-includes/feed-atom-comments.php
wp-includes/feed-rss2.php
wp-includes/feed.php
wp-includes/formatting.php
wp-includes/functions.php
wp-includes/functions.wp-scripts.php
wp-includes/functions.wp-styles.php
wp-includes/general-template.php
wp-includes/http.php
wp-includes/js/admin-bar.min.js
wp-includes/js/autosave.js
wp-includes/js/autosave.min.js
wp-includes/js/backbone.min.js
wp-includes/js/colorpicker.min.js
wp-includes/js/customize-base.js
wp-includes/js/customize-base.min.js
wp-includes/js/customize-loader.js
wp-includes/js/customize-loader.min.js
wp-includes/js/customize-models.min.js
wp-includes/js/customize-preview-nav-menus.min.js
wp-includes/js/customize-preview-widgets.js
wp-includes/js/customize-preview-widgets.min.js
wp-includes/js/customize-preview.js
wp-includes/js/customize-preview.min.js
wp-includes/js/customize-selective-refresh.js
wp-includes/js/customize-selective-refresh.min.js
wp-includes/js/heartbeat.min.js
wp-includes/js/imagesloaded.min.js [new file with mode: 0644]
wp-includes/js/jquery/ui/accordion.min.js
wp-includes/js/jquery/ui/autocomplete.min.js
wp-includes/js/jquery/ui/button.min.js
wp-includes/js/jquery/ui/core.min.js
wp-includes/js/jquery/ui/datepicker.min.js
wp-includes/js/jquery/ui/dialog.min.js
wp-includes/js/jquery/ui/draggable.min.js
wp-includes/js/jquery/ui/droppable.min.js
wp-includes/js/jquery/ui/effect-bounce.min.js
wp-includes/js/jquery/ui/effect-explode.min.js
wp-includes/js/jquery/ui/effect-pulsate.min.js
wp-includes/js/jquery/ui/effect-shake.min.js
wp-includes/js/jquery/ui/effect-size.min.js
wp-includes/js/jquery/ui/effect.min.js
wp-includes/js/jquery/ui/menu.min.js
wp-includes/js/jquery/ui/mouse.min.js
wp-includes/js/jquery/ui/position.min.js
wp-includes/js/jquery/ui/progressbar.min.js
wp-includes/js/jquery/ui/resizable.min.js
wp-includes/js/jquery/ui/selectable.min.js
wp-includes/js/jquery/ui/slider.min.js
wp-includes/js/jquery/ui/sortable.min.js
wp-includes/js/jquery/ui/spinner.min.js
wp-includes/js/jquery/ui/tabs.min.js
wp-includes/js/jquery/ui/tooltip.min.js
wp-includes/js/jquery/ui/widget.min.js
wp-includes/js/json2.min.js
wp-includes/js/masonry.min.js
wp-includes/js/mce-view.js
wp-includes/js/mce-view.min.js
wp-includes/js/media-editor.js
wp-includes/js/media-editor.min.js
wp-includes/js/media-grid.js
wp-includes/js/media-grid.min.js
wp-includes/js/media-models.min.js
wp-includes/js/media-views.js
wp-includes/js/media-views.min.js
wp-includes/js/mediaelement/flashmediaelement.swf
wp-includes/js/mediaelement/mediaelement-and-player.min.js
wp-includes/js/mediaelement/mediaelementplayer.min.css
wp-includes/js/mediaelement/silverlightmediaelement.xap
wp-includes/js/mediaelement/wp-playlist.min.js
wp-includes/js/plupload/handlers.js
wp-includes/js/plupload/handlers.min.js
wp-includes/js/plupload/wp-plupload.js
wp-includes/js/plupload/wp-plupload.min.js
wp-includes/js/quicktags.js
wp-includes/js/quicktags.min.js
wp-includes/js/shortcode.js
wp-includes/js/shortcode.min.js
wp-includes/js/thickbox/thickbox.css
wp-includes/js/thickbox/thickbox.js
wp-includes/js/tinymce/plugins/charmap/plugin.js
wp-includes/js/tinymce/plugins/charmap/plugin.min.js
wp-includes/js/tinymce/plugins/compat3x/css/dialog.css
wp-includes/js/tinymce/plugins/fullscreen/plugin.js
wp-includes/js/tinymce/plugins/fullscreen/plugin.min.js
wp-includes/js/tinymce/plugins/lists/plugin.js
wp-includes/js/tinymce/plugins/lists/plugin.min.js
wp-includes/js/tinymce/plugins/media/plugin.js
wp-includes/js/tinymce/plugins/media/plugin.min.js
wp-includes/js/tinymce/plugins/paste/plugin.js
wp-includes/js/tinymce/plugins/paste/plugin.min.js
wp-includes/js/tinymce/plugins/wordpress/plugin.js
wp-includes/js/tinymce/plugins/wordpress/plugin.min.js
wp-includes/js/tinymce/plugins/wpautoresize/plugin.min.js
wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js
wp-includes/js/tinymce/plugins/wpemoji/plugin.min.js
wp-includes/js/tinymce/plugins/wplink/plugin.js
wp-includes/js/tinymce/plugins/wplink/plugin.min.js
wp-includes/js/tinymce/plugins/wptextpattern/plugin.js
wp-includes/js/tinymce/plugins/wptextpattern/plugin.min.js
wp-includes/js/tinymce/plugins/wpview/plugin.js
wp-includes/js/tinymce/plugins/wpview/plugin.min.js
wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.json
wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.svg
wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css
wp-includes/js/tinymce/skins/lightgray/skin.min.css
wp-includes/js/tinymce/skins/wordpress/wp-content.css
wp-includes/js/tinymce/themes/inlite/theme.js [new file with mode: 0644]
wp-includes/js/tinymce/themes/inlite/theme.min.js [new file with mode: 0644]
wp-includes/js/tinymce/themes/modern/theme.js
wp-includes/js/tinymce/themes/modern/theme.min.js
wp-includes/js/tinymce/tinymce.min.js
wp-includes/js/tinymce/wp-tinymce.js.gz
wp-includes/js/twemoji.js
wp-includes/js/twemoji.min.js
wp-includes/js/utils.min.js
wp-includes/js/wp-a11y.js
wp-includes/js/wp-a11y.min.js
wp-includes/js/wp-ajax-response.min.js
wp-includes/js/wp-embed-template.js
wp-includes/js/wp-embed-template.min.js
wp-includes/js/wp-embed.min.js
wp-includes/js/wp-emoji-loader.js
wp-includes/js/wp-emoji-loader.min.js
wp-includes/js/wp-emoji-release.min.js
wp-includes/js/wp-emoji.js
wp-includes/js/wp-emoji.min.js
wp-includes/js/wp-list-revisions.min.js
wp-includes/js/wp-lists.js
wp-includes/js/wp-lists.min.js
wp-includes/js/wp-util.js
wp-includes/js/wp-util.min.js
wp-includes/js/wplink.js
wp-includes/js/wplink.min.js
wp-includes/kses.php
wp-includes/l10n.php
wp-includes/link-template.php
wp-includes/load.php
wp-includes/locale.php
wp-includes/media-template.php
wp-includes/media.php
wp-includes/meta.php
wp-includes/ms-blogs.php
wp-includes/ms-default-constants.php
wp-includes/ms-deprecated.php
wp-includes/ms-functions.php
wp-includes/ms-load.php
wp-includes/ms-settings.php
wp-includes/nav-menu-template.php
wp-includes/nav-menu.php
wp-includes/option.php
wp-includes/pluggable-deprecated.php
wp-includes/pluggable.php
wp-includes/plugin.php
wp-includes/post-template.php
wp-includes/post-thumbnail-template.php
wp-includes/post.php
wp-includes/query.php
wp-includes/registration-functions.php
wp-includes/registration.php
wp-includes/rest-api.php
wp-includes/rest-api/class-wp-rest-request.php
wp-includes/rest-api/class-wp-rest-response.php
wp-includes/rest-api/class-wp-rest-server.php
wp-includes/revision.php
wp-includes/rewrite.php
wp-includes/rss-functions.php
wp-includes/rss.php
wp-includes/script-loader.php
wp-includes/session.php
wp-includes/shortcodes.php
wp-includes/taxonomy.php
wp-includes/template-loader.php
wp-includes/template.php
wp-includes/theme-compat/comments.php
wp-includes/theme-compat/embed-content.php
wp-includes/theme-compat/footer-embed.php
wp-includes/theme-compat/footer.php
wp-includes/theme-compat/header-embed.php
wp-includes/theme-compat/header.php
wp-includes/theme-compat/sidebar.php
wp-includes/theme.php
wp-includes/update.php
wp-includes/user.php
wp-includes/vars.php
wp-includes/version.php
wp-includes/widgets.php
wp-includes/widgets/class-wp-nav-menu-widget.php
wp-includes/widgets/class-wp-widget-archives.php
wp-includes/widgets/class-wp-widget-categories.php
wp-includes/widgets/class-wp-widget-links.php
wp-includes/widgets/class-wp-widget-meta.php
wp-includes/widgets/class-wp-widget-pages.php
wp-includes/widgets/class-wp-widget-recent-comments.php
wp-includes/widgets/class-wp-widget-recent-posts.php
wp-includes/widgets/class-wp-widget-tag-cloud.php
wp-includes/widgets/class-wp-widget-text.php
wp-includes/wp-db.php
wp-includes/wp-diff.php
wp-links-opml.php
wp-load.php
wp-login.php
wp-mail.php
wp-settings.php
wp-signup.php
xmlrpc.php

index e75620008d0eb664d7c7446431eafc92b0788123..78da489abb25a0b71d56c59dedde78d734f9e83e 100644 (file)
@@ -9,7 +9,7 @@
 <body>
 <h1 id="logo">
        <a href="https://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
-       <br /> Version 4.5.3
+       <br /> Version 4.6
 </h1>
 <p style="text-align: center">Semantic Personal Publishing Platform</p>
 
 
 <h2>System Requirements</h2>
 <ul>
-       <li><a href="http://php.net/">PHP</a> version <strong>5.2.4</strong> or higher.</li>
-       <li><a href="http://www.mysql.com/">MySQL</a> version <strong>5.0</strong> or higher.</li>
+       <li><a href="https://secure.php.net/">PHP</a> version <strong>5.2.4</strong> or higher.</li>
+       <li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.0</strong> or higher.</li>
 </ul>
 
 <h3>Recommendations</h3>
 <ul>
-       <li><a href="http://php.net/">PHP</a> version <strong>5.6</strong> or higher.</li>
-       <li><a href="http://www.mysql.com/">MySQL</a> version <strong>5.6</strong> or higher.</li>
-       <li>The <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a> Apache module.</li>
+       <li><a href="https://secure.php.net/">PHP</a> version <strong>5.6</strong> or higher.</li>
+       <li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.6</strong> or higher.</li>
+       <li>The <a href="https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a> Apache module.</li>
        <li>A link to <a href="https://wordpress.org/">wordpress.org</a> on your site.</li>
 </ul>
 
@@ -83,7 +83,7 @@
 <h2>Final Notes</h2>
 <ul>
        <li>If you have any suggestions, ideas, or comments, or if you (gasp!) found a bug, join us in the <a href="https://wordpress.org/support/">Support Forums</a>.</li>
-       <li>WordPress has a robust plugin <abbr title="application programming interface">API</abbr> that makes extending the code easy. If you are a developer interested in utilizing this, see the <a href="https://codex.wordpress.org/Plugin_API" title="WordPress plugin API">plugin documentation in the Codex</a>. You shouldn&#8217;t modify any of the core code.</li>
+       <li>WordPress has a robust plugin <abbr title="application programming interface">API</abbr> that makes extending the code easy. If you are a developer interested in utilizing this, see the <a href="https://developer.wordpress.org/plugins/">Plugin Developer Handbook</a>. You shouldn&#8217;t modify any of the core code.</li>
 </ul>
 
 <h2>Share the Love</h2>
index bfd562076cfd987884cf79f3fd68d349c589fe59..0f6181a5d196c46765fa95f4d5a3a162f1f68c5c 100644 (file)
@@ -32,13 +32,17 @@ $wp_query->is_404 = false;
 do_action( 'activate_header' );
 
 /**
- * Adds an action hook specific to this page that fires on wp_head
+ * Adds an action hook specific to this page.
+ *
+ * Fires on {@see 'wp_head'}.
  *
  * @since MU
  */
 function do_activate_header() {
-    /**
-     * Fires before the Site Activation page is loaded, but on the wp_head action.
+       /**
+        * Fires before the Site Activation page is loaded.
+        *
+        * Fires on the {@see 'wp_head'} action.
      *
      * @since 3.0.0
      */
@@ -88,22 +92,37 @@ get_header( 'wp-activate' );
                $result = wpmu_activate_signup( $key );
                if ( is_wp_error($result) ) {
                        if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
-                           $signup = $result->get_error_data();
+                               $signup = $result->get_error_data();
                                ?>
                                <h2><?php _e('Your account is now active!'); ?></h2>
                                <?php
                                echo '<p class="lead-in">';
                                if ( $signup->domain . $signup->path == '' ) {
-                                       printf( __('Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.'), network_site_url( 'wp-login.php', 'login' ), $signup->user_login, $signup->user_email, wp_lostpassword_url() );
+                                       printf(
+                                               /* translators: 1: login URL, 2: username, 3: user email, 4: lost password URL */
+                                               __( 'Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
+                                               network_site_url( 'wp-login.php', 'login' ),
+                                               $signup->user_login,
+                                               $signup->user_email,
+                                               wp_lostpassword_url()
+                                       );
                                } else {
-                                       printf( __('Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of &#8220;%3$s&#8221;. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, wp_lostpassword_url() );
+                                       printf(
+                                               /* translators: 1: site URL, 2: site domain, 3: username, 4: user email, 5: lost password URL */
+                                               __( 'Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of &#8220;%3$s&#8221;. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.' ),
+                                               'http://' . $signup->domain,
+                                               $signup->domain,
+                                               $signup->user_login,
+                                               $signup->user_email,
+                                               wp_lostpassword_url()
+                                       );
                                }
                                echo '</p>';
                        } else {
                                ?>
-                               <h2><?php _e('An error occurred during the activation'); ?></h2>
+                               <h2><?php _e( 'An error occurred during the activation' ); ?></h2>
+                               <p><?php echo $result->get_error_message(); ?></p>
                                <?php
-                           echo '<p>'.$result->get_error_message().'</p>';
                        }
                } else {
                        $url = isset( $result['blog_id'] ) ? get_blogaddress_by_id( (int) $result['blog_id'] ) : '';
@@ -121,9 +140,15 @@ get_header( 'wp-activate' );
                                $login_url = wp_login_url();
                                restore_current_blog();
                                ?>
-                               <p class="view"><?php printf( __( 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>' ), $url, esc_url( $login_url ) ); ?></p>
+                               <p class="view"><?php
+                                       /* translators: 1: site URL, 2: login URL */
+                                       printf( __( 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>' ), $url, esc_url( $login_url ) );
+                               ?></p>
                        <?php else: ?>
-                               <p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url('wp-login.php', 'login'), network_home_url() ); ?></p>
+                               <p class="view"><?php
+                                       /* translators: 1: login URL, 2: network home URL */
+                                       printf( __( 'Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url( 'wp-login.php', 'login' ), network_home_url() );
+                               ?></p>
                        <?php endif;
                }
        }
index f22c555f94092fc507cea25280183718a4431034..51d6a8d44023c2f7ec5d20db700ee0c142477de4 100644 (file)
@@ -9,11 +9,31 @@
 /** WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( current_user_can( 'customize' ) ) {
-       wp_enqueue_script( 'customize-loader' );
+if ( ! wp_is_mobile() ) {
+       wp_enqueue_style( 'wp-mediaelement' );
+       wp_enqueue_script( 'wp-mediaelement' );
+       wp_localize_script( 'mediaelement', '_wpmejsSettings', array(
+               'pluginPath'        => includes_url( 'js/mediaelement/', 'relative' ),
+               'pauseOtherPlayers' => '',
+       ) );
 }
 
-$video_url = 'https://videopress.com/embed/scFdjVo6?hd=true';
+/**
+ * Replaces the height and width attributes with values for full size.
+ *
+ * wp_video_shortcode() limits the width to 640px.
+ *
+ * @since 4.6.0
+ * @ignore
+ *
+ * @param $output Video shortcode HTML output.
+ * @return string Filtered HTML content to display video.
+ */
+function _wp_override_admin_video_width_limit( $output ) {
+       return str_replace( array( '640', '384' ), array( '1050', '630' ), $output );
+}
+
+$video_url = 'https://videopress.com/embed/GbdhpGF3?hd=true';
 $locale    = str_replace( '_', '-', get_locale() );
 list( $locale ) = explode( '-', $locale );
 if ( 'en' !== $locale ) {
@@ -29,7 +49,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
        <div class="wrap about-wrap">
                <h1><?php printf( __( 'Welcome to WordPress&nbsp;%s' ), $display_version ); ?></h1>
 
-               <div class="about-text"><?php printf( __( 'Thank you for updating! WordPress %s streamlines your workflow, whether you&#8217;re writing or building your site.' ), $display_version ); ?></div>
+               <p class="about-text"><?php printf( __( 'Thank you for updating to the latest version. WordPress %s changes a lot behind the scenes to make your WordPress experience even better!' ), $display_version ); ?></p>
                <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
 
                <h2 class="nav-tab-wrapper wp-clearfix">
@@ -38,78 +58,63 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
                        <a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
                </h2>
 
-               <div class="changelog point-releases">
-                       <h3><?php _e( 'Maintenance and Security Releases' ); ?></h3>
-                       <p><?php printf( _n( '<strong>Version %s</strong> addressed some security issues and fixed %2$s bug.',
-                               '<strong>Version %s</strong> addressed some security issues and fixed %2$s bugs.', 17 ), '4.5.3', number_format_i18n( 17 ) ); ?>
-                               <?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.5.3' ); ?>
-                       </p>
-                       <p><?php printf( __( '<strong>Version %s</strong> addressed some security issues.' ), '4.5.2' ); ?>
-                               <?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.5.2' ); ?>
-                       </p>
-                       <p><?php printf( _n( '<strong>Version %1$s</strong> addressed %2$s bug.',
-                               '<strong>Version %1$s</strong> addressed %2$s bugs.', 12 ), '4.5.1', number_format_i18n( 12 ) ); ?>
-                               <?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.5.1' ); ?>
-                       </p>
-               </div>
-
-               <div class="headline-feature feature-video" style="background-color:#191E23;">
+               <div class="headline-feature feature-video">
                        <iframe width="1050" height="591" src="<?php echo esc_url( $video_url ); ?>" frameborder="0" allowfullscreen></iframe>
                        <script src="https://videopress.com/videopress-iframe.js"></script>
                </div>
 
                <hr>
 
-               <div class="feature-section two-col">
-                       <h2><?php _e( 'Editing Improvements' ); ?></h2>
-                       <div class="col">
-                               <img src="https://s.w.org/images/core/4.5/link-edit-560.png" alt="" srcset="https://s.w.org/images/core/4.5/link-edit-1000.png 1000w, https://s.w.org/images/core/4.5/link-edit-800.png 800w, https://s.w.org/images/core/4.5/link-edit-680.png 680w, https://s.w.org/images/core/4.5/link-edit-560.png 560w, https://s.w.org/images/core/4.5/link-edit-400.png 400w, https://s.w.org/images/core/4.5/link-edit-280.png 280w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 781px) calc((100vw - 70px) * .466), (max-width: 959px) calc((100vw - 116px) * .469), (max-width: 1290px) calc((100vw - 240px) * .472), 496px"/>
-                               <h3><?php _e( 'Inline Linking' ); ?></h3>
-                               <p><?php _e( 'Stay focused on your writing with a less distracting interface that keeps you in place and allows you to easily link to your content.' ); ?></p>
-                       </div>
-                       <div class="col">
-                               <img src="https://s.w.org/images/core/4.5/formatting-560.png" alt="" srcset="https://s.w.org/images/core/4.5/formatting-1000.png 1000w, https://s.w.org/images/core/4.5/formatting-800.png 800w, https://s.w.org/images/core/4.5/formatting-680.png 680w, https://s.w.org/images/core/4.5/formatting-560.png 560w, https://s.w.org/images/core/4.5/formatting-400.png 400w, https://s.w.org/images/core/4.5/formatting-280.png 280w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 781px) calc((100vw - 70px) * .466), (max-width: 959px) calc((100vw - 116px) * .469), (max-width: 1290px) calc((100vw - 240px) * .472), 496px"/>
-                               <h3><?php _e( 'Formatting Shortcuts' ); ?></h3>
-                               <p><?php _e( 'Do you enjoy using formatting shortcuts for lists and headings? Now they&#8217;re even more useful, with horizontal lines and <code>&lt;code&gt;</code>.' ); ?></p>
-                       </div>
+               <div class="streamlined-updates feature-section one-col">
+                       <h2><?php _e( 'Streamlined Updates' ); ?></h2>
+                       <p><?php _e( 'Don&#8217;t lose your place: stay on the same page while you update, install, and delete your plugins and themes.' ); ?></p>
+                       <?php
+                       if ( ! wp_is_mobile() ) {
+                               add_filter( 'wp_video_shortcode', '_wp_override_admin_video_width_limit' );
+                               echo wp_video_shortcode( array(
+                                       'mp4'      => 'https://s.w.org/images/core/4.6/streamlined-updates.mp4',
+                                       'webm'     => 'https://s.w.org/images/core/4.6/streamlined-updates.webm',
+                                       'poster'   => 'https://s.w.org/images/core/4.6/streamlined-updates-2000.png?v1',
+                                       'loop'     => true,
+                                       'autoplay' => true,
+                                       'width'    => 1050,
+                                       'height'   => 630,
+                                       'class'    => 'wp-video-shortcode feature-video',
+                               ) );
+                               remove_filter( 'wp_video_shortcode', '_wp_override_admin_video_width_limit' );
+                       } else {
+                               echo '<img src="https://s.w.org/images/core/4.6/streamlined-updates-1057.png?v1" alt="" srcset="https://s.w.org/images/core/4.6/streamlined-updates-1664.png?v1 1664w, https://s.w.org/images/core/4.6/streamlined-updates-200.png?v1 200w, https://s.w.org/images/core/4.6/streamlined-updates-1057.png?v1 1057w, https://s.w.org/images/core/4.6/streamlined-updates-2000.png?v1 2000w"  sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 782px) calc(100vw - 70px), (max-width: 959px) calc(100vw - 116px), (max-width: 1290px) calc(100vw - 240px), 1050px" />';
+                       }
+                       ?>
+               </div>
+
+               <hr />
+
+               <div class="native-fonts feature-section one-col">
+                       <h2><?php _e( 'Native Fonts' ); ?></h2>
+                       <p><?php _e( 'The WordPress dashboard now takes advantage of the fonts you already have, making it load faster and letting you feel more at home on whatever device you use.' ); ?></p>
+                       <img src="https://s.w.org/images/core/4.6/native-fonts-992.png?v1" alt="" srcset="https://cldup.com/Hqmo5VLb-E.png?v1 922w, https://s.w.org/images/core/4.6/native-fonts-200.png?v1 200w,https://s.w.org/images/core/4.6/native-fonts-371.png?v1 371w,https://s.w.org/images/core/4.6/native-fonts-510.png?v1 510w, https://s.w.org/images/core/4.6/native-fonts-560.png?v1 560w, https://s.w.org/images/core/4.6/native-fonts-781.png?v1 781w, https://s.w.org/images/core/4.6/native-fonts-2000.png?v1 2000w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 782px) calc(100vw - 70px), (max-width: 959px) calc(100vw - 116px), (max-width: 1290px) calc(100vw - 240px), 1050px"/>
                </div>
 
                <hr />
 
                <div class="feature-section two-col">
-                       <h2><?php _e( 'Customization Improvements' ); ?></h2>
+                       <h2><?php _e( 'Editor Improvements' ); ?></h2>
                        <div class="col">
-                               <img src="https://s.w.org/images/core/4.5/preview-icons-560.png" alt="" srcset="https://s.w.org/images/core/4.5/preview-icons-1000.png 1000w, https://s.w.org/images/core/4.5/preview-icons-800.png 800w, https://s.w.org/images/core/4.5/preview-icons-680.png 680w, https://s.w.org/images/core/4.5/preview-icons-560.png 560w, https://s.w.org/images/core/4.5/preview-icons-400.png 400w, https://s.w.org/images/core/4.5/preview-icons-280.png 280w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 781px) calc((100vw - 70px) * .466), (max-width: 959px) calc((100vw - 116px) * .469), (max-width: 1290px) calc((100vw - 240px) * .472), 496px"/>
-                               <h3><?php _e( 'Live Responsive Previews' ); ?></h3>
-                               <p><?php _e( 'Make sure your site looks great on all screens!' ); ?>
-                                       <?php
-                                       if ( current_user_can( 'customize' ) ) {
-                                               $customize_url = admin_url( 'customize.php' );
-                                               printf(
-                                                       /* translators: %s: URL to customizer */
-                                                       __( 'Preview mobile, tablet, and desktop views directly in the <a href="%s" class="load-customize">customizer</a>.' ),
-                                                       esc_url( $customize_url )
-                                               );
-                                       } else {
-                                               _e( 'Preview mobile, tablet, and desktop views directly in the customizer.' );
-                                       }
+                               <img src="https://s.w.org/images/core/4.6/inline-link-checker-608.png?v1" alt="" srcset="https://s.w.org/images/core/4.6/inline-link-checker-789.png?v1 789w, https://s.w.org/images/core/4.6/inline-link-checker-200.png?v1 200w, https://s.w.org/images/core/4.6/inline-link-checker-384.png?v1 384w, https://s.w.org/images/core/4.6/inline-link-checker-608.png?v1 608w, https://s.w.org/images/core/4.6/inline-link-checker-992.png?v1 992w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 781px) calc((100vw - 70px) * .466), (max-width: 959px) calc((100vw - 116px) * .469), (max-width: 1290px) calc((100vw - 240px) * .472), 496px"/>
+                               <h3><?php _e( 'Inline Link Checker' ); ?></h3>
+                               <p><?php
+                                       printf(
+                                               /* translators: %s: Home URL appended with 'wordpress.org'  */
+                                               __( 'Ever accidentally made a link to %s? Now WordPress automatically checks to make sure you didn&#8217;t.' ),
+                                               home_url( 'wordpress.org' )
+                                       );
                                ?></p>
                        </div>
                        <div class="col">
-                               <img src="https://s.w.org/images/core/4.5/custom-logos-560.png" alt="" srcset="https://s.w.org/images/core/4.5/custom-logos-1000.png 1000w, https://s.w.org/images/core/4.5/custom-logos-800.png 800w, https://s.w.org/images/core/4.5/custom-logos-680.png 680w, https://s.w.org/images/core/4.5/custom-logos-560.png 560w, https://s.w.org/images/core/4.5/custom-logos-400.png 400w, https://s.w.org/images/core/4.5/custom-logos-280.png 280w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 781px) calc((100vw - 70px) * .466), (max-width: 959px) calc((100vw - 116px) * .469), (max-width: 1290px) calc((100vw - 240px) * .472), 496px"/>
-                               <h3><?php _e( 'Custom Logos' ); ?></h3>
-                               <p><?php _e( 'Themes can now support logos for your business or brand.' ); ?>
-                                       <?php
-                                       if ( current_theme_supports( 'custom-logo' ) && current_user_can( 'customize' ) ) {
-                                               printf(
-                                                       /* translators: %s: URL to Site Identity section of the customizer */
-                                                       __( 'Your theme supports custom logos! Try it out right now in the <a href="%s" class="load-customize">Site Identity</a> section of the customizer.' ),
-                                                       esc_url( add_query_arg( array( 'autofocus' => array( 'section' => 'title_tagline' ) ), $customize_url ) )
-                                               );
-                                       } else {
-                                               _e( 'The Twenty Fifteen and Twenty Sixteen themes have been updated to support custom logos, which can be found in the Site Identity section of the customizer.' );
-                                       }
-                                       ?></p>
+                               <img src="https://s.w.org/images/core/4.6/content-recovery-561.png?v1" alt="" srcset="https://s.w.org/images/core/4.6/content-recovery-701.png?v1 701w, https://s.w.org/images/core/4.6/content-recovery-200.png?v1 200w, https://s.w.org/images/core/4.6/content-recovery-400.png?v1 400w, https://s.w.org/images/core/4.6/content-recovery-561.png?v1 561w, https://s.w.org/images/core/4.6/content-recovery-992.png?v1 992w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 781px) calc((100vw - 70px) * .466), (max-width: 959px) calc((100vw - 116px) * .469), (max-width: 1290px) calc((100vw - 240px) * .472), 496px"/>
+                               <h3><?php _e( 'Content Recovery' ); ?></h3>
+                               <p><?php _e( 'As you type, WordPress saves your content to the browser. Recovering saved content is even easier with WordPress 4.6.' ); ?></p>
                        </div>
                </div>
 
@@ -120,80 +125,86 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
 
                        <div class="under-the-hood three-col">
                                <div class="col">
-                                       <h3><?php _e( 'Selective Refresh' ); ?></h3>
+                                       <h3><?php _e( 'Resource Hints' ); ?></h3>
                                        <p><?php
                                                printf(
-                                                       /* translators: %s: URL to the development post of the new feature */
-                                                       __( 'The customizer now supports a <a href="%s">comprehensive framework</a> for rendering parts of the preview without rewriting your PHP code in JavaScript.' ),
-                                                       'https://make.wordpress.org/core/2016/02/16/selective-refresh-in-the-customizer/'
+                                                       /* translators: %s: https://make.wordpress.org/core/2016/07/06/resource-hints-in-4-6/ */
+                                                       __( '<a href="%s">Resource hints help browsers</a> decide which resources to fetch and preprocess. WordPress 4.6 adds them automatically for your styles and scripts making your site even faster.' ),
+                                                       'https://make.wordpress.org/core/2016/07/06/resource-hints-in-4-6/'
                                                );
-                                               if ( current_user_can( 'customize' ) && current_user_can( 'edit_theme_options' ) ) {
-                                                       if ( current_theme_supports( 'menus' ) && ! current_theme_supports( 'customize-selective-refresh-widgets' ) ) {
-                                                               printf(
-                                                                       /* translators: %s: URL to Menus section of the customizer  */
-                                                                       ' ' . __( 'See it in action with <a href="%s" class="load-customize">Menus</a>.' ),
-                                                                       esc_url( add_query_arg( array( 'autofocus' => array( 'panel' => 'nav_menus' ) ), $customize_url ) )
-                                                               );
-                                                       } elseif ( current_theme_supports( 'customize-selective-refresh-widgets' ) ) { // If widgets are supported, menus are also because of the menus widget.
-                                                               printf(
-                                                                       /* translators: 1: URL to Menus section of the customizer, 2: URL to Widgets section of the customizer */
-                                                                       ' ' . __( 'See it in action with <a href="%1$s" class="load-customize">Menus</a> or <a href="%2$s" class="load-customize">Widgets</a>.' ),
-                                                                       esc_url( add_query_arg( array( 'autofocus' => array( 'panel' => 'nav_menus' ) ), $customize_url ) ),
-                                                                       esc_url( add_query_arg( array( 'autofocus' => array( 'panel' => 'widgets' ) ), $customize_url ) )
-                                                               );
-                                                       }
-                                               }
                                        ?></p>
                                </div>
                                <div class="col">
-                                       <h3><?php _e( 'Smart Image Resizing' ); ?></h3>
+                                       <h3><?php _e( 'Robust Requests' ); ?></h3>
+                                       <p><?php _e( 'The HTTP API now leverages the Requests library, improving HTTP standard support and adding case-insensitive headers, parallel HTTP requests, and support for Internationalized Domain Names.' ); ?></p>
+                               </div>
+                               <div class="col">
+                                       <h3><?php
+                                               /* translators: 1: WP_Term_Query, 2: WP_Post_Type */
+                                               printf( __( '%1$s and %2$s' ), '<code>WP_Term_Query</code>', '<code>WP_Post_Type</code>' );
+                                       ?></h3>
                                        <p><?php
                                                printf(
-                                                       /* translators: %s: URL to the development post of the new feature */
-                                                       __( 'Generated images now load up to 50&#37; faster with no noticeable quality loss. <a href="%s">It&#8217;s really cool</a>.' ),
-                                                       'https://make.wordpress.org/core/2016/03/12/performance-improvements-for-images-in-wordpress-4-5/'
+                                                       /* translators: 1: WP_Term_Query, 2: WP_Post_Type */
+                                                       __( 'A new %1$s class adds flexibility to query term information while a new %2$s object makes interacting with post types more predictable.' ),
+                                                       '<code>WP_Term_Query</code>',
+                                                       '<code>WP_Post_Type</code>'
                                                );
                                        ?></p>
                                </div>
-                               <div class="col">
-                                       <h3><?php _e( 'JavaScript Library Updates' ); ?></h3>
-                                       <p><?php _e( 'jQuery 1.12.3, jQuery Migrate 1.4.0, Backbone 1.2.3, and Underscore 1.8.3 are bundled.' ); ?></p>
-                               </div>
                        </div>
 
-                       <div class="under-the-hood two-col">
+                       <div class="under-the-hood three-col">
                                <div class="col">
-                                       <h3><?php _e( 'Script Loader Improvements' ); ?></h3>
+                                       <h3><?php _e( 'Meta Registration API' ); ?></h3>
                                        <p><?php
                                                printf(
-                                                       /* translators: %s: wp_add_inline_script() */
-                                                       __( 'Better support has been added for script header/footer dependencies. New %s enables adding extra code to registered scripts.' ),
-                                                       '<code><a href="https://make.wordpress.org/core/2016/03/08/enhanced-script-loader-in-wordpress-4-5/">wp_add_inline_script()</a></code>'
+                                                       /* translators: %s: https://make.wordpress.org/core/2016/07/08/enhancing-register_meta-in-4-6/  */
+                                                       __( 'The Meta Registration API <a href="%s">has been expanded</a> to support types, descriptions, and REST API visibility.' ),
+                                                       'https://make.wordpress.org/core/2016/07/08/enhancing-register_meta-in-4-6/'
                                                );
                                        ?></p>
                                </div>
                                <div class="col">
-                                       <h3><?php _e( 'Better Embed Templates' ); ?></h3>
+                                       <h3><?php _e( 'Translations On Demand' ); ?></h3>
+                                       <p><?php _e( 'WordPress will install and use the newest language packs for your plugins and themes as soon as they&#8217;re available from <a href="https://translate.wordpress.org/">WordPress.org&#8217;s community of translators</a>.' ); ?></p>
+                               </div>
+                               <div class="col">
+                                       <h3><?php _e( 'JavaScript Library Updates' ); ?></h3>
+                                       <p><?php _e( 'Masonry 3.3.2, imagesLoaded 3.2.0, MediaElement.js 2.22.0, TinyMCE 4.4.1, and Backbone.js 1.3.3 are bundled.' ); ?></p>
+                               </div>
+                       </div>
+
+                       <div class="under-the-hood two-col">
+                               <div class="col">
+                                       <h3><?php _e( 'Customizer APIs for Setting Validation and Notifications' ); ?></h3>
+                                       <p><?php _e( 'Settings now have an <a href="https://make.wordpress.org/core/2016/07/05/customizer-apis-in-4-6-for-setting-validation-and-notifications/">API for enforcing validation constraints</a>. Likewise, customizer controls now support notifications, which are used to display validation errors instead of failing silently.' ); ?></p>
+                               </div>
+                               <div class="col">
+                                       <h3><?php _e( 'Multisite, now faster than ever' ); ?></h3>
                                        <p><?php
                                                printf(
-                                                       /* translators: %s: URL to the development post of the new feature */
-                                                       __( 'Embed templates have been split into parts and can be <a href="%s">directly overridden by themes</a> via the template hierarchy.' ),
-                                                       'https://make.wordpress.org/core/2016/03/11/embeds-changes-in-wordpress-4-5/'
+                                                       /* translators: 1: WP_Site_Query, 2: WP_Network_Query */
+                                                       __( 'Cached and comprehensive site queries improve your network admin experience. The addition of %1$s and %2$s help craft advanced queries with less effort.' ),
+                                                       '<code>WP_Site_Query</code>',
+                                                       '<code>WP_Network_Query</code>'
                                                );
                                        ?></p>
                                </div>
                        </div>
+               </div>
 
-                       <div class="return-to-dashboard">
-                               <?php if ( current_user_can( 'update_core' ) && isset( $_GET['updated'] ) ) : ?>
-                                       <a href="<?php echo esc_url( self_admin_url( 'update-core.php' ) ); ?>">
-                                               <?php is_multisite() ? _e( 'Return to Updates' ) : _e( 'Return to Dashboard &rarr; Updates' ); ?>
-                                       </a> |
-                               <?php endif; ?>
-                               <a href="<?php echo esc_url( self_admin_url() ); ?>"><?php is_blog_admin() ? _e( 'Go to Dashboard &rarr; Home' ) : _e( 'Go to Dashboard' ); ?></a>
-                       </div>
+               <hr />
 
+               <div class="return-to-dashboard">
+                       <?php if ( current_user_can( 'update_core' ) && isset( $_GET['updated'] ) ) : ?>
+                               <a href="<?php echo esc_url( self_admin_url( 'update-core.php' ) ); ?>">
+                                       <?php is_multisite() ? _e( 'Return to Updates' ) : _e( 'Return to Dashboard &rarr; Updates' ); ?>
+                               </a> |
+                       <?php endif; ?>
+                       <a href="<?php echo esc_url( self_admin_url() ); ?>"><?php is_blog_admin() ? _e( 'Go to Dashboard &rarr; Home' ) : _e( 'Go to Dashboard' ); ?></a>
                </div>
+
        </div>
 <?php
 
index f3a816acab8d61f7ed97547d56fb457c193d07bf..e0f4464d94dd8c179ba8626903a5c9360beb94e2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * WordPress AJAX Process Execution.
+ * WordPress Ajax Process Execution
  *
  * @package WordPress
  * @subpackage Administration
@@ -9,7 +9,7 @@
  */
 
 /**
- * Executing AJAX process.
+ * Executing Ajax process.
  *
  * @since 2.1.0
  */
@@ -62,7 +62,9 @@ $core_actions_post = array(
        'send-attachment-to-editor', 'save-attachment-order', 'heartbeat', 'get-revision-diffs',
        'save-user-color-scheme', 'update-widget', 'query-themes', 'parse-embed', 'set-attachment-thumbnail',
        'parse-media-shortcode', 'destroy-sessions', 'install-plugin', 'update-plugin', 'press-this-save-post',
-       'press-this-add-category', 'crop-image', 'generate-password', 'save-wporg-username',
+       'press-this-add-category', 'crop-image', 'generate-password', 'save-wporg-username', 'delete-plugin',
+       'search-plugins', 'search-install-plugins', 'activate-plugin', 'update-theme', 'delete-theme',
+       'install-theme', 'get-post-thumbnail-html',
 );
 
 // Deprecated
@@ -79,20 +81,20 @@ add_action( 'wp_ajax_nopriv_heartbeat', 'wp_ajax_nopriv_heartbeat', 1 );
 
 if ( is_user_logged_in() ) {
        /**
-        * Fires authenticated AJAX actions for logged-in users.
+        * Fires authenticated Ajax actions for logged-in users.
         *
         * The dynamic portion of the hook name, `$_REQUEST['action']`,
-        * refers to the name of the AJAX action callback being fired.
+        * refers to the name of the Ajax action callback being fired.
         *
         * @since 2.1.0
         */
        do_action( 'wp_ajax_' . $_REQUEST['action'] );
 } else {
        /**
-        * Fires non-authenticated AJAX actions for logged-out users.
+        * Fires non-authenticated Ajax actions for logged-out users.
         *
         * The dynamic portion of the hook name, `$_REQUEST['action']`,
-        * refers to the name of the AJAX action callback being fired.
+        * refers to the name of the Ajax action callback being fired.
         *
         * @since 2.8.0
         */
index a99eabac13310feff57ec5b064e4da0bcd578461..f32ce07eaa12bd1a862f3149ab3b5d46f57ffe99 100644 (file)
@@ -9,6 +9,11 @@
 // don't load directly
 if ( !defined('ABSPATH') )
        die('-1');
+
+/**
+ * @global string $hook_suffix
+ */
+global $hook_suffix;
 ?>
 
 <div class="clear"></div></div><!-- wpbody-content -->
@@ -28,7 +33,7 @@ if ( !defined('ABSPATH') )
                <?php
                $text = sprintf( __( 'Thank you for creating with <a href="%s">WordPress</a>.' ), __( 'https://wordpress.org/' ) );
                /**
-                * Filter the "Thank you" text displayed in the admin footer.
+                * Filters the "Thank you" text displayed in the admin footer.
                 *
                 * @since 2.8.0
                 *
@@ -40,7 +45,7 @@ if ( !defined('ABSPATH') )
        <p id="footer-upgrade" class="alignright">
                <?php
                /**
-                * Filter the version/update text displayed in the admin footer.
+                * Filters the version/update text displayed in the admin footer.
                 *
                 * WordPress prints the current version and update information,
                 * using core_update_footer() at priority 10.
@@ -58,7 +63,7 @@ if ( !defined('ABSPATH') )
 </div>
 <?php
 /**
- * Print scripts or data before the default footer scripts.
+ * Prints scripts or data before the default footer scripts.
  *
  * @since 1.2.0
  *
@@ -66,6 +71,20 @@ if ( !defined('ABSPATH') )
  */
 do_action( 'admin_footer', '' );
 
+/**
+ * Prints scripts and data queued for the footer.
+ *
+ * The dynamic portion of the hook name, `$hook_suffix`,
+ * refers to the global hook suffix of the current page.
+ *
+ * @since 4.6.0
+ *
+ * @global string $hook_suffix
+ *
+ * @param string $hook_suffix The current admin page.
+ */
+do_action( "admin_print_footer_scripts-$hook_suffix" );
+
 /**
  * Prints any scripts and data queued for the footer.
  *
@@ -74,9 +93,9 @@ do_action( 'admin_footer', '' );
 do_action( 'admin_print_footer_scripts' );
 
 /**
- * Print scripts or data after the default footer scripts.
+ * Prints scripts or data after the default footer scripts.
  *
- * The dynamic portion of the hook name, `$GLOBALS['hook_suffix']`,
+ * The dynamic portion of the hook name, `$hook_suffix`,
  * refers to the global hook suffix of the current page.
  *
  * @since 2.8.0
@@ -84,7 +103,7 @@ do_action( 'admin_print_footer_scripts' );
  * @global string $hook_suffix
  * @param string $hook_suffix The current admin page.
  */
-do_action( "admin_footer-" . $GLOBALS['hook_suffix'] );
+do_action( "admin_footer-$hook_suffix" );
 
 // get_site_option() won't exist when auto upgrading from <= 2.7
 if ( function_exists('get_site_option') ) {
index 11bd30cd19d2ed3bfe77988a9736b52b92b46561..abbb07998e33d0b218d995a3af9ae9b6ac17296e 100644 (file)
@@ -9,7 +9,7 @@
  * @subpackage Administration
  */
 
-_deprecated_file( basename(__FILE__), '2.5', 'wp-admin/includes/admin.php' );
+_deprecated_file( basename(__FILE__), '2.5.0', 'wp-admin/includes/admin.php' );
 
 /** WordPress Administration API: Includes all Administration functions. */
 require_once(ABSPATH . 'wp-admin/includes/admin.php');
index e471ff931d93a36931a4e752258dfa3a7dfa10f4..17dc162b73bebe3b88342501fb23a11415cf457a 100644 (file)
@@ -46,7 +46,7 @@ else
        $admin_title = sprintf( __( '%1$s &lsaquo; %2$s &#8212; WordPress' ), $title, $admin_title );
 
 /**
- * Filter the title tag content for an admin page.
+ * Filters the title tag content for an admin page.
  *
  * @since 3.1.0
  *
@@ -174,7 +174,7 @@ $admin_body_class .= ' no-customize-support no-svg';
 </head>
 <?php
 /**
- * Filter the CSS classes for the body tag in the admin.
+ * Filters the CSS classes for the body tag in the admin.
  *
  * This filter differs from the {@see 'post_class'} and {@see 'body_class'} filters
  * in two important ways:
@@ -229,21 +229,21 @@ $current_screen->render_screen_meta();
 
 if ( is_network_admin() ) {
        /**
-        * Print network admin screen notices.
+        * Prints network admin screen notices.
         *
         * @since 3.1.0
         */
        do_action( 'network_admin_notices' );
 } elseif ( is_user_admin() ) {
        /**
-        * Print user admin screen notices.
+        * Prints user admin screen notices.
         *
         * @since 3.1.0
         */
        do_action( 'user_admin_notices' );
 } else {
        /**
-        * Print admin screen notices.
+        * Prints admin screen notices.
         *
         * @since 3.1.0
         */
@@ -251,7 +251,7 @@ if ( is_network_admin() ) {
 }
 
 /**
- * Print generic admin screen notices.
+ * Prints generic admin screen notices.
  *
  * @since 3.1.0
  */
index a54ca21ba73d4aab2cbe3bb814e71d6f20694f0b..ad341c888065bb81e679308441cee5fd16f9549a 100644 (file)
@@ -48,7 +48,7 @@ if ( get_option('db_upgraded') ) {
                exit;
 
        /**
-        * Filter whether to attempt to perform the multisite DB upgrade routine.
+        * Filters whether to attempt to perform the multisite DB upgrade routine.
         *
         * In single site, the user would be redirected to wp-admin/upgrade.php.
         * In multisite, the DB upgrade routine is automatically fired, but only
@@ -138,21 +138,7 @@ else
        require(ABSPATH . 'wp-admin/menu.php');
 
 if ( current_user_can( 'manage_options' ) ) {
-       /**
-        * Filter the maximum memory limit available for administration screens.
-        *
-        * This only applies to administrators, who may require more memory for tasks like updates.
-        * Memory limits when processing images (uploaded or edited by users of any role) are
-        * handled separately.
-        *
-        * The WP_MAX_MEMORY_LIMIT constant specifically defines the maximum memory limit available
-        * when in the administration back end. The default is 256M, or 256 megabytes of memory.
-        *
-        * @since 3.0.0
-        *
-        * @param string 'WP_MAX_MEMORY_LIMIT' The maximum WordPress memory limit. Default 256M.
-        */
-       @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
+       wp_raise_memory_limit( 'admin' );
 }
 
 /**
@@ -161,7 +147,7 @@ if ( current_user_can( 'manage_options' ) ) {
  * Note, this does not just run on user-facing admin screens.
  * It runs on admin-ajax.php and admin-post.php as well.
  *
- * This is roughly analogous to the more general 'init' hook, which fires earlier.
+ * This is roughly analogous to the more general {@see 'init'} hook, which fires earlier.
  *
  * @since 2.5.0
  */
@@ -175,7 +161,7 @@ if ( isset($plugin_page) ) {
        if ( ! $page_hook = get_plugin_page_hook($plugin_page, $the_parent) ) {
                $page_hook = get_plugin_page_hook($plugin_page, $plugin_page);
 
-               // Backwards compatibility for plugins using add_management_page().
+               // Back-compat for plugins using add_management_page().
                if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'tools.php') ) {
                        // There could be plugin specific params on the URL, so we need the whole query string
                        if ( !empty($_SERVER[ 'QUERY_STRING' ]) )
@@ -271,8 +257,9 @@ if ( isset($plugin_page) ) {
 
        $importer = $_GET['import'];
 
-       if ( ! current_user_can('import') )
-               wp_die(__('You are not allowed to import.'));
+       if ( ! current_user_can( 'import' ) ) {
+               wp_die( __( 'Sorry, you are not allowed to import content.' ) );
+       }
 
        if ( validate_file($importer) ) {
                wp_redirect( admin_url( 'import.php?invalid=' . $importer ) );
index 371a65d305591cb3c8ef3fe0d24ad306ab761533..4022b523a38230a21331e434d26bf18e197e3400 100644 (file)
@@ -45,7 +45,7 @@ if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action']
 }
 
 if ( ! current_user_can( 'upload_files' ) ) {
-       wp_die( __( 'You do not have permission to upload files.' ) );
+       wp_die( __( 'Sorry, you are not allowed to upload files.' ) );
 }
 
 // just fetch the detail form for that attachment
@@ -54,7 +54,7 @@ if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id
        if ( 'attachment' != $post->post_type )
                wp_die( __( 'Unknown post type.' ) );
        if ( ! current_user_can( 'edit_post', $id ) )
-               wp_die( __( 'You are not allowed to edit this item.' ) );
+               wp_die( __( 'Sorry, you are not allowed to edit this item.' ) );
 
        switch ( $_REQUEST['fetch'] ) {
                case 3 :
@@ -105,7 +105,7 @@ if ( $_REQUEST['short'] ) {
        $type = $_REQUEST['type'];
 
        /**
-        * Filter the returned ID of an uploaded attachment.
+        * Filters the returned ID of an uploaded attachment.
         *
         * The dynamic portion of the hook name, `$type`, refers to the attachment type,
         * such as 'image', 'audio', 'video', 'file', etc.
index ba700ba64af6357fa7df8d6faa1880a4e8d527d9..aa2e0543614c4d54d6450cd6069789cdd4c66d82 100644 (file)
@@ -61,7 +61,7 @@ case 'editcomment' :
                comment_footer_die( __( 'Invalid comment ID.' ) . sprintf(' <a href="%s">' . __('Go back') . '</a>.', 'javascript:history.go(-1)') );
 
        if ( !current_user_can( 'edit_comment', $comment_id ) )
-               comment_footer_die( __('You are not allowed to edit this comment.') );
+               comment_footer_die( __('Sorry, you are not allowed to edit this comment.') );
 
        if ( 'trash' == $comment->comment_approved )
                comment_footer_die( __('This comment is in the Trash. Please move it out of the Trash if you want to edit it.') );
@@ -197,7 +197,7 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
        <?php
                /* translators: 1: comment date, 2: comment time */
                $submitted = sprintf( __( '%1$s at %2$s' ),
-                       /* translators: comment date format. See http://php.net/date */
+                       /* translators: comment date format. See https://secure.php.net/date */
                        get_comment_date( __( 'Y/m/d' ), $comment ),
                        get_comment_date( __( 'g:i a' ), $comment )
                );
@@ -254,7 +254,7 @@ case 'unapprovecomment' :
        if ( !$comment = get_comment($comment_id) )
                comment_footer_die( __( 'Invalid comment ID.' ) . sprintf(' <a href="%s">' . __('Go back') . '</a>.', 'edit-comments.php') );
        if ( !current_user_can( 'edit_comment', $comment->comment_ID ) )
-               comment_footer_die( __('You are not allowed to edit comments on this post.') );
+               comment_footer_die( __('Sorry, you are not allowed to edit comments on this post.') );
 
        if ( '' != wp_get_referer() && ! $noredir && false === strpos(wp_get_referer(), 'comment.php') )
                $redir = wp_get_referer();
@@ -313,7 +313,7 @@ case 'editedcomment' :
        $location = ( empty( $_POST['referredby'] ) ? "edit-comments.php?p=$comment_post_id" : $_POST['referredby'] ) . '#comment-' . $comment_id;
 
        /**
-        * Filter the URI the user is redirected to after editing a comment in the admin.
+        * Filters the URI the user is redirected to after editing a comment in the admin.
         *
         * @since 2.1.0
         *
index 3b29c0361f9496ccdada46148c2afe389182a293..3f5afc9ee78d9c4269d9c38bebe19471ab5eaacd 100644 (file)
@@ -20,7 +20,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
 
 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
 
-<div class="about-text"><?php printf( __( 'Thank you for updating! WordPress %s streamlines your workflow, whether you&#8217;re writing or building your site.' ), $display_version ); ?></div>
+<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version. WordPress %s changes a lot behind the scenes to make your WordPress experience even better!' ), $display_version ); ?></p>
 
 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
 
@@ -42,6 +42,7 @@ if ( ! $credits ) {
                __( 'https://make.wordpress.org/' )
        );
        echo '</p>';
+       echo '</div>';
        include( ABSPATH . 'wp-admin/admin-footer.php' );
        exit;
 }
index 4ee7cda3552a518915b7536456bc3c08309f8740..d9a3aa19217bba9090757366cd72e208474490fa 100644 (file)
 /* 1.1 - Typography */
 
 .about-wrap p {
-       line-height: 1.6em;
+       line-height: 1.5;
        font-size: 14px;
 }
 
+.about-wrap .feature-section p {
+       max-width: 38em;
+       margin-right: auto;
+       margin-left: auto;
+}
+
 .about-wrap h1 {
        margin: 0.2em 0 0 200px;
        padding: 0;
        text-align: center;
 }
 
-.about-wrap .changelog h2,
 .about-wrap h3 {
        margin: 1.25em 0 .6em;
        font-size: 1.25em;
-       line-height: 1.5em;
-}
-
-.about-wrap .changelog h2 {
-       margin-top: 40px;
-       font-weight: 600;
-       text-align: right;
+       line-height: 1.5;
 }
 
 .about-wrap h4 {
 .about-wrap code,
 .about-wrap ol li p {
        font-size: 14px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .about-wrap .about-description,
 .about-wrap .about-text {
        margin-top: 1.4em;
-       font-weight: normal;
+       font-weight: 400;
        line-height: 1.6em;
        font-size: 19px;
 }
        overflow: hidden;
 }
 
-.about-wrap .under-the-hood:nth-of-type(2n) {
+.about-wrap .under-the-hood:nth-of-type(2n),
+.about-wrap .under-the-hood:nth-of-type(3n) {
        margin-top: 3em;
 }
 
+.about-wrap .feature-video .mejs-controls {
+       display: none !important;
+}
+
+.about-wrap .feature-video .mejs-overlay-loading span {
+       background: transparent; /* Hide loading.gif */
+}
+
 /* 1.3 - Point Releases */
 
 .about-wrap .point-releases {
        margin-top: 0;
 }
 
+.about-wrap .streamlined-updates p,
+.about-wrap .native-fonts p {
+       margin-bottom: 3em;
+}
+
 /* 2.2 - Structure */
 
 .about-wrap .headline-feature.feature-video {
 .about-wrap .return-to-dashboard {
        margin: 30px -5px 0 0;
        font-size: 14px;
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .about-wrap .return-to-dashboard a {
 .about-wrap .wp-person .web {
        margin: 6px 0 2px;
        font-size: 16px;
-       font-weight: normal;
+       font-weight: 400;
        line-height: 2em;
        text-decoration: none;
 }
 
 .freedoms-php .about-wrap ol li {
        list-style-type: decimal;
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .freedoms-php .about-wrap ol p {
-       font-weight: normal;
+       font-weight: 400;
        margin: 0.6em 0;
 }
 
                padding-bottom: 0;
        }
 
-       .about-wrap .under-the-hood:nth-of-type(2n) {
+       .about-wrap .under-the-hood:nth-of-type(2n),
+       .about-wrap .under-the-hood:nth-of-type(3n) {
                margin-top: 0;
        }
 
-       .about-wrap .under-the-hood:nth-of-type(2n) h4 {
+       .about-wrap .under-the-hood:nth-of-type(2n) h3,
+       .about-wrap .under-the-hood:nth-of-type(3n) h3 {
                margin-top: 0;
        }
 }
index cc3ff1296198c85c34d36ceeafe633a3c94fbf76..899570bb10bc471cfffe59bd62bfc29a9a0d6b52 100644 (file)
@@ -1 +1 @@
-.about-wrap{position:relative;margin:25px 20px 0 40px;max-width:1050px;font-size:15px}.about-wrap .notice,.about-wrap div.error,.about-wrap div.updated{display:none!important}.about-wrap hr{border:0;height:0;margin:0;border-top:1px solid rgba(0,0,0,.1)}.about-wrap img{margin:0;max-width:100%;height:auto;vertical-align:middle}.about-wrap .jetpack-video-wrapper{margin-bottom:0}.wp-badge{background:url(../images/w-logo-white.png?ver=20160308) center 25px no-repeat #0073aa;-webkit-background-size:80px 80px;background-size:80px 80px;color:#fff;font-size:14px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:120px;height:40px;display:inline-block;width:140px;text-rendering:optimizeLegibility;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.2)}.svg .wp-badge{background-image:url(../images/wordpress-logo-white.svg?ver=20160308)}.about-wrap .wp-badge{position:absolute;top:0;left:0}.about-wrap .nav-tab{padding-left:15px;padding-right:15px;font-size:18px}.about-wrap p{line-height:1.6em;font-size:14px}.about-wrap h1{margin:.2em 0 0 200px;padding:0;color:#32373c;line-height:1.2em;font-size:2.8em;font-weight:400}.about-wrap h2{margin:50px 0 1em;font-size:1.8em;line-height:1.3;font-weight:300;text-align:center}.about-wrap .changelog h2,.about-wrap h3{margin:1.25em 0 .6em;font-size:1.25em;line-height:1.5em}.about-wrap .changelog h2{margin-top:40px;font-weight:600;text-align:right}.about-wrap h4{color:#23282d}.about-wrap .changelog h3{margin:1.33em 0;font-size:1em;line-height:inherit;color:#23282d}.about-wrap code,.about-wrap ol li p{font-size:14px;font-weight:400}.about-wrap .about-description,.about-wrap .about-text{margin-top:1.4em;font-weight:400;line-height:1.6em;font-size:19px}.about-wrap .about-text{margin:1em 0 1em 200px;min-height:60px;color:#555d66}.about-wrap [class$=col] .col{float:right;position:relative}.about-wrap .two-col .col{margin-left:4.799999999%;width:47.6%}.about-wrap .two-col img{margin-bottom:1.5em}.about-wrap .feature-section.two-col .col{display:inline-block;float:none;margin-top:1em;margin-left:4.799999999%;width:-webkit-calc(47.6% - 4px);width:calc(47.6% - 4px);vertical-align:top}.about-wrap .three-col .col{margin-left:4.999999999%;width:29.95%}.about-wrap .three-col .col:nth-of-type(3n),.about-wrap .two-col .col:nth-of-type(2n){margin-left:0}.about-wrap .under-the-hood{clear:both;overflow:hidden}.about-wrap .under-the-hood:nth-of-type(2n){margin-top:3em}.about-wrap .point-releases{margin-top:5px;border-bottom:1px solid #ddd}.about-wrap .changelog.point-releases h3{padding-top:35px}.about-wrap .changelog.point-releases h3:first-child{padding-top:7px}.about-wrap .headline-feature h2{margin:30px 0;font-size:2.2em;font-weight:300;line-height:1.3;text-align:center}.about-wrap .headline-feature h3{margin-top:0;text-align:right}.about-wrap .embed-container,.about-wrap .featured-image{text-align:center}.about-wrap .feature-section.two-col h3{margin-top:0}.about-wrap .feature-section h4{margin:1.4em 0 .6em;font-size:1em}.about-wrap .feature-section p{margin-top:.6em}.about-wrap .two-col-text{-webkit-column-count:2;-moz-column-count:2;column-count:2;-webkit-column-gap:40px;-moz-column-gap:40px;column-gap:40px}.about-wrap .two-col-text p:first-of-type{margin-top:0}.about-wrap .headline-feature.feature-video{position:relative;margin:40px 0;padding-bottom:56.25%;width:100%;max-width:100%;height:0;text-align:center}.about-wrap .feature-video embed{position:absolute;top:0;right:0;width:100%;height:100%}.about-wrap .feature-section{overflow:hidden;padding:0 0 40px}.about-wrap .headline-feature{margin:0 auto;max-width:80%}.about-wrap .changelog.feature-section .col,.about-wrap .feature-section .col{margin-top:40px}.about-wrap .feature-section .media-container{overflow:hidden}.about-wrap .embed-container iframe,.about-wrap .wp-embedded-content{max-width:100%}.about-wrap .changelog{margin-bottom:40px}.about-wrap .return-to-dashboard{margin:30px -5px 0 0;font-size:14px;font-weight:700}.about-wrap .return-to-dashboard a{text-decoration:none;padding:0 5px}.about-wrap h3.wp-people-group{margin:2.6em 0 1.33em;padding:0;font-size:16px;line-height:inherit}.about-wrap .wp-people-group{padding:0 5px;margin:0 -5px 0 -15px}.about-wrap .compact{margin-bottom:0}.about-wrap .wp-person{display:inline-block;vertical-align:top;margin-left:10px;padding-bottom:15px;height:70px;width:280px}.about-wrap .compact .wp-person{height:auto;width:180px;padding-bottom:0;margin-bottom:0}.about-wrap .wp-person .gravatar{float:right;margin:0 0 10px 10px;padding:1px;width:60px;height:60px}.about-wrap .compact .wp-person .gravatar{width:30px;height:30px}.about-wrap .wp-person .web{margin:6px 0 2px;font-size:16px;font-weight:400;line-height:2em;text-decoration:none}.about-wrap .wp-person .title{display:block}.about-wrap #wp-people-group-validators+p.wp-credits-list{margin-top:0}.about-wrap p.wp-credits-list a{white-space:nowrap}.freedoms-php .about-wrap ol{margin:40px 60px}.freedoms-php .about-wrap ol li{list-style-type:decimal;font-weight:700}.freedoms-php .about-wrap ol p{font-weight:400;margin:.6em 0}@media screen and (max-width:782px){.about-wrap .two-col-text{-webkit-column-count:1;-moz-column-count:1;column-count:1}.about-wrap .three-col img{display:block;margin:0 auto}}@media only screen and (max-width:500px){.about-wrap{margin-left:20px;margin-right:10px}.about-wrap .about-text,.about-wrap h1{margin-left:0}.about-wrap .about-text{margin-bottom:.25em}.about-wrap .wp-badge{position:relative;margin-bottom:1.5em;width:100%}.about-wrap .three-col .col,.about-wrap .two-col .col{width:100%!important;float:none!important}.about-wrap .under-the-hood.one-col .col,.about-wrap .under-the-hood.three-col .col,.about-wrap .under-the-hood.two-col .col{margin-bottom:2em;padding-bottom:0}.about-wrap .under-the-hood:nth-of-type(2n){margin-top:0}.about-wrap .under-the-hood:nth-of-type(2n) h4{margin-top:0}}
\ No newline at end of file
+.about-wrap{position:relative;margin:25px 20px 0 40px;max-width:1050px;font-size:15px}.about-wrap .notice,.about-wrap div.error,.about-wrap div.updated{display:none!important}.about-wrap hr{border:0;height:0;margin:0;border-top:1px solid rgba(0,0,0,.1)}.about-wrap img{margin:0;max-width:100%;height:auto;vertical-align:middle}.about-wrap .jetpack-video-wrapper{margin-bottom:0}.wp-badge{background:url(../images/w-logo-white.png?ver=20160308) center 25px no-repeat #0073aa;-webkit-background-size:80px 80px;background-size:80px 80px;color:#fff;font-size:14px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:120px;height:40px;display:inline-block;width:140px;text-rendering:optimizeLegibility;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.2)}.svg .wp-badge{background-image:url(../images/wordpress-logo-white.svg?ver=20160308)}.about-wrap .wp-badge{position:absolute;top:0;left:0}.about-wrap .nav-tab{padding-left:15px;padding-right:15px;font-size:18px}.about-wrap p{line-height:1.5;font-size:14px}.about-wrap .feature-section p{max-width:38em;margin-right:auto;margin-left:auto}.about-wrap h1{margin:.2em 0 0 200px;padding:0;color:#32373c;line-height:1.2em;font-size:2.8em;font-weight:400}.about-wrap h2{margin:50px 0 1em;font-size:1.8em;line-height:1.3;font-weight:300;text-align:center}.about-wrap h3{margin:1.25em 0 .6em;font-size:1.25em;line-height:1.5}.about-wrap h4{color:#23282d}.about-wrap .changelog h3{margin:1.33em 0;font-size:1em;line-height:inherit;color:#23282d}.about-wrap code,.about-wrap ol li p{font-size:14px;font-weight:400}.about-wrap .about-description,.about-wrap .about-text{margin-top:1.4em;font-weight:400;line-height:1.6em;font-size:19px}.about-wrap .about-text{margin:1em 0 1em 200px;min-height:60px;color:#555d66}.about-wrap [class$=col] .col{float:right;position:relative}.about-wrap .two-col .col{margin-left:4.799999999%;width:47.6%}.about-wrap .two-col img{margin-bottom:1.5em}.about-wrap .feature-section.two-col .col{display:inline-block;float:none;margin-top:1em;margin-left:4.799999999%;width:-webkit-calc(47.6% - 4px);width:calc(47.6% - 4px);vertical-align:top}.about-wrap .three-col .col{margin-left:4.999999999%;width:29.95%}.about-wrap .three-col .col:nth-of-type(3n),.about-wrap .two-col .col:nth-of-type(2n){margin-left:0}.about-wrap .under-the-hood{clear:both;overflow:hidden}.about-wrap .under-the-hood:nth-of-type(2n),.about-wrap .under-the-hood:nth-of-type(3n){margin-top:3em}.about-wrap .feature-video .mejs-controls{display:none!important}.about-wrap .feature-video .mejs-overlay-loading span{background:0 0}.about-wrap .point-releases{margin-top:5px;border-bottom:1px solid #ddd}.about-wrap .changelog.point-releases h3{padding-top:35px}.about-wrap .changelog.point-releases h3:first-child{padding-top:7px}.about-wrap .headline-feature h2{margin:30px 0;font-size:2.2em;font-weight:300;line-height:1.3;text-align:center}.about-wrap .headline-feature h3{margin-top:0;text-align:right}.about-wrap .embed-container,.about-wrap .featured-image{text-align:center}.about-wrap .feature-section.two-col h3{margin-top:0}.about-wrap .feature-section h4{margin:1.4em 0 .6em;font-size:1em}.about-wrap .feature-section p{margin-top:.6em}.about-wrap .two-col-text{-webkit-column-count:2;-moz-column-count:2;column-count:2;-webkit-column-gap:40px;-moz-column-gap:40px;column-gap:40px}.about-wrap .two-col-text p:first-of-type{margin-top:0}.about-wrap .native-fonts p,.about-wrap .streamlined-updates p{margin-bottom:3em}.about-wrap .headline-feature.feature-video{position:relative;margin:40px 0;padding-bottom:56.25%;width:100%;max-width:100%;height:0;text-align:center}.about-wrap .feature-video embed{position:absolute;top:0;right:0;width:100%;height:100%}.about-wrap .feature-section{overflow:hidden;padding:0 0 40px}.about-wrap .headline-feature{margin:0 auto;max-width:80%}.about-wrap .changelog.feature-section .col,.about-wrap .feature-section .col{margin-top:40px}.about-wrap .feature-section .media-container{overflow:hidden}.about-wrap .embed-container iframe,.about-wrap .wp-embedded-content{max-width:100%}.about-wrap .changelog{margin-bottom:40px}.about-wrap .return-to-dashboard{margin:30px -5px 0 0;font-size:14px;font-weight:600}.about-wrap .return-to-dashboard a{text-decoration:none;padding:0 5px}.about-wrap h3.wp-people-group{margin:2.6em 0 1.33em;padding:0;font-size:16px;line-height:inherit}.about-wrap .wp-people-group{padding:0 5px;margin:0 -5px 0 -15px}.about-wrap .compact{margin-bottom:0}.about-wrap .wp-person{display:inline-block;vertical-align:top;margin-left:10px;padding-bottom:15px;height:70px;width:280px}.about-wrap .compact .wp-person{height:auto;width:180px;padding-bottom:0;margin-bottom:0}.about-wrap .wp-person .gravatar{float:right;margin:0 0 10px 10px;padding:1px;width:60px;height:60px}.about-wrap .compact .wp-person .gravatar{width:30px;height:30px}.about-wrap .wp-person .web{margin:6px 0 2px;font-size:16px;font-weight:400;line-height:2em;text-decoration:none}.about-wrap .wp-person .title{display:block}.about-wrap #wp-people-group-validators+p.wp-credits-list{margin-top:0}.about-wrap p.wp-credits-list a{white-space:nowrap}.freedoms-php .about-wrap ol{margin:40px 60px}.freedoms-php .about-wrap ol li{list-style-type:decimal;font-weight:600}.freedoms-php .about-wrap ol p{font-weight:400;margin:.6em 0}@media screen and (max-width:782px){.about-wrap .two-col-text{-webkit-column-count:1;-moz-column-count:1;column-count:1}.about-wrap .three-col img{display:block;margin:0 auto}}@media only screen and (max-width:500px){.about-wrap{margin-left:20px;margin-right:10px}.about-wrap .about-text,.about-wrap h1{margin-left:0}.about-wrap .about-text{margin-bottom:.25em}.about-wrap .wp-badge{position:relative;margin-bottom:1.5em;width:100%}.about-wrap .three-col .col,.about-wrap .two-col .col{width:100%!important;float:none!important}.about-wrap .under-the-hood.one-col .col,.about-wrap .under-the-hood.three-col .col,.about-wrap .under-the-hood.two-col .col{margin-bottom:2em;padding-bottom:0}.about-wrap .under-the-hood:nth-of-type(2n),.about-wrap .under-the-hood:nth-of-type(3n){margin-top:0}.about-wrap .under-the-hood:nth-of-type(2n) h3,.about-wrap .under-the-hood:nth-of-type(3n) h3{margin-top:0}}
\ No newline at end of file
index aad606fbed4eb4607d5eb9df7a89f7df22a5272b..8995e031e15fe9a029e7c91ea8de98233d460b0d 100644 (file)
 /* 1.1 - Typography */
 
 .about-wrap p {
-       line-height: 1.6em;
+       line-height: 1.5;
        font-size: 14px;
 }
 
+.about-wrap .feature-section p {
+       max-width: 38em;
+       margin-left: auto;
+       margin-right: auto;
+}
+
 .about-wrap h1 {
        margin: 0.2em 200px 0 0;
        padding: 0;
        text-align: center;
 }
 
-.about-wrap .changelog h2,
 .about-wrap h3 {
        margin: 1.25em 0 .6em;
        font-size: 1.25em;
-       line-height: 1.5em;
-}
-
-.about-wrap .changelog h2 {
-       margin-top: 40px;
-       font-weight: 600;
-       text-align: left;
+       line-height: 1.5;
 }
 
 .about-wrap h4 {
 .about-wrap code,
 .about-wrap ol li p {
        font-size: 14px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .about-wrap .about-description,
 .about-wrap .about-text {
        margin-top: 1.4em;
-       font-weight: normal;
+       font-weight: 400;
        line-height: 1.6em;
        font-size: 19px;
 }
        overflow: hidden;
 }
 
-.about-wrap .under-the-hood:nth-of-type(2n) {
+.about-wrap .under-the-hood:nth-of-type(2n),
+.about-wrap .under-the-hood:nth-of-type(3n) {
        margin-top: 3em;
 }
 
+.about-wrap .feature-video .mejs-controls {
+       display: none !important;
+}
+
+.about-wrap .feature-video .mejs-overlay-loading span {
+       background: transparent; /* Hide loading.gif */
+}
+
 /* 1.3 - Point Releases */
 
 .about-wrap .point-releases {
        margin-top: 0;
 }
 
+.about-wrap .streamlined-updates p,
+.about-wrap .native-fonts p {
+       margin-bottom: 3em;
+}
+
 /* 2.2 - Structure */
 
 .about-wrap .headline-feature.feature-video {
 .about-wrap .return-to-dashboard {
        margin: 30px 0 0 -5px;
        font-size: 14px;
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .about-wrap .return-to-dashboard a {
 .about-wrap .wp-person .web {
        margin: 6px 0 2px;
        font-size: 16px;
-       font-weight: normal;
+       font-weight: 400;
        line-height: 2em;
        text-decoration: none;
 }
 
 .freedoms-php .about-wrap ol li {
        list-style-type: decimal;
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .freedoms-php .about-wrap ol p {
-       font-weight: normal;
+       font-weight: 400;
        margin: 0.6em 0;
 }
 
                padding-bottom: 0;
        }
 
-       .about-wrap .under-the-hood:nth-of-type(2n) {
+       .about-wrap .under-the-hood:nth-of-type(2n),
+       .about-wrap .under-the-hood:nth-of-type(3n) {
                margin-top: 0;
        }
 
-       .about-wrap .under-the-hood:nth-of-type(2n) h4 {
+       .about-wrap .under-the-hood:nth-of-type(2n) h3,
+       .about-wrap .under-the-hood:nth-of-type(3n) h3 {
                margin-top: 0;
        }
 }
index 7dca9b7fd6334608de4d196b761898faec68a22e..7bcbe5fc638b0de3a74c17dc00842cdabfe1a857 100644 (file)
@@ -1 +1 @@
-.about-wrap{position:relative;margin:25px 40px 0 20px;max-width:1050px;font-size:15px}.about-wrap .notice,.about-wrap div.error,.about-wrap div.updated{display:none!important}.about-wrap hr{border:0;height:0;margin:0;border-top:1px solid rgba(0,0,0,.1)}.about-wrap img{margin:0;max-width:100%;height:auto;vertical-align:middle}.about-wrap .jetpack-video-wrapper{margin-bottom:0}.wp-badge{background:url(../images/w-logo-white.png?ver=20160308) center 25px no-repeat #0073aa;-webkit-background-size:80px 80px;background-size:80px 80px;color:#fff;font-size:14px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:120px;height:40px;display:inline-block;width:140px;text-rendering:optimizeLegibility;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.2)}.svg .wp-badge{background-image:url(../images/wordpress-logo-white.svg?ver=20160308)}.about-wrap .wp-badge{position:absolute;top:0;right:0}.about-wrap .nav-tab{padding-right:15px;padding-left:15px;font-size:18px}.about-wrap p{line-height:1.6em;font-size:14px}.about-wrap h1{margin:.2em 200px 0 0;padding:0;color:#32373c;line-height:1.2em;font-size:2.8em;font-weight:400}.about-wrap h2{margin:50px 0 1em;font-size:1.8em;line-height:1.3;font-weight:300;text-align:center}.about-wrap .changelog h2,.about-wrap h3{margin:1.25em 0 .6em;font-size:1.25em;line-height:1.5em}.about-wrap .changelog h2{margin-top:40px;font-weight:600;text-align:left}.about-wrap h4{color:#23282d}.about-wrap .changelog h3{margin:1.33em 0;font-size:1em;line-height:inherit;color:#23282d}.about-wrap code,.about-wrap ol li p{font-size:14px;font-weight:400}.about-wrap .about-description,.about-wrap .about-text{margin-top:1.4em;font-weight:400;line-height:1.6em;font-size:19px}.about-wrap .about-text{margin:1em 200px 1em 0;min-height:60px;color:#555d66}.about-wrap [class$=col] .col{float:left;position:relative}.about-wrap .two-col .col{margin-right:4.799999999%;width:47.6%}.about-wrap .two-col img{margin-bottom:1.5em}.about-wrap .feature-section.two-col .col{display:inline-block;float:none;margin-top:1em;margin-right:4.799999999%;width:-webkit-calc(47.6% - 4px);width:calc(47.6% - 4px);vertical-align:top}.about-wrap .three-col .col{margin-right:4.999999999%;width:29.95%}.about-wrap .three-col .col:nth-of-type(3n),.about-wrap .two-col .col:nth-of-type(2n){margin-right:0}.about-wrap .under-the-hood{clear:both;overflow:hidden}.about-wrap .under-the-hood:nth-of-type(2n){margin-top:3em}.about-wrap .point-releases{margin-top:5px;border-bottom:1px solid #ddd}.about-wrap .changelog.point-releases h3{padding-top:35px}.about-wrap .changelog.point-releases h3:first-child{padding-top:7px}.about-wrap .headline-feature h2{margin:30px 0;font-size:2.2em;font-weight:300;line-height:1.3;text-align:center}.about-wrap .headline-feature h3{margin-top:0;text-align:left}.about-wrap .embed-container,.about-wrap .featured-image{text-align:center}.about-wrap .feature-section.two-col h3{margin-top:0}.about-wrap .feature-section h4{margin:1.4em 0 .6em;font-size:1em}.about-wrap .feature-section p{margin-top:.6em}.about-wrap .two-col-text{-webkit-column-count:2;-moz-column-count:2;column-count:2;-webkit-column-gap:40px;-moz-column-gap:40px;column-gap:40px}.about-wrap .two-col-text p:first-of-type{margin-top:0}.about-wrap .headline-feature.feature-video{position:relative;margin:40px 0;padding-bottom:56.25%;width:100%;max-width:100%;height:0;text-align:center}.about-wrap .feature-video embed{position:absolute;top:0;left:0;width:100%;height:100%}.about-wrap .feature-section{overflow:hidden;padding:0 0 40px}.about-wrap .headline-feature{margin:0 auto;max-width:80%}.about-wrap .changelog.feature-section .col,.about-wrap .feature-section .col{margin-top:40px}.about-wrap .feature-section .media-container{overflow:hidden}.about-wrap .embed-container iframe,.about-wrap .wp-embedded-content{max-width:100%}.about-wrap .changelog{margin-bottom:40px}.about-wrap .return-to-dashboard{margin:30px 0 0 -5px;font-size:14px;font-weight:700}.about-wrap .return-to-dashboard a{text-decoration:none;padding:0 5px}.about-wrap h3.wp-people-group{margin:2.6em 0 1.33em;padding:0;font-size:16px;line-height:inherit}.about-wrap .wp-people-group{padding:0 5px;margin:0 -15px 0 -5px}.about-wrap .compact{margin-bottom:0}.about-wrap .wp-person{display:inline-block;vertical-align:top;margin-right:10px;padding-bottom:15px;height:70px;width:280px}.about-wrap .compact .wp-person{height:auto;width:180px;padding-bottom:0;margin-bottom:0}.about-wrap .wp-person .gravatar{float:left;margin:0 10px 10px 0;padding:1px;width:60px;height:60px}.about-wrap .compact .wp-person .gravatar{width:30px;height:30px}.about-wrap .wp-person .web{margin:6px 0 2px;font-size:16px;font-weight:400;line-height:2em;text-decoration:none}.about-wrap .wp-person .title{display:block}.about-wrap #wp-people-group-validators+p.wp-credits-list{margin-top:0}.about-wrap p.wp-credits-list a{white-space:nowrap}.freedoms-php .about-wrap ol{margin:40px 60px}.freedoms-php .about-wrap ol li{list-style-type:decimal;font-weight:700}.freedoms-php .about-wrap ol p{font-weight:400;margin:.6em 0}@media screen and (max-width:782px){.about-wrap .two-col-text{-webkit-column-count:1;-moz-column-count:1;column-count:1}.about-wrap .three-col img{display:block;margin:0 auto}}@media only screen and (max-width:500px){.about-wrap{margin-right:20px;margin-left:10px}.about-wrap .about-text,.about-wrap h1{margin-right:0}.about-wrap .about-text{margin-bottom:.25em}.about-wrap .wp-badge{position:relative;margin-bottom:1.5em;width:100%}.about-wrap .three-col .col,.about-wrap .two-col .col{width:100%!important;float:none!important}.about-wrap .under-the-hood.one-col .col,.about-wrap .under-the-hood.three-col .col,.about-wrap .under-the-hood.two-col .col{margin-bottom:2em;padding-bottom:0}.about-wrap .under-the-hood:nth-of-type(2n){margin-top:0}.about-wrap .under-the-hood:nth-of-type(2n) h4{margin-top:0}}
\ No newline at end of file
+.about-wrap{position:relative;margin:25px 40px 0 20px;max-width:1050px;font-size:15px}.about-wrap .notice,.about-wrap div.error,.about-wrap div.updated{display:none!important}.about-wrap hr{border:0;height:0;margin:0;border-top:1px solid rgba(0,0,0,.1)}.about-wrap img{margin:0;max-width:100%;height:auto;vertical-align:middle}.about-wrap .jetpack-video-wrapper{margin-bottom:0}.wp-badge{background:url(../images/w-logo-white.png?ver=20160308) center 25px no-repeat #0073aa;-webkit-background-size:80px 80px;background-size:80px 80px;color:#fff;font-size:14px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:120px;height:40px;display:inline-block;width:140px;text-rendering:optimizeLegibility;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.2)}.svg .wp-badge{background-image:url(../images/wordpress-logo-white.svg?ver=20160308)}.about-wrap .wp-badge{position:absolute;top:0;right:0}.about-wrap .nav-tab{padding-right:15px;padding-left:15px;font-size:18px}.about-wrap p{line-height:1.5;font-size:14px}.about-wrap .feature-section p{max-width:38em;margin-left:auto;margin-right:auto}.about-wrap h1{margin:.2em 200px 0 0;padding:0;color:#32373c;line-height:1.2em;font-size:2.8em;font-weight:400}.about-wrap h2{margin:50px 0 1em;font-size:1.8em;line-height:1.3;font-weight:300;text-align:center}.about-wrap h3{margin:1.25em 0 .6em;font-size:1.25em;line-height:1.5}.about-wrap h4{color:#23282d}.about-wrap .changelog h3{margin:1.33em 0;font-size:1em;line-height:inherit;color:#23282d}.about-wrap code,.about-wrap ol li p{font-size:14px;font-weight:400}.about-wrap .about-description,.about-wrap .about-text{margin-top:1.4em;font-weight:400;line-height:1.6em;font-size:19px}.about-wrap .about-text{margin:1em 200px 1em 0;min-height:60px;color:#555d66}.about-wrap [class$=col] .col{float:left;position:relative}.about-wrap .two-col .col{margin-right:4.799999999%;width:47.6%}.about-wrap .two-col img{margin-bottom:1.5em}.about-wrap .feature-section.two-col .col{display:inline-block;float:none;margin-top:1em;margin-right:4.799999999%;width:-webkit-calc(47.6% - 4px);width:calc(47.6% - 4px);vertical-align:top}.about-wrap .three-col .col{margin-right:4.999999999%;width:29.95%}.about-wrap .three-col .col:nth-of-type(3n),.about-wrap .two-col .col:nth-of-type(2n){margin-right:0}.about-wrap .under-the-hood{clear:both;overflow:hidden}.about-wrap .under-the-hood:nth-of-type(2n),.about-wrap .under-the-hood:nth-of-type(3n){margin-top:3em}.about-wrap .feature-video .mejs-controls{display:none!important}.about-wrap .feature-video .mejs-overlay-loading span{background:0 0}.about-wrap .point-releases{margin-top:5px;border-bottom:1px solid #ddd}.about-wrap .changelog.point-releases h3{padding-top:35px}.about-wrap .changelog.point-releases h3:first-child{padding-top:7px}.about-wrap .headline-feature h2{margin:30px 0;font-size:2.2em;font-weight:300;line-height:1.3;text-align:center}.about-wrap .headline-feature h3{margin-top:0;text-align:left}.about-wrap .embed-container,.about-wrap .featured-image{text-align:center}.about-wrap .feature-section.two-col h3{margin-top:0}.about-wrap .feature-section h4{margin:1.4em 0 .6em;font-size:1em}.about-wrap .feature-section p{margin-top:.6em}.about-wrap .two-col-text{-webkit-column-count:2;-moz-column-count:2;column-count:2;-webkit-column-gap:40px;-moz-column-gap:40px;column-gap:40px}.about-wrap .two-col-text p:first-of-type{margin-top:0}.about-wrap .native-fonts p,.about-wrap .streamlined-updates p{margin-bottom:3em}.about-wrap .headline-feature.feature-video{position:relative;margin:40px 0;padding-bottom:56.25%;width:100%;max-width:100%;height:0;text-align:center}.about-wrap .feature-video embed{position:absolute;top:0;left:0;width:100%;height:100%}.about-wrap .feature-section{overflow:hidden;padding:0 0 40px}.about-wrap .headline-feature{margin:0 auto;max-width:80%}.about-wrap .changelog.feature-section .col,.about-wrap .feature-section .col{margin-top:40px}.about-wrap .feature-section .media-container{overflow:hidden}.about-wrap .embed-container iframe,.about-wrap .wp-embedded-content{max-width:100%}.about-wrap .changelog{margin-bottom:40px}.about-wrap .return-to-dashboard{margin:30px 0 0 -5px;font-size:14px;font-weight:600}.about-wrap .return-to-dashboard a{text-decoration:none;padding:0 5px}.about-wrap h3.wp-people-group{margin:2.6em 0 1.33em;padding:0;font-size:16px;line-height:inherit}.about-wrap .wp-people-group{padding:0 5px;margin:0 -15px 0 -5px}.about-wrap .compact{margin-bottom:0}.about-wrap .wp-person{display:inline-block;vertical-align:top;margin-right:10px;padding-bottom:15px;height:70px;width:280px}.about-wrap .compact .wp-person{height:auto;width:180px;padding-bottom:0;margin-bottom:0}.about-wrap .wp-person .gravatar{float:left;margin:0 10px 10px 0;padding:1px;width:60px;height:60px}.about-wrap .compact .wp-person .gravatar{width:30px;height:30px}.about-wrap .wp-person .web{margin:6px 0 2px;font-size:16px;font-weight:400;line-height:2em;text-decoration:none}.about-wrap .wp-person .title{display:block}.about-wrap #wp-people-group-validators+p.wp-credits-list{margin-top:0}.about-wrap p.wp-credits-list a{white-space:nowrap}.freedoms-php .about-wrap ol{margin:40px 60px}.freedoms-php .about-wrap ol li{list-style-type:decimal;font-weight:600}.freedoms-php .about-wrap ol p{font-weight:400;margin:.6em 0}@media screen and (max-width:782px){.about-wrap .two-col-text{-webkit-column-count:1;-moz-column-count:1;column-count:1}.about-wrap .three-col img{display:block;margin:0 auto}}@media only screen and (max-width:500px){.about-wrap{margin-right:20px;margin-left:10px}.about-wrap .about-text,.about-wrap h1{margin-right:0}.about-wrap .about-text{margin-bottom:.25em}.about-wrap .wp-badge{position:relative;margin-bottom:1.5em;width:100%}.about-wrap .three-col .col,.about-wrap .two-col .col{width:100%!important;float:none!important}.about-wrap .under-the-hood.one-col .col,.about-wrap .under-the-hood.three-col .col,.about-wrap .under-the-hood.two-col .col{margin-bottom:2em;padding-bottom:0}.about-wrap .under-the-hood:nth-of-type(2n),.about-wrap .under-the-hood:nth-of-type(3n){margin-top:0}.about-wrap .under-the-hood:nth-of-type(2n) h3,.about-wrap .under-the-hood:nth-of-type(3n) h3{margin-top:0}}
\ No newline at end of file
index 5c951f19198c9d3e7b91061c398089a47bcf2512..ac231f9cb94dfd574859141536dd034687564d9d 100644 (file)
@@ -97,7 +97,7 @@
 }
 
 .icon16.icon-site:before {
-       content: "\f112";
+       content: "\f541";
 }
 
 .icon16.icon-generic:before {
index 741d08d622c56a48119c9115d1b7df7fe3b904d6..4a51af5ba11e485a06c538f42b2ed96922195169 100644 (file)
@@ -1 +1 @@
-#adminmenu,#adminmenu .wp-submenu,#adminmenuback,#adminmenuwrap{width:160px;background-color:#23282d}#adminmenuback{position:fixed;top:0;bottom:-120px;z-index:1}#adminmenu{clear:right;margin:12px 0;padding:0;list-style:none}.folded #adminmenu,.folded #adminmenu li.menu-top,.folded #adminmenuback,.folded #adminmenuwrap{width:36px}.icon16{height:18px;width:18px;padding:6px;margin:-6px -8px 0 0;float:right}.icon16:before{color:#82878c;font:400 20px/1 dashicons;speak:none;padding:6px 0;height:34px;width:20px;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.icon16.icon-dashboard:before{content:"\f226"}.icon16.icon-post:before{content:"\f109"}.icon16.icon-media:before{content:"\f104"}.icon16.icon-links:before{content:"\f103"}.icon16.icon-page:before{content:"\f105"}.icon16.icon-comments:before{content:"\f101";margin-top:1px}.icon16.icon-appearance:before{content:"\f100"}.icon16.icon-plugins:before{content:"\f106"}.icon16.icon-users:before{content:"\f110"}.icon16.icon-tools:before{content:"\f107"}.icon16.icon-settings:before{content:"\f108"}.icon16.icon-site:before{content:"\f112"}.icon16.icon-generic:before{content:"\f111"}.icon16.icon-appearance,.icon16.icon-comments,.icon16.icon-dashboard,.icon16.icon-generic,.icon16.icon-links,.icon16.icon-media,.icon16.icon-page,.icon16.icon-plugins,.icon16.icon-post,.icon16.icon-settings,.icon16.icon-site,.icon16.icon-tools,.icon16.icon-users,.menu-icon-appearance div.wp-menu-image,.menu-icon-comments div.wp-menu-image,.menu-icon-dashboard div.wp-menu-image,.menu-icon-generic div.wp-menu-image,.menu-icon-links div.wp-menu-image,.menu-icon-media div.wp-menu-image,.menu-icon-page div.wp-menu-image,.menu-icon-plugins div.wp-menu-image,.menu-icon-post div.wp-menu-image,.menu-icon-settings div.wp-menu-image,.menu-icon-site div.wp-menu-image,.menu-icon-tools div.wp-menu-image,.menu-icon-users div.wp-menu-image{background-image:none!important}#adminmenuwrap{position:relative;float:right;z-index:9990}#adminmenu *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#adminmenu li{margin:0;padding:0;cursor:pointer}#adminmenu a{display:block;line-height:18px;padding:2px 5px;color:#eee}#adminmenu .wp-submenu a{color:#b4b9be;color:rgba(240,245,250,.7)}#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover{background:0 0}#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a:hover,#adminmenu li.menu-top>a:focus{color:#00b9eb}#adminmenu li.menu-top{border:none;min-height:34px;position:relative}#adminmenu .wp-submenu{list-style:none;position:absolute;top:-1000em;right:160px;overflow:visible;word-wrap:break-word}#adminmenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{padding:7px 0 8px;z-index:9999;background-color:#32373c;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}#adminmenu a.menu-top:focus+.wp-submenu,.js #adminmenu .opensub .wp-submenu,.js #adminmenu .sub-open,.no-js li.wp-has-submenu:hover .wp-submenu{top:-1px}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu.sub-open,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.no-js li.wp-has-current-submenu:hover .wp-submenu{position:relative;z-index:3;top:auto;right:auto;left:auto;bottom:auto;border:0;margin-top:0;-webkit-box-shadow:none;box-shadow:none;background-color:#32373c}#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{position:relative;background-color:#191e23;color:#00b9eb}.folded #adminmenu li.menu-top:hover,.folded #adminmenu li.opensub>a.menu-top,.folded #adminmenu li>a.menu-top:focus{z-index:10000}#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu .wp-menu-arrow,#adminmenu .wp-menu-arrow div,#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top,.folded #adminmenu li.wp-has-current-submenu{background:#0073aa;color:#fff}.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.folded #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu.opensub .wp-submenu,.folded #adminmenu .wp-submenu.sub-open,.folded #adminmenu a.menu-top:focus+.wp-submenu,.no-js.folded #adminmenu .wp-has-submenu:hover .wp-submenu{top:0;right:36px}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{position:absolute;top:-1000em}#adminmenu .wp-not-current-submenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{min-width:160px;width:auto}#adminmenu .wp-submenu a{font-size:13px;line-height:1.2;margin:0;padding:6px 0}#adminmenu .opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-not-current-submenu li>a,.folded #adminmenu .wp-has-current-submenu li>a{padding-left:16px;padding-right:14px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#adminmenu .wp-has-current-submenu ul>li>a,.folded #adminmenu li.menu-top .wp-submenu>li>a{padding:6px 12px}#adminmenu .wp-submenu-head,#adminmenu a.menu-top{font-size:14px;font-weight:400;line-height:18px;padding:0}#adminmenu .wp-submenu-head{display:none}.folded #adminmenu .wp-menu-name{position:absolute;right:-999px}.folded #adminmenu .wp-submenu-head{display:block}#adminmenu .wp-submenu li{padding:0;margin:0;overflow:hidden}#adminmenu .wp-menu-image img{padding:9px 0 0;opacity:.6;filter:alpha(opacity=60)}#adminmenu div.wp-menu-name{padding:8px 0}#adminmenu div.wp-menu-image{float:right;width:36px;height:34px;margin:0;text-align:center}#adminmenu div.wp-menu-image.svg{background-repeat:no-repeat;background-position:center;-webkit-background-size:20px auto;background-size:20px auto}div.wp-menu-image:before{color:#a0a5aa;color:rgba(240,245,250,.6);padding:7px 0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#adminmenu div.wp-menu-image:before{color:#a0a5aa;color:rgba(240,245,250,.6)}#adminmenu .current div.wp-menu-image:before,#adminmenu .wp-has-current-submenu div.wp-menu-image:before,#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu a.wp-has-current-submenu:hover div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu:hover div.wp-menu-image:before{color:#fff}#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before{color:#00b9eb}.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#a0a5aa}.folded #adminmenu div.wp-menu-image{width:35px;height:30px;position:absolute;z-index:25}.folded #adminmenu a.menu-top{height:34px}.no-font-face #adminmenu .wp-menu-image{display:none}.no-font-face #adminmenu div.wp-menu-name{padding:8px 12px}.no-font-face.auto-fold #adminmenu .wp-menu-name{margin-right:0}.sticky-menu #adminmenuwrap{position:fixed}.wp-menu-arrow{display:none!important}ul#adminmenu a.wp-has-current-submenu{position:relative}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{left:0;border:8px solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-left-color:#f1f1f1;top:50%;margin-top:-8px}.folded ul#adminmenu li:hover a.wp-has-current-submenu:after{display:none}.folded ul#adminmenu a.wp-has-current-submenu:after,.folded ul#adminmenu>li a.current:after{border-width:4px;margin-top:-4px}#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{left:0;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-width:8px;top:10px;z-index:10000}.folded ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{border-width:4px;margin-top:-4px;top:18px}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#32373c}#adminmenu li.menu-top:hover .wp-menu-image img,#adminmenu li.wp-has-current-submenu .wp-menu-image img{opacity:1;filter:alpha(opacity=100)}#adminmenu li.wp-menu-separator{height:5px;padding:0;margin:0 0 6px;cursor:inherit}#adminmenu div.separator{height:2px;padding:0}#collapse-button,#collapse-button div{height:15px;width:15px}#adminmenu .wp-submenu .wp-submenu-head{color:#fff;font-weight:400;font-size:14px;padding:8px 11px 8px 4px;margin:-7px 0 4px}#adminmenu li.current,.folded #adminmenu li.wp-menu-open{border:0}#adminmenu .awaiting-mod,#adminmenu .update-plugins{display:inline-block;background-color:#d54e21;color:#fff;font-size:9px;line-height:17px;font-weight:600;margin:1px 2px 0 0;vertical-align:top;-webkit-border-radius:10px;border-radius:10px;z-index:26}#adminmenu li .awaiting-mod span,#adminmenu li span.update-plugins span{display:block;padding:0 6px}#adminmenu li span.count-0,.folded #collapse-menu span{display:none}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod{background-color:#00b9eb;color:#fff}#collapse-menu{font-size:13px;line-height:34px;margin-top:10px;color:#a0a5aa;color:rgba(240,245,250,.6);-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#collapse-menu:hover,#collapse-menu:hover #collapse-button div:after{color:#00b9eb}#collapse-button{float:right;margin:10px 11px 10px 8px;-webkit-border-radius:10px;border-radius:10px}#wpwrap #collapse-button div{padding:0}#collapse-button div:after{content:"\f148";display:block;line-height:15px;right:-3px;top:-3px;color:#a0a5aa;color:rgba(240,245,250,.6);font:400 20px/1 dashicons!important;speak:none;margin:0 auto;padding:0!important;position:relative;text-align:center;width:20px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.folded #collapse-button div:after,.rtl #collapse-button div:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.folded #collapse-button div:after{-webkit-transform:none;-ms-transform:none;transform:none}.customize-support #menu-appearance a[href="themes.php?page=custom-header"],.customize-support #menu-appearance a[href="themes.php?page=custom-background"],li#wp-admin-bar-menu-toggle{display:none}@media only screen and (max-width:960px){.auto-fold #wpcontent,.auto-fold #wpfooter{margin-right:36px}.auto-fold #adminmenu,.auto-fold #adminmenu li.menu-top,.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{width:36px}.auto-fold #adminmenu .opensub .wp-submenu,.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.auto-fold #adminmenu .wp-has-current-submenu.opensub .wp-submenu,.auto-fold #adminmenu .wp-submenu.sub-open,.auto-fold #adminmenu a.menu-top:focus+.wp-submenu{top:0;right:36px}.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu,.auto-fold #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{position:absolute;top:-1000em;margin-left:-1px;padding:7px 0 8px;z-index:9999}.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu{min-width:150px;width:auto}.auto-fold #adminmenu .wp-has-current-submenu li>a{padding-left:16px;padding-right:14px}.auto-fold #adminmenu li.menu-top .wp-submenu>li>a{padding-right:12px}.auto-fold #adminmenu .wp-menu-name{position:absolute;right:-999px}.auto-fold #adminmenu .wp-submenu-head{display:block}.auto-fold #adminmenu div.wp-menu-image{height:30px;width:34px;position:absolute;z-index:25}.auto-fold #adminmenu a.menu-top{height:34px}.auto-fold #adminmenu li.wp-menu-open{border:0}.auto-fold #adminmenu .wp-has-current-submenu.menu-top-last{margin-bottom:0}.auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after{display:none}.auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{border-width:4px;margin-top:-4px;top:16px}.auto-fold ul#adminmenu a.wp-has-current-submenu:after,.auto-fold ul#adminmenu>li a.current:after{border-width:4px;margin-top:-4px}.auto-fold #adminmenu li.menu-top:hover,.auto-fold #adminmenu li.opensub>a.menu-top,.auto-fold #adminmenu li>a.menu-top:focus{z-index:10000}.auto-fold #collapse-menu span{display:none}.auto-fold #collapse-button div{background:0 0}.auto-fold #collapse-button div:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.auto-fold #collapse-button div:after{-webkit-transform:none;-ms-transform:none;transform:none}}@media screen and (max-width:782px){.auto-fold #wpcontent{position:relative;margin-right:0;padding-right:10px}.sticky-menu #adminmenuwrap{position:relative;z-index:auto;top:0}.auto-fold #adminmenu,.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{position:absolute;width:190px;z-index:100}.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{display:none}.auto-fold .wp-responsive-open #adminmenuback,.auto-fold .wp-responsive-open #adminmenuwrap{display:block}.auto-fold #adminmenu li.menu-top{width:100%}.auto-fold #adminmenu li a{font-size:16px;padding:5px}.auto-fold #adminmenu li.menu-top .wp-submenu>li>a{padding:10px 20px 10px 10px}.auto-fold #adminmenu .wp-menu-name{position:static;margin-right:35px}.auto-fold ul#adminmenu a.wp-has-current-submenu:after,.auto-fold ul#adminmenu>li.current>a.current:after{border-width:8px;margin-top:-8px}.auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{display:none}#adminmenu .wp-submenu{position:relative;display:none}.auto-fold #adminmenu .selected .wp-submenu,.auto-fold #adminmenu .wp-menu-open .wp-submenu{position:relative;display:block;top:0;right:-1px;-webkit-box-shadow:none;box-shadow:none}.auto-fold #adminmenu .selected .wp-submenu:after,.auto-fold #adminmenu .wp-menu-open .wp-submenu:after{display:none}.auto-fold #adminmenu .opensub .wp-submenu{display:none}.auto-fold #adminmenu .selected .wp-submenu{display:block}.auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after{display:block}.auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.auto-fold #adminmenu a.menu-top:focus+.wp-submenu{position:relative;right:-1px;left:0;top:0}#adminmenu .wp-submenu .wp-submenu-head{display:none}#wp-responsive-toggle{position:fixed;top:5px;right:4px;padding-left:10px;z-index:99999;border:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wpadminbar #wp-admin-bar-menu-toggle a{display:block;padding:0;overflow:hidden;outline:0;text-decoration:none;border:1px solid transparent;background:0 0;height:44px;margin-right:-1px}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#32373c}li#wp-admin-bar-menu-toggle{display:block}#wpadminbar #wp-admin-bar-menu-toggle a:hover{border:1px solid transparent}#wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{content:"\f228";display:inline-block;float:right;font:400 40px/45px dashicons;vertical-align:middle;outline:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:44px;width:50px;padding:0;border:none;text-align:center;text-decoration:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#00b9eb}}@media screen and (max-width:600px){#adminmenuback,#adminmenuwrap{display:none}.wp-responsive-open #adminmenuback,.wp-responsive-open #adminmenuwrap{display:block}.auto-fold #adminmenu{top:46px}}
\ No newline at end of file
+#adminmenu,#adminmenu .wp-submenu,#adminmenuback,#adminmenuwrap{width:160px;background-color:#23282d}#adminmenuback{position:fixed;top:0;bottom:-120px;z-index:1}#adminmenu{clear:right;margin:12px 0;padding:0;list-style:none}.folded #adminmenu,.folded #adminmenu li.menu-top,.folded #adminmenuback,.folded #adminmenuwrap{width:36px}.icon16{height:18px;width:18px;padding:6px;margin:-6px -8px 0 0;float:right}.icon16:before{color:#82878c;font:400 20px/1 dashicons;speak:none;padding:6px 0;height:34px;width:20px;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.icon16.icon-dashboard:before{content:"\f226"}.icon16.icon-post:before{content:"\f109"}.icon16.icon-media:before{content:"\f104"}.icon16.icon-links:before{content:"\f103"}.icon16.icon-page:before{content:"\f105"}.icon16.icon-comments:before{content:"\f101";margin-top:1px}.icon16.icon-appearance:before{content:"\f100"}.icon16.icon-plugins:before{content:"\f106"}.icon16.icon-users:before{content:"\f110"}.icon16.icon-tools:before{content:"\f107"}.icon16.icon-settings:before{content:"\f108"}.icon16.icon-site:before{content:"\f541"}.icon16.icon-generic:before{content:"\f111"}.icon16.icon-appearance,.icon16.icon-comments,.icon16.icon-dashboard,.icon16.icon-generic,.icon16.icon-links,.icon16.icon-media,.icon16.icon-page,.icon16.icon-plugins,.icon16.icon-post,.icon16.icon-settings,.icon16.icon-site,.icon16.icon-tools,.icon16.icon-users,.menu-icon-appearance div.wp-menu-image,.menu-icon-comments div.wp-menu-image,.menu-icon-dashboard div.wp-menu-image,.menu-icon-generic div.wp-menu-image,.menu-icon-links div.wp-menu-image,.menu-icon-media div.wp-menu-image,.menu-icon-page div.wp-menu-image,.menu-icon-plugins div.wp-menu-image,.menu-icon-post div.wp-menu-image,.menu-icon-settings div.wp-menu-image,.menu-icon-site div.wp-menu-image,.menu-icon-tools div.wp-menu-image,.menu-icon-users div.wp-menu-image{background-image:none!important}#adminmenuwrap{position:relative;float:right;z-index:9990}#adminmenu *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#adminmenu li{margin:0;padding:0;cursor:pointer}#adminmenu a{display:block;line-height:18px;padding:2px 5px;color:#eee}#adminmenu .wp-submenu a{color:#b4b9be;color:rgba(240,245,250,.7)}#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover{background:0 0}#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a:hover,#adminmenu li.menu-top>a:focus{color:#00b9eb}#adminmenu li.menu-top{border:none;min-height:34px;position:relative}#adminmenu .wp-submenu{list-style:none;position:absolute;top:-1000em;right:160px;overflow:visible;word-wrap:break-word}#adminmenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{padding:7px 0 8px;z-index:9999;background-color:#32373c;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}#adminmenu a.menu-top:focus+.wp-submenu,.js #adminmenu .opensub .wp-submenu,.js #adminmenu .sub-open,.no-js li.wp-has-submenu:hover .wp-submenu{top:-1px}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu.sub-open,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.no-js li.wp-has-current-submenu:hover .wp-submenu{position:relative;z-index:3;top:auto;right:auto;left:auto;bottom:auto;border:0;margin-top:0;-webkit-box-shadow:none;box-shadow:none;background-color:#32373c}#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{position:relative;background-color:#191e23;color:#00b9eb}.folded #adminmenu li.menu-top:hover,.folded #adminmenu li.opensub>a.menu-top,.folded #adminmenu li>a.menu-top:focus{z-index:10000}#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu .wp-menu-arrow,#adminmenu .wp-menu-arrow div,#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top,.folded #adminmenu li.wp-has-current-submenu{background:#0073aa;color:#fff}.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.folded #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu.opensub .wp-submenu,.folded #adminmenu .wp-submenu.sub-open,.folded #adminmenu a.menu-top:focus+.wp-submenu,.no-js.folded #adminmenu .wp-has-submenu:hover .wp-submenu{top:0;right:36px}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{position:absolute;top:-1000em}#adminmenu .wp-not-current-submenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{min-width:160px;width:auto}#adminmenu .wp-submenu a{font-size:13px;line-height:1.2;margin:0;padding:6px 0}#adminmenu .opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-not-current-submenu li>a,.folded #adminmenu .wp-has-current-submenu li>a{padding-left:16px;padding-right:14px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#adminmenu .wp-has-current-submenu ul>li>a,.folded #adminmenu li.menu-top .wp-submenu>li>a{padding:6px 12px}#adminmenu .wp-submenu-head,#adminmenu a.menu-top{font-size:14px;font-weight:400;line-height:18px;padding:0}#adminmenu .wp-submenu-head{display:none}.folded #adminmenu .wp-menu-name{position:absolute;right:-999px}.folded #adminmenu .wp-submenu-head{display:block}#adminmenu .wp-submenu li{padding:0;margin:0;overflow:hidden}#adminmenu .wp-menu-image img{padding:9px 0 0;opacity:.6;filter:alpha(opacity=60)}#adminmenu div.wp-menu-name{padding:8px 0}#adminmenu div.wp-menu-image{float:right;width:36px;height:34px;margin:0;text-align:center}#adminmenu div.wp-menu-image.svg{background-repeat:no-repeat;background-position:center;-webkit-background-size:20px auto;background-size:20px auto}div.wp-menu-image:before{color:#a0a5aa;color:rgba(240,245,250,.6);padding:7px 0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#adminmenu div.wp-menu-image:before{color:#a0a5aa;color:rgba(240,245,250,.6)}#adminmenu .current div.wp-menu-image:before,#adminmenu .wp-has-current-submenu div.wp-menu-image:before,#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu a.wp-has-current-submenu:hover div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu:hover div.wp-menu-image:before{color:#fff}#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before{color:#00b9eb}.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#a0a5aa}.folded #adminmenu div.wp-menu-image{width:35px;height:30px;position:absolute;z-index:25}.folded #adminmenu a.menu-top{height:34px}.no-font-face #adminmenu .wp-menu-image{display:none}.no-font-face #adminmenu div.wp-menu-name{padding:8px 12px}.no-font-face.auto-fold #adminmenu .wp-menu-name{margin-right:0}.sticky-menu #adminmenuwrap{position:fixed}.wp-menu-arrow{display:none!important}ul#adminmenu a.wp-has-current-submenu{position:relative}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{left:0;border:8px solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-left-color:#f1f1f1;top:50%;margin-top:-8px}.folded ul#adminmenu li:hover a.wp-has-current-submenu:after{display:none}.folded ul#adminmenu a.wp-has-current-submenu:after,.folded ul#adminmenu>li a.current:after{border-width:4px;margin-top:-4px}#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{left:0;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-width:8px;top:10px;z-index:10000}.folded ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{border-width:4px;margin-top:-4px;top:18px}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-left-color:#32373c}#adminmenu li.menu-top:hover .wp-menu-image img,#adminmenu li.wp-has-current-submenu .wp-menu-image img{opacity:1;filter:alpha(opacity=100)}#adminmenu li.wp-menu-separator{height:5px;padding:0;margin:0 0 6px;cursor:inherit}#adminmenu div.separator{height:2px;padding:0}#collapse-button,#collapse-button div{height:15px;width:15px}#adminmenu .wp-submenu .wp-submenu-head{color:#fff;font-weight:400;font-size:14px;padding:8px 11px 8px 4px;margin:-7px 0 4px}#adminmenu li.current,.folded #adminmenu li.wp-menu-open{border:0}#adminmenu .awaiting-mod,#adminmenu .update-plugins{display:inline-block;background-color:#d54e21;color:#fff;font-size:9px;line-height:17px;font-weight:600;margin:1px 2px 0 0;vertical-align:top;-webkit-border-radius:10px;border-radius:10px;z-index:26}#adminmenu li .awaiting-mod span,#adminmenu li span.update-plugins span{display:block;padding:0 6px}#adminmenu li span.count-0,.folded #collapse-menu span{display:none}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod{background-color:#00b9eb;color:#fff}#collapse-menu{font-size:13px;line-height:34px;margin-top:10px;color:#a0a5aa;color:rgba(240,245,250,.6);-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#collapse-menu:hover,#collapse-menu:hover #collapse-button div:after{color:#00b9eb}#collapse-button{float:right;margin:10px 11px 10px 8px;-webkit-border-radius:10px;border-radius:10px}#wpwrap #collapse-button div{padding:0}#collapse-button div:after{content:"\f148";display:block;line-height:15px;right:-3px;top:-3px;color:#a0a5aa;color:rgba(240,245,250,.6);font:400 20px/1 dashicons!important;speak:none;margin:0 auto;padding:0!important;position:relative;text-align:center;width:20px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.folded #collapse-button div:after,.rtl #collapse-button div:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.folded #collapse-button div:after{-webkit-transform:none;-ms-transform:none;transform:none}.customize-support #menu-appearance a[href="themes.php?page=custom-header"],.customize-support #menu-appearance a[href="themes.php?page=custom-background"],li#wp-admin-bar-menu-toggle{display:none}@media only screen and (max-width:960px){.auto-fold #wpcontent,.auto-fold #wpfooter{margin-right:36px}.auto-fold #adminmenu,.auto-fold #adminmenu li.menu-top,.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{width:36px}.auto-fold #adminmenu .opensub .wp-submenu,.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.auto-fold #adminmenu .wp-has-current-submenu.opensub .wp-submenu,.auto-fold #adminmenu .wp-submenu.sub-open,.auto-fold #adminmenu a.menu-top:focus+.wp-submenu{top:0;right:36px}.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu,.auto-fold #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{position:absolute;top:-1000em;margin-left:-1px;padding:7px 0 8px;z-index:9999}.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu{min-width:150px;width:auto}.auto-fold #adminmenu .wp-has-current-submenu li>a{padding-left:16px;padding-right:14px}.auto-fold #adminmenu li.menu-top .wp-submenu>li>a{padding-right:12px}.auto-fold #adminmenu .wp-menu-name{position:absolute;right:-999px}.auto-fold #adminmenu .wp-submenu-head{display:block}.auto-fold #adminmenu div.wp-menu-image{height:30px;width:34px;position:absolute;z-index:25}.auto-fold #adminmenu a.menu-top{height:34px}.auto-fold #adminmenu li.wp-menu-open{border:0}.auto-fold #adminmenu .wp-has-current-submenu.menu-top-last{margin-bottom:0}.auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after{display:none}.auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{border-width:4px;margin-top:-4px;top:16px}.auto-fold ul#adminmenu a.wp-has-current-submenu:after,.auto-fold ul#adminmenu>li a.current:after{border-width:4px;margin-top:-4px}.auto-fold #adminmenu li.menu-top:hover,.auto-fold #adminmenu li.opensub>a.menu-top,.auto-fold #adminmenu li>a.menu-top:focus{z-index:10000}.auto-fold #collapse-menu span{display:none}.auto-fold #collapse-button div{background:0 0}.auto-fold #collapse-button div:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.auto-fold #collapse-button div:after{-webkit-transform:none;-ms-transform:none;transform:none}}@media screen and (max-width:782px){.auto-fold #wpcontent{position:relative;margin-right:0;padding-right:10px}.sticky-menu #adminmenuwrap{position:relative;z-index:auto;top:0}.auto-fold #adminmenu,.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{position:absolute;width:190px;z-index:100}.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{display:none}.auto-fold .wp-responsive-open #adminmenuback,.auto-fold .wp-responsive-open #adminmenuwrap{display:block}.auto-fold #adminmenu li.menu-top{width:100%}.auto-fold #adminmenu li a{font-size:16px;padding:5px}.auto-fold #adminmenu li.menu-top .wp-submenu>li>a{padding:10px 20px 10px 10px}.auto-fold #adminmenu .wp-menu-name{position:static;margin-right:35px}.auto-fold ul#adminmenu a.wp-has-current-submenu:after,.auto-fold ul#adminmenu>li.current>a.current:after{border-width:8px;margin-top:-8px}.auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{display:none}#adminmenu .wp-submenu{position:relative;display:none}.auto-fold #adminmenu .selected .wp-submenu,.auto-fold #adminmenu .wp-menu-open .wp-submenu{position:relative;display:block;top:0;right:-1px;-webkit-box-shadow:none;box-shadow:none}.auto-fold #adminmenu .selected .wp-submenu:after,.auto-fold #adminmenu .wp-menu-open .wp-submenu:after{display:none}.auto-fold #adminmenu .opensub .wp-submenu{display:none}.auto-fold #adminmenu .selected .wp-submenu{display:block}.auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after{display:block}.auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.auto-fold #adminmenu a.menu-top:focus+.wp-submenu{position:relative;right:-1px;left:0;top:0}#adminmenu .wp-submenu .wp-submenu-head{display:none}#wp-responsive-toggle{position:fixed;top:5px;right:4px;padding-left:10px;z-index:99999;border:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wpadminbar #wp-admin-bar-menu-toggle a{display:block;padding:0;overflow:hidden;outline:0;text-decoration:none;border:1px solid transparent;background:0 0;height:44px;margin-right:-1px}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#32373c}li#wp-admin-bar-menu-toggle{display:block}#wpadminbar #wp-admin-bar-menu-toggle a:hover{border:1px solid transparent}#wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{content:"\f228";display:inline-block;float:right;font:400 40px/45px dashicons;vertical-align:middle;outline:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:44px;width:50px;padding:0;border:none;text-align:center;text-decoration:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#00b9eb}}@media screen and (max-width:600px){#adminmenuback,#adminmenuwrap{display:none}.wp-responsive-open #adminmenuback,.wp-responsive-open #adminmenuwrap{display:block}.auto-fold #adminmenu{top:46px}}
\ No newline at end of file
index 337cde00a2f8bc468667bd1904be7c7a42bfd2a0..2d556378b1b44d09bab82811bc18357c939e7d90 100644 (file)
@@ -97,7 +97,7 @@
 }
 
 .icon16.icon-site:before {
-       content: "\f112";
+       content: "\f541";
 }
 
 .icon16.icon-generic:before {
index 29dd6235ebbf1b2bc55dfe4b37479b8da88cc98d..649eda8f8ec0c780fdd8bffd3579b8e062a5e973 100644 (file)
@@ -1 +1 @@
-#adminmenu,#adminmenu .wp-submenu,#adminmenuback,#adminmenuwrap{width:160px;background-color:#23282d}#adminmenuback{position:fixed;top:0;bottom:-120px;z-index:1}#adminmenu{clear:left;margin:12px 0;padding:0;list-style:none}.folded #adminmenu,.folded #adminmenu li.menu-top,.folded #adminmenuback,.folded #adminmenuwrap{width:36px}.icon16{height:18px;width:18px;padding:6px;margin:-6px 0 0 -8px;float:left}.icon16:before{color:#82878c;font:400 20px/1 dashicons;speak:none;padding:6px 0;height:34px;width:20px;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.icon16.icon-dashboard:before{content:"\f226"}.icon16.icon-post:before{content:"\f109"}.icon16.icon-media:before{content:"\f104"}.icon16.icon-links:before{content:"\f103"}.icon16.icon-page:before{content:"\f105"}.icon16.icon-comments:before{content:"\f101";margin-top:1px}.icon16.icon-appearance:before{content:"\f100"}.icon16.icon-plugins:before{content:"\f106"}.icon16.icon-users:before{content:"\f110"}.icon16.icon-tools:before{content:"\f107"}.icon16.icon-settings:before{content:"\f108"}.icon16.icon-site:before{content:"\f112"}.icon16.icon-generic:before{content:"\f111"}.icon16.icon-appearance,.icon16.icon-comments,.icon16.icon-dashboard,.icon16.icon-generic,.icon16.icon-links,.icon16.icon-media,.icon16.icon-page,.icon16.icon-plugins,.icon16.icon-post,.icon16.icon-settings,.icon16.icon-site,.icon16.icon-tools,.icon16.icon-users,.menu-icon-appearance div.wp-menu-image,.menu-icon-comments div.wp-menu-image,.menu-icon-dashboard div.wp-menu-image,.menu-icon-generic div.wp-menu-image,.menu-icon-links div.wp-menu-image,.menu-icon-media div.wp-menu-image,.menu-icon-page div.wp-menu-image,.menu-icon-plugins div.wp-menu-image,.menu-icon-post div.wp-menu-image,.menu-icon-settings div.wp-menu-image,.menu-icon-site div.wp-menu-image,.menu-icon-tools div.wp-menu-image,.menu-icon-users div.wp-menu-image{background-image:none!important}#adminmenuwrap{position:relative;float:left;z-index:9990}#adminmenu *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#adminmenu li{margin:0;padding:0;cursor:pointer}#adminmenu a{display:block;line-height:18px;padding:2px 5px;color:#eee}#adminmenu .wp-submenu a{color:#b4b9be;color:rgba(240,245,250,.7)}#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover{background:0 0}#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a:hover,#adminmenu li.menu-top>a:focus{color:#00b9eb}#adminmenu li.menu-top{border:none;min-height:34px;position:relative}#adminmenu .wp-submenu{list-style:none;position:absolute;top:-1000em;left:160px;overflow:visible;word-wrap:break-word}#adminmenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{padding:7px 0 8px;z-index:9999;background-color:#32373c;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}#adminmenu a.menu-top:focus+.wp-submenu,.js #adminmenu .opensub .wp-submenu,.js #adminmenu .sub-open,.no-js li.wp-has-submenu:hover .wp-submenu{top:-1px}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu.sub-open,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.no-js li.wp-has-current-submenu:hover .wp-submenu{position:relative;z-index:3;top:auto;left:auto;right:auto;bottom:auto;border:0;margin-top:0;-webkit-box-shadow:none;box-shadow:none;background-color:#32373c}#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{position:relative;background-color:#191e23;color:#00b9eb}.folded #adminmenu li.menu-top:hover,.folded #adminmenu li.opensub>a.menu-top,.folded #adminmenu li>a.menu-top:focus{z-index:10000}#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu .wp-menu-arrow,#adminmenu .wp-menu-arrow div,#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top,.folded #adminmenu li.wp-has-current-submenu{background:#0073aa;color:#fff}.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.folded #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu.opensub .wp-submenu,.folded #adminmenu .wp-submenu.sub-open,.folded #adminmenu a.menu-top:focus+.wp-submenu,.no-js.folded #adminmenu .wp-has-submenu:hover .wp-submenu{top:0;left:36px}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{position:absolute;top:-1000em}#adminmenu .wp-not-current-submenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{min-width:160px;width:auto}#adminmenu .wp-submenu a{font-size:13px;line-height:1.2;margin:0;padding:6px 0}#adminmenu .opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-not-current-submenu li>a,.folded #adminmenu .wp-has-current-submenu li>a{padding-right:16px;padding-left:14px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#adminmenu .wp-has-current-submenu ul>li>a,.folded #adminmenu li.menu-top .wp-submenu>li>a{padding:6px 12px}#adminmenu .wp-submenu-head,#adminmenu a.menu-top{font-size:14px;font-weight:400;line-height:18px;padding:0}#adminmenu .wp-submenu-head{display:none}.folded #adminmenu .wp-menu-name{position:absolute;left:-999px}.folded #adminmenu .wp-submenu-head{display:block}#adminmenu .wp-submenu li{padding:0;margin:0;overflow:hidden}#adminmenu .wp-menu-image img{padding:9px 0 0;opacity:.6;filter:alpha(opacity=60)}#adminmenu div.wp-menu-name{padding:8px 0}#adminmenu div.wp-menu-image{float:left;width:36px;height:34px;margin:0;text-align:center}#adminmenu div.wp-menu-image.svg{background-repeat:no-repeat;background-position:center;-webkit-background-size:20px auto;background-size:20px auto}div.wp-menu-image:before{color:#a0a5aa;color:rgba(240,245,250,.6);padding:7px 0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#adminmenu div.wp-menu-image:before{color:#a0a5aa;color:rgba(240,245,250,.6)}#adminmenu .current div.wp-menu-image:before,#adminmenu .wp-has-current-submenu div.wp-menu-image:before,#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu a.wp-has-current-submenu:hover div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu:hover div.wp-menu-image:before{color:#fff}#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before{color:#00b9eb}.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#a0a5aa}.folded #adminmenu div.wp-menu-image{width:35px;height:30px;position:absolute;z-index:25}.folded #adminmenu a.menu-top{height:34px}.no-font-face #adminmenu .wp-menu-image{display:none}.no-font-face #adminmenu div.wp-menu-name{padding:8px 12px}.no-font-face.auto-fold #adminmenu .wp-menu-name{margin-left:0}.sticky-menu #adminmenuwrap{position:fixed}.wp-menu-arrow{display:none!important}ul#adminmenu a.wp-has-current-submenu{position:relative}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{right:0;border:8px solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#f1f1f1;top:50%;margin-top:-8px}.folded ul#adminmenu li:hover a.wp-has-current-submenu:after{display:none}.folded ul#adminmenu a.wp-has-current-submenu:after,.folded ul#adminmenu>li a.current:after{border-width:4px;margin-top:-4px}#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{right:0;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-width:8px;top:10px;z-index:10000}.folded ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{border-width:4px;margin-top:-4px;top:18px}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#32373c}#adminmenu li.menu-top:hover .wp-menu-image img,#adminmenu li.wp-has-current-submenu .wp-menu-image img{opacity:1;filter:alpha(opacity=100)}#adminmenu li.wp-menu-separator{height:5px;padding:0;margin:0 0 6px;cursor:inherit}#adminmenu div.separator{height:2px;padding:0}#collapse-button,#collapse-button div{height:15px;width:15px}#adminmenu .wp-submenu .wp-submenu-head{color:#fff;font-weight:400;font-size:14px;padding:8px 4px 8px 11px;margin:-7px 0 4px}#adminmenu li.current,.folded #adminmenu li.wp-menu-open{border:0}#adminmenu .awaiting-mod,#adminmenu .update-plugins{display:inline-block;background-color:#d54e21;color:#fff;font-size:9px;line-height:17px;font-weight:600;margin:1px 0 0 2px;vertical-align:top;-webkit-border-radius:10px;border-radius:10px;z-index:26}#adminmenu li .awaiting-mod span,#adminmenu li span.update-plugins span{display:block;padding:0 6px}#adminmenu li span.count-0,.folded #collapse-menu span{display:none}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod{background-color:#00b9eb;color:#fff}#collapse-menu{font-size:13px;line-height:34px;margin-top:10px;color:#a0a5aa;color:rgba(240,245,250,.6);-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#collapse-menu:hover,#collapse-menu:hover #collapse-button div:after{color:#00b9eb}#collapse-button{float:left;margin:10px 8px 10px 11px;-webkit-border-radius:10px;border-radius:10px}#wpwrap #collapse-button div{padding:0}#collapse-button div:after{content:"\f148";display:block;line-height:15px;left:-3px;top:-3px;color:#a0a5aa;color:rgba(240,245,250,.6);font:400 20px/1 dashicons!important;speak:none;margin:0 auto;padding:0!important;position:relative;text-align:center;width:20px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.folded #collapse-button div:after,.rtl #collapse-button div:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.folded #collapse-button div:after{-webkit-transform:none;-ms-transform:none;transform:none}.customize-support #menu-appearance a[href="themes.php?page=custom-header"],.customize-support #menu-appearance a[href="themes.php?page=custom-background"],li#wp-admin-bar-menu-toggle{display:none}@media only screen and (max-width:960px){.auto-fold #wpcontent,.auto-fold #wpfooter{margin-left:36px}.auto-fold #adminmenu,.auto-fold #adminmenu li.menu-top,.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{width:36px}.auto-fold #adminmenu .opensub .wp-submenu,.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.auto-fold #adminmenu .wp-has-current-submenu.opensub .wp-submenu,.auto-fold #adminmenu .wp-submenu.sub-open,.auto-fold #adminmenu a.menu-top:focus+.wp-submenu{top:0;left:36px}.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu,.auto-fold #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{position:absolute;top:-1000em;margin-right:-1px;padding:7px 0 8px;z-index:9999}.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu{min-width:150px;width:auto}.auto-fold #adminmenu .wp-has-current-submenu li>a{padding-right:16px;padding-left:14px}.auto-fold #adminmenu li.menu-top .wp-submenu>li>a{padding-left:12px}.auto-fold #adminmenu .wp-menu-name{position:absolute;left:-999px}.auto-fold #adminmenu .wp-submenu-head{display:block}.auto-fold #adminmenu div.wp-menu-image{height:30px;width:34px;position:absolute;z-index:25}.auto-fold #adminmenu a.menu-top{height:34px}.auto-fold #adminmenu li.wp-menu-open{border:0}.auto-fold #adminmenu .wp-has-current-submenu.menu-top-last{margin-bottom:0}.auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after{display:none}.auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{border-width:4px;margin-top:-4px;top:16px}.auto-fold ul#adminmenu a.wp-has-current-submenu:after,.auto-fold ul#adminmenu>li a.current:after{border-width:4px;margin-top:-4px}.auto-fold #adminmenu li.menu-top:hover,.auto-fold #adminmenu li.opensub>a.menu-top,.auto-fold #adminmenu li>a.menu-top:focus{z-index:10000}.auto-fold #collapse-menu span{display:none}.auto-fold #collapse-button div{background:0 0}.auto-fold #collapse-button div:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.auto-fold #collapse-button div:after{-webkit-transform:none;-ms-transform:none;transform:none}}@media screen and (max-width:782px){.auto-fold #wpcontent{position:relative;margin-left:0;padding-left:10px}.sticky-menu #adminmenuwrap{position:relative;z-index:auto;top:0}.auto-fold #adminmenu,.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{position:absolute;width:190px;z-index:100}.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{display:none}.auto-fold .wp-responsive-open #adminmenuback,.auto-fold .wp-responsive-open #adminmenuwrap{display:block}.auto-fold #adminmenu li.menu-top{width:100%}.auto-fold #adminmenu li a{font-size:16px;padding:5px}.auto-fold #adminmenu li.menu-top .wp-submenu>li>a{padding:10px 10px 10px 20px}.auto-fold #adminmenu .wp-menu-name{position:static;margin-left:35px}.auto-fold ul#adminmenu a.wp-has-current-submenu:after,.auto-fold ul#adminmenu>li.current>a.current:after{border-width:8px;margin-top:-8px}.auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{display:none}#adminmenu .wp-submenu{position:relative;display:none}.auto-fold #adminmenu .selected .wp-submenu,.auto-fold #adminmenu .wp-menu-open .wp-submenu{position:relative;display:block;top:0;left:-1px;-webkit-box-shadow:none;box-shadow:none}.auto-fold #adminmenu .selected .wp-submenu:after,.auto-fold #adminmenu .wp-menu-open .wp-submenu:after{display:none}.auto-fold #adminmenu .opensub .wp-submenu{display:none}.auto-fold #adminmenu .selected .wp-submenu{display:block}.auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after{display:block}.auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.auto-fold #adminmenu a.menu-top:focus+.wp-submenu{position:relative;left:-1px;right:0;top:0}#adminmenu .wp-submenu .wp-submenu-head{display:none}#wp-responsive-toggle{position:fixed;top:5px;left:4px;padding-right:10px;z-index:99999;border:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wpadminbar #wp-admin-bar-menu-toggle a{display:block;padding:0;overflow:hidden;outline:0;text-decoration:none;border:1px solid transparent;background:0 0;height:44px;margin-left:-1px}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#32373c}li#wp-admin-bar-menu-toggle{display:block}#wpadminbar #wp-admin-bar-menu-toggle a:hover{border:1px solid transparent}#wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{content:"\f228";display:inline-block;float:left;font:400 40px/45px dashicons;vertical-align:middle;outline:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:44px;width:50px;padding:0;border:none;text-align:center;text-decoration:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#00b9eb}}@media screen and (max-width:600px){#adminmenuback,#adminmenuwrap{display:none}.wp-responsive-open #adminmenuback,.wp-responsive-open #adminmenuwrap{display:block}.auto-fold #adminmenu{top:46px}}
\ No newline at end of file
+#adminmenu,#adminmenu .wp-submenu,#adminmenuback,#adminmenuwrap{width:160px;background-color:#23282d}#adminmenuback{position:fixed;top:0;bottom:-120px;z-index:1}#adminmenu{clear:left;margin:12px 0;padding:0;list-style:none}.folded #adminmenu,.folded #adminmenu li.menu-top,.folded #adminmenuback,.folded #adminmenuwrap{width:36px}.icon16{height:18px;width:18px;padding:6px;margin:-6px 0 0 -8px;float:left}.icon16:before{color:#82878c;font:400 20px/1 dashicons;speak:none;padding:6px 0;height:34px;width:20px;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.icon16.icon-dashboard:before{content:"\f226"}.icon16.icon-post:before{content:"\f109"}.icon16.icon-media:before{content:"\f104"}.icon16.icon-links:before{content:"\f103"}.icon16.icon-page:before{content:"\f105"}.icon16.icon-comments:before{content:"\f101";margin-top:1px}.icon16.icon-appearance:before{content:"\f100"}.icon16.icon-plugins:before{content:"\f106"}.icon16.icon-users:before{content:"\f110"}.icon16.icon-tools:before{content:"\f107"}.icon16.icon-settings:before{content:"\f108"}.icon16.icon-site:before{content:"\f541"}.icon16.icon-generic:before{content:"\f111"}.icon16.icon-appearance,.icon16.icon-comments,.icon16.icon-dashboard,.icon16.icon-generic,.icon16.icon-links,.icon16.icon-media,.icon16.icon-page,.icon16.icon-plugins,.icon16.icon-post,.icon16.icon-settings,.icon16.icon-site,.icon16.icon-tools,.icon16.icon-users,.menu-icon-appearance div.wp-menu-image,.menu-icon-comments div.wp-menu-image,.menu-icon-dashboard div.wp-menu-image,.menu-icon-generic div.wp-menu-image,.menu-icon-links div.wp-menu-image,.menu-icon-media div.wp-menu-image,.menu-icon-page div.wp-menu-image,.menu-icon-plugins div.wp-menu-image,.menu-icon-post div.wp-menu-image,.menu-icon-settings div.wp-menu-image,.menu-icon-site div.wp-menu-image,.menu-icon-tools div.wp-menu-image,.menu-icon-users div.wp-menu-image{background-image:none!important}#adminmenuwrap{position:relative;float:left;z-index:9990}#adminmenu *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#adminmenu li{margin:0;padding:0;cursor:pointer}#adminmenu a{display:block;line-height:18px;padding:2px 5px;color:#eee}#adminmenu .wp-submenu a{color:#b4b9be;color:rgba(240,245,250,.7)}#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover{background:0 0}#adminmenu .wp-submenu a:focus,#adminmenu .wp-submenu a:hover,#adminmenu a:hover,#adminmenu li.menu-top>a:focus{color:#00b9eb}#adminmenu li.menu-top{border:none;min-height:34px;position:relative}#adminmenu .wp-submenu{list-style:none;position:absolute;top:-1000em;left:160px;overflow:visible;word-wrap:break-word}#adminmenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{padding:7px 0 8px;z-index:9999;background-color:#32373c;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}#adminmenu a.menu-top:focus+.wp-submenu,.js #adminmenu .opensub .wp-submenu,.js #adminmenu .sub-open,.no-js li.wp-has-submenu:hover .wp-submenu{top:-1px}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu.sub-open,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.no-js li.wp-has-current-submenu:hover .wp-submenu{position:relative;z-index:3;top:auto;left:auto;right:auto;bottom:auto;border:0;margin-top:0;-webkit-box-shadow:none;box-shadow:none;background-color:#32373c}#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus{position:relative;background-color:#191e23;color:#00b9eb}.folded #adminmenu li.menu-top:hover,.folded #adminmenu li.opensub>a.menu-top,.folded #adminmenu li>a.menu-top:focus{z-index:10000}#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head,#adminmenu .wp-menu-arrow,#adminmenu .wp-menu-arrow div,#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top,.folded #adminmenu li.wp-has-current-submenu{background:#0073aa;color:#fff}.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.folded #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.folded #adminmenu .wp-has-current-submenu.opensub .wp-submenu,.folded #adminmenu .wp-submenu.sub-open,.folded #adminmenu a.menu-top:focus+.wp-submenu,.no-js.folded #adminmenu .wp-has-submenu:hover .wp-submenu{top:0;left:36px}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{position:absolute;top:-1000em}#adminmenu .wp-not-current-submenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{min-width:160px;width:auto}#adminmenu .wp-submenu a{font-size:13px;line-height:1.2;margin:0;padding:6px 0}#adminmenu .opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a{color:#fff}#adminmenu .wp-not-current-submenu li>a,.folded #adminmenu .wp-has-current-submenu li>a{padding-right:16px;padding-left:14px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#adminmenu .wp-has-current-submenu ul>li>a,.folded #adminmenu li.menu-top .wp-submenu>li>a{padding:6px 12px}#adminmenu .wp-submenu-head,#adminmenu a.menu-top{font-size:14px;font-weight:400;line-height:18px;padding:0}#adminmenu .wp-submenu-head{display:none}.folded #adminmenu .wp-menu-name{position:absolute;left:-999px}.folded #adminmenu .wp-submenu-head{display:block}#adminmenu .wp-submenu li{padding:0;margin:0;overflow:hidden}#adminmenu .wp-menu-image img{padding:9px 0 0;opacity:.6;filter:alpha(opacity=60)}#adminmenu div.wp-menu-name{padding:8px 0}#adminmenu div.wp-menu-image{float:left;width:36px;height:34px;margin:0;text-align:center}#adminmenu div.wp-menu-image.svg{background-repeat:no-repeat;background-position:center;-webkit-background-size:20px auto;background-size:20px auto}div.wp-menu-image:before{color:#a0a5aa;color:rgba(240,245,250,.6);padding:7px 0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#adminmenu div.wp-menu-image:before{color:#a0a5aa;color:rgba(240,245,250,.6)}#adminmenu .current div.wp-menu-image:before,#adminmenu .wp-has-current-submenu div.wp-menu-image:before,#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu a.wp-has-current-submenu:hover div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu a:focus div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu:hover div.wp-menu-image:before{color:#fff}#adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before{color:#00b9eb}.ie8 #adminmenu li.opensub div.wp-menu-image:before{color:#a0a5aa}.folded #adminmenu div.wp-menu-image{width:35px;height:30px;position:absolute;z-index:25}.folded #adminmenu a.menu-top{height:34px}.no-font-face #adminmenu .wp-menu-image{display:none}.no-font-face #adminmenu div.wp-menu-name{padding:8px 12px}.no-font-face.auto-fold #adminmenu .wp-menu-name{margin-left:0}.sticky-menu #adminmenuwrap{position:fixed}.wp-menu-arrow{display:none!important}ul#adminmenu a.wp-has-current-submenu{position:relative}ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after{right:0;border:8px solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-right-color:#f1f1f1;top:50%;margin-top:-8px}.folded ul#adminmenu li:hover a.wp-has-current-submenu:after{display:none}.folded ul#adminmenu a.wp-has-current-submenu:after,.folded ul#adminmenu>li a.current:after{border-width:4px;margin-top:-4px}#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{right:0;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-width:8px;top:10px;z-index:10000}.folded ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{border-width:4px;margin-top:-4px;top:18px}#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border-right-color:#32373c}#adminmenu li.menu-top:hover .wp-menu-image img,#adminmenu li.wp-has-current-submenu .wp-menu-image img{opacity:1;filter:alpha(opacity=100)}#adminmenu li.wp-menu-separator{height:5px;padding:0;margin:0 0 6px;cursor:inherit}#adminmenu div.separator{height:2px;padding:0}#collapse-button,#collapse-button div{height:15px;width:15px}#adminmenu .wp-submenu .wp-submenu-head{color:#fff;font-weight:400;font-size:14px;padding:8px 4px 8px 11px;margin:-7px 0 4px}#adminmenu li.current,.folded #adminmenu li.wp-menu-open{border:0}#adminmenu .awaiting-mod,#adminmenu .update-plugins{display:inline-block;background-color:#d54e21;color:#fff;font-size:9px;line-height:17px;font-weight:600;margin:1px 0 0 2px;vertical-align:top;-webkit-border-radius:10px;border-radius:10px;z-index:26}#adminmenu li .awaiting-mod span,#adminmenu li span.update-plugins span{display:block;padding:0 6px}#adminmenu li span.count-0,.folded #collapse-menu span{display:none}#adminmenu li a.wp-has-current-submenu .update-plugins,#adminmenu li.current a .awaiting-mod{background-color:#00b9eb;color:#fff}#collapse-menu{font-size:13px;line-height:34px;margin-top:10px;color:#a0a5aa;color:rgba(240,245,250,.6);-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#collapse-menu:hover,#collapse-menu:hover #collapse-button div:after{color:#00b9eb}#collapse-button{float:left;margin:10px 8px 10px 11px;-webkit-border-radius:10px;border-radius:10px}#wpwrap #collapse-button div{padding:0}#collapse-button div:after{content:"\f148";display:block;line-height:15px;left:-3px;top:-3px;color:#a0a5aa;color:rgba(240,245,250,.6);font:400 20px/1 dashicons!important;speak:none;margin:0 auto;padding:0!important;position:relative;text-align:center;width:20px;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.folded #collapse-button div:after,.rtl #collapse-button div:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.folded #collapse-button div:after{-webkit-transform:none;-ms-transform:none;transform:none}.customize-support #menu-appearance a[href="themes.php?page=custom-header"],.customize-support #menu-appearance a[href="themes.php?page=custom-background"],li#wp-admin-bar-menu-toggle{display:none}@media only screen and (max-width:960px){.auto-fold #wpcontent,.auto-fold #wpfooter{margin-left:36px}.auto-fold #adminmenu,.auto-fold #adminmenu li.menu-top,.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{width:36px}.auto-fold #adminmenu .opensub .wp-submenu,.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.auto-fold #adminmenu .wp-has-current-submenu.opensub .wp-submenu,.auto-fold #adminmenu .wp-submenu.sub-open,.auto-fold #adminmenu a.menu-top:focus+.wp-submenu{top:0;left:36px}.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu,.auto-fold #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{position:absolute;top:-1000em;margin-right:-1px;padding:7px 0 8px;z-index:9999}.auto-fold #adminmenu .wp-has-current-submenu .wp-submenu{min-width:150px;width:auto}.auto-fold #adminmenu .wp-has-current-submenu li>a{padding-right:16px;padding-left:14px}.auto-fold #adminmenu li.menu-top .wp-submenu>li>a{padding-left:12px}.auto-fold #adminmenu .wp-menu-name{position:absolute;left:-999px}.auto-fold #adminmenu .wp-submenu-head{display:block}.auto-fold #adminmenu div.wp-menu-image{height:30px;width:34px;position:absolute;z-index:25}.auto-fold #adminmenu a.menu-top{height:34px}.auto-fold #adminmenu li.wp-menu-open{border:0}.auto-fold #adminmenu .wp-has-current-submenu.menu-top-last{margin-bottom:0}.auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after{display:none}.auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{border-width:4px;margin-top:-4px;top:16px}.auto-fold ul#adminmenu a.wp-has-current-submenu:after,.auto-fold ul#adminmenu>li a.current:after{border-width:4px;margin-top:-4px}.auto-fold #adminmenu li.menu-top:hover,.auto-fold #adminmenu li.opensub>a.menu-top,.auto-fold #adminmenu li>a.menu-top:focus{z-index:10000}.auto-fold #collapse-menu span{display:none}.auto-fold #collapse-button div{background:0 0}.auto-fold #collapse-button div:after{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.rtl.auto-fold #collapse-button div:after{-webkit-transform:none;-ms-transform:none;transform:none}}@media screen and (max-width:782px){.auto-fold #wpcontent{position:relative;margin-left:0;padding-left:10px}.sticky-menu #adminmenuwrap{position:relative;z-index:auto;top:0}.auto-fold #adminmenu,.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{position:absolute;width:190px;z-index:100}.auto-fold #adminmenuback,.auto-fold #adminmenuwrap{display:none}.auto-fold .wp-responsive-open #adminmenuback,.auto-fold .wp-responsive-open #adminmenuwrap{display:block}.auto-fold #adminmenu li.menu-top{width:100%}.auto-fold #adminmenu li a{font-size:16px;padding:5px}.auto-fold #adminmenu li.menu-top .wp-submenu>li>a{padding:10px 10px 10px 20px}.auto-fold #adminmenu .wp-menu-name{position:static;margin-left:35px}.auto-fold ul#adminmenu a.wp-has-current-submenu:after,.auto-fold ul#adminmenu>li.current>a.current:after{border-width:8px;margin-top:-8px}.auto-fold ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{display:none}#adminmenu .wp-submenu{position:relative;display:none}.auto-fold #adminmenu .selected .wp-submenu,.auto-fold #adminmenu .wp-menu-open .wp-submenu{position:relative;display:block;top:0;left:-1px;-webkit-box-shadow:none;box-shadow:none}.auto-fold #adminmenu .selected .wp-submenu:after,.auto-fold #adminmenu .wp-menu-open .wp-submenu:after{display:none}.auto-fold #adminmenu .opensub .wp-submenu{display:none}.auto-fold #adminmenu .selected .wp-submenu{display:block}.auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after{display:block}.auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus+.wp-submenu,.auto-fold #adminmenu a.menu-top:focus+.wp-submenu{position:relative;left:-1px;right:0;top:0}#adminmenu .wp-submenu .wp-submenu-head{display:none}#wp-responsive-toggle{position:fixed;top:5px;left:4px;padding-right:10px;z-index:99999;border:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wpadminbar #wp-admin-bar-menu-toggle a{display:block;padding:0;overflow:hidden;outline:0;text-decoration:none;border:1px solid transparent;background:0 0;height:44px;margin-left:-1px}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a{background:#32373c}li#wp-admin-bar-menu-toggle{display:block}#wpadminbar #wp-admin-bar-menu-toggle a:hover{border:1px solid transparent}#wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{content:"\f228";display:inline-block;float:left;font:400 40px/45px dashicons;vertical-align:middle;outline:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:44px;width:50px;padding:0;border:none;text-align:center;text-decoration:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before{color:#00b9eb}}@media screen and (max-width:600px){#adminmenuback,#adminmenuwrap{display:none}.wp-responsive-open #adminmenuback,.wp-responsive-open #adminmenuwrap{display:block}.auto-fold #adminmenu{top:46px}}
\ No newline at end of file
index 1af5d6504b18ebc3d225ad5d7198fe402134b214..e660523da3bcbe02e1fb82ceeae3633ea5728375 100644 (file)
 
 /* 2 columns main area */
 
-#col-container,
-#col-left,
-#col-right {
-       overflow: hidden;
-       padding: 0;
-       margin: 0;
-}
-
 #col-left {
+       float: right;
        width: 35%;
 }
 
 #col-right {
        float: left;
-       clear: left;
        width: 65%;
 }
 
-.col-wrap {
-       padding: 0 7px;
+#col-left .col-wrap {
+       padding: 0 0 0 6px;
+}
+
+#col-right .col-wrap {
+       padding: 0 6px 0 0;
 }
 
 /* utility classes */
@@ -212,13 +208,10 @@ body {
        padding: 0;
 }
 
-html {
-       background: #f1f1f1;
-}
-
 body {
+       background: #f1f1f1;
        color: #444;
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        font-size: 13px;
        line-height: 1.4em;
        min-width: 600px;
@@ -444,7 +437,7 @@ code {
 .subsubsub a .count,
 .subsubsub a.current .count {
        color: #555d66; /* #f1f1f1 background */
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .subsubsub a.current {
@@ -588,7 +581,8 @@ code {
        padding-right: 25px;
        color: #555d66;
        font-size: 14px;
-       font-weight: normal;
+       font-weight: 400;
+       line-height: 1;
 }
 
 .wrap .add-new-h2, /* deprecated */
@@ -608,6 +602,10 @@ code {
        text-shadow: none;
        font-weight: 600;
        font-size: 13px;
+       line-height: normal; /* IE8-IE11 need this for buttons */
+       color: #0073aa; /* some of these controls are button elements and don't inherit from links */
+       cursor: pointer;
+       outline: 0;
 }
 
 .wrap .add-new-h2:hover, /* deprecated */
@@ -617,6 +615,11 @@ code {
        color: #fff;
 }
 
+/* lower specificity: color needs to be overridden by :hover and :active */
+.page-title-action:focus {
+       color: #124964;
+}
+
 .wrap .page-title-action:focus {
        border-color: #5b9dd9;
        -webkit-box-shadow: 0 0 2px rgba( 30, 140, 190, 0.8 );
@@ -1063,7 +1066,7 @@ th.action-links {
        line-height: 1;
        text-align: center;
        text-decoration: inherit;
-       font-weight: normal;
+       font-weight: 400;
        font-style: normal;
        -webkit-font-smoothing: antialiased;
 }
@@ -1305,6 +1308,10 @@ div.error {
        padding: 1px 12px;
 }
 
+div[class="update-message"] { /* back-compat for pre-4.6 */
+       padding: 0.5em 0 0.5em 12px;
+}
+
 .notice p,
 .notice-title,
 div.updated p,
@@ -1404,6 +1411,21 @@ div.error {
        background-color: #e5f5fa;
 }
 
+.update-message p:before,
+.updating-message p:before,
+.updated-message p:before,
+.import-php .updating-message:before,
+.button.updating-message:before,
+.button.updated-message:before,
+.button.installed:before,
+.button.installing:before {
+       display: inline-block;
+       font: normal 20px/1 'dashicons';
+       -webkit-font-smoothing: antialiased;
+       -moz-osx-font-smoothing: grayscale;
+       vertical-align: top;
+}
+
 .wrap .notice,
 .wrap div.updated,
 .wrap div.error,
@@ -1412,6 +1434,45 @@ div.error {
        margin: 5px 0 15px;
 }
 
+/* Update icon. */
+.update-message p:before,
+.updating-message p:before,
+.import-php .updating-message:before,
+.button.updating-message:before,
+.button.installing:before {
+       color: #f56e28;
+       content: "\f463";
+}
+
+/* Spins the update icon. */
+.updating-message p:before,
+.import-php .updating-message:before,
+.button.updating-message:before,
+.button.installing:before {
+       -webkit-animation: rotation 2s infinite linear;
+       animation: rotation 2s infinite linear;
+}
+
+/* Updated icon (check mark). */
+.updated-message p:before,
+.installed p:before,
+.button.updated-message:before {
+       color: #79ba49;
+       content: '\f147';
+}
+
+/* Error icon. */
+.update-message.notice-error p:before {
+        color: #dc3232;
+        content: "\f534";
+}
+
+.wrap .notice p:before,
+.import-php .updating-message:before {
+       margin-left: 6px;
+       vertical-align: bottom;
+}
+
 #update-nag,
 .update-nag {
        display: inline-block;
@@ -1426,10 +1487,6 @@ div.error {
        box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
 }
 
-.update-message {
-       color: #000;
-}
-
 ul#dismissed-updates {
        display: none;
 }
@@ -1461,6 +1518,50 @@ form.upgrade .hint {
        margin-right: 2em;
 }
 
+.button.updating-message:before,
+.button.updated-message:before,
+.button.installed:before,
+.button.installing:before {
+       margin: 3px -2px 0 5px;
+}
+
+.button-primary.updating-message:before {
+       color: #fff;
+}
+
+.button-primary.updated-message:before {
+       color: #66c6e4;
+}
+
+.button.updated-message,
+.notice .button-link {
+       -webkit-transition-property: border, background, color;
+       transition-property: border, background, color;
+       -webkit-transition-duration: .05s;
+       transition-duration: .05s;
+       -webkit-transition-timing-function: ease-in-out;
+       transition-timing-function: ease-in-out;
+}
+
+.notice .button-link {
+       color: #0073aa;
+}
+
+.notice .button-link:hover,
+.notice .button-link:active {
+       color: #00a0d2;
+}
+
+@media aural {
+       .wrap .notice p:before,
+       .button.installing:before,
+       .button.installed:before,
+       .update-message p:before {
+               speak: none;
+       }
+}
+
+
 /* @todo: this does not need its own section anymore */
 /*------------------------------------------------------------------------------
   6.0 - Admin Header
@@ -1774,7 +1875,7 @@ html.wp-toolbar {
 .widefat th,
 .widefat thead td,
 .widefat tfoot td {
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .widefat thead tr th,
@@ -1798,6 +1899,11 @@ html.wp-toolbar {
        margin: 0.6em 0;
 }
 
+.widefat .column-comment ul {
+       list-style: initial;
+       margin-right: 2em;
+}
+
 /* Screens with postboxes */
 .postbox-container {
        float: right;
@@ -1876,7 +1982,7 @@ html.wp-toolbar {
 
 .hndle a {
        font-size: 11px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .postbox .handlediv {
@@ -2095,7 +2201,8 @@ h3.nav-tab-wrapper {
        margin: 4px 10px 0;
 }
 
-.spinner.is-active {
+.spinner.is-active,
+.loading-content .spinner {
        visibility: visible;
 }
 
@@ -2172,13 +2279,45 @@ body.iframe {
        display: block;
 }
 
+.importers {
+       font-size: 16px;
+       width: auto;
+}
+
 .importers td {
        padding-left: 14px;
+       line-height: 1.5em;
 }
 
-.importers {
-       font-size: 16px;
-       width: auto;
+.importers .import-system {
+       max-width: 250px;
+}
+
+.importers td.desc {
+       max-width: 500px;
+}
+
+.importer-title,
+.importer-desc,
+.importer-action {
+       display: block;
+}
+
+.importer-title {
+       color: #000;
+       font-size: 14px;
+       font-weight: 400;
+       margin-bottom: .2em;
+}
+
+.importer-action {
+       line-height: 20px; /* Same as with .updating-message */
+       color: #ddd;
+       margin-bottom: 1em;
+}
+
+.not-installed-main-site .importer-action {
+       color: #555;
 }
 
 #post-body #post-body-content #namediv h3, /* Back-compat for pre-4.4 */
@@ -2286,7 +2425,7 @@ div.star-holder .star-rating {
        line-height: 1;
        font-family: dashicons;
        text-decoration: inherit;
-       font-weight: normal;
+       font-weight: 400;
        font-style: normal;
        vertical-align: top;
        -webkit-transition: color .1s ease-in 0;
@@ -2314,7 +2453,7 @@ div.star-holder .star-rating {
 }
 
 div.action-links {
-       font-weight: normal;
+       font-weight: 400;
        margin: 6px 0 0;
 }
 
@@ -2362,7 +2501,7 @@ div.action-links {
 
 #plugin-information-title h2 {
        font-size: 1em;
-       font-weight: bold;
+       font-weight: 600;
        padding: 0;
        margin: 0;
        max-width: 680px;
@@ -2408,7 +2547,8 @@ div.action-links {
        position: relative;
        left: 0;
        right: 0;
-       height: 36px;
+       min-height: 36px;
+       font-size: 0;
        z-index: 1;
        border-bottom: 1px solid #ddd;
        background: #f3f3f3;
@@ -2416,7 +2556,7 @@ div.action-links {
 
 #plugin-information-tabs a {
        position: relative;
-       float: right;
+       display: inline-block;
        padding: 9px 10px;
        margin: 0;
        height: 18px;
@@ -2428,7 +2568,7 @@ div.action-links {
 }
 
 #plugin-information-tabs a.current {
-       margin: 0 -1px 0;
+       margin: 0 -1px -1px;
        background: #fff;
        border: 1px solid #ddd;
        border-bottom-color: #fff;
@@ -2500,7 +2640,7 @@ div.action-links {
 }
 
 #plugin-information .fyi h3 {
-       font-weight: bold;
+       font-weight: 600;
        text-transform: uppercase;
        font-size: 12px;
        color: #666;
@@ -2888,7 +3028,8 @@ img {
 
 /* Metabox collapse arrow indicators */
 .js .sidebar-name .sidebar-name-arrow:before,
-.js .meta-box-sortables .postbox .toggle-indicator:before {
+.js .meta-box-sortables .postbox .toggle-indicator:before,
+.bulk-action-notice .toggle-indicator:before {
        content: "\f142";
        display: inline-block;
        font: normal 20px/1 dashicons;
@@ -2899,7 +3040,8 @@ img {
 }
 
 .js .widgets-holder-wrap.closed .sidebar-name-arrow:before,
-.js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before {
+.js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before,
+.bulk-action-notice .bulk-action-errors-collapsed .toggle-indicator:before {
        content: "\f140";
 }
 
@@ -2929,6 +3071,12 @@ img {
        text-indent: 1px; /* account for the dashicon alignment */
 }
 
+.bulk-action-notice .toggle-indicator:before {
+       line-height: 16px;
+       vertical-align: top;
+       color: #72777c;
+}
+
 .js .postbox .handlediv:focus {
        -webkit-box-shadow: none;
        box-shadow: none;
@@ -3010,7 +3158,7 @@ img {
 
 #templateside .highlight {
        border: none;
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .nonessential {
@@ -3361,53 +3509,6 @@ img {
 /* =Media Queries
 -------------------------------------------------------------- */
 
-/* @todo: de-duplication */
-@media only screen and (min-width: 769px) {
-       /* categories */
-       #col-left {
-               width: 35%;
-       }
-
-       #col-right {
-               width: 65%;
-       }
-}
-
-@media only screen and (max-width: 860px) {
-
-       /* categories */
-       #col-left {
-               width: 35%;
-       }
-
-       #col-right {
-               width: 65%;
-       }
-}
-
-@media only screen and (min-width: 980px) {
-
-       /* categories */
-       #col-left {
-               width: 35%;
-       }
-
-       #col-right {
-               width: 65%;
-       }
-}
-
-@media only screen and (max-width: 768px) {
-       /* categories */
-       #col-left {
-               width: 100%;
-       }
-
-       #col-right {
-               width: 100%;
-       }
-}
-
 /**
  * HiDPI Displays
  */
@@ -3476,7 +3577,15 @@ img {
                margin-right: 0;
        }
 
-       .col-wrap {
+       /* categories */
+       #col-left,
+       #col-right {
+               float: none;
+               width: auto;
+       }
+
+       #col-left .col-wrap,
+       #col-right .col-wrap {
                padding: 0;
        }
 
index 5157b6aec4b3b558c44138fa4d2eb9851eec7c41..139b6b626284f0b5ead702296fbac3c374e1d396 100644 (file)
@@ -1,8 +1,8 @@
-#docs-list,#plugin-information .section,#template textarea,.code,.ltr,code{direction:ltr}#wpwrap{height:auto;min-height:100%;width:100%;position:relative;-webkit-font-smoothing:subpixel-antialiased}#wpcontent{height:100%;padding-right:20px}#wpcontent,#wpfooter{margin-right:160px}.folded #wpcontent,.folded #wpfooter{margin-right:36px}#wpbody-content{padding-bottom:65px;float:right;width:100%;overflow:visible!important}.inner-sidebar{float:left;clear:left;display:none;width:281px;position:relative}.columns-2 .inner-sidebar{margin-left:auto;width:286px;display:block}.columns-2 .inner-sidebar #side-sortables,.inner-sidebar #side-sortables{min-height:300px;width:280px;padding:0}.has-right-sidebar .inner-sidebar{display:block}.has-right-sidebar #post-body{float:right;clear:right;width:100%;margin-left:-2000px}.has-right-sidebar #post-body-content{margin-left:300px;float:none;width:auto}#col-container,#col-left,#col-right{overflow:hidden;padding:0;margin:0}#col-left{width:35%}#col-right{float:left;clear:left;width:65%}.col-wrap{padding:0 7px}.alignleft{float:right}.alignright{float:left}#publishing-action .spinner,#save-post,.subsubsub{float:right}.textleft{text-align:right}.textright{text-align:left}.clear{clear:both}.wp-clearfix:after{content:"";display:table;clear:both}.screen-reader-text,.screen-reader-text span,.ui-helper-hidden-accessible{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0;word-wrap:normal!important}#templateside,.misc-pub-filename,.pre,.widefat *{word-wrap:break-word}.screen-reader-shortcut{position:absolute;top:-1000em}.screen-reader-shortcut:focus{right:6px;top:-25px;height:auto;width:auto;display:block;font-size:14px;font-weight:600;padding:15px 23px 14px;background:#f1f1f1;color:#0073aa;z-index:100000;line-height:normal;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,.6);box-shadow:0 0 2px 2px rgba(0,0,0,.6);text-decoration:none;outline:0}.hidden,.js .closed .inside,.js .hide-if-js,.js .wp-core-ui .hide-if-js,.js.wp-core-ui .hide-if-js,.no-js .hide-if-no-js,.no-js .wp-core-ui .hide-if-no-js,.no-js.wp-core-ui .hide-if-no-js{display:none}#menu-management .menu-edit,#menu-settings-column .accordion-container,.comment-ays,.feature-filter,.imgedit-group,.manage-menus,.menu-item-handle,.popular-tags,.stuffbox,.widget-inside,.widget-top,.widgets-holder-wrap,.wp-editor-container,p.popular-tags,table.widefat{border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.comment-ays,.feature-filter,.imgedit-group,.popular-tags,.stuffbox,.widgets-holder-wrap,.wp-editor-container,p.popular-tags,table.widefat{background:#fff}body,html{height:100%;margin:0;padding:0}html{background:#f1f1f1}body{color:#444;font-family:"Open Sans",sans-serif;font-size:13px;line-height:1.4em;min-width:600px}body.iframe{min-width:0;padding-top:1px}body.modal-open{overflow:hidden}body.mobile.modal-open #wpwrap{overflow:hidden;position:fixed;height:100%}iframe,img{border:0}td{font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}a{color:#0073aa;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}a,div{outline:0}a:active,a:hover{color:#00a0d2}.wp-person a:focus .gravatar,a:focus,a:focus .media-icon img{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}h1,h2,h3{color:#23282d}.ie8 a:focus{outline:#5b9dd9 solid 1px}#adminmenu a:focus,.screen-reader-text:focus{-webkit-box-shadow:none;box-shadow:none;outline:0}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}p{font-size:13px;line-height:1.5;margin:1em 0}blockquote{margin:1em}dd,li{margin-bottom:6px}h1,h2,h3,h4,h5,h6{display:block;font-weight:600}h1{font-size:2em;margin:.67em 0}h2,h3{font-size:1.3em;margin:1em 0}.update-core-php h2{margin-top:2em}.update-messages h2,.update-php h2,h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.67em;margin:2.33em 0}ol,ul{padding:0}ul{list-style:none}ol{list-style-type:decimal;margin-right:2em}ul.ul-disc{list-style:disc}ul.ul-square{list-style:square}ol.ol-decimal{list-style:decimal}ol.ol-decimal,ul.ul-disc,ul.ul-square{margin-right:1.8em}ol.ol-decimal>li,ul.ul-disc>li,ul.ul-square>li{margin:0 0 .5em}.code,code{font-family:Consolas,Monaco,monospace;unicode-bidi:embed}code,kbd{padding:3px 5px 2px;margin:0 1px;background:#eaeaea;background:rgba(0,0,0,.07);font-size:13px}.subsubsub{list-style:none;margin:8px 0 0;padding:0;font-size:13px;color:#666}.subsubsub a{line-height:2;padding:.2em;text-decoration:none}.subsubsub a .count,.subsubsub a.current .count{color:#555d66;font-weight:400}.subsubsub a.current{font-weight:600;border:none}.subsubsub li{display:inline-block;margin:0;padding:0;white-space:nowrap}.widefat{border-spacing:0;width:100%;clear:both;margin:0}.widefat a{text-decoration:none}.widefat td,.widefat th{padding:8px 10px}.widefat thead td,.widefat thead th{border-bottom:1px solid #e1e1e1}.widefat tfoot td,.widefat tfoot th{border-top:1px solid #e1e1e1;border-bottom:none}.widefat .no-items td{border-bottom-width:0}.widefat td{vertical-align:top}.widefat td,.widefat td ol,.widefat td p,.widefat td ul{font-size:13px;line-height:1.5em}.widefat tfoot td,.widefat th,.widefat thead td{text-align:right;line-height:1.3em;font-size:14px}.updates-table td input,.widefat tfoot td input,.widefat th input,.widefat thead td input{margin:0 8px 0 0;padding:0;vertical-align:text-top}.widefat .check-column{width:2.2em;padding:6px 0 25px;vertical-align:top}.updates-table tbody td.check-column,.widefat tbody th.check-column,.widefat tfoot td.check-column,.widefat thead td.check-column{padding:11px 3px 0 0}.widefat tfoot td.check-column,.widefat thead td.check-column{padding-top:4px;vertical-align:middle}.update-php div.error,.update-php div.updated{margin-right:0}.no-js .widefat tfoot .check-column input,.no-js .widefat thead .check-column input{display:none}.column-comments,.column-links,.column-posts,.widefat .num{text-align:center}.widefat th#comments{vertical-align:middle}.wrap{margin:10px 2px 0 20px}.postbox .inside h2,.wrap [class$=icon32]+h2,.wrap h1,.wrap>h2:first-child{font-size:23px;font-weight:400;margin:0;padding:9px 0 4px 15px;line-height:29px}.subtitle{margin:0;padding-right:25px;color:#555d66;font-size:14px;font-weight:400}.wrap .add-new-h2,.wrap .add-new-h2:active,.wrap .page-title-action,.wrap .page-title-action:active{margin-right:4px;padding:4px 8px;position:relative;top:-3px;text-decoration:none;border:none;border:1px solid #ccc;-webkit-border-radius:2px;border-radius:2px;background:#f7f7f7;text-shadow:none;font-weight:600;font-size:13px}.wrap .add-new-h2:hover,.wrap .page-title-action:hover{border-color:#008EC2;background:#00a0d2;color:#fff}.ac_match,.highlight,.subsubsub a.current{color:#000}.wrap .page-title-action:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.wrap h1.long-header{padding-left:0}.wp-dialog{background-color:#fff}#available-widgets .widget-top:hover,#widgets-left .widget-in-question .widget-top,#widgets-left .widget-top:hover,.widgets-chooser ul,div#widgets-right .widget-top:hover{border-color:#999;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1)}.sorthelper{background-color:#ccf3fa}.alternate,.striped>tbody>:nth-child(odd),ul.striped>:nth-child(odd){background-color:#f9f9f9}.bar{background-color:#e8e8e8;border-left-color:#99d}.highlight{background-color:#e4f2fd}.wp-ui-primary{color:#fff;background-color:#32373c}.wp-ui-text-primary{color:#32373c}.wp-ui-highlight{color:#fff;background-color:#1e8cbe}.wp-ui-text-highlight{color:#1e8cbe}.wp-ui-notification{color:#fff;background-color:#d54e21}.wp-ui-text-notification{color:#d54e21}.wp-ui-text-icon{color:#82878c}img.emoji{display:inline!important;border:none!important;height:1em!important;width:1em!important;margin:0 .07em!important;vertical-align:-.1em!important;background:0 0!important;padding:0!important;-webkit-box-shadow:none!important;box-shadow:none!important}.filter-group,.wp-filter{position:relative;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04)}#nav-menu-footer,#nav-menu-header,#your-profile #rich_editing,.checkbox,.control-section .accordion-section-title,.menu-item-handle,.postbox .hndle,.side-info,.sidebar-name,.stuffbox .hndle,.widefat tfoot td,.widefat tfoot th,.widefat thead td,.widefat thead th,.widget .widget-top{line-height:1.4em}.menu-item-handle,.widget .widget-top{background:#fafafa;color:#23282d}.postbox .hndle,.stuffbox .hndle{border-bottom:1px solid #eee;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.quicktags,.search{background-color:#ccc;color:#000;font-size:12px}.icon32{display:none}#bulk-titles div a:before,.notice-dismiss:before,.tagchecklist span a:before,.welcome-panel .welcome-panel-close:before{background:0 0;color:#b4b9be;content:"\f153";display:block;font:400 16px/20px dashicons;speak:none;height:20px;text-align:center;width:20px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.welcome-panel .welcome-panel-close:before{margin:0}#bulk-titles div a:before,.tagchecklist span a:before{margin:1px 0}#bulk-titles div a:hover:before,.tagchecklist span a:hover:before,.welcome-panel .welcome-panel-close:focus:before,.welcome-panel .welcome-panel-close:hover:before{color:#c00}.key-labels label{line-height:24px}b,strong{font-weight:600}.pre{white-space:pre-wrap}#namediv td.first,#plugin-information-title,.nav-tab,.no-break,.star-rating{white-space:nowrap}.howto{color:#666;font-style:italic;display:block}p.install-help{margin:8px 0;font-style:italic}hr{border:0;border-top:1px solid #ddd;border-bottom:1px solid #fafafa}#all-plugins-table .plugins a.delete,#media-items a.delete,#media-items a.delete-permanently,#nav-menu-footer .menu-delete,#search-plugins-table .plugins a.delete,.plugins a.delete,.row-actions span.delete a,.row-actions span.spam a,.row-actions span.trash a,.submitbox .submitdelete{color:#a00}#all-plugins-table .plugins a.delete:hover,#media-items a.delete-permanently:hover,#media-items a.delete:hover,#nav-menu-footer .menu-delete:hover,#search-plugins-table .plugins a.delete:hover,.file-error,.plugins a.delete:hover,.row-actions .delete a:hover,.row-actions .spam a:hover,.row-actions .trash a:hover,.submitbox .submitdelete:hover,.widget-control-remove:hover,abbr.required,span.required{color:red;text-decoration:none;border:none}#major-publishing-actions{padding:10px;clear:both;border-top:1px solid #ddd;background:#f5f5f5}#delete-action{line-height:28px;vertical-align:middle;text-align:right;float:right}#publishing-action{text-align:left;float:left;line-height:23px}#misc-publishing-actions{padding:6px 0 0}.misc-pub-section{padding:6px 10px 8px}#minor-publishing-actions{padding:10px 10px 0;text-align:left}.preview{float:left}#sticky-span{margin-right:18px}.approve,.unapproved .unapprove{display:none}.spam .approve,.trash .approve,.unapproved .approve{display:inline}td.action-links,th.action-links{text-align:left}.wp-filter{display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:12px 0 25px;padding:0 10px;width:100%;box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;background:#fff;color:#555;font-size:13px}.filter-group,html.wp-toolbar{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.wp-filter a{text-decoration:none}.filter-count{display:inline-block;vertical-align:middle;min-width:4em}.filter-count .count,.title-count{display:inline-block;position:relative;top:-1px;padding:4px 10px;-webkit-border-radius:30px;border-radius:30px;background:#72777c;color:#fff;font-size:14px;font-weight:600}.title-count{display:inline;top:-3px;margin-right:5px;margin-left:20px}.filter-items{float:right}.filter-links,.filter-links li{display:inline-block;margin:0}.filter-links li>a{display:inline-block;margin:0 10px;padding:15px 0;border-bottom:4px solid #fff;color:#666;cursor:pointer}.filter-links .current{-webkit-box-shadow:none;box-shadow:none;border-bottom:4px solid #666;color:#23282d}.filter-links li>a:focus,.filter-links li>a:hover,.show-filters .filter-links a.current:focus,.show-filters .filter-links a.current:hover{color:#00a0d2}.wp-filter .search-form{float:left;margin:10px 0}.wp-filter .search-form input[type=search]{margin:0;padding:3px 5px;width:280px;max-width:100%;font-size:16px;font-weight:300;line-height:1.5}.wp-filter .search-form select{margin:0;height:32px;vertical-align:top}.wp-filter .search-form.search-plugins{display:inline-block}.wp-filter .drawer-toggle{display:inline-block;margin:0 10px;padding:4px 6px;color:#666;cursor:pointer}.wp-filter .drawer-toggle:before{display:inline-block;vertical-align:top;content:"\f111";margin:0 0 0 5px;width:16px;height:16px;color:#72777c;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;font-family:dashicons;font-size:16px;line-height:1;text-align:center;text-decoration:inherit;font-weight:400;font-style:normal;-webkit-font-smoothing:antialiased}.filter-drawer,.wp-filter .favorites-form{margin:0 -20px;padding:20px;border-top:1px solid #eee;background:#fafafa}.wp-filter .drawer-toggle:hover,.wp-filter .drawer-toggle:hover:before{color:#00a0d2}.wp-filter .drawer-toggle.current:before{color:#fff}.wp-filter .favorites-form{display:none;overflow:hidden;width:100%}.show-favorites-form .wp-filter .favorites-form{display:block}.filter-drawer{display:none}.show-filters .filter-drawer{display:block;overflow:hidden;width:100%}.show-filters .wp-filter .drawer-toggle:focus,.show-filters .wp-filter .drawer-toggle:hover{background:#2ea2cc}.show-filters .filter-links a.current{border-bottom:none}.show-filters .wp-filter .drawer-toggle{-webkit-border-radius:2px;border-radius:2px;border:none;background:#72777c;color:#fff}.filter-group,.filtered-by .tag{border:1px solid #e5e5e5;background:#fff}.show-filters .wp-filter .drawer-toggle:before{color:#fff}.filter-group{box-sizing:border-box;float:right;margin:0 0 0 1%;padding:20px 10px 10px;width:24%;box-shadow:0 1px 1px rgba(0,0,0,.04)}.filter-group legend{position:absolute;top:10px;display:block;margin:0;padding:0;font-size:1em;font-weight:600}.filter-drawer .filter-group-feature{margin:28px 0 0;list-style-type:none;font-size:12px}.filter-drawer .filter-group-feature input,.filter-drawer .filter-group-feature label{display:inline-block;margin:7px 0 7px 4px;line-height:16px}.filter-drawer .buttons{margin-bottom:20px}.filter-drawer .buttons .button span{display:inline-block;opacity:.8;font-size:12px;text-indent:10px}.wp-filter .button.clear-filters{display:none;margin-right:10px}.filtered-by{display:none;margin:0}.filtered-by>span{font-weight:600}.filtered-by a{margin-right:10px}.filtered-by .tags{display:inline}.filtered-by .tag{margin:0 5px;padding:4px 8px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);font-size:11px}.filters-applied .filter-drawer .buttons,.filters-applied .filter-drawer br,.filters-applied .filter-group{display:none!important}.filters-applied .filtered-by{display:block}.filters-applied .filter-drawer{padding:20px}.error .content-filterable,.loading-content .content-filterable,.show-filters .content-filterable,.show-filters.filters-applied.loading-content .content-filterable{display:none}.show-filters.filters-applied .content-filterable{display:block}.loading-content .spinner{display:block;margin:40px auto 0;float:none}@media only screen and (max-width:1120px){.filter-drawer{border-bottom:1px solid #eee}.filter-group{margin-bottom:0;margin-top:5px;width:100%}.filter-group li{margin:10px 0}}@media only screen and (max-width:1000px){.filter-items{float:none}.wp-filter .media-toolbar-primary,.wp-filter .media-toolbar-secondary,.wp-filter .search-form{float:none;position:relative;max-width:100%}}@media only screen and (max-width:782px){.filter-group li{padding:0;width:50%}}@media only screen and (max-width:320px){.filter-count{display:none}.wp-filter .drawer-toggle{margin:10px 0}.filter-group li,.wp-filter .search-form input[type=search]{width:100%}}.notice,div.error,div.updated{background:#fff;border-right:4px solid #fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin:5px 15px 2px;padding:1px 12px}.form-table td .notice p,.notice p,.notice-title,div.error p,div.updated p{margin:.5em 0;padding:2px}.error a{text-decoration:underline}.updated a{padding-bottom:2px}.notice-alt{-webkit-box-shadow:none;box-shadow:none}.notice-large{padding:10px 20px}.notice-title{display:inline-block;color:#23282d;font-size:18px}.wp-core-ui .notice.is-dismissible{padding-left:38px;position:relative}.notice-dismiss{position:absolute;top:0;left:1px;border:none;margin:0;padding:9px;background:0 0;color:#b4b9be;cursor:pointer}.notice-dismiss:active:before,.notice-dismiss:focus:before,.notice-dismiss:hover:before{color:#c00}.notice-dismiss:focus{outline:0;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 .notice-dismiss:focus{outline:#5b9dd9 solid 1px}.notice-success,div.updated{border-right-color:#46b450}.notice-success.notice-alt{background-color:#ecf7ed}.notice-warning{border-right-color:#ffb900}.notice-warning.notice-alt{background-color:#fff8e5}.notice-error,div.error{border-right-color:#dc3232}.notice-error.notice-alt{background-color:#fbeaea}.notice-info{border-right-color:#00a0d2}.notice-info.notice-alt{background-color:#e5f5fa}.media-upload-form .notice,.media-upload-form div.error,.wrap .notice,.wrap div.error,.wrap div.updated{margin:5px 0 15px}#update-nag,.update-nag{display:inline-block;line-height:19px;padding:11px 15px;font-size:14px;text-align:right;margin:25px 2px 0 20px;background-color:#fff;border-right:4px solid #ffba00;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}#screen-meta,ul#dismissed-updates{display:none}.update-message{color:#000}form.upgrade{margin-top:8px}form.upgrade .hint{font-style:italic;font-size:85%;margin:-.5em 0 2em}.update-php .spinner{float:none;margin:-4px 0}#ajax-loading,.ajax-feedback,.ajax-loading,.imgedit-wait-spin,.list-ajax-loading{visibility:hidden}#ajax-response.alignleft{margin-right:2em}#adminmenu a,#catlist a,#taglist a{text-decoration:none}#contextual-help-wrap,#screen-options-wrap{margin:0;padding:8px 20px 12px;position:relative}#contextual-help-wrap{overflow:auto;margin-right:0!important}#screen-meta .screen-reader-text{visibility:hidden}#screen-meta-links{margin:0 0 0 20px}#screen-meta{margin:0 0 -1px 20px;position:relative;background-color:#fff;border:1px solid #ddd;border-top:none;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.025);box-shadow:0 1px 0 rgba(0,0,0,.025)}#contextual-help-link-wrap,#screen-options-link-wrap{float:left;height:28px;margin:0 6px 0 0;border:1px solid #ddd;border-top:none;background:#fff;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1)}#screen-meta-links .screen-meta-toggle{position:relative;top:0}#screen-meta-links .show-settings{border:0;background:0 0;-webkit-border-radius:0;border-radius:0;color:#72777c;line-height:1.7;padding:3px 16px 3px 6px}#screen-meta-links .show-settings:active,#screen-meta-links .show-settings:focus,#screen-meta-links .show-settings:hover{color:#32373c}#screen-meta-links .show-settings:active{-webkit-box-shadow:none;box-shadow:none;-webkit-transform:none;-ms-transform:none;transform:none}#screen-meta-links .show-settings:after{left:0;content:"\f140";font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 0 0 5px;bottom:2px;position:relative;vertical-align:bottom;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#72777c}#templateside ul li a,#wpfooter a,.nav-tab{text-decoration:none}#screen-meta-links .screen-meta-active:after{content:"\f142"}.toggle-arrow{background-repeat:no-repeat;background-position:top left;background-color:transparent;height:22px;line-height:22px;display:block}.toggle-arrow-active{background-position:bottom left}#contextual-help-wrap h5,#screen-options-wrap h5,#screen-options-wrap legend{margin:0;padding:8px 0;font-size:13px;font-weight:600}.hndle a,.widefat tfoot td,.widefat th,.widefat thead td{font-weight:400}.ie8 #screen-options-wrap legend{color:inherit}.metabox-prefs label{display:inline-block;padding-left:15px;line-height:30px}#number-of-columns{display:inline-block;vertical-align:middle;line-height:30px}.metabox-prefs input[type=checkbox]{margin-top:0;margin-left:6px}.metabox-prefs label input,.metabox-prefs label input[type=checkbox]{margin:-4px 0 0 5px}.metabox-prefs .columns-prefs label input{margin:-1px 0 0 2px}.metabox-prefs label a{display:none}.metabox-prefs .screen-options input,.metabox-prefs .screen-options label{margin-top:0;margin-bottom:0;vertical-align:middle}.metabox-prefs .screen-options .screen-per-page{margin-left:15px}.metabox-prefs .screen-options label{line-height:28px;padding-left:0}.screen-options+.screen-options{margin-top:10px}.metabox-prefs .submit{margin-top:1em;padding:0}#contextual-help-wrap{padding:0}#contextual-help-columns{position:relative}#contextual-help-back{position:absolute;top:0;bottom:0;right:150px;left:170px;border:1px solid #e1e1e1;border-top:none;border-bottom:none;background:#f6fbfd}#contextual-help-wrap.no-sidebar #contextual-help-back{left:0;border-left-width:0;-webkit-border-bottom-left-radius:2px;border-bottom-left-radius:2px}.contextual-help-tabs{float:right;width:150px;margin:0}.contextual-help-tabs ul{margin:1em 0}.contextual-help-tabs li{margin-bottom:0;list-style-type:none;border-style:solid;border-width:0 2px 0 0;border-color:transparent}.contextual-help-tabs a{display:block;padding:5px 12px 5px 5px;line-height:18px;text-decoration:none;border:1px solid transparent;border-left:none;border-right:none}.contextual-help-tabs a:hover{color:#32373c}.contextual-help-tabs .active{padding:0;margin:0 0 0 -1px;border-right:2px solid #00a0d2;background:#f6fbfd;-webkit-box-shadow:0 2px 0 rgba(0,0,0,.02),0 1px 0 rgba(0,0,0,.02);box-shadow:0 2px 0 rgba(0,0,0,.02),0 1px 0 rgba(0,0,0,.02)}.contextual-help-tabs .active a{border-color:#e1e1e1;color:#32373c}.contextual-help-tabs-wrap{padding:0 20px;overflow:auto}.help-tab-content{display:none;margin:0 0 12px 22px;line-height:1.6em}.help-tab-content.active{display:block}.help-tab-content ul li{list-style-type:disc;margin-right:18px}.contextual-help-sidebar{width:150px;float:left;padding:0 12px 0 8px;overflow:auto}html.wp-toolbar{padding-top:32px;box-sizing:border-box}.widefat td,.widefat th{color:#555}.widefat ol,.widefat p,.widefat tfoot tr td,.widefat tfoot tr th,.widefat thead tr td,.widefat thead tr th,.widefat ul{color:#32373c}.widefat td p{margin:2px 0 .8em}.widefat .column-comment p{margin:.6em 0}.postbox-container{float:right}.postbox-container .meta-box-sortables{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wpbody-content .metabox-holder{padding-top:10px}.metabox-holder .postbox-container .empty-container{border:3px dashed #b4b9be;height:250px;position:relative}.metabox-holder .postbox-container .empty-container:after{content:attr(data-emptystring);margin:auto;position:absolute;top:0;right:0;bottom:0;left:0;height:1em;width:200px;text-align:center;color:#ccc;font-size:18px;display:none}.columns-2 #postbox-container-3 .empty-container,.columns-2 #postbox-container-4 .empty-container,.columns-3 #postbox-container-4 .empty-container,.metabox-holder.columns-1 .postbox-container .empty-container{border:0;height:0;min-height:0}#post-body-content{width:100%;min-width:463px;float:right}#post-body.columns-2 #postbox-container-1{float:left;margin-left:-300px;width:280px}#post-body.columns-2 #side-sortables{min-height:250px}@media only screen and (max-width:799px){#wpbody-content .metabox-holder .postbox-container .empty-container{border:0;height:0;min-height:0}}.js .postbox .hndle,.js .widget .widget-top{cursor:move}.hndle a{font-size:11px}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover,#dashboard_right_now .versions .b,#ed_reply_toolbar #ed_reply_strong,#pass-strength-result.short,#pass-strength-result.strong,#post-status-display,#post-visibility-display,.edit-comment-author,.feature-filter .feature-name,.item-controls .item-order a,.media-item .percent,.nav-tab,.plugins .name{font-weight:600}.postbox .handlediv{display:none;float:left;width:36px;height:36px;padding:0}.js .postbox .handlediv{display:block}.sortable-placeholder{border:1px dashed #b4b9be;margin-bottom:20px}.postbox,.stuffbox{margin-bottom:20px;padding:0;line-height:1}.postbox .inside,.stuffbox .inside{padding:0 12px 12px;line-height:1.4em;font-size:13px}.postbox .inside{margin:11px 0;position:relative}.postbox .inside>p:last-child,.rss-widget ul li:last-child{margin-bottom:1px!important}.postbox.closed h3{border:none;-webkit-box-shadow:none;box-shadow:none}.postbox table.form-table{margin-bottom:0}.postbox table.widefat{-webkit-box-shadow:none;box-shadow:none}.temp-border{border:1px dotted #ccc}.columns-prefs label{padding:0 0 0 10px}#wpfooter{position:absolute;bottom:0;right:0;left:0;padding:10px 20px;color:#555d66}#wpfooter p{font-size:13px;margin:0;line-height:20px}#footer-thankyou{font-style:italic}#wpfooter a:hover{text-decoration:underline}.nav-tab{float:right;border:1px solid #ccc;border-bottom:none;margin-right:.5em;padding:5px 10px;font-size:14px;line-height:24px;background:#e5e5e5;color:#555}.nav-tab-small .nav-tab,h3 .nav-tab{padding:5px 14px;font-size:12px;line-height:16px}.nav-tab:focus,.nav-tab:hover{background-color:#fff;color:#444}.nav-tab-active,.nav-tab:focus:active{-webkit-box-shadow:none;box-shadow:none}.nav-tab-active{margin-bottom:-1px;color:#444}.nav-tab-active,.nav-tab-active:focus,.nav-tab-active:focus:active,.nav-tab-active:hover{border-bottom:1px solid #f1f1f1;background:#f1f1f1;color:#000}.wrap h2.nav-tab-wrapper,h1.nav-tab-wrapper,h3.nav-tab-wrapper{border-bottom:1px solid #ccc;margin:0;padding-top:9px;padding-bottom:0;line-height:inherit}.nav-tab-wrapper:not(.wp-clearfix):after{content:"";display:table;clear:both}.ie8 .nav-tab-wrapper{display:inline-block;width:100%;vertical-align:top}.spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;display:inline-block;visibility:hidden;float:left;vertical-align:middle;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:4px 10px 0}.spinner.is-active{visibility:visible}#template div{margin-left:190px}.metabox-holder .postbox>h3,.metabox-holder .stuffbox>h3,.metabox-holder h2.hndle,.metabox-holder h3.hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}.nav-menus-php .metabox-holder h3{padding:10px 14px 11px 10px;line-height:21px}.plugin-install #description,.plugin-install-network #description{width:60%}table .column-rating,table .column-visible,table .vers{text-align:right}.attention,.error-message{color:red;font-weight:600}body.iframe{height:98%}.lp-show-latest p{display:none}.lp-show-latest .lp-error p,.lp-show-latest p:last-child{display:block}.media-icon{width:62px;text-align:center}.media-icon img{border:1px solid #e5e5e5;border:1px solid rgba(0,0,0,.07)}#howto{font-size:11px;margin:0 5px;display:block}.post-categories,.post-categories li{display:inline}.importers td{padding-left:14px}.importers{font-size:16px;width:auto}#post-body #post-body-content #namediv h2,#post-body #post-body-content #namediv h3{margin-top:0}.edit-comment-author{font-size:14px;line-height:1.4;color:#222;margin:2px 9px 0 0}#namediv h2 label,#namediv h3 label{vertical-align:baseline}#namediv table{width:100%}#namediv td.first{width:10px}#namediv input{width:98%}#namediv p{margin:10px 0}#submitdiv h3{margin-bottom:0!important}.checkbox,.post-categories,.zerosize,fieldset{margin:0;padding:0}.zerosize{height:0;width:0;border:0;overflow:hidden;position:absolute}br.clear{height:2px;line-height:2px}.checkbox{border:none}fieldset{border:0}div.star-holder{position:relative;height:17px;width:100px;background:url(../images/stars.png?ver=20121108) bottom left repeat-x}div.star-holder .star-rating{background:url(../images/stars.png?ver=20121108) top left repeat-x;height:17px;float:right}.star-rating .star{display:inline-block;width:20px;height:20px;-webkit-font-smoothing:antialiased;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;vertical-align:top;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;text-align:center;color:#ffb900}.star-rating .star-full:before{content:"\f155"}.star-rating .star-half:before{content:"\f459"}.rtl .star-rating .star-half{-webkit-transform:rotateY(180deg);-ms-transform:rotateY(180deg);transform:rotateY(180deg)}.star-rating .star-empty:before{content:"\f154"}div.action-links{font-weight:400;margin:6px 0 0}#plugin-information{background:#fff;position:fixed;top:0;left:0;bottom:0;right:0;height:100%;padding:0}#plugin-information-scrollable{overflow:auto;-webkit-overflow-scrolling:touch;height:100%}#plugin-information-title{padding:0 20px;background:#f5f5f5;font-size:22px;font-weight:600;line-height:56px;position:relative;top:0;left:0;right:0;height:56px;overflow:hidden;text-overflow:ellipsis}#plugin-information-title.with-banner{margin-left:0;height:250px;bottom:250px;-webkit-background-size:cover;background-size:cover}#plugin-information-title h2{font-size:1em;font-weight:700;padding:0;margin:0;max-width:680px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#plugin-information-title.with-banner h2{font-family:"Helvetica Neue",sans-serif;display:inline-block;font-size:30px;line-height:50px;padding:0 15px;margin:174px 10px 0 0;color:#fff;background:rgba(30,30,30,.9);text-shadow:0 1px 3px rgba(0,0,0,.4);-webkit-box-shadow:0 0 30px rgba(255,255,255,.1);box-shadow:0 0 30px rgba(255,255,255,.1);-webkit-border-radius:8px;border-radius:8px}#plugin-information-title div.vignette{display:none}#plugin-information-title.with-banner div.vignette{display:block;float:left;top:0;height:250px;width:772px;margin:0 -20px;background:0 0;-webkit-box-shadow:inset 0 0 50px 4px rgba(0,0,0,.2),inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 0 50px 4px rgba(0,0,0,.2),inset 0 -1px 0 rgba(0,0,0,.1)}#plugin-information-tabs{padding:0 16px;position:relative;left:0;right:0;height:36px;z-index:1;border-bottom:1px solid #ddd;background:#f3f3f3}#plugin-information-tabs a{position:relative;float:right;padding:9px 10px;margin:0;height:18px;line-height:18px;font-size:14px;text-decoration:none;-webkit-transition:none;transition:none}#plugin-information-tabs a.current{margin:0 -1px;background:#fff;border:1px solid #ddd;border-bottom-color:#fff;padding-top:8px;color:#32373c}#plugin-information-tabs.with-banner a.current{border-top:none;padding-top:9px}#plugin-information-tabs a:active,#plugin-information-tabs a:focus{outline:0}#plugin-information-content{overflow:hidden;background:#fff;position:relative;top:0;left:0;right:0;min-height:100%;min-height:-webkit-calc(100% - 152px);min-height:calc(100% - 152px)}#plugin-information-content.with-banner{min-height:-webkit-calc(100% - 346px);min-height:calc(100% - 346px)}#section-holder{position:relative;top:0;left:250px;bottom:0;right:0;margin-left:250px;padding:10px 26px 99999px;margin-bottom:-99939px}#section-holder .updated{margin:16px 0}#plugin-information .fyi{float:left;position:relative;top:0;left:0;padding:16px 16px 99999px;margin-bottom:-99939px;width:217px;border-right:1px solid #ddd;background:#f3f3f3;color:#666}#plugin-information .fyi strong{color:#444}#plugin-information .fyi h3{font-weight:700;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}#plugin-information .fyi h2{font-size:.9em;margin-bottom:0;margin-left:0}#plugin-information .fyi ul{padding:0;margin:0;list-style:none}#plugin-information .fyi li{margin:0 0 10px}#plugin-information .fyi-description{margin-top:0}#plugin-information .counter-container{margin:3px 0}#plugin-information .counter-label{float:right;margin-left:5px;min-width:55px}#plugin-information .counter-back{height:17px;width:92px;background-color:#e5e5e5;float:right}#plugin-information .counter-bar{height:17px;background-color:#ffc733;float:right}#plugin-information .counter-count{margin-right:5px}#plugin-information .fyi ul.contributors{margin-top:10px}#plugin-information .fyi ul.contributors li{display:inline-block;margin-left:8px;vertical-align:middle}#plugin-information .fyi ul.contributors li img{vertical-align:middle;margin-left:4px}#plugin-information-footer{padding:13px 16px;position:absolute;left:0;bottom:0;right:0;height:33px;border-top:1px solid #ddd;background:#f3f3f3}#plugin-information .section ol,#plugin-information .section ul{list-style-type:disc;margin-left:24px}#plugin-information .section,#plugin-information .section p{font-size:14px;line-height:1.7}#plugin-information #section-screenshots ol{list-style:none;margin:0}#plugin-information #section-screenshots li img{vertical-align:text-top;margin-top:16px;max-width:100%;width:auto;height:auto;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}#plugin-information #section-screenshots li p{font-style:italic;padding-left:20px}#plugin-information pre{padding:7px;overflow:auto;border:1px solid #ccc}#plugin-information .review{overflow:hidden;width:100%;margin-bottom:20px;border-bottom:1px solid #e5e5e5}#plugin-information .review-title-section{overflow:hidden}#plugin-information .review-title-section h4{display:inline-block;float:left;margin:0 6px 0 0}#plugin-information .reviewer-info p{clear:both;margin:0;padding-top:2px}#plugin-information .reviewer-info .avatar{float:left;margin:4px 6px 0 0}#plugin-information .reviewer-info .star-rating{float:left}#plugin-information .review-meta{float:left;margin-left:.75em}#plugin-information .review-body{float:left;width:100%}.plugin-version-author-uri{font-size:13px}@media screen and (max-width:771px){#plugin-information-title.with-banner{height:100px;bottom:100px}#plugin-information-title.with-banner h2{margin-top:30px;font-size:20px;line-height:40px;max-width:85%}#plugin-information-title.with-banner div.vignette{height:100px;bottom:100px;width:800%}#plugin-information-tabs{overflow:hidden;padding:0;height:auto}#plugin-information-tabs a.current{margin-bottom:0;border-bottom:none}#plugin-information .fyi{float:none;border:1px solid #ddd;position:static;width:auto;margin:26px 26px 0;padding-bottom:0}#section-holder{position:static;margin:0;padding-bottom:70px}#plugin-information .fyi h3,#plugin-information .fyi small{display:none}#plugin-information-footer{padding:12px 16px 0;height:46px}}body.about-php #TB_window,body.import-php #TB_window,body.index-php #TB_window,body.plugin-install-php #TB_window,body.plugins-php #TB_window,body.update-core-php #TB_window{background:#fcfcfc}.ie8 body.about-php #TB_window:before,.ie8 body.import-php #TB_window:before,.ie8 body.index-php #TB_window:before,.ie8 body.plugin-install-php #TB_window:before,.ie8 body.plugins-php #TB_window:before,.ie8 body.update-core-php #TB_window:before{content:" ";background:0 0}body.about-php #TB_window.thickbox-loading:before,body.import-php #TB_window.thickbox-loading:before,body.index-php #TB_window.thickbox-loading:before,body.plugin-install-php #TB_window.thickbox-loading:before,body.plugins-php #TB_window.thickbox-loading:before,body.update-core-php #TB_window.thickbox-loading:before{content:"";display:block;width:20px;height:20px;position:absolute;right:50%;top:50%;z-index:-1;margin:-10px -10px 0 0;background:url(../images/spinner.gif) center no-repeat #fcfcfc;-webkit-background-size:20px 20px;background-size:20px 20px;-webkit-transform:translateZ(0);transform:translateZ(0)}body.about-php #TB_ajaxWindowTitle,body.about-php .tb-close-icon,body.import-php #TB_ajaxWindowTitle,body.import-php .tb-close-icon,body.index-php #TB_ajaxWindowTitle,body.index-php .tb-close-icon,body.plugin-install-php #TB_ajaxWindowTitle,body.plugin-install-php .tb-close-icon,body.plugins-php #TB_ajaxWindowTitle,body.plugins-php .tb-close-icon,body.update-core-php #TB_ajaxWindowTitle,body.update-core-php .tb-close-icon{display:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){body.about-php #TB_window.thickbox-loading:before,body.import-php #TB_window.thickbox-loading:before,body.index-php #TB_window.thickbox-loading:before,body.plugin-install-php #TB_window.thickbox-loading:before,body.plugins-php #TB_window.thickbox-loading:before,body.update-core-php #TB_window.thickbox-loading:before{background-image:url(../images/spinner-2x.gif)}}body.about-php #TB_title,body.import-php #TB_title,body.index-php #TB_title,body.plugin-install-php #TB_title,body.plugins-php #TB_title,body.update-core-php #TB_title{float:right;height:1px}.about-php #TB_closeWindowButton,.import-php #TB_closeWindowButton,.index-php #TB_closeWindowButton,.plugin-install-php #TB_closeWindowButton,.plugins-php #TB_closeWindowButton,.update-core-php #TB_closeWindowButton{right:auto;left:-30px;color:#eee}body.about-php #TB_closeWindowButton:focus,body.about-php #TB_closeWindowButton:hover,body.import-php #TB_closeWindowButton:focus,body.import-php #TB_closeWindowButton:hover,body.index-php #TB_closeWindowButton:focus,body.index-php #TB_closeWindowButton:hover,body.plugin-install-php #TB_closeWindowButton:focus,body.plugin-install-php #TB_closeWindowButton:hover,body.plugins-php #TB_closeWindowButton:focus,body.plugins-php #TB_closeWindowButton:hover,body.update-core-php #TB_closeWindowButton:focus,body.update-core-php #TB_closeWindowButton:hover{color:#00a0d2;outline:0;-webkit-box-shadow:none;box-shadow:none}body.about-php #TB_closeWindowButton:after,body.import-php #TB_closeWindowButton:after,body.index-php #TB_closeWindowButton:after,body.plugin-install-php #TB_closeWindowButton:after,body.plugins-php #TB_closeWindowButton:after,body.update-core-php #TB_closeWindowButton:after{content:"\f335";font:400 32px/29px dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media screen and (max-width:830px){body.about-php #TB_closeWindowButton,body.import-php #TB_closeWindowButton,body.index-php #TB_closeWindowButton,body.plugin-install-php #TB_closeWindowButton,body.plugins-php #TB_closeWindowButton,body.update-core-php #TB_closeWindowButton{left:0;top:-30px}}img{border:none}.js .meta-box-sortables .postbox .toggle-indicator:before,.js .sidebar-name .sidebar-name-arrow:before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before,.js .widgets-holder-wrap.closed .sidebar-name-arrow:before{content:"\f140"}.js .sidebar-name .sidebar-name-arrow:before{padding:10px;right:0}.js #widgets-left .sidebar-name .sidebar-name-arrow{display:none}.accordion-section.open .accordion-section-content,.js #widgets-left .sidebar-name:hover .sidebar-name-arrow,.js #widgets-left .widgets-holder-wrap.closed .sidebar-name .sidebar-name-arrow,.no-js .accordion-section .accordion-section-content{display:block}.js .postbox .handlediv .toggle-indicator:before{margin-top:4px;width:20px;-webkit-border-radius:50%;border-radius:50%;text-indent:-1px}#postcustomstuff p.submit,#templateside h2,.alignleft h2{margin:0}.rtl.js .postbox .handlediv .toggle-indicator:before{text-indent:1px}.js .postbox .handlediv:focus{-webkit-box-shadow:none;box-shadow:none;outline:0}.js .postbox .handlediv:focus .toggle-indicator:before{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#photo-add-url-div input[type=text]{width:300px}#template textarea{font-family:Consolas,Monaco,monospace;font-size:13px;width:97%;background:#f9f9f9;outline:0}#template p{width:97%}#templateside{float:left;width:190px}#templateside h4{margin:1em 0 0}#templateside ol,#templateside ul{margin:.5em 0;padding:0}#templateside li{margin:4px 0}#templateside li a,.theme-editor-php .highlight{display:block;padding:3px 12px 3px 3px;text-decoration:none}.theme-editor-php .highlight{margin:-3px -12px -3px 3px}#templateside .highlight{border:none;font-weight:700}.nonessential{color:#666;font-size:11px;font-style:italic;padding-right:12px}#documentation{margin-top:10px}#documentation label{line-height:22px;vertical-align:baseline;font-weight:600}.fileedit-sub{padding:10px 0 8px;line-height:180%}.accordion-section-title:after,.control-section .accordion-section-title:after,.nav-menus-php .item-edit:before,.widget-top a.widget-action:after{left:0;content:"\f140";border:none;background:0 0;font:400 20px/1 dashicons;speak:none;display:block;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.accordion-section-title:after,.handlediv,.item-edit,.sidebar-name-arrow{color:#72777c}.widget-action{color:#555d66}.accordion-section-title:hover:after,.handlediv:focus,.handlediv:hover,.item-edit:focus,.item-edit:hover,.sidebar-name:hover .sidebar-name-arrow,.widget-action:focus,.widget-top:hover .widget-action{color:#23282d}.widget-top a.widget-action:after{padding:1px 0 1px 2px;margin-top:10px;margin-left:10px;-webkit-border-radius:50%;border-radius:50%}.widget-top a.widget-action:focus:after{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.accordion-section-title:after,.control-section .accordion-section-title:after{float:left;left:20px;top:-2px}#customize-info.open .accordion-section-title:after,.control-section.open .accordion-section-title:after,.nav-menus-php .menu-item-edit-active .item-edit:before,.widget.open .widget-top a.widget-action:after{content:"\f142"}/*!
+#docs-list,#plugin-information .section,#template textarea,.code,.ltr,code{direction:ltr}#wpwrap{height:auto;min-height:100%;width:100%;position:relative;-webkit-font-smoothing:subpixel-antialiased}#wpcontent{height:100%;padding-right:20px}#wpcontent,#wpfooter{margin-right:160px}.folded #wpcontent,.folded #wpfooter{margin-right:36px}#wpbody-content{padding-bottom:65px;float:right;width:100%;overflow:visible!important}.inner-sidebar{float:left;clear:left;display:none;width:281px;position:relative}.columns-2 .inner-sidebar{margin-left:auto;width:286px;display:block}.columns-2 .inner-sidebar #side-sortables,.inner-sidebar #side-sortables{min-height:300px;width:280px;padding:0}.has-right-sidebar .inner-sidebar{display:block}.has-right-sidebar #post-body{float:right;clear:right;width:100%;margin-left:-2000px}.has-right-sidebar #post-body-content{margin-left:300px;float:none;width:auto}#col-left{float:right;width:35%}#col-right{float:left;width:65%}#col-left .col-wrap{padding:0 0 0 6px}#col-right .col-wrap{padding:0 6px 0 0}.alignleft{float:right}.alignright{float:left}#publishing-action .spinner,#save-post,.subsubsub{float:right}.textleft{text-align:right}.textright{text-align:left}.clear{clear:both}.wp-clearfix:after{content:"";display:table;clear:both}.screen-reader-text,.screen-reader-text span,.ui-helper-hidden-accessible{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0;word-wrap:normal!important}#templateside,.misc-pub-filename,.pre,.widefat *{word-wrap:break-word}.screen-reader-shortcut{position:absolute;top:-1000em}.screen-reader-shortcut:focus{right:6px;top:-25px;height:auto;width:auto;display:block;font-size:14px;font-weight:600;padding:15px 23px 14px;background:#f1f1f1;color:#0073aa;z-index:100000;line-height:normal;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,.6);box-shadow:0 0 2px 2px rgba(0,0,0,.6);text-decoration:none;outline:0}.hidden,.js .closed .inside,.js .hide-if-js,.js .wp-core-ui .hide-if-js,.js.wp-core-ui .hide-if-js,.no-js .hide-if-no-js,.no-js .wp-core-ui .hide-if-no-js,.no-js.wp-core-ui .hide-if-no-js{display:none}#menu-management .menu-edit,#menu-settings-column .accordion-container,.comment-ays,.feature-filter,.imgedit-group,.manage-menus,.menu-item-handle,.popular-tags,.stuffbox,.widget-inside,.widget-top,.widgets-holder-wrap,.wp-editor-container,p.popular-tags,table.widefat{border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.comment-ays,.feature-filter,.imgedit-group,.popular-tags,.stuffbox,.widgets-holder-wrap,.wp-editor-container,p.popular-tags,table.widefat{background:#fff}body,html{height:100%;margin:0;padding:0}body{background:#f1f1f1;color:#444;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:1.4em;min-width:600px}body.iframe{min-width:0;padding-top:1px}body.modal-open{overflow:hidden}body.mobile.modal-open #wpwrap{overflow:hidden;position:fixed;height:100%}iframe,img{border:0}td{font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}a{color:#0073aa;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}a,div{outline:0}a:active,a:hover{color:#00a0d2}.wp-person a:focus .gravatar,a:focus,a:focus .media-icon img{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}h1,h2,h3{color:#23282d}.ie8 a:focus{outline:#5b9dd9 solid 1px}#adminmenu a:focus,.screen-reader-text:focus{-webkit-box-shadow:none;box-shadow:none;outline:0}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}p{font-size:13px;line-height:1.5;margin:1em 0}blockquote{margin:1em}dd,li{margin-bottom:6px}h1,h2,h3,h4,h5,h6{display:block;font-weight:600}h1{font-size:2em;margin:.67em 0}h2,h3{font-size:1.3em;margin:1em 0}.update-core-php h2{margin-top:2em}.update-messages h2,.update-php h2,h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.67em;margin:2.33em 0}ol,ul{padding:0}ul{list-style:none}ol{list-style-type:decimal;margin-right:2em}ul.ul-disc{list-style:disc}ul.ul-square{list-style:square}ol.ol-decimal{list-style:decimal}ol.ol-decimal,ul.ul-disc,ul.ul-square{margin-right:1.8em}ol.ol-decimal>li,ul.ul-disc>li,ul.ul-square>li{margin:0 0 .5em}.code,code{font-family:Consolas,Monaco,monospace;unicode-bidi:embed}code,kbd{padding:3px 5px 2px;margin:0 1px;background:#eaeaea;background:rgba(0,0,0,.07);font-size:13px}.subsubsub{list-style:none;margin:8px 0 0;padding:0;font-size:13px;color:#666}.subsubsub a{line-height:2;padding:.2em;text-decoration:none}.subsubsub a .count,.subsubsub a.current .count{color:#555d66;font-weight:400}.subsubsub a.current{font-weight:600;border:none}.subsubsub li{display:inline-block;margin:0;padding:0;white-space:nowrap}.widefat{border-spacing:0;width:100%;clear:both;margin:0}.widefat a{text-decoration:none}.widefat td,.widefat th{padding:8px 10px}.widefat thead td,.widefat thead th{border-bottom:1px solid #e1e1e1}.widefat tfoot td,.widefat tfoot th{border-top:1px solid #e1e1e1;border-bottom:none}.widefat .no-items td{border-bottom-width:0}.widefat td{vertical-align:top}.widefat td,.widefat td ol,.widefat td p,.widefat td ul{font-size:13px;line-height:1.5em}.widefat tfoot td,.widefat th,.widefat thead td{text-align:right;line-height:1.3em;font-size:14px}.updates-table td input,.widefat tfoot td input,.widefat th input,.widefat thead td input{margin:0 8px 0 0;padding:0;vertical-align:text-top}.widefat .check-column{width:2.2em;padding:6px 0 25px;vertical-align:top}.updates-table tbody td.check-column,.widefat tbody th.check-column,.widefat tfoot td.check-column,.widefat thead td.check-column{padding:11px 3px 0 0}.widefat tfoot td.check-column,.widefat thead td.check-column{padding-top:4px;vertical-align:middle}.update-php div.error,.update-php div.updated{margin-right:0}.no-js .widefat tfoot .check-column input,.no-js .widefat thead .check-column input{display:none}.column-comments,.column-links,.column-posts,.widefat .num{text-align:center}.widefat th#comments{vertical-align:middle}.wrap{margin:10px 2px 0 20px}.postbox .inside h2,.wrap [class$=icon32]+h2,.wrap h1,.wrap>h2:first-child{font-size:23px;font-weight:400;margin:0;padding:9px 0 4px 15px;line-height:29px}.subtitle{margin:0;padding-right:25px;color:#555d66;font-size:14px;font-weight:400;line-height:1}.wrap .add-new-h2,.wrap .add-new-h2:active,.wrap .page-title-action,.wrap .page-title-action:active{margin-right:4px;padding:4px 8px;position:relative;top:-3px;text-decoration:none;border:none;border:1px solid #ccc;-webkit-border-radius:2px;border-radius:2px;background:#f7f7f7;text-shadow:none;font-weight:600;font-size:13px;line-height:normal;color:#0073aa;cursor:pointer;outline:0}.wrap .add-new-h2:hover,.wrap .page-title-action:hover{border-color:#008EC2;background:#00a0d2;color:#fff}.page-title-action:focus{color:#124964}.ac_match,.highlight,.subsubsub a.current{color:#000}.wrap .page-title-action:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.wrap h1.long-header{padding-left:0}.wp-dialog{background-color:#fff}#available-widgets .widget-top:hover,#widgets-left .widget-in-question .widget-top,#widgets-left .widget-top:hover,.widgets-chooser ul,div#widgets-right .widget-top:hover{border-color:#999;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1)}.sorthelper{background-color:#ccf3fa}.alternate,.striped>tbody>:nth-child(odd),ul.striped>:nth-child(odd){background-color:#f9f9f9}.bar{background-color:#e8e8e8;border-left-color:#99d}.highlight{background-color:#e4f2fd}.wp-ui-primary{color:#fff;background-color:#32373c}.wp-ui-text-primary{color:#32373c}.wp-ui-highlight{color:#fff;background-color:#1e8cbe}.wp-ui-text-highlight{color:#1e8cbe}.wp-ui-notification{color:#fff;background-color:#d54e21}.wp-ui-text-notification{color:#d54e21}.wp-ui-text-icon{color:#82878c}img.emoji{display:inline!important;border:none!important;height:1em!important;width:1em!important;margin:0 .07em!important;vertical-align:-.1em!important;background:0 0!important;padding:0!important;-webkit-box-shadow:none!important;box-shadow:none!important}.filter-group,.wp-filter{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04)}#nav-menu-footer,#nav-menu-header,#your-profile #rich_editing,.checkbox,.control-section .accordion-section-title,.menu-item-handle,.postbox .hndle,.side-info,.sidebar-name,.stuffbox .hndle,.widefat tfoot td,.widefat tfoot th,.widefat thead td,.widefat thead th,.widget .widget-top{line-height:1.4em}.menu-item-handle,.widget .widget-top{background:#fafafa;color:#23282d}.postbox .hndle,.stuffbox .hndle{border-bottom:1px solid #eee;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.quicktags,.search{background-color:#ccc;color:#000;font-size:12px}.icon32{display:none}#bulk-titles div a:before,.notice-dismiss:before,.tagchecklist span a:before,.welcome-panel .welcome-panel-close:before{background:0 0;color:#b4b9be;content:"\f153";display:block;font:400 16px/20px dashicons;speak:none;height:20px;text-align:center;width:20px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.welcome-panel .welcome-panel-close:before{margin:0}#bulk-titles div a:before,.tagchecklist span a:before{margin:1px 0}#bulk-titles div a:hover:before,.tagchecklist span a:hover:before,.welcome-panel .welcome-panel-close:focus:before,.welcome-panel .welcome-panel-close:hover:before{color:#c00}.key-labels label{line-height:24px}b,strong{font-weight:600}.pre{white-space:pre-wrap}#namediv td.first,#plugin-information-title,.nav-tab,.no-break,.star-rating{white-space:nowrap}.howto{color:#666;font-style:italic;display:block}p.install-help{margin:8px 0;font-style:italic}hr{border:0;border-top:1px solid #ddd;border-bottom:1px solid #fafafa}#all-plugins-table .plugins a.delete,#media-items a.delete,#media-items a.delete-permanently,#nav-menu-footer .menu-delete,#search-plugins-table .plugins a.delete,.plugins a.delete,.row-actions span.delete a,.row-actions span.spam a,.row-actions span.trash a,.submitbox .submitdelete{color:#a00}#all-plugins-table .plugins a.delete:hover,#media-items a.delete-permanently:hover,#media-items a.delete:hover,#nav-menu-footer .menu-delete:hover,#search-plugins-table .plugins a.delete:hover,.file-error,.plugins a.delete:hover,.row-actions .delete a:hover,.row-actions .spam a:hover,.row-actions .trash a:hover,.submitbox .submitdelete:hover,.widget-control-remove:hover,abbr.required,span.required{color:red;text-decoration:none;border:none}#major-publishing-actions{padding:10px;clear:both;border-top:1px solid #ddd;background:#f5f5f5}#delete-action{line-height:28px;vertical-align:middle;text-align:right;float:right}#publishing-action{text-align:left;float:left;line-height:23px}#misc-publishing-actions{padding:6px 0 0}.misc-pub-section{padding:6px 10px 8px}#minor-publishing-actions{padding:10px 10px 0;text-align:left}.preview{float:left}#sticky-span{margin-right:18px}.approve,.unapproved .unapprove{display:none}.spam .approve,.trash .approve,.unapproved .approve{display:inline}td.action-links,th.action-links{text-align:left}.wp-filter{display:inline-block;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:12px 0 25px;padding:0 10px;width:100%;box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;background:#fff;color:#555;font-size:13px}.filter-group,html.wp-toolbar{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.wp-filter a{text-decoration:none}.filter-count{display:inline-block;vertical-align:middle;min-width:4em}.filter-count .count,.title-count{display:inline-block;position:relative;top:-1px;padding:4px 10px;-webkit-border-radius:30px;border-radius:30px;background:#72777c;color:#fff;font-size:14px;font-weight:600}.title-count{display:inline;top:-3px;margin-right:5px;margin-left:20px}.filter-items{float:right}.filter-links,.filter-links li{display:inline-block;margin:0}.filter-links li>a{display:inline-block;margin:0 10px;padding:15px 0;border-bottom:4px solid #fff;color:#666;cursor:pointer}.filter-links .current{-webkit-box-shadow:none;box-shadow:none;border-bottom:4px solid #666;color:#23282d}.filter-links li>a:focus,.filter-links li>a:hover,.show-filters .filter-links a.current:focus,.show-filters .filter-links a.current:hover{color:#00a0d2}.wp-filter .search-form{float:left;margin:10px 0}.wp-filter .search-form input[type=search]{margin:0;padding:3px 5px;width:280px;max-width:100%;font-size:16px;font-weight:300;line-height:1.5}.wp-filter .search-form select{margin:0;height:32px;vertical-align:top}.wp-filter .search-form.search-plugins{display:inline-block}.wp-filter .drawer-toggle{display:inline-block;margin:0 10px;padding:4px 6px;color:#666;cursor:pointer}.wp-filter .drawer-toggle:before{display:inline-block;vertical-align:top;content:"\f111";margin:0 0 0 5px;width:16px;height:16px;color:#72777c;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;font-family:dashicons;font-size:16px;line-height:1;text-align:center;text-decoration:inherit;font-weight:400;font-style:normal;-webkit-font-smoothing:antialiased}.filter-drawer,.wp-filter .favorites-form{margin:0 -20px;padding:20px;border-top:1px solid #eee;background:#fafafa}.wp-filter .drawer-toggle:hover,.wp-filter .drawer-toggle:hover:before{color:#00a0d2}.wp-filter .drawer-toggle.current:before{color:#fff}.wp-filter .favorites-form{display:none;overflow:hidden;width:100%}.show-favorites-form .wp-filter .favorites-form{display:block}.filter-drawer{display:none}.show-filters .filter-drawer{display:block;overflow:hidden;width:100%}.show-filters .wp-filter .drawer-toggle:focus,.show-filters .wp-filter .drawer-toggle:hover{background:#2ea2cc}.show-filters .filter-links a.current{border-bottom:none}.show-filters .wp-filter .drawer-toggle{-webkit-border-radius:2px;border-radius:2px;border:none;background:#72777c;color:#fff}.filter-group,.filtered-by .tag{border:1px solid #e5e5e5;background:#fff}.show-filters .wp-filter .drawer-toggle:before{color:#fff}.filter-group{box-sizing:border-box;position:relative;float:right;margin:0 0 0 1%;padding:20px 10px 10px;width:24%;box-shadow:0 1px 1px rgba(0,0,0,.04)}.filter-group legend{position:absolute;top:10px;display:block;margin:0;padding:0;font-size:1em;font-weight:600}.filter-drawer .filter-group-feature{margin:28px 0 0;list-style-type:none;font-size:12px}.filter-drawer .filter-group-feature input,.filter-drawer .filter-group-feature label{display:inline-block;margin:7px 0 7px 4px;line-height:16px}.filter-drawer .buttons{margin-bottom:20px}.filter-drawer .buttons .button span{display:inline-block;opacity:.8;font-size:12px;text-indent:10px}.wp-filter .button.clear-filters{display:none;margin-right:10px}.filtered-by{display:none;margin:0}.filtered-by>span{font-weight:600}.filtered-by a{margin-right:10px}.filtered-by .tags{display:inline}.filtered-by .tag{margin:0 5px;padding:4px 8px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);font-size:11px}.filters-applied .filter-drawer .buttons,.filters-applied .filter-drawer br,.filters-applied .filter-group{display:none!important}.filters-applied .filtered-by{display:block}.filters-applied .filter-drawer{padding:20px}.error .content-filterable,.loading-content .content-filterable,.show-filters .content-filterable,.show-filters.filters-applied.loading-content .content-filterable{display:none}.show-filters.filters-applied .content-filterable{display:block}.loading-content .spinner{display:block;margin:40px auto 0;float:none}@media only screen and (max-width:1120px){.filter-drawer{border-bottom:1px solid #eee}.filter-group{margin-bottom:0;margin-top:5px;width:100%}.filter-group li{margin:10px 0}}@media only screen and (max-width:1000px){.filter-items{float:none}.wp-filter .media-toolbar-primary,.wp-filter .media-toolbar-secondary,.wp-filter .search-form{float:none;position:relative;max-width:100%}}@media only screen and (max-width:782px){.filter-group li{padding:0;width:50%}}@media only screen and (max-width:320px){.filter-count{display:none}.wp-filter .drawer-toggle{margin:10px 0}.filter-group li,.wp-filter .search-form input[type=search]{width:100%}}.notice,div.error,div.updated{background:#fff;border-right:4px solid #fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin:5px 15px 2px;padding:1px 12px}div[class=update-message]{padding:.5em 0 .5em 12px}.form-table td .notice p,.notice p,.notice-title,div.error p,div.updated p{margin:.5em 0;padding:2px}.error a{text-decoration:underline}.updated a{padding-bottom:2px}.notice-alt{-webkit-box-shadow:none;box-shadow:none}.notice-large{padding:10px 20px}.notice-title{display:inline-block;color:#23282d;font-size:18px}.wp-core-ui .notice.is-dismissible{padding-left:38px;position:relative}.notice-dismiss{position:absolute;top:0;left:1px;border:none;margin:0;padding:9px;background:0 0;color:#b4b9be;cursor:pointer}.notice-dismiss:active:before,.notice-dismiss:focus:before,.notice-dismiss:hover:before{color:#c00}.notice-dismiss:focus{outline:0;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 .notice-dismiss:focus{outline:#5b9dd9 solid 1px}.notice-success,div.updated{border-right-color:#46b450}.notice-success.notice-alt{background-color:#ecf7ed}.notice-warning{border-right-color:#ffb900}.notice-warning.notice-alt{background-color:#fff8e5}.notice-error,div.error{border-right-color:#dc3232}.notice-error.notice-alt{background-color:#fbeaea}.notice-info{border-right-color:#00a0d2}.notice-info.notice-alt{background-color:#e5f5fa}.button.installed:before,.button.installing:before,.button.updated-message:before,.button.updating-message:before,.import-php .updating-message:before,.update-message p:before,.updated-message p:before,.updating-message p:before{display:inline-block;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}.media-upload-form .notice,.media-upload-form div.error,.wrap .notice,.wrap div.error,.wrap div.updated{margin:5px 0 15px}.button.installing:before,.button.updating-message:before,.import-php .updating-message:before,.update-message p:before,.updating-message p:before{color:#f56e28;content:"\f463"}.button.installing:before,.button.updating-message:before,.import-php .updating-message:before,.updating-message p:before{-webkit-animation:rotation 2s infinite linear;animation:rotation 2s infinite linear}.button.updated-message:before,.installed p:before,.updated-message p:before{color:#79ba49;content:'\f147'}.update-message.notice-error p:before{color:#dc3232;content:"\f534"}.import-php .updating-message:before,.wrap .notice p:before{margin-left:6px;vertical-align:bottom}#update-nag,.update-nag{display:inline-block;line-height:19px;padding:11px 15px;font-size:14px;text-align:right;margin:25px 2px 0 20px;background-color:#fff;border-right:4px solid #ffba00;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}#screen-meta,ul#dismissed-updates{display:none}form.upgrade{margin-top:8px}form.upgrade .hint{font-style:italic;font-size:85%;margin:-.5em 0 2em}.update-php .spinner{float:none;margin:-4px 0}#ajax-loading,.ajax-feedback,.ajax-loading,.imgedit-wait-spin,.list-ajax-loading{visibility:hidden}#ajax-response.alignleft{margin-right:2em}.button.installed:before,.button.installing:before,.button.updated-message:before,.button.updating-message:before{margin:3px -2px 0 5px}.button-primary.updating-message:before{color:#fff}.button-primary.updated-message:before{color:#66c6e4}.button.updated-message,.notice .button-link{-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.notice .button-link{color:#0073aa}.notice .button-link:active,.notice .button-link:hover{color:#00a0d2}@media aural{.button.installed:before,.button.installing:before,.update-message p:before,.wrap .notice p:before{speak:none}}#adminmenu a,#catlist a,#taglist a{text-decoration:none}#contextual-help-wrap,#screen-options-wrap{margin:0;padding:8px 20px 12px;position:relative}#contextual-help-wrap{overflow:auto;margin-right:0!important}#screen-meta .screen-reader-text{visibility:hidden}#screen-meta-links{margin:0 0 0 20px}#screen-meta{margin:0 0 -1px 20px;position:relative;background-color:#fff;border:1px solid #ddd;border-top:none;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.025);box-shadow:0 1px 0 rgba(0,0,0,.025)}#contextual-help-link-wrap,#screen-options-link-wrap{float:left;height:28px;margin:0 6px 0 0;border:1px solid #ddd;border-top:none;background:#fff;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1)}#screen-meta-links .screen-meta-toggle{position:relative;top:0}#screen-meta-links .show-settings{border:0;background:0 0;-webkit-border-radius:0;border-radius:0;color:#72777c;line-height:1.7;padding:3px 16px 3px 6px}#screen-meta-links .show-settings:active,#screen-meta-links .show-settings:focus,#screen-meta-links .show-settings:hover{color:#32373c}#screen-meta-links .show-settings:active{-webkit-box-shadow:none;box-shadow:none;-webkit-transform:none;-ms-transform:none;transform:none}#screen-meta-links .show-settings:after{left:0;content:"\f140";font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 0 0 5px;bottom:2px;position:relative;vertical-align:bottom;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#72777c}#templateside ul li a,#wpfooter a,.nav-tab{text-decoration:none}#screen-meta-links .screen-meta-active:after{content:"\f142"}.toggle-arrow{background-repeat:no-repeat;background-position:top left;background-color:transparent;height:22px;line-height:22px;display:block}.toggle-arrow-active{background-position:bottom left}#contextual-help-wrap h5,#screen-options-wrap h5,#screen-options-wrap legend{margin:0;padding:8px 0;font-size:13px;font-weight:600}.hndle a,.widefat tfoot td,.widefat th,.widefat thead td{font-weight:400}.ie8 #screen-options-wrap legend{color:inherit}.metabox-prefs label{display:inline-block;padding-left:15px;line-height:30px}#number-of-columns{display:inline-block;vertical-align:middle;line-height:30px}.metabox-prefs input[type=checkbox]{margin-top:0;margin-left:6px}.metabox-prefs label input,.metabox-prefs label input[type=checkbox]{margin:-4px 0 0 5px}.metabox-prefs .columns-prefs label input{margin:-1px 0 0 2px}.metabox-prefs label a{display:none}.metabox-prefs .screen-options input,.metabox-prefs .screen-options label{margin-top:0;margin-bottom:0;vertical-align:middle}.metabox-prefs .screen-options .screen-per-page{margin-left:15px}.metabox-prefs .screen-options label{line-height:28px;padding-left:0}.screen-options+.screen-options{margin-top:10px}.metabox-prefs .submit{margin-top:1em;padding:0}#contextual-help-wrap{padding:0}#contextual-help-columns{position:relative}#contextual-help-back{position:absolute;top:0;bottom:0;right:150px;left:170px;border:1px solid #e1e1e1;border-top:none;border-bottom:none;background:#f6fbfd}#contextual-help-wrap.no-sidebar #contextual-help-back{left:0;border-left-width:0;-webkit-border-bottom-left-radius:2px;border-bottom-left-radius:2px}.contextual-help-tabs{float:right;width:150px;margin:0}.contextual-help-tabs ul{margin:1em 0}.contextual-help-tabs li{margin-bottom:0;list-style-type:none;border-style:solid;border-width:0 2px 0 0;border-color:transparent}.contextual-help-tabs a{display:block;padding:5px 12px 5px 5px;line-height:18px;text-decoration:none;border:1px solid transparent;border-left:none;border-right:none}.contextual-help-tabs a:hover{color:#32373c}.contextual-help-tabs .active{padding:0;margin:0 0 0 -1px;border-right:2px solid #00a0d2;background:#f6fbfd;-webkit-box-shadow:0 2px 0 rgba(0,0,0,.02),0 1px 0 rgba(0,0,0,.02);box-shadow:0 2px 0 rgba(0,0,0,.02),0 1px 0 rgba(0,0,0,.02)}.contextual-help-tabs .active a{border-color:#e1e1e1;color:#32373c}.contextual-help-tabs-wrap{padding:0 20px;overflow:auto}.help-tab-content{display:none;margin:0 0 12px 22px;line-height:1.6em}.help-tab-content.active{display:block}.help-tab-content ul li{list-style-type:disc;margin-right:18px}.contextual-help-sidebar{width:150px;float:left;padding:0 12px 0 8px;overflow:auto}html.wp-toolbar{padding-top:32px;box-sizing:border-box}.widefat td,.widefat th{color:#555}.widefat ol,.widefat p,.widefat tfoot tr td,.widefat tfoot tr th,.widefat thead tr td,.widefat thead tr th,.widefat ul{color:#32373c}.widefat td p{margin:2px 0 .8em}.widefat .column-comment p{margin:.6em 0}.widefat .column-comment ul{list-style:outside;margin-right:2em}.postbox-container{float:right}.postbox-container .meta-box-sortables{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wpbody-content .metabox-holder{padding-top:10px}.metabox-holder .postbox-container .empty-container{border:3px dashed #b4b9be;height:250px;position:relative}.metabox-holder .postbox-container .empty-container:after{content:attr(data-emptystring);margin:auto;position:absolute;top:0;right:0;bottom:0;left:0;height:1em;width:200px;text-align:center;color:#ccc;font-size:18px;display:none}.columns-2 #postbox-container-3 .empty-container,.columns-2 #postbox-container-4 .empty-container,.columns-3 #postbox-container-4 .empty-container,.metabox-holder.columns-1 .postbox-container .empty-container{border:0;height:0;min-height:0}#post-body-content{width:100%;min-width:463px;float:right}#post-body.columns-2 #postbox-container-1{float:left;margin-left:-300px;width:280px}#post-body.columns-2 #side-sortables{min-height:250px}@media only screen and (max-width:799px){#wpbody-content .metabox-holder .postbox-container .empty-container{border:0;height:0;min-height:0}}.js .postbox .hndle,.js .widget .widget-top{cursor:move}.hndle a{font-size:11px}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover,#dashboard_right_now .versions .b,#ed_reply_toolbar #ed_reply_strong,#pass-strength-result.short,#pass-strength-result.strong,#post-status-display,#post-visibility-display,.feature-filter .feature-name,.item-controls .item-order a,.media-item .percent,.nav-tab,.plugins .name{font-weight:600}.postbox .handlediv{display:none;float:left;width:36px;height:36px;padding:0}.js .postbox .handlediv{display:block}.sortable-placeholder{border:1px dashed #b4b9be;margin-bottom:20px}.postbox,.stuffbox{margin-bottom:20px;padding:0;line-height:1}.postbox .inside,.stuffbox .inside{padding:0 12px 12px;line-height:1.4em;font-size:13px}.postbox .inside{margin:11px 0;position:relative}.postbox .inside>p:last-child,.rss-widget ul li:last-child{margin-bottom:1px!important}.postbox.closed h3{border:none;-webkit-box-shadow:none;box-shadow:none}.postbox table.form-table{margin-bottom:0}.postbox table.widefat{-webkit-box-shadow:none;box-shadow:none}.temp-border{border:1px dotted #ccc}.columns-prefs label{padding:0 0 0 10px}#wpfooter{position:absolute;bottom:0;right:0;left:0;padding:10px 20px;color:#555d66}#wpfooter p{font-size:13px;margin:0;line-height:20px}#footer-thankyou{font-style:italic}#wpfooter a:hover{text-decoration:underline}.nav-tab{float:right;border:1px solid #ccc;border-bottom:none;margin-right:.5em;padding:5px 10px;font-size:14px;line-height:24px;background:#e5e5e5;color:#555}.nav-tab-small .nav-tab,h3 .nav-tab{padding:5px 14px;font-size:12px;line-height:16px}.nav-tab:focus,.nav-tab:hover{background-color:#fff;color:#444}.nav-tab-active,.nav-tab:focus:active{-webkit-box-shadow:none;box-shadow:none}.nav-tab-active{margin-bottom:-1px;color:#444}.nav-tab-active,.nav-tab-active:focus,.nav-tab-active:focus:active,.nav-tab-active:hover{border-bottom:1px solid #f1f1f1;background:#f1f1f1;color:#000}.wrap h2.nav-tab-wrapper,h1.nav-tab-wrapper,h3.nav-tab-wrapper{border-bottom:1px solid #ccc;margin:0;padding-top:9px;padding-bottom:0;line-height:inherit}.nav-tab-wrapper:not(.wp-clearfix):after{content:"";display:table;clear:both}.ie8 .nav-tab-wrapper{display:inline-block;width:100%;vertical-align:top}.spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;display:inline-block;visibility:hidden;float:left;vertical-align:middle;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:4px 10px 0}.loading-content .spinner,.spinner.is-active{visibility:visible}#template div{margin-left:190px}.metabox-holder .postbox>h3,.metabox-holder .stuffbox>h3,.metabox-holder h2.hndle,.metabox-holder h3.hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}.nav-menus-php .metabox-holder h3{padding:10px 14px 11px 10px;line-height:21px}.plugin-install #description,.plugin-install-network #description{width:60%}table .column-rating,table .column-visible,table .vers{text-align:right}.attention,.error-message{color:red;font-weight:600}body.iframe{height:98%}.lp-show-latest p{display:none}#howto,.importer-action,.importer-desc,.importer-title{display:block}.lp-show-latest .lp-error p,.lp-show-latest p:last-child{display:block}.media-icon{width:62px;text-align:center}.media-icon img{border:1px solid #e5e5e5;border:1px solid rgba(0,0,0,.07)}#howto{font-size:11px;margin:0 5px}.importers{font-size:16px;width:auto}.importers td{padding-left:14px;line-height:1.5em}.importers .import-system{max-width:250px}.importers td.desc{max-width:500px}.post-categories,.post-categories li{display:inline}.importer-title{color:#000;font-size:14px;font-weight:400;margin-bottom:.2em}.importer-action{line-height:20px;color:#ddd;margin-bottom:1em}.not-installed-main-site .importer-action{color:#555}#post-body #post-body-content #namediv h2,#post-body #post-body-content #namediv h3{margin-top:0}.edit-comment-author{font-size:14px;line-height:1.4;font-weight:600;color:#222;margin:2px 9px 0 0}#namediv h2 label,#namediv h3 label{vertical-align:baseline}#namediv table{width:100%}#namediv td.first{width:10px}#namediv input{width:98%}#namediv p{margin:10px 0}#submitdiv h3{margin-bottom:0!important}.checkbox,.post-categories,.zerosize,fieldset{margin:0;padding:0}.zerosize{height:0;width:0;border:0;overflow:hidden;position:absolute}br.clear{height:2px;line-height:2px}.checkbox{border:none}fieldset{border:0}div.star-holder{position:relative;height:17px;width:100px;background:url(../images/stars.png?ver=20121108) bottom left repeat-x}div.star-holder .star-rating{background:url(../images/stars.png?ver=20121108) top left repeat-x;height:17px;float:right}.star-rating .star{display:inline-block;width:20px;height:20px;-webkit-font-smoothing:antialiased;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;vertical-align:top;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;text-align:center;color:#ffb900}.star-rating .star-full:before{content:"\f155"}.star-rating .star-half:before{content:"\f459"}.rtl .star-rating .star-half{-webkit-transform:rotateY(180deg);-ms-transform:rotateY(180deg);transform:rotateY(180deg)}.star-rating .star-empty:before{content:"\f154"}div.action-links{font-weight:400;margin:6px 0 0}#plugin-information{background:#fff;position:fixed;top:0;left:0;bottom:0;right:0;height:100%;padding:0}#plugin-information-scrollable{overflow:auto;-webkit-overflow-scrolling:touch;height:100%}#plugin-information-title{padding:0 20px;background:#f5f5f5;font-size:22px;font-weight:600;line-height:56px;position:relative;top:0;left:0;right:0;height:56px;overflow:hidden;text-overflow:ellipsis}#plugin-information-title.with-banner{margin-left:0;height:250px;bottom:250px;-webkit-background-size:cover;background-size:cover}#plugin-information-title h2{font-size:1em;font-weight:600;padding:0;margin:0;max-width:680px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#plugin-information-title.with-banner h2{font-family:"Helvetica Neue",sans-serif;display:inline-block;font-size:30px;line-height:50px;padding:0 15px;margin:174px 10px 0 0;color:#fff;background:rgba(30,30,30,.9);text-shadow:0 1px 3px rgba(0,0,0,.4);-webkit-box-shadow:0 0 30px rgba(255,255,255,.1);box-shadow:0 0 30px rgba(255,255,255,.1);-webkit-border-radius:8px;border-radius:8px}#plugin-information-title div.vignette{display:none}#plugin-information-title.with-banner div.vignette{display:block;float:left;top:0;height:250px;width:772px;margin:0 -20px;background:0 0;-webkit-box-shadow:inset 0 0 50px 4px rgba(0,0,0,.2),inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 0 50px 4px rgba(0,0,0,.2),inset 0 -1px 0 rgba(0,0,0,.1)}#plugin-information-tabs{padding:0 16px;position:relative;left:0;right:0;min-height:36px;font-size:0;z-index:1;border-bottom:1px solid #ddd;background:#f3f3f3}#plugin-information-tabs a{position:relative;display:inline-block;padding:9px 10px;margin:0;height:18px;line-height:18px;font-size:14px;text-decoration:none;-webkit-transition:none;transition:none}#plugin-information-tabs a.current{margin:0 -1px -1px;background:#fff;border:1px solid #ddd;border-bottom-color:#fff;padding-top:8px;color:#32373c}#plugin-information-tabs.with-banner a.current{border-top:none;padding-top:9px}#plugin-information-tabs a:active,#plugin-information-tabs a:focus{outline:0}#plugin-information-content{overflow:hidden;background:#fff;position:relative;top:0;left:0;right:0;min-height:100%;min-height:-webkit-calc(100% - 152px);min-height:calc(100% - 152px)}#plugin-information-content.with-banner{min-height:-webkit-calc(100% - 346px);min-height:calc(100% - 346px)}#section-holder{position:relative;top:0;left:250px;bottom:0;right:0;margin-left:250px;padding:10px 26px 99999px;margin-bottom:-99939px}#section-holder .updated{margin:16px 0}#plugin-information .fyi{float:left;position:relative;top:0;left:0;padding:16px 16px 99999px;margin-bottom:-99939px;width:217px;border-right:1px solid #ddd;background:#f3f3f3;color:#666}#plugin-information .fyi strong{color:#444}#plugin-information .fyi h3{font-weight:600;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}#plugin-information .fyi h2{font-size:.9em;margin-bottom:0;margin-left:0}#plugin-information .fyi ul{padding:0;margin:0;list-style:none}#plugin-information .fyi li{margin:0 0 10px}#plugin-information .fyi-description{margin-top:0}#plugin-information .counter-container{margin:3px 0}#plugin-information .counter-label{float:right;margin-left:5px;min-width:55px}#plugin-information .counter-back{height:17px;width:92px;background-color:#e5e5e5;float:right}#plugin-information .counter-bar{height:17px;background-color:#ffc733;float:right}#plugin-information .counter-count{margin-right:5px}#plugin-information .fyi ul.contributors{margin-top:10px}#plugin-information .fyi ul.contributors li{display:inline-block;margin-left:8px;vertical-align:middle}#plugin-information .fyi ul.contributors li img{vertical-align:middle;margin-left:4px}#plugin-information-footer{padding:13px 16px;position:absolute;left:0;bottom:0;right:0;height:33px;border-top:1px solid #ddd;background:#f3f3f3}#plugin-information .section ol,#plugin-information .section ul{list-style-type:disc;margin-left:24px}#plugin-information .section,#plugin-information .section p{font-size:14px;line-height:1.7}#plugin-information #section-screenshots ol{list-style:none;margin:0}#plugin-information #section-screenshots li img{vertical-align:text-top;margin-top:16px;max-width:100%;width:auto;height:auto;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}#plugin-information #section-screenshots li p{font-style:italic;padding-left:20px}#plugin-information pre{padding:7px;overflow:auto;border:1px solid #ccc}#plugin-information .review{overflow:hidden;width:100%;margin-bottom:20px;border-bottom:1px solid #e5e5e5}#plugin-information .review-title-section{overflow:hidden}#plugin-information .review-title-section h4{display:inline-block;float:left;margin:0 6px 0 0}#plugin-information .reviewer-info p{clear:both;margin:0;padding-top:2px}#plugin-information .reviewer-info .avatar{float:left;margin:4px 6px 0 0}#plugin-information .reviewer-info .star-rating{float:left}#plugin-information .review-meta{float:left;margin-left:.75em}#plugin-information .review-body{float:left;width:100%}.plugin-version-author-uri{font-size:13px}@media screen and (max-width:771px){#plugin-information-title.with-banner{height:100px;bottom:100px}#plugin-information-title.with-banner h2{margin-top:30px;font-size:20px;line-height:40px;max-width:85%}#plugin-information-title.with-banner div.vignette{height:100px;bottom:100px;width:800%}#plugin-information-tabs{overflow:hidden;padding:0;height:auto}#plugin-information-tabs a.current{margin-bottom:0;border-bottom:none}#plugin-information .fyi{float:none;border:1px solid #ddd;position:static;width:auto;margin:26px 26px 0;padding-bottom:0}#section-holder{position:static;margin:0;padding-bottom:70px}#plugin-information .fyi h3,#plugin-information .fyi small{display:none}#plugin-information-footer{padding:12px 16px 0;height:46px}}body.about-php #TB_window,body.import-php #TB_window,body.index-php #TB_window,body.plugin-install-php #TB_window,body.plugins-php #TB_window,body.update-core-php #TB_window{background:#fcfcfc}.ie8 body.about-php #TB_window:before,.ie8 body.import-php #TB_window:before,.ie8 body.index-php #TB_window:before,.ie8 body.plugin-install-php #TB_window:before,.ie8 body.plugins-php #TB_window:before,.ie8 body.update-core-php #TB_window:before{content:" ";background:0 0}body.about-php #TB_window.thickbox-loading:before,body.import-php #TB_window.thickbox-loading:before,body.index-php #TB_window.thickbox-loading:before,body.plugin-install-php #TB_window.thickbox-loading:before,body.plugins-php #TB_window.thickbox-loading:before,body.update-core-php #TB_window.thickbox-loading:before{content:"";display:block;width:20px;height:20px;position:absolute;right:50%;top:50%;z-index:-1;margin:-10px -10px 0 0;background:url(../images/spinner.gif) center no-repeat #fcfcfc;-webkit-background-size:20px 20px;background-size:20px 20px;-webkit-transform:translateZ(0);transform:translateZ(0)}body.about-php #TB_ajaxWindowTitle,body.about-php .tb-close-icon,body.import-php #TB_ajaxWindowTitle,body.import-php .tb-close-icon,body.index-php #TB_ajaxWindowTitle,body.index-php .tb-close-icon,body.plugin-install-php #TB_ajaxWindowTitle,body.plugin-install-php .tb-close-icon,body.plugins-php #TB_ajaxWindowTitle,body.plugins-php .tb-close-icon,body.update-core-php #TB_ajaxWindowTitle,body.update-core-php .tb-close-icon{display:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){body.about-php #TB_window.thickbox-loading:before,body.import-php #TB_window.thickbox-loading:before,body.index-php #TB_window.thickbox-loading:before,body.plugin-install-php #TB_window.thickbox-loading:before,body.plugins-php #TB_window.thickbox-loading:before,body.update-core-php #TB_window.thickbox-loading:before{background-image:url(../images/spinner-2x.gif)}}body.about-php #TB_title,body.import-php #TB_title,body.index-php #TB_title,body.plugin-install-php #TB_title,body.plugins-php #TB_title,body.update-core-php #TB_title{float:right;height:1px}.about-php #TB_closeWindowButton,.import-php #TB_closeWindowButton,.index-php #TB_closeWindowButton,.plugin-install-php #TB_closeWindowButton,.plugins-php #TB_closeWindowButton,.update-core-php #TB_closeWindowButton{right:auto;left:-30px;color:#eee}body.about-php #TB_closeWindowButton:focus,body.about-php #TB_closeWindowButton:hover,body.import-php #TB_closeWindowButton:focus,body.import-php #TB_closeWindowButton:hover,body.index-php #TB_closeWindowButton:focus,body.index-php #TB_closeWindowButton:hover,body.plugin-install-php #TB_closeWindowButton:focus,body.plugin-install-php #TB_closeWindowButton:hover,body.plugins-php #TB_closeWindowButton:focus,body.plugins-php #TB_closeWindowButton:hover,body.update-core-php #TB_closeWindowButton:focus,body.update-core-php #TB_closeWindowButton:hover{color:#00a0d2;outline:0;-webkit-box-shadow:none;box-shadow:none}body.about-php #TB_closeWindowButton:after,body.import-php #TB_closeWindowButton:after,body.index-php #TB_closeWindowButton:after,body.plugin-install-php #TB_closeWindowButton:after,body.plugins-php #TB_closeWindowButton:after,body.update-core-php #TB_closeWindowButton:after{content:"\f335";font:400 32px/29px dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media screen and (max-width:830px){body.about-php #TB_closeWindowButton,body.import-php #TB_closeWindowButton,body.index-php #TB_closeWindowButton,body.plugin-install-php #TB_closeWindowButton,body.plugins-php #TB_closeWindowButton,body.update-core-php #TB_closeWindowButton{left:0;top:-30px}}img{border:none}.bulk-action-notice .toggle-indicator:before,.js .meta-box-sortables .postbox .toggle-indicator:before,.js .sidebar-name .sidebar-name-arrow:before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.bulk-action-notice .bulk-action-errors-collapsed .toggle-indicator:before,.js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before,.js .widgets-holder-wrap.closed .sidebar-name-arrow:before{content:"\f140"}.js .sidebar-name .sidebar-name-arrow:before{padding:10px;right:0}.js #widgets-left .sidebar-name .sidebar-name-arrow{display:none}.accordion-section.open .accordion-section-content,.js #widgets-left .sidebar-name:hover .sidebar-name-arrow,.js #widgets-left .widgets-holder-wrap.closed .sidebar-name .sidebar-name-arrow,.no-js .accordion-section .accordion-section-content{display:block}.js .postbox .handlediv .toggle-indicator:before{margin-top:4px;width:20px;-webkit-border-radius:50%;border-radius:50%;text-indent:-1px}#postcustomstuff p.submit,#templateside h2,.alignleft h2{margin:0}.rtl.js .postbox .handlediv .toggle-indicator:before{text-indent:1px}.bulk-action-notice .toggle-indicator:before{line-height:16px;vertical-align:top;color:#72777c}.js .postbox .handlediv:focus{-webkit-box-shadow:none;box-shadow:none;outline:0}.js .postbox .handlediv:focus .toggle-indicator:before{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#photo-add-url-div input[type=text]{width:300px}#template textarea{font-family:Consolas,Monaco,monospace;font-size:13px;width:97%;background:#f9f9f9;outline:0}#template p{width:97%}#templateside{float:left;width:190px}#templateside h4{margin:1em 0 0}#templateside ol,#templateside ul{margin:.5em 0;padding:0}#templateside li{margin:4px 0}#templateside li a,.theme-editor-php .highlight{display:block;padding:3px 12px 3px 3px;text-decoration:none}.theme-editor-php .highlight{margin:-3px -12px -3px 3px}#templateside .highlight{border:none;font-weight:600}.nonessential{color:#666;font-size:11px;font-style:italic;padding-right:12px}#documentation{margin-top:10px}#documentation label{line-height:22px;vertical-align:baseline;font-weight:600}.fileedit-sub{padding:10px 0 8px;line-height:180%}.accordion-section-title:after,.control-section .accordion-section-title:after,.nav-menus-php .item-edit:before,.widget-top a.widget-action:after{left:0;content:"\f140";border:none;background:0 0;font:400 20px/1 dashicons;speak:none;display:block;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.accordion-section-title:after,.handlediv,.item-edit,.sidebar-name-arrow{color:#72777c}.widget-action{color:#555d66}.accordion-section-title:hover:after,.handlediv:focus,.handlediv:hover,.item-edit:focus,.item-edit:hover,.sidebar-name:hover .sidebar-name-arrow,.widget-action:focus,.widget-top:hover .widget-action{color:#23282d}.widget-top a.widget-action:after{padding:1px 0 1px 2px;margin-top:10px;margin-left:10px;-webkit-border-radius:50%;border-radius:50%}.widget-top a.widget-action:focus:after{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.accordion-section-title:after,.control-section .accordion-section-title:after{float:left;left:20px;top:-2px}#customize-info.open .accordion-section-title:after,.control-section.open .accordion-section-title:after,.nav-menus-php .menu-item-edit-active .item-edit:before,.widget.open .widget-top a.widget-action:after{content:"\f142"}/*!
  * jQuery UI Draggable/Sortable 1.11.4
  * http://jqueryui.com
  *
  * Copyright jQuery Foundation and other contributors
  * Released under the MIT license.
  * http://jquery.org/license
- */.ui-draggable-handle,.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.accordion-section{border-bottom:1px solid #ddd;margin:0}.accordion-section.open:hover{border-bottom-color:#ddd}.accordion-section-content{display:none;padding:10px 20px 15px;overflow:hidden;background:#fff}.accordion-section-title{margin:0;padding:12px 15px 15px;position:relative;border-right:1px solid #ddd;border-left:1px solid #ddd;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.js .accordion-section-title{cursor:pointer}.js .accordion-section-title:after{position:absolute;top:12px;left:10px;z-index:1}.accordion-section-title:focus{outline:0}.accordion-section-title:focus:after,.accordion-section-title:hover:after{border-color:#a0a5aa transparent}.cannot-expand .accordion-section-title{cursor:auto}.cannot-expand .accordion-section-title:after{display:none}.control-section .accordion-section-title{border-right:none;border-left:none;padding:10px 14px 11px 10px;line-height:21px;background:#fff}.control-section .accordion-section-title:after{top:11px}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{color:#23282d;background:#f5f5f5}.control-section.open .accordion-section-title{border-bottom:1px solid #ddd}.network-admin .edit-site-actions{margin-top:0}.my-sites{display:block;overflow:auto;zoom:1}.my-sites li{display:block;padding:8px 3%;min-height:130px;margin:0}@media only screen and (max-width:599px){.my-sites li{min-height:0}}@media only screen and (min-width:600px){.my-sites.striped li{background-color:#fff;position:relative}.my-sites.striped li:after{content:"";width:1px;height:100%;position:absolute;top:0;left:0;background:#ccc}}@media only screen and (min-width:600px) and (max-width:699px){.my-sites li{float:right;width:44%}.my-sites.striped li{background-color:#fff}.my-sites.striped li:nth-of-type(2n+1){clear:right}.my-sites.striped li:nth-of-type(2n+2):after{content:none}.my-sites li:nth-of-type(4n+1),.my-sites li:nth-of-type(4n+2){background-color:#f9f9f9}}@media only screen and (min-width:700px) and (max-width:1199px){.my-sites li{float:right;width:27.333333%;background-color:#fff}.my-sites.striped li:nth-of-type(3n+3):after{content:none}.my-sites li:nth-of-type(6n+1),.my-sites li:nth-of-type(6n+2),.my-sites li:nth-of-type(6n+3){background-color:#f9f9f9}}@media only screen and (min-width:1200px) and (max-width:1399px){.my-sites li{float:right;width:21%;padding:8px 2%;background-color:#fff}.my-sites.striped li:nth-of-type(4n+1){clear:right}.my-sites.striped li:nth-of-type(4n+4):after{content:none}.my-sites li:nth-of-type(8n+1),.my-sites li:nth-of-type(8n+2),.my-sites li:nth-of-type(8n+3),.my-sites li:nth-of-type(8n+4){background-color:#f9f9f9}}@media only screen and (min-width:1400px) and (max-width:1599px){.my-sites li{float:right;width:16%;padding:8px 2%;background-color:#fff}.my-sites.striped li:nth-of-type(5n+1){clear:right}.my-sites.striped li:nth-of-type(5n+5):after{content:none}.my-sites li:nth-of-type(10n+1),.my-sites li:nth-of-type(10n+2),.my-sites li:nth-of-type(10n+3),.my-sites li:nth-of-type(10n+4),.my-sites li:nth-of-type(10n+5){background-color:#f9f9f9}}@media only screen and (min-width:1600px){.my-sites li{float:right;width:12.666666%;padding:8px 2%;background-color:#fff}.my-sites.striped li:nth-of-type(6n+1){clear:right}.my-sites.striped li:nth-of-type(6n+6):after{content:none}.my-sites li:nth-of-type(12n+1),.my-sites li:nth-of-type(12n+2),.my-sites li:nth-of-type(12n+3),.my-sites li:nth-of-type(12n+4),.my-sites li:nth-of-type(12n+5),.my-sites li:nth-of-type(12n+6){background-color:#f9f9f9}}.my-sites li a{text-decoration:none}@media only screen and (min-width:769px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (max-width:860px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (min-width:980px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (max-width:768px){#col-left,#col-right{width:100%}}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){div.star-holder,div.star-holder .star-rating{background:url(../images/stars-2x.png?ver=20121108) bottom left repeat-x;-webkit-background-size:21px 37px;background-size:21px 37px}.spinner{background-image:url(../images/spinner-2x.gif)}#bulk-titles div a,#bulk-titles div a:hover,#screen-meta-links a.show-settings,.curtime #timestamp,.meta-box-sortables .postbox:hover .handlediv,.sidebar-name-arrow,.sidebar-name:hover .sidebar-name-arrow,.tagchecklist span a,.tagchecklist span a:hover,.widget-top a.widget-action,.widget-top a.widget-action:hover{background:0 0!important}}@-ms-viewport{width:device-width}@media screen and (max-width:782px){#template div,#templateside{float:none;width:auto}html.wp-toolbar{padding-top:46px}body{min-width:240px;overflow-x:hidden}body *{-webkit-tap-highlight-color:rgba(0,0,0,0)!important}#wpcontent{position:relative;margin-right:0;padding-right:10px}#wpbody-content{padding-bottom:100px}.wrap{margin-left:12px;margin-right:0}.col-wrap{padding:0}#collapse-menu,#screen-meta,#screen-meta-links,.post-format-select{display:none!important}.wrap .add-new-h2,.wrap .add-new-h2:active,.wrap .page-title-action,.wrap .page-title-action:active{padding:10px 15px;font-size:14px;white-space:nowrap}.wp-color-result{height:auto;padding-right:45px}.wp-color-result:after{font-size:14px;height:auto;padding:6px 14px}.media-upload-form div.error,.notice,.wrap div.error,.wrap div.updated{margin:20px 0 10px;padding:5px 10px;font-size:14px;line-height:175%}.wp-core-ui .notice.is-dismissible{padding-left:46px}.notice-dismiss{padding:13px}.wrap .icon32+h2{margin-top:-2px}.wp-responsive-open #wpbody{left:-190px}code{word-wrap:break-word}.postbox{font-size:14px}.metabox-holder .postbox>h3,.metabox-holder .stuffbox>h3,.metabox-holder h2,.metabox-holder h3.hndle{padding:12px}.postbox .handlediv{margin-top:3px}.subsubsub{font-size:16px;text-align:center;margin-bottom:15px}#templateside li{margin:0}#templateside li a{display:block;padding:5px}#templateside .highlight{padding:5px;margin-right:-5px;margin-top:-5px}#template div{margin:0}#template textarea{width:100%}.fileedit-sub .alignright{margin-top:15px}#comments-form .checkforspam,#wpfooter{display:none}.edit-comment-author{margin:2px 0 0}.filter-drawer .filter-group-feature input,.filter-drawer .filter-group-feature label{line-height:25px}}@media screen and (max-width:600px){#wpwrap.wp-responsive-open,div#post-body.metabox-holder.columns-1{overflow-x:hidden}html.wp-toolbar{padding-top:0}#wpbody{padding-top:46px}.wrap h2.nav-tab-wrapper,h1.nav-tab-wrapper,h3.nav-tab-wrapper{border-bottom:0}h1 .nav-tab,h2 .nav-tab,h3 .nav-tab{margin:10px 0 0 10px;border-bottom:1px solid #ccc}}@media screen and (max-width:320px){#network_dashboard_right_now .subsubsub{font-size:14px;text-align:right}}
\ No newline at end of file
+ */.ui-draggable-handle,.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.accordion-section{border-bottom:1px solid #ddd;margin:0}.accordion-section.open:hover{border-bottom-color:#ddd}.accordion-section-content{display:none;padding:10px 20px 15px;overflow:hidden;background:#fff}.accordion-section-title{margin:0;padding:12px 15px 15px;position:relative;border-right:1px solid #ddd;border-left:1px solid #ddd;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.js .accordion-section-title{cursor:pointer}.js .accordion-section-title:after{position:absolute;top:12px;left:10px;z-index:1}.accordion-section-title:focus{outline:0}.accordion-section-title:focus:after,.accordion-section-title:hover:after{border-color:#a0a5aa transparent}.cannot-expand .accordion-section-title{cursor:auto}.cannot-expand .accordion-section-title:after{display:none}.control-section .accordion-section-title{border-right:none;border-left:none;padding:10px 14px 11px 10px;line-height:21px;background:#fff}.control-section .accordion-section-title:after{top:11px}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{color:#23282d;background:#f5f5f5}.control-section.open .accordion-section-title{border-bottom:1px solid #ddd}.network-admin .edit-site-actions{margin-top:0}.my-sites{display:block;overflow:auto;zoom:1}.my-sites li{display:block;padding:8px 3%;min-height:130px;margin:0}@media only screen and (max-width:599px){.my-sites li{min-height:0}}@media only screen and (min-width:600px){.my-sites.striped li{background-color:#fff;position:relative}.my-sites.striped li:after{content:"";width:1px;height:100%;position:absolute;top:0;left:0;background:#ccc}}@media only screen and (min-width:600px) and (max-width:699px){.my-sites li{float:right;width:44%}.my-sites.striped li{background-color:#fff}.my-sites.striped li:nth-of-type(2n+1){clear:right}.my-sites.striped li:nth-of-type(2n+2):after{content:none}.my-sites li:nth-of-type(4n+1),.my-sites li:nth-of-type(4n+2){background-color:#f9f9f9}}@media only screen and (min-width:700px) and (max-width:1199px){.my-sites li{float:right;width:27.333333%;background-color:#fff}.my-sites.striped li:nth-of-type(3n+3):after{content:none}.my-sites li:nth-of-type(6n+1),.my-sites li:nth-of-type(6n+2),.my-sites li:nth-of-type(6n+3){background-color:#f9f9f9}}@media only screen and (min-width:1200px) and (max-width:1399px){.my-sites li{float:right;width:21%;padding:8px 2%;background-color:#fff}.my-sites.striped li:nth-of-type(4n+1){clear:right}.my-sites.striped li:nth-of-type(4n+4):after{content:none}.my-sites li:nth-of-type(8n+1),.my-sites li:nth-of-type(8n+2),.my-sites li:nth-of-type(8n+3),.my-sites li:nth-of-type(8n+4){background-color:#f9f9f9}}@media only screen and (min-width:1400px) and (max-width:1599px){.my-sites li{float:right;width:16%;padding:8px 2%;background-color:#fff}.my-sites.striped li:nth-of-type(5n+1){clear:right}.my-sites.striped li:nth-of-type(5n+5):after{content:none}.my-sites li:nth-of-type(10n+1),.my-sites li:nth-of-type(10n+2),.my-sites li:nth-of-type(10n+3),.my-sites li:nth-of-type(10n+4),.my-sites li:nth-of-type(10n+5){background-color:#f9f9f9}}@media only screen and (min-width:1600px){.my-sites li{float:right;width:12.666666%;padding:8px 2%;background-color:#fff}.my-sites.striped li:nth-of-type(6n+1){clear:right}.my-sites.striped li:nth-of-type(6n+6):after{content:none}.my-sites li:nth-of-type(12n+1),.my-sites li:nth-of-type(12n+2),.my-sites li:nth-of-type(12n+3),.my-sites li:nth-of-type(12n+4),.my-sites li:nth-of-type(12n+5),.my-sites li:nth-of-type(12n+6){background-color:#f9f9f9}}.my-sites li a{text-decoration:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){div.star-holder,div.star-holder .star-rating{background:url(../images/stars-2x.png?ver=20121108) bottom left repeat-x;-webkit-background-size:21px 37px;background-size:21px 37px}.spinner{background-image:url(../images/spinner-2x.gif)}#bulk-titles div a,#bulk-titles div a:hover,#screen-meta-links a.show-settings,.curtime #timestamp,.meta-box-sortables .postbox:hover .handlediv,.sidebar-name-arrow,.sidebar-name:hover .sidebar-name-arrow,.tagchecklist span a,.tagchecklist span a:hover,.widget-top a.widget-action,.widget-top a.widget-action:hover{background:0 0!important}}@-ms-viewport{width:device-width}@media screen and (max-width:782px){#col-left,#col-right,#template div,#templateside{float:none;width:auto}html.wp-toolbar{padding-top:46px}body{min-width:240px;overflow-x:hidden}body *{-webkit-tap-highlight-color:rgba(0,0,0,0)!important}#wpcontent{position:relative;margin-right:0;padding-right:10px}#wpbody-content{padding-bottom:100px}.wrap{margin-left:12px;margin-right:0}#col-left .col-wrap,#col-right .col-wrap{padding:0}#collapse-menu,#screen-meta,#screen-meta-links,.post-format-select{display:none!important}.wrap .add-new-h2,.wrap .add-new-h2:active,.wrap .page-title-action,.wrap .page-title-action:active{padding:10px 15px;font-size:14px;white-space:nowrap}.wp-color-result{height:auto;padding-right:45px}.wp-color-result:after{font-size:14px;height:auto;padding:6px 14px}.media-upload-form div.error,.notice,.wrap div.error,.wrap div.updated{margin:20px 0 10px;padding:5px 10px;font-size:14px;line-height:175%}.wp-core-ui .notice.is-dismissible{padding-left:46px}.notice-dismiss{padding:13px}.wrap .icon32+h2{margin-top:-2px}.wp-responsive-open #wpbody{left:-190px}code{word-wrap:break-word}.postbox{font-size:14px}.metabox-holder .postbox>h3,.metabox-holder .stuffbox>h3,.metabox-holder h2,.metabox-holder h3.hndle{padding:12px}.postbox .handlediv{margin-top:3px}.subsubsub{font-size:16px;text-align:center;margin-bottom:15px}#templateside li{margin:0}#templateside li a{display:block;padding:5px}#templateside .highlight{padding:5px;margin-right:-5px;margin-top:-5px}#template div{margin:0}#template textarea{width:100%}.fileedit-sub .alignright{margin-top:15px}#comments-form .checkforspam,#wpfooter{display:none}.edit-comment-author{margin:2px 0 0}.filter-drawer .filter-group-feature input,.filter-drawer .filter-group-feature label{line-height:25px}}@media screen and (max-width:600px){#wpwrap.wp-responsive-open,div#post-body.metabox-holder.columns-1{overflow-x:hidden}html.wp-toolbar{padding-top:0}#wpbody{padding-top:46px}.wrap h2.nav-tab-wrapper,h1.nav-tab-wrapper,h3.nav-tab-wrapper{border-bottom:0}h1 .nav-tab,h2 .nav-tab,h3 .nav-tab{margin:10px 0 0 10px;border-bottom:1px solid #ccc}}@media screen and (max-width:320px){#network_dashboard_right_now .subsubsub{font-size:14px;text-align:right}}
\ No newline at end of file
index e98e87ea5042c53237e6eec2989b6b39fabc85a5..42c4c7be46e45ede577baf66cdf3d9616e453aa1 100644 (file)
 
 /* 2 columns main area */
 
-#col-container,
-#col-left,
-#col-right {
-       overflow: hidden;
-       padding: 0;
-       margin: 0;
-}
-
 #col-left {
+       float: left;
        width: 35%;
 }
 
 #col-right {
        float: right;
-       clear: right;
        width: 65%;
 }
 
-.col-wrap {
-       padding: 0 7px;
+#col-left .col-wrap {
+       padding: 0 6px 0 0;
+}
+
+#col-right .col-wrap {
+       padding: 0 0 0 6px;
 }
 
 /* utility classes */
@@ -212,13 +208,10 @@ body {
        padding: 0;
 }
 
-html {
-       background: #f1f1f1;
-}
-
 body {
+       background: #f1f1f1;
        color: #444;
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        font-size: 13px;
        line-height: 1.4em;
        min-width: 600px;
@@ -444,7 +437,7 @@ code {
 .subsubsub a .count,
 .subsubsub a.current .count {
        color: #555d66; /* #f1f1f1 background */
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .subsubsub a.current {
@@ -588,7 +581,8 @@ code {
        padding-left: 25px;
        color: #555d66;
        font-size: 14px;
-       font-weight: normal;
+       font-weight: 400;
+       line-height: 1;
 }
 
 .wrap .add-new-h2, /* deprecated */
@@ -608,6 +602,10 @@ code {
        text-shadow: none;
        font-weight: 600;
        font-size: 13px;
+       line-height: normal; /* IE8-IE11 need this for buttons */
+       color: #0073aa; /* some of these controls are button elements and don't inherit from links */
+       cursor: pointer;
+       outline: 0;
 }
 
 .wrap .add-new-h2:hover, /* deprecated */
@@ -617,6 +615,11 @@ code {
        color: #fff;
 }
 
+/* lower specificity: color needs to be overridden by :hover and :active */
+.page-title-action:focus {
+       color: #124964;
+}
+
 .wrap .page-title-action:focus {
        border-color: #5b9dd9;
        -webkit-box-shadow: 0 0 2px rgba( 30, 140, 190, 0.8 );
@@ -1063,7 +1066,7 @@ th.action-links {
        line-height: 1;
        text-align: center;
        text-decoration: inherit;
-       font-weight: normal;
+       font-weight: 400;
        font-style: normal;
        -webkit-font-smoothing: antialiased;
 }
@@ -1305,6 +1308,10 @@ div.error {
        padding: 1px 12px;
 }
 
+div[class="update-message"] { /* back-compat for pre-4.6 */
+       padding: 0.5em 12px 0.5em 0;
+}
+
 .notice p,
 .notice-title,
 div.updated p,
@@ -1404,6 +1411,21 @@ div.error {
        background-color: #e5f5fa;
 }
 
+.update-message p:before,
+.updating-message p:before,
+.updated-message p:before,
+.import-php .updating-message:before,
+.button.updating-message:before,
+.button.updated-message:before,
+.button.installed:before,
+.button.installing:before {
+       display: inline-block;
+       font: normal 20px/1 'dashicons';
+       -webkit-font-smoothing: antialiased;
+       -moz-osx-font-smoothing: grayscale;
+       vertical-align: top;
+}
+
 .wrap .notice,
 .wrap div.updated,
 .wrap div.error,
@@ -1412,6 +1434,45 @@ div.error {
        margin: 5px 0 15px;
 }
 
+/* Update icon. */
+.update-message p:before,
+.updating-message p:before,
+.import-php .updating-message:before,
+.button.updating-message:before,
+.button.installing:before {
+       color: #f56e28;
+       content: "\f463";
+}
+
+/* Spins the update icon. */
+.updating-message p:before,
+.import-php .updating-message:before,
+.button.updating-message:before,
+.button.installing:before {
+       -webkit-animation: rotation 2s infinite linear;
+       animation: rotation 2s infinite linear;
+}
+
+/* Updated icon (check mark). */
+.updated-message p:before,
+.installed p:before,
+.button.updated-message:before {
+       color: #79ba49;
+       content: '\f147';
+}
+
+/* Error icon. */
+.update-message.notice-error p:before {
+        color: #dc3232;
+        content: "\f534";
+}
+
+.wrap .notice p:before,
+.import-php .updating-message:before {
+       margin-right: 6px;
+       vertical-align: bottom;
+}
+
 #update-nag,
 .update-nag {
        display: inline-block;
@@ -1426,10 +1487,6 @@ div.error {
        box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
 }
 
-.update-message {
-       color: #000;
-}
-
 ul#dismissed-updates {
        display: none;
 }
@@ -1461,6 +1518,50 @@ form.upgrade .hint {
        margin-left: 2em;
 }
 
+.button.updating-message:before,
+.button.updated-message:before,
+.button.installed:before,
+.button.installing:before {
+       margin: 3px 5px 0 -2px;
+}
+
+.button-primary.updating-message:before {
+       color: #fff;
+}
+
+.button-primary.updated-message:before {
+       color: #66c6e4;
+}
+
+.button.updated-message,
+.notice .button-link {
+       -webkit-transition-property: border, background, color;
+       transition-property: border, background, color;
+       -webkit-transition-duration: .05s;
+       transition-duration: .05s;
+       -webkit-transition-timing-function: ease-in-out;
+       transition-timing-function: ease-in-out;
+}
+
+.notice .button-link {
+       color: #0073aa;
+}
+
+.notice .button-link:hover,
+.notice .button-link:active {
+       color: #00a0d2;
+}
+
+@media aural {
+       .wrap .notice p:before,
+       .button.installing:before,
+       .button.installed:before,
+       .update-message p:before {
+               speak: none;
+       }
+}
+
+
 /* @todo: this does not need its own section anymore */
 /*------------------------------------------------------------------------------
   6.0 - Admin Header
@@ -1774,7 +1875,7 @@ html.wp-toolbar {
 .widefat th,
 .widefat thead td,
 .widefat tfoot td {
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .widefat thead tr th,
@@ -1798,6 +1899,11 @@ html.wp-toolbar {
        margin: 0.6em 0;
 }
 
+.widefat .column-comment ul {
+       list-style: initial;
+       margin-left: 2em;
+}
+
 /* Screens with postboxes */
 .postbox-container {
        float: left;
@@ -1876,7 +1982,7 @@ html.wp-toolbar {
 
 .hndle a {
        font-size: 11px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .postbox .handlediv {
@@ -2095,7 +2201,8 @@ h3.nav-tab-wrapper {
        margin: 4px 10px 0;
 }
 
-.spinner.is-active {
+.spinner.is-active,
+.loading-content .spinner {
        visibility: visible;
 }
 
@@ -2172,13 +2279,45 @@ body.iframe {
        display: block;
 }
 
+.importers {
+       font-size: 16px;
+       width: auto;
+}
+
 .importers td {
        padding-right: 14px;
+       line-height: 1.5em;
 }
 
-.importers {
-       font-size: 16px;
-       width: auto;
+.importers .import-system {
+       max-width: 250px;
+}
+
+.importers td.desc {
+       max-width: 500px;
+}
+
+.importer-title,
+.importer-desc,
+.importer-action {
+       display: block;
+}
+
+.importer-title {
+       color: #000;
+       font-size: 14px;
+       font-weight: 400;
+       margin-bottom: .2em;
+}
+
+.importer-action {
+       line-height: 20px; /* Same as with .updating-message */
+       color: #ddd;
+       margin-bottom: 1em;
+}
+
+.not-installed-main-site .importer-action {
+       color: #555;
 }
 
 #post-body #post-body-content #namediv h3, /* Back-compat for pre-4.4 */
@@ -2286,7 +2425,7 @@ div.star-holder .star-rating {
        line-height: 1;
        font-family: dashicons;
        text-decoration: inherit;
-       font-weight: normal;
+       font-weight: 400;
        font-style: normal;
        vertical-align: top;
        -webkit-transition: color .1s ease-in 0;
@@ -2314,7 +2453,7 @@ div.star-holder .star-rating {
 }
 
 div.action-links {
-       font-weight: normal;
+       font-weight: 400;
        margin: 6px 0 0;
 }
 
@@ -2362,7 +2501,7 @@ div.action-links {
 
 #plugin-information-title h2 {
        font-size: 1em;
-       font-weight: bold;
+       font-weight: 600;
        padding: 0;
        margin: 0;
        max-width: 680px;
@@ -2408,7 +2547,8 @@ div.action-links {
        position: relative;
        right: 0;
        left: 0;
-       height: 36px;
+       min-height: 36px;
+       font-size: 0;
        z-index: 1;
        border-bottom: 1px solid #ddd;
        background: #f3f3f3;
@@ -2416,7 +2556,7 @@ div.action-links {
 
 #plugin-information-tabs a {
        position: relative;
-       float: left;
+       display: inline-block;
        padding: 9px 10px;
        margin: 0;
        height: 18px;
@@ -2428,7 +2568,7 @@ div.action-links {
 }
 
 #plugin-information-tabs a.current {
-       margin: 0 -1px 0;
+       margin: 0 -1px -1px;
        background: #fff;
        border: 1px solid #ddd;
        border-bottom-color: #fff;
@@ -2500,7 +2640,7 @@ div.action-links {
 }
 
 #plugin-information .fyi h3 {
-       font-weight: bold;
+       font-weight: 600;
        text-transform: uppercase;
        font-size: 12px;
        color: #666;
@@ -2888,7 +3028,8 @@ img {
 
 /* Metabox collapse arrow indicators */
 .js .sidebar-name .sidebar-name-arrow:before,
-.js .meta-box-sortables .postbox .toggle-indicator:before {
+.js .meta-box-sortables .postbox .toggle-indicator:before,
+.bulk-action-notice .toggle-indicator:before {
        content: "\f142";
        display: inline-block;
        font: normal 20px/1 dashicons;
@@ -2899,7 +3040,8 @@ img {
 }
 
 .js .widgets-holder-wrap.closed .sidebar-name-arrow:before,
-.js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before {
+.js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before,
+.bulk-action-notice .bulk-action-errors-collapsed .toggle-indicator:before {
        content: "\f140";
 }
 
@@ -2929,6 +3071,12 @@ img {
        text-indent: 1px; /* account for the dashicon alignment */
 }
 
+.bulk-action-notice .toggle-indicator:before {
+       line-height: 16px;
+       vertical-align: top;
+       color: #72777c;
+}
+
 .js .postbox .handlediv:focus {
        -webkit-box-shadow: none;
        box-shadow: none;
@@ -3010,7 +3158,7 @@ img {
 
 #templateside .highlight {
        border: none;
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .nonessential {
@@ -3361,53 +3509,6 @@ img {
 /* =Media Queries
 -------------------------------------------------------------- */
 
-/* @todo: de-duplication */
-@media only screen and (min-width: 769px) {
-       /* categories */
-       #col-left {
-               width: 35%;
-       }
-
-       #col-right {
-               width: 65%;
-       }
-}
-
-@media only screen and (max-width: 860px) {
-
-       /* categories */
-       #col-left {
-               width: 35%;
-       }
-
-       #col-right {
-               width: 65%;
-       }
-}
-
-@media only screen and (min-width: 980px) {
-
-       /* categories */
-       #col-left {
-               width: 35%;
-       }
-
-       #col-right {
-               width: 65%;
-       }
-}
-
-@media only screen and (max-width: 768px) {
-       /* categories */
-       #col-left {
-               width: 100%;
-       }
-
-       #col-right {
-               width: 100%;
-       }
-}
-
 /**
  * HiDPI Displays
  */
@@ -3476,7 +3577,15 @@ img {
                margin-left: 0;
        }
 
-       .col-wrap {
+       /* categories */
+       #col-left,
+       #col-right {
+               float: none;
+               width: auto;
+       }
+
+       #col-left .col-wrap,
+       #col-right .col-wrap {
                padding: 0;
        }
 
index 046b4b6bf69eaeff9033fbe773b3f196bc0760c5..ffa633b2331a6c39684ad72aeac5c4d45e5b7a51 100644 (file)
@@ -1,8 +1,8 @@
-#docs-list,#plugin-information .section,#template textarea,.code,.ltr,code{direction:ltr}#wpwrap{height:auto;min-height:100%;width:100%;position:relative;-webkit-font-smoothing:subpixel-antialiased}#wpcontent{height:100%;padding-left:20px}#wpcontent,#wpfooter{margin-left:160px}.folded #wpcontent,.folded #wpfooter{margin-left:36px}#wpbody-content{padding-bottom:65px;float:left;width:100%;overflow:visible!important}.inner-sidebar{float:right;clear:right;display:none;width:281px;position:relative}.columns-2 .inner-sidebar{margin-right:auto;width:286px;display:block}.columns-2 .inner-sidebar #side-sortables,.inner-sidebar #side-sortables{min-height:300px;width:280px;padding:0}.has-right-sidebar .inner-sidebar{display:block}.has-right-sidebar #post-body{float:left;clear:left;width:100%;margin-right:-2000px}.has-right-sidebar #post-body-content{margin-right:300px;float:none;width:auto}#col-container,#col-left,#col-right{overflow:hidden;padding:0;margin:0}#col-left{width:35%}#col-right{float:right;clear:right;width:65%}.col-wrap{padding:0 7px}.alignleft{float:left}.alignright{float:right}#publishing-action .spinner,#save-post,.subsubsub{float:left}.textleft{text-align:left}.textright{text-align:right}.clear{clear:both}.wp-clearfix:after{content:"";display:table;clear:both}.screen-reader-text,.screen-reader-text span,.ui-helper-hidden-accessible{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0;word-wrap:normal!important}#templateside,.misc-pub-filename,.pre,.widefat *{word-wrap:break-word}.screen-reader-shortcut{position:absolute;top:-1000em}.screen-reader-shortcut:focus{left:6px;top:-25px;height:auto;width:auto;display:block;font-size:14px;font-weight:600;padding:15px 23px 14px;background:#f1f1f1;color:#0073aa;z-index:100000;line-height:normal;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,.6);box-shadow:0 0 2px 2px rgba(0,0,0,.6);text-decoration:none;outline:0}.hidden,.js .closed .inside,.js .hide-if-js,.js .wp-core-ui .hide-if-js,.js.wp-core-ui .hide-if-js,.no-js .hide-if-no-js,.no-js .wp-core-ui .hide-if-no-js,.no-js.wp-core-ui .hide-if-no-js{display:none}#menu-management .menu-edit,#menu-settings-column .accordion-container,.comment-ays,.feature-filter,.imgedit-group,.manage-menus,.menu-item-handle,.popular-tags,.stuffbox,.widget-inside,.widget-top,.widgets-holder-wrap,.wp-editor-container,p.popular-tags,table.widefat{border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.comment-ays,.feature-filter,.imgedit-group,.popular-tags,.stuffbox,.widgets-holder-wrap,.wp-editor-container,p.popular-tags,table.widefat{background:#fff}body,html{height:100%;margin:0;padding:0}html{background:#f1f1f1}body{color:#444;font-family:"Open Sans",sans-serif;font-size:13px;line-height:1.4em;min-width:600px}body.iframe{min-width:0;padding-top:1px}body.modal-open{overflow:hidden}body.mobile.modal-open #wpwrap{overflow:hidden;position:fixed;height:100%}iframe,img{border:0}td{font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}a{color:#0073aa;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}a,div{outline:0}a:active,a:hover{color:#00a0d2}.wp-person a:focus .gravatar,a:focus,a:focus .media-icon img{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}h1,h2,h3{color:#23282d}.ie8 a:focus{outline:#5b9dd9 solid 1px}#adminmenu a:focus,.screen-reader-text:focus{-webkit-box-shadow:none;box-shadow:none;outline:0}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}p{font-size:13px;line-height:1.5;margin:1em 0}blockquote{margin:1em}dd,li{margin-bottom:6px}h1,h2,h3,h4,h5,h6{display:block;font-weight:600}h1{font-size:2em;margin:.67em 0}h2,h3{font-size:1.3em;margin:1em 0}.update-core-php h2{margin-top:2em}.update-messages h2,.update-php h2,h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.67em;margin:2.33em 0}ol,ul{padding:0}ul{list-style:none}ol{list-style-type:decimal;margin-left:2em}ul.ul-disc{list-style:disc}ul.ul-square{list-style:square}ol.ol-decimal{list-style:decimal}ol.ol-decimal,ul.ul-disc,ul.ul-square{margin-left:1.8em}ol.ol-decimal>li,ul.ul-disc>li,ul.ul-square>li{margin:0 0 .5em}.code,code{font-family:Consolas,Monaco,monospace;unicode-bidi:embed}code,kbd{padding:3px 5px 2px;margin:0 1px;background:#eaeaea;background:rgba(0,0,0,.07);font-size:13px}.subsubsub{list-style:none;margin:8px 0 0;padding:0;font-size:13px;color:#666}.subsubsub a{line-height:2;padding:.2em;text-decoration:none}.subsubsub a .count,.subsubsub a.current .count{color:#555d66;font-weight:400}.subsubsub a.current{font-weight:600;border:none}.subsubsub li{display:inline-block;margin:0;padding:0;white-space:nowrap}.widefat{border-spacing:0;width:100%;clear:both;margin:0}.widefat a{text-decoration:none}.widefat td,.widefat th{padding:8px 10px}.widefat thead td,.widefat thead th{border-bottom:1px solid #e1e1e1}.widefat tfoot td,.widefat tfoot th{border-top:1px solid #e1e1e1;border-bottom:none}.widefat .no-items td{border-bottom-width:0}.widefat td{vertical-align:top}.widefat td,.widefat td ol,.widefat td p,.widefat td ul{font-size:13px;line-height:1.5em}.widefat tfoot td,.widefat th,.widefat thead td{text-align:left;line-height:1.3em;font-size:14px}.updates-table td input,.widefat tfoot td input,.widefat th input,.widefat thead td input{margin:0 0 0 8px;padding:0;vertical-align:text-top}.widefat .check-column{width:2.2em;padding:6px 0 25px;vertical-align:top}.updates-table tbody td.check-column,.widefat tbody th.check-column,.widefat tfoot td.check-column,.widefat thead td.check-column{padding:11px 0 0 3px}.widefat tfoot td.check-column,.widefat thead td.check-column{padding-top:4px;vertical-align:middle}.update-php div.error,.update-php div.updated{margin-left:0}.no-js .widefat tfoot .check-column input,.no-js .widefat thead .check-column input{display:none}.column-comments,.column-links,.column-posts,.widefat .num{text-align:center}.widefat th#comments{vertical-align:middle}.wrap{margin:10px 20px 0 2px}.postbox .inside h2,.wrap [class$=icon32]+h2,.wrap h1,.wrap>h2:first-child{font-size:23px;font-weight:400;margin:0;padding:9px 15px 4px 0;line-height:29px}.subtitle{margin:0;padding-left:25px;color:#555d66;font-size:14px;font-weight:400}.wrap .add-new-h2,.wrap .add-new-h2:active,.wrap .page-title-action,.wrap .page-title-action:active{margin-left:4px;padding:4px 8px;position:relative;top:-3px;text-decoration:none;border:none;border:1px solid #ccc;-webkit-border-radius:2px;border-radius:2px;background:#f7f7f7;text-shadow:none;font-weight:600;font-size:13px}.wrap .add-new-h2:hover,.wrap .page-title-action:hover{border-color:#008EC2;background:#00a0d2;color:#fff}.ac_match,.highlight,.subsubsub a.current{color:#000}.wrap .page-title-action:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.wrap h1.long-header{padding-right:0}.wp-dialog{background-color:#fff}#available-widgets .widget-top:hover,#widgets-left .widget-in-question .widget-top,#widgets-left .widget-top:hover,.widgets-chooser ul,div#widgets-right .widget-top:hover{border-color:#999;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1)}.sorthelper{background-color:#ccf3fa}.alternate,.striped>tbody>:nth-child(odd),ul.striped>:nth-child(odd){background-color:#f9f9f9}.bar{background-color:#e8e8e8;border-right-color:#99d}.highlight{background-color:#e4f2fd}.wp-ui-primary{color:#fff;background-color:#32373c}.wp-ui-text-primary{color:#32373c}.wp-ui-highlight{color:#fff;background-color:#1e8cbe}.wp-ui-text-highlight{color:#1e8cbe}.wp-ui-notification{color:#fff;background-color:#d54e21}.wp-ui-text-notification{color:#d54e21}.wp-ui-text-icon{color:#82878c}img.emoji{display:inline!important;border:none!important;height:1em!important;width:1em!important;margin:0 .07em!important;vertical-align:-.1em!important;background:0 0!important;padding:0!important;-webkit-box-shadow:none!important;box-shadow:none!important}.filter-group,.wp-filter{position:relative;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04)}#nav-menu-footer,#nav-menu-header,#your-profile #rich_editing,.checkbox,.control-section .accordion-section-title,.menu-item-handle,.postbox .hndle,.side-info,.sidebar-name,.stuffbox .hndle,.widefat tfoot td,.widefat tfoot th,.widefat thead td,.widefat thead th,.widget .widget-top{line-height:1.4em}.menu-item-handle,.widget .widget-top{background:#fafafa;color:#23282d}.postbox .hndle,.stuffbox .hndle{border-bottom:1px solid #eee;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.quicktags,.search{background-color:#ccc;color:#000;font-size:12px}.icon32{display:none}#bulk-titles div a:before,.notice-dismiss:before,.tagchecklist span a:before,.welcome-panel .welcome-panel-close:before{background:0 0;color:#b4b9be;content:"\f153";display:block;font:400 16px/20px dashicons;speak:none;height:20px;text-align:center;width:20px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.welcome-panel .welcome-panel-close:before{margin:0}#bulk-titles div a:before,.tagchecklist span a:before{margin:1px 0}#bulk-titles div a:hover:before,.tagchecklist span a:hover:before,.welcome-panel .welcome-panel-close:focus:before,.welcome-panel .welcome-panel-close:hover:before{color:#c00}.key-labels label{line-height:24px}b,strong{font-weight:600}.pre{white-space:pre-wrap}#namediv td.first,#plugin-information-title,.nav-tab,.no-break,.star-rating{white-space:nowrap}.howto{color:#666;font-style:italic;display:block}p.install-help{margin:8px 0;font-style:italic}hr{border:0;border-top:1px solid #ddd;border-bottom:1px solid #fafafa}#all-plugins-table .plugins a.delete,#media-items a.delete,#media-items a.delete-permanently,#nav-menu-footer .menu-delete,#search-plugins-table .plugins a.delete,.plugins a.delete,.row-actions span.delete a,.row-actions span.spam a,.row-actions span.trash a,.submitbox .submitdelete{color:#a00}#all-plugins-table .plugins a.delete:hover,#media-items a.delete-permanently:hover,#media-items a.delete:hover,#nav-menu-footer .menu-delete:hover,#search-plugins-table .plugins a.delete:hover,.file-error,.plugins a.delete:hover,.row-actions .delete a:hover,.row-actions .spam a:hover,.row-actions .trash a:hover,.submitbox .submitdelete:hover,.widget-control-remove:hover,abbr.required,span.required{color:red;text-decoration:none;border:none}#major-publishing-actions{padding:10px;clear:both;border-top:1px solid #ddd;background:#f5f5f5}#delete-action{line-height:28px;vertical-align:middle;text-align:left;float:left}#publishing-action{text-align:right;float:right;line-height:23px}#misc-publishing-actions{padding:6px 0 0}.misc-pub-section{padding:6px 10px 8px}#minor-publishing-actions{padding:10px 10px 0;text-align:right}.preview{float:right}#sticky-span{margin-left:18px}.approve,.unapproved .unapprove{display:none}.spam .approve,.trash .approve,.unapproved .approve{display:inline}td.action-links,th.action-links{text-align:right}.wp-filter{display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:12px 0 25px;padding:0 10px;width:100%;box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;background:#fff;color:#555;font-size:13px}.filter-group,html.wp-toolbar{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.wp-filter a{text-decoration:none}.filter-count{display:inline-block;vertical-align:middle;min-width:4em}.filter-count .count,.title-count{display:inline-block;position:relative;top:-1px;padding:4px 10px;-webkit-border-radius:30px;border-radius:30px;background:#72777c;color:#fff;font-size:14px;font-weight:600}.title-count{display:inline;top:-3px;margin-left:5px;margin-right:20px}.filter-items{float:left}.filter-links,.filter-links li{display:inline-block;margin:0}.filter-links li>a{display:inline-block;margin:0 10px;padding:15px 0;border-bottom:4px solid #fff;color:#666;cursor:pointer}.filter-links .current{-webkit-box-shadow:none;box-shadow:none;border-bottom:4px solid #666;color:#23282d}.filter-links li>a:focus,.filter-links li>a:hover,.show-filters .filter-links a.current:focus,.show-filters .filter-links a.current:hover{color:#00a0d2}.wp-filter .search-form{float:right;margin:10px 0}.wp-filter .search-form input[type=search]{margin:0;padding:3px 5px;width:280px;max-width:100%;font-size:16px;font-weight:300;line-height:1.5}.wp-filter .search-form select{margin:0;height:32px;vertical-align:top}.wp-filter .search-form.search-plugins{display:inline-block}.wp-filter .drawer-toggle{display:inline-block;margin:0 10px;padding:4px 6px;color:#666;cursor:pointer}.wp-filter .drawer-toggle:before{display:inline-block;vertical-align:top;content:"\f111";margin:0 5px 0 0;width:16px;height:16px;color:#72777c;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;font-family:dashicons;font-size:16px;line-height:1;text-align:center;text-decoration:inherit;font-weight:400;font-style:normal;-webkit-font-smoothing:antialiased}.filter-drawer,.wp-filter .favorites-form{margin:0 -20px;padding:20px;border-top:1px solid #eee;background:#fafafa}.wp-filter .drawer-toggle:hover,.wp-filter .drawer-toggle:hover:before{color:#00a0d2}.wp-filter .drawer-toggle.current:before{color:#fff}.wp-filter .favorites-form{display:none;overflow:hidden;width:100%}.show-favorites-form .wp-filter .favorites-form{display:block}.filter-drawer{display:none}.show-filters .filter-drawer{display:block;overflow:hidden;width:100%}.show-filters .wp-filter .drawer-toggle:focus,.show-filters .wp-filter .drawer-toggle:hover{background:#2ea2cc}.show-filters .filter-links a.current{border-bottom:none}.show-filters .wp-filter .drawer-toggle{-webkit-border-radius:2px;border-radius:2px;border:none;background:#72777c;color:#fff}.filter-group,.filtered-by .tag{border:1px solid #e5e5e5;background:#fff}.show-filters .wp-filter .drawer-toggle:before{color:#fff}.filter-group{box-sizing:border-box;float:left;margin:0 1% 0 0;padding:20px 10px 10px;width:24%;box-shadow:0 1px 1px rgba(0,0,0,.04)}.filter-group legend{position:absolute;top:10px;display:block;margin:0;padding:0;font-size:1em;font-weight:600}.filter-drawer .filter-group-feature{margin:28px 0 0;list-style-type:none;font-size:12px}.filter-drawer .filter-group-feature input,.filter-drawer .filter-group-feature label{display:inline-block;margin:7px 4px 7px 0;line-height:16px}.filter-drawer .buttons{margin-bottom:20px}.filter-drawer .buttons .button span{display:inline-block;opacity:.8;font-size:12px;text-indent:10px}.wp-filter .button.clear-filters{display:none;margin-left:10px}.filtered-by{display:none;margin:0}.filtered-by>span{font-weight:600}.filtered-by a{margin-left:10px}.filtered-by .tags{display:inline}.filtered-by .tag{margin:0 5px;padding:4px 8px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);font-size:11px}.filters-applied .filter-drawer .buttons,.filters-applied .filter-drawer br,.filters-applied .filter-group{display:none!important}.filters-applied .filtered-by{display:block}.filters-applied .filter-drawer{padding:20px}.error .content-filterable,.loading-content .content-filterable,.show-filters .content-filterable,.show-filters.filters-applied.loading-content .content-filterable{display:none}.show-filters.filters-applied .content-filterable{display:block}.loading-content .spinner{display:block;margin:40px auto 0;float:none}@media only screen and (max-width:1120px){.filter-drawer{border-bottom:1px solid #eee}.filter-group{margin-bottom:0;margin-top:5px;width:100%}.filter-group li{margin:10px 0}}@media only screen and (max-width:1000px){.filter-items{float:none}.wp-filter .media-toolbar-primary,.wp-filter .media-toolbar-secondary,.wp-filter .search-form{float:none;position:relative;max-width:100%}}@media only screen and (max-width:782px){.filter-group li{padding:0;width:50%}}@media only screen and (max-width:320px){.filter-count{display:none}.wp-filter .drawer-toggle{margin:10px 0}.filter-group li,.wp-filter .search-form input[type=search]{width:100%}}.notice,div.error,div.updated{background:#fff;border-left:4px solid #fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin:5px 15px 2px;padding:1px 12px}.form-table td .notice p,.notice p,.notice-title,div.error p,div.updated p{margin:.5em 0;padding:2px}.error a{text-decoration:underline}.updated a{padding-bottom:2px}.notice-alt{-webkit-box-shadow:none;box-shadow:none}.notice-large{padding:10px 20px}.notice-title{display:inline-block;color:#23282d;font-size:18px}.wp-core-ui .notice.is-dismissible{padding-right:38px;position:relative}.notice-dismiss{position:absolute;top:0;right:1px;border:none;margin:0;padding:9px;background:0 0;color:#b4b9be;cursor:pointer}.notice-dismiss:active:before,.notice-dismiss:focus:before,.notice-dismiss:hover:before{color:#c00}.notice-dismiss:focus{outline:0;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 .notice-dismiss:focus{outline:#5b9dd9 solid 1px}.notice-success,div.updated{border-left-color:#46b450}.notice-success.notice-alt{background-color:#ecf7ed}.notice-warning{border-left-color:#ffb900}.notice-warning.notice-alt{background-color:#fff8e5}.notice-error,div.error{border-left-color:#dc3232}.notice-error.notice-alt{background-color:#fbeaea}.notice-info{border-left-color:#00a0d2}.notice-info.notice-alt{background-color:#e5f5fa}.media-upload-form .notice,.media-upload-form div.error,.wrap .notice,.wrap div.error,.wrap div.updated{margin:5px 0 15px}#update-nag,.update-nag{display:inline-block;line-height:19px;padding:11px 15px;font-size:14px;text-align:left;margin:25px 20px 0 2px;background-color:#fff;border-left:4px solid #ffba00;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}#screen-meta,ul#dismissed-updates{display:none}.update-message{color:#000}form.upgrade{margin-top:8px}form.upgrade .hint{font-style:italic;font-size:85%;margin:-.5em 0 2em}.update-php .spinner{float:none;margin:-4px 0}#ajax-loading,.ajax-feedback,.ajax-loading,.imgedit-wait-spin,.list-ajax-loading{visibility:hidden}#ajax-response.alignleft{margin-left:2em}#adminmenu a,#catlist a,#taglist a{text-decoration:none}#contextual-help-wrap,#screen-options-wrap{margin:0;padding:8px 20px 12px;position:relative}#contextual-help-wrap{overflow:auto;margin-left:0!important}#screen-meta .screen-reader-text{visibility:hidden}#screen-meta-links{margin:0 20px 0 0}#screen-meta{margin:0 20px -1px 0;position:relative;background-color:#fff;border:1px solid #ddd;border-top:none;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.025);box-shadow:0 1px 0 rgba(0,0,0,.025)}#contextual-help-link-wrap,#screen-options-link-wrap{float:right;height:28px;margin:0 0 0 6px;border:1px solid #ddd;border-top:none;background:#fff;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1)}#screen-meta-links .screen-meta-toggle{position:relative;top:0}#screen-meta-links .show-settings{border:0;background:0 0;-webkit-border-radius:0;border-radius:0;color:#72777c;line-height:1.7;padding:3px 6px 3px 16px}#screen-meta-links .show-settings:active,#screen-meta-links .show-settings:focus,#screen-meta-links .show-settings:hover{color:#32373c}#screen-meta-links .show-settings:active{-webkit-box-shadow:none;box-shadow:none;-webkit-transform:none;-ms-transform:none;transform:none}#screen-meta-links .show-settings:after{right:0;content:"\f140";font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 5px 0 0;bottom:2px;position:relative;vertical-align:bottom;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#72777c}#templateside ul li a,#wpfooter a,.nav-tab{text-decoration:none}#screen-meta-links .screen-meta-active:after{content:"\f142"}.toggle-arrow{background-repeat:no-repeat;background-position:top left;background-color:transparent;height:22px;line-height:22px;display:block}.toggle-arrow-active{background-position:bottom left}#contextual-help-wrap h5,#screen-options-wrap h5,#screen-options-wrap legend{margin:0;padding:8px 0;font-size:13px;font-weight:600}.hndle a,.widefat tfoot td,.widefat th,.widefat thead td{font-weight:400}.ie8 #screen-options-wrap legend{color:inherit}.metabox-prefs label{display:inline-block;padding-right:15px;line-height:30px}#number-of-columns{display:inline-block;vertical-align:middle;line-height:30px}.metabox-prefs input[type=checkbox]{margin-top:0;margin-right:6px}.metabox-prefs label input,.metabox-prefs label input[type=checkbox]{margin:-4px 5px 0 0}.metabox-prefs .columns-prefs label input{margin:-1px 2px 0 0}.metabox-prefs label a{display:none}.metabox-prefs .screen-options input,.metabox-prefs .screen-options label{margin-top:0;margin-bottom:0;vertical-align:middle}.metabox-prefs .screen-options .screen-per-page{margin-right:15px}.metabox-prefs .screen-options label{line-height:28px;padding-right:0}.screen-options+.screen-options{margin-top:10px}.metabox-prefs .submit{margin-top:1em;padding:0}#contextual-help-wrap{padding:0}#contextual-help-columns{position:relative}#contextual-help-back{position:absolute;top:0;bottom:0;left:150px;right:170px;border:1px solid #e1e1e1;border-top:none;border-bottom:none;background:#f6fbfd}#contextual-help-wrap.no-sidebar #contextual-help-back{right:0;border-right-width:0;-webkit-border-bottom-right-radius:2px;border-bottom-right-radius:2px}.contextual-help-tabs{float:left;width:150px;margin:0}.contextual-help-tabs ul{margin:1em 0}.contextual-help-tabs li{margin-bottom:0;list-style-type:none;border-style:solid;border-width:0 0 0 2px;border-color:transparent}.contextual-help-tabs a{display:block;padding:5px 5px 5px 12px;line-height:18px;text-decoration:none;border:1px solid transparent;border-right:none;border-left:none}.contextual-help-tabs a:hover{color:#32373c}.contextual-help-tabs .active{padding:0;margin:0 -1px 0 0;border-left:2px solid #00a0d2;background:#f6fbfd;-webkit-box-shadow:0 2px 0 rgba(0,0,0,.02),0 1px 0 rgba(0,0,0,.02);box-shadow:0 2px 0 rgba(0,0,0,.02),0 1px 0 rgba(0,0,0,.02)}.contextual-help-tabs .active a{border-color:#e1e1e1;color:#32373c}.contextual-help-tabs-wrap{padding:0 20px;overflow:auto}.help-tab-content{display:none;margin:0 22px 12px 0;line-height:1.6em}.help-tab-content.active{display:block}.help-tab-content ul li{list-style-type:disc;margin-left:18px}.contextual-help-sidebar{width:150px;float:right;padding:0 8px 0 12px;overflow:auto}html.wp-toolbar{padding-top:32px;box-sizing:border-box}.widefat td,.widefat th{color:#555}.widefat ol,.widefat p,.widefat tfoot tr td,.widefat tfoot tr th,.widefat thead tr td,.widefat thead tr th,.widefat ul{color:#32373c}.widefat td p{margin:2px 0 .8em}.widefat .column-comment p{margin:.6em 0}.postbox-container{float:left}.postbox-container .meta-box-sortables{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wpbody-content .metabox-holder{padding-top:10px}.metabox-holder .postbox-container .empty-container{border:3px dashed #b4b9be;height:250px;position:relative}.metabox-holder .postbox-container .empty-container:after{content:attr(data-emptystring);margin:auto;position:absolute;top:0;left:0;bottom:0;right:0;height:1em;width:200px;text-align:center;color:#ccc;font-size:18px;display:none}.columns-2 #postbox-container-3 .empty-container,.columns-2 #postbox-container-4 .empty-container,.columns-3 #postbox-container-4 .empty-container,.metabox-holder.columns-1 .postbox-container .empty-container{border:0;height:0;min-height:0}#post-body-content{width:100%;min-width:463px;float:left}#post-body.columns-2 #postbox-container-1{float:right;margin-right:-300px;width:280px}#post-body.columns-2 #side-sortables{min-height:250px}@media only screen and (max-width:799px){#wpbody-content .metabox-holder .postbox-container .empty-container{border:0;height:0;min-height:0}}.js .postbox .hndle,.js .widget .widget-top{cursor:move}.hndle a{font-size:11px}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover,#dashboard_right_now .versions .b,#ed_reply_toolbar #ed_reply_strong,#pass-strength-result.short,#pass-strength-result.strong,#post-status-display,#post-visibility-display,.edit-comment-author,.feature-filter .feature-name,.item-controls .item-order a,.media-item .percent,.nav-tab,.plugins .name{font-weight:600}.postbox .handlediv{display:none;float:right;width:36px;height:36px;padding:0}.js .postbox .handlediv{display:block}.sortable-placeholder{border:1px dashed #b4b9be;margin-bottom:20px}.postbox,.stuffbox{margin-bottom:20px;padding:0;line-height:1}.postbox .inside,.stuffbox .inside{padding:0 12px 12px;line-height:1.4em;font-size:13px}.postbox .inside{margin:11px 0;position:relative}.postbox .inside>p:last-child,.rss-widget ul li:last-child{margin-bottom:1px!important}.postbox.closed h3{border:none;-webkit-box-shadow:none;box-shadow:none}.postbox table.form-table{margin-bottom:0}.postbox table.widefat{-webkit-box-shadow:none;box-shadow:none}.temp-border{border:1px dotted #ccc}.columns-prefs label{padding:0 10px 0 0}#wpfooter{position:absolute;bottom:0;left:0;right:0;padding:10px 20px;color:#555d66}#wpfooter p{font-size:13px;margin:0;line-height:20px}#footer-thankyou{font-style:italic}#wpfooter a:hover{text-decoration:underline}.nav-tab{float:left;border:1px solid #ccc;border-bottom:none;margin-left:.5em;padding:5px 10px;font-size:14px;line-height:24px;background:#e5e5e5;color:#555}.nav-tab-small .nav-tab,h3 .nav-tab{padding:5px 14px;font-size:12px;line-height:16px}.nav-tab:focus,.nav-tab:hover{background-color:#fff;color:#444}.nav-tab-active,.nav-tab:focus:active{-webkit-box-shadow:none;box-shadow:none}.nav-tab-active{margin-bottom:-1px;color:#444}.nav-tab-active,.nav-tab-active:focus,.nav-tab-active:focus:active,.nav-tab-active:hover{border-bottom:1px solid #f1f1f1;background:#f1f1f1;color:#000}.wrap h2.nav-tab-wrapper,h1.nav-tab-wrapper,h3.nav-tab-wrapper{border-bottom:1px solid #ccc;margin:0;padding-top:9px;padding-bottom:0;line-height:inherit}.nav-tab-wrapper:not(.wp-clearfix):after{content:"";display:table;clear:both}.ie8 .nav-tab-wrapper{display:inline-block;width:100%;vertical-align:top}.spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;display:inline-block;visibility:hidden;float:right;vertical-align:middle;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:4px 10px 0}.spinner.is-active{visibility:visible}#template div{margin-right:190px}.metabox-holder .postbox>h3,.metabox-holder .stuffbox>h3,.metabox-holder h2.hndle,.metabox-holder h3.hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}.nav-menus-php .metabox-holder h3{padding:10px 10px 11px 14px;line-height:21px}.plugin-install #description,.plugin-install-network #description{width:60%}table .column-rating,table .column-visible,table .vers{text-align:left}.attention,.error-message{color:red;font-weight:600}body.iframe{height:98%}.lp-show-latest p{display:none}.lp-show-latest .lp-error p,.lp-show-latest p:last-child{display:block}.media-icon{width:62px;text-align:center}.media-icon img{border:1px solid #e5e5e5;border:1px solid rgba(0,0,0,.07)}#howto{font-size:11px;margin:0 5px;display:block}.post-categories,.post-categories li{display:inline}.importers td{padding-right:14px}.importers{font-size:16px;width:auto}#post-body #post-body-content #namediv h2,#post-body #post-body-content #namediv h3{margin-top:0}.edit-comment-author{font-size:14px;line-height:1.4;color:#222;margin:2px 0 0 9px}#namediv h2 label,#namediv h3 label{vertical-align:baseline}#namediv table{width:100%}#namediv td.first{width:10px}#namediv input{width:98%}#namediv p{margin:10px 0}#submitdiv h3{margin-bottom:0!important}.checkbox,.post-categories,.zerosize,fieldset{margin:0;padding:0}.zerosize{height:0;width:0;border:0;overflow:hidden;position:absolute}br.clear{height:2px;line-height:2px}.checkbox{border:none}fieldset{border:0}div.star-holder{position:relative;height:17px;width:100px;background:url(../images/stars.png?ver=20121108) bottom left repeat-x}div.star-holder .star-rating{background:url(../images/stars.png?ver=20121108) top left repeat-x;height:17px;float:left}.star-rating .star{display:inline-block;width:20px;height:20px;-webkit-font-smoothing:antialiased;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;vertical-align:top;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;text-align:center;color:#ffb900}.star-rating .star-full:before{content:"\f155"}.star-rating .star-half:before{content:"\f459"}.rtl .star-rating .star-half{-webkit-transform:rotateY(180deg);-ms-transform:rotateY(180deg);transform:rotateY(180deg)}.star-rating .star-empty:before{content:"\f154"}div.action-links{font-weight:400;margin:6px 0 0}#plugin-information{background:#fff;position:fixed;top:0;right:0;bottom:0;left:0;height:100%;padding:0}#plugin-information-scrollable{overflow:auto;-webkit-overflow-scrolling:touch;height:100%}#plugin-information-title{padding:0 20px;background:#f5f5f5;font-size:22px;font-weight:600;line-height:56px;position:relative;top:0;right:0;left:0;height:56px;overflow:hidden;text-overflow:ellipsis}#plugin-information-title.with-banner{margin-right:0;height:250px;bottom:250px;-webkit-background-size:cover;background-size:cover}#plugin-information-title h2{font-size:1em;font-weight:700;padding:0;margin:0;max-width:680px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#plugin-information-title.with-banner h2{font-family:"Helvetica Neue",sans-serif;display:inline-block;font-size:30px;line-height:50px;padding:0 15px;margin:174px 0 0 10px;color:#fff;background:rgba(30,30,30,.9);text-shadow:0 1px 3px rgba(0,0,0,.4);-webkit-box-shadow:0 0 30px rgba(255,255,255,.1);box-shadow:0 0 30px rgba(255,255,255,.1);-webkit-border-radius:8px;border-radius:8px}#plugin-information-title div.vignette{display:none}#plugin-information-title.with-banner div.vignette{display:block;float:right;top:0;height:250px;width:772px;margin:0 -20px;background:0 0;-webkit-box-shadow:inset 0 0 50px 4px rgba(0,0,0,.2),inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 0 50px 4px rgba(0,0,0,.2),inset 0 -1px 0 rgba(0,0,0,.1)}#plugin-information-tabs{padding:0 16px;position:relative;right:0;left:0;height:36px;z-index:1;border-bottom:1px solid #ddd;background:#f3f3f3}#plugin-information-tabs a{position:relative;float:left;padding:9px 10px;margin:0;height:18px;line-height:18px;font-size:14px;text-decoration:none;-webkit-transition:none;transition:none}#plugin-information-tabs a.current{margin:0 -1px;background:#fff;border:1px solid #ddd;border-bottom-color:#fff;padding-top:8px;color:#32373c}#plugin-information-tabs.with-banner a.current{border-top:none;padding-top:9px}#plugin-information-tabs a:active,#plugin-information-tabs a:focus{outline:0}#plugin-information-content{overflow:hidden;background:#fff;position:relative;top:0;right:0;left:0;min-height:100%;min-height:-webkit-calc(100% - 152px);min-height:calc(100% - 152px)}#plugin-information-content.with-banner{min-height:-webkit-calc(100% - 346px);min-height:calc(100% - 346px)}#section-holder{position:relative;top:0;right:250px;bottom:0;left:0;margin-right:250px;padding:10px 26px 99999px;margin-bottom:-99939px}#section-holder .updated{margin:16px 0}#plugin-information .fyi{float:right;position:relative;top:0;right:0;padding:16px 16px 99999px;margin-bottom:-99939px;width:217px;border-left:1px solid #ddd;background:#f3f3f3;color:#666}#plugin-information .fyi strong{color:#444}#plugin-information .fyi h3{font-weight:700;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}#plugin-information .fyi h2{font-size:.9em;margin-bottom:0;margin-right:0}#plugin-information .fyi ul{padding:0;margin:0;list-style:none}#plugin-information .fyi li{margin:0 0 10px}#plugin-information .fyi-description{margin-top:0}#plugin-information .counter-container{margin:3px 0}#plugin-information .counter-label{float:left;margin-right:5px;min-width:55px}#plugin-information .counter-back{height:17px;width:92px;background-color:#e5e5e5;float:left}#plugin-information .counter-bar{height:17px;background-color:#ffc733;float:left}#plugin-information .counter-count{margin-left:5px}#plugin-information .fyi ul.contributors{margin-top:10px}#plugin-information .fyi ul.contributors li{display:inline-block;margin-right:8px;vertical-align:middle}#plugin-information .fyi ul.contributors li img{vertical-align:middle;margin-right:4px}#plugin-information-footer{padding:13px 16px;position:absolute;right:0;bottom:0;left:0;height:33px;border-top:1px solid #ddd;background:#f3f3f3}#plugin-information .section ol,#plugin-information .section ul{list-style-type:disc;margin-left:24px}#plugin-information .section,#plugin-information .section p{font-size:14px;line-height:1.7}#plugin-information #section-screenshots ol{list-style:none;margin:0}#plugin-information #section-screenshots li img{vertical-align:text-top;margin-top:16px;max-width:100%;width:auto;height:auto;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}#plugin-information #section-screenshots li p{font-style:italic;padding-left:20px}#plugin-information pre{padding:7px;overflow:auto;border:1px solid #ccc}#plugin-information .review{overflow:hidden;width:100%;margin-bottom:20px;border-bottom:1px solid #e5e5e5}#plugin-information .review-title-section{overflow:hidden}#plugin-information .review-title-section h4{display:inline-block;float:left;margin:0 6px 0 0}#plugin-information .reviewer-info p{clear:both;margin:0;padding-top:2px}#plugin-information .reviewer-info .avatar{float:left;margin:4px 6px 0 0}#plugin-information .reviewer-info .star-rating{float:left}#plugin-information .review-meta{float:left;margin-left:.75em}#plugin-information .review-body{float:left;width:100%}.plugin-version-author-uri{font-size:13px}@media screen and (max-width:771px){#plugin-information-title.with-banner{height:100px;bottom:100px}#plugin-information-title.with-banner h2{margin-top:30px;font-size:20px;line-height:40px;max-width:85%}#plugin-information-title.with-banner div.vignette{height:100px;bottom:100px;width:800%}#plugin-information-tabs{overflow:hidden;padding:0;height:auto}#plugin-information-tabs a.current{margin-bottom:0;border-bottom:none}#plugin-information .fyi{float:none;border:1px solid #ddd;position:static;width:auto;margin:26px 26px 0;padding-bottom:0}#section-holder{position:static;margin:0;padding-bottom:70px}#plugin-information .fyi h3,#plugin-information .fyi small{display:none}#plugin-information-footer{padding:12px 16px 0;height:46px}}body.about-php #TB_window,body.import-php #TB_window,body.index-php #TB_window,body.plugin-install-php #TB_window,body.plugins-php #TB_window,body.update-core-php #TB_window{background:#fcfcfc}.ie8 body.about-php #TB_window:before,.ie8 body.import-php #TB_window:before,.ie8 body.index-php #TB_window:before,.ie8 body.plugin-install-php #TB_window:before,.ie8 body.plugins-php #TB_window:before,.ie8 body.update-core-php #TB_window:before{content:" ";background:0 0}body.about-php #TB_window.thickbox-loading:before,body.import-php #TB_window.thickbox-loading:before,body.index-php #TB_window.thickbox-loading:before,body.plugin-install-php #TB_window.thickbox-loading:before,body.plugins-php #TB_window.thickbox-loading:before,body.update-core-php #TB_window.thickbox-loading:before{content:"";display:block;width:20px;height:20px;position:absolute;left:50%;top:50%;z-index:-1;margin:-10px 0 0 -10px;background:url(../images/spinner.gif) center no-repeat #fcfcfc;-webkit-background-size:20px 20px;background-size:20px 20px;-webkit-transform:translateZ(0);transform:translateZ(0)}body.about-php #TB_ajaxWindowTitle,body.about-php .tb-close-icon,body.import-php #TB_ajaxWindowTitle,body.import-php .tb-close-icon,body.index-php #TB_ajaxWindowTitle,body.index-php .tb-close-icon,body.plugin-install-php #TB_ajaxWindowTitle,body.plugin-install-php .tb-close-icon,body.plugins-php #TB_ajaxWindowTitle,body.plugins-php .tb-close-icon,body.update-core-php #TB_ajaxWindowTitle,body.update-core-php .tb-close-icon{display:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){body.about-php #TB_window.thickbox-loading:before,body.import-php #TB_window.thickbox-loading:before,body.index-php #TB_window.thickbox-loading:before,body.plugin-install-php #TB_window.thickbox-loading:before,body.plugins-php #TB_window.thickbox-loading:before,body.update-core-php #TB_window.thickbox-loading:before{background-image:url(../images/spinner-2x.gif)}}body.about-php #TB_title,body.import-php #TB_title,body.index-php #TB_title,body.plugin-install-php #TB_title,body.plugins-php #TB_title,body.update-core-php #TB_title{float:left;height:1px}.about-php #TB_closeWindowButton,.import-php #TB_closeWindowButton,.index-php #TB_closeWindowButton,.plugin-install-php #TB_closeWindowButton,.plugins-php #TB_closeWindowButton,.update-core-php #TB_closeWindowButton{left:auto;right:-30px;color:#eee}body.about-php #TB_closeWindowButton:focus,body.about-php #TB_closeWindowButton:hover,body.import-php #TB_closeWindowButton:focus,body.import-php #TB_closeWindowButton:hover,body.index-php #TB_closeWindowButton:focus,body.index-php #TB_closeWindowButton:hover,body.plugin-install-php #TB_closeWindowButton:focus,body.plugin-install-php #TB_closeWindowButton:hover,body.plugins-php #TB_closeWindowButton:focus,body.plugins-php #TB_closeWindowButton:hover,body.update-core-php #TB_closeWindowButton:focus,body.update-core-php #TB_closeWindowButton:hover{color:#00a0d2;outline:0;-webkit-box-shadow:none;box-shadow:none}body.about-php #TB_closeWindowButton:after,body.import-php #TB_closeWindowButton:after,body.index-php #TB_closeWindowButton:after,body.plugin-install-php #TB_closeWindowButton:after,body.plugins-php #TB_closeWindowButton:after,body.update-core-php #TB_closeWindowButton:after{content:"\f335";font:400 32px/29px dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media screen and (max-width:830px){body.about-php #TB_closeWindowButton,body.import-php #TB_closeWindowButton,body.index-php #TB_closeWindowButton,body.plugin-install-php #TB_closeWindowButton,body.plugins-php #TB_closeWindowButton,body.update-core-php #TB_closeWindowButton{right:0;top:-30px}}img{border:none}.js .meta-box-sortables .postbox .toggle-indicator:before,.js .sidebar-name .sidebar-name-arrow:before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before,.js .widgets-holder-wrap.closed .sidebar-name-arrow:before{content:"\f140"}.js .sidebar-name .sidebar-name-arrow:before{padding:10px;left:0}.js #widgets-left .sidebar-name .sidebar-name-arrow{display:none}.accordion-section.open .accordion-section-content,.js #widgets-left .sidebar-name:hover .sidebar-name-arrow,.js #widgets-left .widgets-holder-wrap.closed .sidebar-name .sidebar-name-arrow,.no-js .accordion-section .accordion-section-content{display:block}.js .postbox .handlediv .toggle-indicator:before{margin-top:4px;width:20px;-webkit-border-radius:50%;border-radius:50%;text-indent:-1px}#postcustomstuff p.submit,#templateside h2,.alignleft h2{margin:0}.rtl.js .postbox .handlediv .toggle-indicator:before{text-indent:1px}.js .postbox .handlediv:focus{-webkit-box-shadow:none;box-shadow:none;outline:0}.js .postbox .handlediv:focus .toggle-indicator:before{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#photo-add-url-div input[type=text]{width:300px}#template textarea{font-family:Consolas,Monaco,monospace;font-size:13px;width:97%;background:#f9f9f9;outline:0}#template p{width:97%}#templateside{float:right;width:190px}#templateside h4{margin:1em 0 0}#templateside ol,#templateside ul{margin:.5em 0;padding:0}#templateside li{margin:4px 0}#templateside li a,.theme-editor-php .highlight{display:block;padding:3px 3px 3px 12px;text-decoration:none}.theme-editor-php .highlight{margin:-3px 3px -3px -12px}#templateside .highlight{border:none;font-weight:700}.nonessential{color:#666;font-size:11px;font-style:italic;padding-left:12px}#documentation{margin-top:10px}#documentation label{line-height:22px;vertical-align:baseline;font-weight:600}.fileedit-sub{padding:10px 0 8px;line-height:180%}.accordion-section-title:after,.control-section .accordion-section-title:after,.nav-menus-php .item-edit:before,.widget-top a.widget-action:after{right:0;content:"\f140";border:none;background:0 0;font:400 20px/1 dashicons;speak:none;display:block;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.accordion-section-title:after,.handlediv,.item-edit,.sidebar-name-arrow{color:#72777c}.widget-action{color:#555d66}.accordion-section-title:hover:after,.handlediv:focus,.handlediv:hover,.item-edit:focus,.item-edit:hover,.sidebar-name:hover .sidebar-name-arrow,.widget-action:focus,.widget-top:hover .widget-action{color:#23282d}.widget-top a.widget-action:after{padding:1px 2px 1px 0;margin-top:10px;margin-right:10px;-webkit-border-radius:50%;border-radius:50%}.widget-top a.widget-action:focus:after{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.accordion-section-title:after,.control-section .accordion-section-title:after{float:right;right:20px;top:-2px}#customize-info.open .accordion-section-title:after,.control-section.open .accordion-section-title:after,.nav-menus-php .menu-item-edit-active .item-edit:before,.widget.open .widget-top a.widget-action:after{content:"\f142"}/*!
+#docs-list,#plugin-information .section,#template textarea,.code,.ltr,code{direction:ltr}#wpwrap{height:auto;min-height:100%;width:100%;position:relative;-webkit-font-smoothing:subpixel-antialiased}#wpcontent{height:100%;padding-left:20px}#wpcontent,#wpfooter{margin-left:160px}.folded #wpcontent,.folded #wpfooter{margin-left:36px}#wpbody-content{padding-bottom:65px;float:left;width:100%;overflow:visible!important}.inner-sidebar{float:right;clear:right;display:none;width:281px;position:relative}.columns-2 .inner-sidebar{margin-right:auto;width:286px;display:block}.columns-2 .inner-sidebar #side-sortables,.inner-sidebar #side-sortables{min-height:300px;width:280px;padding:0}.has-right-sidebar .inner-sidebar{display:block}.has-right-sidebar #post-body{float:left;clear:left;width:100%;margin-right:-2000px}.has-right-sidebar #post-body-content{margin-right:300px;float:none;width:auto}#col-left{float:left;width:35%}#col-right{float:right;width:65%}#col-left .col-wrap{padding:0 6px 0 0}#col-right .col-wrap{padding:0 0 0 6px}.alignleft{float:left}.alignright{float:right}#publishing-action .spinner,#save-post,.subsubsub{float:left}.textleft{text-align:left}.textright{text-align:right}.clear{clear:both}.wp-clearfix:after{content:"";display:table;clear:both}.screen-reader-text,.screen-reader-text span,.ui-helper-hidden-accessible{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0;word-wrap:normal!important}#templateside,.misc-pub-filename,.pre,.widefat *{word-wrap:break-word}.screen-reader-shortcut{position:absolute;top:-1000em}.screen-reader-shortcut:focus{left:6px;top:-25px;height:auto;width:auto;display:block;font-size:14px;font-weight:600;padding:15px 23px 14px;background:#f1f1f1;color:#0073aa;z-index:100000;line-height:normal;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,.6);box-shadow:0 0 2px 2px rgba(0,0,0,.6);text-decoration:none;outline:0}.hidden,.js .closed .inside,.js .hide-if-js,.js .wp-core-ui .hide-if-js,.js.wp-core-ui .hide-if-js,.no-js .hide-if-no-js,.no-js .wp-core-ui .hide-if-no-js,.no-js.wp-core-ui .hide-if-no-js{display:none}#menu-management .menu-edit,#menu-settings-column .accordion-container,.comment-ays,.feature-filter,.imgedit-group,.manage-menus,.menu-item-handle,.popular-tags,.stuffbox,.widget-inside,.widget-top,.widgets-holder-wrap,.wp-editor-container,p.popular-tags,table.widefat{border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.comment-ays,.feature-filter,.imgedit-group,.popular-tags,.stuffbox,.widgets-holder-wrap,.wp-editor-container,p.popular-tags,table.widefat{background:#fff}body,html{height:100%;margin:0;padding:0}body{background:#f1f1f1;color:#444;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:1.4em;min-width:600px}body.iframe{min-width:0;padding-top:1px}body.modal-open{overflow:hidden}body.mobile.modal-open #wpwrap{overflow:hidden;position:fixed;height:100%}iframe,img{border:0}td{font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}a{color:#0073aa;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}a,div{outline:0}a:active,a:hover{color:#00a0d2}.wp-person a:focus .gravatar,a:focus,a:focus .media-icon img{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}h1,h2,h3{color:#23282d}.ie8 a:focus{outline:#5b9dd9 solid 1px}#adminmenu a:focus,.screen-reader-text:focus{-webkit-box-shadow:none;box-shadow:none;outline:0}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}p{font-size:13px;line-height:1.5;margin:1em 0}blockquote{margin:1em}dd,li{margin-bottom:6px}h1,h2,h3,h4,h5,h6{display:block;font-weight:600}h1{font-size:2em;margin:.67em 0}h2,h3{font-size:1.3em;margin:1em 0}.update-core-php h2{margin-top:2em}.update-messages h2,.update-php h2,h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.67em;margin:2.33em 0}ol,ul{padding:0}ul{list-style:none}ol{list-style-type:decimal;margin-left:2em}ul.ul-disc{list-style:disc}ul.ul-square{list-style:square}ol.ol-decimal{list-style:decimal}ol.ol-decimal,ul.ul-disc,ul.ul-square{margin-left:1.8em}ol.ol-decimal>li,ul.ul-disc>li,ul.ul-square>li{margin:0 0 .5em}.code,code{font-family:Consolas,Monaco,monospace;unicode-bidi:embed}code,kbd{padding:3px 5px 2px;margin:0 1px;background:#eaeaea;background:rgba(0,0,0,.07);font-size:13px}.subsubsub{list-style:none;margin:8px 0 0;padding:0;font-size:13px;color:#666}.subsubsub a{line-height:2;padding:.2em;text-decoration:none}.subsubsub a .count,.subsubsub a.current .count{color:#555d66;font-weight:400}.subsubsub a.current{font-weight:600;border:none}.subsubsub li{display:inline-block;margin:0;padding:0;white-space:nowrap}.widefat{border-spacing:0;width:100%;clear:both;margin:0}.widefat a{text-decoration:none}.widefat td,.widefat th{padding:8px 10px}.widefat thead td,.widefat thead th{border-bottom:1px solid #e1e1e1}.widefat tfoot td,.widefat tfoot th{border-top:1px solid #e1e1e1;border-bottom:none}.widefat .no-items td{border-bottom-width:0}.widefat td{vertical-align:top}.widefat td,.widefat td ol,.widefat td p,.widefat td ul{font-size:13px;line-height:1.5em}.widefat tfoot td,.widefat th,.widefat thead td{text-align:left;line-height:1.3em;font-size:14px}.updates-table td input,.widefat tfoot td input,.widefat th input,.widefat thead td input{margin:0 0 0 8px;padding:0;vertical-align:text-top}.widefat .check-column{width:2.2em;padding:6px 0 25px;vertical-align:top}.updates-table tbody td.check-column,.widefat tbody th.check-column,.widefat tfoot td.check-column,.widefat thead td.check-column{padding:11px 0 0 3px}.widefat tfoot td.check-column,.widefat thead td.check-column{padding-top:4px;vertical-align:middle}.update-php div.error,.update-php div.updated{margin-left:0}.no-js .widefat tfoot .check-column input,.no-js .widefat thead .check-column input{display:none}.column-comments,.column-links,.column-posts,.widefat .num{text-align:center}.widefat th#comments{vertical-align:middle}.wrap{margin:10px 20px 0 2px}.postbox .inside h2,.wrap [class$=icon32]+h2,.wrap h1,.wrap>h2:first-child{font-size:23px;font-weight:400;margin:0;padding:9px 15px 4px 0;line-height:29px}.subtitle{margin:0;padding-left:25px;color:#555d66;font-size:14px;font-weight:400;line-height:1}.wrap .add-new-h2,.wrap .add-new-h2:active,.wrap .page-title-action,.wrap .page-title-action:active{margin-left:4px;padding:4px 8px;position:relative;top:-3px;text-decoration:none;border:none;border:1px solid #ccc;-webkit-border-radius:2px;border-radius:2px;background:#f7f7f7;text-shadow:none;font-weight:600;font-size:13px;line-height:normal;color:#0073aa;cursor:pointer;outline:0}.wrap .add-new-h2:hover,.wrap .page-title-action:hover{border-color:#008EC2;background:#00a0d2;color:#fff}.page-title-action:focus{color:#124964}.ac_match,.highlight,.subsubsub a.current{color:#000}.wrap .page-title-action:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.wrap h1.long-header{padding-right:0}.wp-dialog{background-color:#fff}#available-widgets .widget-top:hover,#widgets-left .widget-in-question .widget-top,#widgets-left .widget-top:hover,.widgets-chooser ul,div#widgets-right .widget-top:hover{border-color:#999;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1)}.sorthelper{background-color:#ccf3fa}.alternate,.striped>tbody>:nth-child(odd),ul.striped>:nth-child(odd){background-color:#f9f9f9}.bar{background-color:#e8e8e8;border-right-color:#99d}.highlight{background-color:#e4f2fd}.wp-ui-primary{color:#fff;background-color:#32373c}.wp-ui-text-primary{color:#32373c}.wp-ui-highlight{color:#fff;background-color:#1e8cbe}.wp-ui-text-highlight{color:#1e8cbe}.wp-ui-notification{color:#fff;background-color:#d54e21}.wp-ui-text-notification{color:#d54e21}.wp-ui-text-icon{color:#82878c}img.emoji{display:inline!important;border:none!important;height:1em!important;width:1em!important;margin:0 .07em!important;vertical-align:-.1em!important;background:0 0!important;padding:0!important;-webkit-box-shadow:none!important;box-shadow:none!important}.filter-group,.wp-filter{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04)}#nav-menu-footer,#nav-menu-header,#your-profile #rich_editing,.checkbox,.control-section .accordion-section-title,.menu-item-handle,.postbox .hndle,.side-info,.sidebar-name,.stuffbox .hndle,.widefat tfoot td,.widefat tfoot th,.widefat thead td,.widefat thead th,.widget .widget-top{line-height:1.4em}.menu-item-handle,.widget .widget-top{background:#fafafa;color:#23282d}.postbox .hndle,.stuffbox .hndle{border-bottom:1px solid #eee;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.quicktags,.search{background-color:#ccc;color:#000;font-size:12px}.icon32{display:none}#bulk-titles div a:before,.notice-dismiss:before,.tagchecklist span a:before,.welcome-panel .welcome-panel-close:before{background:0 0;color:#b4b9be;content:"\f153";display:block;font:400 16px/20px dashicons;speak:none;height:20px;text-align:center;width:20px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.welcome-panel .welcome-panel-close:before{margin:0}#bulk-titles div a:before,.tagchecklist span a:before{margin:1px 0}#bulk-titles div a:hover:before,.tagchecklist span a:hover:before,.welcome-panel .welcome-panel-close:focus:before,.welcome-panel .welcome-panel-close:hover:before{color:#c00}.key-labels label{line-height:24px}b,strong{font-weight:600}.pre{white-space:pre-wrap}#namediv td.first,#plugin-information-title,.nav-tab,.no-break,.star-rating{white-space:nowrap}.howto{color:#666;font-style:italic;display:block}p.install-help{margin:8px 0;font-style:italic}hr{border:0;border-top:1px solid #ddd;border-bottom:1px solid #fafafa}#all-plugins-table .plugins a.delete,#media-items a.delete,#media-items a.delete-permanently,#nav-menu-footer .menu-delete,#search-plugins-table .plugins a.delete,.plugins a.delete,.row-actions span.delete a,.row-actions span.spam a,.row-actions span.trash a,.submitbox .submitdelete{color:#a00}#all-plugins-table .plugins a.delete:hover,#media-items a.delete-permanently:hover,#media-items a.delete:hover,#nav-menu-footer .menu-delete:hover,#search-plugins-table .plugins a.delete:hover,.file-error,.plugins a.delete:hover,.row-actions .delete a:hover,.row-actions .spam a:hover,.row-actions .trash a:hover,.submitbox .submitdelete:hover,.widget-control-remove:hover,abbr.required,span.required{color:red;text-decoration:none;border:none}#major-publishing-actions{padding:10px;clear:both;border-top:1px solid #ddd;background:#f5f5f5}#delete-action{line-height:28px;vertical-align:middle;text-align:left;float:left}#publishing-action{text-align:right;float:right;line-height:23px}#misc-publishing-actions{padding:6px 0 0}.misc-pub-section{padding:6px 10px 8px}#minor-publishing-actions{padding:10px 10px 0;text-align:right}.preview{float:right}#sticky-span{margin-left:18px}.approve,.unapproved .unapprove{display:none}.spam .approve,.trash .approve,.unapproved .approve{display:inline}td.action-links,th.action-links{text-align:right}.wp-filter{display:inline-block;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:12px 0 25px;padding:0 10px;width:100%;box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;background:#fff;color:#555;font-size:13px}.filter-group,html.wp-toolbar{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.wp-filter a{text-decoration:none}.filter-count{display:inline-block;vertical-align:middle;min-width:4em}.filter-count .count,.title-count{display:inline-block;position:relative;top:-1px;padding:4px 10px;-webkit-border-radius:30px;border-radius:30px;background:#72777c;color:#fff;font-size:14px;font-weight:600}.title-count{display:inline;top:-3px;margin-left:5px;margin-right:20px}.filter-items{float:left}.filter-links,.filter-links li{display:inline-block;margin:0}.filter-links li>a{display:inline-block;margin:0 10px;padding:15px 0;border-bottom:4px solid #fff;color:#666;cursor:pointer}.filter-links .current{-webkit-box-shadow:none;box-shadow:none;border-bottom:4px solid #666;color:#23282d}.filter-links li>a:focus,.filter-links li>a:hover,.show-filters .filter-links a.current:focus,.show-filters .filter-links a.current:hover{color:#00a0d2}.wp-filter .search-form{float:right;margin:10px 0}.wp-filter .search-form input[type=search]{margin:0;padding:3px 5px;width:280px;max-width:100%;font-size:16px;font-weight:300;line-height:1.5}.wp-filter .search-form select{margin:0;height:32px;vertical-align:top}.wp-filter .search-form.search-plugins{display:inline-block}.wp-filter .drawer-toggle{display:inline-block;margin:0 10px;padding:4px 6px;color:#666;cursor:pointer}.wp-filter .drawer-toggle:before{display:inline-block;vertical-align:top;content:"\f111";margin:0 5px 0 0;width:16px;height:16px;color:#72777c;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;font-family:dashicons;font-size:16px;line-height:1;text-align:center;text-decoration:inherit;font-weight:400;font-style:normal;-webkit-font-smoothing:antialiased}.filter-drawer,.wp-filter .favorites-form{margin:0 -20px;padding:20px;border-top:1px solid #eee;background:#fafafa}.wp-filter .drawer-toggle:hover,.wp-filter .drawer-toggle:hover:before{color:#00a0d2}.wp-filter .drawer-toggle.current:before{color:#fff}.wp-filter .favorites-form{display:none;overflow:hidden;width:100%}.show-favorites-form .wp-filter .favorites-form{display:block}.filter-drawer{display:none}.show-filters .filter-drawer{display:block;overflow:hidden;width:100%}.show-filters .wp-filter .drawer-toggle:focus,.show-filters .wp-filter .drawer-toggle:hover{background:#2ea2cc}.show-filters .filter-links a.current{border-bottom:none}.show-filters .wp-filter .drawer-toggle{-webkit-border-radius:2px;border-radius:2px;border:none;background:#72777c;color:#fff}.filter-group,.filtered-by .tag{border:1px solid #e5e5e5;background:#fff}.show-filters .wp-filter .drawer-toggle:before{color:#fff}.filter-group{box-sizing:border-box;position:relative;float:left;margin:0 1% 0 0;padding:20px 10px 10px;width:24%;box-shadow:0 1px 1px rgba(0,0,0,.04)}.filter-group legend{position:absolute;top:10px;display:block;margin:0;padding:0;font-size:1em;font-weight:600}.filter-drawer .filter-group-feature{margin:28px 0 0;list-style-type:none;font-size:12px}.filter-drawer .filter-group-feature input,.filter-drawer .filter-group-feature label{display:inline-block;margin:7px 4px 7px 0;line-height:16px}.filter-drawer .buttons{margin-bottom:20px}.filter-drawer .buttons .button span{display:inline-block;opacity:.8;font-size:12px;text-indent:10px}.wp-filter .button.clear-filters{display:none;margin-left:10px}.filtered-by{display:none;margin:0}.filtered-by>span{font-weight:600}.filtered-by a{margin-left:10px}.filtered-by .tags{display:inline}.filtered-by .tag{margin:0 5px;padding:4px 8px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);font-size:11px}.filters-applied .filter-drawer .buttons,.filters-applied .filter-drawer br,.filters-applied .filter-group{display:none!important}.filters-applied .filtered-by{display:block}.filters-applied .filter-drawer{padding:20px}.error .content-filterable,.loading-content .content-filterable,.show-filters .content-filterable,.show-filters.filters-applied.loading-content .content-filterable{display:none}.show-filters.filters-applied .content-filterable{display:block}.loading-content .spinner{display:block;margin:40px auto 0;float:none}@media only screen and (max-width:1120px){.filter-drawer{border-bottom:1px solid #eee}.filter-group{margin-bottom:0;margin-top:5px;width:100%}.filter-group li{margin:10px 0}}@media only screen and (max-width:1000px){.filter-items{float:none}.wp-filter .media-toolbar-primary,.wp-filter .media-toolbar-secondary,.wp-filter .search-form{float:none;position:relative;max-width:100%}}@media only screen and (max-width:782px){.filter-group li{padding:0;width:50%}}@media only screen and (max-width:320px){.filter-count{display:none}.wp-filter .drawer-toggle{margin:10px 0}.filter-group li,.wp-filter .search-form input[type=search]{width:100%}}.notice,div.error,div.updated{background:#fff;border-left:4px solid #fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin:5px 15px 2px;padding:1px 12px}div[class=update-message]{padding:.5em 12px .5em 0}.form-table td .notice p,.notice p,.notice-title,div.error p,div.updated p{margin:.5em 0;padding:2px}.error a{text-decoration:underline}.updated a{padding-bottom:2px}.notice-alt{-webkit-box-shadow:none;box-shadow:none}.notice-large{padding:10px 20px}.notice-title{display:inline-block;color:#23282d;font-size:18px}.wp-core-ui .notice.is-dismissible{padding-right:38px;position:relative}.notice-dismiss{position:absolute;top:0;right:1px;border:none;margin:0;padding:9px;background:0 0;color:#b4b9be;cursor:pointer}.notice-dismiss:active:before,.notice-dismiss:focus:before,.notice-dismiss:hover:before{color:#c00}.notice-dismiss:focus{outline:0;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 .notice-dismiss:focus{outline:#5b9dd9 solid 1px}.notice-success,div.updated{border-left-color:#46b450}.notice-success.notice-alt{background-color:#ecf7ed}.notice-warning{border-left-color:#ffb900}.notice-warning.notice-alt{background-color:#fff8e5}.notice-error,div.error{border-left-color:#dc3232}.notice-error.notice-alt{background-color:#fbeaea}.notice-info{border-left-color:#00a0d2}.notice-info.notice-alt{background-color:#e5f5fa}.button.installed:before,.button.installing:before,.button.updated-message:before,.button.updating-message:before,.import-php .updating-message:before,.update-message p:before,.updated-message p:before,.updating-message p:before{display:inline-block;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}.media-upload-form .notice,.media-upload-form div.error,.wrap .notice,.wrap div.error,.wrap div.updated{margin:5px 0 15px}.button.installing:before,.button.updating-message:before,.import-php .updating-message:before,.update-message p:before,.updating-message p:before{color:#f56e28;content:"\f463"}.button.installing:before,.button.updating-message:before,.import-php .updating-message:before,.updating-message p:before{-webkit-animation:rotation 2s infinite linear;animation:rotation 2s infinite linear}.button.updated-message:before,.installed p:before,.updated-message p:before{color:#79ba49;content:'\f147'}.update-message.notice-error p:before{color:#dc3232;content:"\f534"}.import-php .updating-message:before,.wrap .notice p:before{margin-right:6px;vertical-align:bottom}#update-nag,.update-nag{display:inline-block;line-height:19px;padding:11px 15px;font-size:14px;text-align:left;margin:25px 20px 0 2px;background-color:#fff;border-left:4px solid #ffba00;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}#screen-meta,ul#dismissed-updates{display:none}form.upgrade{margin-top:8px}form.upgrade .hint{font-style:italic;font-size:85%;margin:-.5em 0 2em}.update-php .spinner{float:none;margin:-4px 0}#ajax-loading,.ajax-feedback,.ajax-loading,.imgedit-wait-spin,.list-ajax-loading{visibility:hidden}#ajax-response.alignleft{margin-left:2em}.button.installed:before,.button.installing:before,.button.updated-message:before,.button.updating-message:before{margin:3px 5px 0 -2px}.button-primary.updating-message:before{color:#fff}.button-primary.updated-message:before{color:#66c6e4}.button.updated-message,.notice .button-link{-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.notice .button-link{color:#0073aa}.notice .button-link:active,.notice .button-link:hover{color:#00a0d2}@media aural{.button.installed:before,.button.installing:before,.update-message p:before,.wrap .notice p:before{speak:none}}#adminmenu a,#catlist a,#taglist a{text-decoration:none}#contextual-help-wrap,#screen-options-wrap{margin:0;padding:8px 20px 12px;position:relative}#contextual-help-wrap{overflow:auto;margin-left:0!important}#screen-meta .screen-reader-text{visibility:hidden}#screen-meta-links{margin:0 20px 0 0}#screen-meta{margin:0 20px -1px 0;position:relative;background-color:#fff;border:1px solid #ddd;border-top:none;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.025);box-shadow:0 1px 0 rgba(0,0,0,.025)}#contextual-help-link-wrap,#screen-options-link-wrap{float:right;height:28px;margin:0 0 0 6px;border:1px solid #ddd;border-top:none;background:#fff;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1)}#screen-meta-links .screen-meta-toggle{position:relative;top:0}#screen-meta-links .show-settings{border:0;background:0 0;-webkit-border-radius:0;border-radius:0;color:#72777c;line-height:1.7;padding:3px 6px 3px 16px}#screen-meta-links .show-settings:active,#screen-meta-links .show-settings:focus,#screen-meta-links .show-settings:hover{color:#32373c}#screen-meta-links .show-settings:active{-webkit-box-shadow:none;box-shadow:none;-webkit-transform:none;-ms-transform:none;transform:none}#screen-meta-links .show-settings:after{right:0;content:"\f140";font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 5px 0 0;bottom:2px;position:relative;vertical-align:bottom;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#72777c}#templateside ul li a,#wpfooter a,.nav-tab{text-decoration:none}#screen-meta-links .screen-meta-active:after{content:"\f142"}.toggle-arrow{background-repeat:no-repeat;background-position:top left;background-color:transparent;height:22px;line-height:22px;display:block}.toggle-arrow-active{background-position:bottom left}#contextual-help-wrap h5,#screen-options-wrap h5,#screen-options-wrap legend{margin:0;padding:8px 0;font-size:13px;font-weight:600}.hndle a,.widefat tfoot td,.widefat th,.widefat thead td{font-weight:400}.ie8 #screen-options-wrap legend{color:inherit}.metabox-prefs label{display:inline-block;padding-right:15px;line-height:30px}#number-of-columns{display:inline-block;vertical-align:middle;line-height:30px}.metabox-prefs input[type=checkbox]{margin-top:0;margin-right:6px}.metabox-prefs label input,.metabox-prefs label input[type=checkbox]{margin:-4px 5px 0 0}.metabox-prefs .columns-prefs label input{margin:-1px 2px 0 0}.metabox-prefs label a{display:none}.metabox-prefs .screen-options input,.metabox-prefs .screen-options label{margin-top:0;margin-bottom:0;vertical-align:middle}.metabox-prefs .screen-options .screen-per-page{margin-right:15px}.metabox-prefs .screen-options label{line-height:28px;padding-right:0}.screen-options+.screen-options{margin-top:10px}.metabox-prefs .submit{margin-top:1em;padding:0}#contextual-help-wrap{padding:0}#contextual-help-columns{position:relative}#contextual-help-back{position:absolute;top:0;bottom:0;left:150px;right:170px;border:1px solid #e1e1e1;border-top:none;border-bottom:none;background:#f6fbfd}#contextual-help-wrap.no-sidebar #contextual-help-back{right:0;border-right-width:0;-webkit-border-bottom-right-radius:2px;border-bottom-right-radius:2px}.contextual-help-tabs{float:left;width:150px;margin:0}.contextual-help-tabs ul{margin:1em 0}.contextual-help-tabs li{margin-bottom:0;list-style-type:none;border-style:solid;border-width:0 0 0 2px;border-color:transparent}.contextual-help-tabs a{display:block;padding:5px 5px 5px 12px;line-height:18px;text-decoration:none;border:1px solid transparent;border-right:none;border-left:none}.contextual-help-tabs a:hover{color:#32373c}.contextual-help-tabs .active{padding:0;margin:0 -1px 0 0;border-left:2px solid #00a0d2;background:#f6fbfd;-webkit-box-shadow:0 2px 0 rgba(0,0,0,.02),0 1px 0 rgba(0,0,0,.02);box-shadow:0 2px 0 rgba(0,0,0,.02),0 1px 0 rgba(0,0,0,.02)}.contextual-help-tabs .active a{border-color:#e1e1e1;color:#32373c}.contextual-help-tabs-wrap{padding:0 20px;overflow:auto}.help-tab-content{display:none;margin:0 22px 12px 0;line-height:1.6em}.help-tab-content.active{display:block}.help-tab-content ul li{list-style-type:disc;margin-left:18px}.contextual-help-sidebar{width:150px;float:right;padding:0 8px 0 12px;overflow:auto}html.wp-toolbar{padding-top:32px;box-sizing:border-box}.widefat td,.widefat th{color:#555}.widefat ol,.widefat p,.widefat tfoot tr td,.widefat tfoot tr th,.widefat thead tr td,.widefat thead tr th,.widefat ul{color:#32373c}.widefat td p{margin:2px 0 .8em}.widefat .column-comment p{margin:.6em 0}.widefat .column-comment ul{list-style:outside;margin-left:2em}.postbox-container{float:left}.postbox-container .meta-box-sortables{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wpbody-content .metabox-holder{padding-top:10px}.metabox-holder .postbox-container .empty-container{border:3px dashed #b4b9be;height:250px;position:relative}.metabox-holder .postbox-container .empty-container:after{content:attr(data-emptystring);margin:auto;position:absolute;top:0;left:0;bottom:0;right:0;height:1em;width:200px;text-align:center;color:#ccc;font-size:18px;display:none}.columns-2 #postbox-container-3 .empty-container,.columns-2 #postbox-container-4 .empty-container,.columns-3 #postbox-container-4 .empty-container,.metabox-holder.columns-1 .postbox-container .empty-container{border:0;height:0;min-height:0}#post-body-content{width:100%;min-width:463px;float:left}#post-body.columns-2 #postbox-container-1{float:right;margin-right:-300px;width:280px}#post-body.columns-2 #side-sortables{min-height:250px}@media only screen and (max-width:799px){#wpbody-content .metabox-holder .postbox-container .empty-container{border:0;height:0;min-height:0}}.js .postbox .hndle,.js .widget .widget-top{cursor:move}.hndle a{font-size:11px}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover,#dashboard_right_now .versions .b,#ed_reply_toolbar #ed_reply_strong,#pass-strength-result.short,#pass-strength-result.strong,#post-status-display,#post-visibility-display,.feature-filter .feature-name,.item-controls .item-order a,.media-item .percent,.nav-tab,.plugins .name{font-weight:600}.postbox .handlediv{display:none;float:right;width:36px;height:36px;padding:0}.js .postbox .handlediv{display:block}.sortable-placeholder{border:1px dashed #b4b9be;margin-bottom:20px}.postbox,.stuffbox{margin-bottom:20px;padding:0;line-height:1}.postbox .inside,.stuffbox .inside{padding:0 12px 12px;line-height:1.4em;font-size:13px}.postbox .inside{margin:11px 0;position:relative}.postbox .inside>p:last-child,.rss-widget ul li:last-child{margin-bottom:1px!important}.postbox.closed h3{border:none;-webkit-box-shadow:none;box-shadow:none}.postbox table.form-table{margin-bottom:0}.postbox table.widefat{-webkit-box-shadow:none;box-shadow:none}.temp-border{border:1px dotted #ccc}.columns-prefs label{padding:0 10px 0 0}#wpfooter{position:absolute;bottom:0;left:0;right:0;padding:10px 20px;color:#555d66}#wpfooter p{font-size:13px;margin:0;line-height:20px}#footer-thankyou{font-style:italic}#wpfooter a:hover{text-decoration:underline}.nav-tab{float:left;border:1px solid #ccc;border-bottom:none;margin-left:.5em;padding:5px 10px;font-size:14px;line-height:24px;background:#e5e5e5;color:#555}.nav-tab-small .nav-tab,h3 .nav-tab{padding:5px 14px;font-size:12px;line-height:16px}.nav-tab:focus,.nav-tab:hover{background-color:#fff;color:#444}.nav-tab-active,.nav-tab:focus:active{-webkit-box-shadow:none;box-shadow:none}.nav-tab-active{margin-bottom:-1px;color:#444}.nav-tab-active,.nav-tab-active:focus,.nav-tab-active:focus:active,.nav-tab-active:hover{border-bottom:1px solid #f1f1f1;background:#f1f1f1;color:#000}.wrap h2.nav-tab-wrapper,h1.nav-tab-wrapper,h3.nav-tab-wrapper{border-bottom:1px solid #ccc;margin:0;padding-top:9px;padding-bottom:0;line-height:inherit}.nav-tab-wrapper:not(.wp-clearfix):after{content:"";display:table;clear:both}.ie8 .nav-tab-wrapper{display:inline-block;width:100%;vertical-align:top}.spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;display:inline-block;visibility:hidden;float:right;vertical-align:middle;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:4px 10px 0}.loading-content .spinner,.spinner.is-active{visibility:visible}#template div{margin-right:190px}.metabox-holder .postbox>h3,.metabox-holder .stuffbox>h3,.metabox-holder h2.hndle,.metabox-holder h3.hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}.nav-menus-php .metabox-holder h3{padding:10px 10px 11px 14px;line-height:21px}.plugin-install #description,.plugin-install-network #description{width:60%}table .column-rating,table .column-visible,table .vers{text-align:left}.attention,.error-message{color:red;font-weight:600}body.iframe{height:98%}.lp-show-latest p{display:none}#howto,.importer-action,.importer-desc,.importer-title{display:block}.lp-show-latest .lp-error p,.lp-show-latest p:last-child{display:block}.media-icon{width:62px;text-align:center}.media-icon img{border:1px solid #e5e5e5;border:1px solid rgba(0,0,0,.07)}#howto{font-size:11px;margin:0 5px}.importers{font-size:16px;width:auto}.importers td{padding-right:14px;line-height:1.5em}.importers .import-system{max-width:250px}.importers td.desc{max-width:500px}.post-categories,.post-categories li{display:inline}.importer-title{color:#000;font-size:14px;font-weight:400;margin-bottom:.2em}.importer-action{line-height:20px;color:#ddd;margin-bottom:1em}.not-installed-main-site .importer-action{color:#555}#post-body #post-body-content #namediv h2,#post-body #post-body-content #namediv h3{margin-top:0}.edit-comment-author{font-size:14px;line-height:1.4;font-weight:600;color:#222;margin:2px 0 0 9px}#namediv h2 label,#namediv h3 label{vertical-align:baseline}#namediv table{width:100%}#namediv td.first{width:10px}#namediv input{width:98%}#namediv p{margin:10px 0}#submitdiv h3{margin-bottom:0!important}.checkbox,.post-categories,.zerosize,fieldset{margin:0;padding:0}.zerosize{height:0;width:0;border:0;overflow:hidden;position:absolute}br.clear{height:2px;line-height:2px}.checkbox{border:none}fieldset{border:0}div.star-holder{position:relative;height:17px;width:100px;background:url(../images/stars.png?ver=20121108) bottom left repeat-x}div.star-holder .star-rating{background:url(../images/stars.png?ver=20121108) top left repeat-x;height:17px;float:left}.star-rating .star{display:inline-block;width:20px;height:20px;-webkit-font-smoothing:antialiased;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;vertical-align:top;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;text-align:center;color:#ffb900}.star-rating .star-full:before{content:"\f155"}.star-rating .star-half:before{content:"\f459"}.rtl .star-rating .star-half{-webkit-transform:rotateY(180deg);-ms-transform:rotateY(180deg);transform:rotateY(180deg)}.star-rating .star-empty:before{content:"\f154"}div.action-links{font-weight:400;margin:6px 0 0}#plugin-information{background:#fff;position:fixed;top:0;right:0;bottom:0;left:0;height:100%;padding:0}#plugin-information-scrollable{overflow:auto;-webkit-overflow-scrolling:touch;height:100%}#plugin-information-title{padding:0 20px;background:#f5f5f5;font-size:22px;font-weight:600;line-height:56px;position:relative;top:0;right:0;left:0;height:56px;overflow:hidden;text-overflow:ellipsis}#plugin-information-title.with-banner{margin-right:0;height:250px;bottom:250px;-webkit-background-size:cover;background-size:cover}#plugin-information-title h2{font-size:1em;font-weight:600;padding:0;margin:0;max-width:680px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#plugin-information-title.with-banner h2{font-family:"Helvetica Neue",sans-serif;display:inline-block;font-size:30px;line-height:50px;padding:0 15px;margin:174px 0 0 10px;color:#fff;background:rgba(30,30,30,.9);text-shadow:0 1px 3px rgba(0,0,0,.4);-webkit-box-shadow:0 0 30px rgba(255,255,255,.1);box-shadow:0 0 30px rgba(255,255,255,.1);-webkit-border-radius:8px;border-radius:8px}#plugin-information-title div.vignette{display:none}#plugin-information-title.with-banner div.vignette{display:block;float:right;top:0;height:250px;width:772px;margin:0 -20px;background:0 0;-webkit-box-shadow:inset 0 0 50px 4px rgba(0,0,0,.2),inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 0 50px 4px rgba(0,0,0,.2),inset 0 -1px 0 rgba(0,0,0,.1)}#plugin-information-tabs{padding:0 16px;position:relative;right:0;left:0;min-height:36px;font-size:0;z-index:1;border-bottom:1px solid #ddd;background:#f3f3f3}#plugin-information-tabs a{position:relative;display:inline-block;padding:9px 10px;margin:0;height:18px;line-height:18px;font-size:14px;text-decoration:none;-webkit-transition:none;transition:none}#plugin-information-tabs a.current{margin:0 -1px -1px;background:#fff;border:1px solid #ddd;border-bottom-color:#fff;padding-top:8px;color:#32373c}#plugin-information-tabs.with-banner a.current{border-top:none;padding-top:9px}#plugin-information-tabs a:active,#plugin-information-tabs a:focus{outline:0}#plugin-information-content{overflow:hidden;background:#fff;position:relative;top:0;right:0;left:0;min-height:100%;min-height:-webkit-calc(100% - 152px);min-height:calc(100% - 152px)}#plugin-information-content.with-banner{min-height:-webkit-calc(100% - 346px);min-height:calc(100% - 346px)}#section-holder{position:relative;top:0;right:250px;bottom:0;left:0;margin-right:250px;padding:10px 26px 99999px;margin-bottom:-99939px}#section-holder .updated{margin:16px 0}#plugin-information .fyi{float:right;position:relative;top:0;right:0;padding:16px 16px 99999px;margin-bottom:-99939px;width:217px;border-left:1px solid #ddd;background:#f3f3f3;color:#666}#plugin-information .fyi strong{color:#444}#plugin-information .fyi h3{font-weight:600;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}#plugin-information .fyi h2{font-size:.9em;margin-bottom:0;margin-right:0}#plugin-information .fyi ul{padding:0;margin:0;list-style:none}#plugin-information .fyi li{margin:0 0 10px}#plugin-information .fyi-description{margin-top:0}#plugin-information .counter-container{margin:3px 0}#plugin-information .counter-label{float:left;margin-right:5px;min-width:55px}#plugin-information .counter-back{height:17px;width:92px;background-color:#e5e5e5;float:left}#plugin-information .counter-bar{height:17px;background-color:#ffc733;float:left}#plugin-information .counter-count{margin-left:5px}#plugin-information .fyi ul.contributors{margin-top:10px}#plugin-information .fyi ul.contributors li{display:inline-block;margin-right:8px;vertical-align:middle}#plugin-information .fyi ul.contributors li img{vertical-align:middle;margin-right:4px}#plugin-information-footer{padding:13px 16px;position:absolute;right:0;bottom:0;left:0;height:33px;border-top:1px solid #ddd;background:#f3f3f3}#plugin-information .section ol,#plugin-information .section ul{list-style-type:disc;margin-left:24px}#plugin-information .section,#plugin-information .section p{font-size:14px;line-height:1.7}#plugin-information #section-screenshots ol{list-style:none;margin:0}#plugin-information #section-screenshots li img{vertical-align:text-top;margin-top:16px;max-width:100%;width:auto;height:auto;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}#plugin-information #section-screenshots li p{font-style:italic;padding-left:20px}#plugin-information pre{padding:7px;overflow:auto;border:1px solid #ccc}#plugin-information .review{overflow:hidden;width:100%;margin-bottom:20px;border-bottom:1px solid #e5e5e5}#plugin-information .review-title-section{overflow:hidden}#plugin-information .review-title-section h4{display:inline-block;float:left;margin:0 6px 0 0}#plugin-information .reviewer-info p{clear:both;margin:0;padding-top:2px}#plugin-information .reviewer-info .avatar{float:left;margin:4px 6px 0 0}#plugin-information .reviewer-info .star-rating{float:left}#plugin-information .review-meta{float:left;margin-left:.75em}#plugin-information .review-body{float:left;width:100%}.plugin-version-author-uri{font-size:13px}@media screen and (max-width:771px){#plugin-information-title.with-banner{height:100px;bottom:100px}#plugin-information-title.with-banner h2{margin-top:30px;font-size:20px;line-height:40px;max-width:85%}#plugin-information-title.with-banner div.vignette{height:100px;bottom:100px;width:800%}#plugin-information-tabs{overflow:hidden;padding:0;height:auto}#plugin-information-tabs a.current{margin-bottom:0;border-bottom:none}#plugin-information .fyi{float:none;border:1px solid #ddd;position:static;width:auto;margin:26px 26px 0;padding-bottom:0}#section-holder{position:static;margin:0;padding-bottom:70px}#plugin-information .fyi h3,#plugin-information .fyi small{display:none}#plugin-information-footer{padding:12px 16px 0;height:46px}}body.about-php #TB_window,body.import-php #TB_window,body.index-php #TB_window,body.plugin-install-php #TB_window,body.plugins-php #TB_window,body.update-core-php #TB_window{background:#fcfcfc}.ie8 body.about-php #TB_window:before,.ie8 body.import-php #TB_window:before,.ie8 body.index-php #TB_window:before,.ie8 body.plugin-install-php #TB_window:before,.ie8 body.plugins-php #TB_window:before,.ie8 body.update-core-php #TB_window:before{content:" ";background:0 0}body.about-php #TB_window.thickbox-loading:before,body.import-php #TB_window.thickbox-loading:before,body.index-php #TB_window.thickbox-loading:before,body.plugin-install-php #TB_window.thickbox-loading:before,body.plugins-php #TB_window.thickbox-loading:before,body.update-core-php #TB_window.thickbox-loading:before{content:"";display:block;width:20px;height:20px;position:absolute;left:50%;top:50%;z-index:-1;margin:-10px 0 0 -10px;background:url(../images/spinner.gif) center no-repeat #fcfcfc;-webkit-background-size:20px 20px;background-size:20px 20px;-webkit-transform:translateZ(0);transform:translateZ(0)}body.about-php #TB_ajaxWindowTitle,body.about-php .tb-close-icon,body.import-php #TB_ajaxWindowTitle,body.import-php .tb-close-icon,body.index-php #TB_ajaxWindowTitle,body.index-php .tb-close-icon,body.plugin-install-php #TB_ajaxWindowTitle,body.plugin-install-php .tb-close-icon,body.plugins-php #TB_ajaxWindowTitle,body.plugins-php .tb-close-icon,body.update-core-php #TB_ajaxWindowTitle,body.update-core-php .tb-close-icon{display:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){body.about-php #TB_window.thickbox-loading:before,body.import-php #TB_window.thickbox-loading:before,body.index-php #TB_window.thickbox-loading:before,body.plugin-install-php #TB_window.thickbox-loading:before,body.plugins-php #TB_window.thickbox-loading:before,body.update-core-php #TB_window.thickbox-loading:before{background-image:url(../images/spinner-2x.gif)}}body.about-php #TB_title,body.import-php #TB_title,body.index-php #TB_title,body.plugin-install-php #TB_title,body.plugins-php #TB_title,body.update-core-php #TB_title{float:left;height:1px}.about-php #TB_closeWindowButton,.import-php #TB_closeWindowButton,.index-php #TB_closeWindowButton,.plugin-install-php #TB_closeWindowButton,.plugins-php #TB_closeWindowButton,.update-core-php #TB_closeWindowButton{left:auto;right:-30px;color:#eee}body.about-php #TB_closeWindowButton:focus,body.about-php #TB_closeWindowButton:hover,body.import-php #TB_closeWindowButton:focus,body.import-php #TB_closeWindowButton:hover,body.index-php #TB_closeWindowButton:focus,body.index-php #TB_closeWindowButton:hover,body.plugin-install-php #TB_closeWindowButton:focus,body.plugin-install-php #TB_closeWindowButton:hover,body.plugins-php #TB_closeWindowButton:focus,body.plugins-php #TB_closeWindowButton:hover,body.update-core-php #TB_closeWindowButton:focus,body.update-core-php #TB_closeWindowButton:hover{color:#00a0d2;outline:0;-webkit-box-shadow:none;box-shadow:none}body.about-php #TB_closeWindowButton:after,body.import-php #TB_closeWindowButton:after,body.index-php #TB_closeWindowButton:after,body.plugin-install-php #TB_closeWindowButton:after,body.plugins-php #TB_closeWindowButton:after,body.update-core-php #TB_closeWindowButton:after{content:"\f335";font:400 32px/29px dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media screen and (max-width:830px){body.about-php #TB_closeWindowButton,body.import-php #TB_closeWindowButton,body.index-php #TB_closeWindowButton,body.plugin-install-php #TB_closeWindowButton,body.plugins-php #TB_closeWindowButton,body.update-core-php #TB_closeWindowButton{right:0;top:-30px}}img{border:none}.bulk-action-notice .toggle-indicator:before,.js .meta-box-sortables .postbox .toggle-indicator:before,.js .sidebar-name .sidebar-name-arrow:before{content:"\f142";display:inline-block;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.bulk-action-notice .bulk-action-errors-collapsed .toggle-indicator:before,.js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before,.js .widgets-holder-wrap.closed .sidebar-name-arrow:before{content:"\f140"}.js .sidebar-name .sidebar-name-arrow:before{padding:10px;left:0}.js #widgets-left .sidebar-name .sidebar-name-arrow{display:none}.accordion-section.open .accordion-section-content,.js #widgets-left .sidebar-name:hover .sidebar-name-arrow,.js #widgets-left .widgets-holder-wrap.closed .sidebar-name .sidebar-name-arrow,.no-js .accordion-section .accordion-section-content{display:block}.js .postbox .handlediv .toggle-indicator:before{margin-top:4px;width:20px;-webkit-border-radius:50%;border-radius:50%;text-indent:-1px}#postcustomstuff p.submit,#templateside h2,.alignleft h2{margin:0}.rtl.js .postbox .handlediv .toggle-indicator:before{text-indent:1px}.bulk-action-notice .toggle-indicator:before{line-height:16px;vertical-align:top;color:#72777c}.js .postbox .handlediv:focus{-webkit-box-shadow:none;box-shadow:none;outline:0}.js .postbox .handlediv:focus .toggle-indicator:before{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#photo-add-url-div input[type=text]{width:300px}#template textarea{font-family:Consolas,Monaco,monospace;font-size:13px;width:97%;background:#f9f9f9;outline:0}#template p{width:97%}#templateside{float:right;width:190px}#templateside h4{margin:1em 0 0}#templateside ol,#templateside ul{margin:.5em 0;padding:0}#templateside li{margin:4px 0}#templateside li a,.theme-editor-php .highlight{display:block;padding:3px 3px 3px 12px;text-decoration:none}.theme-editor-php .highlight{margin:-3px 3px -3px -12px}#templateside .highlight{border:none;font-weight:600}.nonessential{color:#666;font-size:11px;font-style:italic;padding-left:12px}#documentation{margin-top:10px}#documentation label{line-height:22px;vertical-align:baseline;font-weight:600}.fileedit-sub{padding:10px 0 8px;line-height:180%}.accordion-section-title:after,.control-section .accordion-section-title:after,.nav-menus-php .item-edit:before,.widget-top a.widget-action:after{right:0;content:"\f140";border:none;background:0 0;font:400 20px/1 dashicons;speak:none;display:block;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.accordion-section-title:after,.handlediv,.item-edit,.sidebar-name-arrow{color:#72777c}.widget-action{color:#555d66}.accordion-section-title:hover:after,.handlediv:focus,.handlediv:hover,.item-edit:focus,.item-edit:hover,.sidebar-name:hover .sidebar-name-arrow,.widget-action:focus,.widget-top:hover .widget-action{color:#23282d}.widget-top a.widget-action:after{padding:1px 2px 1px 0;margin-top:10px;margin-right:10px;-webkit-border-radius:50%;border-radius:50%}.widget-top a.widget-action:focus:after{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.accordion-section-title:after,.control-section .accordion-section-title:after{float:right;right:20px;top:-2px}#customize-info.open .accordion-section-title:after,.control-section.open .accordion-section-title:after,.nav-menus-php .menu-item-edit-active .item-edit:before,.widget.open .widget-top a.widget-action:after{content:"\f142"}/*!
  * jQuery UI Draggable/Sortable 1.11.4
  * http://jqueryui.com
  *
  * Copyright jQuery Foundation and other contributors
  * Released under the MIT license.
  * http://jquery.org/license
- */.ui-draggable-handle,.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.accordion-section{border-bottom:1px solid #ddd;margin:0}.accordion-section.open:hover{border-bottom-color:#ddd}.accordion-section-content{display:none;padding:10px 20px 15px;overflow:hidden;background:#fff}.accordion-section-title{margin:0;padding:12px 15px 15px;position:relative;border-left:1px solid #ddd;border-right:1px solid #ddd;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.js .accordion-section-title{cursor:pointer}.js .accordion-section-title:after{position:absolute;top:12px;right:10px;z-index:1}.accordion-section-title:focus{outline:0}.accordion-section-title:focus:after,.accordion-section-title:hover:after{border-color:#a0a5aa transparent}.cannot-expand .accordion-section-title{cursor:auto}.cannot-expand .accordion-section-title:after{display:none}.control-section .accordion-section-title{border-left:none;border-right:none;padding:10px 10px 11px 14px;line-height:21px;background:#fff}.control-section .accordion-section-title:after{top:11px}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{color:#23282d;background:#f5f5f5}.control-section.open .accordion-section-title{border-bottom:1px solid #ddd}.network-admin .edit-site-actions{margin-top:0}.my-sites{display:block;overflow:auto;zoom:1}.my-sites li{display:block;padding:8px 3%;min-height:130px;margin:0}@media only screen and (max-width:599px){.my-sites li{min-height:0}}@media only screen and (min-width:600px){.my-sites.striped li{background-color:#fff;position:relative}.my-sites.striped li:after{content:"";width:1px;height:100%;position:absolute;top:0;right:0;background:#ccc}}@media only screen and (min-width:600px) and (max-width:699px){.my-sites li{float:left;width:44%}.my-sites.striped li{background-color:#fff}.my-sites.striped li:nth-of-type(2n+1){clear:left}.my-sites.striped li:nth-of-type(2n+2):after{content:none}.my-sites li:nth-of-type(4n+1),.my-sites li:nth-of-type(4n+2){background-color:#f9f9f9}}@media only screen and (min-width:700px) and (max-width:1199px){.my-sites li{float:left;width:27.333333%;background-color:#fff}.my-sites.striped li:nth-of-type(3n+3):after{content:none}.my-sites li:nth-of-type(6n+1),.my-sites li:nth-of-type(6n+2),.my-sites li:nth-of-type(6n+3){background-color:#f9f9f9}}@media only screen and (min-width:1200px) and (max-width:1399px){.my-sites li{float:left;width:21%;padding:8px 2%;background-color:#fff}.my-sites.striped li:nth-of-type(4n+1){clear:left}.my-sites.striped li:nth-of-type(4n+4):after{content:none}.my-sites li:nth-of-type(8n+1),.my-sites li:nth-of-type(8n+2),.my-sites li:nth-of-type(8n+3),.my-sites li:nth-of-type(8n+4){background-color:#f9f9f9}}@media only screen and (min-width:1400px) and (max-width:1599px){.my-sites li{float:left;width:16%;padding:8px 2%;background-color:#fff}.my-sites.striped li:nth-of-type(5n+1){clear:left}.my-sites.striped li:nth-of-type(5n+5):after{content:none}.my-sites li:nth-of-type(10n+1),.my-sites li:nth-of-type(10n+2),.my-sites li:nth-of-type(10n+3),.my-sites li:nth-of-type(10n+4),.my-sites li:nth-of-type(10n+5){background-color:#f9f9f9}}@media only screen and (min-width:1600px){.my-sites li{float:left;width:12.666666%;padding:8px 2%;background-color:#fff}.my-sites.striped li:nth-of-type(6n+1){clear:left}.my-sites.striped li:nth-of-type(6n+6):after{content:none}.my-sites li:nth-of-type(12n+1),.my-sites li:nth-of-type(12n+2),.my-sites li:nth-of-type(12n+3),.my-sites li:nth-of-type(12n+4),.my-sites li:nth-of-type(12n+5),.my-sites li:nth-of-type(12n+6){background-color:#f9f9f9}}.my-sites li a{text-decoration:none}@media only screen and (min-width:769px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (max-width:860px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (min-width:980px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (max-width:768px){#col-left,#col-right{width:100%}}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){div.star-holder,div.star-holder .star-rating{background:url(../images/stars-2x.png?ver=20121108) bottom left repeat-x;-webkit-background-size:21px 37px;background-size:21px 37px}.spinner{background-image:url(../images/spinner-2x.gif)}#bulk-titles div a,#bulk-titles div a:hover,#screen-meta-links a.show-settings,.curtime #timestamp,.meta-box-sortables .postbox:hover .handlediv,.sidebar-name-arrow,.sidebar-name:hover .sidebar-name-arrow,.tagchecklist span a,.tagchecklist span a:hover,.widget-top a.widget-action,.widget-top a.widget-action:hover{background:0 0!important}}@-ms-viewport{width:device-width}@media screen and (max-width:782px){#template div,#templateside{float:none;width:auto}html.wp-toolbar{padding-top:46px}body{min-width:240px;overflow-x:hidden}body *{-webkit-tap-highlight-color:rgba(0,0,0,0)!important}#wpcontent{position:relative;margin-left:0;padding-left:10px}#wpbody-content{padding-bottom:100px}.wrap{margin-right:12px;margin-left:0}.col-wrap{padding:0}#collapse-menu,#screen-meta,#screen-meta-links,.post-format-select{display:none!important}.wrap .add-new-h2,.wrap .add-new-h2:active,.wrap .page-title-action,.wrap .page-title-action:active{padding:10px 15px;font-size:14px;white-space:nowrap}.wp-color-result{height:auto;padding-left:45px}.wp-color-result:after{font-size:14px;height:auto;padding:6px 14px}.media-upload-form div.error,.notice,.wrap div.error,.wrap div.updated{margin:20px 0 10px;padding:5px 10px;font-size:14px;line-height:175%}.wp-core-ui .notice.is-dismissible{padding-right:46px}.notice-dismiss{padding:13px}.wrap .icon32+h2{margin-top:-2px}.wp-responsive-open #wpbody{right:-190px}code{word-wrap:break-word}.postbox{font-size:14px}.metabox-holder .postbox>h3,.metabox-holder .stuffbox>h3,.metabox-holder h2,.metabox-holder h3.hndle{padding:12px}.postbox .handlediv{margin-top:3px}.subsubsub{font-size:16px;text-align:center;margin-bottom:15px}#templateside li{margin:0}#templateside li a{display:block;padding:5px}#templateside .highlight{padding:5px;margin-left:-5px;margin-top:-5px}#template div{margin:0}#template textarea{width:100%}.fileedit-sub .alignright{margin-top:15px}#comments-form .checkforspam,#wpfooter{display:none}.edit-comment-author{margin:2px 0 0}.filter-drawer .filter-group-feature input,.filter-drawer .filter-group-feature label{line-height:25px}}@media screen and (max-width:600px){#wpwrap.wp-responsive-open,div#post-body.metabox-holder.columns-1{overflow-x:hidden}html.wp-toolbar{padding-top:0}#wpbody{padding-top:46px}.wrap h2.nav-tab-wrapper,h1.nav-tab-wrapper,h3.nav-tab-wrapper{border-bottom:0}h1 .nav-tab,h2 .nav-tab,h3 .nav-tab{margin:10px 10px 0 0;border-bottom:1px solid #ccc}}@media screen and (max-width:320px){#network_dashboard_right_now .subsubsub{font-size:14px;text-align:left}}
\ No newline at end of file
+ */.ui-draggable-handle,.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.accordion-section{border-bottom:1px solid #ddd;margin:0}.accordion-section.open:hover{border-bottom-color:#ddd}.accordion-section-content{display:none;padding:10px 20px 15px;overflow:hidden;background:#fff}.accordion-section-title{margin:0;padding:12px 15px 15px;position:relative;border-left:1px solid #ddd;border-right:1px solid #ddd;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.js .accordion-section-title{cursor:pointer}.js .accordion-section-title:after{position:absolute;top:12px;right:10px;z-index:1}.accordion-section-title:focus{outline:0}.accordion-section-title:focus:after,.accordion-section-title:hover:after{border-color:#a0a5aa transparent}.cannot-expand .accordion-section-title{cursor:auto}.cannot-expand .accordion-section-title:after{display:none}.control-section .accordion-section-title{border-left:none;border-right:none;padding:10px 10px 11px 14px;line-height:21px;background:#fff}.control-section .accordion-section-title:after{top:11px}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{color:#23282d;background:#f5f5f5}.control-section.open .accordion-section-title{border-bottom:1px solid #ddd}.network-admin .edit-site-actions{margin-top:0}.my-sites{display:block;overflow:auto;zoom:1}.my-sites li{display:block;padding:8px 3%;min-height:130px;margin:0}@media only screen and (max-width:599px){.my-sites li{min-height:0}}@media only screen and (min-width:600px){.my-sites.striped li{background-color:#fff;position:relative}.my-sites.striped li:after{content:"";width:1px;height:100%;position:absolute;top:0;right:0;background:#ccc}}@media only screen and (min-width:600px) and (max-width:699px){.my-sites li{float:left;width:44%}.my-sites.striped li{background-color:#fff}.my-sites.striped li:nth-of-type(2n+1){clear:left}.my-sites.striped li:nth-of-type(2n+2):after{content:none}.my-sites li:nth-of-type(4n+1),.my-sites li:nth-of-type(4n+2){background-color:#f9f9f9}}@media only screen and (min-width:700px) and (max-width:1199px){.my-sites li{float:left;width:27.333333%;background-color:#fff}.my-sites.striped li:nth-of-type(3n+3):after{content:none}.my-sites li:nth-of-type(6n+1),.my-sites li:nth-of-type(6n+2),.my-sites li:nth-of-type(6n+3){background-color:#f9f9f9}}@media only screen and (min-width:1200px) and (max-width:1399px){.my-sites li{float:left;width:21%;padding:8px 2%;background-color:#fff}.my-sites.striped li:nth-of-type(4n+1){clear:left}.my-sites.striped li:nth-of-type(4n+4):after{content:none}.my-sites li:nth-of-type(8n+1),.my-sites li:nth-of-type(8n+2),.my-sites li:nth-of-type(8n+3),.my-sites li:nth-of-type(8n+4){background-color:#f9f9f9}}@media only screen and (min-width:1400px) and (max-width:1599px){.my-sites li{float:left;width:16%;padding:8px 2%;background-color:#fff}.my-sites.striped li:nth-of-type(5n+1){clear:left}.my-sites.striped li:nth-of-type(5n+5):after{content:none}.my-sites li:nth-of-type(10n+1),.my-sites li:nth-of-type(10n+2),.my-sites li:nth-of-type(10n+3),.my-sites li:nth-of-type(10n+4),.my-sites li:nth-of-type(10n+5){background-color:#f9f9f9}}@media only screen and (min-width:1600px){.my-sites li{float:left;width:12.666666%;padding:8px 2%;background-color:#fff}.my-sites.striped li:nth-of-type(6n+1){clear:left}.my-sites.striped li:nth-of-type(6n+6):after{content:none}.my-sites li:nth-of-type(12n+1),.my-sites li:nth-of-type(12n+2),.my-sites li:nth-of-type(12n+3),.my-sites li:nth-of-type(12n+4),.my-sites li:nth-of-type(12n+5),.my-sites li:nth-of-type(12n+6){background-color:#f9f9f9}}.my-sites li a{text-decoration:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){div.star-holder,div.star-holder .star-rating{background:url(../images/stars-2x.png?ver=20121108) bottom left repeat-x;-webkit-background-size:21px 37px;background-size:21px 37px}.spinner{background-image:url(../images/spinner-2x.gif)}#bulk-titles div a,#bulk-titles div a:hover,#screen-meta-links a.show-settings,.curtime #timestamp,.meta-box-sortables .postbox:hover .handlediv,.sidebar-name-arrow,.sidebar-name:hover .sidebar-name-arrow,.tagchecklist span a,.tagchecklist span a:hover,.widget-top a.widget-action,.widget-top a.widget-action:hover{background:0 0!important}}@-ms-viewport{width:device-width}@media screen and (max-width:782px){#col-left,#col-right,#template div,#templateside{float:none;width:auto}html.wp-toolbar{padding-top:46px}body{min-width:240px;overflow-x:hidden}body *{-webkit-tap-highlight-color:rgba(0,0,0,0)!important}#wpcontent{position:relative;margin-left:0;padding-left:10px}#wpbody-content{padding-bottom:100px}.wrap{margin-right:12px;margin-left:0}#col-left .col-wrap,#col-right .col-wrap{padding:0}#collapse-menu,#screen-meta,#screen-meta-links,.post-format-select{display:none!important}.wrap .add-new-h2,.wrap .add-new-h2:active,.wrap .page-title-action,.wrap .page-title-action:active{padding:10px 15px;font-size:14px;white-space:nowrap}.wp-color-result{height:auto;padding-left:45px}.wp-color-result:after{font-size:14px;height:auto;padding:6px 14px}.media-upload-form div.error,.notice,.wrap div.error,.wrap div.updated{margin:20px 0 10px;padding:5px 10px;font-size:14px;line-height:175%}.wp-core-ui .notice.is-dismissible{padding-right:46px}.notice-dismiss{padding:13px}.wrap .icon32+h2{margin-top:-2px}.wp-responsive-open #wpbody{right:-190px}code{word-wrap:break-word}.postbox{font-size:14px}.metabox-holder .postbox>h3,.metabox-holder .stuffbox>h3,.metabox-holder h2,.metabox-holder h3.hndle{padding:12px}.postbox .handlediv{margin-top:3px}.subsubsub{font-size:16px;text-align:center;margin-bottom:15px}#templateside li{margin:0}#templateside li a{display:block;padding:5px}#templateside .highlight{padding:5px;margin-left:-5px;margin-top:-5px}#template div{margin:0}#template textarea{width:100%}.fileedit-sub .alignright{margin-top:15px}#comments-form .checkforspam,#wpfooter{display:none}.edit-comment-author{margin:2px 0 0}.filter-drawer .filter-group-feature input,.filter-drawer .filter-group-feature label{line-height:25px}}@media screen and (max-width:600px){#wpwrap.wp-responsive-open,div#post-body.metabox-holder.columns-1{overflow-x:hidden}html.wp-toolbar{padding-top:0}#wpbody{padding-top:46px}.wrap h2.nav-tab-wrapper,h1.nav-tab-wrapper,h3.nav-tab-wrapper{border-bottom:0}h1 .nav-tab,h2 .nav-tab,h3 .nav-tab{margin:10px 10px 0 0;border-bottom:1px solid #ccc}}@media screen and (max-width:320px){#network_dashboard_right_now .subsubsub{font-size:14px;text-align:left}}
\ No newline at end of file
index b9de74087b026483049772234b1b223641ff6f33..a0f4c0b402c14026bb53d186e312751dc39eed64 100644 (file)
@@ -277,9 +277,9 @@ h3.customize-section-title {
 .accordion-sub-container.control-panel-content {
        display: none;
        position: absolute;
-       right: 300px;
+       right: 100%;
        top: 0;
-       width: 300px;
+       width: 100%;
        -webkit-transition: right ease-in-out .18s;
        transition: right ease-in-out .18s;
 }
@@ -427,8 +427,8 @@ h3.customize-section-title {
 
 .in-sub-panel #customize-info,
 .in-sub-panel #customize-theme-controls > ul > .accordion-section {
-       right: -300px;
-       width: 300px;
+       right: -100%;
+       width: 100%;
 }
 
 .in-sub-panel #customize-theme-controls .accordion-section.current-panel {
@@ -494,7 +494,7 @@ p.customize-section-description {
 .customize-control input[type="search"],
 .customize-control input[type="tel"],
 .customize-control input[type="url"] {
-       width: 98%;
+       width: 100%;
        line-height: 18px;
        margin: 0;
 }
@@ -524,7 +524,7 @@ p.customize-section-description {
        font-size: 14px;
        line-height: 24px;
        font-weight: 600;
-       margin-bottom: 5px;
+       margin-bottom: 4px;
 }
 
 .customize-control-description {
@@ -576,7 +576,7 @@ p.customize-section-description {
 }
 
 .customize-control .attachment-title {
-       font-weight: bold;
+       font-weight: 600;
        margin: 0;
        padding: 5px 10px;
 }
@@ -622,6 +622,48 @@ p.customize-section-description {
        border-left: 1px solid #ddd;
 }
 
+
+/**
+ * Notifications
+ */
+
+#customize-controls .customize-control-notifications-container { /* Scoped to #customize-controls for specificity over notification styles in common.css. */
+       margin: 4px 0 8px 0;
+       padding: 0;
+       display: none;
+       cursor: default;
+}
+
+#customize-controls .customize-control-widget_form.has-error .widget .widget-top,
+.customize-control-nav_menu_item.has-error .menu-item-bar .menu-item-handle {
+       -webkit-box-shadow: inset 0 0 0 2px #dc3232;
+       box-shadow: inset 0 0 0 2px #dc3232;
+       -webkit-transition: .15s box-shadow linear;
+       transition: .15s box-shadow linear;
+}
+
+.customize-control-notifications-container li.notice {
+       list-style: none;
+       margin: 0 0 6px 0;
+       padding: 4px 8px;
+}
+
+.customize-control-notifications-container li.notice:last-child {
+       margin-bottom: 0;
+}
+
+#customize-controls .customize-control-nav_menu_item .customize-control-notifications-container {
+       margin-top: 0;
+}
+
+#customize-controls .customize-control-widget_form .customize-control-notifications-container {
+       margin-top: 8px;
+}
+
+.customize-control-text.has-error input {
+       outline: 2px solid #dc3232;
+}
+
 /* Style for custom settings */
 
 /**
@@ -720,12 +762,10 @@ p.customize-section-description {
 
 /* Media controls */
 
-.customize-control-media .current,
-.customize-control-upload .current,
-.customize-control-image .current,
-.customize-control-background .current,
-.customize-control-cropped_image .current,
-.customize-control-site_icon .current,
+.customize-control .attachment-media-view .actions {
+       margin-top: 8px;
+}
+
 .customize-control-header .current {
        margin-bottom: 8px;
 }
@@ -749,24 +789,9 @@ p.customize-section-description {
        display: block;
 }
 
-.customize-control-media .remove-button,
-.customize-control-media .default-button,
-.customize-control-media .upload-button,
-.customize-control-upload .remove-button,
-.customize-control-upload .default-button,
-.customize-control-upload .upload-button,
-.customize-control-image .remove-button,
-.customize-control-image .default-button,
-.customize-control-image .upload-button,
-.customize-control-background .remove-button,
-.customize-control-background .default-button,
-.customize-control-background .upload-button,
-.customize-control-cropped_image .remove-button,
-.customize-control-cropped_image .default-button,
-.customize-control-cropped_image .upload-button,
-.customize-control-site_icon .remove-button,
-.customize-control-site_icon .default-button,
-.customize-control-site_icon .upload-button,
+.customize-control .attachment-media-view .remove-button,
+.customize-control .attachment-media-view .default-button,
+.customize-control .attachment-media-view .upload-button,
 .customize-control-header button.new,
 .customize-control-header button.remove {
        white-space: normal;
@@ -774,35 +799,12 @@ p.customize-section-description {
        height: auto;
 }
 
-.customize-control-media .current .container,
-.customize-control-upload .current .container,
-.customize-control-image .current .container,
-.customize-control-background .current .container,
-.customize-control-cropped_image .current .container,
-.customize-control-site_icon .current .container,
+.customize-control .attachment-media-view .thumbnail,
 .customize-control-header .current .container {
        overflow: hidden;
-       -webkit-border-radius: 2px;
-       border: 1px solid #eee;
-       -webkit-border-radius: 2px;
-       border-radius: 2px;
 }
 
-.customize-control-media .current .container,
-.customize-control-upload .current .container,
-.customize-control-background .current .container,
-.customize-control-cropped_image .current .container,
-.customize-control-site_icon .current .container,
-.customize-control-image .current .container {
-       min-height: 40px;
-}
-
-.customize-control-media .placeholder,
-.customize-control-upload .placeholder,
-.customize-control-image .placeholder,
-.customize-control-background .placeholder,
-.customize-control-cropped_image .placeholder,
-.customize-control-site_icon .placeholder,
+.customize-control .attachment-media-view .placeholder,
 .customize-control-header .placeholder {
        width: 100%;
        position: relative;
@@ -812,15 +814,10 @@ p.customize-section-description {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
-       min-height: 40px;
+       padding: 9px 0;
+       line-height: 20px;
 }
 
-.customize-control-media .inner,
-.customize-control-upload .inner,
-.customize-control-image .inner,
-.customize-control-background .inner,
-.customize-control-cropped_image .inner,
-.customize-control-site_icon .inner,
 .customize-control-header .inner {
        display: none;
        position: absolute;
@@ -831,22 +828,6 @@ p.customize-section-description {
        overflow: hidden;
 }
 
-.customize-control-media .inner,
-.customize-control-upload .inner,
-.customize-control-background .inner,
-.customize-control-cropped_image .inner,
-.customize-control-site_icon .inner,
-.customize-control-image .inner {
-       display: block;
-       min-height: 40px;
-}
-
-.customize-control-media .inner,
-.customize-control-upload .inner,
-.customize-control-image .inner,
-.customize-control-background .inner,
-.customize-control-cropped_image .inner,
-.customize-control-site_icon .inner,
 .customize-control-header .inner,
 .customize-control-header .inner .dashicons {
        line-height: 20px;
@@ -956,40 +937,19 @@ p.customize-section-description {
        margin-bottom: 0;
 }
 
-.customize-control-media img,
-.customize-control-upload img,
-.customize-control-image img,
-.customize-control-background img,
-.customize-control-cropped_image img,
+.customize-control .attachment-media-view .thumbnail-image img,
 .customize-control-header img {
-       width: 100%;
-       -webkit-border-radius: 2px;
-       border-radius: 2px;
+       max-width: 100%;
 }
 
-.customize-control-media .remove-button,
-.customize-control-media .default-button,
-.customize-control-upload .remove-button,
-.customize-control-upload .default-button,
-.customize-control-image .remove-button,
-.customize-control-image .default-button,
-.customize-control-background .remove-button,
-.customize-control-background .default-button,
-.customize-control-cropped_image .remove-button,
-.customize-control-cropped_image .default-button,
-.customize-control-site_icon .remove-button,
-.customize-control-site_icon .default-button,
+.customize-control .attachment-media-view .remove-button,
+.customize-control .attachment-media-view .default-button,
 .customize-control-header .remove {
        float: right;
        margin-left: 3px;
 }
 
-.customize-control-media .upload-button,
-.customize-control-upload .upload-button,
-.customize-control-image .upload-button,
-.customize-control-background .upload-button,
-.customize-control-cropped_image .upload-button,
-.customize-control-site_icon .upload-button,
+.customize-control .attachment-media-view .upload-button,
 .customize-control-header .new {
        float: left;
 }
@@ -1050,7 +1010,7 @@ p.customize-section-description {
        left: 10px;
        top: 50%;
        margin-top: -14px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .control-section-themes .accordion-section-title:before {
@@ -1219,7 +1179,8 @@ body.cheatin h1 {
        border-bottom: 1px solid #ddd;
        clear: both;
        color: #666;
-       font: 24px "Open Sans", sans-serif;
+       font-size: 24px;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        margin: 30px 0 0 0;
        padding: 0;
        padding-bottom: 7px;
@@ -1550,10 +1511,11 @@ body.adding-widget .add-new-widget:before,
                right: 48px;
                line-height: 45px;
                font-size: 14px;
-               padding: 0 12px 0 12px;
+               padding: 0 12px;
                margin: 0;
                height: 45px;
                background: #eee;
+               border: 0;
                border-left: 1px solid #ddd;
                color: #444;
                cursor: pointer;
index a8af6896fca78526c53a1d0b66cd535de69b72b0..a668fa328e128e7bfaaf1d27a333865283209cc8 100644 (file)
@@ -1 +1 @@
-body{overflow:hidden;-webkit-text-size-adjust:100%}#customize-controls a{text-decoration:none}#customize-controls h3{font-size:14px}#customize-controls img{max-width:100%}#customize-controls .submit{text-align:center}#customize-controls .description{color:#555}#customize-header-actions .button-primary{float:left;margin-top:9px}#customize-header-actions .spinner{margin-top:13px;margin-left:4px}.saving #customize-header-actions .spinner{visibility:visible}#customize-header-actions{border-bottom:1px solid #ddd}#customize-controls .wp-full-overlay-sidebar-content{overflow-y:auto;overflow-x:hidden}#customize-controls .customize-info{border:none;border-top:1px solid #ddd;border-bottom:1px solid #ddd;margin-bottom:15px}#customize-controls .customize-info .accordion-section-title{background:#fff;color:#555;border-right:none;border-left:none;border-bottom:none;cursor:default}#customize-controls .customize-info .accordion-section-title:focus:after,#customize-controls .customize-info .accordion-section-title:hover:after,#customize-controls .customize-info.open .accordion-section-title:after{color:#333}#customize-controls .customize-info .accordion-section-title:after{display:none}#customize-controls .customize-info .preview-notice{font-size:13px;line-height:24px}#customize-controls .control-section .customize-section-title h3,#customize-controls .control-section h3.customize-section-title,#customize-controls .customize-info .panel-title{font-size:20px;font-weight:200;line-height:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#customize-controls .customize-section-title span.customize-action{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#customize-controls .customize-info .customize-help-toggle{position:absolute;top:4px;left:1px;padding:20px 10px 10px 20px;width:20px;height:20px;cursor:pointer;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;background:0 0;color:#555;border:none}#customize-controls .customize-info .customize-help-toggle:before{position:absolute;top:5px;right:6px}#customize-controls .customize-info .customize-help-toggle:focus,#customize-controls .customize-info .customize-help-toggle:hover,#customize-controls .customize-info.open .customize-help-toggle{color:#0073aa}#customize-controls .customize-info .customize-panel-description,#customize-controls .no-widget-areas-rendered-notice{color:#555;display:none;background:#fff;padding:12px 15px;border-top:1px solid #ddd}#customize-controls .customize-info .customize-panel-description.open+.no-widget-areas-rendered-notice{border-top:none}#customize-controls .customize-info .customize-panel-description p:first-child{margin-top:0}#customize-controls .customize-info .customize-panel-description p:last-child{margin-bottom:0}#customize-controls .current-panel .control-section>h3.accordion-section-title{padding-left:30px}#customize-theme-controls .control-section{border:none}#customize-theme-controls .accordion-section-title{color:#555;background-color:#fff;border-bottom:1px solid #eee}#customize-theme-controls .accordion-section-title:after{content:"\f341";color:#a0a5aa}#customize-theme-controls .accordion-section-content{color:#555;background:0 0;position:absolute;top:0;right:100%;width:100%;margin:0;padding:12px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#customize-controls .control-section .accordion-section-title:focus,#customize-controls .control-section .accordion-section-title:hover,#customize-controls .control-section.open .accordion-section-title,#customize-controls .control-section:hover>.accordion-section-title{color:#23282d;background:#f5f5f5}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{background:#f5f5f5}#customize-theme-controls .control-section .accordion-section-title:focus:after,#customize-theme-controls .control-section .accordion-section-title:hover:after,#customize-theme-controls .control-section.open .accordion-section-title:after,#customize-theme-controls .control-section:hover>.accordion-section-title:after{color:#23282d}#customize-theme-controls .control-section.open{border-bottom:1px solid #eee}#customize-theme-controls .control-section.open .accordion-section-title{border-bottom-color:#eee!important}#customize-theme-controls .control-section:last-of-type.open,#customize-theme-controls .control-section:last-of-type>.accordion-section-title{border-bottom-color:#ddd}#customize-theme-controls>ul{margin:0}.customize-section-description-container{margin-bottom:15px}.customize-section-title{margin:-12px -12px 0;border-bottom:1px solid #ddd;background:#fff}div.customize-section-description{margin-top:22px}div.customize-section-description p:first-child{margin-top:0}div.customize-section-description p:last-child{margin-bottom:0}#customize-theme-controls .customize-themes-panel h3.customize-section-title:first-child{border-bottom:1px solid #ddd;padding:12px}.ios #customize-theme-controls .customize-themes-panel h3.customize-section-title:first-child{padding:12px 12px 13px}.customize-section-title h3,h3.customize-section-title{padding:10px 14px 12px 10px;margin:0;line-height:21px;color:#555}#customize-theme-controls{position:relative;right:0;-webkit-transition:.18s right ease-in-out;transition:.18s right ease-in-out}.ios #customize-theme-controls{-webkit-transition:right 0s;transition:right 0s}.section-open #customize-info,.section-open #customize-theme-controls{right:-100%}.accordion-sub-container.control-panel-content{display:none;position:absolute;right:300px;top:0;width:300px;-webkit-transition:right ease-in-out .18s;transition:right ease-in-out .18s}.ios .accordion-sub-container.control-panel-content{-webkit-transition:right 0s;transition:right 0s}.accordion-sub-container.control-panel-content.animating{display:block}.current-panel .accordion-sub-container.control-panel-content{width:100%}.customize-controls-close{display:block;position:absolute;top:0;right:0;width:45px;height:45px;padding:0 0 0 2px;background:#eee;border:none;border-left:1px solid #ddd;color:#444;text-align:right;cursor:pointer;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.customize-panel-back,.customize-section-back{display:block;float:right;width:48px;height:71px;padding:0 0 0 24px;margin:0;background:#fff;border:none;border-left:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;cursor:pointer;-webkit-transition:right .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out;transition:right .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out}.customize-section-back{height:74px}.ios .customize-panel-back,.ios .customize-section-back{-webkit-transition:right 0s;transition:right 0s}.ios .customize-panel-back{display:none}.ios .expanded.in-sub-panel .customize-panel-back{display:block}.panel-meta.customize-info .accordion-section-title{margin-right:48px}#customize-controls .panel-meta.customize-info .accordion-section-title:hover{background:#fff;color:#555}.customize-controls-close:focus,.customize-controls-close:hover,.customize-controls-preview-toggle:focus,.customize-controls-preview-toggle:hover{background:#ddd;border-color:#ccc;color:#000;outline:0;-webkit-box-shadow:none;box-shadow:none}.customize-panel-back:focus,.customize-panel-back:hover,.customize-section-back:focus,.customize-section-back:hover{color:#23282d;background:#f5f5f5;outline:0;-webkit-box-shadow:none;box-shadow:none}.customize-controls-close:before{font:400 22px/45px dashicons;content:"\f335";position:relative;top:1px;right:13px}.customize-panel-back:before,.customize-section-back:before{font:400 20px/72px dashicons;content:"\f345";position:relative;right:13px}.wp-full-overlay-sidebar .wp-full-overlay-header{-webkit-transition:padding ease-in-out .18s;transition:padding ease-in-out .18s}.in-sub-panel .wp-full-overlay-sidebar .wp-full-overlay-header{padding-right:62px}#customize-info,#customize-theme-controls>ul>.accordion-section{position:relative;right:0;-webkit-transition:right ease-in-out .18s;transition:right ease-in-out .18s}.ios #customize-info,.ios #customize-theme-controls>ul>.accordion-section{-webkit-transition:right 0s;transition:right 0s}.in-sub-panel #customize-info,.in-sub-panel #customize-theme-controls>ul>.accordion-section{right:-300px;width:300px}.in-sub-panel #customize-theme-controls .accordion-section.current-panel{width:100%}#customize-theme-controls .control-section.current-panel{padding:0}#customize-theme-controls .control-section>h3.accordion-section-title{position:relative;right:0}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{right:-354px;-webkit-transition:right ease-in-out .18s;transition:right ease-in-out .18s}.ios #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{-webkit-transition:right 0s;transition:right 0s}.wp-full-overlay.section-open #customize-controls .wp-full-overlay-sidebar-content{visibility:hidden;overflow-y:hidden}.wp-full-overlay.section-open .wp-full-overlay-sidebar-content .accordion-section.open{visibility:visible}.wp-full-overlay.section-open .wp-full-overlay-sidebar-content .accordion-section.open .accordion-section-content{overflow-y:auto}p.customize-section-description{font-style:normal;margin-top:22px;margin-bottom:0}.customize-control{width:100%;float:right;clear:both;margin-bottom:12px}.customize-control input[type=radio],.customize-control input[type=checkbox],.customize-control select{line-height:28px}.customize-control input[type=tel],.customize-control input[type=url],.customize-control input[type=text],.customize-control input[type=password],.customize-control input[type=email],.customize-control input[type=number],.customize-control input[type=search]{width:98%;line-height:18px;margin:0}.customize-control-hidden{margin:0}.customize-control-textarea textarea{width:100%;resize:vertical}.customize-control select{min-width:50%;max-width:100%;height:28px;line-height:28px}.customize-control select[multiple]{height:auto}.customize-control-title{display:block;font-size:14px;line-height:24px;font-weight:600;margin-bottom:5px}.customize-control-description{display:block;font-style:italic;line-height:18px;margin-bottom:5px}.customize-control-color .color-picker,.customize-control-upload div{line-height:28px}.customize-control-checkbox label,.customize-control-nav_menu_auto_add label,.customize-control-radio label{line-height:20px;display:block;margin-right:24px;padding-top:6px;padding-bottom:6px}.customize-control-checkbox input,.customize-control-nav_menu_auto_add input,.customize-control-radio input{margin-left:4px;margin-right:-24px}.customize-control-radio{padding:5px 0 10px}.customize-control-radio .customize-control-title{margin-bottom:0;line-height:22px}.customize-control-radio .customize-control-title+.customize-control-description{margin-top:7px}.customize-control .attachment-thumb.type-icon{float:right;margin:10px;width:auto}.customize-control .attachment-title{font-weight:700;margin:0;padding:5px 10px}.customize-control .attachment-meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0 10px}.customize-control .attachment-meta-title{padding-top:7px}.customize-control .thumbnail-image{line-height:0}.customize-control .thumbnail-image img{cursor:pointer}#customize-controls .thumbnail-audio .thumbnail{max-width:64px;max-height:64px;margin:10px;float:right}#customize-preview iframe{width:100%;height:100%;position:absolute}#customize-preview iframe+iframe{visibility:hidden}.wp-full-overlay-sidebar{background:#eee;border-left:1px solid #ddd}.accordion-section .dropdown{float:right;display:block;position:relative;cursor:pointer}.accordion-section .dropdown-content{overflow:hidden;float:right;min-width:30px;height:16px;line-height:16px;margin-left:16px;padding:4px 5px;border:2px solid #eee;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.customize-control .dropdown-arrow{position:absolute;top:0;bottom:0;left:0;width:20px;background:#eee}.customize-control .dropdown-arrow:after{content:"\f140";font:400 20px/1 dashicons;speak:none;display:block;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#32373c}.customize-control .dropdown-status{color:#32373c;background:#eee;display:none;max-width:112px}.customize-control-color .color-picker-hex{display:none}.customize-control-color.open .color-picker-hex,.customize-control-header button img{display:block}.customize-control-color .dropdown{margin-left:5px;margin-bottom:5px}.customize-control-color .dropdown .dropdown-content{background-color:#555;border:1px solid rgba(0,0,0,.15)}.customize-control-color .dropdown:hover .dropdown-content{border-color:rgba(0,0,0,.25)}.ios .wp-full-overlay{position:relative}.ios #customize-controls .wp-full-overlay-sidebar-content{-webkit-overflow-scrolling:touch}.customize-control-background .current,.customize-control-cropped_image .current,.customize-control-header .current,.customize-control-image .current,.customize-control-media .current,.customize-control-site_icon .current,.customize-control-upload .current{margin-bottom:8px}.customize-control-header .uploaded{margin-bottom:18px}.customize-control-header .default button:not(.random),.customize-control-header .uploaded button:not(.random){width:100%;padding:0;margin:0;background:0 0;border:none;color:inherit;cursor:pointer}.customize-control-background .default-button,.customize-control-background .remove-button,.customize-control-background .upload-button,.customize-control-cropped_image .default-button,.customize-control-cropped_image .remove-button,.customize-control-cropped_image .upload-button,.customize-control-header button.new,.customize-control-header button.remove,.customize-control-image .default-button,.customize-control-image .remove-button,.customize-control-image .upload-button,.customize-control-media .default-button,.customize-control-media .remove-button,.customize-control-media .upload-button,.customize-control-site_icon .default-button,.customize-control-site_icon .remove-button,.customize-control-site_icon .upload-button,.customize-control-upload .default-button,.customize-control-upload .remove-button,.customize-control-upload .upload-button{white-space:normal;width:48%;height:auto}.customize-control-background .current .container,.customize-control-cropped_image .current .container,.customize-control-header .current .container,.customize-control-image .current .container,.customize-control-media .current .container,.customize-control-site_icon .current .container,.customize-control-upload .current .container{overflow:hidden;border:1px solid #eee;-webkit-border-radius:2px;border-radius:2px}.customize-control-background .current .container,.customize-control-cropped_image .current .container,.customize-control-image .current .container,.customize-control-media .current .container,.customize-control-site_icon .current .container,.customize-control-upload .current .container{min-height:40px}.customize-control-background .placeholder,.customize-control-cropped_image .placeholder,.customize-control-header .placeholder,.customize-control-image .placeholder,.customize-control-media .placeholder,.customize-control-site_icon .placeholder,.customize-control-upload .placeholder{width:100%;position:relative;text-align:center;cursor:default;border:1px dashed #b4b9be;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;min-height:40px}.customize-control-background .inner,.customize-control-cropped_image .inner,.customize-control-header .inner,.customize-control-image .inner,.customize-control-media .inner,.customize-control-site_icon .inner,.customize-control-upload .inner{display:none;position:absolute;width:100%;color:#555;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.customize-control-background .inner,.customize-control-cropped_image .inner,.customize-control-image .inner,.customize-control-media .inner,.customize-control-site_icon .inner,.customize-control-upload .inner{display:block;min-height:40px}.customize-control-background .inner,.customize-control-cropped_image .inner,.customize-control-header .inner,.customize-control-header .inner .dashicons,.customize-control-image .inner,.customize-control-media .inner,.customize-control-site_icon .inner,.customize-control-upload .inner{line-height:20px;top:8px}.customize-control-header .list .inner,.customize-control-header .list .inner .dashicons{top:9px}.customize-control-header .header-view{position:relative;width:100%;margin-bottom:5px}.customize-control-header .header-view:last-child{margin-bottom:0}.customize-control-header .header-view:after{border:0}.customize-control-header .header-view.selected:after{content:'';position:absolute;height:auto;top:0;right:0;bottom:0;left:0;border:4px solid #00a0d2;-webkit-border-radius:2px;border-radius:2px}.customize-control-header .header-view.button.selected{border:0}.customize-control-header .uploaded .header-view .close{font-size:20px;color:#fff;background:#555;background:rgba(0,0,0,.5);position:absolute;top:10px;left:-999px;z-index:1;width:26px;height:26px;cursor:pointer}.customize-control-header .header-view .close:focus,.customize-control-header .header-view:hover .close{left:10px}.customize-control-header .random.placeholder{cursor:pointer;-webkit-border-radius:2px;border-radius:2px;height:40px}.customize-control-header button.random{width:100%;height:auto;min-height:40px;white-space:normal}.customize-control-header button.random .dice{margin-top:4px}.customize-control-header .header-view:hover>button.random .dice,.customize-control-header .placeholder:hover .dice{-webkit-animation:dice-color-change 3s infinite;animation:dice-color-change 3s infinite}@-webkit-keyframes dice-color-change{0%,100%{color:#d4b146}50%{color:#ef54b0}75%{color:#7190d3}}@keyframes dice-color-change{0%,100%{color:#d4b146}50%{color:#ef54b0}75%{color:#7190d3}}.customize-control-header .choice{position:relative;display:block;margin-bottom:9px}.customize-control-header .uploaded div:last-child>.choice{margin-bottom:0}.customize-control-background img,.customize-control-cropped_image img,.customize-control-header img,.customize-control-image img,.customize-control-media img,.customize-control-upload img{width:100%;-webkit-border-radius:2px;border-radius:2px}.customize-control-background .default-button,.customize-control-background .remove-button,.customize-control-cropped_image .default-button,.customize-control-cropped_image .remove-button,.customize-control-header .remove,.customize-control-image .default-button,.customize-control-image .remove-button,.customize-control-media .default-button,.customize-control-media .remove-button,.customize-control-site_icon .default-button,.customize-control-site_icon .remove-button,.customize-control-upload .default-button,.customize-control-upload .remove-button{float:right;margin-left:3px}.customize-control-background .upload-button,.customize-control-cropped_image .upload-button,.customize-control-header .new,.customize-control-image .upload-button,.customize-control-media .upload-button,.customize-control-site_icon .upload-button,.customize-control-upload .upload-button{float:left}@-webkit-keyframes customize-reload{0%{opacity:0}100%{opacity:1}}@keyframes customize-reload{0%{opacity:0}100%{opacity:1}}.wp-customizer .customize-loading #customize-container{display:block;-webkit-animation:customize-reload .75s;animation:customize-reload .75s}.control-section-themes .accordion-section-title{cursor:default;margin:15px 0;padding-left:100px}#customize-theme-controls .control-section-themes .accordion-section-title:focus,#customize-theme-controls .control-section-themes .accordion-section-title:hover{color:#555;background-color:#fff}.customize-themes-panel .accordion-section-title{margin:15px -8px}#customize-controls .customize-section-title span.customize-action,.control-section-themes .accordion-section-title span.customize-action{font-size:13px;display:block;font-weight:400}.control-section-themes .accordion-section-title .change-theme,.control-section-themes .accordion-section-title .customize-theme{position:absolute;left:10px;top:50%;margin-top:-14px;font-weight:400}.control-section-themes .accordion-section-title:before{display:none}.customize-themes-panel{display:none;padding:0 8px;background:#f1f1f1;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.customize-themes-panel .accordion-section-title:first-child{margin-top:0}#customize-controls .customize-themes-panel .accordion-section-title:nth-child(2){font-size:14px;font-weight:600}.customize-themes-panel>h2{padding:15px 8px 0}.control-section.open .customize-themes-panel{display:block}#customize-theme-controls .customize-themes-panel .accordion-section-content{background:0 0;display:block}.customize-control.customize-control-theme{margin-bottom:8px}#customize-theme-controls .themes.accordion-section-content{position:relative;right:0;padding:0;width:100%}.wp-customizer .theme-browser .themes{padding-bottom:8px}.wp-customizer .theme-browser .theme{margin:0;width:100%}.wp-customizer .theme-browser .theme .theme-actions{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";opacity:1}#customize-controls h3.theme-name{font-size:15px}#customize-controls .theme-overlay .theme-name{font-size:32px}.wp-customizer #themes-filter{font-size:16px;font-weight:300;line-height:1.5;width:100%}#accordion-section-themes .accordion-section-title:after{display:none}#customize-theme-controls .control-section-themes.current-panel>h3.accordion-section-title{right:0}.customize-themes-panel.control-panel-content{position:absolute;right:-100%;top:0;width:100%;border-top:1px solid #ddd}.in-themes-panel #customize-info,.in-themes-panel #customize-theme-controls>ul>.accordion-section{right:100%}.wp-customizer .theme-overlay{display:none}.wp-customizer.modal-open .theme-overlay{position:fixed;right:0;top:0;left:0;bottom:0;z-index:109}.wp-customizer .theme-overlay .theme-backdrop{background:rgba(238,238,238,.75);position:fixed;z-index:110}.wp-customizer .theme-overlay .theme-wrap{right:90px;left:90px;top:45px;bottom:45px;z-index:120;max-width:1740px}.wp-customizer .theme-overlay .theme-actions{text-align:left}.modal-open .in-themes-panel #customize-controls .wp-full-overlay-sidebar-content{overflow:visible}.ie8 .wp-customizer .theme-overlay .theme-about,.ie8 .wp-customizer .theme-overlay .theme-actions,.ie8 .wp-customizer .theme-overlay .theme-header{position:static}@media (max-width:850px),(max-height:472px){.wp-customizer .theme-overlay .theme-wrap{right:0;left:0;top:0;bottom:0}}body.cheatin{font-size:medium;height:auto;background:#fff;margin:50px auto 2em;padding:1em 2em;max-width:700px;min-width:0;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}body.cheatin h1{border-bottom:1px solid #ddd;clear:both;color:#666;font:24px "Open Sans",sans-serif;margin:30px 0 0;padding:0 0 7px}body.cheatin p{font-size:14px;line-height:1.5;margin:25px 0 20px}#customize-theme-controls .add-new-menu-item,#customize-theme-controls .add-new-widget{cursor:pointer;float:left;margin-right:10px;-webkit-transition:all .2s;transition:all .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:0}.reordering .add-new-menu-item,.reordering .add-new-widget{opacity:.2;pointer-events:none;cursor:not-allowed}.add-new-menu-item:before,.add-new-widget:before{content:"\f132";display:inline-block;position:relative;right:-2px;top:-1px;font:400 20px/1 dashicons;vertical-align:middle;-webkit-transition:all .2s;transition:all .2s;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.reorder-toggle{color:#0073aa;float:left;padding:5px 8px;text-decoration:none;cursor:pointer;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.reorder-toggle:hover{color:#00a0d2}.reorder-toggle:focus{outline:dotted 1px}.reorder,.reordering .reorder-done{display:block;padding:5px 8px}.reorder-done,.reordering .reorder{display:none;color:#0073aa}.reorder-toggle:active .reorder-done,.reorder-toggle:focus .reorder-done,.reorder-toggle:hover .reorder-done{color:#00a0d2}.menu-item-reorder-nav button,.widget-reorder-nav span{position:relative;overflow:hidden;float:right;display:block;width:33px;height:43px;color:#82878c;text-indent:-9999px;cursor:pointer;outline:0}.menu-item-reorder-nav button{width:30px;height:40px;background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none}.menu-item-reorder-nav button:before,.widget-reorder-nav span:before{display:inline-block;position:absolute;top:0;left:0;width:100%;height:100%;font:400 20px/43px dashicons;text-align:center;text-indent:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#available-menu-items .customize-section-title,#available-widgets .customize-section-title,.customize-controls-preview-toggle{display:none}.menu-item-reorder-nav button:focus,.menu-item-reorder-nav button:hover,.widget-reorder-nav span:focus,.widget-reorder-nav span:hover{color:#191e23;background:#eee}.menus-move-down:before,.move-widget-down:before{content:"\f347"}.menus-move-up:before,.move-widget-up:before{content:"\f343"}#customize-theme-controls .first-widget .move-widget-up,#customize-theme-controls .last-widget .move-widget-down,.move-down-disabled .menus-move-down,.move-left-disabled .menus-move-left,.move-right-disabled .menus-move-right,.move-up-disabled .menus-move-up{color:#d5d5d5;background-color:#fff;cursor:default;pointer-events:none}.wp-full-overlay-main{left:auto;width:100%}.add-menu-toggle.open,.add-menu-toggle.open:hover,.adding-menu-items .add-new-menu-item,.adding-menu-items .add-new-menu-item:hover,body.adding-widget .add-new-widget,body.adding-widget .add-new-widget:hover{background:#eee;border-color:#929793;color:#32373c;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}#accordion-section-add_menu .add-new-menu-item.open:before,.adding-menu-items .add-new-menu-item:before,body.adding-widget .add-new-widget:before{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}#available-menu-items,#available-widgets{position:absolute;top:0;bottom:0;right:-301px;visibility:hidden;overflow-x:hidden;overflow-y:auto;width:300px;margin:0;z-index:4;background:#eee;-webkit-transition:right .18s;transition:right .18s;border-left:1px solid #ddd}#available-widgets-list{top:60px;position:absolute;overflow:auto;bottom:0;width:100%}#available-widgets-filter{position:fixed;top:0;z-index:1;width:300px;background:#eee;border-bottom:1px solid #e5e5e5}#available-menu-items-search .accordion-section-title,#available-widgets-filter{padding:12px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#available-menu-items-search input,#available-widgets-filter input{padding:6px 10px;width:100%}#available-menu-items .item-top,#available-menu-items .item-top:hover,#available-widgets .widget-top,#available-widgets .widget-top:hover{border:none;background:0 0;-webkit-box-shadow:none;box-shadow:none}#available-menu-items .item-tpl,#available-widgets .widget-tpl{position:relative;padding:20px 60px 20px 15px;background:#fff;border-bottom:1px solid #e5e5e5;cursor:pointer;display:none}#available-menu-items .item,#available-widgets .widget{position:static}@media only screen and (max-width:782px){.wp-customizer .theme:not(.active):focus .theme-actions,.wp-customizer .theme:not(.active):hover .theme-actions{display:block}.wp-customizer .theme-browser .theme.active .theme-name span{display:inline}.customize-control-checkbox label,.customize-control-nav_menu_auto_add label,.customize-control-radio label{margin-right:32px}.customize-control-checkbox input,.customize-control-nav_menu_auto_add input,.customize-control-radio input{margin-right:-32px}.customize-control input[type=radio]+label,.customize-control input[type=checkbox]+label{line-height:32px}}@media screen and (max-width:640px){#customize-controls{width:100%}.wp-full-overlay.collapsed #customize-controls,.wp-full-overlay.expanded{margin-right:0}.wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{bottom:0}.customize-controls-preview-toggle{display:block;position:absolute;top:0;right:48px;line-height:45px;font-size:14px;padding:0 12px;margin:0;height:45px;background:#eee;border-left:1px solid #ddd;color:#444;cursor:pointer;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}#customize-footer-actions,#customize-preview,.customize-controls-preview-toggle .controls,.preview-only .customize-controls-preview-toggle .preview,.preview-only .wp-full-overlay-sidebar-content{display:none}.customize-controls-preview-toggle .controls:before,.customize-controls-preview-toggle .preview:before{font:400 20px/1 dashicons;content:"\f177";position:relative;top:4px;margin-left:6px}.customize-controls-preview-toggle .controls:before{content:"\f540"}.preview-only #customize-controls{height:45px}.preview-only #customize-preview,.preview-only .customize-controls-preview-toggle .controls{display:block}#customize-preview{top:45px;bottom:0;height:auto}.wp-core-ui.wp-customizer .button{padding:6px 14px;line-height:normal;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}#customize-header-actions .button-primary{margin-top:6px}body.adding-menu-items div#available-menu-items,body.adding-widget div#available-widgets{top:46px;right:0;z-index:10;width:100%}#available-menu-items .customize-section-title,#available-widgets .customize-section-title{display:block;margin:0}#available-menu-items .customize-section-back,#available-widgets .customize-section-back{height:69px}#available-menu-items .customize-section-title h3,#available-widgets .customize-section-title h3{font-size:20px;font-weight:200;padding:9px 14px 12px 10px;margin:0;line-height:24px;color:#555;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#available-menu-items .customize-section-title .customize-action,#available-widgets .customize-section-title .customize-action{font-size:13px;display:block;font-weight:400;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#available-widgets-filter{position:relative;width:100%;background:#fff;height:auto;padding:10px 15px}#available-widgets-list{top:140px}}
\ No newline at end of file
+body{overflow:hidden;-webkit-text-size-adjust:100%}#customize-controls a{text-decoration:none}#customize-controls h3{font-size:14px}#customize-controls img{max-width:100%}#customize-controls .submit{text-align:center}#customize-controls .description{color:#555}#customize-header-actions .button-primary{float:left;margin-top:9px}#customize-header-actions .spinner{margin-top:13px;margin-left:4px}.saving #customize-header-actions .spinner{visibility:visible}#customize-header-actions{border-bottom:1px solid #ddd}#customize-controls .wp-full-overlay-sidebar-content{overflow-y:auto;overflow-x:hidden}#customize-controls .customize-info{border:none;border-top:1px solid #ddd;border-bottom:1px solid #ddd;margin-bottom:15px}#customize-controls .customize-info .accordion-section-title{background:#fff;color:#555;border-right:none;border-left:none;border-bottom:none;cursor:default}#customize-controls .customize-info .accordion-section-title:focus:after,#customize-controls .customize-info .accordion-section-title:hover:after,#customize-controls .customize-info.open .accordion-section-title:after{color:#333}#customize-controls .customize-info .accordion-section-title:after{display:none}#customize-controls .customize-info .preview-notice{font-size:13px;line-height:24px}#customize-controls .control-section .customize-section-title h3,#customize-controls .control-section h3.customize-section-title,#customize-controls .customize-info .panel-title{font-size:20px;font-weight:200;line-height:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#customize-controls .customize-section-title span.customize-action{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#customize-controls .customize-info .customize-help-toggle{position:absolute;top:4px;left:1px;padding:20px 10px 10px 20px;width:20px;height:20px;cursor:pointer;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;background:0 0;color:#555;border:none}#customize-controls .customize-info .customize-help-toggle:before{position:absolute;top:5px;right:6px}#customize-controls .customize-info .customize-help-toggle:focus,#customize-controls .customize-info .customize-help-toggle:hover,#customize-controls .customize-info.open .customize-help-toggle{color:#0073aa}#customize-controls .customize-info .customize-panel-description,#customize-controls .no-widget-areas-rendered-notice{color:#555;display:none;background:#fff;padding:12px 15px;border-top:1px solid #ddd}#customize-controls .customize-info .customize-panel-description.open+.no-widget-areas-rendered-notice{border-top:none}#customize-controls .customize-info .customize-panel-description p:first-child{margin-top:0}#customize-controls .customize-info .customize-panel-description p:last-child{margin-bottom:0}#customize-controls .current-panel .control-section>h3.accordion-section-title{padding-left:30px}#customize-theme-controls .control-section{border:none}#customize-theme-controls .accordion-section-title{color:#555;background-color:#fff;border-bottom:1px solid #eee}#customize-theme-controls .accordion-section-title:after{content:"\f341";color:#a0a5aa}#customize-theme-controls .accordion-section-content{color:#555;background:0 0;position:absolute;top:0;right:100%;width:100%;margin:0;padding:12px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#customize-controls .control-section .accordion-section-title:focus,#customize-controls .control-section .accordion-section-title:hover,#customize-controls .control-section.open .accordion-section-title,#customize-controls .control-section:hover>.accordion-section-title{color:#23282d;background:#f5f5f5}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{background:#f5f5f5}#customize-theme-controls .control-section .accordion-section-title:focus:after,#customize-theme-controls .control-section .accordion-section-title:hover:after,#customize-theme-controls .control-section.open .accordion-section-title:after,#customize-theme-controls .control-section:hover>.accordion-section-title:after{color:#23282d}#customize-theme-controls .control-section.open{border-bottom:1px solid #eee}#customize-theme-controls .control-section.open .accordion-section-title{border-bottom-color:#eee!important}#customize-theme-controls .control-section:last-of-type.open,#customize-theme-controls .control-section:last-of-type>.accordion-section-title{border-bottom-color:#ddd}#customize-theme-controls>ul{margin:0}.customize-section-description-container{margin-bottom:15px}.customize-section-title{margin:-12px -12px 0;border-bottom:1px solid #ddd;background:#fff}div.customize-section-description{margin-top:22px}div.customize-section-description p:first-child{margin-top:0}div.customize-section-description p:last-child{margin-bottom:0}#customize-theme-controls .customize-themes-panel h3.customize-section-title:first-child{border-bottom:1px solid #ddd;padding:12px}.ios #customize-theme-controls .customize-themes-panel h3.customize-section-title:first-child{padding:12px 12px 13px}.customize-section-title h3,h3.customize-section-title{padding:10px 14px 12px 10px;margin:0;line-height:21px;color:#555}#customize-theme-controls{position:relative;right:0;-webkit-transition:.18s right ease-in-out;transition:.18s right ease-in-out}.ios #customize-theme-controls{-webkit-transition:right 0s;transition:right 0s}.section-open #customize-info,.section-open #customize-theme-controls{right:-100%}.accordion-sub-container.control-panel-content{display:none;position:absolute;right:100%;top:0;width:100%;-webkit-transition:right ease-in-out .18s;transition:right ease-in-out .18s}.ios .accordion-sub-container.control-panel-content{-webkit-transition:right 0s;transition:right 0s}.accordion-sub-container.control-panel-content.animating{display:block}.current-panel .accordion-sub-container.control-panel-content{width:100%}.customize-controls-close{display:block;position:absolute;top:0;right:0;width:45px;height:45px;padding:0 0 0 2px;background:#eee;border:none;border-left:1px solid #ddd;color:#444;text-align:right;cursor:pointer;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.customize-panel-back,.customize-section-back{display:block;float:right;width:48px;height:71px;padding:0 0 0 24px;margin:0;background:#fff;border:none;border-left:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;cursor:pointer;-webkit-transition:right .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out;transition:right .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out}.customize-section-back{height:74px}.ios .customize-panel-back,.ios .customize-section-back{-webkit-transition:right 0s;transition:right 0s}.ios .customize-panel-back{display:none}.ios .expanded.in-sub-panel .customize-panel-back{display:block}.panel-meta.customize-info .accordion-section-title{margin-right:48px}#customize-controls .panel-meta.customize-info .accordion-section-title:hover{background:#fff;color:#555}.customize-controls-close:focus,.customize-controls-close:hover,.customize-controls-preview-toggle:focus,.customize-controls-preview-toggle:hover{background:#ddd;border-color:#ccc;color:#000;outline:0;-webkit-box-shadow:none;box-shadow:none}.customize-panel-back:focus,.customize-panel-back:hover,.customize-section-back:focus,.customize-section-back:hover{color:#23282d;background:#f5f5f5;outline:0;-webkit-box-shadow:none;box-shadow:none}.customize-controls-close:before{font:400 22px/45px dashicons;content:"\f335";position:relative;top:1px;right:13px}.customize-panel-back:before,.customize-section-back:before{font:400 20px/72px dashicons;content:"\f345";position:relative;right:13px}.wp-full-overlay-sidebar .wp-full-overlay-header{-webkit-transition:padding ease-in-out .18s;transition:padding ease-in-out .18s}.in-sub-panel .wp-full-overlay-sidebar .wp-full-overlay-header{padding-right:62px}#customize-info,#customize-theme-controls>ul>.accordion-section{position:relative;right:0;-webkit-transition:right ease-in-out .18s;transition:right ease-in-out .18s}.ios #customize-info,.ios #customize-theme-controls>ul>.accordion-section{-webkit-transition:right 0s;transition:right 0s}.in-sub-panel #customize-info,.in-sub-panel #customize-theme-controls>ul>.accordion-section{right:-100%;width:100%}.in-sub-panel #customize-theme-controls .accordion-section.current-panel{width:100%}#customize-theme-controls .control-section.current-panel{padding:0}#customize-theme-controls .control-section>h3.accordion-section-title{position:relative;right:0}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{right:-354px;-webkit-transition:right ease-in-out .18s;transition:right ease-in-out .18s}.ios #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{-webkit-transition:right 0s;transition:right 0s}.wp-full-overlay.section-open #customize-controls .wp-full-overlay-sidebar-content{visibility:hidden;overflow-y:hidden}.wp-full-overlay.section-open .wp-full-overlay-sidebar-content .accordion-section.open{visibility:visible}.wp-full-overlay.section-open .wp-full-overlay-sidebar-content .accordion-section.open .accordion-section-content{overflow-y:auto}p.customize-section-description{font-style:normal;margin-top:22px;margin-bottom:0}.customize-control{width:100%;float:right;clear:both;margin-bottom:12px}.customize-control input[type=radio],.customize-control input[type=checkbox],.customize-control select{line-height:28px}.customize-control input[type=tel],.customize-control input[type=url],.customize-control input[type=text],.customize-control input[type=password],.customize-control input[type=email],.customize-control input[type=number],.customize-control input[type=search]{width:100%;line-height:18px;margin:0}.customize-control-hidden{margin:0}.customize-control-textarea textarea{width:100%;resize:vertical}.customize-control select{min-width:50%;max-width:100%;height:28px;line-height:28px}.customize-control select[multiple]{height:auto}.customize-control-title{display:block;font-size:14px;line-height:24px;font-weight:600;margin-bottom:4px}.customize-control-description{display:block;font-style:italic;line-height:18px;margin-bottom:5px}.customize-control-color .color-picker,.customize-control-upload div{line-height:28px}.customize-control-checkbox label,.customize-control-nav_menu_auto_add label,.customize-control-radio label{line-height:20px;display:block;margin-right:24px;padding-top:6px;padding-bottom:6px}.customize-control-checkbox input,.customize-control-nav_menu_auto_add input,.customize-control-radio input{margin-left:4px;margin-right:-24px}.customize-control-radio{padding:5px 0 10px}.customize-control-radio .customize-control-title{margin-bottom:0;line-height:22px}.customize-control-radio .customize-control-title+.customize-control-description{margin-top:7px}.customize-control .attachment-thumb.type-icon{float:right;margin:10px;width:auto}.customize-control .attachment-title{font-weight:600;margin:0;padding:5px 10px}.customize-control .attachment-meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0 10px}.customize-control .attachment-meta-title{padding-top:7px}.customize-control .thumbnail-image{line-height:0}.customize-control .thumbnail-image img{cursor:pointer}#customize-controls .thumbnail-audio .thumbnail{max-width:64px;max-height:64px;margin:10px;float:right}#customize-preview iframe{width:100%;height:100%;position:absolute}#customize-preview iframe+iframe{visibility:hidden}.wp-full-overlay-sidebar{background:#eee;border-left:1px solid #ddd}#customize-controls .customize-control-notifications-container{margin:4px 0 8px;padding:0;display:none;cursor:default}#customize-controls .customize-control-widget_form.has-error .widget .widget-top,.customize-control-nav_menu_item.has-error .menu-item-bar .menu-item-handle{-webkit-box-shadow:inset 0 0 0 2px #dc3232;box-shadow:inset 0 0 0 2px #dc3232;-webkit-transition:.15s box-shadow linear;transition:.15s box-shadow linear}.customize-control-notifications-container li.notice{list-style:none;margin:0 0 6px;padding:4px 8px}.customize-control-notifications-container li.notice:last-child{margin-bottom:0}#customize-controls .customize-control-nav_menu_item .customize-control-notifications-container{margin-top:0}#customize-controls .customize-control-widget_form .customize-control-notifications-container,.customize-control .attachment-media-view .actions{margin-top:8px}.customize-control-text.has-error input{outline:#dc3232 solid 2px}.accordion-section .dropdown{float:right;display:block;position:relative;cursor:pointer}.accordion-section .dropdown-content{overflow:hidden;float:right;min-width:30px;height:16px;line-height:16px;margin-left:16px;padding:4px 5px;border:2px solid #eee;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.customize-control .dropdown-arrow{position:absolute;top:0;bottom:0;left:0;width:20px;background:#eee}.customize-control .dropdown-arrow:after{content:"\f140";font:400 20px/1 dashicons;speak:none;display:block;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#32373c}.customize-control .dropdown-status{color:#32373c;background:#eee;display:none;max-width:112px}.customize-control-color .color-picker-hex{display:none}.customize-control-color.open .color-picker-hex,.customize-control-header button img{display:block}.customize-control-color .dropdown{margin-left:5px;margin-bottom:5px}.customize-control-color .dropdown .dropdown-content{background-color:#555;border:1px solid rgba(0,0,0,.15)}.customize-control-color .dropdown:hover .dropdown-content{border-color:rgba(0,0,0,.25)}.ios .wp-full-overlay{position:relative}.ios #customize-controls .wp-full-overlay-sidebar-content{-webkit-overflow-scrolling:touch}.customize-control-header .current{margin-bottom:8px}.customize-control-header .uploaded{margin-bottom:18px}.customize-control-header .default button:not(.random),.customize-control-header .uploaded button:not(.random){width:100%;padding:0;margin:0;background:0 0;border:none;color:inherit;cursor:pointer}.customize-control .attachment-media-view .default-button,.customize-control .attachment-media-view .remove-button,.customize-control .attachment-media-view .upload-button,.customize-control-header button.new,.customize-control-header button.remove{white-space:normal;width:48%;height:auto}.customize-control .attachment-media-view .thumbnail,.customize-control-header .current .container{overflow:hidden}.customize-control .attachment-media-view .placeholder,.customize-control-header .placeholder{width:100%;position:relative;text-align:center;cursor:default;border:1px dashed #b4b9be;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:9px 0;line-height:20px}.customize-control-header .inner{display:none;position:absolute;width:100%;color:#555;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.customize-control-header .inner,.customize-control-header .inner .dashicons{line-height:20px;top:8px}.customize-control-header .list .inner,.customize-control-header .list .inner .dashicons{top:9px}.customize-control-header .header-view{position:relative;width:100%;margin-bottom:5px}.customize-control-header .header-view:last-child{margin-bottom:0}.customize-control-header .header-view:after{border:0}.customize-control-header .header-view.selected:after{content:'';position:absolute;height:auto;top:0;right:0;bottom:0;left:0;border:4px solid #00a0d2;-webkit-border-radius:2px;border-radius:2px}.customize-control-header .header-view.button.selected{border:0}.customize-control-header .uploaded .header-view .close{font-size:20px;color:#fff;background:#555;background:rgba(0,0,0,.5);position:absolute;top:10px;left:-999px;z-index:1;width:26px;height:26px;cursor:pointer}.customize-control-header .header-view .close:focus,.customize-control-header .header-view:hover .close{left:10px}.customize-control-header .random.placeholder{cursor:pointer;-webkit-border-radius:2px;border-radius:2px;height:40px}.customize-control-header button.random{width:100%;height:auto;min-height:40px;white-space:normal}.customize-control-header button.random .dice{margin-top:4px}.customize-control-header .header-view:hover>button.random .dice,.customize-control-header .placeholder:hover .dice{-webkit-animation:dice-color-change 3s infinite;animation:dice-color-change 3s infinite}@-webkit-keyframes dice-color-change{0%,100%{color:#d4b146}50%{color:#ef54b0}75%{color:#7190d3}}@keyframes dice-color-change{0%,100%{color:#d4b146}50%{color:#ef54b0}75%{color:#7190d3}}.customize-control-header .choice{position:relative;display:block;margin-bottom:9px}.customize-control-header .uploaded div:last-child>.choice{margin-bottom:0}.customize-control .attachment-media-view .thumbnail-image img,.customize-control-header img{max-width:100%}.customize-control .attachment-media-view .default-button,.customize-control .attachment-media-view .remove-button,.customize-control-header .remove{float:right;margin-left:3px}.customize-control .attachment-media-view .upload-button,.customize-control-header .new{float:left}@-webkit-keyframes customize-reload{0%{opacity:0}100%{opacity:1}}@keyframes customize-reload{0%{opacity:0}100%{opacity:1}}.wp-customizer .customize-loading #customize-container{display:block;-webkit-animation:customize-reload .75s;animation:customize-reload .75s}.control-section-themes .accordion-section-title{cursor:default;margin:15px 0;padding-left:100px}#customize-theme-controls .control-section-themes .accordion-section-title:focus,#customize-theme-controls .control-section-themes .accordion-section-title:hover{color:#555;background-color:#fff}.customize-themes-panel .accordion-section-title{margin:15px -8px}#customize-controls .customize-section-title span.customize-action,.control-section-themes .accordion-section-title span.customize-action{font-size:13px;display:block;font-weight:400}.control-section-themes .accordion-section-title .change-theme,.control-section-themes .accordion-section-title .customize-theme{position:absolute;left:10px;top:50%;margin-top:-14px;font-weight:400}.control-section-themes .accordion-section-title:before{display:none}.customize-themes-panel{display:none;padding:0 8px;background:#f1f1f1;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.customize-themes-panel .accordion-section-title:first-child{margin-top:0}#customize-controls .customize-themes-panel .accordion-section-title:nth-child(2){font-size:14px;font-weight:600}.customize-themes-panel>h2{padding:15px 8px 0}.control-section.open .customize-themes-panel{display:block}#customize-theme-controls .customize-themes-panel .accordion-section-content{background:0 0;display:block}.customize-control.customize-control-theme{margin-bottom:8px}#customize-theme-controls .themes.accordion-section-content{position:relative;right:0;padding:0;width:100%}.wp-customizer .theme-browser .themes{padding-bottom:8px}.wp-customizer .theme-browser .theme{margin:0;width:100%}.wp-customizer .theme-browser .theme .theme-actions{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";opacity:1}#customize-controls h3.theme-name{font-size:15px}#customize-controls .theme-overlay .theme-name{font-size:32px}.wp-customizer #themes-filter{font-size:16px;font-weight:300;line-height:1.5;width:100%}#accordion-section-themes .accordion-section-title:after{display:none}#customize-theme-controls .control-section-themes.current-panel>h3.accordion-section-title{right:0}.customize-themes-panel.control-panel-content{position:absolute;right:-100%;top:0;width:100%;border-top:1px solid #ddd}.in-themes-panel #customize-info,.in-themes-panel #customize-theme-controls>ul>.accordion-section{right:100%}.wp-customizer .theme-overlay{display:none}.wp-customizer.modal-open .theme-overlay{position:fixed;right:0;top:0;left:0;bottom:0;z-index:109}.wp-customizer .theme-overlay .theme-backdrop{background:rgba(238,238,238,.75);position:fixed;z-index:110}.wp-customizer .theme-overlay .theme-wrap{right:90px;left:90px;top:45px;bottom:45px;z-index:120;max-width:1740px}.wp-customizer .theme-overlay .theme-actions{text-align:left}.modal-open .in-themes-panel #customize-controls .wp-full-overlay-sidebar-content{overflow:visible}.ie8 .wp-customizer .theme-overlay .theme-about,.ie8 .wp-customizer .theme-overlay .theme-actions,.ie8 .wp-customizer .theme-overlay .theme-header{position:static}@media (max-width:850px),(max-height:472px){.wp-customizer .theme-overlay .theme-wrap{right:0;left:0;top:0;bottom:0}}body.cheatin{font-size:medium;height:auto;background:#fff;margin:50px auto 2em;padding:1em 2em;max-width:700px;min-width:0;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}body.cheatin h1{border-bottom:1px solid #ddd;clear:both;color:#666;font-size:24px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;margin:30px 0 0;padding:0 0 7px}body.cheatin p{font-size:14px;line-height:1.5;margin:25px 0 20px}#customize-theme-controls .add-new-menu-item,#customize-theme-controls .add-new-widget{cursor:pointer;float:left;margin-right:10px;-webkit-transition:all .2s;transition:all .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:0}.reordering .add-new-menu-item,.reordering .add-new-widget{opacity:.2;pointer-events:none;cursor:not-allowed}.add-new-menu-item:before,.add-new-widget:before{content:"\f132";display:inline-block;position:relative;right:-2px;top:-1px;font:400 20px/1 dashicons;vertical-align:middle;-webkit-transition:all .2s;transition:all .2s;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.reorder-toggle{color:#0073aa;float:left;padding:5px 8px;text-decoration:none;cursor:pointer;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.reorder-toggle:hover{color:#00a0d2}.reorder-toggle:focus{outline:dotted 1px}.reorder,.reordering .reorder-done{display:block;padding:5px 8px}.reorder-done,.reordering .reorder{display:none;color:#0073aa}.reorder-toggle:active .reorder-done,.reorder-toggle:focus .reorder-done,.reorder-toggle:hover .reorder-done{color:#00a0d2}.menu-item-reorder-nav button,.widget-reorder-nav span{position:relative;overflow:hidden;float:right;display:block;width:33px;height:43px;color:#82878c;text-indent:-9999px;cursor:pointer;outline:0}.menu-item-reorder-nav button{width:30px;height:40px;background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none}.menu-item-reorder-nav button:before,.widget-reorder-nav span:before{display:inline-block;position:absolute;top:0;left:0;width:100%;height:100%;font:400 20px/43px dashicons;text-align:center;text-indent:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#available-menu-items .customize-section-title,#available-widgets .customize-section-title,.customize-controls-preview-toggle{display:none}.menu-item-reorder-nav button:focus,.menu-item-reorder-nav button:hover,.widget-reorder-nav span:focus,.widget-reorder-nav span:hover{color:#191e23;background:#eee}.menus-move-down:before,.move-widget-down:before{content:"\f347"}.menus-move-up:before,.move-widget-up:before{content:"\f343"}#customize-theme-controls .first-widget .move-widget-up,#customize-theme-controls .last-widget .move-widget-down,.move-down-disabled .menus-move-down,.move-left-disabled .menus-move-left,.move-right-disabled .menus-move-right,.move-up-disabled .menus-move-up{color:#d5d5d5;background-color:#fff;cursor:default;pointer-events:none}.wp-full-overlay-main{left:auto;width:100%}.add-menu-toggle.open,.add-menu-toggle.open:hover,.adding-menu-items .add-new-menu-item,.adding-menu-items .add-new-menu-item:hover,body.adding-widget .add-new-widget,body.adding-widget .add-new-widget:hover{background:#eee;border-color:#929793;color:#32373c;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}#accordion-section-add_menu .add-new-menu-item.open:before,.adding-menu-items .add-new-menu-item:before,body.adding-widget .add-new-widget:before{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}#available-menu-items,#available-widgets{position:absolute;top:0;bottom:0;right:-301px;visibility:hidden;overflow-x:hidden;overflow-y:auto;width:300px;margin:0;z-index:4;background:#eee;-webkit-transition:right .18s;transition:right .18s;border-left:1px solid #ddd}#available-widgets-list{top:60px;position:absolute;overflow:auto;bottom:0;width:100%}#available-widgets-filter{position:fixed;top:0;z-index:1;width:300px;background:#eee;border-bottom:1px solid #e5e5e5}#available-menu-items-search .accordion-section-title,#available-widgets-filter{padding:12px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#available-menu-items-search input,#available-widgets-filter input{padding:6px 10px;width:100%}#available-menu-items .item-top,#available-menu-items .item-top:hover,#available-widgets .widget-top,#available-widgets .widget-top:hover{border:none;background:0 0;-webkit-box-shadow:none;box-shadow:none}#available-menu-items .item-tpl,#available-widgets .widget-tpl{position:relative;padding:20px 60px 20px 15px;background:#fff;border-bottom:1px solid #e5e5e5;cursor:pointer;display:none}#available-menu-items .item,#available-widgets .widget{position:static}@media only screen and (max-width:782px){.wp-customizer .theme:not(.active):focus .theme-actions,.wp-customizer .theme:not(.active):hover .theme-actions{display:block}.wp-customizer .theme-browser .theme.active .theme-name span{display:inline}.customize-control-checkbox label,.customize-control-nav_menu_auto_add label,.customize-control-radio label{margin-right:32px}.customize-control-checkbox input,.customize-control-nav_menu_auto_add input,.customize-control-radio input{margin-right:-32px}.customize-control input[type=radio]+label,.customize-control input[type=checkbox]+label{line-height:32px}}@media screen and (max-width:640px){#customize-controls{width:100%}.wp-full-overlay.collapsed #customize-controls,.wp-full-overlay.expanded{margin-right:0}.wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{bottom:0}.customize-controls-preview-toggle{display:block;position:absolute;top:0;right:48px;line-height:45px;font-size:14px;padding:0 12px;margin:0;height:45px;background:#eee;border:0;border-left:1px solid #ddd;color:#444;cursor:pointer;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}#customize-footer-actions,#customize-preview,.customize-controls-preview-toggle .controls,.preview-only .customize-controls-preview-toggle .preview,.preview-only .wp-full-overlay-sidebar-content{display:none}.customize-controls-preview-toggle .controls:before,.customize-controls-preview-toggle .preview:before{font:400 20px/1 dashicons;content:"\f177";position:relative;top:4px;margin-left:6px}.customize-controls-preview-toggle .controls:before{content:"\f540"}.preview-only #customize-controls{height:45px}.preview-only #customize-preview,.preview-only .customize-controls-preview-toggle .controls{display:block}#customize-preview{top:45px;bottom:0;height:auto}.wp-core-ui.wp-customizer .button{padding:6px 14px;line-height:normal;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}#customize-header-actions .button-primary{margin-top:6px}body.adding-menu-items div#available-menu-items,body.adding-widget div#available-widgets{top:46px;right:0;z-index:10;width:100%}#available-menu-items .customize-section-title,#available-widgets .customize-section-title{display:block;margin:0}#available-menu-items .customize-section-back,#available-widgets .customize-section-back{height:69px}#available-menu-items .customize-section-title h3,#available-widgets .customize-section-title h3{font-size:20px;font-weight:200;padding:9px 14px 12px 10px;margin:0;line-height:24px;color:#555;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#available-menu-items .customize-section-title .customize-action,#available-widgets .customize-section-title .customize-action{font-size:13px;display:block;font-weight:400;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#available-widgets-filter{position:relative;width:100%;background:#fff;height:auto;padding:10px 15px}#available-widgets-list{top:140px}}
\ No newline at end of file
index 36e512aa017feffe9965d7641b8b93340219c7a0..d2eef49a5b403b36854fd8ac653bbdce02faf3ee 100644 (file)
@@ -277,9 +277,9 @@ h3.customize-section-title {
 .accordion-sub-container.control-panel-content {
        display: none;
        position: absolute;
-       left: 300px;
+       left: 100%;
        top: 0;
-       width: 300px;
+       width: 100%;
        -webkit-transition: left ease-in-out .18s;
        transition: left ease-in-out .18s;
 }
@@ -427,8 +427,8 @@ h3.customize-section-title {
 
 .in-sub-panel #customize-info,
 .in-sub-panel #customize-theme-controls > ul > .accordion-section {
-       left: -300px;
-       width: 300px;
+       left: -100%;
+       width: 100%;
 }
 
 .in-sub-panel #customize-theme-controls .accordion-section.current-panel {
@@ -494,7 +494,7 @@ p.customize-section-description {
 .customize-control input[type="search"],
 .customize-control input[type="tel"],
 .customize-control input[type="url"] {
-       width: 98%;
+       width: 100%;
        line-height: 18px;
        margin: 0;
 }
@@ -524,7 +524,7 @@ p.customize-section-description {
        font-size: 14px;
        line-height: 24px;
        font-weight: 600;
-       margin-bottom: 5px;
+       margin-bottom: 4px;
 }
 
 .customize-control-description {
@@ -576,7 +576,7 @@ p.customize-section-description {
 }
 
 .customize-control .attachment-title {
-       font-weight: bold;
+       font-weight: 600;
        margin: 0;
        padding: 5px 10px;
 }
@@ -622,6 +622,48 @@ p.customize-section-description {
        border-right: 1px solid #ddd;
 }
 
+
+/**
+ * Notifications
+ */
+
+#customize-controls .customize-control-notifications-container { /* Scoped to #customize-controls for specificity over notification styles in common.css. */
+       margin: 4px 0 8px 0;
+       padding: 0;
+       display: none;
+       cursor: default;
+}
+
+#customize-controls .customize-control-widget_form.has-error .widget .widget-top,
+.customize-control-nav_menu_item.has-error .menu-item-bar .menu-item-handle {
+       -webkit-box-shadow: inset 0 0 0 2px #dc3232;
+       box-shadow: inset 0 0 0 2px #dc3232;
+       -webkit-transition: .15s box-shadow linear;
+       transition: .15s box-shadow linear;
+}
+
+.customize-control-notifications-container li.notice {
+       list-style: none;
+       margin: 0 0 6px 0;
+       padding: 4px 8px;
+}
+
+.customize-control-notifications-container li.notice:last-child {
+       margin-bottom: 0;
+}
+
+#customize-controls .customize-control-nav_menu_item .customize-control-notifications-container {
+       margin-top: 0;
+}
+
+#customize-controls .customize-control-widget_form .customize-control-notifications-container {
+       margin-top: 8px;
+}
+
+.customize-control-text.has-error input {
+       outline: 2px solid #dc3232;
+}
+
 /* Style for custom settings */
 
 /**
@@ -720,12 +762,10 @@ p.customize-section-description {
 
 /* Media controls */
 
-.customize-control-media .current,
-.customize-control-upload .current,
-.customize-control-image .current,
-.customize-control-background .current,
-.customize-control-cropped_image .current,
-.customize-control-site_icon .current,
+.customize-control .attachment-media-view .actions {
+       margin-top: 8px;
+}
+
 .customize-control-header .current {
        margin-bottom: 8px;
 }
@@ -749,24 +789,9 @@ p.customize-section-description {
        display: block;
 }
 
-.customize-control-media .remove-button,
-.customize-control-media .default-button,
-.customize-control-media .upload-button,
-.customize-control-upload .remove-button,
-.customize-control-upload .default-button,
-.customize-control-upload .upload-button,
-.customize-control-image .remove-button,
-.customize-control-image .default-button,
-.customize-control-image .upload-button,
-.customize-control-background .remove-button,
-.customize-control-background .default-button,
-.customize-control-background .upload-button,
-.customize-control-cropped_image .remove-button,
-.customize-control-cropped_image .default-button,
-.customize-control-cropped_image .upload-button,
-.customize-control-site_icon .remove-button,
-.customize-control-site_icon .default-button,
-.customize-control-site_icon .upload-button,
+.customize-control .attachment-media-view .remove-button,
+.customize-control .attachment-media-view .default-button,
+.customize-control .attachment-media-view .upload-button,
 .customize-control-header button.new,
 .customize-control-header button.remove {
        white-space: normal;
@@ -774,35 +799,12 @@ p.customize-section-description {
        height: auto;
 }
 
-.customize-control-media .current .container,
-.customize-control-upload .current .container,
-.customize-control-image .current .container,
-.customize-control-background .current .container,
-.customize-control-cropped_image .current .container,
-.customize-control-site_icon .current .container,
+.customize-control .attachment-media-view .thumbnail,
 .customize-control-header .current .container {
        overflow: hidden;
-       -webkit-border-radius: 2px;
-       border: 1px solid #eee;
-       -webkit-border-radius: 2px;
-       border-radius: 2px;
 }
 
-.customize-control-media .current .container,
-.customize-control-upload .current .container,
-.customize-control-background .current .container,
-.customize-control-cropped_image .current .container,
-.customize-control-site_icon .current .container,
-.customize-control-image .current .container {
-       min-height: 40px;
-}
-
-.customize-control-media .placeholder,
-.customize-control-upload .placeholder,
-.customize-control-image .placeholder,
-.customize-control-background .placeholder,
-.customize-control-cropped_image .placeholder,
-.customize-control-site_icon .placeholder,
+.customize-control .attachment-media-view .placeholder,
 .customize-control-header .placeholder {
        width: 100%;
        position: relative;
@@ -812,15 +814,10 @@ p.customize-section-description {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
-       min-height: 40px;
+       padding: 9px 0;
+       line-height: 20px;
 }
 
-.customize-control-media .inner,
-.customize-control-upload .inner,
-.customize-control-image .inner,
-.customize-control-background .inner,
-.customize-control-cropped_image .inner,
-.customize-control-site_icon .inner,
 .customize-control-header .inner {
        display: none;
        position: absolute;
@@ -831,22 +828,6 @@ p.customize-section-description {
        overflow: hidden;
 }
 
-.customize-control-media .inner,
-.customize-control-upload .inner,
-.customize-control-background .inner,
-.customize-control-cropped_image .inner,
-.customize-control-site_icon .inner,
-.customize-control-image .inner {
-       display: block;
-       min-height: 40px;
-}
-
-.customize-control-media .inner,
-.customize-control-upload .inner,
-.customize-control-image .inner,
-.customize-control-background .inner,
-.customize-control-cropped_image .inner,
-.customize-control-site_icon .inner,
 .customize-control-header .inner,
 .customize-control-header .inner .dashicons {
        line-height: 20px;
@@ -956,40 +937,19 @@ p.customize-section-description {
        margin-bottom: 0;
 }
 
-.customize-control-media img,
-.customize-control-upload img,
-.customize-control-image img,
-.customize-control-background img,
-.customize-control-cropped_image img,
+.customize-control .attachment-media-view .thumbnail-image img,
 .customize-control-header img {
-       width: 100%;
-       -webkit-border-radius: 2px;
-       border-radius: 2px;
+       max-width: 100%;
 }
 
-.customize-control-media .remove-button,
-.customize-control-media .default-button,
-.customize-control-upload .remove-button,
-.customize-control-upload .default-button,
-.customize-control-image .remove-button,
-.customize-control-image .default-button,
-.customize-control-background .remove-button,
-.customize-control-background .default-button,
-.customize-control-cropped_image .remove-button,
-.customize-control-cropped_image .default-button,
-.customize-control-site_icon .remove-button,
-.customize-control-site_icon .default-button,
+.customize-control .attachment-media-view .remove-button,
+.customize-control .attachment-media-view .default-button,
 .customize-control-header .remove {
        float: left;
        margin-right: 3px;
 }
 
-.customize-control-media .upload-button,
-.customize-control-upload .upload-button,
-.customize-control-image .upload-button,
-.customize-control-background .upload-button,
-.customize-control-cropped_image .upload-button,
-.customize-control-site_icon .upload-button,
+.customize-control .attachment-media-view .upload-button,
 .customize-control-header .new {
        float: right;
 }
@@ -1050,7 +1010,7 @@ p.customize-section-description {
        right: 10px;
        top: 50%;
        margin-top: -14px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .control-section-themes .accordion-section-title:before {
@@ -1219,7 +1179,8 @@ body.cheatin h1 {
        border-bottom: 1px solid #ddd;
        clear: both;
        color: #666;
-       font: 24px "Open Sans", sans-serif;
+       font-size: 24px;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        margin: 30px 0 0 0;
        padding: 0;
        padding-bottom: 7px;
@@ -1550,10 +1511,11 @@ body.adding-widget .add-new-widget:before,
                left: 48px;
                line-height: 45px;
                font-size: 14px;
-               padding: 0 12px 0 12px;
+               padding: 0 12px;
                margin: 0;
                height: 45px;
                background: #eee;
+               border: 0;
                border-right: 1px solid #ddd;
                color: #444;
                cursor: pointer;
index 6b812905a173dd21e065b66f59591cf67c980f83..cf42cc97400b46829b08de8883b5036150d2c40a 100644 (file)
@@ -1 +1 @@
-body{overflow:hidden;-webkit-text-size-adjust:100%}#customize-controls a{text-decoration:none}#customize-controls h3{font-size:14px}#customize-controls img{max-width:100%}#customize-controls .submit{text-align:center}#customize-controls .description{color:#555}#customize-header-actions .button-primary{float:right;margin-top:9px}#customize-header-actions .spinner{margin-top:13px;margin-right:4px}.saving #customize-header-actions .spinner{visibility:visible}#customize-header-actions{border-bottom:1px solid #ddd}#customize-controls .wp-full-overlay-sidebar-content{overflow-y:auto;overflow-x:hidden}#customize-controls .customize-info{border:none;border-top:1px solid #ddd;border-bottom:1px solid #ddd;margin-bottom:15px}#customize-controls .customize-info .accordion-section-title{background:#fff;color:#555;border-left:none;border-right:none;border-bottom:none;cursor:default}#customize-controls .customize-info .accordion-section-title:focus:after,#customize-controls .customize-info .accordion-section-title:hover:after,#customize-controls .customize-info.open .accordion-section-title:after{color:#333}#customize-controls .customize-info .accordion-section-title:after{display:none}#customize-controls .customize-info .preview-notice{font-size:13px;line-height:24px}#customize-controls .control-section .customize-section-title h3,#customize-controls .control-section h3.customize-section-title,#customize-controls .customize-info .panel-title{font-size:20px;font-weight:200;line-height:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#customize-controls .customize-section-title span.customize-action{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#customize-controls .customize-info .customize-help-toggle{position:absolute;top:4px;right:1px;padding:20px 20px 10px 10px;width:20px;height:20px;cursor:pointer;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;background:0 0;color:#555;border:none}#customize-controls .customize-info .customize-help-toggle:before{position:absolute;top:5px;left:6px}#customize-controls .customize-info .customize-help-toggle:focus,#customize-controls .customize-info .customize-help-toggle:hover,#customize-controls .customize-info.open .customize-help-toggle{color:#0073aa}#customize-controls .customize-info .customize-panel-description,#customize-controls .no-widget-areas-rendered-notice{color:#555;display:none;background:#fff;padding:12px 15px;border-top:1px solid #ddd}#customize-controls .customize-info .customize-panel-description.open+.no-widget-areas-rendered-notice{border-top:none}#customize-controls .customize-info .customize-panel-description p:first-child{margin-top:0}#customize-controls .customize-info .customize-panel-description p:last-child{margin-bottom:0}#customize-controls .current-panel .control-section>h3.accordion-section-title{padding-right:30px}#customize-theme-controls .control-section{border:none}#customize-theme-controls .accordion-section-title{color:#555;background-color:#fff;border-bottom:1px solid #eee}#customize-theme-controls .accordion-section-title:after{content:"\f345";color:#a0a5aa}#customize-theme-controls .accordion-section-content{color:#555;background:0 0;position:absolute;top:0;left:100%;width:100%;margin:0;padding:12px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#customize-controls .control-section .accordion-section-title:focus,#customize-controls .control-section .accordion-section-title:hover,#customize-controls .control-section.open .accordion-section-title,#customize-controls .control-section:hover>.accordion-section-title{color:#23282d;background:#f5f5f5}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{background:#f5f5f5}#customize-theme-controls .control-section .accordion-section-title:focus:after,#customize-theme-controls .control-section .accordion-section-title:hover:after,#customize-theme-controls .control-section.open .accordion-section-title:after,#customize-theme-controls .control-section:hover>.accordion-section-title:after{color:#23282d}#customize-theme-controls .control-section.open{border-bottom:1px solid #eee}#customize-theme-controls .control-section.open .accordion-section-title{border-bottom-color:#eee!important}#customize-theme-controls .control-section:last-of-type.open,#customize-theme-controls .control-section:last-of-type>.accordion-section-title{border-bottom-color:#ddd}#customize-theme-controls>ul{margin:0}.customize-section-description-container{margin-bottom:15px}.customize-section-title{margin:-12px -12px 0;border-bottom:1px solid #ddd;background:#fff}div.customize-section-description{margin-top:22px}div.customize-section-description p:first-child{margin-top:0}div.customize-section-description p:last-child{margin-bottom:0}#customize-theme-controls .customize-themes-panel h3.customize-section-title:first-child{border-bottom:1px solid #ddd;padding:12px}.ios #customize-theme-controls .customize-themes-panel h3.customize-section-title:first-child{padding:12px 12px 13px}.customize-section-title h3,h3.customize-section-title{padding:10px 10px 12px 14px;margin:0;line-height:21px;color:#555}#customize-theme-controls{position:relative;left:0;-webkit-transition:.18s left ease-in-out;transition:.18s left ease-in-out}.ios #customize-theme-controls{-webkit-transition:left 0s;transition:left 0s}.section-open #customize-info,.section-open #customize-theme-controls{left:-100%}.accordion-sub-container.control-panel-content{display:none;position:absolute;left:300px;top:0;width:300px;-webkit-transition:left ease-in-out .18s;transition:left ease-in-out .18s}.ios .accordion-sub-container.control-panel-content{-webkit-transition:left 0s;transition:left 0s}.accordion-sub-container.control-panel-content.animating{display:block}.current-panel .accordion-sub-container.control-panel-content{width:100%}.customize-controls-close{display:block;position:absolute;top:0;left:0;width:45px;height:45px;padding:0 2px 0 0;background:#eee;border:none;border-right:1px solid #ddd;color:#444;text-align:left;cursor:pointer;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.customize-panel-back,.customize-section-back{display:block;float:left;width:48px;height:71px;padding:0 24px 0 0;margin:0;background:#fff;border:none;border-right:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;cursor:pointer;-webkit-transition:left .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out;transition:left .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out}.customize-section-back{height:74px}.ios .customize-panel-back,.ios .customize-section-back{-webkit-transition:left 0s;transition:left 0s}.ios .customize-panel-back{display:none}.ios .expanded.in-sub-panel .customize-panel-back{display:block}.panel-meta.customize-info .accordion-section-title{margin-left:48px}#customize-controls .panel-meta.customize-info .accordion-section-title:hover{background:#fff;color:#555}.customize-controls-close:focus,.customize-controls-close:hover,.customize-controls-preview-toggle:focus,.customize-controls-preview-toggle:hover{background:#ddd;border-color:#ccc;color:#000;outline:0;-webkit-box-shadow:none;box-shadow:none}.customize-panel-back:focus,.customize-panel-back:hover,.customize-section-back:focus,.customize-section-back:hover{color:#23282d;background:#f5f5f5;outline:0;-webkit-box-shadow:none;box-shadow:none}.customize-controls-close:before{font:400 22px/45px dashicons;content:"\f335";position:relative;top:1px;left:13px}.customize-panel-back:before,.customize-section-back:before{font:400 20px/72px dashicons;content:"\f341";position:relative;left:13px}.wp-full-overlay-sidebar .wp-full-overlay-header{-webkit-transition:padding ease-in-out .18s;transition:padding ease-in-out .18s}.in-sub-panel .wp-full-overlay-sidebar .wp-full-overlay-header{padding-left:62px}#customize-info,#customize-theme-controls>ul>.accordion-section{position:relative;left:0;-webkit-transition:left ease-in-out .18s;transition:left ease-in-out .18s}.ios #customize-info,.ios #customize-theme-controls>ul>.accordion-section{-webkit-transition:left 0s;transition:left 0s}.in-sub-panel #customize-info,.in-sub-panel #customize-theme-controls>ul>.accordion-section{left:-300px;width:300px}.in-sub-panel #customize-theme-controls .accordion-section.current-panel{width:100%}#customize-theme-controls .control-section.current-panel{padding:0}#customize-theme-controls .control-section>h3.accordion-section-title{position:relative;left:0}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-354px;-webkit-transition:left ease-in-out .18s;transition:left ease-in-out .18s}.ios #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{-webkit-transition:left 0s;transition:left 0s}.wp-full-overlay.section-open #customize-controls .wp-full-overlay-sidebar-content{visibility:hidden;overflow-y:hidden}.wp-full-overlay.section-open .wp-full-overlay-sidebar-content .accordion-section.open{visibility:visible}.wp-full-overlay.section-open .wp-full-overlay-sidebar-content .accordion-section.open .accordion-section-content{overflow-y:auto}p.customize-section-description{font-style:normal;margin-top:22px;margin-bottom:0}.customize-control{width:100%;float:left;clear:both;margin-bottom:12px}.customize-control input[type=radio],.customize-control input[type=checkbox],.customize-control select{line-height:28px}.customize-control input[type=tel],.customize-control input[type=url],.customize-control input[type=text],.customize-control input[type=password],.customize-control input[type=email],.customize-control input[type=number],.customize-control input[type=search]{width:98%;line-height:18px;margin:0}.customize-control-hidden{margin:0}.customize-control-textarea textarea{width:100%;resize:vertical}.customize-control select{min-width:50%;max-width:100%;height:28px;line-height:28px}.customize-control select[multiple]{height:auto}.customize-control-title{display:block;font-size:14px;line-height:24px;font-weight:600;margin-bottom:5px}.customize-control-description{display:block;font-style:italic;line-height:18px;margin-bottom:5px}.customize-control-color .color-picker,.customize-control-upload div{line-height:28px}.customize-control-checkbox label,.customize-control-nav_menu_auto_add label,.customize-control-radio label{line-height:20px;display:block;margin-left:24px;padding-top:6px;padding-bottom:6px}.customize-control-checkbox input,.customize-control-nav_menu_auto_add input,.customize-control-radio input{margin-right:4px;margin-left:-24px}.customize-control-radio{padding:5px 0 10px}.customize-control-radio .customize-control-title{margin-bottom:0;line-height:22px}.customize-control-radio .customize-control-title+.customize-control-description{margin-top:7px}.customize-control .attachment-thumb.type-icon{float:left;margin:10px;width:auto}.customize-control .attachment-title{font-weight:700;margin:0;padding:5px 10px}.customize-control .attachment-meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0 10px}.customize-control .attachment-meta-title{padding-top:7px}.customize-control .thumbnail-image{line-height:0}.customize-control .thumbnail-image img{cursor:pointer}#customize-controls .thumbnail-audio .thumbnail{max-width:64px;max-height:64px;margin:10px;float:left}#customize-preview iframe{width:100%;height:100%;position:absolute}#customize-preview iframe+iframe{visibility:hidden}.wp-full-overlay-sidebar{background:#eee;border-right:1px solid #ddd}.accordion-section .dropdown{float:left;display:block;position:relative;cursor:pointer}.accordion-section .dropdown-content{overflow:hidden;float:left;min-width:30px;height:16px;line-height:16px;margin-right:16px;padding:4px 5px;border:2px solid #eee;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.customize-control .dropdown-arrow{position:absolute;top:0;bottom:0;right:0;width:20px;background:#eee}.customize-control .dropdown-arrow:after{content:"\f140";font:400 20px/1 dashicons;speak:none;display:block;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#32373c}.customize-control .dropdown-status{color:#32373c;background:#eee;display:none;max-width:112px}.customize-control-color .color-picker-hex{display:none}.customize-control-color.open .color-picker-hex,.customize-control-header button img{display:block}.customize-control-color .dropdown{margin-right:5px;margin-bottom:5px}.customize-control-color .dropdown .dropdown-content{background-color:#555;border:1px solid rgba(0,0,0,.15)}.customize-control-color .dropdown:hover .dropdown-content{border-color:rgba(0,0,0,.25)}.ios .wp-full-overlay{position:relative}.ios #customize-controls .wp-full-overlay-sidebar-content{-webkit-overflow-scrolling:touch}.customize-control-background .current,.customize-control-cropped_image .current,.customize-control-header .current,.customize-control-image .current,.customize-control-media .current,.customize-control-site_icon .current,.customize-control-upload .current{margin-bottom:8px}.customize-control-header .uploaded{margin-bottom:18px}.customize-control-header .default button:not(.random),.customize-control-header .uploaded button:not(.random){width:100%;padding:0;margin:0;background:0 0;border:none;color:inherit;cursor:pointer}.customize-control-background .default-button,.customize-control-background .remove-button,.customize-control-background .upload-button,.customize-control-cropped_image .default-button,.customize-control-cropped_image .remove-button,.customize-control-cropped_image .upload-button,.customize-control-header button.new,.customize-control-header button.remove,.customize-control-image .default-button,.customize-control-image .remove-button,.customize-control-image .upload-button,.customize-control-media .default-button,.customize-control-media .remove-button,.customize-control-media .upload-button,.customize-control-site_icon .default-button,.customize-control-site_icon .remove-button,.customize-control-site_icon .upload-button,.customize-control-upload .default-button,.customize-control-upload .remove-button,.customize-control-upload .upload-button{white-space:normal;width:48%;height:auto}.customize-control-background .current .container,.customize-control-cropped_image .current .container,.customize-control-header .current .container,.customize-control-image .current .container,.customize-control-media .current .container,.customize-control-site_icon .current .container,.customize-control-upload .current .container{overflow:hidden;border:1px solid #eee;-webkit-border-radius:2px;border-radius:2px}.customize-control-background .current .container,.customize-control-cropped_image .current .container,.customize-control-image .current .container,.customize-control-media .current .container,.customize-control-site_icon .current .container,.customize-control-upload .current .container{min-height:40px}.customize-control-background .placeholder,.customize-control-cropped_image .placeholder,.customize-control-header .placeholder,.customize-control-image .placeholder,.customize-control-media .placeholder,.customize-control-site_icon .placeholder,.customize-control-upload .placeholder{width:100%;position:relative;text-align:center;cursor:default;border:1px dashed #b4b9be;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;min-height:40px}.customize-control-background .inner,.customize-control-cropped_image .inner,.customize-control-header .inner,.customize-control-image .inner,.customize-control-media .inner,.customize-control-site_icon .inner,.customize-control-upload .inner{display:none;position:absolute;width:100%;color:#555;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.customize-control-background .inner,.customize-control-cropped_image .inner,.customize-control-image .inner,.customize-control-media .inner,.customize-control-site_icon .inner,.customize-control-upload .inner{display:block;min-height:40px}.customize-control-background .inner,.customize-control-cropped_image .inner,.customize-control-header .inner,.customize-control-header .inner .dashicons,.customize-control-image .inner,.customize-control-media .inner,.customize-control-site_icon .inner,.customize-control-upload .inner{line-height:20px;top:8px}.customize-control-header .list .inner,.customize-control-header .list .inner .dashicons{top:9px}.customize-control-header .header-view{position:relative;width:100%;margin-bottom:5px}.customize-control-header .header-view:last-child{margin-bottom:0}.customize-control-header .header-view:after{border:0}.customize-control-header .header-view.selected:after{content:'';position:absolute;height:auto;top:0;left:0;bottom:0;right:0;border:4px solid #00a0d2;-webkit-border-radius:2px;border-radius:2px}.customize-control-header .header-view.button.selected{border:0}.customize-control-header .uploaded .header-view .close{font-size:20px;color:#fff;background:#555;background:rgba(0,0,0,.5);position:absolute;top:10px;right:-999px;z-index:1;width:26px;height:26px;cursor:pointer}.customize-control-header .header-view .close:focus,.customize-control-header .header-view:hover .close{right:10px}.customize-control-header .random.placeholder{cursor:pointer;-webkit-border-radius:2px;border-radius:2px;height:40px}.customize-control-header button.random{width:100%;height:auto;min-height:40px;white-space:normal}.customize-control-header button.random .dice{margin-top:4px}.customize-control-header .header-view:hover>button.random .dice,.customize-control-header .placeholder:hover .dice{-webkit-animation:dice-color-change 3s infinite;animation:dice-color-change 3s infinite}@-webkit-keyframes dice-color-change{0%,100%{color:#d4b146}50%{color:#ef54b0}75%{color:#7190d3}}@keyframes dice-color-change{0%,100%{color:#d4b146}50%{color:#ef54b0}75%{color:#7190d3}}.customize-control-header .choice{position:relative;display:block;margin-bottom:9px}.customize-control-header .uploaded div:last-child>.choice{margin-bottom:0}.customize-control-background img,.customize-control-cropped_image img,.customize-control-header img,.customize-control-image img,.customize-control-media img,.customize-control-upload img{width:100%;-webkit-border-radius:2px;border-radius:2px}.customize-control-background .default-button,.customize-control-background .remove-button,.customize-control-cropped_image .default-button,.customize-control-cropped_image .remove-button,.customize-control-header .remove,.customize-control-image .default-button,.customize-control-image .remove-button,.customize-control-media .default-button,.customize-control-media .remove-button,.customize-control-site_icon .default-button,.customize-control-site_icon .remove-button,.customize-control-upload .default-button,.customize-control-upload .remove-button{float:left;margin-right:3px}.customize-control-background .upload-button,.customize-control-cropped_image .upload-button,.customize-control-header .new,.customize-control-image .upload-button,.customize-control-media .upload-button,.customize-control-site_icon .upload-button,.customize-control-upload .upload-button{float:right}@-webkit-keyframes customize-reload{0%{opacity:0}100%{opacity:1}}@keyframes customize-reload{0%{opacity:0}100%{opacity:1}}.wp-customizer .customize-loading #customize-container{display:block;-webkit-animation:customize-reload .75s;animation:customize-reload .75s}.control-section-themes .accordion-section-title{cursor:default;margin:15px 0;padding-right:100px}#customize-theme-controls .control-section-themes .accordion-section-title:focus,#customize-theme-controls .control-section-themes .accordion-section-title:hover{color:#555;background-color:#fff}.customize-themes-panel .accordion-section-title{margin:15px -8px}#customize-controls .customize-section-title span.customize-action,.control-section-themes .accordion-section-title span.customize-action{font-size:13px;display:block;font-weight:400}.control-section-themes .accordion-section-title .change-theme,.control-section-themes .accordion-section-title .customize-theme{position:absolute;right:10px;top:50%;margin-top:-14px;font-weight:400}.control-section-themes .accordion-section-title:before{display:none}.customize-themes-panel{display:none;padding:0 8px;background:#f1f1f1;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.customize-themes-panel .accordion-section-title:first-child{margin-top:0}#customize-controls .customize-themes-panel .accordion-section-title:nth-child(2){font-size:14px;font-weight:600}.customize-themes-panel>h2{padding:15px 8px 0}.control-section.open .customize-themes-panel{display:block}#customize-theme-controls .customize-themes-panel .accordion-section-content{background:0 0;display:block}.customize-control.customize-control-theme{margin-bottom:8px}#customize-theme-controls .themes.accordion-section-content{position:relative;left:0;padding:0;width:100%}.wp-customizer .theme-browser .themes{padding-bottom:8px}.wp-customizer .theme-browser .theme{margin:0;width:100%}.wp-customizer .theme-browser .theme .theme-actions{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";opacity:1}#customize-controls h3.theme-name{font-size:15px}#customize-controls .theme-overlay .theme-name{font-size:32px}.wp-customizer #themes-filter{font-size:16px;font-weight:300;line-height:1.5;width:100%}#accordion-section-themes .accordion-section-title:after{display:none}#customize-theme-controls .control-section-themes.current-panel>h3.accordion-section-title{left:0}.customize-themes-panel.control-panel-content{position:absolute;left:-100%;top:0;width:100%;border-top:1px solid #ddd}.in-themes-panel #customize-info,.in-themes-panel #customize-theme-controls>ul>.accordion-section{left:100%}.wp-customizer .theme-overlay{display:none}.wp-customizer.modal-open .theme-overlay{position:fixed;left:0;top:0;right:0;bottom:0;z-index:109}.wp-customizer .theme-overlay .theme-backdrop{background:rgba(238,238,238,.75);position:fixed;z-index:110}.wp-customizer .theme-overlay .theme-wrap{left:90px;right:90px;top:45px;bottom:45px;z-index:120;max-width:1740px}.wp-customizer .theme-overlay .theme-actions{text-align:right}.modal-open .in-themes-panel #customize-controls .wp-full-overlay-sidebar-content{overflow:visible}.ie8 .wp-customizer .theme-overlay .theme-about,.ie8 .wp-customizer .theme-overlay .theme-actions,.ie8 .wp-customizer .theme-overlay .theme-header{position:static}@media (max-width:850px),(max-height:472px){.wp-customizer .theme-overlay .theme-wrap{left:0;right:0;top:0;bottom:0}}body.cheatin{font-size:medium;height:auto;background:#fff;margin:50px auto 2em;padding:1em 2em;max-width:700px;min-width:0;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}body.cheatin h1{border-bottom:1px solid #ddd;clear:both;color:#666;font:24px "Open Sans",sans-serif;margin:30px 0 0;padding:0 0 7px}body.cheatin p{font-size:14px;line-height:1.5;margin:25px 0 20px}#customize-theme-controls .add-new-menu-item,#customize-theme-controls .add-new-widget{cursor:pointer;float:right;margin-left:10px;-webkit-transition:all .2s;transition:all .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:0}.reordering .add-new-menu-item,.reordering .add-new-widget{opacity:.2;pointer-events:none;cursor:not-allowed}.add-new-menu-item:before,.add-new-widget:before{content:"\f132";display:inline-block;position:relative;left:-2px;top:-1px;font:400 20px/1 dashicons;vertical-align:middle;-webkit-transition:all .2s;transition:all .2s;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.reorder-toggle{color:#0073aa;float:right;padding:5px 8px;text-decoration:none;cursor:pointer;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.reorder-toggle:hover{color:#00a0d2}.reorder-toggle:focus{outline:dotted 1px}.reorder,.reordering .reorder-done{display:block;padding:5px 8px}.reorder-done,.reordering .reorder{display:none;color:#0073aa}.reorder-toggle:active .reorder-done,.reorder-toggle:focus .reorder-done,.reorder-toggle:hover .reorder-done{color:#00a0d2}.menu-item-reorder-nav button,.widget-reorder-nav span{position:relative;overflow:hidden;float:left;display:block;width:33px;height:43px;color:#82878c;text-indent:-9999px;cursor:pointer;outline:0}.menu-item-reorder-nav button{width:30px;height:40px;background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none}.menu-item-reorder-nav button:before,.widget-reorder-nav span:before{display:inline-block;position:absolute;top:0;right:0;width:100%;height:100%;font:400 20px/43px dashicons;text-align:center;text-indent:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#available-menu-items .customize-section-title,#available-widgets .customize-section-title,.customize-controls-preview-toggle{display:none}.menu-item-reorder-nav button:focus,.menu-item-reorder-nav button:hover,.widget-reorder-nav span:focus,.widget-reorder-nav span:hover{color:#191e23;background:#eee}.menus-move-down:before,.move-widget-down:before{content:"\f347"}.menus-move-up:before,.move-widget-up:before{content:"\f343"}#customize-theme-controls .first-widget .move-widget-up,#customize-theme-controls .last-widget .move-widget-down,.move-down-disabled .menus-move-down,.move-left-disabled .menus-move-left,.move-right-disabled .menus-move-right,.move-up-disabled .menus-move-up{color:#d5d5d5;background-color:#fff;cursor:default;pointer-events:none}.wp-full-overlay-main{right:auto;width:100%}.add-menu-toggle.open,.add-menu-toggle.open:hover,.adding-menu-items .add-new-menu-item,.adding-menu-items .add-new-menu-item:hover,body.adding-widget .add-new-widget,body.adding-widget .add-new-widget:hover{background:#eee;border-color:#929793;color:#32373c;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}#accordion-section-add_menu .add-new-menu-item.open:before,.adding-menu-items .add-new-menu-item:before,body.adding-widget .add-new-widget:before{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}#available-menu-items,#available-widgets{position:absolute;top:0;bottom:0;left:-301px;visibility:hidden;overflow-x:hidden;overflow-y:auto;width:300px;margin:0;z-index:4;background:#eee;-webkit-transition:left .18s;transition:left .18s;border-right:1px solid #ddd}#available-widgets-list{top:60px;position:absolute;overflow:auto;bottom:0;width:100%}#available-widgets-filter{position:fixed;top:0;z-index:1;width:300px;background:#eee;border-bottom:1px solid #e5e5e5}#available-menu-items-search .accordion-section-title,#available-widgets-filter{padding:12px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#available-menu-items-search input,#available-widgets-filter input{padding:6px 10px;width:100%}#available-menu-items .item-top,#available-menu-items .item-top:hover,#available-widgets .widget-top,#available-widgets .widget-top:hover{border:none;background:0 0;-webkit-box-shadow:none;box-shadow:none}#available-menu-items .item-tpl,#available-widgets .widget-tpl{position:relative;padding:20px 15px 20px 60px;background:#fff;border-bottom:1px solid #e5e5e5;cursor:pointer;display:none}#available-menu-items .item,#available-widgets .widget{position:static}@media only screen and (max-width:782px){.wp-customizer .theme:not(.active):focus .theme-actions,.wp-customizer .theme:not(.active):hover .theme-actions{display:block}.wp-customizer .theme-browser .theme.active .theme-name span{display:inline}.customize-control-checkbox label,.customize-control-nav_menu_auto_add label,.customize-control-radio label{margin-left:32px}.customize-control-checkbox input,.customize-control-nav_menu_auto_add input,.customize-control-radio input{margin-left:-32px}.customize-control input[type=radio]+label,.customize-control input[type=checkbox]+label{line-height:32px}}@media screen and (max-width:640px){#customize-controls{width:100%}.wp-full-overlay.collapsed #customize-controls,.wp-full-overlay.expanded{margin-left:0}.wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{bottom:0}.customize-controls-preview-toggle{display:block;position:absolute;top:0;left:48px;line-height:45px;font-size:14px;padding:0 12px;margin:0;height:45px;background:#eee;border-right:1px solid #ddd;color:#444;cursor:pointer;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}#customize-footer-actions,#customize-preview,.customize-controls-preview-toggle .controls,.preview-only .customize-controls-preview-toggle .preview,.preview-only .wp-full-overlay-sidebar-content{display:none}.customize-controls-preview-toggle .controls:before,.customize-controls-preview-toggle .preview:before{font:400 20px/1 dashicons;content:"\f177";position:relative;top:4px;margin-right:6px}.customize-controls-preview-toggle .controls:before{content:"\f540"}.preview-only #customize-controls{height:45px}.preview-only #customize-preview,.preview-only .customize-controls-preview-toggle .controls{display:block}#customize-preview{top:45px;bottom:0;height:auto}.wp-core-ui.wp-customizer .button{padding:6px 14px;line-height:normal;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}#customize-header-actions .button-primary{margin-top:6px}body.adding-menu-items div#available-menu-items,body.adding-widget div#available-widgets{top:46px;left:0;z-index:10;width:100%}#available-menu-items .customize-section-title,#available-widgets .customize-section-title{display:block;margin:0}#available-menu-items .customize-section-back,#available-widgets .customize-section-back{height:69px}#available-menu-items .customize-section-title h3,#available-widgets .customize-section-title h3{font-size:20px;font-weight:200;padding:9px 10px 12px 14px;margin:0;line-height:24px;color:#555;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#available-menu-items .customize-section-title .customize-action,#available-widgets .customize-section-title .customize-action{font-size:13px;display:block;font-weight:400;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#available-widgets-filter{position:relative;width:100%;background:#fff;height:auto;padding:10px 15px}#available-widgets-list{top:140px}}
\ No newline at end of file
+body{overflow:hidden;-webkit-text-size-adjust:100%}#customize-controls a{text-decoration:none}#customize-controls h3{font-size:14px}#customize-controls img{max-width:100%}#customize-controls .submit{text-align:center}#customize-controls .description{color:#555}#customize-header-actions .button-primary{float:right;margin-top:9px}#customize-header-actions .spinner{margin-top:13px;margin-right:4px}.saving #customize-header-actions .spinner{visibility:visible}#customize-header-actions{border-bottom:1px solid #ddd}#customize-controls .wp-full-overlay-sidebar-content{overflow-y:auto;overflow-x:hidden}#customize-controls .customize-info{border:none;border-top:1px solid #ddd;border-bottom:1px solid #ddd;margin-bottom:15px}#customize-controls .customize-info .accordion-section-title{background:#fff;color:#555;border-left:none;border-right:none;border-bottom:none;cursor:default}#customize-controls .customize-info .accordion-section-title:focus:after,#customize-controls .customize-info .accordion-section-title:hover:after,#customize-controls .customize-info.open .accordion-section-title:after{color:#333}#customize-controls .customize-info .accordion-section-title:after{display:none}#customize-controls .customize-info .preview-notice{font-size:13px;line-height:24px}#customize-controls .control-section .customize-section-title h3,#customize-controls .control-section h3.customize-section-title,#customize-controls .customize-info .panel-title{font-size:20px;font-weight:200;line-height:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#customize-controls .customize-section-title span.customize-action{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#customize-controls .customize-info .customize-help-toggle{position:absolute;top:4px;right:1px;padding:20px 20px 10px 10px;width:20px;height:20px;cursor:pointer;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;background:0 0;color:#555;border:none}#customize-controls .customize-info .customize-help-toggle:before{position:absolute;top:5px;left:6px}#customize-controls .customize-info .customize-help-toggle:focus,#customize-controls .customize-info .customize-help-toggle:hover,#customize-controls .customize-info.open .customize-help-toggle{color:#0073aa}#customize-controls .customize-info .customize-panel-description,#customize-controls .no-widget-areas-rendered-notice{color:#555;display:none;background:#fff;padding:12px 15px;border-top:1px solid #ddd}#customize-controls .customize-info .customize-panel-description.open+.no-widget-areas-rendered-notice{border-top:none}#customize-controls .customize-info .customize-panel-description p:first-child{margin-top:0}#customize-controls .customize-info .customize-panel-description p:last-child{margin-bottom:0}#customize-controls .current-panel .control-section>h3.accordion-section-title{padding-right:30px}#customize-theme-controls .control-section{border:none}#customize-theme-controls .accordion-section-title{color:#555;background-color:#fff;border-bottom:1px solid #eee}#customize-theme-controls .accordion-section-title:after{content:"\f345";color:#a0a5aa}#customize-theme-controls .accordion-section-content{color:#555;background:0 0;position:absolute;top:0;left:100%;width:100%;margin:0;padding:12px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#customize-controls .control-section .accordion-section-title:focus,#customize-controls .control-section .accordion-section-title:hover,#customize-controls .control-section.open .accordion-section-title,#customize-controls .control-section:hover>.accordion-section-title{color:#23282d;background:#f5f5f5}.js .control-section .accordion-section-title:focus,.js .control-section .accordion-section-title:hover,.js .control-section.open .accordion-section-title,.js .control-section:hover .accordion-section-title{background:#f5f5f5}#customize-theme-controls .control-section .accordion-section-title:focus:after,#customize-theme-controls .control-section .accordion-section-title:hover:after,#customize-theme-controls .control-section.open .accordion-section-title:after,#customize-theme-controls .control-section:hover>.accordion-section-title:after{color:#23282d}#customize-theme-controls .control-section.open{border-bottom:1px solid #eee}#customize-theme-controls .control-section.open .accordion-section-title{border-bottom-color:#eee!important}#customize-theme-controls .control-section:last-of-type.open,#customize-theme-controls .control-section:last-of-type>.accordion-section-title{border-bottom-color:#ddd}#customize-theme-controls>ul{margin:0}.customize-section-description-container{margin-bottom:15px}.customize-section-title{margin:-12px -12px 0;border-bottom:1px solid #ddd;background:#fff}div.customize-section-description{margin-top:22px}div.customize-section-description p:first-child{margin-top:0}div.customize-section-description p:last-child{margin-bottom:0}#customize-theme-controls .customize-themes-panel h3.customize-section-title:first-child{border-bottom:1px solid #ddd;padding:12px}.ios #customize-theme-controls .customize-themes-panel h3.customize-section-title:first-child{padding:12px 12px 13px}.customize-section-title h3,h3.customize-section-title{padding:10px 10px 12px 14px;margin:0;line-height:21px;color:#555}#customize-theme-controls{position:relative;left:0;-webkit-transition:.18s left ease-in-out;transition:.18s left ease-in-out}.ios #customize-theme-controls{-webkit-transition:left 0s;transition:left 0s}.section-open #customize-info,.section-open #customize-theme-controls{left:-100%}.accordion-sub-container.control-panel-content{display:none;position:absolute;left:100%;top:0;width:100%;-webkit-transition:left ease-in-out .18s;transition:left ease-in-out .18s}.ios .accordion-sub-container.control-panel-content{-webkit-transition:left 0s;transition:left 0s}.accordion-sub-container.control-panel-content.animating{display:block}.current-panel .accordion-sub-container.control-panel-content{width:100%}.customize-controls-close{display:block;position:absolute;top:0;left:0;width:45px;height:45px;padding:0 2px 0 0;background:#eee;border:none;border-right:1px solid #ddd;color:#444;text-align:left;cursor:pointer;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.customize-panel-back,.customize-section-back{display:block;float:left;width:48px;height:71px;padding:0 24px 0 0;margin:0;background:#fff;border:none;border-right:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;cursor:pointer;-webkit-transition:left .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out;transition:left .18s ease-in-out,color .1s ease-in-out,background .1s ease-in-out}.customize-section-back{height:74px}.ios .customize-panel-back,.ios .customize-section-back{-webkit-transition:left 0s;transition:left 0s}.ios .customize-panel-back{display:none}.ios .expanded.in-sub-panel .customize-panel-back{display:block}.panel-meta.customize-info .accordion-section-title{margin-left:48px}#customize-controls .panel-meta.customize-info .accordion-section-title:hover{background:#fff;color:#555}.customize-controls-close:focus,.customize-controls-close:hover,.customize-controls-preview-toggle:focus,.customize-controls-preview-toggle:hover{background:#ddd;border-color:#ccc;color:#000;outline:0;-webkit-box-shadow:none;box-shadow:none}.customize-panel-back:focus,.customize-panel-back:hover,.customize-section-back:focus,.customize-section-back:hover{color:#23282d;background:#f5f5f5;outline:0;-webkit-box-shadow:none;box-shadow:none}.customize-controls-close:before{font:400 22px/45px dashicons;content:"\f335";position:relative;top:1px;left:13px}.customize-panel-back:before,.customize-section-back:before{font:400 20px/72px dashicons;content:"\f341";position:relative;left:13px}.wp-full-overlay-sidebar .wp-full-overlay-header{-webkit-transition:padding ease-in-out .18s;transition:padding ease-in-out .18s}.in-sub-panel .wp-full-overlay-sidebar .wp-full-overlay-header{padding-left:62px}#customize-info,#customize-theme-controls>ul>.accordion-section{position:relative;left:0;-webkit-transition:left ease-in-out .18s;transition:left ease-in-out .18s}.ios #customize-info,.ios #customize-theme-controls>ul>.accordion-section{-webkit-transition:left 0s;transition:left 0s}.in-sub-panel #customize-info,.in-sub-panel #customize-theme-controls>ul>.accordion-section{left:-100%;width:100%}.in-sub-panel #customize-theme-controls .accordion-section.current-panel{width:100%}#customize-theme-controls .control-section.current-panel{padding:0}#customize-theme-controls .control-section>h3.accordion-section-title{position:relative;left:0}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-354px;-webkit-transition:left ease-in-out .18s;transition:left ease-in-out .18s}.ios #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{-webkit-transition:left 0s;transition:left 0s}.wp-full-overlay.section-open #customize-controls .wp-full-overlay-sidebar-content{visibility:hidden;overflow-y:hidden}.wp-full-overlay.section-open .wp-full-overlay-sidebar-content .accordion-section.open{visibility:visible}.wp-full-overlay.section-open .wp-full-overlay-sidebar-content .accordion-section.open .accordion-section-content{overflow-y:auto}p.customize-section-description{font-style:normal;margin-top:22px;margin-bottom:0}.customize-control{width:100%;float:left;clear:both;margin-bottom:12px}.customize-control input[type=radio],.customize-control input[type=checkbox],.customize-control select{line-height:28px}.customize-control input[type=tel],.customize-control input[type=url],.customize-control input[type=text],.customize-control input[type=password],.customize-control input[type=email],.customize-control input[type=number],.customize-control input[type=search]{width:100%;line-height:18px;margin:0}.customize-control-hidden{margin:0}.customize-control-textarea textarea{width:100%;resize:vertical}.customize-control select{min-width:50%;max-width:100%;height:28px;line-height:28px}.customize-control select[multiple]{height:auto}.customize-control-title{display:block;font-size:14px;line-height:24px;font-weight:600;margin-bottom:4px}.customize-control-description{display:block;font-style:italic;line-height:18px;margin-bottom:5px}.customize-control-color .color-picker,.customize-control-upload div{line-height:28px}.customize-control-checkbox label,.customize-control-nav_menu_auto_add label,.customize-control-radio label{line-height:20px;display:block;margin-left:24px;padding-top:6px;padding-bottom:6px}.customize-control-checkbox input,.customize-control-nav_menu_auto_add input,.customize-control-radio input{margin-right:4px;margin-left:-24px}.customize-control-radio{padding:5px 0 10px}.customize-control-radio .customize-control-title{margin-bottom:0;line-height:22px}.customize-control-radio .customize-control-title+.customize-control-description{margin-top:7px}.customize-control .attachment-thumb.type-icon{float:left;margin:10px;width:auto}.customize-control .attachment-title{font-weight:600;margin:0;padding:5px 10px}.customize-control .attachment-meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;padding:0 10px}.customize-control .attachment-meta-title{padding-top:7px}.customize-control .thumbnail-image{line-height:0}.customize-control .thumbnail-image img{cursor:pointer}#customize-controls .thumbnail-audio .thumbnail{max-width:64px;max-height:64px;margin:10px;float:left}#customize-preview iframe{width:100%;height:100%;position:absolute}#customize-preview iframe+iframe{visibility:hidden}.wp-full-overlay-sidebar{background:#eee;border-right:1px solid #ddd}#customize-controls .customize-control-notifications-container{margin:4px 0 8px;padding:0;display:none;cursor:default}#customize-controls .customize-control-widget_form.has-error .widget .widget-top,.customize-control-nav_menu_item.has-error .menu-item-bar .menu-item-handle{-webkit-box-shadow:inset 0 0 0 2px #dc3232;box-shadow:inset 0 0 0 2px #dc3232;-webkit-transition:.15s box-shadow linear;transition:.15s box-shadow linear}.customize-control-notifications-container li.notice{list-style:none;margin:0 0 6px;padding:4px 8px}.customize-control-notifications-container li.notice:last-child{margin-bottom:0}#customize-controls .customize-control-nav_menu_item .customize-control-notifications-container{margin-top:0}#customize-controls .customize-control-widget_form .customize-control-notifications-container,.customize-control .attachment-media-view .actions{margin-top:8px}.customize-control-text.has-error input{outline:#dc3232 solid 2px}.accordion-section .dropdown{float:left;display:block;position:relative;cursor:pointer}.accordion-section .dropdown-content{overflow:hidden;float:left;min-width:30px;height:16px;line-height:16px;margin-right:16px;padding:4px 5px;border:2px solid #eee;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.customize-control .dropdown-arrow{position:absolute;top:0;bottom:0;right:0;width:20px;background:#eee}.customize-control .dropdown-arrow:after{content:"\f140";font:400 20px/1 dashicons;speak:none;display:block;padding:0;text-indent:0;text-align:center;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#32373c}.customize-control .dropdown-status{color:#32373c;background:#eee;display:none;max-width:112px}.customize-control-color .color-picker-hex{display:none}.customize-control-color.open .color-picker-hex,.customize-control-header button img{display:block}.customize-control-color .dropdown{margin-right:5px;margin-bottom:5px}.customize-control-color .dropdown .dropdown-content{background-color:#555;border:1px solid rgba(0,0,0,.15)}.customize-control-color .dropdown:hover .dropdown-content{border-color:rgba(0,0,0,.25)}.ios .wp-full-overlay{position:relative}.ios #customize-controls .wp-full-overlay-sidebar-content{-webkit-overflow-scrolling:touch}.customize-control-header .current{margin-bottom:8px}.customize-control-header .uploaded{margin-bottom:18px}.customize-control-header .default button:not(.random),.customize-control-header .uploaded button:not(.random){width:100%;padding:0;margin:0;background:0 0;border:none;color:inherit;cursor:pointer}.customize-control .attachment-media-view .default-button,.customize-control .attachment-media-view .remove-button,.customize-control .attachment-media-view .upload-button,.customize-control-header button.new,.customize-control-header button.remove{white-space:normal;width:48%;height:auto}.customize-control .attachment-media-view .thumbnail,.customize-control-header .current .container{overflow:hidden}.customize-control .attachment-media-view .placeholder,.customize-control-header .placeholder{width:100%;position:relative;text-align:center;cursor:default;border:1px dashed #b4b9be;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:9px 0;line-height:20px}.customize-control-header .inner{display:none;position:absolute;width:100%;color:#555;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.customize-control-header .inner,.customize-control-header .inner .dashicons{line-height:20px;top:8px}.customize-control-header .list .inner,.customize-control-header .list .inner .dashicons{top:9px}.customize-control-header .header-view{position:relative;width:100%;margin-bottom:5px}.customize-control-header .header-view:last-child{margin-bottom:0}.customize-control-header .header-view:after{border:0}.customize-control-header .header-view.selected:after{content:'';position:absolute;height:auto;top:0;left:0;bottom:0;right:0;border:4px solid #00a0d2;-webkit-border-radius:2px;border-radius:2px}.customize-control-header .header-view.button.selected{border:0}.customize-control-header .uploaded .header-view .close{font-size:20px;color:#fff;background:#555;background:rgba(0,0,0,.5);position:absolute;top:10px;right:-999px;z-index:1;width:26px;height:26px;cursor:pointer}.customize-control-header .header-view .close:focus,.customize-control-header .header-view:hover .close{right:10px}.customize-control-header .random.placeholder{cursor:pointer;-webkit-border-radius:2px;border-radius:2px;height:40px}.customize-control-header button.random{width:100%;height:auto;min-height:40px;white-space:normal}.customize-control-header button.random .dice{margin-top:4px}.customize-control-header .header-view:hover>button.random .dice,.customize-control-header .placeholder:hover .dice{-webkit-animation:dice-color-change 3s infinite;animation:dice-color-change 3s infinite}@-webkit-keyframes dice-color-change{0%,100%{color:#d4b146}50%{color:#ef54b0}75%{color:#7190d3}}@keyframes dice-color-change{0%,100%{color:#d4b146}50%{color:#ef54b0}75%{color:#7190d3}}.customize-control-header .choice{position:relative;display:block;margin-bottom:9px}.customize-control-header .uploaded div:last-child>.choice{margin-bottom:0}.customize-control .attachment-media-view .thumbnail-image img,.customize-control-header img{max-width:100%}.customize-control .attachment-media-view .default-button,.customize-control .attachment-media-view .remove-button,.customize-control-header .remove{float:left;margin-right:3px}.customize-control .attachment-media-view .upload-button,.customize-control-header .new{float:right}@-webkit-keyframes customize-reload{0%{opacity:0}100%{opacity:1}}@keyframes customize-reload{0%{opacity:0}100%{opacity:1}}.wp-customizer .customize-loading #customize-container{display:block;-webkit-animation:customize-reload .75s;animation:customize-reload .75s}.control-section-themes .accordion-section-title{cursor:default;margin:15px 0;padding-right:100px}#customize-theme-controls .control-section-themes .accordion-section-title:focus,#customize-theme-controls .control-section-themes .accordion-section-title:hover{color:#555;background-color:#fff}.customize-themes-panel .accordion-section-title{margin:15px -8px}#customize-controls .customize-section-title span.customize-action,.control-section-themes .accordion-section-title span.customize-action{font-size:13px;display:block;font-weight:400}.control-section-themes .accordion-section-title .change-theme,.control-section-themes .accordion-section-title .customize-theme{position:absolute;right:10px;top:50%;margin-top:-14px;font-weight:400}.control-section-themes .accordion-section-title:before{display:none}.customize-themes-panel{display:none;padding:0 8px;background:#f1f1f1;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.customize-themes-panel .accordion-section-title:first-child{margin-top:0}#customize-controls .customize-themes-panel .accordion-section-title:nth-child(2){font-size:14px;font-weight:600}.customize-themes-panel>h2{padding:15px 8px 0}.control-section.open .customize-themes-panel{display:block}#customize-theme-controls .customize-themes-panel .accordion-section-content{background:0 0;display:block}.customize-control.customize-control-theme{margin-bottom:8px}#customize-theme-controls .themes.accordion-section-content{position:relative;left:0;padding:0;width:100%}.wp-customizer .theme-browser .themes{padding-bottom:8px}.wp-customizer .theme-browser .theme{margin:0;width:100%}.wp-customizer .theme-browser .theme .theme-actions{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";opacity:1}#customize-controls h3.theme-name{font-size:15px}#customize-controls .theme-overlay .theme-name{font-size:32px}.wp-customizer #themes-filter{font-size:16px;font-weight:300;line-height:1.5;width:100%}#accordion-section-themes .accordion-section-title:after{display:none}#customize-theme-controls .control-section-themes.current-panel>h3.accordion-section-title{left:0}.customize-themes-panel.control-panel-content{position:absolute;left:-100%;top:0;width:100%;border-top:1px solid #ddd}.in-themes-panel #customize-info,.in-themes-panel #customize-theme-controls>ul>.accordion-section{left:100%}.wp-customizer .theme-overlay{display:none}.wp-customizer.modal-open .theme-overlay{position:fixed;left:0;top:0;right:0;bottom:0;z-index:109}.wp-customizer .theme-overlay .theme-backdrop{background:rgba(238,238,238,.75);position:fixed;z-index:110}.wp-customizer .theme-overlay .theme-wrap{left:90px;right:90px;top:45px;bottom:45px;z-index:120;max-width:1740px}.wp-customizer .theme-overlay .theme-actions{text-align:right}.modal-open .in-themes-panel #customize-controls .wp-full-overlay-sidebar-content{overflow:visible}.ie8 .wp-customizer .theme-overlay .theme-about,.ie8 .wp-customizer .theme-overlay .theme-actions,.ie8 .wp-customizer .theme-overlay .theme-header{position:static}@media (max-width:850px),(max-height:472px){.wp-customizer .theme-overlay .theme-wrap{left:0;right:0;top:0;bottom:0}}body.cheatin{font-size:medium;height:auto;background:#fff;margin:50px auto 2em;padding:1em 2em;max-width:700px;min-width:0;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}body.cheatin h1{border-bottom:1px solid #ddd;clear:both;color:#666;font-size:24px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;margin:30px 0 0;padding:0 0 7px}body.cheatin p{font-size:14px;line-height:1.5;margin:25px 0 20px}#customize-theme-controls .add-new-menu-item,#customize-theme-controls .add-new-widget{cursor:pointer;float:right;margin-left:10px;-webkit-transition:all .2s;transition:all .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:0}.reordering .add-new-menu-item,.reordering .add-new-widget{opacity:.2;pointer-events:none;cursor:not-allowed}.add-new-menu-item:before,.add-new-widget:before{content:"\f132";display:inline-block;position:relative;left:-2px;top:-1px;font:400 20px/1 dashicons;vertical-align:middle;-webkit-transition:all .2s;transition:all .2s;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.reorder-toggle{color:#0073aa;float:right;padding:5px 8px;text-decoration:none;cursor:pointer;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.reorder-toggle:hover{color:#00a0d2}.reorder-toggle:focus{outline:dotted 1px}.reorder,.reordering .reorder-done{display:block;padding:5px 8px}.reorder-done,.reordering .reorder{display:none;color:#0073aa}.reorder-toggle:active .reorder-done,.reorder-toggle:focus .reorder-done,.reorder-toggle:hover .reorder-done{color:#00a0d2}.menu-item-reorder-nav button,.widget-reorder-nav span{position:relative;overflow:hidden;float:left;display:block;width:33px;height:43px;color:#82878c;text-indent:-9999px;cursor:pointer;outline:0}.menu-item-reorder-nav button{width:30px;height:40px;background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none}.menu-item-reorder-nav button:before,.widget-reorder-nav span:before{display:inline-block;position:absolute;top:0;right:0;width:100%;height:100%;font:400 20px/43px dashicons;text-align:center;text-indent:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#available-menu-items .customize-section-title,#available-widgets .customize-section-title,.customize-controls-preview-toggle{display:none}.menu-item-reorder-nav button:focus,.menu-item-reorder-nav button:hover,.widget-reorder-nav span:focus,.widget-reorder-nav span:hover{color:#191e23;background:#eee}.menus-move-down:before,.move-widget-down:before{content:"\f347"}.menus-move-up:before,.move-widget-up:before{content:"\f343"}#customize-theme-controls .first-widget .move-widget-up,#customize-theme-controls .last-widget .move-widget-down,.move-down-disabled .menus-move-down,.move-left-disabled .menus-move-left,.move-right-disabled .menus-move-right,.move-up-disabled .menus-move-up{color:#d5d5d5;background-color:#fff;cursor:default;pointer-events:none}.wp-full-overlay-main{right:auto;width:100%}.add-menu-toggle.open,.add-menu-toggle.open:hover,.adding-menu-items .add-new-menu-item,.adding-menu-items .add-new-menu-item:hover,body.adding-widget .add-new-widget,body.adding-widget .add-new-widget:hover{background:#eee;border-color:#929793;color:#32373c;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}#accordion-section-add_menu .add-new-menu-item.open:before,.adding-menu-items .add-new-menu-item:before,body.adding-widget .add-new-widget:before{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}#available-menu-items,#available-widgets{position:absolute;top:0;bottom:0;left:-301px;visibility:hidden;overflow-x:hidden;overflow-y:auto;width:300px;margin:0;z-index:4;background:#eee;-webkit-transition:left .18s;transition:left .18s;border-right:1px solid #ddd}#available-widgets-list{top:60px;position:absolute;overflow:auto;bottom:0;width:100%}#available-widgets-filter{position:fixed;top:0;z-index:1;width:300px;background:#eee;border-bottom:1px solid #e5e5e5}#available-menu-items-search .accordion-section-title,#available-widgets-filter{padding:12px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#available-menu-items-search input,#available-widgets-filter input{padding:6px 10px;width:100%}#available-menu-items .item-top,#available-menu-items .item-top:hover,#available-widgets .widget-top,#available-widgets .widget-top:hover{border:none;background:0 0;-webkit-box-shadow:none;box-shadow:none}#available-menu-items .item-tpl,#available-widgets .widget-tpl{position:relative;padding:20px 15px 20px 60px;background:#fff;border-bottom:1px solid #e5e5e5;cursor:pointer;display:none}#available-menu-items .item,#available-widgets .widget{position:static}@media only screen and (max-width:782px){.wp-customizer .theme:not(.active):focus .theme-actions,.wp-customizer .theme:not(.active):hover .theme-actions{display:block}.wp-customizer .theme-browser .theme.active .theme-name span{display:inline}.customize-control-checkbox label,.customize-control-nav_menu_auto_add label,.customize-control-radio label{margin-left:32px}.customize-control-checkbox input,.customize-control-nav_menu_auto_add input,.customize-control-radio input{margin-left:-32px}.customize-control input[type=radio]+label,.customize-control input[type=checkbox]+label{line-height:32px}}@media screen and (max-width:640px){#customize-controls{width:100%}.wp-full-overlay.collapsed #customize-controls,.wp-full-overlay.expanded{margin-left:0}.wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{bottom:0}.customize-controls-preview-toggle{display:block;position:absolute;top:0;left:48px;line-height:45px;font-size:14px;padding:0 12px;margin:0;height:45px;background:#eee;border:0;border-right:1px solid #ddd;color:#444;cursor:pointer;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}#customize-footer-actions,#customize-preview,.customize-controls-preview-toggle .controls,.preview-only .customize-controls-preview-toggle .preview,.preview-only .wp-full-overlay-sidebar-content{display:none}.customize-controls-preview-toggle .controls:before,.customize-controls-preview-toggle .preview:before{font:400 20px/1 dashicons;content:"\f177";position:relative;top:4px;margin-right:6px}.customize-controls-preview-toggle .controls:before{content:"\f540"}.preview-only #customize-controls{height:45px}.preview-only #customize-preview,.preview-only .customize-controls-preview-toggle .controls{display:block}#customize-preview{top:45px;bottom:0;height:auto}.wp-core-ui.wp-customizer .button{padding:6px 14px;line-height:normal;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}#customize-header-actions .button-primary{margin-top:6px}body.adding-menu-items div#available-menu-items,body.adding-widget div#available-widgets{top:46px;left:0;z-index:10;width:100%}#available-menu-items .customize-section-title,#available-widgets .customize-section-title{display:block;margin:0}#available-menu-items .customize-section-back,#available-widgets .customize-section-back{height:69px}#available-menu-items .customize-section-title h3,#available-widgets .customize-section-title h3{font-size:20px;font-weight:200;padding:9px 10px 12px 14px;margin:0;line-height:24px;color:#555;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#available-menu-items .customize-section-title .customize-action,#available-widgets .customize-section-title .customize-action{font-size:13px;display:block;font-weight:400;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#available-widgets-filter{position:relative;width:100%;background:#fff;height:auto;padding:10px 15px}#available-widgets-list{top:140px}}
\ No newline at end of file
index 8653e3651bfa8757511c4650912590f9f59a0698..fde34051ced20eccaf8366049b20a2089aa8eea8 100644 (file)
        color: #555;
 }
 
+/* The `edit-menu` button uses also the `button-link` class. */
+.customize-control-nav_menu_location .edit-menu {
+       margin-right: 6px;
+       vertical-align: middle;
+       line-height: 28px;
+       color: #0073aa;
+       text-decoration: underline;
+}
+
+.customize-control-nav_menu_location .edit-menu:hover,
+.customize-control-nav_menu_location .edit-menu:active {
+       color: #00a0d2;
+}
+
+.customize-control-nav_menu_location .edit-menu:focus {
+       color: #124964;
+}
+
 .wp-customizer .menu-item-bar .menu-item-handle,
 .wp-customizer .menu-item-settings,
 .wp-customizer .menu-item-settings .description-thin {
 #available-menu-items .cannot-expand .accordion-section-title .no-items {
        float: left;
        color: #555d66;
-       font-weight: normal;
+       font-weight: 400;
        margin-right: 5px;
 }
 
 
 #available-menu-items-search .clear-results {
        position: absolute;
-       top: 20px;
+       top: 18px; /* 12 container padding +1 input margin +1 input border +4 ( 4 is ( 28 input height - 20 button height ) / 2 ) */
        left: 20px;
        width: 20px;
        height: 20px;
+       padding: 0;
+       border: 0;
        cursor: pointer;
+       background: none;
        color: #a00;
        text-decoration: none;
+       outline: 0;
 }
 
 #available-menu-items-search .clear-results,
        display: block;
 }
 
+.ie8 #available-menu-items-search.loading .clear-results:before {
+       content: ""; /* help IE8 redraw the pseudo element */
+}
+
 #available-menu-items-search .clear-results:before {
        content: "\f335";
        font: normal 20px/1 dashicons;
+       vertical-align: middle;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
 }
 
 #available-menu-items-search .spinner {
        position: absolute;
-       top: 20px;
-       margin: 0 !important;
+       top: 18px; /* 12 container padding +1 input margin +1 input border +4 ( ( 28 input height - 20 button height ) / 2 ) */
        left: 20px;
+       margin: 0 !important;
 }
 
 /* search results list */
@@ -840,10 +867,19 @@ li.assigned-to-menu-location .add-new-menu-item {
        #available-menu-items #available-menu-items-search .accordion-section-content {
                top: 63px;
        }
+
+       #available-menu-items-search .spinner,
+       #available-menu-items-search .clear-results {
+               top: 20px; /* 12 container padding +1 input margin +1 input border +5.5 ( 5.5 rounded to 6 is ( 31 input height - 20 button height ) / 2 ) */
+       }
 }
 
 @media screen and ( max-width: 640px ) {
        #available-menu-items #available-menu-items-search .accordion-section-content {
                top: 133px;
        }
+
+       #available-menu-items-search .clear-results {
+               top: 90px; /* 70 section title height + 12 container padding +1 input margin +1 input border +5.5 ( 5.5 rounded to 6 is ( 31 input height - 20 button height ) / 2 ) */
+       }
 }
index 3f71b25d748e49242968cc922245dfc266146eba..9c5e43cadc506abbca370b71e6685c89df2f1b11 100644 (file)
@@ -1 +1 @@
-#accordion-section-menu_locations{position:relative;margin-bottom:15px}.menu-in-location,.menu-in-locations{display:block;font-weight:600;font-size:10px}#customize-controls .control-section .accordion-section-title:focus .menu-in-location,#customize-controls .control-section .accordion-section-title:hover .menu-in-location,#customize-controls .theme-location-set{color:#555}.wp-customizer .menu-item-bar .menu-item-handle,.wp-customizer .menu-item-settings,.wp-customizer .menu-item-settings .description-thin{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-customizer .menu-item-bar{margin:0}.wp-customizer .menu-item-bar .menu-item-handle{width:100%;background:#fff}.wp-customizer .menu-item-handle .item-title{margin-left:0}.wp-customizer .menu-item-handle .item-type{padding:1px 5px 0 21px;float:left;text-align:left}.wp-customizer .menu-item-settings{max-width:100%;overflow:hidden;padding:10px;background:#eee;border:1px solid #999;border-top:none}.wp-customizer .menu-item-settings .description-thin{width:100%;height:auto;margin:0 0 8px}.wp-customizer .menu-item-settings input[type=text]{width:100%}.wp-customizer .menu-item-settings .submitbox{margin:0;padding:0}.wp-customizer .menu-item-settings .link-to-original{padding:5px 0;border:none;font-style:normal;margin:0;width:100%}.wp-customizer .menu-item .submitbox .submitdelete{float:right;margin:6px 0 0;padding:0;cursor:pointer}.menu-item-reorder-nav{display:none;background-color:#fff;position:absolute;top:0;left:0}.menus-move-left:before{content:"\f345"}.menus-move-right:before{content:"\f341"}.reordering .menu-item .item-controls,.reordering .menu-item .item-type{display:none}.reordering .menu-item-reorder-nav{display:block}.customize-control input.menu-name-field{width:100%;margin:12px 0}.wp-customizer .menu-item .item-edit{position:absolute;left:-19px;top:2px;display:block;width:30px;height:38px;margin-left:0!important;-webkit-box-shadow:none;box-shadow:none;outline:0;overflow:hidden;cursor:pointer}.wp-customizer .menu-item.menu-item-edit-active .item-edit .toggle-indicator:after{content:"\f142"}.wp-customizer .menu-item-settings p.description{font-style:normal}.wp-customizer .menu-settings dl{margin:12px 0 0;padding:0}.wp-customizer .menu-settings .checkbox-input{margin-top:8px}.wp-customizer .menu-settings .menu-theme-locations{border-top:1px solid #ccc}.wp-customizer .menu-settings{margin-top:36px;border-top:none}.menu-settings .customize-control-checkbox label{line-height:1}.menu-settings .customize-control.customize-control-checkbox{margin-bottom:8px}.customize-control-menu{margin-top:4px}#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle{color:#555}.customize-screen-options-toggle{background:0 0;border:none;color:#555;cursor:pointer;margin:0;padding:20px;position:absolute;left:0;top:30px}#customize-controls .customize-info .customize-help-toggle{padding:20px}#customize-controls .customize-info .customize-help-toggle:before{padding:4px}#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:active,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:focus,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:hover,.active-menu-screen-options .customize-screen-options-toggle,.customize-screen-options-toggle:active,.customize-screen-options-toggle:focus,.customize-screen-options-toggle:hover{color:#0073aa}#customize-controls .customize-info .customize-help-toggle:focus,.customize-screen-options-toggle:focus{outline:0}.customize-screen-options-toggle:before{-moz-osx-font-smoothing:grayscale;border:none;content:"\f111";display:block;font:18px/1 dashicons;padding:5px;text-align:center;text-decoration:none!important;text-indent:0;right:6px;position:absolute;top:6px}#customize-controls .customize-info .customize-help-toggle:focus:before,.customize-screen-options-toggle:focus:before{-webkit-border-radius:100%;border-radius:100%}.wp-customizer #screen-options-wrap{display:none;background:#fff;border-top:1px solid #ddd;padding:4px 15px 15px}.wp-customizer .metabox-prefs label{display:block;padding-left:0;line-height:30px}.wp-customizer .toggle-indicator{display:inline-block;font-size:20px;line-height:1;text-indent:-1px}.rtl .wp-customizer .toggle-indicator{text-indent:1px}.wp-customizer .toggle-indicator:after{content:"\f140";speak:none;vertical-align:top;-webkit-border-radius:50%;border-radius:50%;color:#72777c;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}#accordion-panel-nav_menus .field-css-classes,#accordion-panel-nav_menus .field-description,#accordion-panel-nav_menus .field-link-target,#accordion-panel-nav_menus .field-title-attribute,#accordion-panel-nav_menus .field-xfn{display:none}#accordion-panel-nav_menus.field-css-classes-active .field-css-classes,#accordion-panel-nav_menus.field-description-active .field-description,#accordion-panel-nav_menus.field-link-target-active .field-link-target,#accordion-panel-nav_menus.field-title-attribute-active .field-title-attribute,#accordion-panel-nav_menus.field-xfn-active .field-xfn{display:block}.menu-item-depth-0{margin-right:0}.menu-item-depth-1{margin-right:20px}.menu-item-depth-2{margin-right:40px}.menu-item-depth-3{margin-right:60px}.menu-item-depth-4{margin-right:80px}.menu-item-depth-5{margin-right:100px}.menu-item-depth-6{margin-right:120px}.menu-item-depth-7{margin-right:140px}.menu-item-depth-8{margin-right:160px}.menu-item-depth-9{margin-right:180px}.menu-item-depth-10{margin-right:200px}.menu-item-depth-11{margin-right:220px}.menu-item-depth-0>.menu-item-bar{margin-left:0}.menu-item-depth-1>.menu-item-bar{margin-left:20px}.menu-item-depth-2>.menu-item-bar{margin-left:40px}.menu-item-depth-3>.menu-item-bar{margin-left:60px}.menu-item-depth-4>.menu-item-bar{margin-left:80px}.menu-item-depth-5>.menu-item-bar{margin-left:100px}.menu-item-depth-6>.menu-item-bar{margin-left:120px}.menu-item-depth-7>.menu-item-bar{margin-left:140px}.menu-item-depth-8>.menu-item-bar{margin-left:160px}.menu-item-depth-9>.menu-item-bar{margin-left:180px}.menu-item-depth-10>.menu-item-bar{margin-left:200px}.menu-item-depth-11>.menu-item-bar{margin-left:220px}.menu-item-depth-0 .menu-item-transport{margin-right:0}.menu-item-depth-1 .menu-item-transport{margin-right:-20px}.menu-item-depth-3 .menu-item-transport{margin-right:-60px}.menu-item-depth-4 .menu-item-transport{margin-right:-80px}.menu-item-depth-2 .menu-item-transport{margin-right:-40px}.menu-item-depth-5 .menu-item-transport{margin-right:-100px}.menu-item-depth-6 .menu-item-transport{margin-right:-120px}.menu-item-depth-7 .menu-item-transport{margin-right:-140px}.menu-item-depth-8 .menu-item-transport{margin-right:-160px}.menu-item-depth-9 .menu-item-transport{margin-right:-180px}.menu-item-depth-10 .menu-item-transport{margin-right:-200px}.menu-item-depth-11 .menu-item-transport{margin-right:-220px}.reordering .menu-item-depth-0{margin-right:0}.reordering .menu-item-depth-1{margin-right:15px}.reordering .menu-item-depth-2{margin-right:30px}.reordering .menu-item-depth-3{margin-right:45px}.reordering .menu-item-depth-4{margin-right:60px}.reordering .menu-item-depth-5{margin-right:75px}.reordering .menu-item-depth-6{margin-right:90px}.reordering .menu-item-depth-7{margin-right:105px}.reordering .menu-item-depth-8{margin-right:120px}.reordering .menu-item-depth-9{margin-right:135px}.reordering .menu-item-depth-10{margin-right:150px}.reordering .menu-item-depth-11{margin-right:165px}.reordering .menu-item-depth-0>.menu-item-bar{margin-left:0}.reordering .menu-item-depth-1>.menu-item-bar{margin-left:15px}.reordering .menu-item-depth-2>.menu-item-bar{margin-left:30px}.reordering .menu-item-depth-3>.menu-item-bar{margin-left:45px}.reordering .menu-item-depth-4>.menu-item-bar{margin-left:60px}.reordering .menu-item-depth-5>.menu-item-bar{margin-left:75px}.reordering .menu-item-depth-6>.menu-item-bar{margin-left:90px}.reordering .menu-item-depth-7>.menu-item-bar{margin-left:105px}.reordering .menu-item-depth-8>.menu-item-bar{margin-left:120px}.reordering .menu-item-depth-9>.menu-item-bar{margin-left:135px}.reordering .menu-item-depth-10>.menu-item-bar{margin-left:150px}.reordering .menu-item-depth-11>.menu-item-bar{margin-left:165px}.control-section-nav_menu .menu .menu-item-edit-active{margin-right:0}.control-section-nav_menu .menu .menu-item-edit-active .menu-item-bar{margin-left:0}.control-section-nav_menu .menu .sortable-placeholder{margin-top:0;margin-bottom:1px;max-width:-webkit-calc(100% - 2px);max-width:calc(100% - 2px);float:right;display:list-item;border-color:#a0a5aa}.menu-item-transport li.customize-control{float:none}.control-section-nav_menu .menu ul.menu-item-transport .menu-item-bar{margin-top:0}.adding-menu-items .control-section{opacity:.4}.adding-menu-items .control-panel.control-section,.adding-menu-items .control-section.open{opacity:1}.menu-item-bar .item-delete{color:#a00;position:absolute;top:2px;left:-19px;width:30px;height:38px;cursor:pointer;display:none}.menu-item-bar .item-delete:before{content:"\f335";position:absolute;top:9px;right:5px;-webkit-border-radius:50%;border-radius:50%;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ie8 .menu-item-bar .item-delete:before{top:-10px}.menu-item-bar .item-delete:focus,.menu-item-bar .item-delete:hover{-webkit-box-shadow:none;box-shadow:none;outline:0;color:red}.adding-menu-items .menu-item-bar .item-edit{display:none}.adding-menu-items .menu-item-bar .item-delete{display:block}#available-menu-items.opening{overflow-y:hidden}#available-menu-items #available-menu-items-search.open{height:100%;border-bottom:none}#available-menu-items .accordion-section-title{border-right:none;border-left:none;background:#fff;-webkit-transition:background-color .15s;transition:background-color .15s}#available-menu-items #available-menu-items-search .accordion-section-title,#available-menu-items .open .accordion-section-title{background:#eee}#available-menu-items .accordion-section-title:after{content:none!important}#available-menu-items .accordion-section-title:hover .toggle-indicator:after,#available-menu-items .button-link:focus .toggle-indicator:after,#available-menu-items .button-link:hover .toggle-indicator:after{color:#23282d}#available-menu-items .open .accordion-section-title .toggle-indicator:after{content:"\f142";color:#23282d}#available-menu-items .accordion-section-title button{display:block;width:28px;height:35px;position:absolute;top:5px;left:5px;-webkit-box-shadow:none;box-shadow:none;outline:0;cursor:pointer}#available-menu-items .accordion-section-title .no-items,#available-menu-items .cannot-expand .accordion-section-title .spinner,#available-menu-items .cannot-expand .accordion-section-title>button{display:none}#available-menu-items-search.cannot-expand .accordion-section-title .spinner{display:block}#available-menu-items .cannot-expand .accordion-section-title .no-items{float:left;color:#555d66;font-weight:400;margin-right:5px}#available-menu-items .accordion-section-content{overflow-y:auto;background:0 0;padding:1px 15px 15px;margin:0;max-height:290px}#available-menu-items .menu-item-tpl{margin:0}#custom-menu-item-name.invalid,#custom-menu-item-url.invalid,.menu-name-field.invalid,.menu-name-field.invalid:focus{border:1px solid red}#available-menu-items .menu-item-handle .item-type{padding-left:0}#available-menu-items .menu-item-handle .item-title{padding-right:20px}#available-menu-items .menu-item-handle{cursor:pointer;-webkit-box-shadow:none;box-shadow:none;margin-top:-1px}#available-menu-items .menu-item-handle:hover{z-index:1}#available-menu-items .item-title h4{padding:0 0 5px;font-size:14px}#available-menu-items .item-add{position:absolute;top:1px;right:1px;color:#82878c;width:30px;height:38px;-webkit-box-shadow:none;box-shadow:none;outline:0;cursor:pointer}#available-menu-items .menu-item-handle .item-add:focus{color:#23282d}#available-menu-items .item-add:before{content:"\f543";position:relative;right:2px;top:3px;display:inline-block;height:20px;-webkit-border-radius:50%;border-radius:50%;font:400 20px/1.05 dashicons}#available-menu-items .menu-item-handle.item-added .item-add:focus,#available-menu-items .menu-item-handle.item-added .item-title,#available-menu-items .menu-item-handle.item-added .item-type,#available-menu-items .menu-item-handle.item-added:hover .item-add{color:#82878c}#available-menu-items .menu-item-handle.item-added .item-add:before{content:"\f147"}#available-menu-items .accordion-section-title.loading .spinner,#available-menu-items-search.loading .accordion-section-title .spinner{visibility:visible;margin:0 20px}#available-menu-items-search .clear-results{position:absolute;top:20px;left:20px;width:20px;height:20px;cursor:pointer;color:#a00;text-decoration:none}#available-menu-items-search .clear-results,#available-menu-items-search.loading .clear-results.is-visible{display:none}#available-menu-items-search .clear-results.is-visible{display:block}#available-menu-items-search .clear-results:before{content:"\f335";font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#available-menu-items-search .clear-results:focus,#available-menu-items-search .clear-results:hover{color:red}#available-menu-items-search .spinner{position:absolute;top:20px;margin:0!important;left:20px}#available-menu-items #available-menu-items-search .accordion-section-content{position:absolute;right:1px;top:60px;bottom:0;max-height:none;width:100%;padding:1px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#available-menu-items-search .accordion-section-title:after{display:none}#available-menu-items-search .accordion-section-content:empty{min-height:0;padding:0}#available-menu-items-search.loading .accordion-section-content div{opacity:.5}#available-menu-items-search.loading.loading-more .accordion-section-content div{opacity:1}#customize-preview{-webkit-transition:all .2s;transition:all .2s}body.adding-menu-items #available-menu-items{right:0;visibility:visible}body.adding-menu-items .wp-full-overlay-main{right:300px}body.adding-menu-items #customize-preview{opacity:.4}.menu-item-handle .spinner{display:none;float:right;margin:0 0 0 8px}.nav-menu-inserted-item-loading .spinner{display:block}.nav-menu-inserted-item-loading .menu-item-handle .item-type{padding:0 8px 0 0}.added-menu-item .menu-item-handle.loading,.nav-menu-inserted-item-loading .menu-item-handle{padding:10px 8px 10px 15px;cursor:default;opacity:.5;background:#fff;color:#727773}.added-menu-item .menu-item-handle{-webkit-transition-property:opacity,background,color;transition-property:opacity,background,color;-webkit-transition-duration:1.25s;transition-duration:1.25s;-webkit-transition-timing-function:cubic-bezier(.25,-2.5,.75,8);transition-timing-function:cubic-bezier(.25,-2.5,.75,8)}#accordion-section-add_menu{margin:15px 12px}.new-menu-section-content{display:none;padding:15px 0 0;clear:both}#accordion-section-add_menu .accordion-section-title{padding-right:45px}#accordion-section-add_menu .accordion-section-title:before{font:400 20px/1 dashicons;position:absolute;top:12px;right:14px;content:"\f132"}#create-new-menu-submit{float:left;margin:0 0 12px}.menu-delete-item{float:right;padding:1em 0;width:100%}li.assigned-to-menu-location .menu-delete-item{display:none}li.assigned-to-menu-location .add-new-menu-item{margin-bottom:1em}.menu-delete{color:#a00;cursor:pointer;text-decoration:underline}.menu-delete:focus,.menu-delete:hover{color:red;text-decoration:none}.menu-item-handle{margin-top:-1px}.ui-sortable-disabled .menu-item-handle{cursor:default}.menu-item-handle:hover{position:relative;z-index:10;color:#0073aa}#available-menu-items .menu-item-handle:hover .item-add,.menu-item-handle:hover .item-edit,.menu-item-handle:hover .item-type{color:#0073aa}.menu-item-edit-active .menu-item-handle{border-color:#999;border-bottom:none}.customize-control-nav_menu_item{margin-bottom:0}.customize-control-nav_menu{margin-top:12px}#available-menu-items .item-add:focus:before,#available-menu-items-search .clear-results:focus,#customize-controls .customize-info .customize-help-toggle:focus:before,.customize-screen-options-toggle:focus:before,.menu-delete:focus,.menu-item-bar .item-delete:focus:before,.wp-customizer .menu-item .submitbox .submitdelete:focus,.wp-customizer button:focus .toggle-indicator:after{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}@media screen and (max-width:782px){#available-menu-items #available-menu-items-search .accordion-section-content{top:63px}}@media screen and (max-width:640px){#available-menu-items #available-menu-items-search .accordion-section-content{top:133px}}
\ No newline at end of file
+#accordion-section-menu_locations{position:relative;margin-bottom:15px}.menu-in-location,.menu-in-locations{display:block;font-weight:600;font-size:10px}#customize-controls .control-section .accordion-section-title:focus .menu-in-location,#customize-controls .control-section .accordion-section-title:hover .menu-in-location,#customize-controls .theme-location-set{color:#555}.customize-control-nav_menu_location .edit-menu{margin-right:6px;vertical-align:middle;line-height:28px;color:#0073aa;text-decoration:underline}.customize-control-nav_menu_location .edit-menu:active,.customize-control-nav_menu_location .edit-menu:hover{color:#00a0d2}.customize-control-nav_menu_location .edit-menu:focus{color:#124964}.wp-customizer .menu-item-bar .menu-item-handle,.wp-customizer .menu-item-settings,.wp-customizer .menu-item-settings .description-thin{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-customizer .menu-item-bar{margin:0}.wp-customizer .menu-item-bar .menu-item-handle{width:100%;background:#fff}.wp-customizer .menu-item-handle .item-title{margin-left:0}.wp-customizer .menu-item-handle .item-type{padding:1px 5px 0 21px;float:left;text-align:left}.wp-customizer .menu-item-settings{max-width:100%;overflow:hidden;padding:10px;background:#eee;border:1px solid #999;border-top:none}.wp-customizer .menu-item-settings .description-thin{width:100%;height:auto;margin:0 0 8px}.wp-customizer .menu-item-settings input[type=text]{width:100%}.wp-customizer .menu-item-settings .submitbox{margin:0;padding:0}.wp-customizer .menu-item-settings .link-to-original{padding:5px 0;border:none;font-style:normal;margin:0;width:100%}.wp-customizer .menu-item .submitbox .submitdelete{float:right;margin:6px 0 0;padding:0;cursor:pointer}.menu-item-reorder-nav{display:none;background-color:#fff;position:absolute;top:0;left:0}.menus-move-left:before{content:"\f345"}.menus-move-right:before{content:"\f341"}.reordering .menu-item .item-controls,.reordering .menu-item .item-type{display:none}.reordering .menu-item-reorder-nav{display:block}.customize-control input.menu-name-field{width:100%;margin:12px 0}.wp-customizer .menu-item .item-edit{position:absolute;left:-19px;top:2px;display:block;width:30px;height:38px;margin-left:0!important;-webkit-box-shadow:none;box-shadow:none;outline:0;overflow:hidden;cursor:pointer}.wp-customizer .menu-item.menu-item-edit-active .item-edit .toggle-indicator:after{content:"\f142"}.wp-customizer .menu-item-settings p.description{font-style:normal}.wp-customizer .menu-settings dl{margin:12px 0 0;padding:0}.wp-customizer .menu-settings .checkbox-input{margin-top:8px}.wp-customizer .menu-settings .menu-theme-locations{border-top:1px solid #ccc}.wp-customizer .menu-settings{margin-top:36px;border-top:none}.menu-settings .customize-control-checkbox label{line-height:1}.menu-settings .customize-control.customize-control-checkbox{margin-bottom:8px}.customize-control-menu{margin-top:4px}#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle{color:#555}.customize-screen-options-toggle{background:0 0;border:none;color:#555;cursor:pointer;margin:0;padding:20px;position:absolute;left:0;top:30px}#customize-controls .customize-info .customize-help-toggle{padding:20px}#customize-controls .customize-info .customize-help-toggle:before{padding:4px}#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:active,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:focus,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:hover,.active-menu-screen-options .customize-screen-options-toggle,.customize-screen-options-toggle:active,.customize-screen-options-toggle:focus,.customize-screen-options-toggle:hover{color:#0073aa}#customize-controls .customize-info .customize-help-toggle:focus,.customize-screen-options-toggle:focus{outline:0}.customize-screen-options-toggle:before{-moz-osx-font-smoothing:grayscale;border:none;content:"\f111";display:block;font:18px/1 dashicons;padding:5px;text-align:center;text-decoration:none!important;text-indent:0;right:6px;position:absolute;top:6px}#customize-controls .customize-info .customize-help-toggle:focus:before,.customize-screen-options-toggle:focus:before{-webkit-border-radius:100%;border-radius:100%}.wp-customizer #screen-options-wrap{display:none;background:#fff;border-top:1px solid #ddd;padding:4px 15px 15px}.wp-customizer .metabox-prefs label{display:block;padding-left:0;line-height:30px}.wp-customizer .toggle-indicator{display:inline-block;font-size:20px;line-height:1;text-indent:-1px}.rtl .wp-customizer .toggle-indicator{text-indent:1px}.wp-customizer .toggle-indicator:after{content:"\f140";speak:none;vertical-align:top;-webkit-border-radius:50%;border-radius:50%;color:#72777c;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}#accordion-panel-nav_menus .field-css-classes,#accordion-panel-nav_menus .field-description,#accordion-panel-nav_menus .field-link-target,#accordion-panel-nav_menus .field-title-attribute,#accordion-panel-nav_menus .field-xfn{display:none}#accordion-panel-nav_menus.field-css-classes-active .field-css-classes,#accordion-panel-nav_menus.field-description-active .field-description,#accordion-panel-nav_menus.field-link-target-active .field-link-target,#accordion-panel-nav_menus.field-title-attribute-active .field-title-attribute,#accordion-panel-nav_menus.field-xfn-active .field-xfn{display:block}.menu-item-depth-0{margin-right:0}.menu-item-depth-1{margin-right:20px}.menu-item-depth-2{margin-right:40px}.menu-item-depth-3{margin-right:60px}.menu-item-depth-4{margin-right:80px}.menu-item-depth-5{margin-right:100px}.menu-item-depth-6{margin-right:120px}.menu-item-depth-7{margin-right:140px}.menu-item-depth-8{margin-right:160px}.menu-item-depth-9{margin-right:180px}.menu-item-depth-10{margin-right:200px}.menu-item-depth-11{margin-right:220px}.menu-item-depth-0>.menu-item-bar{margin-left:0}.menu-item-depth-1>.menu-item-bar{margin-left:20px}.menu-item-depth-2>.menu-item-bar{margin-left:40px}.menu-item-depth-3>.menu-item-bar{margin-left:60px}.menu-item-depth-4>.menu-item-bar{margin-left:80px}.menu-item-depth-5>.menu-item-bar{margin-left:100px}.menu-item-depth-6>.menu-item-bar{margin-left:120px}.menu-item-depth-7>.menu-item-bar{margin-left:140px}.menu-item-depth-8>.menu-item-bar{margin-left:160px}.menu-item-depth-9>.menu-item-bar{margin-left:180px}.menu-item-depth-10>.menu-item-bar{margin-left:200px}.menu-item-depth-11>.menu-item-bar{margin-left:220px}.menu-item-depth-0 .menu-item-transport{margin-right:0}.menu-item-depth-1 .menu-item-transport{margin-right:-20px}.menu-item-depth-3 .menu-item-transport{margin-right:-60px}.menu-item-depth-4 .menu-item-transport{margin-right:-80px}.menu-item-depth-2 .menu-item-transport{margin-right:-40px}.menu-item-depth-5 .menu-item-transport{margin-right:-100px}.menu-item-depth-6 .menu-item-transport{margin-right:-120px}.menu-item-depth-7 .menu-item-transport{margin-right:-140px}.menu-item-depth-8 .menu-item-transport{margin-right:-160px}.menu-item-depth-9 .menu-item-transport{margin-right:-180px}.menu-item-depth-10 .menu-item-transport{margin-right:-200px}.menu-item-depth-11 .menu-item-transport{margin-right:-220px}.reordering .menu-item-depth-0{margin-right:0}.reordering .menu-item-depth-1{margin-right:15px}.reordering .menu-item-depth-2{margin-right:30px}.reordering .menu-item-depth-3{margin-right:45px}.reordering .menu-item-depth-4{margin-right:60px}.reordering .menu-item-depth-5{margin-right:75px}.reordering .menu-item-depth-6{margin-right:90px}.reordering .menu-item-depth-7{margin-right:105px}.reordering .menu-item-depth-8{margin-right:120px}.reordering .menu-item-depth-9{margin-right:135px}.reordering .menu-item-depth-10{margin-right:150px}.reordering .menu-item-depth-11{margin-right:165px}.reordering .menu-item-depth-0>.menu-item-bar{margin-left:0}.reordering .menu-item-depth-1>.menu-item-bar{margin-left:15px}.reordering .menu-item-depth-2>.menu-item-bar{margin-left:30px}.reordering .menu-item-depth-3>.menu-item-bar{margin-left:45px}.reordering .menu-item-depth-4>.menu-item-bar{margin-left:60px}.reordering .menu-item-depth-5>.menu-item-bar{margin-left:75px}.reordering .menu-item-depth-6>.menu-item-bar{margin-left:90px}.reordering .menu-item-depth-7>.menu-item-bar{margin-left:105px}.reordering .menu-item-depth-8>.menu-item-bar{margin-left:120px}.reordering .menu-item-depth-9>.menu-item-bar{margin-left:135px}.reordering .menu-item-depth-10>.menu-item-bar{margin-left:150px}.reordering .menu-item-depth-11>.menu-item-bar{margin-left:165px}.control-section-nav_menu .menu .menu-item-edit-active{margin-right:0}.control-section-nav_menu .menu .menu-item-edit-active .menu-item-bar{margin-left:0}.control-section-nav_menu .menu .sortable-placeholder{margin-top:0;margin-bottom:1px;max-width:-webkit-calc(100% - 2px);max-width:calc(100% - 2px);float:right;display:list-item;border-color:#a0a5aa}.menu-item-transport li.customize-control{float:none}.control-section-nav_menu .menu ul.menu-item-transport .menu-item-bar{margin-top:0}.adding-menu-items .control-section{opacity:.4}.adding-menu-items .control-panel.control-section,.adding-menu-items .control-section.open{opacity:1}.menu-item-bar .item-delete{color:#a00;position:absolute;top:2px;left:-19px;width:30px;height:38px;cursor:pointer;display:none}.menu-item-bar .item-delete:before{content:"\f335";position:absolute;top:9px;right:5px;-webkit-border-radius:50%;border-radius:50%;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ie8 .menu-item-bar .item-delete:before{top:-10px}.menu-item-bar .item-delete:focus,.menu-item-bar .item-delete:hover{-webkit-box-shadow:none;box-shadow:none;outline:0;color:red}.adding-menu-items .menu-item-bar .item-edit{display:none}.adding-menu-items .menu-item-bar .item-delete{display:block}#available-menu-items.opening{overflow-y:hidden}#available-menu-items #available-menu-items-search.open{height:100%;border-bottom:none}#available-menu-items .accordion-section-title{border-right:none;border-left:none;background:#fff;-webkit-transition:background-color .15s;transition:background-color .15s}#available-menu-items #available-menu-items-search .accordion-section-title,#available-menu-items .open .accordion-section-title{background:#eee}#available-menu-items .accordion-section-title:after{content:none!important}#available-menu-items .accordion-section-title:hover .toggle-indicator:after,#available-menu-items .button-link:focus .toggle-indicator:after,#available-menu-items .button-link:hover .toggle-indicator:after{color:#23282d}#available-menu-items .open .accordion-section-title .toggle-indicator:after{content:"\f142";color:#23282d}#available-menu-items .accordion-section-title button{display:block;width:28px;height:35px;position:absolute;top:5px;left:5px;-webkit-box-shadow:none;box-shadow:none;outline:0;cursor:pointer}#available-menu-items .accordion-section-title .no-items,#available-menu-items .cannot-expand .accordion-section-title .spinner,#available-menu-items .cannot-expand .accordion-section-title>button{display:none}#available-menu-items-search.cannot-expand .accordion-section-title .spinner{display:block}#available-menu-items .cannot-expand .accordion-section-title .no-items{float:left;color:#555d66;font-weight:400;margin-right:5px}#available-menu-items .accordion-section-content{overflow-y:auto;background:0 0;padding:1px 15px 15px;margin:0;max-height:290px}#available-menu-items .menu-item-tpl{margin:0}#custom-menu-item-name.invalid,#custom-menu-item-url.invalid,.menu-name-field.invalid,.menu-name-field.invalid:focus{border:1px solid red}#available-menu-items .menu-item-handle .item-type{padding-left:0}#available-menu-items .menu-item-handle .item-title{padding-right:20px}#available-menu-items .menu-item-handle{cursor:pointer;-webkit-box-shadow:none;box-shadow:none;margin-top:-1px}#available-menu-items .menu-item-handle:hover{z-index:1}#available-menu-items .item-title h4{padding:0 0 5px;font-size:14px}#available-menu-items .item-add{position:absolute;top:1px;right:1px;color:#82878c;width:30px;height:38px;-webkit-box-shadow:none;box-shadow:none;outline:0;cursor:pointer}#available-menu-items .menu-item-handle .item-add:focus{color:#23282d}#available-menu-items .item-add:before{content:"\f543";position:relative;right:2px;top:3px;display:inline-block;height:20px;-webkit-border-radius:50%;border-radius:50%;font:400 20px/1.05 dashicons}#available-menu-items .menu-item-handle.item-added .item-add:focus,#available-menu-items .menu-item-handle.item-added .item-title,#available-menu-items .menu-item-handle.item-added .item-type,#available-menu-items .menu-item-handle.item-added:hover .item-add{color:#82878c}#available-menu-items .menu-item-handle.item-added .item-add:before{content:"\f147"}#available-menu-items .accordion-section-title.loading .spinner,#available-menu-items-search.loading .accordion-section-title .spinner{visibility:visible;margin:0 20px}#available-menu-items-search .clear-results{position:absolute;top:18px;left:20px;width:20px;height:20px;padding:0;border:0;cursor:pointer;background:0 0;color:#a00;text-decoration:none;outline:0}#available-menu-items-search .clear-results,#available-menu-items-search.loading .clear-results.is-visible{display:none}#available-menu-items-search .clear-results.is-visible{display:block}.ie8 #available-menu-items-search.loading .clear-results:before{content:""}#available-menu-items-search .clear-results:before{content:"\f335";font:400 20px/1 dashicons;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#available-menu-items-search .clear-results:focus,#available-menu-items-search .clear-results:hover{color:red}#available-menu-items-search .spinner{position:absolute;top:18px;left:20px;margin:0!important}#available-menu-items #available-menu-items-search .accordion-section-content{position:absolute;right:1px;top:60px;bottom:0;max-height:none;width:100%;padding:1px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#available-menu-items-search .accordion-section-title:after{display:none}#available-menu-items-search .accordion-section-content:empty{min-height:0;padding:0}#available-menu-items-search.loading .accordion-section-content div{opacity:.5}#available-menu-items-search.loading.loading-more .accordion-section-content div{opacity:1}#customize-preview{-webkit-transition:all .2s;transition:all .2s}body.adding-menu-items #available-menu-items{right:0;visibility:visible}body.adding-menu-items .wp-full-overlay-main{right:300px}body.adding-menu-items #customize-preview{opacity:.4}.menu-item-handle .spinner{display:none;float:right;margin:0 0 0 8px}.nav-menu-inserted-item-loading .spinner{display:block}.nav-menu-inserted-item-loading .menu-item-handle .item-type{padding:0 8px 0 0}.added-menu-item .menu-item-handle.loading,.nav-menu-inserted-item-loading .menu-item-handle{padding:10px 8px 10px 15px;cursor:default;opacity:.5;background:#fff;color:#727773}.added-menu-item .menu-item-handle{-webkit-transition-property:opacity,background,color;transition-property:opacity,background,color;-webkit-transition-duration:1.25s;transition-duration:1.25s;-webkit-transition-timing-function:cubic-bezier(.25,-2.5,.75,8);transition-timing-function:cubic-bezier(.25,-2.5,.75,8)}#accordion-section-add_menu{margin:15px 12px}.new-menu-section-content{display:none;padding:15px 0 0;clear:both}#accordion-section-add_menu .accordion-section-title{padding-right:45px}#accordion-section-add_menu .accordion-section-title:before{font:400 20px/1 dashicons;position:absolute;top:12px;right:14px;content:"\f132"}#create-new-menu-submit{float:left;margin:0 0 12px}.menu-delete-item{float:right;padding:1em 0;width:100%}li.assigned-to-menu-location .menu-delete-item{display:none}li.assigned-to-menu-location .add-new-menu-item{margin-bottom:1em}.menu-delete{color:#a00;cursor:pointer;text-decoration:underline}.menu-delete:focus,.menu-delete:hover{color:red;text-decoration:none}.menu-item-handle{margin-top:-1px}.ui-sortable-disabled .menu-item-handle{cursor:default}.menu-item-handle:hover{position:relative;z-index:10;color:#0073aa}#available-menu-items .menu-item-handle:hover .item-add,.menu-item-handle:hover .item-edit,.menu-item-handle:hover .item-type{color:#0073aa}.menu-item-edit-active .menu-item-handle{border-color:#999;border-bottom:none}.customize-control-nav_menu_item{margin-bottom:0}.customize-control-nav_menu{margin-top:12px}#available-menu-items .item-add:focus:before,#available-menu-items-search .clear-results:focus,#customize-controls .customize-info .customize-help-toggle:focus:before,.customize-screen-options-toggle:focus:before,.menu-delete:focus,.menu-item-bar .item-delete:focus:before,.wp-customizer .menu-item .submitbox .submitdelete:focus,.wp-customizer button:focus .toggle-indicator:after{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}@media screen and (max-width:782px){#available-menu-items #available-menu-items-search .accordion-section-content{top:63px}#available-menu-items-search .clear-results,#available-menu-items-search .spinner{top:20px}}@media screen and (max-width:640px){#available-menu-items #available-menu-items-search .accordion-section-content{top:133px}#available-menu-items-search .clear-results{top:90px}}
\ No newline at end of file
index cc6725e9a5d8245e9067a2d06d34e6aa406516d8..afe0cbc56698e33c4c9e39b877de1117b8f0b7b1 100644 (file)
        color: #555;
 }
 
+/* The `edit-menu` button uses also the `button-link` class. */
+.customize-control-nav_menu_location .edit-menu {
+       margin-left: 6px;
+       vertical-align: middle;
+       line-height: 28px;
+       color: #0073aa;
+       text-decoration: underline;
+}
+
+.customize-control-nav_menu_location .edit-menu:hover,
+.customize-control-nav_menu_location .edit-menu:active {
+       color: #00a0d2;
+}
+
+.customize-control-nav_menu_location .edit-menu:focus {
+       color: #124964;
+}
+
 .wp-customizer .menu-item-bar .menu-item-handle,
 .wp-customizer .menu-item-settings,
 .wp-customizer .menu-item-settings .description-thin {
 #available-menu-items .cannot-expand .accordion-section-title .no-items {
        float: right;
        color: #555d66;
-       font-weight: normal;
+       font-weight: 400;
        margin-left: 5px;
 }
 
 
 #available-menu-items-search .clear-results {
        position: absolute;
-       top: 20px;
+       top: 18px; /* 12 container padding +1 input margin +1 input border +4 ( 4 is ( 28 input height - 20 button height ) / 2 ) */
        right: 20px;
        width: 20px;
        height: 20px;
+       padding: 0;
+       border: 0;
        cursor: pointer;
+       background: none;
        color: #a00;
        text-decoration: none;
+       outline: 0;
 }
 
 #available-menu-items-search .clear-results,
        display: block;
 }
 
+.ie8 #available-menu-items-search.loading .clear-results:before {
+       content: ""; /* help IE8 redraw the pseudo element */
+}
+
 #available-menu-items-search .clear-results:before {
        content: "\f335";
        font: normal 20px/1 dashicons;
+       vertical-align: middle;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
 }
 
 #available-menu-items-search .spinner {
        position: absolute;
-       top: 20px;
-       margin: 0 !important;
+       top: 18px; /* 12 container padding +1 input margin +1 input border +4 ( ( 28 input height - 20 button height ) / 2 ) */
        right: 20px;
+       margin: 0 !important;
 }
 
 /* search results list */
@@ -840,10 +867,19 @@ li.assigned-to-menu-location .add-new-menu-item {
        #available-menu-items #available-menu-items-search .accordion-section-content {
                top: 63px;
        }
+
+       #available-menu-items-search .spinner,
+       #available-menu-items-search .clear-results {
+               top: 20px; /* 12 container padding +1 input margin +1 input border +5.5 ( 5.5 rounded to 6 is ( 31 input height - 20 button height ) / 2 ) */
+       }
 }
 
 @media screen and ( max-width: 640px ) {
        #available-menu-items #available-menu-items-search .accordion-section-content {
                top: 133px;
        }
+
+       #available-menu-items-search .clear-results {
+               top: 90px; /* 70 section title height + 12 container padding +1 input margin +1 input border +5.5 ( 5.5 rounded to 6 is ( 31 input height - 20 button height ) / 2 ) */
+       }
 }
index 03226bb0e62143fadf9e4db1027ad3e2da7e5a30..4c2e208a1b0307c01f55df2df1703a003e41ed3e 100644 (file)
@@ -1 +1 @@
-#accordion-section-menu_locations{position:relative;margin-bottom:15px}.menu-in-location,.menu-in-locations{display:block;font-weight:600;font-size:10px}#customize-controls .control-section .accordion-section-title:focus .menu-in-location,#customize-controls .control-section .accordion-section-title:hover .menu-in-location,#customize-controls .theme-location-set{color:#555}.wp-customizer .menu-item-bar .menu-item-handle,.wp-customizer .menu-item-settings,.wp-customizer .menu-item-settings .description-thin{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-customizer .menu-item-bar{margin:0}.wp-customizer .menu-item-bar .menu-item-handle{width:100%;background:#fff}.wp-customizer .menu-item-handle .item-title{margin-right:0}.wp-customizer .menu-item-handle .item-type{padding:1px 21px 0 5px;float:right;text-align:right}.wp-customizer .menu-item-settings{max-width:100%;overflow:hidden;padding:10px;background:#eee;border:1px solid #999;border-top:none}.wp-customizer .menu-item-settings .description-thin{width:100%;height:auto;margin:0 0 8px}.wp-customizer .menu-item-settings input[type=text]{width:100%}.wp-customizer .menu-item-settings .submitbox{margin:0;padding:0}.wp-customizer .menu-item-settings .link-to-original{padding:5px 0;border:none;font-style:normal;margin:0;width:100%}.wp-customizer .menu-item .submitbox .submitdelete{float:left;margin:6px 0 0;padding:0;cursor:pointer}.menu-item-reorder-nav{display:none;background-color:#fff;position:absolute;top:0;right:0}.menus-move-left:before{content:"\f341"}.menus-move-right:before{content:"\f345"}.reordering .menu-item .item-controls,.reordering .menu-item .item-type{display:none}.reordering .menu-item-reorder-nav{display:block}.customize-control input.menu-name-field{width:100%;margin:12px 0}.wp-customizer .menu-item .item-edit{position:absolute;right:-19px;top:2px;display:block;width:30px;height:38px;margin-right:0!important;-webkit-box-shadow:none;box-shadow:none;outline:0;overflow:hidden;cursor:pointer}.wp-customizer .menu-item.menu-item-edit-active .item-edit .toggle-indicator:after{content:"\f142"}.wp-customizer .menu-item-settings p.description{font-style:normal}.wp-customizer .menu-settings dl{margin:12px 0 0;padding:0}.wp-customizer .menu-settings .checkbox-input{margin-top:8px}.wp-customizer .menu-settings .menu-theme-locations{border-top:1px solid #ccc}.wp-customizer .menu-settings{margin-top:36px;border-top:none}.menu-settings .customize-control-checkbox label{line-height:1}.menu-settings .customize-control.customize-control-checkbox{margin-bottom:8px}.customize-control-menu{margin-top:4px}#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle{color:#555}.customize-screen-options-toggle{background:0 0;border:none;color:#555;cursor:pointer;margin:0;padding:20px;position:absolute;right:0;top:30px}#customize-controls .customize-info .customize-help-toggle{padding:20px}#customize-controls .customize-info .customize-help-toggle:before{padding:4px}#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:active,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:focus,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:hover,.active-menu-screen-options .customize-screen-options-toggle,.customize-screen-options-toggle:active,.customize-screen-options-toggle:focus,.customize-screen-options-toggle:hover{color:#0073aa}#customize-controls .customize-info .customize-help-toggle:focus,.customize-screen-options-toggle:focus{outline:0}.customize-screen-options-toggle:before{-moz-osx-font-smoothing:grayscale;border:none;content:"\f111";display:block;font:18px/1 dashicons;padding:5px;text-align:center;text-decoration:none!important;text-indent:0;left:6px;position:absolute;top:6px}#customize-controls .customize-info .customize-help-toggle:focus:before,.customize-screen-options-toggle:focus:before{-webkit-border-radius:100%;border-radius:100%}.wp-customizer #screen-options-wrap{display:none;background:#fff;border-top:1px solid #ddd;padding:4px 15px 15px}.wp-customizer .metabox-prefs label{display:block;padding-right:0;line-height:30px}.wp-customizer .toggle-indicator{display:inline-block;font-size:20px;line-height:1;text-indent:-1px}.rtl .wp-customizer .toggle-indicator{text-indent:1px}.wp-customizer .toggle-indicator:after{content:"\f140";speak:none;vertical-align:top;-webkit-border-radius:50%;border-radius:50%;color:#72777c;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}#accordion-panel-nav_menus .field-css-classes,#accordion-panel-nav_menus .field-description,#accordion-panel-nav_menus .field-link-target,#accordion-panel-nav_menus .field-title-attribute,#accordion-panel-nav_menus .field-xfn{display:none}#accordion-panel-nav_menus.field-css-classes-active .field-css-classes,#accordion-panel-nav_menus.field-description-active .field-description,#accordion-panel-nav_menus.field-link-target-active .field-link-target,#accordion-panel-nav_menus.field-title-attribute-active .field-title-attribute,#accordion-panel-nav_menus.field-xfn-active .field-xfn{display:block}.menu-item-depth-0{margin-left:0}.menu-item-depth-1{margin-left:20px}.menu-item-depth-2{margin-left:40px}.menu-item-depth-3{margin-left:60px}.menu-item-depth-4{margin-left:80px}.menu-item-depth-5{margin-left:100px}.menu-item-depth-6{margin-left:120px}.menu-item-depth-7{margin-left:140px}.menu-item-depth-8{margin-left:160px}.menu-item-depth-9{margin-left:180px}.menu-item-depth-10{margin-left:200px}.menu-item-depth-11{margin-left:220px}.menu-item-depth-0>.menu-item-bar{margin-right:0}.menu-item-depth-1>.menu-item-bar{margin-right:20px}.menu-item-depth-2>.menu-item-bar{margin-right:40px}.menu-item-depth-3>.menu-item-bar{margin-right:60px}.menu-item-depth-4>.menu-item-bar{margin-right:80px}.menu-item-depth-5>.menu-item-bar{margin-right:100px}.menu-item-depth-6>.menu-item-bar{margin-right:120px}.menu-item-depth-7>.menu-item-bar{margin-right:140px}.menu-item-depth-8>.menu-item-bar{margin-right:160px}.menu-item-depth-9>.menu-item-bar{margin-right:180px}.menu-item-depth-10>.menu-item-bar{margin-right:200px}.menu-item-depth-11>.menu-item-bar{margin-right:220px}.menu-item-depth-0 .menu-item-transport{margin-left:0}.menu-item-depth-1 .menu-item-transport{margin-left:-20px}.menu-item-depth-3 .menu-item-transport{margin-left:-60px}.menu-item-depth-4 .menu-item-transport{margin-left:-80px}.menu-item-depth-2 .menu-item-transport{margin-left:-40px}.menu-item-depth-5 .menu-item-transport{margin-left:-100px}.menu-item-depth-6 .menu-item-transport{margin-left:-120px}.menu-item-depth-7 .menu-item-transport{margin-left:-140px}.menu-item-depth-8 .menu-item-transport{margin-left:-160px}.menu-item-depth-9 .menu-item-transport{margin-left:-180px}.menu-item-depth-10 .menu-item-transport{margin-left:-200px}.menu-item-depth-11 .menu-item-transport{margin-left:-220px}.reordering .menu-item-depth-0{margin-left:0}.reordering .menu-item-depth-1{margin-left:15px}.reordering .menu-item-depth-2{margin-left:30px}.reordering .menu-item-depth-3{margin-left:45px}.reordering .menu-item-depth-4{margin-left:60px}.reordering .menu-item-depth-5{margin-left:75px}.reordering .menu-item-depth-6{margin-left:90px}.reordering .menu-item-depth-7{margin-left:105px}.reordering .menu-item-depth-8{margin-left:120px}.reordering .menu-item-depth-9{margin-left:135px}.reordering .menu-item-depth-10{margin-left:150px}.reordering .menu-item-depth-11{margin-left:165px}.reordering .menu-item-depth-0>.menu-item-bar{margin-right:0}.reordering .menu-item-depth-1>.menu-item-bar{margin-right:15px}.reordering .menu-item-depth-2>.menu-item-bar{margin-right:30px}.reordering .menu-item-depth-3>.menu-item-bar{margin-right:45px}.reordering .menu-item-depth-4>.menu-item-bar{margin-right:60px}.reordering .menu-item-depth-5>.menu-item-bar{margin-right:75px}.reordering .menu-item-depth-6>.menu-item-bar{margin-right:90px}.reordering .menu-item-depth-7>.menu-item-bar{margin-right:105px}.reordering .menu-item-depth-8>.menu-item-bar{margin-right:120px}.reordering .menu-item-depth-9>.menu-item-bar{margin-right:135px}.reordering .menu-item-depth-10>.menu-item-bar{margin-right:150px}.reordering .menu-item-depth-11>.menu-item-bar{margin-right:165px}.control-section-nav_menu .menu .menu-item-edit-active{margin-left:0}.control-section-nav_menu .menu .menu-item-edit-active .menu-item-bar{margin-right:0}.control-section-nav_menu .menu .sortable-placeholder{margin-top:0;margin-bottom:1px;max-width:-webkit-calc(100% - 2px);max-width:calc(100% - 2px);float:left;display:list-item;border-color:#a0a5aa}.menu-item-transport li.customize-control{float:none}.control-section-nav_menu .menu ul.menu-item-transport .menu-item-bar{margin-top:0}.adding-menu-items .control-section{opacity:.4}.adding-menu-items .control-panel.control-section,.adding-menu-items .control-section.open{opacity:1}.menu-item-bar .item-delete{color:#a00;position:absolute;top:2px;right:-19px;width:30px;height:38px;cursor:pointer;display:none}.menu-item-bar .item-delete:before{content:"\f335";position:absolute;top:9px;left:5px;-webkit-border-radius:50%;border-radius:50%;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ie8 .menu-item-bar .item-delete:before{top:-10px}.menu-item-bar .item-delete:focus,.menu-item-bar .item-delete:hover{-webkit-box-shadow:none;box-shadow:none;outline:0;color:red}.adding-menu-items .menu-item-bar .item-edit{display:none}.adding-menu-items .menu-item-bar .item-delete{display:block}#available-menu-items.opening{overflow-y:hidden}#available-menu-items #available-menu-items-search.open{height:100%;border-bottom:none}#available-menu-items .accordion-section-title{border-left:none;border-right:none;background:#fff;-webkit-transition:background-color .15s;transition:background-color .15s}#available-menu-items #available-menu-items-search .accordion-section-title,#available-menu-items .open .accordion-section-title{background:#eee}#available-menu-items .accordion-section-title:after{content:none!important}#available-menu-items .accordion-section-title:hover .toggle-indicator:after,#available-menu-items .button-link:focus .toggle-indicator:after,#available-menu-items .button-link:hover .toggle-indicator:after{color:#23282d}#available-menu-items .open .accordion-section-title .toggle-indicator:after{content:"\f142";color:#23282d}#available-menu-items .accordion-section-title button{display:block;width:28px;height:35px;position:absolute;top:5px;right:5px;-webkit-box-shadow:none;box-shadow:none;outline:0;cursor:pointer}#available-menu-items .accordion-section-title .no-items,#available-menu-items .cannot-expand .accordion-section-title .spinner,#available-menu-items .cannot-expand .accordion-section-title>button{display:none}#available-menu-items-search.cannot-expand .accordion-section-title .spinner{display:block}#available-menu-items .cannot-expand .accordion-section-title .no-items{float:right;color:#555d66;font-weight:400;margin-left:5px}#available-menu-items .accordion-section-content{overflow-y:auto;background:0 0;padding:1px 15px 15px;margin:0;max-height:290px}#available-menu-items .menu-item-tpl{margin:0}#custom-menu-item-name.invalid,#custom-menu-item-url.invalid,.menu-name-field.invalid,.menu-name-field.invalid:focus{border:1px solid red}#available-menu-items .menu-item-handle .item-type{padding-right:0}#available-menu-items .menu-item-handle .item-title{padding-left:20px}#available-menu-items .menu-item-handle{cursor:pointer;-webkit-box-shadow:none;box-shadow:none;margin-top:-1px}#available-menu-items .menu-item-handle:hover{z-index:1}#available-menu-items .item-title h4{padding:0 0 5px;font-size:14px}#available-menu-items .item-add{position:absolute;top:1px;left:1px;color:#82878c;width:30px;height:38px;-webkit-box-shadow:none;box-shadow:none;outline:0;cursor:pointer}#available-menu-items .menu-item-handle .item-add:focus{color:#23282d}#available-menu-items .item-add:before{content:"\f543";position:relative;left:2px;top:3px;display:inline-block;height:20px;-webkit-border-radius:50%;border-radius:50%;font:400 20px/1.05 dashicons}#available-menu-items .menu-item-handle.item-added .item-add:focus,#available-menu-items .menu-item-handle.item-added .item-title,#available-menu-items .menu-item-handle.item-added .item-type,#available-menu-items .menu-item-handle.item-added:hover .item-add{color:#82878c}#available-menu-items .menu-item-handle.item-added .item-add:before{content:"\f147"}#available-menu-items .accordion-section-title.loading .spinner,#available-menu-items-search.loading .accordion-section-title .spinner{visibility:visible;margin:0 20px}#available-menu-items-search .clear-results{position:absolute;top:20px;right:20px;width:20px;height:20px;cursor:pointer;color:#a00;text-decoration:none}#available-menu-items-search .clear-results,#available-menu-items-search.loading .clear-results.is-visible{display:none}#available-menu-items-search .clear-results.is-visible{display:block}#available-menu-items-search .clear-results:before{content:"\f335";font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#available-menu-items-search .clear-results:focus,#available-menu-items-search .clear-results:hover{color:red}#available-menu-items-search .spinner{position:absolute;top:20px;margin:0!important;right:20px}#available-menu-items #available-menu-items-search .accordion-section-content{position:absolute;left:1px;top:60px;bottom:0;max-height:none;width:100%;padding:1px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#available-menu-items-search .accordion-section-title:after{display:none}#available-menu-items-search .accordion-section-content:empty{min-height:0;padding:0}#available-menu-items-search.loading .accordion-section-content div{opacity:.5}#available-menu-items-search.loading.loading-more .accordion-section-content div{opacity:1}#customize-preview{-webkit-transition:all .2s;transition:all .2s}body.adding-menu-items #available-menu-items{left:0;visibility:visible}body.adding-menu-items .wp-full-overlay-main{left:300px}body.adding-menu-items #customize-preview{opacity:.4}.menu-item-handle .spinner{display:none;float:left;margin:0 8px 0 0}.nav-menu-inserted-item-loading .spinner{display:block}.nav-menu-inserted-item-loading .menu-item-handle .item-type{padding:0 0 0 8px}.added-menu-item .menu-item-handle.loading,.nav-menu-inserted-item-loading .menu-item-handle{padding:10px 15px 10px 8px;cursor:default;opacity:.5;background:#fff;color:#727773}.added-menu-item .menu-item-handle{-webkit-transition-property:opacity,background,color;transition-property:opacity,background,color;-webkit-transition-duration:1.25s;transition-duration:1.25s;-webkit-transition-timing-function:cubic-bezier(.25,-2.5,.75,8);transition-timing-function:cubic-bezier(.25,-2.5,.75,8)}#accordion-section-add_menu{margin:15px 12px}.new-menu-section-content{display:none;padding:15px 0 0;clear:both}#accordion-section-add_menu .accordion-section-title{padding-left:45px}#accordion-section-add_menu .accordion-section-title:before{font:400 20px/1 dashicons;position:absolute;top:12px;left:14px;content:"\f132"}#create-new-menu-submit{float:right;margin:0 0 12px}.menu-delete-item{float:left;padding:1em 0;width:100%}li.assigned-to-menu-location .menu-delete-item{display:none}li.assigned-to-menu-location .add-new-menu-item{margin-bottom:1em}.menu-delete{color:#a00;cursor:pointer;text-decoration:underline}.menu-delete:focus,.menu-delete:hover{color:red;text-decoration:none}.menu-item-handle{margin-top:-1px}.ui-sortable-disabled .menu-item-handle{cursor:default}.menu-item-handle:hover{position:relative;z-index:10;color:#0073aa}#available-menu-items .menu-item-handle:hover .item-add,.menu-item-handle:hover .item-edit,.menu-item-handle:hover .item-type{color:#0073aa}.menu-item-edit-active .menu-item-handle{border-color:#999;border-bottom:none}.customize-control-nav_menu_item{margin-bottom:0}.customize-control-nav_menu{margin-top:12px}#available-menu-items .item-add:focus:before,#available-menu-items-search .clear-results:focus,#customize-controls .customize-info .customize-help-toggle:focus:before,.customize-screen-options-toggle:focus:before,.menu-delete:focus,.menu-item-bar .item-delete:focus:before,.wp-customizer .menu-item .submitbox .submitdelete:focus,.wp-customizer button:focus .toggle-indicator:after{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}@media screen and (max-width:782px){#available-menu-items #available-menu-items-search .accordion-section-content{top:63px}}@media screen and (max-width:640px){#available-menu-items #available-menu-items-search .accordion-section-content{top:133px}}
\ No newline at end of file
+#accordion-section-menu_locations{position:relative;margin-bottom:15px}.menu-in-location,.menu-in-locations{display:block;font-weight:600;font-size:10px}#customize-controls .control-section .accordion-section-title:focus .menu-in-location,#customize-controls .control-section .accordion-section-title:hover .menu-in-location,#customize-controls .theme-location-set{color:#555}.customize-control-nav_menu_location .edit-menu{margin-left:6px;vertical-align:middle;line-height:28px;color:#0073aa;text-decoration:underline}.customize-control-nav_menu_location .edit-menu:active,.customize-control-nav_menu_location .edit-menu:hover{color:#00a0d2}.customize-control-nav_menu_location .edit-menu:focus{color:#124964}.wp-customizer .menu-item-bar .menu-item-handle,.wp-customizer .menu-item-settings,.wp-customizer .menu-item-settings .description-thin{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-customizer .menu-item-bar{margin:0}.wp-customizer .menu-item-bar .menu-item-handle{width:100%;background:#fff}.wp-customizer .menu-item-handle .item-title{margin-right:0}.wp-customizer .menu-item-handle .item-type{padding:1px 21px 0 5px;float:right;text-align:right}.wp-customizer .menu-item-settings{max-width:100%;overflow:hidden;padding:10px;background:#eee;border:1px solid #999;border-top:none}.wp-customizer .menu-item-settings .description-thin{width:100%;height:auto;margin:0 0 8px}.wp-customizer .menu-item-settings input[type=text]{width:100%}.wp-customizer .menu-item-settings .submitbox{margin:0;padding:0}.wp-customizer .menu-item-settings .link-to-original{padding:5px 0;border:none;font-style:normal;margin:0;width:100%}.wp-customizer .menu-item .submitbox .submitdelete{float:left;margin:6px 0 0;padding:0;cursor:pointer}.menu-item-reorder-nav{display:none;background-color:#fff;position:absolute;top:0;right:0}.menus-move-left:before{content:"\f341"}.menus-move-right:before{content:"\f345"}.reordering .menu-item .item-controls,.reordering .menu-item .item-type{display:none}.reordering .menu-item-reorder-nav{display:block}.customize-control input.menu-name-field{width:100%;margin:12px 0}.wp-customizer .menu-item .item-edit{position:absolute;right:-19px;top:2px;display:block;width:30px;height:38px;margin-right:0!important;-webkit-box-shadow:none;box-shadow:none;outline:0;overflow:hidden;cursor:pointer}.wp-customizer .menu-item.menu-item-edit-active .item-edit .toggle-indicator:after{content:"\f142"}.wp-customizer .menu-item-settings p.description{font-style:normal}.wp-customizer .menu-settings dl{margin:12px 0 0;padding:0}.wp-customizer .menu-settings .checkbox-input{margin-top:8px}.wp-customizer .menu-settings .menu-theme-locations{border-top:1px solid #ccc}.wp-customizer .menu-settings{margin-top:36px;border-top:none}.menu-settings .customize-control-checkbox label{line-height:1}.menu-settings .customize-control.customize-control-checkbox{margin-bottom:8px}.customize-control-menu{margin-top:4px}#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle{color:#555}.customize-screen-options-toggle{background:0 0;border:none;color:#555;cursor:pointer;margin:0;padding:20px;position:absolute;right:0;top:30px}#customize-controls .customize-info .customize-help-toggle{padding:20px}#customize-controls .customize-info .customize-help-toggle:before{padding:4px}#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:active,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:focus,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:hover,.active-menu-screen-options .customize-screen-options-toggle,.customize-screen-options-toggle:active,.customize-screen-options-toggle:focus,.customize-screen-options-toggle:hover{color:#0073aa}#customize-controls .customize-info .customize-help-toggle:focus,.customize-screen-options-toggle:focus{outline:0}.customize-screen-options-toggle:before{-moz-osx-font-smoothing:grayscale;border:none;content:"\f111";display:block;font:18px/1 dashicons;padding:5px;text-align:center;text-decoration:none!important;text-indent:0;left:6px;position:absolute;top:6px}#customize-controls .customize-info .customize-help-toggle:focus:before,.customize-screen-options-toggle:focus:before{-webkit-border-radius:100%;border-radius:100%}.wp-customizer #screen-options-wrap{display:none;background:#fff;border-top:1px solid #ddd;padding:4px 15px 15px}.wp-customizer .metabox-prefs label{display:block;padding-right:0;line-height:30px}.wp-customizer .toggle-indicator{display:inline-block;font-size:20px;line-height:1;text-indent:-1px}.rtl .wp-customizer .toggle-indicator{text-indent:1px}.wp-customizer .toggle-indicator:after{content:"\f140";speak:none;vertical-align:top;-webkit-border-radius:50%;border-radius:50%;color:#72777c;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}#accordion-panel-nav_menus .field-css-classes,#accordion-panel-nav_menus .field-description,#accordion-panel-nav_menus .field-link-target,#accordion-panel-nav_menus .field-title-attribute,#accordion-panel-nav_menus .field-xfn{display:none}#accordion-panel-nav_menus.field-css-classes-active .field-css-classes,#accordion-panel-nav_menus.field-description-active .field-description,#accordion-panel-nav_menus.field-link-target-active .field-link-target,#accordion-panel-nav_menus.field-title-attribute-active .field-title-attribute,#accordion-panel-nav_menus.field-xfn-active .field-xfn{display:block}.menu-item-depth-0{margin-left:0}.menu-item-depth-1{margin-left:20px}.menu-item-depth-2{margin-left:40px}.menu-item-depth-3{margin-left:60px}.menu-item-depth-4{margin-left:80px}.menu-item-depth-5{margin-left:100px}.menu-item-depth-6{margin-left:120px}.menu-item-depth-7{margin-left:140px}.menu-item-depth-8{margin-left:160px}.menu-item-depth-9{margin-left:180px}.menu-item-depth-10{margin-left:200px}.menu-item-depth-11{margin-left:220px}.menu-item-depth-0>.menu-item-bar{margin-right:0}.menu-item-depth-1>.menu-item-bar{margin-right:20px}.menu-item-depth-2>.menu-item-bar{margin-right:40px}.menu-item-depth-3>.menu-item-bar{margin-right:60px}.menu-item-depth-4>.menu-item-bar{margin-right:80px}.menu-item-depth-5>.menu-item-bar{margin-right:100px}.menu-item-depth-6>.menu-item-bar{margin-right:120px}.menu-item-depth-7>.menu-item-bar{margin-right:140px}.menu-item-depth-8>.menu-item-bar{margin-right:160px}.menu-item-depth-9>.menu-item-bar{margin-right:180px}.menu-item-depth-10>.menu-item-bar{margin-right:200px}.menu-item-depth-11>.menu-item-bar{margin-right:220px}.menu-item-depth-0 .menu-item-transport{margin-left:0}.menu-item-depth-1 .menu-item-transport{margin-left:-20px}.menu-item-depth-3 .menu-item-transport{margin-left:-60px}.menu-item-depth-4 .menu-item-transport{margin-left:-80px}.menu-item-depth-2 .menu-item-transport{margin-left:-40px}.menu-item-depth-5 .menu-item-transport{margin-left:-100px}.menu-item-depth-6 .menu-item-transport{margin-left:-120px}.menu-item-depth-7 .menu-item-transport{margin-left:-140px}.menu-item-depth-8 .menu-item-transport{margin-left:-160px}.menu-item-depth-9 .menu-item-transport{margin-left:-180px}.menu-item-depth-10 .menu-item-transport{margin-left:-200px}.menu-item-depth-11 .menu-item-transport{margin-left:-220px}.reordering .menu-item-depth-0{margin-left:0}.reordering .menu-item-depth-1{margin-left:15px}.reordering .menu-item-depth-2{margin-left:30px}.reordering .menu-item-depth-3{margin-left:45px}.reordering .menu-item-depth-4{margin-left:60px}.reordering .menu-item-depth-5{margin-left:75px}.reordering .menu-item-depth-6{margin-left:90px}.reordering .menu-item-depth-7{margin-left:105px}.reordering .menu-item-depth-8{margin-left:120px}.reordering .menu-item-depth-9{margin-left:135px}.reordering .menu-item-depth-10{margin-left:150px}.reordering .menu-item-depth-11{margin-left:165px}.reordering .menu-item-depth-0>.menu-item-bar{margin-right:0}.reordering .menu-item-depth-1>.menu-item-bar{margin-right:15px}.reordering .menu-item-depth-2>.menu-item-bar{margin-right:30px}.reordering .menu-item-depth-3>.menu-item-bar{margin-right:45px}.reordering .menu-item-depth-4>.menu-item-bar{margin-right:60px}.reordering .menu-item-depth-5>.menu-item-bar{margin-right:75px}.reordering .menu-item-depth-6>.menu-item-bar{margin-right:90px}.reordering .menu-item-depth-7>.menu-item-bar{margin-right:105px}.reordering .menu-item-depth-8>.menu-item-bar{margin-right:120px}.reordering .menu-item-depth-9>.menu-item-bar{margin-right:135px}.reordering .menu-item-depth-10>.menu-item-bar{margin-right:150px}.reordering .menu-item-depth-11>.menu-item-bar{margin-right:165px}.control-section-nav_menu .menu .menu-item-edit-active{margin-left:0}.control-section-nav_menu .menu .menu-item-edit-active .menu-item-bar{margin-right:0}.control-section-nav_menu .menu .sortable-placeholder{margin-top:0;margin-bottom:1px;max-width:-webkit-calc(100% - 2px);max-width:calc(100% - 2px);float:left;display:list-item;border-color:#a0a5aa}.menu-item-transport li.customize-control{float:none}.control-section-nav_menu .menu ul.menu-item-transport .menu-item-bar{margin-top:0}.adding-menu-items .control-section{opacity:.4}.adding-menu-items .control-panel.control-section,.adding-menu-items .control-section.open{opacity:1}.menu-item-bar .item-delete{color:#a00;position:absolute;top:2px;right:-19px;width:30px;height:38px;cursor:pointer;display:none}.menu-item-bar .item-delete:before{content:"\f335";position:absolute;top:9px;left:5px;-webkit-border-radius:50%;border-radius:50%;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ie8 .menu-item-bar .item-delete:before{top:-10px}.menu-item-bar .item-delete:focus,.menu-item-bar .item-delete:hover{-webkit-box-shadow:none;box-shadow:none;outline:0;color:red}.adding-menu-items .menu-item-bar .item-edit{display:none}.adding-menu-items .menu-item-bar .item-delete{display:block}#available-menu-items.opening{overflow-y:hidden}#available-menu-items #available-menu-items-search.open{height:100%;border-bottom:none}#available-menu-items .accordion-section-title{border-left:none;border-right:none;background:#fff;-webkit-transition:background-color .15s;transition:background-color .15s}#available-menu-items #available-menu-items-search .accordion-section-title,#available-menu-items .open .accordion-section-title{background:#eee}#available-menu-items .accordion-section-title:after{content:none!important}#available-menu-items .accordion-section-title:hover .toggle-indicator:after,#available-menu-items .button-link:focus .toggle-indicator:after,#available-menu-items .button-link:hover .toggle-indicator:after{color:#23282d}#available-menu-items .open .accordion-section-title .toggle-indicator:after{content:"\f142";color:#23282d}#available-menu-items .accordion-section-title button{display:block;width:28px;height:35px;position:absolute;top:5px;right:5px;-webkit-box-shadow:none;box-shadow:none;outline:0;cursor:pointer}#available-menu-items .accordion-section-title .no-items,#available-menu-items .cannot-expand .accordion-section-title .spinner,#available-menu-items .cannot-expand .accordion-section-title>button{display:none}#available-menu-items-search.cannot-expand .accordion-section-title .spinner{display:block}#available-menu-items .cannot-expand .accordion-section-title .no-items{float:right;color:#555d66;font-weight:400;margin-left:5px}#available-menu-items .accordion-section-content{overflow-y:auto;background:0 0;padding:1px 15px 15px;margin:0;max-height:290px}#available-menu-items .menu-item-tpl{margin:0}#custom-menu-item-name.invalid,#custom-menu-item-url.invalid,.menu-name-field.invalid,.menu-name-field.invalid:focus{border:1px solid red}#available-menu-items .menu-item-handle .item-type{padding-right:0}#available-menu-items .menu-item-handle .item-title{padding-left:20px}#available-menu-items .menu-item-handle{cursor:pointer;-webkit-box-shadow:none;box-shadow:none;margin-top:-1px}#available-menu-items .menu-item-handle:hover{z-index:1}#available-menu-items .item-title h4{padding:0 0 5px;font-size:14px}#available-menu-items .item-add{position:absolute;top:1px;left:1px;color:#82878c;width:30px;height:38px;-webkit-box-shadow:none;box-shadow:none;outline:0;cursor:pointer}#available-menu-items .menu-item-handle .item-add:focus{color:#23282d}#available-menu-items .item-add:before{content:"\f543";position:relative;left:2px;top:3px;display:inline-block;height:20px;-webkit-border-radius:50%;border-radius:50%;font:400 20px/1.05 dashicons}#available-menu-items .menu-item-handle.item-added .item-add:focus,#available-menu-items .menu-item-handle.item-added .item-title,#available-menu-items .menu-item-handle.item-added .item-type,#available-menu-items .menu-item-handle.item-added:hover .item-add{color:#82878c}#available-menu-items .menu-item-handle.item-added .item-add:before{content:"\f147"}#available-menu-items .accordion-section-title.loading .spinner,#available-menu-items-search.loading .accordion-section-title .spinner{visibility:visible;margin:0 20px}#available-menu-items-search .clear-results{position:absolute;top:18px;right:20px;width:20px;height:20px;padding:0;border:0;cursor:pointer;background:0 0;color:#a00;text-decoration:none;outline:0}#available-menu-items-search .clear-results,#available-menu-items-search.loading .clear-results.is-visible{display:none}#available-menu-items-search .clear-results.is-visible{display:block}.ie8 #available-menu-items-search.loading .clear-results:before{content:""}#available-menu-items-search .clear-results:before{content:"\f335";font:400 20px/1 dashicons;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#available-menu-items-search .clear-results:focus,#available-menu-items-search .clear-results:hover{color:red}#available-menu-items-search .spinner{position:absolute;top:18px;right:20px;margin:0!important}#available-menu-items #available-menu-items-search .accordion-section-content{position:absolute;left:1px;top:60px;bottom:0;max-height:none;width:100%;padding:1px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#available-menu-items-search .accordion-section-title:after{display:none}#available-menu-items-search .accordion-section-content:empty{min-height:0;padding:0}#available-menu-items-search.loading .accordion-section-content div{opacity:.5}#available-menu-items-search.loading.loading-more .accordion-section-content div{opacity:1}#customize-preview{-webkit-transition:all .2s;transition:all .2s}body.adding-menu-items #available-menu-items{left:0;visibility:visible}body.adding-menu-items .wp-full-overlay-main{left:300px}body.adding-menu-items #customize-preview{opacity:.4}.menu-item-handle .spinner{display:none;float:left;margin:0 8px 0 0}.nav-menu-inserted-item-loading .spinner{display:block}.nav-menu-inserted-item-loading .menu-item-handle .item-type{padding:0 0 0 8px}.added-menu-item .menu-item-handle.loading,.nav-menu-inserted-item-loading .menu-item-handle{padding:10px 15px 10px 8px;cursor:default;opacity:.5;background:#fff;color:#727773}.added-menu-item .menu-item-handle{-webkit-transition-property:opacity,background,color;transition-property:opacity,background,color;-webkit-transition-duration:1.25s;transition-duration:1.25s;-webkit-transition-timing-function:cubic-bezier(.25,-2.5,.75,8);transition-timing-function:cubic-bezier(.25,-2.5,.75,8)}#accordion-section-add_menu{margin:15px 12px}.new-menu-section-content{display:none;padding:15px 0 0;clear:both}#accordion-section-add_menu .accordion-section-title{padding-left:45px}#accordion-section-add_menu .accordion-section-title:before{font:400 20px/1 dashicons;position:absolute;top:12px;left:14px;content:"\f132"}#create-new-menu-submit{float:right;margin:0 0 12px}.menu-delete-item{float:left;padding:1em 0;width:100%}li.assigned-to-menu-location .menu-delete-item{display:none}li.assigned-to-menu-location .add-new-menu-item{margin-bottom:1em}.menu-delete{color:#a00;cursor:pointer;text-decoration:underline}.menu-delete:focus,.menu-delete:hover{color:red;text-decoration:none}.menu-item-handle{margin-top:-1px}.ui-sortable-disabled .menu-item-handle{cursor:default}.menu-item-handle:hover{position:relative;z-index:10;color:#0073aa}#available-menu-items .menu-item-handle:hover .item-add,.menu-item-handle:hover .item-edit,.menu-item-handle:hover .item-type{color:#0073aa}.menu-item-edit-active .menu-item-handle{border-color:#999;border-bottom:none}.customize-control-nav_menu_item{margin-bottom:0}.customize-control-nav_menu{margin-top:12px}#available-menu-items .item-add:focus:before,#available-menu-items-search .clear-results:focus,#customize-controls .customize-info .customize-help-toggle:focus:before,.customize-screen-options-toggle:focus:before,.menu-delete:focus,.menu-item-bar .item-delete:focus:before,.wp-customizer .menu-item .submitbox .submitdelete:focus,.wp-customizer button:focus .toggle-indicator:after{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}@media screen and (max-width:782px){#available-menu-items #available-menu-items-search .accordion-section-content{top:63px}#available-menu-items-search .clear-results,#available-menu-items-search .spinner{top:20px}}@media screen and (max-width:640px){#available-menu-items #available-menu-items-search .accordion-section-content{top:133px}#available-menu-items-search .clear-results{top:90px}}
\ No newline at end of file
index 97820ad1e2d239ceff623b7b31c6f06276fa5c95..abe14aeca69a6a1fcf59b64bb12e96a7d1415f5b 100644 (file)
 .welcome-panel h2 {
        margin: 0;
        font-size: 21px;
-       font-weight: normal;
+       font-weight: 400;
        line-height: 1.2;
 }
 
@@ -342,7 +342,7 @@ body #dashboard-widgets .postbox form .submit {
 }
 
 #dashboard_primary .rss-widget a {
-       font-weight: normal;
+       font-weight: 400;
 }
 
 #dashboard_primary .rss-widget span,
@@ -400,7 +400,7 @@ body #dashboard-widgets .postbox form .submit {
        margin: 0 0 10px;
        padding: 0;
        font-size: 14px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 /* Dashboard right now - Colors */
@@ -534,7 +534,7 @@ form.initial-form.quickpress-open input#title {
 }
 
 #dashboard_primary a.rsswidget {
-       font-weight: normal;
+       font-weight: 400;
 }
 
 #dashboard_quick_press .drafts ul {
@@ -570,7 +570,7 @@ form.initial-form.quickpress-open input#title {
        margin: 0 12px 8px;
        padding: 0;
        font-size: 14px;
-       font-weight: normal;
+       font-weight: 400;
        color: #23282d;
 }
 
@@ -829,7 +829,7 @@ form.initial-form.quickpress-open input#title {
 
 #latest-comments #the-comment-list .comment-meta cite {
        font-style: normal;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 #latest-comments #the-comment-list .comment-item blockquote,
@@ -951,8 +951,6 @@ a.rsswidget {
        color: #fff;
 }
 
-/* Make the browser nags easier to read with Open Sans */
-
 #dashboard_browser_nag h2.hndle {
        border: none;
        font-weight: 600;
index 3968a979f94fbe46479d5b8ba2f0cc87e0fb7b97..72b02303a82341736417c5d2c90550f1e524aab1 100644 (file)
 .welcome-panel h2 {
        margin: 0;
        font-size: 21px;
-       font-weight: normal;
+       font-weight: 400;
        line-height: 1.2;
 }
 
@@ -342,7 +342,7 @@ body #dashboard-widgets .postbox form .submit {
 }
 
 #dashboard_primary .rss-widget a {
-       font-weight: normal;
+       font-weight: 400;
 }
 
 #dashboard_primary .rss-widget span,
@@ -400,7 +400,7 @@ body #dashboard-widgets .postbox form .submit {
        margin: 0 0 10px;
        padding: 0;
        font-size: 14px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 /* Dashboard right now - Colors */
@@ -534,7 +534,7 @@ form.initial-form.quickpress-open input#title {
 }
 
 #dashboard_primary a.rsswidget {
-       font-weight: normal;
+       font-weight: 400;
 }
 
 #dashboard_quick_press .drafts ul {
@@ -570,7 +570,7 @@ form.initial-form.quickpress-open input#title {
        margin: 0 12px 8px;
        padding: 0;
        font-size: 14px;
-       font-weight: normal;
+       font-weight: 400;
        color: #23282d;
 }
 
@@ -829,7 +829,7 @@ form.initial-form.quickpress-open input#title {
 
 #latest-comments #the-comment-list .comment-meta cite {
        font-style: normal;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 #latest-comments #the-comment-list .comment-item blockquote,
@@ -951,8 +951,6 @@ a.rsswidget {
        color: #fff;
 }
 
-/* Make the browser nags easier to read with Open Sans */
-
 #dashboard_browser_nag h2.hndle {
        border: none;
        font-weight: 600;
index c6f07ea440ef49f1fea4fbd511a43db27fc9fb89..9664cb86461338246c24ad5e74c02e00e510e10f 100644 (file)
@@ -3,7 +3,7 @@
 div#media-upload-header {
        margin: 0;
        padding: 5px 5px 0;
-       font-weight: bold;
+       font-weight: 600;
        position: relative;
        border-bottom: 1px solid #ddd;
        background: #f9f9f9;
@@ -19,7 +19,7 @@ div#media-upload-header {
        padding-right: 10px;
        list-style: none;
        font-size: 12px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 #sidemenu a {
@@ -46,7 +46,7 @@ div#media-upload-header {
 }
 
 #sidemenu a.current {
-       font-weight: normal;
+       font-weight: 400;
        padding-right: 6px;
        padding-left: 6px;
        border: 1px solid #ddd;
@@ -89,7 +89,7 @@ th {
 .media-upload-form label.form-help, td.help {
        font-family: sans-serif;
        font-style: italic;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .media-upload-form p.help {
@@ -187,7 +187,7 @@ span.required {
 #media-upload label.help {
        font-family: sans-serif;
        font-style: italic;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 #media-upload .ui-sortable .media-item {
@@ -294,7 +294,7 @@ h4.media-sub-title  {
 h3.media-title,
 h4.media-sub-title {
        font-family: Georgia,"Times New Roman",Times,serif;
-       font-weight: normal;
+       font-weight: 400;
        color: #5A5A5A;
 }
 
index 72dd1489134b16db4ef20f5e14d158ec40758f07..28ed6a19216b0db62a947e3cdea384fb6755846f 100644 (file)
@@ -1 +1 @@
-#sidemenu,th{position:relative}#sidemenu a,#sort-buttons a{text-decoration:none}div#media-upload-header{margin:0;padding:5px 5px 0;font-weight:700;position:relative;border-bottom:1px solid #ddd;background:#f9f9f9}#sidemenu{overflow:hidden;float:none;right:0;bottom:-1px;margin:0 5px;padding-right:10px;list-style:none;font-size:12px;font-weight:400}#sidemenu a{padding:0 7px;display:block;float:right;line-height:28px;border-top:1px solid #f9f9f9;border-bottom:1px solid #ddd;background-color:#f9f9f9;-webkit-transition:none;transition:none}#sidemenu li{display:inline;line-height:200%;list-style:none;text-align:center;white-space:nowrap;margin:0;padding:0}#sidemenu a.current{font-weight:400;padding-right:6px;padding-left:6px;border:1px solid #ddd;border-bottom-color:#f1f1f1;background-color:#f1f1f1;color:#000}#media-upload:after{content:"";display:table;clear:both}#media-upload .slidetoggle{border-top-color:#ddd}#media-upload input[type=radio]{padding:0}.media-upload-form label.form-help,td.help{color:#72777c;font-family:sans-serif;font-style:italic;font-weight:400}form{margin:1em}#search-filter{text-align:left}.media-upload-form p.help{margin:0;padding:0}.media-upload-form fieldset{width:100%;border:none;text-align:justify;margin:0 0 1em;padding:0}.image-align-none-label{background:url(../images/align-none.png) center left no-repeat}.image-align-left-label{background:url(../images/align-left.png) center left no-repeat}.image-align-center-label{background:url(../images/align-center.png) center left no-repeat}.image-align-right-label{background:url(../images/align-right.png) center left no-repeat}tr.image-size td{width:460px}tr.image-size div.image-size-item{margin:0 0 5px}#gallery-form .progress,#library-form .progress,.describe.startclosed,.describe.startopen,.insert-gallery{display:none}.media-item .thumbnail{max-width:128px;max-height:128px}thead.media-item-info tr{background-color:transparent}.form-table thead.media-item-info{border:8px solid #fff}abbr.required,span.required{text-decoration:none;border:none}.describe label{display:inline}.describe td.error{padding:2px 8px}.describe td.A1{width:132px}.describe input[type=text],.describe textarea{width:460px;border-width:1px;border-style:solid}#media-upload p.ml-submit{padding:1em 0}#media-upload label.help,#media-upload p.help{font-family:sans-serif;font-style:italic;font-weight:400}#media-upload .ui-sortable .media-item{cursor:move}#media-upload tr.image-size{margin-bottom:1em;height:3em}#media-upload #filter{width:623px}#media-upload #filter .subsubsub{margin:8px 0}#filter .tablenav select{border-style:solid;border-width:1px;padding:2px;vertical-align:top;width:auto}#media-upload .del-attachment{display:none;margin:5px 0}.menu_order{float:left;font-size:11px;margin:8px 10px 0}.menu_order_input{border:1px solid #ddd;font-size:10px;padding:1px;width:23px}.ui-sortable-helper{background-color:#fff;border:1px solid #a0a5aa;opacity:.6;filter:alpha(opacity=60)}#media-upload th.order-head{width:20%;text-align:center}#media-upload th.actions-head{width:25%;text-align:center}#media-upload a.wp-post-thumbnail{margin:0 20px}#media-upload .widefat{border-style:solid solid none}.sorthelper{height:37px;width:623px;display:block}#gallery-settings th.label{width:160px}#gallery-settings #basic th.label{padding:5px 0 5px 5px}#gallery-settings .title,h4.media-sub-title{border-bottom:1px solid #ddd;padding:0 0 3px}#gallery-settings .title{clear:both;font-size:1.6em}h3.media-title{font-size:1.6em}h4.media-sub-title{font-size:1.3em;margin:12px}#gallery-settings .title,h3.media-title,h4.media-sub-title{font-family:Georgia,"Times New Roman",Times,serif;font-weight:400;color:#5A5A5A}#gallery-settings .describe td{vertical-align:middle;height:3em}#gallery-settings .describe th.label{padding-top:.5em;text-align:right}#gallery-settings .describe{padding:5px;width:100%;clear:both;cursor:default;background:#fff}#gallery-settings .describe select{width:15em}#gallery-settings .describe select option,#gallery-settings .describe td{padding:0}#gallery-settings label,#gallery-settings legend{font-size:13px;color:#444;margin-left:15px}#gallery-settings .align .field label{margin:0 3px 0 1em}#gallery-settings p.ml-submit{border-top:1px solid #ddd}#gallery-settings select#columns{width:6em}#sort-buttons{font-size:.8em;margin:3px 0 -8px 25px;text-align:left;max-width:625px}#sort-buttons #asc,#sort-buttons #showall{padding-right:5px}#sort-buttons span{margin-left:25px}p.media-types{margin:0;padding:1em}p.media-types-required-info{padding-top:0}tr.not-image{display:none}table.not-image tr.not-image{display:table-row}table.not-image tr.image-only{display:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.image-align-none-label{background-image:url(../images/align-none-2x.png?ver=20120916);-webkit-background-size:21px 15px;background-size:21px 15px}.image-align-left-label{background-image:url(../images/align-left-2x.png?ver=20120916);-webkit-background-size:22px 15px;background-size:22px 15px}.image-align-center-label{background-image:url(../images/align-center-2x.png?ver=20120916);-webkit-background-size:21px 15px;background-size:21px 15px}.image-align-right-label{background-image:url(../images/align-right-2x.png?ver=20120916);-webkit-background-size:22px 15px;background-size:22px 15px}}
\ No newline at end of file
+#sidemenu,th{position:relative}#sidemenu a,#sort-buttons a{text-decoration:none}div#media-upload-header{margin:0;padding:5px 5px 0;font-weight:600;position:relative;border-bottom:1px solid #ddd;background:#f9f9f9}#sidemenu{overflow:hidden;float:none;right:0;bottom:-1px;margin:0 5px;padding-right:10px;list-style:none;font-size:12px;font-weight:400}#sidemenu a{padding:0 7px;display:block;float:right;line-height:28px;border-top:1px solid #f9f9f9;border-bottom:1px solid #ddd;background-color:#f9f9f9;-webkit-transition:none;transition:none}#sidemenu li{display:inline;line-height:200%;list-style:none;text-align:center;white-space:nowrap;margin:0;padding:0}#sidemenu a.current{font-weight:400;padding-right:6px;padding-left:6px;border:1px solid #ddd;border-bottom-color:#f1f1f1;background-color:#f1f1f1;color:#000}#media-upload:after{content:"";display:table;clear:both}#media-upload .slidetoggle{border-top-color:#ddd}#media-upload input[type=radio]{padding:0}.media-upload-form label.form-help,td.help{color:#72777c;font-family:sans-serif;font-style:italic;font-weight:400}form{margin:1em}#search-filter{text-align:left}.media-upload-form p.help{margin:0;padding:0}.media-upload-form fieldset{width:100%;border:none;text-align:justify;margin:0 0 1em;padding:0}.image-align-none-label{background:url(../images/align-none.png) center left no-repeat}.image-align-left-label{background:url(../images/align-left.png) center left no-repeat}.image-align-center-label{background:url(../images/align-center.png) center left no-repeat}.image-align-right-label{background:url(../images/align-right.png) center left no-repeat}tr.image-size td{width:460px}tr.image-size div.image-size-item{margin:0 0 5px}#gallery-form .progress,#library-form .progress,.describe.startclosed,.describe.startopen,.insert-gallery{display:none}.media-item .thumbnail{max-width:128px;max-height:128px}thead.media-item-info tr{background-color:transparent}.form-table thead.media-item-info{border:8px solid #fff}abbr.required,span.required{text-decoration:none;border:none}.describe label{display:inline}.describe td.error{padding:2px 8px}.describe td.A1{width:132px}.describe input[type=text],.describe textarea{width:460px;border-width:1px;border-style:solid}#media-upload p.ml-submit{padding:1em 0}#media-upload label.help,#media-upload p.help{font-family:sans-serif;font-style:italic;font-weight:400}#media-upload .ui-sortable .media-item{cursor:move}#media-upload tr.image-size{margin-bottom:1em;height:3em}#media-upload #filter{width:623px}#media-upload #filter .subsubsub{margin:8px 0}#filter .tablenav select{border-style:solid;border-width:1px;padding:2px;vertical-align:top;width:auto}#media-upload .del-attachment{display:none;margin:5px 0}.menu_order{float:left;font-size:11px;margin:8px 10px 0}.menu_order_input{border:1px solid #ddd;font-size:10px;padding:1px;width:23px}.ui-sortable-helper{background-color:#fff;border:1px solid #a0a5aa;opacity:.6;filter:alpha(opacity=60)}#media-upload th.order-head{width:20%;text-align:center}#media-upload th.actions-head{width:25%;text-align:center}#media-upload a.wp-post-thumbnail{margin:0 20px}#media-upload .widefat{border-style:solid solid none}.sorthelper{height:37px;width:623px;display:block}#gallery-settings th.label{width:160px}#gallery-settings #basic th.label{padding:5px 0 5px 5px}#gallery-settings .title,h4.media-sub-title{border-bottom:1px solid #ddd;padding:0 0 3px}#gallery-settings .title{clear:both;font-size:1.6em}h3.media-title{font-size:1.6em}h4.media-sub-title{font-size:1.3em;margin:12px}#gallery-settings .title,h3.media-title,h4.media-sub-title{font-family:Georgia,"Times New Roman",Times,serif;font-weight:400;color:#5A5A5A}#gallery-settings .describe td{vertical-align:middle;height:3em}#gallery-settings .describe th.label{padding-top:.5em;text-align:right}#gallery-settings .describe{padding:5px;width:100%;clear:both;cursor:default;background:#fff}#gallery-settings .describe select{width:15em}#gallery-settings .describe select option,#gallery-settings .describe td{padding:0}#gallery-settings label,#gallery-settings legend{font-size:13px;color:#444;margin-left:15px}#gallery-settings .align .field label{margin:0 3px 0 1em}#gallery-settings p.ml-submit{border-top:1px solid #ddd}#gallery-settings select#columns{width:6em}#sort-buttons{font-size:.8em;margin:3px 0 -8px 25px;text-align:left;max-width:625px}#sort-buttons #asc,#sort-buttons #showall{padding-right:5px}#sort-buttons span{margin-left:25px}p.media-types{margin:0;padding:1em}p.media-types-required-info{padding-top:0}tr.not-image{display:none}table.not-image tr.not-image{display:table-row}table.not-image tr.image-only{display:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.image-align-none-label{background-image:url(../images/align-none-2x.png?ver=20120916);-webkit-background-size:21px 15px;background-size:21px 15px}.image-align-left-label{background-image:url(../images/align-left-2x.png?ver=20120916);-webkit-background-size:22px 15px;background-size:22px 15px}.image-align-center-label{background-image:url(../images/align-center-2x.png?ver=20120916);-webkit-background-size:21px 15px;background-size:21px 15px}.image-align-right-label{background-image:url(../images/align-right-2x.png?ver=20120916);-webkit-background-size:22px 15px;background-size:22px 15px}}
\ No newline at end of file
index db2a017a4ed8613de042fe8cdad0b4628684d09a..9249309cd2856245cfc7139c94412d2c6b41dfa1 100644 (file)
@@ -3,7 +3,7 @@
 div#media-upload-header {
        margin: 0;
        padding: 5px 5px 0;
-       font-weight: bold;
+       font-weight: 600;
        position: relative;
        border-bottom: 1px solid #ddd;
        background: #f9f9f9;
@@ -19,7 +19,7 @@ div#media-upload-header {
        padding-left: 10px;
        list-style: none;
        font-size: 12px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 #sidemenu a {
@@ -46,7 +46,7 @@ div#media-upload-header {
 }
 
 #sidemenu a.current {
-       font-weight: normal;
+       font-weight: 400;
        padding-left: 6px;
        padding-right: 6px;
        border: 1px solid #ddd;
@@ -89,7 +89,7 @@ th {
 .media-upload-form label.form-help, td.help {
        font-family: sans-serif;
        font-style: italic;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .media-upload-form p.help {
@@ -187,7 +187,7 @@ span.required {
 #media-upload label.help {
        font-family: sans-serif;
        font-style: italic;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 #media-upload .ui-sortable .media-item {
@@ -294,7 +294,7 @@ h4.media-sub-title  {
 h3.media-title,
 h4.media-sub-title {
        font-family: Georgia,"Times New Roman",Times,serif;
-       font-weight: normal;
+       font-weight: 400;
        color: #5A5A5A;
 }
 
index d4ccf1694be913447422897dd2b3e0da53ca02de..1c148a803c00a1911950340c640b7fb17f6ef58c 100644 (file)
@@ -1 +1 @@
-#sidemenu,th{position:relative}#sidemenu a,#sort-buttons a{text-decoration:none}div#media-upload-header{margin:0;padding:5px 5px 0;font-weight:700;position:relative;border-bottom:1px solid #ddd;background:#f9f9f9}#sidemenu{overflow:hidden;float:none;left:0;bottom:-1px;margin:0 5px;padding-left:10px;list-style:none;font-size:12px;font-weight:400}#sidemenu a{padding:0 7px;display:block;float:left;line-height:28px;border-top:1px solid #f9f9f9;border-bottom:1px solid #ddd;background-color:#f9f9f9;-webkit-transition:none;transition:none}#sidemenu li{display:inline;line-height:200%;list-style:none;text-align:center;white-space:nowrap;margin:0;padding:0}#sidemenu a.current{font-weight:400;padding-left:6px;padding-right:6px;border:1px solid #ddd;border-bottom-color:#f1f1f1;background-color:#f1f1f1;color:#000}#media-upload:after{content:"";display:table;clear:both}#media-upload .slidetoggle{border-top-color:#ddd}#media-upload input[type=radio]{padding:0}.media-upload-form label.form-help,td.help{color:#72777c;font-family:sans-serif;font-style:italic;font-weight:400}form{margin:1em}#search-filter{text-align:right}.media-upload-form p.help{margin:0;padding:0}.media-upload-form fieldset{width:100%;border:none;text-align:justify;margin:0 0 1em;padding:0}.image-align-none-label{background:url(../images/align-none.png) center left no-repeat}.image-align-left-label{background:url(../images/align-left.png) center left no-repeat}.image-align-center-label{background:url(../images/align-center.png) center left no-repeat}.image-align-right-label{background:url(../images/align-right.png) center left no-repeat}tr.image-size td{width:460px}tr.image-size div.image-size-item{margin:0 0 5px}#gallery-form .progress,#library-form .progress,.describe.startclosed,.describe.startopen,.insert-gallery{display:none}.media-item .thumbnail{max-width:128px;max-height:128px}thead.media-item-info tr{background-color:transparent}.form-table thead.media-item-info{border:8px solid #fff}abbr.required,span.required{text-decoration:none;border:none}.describe label{display:inline}.describe td.error{padding:2px 8px}.describe td.A1{width:132px}.describe input[type=text],.describe textarea{width:460px;border-width:1px;border-style:solid}#media-upload p.ml-submit{padding:1em 0}#media-upload label.help,#media-upload p.help{font-family:sans-serif;font-style:italic;font-weight:400}#media-upload .ui-sortable .media-item{cursor:move}#media-upload tr.image-size{margin-bottom:1em;height:3em}#media-upload #filter{width:623px}#media-upload #filter .subsubsub{margin:8px 0}#filter .tablenav select{border-style:solid;border-width:1px;padding:2px;vertical-align:top;width:auto}#media-upload .del-attachment{display:none;margin:5px 0}.menu_order{float:right;font-size:11px;margin:8px 10px 0}.menu_order_input{border:1px solid #ddd;font-size:10px;padding:1px;width:23px}.ui-sortable-helper{background-color:#fff;border:1px solid #a0a5aa;opacity:.6;filter:alpha(opacity=60)}#media-upload th.order-head{width:20%;text-align:center}#media-upload th.actions-head{width:25%;text-align:center}#media-upload a.wp-post-thumbnail{margin:0 20px}#media-upload .widefat{border-style:solid solid none}.sorthelper{height:37px;width:623px;display:block}#gallery-settings th.label{width:160px}#gallery-settings #basic th.label{padding:5px 5px 5px 0}#gallery-settings .title,h4.media-sub-title{border-bottom:1px solid #ddd;padding:0 0 3px}#gallery-settings .title{clear:both;font-size:1.6em}h3.media-title{font-size:1.6em}h4.media-sub-title{font-size:1.3em;margin:12px}#gallery-settings .title,h3.media-title,h4.media-sub-title{font-family:Georgia,"Times New Roman",Times,serif;font-weight:400;color:#5A5A5A}#gallery-settings .describe td{vertical-align:middle;height:3em}#gallery-settings .describe th.label{padding-top:.5em;text-align:left}#gallery-settings .describe{padding:5px;width:100%;clear:both;cursor:default;background:#fff}#gallery-settings .describe select{width:15em}#gallery-settings .describe select option,#gallery-settings .describe td{padding:0}#gallery-settings label,#gallery-settings legend{font-size:13px;color:#444;margin-right:15px}#gallery-settings .align .field label{margin:0 1em 0 3px}#gallery-settings p.ml-submit{border-top:1px solid #ddd}#gallery-settings select#columns{width:6em}#sort-buttons{font-size:.8em;margin:3px 25px -8px 0;text-align:right;max-width:625px}#sort-buttons #asc,#sort-buttons #showall{padding-left:5px}#sort-buttons span{margin-right:25px}p.media-types{margin:0;padding:1em}p.media-types-required-info{padding-top:0}tr.not-image{display:none}table.not-image tr.not-image{display:table-row}table.not-image tr.image-only{display:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.image-align-none-label{background-image:url(../images/align-none-2x.png?ver=20120916);-webkit-background-size:21px 15px;background-size:21px 15px}.image-align-left-label{background-image:url(../images/align-left-2x.png?ver=20120916);-webkit-background-size:22px 15px;background-size:22px 15px}.image-align-center-label{background-image:url(../images/align-center-2x.png?ver=20120916);-webkit-background-size:21px 15px;background-size:21px 15px}.image-align-right-label{background-image:url(../images/align-right-2x.png?ver=20120916);-webkit-background-size:22px 15px;background-size:22px 15px}}
\ No newline at end of file
+#sidemenu,th{position:relative}#sidemenu a,#sort-buttons a{text-decoration:none}div#media-upload-header{margin:0;padding:5px 5px 0;font-weight:600;position:relative;border-bottom:1px solid #ddd;background:#f9f9f9}#sidemenu{overflow:hidden;float:none;left:0;bottom:-1px;margin:0 5px;padding-left:10px;list-style:none;font-size:12px;font-weight:400}#sidemenu a{padding:0 7px;display:block;float:left;line-height:28px;border-top:1px solid #f9f9f9;border-bottom:1px solid #ddd;background-color:#f9f9f9;-webkit-transition:none;transition:none}#sidemenu li{display:inline;line-height:200%;list-style:none;text-align:center;white-space:nowrap;margin:0;padding:0}#sidemenu a.current{font-weight:400;padding-left:6px;padding-right:6px;border:1px solid #ddd;border-bottom-color:#f1f1f1;background-color:#f1f1f1;color:#000}#media-upload:after{content:"";display:table;clear:both}#media-upload .slidetoggle{border-top-color:#ddd}#media-upload input[type=radio]{padding:0}.media-upload-form label.form-help,td.help{color:#72777c;font-family:sans-serif;font-style:italic;font-weight:400}form{margin:1em}#search-filter{text-align:right}.media-upload-form p.help{margin:0;padding:0}.media-upload-form fieldset{width:100%;border:none;text-align:justify;margin:0 0 1em;padding:0}.image-align-none-label{background:url(../images/align-none.png) center left no-repeat}.image-align-left-label{background:url(../images/align-left.png) center left no-repeat}.image-align-center-label{background:url(../images/align-center.png) center left no-repeat}.image-align-right-label{background:url(../images/align-right.png) center left no-repeat}tr.image-size td{width:460px}tr.image-size div.image-size-item{margin:0 0 5px}#gallery-form .progress,#library-form .progress,.describe.startclosed,.describe.startopen,.insert-gallery{display:none}.media-item .thumbnail{max-width:128px;max-height:128px}thead.media-item-info tr{background-color:transparent}.form-table thead.media-item-info{border:8px solid #fff}abbr.required,span.required{text-decoration:none;border:none}.describe label{display:inline}.describe td.error{padding:2px 8px}.describe td.A1{width:132px}.describe input[type=text],.describe textarea{width:460px;border-width:1px;border-style:solid}#media-upload p.ml-submit{padding:1em 0}#media-upload label.help,#media-upload p.help{font-family:sans-serif;font-style:italic;font-weight:400}#media-upload .ui-sortable .media-item{cursor:move}#media-upload tr.image-size{margin-bottom:1em;height:3em}#media-upload #filter{width:623px}#media-upload #filter .subsubsub{margin:8px 0}#filter .tablenav select{border-style:solid;border-width:1px;padding:2px;vertical-align:top;width:auto}#media-upload .del-attachment{display:none;margin:5px 0}.menu_order{float:right;font-size:11px;margin:8px 10px 0}.menu_order_input{border:1px solid #ddd;font-size:10px;padding:1px;width:23px}.ui-sortable-helper{background-color:#fff;border:1px solid #a0a5aa;opacity:.6;filter:alpha(opacity=60)}#media-upload th.order-head{width:20%;text-align:center}#media-upload th.actions-head{width:25%;text-align:center}#media-upload a.wp-post-thumbnail{margin:0 20px}#media-upload .widefat{border-style:solid solid none}.sorthelper{height:37px;width:623px;display:block}#gallery-settings th.label{width:160px}#gallery-settings #basic th.label{padding:5px 5px 5px 0}#gallery-settings .title,h4.media-sub-title{border-bottom:1px solid #ddd;padding:0 0 3px}#gallery-settings .title{clear:both;font-size:1.6em}h3.media-title{font-size:1.6em}h4.media-sub-title{font-size:1.3em;margin:12px}#gallery-settings .title,h3.media-title,h4.media-sub-title{font-family:Georgia,"Times New Roman",Times,serif;font-weight:400;color:#5A5A5A}#gallery-settings .describe td{vertical-align:middle;height:3em}#gallery-settings .describe th.label{padding-top:.5em;text-align:left}#gallery-settings .describe{padding:5px;width:100%;clear:both;cursor:default;background:#fff}#gallery-settings .describe select{width:15em}#gallery-settings .describe select option,#gallery-settings .describe td{padding:0}#gallery-settings label,#gallery-settings legend{font-size:13px;color:#444;margin-right:15px}#gallery-settings .align .field label{margin:0 1em 0 3px}#gallery-settings p.ml-submit{border-top:1px solid #ddd}#gallery-settings select#columns{width:6em}#sort-buttons{font-size:.8em;margin:3px 25px -8px 0;text-align:right;max-width:625px}#sort-buttons #asc,#sort-buttons #showall{padding-left:5px}#sort-buttons span{margin-right:25px}p.media-types{margin:0;padding:1em}p.media-types-required-info{padding-top:0}tr.not-image{display:none}table.not-image tr.not-image{display:table-row}table.not-image tr.image-only{display:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.image-align-none-label{background-image:url(../images/align-none-2x.png?ver=20120916);-webkit-background-size:21px 15px;background-size:21px 15px}.image-align-left-label{background-image:url(../images/align-left-2x.png?ver=20120916);-webkit-background-size:22px 15px;background-size:22px 15px}.image-align-center-label{background-image:url(../images/align-center-2x.png?ver=20120916);-webkit-background-size:21px 15px;background-size:21px 15px}.image-align-right-label{background-image:url(../images/align-right-2x.png?ver=20120916);-webkit-background-size:22px 15px;background-size:22px 15px}}
\ No newline at end of file
index 03ee7f285d080f76b5aaa60bd7aa6cd1b42f0daf..5e28c4ddd33f910fa4c1415c26b6d2306d2223be 100644 (file)
@@ -114,12 +114,12 @@ input#link_url {
 }
 
 #editable-post-name {
-       font-weight: bold;
+       font-weight: 600;
 }
 
 #editable-post-name input {
        font-size: 13px;
-       font-weight: normal;
+       font-weight: 400;
        height: 22px;
        margin: 0;
        width: 16em;
@@ -281,7 +281,7 @@ ul.add-menu-item-tabs li.tabs,
 ul.category-tabs li,
 ul.add-menu-item-tabs li,
 ul.wp-tab-bar li {
-       padding: 3px 5px 5px;
+       padding: 3px 5px 6px;
 }
 
 #set-post-thumbnail {
@@ -377,16 +377,6 @@ form#tags-filter {
        position: relative;
 }
 
-#content-textarea-clone {
-       z-index: -1;
-       position: absolute;
-       top: 0;
-       visibility: hidden;
-       overflow: hidden;
-       max-width: 100%;
-       border: 1px solid transparent;
-}
-
 .wp-editor-expand #wp-content-editor-tools {
        z-index: 1000;
        border-bottom: 1px solid #e5e5e5;
@@ -644,19 +634,6 @@ span.wp-media-buttons-icon:before {
        max-width: 100%;
 }
 
-#poststuff .inside label.spam,
-#poststuff .inside label.deleted {
-       color: red;
-}
-
-#poststuff .inside label.waiting {
-       color: orange;
-}
-
-#poststuff .inside label.approved {
-       color: green;
-}
-
 .ie8 #poststuff .inside #parent_id,
 .ie8 #poststuff .inside #page_template {
        width: 250px;
@@ -981,15 +958,9 @@ ul.categorychecklist li {
        border-style: solid;
 }
 
-.form-wrap p,
-.form-wrap label {
-       font-size: 11px;
-}
-
 .form-wrap label {
        display: block;
-       padding: 2px;
-       font-size: 12px;
+       padding: 2px 0;
 }
 
 .form-field input[type="text"],
@@ -1020,8 +991,8 @@ span.description,
 }
 
 .form-wrap .form-field {
-       margin: 0 0 10px;
-       padding: 8px 0;
+       margin: 1em 0;
+       padding: 0;
 }
 
 .form-wrap .form-field #parent {
@@ -1037,6 +1008,9 @@ span.description,
        margin-top: -10px;
 }
 
+.edit-term-notes {
+       margin-top: 2em;
+}
 
 /*------------------------------------------------------------------------------
   13.0 - Tags
@@ -1131,12 +1105,18 @@ p.popular-tags a {
        padding: 10px 15px;
 }
 
+.comment-ays .comment-content ul {
+       list-style: initial;
+       margin-right: 2em;
+}
+
 .comment-ays .comment-content a[href]:after {
        content: '(' attr( href ) ')';
        display: inline-block;
        padding: 0 4px;
        color: #72777C;
        font-size: 13px;
+       word-break: break-all;
 }
 
 .comment-ays .comment-content p.edit-comment {
@@ -1190,7 +1170,7 @@ table.links-table {
 }
 
 .links-table th {
-       font-weight: normal;
+       font-weight: 400;
        text-align: right;
        vertical-align: top;
        min-width: 80px;
@@ -1531,17 +1511,14 @@ table.links-table {
        }
 
        #wp-content-media-buttons a {
-               font-size: 16px;
-               line-height: 37px;
-               height: 39px;
-               padding: 0 15px 0 20px;
+               font-size: 14px;
+               padding: 6px 10px;
        }
 
        .wp-media-buttons span.wp-media-buttons-icon,
        .wp-media-buttons span.jetpack-contact-form-icon {
                width: 22px !important;
-               margin-top: -3px !important;
-               margin-right: -5px !important;
+               margin-right: -2px !important;
        }
 
        .wp-media-buttons .add_media span.wp-media-buttons-icon:before,
@@ -1592,11 +1569,3 @@ table.links-table {
                padding: 10px 0;
        }
 }
-
-@media only screen and (max-width: 500px) {
-       /* Align Add Media + Visual + Text tabs */
-       #wp-content-media-buttons a {
-               font-size: 14px;
-               padding: 0 10px 0 10px;
-       }
-}
index b0dc269ee3e89ed7612c6e7f41f285cd9ed5fb07..af6cdf7a722c16ec8ed9f42add2a0cd0a5827c66 100644 (file)
@@ -1 +1 @@
-#pending,#poststuff #titlewrap{border:0;padding:0}#pending,#poststuff #post-body{padding:0}#editable-post-name-full,body.post-new-php .submitbox .submitdelete{display:none}#titlediv,#wp-content-editor-container,.postbox,form#tags-filter{position:relative}#poststuff{padding-top:10px;min-width:763px}#poststuff .postbox-container{width:100%}#poststuff #post-body.columns-2{margin-left:300px}#show-comments{overflow:hidden}#save-action .spinner,#show-comments a{float:right}#show-comments .spinner{float:none;margin-top:0}#lost-connection-notice .spinner{visibility:visible;float:right;margin:0 0 0 5px}#titlediv label{cursor:text}#titlediv div.inside{margin:0}#titlediv #title{padding:3px 8px;font-size:1.7em;line-height:100%;height:1.7em;width:100%;outline:0;margin:0 0 3px;background-color:#fff}#titlediv #title-prompt-text{color:#72777c;position:absolute;font-size:1.7em;padding:11px 10px}input#link_description,input#link_url{width:98%}#pending{background:100% none;font-size:11px;margin-top:-1px}#comment-link-box,#edit-slug-box{line-height:24px;min-height:25px;margin-top:5px;padding:0 10px;color:#666}#edit-slug-box .cancel{margin-left:10px;padding:0;font-size:11px;text-decoration:underline;color:#0073aa}#comment-link-box{margin:5px 0;padding:0 5px}#editable-post-name{font-weight:700}#editable-post-name input{font-size:13px;font-weight:400;height:22px;margin:0;width:16em}.postarea h3 label{float:right}.submitbox .submitdelete{text-decoration:none;padding:1px 2px}#normal-sortables .submitbox .submitdelete:hover{color:#000;background-color:red;border-bottom-color:red}.submitbox .submit a:hover{text-decoration:underline}.submitbox .submit input{margin-bottom:8px;margin-left:4px;padding:6px}#post-status-select{margin-top:3px}#post-body #normal-sortables{min-height:50px}.postbox{min-width:255px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff}#trackback_url{width:99%}#normal-sortables .postbox .submit{background:0 0;border:0;float:left;padding:0 12px;margin:0}.category-add input[type=text],.category-add select{width:100%;max-width:260px;vertical-align:baseline}#side-sortables .category-add input[type=text],#side-sortables .category-add select{margin:0 0 1em}#side-sortables .add-menu-item-tabs li,.wp-tab-bar li,ul.category-tabs li{display:inline;line-height:1.35em}.no-js .category-tabs li.hide-if-no-js{display:none}#side-sortables .add-menu-item-tabs a,.category-tabs a,.wp-tab-bar a{text-decoration:none}#post-body ul.add-menu-item-tabs li.tabs a,#post-body ul.category-tabs li.tabs a,#side-sortables .add-menu-item-tabs .tabs a,#side-sortables .category-tabs .tabs a,.wp-tab-bar .wp-tab-active a{color:#32373c}.category-tabs{margin:8px 0 5px}#category-adder h4{margin:0}.taxonomy-add-new{display:inline-block;margin:10px 0;font-weight:600}#side-sortables .add-menu-item-tabs,.wp-tab-bar{margin-bottom:3px}#normal-sortables .postbox #replyrow .submit{float:none;margin:0;padding:5px 7px 10px;overflow:hidden}#side-sortables .submitbox .submit .preview,#side-sortables .submitbox .submit a.preview:hover,#side-sortables .submitbox .submit input{border:0}ul.add-menu-item-tabs,ul.category-tabs,ul.wp-tab-bar{margin-top:12px}ul.add-menu-item-tabs li,ul.category-tabs li{border:1px solid transparent;position:relative}.wp-tab-active,ul.add-menu-item-tabs li.tabs,ul.category-tabs li.tabs{border:1px solid #ddd;border-bottom-color:#fdfdfd;background-color:#fdfdfd}ul.add-menu-item-tabs li,ul.category-tabs li,ul.wp-tab-bar li{padding:3px 5px 5px}#set-post-thumbnail{display:inline-block;max-width:100%}.ui-tabs-hide,.wp-editor-expand #content-resize-handle,.wp-hidden-children .wp-hidden-child{display:none}#postimagediv .inside img{max-width:100%;height:auto;width:auto;vertical-align:top;background-image:-webkit-linear-gradient(-45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4),-webkit-linear-gradient(-45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4);background-image:linear-gradient(-45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4),linear-gradient(-45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4);background-position:100% 0,10px 10px;-webkit-background-size:20px 20px;background-size:20px 20px}#post-body .tagsdiv #newtag{margin-left:5px;width:16em}#side-sortables input#post_password{width:94%}#side-sortables .tagsdiv #newtag{width:68%}#post-status-info{width:100%;border-spacing:0;border:1px solid #e5e5e5;border-top:none;background-color:#f7f7f7;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);z-index:999}#post-status-info td{font-size:12px}.autosave-info{padding:2px 10px;text-align:left}#editorcontent #post-status-info{border:none}#content-resize-handle{background:url(../images/resize.gif) right bottom no-repeat;width:12px;cursor:row-resize}.rtl #content-resize-handle{background-image:url(../images/resize-rtl.gif);background-position:left bottom}#postdivrich #content{resize:none}#wp-word-count{display:block;padding:2px 10px}#content-textarea-clone{z-index:-1;position:absolute;top:0;visibility:hidden;overflow:hidden;max-width:100%;border:1px solid transparent}.wp-editor-expand #wp-content-editor-tools{z-index:1000;border-bottom:1px solid #e5e5e5}.wp-editor-expand #wp-content-editor-container{-webkit-box-shadow:none;box-shadow:none;margin-top:-1px;border-bottom:0 none}.wp-editor-expand div.mce-statusbar{z-index:1}.wp-editor-expand #post-status-info{border-top:1px solid #e5e5e5}.wp-editor-expand div.mce-toolbar-grp{z-index:999}.mce-fullscreen #wp-content-wrap .mce-edit-area,.mce-fullscreen #wp-content-wrap .mce-menubar,.mce-fullscreen #wp-content-wrap .mce-statusbar,.mce-fullscreen #wp-content-wrap .mce-toolbar-grp{position:static!important;width:auto!important;padding:0!important}.mce-fullscreen #wp-content-wrap .mce-statusbar{visibility:visible!important}.mce-fullscreen #wp-content-wrap .mce-tinymce .mce-wp-dfw,.mce-fullscreen #wp-content-wrap .mce-wp-dfw,.post-php.mce-fullscreen #wpadminbar{display:none}#wp-content-editor-tools{background-color:#f1f1f1;padding-top:20px}#poststuff #post-body.columns-2 #side-sortables{width:280px}#timestampdiv select{height:21px;line-height:14px;padding:0;vertical-align:top;font-size:12px}#aa,#hh,#jj,#mn{padding:1px;font-size:12px}#hh,#jj,#mn{width:2em}#aa{width:3.4em}.curtime #timestamp{padding:2px 0 1px;display:inline!important;height:auto!important}#misc-publishing-actions label[for=post_status]:before,#post-body #visibility:before,#post-body .misc-pub-revisions:before,.curtime #timestamp:before,span.wp-media-buttons-icon:before{color:#82878c}#post-body #visibility:before,#post-body .misc-pub-revisions:before,.curtime #timestamp:before{font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 0 0 2px;top:0;right:-1px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}#post-body #visibility:before{content:"\f177"}.curtime #timestamp:before{content:"\f145";top:-1px}#post-body .misc-pub-revisions:before{content:"\f321"}#timestampdiv{padding-top:5px;line-height:23px}#timestampdiv p{margin:8px 0 6px}#timestampdiv input{border-width:1px;border-style:solid}.notification-dialog{position:fixed;top:30%;max-height:70%;right:50%;width:450px;margin-right:-225px;background:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);line-height:1.5;z-index:1000005;overflow-y:auto}.notification-dialog-background{position:fixed;top:0;right:0;left:0;bottom:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000000}#post-lock-dialog .post-locked-message,#post-lock-dialog .post-taken-over{margin:25px}#post-lock-dialog .post-locked-message a.button{margin-left:10px}#post-lock-dialog .post-locked-avatar{float:right;margin:0 0 20px 20px}#post-lock-dialog .wp-tab-first{outline:0}#post-lock-dialog .locked-saving img{float:right;margin-left:3px}#post-lock-dialog.saved .locked-saved,#post-lock-dialog.saving .locked-saving{display:inline}#excerpt{display:block;margin:12px 0 0;height:4em;width:100%}.tagchecklist{margin-right:14px;font-size:12px;overflow:auto}.tagchecklist br{display:none}.tagchecklist span,.tagchecklist span a{display:block;float:right;overflow:hidden}.tagchecklist strong{margin-right:-8px;position:absolute}.tagchecklist span{margin-left:25px;font-size:13px;line-height:1.8em;cursor:default;max-width:100%;text-overflow:ellipsis}.tagchecklist span a{margin:1px -17px 0 0;cursor:pointer;width:20px;height:20px;text-indent:0;position:absolute}#poststuff .stuffbox>h3,#poststuff h2,#poststuff h3.hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}#poststuff .inside{margin:6px 0 0}#poststuff .inside #page_template,#poststuff .inside #parent_id{max-width:100%}#poststuff .inside label.deleted,#poststuff .inside label.spam{color:red}#poststuff .inside label.waiting{color:orange}#poststuff .inside label.approved{color:green}.ie8 #poststuff .inside #page_template,.ie8 #poststuff .inside #parent_id{width:250px}#post-visibility-select{line-height:1.5em;margin-top:3px}#poststuff #submitdiv .inside{margin:0;padding:0}#post-body-content,.edit-form-section{margin-bottom:20px}#postcustomstuff thead th{padding:5px 8px 8px;background-color:#f1f1f1}#postcustom #postcustomstuff .submit{border:0;float:none;padding:0 8px 8px}#side-sortables #postcustom #postcustomstuff .submit{margin:0;padding:0}#side-sortables #postcustom #postcustomstuff #the-list textarea{height:85px}#side-sortables #postcustom #postcustomstuff td.left input,#side-sortables #postcustom #postcustomstuff td.left select,#side-sortables #postcustomstuff #newmetaleft a{margin:3px 3px 0}#postcustomstuff table{margin:0;width:100%;border:1px solid #ddd;border-spacing:0;background-color:#f9f9f9}#postcustomstuff tr{vertical-align:top}#postcustomstuff table input,#postcustomstuff table select,#postcustomstuff table textarea{width:96%;margin:8px}#side-sortables #postcustomstuff table input,#side-sortables #postcustomstuff table select,#side-sortables #postcustomstuff table textarea{margin:3px}#postcustomstuff td.left,#postcustomstuff th.left{width:38%}#postcustomstuff .submit input{margin:0;width:auto}#postcustomstuff #newmetaleft a{display:inline-block;margin:0 8px 8px;text-decoration:none}.no-js #postcustomstuff #enternew{display:none}#post-body-content .compat-attachment-fields{margin-bottom:20px}.compat-attachment-fields th{padding-top:5px;padding-left:10px}#select-featured-image{padding:4px 0;overflow:hidden}#select-featured-image img{max-width:100%;height:auto;margin-bottom:10px}#select-featured-image a{float:right;clear:both}#select-featured-image .remove{display:none;margin-top:10px}.js #select-featured-image.has-featured-image .remove{display:inline-block}.no-js #select-featured-image .choose{display:none}.post-state-format{overflow:hidden;display:inline-block;vertical-align:middle;height:20px;width:20px;margin-left:5px;margin-top:-4px}.post-state-format:before{display:block;height:20px;width:20px;font:400 20px/1 dashicons!important;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon:before,.post-state-format:before{color:#ddd;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}a.post-format-icon:hover:before,a.post-state-format:hover:before{color:#00a0d2}#post-formats-select{line-height:2em}#post-formats-select .post-format-icon:before{top:5px}input.post-format{margin-top:1px}label.post-format-icon{margin-right:0;padding:2px 0}.post-format-icon:before{position:relative;display:inline-block;margin-left:7px;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon.post-format-standard:before,.post-state-format.post-format-standard:before,a.post-state-format.format-standard:before{content:"\f109"}.post-format-icon.post-format-image:before,.post-state-format.post-format-image:before,a.post-state-format.format-image:before{content:"\f128"}.post-format-icon.post-format-gallery:before,.post-state-format.post-format-gallery:before,a.post-state-format.format-gallery:before{content:"\f161"}.post-format-icon.post-format-audio:before,.post-state-format.post-format-audio:before,a.post-state-format.format-audio:before{content:"\f127"}.post-format-icon.post-format-video:before,.post-state-format.post-format-video:before,a.post-state-format.format-video:before{content:"\f126"}.post-format-icon.post-format-chat:before,.post-state-format.post-format-chat:before,a.post-state-format.format-chat:before{content:"\f125"}.post-format-icon.post-format-status:before,.post-state-format.post-format-status:before,a.post-state-format.format-status:before{content:"\f130"}.post-format-icon.post-format-aside:before,.post-state-format.post-format-aside:before,a.post-state-format.format-aside:before{content:"\f123"}.post-format-icon.post-format-quote:before,.post-state-format.post-format-quote:before,a.post-state-format.format-quote:before{content:"\f122"}.post-format-icon.post-format-link:before,.post-state-format.post-format-link:before,a.post-state-format.format-link:before{content:"\f103"}.category-adder{margin-right:120px;padding:4px 0}.category-adder h4{margin:0 0 8px}#side-sortables .category-adder{margin:0}.categorydiv div.tabs-panel,.customlinkdiv div.tabs-panel,.posttypediv div.tabs-panel,.taxonomydiv div.tabs-panel,.wp-tab-panel{min-height:42px;max-height:200px;overflow:auto;padding:0 .9em;border:1px solid #ddd;background-color:#fdfdfd}div.tabs-panel-active{display:block}div.tabs-panel-inactive{display:none}#front-page-warning,#front-static-pages ul,.categorydiv ul.categorychecklist ul,.customlinkdiv ul.categorychecklist ul,.inline-editor ul.cat-checklist ul,.posttypediv ul.categorychecklist ul,.taxonomydiv ul.categorychecklist ul,ul.export-filters{margin-right:18px}ul.categorychecklist li{margin:0;padding:0;line-height:22px;word-wrap:break-word}.categorydiv .tabs-panel,.customlinkdiv .tabs-panel,.posttypediv .tabs-panel,.taxonomydiv .tabs-panel{border-width:3px;border-style:solid}.form-wrap label{display:block;padding:2px;font-size:12px}.form-field input[type=text],.form-field input[type=password],.form-field input[type=email],.form-field input[type=number],.form-field input[type=search],.form-field input[type=tel],.form-field input[type=url],.form-field textarea{border-style:solid;border-width:1px;width:95%}.form-wrap p,p.description{margin:2px 0 5px;color:#666}.form-wrap p,p.description,p.help,span.description{font-size:13px;font-style:italic}.form-wrap .form-field{margin:0 0 10px;padding:8px 0}.form-wrap .form-field #parent{max-width:100%}.col-wrap h2{margin:12px 0;font-size:1.1em}.col-wrap p.submit{margin-top:-10px}#poststuff .tagsdiv .howto{margin:0 0 6px}.ajaxtag .newtag{position:relative}.tagsdiv .newtag{width:180px}.tagsdiv .the-tags{display:block;height:60px;margin:0 auto;overflow:auto;width:260px}#post-body-content .tagsdiv .the-tags{margin:0 5px}p.popular-tags{border:none;line-height:2em;padding:8px 12px 12px;text-align:justify}p.popular-tags a{padding:0 3px}.tagcloud{width:97%;margin:0 0 40px;text-align:justify}.tagcloud h2{margin:2px 0 12px}.ac_results{display:none;margin:-1px 0 0;padding:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;background-color:#fff}.wp-customizer .ac_results{z-index:500000}.ac_results li{margin:0;padding:5px 10px;white-space:nowrap;text-align:right}.ac_over .ac_match,.ac_results .ac_over{background-color:#0073aa;color:#fff;cursor:pointer}.ac_match{text-decoration:underline}.comment-php .wp-editor-area{height:200px}.comment-ays td,.comment-ays th{padding:10px 15px}.comment-ays .comment-content a[href]:after{content:'(' attr(href) ')';display:inline-block;padding:0 4px;color:#72777C;font-size:13px}.comment-ays .comment-content p.edit-comment{margin-top:10px}.comment-ays .comment-content p.edit-comment a[href]:after{content:'';padding:0}#comment-status-radio label,.links-table td,.links-table th{padding:5px 0}.comment-ays-submit .button-cancel{margin-right:1em}.spam-undo-inside,.trash-undo-inside{margin:1px 0 1px 8px;line-height:16px}.spam-undo-inside .avatar,.trash-undo-inside .avatar{height:20px;width:20px;margin-left:8px;vertical-align:middle}.stuffbox .editcomment{clear:none}#comment-status-radio p{margin:3px 0 5px}#comment-status-radio input{margin:2px 0 5px 3px;vertical-align:middle}table.links-table{width:100%;border-spacing:0}.links-table th{font-weight:400;text-align:right;vertical-align:top;min-width:80px;width:20%;word-wrap:break-word}.links-table td label{margin-left:8px}.links-table td input[type=text],.links-table td textarea{width:100%}.links-table #link_rel{max-width:280px}#qt_content_dfw,#wp-content-wrap .mce-wp-dfw{display:none}.wp-editor-expand #qt_content_dfw,.wp-editor-expand #wp-content-wrap .mce-wp-dfw{display:inline-block}.focus-on #screen-meta,.focus-on #screen-meta-links,.focus-on #wp-toolbar,.focus-on #wpfooter,.focus-on .postbox-container>*,.focus-on .update-nag,.focus-on .wrap>h1,.focus-on div.error,.focus-on div.notice,.focus-on div.updated{opacity:0;-webkit-transition-duration:.6s;transition-duration:.6s;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.focus-on #wp-toolbar{opacity:.3}.focus-off #screen-meta,.focus-off #screen-meta-links,.focus-off #wp-toolbar,.focus-off #wpfooter,.focus-off .postbox-container>*,.focus-off .update-nag,.focus-off .wrap>h1,.focus-off div.error,.focus-off div.notice,.focus-off div.updated{opacity:1;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.focus-off #wp-toolbar{-webkit-transform:translate(0,0)}.focus-on #adminmenuback,.focus-on #adminmenuwrap{-webkit-transition-duration:.6s;transition-duration:.6s;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}.focus-off #adminmenuback,.focus-off #adminmenuwrap{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){#content-resize-handle,#post-body .wp_themeSkin .mceStatusbar a.mceResize{background:url(../images/resize-2x.gif) right bottom no-repeat;-webkit-background-size:11px 11px;background-size:11px 11px}.rtl #content-resize-handle,.rtl #post-body .wp_themeSkin .mceStatusbar a.mceResize{background-image:url(../images/resize-rtl-2x.gif);background-position:left bottom}}@media only screen and (max-width:850px){#poststuff{min-width:0}#wpbody-content #poststuff #post-body{margin:0}#wpbody-content #post-body.columns-2 #postbox-container-1{margin-left:0;width:100%}#poststuff #postbox-container-1 #side-sortables:empty,#poststuff #postbox-container-1 .empty-container{border:0;height:0;min-height:0}#poststuff #post-body.columns-2 #side-sortables{min-height:0;width:auto}.columns-prefs,.screen-layout{display:none}}@media screen and (max-width:782px){#post-body-content{min-width:0}#titlediv #title-prompt-text{padding:10px}#poststuff .stuffbox>h3,#poststuff h2,#poststuff h3.hndle{padding:12px}.post-format-options{padding-left:0}.post-format-options a{margin-left:5px;margin-bottom:5px;min-width:52px}.post-format-options .post-format-title{font-size:11px}.post-format-options a div{height:28px;width:28px}.post-format-options a div:before{font-size:26px!important}#post-visibility-select{line-height:280%}.wp-core-ui .save-post-visibility,.wp-core-ui .save-timestamp{vertical-align:middle;margin-left:15px}.timestamp-wrap select#mm{display:block;width:100%;margin-bottom:10px}.timestamp-wrap #aa,.timestamp-wrap #hh,.timestamp-wrap #jj,.timestamp-wrap #mn{padding:12px 3px;font-size:14px;margin-bottom:5px;width:auto;text-align:center}ul.category-tabs{margin:30px 0 15px}.tagsdiv .newtag,ul.categorychecklist li{margin-bottom:15px}ul.category-tabs li.tabs{padding:15px}ul.categorychecklist ul{margin-top:15px}.category-add input[type=text],.category-add select{max-width:none;margin-bottom:15px}.tagsdiv .newtag{width:100%;height:auto}.tagchecklist{margin:25px 10px}.tagchecklist span{font-size:16px;line-height:1.4}#commentstatusdiv p{line-height:2.8}.mceToolbar *{white-space:normal!important}.mceToolbar td,.mceToolbar tr{float:right!important}.wp_themeSkin a.mceButton{width:30px;height:30px}.wp_themeSkin .mceButton .mceIcon{margin-top:5px;margin-right:5px}.wp_themeSkin .mceSplitButton{margin-top:1px}.wp_themeSkin .mceSplitButton td a.mceAction{padding:6px 6px 6px 3px}.wp_themeSkin .mceSplitButton td a.mceOpen,.wp_themeSkin .mceSplitButtonEnabled:hover td a.mceOpen{padding-top:6px;padding-bottom:6px;background-position:1px 6px}.wp_themeSkin table.mceListBox{margin:5px}div.quicktags-toolbar input{padding:10px 20px}button.wp-switch-editor{font-size:16px;line-height:1em;margin:7px 7px 0 0;padding:8px 12px}#wp-content-media-buttons a{font-size:16px;line-height:37px;height:39px;padding:0 15px 0 20px}.wp-media-buttons span.jetpack-contact-form-icon,.wp-media-buttons span.wp-media-buttons-icon{width:22px!important;margin-top:-3px!important;margin-right:-5px!important}.wp-media-buttons #insert-jetpack-contact-form span.jetpack-contact-form-icon:before,.wp-media-buttons .add_media span.wp-media-buttons-icon:before{font-size:20px!important}#content_wp_fullscreen{display:none}.misc-pub-section{padding:20px 10px}.misc-pub-section>a{float:left;font-size:16px}#delete-action,#publishing-action{line-height:47px}#publishing-action .spinner{float:none;margin-top:-2px}.comment-ays td,.comment-ays th{padding-bottom:0}.comment-ays td{padding-top:6px}.links-table #link_rel{max-width:none}.links-table td,.links-table th{padding:10px 0}}@media only screen and (max-width:500px){#wp-content-media-buttons a{font-size:14px;padding:0 10px}}
\ No newline at end of file
+#pending,#poststuff #titlewrap{border:0;padding:0}#pending,#poststuff #post-body{padding:0}#editable-post-name-full,body.post-new-php .submitbox .submitdelete{display:none}#titlediv,#wp-content-editor-container,.postbox,form#tags-filter{position:relative}#poststuff{padding-top:10px;min-width:763px}#poststuff .postbox-container{width:100%}#poststuff #post-body.columns-2{margin-left:300px}#show-comments{overflow:hidden}#save-action .spinner,#show-comments a{float:right}#show-comments .spinner{float:none;margin-top:0}#lost-connection-notice .spinner{visibility:visible;float:right;margin:0 0 0 5px}#titlediv label{cursor:text}#titlediv div.inside{margin:0}#titlediv #title{padding:3px 8px;font-size:1.7em;line-height:100%;height:1.7em;width:100%;outline:0;margin:0 0 3px;background-color:#fff}#titlediv #title-prompt-text{color:#72777c;position:absolute;font-size:1.7em;padding:11px 10px}input#link_description,input#link_url{width:98%}#pending{background:100% none;font-size:11px;margin-top:-1px}#comment-link-box,#edit-slug-box{line-height:24px;min-height:25px;margin-top:5px;padding:0 10px;color:#666}#edit-slug-box .cancel{margin-left:10px;padding:0;font-size:11px;text-decoration:underline;color:#0073aa}#comment-link-box{margin:5px 0;padding:0 5px}#editable-post-name{font-weight:600}#editable-post-name input{font-size:13px;font-weight:400;height:22px;margin:0;width:16em}.postarea h3 label{float:right}.submitbox .submitdelete{text-decoration:none;padding:1px 2px}#normal-sortables .submitbox .submitdelete:hover{color:#000;background-color:red;border-bottom-color:red}.submitbox .submit a:hover{text-decoration:underline}.submitbox .submit input{margin-bottom:8px;margin-left:4px;padding:6px}#post-status-select{margin-top:3px}#post-body #normal-sortables{min-height:50px}.postbox{min-width:255px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff}#trackback_url{width:99%}#normal-sortables .postbox .submit{background:0 0;border:0;float:left;padding:0 12px;margin:0}.category-add input[type=text],.category-add select{width:100%;max-width:260px;vertical-align:baseline}#side-sortables .category-add input[type=text],#side-sortables .category-add select{margin:0 0 1em}#side-sortables .add-menu-item-tabs li,.wp-tab-bar li,ul.category-tabs li{display:inline;line-height:1.35em}.no-js .category-tabs li.hide-if-no-js{display:none}#side-sortables .add-menu-item-tabs a,.category-tabs a,.wp-tab-bar a{text-decoration:none}#post-body ul.add-menu-item-tabs li.tabs a,#post-body ul.category-tabs li.tabs a,#side-sortables .add-menu-item-tabs .tabs a,#side-sortables .category-tabs .tabs a,.wp-tab-bar .wp-tab-active a{color:#32373c}.category-tabs{margin:8px 0 5px}#category-adder h4{margin:0}.taxonomy-add-new{display:inline-block;margin:10px 0;font-weight:600}#side-sortables .add-menu-item-tabs,.wp-tab-bar{margin-bottom:3px}#normal-sortables .postbox #replyrow .submit{float:none;margin:0;padding:5px 7px 10px;overflow:hidden}#side-sortables .submitbox .submit .preview,#side-sortables .submitbox .submit a.preview:hover,#side-sortables .submitbox .submit input{border:0}ul.add-menu-item-tabs,ul.category-tabs,ul.wp-tab-bar{margin-top:12px}ul.add-menu-item-tabs li,ul.category-tabs li{border:1px solid transparent;position:relative}.wp-tab-active,ul.add-menu-item-tabs li.tabs,ul.category-tabs li.tabs{border:1px solid #ddd;border-bottom-color:#fdfdfd;background-color:#fdfdfd}ul.add-menu-item-tabs li,ul.category-tabs li,ul.wp-tab-bar li{padding:3px 5px 6px}#set-post-thumbnail{display:inline-block;max-width:100%}.ui-tabs-hide,.wp-editor-expand #content-resize-handle,.wp-hidden-children .wp-hidden-child{display:none}#postimagediv .inside img{max-width:100%;height:auto;width:auto;vertical-align:top;background-image:-webkit-linear-gradient(-45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4),-webkit-linear-gradient(-45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4);background-image:linear-gradient(-45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4),linear-gradient(-45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4);background-position:100% 0,10px 10px;-webkit-background-size:20px 20px;background-size:20px 20px}#post-body .tagsdiv #newtag{margin-left:5px;width:16em}#side-sortables input#post_password{width:94%}#side-sortables .tagsdiv #newtag{width:68%}#post-status-info{width:100%;border-spacing:0;border:1px solid #e5e5e5;border-top:none;background-color:#f7f7f7;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);z-index:999}#post-status-info td{font-size:12px}.autosave-info{padding:2px 10px;text-align:left}#editorcontent #post-status-info{border:none}#content-resize-handle{background:url(../images/resize.gif) right bottom no-repeat;width:12px;cursor:row-resize}.rtl #content-resize-handle{background-image:url(../images/resize-rtl.gif);background-position:left bottom}#postdivrich #content{resize:none}#wp-word-count{display:block;padding:2px 10px}.wp-editor-expand #wp-content-editor-tools{z-index:1000;border-bottom:1px solid #e5e5e5}.wp-editor-expand #wp-content-editor-container{-webkit-box-shadow:none;box-shadow:none;margin-top:-1px;border-bottom:0 none}.wp-editor-expand div.mce-statusbar{z-index:1}.wp-editor-expand #post-status-info{border-top:1px solid #e5e5e5}.wp-editor-expand div.mce-toolbar-grp{z-index:999}.mce-fullscreen #wp-content-wrap .mce-edit-area,.mce-fullscreen #wp-content-wrap .mce-menubar,.mce-fullscreen #wp-content-wrap .mce-statusbar,.mce-fullscreen #wp-content-wrap .mce-toolbar-grp{position:static!important;width:auto!important;padding:0!important}.mce-fullscreen #wp-content-wrap .mce-statusbar{visibility:visible!important}.mce-fullscreen #wp-content-wrap .mce-tinymce .mce-wp-dfw,.mce-fullscreen #wp-content-wrap .mce-wp-dfw,.post-php.mce-fullscreen #wpadminbar{display:none}#wp-content-editor-tools{background-color:#f1f1f1;padding-top:20px}#poststuff #post-body.columns-2 #side-sortables{width:280px}#timestampdiv select{height:21px;line-height:14px;padding:0;vertical-align:top;font-size:12px}#aa,#hh,#jj,#mn{padding:1px;font-size:12px}#hh,#jj,#mn{width:2em}#aa{width:3.4em}.curtime #timestamp{padding:2px 0 1px;display:inline!important;height:auto!important}#misc-publishing-actions label[for=post_status]:before,#post-body #visibility:before,#post-body .misc-pub-revisions:before,.curtime #timestamp:before,span.wp-media-buttons-icon:before{color:#82878c}#post-body #visibility:before,#post-body .misc-pub-revisions:before,.curtime #timestamp:before{font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 0 0 2px;top:0;right:-1px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}#post-body #visibility:before{content:"\f177"}.curtime #timestamp:before{content:"\f145";top:-1px}#post-body .misc-pub-revisions:before{content:"\f321"}#timestampdiv{padding-top:5px;line-height:23px}#timestampdiv p{margin:8px 0 6px}#timestampdiv input{border-width:1px;border-style:solid}.notification-dialog{position:fixed;top:30%;max-height:70%;right:50%;width:450px;margin-right:-225px;background:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);line-height:1.5;z-index:1000005;overflow-y:auto}.notification-dialog-background{position:fixed;top:0;right:0;left:0;bottom:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000000}#post-lock-dialog .post-locked-message,#post-lock-dialog .post-taken-over{margin:25px}#post-lock-dialog .post-locked-message a.button{margin-left:10px}#post-lock-dialog .post-locked-avatar{float:right;margin:0 0 20px 20px}#post-lock-dialog .wp-tab-first{outline:0}#post-lock-dialog .locked-saving img{float:right;margin-left:3px}#post-lock-dialog.saved .locked-saved,#post-lock-dialog.saving .locked-saving{display:inline}#excerpt{display:block;margin:12px 0 0;height:4em;width:100%}.tagchecklist{margin-right:14px;font-size:12px;overflow:auto}.tagchecklist br{display:none}.tagchecklist span,.tagchecklist span a{display:block;float:right;overflow:hidden}.tagchecklist strong{margin-right:-8px;position:absolute}.tagchecklist span{margin-left:25px;font-size:13px;line-height:1.8em;cursor:default;max-width:100%;text-overflow:ellipsis}.tagchecklist span a{margin:1px -17px 0 0;cursor:pointer;width:20px;height:20px;text-indent:0;position:absolute}#poststuff .stuffbox>h3,#poststuff h2,#poststuff h3.hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}#poststuff .inside{margin:6px 0 0}#poststuff .inside #page_template,#poststuff .inside #parent_id{max-width:100%}.ie8 #poststuff .inside #page_template,.ie8 #poststuff .inside #parent_id{width:250px}#post-visibility-select{line-height:1.5em;margin-top:3px}#poststuff #submitdiv .inside{margin:0;padding:0}#post-body-content,.edit-form-section{margin-bottom:20px}#postcustomstuff thead th{padding:5px 8px 8px;background-color:#f1f1f1}#postcustom #postcustomstuff .submit{border:0;float:none;padding:0 8px 8px}#side-sortables #postcustom #postcustomstuff .submit{margin:0;padding:0}#side-sortables #postcustom #postcustomstuff #the-list textarea{height:85px}#side-sortables #postcustom #postcustomstuff td.left input,#side-sortables #postcustom #postcustomstuff td.left select,#side-sortables #postcustomstuff #newmetaleft a{margin:3px 3px 0}#postcustomstuff table{margin:0;width:100%;border:1px solid #ddd;border-spacing:0;background-color:#f9f9f9}#postcustomstuff tr{vertical-align:top}#postcustomstuff table input,#postcustomstuff table select,#postcustomstuff table textarea{width:96%;margin:8px}#side-sortables #postcustomstuff table input,#side-sortables #postcustomstuff table select,#side-sortables #postcustomstuff table textarea{margin:3px}#postcustomstuff td.left,#postcustomstuff th.left{width:38%}#postcustomstuff .submit input{margin:0;width:auto}#postcustomstuff #newmetaleft a{display:inline-block;margin:0 8px 8px;text-decoration:none}.no-js #postcustomstuff #enternew{display:none}#post-body-content .compat-attachment-fields{margin-bottom:20px}.compat-attachment-fields th{padding-top:5px;padding-left:10px}#select-featured-image{padding:4px 0;overflow:hidden}#select-featured-image img{max-width:100%;height:auto;margin-bottom:10px}#select-featured-image a{float:right;clear:both}#select-featured-image .remove{display:none;margin-top:10px}.js #select-featured-image.has-featured-image .remove{display:inline-block}.no-js #select-featured-image .choose{display:none}.post-state-format{overflow:hidden;display:inline-block;vertical-align:middle;height:20px;width:20px;margin-left:5px;margin-top:-4px}.post-state-format:before{display:block;height:20px;width:20px;font:400 20px/1 dashicons!important;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon:before,.post-state-format:before{color:#ddd;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}a.post-format-icon:hover:before,a.post-state-format:hover:before{color:#00a0d2}#post-formats-select{line-height:2em}#post-formats-select .post-format-icon:before{top:5px}input.post-format{margin-top:1px}label.post-format-icon{margin-right:0;padding:2px 0}.post-format-icon:before{position:relative;display:inline-block;margin-left:7px;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon.post-format-standard:before,.post-state-format.post-format-standard:before,a.post-state-format.format-standard:before{content:"\f109"}.post-format-icon.post-format-image:before,.post-state-format.post-format-image:before,a.post-state-format.format-image:before{content:"\f128"}.post-format-icon.post-format-gallery:before,.post-state-format.post-format-gallery:before,a.post-state-format.format-gallery:before{content:"\f161"}.post-format-icon.post-format-audio:before,.post-state-format.post-format-audio:before,a.post-state-format.format-audio:before{content:"\f127"}.post-format-icon.post-format-video:before,.post-state-format.post-format-video:before,a.post-state-format.format-video:before{content:"\f126"}.post-format-icon.post-format-chat:before,.post-state-format.post-format-chat:before,a.post-state-format.format-chat:before{content:"\f125"}.post-format-icon.post-format-status:before,.post-state-format.post-format-status:before,a.post-state-format.format-status:before{content:"\f130"}.post-format-icon.post-format-aside:before,.post-state-format.post-format-aside:before,a.post-state-format.format-aside:before{content:"\f123"}.post-format-icon.post-format-quote:before,.post-state-format.post-format-quote:before,a.post-state-format.format-quote:before{content:"\f122"}.post-format-icon.post-format-link:before,.post-state-format.post-format-link:before,a.post-state-format.format-link:before{content:"\f103"}.category-adder{margin-right:120px;padding:4px 0}.category-adder h4{margin:0 0 8px}#side-sortables .category-adder{margin:0}.categorydiv div.tabs-panel,.customlinkdiv div.tabs-panel,.posttypediv div.tabs-panel,.taxonomydiv div.tabs-panel,.wp-tab-panel{min-height:42px;max-height:200px;overflow:auto;padding:0 .9em;border:1px solid #ddd;background-color:#fdfdfd}div.tabs-panel-active{display:block}div.tabs-panel-inactive{display:none}#front-page-warning,#front-static-pages ul,.categorydiv ul.categorychecklist ul,.customlinkdiv ul.categorychecklist ul,.inline-editor ul.cat-checklist ul,.posttypediv ul.categorychecklist ul,.taxonomydiv ul.categorychecklist ul,ul.export-filters{margin-right:18px}ul.categorychecklist li{margin:0;padding:0;line-height:22px;word-wrap:break-word}.categorydiv .tabs-panel,.customlinkdiv .tabs-panel,.posttypediv .tabs-panel,.taxonomydiv .tabs-panel{border-width:3px;border-style:solid}.form-wrap label{display:block;padding:2px 0}.form-field input[type=text],.form-field input[type=password],.form-field input[type=email],.form-field input[type=number],.form-field input[type=search],.form-field input[type=tel],.form-field input[type=url],.form-field textarea{border-style:solid;border-width:1px;width:95%}.form-wrap p,p.description{margin:2px 0 5px;color:#666}.form-wrap p,p.description,p.help,span.description{font-size:13px;font-style:italic}.form-wrap .form-field{margin:1em 0;padding:0}.form-wrap .form-field #parent{max-width:100%}.col-wrap h2{margin:12px 0;font-size:1.1em}.col-wrap p.submit{margin-top:-10px}.edit-term-notes{margin-top:2em}#poststuff .tagsdiv .howto{margin:0 0 6px}.ajaxtag .newtag{position:relative}.tagsdiv .newtag{width:180px}.tagsdiv .the-tags{display:block;height:60px;margin:0 auto;overflow:auto;width:260px}#post-body-content .tagsdiv .the-tags{margin:0 5px}p.popular-tags{border:none;line-height:2em;padding:8px 12px 12px;text-align:justify}p.popular-tags a{padding:0 3px}.tagcloud{width:97%;margin:0 0 40px;text-align:justify}.tagcloud h2{margin:2px 0 12px}.ac_results{display:none;margin:-1px 0 0;padding:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;background-color:#fff}.wp-customizer .ac_results{z-index:500000}.ac_results li{margin:0;padding:5px 10px;white-space:nowrap;text-align:right}.ac_over .ac_match,.ac_results .ac_over{background-color:#0073aa;color:#fff;cursor:pointer}.ac_match{text-decoration:underline}.comment-php .wp-editor-area{height:200px}.comment-ays td,.comment-ays th{padding:10px 15px}.comment-ays .comment-content ul{list-style:outside;margin-right:2em}.comment-ays .comment-content a[href]:after{content:'(' attr(href) ')';display:inline-block;padding:0 4px;color:#72777C;font-size:13px;word-break:break-all}.comment-ays .comment-content p.edit-comment{margin-top:10px}.comment-ays .comment-content p.edit-comment a[href]:after{content:'';padding:0}#comment-status-radio label,.links-table td,.links-table th{padding:5px 0}.comment-ays-submit .button-cancel{margin-right:1em}.spam-undo-inside,.trash-undo-inside{margin:1px 0 1px 8px;line-height:16px}.spam-undo-inside .avatar,.trash-undo-inside .avatar{height:20px;width:20px;margin-left:8px;vertical-align:middle}.stuffbox .editcomment{clear:none}#comment-status-radio p{margin:3px 0 5px}#comment-status-radio input{margin:2px 0 5px 3px;vertical-align:middle}table.links-table{width:100%;border-spacing:0}.links-table th{font-weight:400;text-align:right;vertical-align:top;min-width:80px;width:20%;word-wrap:break-word}.links-table td label{margin-left:8px}.links-table td input[type=text],.links-table td textarea{width:100%}.links-table #link_rel{max-width:280px}#qt_content_dfw,#wp-content-wrap .mce-wp-dfw{display:none}.wp-editor-expand #qt_content_dfw,.wp-editor-expand #wp-content-wrap .mce-wp-dfw{display:inline-block}.focus-on #screen-meta,.focus-on #screen-meta-links,.focus-on #wp-toolbar,.focus-on #wpfooter,.focus-on .postbox-container>*,.focus-on .update-nag,.focus-on .wrap>h1,.focus-on div.error,.focus-on div.notice,.focus-on div.updated{opacity:0;-webkit-transition-duration:.6s;transition-duration:.6s;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.focus-on #wp-toolbar{opacity:.3}.focus-off #screen-meta,.focus-off #screen-meta-links,.focus-off #wp-toolbar,.focus-off #wpfooter,.focus-off .postbox-container>*,.focus-off .update-nag,.focus-off .wrap>h1,.focus-off div.error,.focus-off div.notice,.focus-off div.updated{opacity:1;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.focus-off #wp-toolbar{-webkit-transform:translate(0,0)}.focus-on #adminmenuback,.focus-on #adminmenuwrap{-webkit-transition-duration:.6s;transition-duration:.6s;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}.focus-off #adminmenuback,.focus-off #adminmenuwrap{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){#content-resize-handle,#post-body .wp_themeSkin .mceStatusbar a.mceResize{background:url(../images/resize-2x.gif) right bottom no-repeat;-webkit-background-size:11px 11px;background-size:11px 11px}.rtl #content-resize-handle,.rtl #post-body .wp_themeSkin .mceStatusbar a.mceResize{background-image:url(../images/resize-rtl-2x.gif);background-position:left bottom}}@media only screen and (max-width:850px){#poststuff{min-width:0}#wpbody-content #poststuff #post-body{margin:0}#wpbody-content #post-body.columns-2 #postbox-container-1{margin-left:0;width:100%}#poststuff #postbox-container-1 #side-sortables:empty,#poststuff #postbox-container-1 .empty-container{border:0;height:0;min-height:0}#poststuff #post-body.columns-2 #side-sortables{min-height:0;width:auto}.columns-prefs,.screen-layout{display:none}}@media screen and (max-width:782px){#post-body-content{min-width:0}#titlediv #title-prompt-text{padding:10px}#poststuff .stuffbox>h3,#poststuff h2,#poststuff h3.hndle{padding:12px}.post-format-options{padding-left:0}.post-format-options a{margin-left:5px;margin-bottom:5px;min-width:52px}.post-format-options .post-format-title{font-size:11px}.post-format-options a div{height:28px;width:28px}.post-format-options a div:before{font-size:26px!important}#post-visibility-select{line-height:280%}.wp-core-ui .save-post-visibility,.wp-core-ui .save-timestamp{vertical-align:middle;margin-left:15px}.timestamp-wrap select#mm{display:block;width:100%;margin-bottom:10px}.timestamp-wrap #aa,.timestamp-wrap #hh,.timestamp-wrap #jj,.timestamp-wrap #mn{padding:12px 3px;font-size:14px;margin-bottom:5px;width:auto;text-align:center}ul.category-tabs{margin:30px 0 15px}.tagsdiv .newtag,ul.categorychecklist li{margin-bottom:15px}ul.category-tabs li.tabs{padding:15px}ul.categorychecklist ul{margin-top:15px}.category-add input[type=text],.category-add select{max-width:none;margin-bottom:15px}.tagsdiv .newtag{width:100%;height:auto}.tagchecklist{margin:25px 10px}.tagchecklist span{font-size:16px;line-height:1.4}#commentstatusdiv p{line-height:2.8}.mceToolbar *{white-space:normal!important}.mceToolbar td,.mceToolbar tr{float:right!important}.wp_themeSkin a.mceButton{width:30px;height:30px}.wp_themeSkin .mceButton .mceIcon{margin-top:5px;margin-right:5px}.wp_themeSkin .mceSplitButton{margin-top:1px}.wp_themeSkin .mceSplitButton td a.mceAction{padding:6px 6px 6px 3px}.wp_themeSkin .mceSplitButton td a.mceOpen,.wp_themeSkin .mceSplitButtonEnabled:hover td a.mceOpen{padding-top:6px;padding-bottom:6px;background-position:1px 6px}.wp_themeSkin table.mceListBox{margin:5px}div.quicktags-toolbar input{padding:10px 20px}button.wp-switch-editor{font-size:16px;line-height:1em;margin:7px 7px 0 0;padding:8px 12px}#wp-content-media-buttons a{font-size:14px;padding:6px 10px}.wp-media-buttons span.jetpack-contact-form-icon,.wp-media-buttons span.wp-media-buttons-icon{width:22px!important;margin-right:-2px!important}.wp-media-buttons #insert-jetpack-contact-form span.jetpack-contact-form-icon:before,.wp-media-buttons .add_media span.wp-media-buttons-icon:before{font-size:20px!important}#content_wp_fullscreen{display:none}.misc-pub-section{padding:20px 10px}.misc-pub-section>a{float:left;font-size:16px}#delete-action,#publishing-action{line-height:47px}#publishing-action .spinner{float:none;margin-top:-2px}.comment-ays td,.comment-ays th{padding-bottom:0}.comment-ays td{padding-top:6px}.links-table #link_rel{max-width:none}.links-table td,.links-table th{padding:10px 0}}
\ No newline at end of file
index d4108ae5ff951575c865344a7a659ffd400adc2c..ac7649217364a65c399bef40d7a4ce0b4c0abeaf 100644 (file)
@@ -114,12 +114,12 @@ input#link_url {
 }
 
 #editable-post-name {
-       font-weight: bold;
+       font-weight: 600;
 }
 
 #editable-post-name input {
        font-size: 13px;
-       font-weight: normal;
+       font-weight: 400;
        height: 22px;
        margin: 0;
        width: 16em;
@@ -281,7 +281,7 @@ ul.add-menu-item-tabs li.tabs,
 ul.category-tabs li,
 ul.add-menu-item-tabs li,
 ul.wp-tab-bar li {
-       padding: 3px 5px 5px;
+       padding: 3px 5px 6px;
 }
 
 #set-post-thumbnail {
@@ -377,16 +377,6 @@ form#tags-filter {
        position: relative;
 }
 
-#content-textarea-clone {
-       z-index: -1;
-       position: absolute;
-       top: 0;
-       visibility: hidden;
-       overflow: hidden;
-       max-width: 100%;
-       border: 1px solid transparent;
-}
-
 .wp-editor-expand #wp-content-editor-tools {
        z-index: 1000;
        border-bottom: 1px solid #e5e5e5;
@@ -644,19 +634,6 @@ span.wp-media-buttons-icon:before {
        max-width: 100%;
 }
 
-#poststuff .inside label.spam,
-#poststuff .inside label.deleted {
-       color: red;
-}
-
-#poststuff .inside label.waiting {
-       color: orange;
-}
-
-#poststuff .inside label.approved {
-       color: green;
-}
-
 .ie8 #poststuff .inside #parent_id,
 .ie8 #poststuff .inside #page_template {
        width: 250px;
@@ -981,15 +958,9 @@ ul.categorychecklist li {
        border-style: solid;
 }
 
-.form-wrap p,
-.form-wrap label {
-       font-size: 11px;
-}
-
 .form-wrap label {
        display: block;
-       padding: 2px;
-       font-size: 12px;
+       padding: 2px 0;
 }
 
 .form-field input[type="text"],
@@ -1020,8 +991,8 @@ span.description,
 }
 
 .form-wrap .form-field {
-       margin: 0 0 10px;
-       padding: 8px 0;
+       margin: 1em 0;
+       padding: 0;
 }
 
 .form-wrap .form-field #parent {
@@ -1037,6 +1008,9 @@ span.description,
        margin-top: -10px;
 }
 
+.edit-term-notes {
+       margin-top: 2em;
+}
 
 /*------------------------------------------------------------------------------
   13.0 - Tags
@@ -1131,12 +1105,18 @@ p.popular-tags a {
        padding: 10px 15px;
 }
 
+.comment-ays .comment-content ul {
+       list-style: initial;
+       margin-left: 2em;
+}
+
 .comment-ays .comment-content a[href]:after {
        content: '(' attr( href ) ')';
        display: inline-block;
        padding: 0 4px;
        color: #72777C;
        font-size: 13px;
+       word-break: break-all;
 }
 
 .comment-ays .comment-content p.edit-comment {
@@ -1190,7 +1170,7 @@ table.links-table {
 }
 
 .links-table th {
-       font-weight: normal;
+       font-weight: 400;
        text-align: left;
        vertical-align: top;
        min-width: 80px;
@@ -1531,17 +1511,14 @@ table.links-table {
        }
 
        #wp-content-media-buttons a {
-               font-size: 16px;
-               line-height: 37px;
-               height: 39px;
-               padding: 0 20px 0 15px;
+               font-size: 14px;
+               padding: 6px 10px;
        }
 
        .wp-media-buttons span.wp-media-buttons-icon,
        .wp-media-buttons span.jetpack-contact-form-icon {
                width: 22px !important;
-               margin-top: -3px !important;
-               margin-left: -5px !important;
+               margin-left: -2px !important;
        }
 
        .wp-media-buttons .add_media span.wp-media-buttons-icon:before,
@@ -1592,11 +1569,3 @@ table.links-table {
                padding: 10px 0;
        }
 }
-
-@media only screen and (max-width: 500px) {
-       /* Align Add Media + Visual + Text tabs */
-       #wp-content-media-buttons a {
-               font-size: 14px;
-               padding: 0 10px 0 10px;
-       }
-}
index 55f0cc74e2ee50661a1b16a6e8620c0ef81a8f51..505a62abcbbbf13db3c78a3abd935a3e6ee58103 100644 (file)
@@ -1 +1 @@
-#pending,#poststuff #titlewrap{border:0;padding:0}#pending,#poststuff #post-body{padding:0}#editable-post-name-full,body.post-new-php .submitbox .submitdelete{display:none}#titlediv,#wp-content-editor-container,.postbox,form#tags-filter{position:relative}#poststuff{padding-top:10px;min-width:763px}#poststuff .postbox-container{width:100%}#poststuff #post-body.columns-2{margin-right:300px}#show-comments{overflow:hidden}#save-action .spinner,#show-comments a{float:left}#show-comments .spinner{float:none;margin-top:0}#lost-connection-notice .spinner{visibility:visible;float:left;margin:0 5px 0 0}#titlediv label{cursor:text}#titlediv div.inside{margin:0}#titlediv #title{padding:3px 8px;font-size:1.7em;line-height:100%;height:1.7em;width:100%;outline:0;margin:0 0 3px;background-color:#fff}#titlediv #title-prompt-text{color:#72777c;position:absolute;font-size:1.7em;padding:11px 10px}input#link_description,input#link_url{width:98%}#pending{background:0 none;font-size:11px;margin-top:-1px}#comment-link-box,#edit-slug-box{line-height:24px;min-height:25px;margin-top:5px;padding:0 10px;color:#666}#edit-slug-box .cancel{margin-right:10px;padding:0;font-size:11px;text-decoration:underline;color:#0073aa}#comment-link-box{margin:5px 0;padding:0 5px}#editable-post-name{font-weight:700}#editable-post-name input{font-size:13px;font-weight:400;height:22px;margin:0;width:16em}.postarea h3 label{float:left}.submitbox .submitdelete{text-decoration:none;padding:1px 2px}#normal-sortables .submitbox .submitdelete:hover{color:#000;background-color:red;border-bottom-color:red}.submitbox .submit a:hover{text-decoration:underline}.submitbox .submit input{margin-bottom:8px;margin-right:4px;padding:6px}#post-status-select{margin-top:3px}#post-body #normal-sortables{min-height:50px}.postbox{min-width:255px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff}#trackback_url{width:99%}#normal-sortables .postbox .submit{background:0 0;border:0;float:right;padding:0 12px;margin:0}.category-add input[type=text],.category-add select{width:100%;max-width:260px;vertical-align:baseline}#side-sortables .category-add input[type=text],#side-sortables .category-add select{margin:0 0 1em}#side-sortables .add-menu-item-tabs li,.wp-tab-bar li,ul.category-tabs li{display:inline;line-height:1.35em}.no-js .category-tabs li.hide-if-no-js{display:none}#side-sortables .add-menu-item-tabs a,.category-tabs a,.wp-tab-bar a{text-decoration:none}#post-body ul.add-menu-item-tabs li.tabs a,#post-body ul.category-tabs li.tabs a,#side-sortables .add-menu-item-tabs .tabs a,#side-sortables .category-tabs .tabs a,.wp-tab-bar .wp-tab-active a{color:#32373c}.category-tabs{margin:8px 0 5px}#category-adder h4{margin:0}.taxonomy-add-new{display:inline-block;margin:10px 0;font-weight:600}#side-sortables .add-menu-item-tabs,.wp-tab-bar{margin-bottom:3px}#normal-sortables .postbox #replyrow .submit{float:none;margin:0;padding:5px 7px 10px;overflow:hidden}#side-sortables .submitbox .submit .preview,#side-sortables .submitbox .submit a.preview:hover,#side-sortables .submitbox .submit input{border:0}ul.add-menu-item-tabs,ul.category-tabs,ul.wp-tab-bar{margin-top:12px}ul.add-menu-item-tabs li,ul.category-tabs li{border:1px solid transparent;position:relative}.wp-tab-active,ul.add-menu-item-tabs li.tabs,ul.category-tabs li.tabs{border:1px solid #ddd;border-bottom-color:#fdfdfd;background-color:#fdfdfd}ul.add-menu-item-tabs li,ul.category-tabs li,ul.wp-tab-bar li{padding:3px 5px 5px}#set-post-thumbnail{display:inline-block;max-width:100%}.ui-tabs-hide,.wp-editor-expand #content-resize-handle,.wp-hidden-children .wp-hidden-child{display:none}#postimagediv .inside img{max-width:100%;height:auto;width:auto;vertical-align:top;background-image:-webkit-linear-gradient(45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4),-webkit-linear-gradient(45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4);background-image:linear-gradient(45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4),linear-gradient(45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4);background-position:0 0,10px 10px;-webkit-background-size:20px 20px;background-size:20px 20px}#post-body .tagsdiv #newtag{margin-right:5px;width:16em}#side-sortables input#post_password{width:94%}#side-sortables .tagsdiv #newtag{width:68%}#post-status-info{width:100%;border-spacing:0;border:1px solid #e5e5e5;border-top:none;background-color:#f7f7f7;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);z-index:999}#post-status-info td{font-size:12px}.autosave-info{padding:2px 10px;text-align:right}#editorcontent #post-status-info{border:none}#content-resize-handle{background:url(../images/resize.gif) right bottom no-repeat;width:12px;cursor:row-resize}.rtl #content-resize-handle{background-image:url(../images/resize-rtl.gif);background-position:left bottom}#postdivrich #content{resize:none}#wp-word-count{display:block;padding:2px 10px}#content-textarea-clone{z-index:-1;position:absolute;top:0;visibility:hidden;overflow:hidden;max-width:100%;border:1px solid transparent}.wp-editor-expand #wp-content-editor-tools{z-index:1000;border-bottom:1px solid #e5e5e5}.wp-editor-expand #wp-content-editor-container{-webkit-box-shadow:none;box-shadow:none;margin-top:-1px;border-bottom:0 none}.wp-editor-expand div.mce-statusbar{z-index:1}.wp-editor-expand #post-status-info{border-top:1px solid #e5e5e5}.wp-editor-expand div.mce-toolbar-grp{z-index:999}.mce-fullscreen #wp-content-wrap .mce-edit-area,.mce-fullscreen #wp-content-wrap .mce-menubar,.mce-fullscreen #wp-content-wrap .mce-statusbar,.mce-fullscreen #wp-content-wrap .mce-toolbar-grp{position:static!important;width:auto!important;padding:0!important}.mce-fullscreen #wp-content-wrap .mce-statusbar{visibility:visible!important}.mce-fullscreen #wp-content-wrap .mce-tinymce .mce-wp-dfw,.mce-fullscreen #wp-content-wrap .mce-wp-dfw,.post-php.mce-fullscreen #wpadminbar{display:none}#wp-content-editor-tools{background-color:#f1f1f1;padding-top:20px}#poststuff #post-body.columns-2 #side-sortables{width:280px}#timestampdiv select{height:21px;line-height:14px;padding:0;vertical-align:top;font-size:12px}#aa,#hh,#jj,#mn{padding:1px;font-size:12px}#hh,#jj,#mn{width:2em}#aa{width:3.4em}.curtime #timestamp{padding:2px 0 1px;display:inline!important;height:auto!important}#misc-publishing-actions label[for=post_status]:before,#post-body #visibility:before,#post-body .misc-pub-revisions:before,.curtime #timestamp:before,span.wp-media-buttons-icon:before{color:#82878c}#post-body #visibility:before,#post-body .misc-pub-revisions:before,.curtime #timestamp:before{font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 2px 0 0;top:0;left:-1px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}#post-body #visibility:before{content:"\f177"}.curtime #timestamp:before{content:"\f145";top:-1px}#post-body .misc-pub-revisions:before{content:"\f321"}#timestampdiv{padding-top:5px;line-height:23px}#timestampdiv p{margin:8px 0 6px}#timestampdiv input{border-width:1px;border-style:solid}.notification-dialog{position:fixed;top:30%;max-height:70%;left:50%;width:450px;margin-left:-225px;background:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);line-height:1.5;z-index:1000005;overflow-y:auto}.notification-dialog-background{position:fixed;top:0;left:0;right:0;bottom:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000000}#post-lock-dialog .post-locked-message,#post-lock-dialog .post-taken-over{margin:25px}#post-lock-dialog .post-locked-message a.button{margin-right:10px}#post-lock-dialog .post-locked-avatar{float:left;margin:0 20px 20px 0}#post-lock-dialog .wp-tab-first{outline:0}#post-lock-dialog .locked-saving img{float:left;margin-right:3px}#post-lock-dialog.saved .locked-saved,#post-lock-dialog.saving .locked-saving{display:inline}#excerpt{display:block;margin:12px 0 0;height:4em;width:100%}.tagchecklist{margin-left:14px;font-size:12px;overflow:auto}.tagchecklist br{display:none}.tagchecklist span,.tagchecklist span a{display:block;float:left;overflow:hidden}.tagchecklist strong{margin-left:-8px;position:absolute}.tagchecklist span{margin-right:25px;font-size:13px;line-height:1.8em;cursor:default;max-width:100%;text-overflow:ellipsis}.tagchecklist span a{margin:1px 0 0 -17px;cursor:pointer;width:20px;height:20px;text-indent:0;position:absolute}#poststuff .stuffbox>h3,#poststuff h2,#poststuff h3.hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}#poststuff .inside{margin:6px 0 0}#poststuff .inside #page_template,#poststuff .inside #parent_id{max-width:100%}#poststuff .inside label.deleted,#poststuff .inside label.spam{color:red}#poststuff .inside label.waiting{color:orange}#poststuff .inside label.approved{color:green}.ie8 #poststuff .inside #page_template,.ie8 #poststuff .inside #parent_id{width:250px}#post-visibility-select{line-height:1.5em;margin-top:3px}#poststuff #submitdiv .inside{margin:0;padding:0}#post-body-content,.edit-form-section{margin-bottom:20px}#postcustomstuff thead th{padding:5px 8px 8px;background-color:#f1f1f1}#postcustom #postcustomstuff .submit{border:0;float:none;padding:0 8px 8px}#side-sortables #postcustom #postcustomstuff .submit{margin:0;padding:0}#side-sortables #postcustom #postcustomstuff #the-list textarea{height:85px}#side-sortables #postcustom #postcustomstuff td.left input,#side-sortables #postcustom #postcustomstuff td.left select,#side-sortables #postcustomstuff #newmetaleft a{margin:3px 3px 0}#postcustomstuff table{margin:0;width:100%;border:1px solid #ddd;border-spacing:0;background-color:#f9f9f9}#postcustomstuff tr{vertical-align:top}#postcustomstuff table input,#postcustomstuff table select,#postcustomstuff table textarea{width:96%;margin:8px}#side-sortables #postcustomstuff table input,#side-sortables #postcustomstuff table select,#side-sortables #postcustomstuff table textarea{margin:3px}#postcustomstuff td.left,#postcustomstuff th.left{width:38%}#postcustomstuff .submit input{margin:0;width:auto}#postcustomstuff #newmetaleft a{display:inline-block;margin:0 8px 8px;text-decoration:none}.no-js #postcustomstuff #enternew{display:none}#post-body-content .compat-attachment-fields{margin-bottom:20px}.compat-attachment-fields th{padding-top:5px;padding-right:10px}#select-featured-image{padding:4px 0;overflow:hidden}#select-featured-image img{max-width:100%;height:auto;margin-bottom:10px}#select-featured-image a{float:left;clear:both}#select-featured-image .remove{display:none;margin-top:10px}.js #select-featured-image.has-featured-image .remove{display:inline-block}.no-js #select-featured-image .choose{display:none}.post-state-format{overflow:hidden;display:inline-block;vertical-align:middle;height:20px;width:20px;margin-right:5px;margin-top:-4px}.post-state-format:before{display:block;height:20px;width:20px;font:400 20px/1 dashicons!important;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon:before,.post-state-format:before{color:#ddd;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}a.post-format-icon:hover:before,a.post-state-format:hover:before{color:#00a0d2}#post-formats-select{line-height:2em}#post-formats-select .post-format-icon:before{top:5px}input.post-format{margin-top:1px}label.post-format-icon{margin-left:0;padding:2px 0}.post-format-icon:before{position:relative;display:inline-block;margin-right:7px;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon.post-format-standard:before,.post-state-format.post-format-standard:before,a.post-state-format.format-standard:before{content:"\f109"}.post-format-icon.post-format-image:before,.post-state-format.post-format-image:before,a.post-state-format.format-image:before{content:"\f128"}.post-format-icon.post-format-gallery:before,.post-state-format.post-format-gallery:before,a.post-state-format.format-gallery:before{content:"\f161"}.post-format-icon.post-format-audio:before,.post-state-format.post-format-audio:before,a.post-state-format.format-audio:before{content:"\f127"}.post-format-icon.post-format-video:before,.post-state-format.post-format-video:before,a.post-state-format.format-video:before{content:"\f126"}.post-format-icon.post-format-chat:before,.post-state-format.post-format-chat:before,a.post-state-format.format-chat:before{content:"\f125"}.post-format-icon.post-format-status:before,.post-state-format.post-format-status:before,a.post-state-format.format-status:before{content:"\f130"}.post-format-icon.post-format-aside:before,.post-state-format.post-format-aside:before,a.post-state-format.format-aside:before{content:"\f123"}.post-format-icon.post-format-quote:before,.post-state-format.post-format-quote:before,a.post-state-format.format-quote:before{content:"\f122"}.post-format-icon.post-format-link:before,.post-state-format.post-format-link:before,a.post-state-format.format-link:before{content:"\f103"}.category-adder{margin-left:120px;padding:4px 0}.category-adder h4{margin:0 0 8px}#side-sortables .category-adder{margin:0}.categorydiv div.tabs-panel,.customlinkdiv div.tabs-panel,.posttypediv div.tabs-panel,.taxonomydiv div.tabs-panel,.wp-tab-panel{min-height:42px;max-height:200px;overflow:auto;padding:0 .9em;border:1px solid #ddd;background-color:#fdfdfd}div.tabs-panel-active{display:block}div.tabs-panel-inactive{display:none}#front-page-warning,#front-static-pages ul,.categorydiv ul.categorychecklist ul,.customlinkdiv ul.categorychecklist ul,.inline-editor ul.cat-checklist ul,.posttypediv ul.categorychecklist ul,.taxonomydiv ul.categorychecklist ul,ul.export-filters{margin-left:18px}ul.categorychecklist li{margin:0;padding:0;line-height:22px;word-wrap:break-word}.categorydiv .tabs-panel,.customlinkdiv .tabs-panel,.posttypediv .tabs-panel,.taxonomydiv .tabs-panel{border-width:3px;border-style:solid}.form-wrap label{display:block;padding:2px;font-size:12px}.form-field input[type=text],.form-field input[type=password],.form-field input[type=email],.form-field input[type=number],.form-field input[type=search],.form-field input[type=tel],.form-field input[type=url],.form-field textarea{border-style:solid;border-width:1px;width:95%}.form-wrap p,p.description{margin:2px 0 5px;color:#666}.form-wrap p,p.description,p.help,span.description{font-size:13px;font-style:italic}.form-wrap .form-field{margin:0 0 10px;padding:8px 0}.form-wrap .form-field #parent{max-width:100%}.col-wrap h2{margin:12px 0;font-size:1.1em}.col-wrap p.submit{margin-top:-10px}#poststuff .tagsdiv .howto{margin:0 0 6px}.ajaxtag .newtag{position:relative}.tagsdiv .newtag{width:180px}.tagsdiv .the-tags{display:block;height:60px;margin:0 auto;overflow:auto;width:260px}#post-body-content .tagsdiv .the-tags{margin:0 5px}p.popular-tags{border:none;line-height:2em;padding:8px 12px 12px;text-align:justify}p.popular-tags a{padding:0 3px}.tagcloud{width:97%;margin:0 0 40px;text-align:justify}.tagcloud h2{margin:2px 0 12px}.ac_results{display:none;margin:-1px 0 0;padding:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;background-color:#fff}.wp-customizer .ac_results{z-index:500000}.ac_results li{margin:0;padding:5px 10px;white-space:nowrap;text-align:left}.ac_over .ac_match,.ac_results .ac_over{background-color:#0073aa;color:#fff;cursor:pointer}.ac_match{text-decoration:underline}.comment-php .wp-editor-area{height:200px}.comment-ays td,.comment-ays th{padding:10px 15px}.comment-ays .comment-content a[href]:after{content:'(' attr(href) ')';display:inline-block;padding:0 4px;color:#72777C;font-size:13px}.comment-ays .comment-content p.edit-comment{margin-top:10px}.comment-ays .comment-content p.edit-comment a[href]:after{content:'';padding:0}#comment-status-radio label,.links-table td,.links-table th{padding:5px 0}.comment-ays-submit .button-cancel{margin-left:1em}.spam-undo-inside,.trash-undo-inside{margin:1px 8px 1px 0;line-height:16px}.spam-undo-inside .avatar,.trash-undo-inside .avatar{height:20px;width:20px;margin-right:8px;vertical-align:middle}.stuffbox .editcomment{clear:none}#comment-status-radio p{margin:3px 0 5px}#comment-status-radio input{margin:2px 3px 5px 0;vertical-align:middle}table.links-table{width:100%;border-spacing:0}.links-table th{font-weight:400;text-align:left;vertical-align:top;min-width:80px;width:20%;word-wrap:break-word}.links-table td label{margin-right:8px}.links-table td input[type=text],.links-table td textarea{width:100%}.links-table #link_rel{max-width:280px}#qt_content_dfw,#wp-content-wrap .mce-wp-dfw{display:none}.wp-editor-expand #qt_content_dfw,.wp-editor-expand #wp-content-wrap .mce-wp-dfw{display:inline-block}.focus-on #screen-meta,.focus-on #screen-meta-links,.focus-on #wp-toolbar,.focus-on #wpfooter,.focus-on .postbox-container>*,.focus-on .update-nag,.focus-on .wrap>h1,.focus-on div.error,.focus-on div.notice,.focus-on div.updated{opacity:0;-webkit-transition-duration:.6s;transition-duration:.6s;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.focus-on #wp-toolbar{opacity:.3}.focus-off #screen-meta,.focus-off #screen-meta-links,.focus-off #wp-toolbar,.focus-off #wpfooter,.focus-off .postbox-container>*,.focus-off .update-nag,.focus-off .wrap>h1,.focus-off div.error,.focus-off div.notice,.focus-off div.updated{opacity:1;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.focus-off #wp-toolbar{-webkit-transform:translate(0,0)}.focus-on #adminmenuback,.focus-on #adminmenuwrap{-webkit-transition-duration:.6s;transition-duration:.6s;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%)}.focus-off #adminmenuback,.focus-off #adminmenuwrap{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){#content-resize-handle,#post-body .wp_themeSkin .mceStatusbar a.mceResize{background:url(../images/resize-2x.gif) right bottom no-repeat;-webkit-background-size:11px 11px;background-size:11px 11px}.rtl #content-resize-handle,.rtl #post-body .wp_themeSkin .mceStatusbar a.mceResize{background-image:url(../images/resize-rtl-2x.gif);background-position:left bottom}}@media only screen and (max-width:850px){#poststuff{min-width:0}#wpbody-content #poststuff #post-body{margin:0}#wpbody-content #post-body.columns-2 #postbox-container-1{margin-right:0;width:100%}#poststuff #postbox-container-1 #side-sortables:empty,#poststuff #postbox-container-1 .empty-container{border:0;height:0;min-height:0}#poststuff #post-body.columns-2 #side-sortables{min-height:0;width:auto}.columns-prefs,.screen-layout{display:none}}@media screen and (max-width:782px){#post-body-content{min-width:0}#titlediv #title-prompt-text{padding:10px}#poststuff .stuffbox>h3,#poststuff h2,#poststuff h3.hndle{padding:12px}.post-format-options{padding-right:0}.post-format-options a{margin-right:5px;margin-bottom:5px;min-width:52px}.post-format-options .post-format-title{font-size:11px}.post-format-options a div{height:28px;width:28px}.post-format-options a div:before{font-size:26px!important}#post-visibility-select{line-height:280%}.wp-core-ui .save-post-visibility,.wp-core-ui .save-timestamp{vertical-align:middle;margin-right:15px}.timestamp-wrap select#mm{display:block;width:100%;margin-bottom:10px}.timestamp-wrap #aa,.timestamp-wrap #hh,.timestamp-wrap #jj,.timestamp-wrap #mn{padding:12px 3px;font-size:14px;margin-bottom:5px;width:auto;text-align:center}ul.category-tabs{margin:30px 0 15px}.tagsdiv .newtag,ul.categorychecklist li{margin-bottom:15px}ul.category-tabs li.tabs{padding:15px}ul.categorychecklist ul{margin-top:15px}.category-add input[type=text],.category-add select{max-width:none;margin-bottom:15px}.tagsdiv .newtag{width:100%;height:auto}.tagchecklist{margin:25px 10px}.tagchecklist span{font-size:16px;line-height:1.4}#commentstatusdiv p{line-height:2.8}.mceToolbar *{white-space:normal!important}.mceToolbar td,.mceToolbar tr{float:left!important}.wp_themeSkin a.mceButton{width:30px;height:30px}.wp_themeSkin .mceButton .mceIcon{margin-top:5px;margin-left:5px}.wp_themeSkin .mceSplitButton{margin-top:1px}.wp_themeSkin .mceSplitButton td a.mceAction{padding:6px 3px 6px 6px}.wp_themeSkin .mceSplitButton td a.mceOpen,.wp_themeSkin .mceSplitButtonEnabled:hover td a.mceOpen{padding-top:6px;padding-bottom:6px;background-position:1px 6px}.wp_themeSkin table.mceListBox{margin:5px}div.quicktags-toolbar input{padding:10px 20px}button.wp-switch-editor{font-size:16px;line-height:1em;margin:7px 0 0 7px;padding:8px 12px}#wp-content-media-buttons a{font-size:16px;line-height:37px;height:39px;padding:0 20px 0 15px}.wp-media-buttons span.jetpack-contact-form-icon,.wp-media-buttons span.wp-media-buttons-icon{width:22px!important;margin-top:-3px!important;margin-left:-5px!important}.wp-media-buttons #insert-jetpack-contact-form span.jetpack-contact-form-icon:before,.wp-media-buttons .add_media span.wp-media-buttons-icon:before{font-size:20px!important}#content_wp_fullscreen{display:none}.misc-pub-section{padding:20px 10px}.misc-pub-section>a{float:right;font-size:16px}#delete-action,#publishing-action{line-height:47px}#publishing-action .spinner{float:none;margin-top:-2px}.comment-ays td,.comment-ays th{padding-bottom:0}.comment-ays td{padding-top:6px}.links-table #link_rel{max-width:none}.links-table td,.links-table th{padding:10px 0}}@media only screen and (max-width:500px){#wp-content-media-buttons a{font-size:14px;padding:0 10px}}
\ No newline at end of file
+#pending,#poststuff #titlewrap{border:0;padding:0}#pending,#poststuff #post-body{padding:0}#editable-post-name-full,body.post-new-php .submitbox .submitdelete{display:none}#titlediv,#wp-content-editor-container,.postbox,form#tags-filter{position:relative}#poststuff{padding-top:10px;min-width:763px}#poststuff .postbox-container{width:100%}#poststuff #post-body.columns-2{margin-right:300px}#show-comments{overflow:hidden}#save-action .spinner,#show-comments a{float:left}#show-comments .spinner{float:none;margin-top:0}#lost-connection-notice .spinner{visibility:visible;float:left;margin:0 5px 0 0}#titlediv label{cursor:text}#titlediv div.inside{margin:0}#titlediv #title{padding:3px 8px;font-size:1.7em;line-height:100%;height:1.7em;width:100%;outline:0;margin:0 0 3px;background-color:#fff}#titlediv #title-prompt-text{color:#72777c;position:absolute;font-size:1.7em;padding:11px 10px}input#link_description,input#link_url{width:98%}#pending{background:0 none;font-size:11px;margin-top:-1px}#comment-link-box,#edit-slug-box{line-height:24px;min-height:25px;margin-top:5px;padding:0 10px;color:#666}#edit-slug-box .cancel{margin-right:10px;padding:0;font-size:11px;text-decoration:underline;color:#0073aa}#comment-link-box{margin:5px 0;padding:0 5px}#editable-post-name{font-weight:600}#editable-post-name input{font-size:13px;font-weight:400;height:22px;margin:0;width:16em}.postarea h3 label{float:left}.submitbox .submitdelete{text-decoration:none;padding:1px 2px}#normal-sortables .submitbox .submitdelete:hover{color:#000;background-color:red;border-bottom-color:red}.submitbox .submit a:hover{text-decoration:underline}.submitbox .submit input{margin-bottom:8px;margin-right:4px;padding:6px}#post-status-select{margin-top:3px}#post-body #normal-sortables{min-height:50px}.postbox{min-width:255px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff}#trackback_url{width:99%}#normal-sortables .postbox .submit{background:0 0;border:0;float:right;padding:0 12px;margin:0}.category-add input[type=text],.category-add select{width:100%;max-width:260px;vertical-align:baseline}#side-sortables .category-add input[type=text],#side-sortables .category-add select{margin:0 0 1em}#side-sortables .add-menu-item-tabs li,.wp-tab-bar li,ul.category-tabs li{display:inline;line-height:1.35em}.no-js .category-tabs li.hide-if-no-js{display:none}#side-sortables .add-menu-item-tabs a,.category-tabs a,.wp-tab-bar a{text-decoration:none}#post-body ul.add-menu-item-tabs li.tabs a,#post-body ul.category-tabs li.tabs a,#side-sortables .add-menu-item-tabs .tabs a,#side-sortables .category-tabs .tabs a,.wp-tab-bar .wp-tab-active a{color:#32373c}.category-tabs{margin:8px 0 5px}#category-adder h4{margin:0}.taxonomy-add-new{display:inline-block;margin:10px 0;font-weight:600}#side-sortables .add-menu-item-tabs,.wp-tab-bar{margin-bottom:3px}#normal-sortables .postbox #replyrow .submit{float:none;margin:0;padding:5px 7px 10px;overflow:hidden}#side-sortables .submitbox .submit .preview,#side-sortables .submitbox .submit a.preview:hover,#side-sortables .submitbox .submit input{border:0}ul.add-menu-item-tabs,ul.category-tabs,ul.wp-tab-bar{margin-top:12px}ul.add-menu-item-tabs li,ul.category-tabs li{border:1px solid transparent;position:relative}.wp-tab-active,ul.add-menu-item-tabs li.tabs,ul.category-tabs li.tabs{border:1px solid #ddd;border-bottom-color:#fdfdfd;background-color:#fdfdfd}ul.add-menu-item-tabs li,ul.category-tabs li,ul.wp-tab-bar li{padding:3px 5px 6px}#set-post-thumbnail{display:inline-block;max-width:100%}.ui-tabs-hide,.wp-editor-expand #content-resize-handle,.wp-hidden-children .wp-hidden-child{display:none}#postimagediv .inside img{max-width:100%;height:auto;width:auto;vertical-align:top;background-image:-webkit-linear-gradient(45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4),-webkit-linear-gradient(45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4);background-image:linear-gradient(45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4),linear-gradient(45deg,#c4c4c4 25%,transparent 25%,transparent 75%,#c4c4c4 75%,#c4c4c4);background-position:0 0,10px 10px;-webkit-background-size:20px 20px;background-size:20px 20px}#post-body .tagsdiv #newtag{margin-right:5px;width:16em}#side-sortables input#post_password{width:94%}#side-sortables .tagsdiv #newtag{width:68%}#post-status-info{width:100%;border-spacing:0;border:1px solid #e5e5e5;border-top:none;background-color:#f7f7f7;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);z-index:999}#post-status-info td{font-size:12px}.autosave-info{padding:2px 10px;text-align:right}#editorcontent #post-status-info{border:none}#content-resize-handle{background:url(../images/resize.gif) right bottom no-repeat;width:12px;cursor:row-resize}.rtl #content-resize-handle{background-image:url(../images/resize-rtl.gif);background-position:left bottom}#postdivrich #content{resize:none}#wp-word-count{display:block;padding:2px 10px}.wp-editor-expand #wp-content-editor-tools{z-index:1000;border-bottom:1px solid #e5e5e5}.wp-editor-expand #wp-content-editor-container{-webkit-box-shadow:none;box-shadow:none;margin-top:-1px;border-bottom:0 none}.wp-editor-expand div.mce-statusbar{z-index:1}.wp-editor-expand #post-status-info{border-top:1px solid #e5e5e5}.wp-editor-expand div.mce-toolbar-grp{z-index:999}.mce-fullscreen #wp-content-wrap .mce-edit-area,.mce-fullscreen #wp-content-wrap .mce-menubar,.mce-fullscreen #wp-content-wrap .mce-statusbar,.mce-fullscreen #wp-content-wrap .mce-toolbar-grp{position:static!important;width:auto!important;padding:0!important}.mce-fullscreen #wp-content-wrap .mce-statusbar{visibility:visible!important}.mce-fullscreen #wp-content-wrap .mce-tinymce .mce-wp-dfw,.mce-fullscreen #wp-content-wrap .mce-wp-dfw,.post-php.mce-fullscreen #wpadminbar{display:none}#wp-content-editor-tools{background-color:#f1f1f1;padding-top:20px}#poststuff #post-body.columns-2 #side-sortables{width:280px}#timestampdiv select{height:21px;line-height:14px;padding:0;vertical-align:top;font-size:12px}#aa,#hh,#jj,#mn{padding:1px;font-size:12px}#hh,#jj,#mn{width:2em}#aa{width:3.4em}.curtime #timestamp{padding:2px 0 1px;display:inline!important;height:auto!important}#misc-publishing-actions label[for=post_status]:before,#post-body #visibility:before,#post-body .misc-pub-revisions:before,.curtime #timestamp:before,span.wp-media-buttons-icon:before{color:#82878c}#post-body #visibility:before,#post-body .misc-pub-revisions:before,.curtime #timestamp:before{font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 2px 0 0;top:0;left:-1px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}#post-body #visibility:before{content:"\f177"}.curtime #timestamp:before{content:"\f145";top:-1px}#post-body .misc-pub-revisions:before{content:"\f321"}#timestampdiv{padding-top:5px;line-height:23px}#timestampdiv p{margin:8px 0 6px}#timestampdiv input{border-width:1px;border-style:solid}.notification-dialog{position:fixed;top:30%;max-height:70%;left:50%;width:450px;margin-left:-225px;background:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);line-height:1.5;z-index:1000005;overflow-y:auto}.notification-dialog-background{position:fixed;top:0;left:0;right:0;bottom:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000000}#post-lock-dialog .post-locked-message,#post-lock-dialog .post-taken-over{margin:25px}#post-lock-dialog .post-locked-message a.button{margin-right:10px}#post-lock-dialog .post-locked-avatar{float:left;margin:0 20px 20px 0}#post-lock-dialog .wp-tab-first{outline:0}#post-lock-dialog .locked-saving img{float:left;margin-right:3px}#post-lock-dialog.saved .locked-saved,#post-lock-dialog.saving .locked-saving{display:inline}#excerpt{display:block;margin:12px 0 0;height:4em;width:100%}.tagchecklist{margin-left:14px;font-size:12px;overflow:auto}.tagchecklist br{display:none}.tagchecklist span,.tagchecklist span a{display:block;float:left;overflow:hidden}.tagchecklist strong{margin-left:-8px;position:absolute}.tagchecklist span{margin-right:25px;font-size:13px;line-height:1.8em;cursor:default;max-width:100%;text-overflow:ellipsis}.tagchecklist span a{margin:1px 0 0 -17px;cursor:pointer;width:20px;height:20px;text-indent:0;position:absolute}#poststuff .stuffbox>h3,#poststuff h2,#poststuff h3.hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4}#poststuff .inside{margin:6px 0 0}#poststuff .inside #page_template,#poststuff .inside #parent_id{max-width:100%}.ie8 #poststuff .inside #page_template,.ie8 #poststuff .inside #parent_id{width:250px}#post-visibility-select{line-height:1.5em;margin-top:3px}#poststuff #submitdiv .inside{margin:0;padding:0}#post-body-content,.edit-form-section{margin-bottom:20px}#postcustomstuff thead th{padding:5px 8px 8px;background-color:#f1f1f1}#postcustom #postcustomstuff .submit{border:0;float:none;padding:0 8px 8px}#side-sortables #postcustom #postcustomstuff .submit{margin:0;padding:0}#side-sortables #postcustom #postcustomstuff #the-list textarea{height:85px}#side-sortables #postcustom #postcustomstuff td.left input,#side-sortables #postcustom #postcustomstuff td.left select,#side-sortables #postcustomstuff #newmetaleft a{margin:3px 3px 0}#postcustomstuff table{margin:0;width:100%;border:1px solid #ddd;border-spacing:0;background-color:#f9f9f9}#postcustomstuff tr{vertical-align:top}#postcustomstuff table input,#postcustomstuff table select,#postcustomstuff table textarea{width:96%;margin:8px}#side-sortables #postcustomstuff table input,#side-sortables #postcustomstuff table select,#side-sortables #postcustomstuff table textarea{margin:3px}#postcustomstuff td.left,#postcustomstuff th.left{width:38%}#postcustomstuff .submit input{margin:0;width:auto}#postcustomstuff #newmetaleft a{display:inline-block;margin:0 8px 8px;text-decoration:none}.no-js #postcustomstuff #enternew{display:none}#post-body-content .compat-attachment-fields{margin-bottom:20px}.compat-attachment-fields th{padding-top:5px;padding-right:10px}#select-featured-image{padding:4px 0;overflow:hidden}#select-featured-image img{max-width:100%;height:auto;margin-bottom:10px}#select-featured-image a{float:left;clear:both}#select-featured-image .remove{display:none;margin-top:10px}.js #select-featured-image.has-featured-image .remove{display:inline-block}.no-js #select-featured-image .choose{display:none}.post-state-format{overflow:hidden;display:inline-block;vertical-align:middle;height:20px;width:20px;margin-right:5px;margin-top:-4px}.post-state-format:before{display:block;height:20px;width:20px;font:400 20px/1 dashicons!important;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon:before,.post-state-format:before{color:#ddd;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}a.post-format-icon:hover:before,a.post-state-format:hover:before{color:#00a0d2}#post-formats-select{line-height:2em}#post-formats-select .post-format-icon:before{top:5px}input.post-format{margin-top:1px}label.post-format-icon{margin-left:0;padding:2px 0}.post-format-icon:before{position:relative;display:inline-block;margin-right:7px;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon.post-format-standard:before,.post-state-format.post-format-standard:before,a.post-state-format.format-standard:before{content:"\f109"}.post-format-icon.post-format-image:before,.post-state-format.post-format-image:before,a.post-state-format.format-image:before{content:"\f128"}.post-format-icon.post-format-gallery:before,.post-state-format.post-format-gallery:before,a.post-state-format.format-gallery:before{content:"\f161"}.post-format-icon.post-format-audio:before,.post-state-format.post-format-audio:before,a.post-state-format.format-audio:before{content:"\f127"}.post-format-icon.post-format-video:before,.post-state-format.post-format-video:before,a.post-state-format.format-video:before{content:"\f126"}.post-format-icon.post-format-chat:before,.post-state-format.post-format-chat:before,a.post-state-format.format-chat:before{content:"\f125"}.post-format-icon.post-format-status:before,.post-state-format.post-format-status:before,a.post-state-format.format-status:before{content:"\f130"}.post-format-icon.post-format-aside:before,.post-state-format.post-format-aside:before,a.post-state-format.format-aside:before{content:"\f123"}.post-format-icon.post-format-quote:before,.post-state-format.post-format-quote:before,a.post-state-format.format-quote:before{content:"\f122"}.post-format-icon.post-format-link:before,.post-state-format.post-format-link:before,a.post-state-format.format-link:before{content:"\f103"}.category-adder{margin-left:120px;padding:4px 0}.category-adder h4{margin:0 0 8px}#side-sortables .category-adder{margin:0}.categorydiv div.tabs-panel,.customlinkdiv div.tabs-panel,.posttypediv div.tabs-panel,.taxonomydiv div.tabs-panel,.wp-tab-panel{min-height:42px;max-height:200px;overflow:auto;padding:0 .9em;border:1px solid #ddd;background-color:#fdfdfd}div.tabs-panel-active{display:block}div.tabs-panel-inactive{display:none}#front-page-warning,#front-static-pages ul,.categorydiv ul.categorychecklist ul,.customlinkdiv ul.categorychecklist ul,.inline-editor ul.cat-checklist ul,.posttypediv ul.categorychecklist ul,.taxonomydiv ul.categorychecklist ul,ul.export-filters{margin-left:18px}ul.categorychecklist li{margin:0;padding:0;line-height:22px;word-wrap:break-word}.categorydiv .tabs-panel,.customlinkdiv .tabs-panel,.posttypediv .tabs-panel,.taxonomydiv .tabs-panel{border-width:3px;border-style:solid}.form-wrap label{display:block;padding:2px 0}.form-field input[type=text],.form-field input[type=password],.form-field input[type=email],.form-field input[type=number],.form-field input[type=search],.form-field input[type=tel],.form-field input[type=url],.form-field textarea{border-style:solid;border-width:1px;width:95%}.form-wrap p,p.description{margin:2px 0 5px;color:#666}.form-wrap p,p.description,p.help,span.description{font-size:13px;font-style:italic}.form-wrap .form-field{margin:1em 0;padding:0}.form-wrap .form-field #parent{max-width:100%}.col-wrap h2{margin:12px 0;font-size:1.1em}.col-wrap p.submit{margin-top:-10px}.edit-term-notes{margin-top:2em}#poststuff .tagsdiv .howto{margin:0 0 6px}.ajaxtag .newtag{position:relative}.tagsdiv .newtag{width:180px}.tagsdiv .the-tags{display:block;height:60px;margin:0 auto;overflow:auto;width:260px}#post-body-content .tagsdiv .the-tags{margin:0 5px}p.popular-tags{border:none;line-height:2em;padding:8px 12px 12px;text-align:justify}p.popular-tags a{padding:0 3px}.tagcloud{width:97%;margin:0 0 40px;text-align:justify}.tagcloud h2{margin:2px 0 12px}.ac_results{display:none;margin:-1px 0 0;padding:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;background-color:#fff}.wp-customizer .ac_results{z-index:500000}.ac_results li{margin:0;padding:5px 10px;white-space:nowrap;text-align:left}.ac_over .ac_match,.ac_results .ac_over{background-color:#0073aa;color:#fff;cursor:pointer}.ac_match{text-decoration:underline}.comment-php .wp-editor-area{height:200px}.comment-ays td,.comment-ays th{padding:10px 15px}.comment-ays .comment-content ul{list-style:outside;margin-left:2em}.comment-ays .comment-content a[href]:after{content:'(' attr(href) ')';display:inline-block;padding:0 4px;color:#72777C;font-size:13px;word-break:break-all}.comment-ays .comment-content p.edit-comment{margin-top:10px}.comment-ays .comment-content p.edit-comment a[href]:after{content:'';padding:0}#comment-status-radio label,.links-table td,.links-table th{padding:5px 0}.comment-ays-submit .button-cancel{margin-left:1em}.spam-undo-inside,.trash-undo-inside{margin:1px 8px 1px 0;line-height:16px}.spam-undo-inside .avatar,.trash-undo-inside .avatar{height:20px;width:20px;margin-right:8px;vertical-align:middle}.stuffbox .editcomment{clear:none}#comment-status-radio p{margin:3px 0 5px}#comment-status-radio input{margin:2px 3px 5px 0;vertical-align:middle}table.links-table{width:100%;border-spacing:0}.links-table th{font-weight:400;text-align:left;vertical-align:top;min-width:80px;width:20%;word-wrap:break-word}.links-table td label{margin-right:8px}.links-table td input[type=text],.links-table td textarea{width:100%}.links-table #link_rel{max-width:280px}#qt_content_dfw,#wp-content-wrap .mce-wp-dfw{display:none}.wp-editor-expand #qt_content_dfw,.wp-editor-expand #wp-content-wrap .mce-wp-dfw{display:inline-block}.focus-on #screen-meta,.focus-on #screen-meta-links,.focus-on #wp-toolbar,.focus-on #wpfooter,.focus-on .postbox-container>*,.focus-on .update-nag,.focus-on .wrap>h1,.focus-on div.error,.focus-on div.notice,.focus-on div.updated{opacity:0;-webkit-transition-duration:.6s;transition-duration:.6s;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.focus-on #wp-toolbar{opacity:.3}.focus-off #screen-meta,.focus-off #screen-meta-links,.focus-off #wp-toolbar,.focus-off #wpfooter,.focus-off .postbox-container>*,.focus-off .update-nag,.focus-off .wrap>h1,.focus-off div.error,.focus-off div.notice,.focus-off div.updated{opacity:1;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.focus-off #wp-toolbar{-webkit-transform:translate(0,0)}.focus-on #adminmenuback,.focus-on #adminmenuwrap{-webkit-transition-duration:.6s;transition-duration:.6s;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%)}.focus-off #adminmenuback,.focus-off #adminmenuwrap{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){#content-resize-handle,#post-body .wp_themeSkin .mceStatusbar a.mceResize{background:url(../images/resize-2x.gif) right bottom no-repeat;-webkit-background-size:11px 11px;background-size:11px 11px}.rtl #content-resize-handle,.rtl #post-body .wp_themeSkin .mceStatusbar a.mceResize{background-image:url(../images/resize-rtl-2x.gif);background-position:left bottom}}@media only screen and (max-width:850px){#poststuff{min-width:0}#wpbody-content #poststuff #post-body{margin:0}#wpbody-content #post-body.columns-2 #postbox-container-1{margin-right:0;width:100%}#poststuff #postbox-container-1 #side-sortables:empty,#poststuff #postbox-container-1 .empty-container{border:0;height:0;min-height:0}#poststuff #post-body.columns-2 #side-sortables{min-height:0;width:auto}.columns-prefs,.screen-layout{display:none}}@media screen and (max-width:782px){#post-body-content{min-width:0}#titlediv #title-prompt-text{padding:10px}#poststuff .stuffbox>h3,#poststuff h2,#poststuff h3.hndle{padding:12px}.post-format-options{padding-right:0}.post-format-options a{margin-right:5px;margin-bottom:5px;min-width:52px}.post-format-options .post-format-title{font-size:11px}.post-format-options a div{height:28px;width:28px}.post-format-options a div:before{font-size:26px!important}#post-visibility-select{line-height:280%}.wp-core-ui .save-post-visibility,.wp-core-ui .save-timestamp{vertical-align:middle;margin-right:15px}.timestamp-wrap select#mm{display:block;width:100%;margin-bottom:10px}.timestamp-wrap #aa,.timestamp-wrap #hh,.timestamp-wrap #jj,.timestamp-wrap #mn{padding:12px 3px;font-size:14px;margin-bottom:5px;width:auto;text-align:center}ul.category-tabs{margin:30px 0 15px}.tagsdiv .newtag,ul.categorychecklist li{margin-bottom:15px}ul.category-tabs li.tabs{padding:15px}ul.categorychecklist ul{margin-top:15px}.category-add input[type=text],.category-add select{max-width:none;margin-bottom:15px}.tagsdiv .newtag{width:100%;height:auto}.tagchecklist{margin:25px 10px}.tagchecklist span{font-size:16px;line-height:1.4}#commentstatusdiv p{line-height:2.8}.mceToolbar *{white-space:normal!important}.mceToolbar td,.mceToolbar tr{float:left!important}.wp_themeSkin a.mceButton{width:30px;height:30px}.wp_themeSkin .mceButton .mceIcon{margin-top:5px;margin-left:5px}.wp_themeSkin .mceSplitButton{margin-top:1px}.wp_themeSkin .mceSplitButton td a.mceAction{padding:6px 3px 6px 6px}.wp_themeSkin .mceSplitButton td a.mceOpen,.wp_themeSkin .mceSplitButtonEnabled:hover td a.mceOpen{padding-top:6px;padding-bottom:6px;background-position:1px 6px}.wp_themeSkin table.mceListBox{margin:5px}div.quicktags-toolbar input{padding:10px 20px}button.wp-switch-editor{font-size:16px;line-height:1em;margin:7px 0 0 7px;padding:8px 12px}#wp-content-media-buttons a{font-size:14px;padding:6px 10px}.wp-media-buttons span.jetpack-contact-form-icon,.wp-media-buttons span.wp-media-buttons-icon{width:22px!important;margin-left:-2px!important}.wp-media-buttons #insert-jetpack-contact-form span.jetpack-contact-form-icon:before,.wp-media-buttons .add_media span.wp-media-buttons-icon:before{font-size:20px!important}#content_wp_fullscreen{display:none}.misc-pub-section{padding:20px 10px}.misc-pub-section>a{float:right;font-size:16px}#delete-action,#publishing-action{line-height:47px}#publishing-action .spinner{float:none;margin-top:-2px}.comment-ays td,.comment-ays th{padding-bottom:0}.comment-ays td{padding-top:6px}.links-table #link_rel{max-width:none}.links-table td,.links-table th{padding:10px 0}}
\ No newline at end of file
index 5ecb8c836ea982f4b66e55740973bcff4f2412be..b8a0956f0544adc19d470235224e8a53a97d7aa9 100644 (file)
@@ -16,7 +16,6 @@ input[type="datetime-local"],
 input[type="email"],
 input[type="month"],
 input[type="number"],
-input[type="password"],
 input[type="search"],
 input[type="radio"],
 input[type="tel"],
@@ -45,7 +44,6 @@ input[type="datetime-local"]:focus,
 input[type="email"]:focus,
 input[type="month"]:focus,
 input[type="number"]:focus,
-input[type="password"]:focus,
 input[type="search"]:focus,
 input[type="tel"]:focus,
 input[type="text"]:focus,
@@ -70,7 +68,7 @@ input[type="url"] {
 /* Vertically align the number selector with the input. */
 input[type="number"] {
        height: 28px;
-       line-height: inherit;
+       line-height: 1;
 }
 
 input[type="checkbox"],
@@ -566,6 +564,16 @@ p.search-box {
        margin: 0 0 0 4px;
 }
 
+.js.plugins-php .search-box .wp-filter-search {
+       margin: 0;
+       width: 280px;
+       font-size: 16px;
+       font-weight: 300;
+       line-height: 1.5;
+       padding: 3px 5px;
+       height: 32px;
+}
+
 input[type="text"].ui-autocomplete-loading,
 input[type="email"].ui-autocomplete-loading {
        background-image: url(../images/loading.gif);
@@ -620,8 +628,7 @@ ul#add-to-blog-users {
 .form-table,
 .form-table td,
 .form-table th,
-.form-table td p,
-.form-wrap label {
+.form-table td p {
        font-size: 14px;
 }
 
@@ -635,7 +642,7 @@ ul#add-to-blog-users {
 .form-table th,
 .form-wrap label {
        color: #23282d;
-       font-weight: normal;
+       font-weight: 400;
        text-shadow: none;
        vertical-align: baseline;
 }
@@ -762,7 +769,7 @@ table.form-table td .updated p {
 .tool-box .title {
        margin: 8px 0;
        font-size: 18px;
-       font-weight: normal;
+       font-weight: 400;
        line-height: 24px;
 }
 
@@ -973,7 +980,7 @@ table.form-table td .updated p {
 }
 
 .request-filesystem-credentials-dialog .notification-dialog {
-       top: 15%;
+       top: 10%;
        max-height: 85%;
 }
 
@@ -1031,6 +1038,10 @@ table.form-table td .updated p {
        margin-left: 10px;
 }
 
+.request-filesystem-credentials-dialog #auth-keys-desc {
+       margin-bottom: 0;
+}
+
 #request-filesystem-credentials-dialog .button:not(:last-child) {
        margin-left: 10px;
 }
@@ -1043,6 +1054,43 @@ table.form-table td .updated p {
        display: inline;
 }
 
+.request-filesystem-credentials-dialog .ftp-username,
+.request-filesystem-credentials-dialog .ftp-password {
+       float: none;
+       width: auto;
+}
+
+.request-filesystem-credentials-dialog .ftp-username {
+       margin-bottom: 1em;
+}
+
+.request-filesystem-credentials-dialog .ftp-password {
+       margin: 0;
+}
+
+.request-filesystem-credentials-dialog .ftp-password em {
+       color: #888;
+}
+
+.request-filesystem-credentials-dialog label {
+       display: block;
+       line-height: 1.5;
+       margin-bottom: 1em;
+}
+
+.request-filesystem-credentials-form legend {
+       padding-bottom: 0;
+}
+
+.request-filesystem-credentials-form #ssh-keys legend {
+       font-size: 1.3em;
+}
+
+.request-filesystem-credentials-form .notice {
+       margin: 0 0 20px 0;
+       clear: both;
+}
+
 
 /* =Media Queries
 -------------------------------------------------------------- */
index 8e956e2f796121f4db830fb2dc3093c65d9e487e..79cb014b10a311a769e36065ab1b3bcee916a1e2 100644 (file)
@@ -1 +1 @@
-#pass-strength-result,input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.meta-box-sortables select,p.submit{max-width:100%}#your-profile label+a,.wp-admin select,fieldset label,label{vertical-align:middle}#pressthis-code-wrap,textarea{overflow:auto}input,textarea{box-sizing:border-box}input[type=text],input[type=search],input[type=radio],input[type=tel],input[type=time],input[type=url],input[type=week],input[type=password],input[type=checkbox],input[type=color],input[type=date],input[type=datetime],input[type=datetime-local],input[type=email],input[type=month],input[type=number],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out}input[type=text]:focus,input[type=search]:focus,input[type=radio]:focus,input[type=tel]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=password]:focus,input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[type=url],input[type=email]{direction:ltr}input[type=number]{height:28px;line-height:inherit}input[type=radio],input[type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#82878c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#00a0d2}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-left:4px;line-height:10px}input[type=radio]:checked:before,input[type=checkbox]:checked:before{float:right;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:"\f147";margin:-3px -4px 0 0;color:#1e8cbe}input[type=radio]:checked:before{content:"\2022";text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}@-moz-document url-prefix(){.form-table input.tog,input[type=radio],input[type=checkbox]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;-webkit-border-radius:0;border-radius:0}textarea{padding:2px 6px;line-height:1.4;resize:vertical}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input.readonly,input[readonly],textarea.readonly,textarea[readonly]{background-color:#eee}::-webkit-input-placeholder{color:#72777c}::-moz-placeholder{color:#72777c;opacity:1}:-ms-input-placeholder{color:#72777c}.form-invalid input,.form-invalid input:focus,.form-invalid select,.form-invalid select:focus{border-color:#dc3232!important;-webkit-box-shadow:0 0 2px rgba(204,0,0,.8);box-shadow:0 0 2px rgba(204,0,0,.8)}.form-table .form-required.form-invalid td:after{content:"\f534";font:400 20px/1 dashicons;color:#dc3232;margin-right:-25px;vertical-align:middle}.form-table .form-required.user-pass1-wrap.form-invalid td:after{content:''}.form-table .form-required.user-pass1-wrap.form-invalid .password-input-wrapper:after{content:'\f534';font:400 20px/1 dashicons;color:#dc3232;margin:0 -29px 0 6px;vertical-align:middle}.form-input-tip{color:#666}input.disabled,input:disabled,select.disabled,select:disabled,textarea.disabled,textarea:disabled{background:rgba(255,255,255,.5);border-color:rgba(222,222,222,.75);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);color:rgba(51,51,51,.5)}input[type=file].disabled,input[type=file]:disabled,input[type=range].disabled,input[type=range]:disabled{background:0 0;-webkit-box-shadow:none;box-shadow:none}input[type=radio].disabled,input[type=radio].disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before,input[type=checkbox].disabled,input[type=checkbox].disabled:checked:before,input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px}.wp-admin .button-cancel{padding:0 5px;line-height:2}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:none}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:right;margin-top:20px;padding-top:10px}.textright p.submit{border:none;text-align:left}table.form-table+input+input+p.submit,table.form-table+input+p.submit,table.form-table+p.submit{border-top:none;padding-top:0}#major-publishing-actions input,#minor-publishing-actions .preview,#minor-publishing-actions input{text-align:center}input.all-options,textarea.all-options{width:250px}input.large-text,textarea.large-text{width:99%}input.regular-text{width:25em}input.small-text{width:50px;padding:1px 6px}input[type=number].small-text{width:65px}input.tiny-text{width:35px}input[type=number].tiny-text{width:45px}#doaction,#doaction2,#post-query-submit{margin:1px 0 0 8px}.tablenav #changeit,.tablenav #clear-recent-list,.tablenav #delete_all,.wp-filter #delete_all{margin-top:1px}.tablenav .actions select{float:right;margin-left:6px;max-width:200px}.ie8 .tablenav .actions select{width:155px}.ie8 .tablenav .actions select#cat{width:200px}#timezone_string option{margin-right:1em}button.wp-hide-pw>.dashicons{position:relative;top:3px}#misc-publishing-actions label,.options-media-php label[for*="_size_"]{vertical-align:baseline}#misc-publishing-actions label[for=post_status]:before{content:"\f173";display:inline-block;font:400 20px/1 dashicons;speak:none;right:-1px;padding:0 0 0 5px;position:relative;top:0;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#pass1-text,.pw-weak,.show-password #pass1{display:none}#pass-strength-result{background-color:#eee;border:1px solid #ddd;color:#23282d;margin:-2px 1px 5px 5px;padding:3px 5px;text-align:center;width:25em;box-sizing:border-box;opacity:0}#pass-strength-result.short{background-color:#f1adad;border-color:#e35b5b;opacity:1}#pass-strength-result.bad{background-color:#fbc5a9;border-color:#f78b53;opacity:1}#pass-strength-result.good{background-color:#ffe399;border-color:#ffc733;opacity:1}#pass-strength-result.strong{background-color:#c1e1b9;border-color:#83c373;opacity:1}#pass1-text.short,#pass1.short{border-color:#e35b5b}#pass1-text.bad,#pass1.bad{border-color:#f78b53}#pass1-text.good,#pass1.good{border-color:#ffc733}#pass1-text.strong,#pass1.strong{border-color:#83c373}.indicator-hint{padding-top:8px}.show-password #pass1-text{display:inline-block}.form-table span.description.important{font-size:12px}p.search-box{float:left;margin:0}.network-admin.themes-php p.search-box{clear:right}.search-box input[name="s"],.tablenav .search-plugins input[name="s"],.tagsdiv .newtag{float:right;height:28px;margin:0 0 0 4px}input[type=text].ui-autocomplete-loading,input[type=email].ui-autocomplete-loading{background-image:url(../images/loading.gif);background-repeat:no-repeat;background-position:left center;visibility:visible}input.ui-autocomplete-input.open{border-bottom-color:transparent}ul#add-to-blog-users{margin:0 14px 0 0}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:right}.ui-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}.form-table{border-collapse:collapse;margin-top:.5em;width:100%;clear:both}.form-table,.form-table td,.form-table td p,.form-table th,.form-wrap label{font-size:14px}.form-table td{margin-bottom:9px;padding:15px 10px;line-height:1.3;vertical-align:middle}.form-table th,.form-wrap label{color:#23282d;font-weight:400;text-shadow:none;vertical-align:baseline}.form-table th{vertical-align:top;text-align:right;padding:20px 0 20px 10px;width:200px;line-height:1.3;font-weight:600}.form-table th.th-full{width:auto;font-weight:400}.form-table td p{margin-top:4px;margin-bottom:0}.form-table .date-time-doc{margin-top:1em}.form-table p.timezone-info{margin:1em 0}.form-table td fieldset label{margin:.25em 0 .5em!important;display:inline-block}.form-table td fieldset label,.form-table td fieldset li,.form-table td fieldset p{line-height:1.4em}.form-table input.tog,.form-table input[type=radio]{margin-top:-4px;margin-left:4px;float:none}.form-table .pre{padding:8px;margin:0}table.form-table td .updated{font-size:13px}table.form-table td .updated p{font-size:13px;margin:.3em 0}#profile-page .form-table textarea{width:500px;margin-bottom:6px}#profile-page .form-table #rich_editing{margin-left:5px}#your-profile legend{font-size:22px}#display_name{width:15em}#adduser .form-field input,#createuser .form-field input{width:25em}.color-option{display:inline-block;width:24%;padding:5px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:3px;cursor:pointer}.color-option.selected,.color-option:hover{background:#ddd}.color-palette{width:100%;border-spacing:0;border-collapse:collapse}.color-palette td{height:20px;padding:0;border:none}.tool-box .title{margin:8px 0;font-size:18px;font-weight:400;line-height:24px}.label-responsive{vertical-align:middle}#export-filters p{margin:0 0 1em}#export-filters p.submit{margin:7px 0 5px}.card{position:relative;margin-top:20px;padding:.7em 2em 1em;min-width:255px;max-width:520px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff}.pressthis h4{margin:2em 0 1em}.pressthis textarea{width:100%;font-size:1em}.pressthis-bookmarklet-wrapper{margin:20px 0 8px;vertical-align:top;position:relative;z-index:1}.pressthis-bookmarklet,.pressthis-bookmarklet:active,.pressthis-bookmarklet:focus,.pressthis-bookmarklet:hover{display:inline-block;position:relative;cursor:move;color:#32373c;background:#e5e5e5;-webkit-border-radius:5px;border-radius:5px;border:1px solid #b4b9be;font-style:normal;line-height:16px;font-size:14px;text-decoration:none}.pressthis-bookmarklet:active{outline:0}.pressthis-bookmarklet:after{content:"";width:70%;height:55%;z-index:-1;position:absolute;left:10px;bottom:9px;background:0 0;-webkit-transform:skew(-20deg) rotate(-6deg);-ms-transform:skew(-20deg) rotate(-6deg);transform:skew(-20deg) rotate(-6deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.6);box-shadow:0 10px 8px rgba(0,0,0,.6)}.pressthis-bookmarklet:hover:after{-webkit-transform:skew(-20deg) rotate(-9deg);-ms-transform:skew(-20deg) rotate(-9deg);transform:skew(-20deg) rotate(-9deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.7);box-shadow:0 10px 8px rgba(0,0,0,.7)}.pressthis-bookmarklet span{display:inline-block;margin:0;padding:0 9px 8px 12px}.pressthis-bookmarklet span:before{color:#72777c;font:400 20px/1 dashicons;content:"\f157";position:relative;display:inline-block;top:4px;margin-left:4px}.pressthis-js-toggle,.pressthis-js-toggle.button.button{margin-right:10px;padding:0;height:auto;vertical-align:top}.pressthis-js-toggle .dashicons{margin:5px 7px 6px 8px;color:#555d66}.timezone-info code{white-space:nowrap}.defaultavatarpicker .avatar{margin:2px 0;vertical-align:middle}.options-general-php .date-time-text{display:inline-block;min-width:10em}.options-general-php input.small-text{width:56px}.options-general-php .spinner{float:none;margin:0 3px}.options-general-php .language-install-spinner,.settings-php .language-install-spinner{display:inline-block;float:none;margin:-3px 5px 0;vertical-align:middle}.setup-php textarea{max-width:100%}.form-field #site-address{max-width:25em}.form-field #domain{max-width:22em}.form-field #admin-email,.form-field #blog_last_updated,.form-field #blog_registered,.form-field #path,.form-field #site-title{max-width:25em}.form-field #path{margin-bottom:5px}#search-sites,#search-users{max-width:100%}.request-filesystem-credentials-dialog{display:none}.request-filesystem-credentials-dialog .notification-dialog{top:15%;max-height:85%}.request-filesystem-credentials-dialog-content{margin:25px}#request-filesystem-credentials-title{font-size:1.3em;margin:1em 0}.request-filesystem-credentials-form legend{font-size:1em;padding:1.33em 0;font-weight:600}.request-filesystem-credentials-form input[type=text],.request-filesystem-credentials-form input[type=password]{display:block}.request-filesystem-credentials-dialog input[type=text],.request-filesystem-credentials-dialog input[type=password]{width:100%}.request-filesystem-credentials-form .field-title{font-weight:600}.request-filesystem-credentials-dialog label[for=hostname],.request-filesystem-credentials-dialog label[for=public_key],.request-filesystem-credentials-dialog label[for=private_key]{display:block;margin-bottom:1em}.request-filesystem-credentials-dialog .ftp-password,.request-filesystem-credentials-dialog .ftp-username{float:right;width:48%}.request-filesystem-credentials-dialog .ftp-password{margin-right:4%}.request-filesystem-credentials-dialog .request-filesystem-credentials-action-buttons{text-align:left}.request-filesystem-credentials-dialog label[for=ftp]{margin-left:10px}#request-filesystem-credentials-dialog .button:not(:last-child){margin-left:10px}#request-filesystem-credentials-form .cancel-button{display:none}#request-filesystem-credentials-dialog .cancel-button{display:inline}@media screen and (max-width:782px){textarea{-webkit-appearance:none}input[type=text],input[type=search],input[type=password],input[type=email],input[type=number]{-webkit-appearance:none;padding:6px 10px}input[type=number]{height:40px}input.code{padding-bottom:5px;padding-top:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox],input[type=checkbox]{-webkit-appearance:none;padding:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox]{margin-bottom:8px}.widefat tfoot td input[type=checkbox]:before,.widefat th input[type=checkbox]:before,.widefat thead td input[type=checkbox]:before,input[type=checkbox]:checked:before{font:400 30px/1 dashicons;margin:-3px -5px}input[type=radio],input[type=checkbox]{height:25px;width:25px}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox]{margin-top:-3px}input[type=radio]:checked:before{vertical-align:middle;width:9px;height:9px;margin:7px;line-height:16px}.wp-upload-form input[type=submit]{margin-top:10px}#wpbody select{height:36px;font-size:16px}.wp-admin .button-cancel{padding:0;font-size:14px}#adduser .form-field input,#createuser .form-field input{width:100%}.form-table{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table td,.form-table th,.label-responsive{display:block;width:auto;vertical-align:middle}.label-responsive{margin:.5em 0}.export-filters li{margin-bottom:0}.form-table .color-palette td{display:table-cell;width:15px}.form-table table.color-palette{margin-left:10px}input,textarea{font-size:16px}#profile-page .form-table textarea,.form-table span.description,.form-table td input[type=text],.form-table td input[type=password],.form-table td input[type=email],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table .form-required.form-invalid td:after{float:left;margin:-30px 0 0 3px}#wpbody .form-table td select{height:40px}.form-table input[type=text].small-text,input[type=text].small-text,input[type=search].small-text,input[type=password].small-text,input[type=number].small-text{width:auto;max-width:55px;display:inline;padding:3px 6px;margin:0 3px}#pass-strength-result{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:8px}p.search-box{float:none;position:absolute;bottom:0;width:98%;height:90px;margin-bottom:20px}p.search-box input[name="s"]{height:auto;float:none;width:100%;margin-bottom:10px;vertical-align:middle;-webkit-appearance:none}p.search-box input[type=submit]{margin-bottom:10px}.form-table span.description{display:inline;padding:4px 0 0;line-height:1.4em;font-size:14px}.form-table th{padding-top:10px;padding-bottom:0;border-bottom:0}.form-table td{margin-bottom:0;padding-bottom:6px;padding-top:4px;padding-right:0}.form-table.permalink-structure td code{margin-right:32px}.form-table.permalink-structure td input[type=text]{margin-right:32px;margin-top:4px;width:96%}.form-table input.regular-text{width:100%}.form-table label{font-size:14px}.form-table fieldset label{display:block}#local-time,#utc-time{display:block;float:none;margin-top:.5em}.form-field #domain{max-width:none}.wp-pwd{position:relative}.wp-pwd [type=text],.wp-pwd [type=password]{padding-left:40px}.wp-pwd button.button{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;line-height:2;margin:0;padding:5px 10px;position:absolute;left:0;top:0}.wp-pwd button.button:active,.wp-pwd button.button:focus,.wp-pwd button.button:hover{background:0 0}.wp-pwd .button .text{display:none}.options-general-php input[type=text].small-text{max-width:60px;margin:0}}@media only screen and (max-width:768px){.form-field input[type=text],.form-field input[type=password],.form-field input[type=email],.form-field select,.form-field textarea{width:99%}.form-wrap .form-field{padding:0}#profile-page .form-table textarea{max-width:400px;width:auto}}@media only screen and (max-height:480px){.request-filesystem-credentials-dialog .notification-dialog{width:100%;height:100%;max-height:100%;position:fixed;top:0;margin:0;right:0}}@media screen and (max-width:600px){.color-option{width:49%}}@media only screen and (max-width:320px){.options-general-php .date-time-text.date-time-custom-text{min-width:0;margin-left:.5em}}
\ No newline at end of file
+#pass-strength-result,input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.meta-box-sortables select,p.submit{max-width:100%}#your-profile label+a,.wp-admin select,fieldset label,label{vertical-align:middle}#pressthis-code-wrap,textarea{overflow:auto}input,textarea{box-sizing:border-box}input[type=text],input[type=search],input[type=radio],input[type=tel],input[type=time],input[type=url],input[type=week],input[type=password],input[type=checkbox],input[type=color],input[type=date],input[type=datetime],input[type=datetime-local],input[type=email],input[type=month],input[type=number],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out}input[type=text]:focus,input[type=search]:focus,input[type=radio]:focus,input[type=tel]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=password]:focus,input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[type=url],input[type=email]{direction:ltr}input[type=number]{height:28px;line-height:1}input[type=radio],input[type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#82878c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#00a0d2}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-left:4px;line-height:10px}input[type=radio]:checked:before,input[type=checkbox]:checked:before{float:right;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:"\f147";margin:-3px -4px 0 0;color:#1e8cbe}input[type=radio]:checked:before{content:"\2022";text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}@-moz-document url-prefix(){.form-table input.tog,input[type=radio],input[type=checkbox]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;-webkit-border-radius:0;border-radius:0}textarea{padding:2px 6px;line-height:1.4;resize:vertical}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input.readonly,input[readonly],textarea.readonly,textarea[readonly]{background-color:#eee}::-webkit-input-placeholder{color:#72777c}::-moz-placeholder{color:#72777c;opacity:1}:-ms-input-placeholder{color:#72777c}.form-invalid input,.form-invalid input:focus,.form-invalid select,.form-invalid select:focus{border-color:#dc3232!important;-webkit-box-shadow:0 0 2px rgba(204,0,0,.8);box-shadow:0 0 2px rgba(204,0,0,.8)}.form-table .form-required.form-invalid td:after{content:"\f534";font:400 20px/1 dashicons;color:#dc3232;margin-right:-25px;vertical-align:middle}.form-table .form-required.user-pass1-wrap.form-invalid td:after{content:''}.form-table .form-required.user-pass1-wrap.form-invalid .password-input-wrapper:after{content:'\f534';font:400 20px/1 dashicons;color:#dc3232;margin:0 -29px 0 6px;vertical-align:middle}.form-input-tip{color:#666}input.disabled,input:disabled,select.disabled,select:disabled,textarea.disabled,textarea:disabled{background:rgba(255,255,255,.5);border-color:rgba(222,222,222,.75);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);color:rgba(51,51,51,.5)}input[type=file].disabled,input[type=file]:disabled,input[type=range].disabled,input[type=range]:disabled{background:0 0;-webkit-box-shadow:none;box-shadow:none}input[type=radio].disabled,input[type=radio].disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before,input[type=checkbox].disabled,input[type=checkbox].disabled:checked:before,input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px}.wp-admin .button-cancel{padding:0 5px;line-height:2}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:none}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:right;margin-top:20px;padding-top:10px}.textright p.submit{border:none;text-align:left}table.form-table+input+input+p.submit,table.form-table+input+p.submit,table.form-table+p.submit{border-top:none;padding-top:0}#major-publishing-actions input,#minor-publishing-actions .preview,#minor-publishing-actions input{text-align:center}input.all-options,textarea.all-options{width:250px}input.large-text,textarea.large-text{width:99%}input.regular-text{width:25em}input.small-text{width:50px;padding:1px 6px}input[type=number].small-text{width:65px}input.tiny-text{width:35px}input[type=number].tiny-text{width:45px}#doaction,#doaction2,#post-query-submit{margin:1px 0 0 8px}.tablenav #changeit,.tablenav #clear-recent-list,.tablenav #delete_all,.wp-filter #delete_all{margin-top:1px}.tablenav .actions select{float:right;margin-left:6px;max-width:200px}.ie8 .tablenav .actions select{width:155px}.ie8 .tablenav .actions select#cat{width:200px}#timezone_string option{margin-right:1em}button.wp-hide-pw>.dashicons{position:relative;top:3px}#misc-publishing-actions label,.options-media-php label[for*="_size_"]{vertical-align:baseline}#misc-publishing-actions label[for=post_status]:before{content:"\f173";display:inline-block;font:400 20px/1 dashicons;speak:none;right:-1px;padding:0 0 0 5px;position:relative;top:0;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#pass1-text,.pw-weak,.show-password #pass1{display:none}#pass-strength-result{background-color:#eee;border:1px solid #ddd;color:#23282d;margin:-2px 1px 5px 5px;padding:3px 5px;text-align:center;width:25em;box-sizing:border-box;opacity:0}#pass-strength-result.short{background-color:#f1adad;border-color:#e35b5b;opacity:1}#pass-strength-result.bad{background-color:#fbc5a9;border-color:#f78b53;opacity:1}#pass-strength-result.good{background-color:#ffe399;border-color:#ffc733;opacity:1}#pass-strength-result.strong{background-color:#c1e1b9;border-color:#83c373;opacity:1}#pass1-text.short,#pass1.short{border-color:#e35b5b}#pass1-text.bad,#pass1.bad{border-color:#f78b53}#pass1-text.good,#pass1.good{border-color:#ffc733}#pass1-text.strong,#pass1.strong{border-color:#83c373}.indicator-hint{padding-top:8px}.show-password #pass1-text{display:inline-block}.form-table span.description.important{font-size:12px}p.search-box{float:left;margin:0}.network-admin.themes-php p.search-box{clear:right}.search-box input[name="s"],.tablenav .search-plugins input[name="s"],.tagsdiv .newtag{float:right;height:28px;margin:0 0 0 4px}.js.plugins-php .search-box .wp-filter-search{margin:0;width:280px;font-size:16px;font-weight:300;line-height:1.5;padding:3px 5px;height:32px}input[type=text].ui-autocomplete-loading,input[type=email].ui-autocomplete-loading{background-image:url(../images/loading.gif);background-repeat:no-repeat;background-position:left center;visibility:visible}input.ui-autocomplete-input.open{border-bottom-color:transparent}ul#add-to-blog-users{margin:0 14px 0 0}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:right}.ui-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}.form-table{border-collapse:collapse;margin-top:.5em;width:100%;clear:both}.form-table,.form-table td,.form-table td p,.form-table th{font-size:14px}.form-table td{margin-bottom:9px;padding:15px 10px;line-height:1.3;vertical-align:middle}.form-table th,.form-wrap label{color:#23282d;font-weight:400;text-shadow:none;vertical-align:baseline}.form-table th{vertical-align:top;text-align:right;padding:20px 0 20px 10px;width:200px;line-height:1.3;font-weight:600}.form-table th.th-full{width:auto;font-weight:400}.form-table td p{margin-top:4px;margin-bottom:0}.form-table .date-time-doc{margin-top:1em}.form-table p.timezone-info{margin:1em 0}.form-table td fieldset label{margin:.25em 0 .5em!important;display:inline-block}.form-table td fieldset label,.form-table td fieldset li,.form-table td fieldset p{line-height:1.4em}.form-table input.tog,.form-table input[type=radio]{margin-top:-4px;margin-left:4px;float:none}.form-table .pre{padding:8px;margin:0}table.form-table td .updated{font-size:13px}table.form-table td .updated p{font-size:13px;margin:.3em 0}#profile-page .form-table textarea{width:500px;margin-bottom:6px}#profile-page .form-table #rich_editing{margin-left:5px}#your-profile legend{font-size:22px}#display_name{width:15em}#adduser .form-field input,#createuser .form-field input{width:25em}.color-option{display:inline-block;width:24%;padding:5px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:3px;cursor:pointer}.color-option.selected,.color-option:hover{background:#ddd}.color-palette{width:100%;border-spacing:0;border-collapse:collapse}.color-palette td{height:20px;padding:0;border:none}.tool-box .title{margin:8px 0;font-size:18px;font-weight:400;line-height:24px}.label-responsive{vertical-align:middle}#export-filters p{margin:0 0 1em}#export-filters p.submit{margin:7px 0 5px}.card{position:relative;margin-top:20px;padding:.7em 2em 1em;min-width:255px;max-width:520px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff}.pressthis h4{margin:2em 0 1em}.pressthis textarea{width:100%;font-size:1em}.pressthis-bookmarklet-wrapper{margin:20px 0 8px;vertical-align:top;position:relative;z-index:1}.pressthis-bookmarklet,.pressthis-bookmarklet:active,.pressthis-bookmarklet:focus,.pressthis-bookmarklet:hover{display:inline-block;position:relative;cursor:move;color:#32373c;background:#e5e5e5;-webkit-border-radius:5px;border-radius:5px;border:1px solid #b4b9be;font-style:normal;line-height:16px;font-size:14px;text-decoration:none}.pressthis-bookmarklet:active{outline:0}.pressthis-bookmarklet:after{content:"";width:70%;height:55%;z-index:-1;position:absolute;left:10px;bottom:9px;background:0 0;-webkit-transform:skew(-20deg) rotate(-6deg);-ms-transform:skew(-20deg) rotate(-6deg);transform:skew(-20deg) rotate(-6deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.6);box-shadow:0 10px 8px rgba(0,0,0,.6)}.pressthis-bookmarklet:hover:after{-webkit-transform:skew(-20deg) rotate(-9deg);-ms-transform:skew(-20deg) rotate(-9deg);transform:skew(-20deg) rotate(-9deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.7);box-shadow:0 10px 8px rgba(0,0,0,.7)}.pressthis-bookmarklet span{display:inline-block;margin:0;padding:0 9px 8px 12px}.pressthis-bookmarklet span:before{color:#72777c;font:400 20px/1 dashicons;content:"\f157";position:relative;display:inline-block;top:4px;margin-left:4px}.pressthis-js-toggle,.pressthis-js-toggle.button.button{margin-right:10px;padding:0;height:auto;vertical-align:top}.pressthis-js-toggle .dashicons{margin:5px 7px 6px 8px;color:#555d66}.timezone-info code{white-space:nowrap}.defaultavatarpicker .avatar{margin:2px 0;vertical-align:middle}.options-general-php .date-time-text{display:inline-block;min-width:10em}.options-general-php input.small-text{width:56px}.options-general-php .spinner{float:none;margin:0 3px}.options-general-php .language-install-spinner,.settings-php .language-install-spinner{display:inline-block;float:none;margin:-3px 5px 0;vertical-align:middle}.setup-php textarea{max-width:100%}.form-field #site-address{max-width:25em}.form-field #domain{max-width:22em}.form-field #admin-email,.form-field #blog_last_updated,.form-field #blog_registered,.form-field #path,.form-field #site-title{max-width:25em}.form-field #path{margin-bottom:5px}#search-sites,#search-users{max-width:100%}.request-filesystem-credentials-dialog{display:none}.request-filesystem-credentials-dialog .notification-dialog{top:10%;max-height:85%}.request-filesystem-credentials-dialog-content{margin:25px}#request-filesystem-credentials-title{font-size:1.3em;margin:1em 0}.request-filesystem-credentials-form legend{font-size:1em;padding:1.33em 0 0;font-weight:600}.request-filesystem-credentials-form input[type=text],.request-filesystem-credentials-form input[type=password]{display:block}.request-filesystem-credentials-dialog input[type=text],.request-filesystem-credentials-dialog input[type=password]{width:100%}.request-filesystem-credentials-form .field-title{font-weight:600}.request-filesystem-credentials-dialog label[for=hostname],.request-filesystem-credentials-dialog label[for=public_key],.request-filesystem-credentials-dialog label[for=private_key]{display:block;margin-bottom:1em}.request-filesystem-credentials-dialog .request-filesystem-credentials-action-buttons{text-align:left}.request-filesystem-credentials-dialog label[for=ftp]{margin-left:10px}.request-filesystem-credentials-dialog #auth-keys-desc{margin-bottom:0}#request-filesystem-credentials-dialog .button:not(:last-child){margin-left:10px}#request-filesystem-credentials-form .cancel-button{display:none}#request-filesystem-credentials-dialog .cancel-button{display:inline}.request-filesystem-credentials-dialog .ftp-password,.request-filesystem-credentials-dialog .ftp-username{float:none;width:auto}.request-filesystem-credentials-dialog .ftp-username{margin-bottom:1em}.request-filesystem-credentials-dialog .ftp-password{margin:0}.request-filesystem-credentials-dialog .ftp-password em{color:#888}.request-filesystem-credentials-dialog label{display:block;line-height:1.5;margin-bottom:1em}.request-filesystem-credentials-form #ssh-keys legend{font-size:1.3em}.request-filesystem-credentials-form .notice{margin:0 0 20px;clear:both}@media screen and (max-width:782px){textarea{-webkit-appearance:none}input[type=text],input[type=search],input[type=password],input[type=email],input[type=number]{-webkit-appearance:none;padding:6px 10px}input[type=number]{height:40px}input.code{padding-bottom:5px;padding-top:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox],input[type=checkbox]{-webkit-appearance:none;padding:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox]{margin-bottom:8px}.widefat tfoot td input[type=checkbox]:before,.widefat th input[type=checkbox]:before,.widefat thead td input[type=checkbox]:before,input[type=checkbox]:checked:before{font:400 30px/1 dashicons;margin:-3px -5px}input[type=radio],input[type=checkbox]{height:25px;width:25px}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox]{margin-top:-3px}input[type=radio]:checked:before{vertical-align:middle;width:9px;height:9px;margin:7px;line-height:16px}.wp-upload-form input[type=submit]{margin-top:10px}#wpbody select{height:36px;font-size:16px}.wp-admin .button-cancel{padding:0;font-size:14px}#adduser .form-field input,#createuser .form-field input{width:100%}.form-table{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table td,.form-table th,.label-responsive{display:block;width:auto;vertical-align:middle}.label-responsive{margin:.5em 0}.export-filters li{margin-bottom:0}.form-table .color-palette td{display:table-cell;width:15px}.form-table table.color-palette{margin-left:10px}input,textarea{font-size:16px}#profile-page .form-table textarea,.form-table span.description,.form-table td input[type=text],.form-table td input[type=password],.form-table td input[type=email],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table .form-required.form-invalid td:after{float:left;margin:-30px 0 0 3px}#wpbody .form-table td select{height:40px}.form-table input[type=text].small-text,input[type=text].small-text,input[type=search].small-text,input[type=password].small-text,input[type=number].small-text{width:auto;max-width:55px;display:inline;padding:3px 6px;margin:0 3px}#pass-strength-result{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:8px}p.search-box{float:none;position:absolute;bottom:0;width:98%;height:90px;margin-bottom:20px}p.search-box input[name="s"]{height:auto;float:none;width:100%;margin-bottom:10px;vertical-align:middle;-webkit-appearance:none}p.search-box input[type=submit]{margin-bottom:10px}.form-table span.description{display:inline;padding:4px 0 0;line-height:1.4em;font-size:14px}.form-table th{padding-top:10px;padding-bottom:0;border-bottom:0}.form-table td{margin-bottom:0;padding-bottom:6px;padding-top:4px;padding-right:0}.form-table.permalink-structure td code{margin-right:32px}.form-table.permalink-structure td input[type=text]{margin-right:32px;margin-top:4px;width:96%}.form-table input.regular-text{width:100%}.form-table label{font-size:14px}.form-table fieldset label{display:block}#local-time,#utc-time{display:block;float:none;margin-top:.5em}.form-field #domain{max-width:none}.wp-pwd{position:relative}.wp-pwd [type=text],.wp-pwd [type=password]{padding-left:40px}.wp-pwd button.button{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;line-height:2;margin:0;padding:5px 10px;position:absolute;left:0;top:0}.wp-pwd button.button:active,.wp-pwd button.button:focus,.wp-pwd button.button:hover{background:0 0}.wp-pwd .button .text{display:none}.options-general-php input[type=text].small-text{max-width:60px;margin:0}}@media only screen and (max-width:768px){.form-field input[type=text],.form-field input[type=password],.form-field input[type=email],.form-field select,.form-field textarea{width:99%}.form-wrap .form-field{padding:0}#profile-page .form-table textarea{max-width:400px;width:auto}}@media only screen and (max-height:480px){.request-filesystem-credentials-dialog .notification-dialog{width:100%;height:100%;max-height:100%;position:fixed;top:0;margin:0;right:0}}@media screen and (max-width:600px){.color-option{width:49%}}@media only screen and (max-width:320px){.options-general-php .date-time-text.date-time-custom-text{min-width:0;margin-left:.5em}}
\ No newline at end of file
index 73aa0057d33eb69d3a9f55991f4cffb1e5d1ca0d..15be606f8edeaa497a63d65ab6b1f5579a077b12 100644 (file)
@@ -16,7 +16,6 @@ input[type="datetime-local"],
 input[type="email"],
 input[type="month"],
 input[type="number"],
-input[type="password"],
 input[type="search"],
 input[type="radio"],
 input[type="tel"],
@@ -45,7 +44,6 @@ input[type="datetime-local"]:focus,
 input[type="email"]:focus,
 input[type="month"]:focus,
 input[type="number"]:focus,
-input[type="password"]:focus,
 input[type="search"]:focus,
 input[type="tel"]:focus,
 input[type="text"]:focus,
@@ -70,7 +68,7 @@ input[type="url"] {
 /* Vertically align the number selector with the input. */
 input[type="number"] {
        height: 28px;
-       line-height: inherit;
+       line-height: 1;
 }
 
 input[type="checkbox"],
@@ -566,6 +564,16 @@ p.search-box {
        margin: 0 4px 0 0;
 }
 
+.js.plugins-php .search-box .wp-filter-search {
+       margin: 0;
+       width: 280px;
+       font-size: 16px;
+       font-weight: 300;
+       line-height: 1.5;
+       padding: 3px 5px;
+       height: 32px;
+}
+
 input[type="text"].ui-autocomplete-loading,
 input[type="email"].ui-autocomplete-loading {
        background-image: url(../images/loading.gif);
@@ -620,8 +628,7 @@ ul#add-to-blog-users {
 .form-table,
 .form-table td,
 .form-table th,
-.form-table td p,
-.form-wrap label {
+.form-table td p {
        font-size: 14px;
 }
 
@@ -635,7 +642,7 @@ ul#add-to-blog-users {
 .form-table th,
 .form-wrap label {
        color: #23282d;
-       font-weight: normal;
+       font-weight: 400;
        text-shadow: none;
        vertical-align: baseline;
 }
@@ -762,7 +769,7 @@ table.form-table td .updated p {
 .tool-box .title {
        margin: 8px 0;
        font-size: 18px;
-       font-weight: normal;
+       font-weight: 400;
        line-height: 24px;
 }
 
@@ -973,7 +980,7 @@ table.form-table td .updated p {
 }
 
 .request-filesystem-credentials-dialog .notification-dialog {
-       top: 15%;
+       top: 10%;
        max-height: 85%;
 }
 
@@ -1031,6 +1038,10 @@ table.form-table td .updated p {
        margin-right: 10px;
 }
 
+.request-filesystem-credentials-dialog #auth-keys-desc {
+       margin-bottom: 0;
+}
+
 #request-filesystem-credentials-dialog .button:not(:last-child) {
        margin-right: 10px;
 }
@@ -1043,6 +1054,43 @@ table.form-table td .updated p {
        display: inline;
 }
 
+.request-filesystem-credentials-dialog .ftp-username,
+.request-filesystem-credentials-dialog .ftp-password {
+       float: none;
+       width: auto;
+}
+
+.request-filesystem-credentials-dialog .ftp-username {
+       margin-bottom: 1em;
+}
+
+.request-filesystem-credentials-dialog .ftp-password {
+       margin: 0;
+}
+
+.request-filesystem-credentials-dialog .ftp-password em {
+       color: #888;
+}
+
+.request-filesystem-credentials-dialog label {
+       display: block;
+       line-height: 1.5;
+       margin-bottom: 1em;
+}
+
+.request-filesystem-credentials-form legend {
+       padding-bottom: 0;
+}
+
+.request-filesystem-credentials-form #ssh-keys legend {
+       font-size: 1.3em;
+}
+
+.request-filesystem-credentials-form .notice {
+       margin: 0 0 20px 0;
+       clear: both;
+}
+
 
 /* =Media Queries
 -------------------------------------------------------------- */
index 2b3b0f6f1703ac332862aab2a613670892e3892b..12ee61b448870428de008ae9e86d8881d4e7049c 100644 (file)
@@ -1 +1 @@
-#pass-strength-result,input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.meta-box-sortables select,p.submit{max-width:100%}#your-profile label+a,.wp-admin select,fieldset label,label{vertical-align:middle}#pressthis-code-wrap,textarea{overflow:auto}input,textarea{box-sizing:border-box}input[type=text],input[type=search],input[type=radio],input[type=tel],input[type=time],input[type=url],input[type=week],input[type=password],input[type=checkbox],input[type=color],input[type=date],input[type=datetime],input[type=datetime-local],input[type=email],input[type=month],input[type=number],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out}input[type=text]:focus,input[type=search]:focus,input[type=radio]:focus,input[type=tel]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=password]:focus,input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[type=url],input[type=email]{direction:ltr}input[type=number]{height:28px;line-height:inherit}input[type=radio],input[type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#82878c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#00a0d2}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-right:4px;line-height:10px}input[type=radio]:checked:before,input[type=checkbox]:checked:before{float:left;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:"\f147";margin:-3px 0 0 -4px;color:#1e8cbe}input[type=radio]:checked:before{content:"\2022";text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}@-moz-document url-prefix(){.form-table input.tog,input[type=radio],input[type=checkbox]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;-webkit-border-radius:0;border-radius:0}textarea{padding:2px 6px;line-height:1.4;resize:vertical}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input.readonly,input[readonly],textarea.readonly,textarea[readonly]{background-color:#eee}::-webkit-input-placeholder{color:#72777c}::-moz-placeholder{color:#72777c;opacity:1}:-ms-input-placeholder{color:#72777c}.form-invalid input,.form-invalid input:focus,.form-invalid select,.form-invalid select:focus{border-color:#dc3232!important;-webkit-box-shadow:0 0 2px rgba(204,0,0,.8);box-shadow:0 0 2px rgba(204,0,0,.8)}.form-table .form-required.form-invalid td:after{content:"\f534";font:400 20px/1 dashicons;color:#dc3232;margin-left:-25px;vertical-align:middle}.form-table .form-required.user-pass1-wrap.form-invalid td:after{content:''}.form-table .form-required.user-pass1-wrap.form-invalid .password-input-wrapper:after{content:'\f534';font:400 20px/1 dashicons;color:#dc3232;margin:0 6px 0 -29px;vertical-align:middle}.form-input-tip{color:#666}input.disabled,input:disabled,select.disabled,select:disabled,textarea.disabled,textarea:disabled{background:rgba(255,255,255,.5);border-color:rgba(222,222,222,.75);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);color:rgba(51,51,51,.5)}input[type=file].disabled,input[type=file]:disabled,input[type=range].disabled,input[type=range]:disabled{background:0 0;-webkit-box-shadow:none;box-shadow:none}input[type=radio].disabled,input[type=radio].disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before,input[type=checkbox].disabled,input[type=checkbox].disabled:checked:before,input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px}.wp-admin .button-cancel{padding:0 5px;line-height:2}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;border:none}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:left;margin-top:20px;padding-top:10px}.textright p.submit{border:none;text-align:right}table.form-table+input+input+p.submit,table.form-table+input+p.submit,table.form-table+p.submit{border-top:none;padding-top:0}#major-publishing-actions input,#minor-publishing-actions .preview,#minor-publishing-actions input{text-align:center}input.all-options,textarea.all-options{width:250px}input.large-text,textarea.large-text{width:99%}input.regular-text{width:25em}input.small-text{width:50px;padding:1px 6px}input[type=number].small-text{width:65px}input.tiny-text{width:35px}input[type=number].tiny-text{width:45px}#doaction,#doaction2,#post-query-submit{margin:1px 8px 0 0}.tablenav #changeit,.tablenav #clear-recent-list,.tablenav #delete_all,.wp-filter #delete_all{margin-top:1px}.tablenav .actions select{float:left;margin-right:6px;max-width:200px}.ie8 .tablenav .actions select{width:155px}.ie8 .tablenav .actions select#cat{width:200px}#timezone_string option{margin-left:1em}button.wp-hide-pw>.dashicons{position:relative;top:3px}#misc-publishing-actions label,.options-media-php label[for*="_size_"]{vertical-align:baseline}#misc-publishing-actions label[for=post_status]:before{content:"\f173";display:inline-block;font:400 20px/1 dashicons;speak:none;left:-1px;padding:0 5px 0 0;position:relative;top:0;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#pass1-text,.pw-weak,.show-password #pass1{display:none}#pass-strength-result{background-color:#eee;border:1px solid #ddd;color:#23282d;margin:-2px 5px 5px 1px;padding:3px 5px;text-align:center;width:25em;box-sizing:border-box;opacity:0}#pass-strength-result.short{background-color:#f1adad;border-color:#e35b5b;opacity:1}#pass-strength-result.bad{background-color:#fbc5a9;border-color:#f78b53;opacity:1}#pass-strength-result.good{background-color:#ffe399;border-color:#ffc733;opacity:1}#pass-strength-result.strong{background-color:#c1e1b9;border-color:#83c373;opacity:1}#pass1-text.short,#pass1.short{border-color:#e35b5b}#pass1-text.bad,#pass1.bad{border-color:#f78b53}#pass1-text.good,#pass1.good{border-color:#ffc733}#pass1-text.strong,#pass1.strong{border-color:#83c373}.indicator-hint{padding-top:8px}.show-password #pass1-text{display:inline-block}.form-table span.description.important{font-size:12px}p.search-box{float:right;margin:0}.network-admin.themes-php p.search-box{clear:left}.search-box input[name="s"],.tablenav .search-plugins input[name="s"],.tagsdiv .newtag{float:left;height:28px;margin:0 4px 0 0}input[type=text].ui-autocomplete-loading,input[type=email].ui-autocomplete-loading{background-image:url(../images/loading.gif);background-repeat:no-repeat;background-position:right center;visibility:visible}input.ui-autocomplete-input.open{border-bottom-color:transparent}ul#add-to-blog-users{margin:0 0 0 14px}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:left}.ui-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}.form-table{border-collapse:collapse;margin-top:.5em;width:100%;clear:both}.form-table,.form-table td,.form-table td p,.form-table th,.form-wrap label{font-size:14px}.form-table td{margin-bottom:9px;padding:15px 10px;line-height:1.3;vertical-align:middle}.form-table th,.form-wrap label{color:#23282d;font-weight:400;text-shadow:none;vertical-align:baseline}.form-table th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;width:200px;line-height:1.3;font-weight:600}.form-table th.th-full{width:auto;font-weight:400}.form-table td p{margin-top:4px;margin-bottom:0}.form-table .date-time-doc{margin-top:1em}.form-table p.timezone-info{margin:1em 0}.form-table td fieldset label{margin:.25em 0 .5em!important;display:inline-block}.form-table td fieldset label,.form-table td fieldset li,.form-table td fieldset p{line-height:1.4em}.form-table input.tog,.form-table input[type=radio]{margin-top:-4px;margin-right:4px;float:none}.form-table .pre{padding:8px;margin:0}table.form-table td .updated{font-size:13px}table.form-table td .updated p{font-size:13px;margin:.3em 0}#profile-page .form-table textarea{width:500px;margin-bottom:6px}#profile-page .form-table #rich_editing{margin-right:5px}#your-profile legend{font-size:22px}#display_name{width:15em}#adduser .form-field input,#createuser .form-field input{width:25em}.color-option{display:inline-block;width:24%;padding:5px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:3px;cursor:pointer}.color-option.selected,.color-option:hover{background:#ddd}.color-palette{width:100%;border-spacing:0;border-collapse:collapse}.color-palette td{height:20px;padding:0;border:none}.tool-box .title{margin:8px 0;font-size:18px;font-weight:400;line-height:24px}.label-responsive{vertical-align:middle}#export-filters p{margin:0 0 1em}#export-filters p.submit{margin:7px 0 5px}.card{position:relative;margin-top:20px;padding:.7em 2em 1em;min-width:255px;max-width:520px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff}.pressthis h4{margin:2em 0 1em}.pressthis textarea{width:100%;font-size:1em}.pressthis-bookmarklet-wrapper{margin:20px 0 8px;vertical-align:top;position:relative;z-index:1}.pressthis-bookmarklet,.pressthis-bookmarklet:active,.pressthis-bookmarklet:focus,.pressthis-bookmarklet:hover{display:inline-block;position:relative;cursor:move;color:#32373c;background:#e5e5e5;-webkit-border-radius:5px;border-radius:5px;border:1px solid #b4b9be;font-style:normal;line-height:16px;font-size:14px;text-decoration:none}.pressthis-bookmarklet:active{outline:0}.pressthis-bookmarklet:after{content:"";width:70%;height:55%;z-index:-1;position:absolute;right:10px;bottom:9px;background:0 0;-webkit-transform:skew(20deg) rotate(6deg);-ms-transform:skew(20deg) rotate(6deg);transform:skew(20deg) rotate(6deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.6);box-shadow:0 10px 8px rgba(0,0,0,.6)}.pressthis-bookmarklet:hover:after{-webkit-transform:skew(20deg) rotate(9deg);-ms-transform:skew(20deg) rotate(9deg);transform:skew(20deg) rotate(9deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.7);box-shadow:0 10px 8px rgba(0,0,0,.7)}.pressthis-bookmarklet span{display:inline-block;margin:0;padding:0 12px 8px 9px}.pressthis-bookmarklet span:before{color:#72777c;font:400 20px/1 dashicons;content:"\f157";position:relative;display:inline-block;top:4px;margin-right:4px}.pressthis-js-toggle,.pressthis-js-toggle.button.button{margin-left:10px;padding:0;height:auto;vertical-align:top}.pressthis-js-toggle .dashicons{margin:5px 8px 6px 7px;color:#555d66}.timezone-info code{white-space:nowrap}.defaultavatarpicker .avatar{margin:2px 0;vertical-align:middle}.options-general-php .date-time-text{display:inline-block;min-width:10em}.options-general-php input.small-text{width:56px}.options-general-php .spinner{float:none;margin:0 3px}.options-general-php .language-install-spinner,.settings-php .language-install-spinner{display:inline-block;float:none;margin:-3px 5px 0;vertical-align:middle}.setup-php textarea{max-width:100%}.form-field #site-address{max-width:25em}.form-field #domain{max-width:22em}.form-field #admin-email,.form-field #blog_last_updated,.form-field #blog_registered,.form-field #path,.form-field #site-title{max-width:25em}.form-field #path{margin-bottom:5px}#search-sites,#search-users{max-width:100%}.request-filesystem-credentials-dialog{display:none}.request-filesystem-credentials-dialog .notification-dialog{top:15%;max-height:85%}.request-filesystem-credentials-dialog-content{margin:25px}#request-filesystem-credentials-title{font-size:1.3em;margin:1em 0}.request-filesystem-credentials-form legend{font-size:1em;padding:1.33em 0;font-weight:600}.request-filesystem-credentials-form input[type=text],.request-filesystem-credentials-form input[type=password]{display:block}.request-filesystem-credentials-dialog input[type=text],.request-filesystem-credentials-dialog input[type=password]{width:100%}.request-filesystem-credentials-form .field-title{font-weight:600}.request-filesystem-credentials-dialog label[for=hostname],.request-filesystem-credentials-dialog label[for=public_key],.request-filesystem-credentials-dialog label[for=private_key]{display:block;margin-bottom:1em}.request-filesystem-credentials-dialog .ftp-password,.request-filesystem-credentials-dialog .ftp-username{float:left;width:48%}.request-filesystem-credentials-dialog .ftp-password{margin-left:4%}.request-filesystem-credentials-dialog .request-filesystem-credentials-action-buttons{text-align:right}.request-filesystem-credentials-dialog label[for=ftp]{margin-right:10px}#request-filesystem-credentials-dialog .button:not(:last-child){margin-right:10px}#request-filesystem-credentials-form .cancel-button{display:none}#request-filesystem-credentials-dialog .cancel-button{display:inline}@media screen and (max-width:782px){textarea{-webkit-appearance:none}input[type=text],input[type=search],input[type=password],input[type=email],input[type=number]{-webkit-appearance:none;padding:6px 10px}input[type=number]{height:40px}input.code{padding-bottom:5px;padding-top:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox],input[type=checkbox]{-webkit-appearance:none;padding:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox]{margin-bottom:8px}.widefat tfoot td input[type=checkbox]:before,.widefat th input[type=checkbox]:before,.widefat thead td input[type=checkbox]:before,input[type=checkbox]:checked:before{font:400 30px/1 dashicons;margin:-3px -5px}input[type=radio],input[type=checkbox]{height:25px;width:25px}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox]{margin-top:-3px}input[type=radio]:checked:before{vertical-align:middle;width:9px;height:9px;margin:7px;line-height:16px}.wp-upload-form input[type=submit]{margin-top:10px}#wpbody select{height:36px;font-size:16px}.wp-admin .button-cancel{padding:0;font-size:14px}#adduser .form-field input,#createuser .form-field input{width:100%}.form-table{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table td,.form-table th,.label-responsive{display:block;width:auto;vertical-align:middle}.label-responsive{margin:.5em 0}.export-filters li{margin-bottom:0}.form-table .color-palette td{display:table-cell;width:15px}.form-table table.color-palette{margin-right:10px}input,textarea{font-size:16px}#profile-page .form-table textarea,.form-table span.description,.form-table td input[type=text],.form-table td input[type=password],.form-table td input[type=email],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table .form-required.form-invalid td:after{float:right;margin:-30px 3px 0 0}#wpbody .form-table td select{height:40px}.form-table input[type=text].small-text,input[type=text].small-text,input[type=search].small-text,input[type=password].small-text,input[type=number].small-text{width:auto;max-width:55px;display:inline;padding:3px 6px;margin:0 3px}#pass-strength-result{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:8px}p.search-box{float:none;position:absolute;bottom:0;width:98%;height:90px;margin-bottom:20px}p.search-box input[name="s"]{height:auto;float:none;width:100%;margin-bottom:10px;vertical-align:middle;-webkit-appearance:none}p.search-box input[type=submit]{margin-bottom:10px}.form-table span.description{display:inline;padding:4px 0 0;line-height:1.4em;font-size:14px}.form-table th{padding-top:10px;padding-bottom:0;border-bottom:0}.form-table td{margin-bottom:0;padding-bottom:6px;padding-top:4px;padding-left:0}.form-table.permalink-structure td code{margin-left:32px}.form-table.permalink-structure td input[type=text]{margin-left:32px;margin-top:4px;width:96%}.form-table input.regular-text{width:100%}.form-table label{font-size:14px}.form-table fieldset label{display:block}#local-time,#utc-time{display:block;float:none;margin-top:.5em}.form-field #domain{max-width:none}.wp-pwd{position:relative}.wp-pwd [type=text],.wp-pwd [type=password]{padding-right:40px}.wp-pwd button.button{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;line-height:2;margin:0;padding:5px 10px;position:absolute;right:0;top:0}.wp-pwd button.button:active,.wp-pwd button.button:focus,.wp-pwd button.button:hover{background:0 0}.wp-pwd .button .text{display:none}.options-general-php input[type=text].small-text{max-width:60px;margin:0}}@media only screen and (max-width:768px){.form-field input[type=text],.form-field input[type=password],.form-field input[type=email],.form-field select,.form-field textarea{width:99%}.form-wrap .form-field{padding:0}#profile-page .form-table textarea{max-width:400px;width:auto}}@media only screen and (max-height:480px){.request-filesystem-credentials-dialog .notification-dialog{width:100%;height:100%;max-height:100%;position:fixed;top:0;margin:0;left:0}}@media screen and (max-width:600px){.color-option{width:49%}}@media only screen and (max-width:320px){.options-general-php .date-time-text.date-time-custom-text{min-width:0;margin-right:.5em}}
\ No newline at end of file
+#pass-strength-result,input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.meta-box-sortables select,p.submit{max-width:100%}#your-profile label+a,.wp-admin select,fieldset label,label{vertical-align:middle}#pressthis-code-wrap,textarea{overflow:auto}input,textarea{box-sizing:border-box}input[type=text],input[type=search],input[type=radio],input[type=tel],input[type=time],input[type=url],input[type=week],input[type=password],input[type=checkbox],input[type=color],input[type=date],input[type=datetime],input[type=datetime-local],input[type=email],input[type=month],input[type=number],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out}input[type=text]:focus,input[type=search]:focus,input[type=radio]:focus,input[type=tel]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=password]:focus,input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[type=url],input[type=email]{direction:ltr}input[type=number]{height:28px;line-height:1}input[type=radio],input[type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#82878c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#00a0d2}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-right:4px;line-height:10px}input[type=radio]:checked:before,input[type=checkbox]:checked:before{float:left;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:"\f147";margin:-3px 0 0 -4px;color:#1e8cbe}input[type=radio]:checked:before{content:"\2022";text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}@-moz-document url-prefix(){.form-table input.tog,input[type=radio],input[type=checkbox]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;-webkit-border-radius:0;border-radius:0}textarea{padding:2px 6px;line-height:1.4;resize:vertical}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input.readonly,input[readonly],textarea.readonly,textarea[readonly]{background-color:#eee}::-webkit-input-placeholder{color:#72777c}::-moz-placeholder{color:#72777c;opacity:1}:-ms-input-placeholder{color:#72777c}.form-invalid input,.form-invalid input:focus,.form-invalid select,.form-invalid select:focus{border-color:#dc3232!important;-webkit-box-shadow:0 0 2px rgba(204,0,0,.8);box-shadow:0 0 2px rgba(204,0,0,.8)}.form-table .form-required.form-invalid td:after{content:"\f534";font:400 20px/1 dashicons;color:#dc3232;margin-left:-25px;vertical-align:middle}.form-table .form-required.user-pass1-wrap.form-invalid td:after{content:''}.form-table .form-required.user-pass1-wrap.form-invalid .password-input-wrapper:after{content:'\f534';font:400 20px/1 dashicons;color:#dc3232;margin:0 6px 0 -29px;vertical-align:middle}.form-input-tip{color:#666}input.disabled,input:disabled,select.disabled,select:disabled,textarea.disabled,textarea:disabled{background:rgba(255,255,255,.5);border-color:rgba(222,222,222,.75);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);color:rgba(51,51,51,.5)}input[type=file].disabled,input[type=file]:disabled,input[type=range].disabled,input[type=range]:disabled{background:0 0;-webkit-box-shadow:none;box-shadow:none}input[type=radio].disabled,input[type=radio].disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before,input[type=checkbox].disabled,input[type=checkbox].disabled:checked:before,input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px}.wp-admin .button-cancel{padding:0 5px;line-height:2}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;border:none}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:left;margin-top:20px;padding-top:10px}.textright p.submit{border:none;text-align:right}table.form-table+input+input+p.submit,table.form-table+input+p.submit,table.form-table+p.submit{border-top:none;padding-top:0}#major-publishing-actions input,#minor-publishing-actions .preview,#minor-publishing-actions input{text-align:center}input.all-options,textarea.all-options{width:250px}input.large-text,textarea.large-text{width:99%}input.regular-text{width:25em}input.small-text{width:50px;padding:1px 6px}input[type=number].small-text{width:65px}input.tiny-text{width:35px}input[type=number].tiny-text{width:45px}#doaction,#doaction2,#post-query-submit{margin:1px 8px 0 0}.tablenav #changeit,.tablenav #clear-recent-list,.tablenav #delete_all,.wp-filter #delete_all{margin-top:1px}.tablenav .actions select{float:left;margin-right:6px;max-width:200px}.ie8 .tablenav .actions select{width:155px}.ie8 .tablenav .actions select#cat{width:200px}#timezone_string option{margin-left:1em}button.wp-hide-pw>.dashicons{position:relative;top:3px}#misc-publishing-actions label,.options-media-php label[for*="_size_"]{vertical-align:baseline}#misc-publishing-actions label[for=post_status]:before{content:"\f173";display:inline-block;font:400 20px/1 dashicons;speak:none;left:-1px;padding:0 5px 0 0;position:relative;top:0;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#pass1-text,.pw-weak,.show-password #pass1{display:none}#pass-strength-result{background-color:#eee;border:1px solid #ddd;color:#23282d;margin:-2px 5px 5px 1px;padding:3px 5px;text-align:center;width:25em;box-sizing:border-box;opacity:0}#pass-strength-result.short{background-color:#f1adad;border-color:#e35b5b;opacity:1}#pass-strength-result.bad{background-color:#fbc5a9;border-color:#f78b53;opacity:1}#pass-strength-result.good{background-color:#ffe399;border-color:#ffc733;opacity:1}#pass-strength-result.strong{background-color:#c1e1b9;border-color:#83c373;opacity:1}#pass1-text.short,#pass1.short{border-color:#e35b5b}#pass1-text.bad,#pass1.bad{border-color:#f78b53}#pass1-text.good,#pass1.good{border-color:#ffc733}#pass1-text.strong,#pass1.strong{border-color:#83c373}.indicator-hint{padding-top:8px}.show-password #pass1-text{display:inline-block}.form-table span.description.important{font-size:12px}p.search-box{float:right;margin:0}.network-admin.themes-php p.search-box{clear:left}.search-box input[name="s"],.tablenav .search-plugins input[name="s"],.tagsdiv .newtag{float:left;height:28px;margin:0 4px 0 0}.js.plugins-php .search-box .wp-filter-search{margin:0;width:280px;font-size:16px;font-weight:300;line-height:1.5;padding:3px 5px;height:32px}input[type=text].ui-autocomplete-loading,input[type=email].ui-autocomplete-loading{background-image:url(../images/loading.gif);background-repeat:no-repeat;background-position:right center;visibility:visible}input.ui-autocomplete-input.open{border-bottom-color:transparent}ul#add-to-blog-users{margin:0 0 0 14px}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:left}.ui-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}.form-table{border-collapse:collapse;margin-top:.5em;width:100%;clear:both}.form-table,.form-table td,.form-table td p,.form-table th{font-size:14px}.form-table td{margin-bottom:9px;padding:15px 10px;line-height:1.3;vertical-align:middle}.form-table th,.form-wrap label{color:#23282d;font-weight:400;text-shadow:none;vertical-align:baseline}.form-table th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;width:200px;line-height:1.3;font-weight:600}.form-table th.th-full{width:auto;font-weight:400}.form-table td p{margin-top:4px;margin-bottom:0}.form-table .date-time-doc{margin-top:1em}.form-table p.timezone-info{margin:1em 0}.form-table td fieldset label{margin:.25em 0 .5em!important;display:inline-block}.form-table td fieldset label,.form-table td fieldset li,.form-table td fieldset p{line-height:1.4em}.form-table input.tog,.form-table input[type=radio]{margin-top:-4px;margin-right:4px;float:none}.form-table .pre{padding:8px;margin:0}table.form-table td .updated{font-size:13px}table.form-table td .updated p{font-size:13px;margin:.3em 0}#profile-page .form-table textarea{width:500px;margin-bottom:6px}#profile-page .form-table #rich_editing{margin-right:5px}#your-profile legend{font-size:22px}#display_name{width:15em}#adduser .form-field input,#createuser .form-field input{width:25em}.color-option{display:inline-block;width:24%;padding:5px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:3px;cursor:pointer}.color-option.selected,.color-option:hover{background:#ddd}.color-palette{width:100%;border-spacing:0;border-collapse:collapse}.color-palette td{height:20px;padding:0;border:none}.tool-box .title{margin:8px 0;font-size:18px;font-weight:400;line-height:24px}.label-responsive{vertical-align:middle}#export-filters p{margin:0 0 1em}#export-filters p.submit{margin:7px 0 5px}.card{position:relative;margin-top:20px;padding:.7em 2em 1em;min-width:255px;max-width:520px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff}.pressthis h4{margin:2em 0 1em}.pressthis textarea{width:100%;font-size:1em}.pressthis-bookmarklet-wrapper{margin:20px 0 8px;vertical-align:top;position:relative;z-index:1}.pressthis-bookmarklet,.pressthis-bookmarklet:active,.pressthis-bookmarklet:focus,.pressthis-bookmarklet:hover{display:inline-block;position:relative;cursor:move;color:#32373c;background:#e5e5e5;-webkit-border-radius:5px;border-radius:5px;border:1px solid #b4b9be;font-style:normal;line-height:16px;font-size:14px;text-decoration:none}.pressthis-bookmarklet:active{outline:0}.pressthis-bookmarklet:after{content:"";width:70%;height:55%;z-index:-1;position:absolute;right:10px;bottom:9px;background:0 0;-webkit-transform:skew(20deg) rotate(6deg);-ms-transform:skew(20deg) rotate(6deg);transform:skew(20deg) rotate(6deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.6);box-shadow:0 10px 8px rgba(0,0,0,.6)}.pressthis-bookmarklet:hover:after{-webkit-transform:skew(20deg) rotate(9deg);-ms-transform:skew(20deg) rotate(9deg);transform:skew(20deg) rotate(9deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.7);box-shadow:0 10px 8px rgba(0,0,0,.7)}.pressthis-bookmarklet span{display:inline-block;margin:0;padding:0 12px 8px 9px}.pressthis-bookmarklet span:before{color:#72777c;font:400 20px/1 dashicons;content:"\f157";position:relative;display:inline-block;top:4px;margin-right:4px}.pressthis-js-toggle,.pressthis-js-toggle.button.button{margin-left:10px;padding:0;height:auto;vertical-align:top}.pressthis-js-toggle .dashicons{margin:5px 8px 6px 7px;color:#555d66}.timezone-info code{white-space:nowrap}.defaultavatarpicker .avatar{margin:2px 0;vertical-align:middle}.options-general-php .date-time-text{display:inline-block;min-width:10em}.options-general-php input.small-text{width:56px}.options-general-php .spinner{float:none;margin:0 3px}.options-general-php .language-install-spinner,.settings-php .language-install-spinner{display:inline-block;float:none;margin:-3px 5px 0;vertical-align:middle}.setup-php textarea{max-width:100%}.form-field #site-address{max-width:25em}.form-field #domain{max-width:22em}.form-field #admin-email,.form-field #blog_last_updated,.form-field #blog_registered,.form-field #path,.form-field #site-title{max-width:25em}.form-field #path{margin-bottom:5px}#search-sites,#search-users{max-width:100%}.request-filesystem-credentials-dialog{display:none}.request-filesystem-credentials-dialog .notification-dialog{top:10%;max-height:85%}.request-filesystem-credentials-dialog-content{margin:25px}#request-filesystem-credentials-title{font-size:1.3em;margin:1em 0}.request-filesystem-credentials-form legend{font-size:1em;padding:1.33em 0 0;font-weight:600}.request-filesystem-credentials-form input[type=text],.request-filesystem-credentials-form input[type=password]{display:block}.request-filesystem-credentials-dialog input[type=text],.request-filesystem-credentials-dialog input[type=password]{width:100%}.request-filesystem-credentials-form .field-title{font-weight:600}.request-filesystem-credentials-dialog label[for=hostname],.request-filesystem-credentials-dialog label[for=public_key],.request-filesystem-credentials-dialog label[for=private_key]{display:block;margin-bottom:1em}.request-filesystem-credentials-dialog .request-filesystem-credentials-action-buttons{text-align:right}.request-filesystem-credentials-dialog label[for=ftp]{margin-right:10px}.request-filesystem-credentials-dialog #auth-keys-desc{margin-bottom:0}#request-filesystem-credentials-dialog .button:not(:last-child){margin-right:10px}#request-filesystem-credentials-form .cancel-button{display:none}#request-filesystem-credentials-dialog .cancel-button{display:inline}.request-filesystem-credentials-dialog .ftp-password,.request-filesystem-credentials-dialog .ftp-username{float:none;width:auto}.request-filesystem-credentials-dialog .ftp-username{margin-bottom:1em}.request-filesystem-credentials-dialog .ftp-password{margin:0}.request-filesystem-credentials-dialog .ftp-password em{color:#888}.request-filesystem-credentials-dialog label{display:block;line-height:1.5;margin-bottom:1em}.request-filesystem-credentials-form #ssh-keys legend{font-size:1.3em}.request-filesystem-credentials-form .notice{margin:0 0 20px;clear:both}@media screen and (max-width:782px){textarea{-webkit-appearance:none}input[type=text],input[type=search],input[type=password],input[type=email],input[type=number]{-webkit-appearance:none;padding:6px 10px}input[type=number]{height:40px}input.code{padding-bottom:5px;padding-top:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox],input[type=checkbox]{-webkit-appearance:none;padding:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox]{margin-bottom:8px}.widefat tfoot td input[type=checkbox]:before,.widefat th input[type=checkbox]:before,.widefat thead td input[type=checkbox]:before,input[type=checkbox]:checked:before{font:400 30px/1 dashicons;margin:-3px -5px}input[type=radio],input[type=checkbox]{height:25px;width:25px}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox]{margin-top:-3px}input[type=radio]:checked:before{vertical-align:middle;width:9px;height:9px;margin:7px;line-height:16px}.wp-upload-form input[type=submit]{margin-top:10px}#wpbody select{height:36px;font-size:16px}.wp-admin .button-cancel{padding:0;font-size:14px}#adduser .form-field input,#createuser .form-field input{width:100%}.form-table{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table td,.form-table th,.label-responsive{display:block;width:auto;vertical-align:middle}.label-responsive{margin:.5em 0}.export-filters li{margin-bottom:0}.form-table .color-palette td{display:table-cell;width:15px}.form-table table.color-palette{margin-right:10px}input,textarea{font-size:16px}#profile-page .form-table textarea,.form-table span.description,.form-table td input[type=text],.form-table td input[type=password],.form-table td input[type=email],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table .form-required.form-invalid td:after{float:right;margin:-30px 3px 0 0}#wpbody .form-table td select{height:40px}.form-table input[type=text].small-text,input[type=text].small-text,input[type=search].small-text,input[type=password].small-text,input[type=number].small-text{width:auto;max-width:55px;display:inline;padding:3px 6px;margin:0 3px}#pass-strength-result{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:8px}p.search-box{float:none;position:absolute;bottom:0;width:98%;height:90px;margin-bottom:20px}p.search-box input[name="s"]{height:auto;float:none;width:100%;margin-bottom:10px;vertical-align:middle;-webkit-appearance:none}p.search-box input[type=submit]{margin-bottom:10px}.form-table span.description{display:inline;padding:4px 0 0;line-height:1.4em;font-size:14px}.form-table th{padding-top:10px;padding-bottom:0;border-bottom:0}.form-table td{margin-bottom:0;padding-bottom:6px;padding-top:4px;padding-left:0}.form-table.permalink-structure td code{margin-left:32px}.form-table.permalink-structure td input[type=text]{margin-left:32px;margin-top:4px;width:96%}.form-table input.regular-text{width:100%}.form-table label{font-size:14px}.form-table fieldset label{display:block}#local-time,#utc-time{display:block;float:none;margin-top:.5em}.form-field #domain{max-width:none}.wp-pwd{position:relative}.wp-pwd [type=text],.wp-pwd [type=password]{padding-right:40px}.wp-pwd button.button{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;line-height:2;margin:0;padding:5px 10px;position:absolute;right:0;top:0}.wp-pwd button.button:active,.wp-pwd button.button:focus,.wp-pwd button.button:hover{background:0 0}.wp-pwd .button .text{display:none}.options-general-php input[type=text].small-text{max-width:60px;margin:0}}@media only screen and (max-width:768px){.form-field input[type=text],.form-field input[type=password],.form-field input[type=email],.form-field select,.form-field textarea{width:99%}.form-wrap .form-field{padding:0}#profile-page .form-table textarea{max-width:400px;width:auto}}@media only screen and (max-height:480px){.request-filesystem-credentials-dialog .notification-dialog{width:100%;height:100%;max-height:100%;position:fixed;top:0;margin:0;left:0}}@media screen and (max-width:600px){.color-option{width:49%}}@media only screen and (max-width:320px){.options-general-php .date-time-text.date-time-custom-text{min-width:0;margin-right:.5em}}
\ No newline at end of file
index 8e922eeca66b2c893e10ee684ebf3e8d34a2e81d..739374a36bad80f667ee41b9884cd8507335a296 100644 (file)
@@ -638,7 +638,7 @@ input[type="password"],
 .mce-close {
        font-family: 'tinymce', Arial;
        font-style: normal;
-       font-weight: normal;
+       font-weight: 400;
        font-variant: normal;
        font-size: 16px;
        margin-right: 0;
index fe9bc436ab5560d987070b6f6652e23e12b0b066..90cf8f341c0439579daa5b0df20e32223b766883 100644 (file)
@@ -638,7 +638,7 @@ input[type="password"],
 .mce-close {
        font-family: 'tinymce', Arial;
        font-style: normal;
-       font-weight: normal;
+       font-weight: 400;
        font-variant: normal;
        font-size: 16px;
        margin-left: 0;
index 5e1ced92d1d00b1a00d6ba5ddf4b7195e7192619..43378fc992b49459426d8c48db8a013a799adb09 100644 (file)
@@ -6,7 +6,7 @@ html {
 body {
        background: #fff;
        color: #444;
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        margin: 140px auto 25px;
        padding: 20px 20px 10px 20px;
        max-width: 700px;
@@ -45,7 +45,7 @@ h1, h2 {
        font-size: 24px;
        padding: 0;
        padding-bottom: 7px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 h3 {
@@ -100,7 +100,7 @@ label {
        color: #444; /* same as login.css */
        height: 84px;
        font-size: 20px;
-       font-weight: normal;
+       font-weight: 400;
        line-height: 1.3em;
        margin: -130px auto 25px;
        padding: 0;
@@ -132,7 +132,7 @@ label {
 }
 textarea {
        border: 1px solid #ddd;
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        width: 100%;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
@@ -181,7 +181,7 @@ textarea {
 
 input,
 submit {
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
 }
 
 .form-table input[type=text],
@@ -192,7 +192,7 @@ submit {
 }
 
 .form-table th p {
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .form-table.install-success th,
@@ -406,7 +406,7 @@ body.language-chooser {
        color: #32373c;
        font-size: 16px;
        font-family: Arial, sans-serif;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .language-chooser p {
index 3c62858ad79429b756f0660b391b7dbd6095ce31..d05100c24ab64028f3e68d1b8a4d9ac6c5cfd440 100644 (file)
@@ -1 +1 @@
-a img,abbr,fieldset{border:0}#logo,h1,h2{padding:0 0 7px}#logo a,.form-table th p,h1,h2{font-weight:400}html{background:#f1f1f1;margin:0 20px}body{background:#fff;color:#444;font-family:"Open Sans",sans-serif;margin:140px auto 25px;padding:20px 20px 10px;max-width:700px;-webkit-font-smoothing:subpixel-antialiased;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}a{color:#0073aa}a:active,a:hover{color:#00a0d2}a:focus{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 a:focus{outline:#5b9dd9 solid 1px}h1,h2{border-bottom:1px solid #ddd;clear:both;color:#666;font-size:24px}h3{font-size:16px}dd,dt,li,p{padding-bottom:2px;font-size:14px;line-height:1.5}.code,code{font-family:Consolas,Monaco,monospace}input,submit,textarea{font-family:"Open Sans",sans-serif}dl,ol,ul{padding:5px 22px 5px 5px}abbr{font-variant:normal}fieldset{padding:0;margin:0}label{cursor:pointer}#logo{margin:6px 0 14px;border-bottom:none;text-align:center}#logo a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:84px;background-size:84px;background-position:center top;background-repeat:no-repeat;color:#444;height:84px;font-size:20px;line-height:1.3em;margin:-130px auto 25px;padding:0;text-decoration:none;width:84px;text-indent:-9999px;outline:0;overflow:hidden;display:block}#pass1-text,.pw-weak,.show-password #pass1{display:none}#logo a:focus{-webkit-box-shadow:none;box-shadow:none}.step{margin:20px 0 15px}.step,th{text-align:right;padding:0}.language-chooser.wp-core-ui .step .button.button-large{height:36px;font-size:14px;line-height:33px;vertical-align:middle}.form-table td,.form-table th{padding:10px 0 10px 20px;vertical-align:top;font-size:14px}textarea{border:1px solid #ddd;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table{border-collapse:collapse;margin-top:1em;width:100%}.form-table td{margin-bottom:9px}.form-table th{text-align:right;width:140px}.form-table code{line-height:18px;font-size:14px}.form-table p{margin:4px 0 0;font-size:11px}.form-table input{line-height:20px;font-size:15px;padding:3px 5px;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.form-table input[type=email],.form-table input[type=password],.form-table input[type=text],.form-table input[type=url]{width:206px}.form-table.install-success td,.form-table.install-success th{vertical-align:middle;padding:16px 0 16px 20px}.form-table.install-success td p{margin:0;font-size:14px}.form-table.install-success td code{margin:0;font-size:18px}#error-page{margin-top:50px}#error-page p{font-size:14px;line-height:18px;margin:25px 0 20px}#error-page code,.code{font-family:Consolas,Monaco,monospace}.wp-hide-pw>.dashicons{line-height:inherit}#pass-strength-result{background-color:#eee;border:1px solid #ddd;color:#23282d;margin:-2px 0 5px 5px;padding:3px 5px;text-align:center;width:218px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;opacity:0}#pass-strength-result.short{background-color:#f1adad;border-color:#e35b5b;opacity:1}#pass-strength-result.bad{background-color:#fbc5a9;border-color:#f78b53;opacity:1}#pass-strength-result.good{background-color:#ffe399;border-color:#ffc733;opacity:1}#pass-strength-result.strong{background-color:#c1e1b9;border-color:#83c373;opacity:1}#pass1-text.short,#pass1.short{border-color:#e35b5b}#pass1-text.bad,#pass1.bad{border-color:#f78b53}#pass1-text.good,#pass1.good{border-color:#ffc733}#pass1-text.strong,#pass1.strong{border-color:#83c373}.message{border-right:4px solid #dc3232;padding:.7em .6em;background-color:#fbeaea}#admin_email,#dbhost,#dbname,#pass1,#pass2,#prefix,#pwd,#uname,#user_login{direction:ltr}.show-password #pass1-text{display:inline-block}.form-table span.description.important{font-size:12px}.rtl input,.rtl submit,.rtl textarea,body.rtl{font-family:Tahoma,sans-serif}.language-chooser select,:lang(he-il) .rtl input,:lang(he-il) .rtl submit,:lang(he-il) .rtl textarea,:lang(he-il) body.rtl{font-family:Arial,sans-serif}@media only screen and (max-width:799px){body{margin-top:115px}#logo a{margin:-125px auto 30px}}@media screen and (max-width:782px){.form-table{margin-top:0}.form-table td,.form-table th{display:block;width:auto;vertical-align:middle}.form-table th{padding:20px 0 0}.form-table td{padding:5px 0;border:0;margin:0}input,textarea{font-size:16px}.form-table span.description,.form-table td input[type=text],.form-table td input[type=email],.form-table td input[type=url],.form-table td input[type=password],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}}body.language-chooser{max-width:300px}.language-chooser select{padding:8px;width:100%;display:block;border:1px solid #ddd;background-color:#fff;color:#32373c;font-size:16px;font-weight:400}.language-chooser p{text-align:left}.screen-reader-input,.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;visibility:hidden;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:2px 5px 0}.step .spinner{display:inline-block;vertical-align:middle;margin-left:15px}.button-secondary.hide-if-no-js,.hide-if-no-js{display:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.spinner{background-image:url(../images/spinner-2x.gif)}}
\ No newline at end of file
+a img,abbr,fieldset{border:0}#logo,h1,h2{padding:0 0 7px}#logo a,.form-table th p,h1,h2{font-weight:400}html{background:#f1f1f1;margin:0 20px}body{background:#fff;color:#444;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;margin:140px auto 25px;padding:20px 20px 10px;max-width:700px;-webkit-font-smoothing:subpixel-antialiased;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}a{color:#0073aa}a:active,a:hover{color:#00a0d2}a:focus{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 a:focus{outline:#5b9dd9 solid 1px}h1,h2{border-bottom:1px solid #ddd;clear:both;color:#666;font-size:24px}h3{font-size:16px}dd,dt,li,p{padding-bottom:2px;font-size:14px;line-height:1.5}.code,code{font-family:Consolas,Monaco,monospace}input,submit,textarea{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}dl,ol,ul{padding:5px 22px 5px 5px}abbr{font-variant:normal}fieldset{padding:0;margin:0}label{cursor:pointer}#logo{margin:6px 0 14px;border-bottom:none;text-align:center}#logo a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:84px;background-size:84px;background-position:center top;background-repeat:no-repeat;color:#444;height:84px;font-size:20px;line-height:1.3em;margin:-130px auto 25px;padding:0;text-decoration:none;width:84px;text-indent:-9999px;outline:0;overflow:hidden;display:block}#pass1-text,.pw-weak,.show-password #pass1{display:none}#logo a:focus{-webkit-box-shadow:none;box-shadow:none}.step{margin:20px 0 15px}.step,th{text-align:right;padding:0}.language-chooser.wp-core-ui .step .button.button-large{height:36px;font-size:14px;line-height:33px;vertical-align:middle}.form-table td,.form-table th{padding:10px 0 10px 20px;vertical-align:top;font-size:14px}textarea{border:1px solid #ddd;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table{border-collapse:collapse;margin-top:1em;width:100%}.form-table td{margin-bottom:9px}.form-table th{text-align:right;width:140px}.form-table code{line-height:18px;font-size:14px}.form-table p{margin:4px 0 0;font-size:11px}.form-table input{line-height:20px;font-size:15px;padding:3px 5px;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.form-table input[type=email],.form-table input[type=password],.form-table input[type=text],.form-table input[type=url]{width:206px}.form-table.install-success td,.form-table.install-success th{vertical-align:middle;padding:16px 0 16px 20px}.form-table.install-success td p{margin:0;font-size:14px}.form-table.install-success td code{margin:0;font-size:18px}#error-page{margin-top:50px}#error-page p{font-size:14px;line-height:18px;margin:25px 0 20px}#error-page code,.code{font-family:Consolas,Monaco,monospace}.wp-hide-pw>.dashicons{line-height:inherit}#pass-strength-result{background-color:#eee;border:1px solid #ddd;color:#23282d;margin:-2px 0 5px 5px;padding:3px 5px;text-align:center;width:218px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;opacity:0}#pass-strength-result.short{background-color:#f1adad;border-color:#e35b5b;opacity:1}#pass-strength-result.bad{background-color:#fbc5a9;border-color:#f78b53;opacity:1}#pass-strength-result.good{background-color:#ffe399;border-color:#ffc733;opacity:1}#pass-strength-result.strong{background-color:#c1e1b9;border-color:#83c373;opacity:1}#pass1-text.short,#pass1.short{border-color:#e35b5b}#pass1-text.bad,#pass1.bad{border-color:#f78b53}#pass1-text.good,#pass1.good{border-color:#ffc733}#pass1-text.strong,#pass1.strong{border-color:#83c373}.message{border-right:4px solid #dc3232;padding:.7em .6em;background-color:#fbeaea}#admin_email,#dbhost,#dbname,#pass1,#pass2,#prefix,#pwd,#uname,#user_login{direction:ltr}.show-password #pass1-text{display:inline-block}.form-table span.description.important{font-size:12px}.rtl input,.rtl submit,.rtl textarea,body.rtl{font-family:Tahoma,sans-serif}.language-chooser select,:lang(he-il) .rtl input,:lang(he-il) .rtl submit,:lang(he-il) .rtl textarea,:lang(he-il) body.rtl{font-family:Arial,sans-serif}@media only screen and (max-width:799px){body{margin-top:115px}#logo a{margin:-125px auto 30px}}@media screen and (max-width:782px){.form-table{margin-top:0}.form-table td,.form-table th{display:block;width:auto;vertical-align:middle}.form-table th{padding:20px 0 0}.form-table td{padding:5px 0;border:0;margin:0}input,textarea{font-size:16px}.form-table span.description,.form-table td input[type=text],.form-table td input[type=email],.form-table td input[type=url],.form-table td input[type=password],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}}body.language-chooser{max-width:300px}.language-chooser select{padding:8px;width:100%;display:block;border:1px solid #ddd;background-color:#fff;color:#32373c;font-size:16px;font-weight:400}.language-chooser p{text-align:left}.screen-reader-input,.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;visibility:hidden;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:2px 5px 0}.step .spinner{display:inline-block;vertical-align:middle;margin-left:15px}.button-secondary.hide-if-no-js,.hide-if-no-js{display:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.spinner{background-image:url(../images/spinner-2x.gif)}}
\ No newline at end of file
index 55fbe54330d8b0063cd32d9231ed462bc27d959e..d1db4ec661be12a4b75548418994b3de77f64937 100644 (file)
@@ -6,7 +6,7 @@ html {
 body {
        background: #fff;
        color: #444;
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        margin: 140px auto 25px;
        padding: 20px 20px 10px 20px;
        max-width: 700px;
@@ -45,7 +45,7 @@ h1, h2 {
        font-size: 24px;
        padding: 0;
        padding-bottom: 7px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 h3 {
@@ -100,7 +100,7 @@ label {
        color: #444; /* same as login.css */
        height: 84px;
        font-size: 20px;
-       font-weight: normal;
+       font-weight: 400;
        line-height: 1.3em;
        margin: -130px auto 25px;
        padding: 0;
@@ -132,7 +132,7 @@ label {
 }
 textarea {
        border: 1px solid #ddd;
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        width: 100%;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
@@ -181,7 +181,7 @@ textarea {
 
 input,
 submit {
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
 }
 
 .form-table input[type=text],
@@ -192,7 +192,7 @@ submit {
 }
 
 .form-table th p {
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .form-table.install-success th,
@@ -406,7 +406,7 @@ body.language-chooser {
        color: #32373c;
        font-size: 16px;
        font-family: Arial, sans-serif;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .language-chooser p {
index d82bb1e6274c668afe266c48bf532ff2ac2ff37c..ceac751648bd1f2b5b9d4c8ed364a60136ff79d5 100644 (file)
@@ -1 +1 @@
-a img,abbr,fieldset{border:0}#logo,h1,h2{padding:0 0 7px}#logo a,.form-table th p,h1,h2{font-weight:400}html{background:#f1f1f1;margin:0 20px}body{background:#fff;color:#444;font-family:"Open Sans",sans-serif;margin:140px auto 25px;padding:20px 20px 10px;max-width:700px;-webkit-font-smoothing:subpixel-antialiased;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}a{color:#0073aa}a:active,a:hover{color:#00a0d2}a:focus{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 a:focus{outline:#5b9dd9 solid 1px}h1,h2{border-bottom:1px solid #ddd;clear:both;color:#666;font-size:24px}h3{font-size:16px}dd,dt,li,p{padding-bottom:2px;font-size:14px;line-height:1.5}.code,code{font-family:Consolas,Monaco,monospace}input,submit,textarea{font-family:"Open Sans",sans-serif}dl,ol,ul{padding:5px 5px 5px 22px}abbr{font-variant:normal}fieldset{padding:0;margin:0}label{cursor:pointer}#logo{margin:6px 0 14px;border-bottom:none;text-align:center}#logo a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:84px;background-size:84px;background-position:center top;background-repeat:no-repeat;color:#444;height:84px;font-size:20px;line-height:1.3em;margin:-130px auto 25px;padding:0;text-decoration:none;width:84px;text-indent:-9999px;outline:0;overflow:hidden;display:block}#pass1-text,.pw-weak,.show-password #pass1{display:none}#logo a:focus{-webkit-box-shadow:none;box-shadow:none}.step{margin:20px 0 15px}.step,th{text-align:left;padding:0}.language-chooser.wp-core-ui .step .button.button-large{height:36px;font-size:14px;line-height:33px;vertical-align:middle}.form-table td,.form-table th{padding:10px 20px 10px 0;vertical-align:top;font-size:14px}textarea{border:1px solid #ddd;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table{border-collapse:collapse;margin-top:1em;width:100%}.form-table td{margin-bottom:9px}.form-table th{text-align:left;width:140px}.form-table code{line-height:18px;font-size:14px}.form-table p{margin:4px 0 0;font-size:11px}.form-table input{line-height:20px;font-size:15px;padding:3px 5px;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.form-table input[type=email],.form-table input[type=password],.form-table input[type=text],.form-table input[type=url]{width:206px}.form-table.install-success td,.form-table.install-success th{vertical-align:middle;padding:16px 20px 16px 0}.form-table.install-success td p{margin:0;font-size:14px}.form-table.install-success td code{margin:0;font-size:18px}#error-page{margin-top:50px}#error-page p{font-size:14px;line-height:18px;margin:25px 0 20px}#error-page code,.code{font-family:Consolas,Monaco,monospace}.wp-hide-pw>.dashicons{line-height:inherit}#pass-strength-result{background-color:#eee;border:1px solid #ddd;color:#23282d;margin:-2px 5px 5px 0;padding:3px 5px;text-align:center;width:218px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;opacity:0}#pass-strength-result.short{background-color:#f1adad;border-color:#e35b5b;opacity:1}#pass-strength-result.bad{background-color:#fbc5a9;border-color:#f78b53;opacity:1}#pass-strength-result.good{background-color:#ffe399;border-color:#ffc733;opacity:1}#pass-strength-result.strong{background-color:#c1e1b9;border-color:#83c373;opacity:1}#pass1-text.short,#pass1.short{border-color:#e35b5b}#pass1-text.bad,#pass1.bad{border-color:#f78b53}#pass1-text.good,#pass1.good{border-color:#ffc733}#pass1-text.strong,#pass1.strong{border-color:#83c373}.message{border-left:4px solid #dc3232;padding:.7em .6em;background-color:#fbeaea}#admin_email,#dbhost,#dbname,#pass1,#pass2,#prefix,#pwd,#uname,#user_login{direction:ltr}.show-password #pass1-text{display:inline-block}.form-table span.description.important{font-size:12px}.rtl input,.rtl submit,.rtl textarea,body.rtl{font-family:Tahoma,sans-serif}.language-chooser select,:lang(he-il) .rtl input,:lang(he-il) .rtl submit,:lang(he-il) .rtl textarea,:lang(he-il) body.rtl{font-family:Arial,sans-serif}@media only screen and (max-width:799px){body{margin-top:115px}#logo a{margin:-125px auto 30px}}@media screen and (max-width:782px){.form-table{margin-top:0}.form-table td,.form-table th{display:block;width:auto;vertical-align:middle}.form-table th{padding:20px 0 0}.form-table td{padding:5px 0;border:0;margin:0}input,textarea{font-size:16px}.form-table span.description,.form-table td input[type=text],.form-table td input[type=email],.form-table td input[type=url],.form-table td input[type=password],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}}body.language-chooser{max-width:300px}.language-chooser select{padding:8px;width:100%;display:block;border:1px solid #ddd;background-color:#fff;color:#32373c;font-size:16px;font-weight:400}.language-chooser p{text-align:right}.screen-reader-input,.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;visibility:hidden;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:2px 5px 0}.step .spinner{display:inline-block;vertical-align:middle;margin-right:15px}.button-secondary.hide-if-no-js,.hide-if-no-js{display:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.spinner{background-image:url(../images/spinner-2x.gif)}}
\ No newline at end of file
+a img,abbr,fieldset{border:0}#logo,h1,h2{padding:0 0 7px}#logo a,.form-table th p,h1,h2{font-weight:400}html{background:#f1f1f1;margin:0 20px}body{background:#fff;color:#444;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;margin:140px auto 25px;padding:20px 20px 10px;max-width:700px;-webkit-font-smoothing:subpixel-antialiased;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}a{color:#0073aa}a:active,a:hover{color:#00a0d2}a:focus{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 a:focus{outline:#5b9dd9 solid 1px}h1,h2{border-bottom:1px solid #ddd;clear:both;color:#666;font-size:24px}h3{font-size:16px}dd,dt,li,p{padding-bottom:2px;font-size:14px;line-height:1.5}.code,code{font-family:Consolas,Monaco,monospace}input,submit,textarea{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}dl,ol,ul{padding:5px 5px 5px 22px}abbr{font-variant:normal}fieldset{padding:0;margin:0}label{cursor:pointer}#logo{margin:6px 0 14px;border-bottom:none;text-align:center}#logo a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:84px;background-size:84px;background-position:center top;background-repeat:no-repeat;color:#444;height:84px;font-size:20px;line-height:1.3em;margin:-130px auto 25px;padding:0;text-decoration:none;width:84px;text-indent:-9999px;outline:0;overflow:hidden;display:block}#pass1-text,.pw-weak,.show-password #pass1{display:none}#logo a:focus{-webkit-box-shadow:none;box-shadow:none}.step{margin:20px 0 15px}.step,th{text-align:left;padding:0}.language-chooser.wp-core-ui .step .button.button-large{height:36px;font-size:14px;line-height:33px;vertical-align:middle}.form-table td,.form-table th{padding:10px 20px 10px 0;vertical-align:top;font-size:14px}textarea{border:1px solid #ddd;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table{border-collapse:collapse;margin-top:1em;width:100%}.form-table td{margin-bottom:9px}.form-table th{text-align:left;width:140px}.form-table code{line-height:18px;font-size:14px}.form-table p{margin:4px 0 0;font-size:11px}.form-table input{line-height:20px;font-size:15px;padding:3px 5px;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.form-table input[type=email],.form-table input[type=password],.form-table input[type=text],.form-table input[type=url]{width:206px}.form-table.install-success td,.form-table.install-success th{vertical-align:middle;padding:16px 20px 16px 0}.form-table.install-success td p{margin:0;font-size:14px}.form-table.install-success td code{margin:0;font-size:18px}#error-page{margin-top:50px}#error-page p{font-size:14px;line-height:18px;margin:25px 0 20px}#error-page code,.code{font-family:Consolas,Monaco,monospace}.wp-hide-pw>.dashicons{line-height:inherit}#pass-strength-result{background-color:#eee;border:1px solid #ddd;color:#23282d;margin:-2px 5px 5px 0;padding:3px 5px;text-align:center;width:218px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;opacity:0}#pass-strength-result.short{background-color:#f1adad;border-color:#e35b5b;opacity:1}#pass-strength-result.bad{background-color:#fbc5a9;border-color:#f78b53;opacity:1}#pass-strength-result.good{background-color:#ffe399;border-color:#ffc733;opacity:1}#pass-strength-result.strong{background-color:#c1e1b9;border-color:#83c373;opacity:1}#pass1-text.short,#pass1.short{border-color:#e35b5b}#pass1-text.bad,#pass1.bad{border-color:#f78b53}#pass1-text.good,#pass1.good{border-color:#ffc733}#pass1-text.strong,#pass1.strong{border-color:#83c373}.message{border-left:4px solid #dc3232;padding:.7em .6em;background-color:#fbeaea}#admin_email,#dbhost,#dbname,#pass1,#pass2,#prefix,#pwd,#uname,#user_login{direction:ltr}.show-password #pass1-text{display:inline-block}.form-table span.description.important{font-size:12px}.rtl input,.rtl submit,.rtl textarea,body.rtl{font-family:Tahoma,sans-serif}.language-chooser select,:lang(he-il) .rtl input,:lang(he-il) .rtl submit,:lang(he-il) .rtl textarea,:lang(he-il) body.rtl{font-family:Arial,sans-serif}@media only screen and (max-width:799px){body{margin-top:115px}#logo a{margin:-125px auto 30px}}@media screen and (max-width:782px){.form-table{margin-top:0}.form-table td,.form-table th{display:block;width:auto;vertical-align:middle}.form-table th{padding:20px 0 0}.form-table td{padding:5px 0;border:0;margin:0}input,textarea{font-size:16px}.form-table span.description,.form-table td input[type=text],.form-table td input[type=email],.form-table td input[type=url],.form-table td input[type=password],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}}body.language-chooser{max-width:300px}.language-chooser select{padding:8px;width:100%;display:block;border:1px solid #ddd;background-color:#fff;color:#32373c;font-size:16px;font-weight:400}.language-chooser p{text-align:right}.screen-reader-input,.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;visibility:hidden;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:2px 5px 0}.step .spinner{display:inline-block;vertical-align:middle;margin-right:15px}.button-secondary.hide-if-no-js,.hide-if-no-js{display:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.spinner{background-image:url(../images/spinner-2x.gif)}}
\ No newline at end of file
index 0da51c400118b2d223e34b48d38df66ac47a959e..82ea545f50ecdd22449771da0d9679fe8643c963 100644 (file)
@@ -16,7 +16,7 @@ body.rtl .press-this a.wp-switch-editor {
 .rtl h5,
 .rtl h6 {
        font-family: Arial, sans-serif;
-       font-weight: bold;
+       font-weight: 600;
 }
 
 /* he_IL: Remove Tahoma from the font stack. Arial is best for Hebrew. */
@@ -28,7 +28,7 @@ body.locale-he-il .press-this a.wp-switch-editor {
 /* he_IL: Have <em> be bold rather than italic. */
 .locale-he-il em {
        font-style: normal;
-       font-weight: bold;
+       font-weight: 600;
 }
 
 /* zh_CN: Remove italic properties. */
index 37bd5137fa4d1ebac80964694c79b7b805b595e6..e17935470e70580d078ba4fd59f7b67bfadbcdd0 100644 (file)
@@ -1 +1 @@
-.locale-he-il em,.locale-zh-cn #local-time,.locale-zh-cn #utc-time,.locale-zh-cn .form-wrap p,.locale-zh-cn .howto,.locale-zh-cn .inline-edit-row fieldset span.checkbox-title,.locale-zh-cn .inline-edit-row fieldset span.title,.locale-zh-cn .js .input-with-default-title,.locale-zh-cn .link-to-original,.locale-zh-cn .tablenav .displaying-num,.locale-zh-cn p.description,.locale-zh-cn p.help,.locale-zh-cn p.install-help,.locale-zh-cn span.description{font-style:normal}.locale-de-de #customize-header-actions .button,.locale-de-de-formal #customize-header-actions .button,.locale-ru-ru #customize-header-actions .button{padding:0 5px 1px}body.rtl,body.rtl .press-this a.wp-switch-editor{font-family:Tahoma,Arial,sans-serif}.rtl h1,.rtl h2,.rtl h3,.rtl h4,.rtl h5,.rtl h6{font-family:Arial,sans-serif;font-weight:700}body.locale-he-il,body.locale-he-il .press-this a.wp-switch-editor{font-family:Arial,sans-serif}.locale-he-il em{font-weight:700}.locale-zh-cn .hdnle a{font-size:12px}.locale-zh-cn form.upgrade .hint{font-style:normal;font-size:100%}.locale-zh-cn #sort-buttons{font-size:1em!important}.locale-de-de #customize-header-actions .spinner,.locale-de-de-formal #customize-header-actions .spinner{margin:16px 3px 0}.locale-ru-ru #adminmenu{width:inherit}.locale-ru-ru #adminmenu,.locale-ru-ru #wpbody{margin-right:0}.locale-ru-ru .inline-edit-row fieldset label span.title,.locale-ru-ru .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-right:8em}.locale-ru-ru.post-new-php .tagsdiv .newtag,.locale-ru-ru.post-php .tagsdiv .newtag{width:165px}.locale-ru-ru.press-this .posting{margin-left:277px}.locale-ru-ru .press-this-sidebar{width:265px}.locale-ru-ru #customize-header-actions .spinner{margin:16px 3px 0}.locale-lt-lt .inline-edit-row fieldset label span.title,.locale-lt-lt .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap{margin-right:8em}@media screen and (max-width:782px){.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap,.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-right:0}}
\ No newline at end of file
+.locale-he-il em,.locale-zh-cn #local-time,.locale-zh-cn #utc-time,.locale-zh-cn .form-wrap p,.locale-zh-cn .howto,.locale-zh-cn .inline-edit-row fieldset span.checkbox-title,.locale-zh-cn .inline-edit-row fieldset span.title,.locale-zh-cn .js .input-with-default-title,.locale-zh-cn .link-to-original,.locale-zh-cn .tablenav .displaying-num,.locale-zh-cn p.description,.locale-zh-cn p.help,.locale-zh-cn p.install-help,.locale-zh-cn span.description{font-style:normal}.locale-de-de #customize-header-actions .button,.locale-de-de-formal #customize-header-actions .button,.locale-ru-ru #customize-header-actions .button{padding:0 5px 1px}body.rtl,body.rtl .press-this a.wp-switch-editor{font-family:Tahoma,Arial,sans-serif}.rtl h1,.rtl h2,.rtl h3,.rtl h4,.rtl h5,.rtl h6{font-family:Arial,sans-serif;font-weight:600}body.locale-he-il,body.locale-he-il .press-this a.wp-switch-editor{font-family:Arial,sans-serif}.locale-he-il em{font-weight:600}.locale-zh-cn .hdnle a{font-size:12px}.locale-zh-cn form.upgrade .hint{font-style:normal;font-size:100%}.locale-zh-cn #sort-buttons{font-size:1em!important}.locale-de-de #customize-header-actions .spinner,.locale-de-de-formal #customize-header-actions .spinner{margin:16px 3px 0}.locale-ru-ru #adminmenu{width:inherit}.locale-ru-ru #adminmenu,.locale-ru-ru #wpbody{margin-right:0}.locale-ru-ru .inline-edit-row fieldset label span.title,.locale-ru-ru .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-right:8em}.locale-ru-ru.post-new-php .tagsdiv .newtag,.locale-ru-ru.post-php .tagsdiv .newtag{width:165px}.locale-ru-ru.press-this .posting{margin-left:277px}.locale-ru-ru .press-this-sidebar{width:265px}.locale-ru-ru #customize-header-actions .spinner{margin:16px 3px 0}.locale-lt-lt .inline-edit-row fieldset label span.title,.locale-lt-lt .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap{margin-right:8em}@media screen and (max-width:782px){.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap,.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-right:0}}
\ No newline at end of file
index 6c603bffbf7487861296e57f9451c9fd594f0fa9..967fb4c6c6553526d6af5f3184bb98216c068f21 100644 (file)
@@ -16,7 +16,7 @@ body.rtl .press-this a.wp-switch-editor {
 .rtl h5,
 .rtl h6 {
        font-family: Arial, sans-serif;
-       font-weight: bold;
+       font-weight: 600;
 }
 
 /* he_IL: Remove Tahoma from the font stack. Arial is best for Hebrew. */
@@ -28,7 +28,7 @@ body.locale-he-il .press-this a.wp-switch-editor {
 /* he_IL: Have <em> be bold rather than italic. */
 .locale-he-il em {
        font-style: normal;
-       font-weight: bold;
+       font-weight: 600;
 }
 
 /* zh_CN: Remove italic properties. */
index 50e6de627b22d86e5e6909ebe1ee633fb5352583..a0194b625c29636fd137d3c62ff6c0d1f164c519 100644 (file)
@@ -1 +1 @@
-.locale-he-il em,.locale-zh-cn #local-time,.locale-zh-cn #utc-time,.locale-zh-cn .form-wrap p,.locale-zh-cn .howto,.locale-zh-cn .inline-edit-row fieldset span.checkbox-title,.locale-zh-cn .inline-edit-row fieldset span.title,.locale-zh-cn .js .input-with-default-title,.locale-zh-cn .link-to-original,.locale-zh-cn .tablenav .displaying-num,.locale-zh-cn p.description,.locale-zh-cn p.help,.locale-zh-cn p.install-help,.locale-zh-cn span.description{font-style:normal}.locale-de-de #customize-header-actions .button,.locale-de-de-formal #customize-header-actions .button,.locale-ru-ru #customize-header-actions .button{padding:0 5px 1px}body.rtl,body.rtl .press-this a.wp-switch-editor{font-family:Tahoma,Arial,sans-serif}.rtl h1,.rtl h2,.rtl h3,.rtl h4,.rtl h5,.rtl h6{font-family:Arial,sans-serif;font-weight:700}body.locale-he-il,body.locale-he-il .press-this a.wp-switch-editor{font-family:Arial,sans-serif}.locale-he-il em{font-weight:700}.locale-zh-cn .hdnle a{font-size:12px}.locale-zh-cn form.upgrade .hint{font-style:normal;font-size:100%}.locale-zh-cn #sort-buttons{font-size:1em!important}.locale-de-de #customize-header-actions .spinner,.locale-de-de-formal #customize-header-actions .spinner{margin:16px 3px 0}.locale-ru-ru #adminmenu{width:inherit}.locale-ru-ru #adminmenu,.locale-ru-ru #wpbody{margin-left:0}.locale-ru-ru .inline-edit-row fieldset label span.title,.locale-ru-ru .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-left:8em}.locale-ru-ru.post-new-php .tagsdiv .newtag,.locale-ru-ru.post-php .tagsdiv .newtag{width:165px}.locale-ru-ru.press-this .posting{margin-right:277px}.locale-ru-ru .press-this-sidebar{width:265px}.locale-ru-ru #customize-header-actions .spinner{margin:16px 3px 0}.locale-lt-lt .inline-edit-row fieldset label span.title,.locale-lt-lt .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap{margin-left:8em}@media screen and (max-width:782px){.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap,.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-left:0}}
\ No newline at end of file
+.locale-he-il em,.locale-zh-cn #local-time,.locale-zh-cn #utc-time,.locale-zh-cn .form-wrap p,.locale-zh-cn .howto,.locale-zh-cn .inline-edit-row fieldset span.checkbox-title,.locale-zh-cn .inline-edit-row fieldset span.title,.locale-zh-cn .js .input-with-default-title,.locale-zh-cn .link-to-original,.locale-zh-cn .tablenav .displaying-num,.locale-zh-cn p.description,.locale-zh-cn p.help,.locale-zh-cn p.install-help,.locale-zh-cn span.description{font-style:normal}.locale-de-de #customize-header-actions .button,.locale-de-de-formal #customize-header-actions .button,.locale-ru-ru #customize-header-actions .button{padding:0 5px 1px}body.rtl,body.rtl .press-this a.wp-switch-editor{font-family:Tahoma,Arial,sans-serif}.rtl h1,.rtl h2,.rtl h3,.rtl h4,.rtl h5,.rtl h6{font-family:Arial,sans-serif;font-weight:600}body.locale-he-il,body.locale-he-il .press-this a.wp-switch-editor{font-family:Arial,sans-serif}.locale-he-il em{font-weight:600}.locale-zh-cn .hdnle a{font-size:12px}.locale-zh-cn form.upgrade .hint{font-style:normal;font-size:100%}.locale-zh-cn #sort-buttons{font-size:1em!important}.locale-de-de #customize-header-actions .spinner,.locale-de-de-formal #customize-header-actions .spinner{margin:16px 3px 0}.locale-ru-ru #adminmenu{width:inherit}.locale-ru-ru #adminmenu,.locale-ru-ru #wpbody{margin-left:0}.locale-ru-ru .inline-edit-row fieldset label span.title,.locale-ru-ru .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-left:8em}.locale-ru-ru.post-new-php .tagsdiv .newtag,.locale-ru-ru.post-php .tagsdiv .newtag{width:165px}.locale-ru-ru.press-this .posting{margin-right:277px}.locale-ru-ru .press-this-sidebar{width:265px}.locale-ru-ru #customize-header-actions .spinner{margin:16px 3px 0}.locale-lt-lt .inline-edit-row fieldset label span.title,.locale-lt-lt .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap{margin-left:8em}@media screen and (max-width:782px){.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap,.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-left:0}}
\ No newline at end of file
index 1df80f7581a247ae6ced26c84d19bbf46683d3a9..079c3c34fc3322ec3dfa887da67a161e76ef6b53 100644 (file)
@@ -700,7 +700,7 @@ th.asc a:focus span.sorting-indicator {
        background: #e5e5e5;
        font-size: 16px;
        line-height: 1;
-       font-weight: normal;
+       font-weight: 400;
        text-align: center;
 }
 
@@ -1271,10 +1271,6 @@ ul.cat-checklist {
        border-bottom: 0;
 }
 
-.plugin-update-tr td {
-       border-top: 0;
-}
-
 .plugins .inactive td,
 .plugins .inactive th,
 .plugins .active td,
@@ -1309,22 +1305,11 @@ ul.cat-checklist {
        box-shadow: none;
 }
 
-.plugins .active.update td,
-.plugins .active.update th,
-tr.active.update + tr.plugin-update-tr .plugin-update {
-       background-color: #fef7f1;
-}
-
 .plugins .active th.check-column,
 .plugin-update-tr.active td {
        border-right: 4px solid #00a0d2;
 }
 
-.plugins .active.update th.check-column,
-.plugins .active.update + .plugin-update-tr .plugin-update {
-       border-right: 4px solid #d54e21;
-}
-
 #wpbody-content .plugins .plugin-title,
 #wpbody-content .plugins .theme-title {
        padding-left: 12px;
@@ -1358,42 +1343,34 @@ tr.active.update + tr.plugin-update-tr .plugin-update {
        border-top-width: 1px;
 }
 
-.plugin-update-tr .update-message {
-       font-size: 13px;
-       font-weight: normal;
-       margin: 0 31px 8px 10px;
-       padding: 6px 40px 8px 12px;
-       background-color: #f7f7f7;
-       background-color: rgba(0,0,0,0.03);
+.plugins .plugin-update-tr .plugin-update {
+       -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1);
+       box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1);
+       overflow: hidden; /* clearfix */
+       padding: 0;
 }
 
-.plugin-update-tr .update-message:before,
-.plugin-card .update-now:before,
-.plugin-card .install-now:before {
-       color: #d54e21;
+.plugins .plugin-update-tr .notice,
+.plugins .plugin-update-tr div[class="update-message"] { /* back-compat for pre-4.6 */
+       margin: 5px 40px 15px 20px;
+}
+
+.plugins .notice p {
+       margin: 0.5em 0;
+}
+
+.plugin-card .update-now:before {
+       color: #f56e28;
+       content: "\f463";
        display: inline-block;
        font: normal 20px/1 dashicons;
+       margin: 3px -2px 0 5px;
        speak: none;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        vertical-align: top;
 }
 
-.plugin-update-tr .update-message:before,
-.plugin-card .update-now:before {
-       content: "\f463";
-}
-
-.plugin-update-tr .update-message:before {
-       margin: 0 -30px 0 10px;
-}
-
-.plugin-card .update-now:before,
-.plugin-card .install-now:before {
-       margin: 3px -2px 0 5px;
-}
-
-.plugin-update-tr .updating-message:before,
 .plugin-card .updating-message:before {
        content: "\f463";
        -webkit-animation: rotation 2s infinite linear;
@@ -1422,28 +1399,11 @@ tr.active.update + tr.plugin-update-tr .plugin-update {
        }
 }
 
-.plugin-update-tr .updated-message:before,
 .plugin-card .updated-message:before {
        color: #79ba49;
        content: "\f147";
 }
 
-.wp-list-table.plugins tbody tr.plugin-update-tr td.plugin-update {
-       overflow: hidden; /* clearfix */
-       padding: 0;
-       -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1);
-       box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1);
-}
-
-/* update notices for active plugins */
-tr.active + tr.plugin-update-tr .plugin-update {
-       background-color: #f7fcfe;
-}
-
-tr.active + tr.plugin-update-tr:not(.updated) .plugin-update .update-message {
-       background-color: #fcf3ef;
-}
-
 .plugin-install-php h2 {
        clear: both;
 }
@@ -2140,6 +2100,15 @@ div.action-links,
                margin-right: 0;
        }
 
+       .plugins .active.update + .plugin-update-tr:before {
+               background-color: #f7fcfe;
+               border-right: 4px solid #00a0d2;
+       }
+
+       .plugins .plugin-update-tr .update-message {
+               margin-right: 0;
+       }
+
        .wp-list-table.plugins .plugin-title strong,
        .wp-list-table.plugins .theme-title strong {
                font-size: 1.4em;
@@ -2184,3 +2153,15 @@ div.action-links,
                width: 100%;
        }
 }
+
+@media screen and ( max-width: 480px ) {
+       .tablenav-pages .current-page {
+               margin: 0;
+       }
+
+       .tablenav-pages .tablenav-paging-text {
+               float: right;
+               width: 100%;
+               padding-top: 0.5em;
+       }
+}
index 90e3cefbc912b36b85a69fdd8d6bb0887d4e1057..2523af057c671c0dcea92ae9126d4bcbd7ab3223 100644 (file)
@@ -1 +1 @@
-.response-links{display:block;margin-bottom:1em}.response-links a{display:block}.response-links a.comments-edit-item-link{font-weight:600}.response-links a.comments-view-item-link{font-size:12px}.post-com-count-wrapper strong{font-weight:400}.comments-view-item-link{display:inline-block;clear:both}.column-comments .post-com-count-wrapper,.column-response .post-com-count-wrapper{white-space:nowrap;word-wrap:normal}.column-comments .post-com-count,.column-response .post-com-count{display:inline-block;vertical-align:top}.column-comments .post-com-count-approved,.column-comments .post-com-count-no-comments,.column-response .post-com-count-approved,.column-response .post-com-count-no-comments{margin-top:5px}.column-comments .comment-count-approved,.column-comments .comment-count-no-comments,.column-response .comment-count-approved,.column-response .comment-count-no-comments{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;padding:0 8px;min-width:24px;height:2em;-webkit-border-radius:5px;border-radius:5px;background-color:#72777c;color:#fff;font-size:11px;line-height:21px;text-align:center}.ie8 .column-comments .comment-count-approved,.ie8 .column-comments .comment-count-no-comments,.ie8 .column-response .comment-count-approved,.ie8 .column-response .comment-count-no-comments{min-width:0}.column-comments .post-com-count-approved:after,.column-comments .post-com-count-no-comments:after,.column-response .post-com-count-approved:after,.column-response .post-com-count-no-comments:after{content:"";display:block;margin-right:8px;width:0;height:0;border-top:5px solid #72777c;border-left:5px solid transparent}.column-comments .post-com-count-approved:focus .comment-count-approved,.column-comments .post-com-count-approved:hover .comment-count-approved,.column-response .post-com-count-approved:focus .comment-count-approved,.column-response .post-com-count-approved:hover .comment-count-approved{background:#0073aa}.column-comments .post-com-count-approved:focus:after,.column-comments .post-com-count-approved:hover:after,.column-response .post-com-count-approved:focus:after,.column-response .post-com-count-approved:hover:after{border-top-color:#0073aa}.column-comments .post-com-count-pending,.column-response .post-com-count-pending{position:relative;right:-3px;padding:0 5px;min-width:7px;height:17px;border:2px solid #fff;-webkit-border-radius:11px;border-radius:11px;background:#ca4a1f;color:#fff;font-size:9px;line-height:17px;text-align:center}.column-comments .post-com-count-no-pending,.column-response .post-com-count-no-pending{display:none}.commentlist li{padding:1em 1em .2em;margin:0;border-bottom:1px solid #ccc}.commentlist li li{border-bottom:0;padding:0}.commentlist p{padding:0;margin:0 0 .8em}#submitted-on,.submitted-on{color:#555d66}#replyrow td{padding:2px}#replysubmit{margin:0;padding:5px 7px 10px;overflow:hidden;text-align:center}#replysubmit .button{margin-left:5px}#replysubmit .error{color:red;line-height:21px;text-align:center}#replyrow.inline-edit-row fieldset.comment-reply{font-size:inherit;line-height:inherit}#replyrow legend{margin:0;padding:.2em 5px 0;font-size:13px;line-height:1.4;font-weight:600}#replyrow.inline-edit-row label{display:inline;vertical-align:baseline;line-height:inherit}#commentsdiv #edithead .inside,#edithead .inside{float:right;padding:3px 5px 2px 0;margin:0;text-align:center}#edithead .inside input{width:180px}#edithead label{padding:2px 0}#replycontainer{padding:5px}#replycontent{height:120px;-webkit-box-shadow:none;box-shadow:none}#replyerror{border-color:#ddd;background-color:#f9f9f9}.commentlist .avatar{vertical-align:text-top}#the-comment-list div.undo,#the-comment-list tr.undo{background-color:#f5f5f5}#the-comment-list .unapproved td,#the-comment-list .unapproved th{background-color:#fef7f1}#the-comment-list .unapproved th.check-column{border-right:4px solid #d54e21}#the-comment-list .unapproved th.check-column input{margin-right:4px}#the-comment-list .approve a{color:#006505}#the-comment-list .unapprove a{color:#d98500}#the-comment-list td,#the-comment-list th{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}#the-comment-list tr:last-child td,#the-comment-list tr:last-child th{-webkit-box-shadow:none;box-shadow:none}#the-comment-list tr.unapproved+tr.approved td,#the-comment-list tr.unapproved+tr.approved th{border-top:1px solid rgba(0,0,0,.03)}.vim-current,.vim-current td,.vim-current th{background-color:#e4f2fd!important}th .comment-grey-bubble{height:16px;width:16px}th .comment-grey-bubble:before{content:"\f101";font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;right:-4px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}table.fixed{table-layout:fixed}.fixed .column-rating,.fixed .column-visible{width:8%}.fixed .column-author,.fixed .column-date,.fixed .column-format,.fixed .column-links,.fixed .column-parent,.fixed .column-posts{width:10%}.fixed .column-posts{width:74px}.fixed .column-comment .comment-author{display:none}.fixed .column-categories,.fixed .column-rel,.fixed .column-response,.fixed .column-role,.fixed .column-tags{width:15%}.fixed .column-slug{width:25%}.fixed .column-locations{width:35%}.fixed .column-comments{width:5.5em;padding:8px 0;text-align:right}.fixed .column-comments .vers{padding-right:3px}td.column-title strong,td.plugin-title strong{display:block;margin-bottom:.2em;font-size:14px}td.column-title p,td.plugin-title p{margin:6px 0}table.media .column-title .media-icon{float:right;min-height:60px;margin:0 0 0 9px}table.media .column-title .media-icon img{max-width:60px;height:auto;vertical-align:top}table.media .column-title .has-media-icon~.row-actions{margin-right:70px}table.media .column-title .filename{margin-bottom:.2em}.wp-list-table a{-webkit-transition:none;transition:none}#the-list tr:last-child td,#the-list tr:last-child th{border-bottom:none!important;-webkit-box-shadow:none;box-shadow:none}#comments-form .fixed .column-author{width:20%}#comments-form .fixed .column-date{width:14%}#commentsdiv.postbox .inside{margin:0;padding:0}#commentsdiv .inside .row-actions{line-height:18px}#commentsdiv .inside .column-author{width:25%}#commentsdiv .column-comment p{margin:.6em 0;padding:0}#commentsdiv #replyrow td{padding:0}#commentsdiv p{padding:8px 10px;margin:0}#commentsdiv .comments-box{border:0}#commentsdiv .comments-box thead td,#commentsdiv .comments-box thead th{background:0 0;padding:0 7px 4px;font-style:italic}#commentsdiv .comments-box tr:last-child td{border-bottom:0 none}#commentsdiv #edithead .inside input{width:160px}.sorting-indicator{display:block;visibility:hidden;width:10px;height:4px;margin-top:8px;margin-right:7px}.sorting-indicator:before{content:"\f142";font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0;top:-4px;right:-8px;line-height:10px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}.column-comments .sorting-indicator:before{top:0;right:-10px}th.desc a:focus span.sorting-indicator:before,th.desc:hover span.sorting-indicator:before,th.sorted.asc .sorting-indicator:before{content:"\f142"}th.asc a:focus span.sorting-indicator:before,th.asc:hover span.sorting-indicator:before,th.sorted.desc .sorting-indicator:before{content:"\f140"}.wp-list-table .toggle-row{position:absolute;left:8px;top:10px;display:none;padding:0;width:40px;height:40px;border:none;outline:0;background:0 0}.wp-list-table .toggle-row:hover{cursor:pointer}.wp-list-table .toggle-row:focus:before{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 .wp-list-table .toggle-row:focus:before{outline:#5b9dd9 solid 1px}.wp-list-table .toggle-row:active{-webkit-box-shadow:none;box-shadow:none}.wp-list-table .toggle-row:before{position:absolute;top:-5px;right:10px;-webkit-border-radius:50%;border-radius:50%;display:block;padding:1px 0 1px 2px;color:#444;content:"\f140";font:400 20px/1 dashicons;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none}.wp-list-table .is-expanded .toggle-row:before{content:"\f142"}tr.wp-locked .locked-indicator{margin-right:6px;height:20px;width:16px}tr.wp-locked .locked-indicator:before{color:#82878c;content:"\f160";display:inline-block;float:right;font:400 20px/1 dashicons;speak:none;vertical-align:middle;margin-right:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}tr.wp-locked .check-column input[type=checkbox],tr.wp-locked .check-column label,tr.wp-locked .row-actions .inline,tr.wp-locked .row-actions .trash{display:none}tr .locked-info{height:0;opacity:0}tr.wp-locked .locked-info{margin-top:8px;height:auto;opacity:1}.locked-text{vertical-align:top}tr.locked-info,tr.wp-locked .locked-info{-webkit-transition:height 1s,opacity .5s;transition:height 1s,opacity .5s}.fixed .column-comments .sorting-indicator{margin-top:3px}#menu-locations-wrap .widefat{width:60%}.widefat th.sortable,.widefat th.sorted{padding:0}th.sortable a,th.sorted a{display:block;overflow:hidden;padding:8px}.fixed .column-comments.sortable a,.fixed .column-comments.sorted a{padding:8px 0}th.sortable a span,th.sorted a span{float:right;cursor:pointer}th.asc a:focus span.sorting-indicator,th.asc:hover span.sorting-indicator,th.desc a:focus span.sorting-indicator,th.desc:hover span.sorting-indicator,th.sorted .sorting-indicator{visibility:visible}.tablenav-pages a,.tablenav-pages-navspan{font-weight:600;padding:0 2px}.tablenav-pages .current-page{margin:0 0 0 2px;padding-bottom:5px;font-size:13px;text-align:center}.tablenav .total-pages{margin-left:2px}.tablenav #table-paging{margin-right:2px}.tablenav a.button-secondary{display:block;margin:3px 0 0 8px}.tablenav{clear:both;height:30px;margin:6px 0 4px;vertical-align:middle}.tablenav.themes{max-width:98%}.tablenav .tablenav-pages{float:left;height:28px;margin-top:3px;cursor:default;color:#555}.tablenav .no-pages,.tablenav .one-page .pagination-links{display:none}.tablenav .tablenav-pages a,.tablenav-pages span.current{text-decoration:none;padding:3px 6px}.tablenav .tablenav-pages a,.tablenav-pages-navspan{display:inline-block;min-width:17px;border:1px solid #ccc;padding:3px 5px 7px;background:#e5e5e5;font-size:16px;line-height:1;font-weight:400;text-align:center}.tablenav-pages-navspan{height:16px;border-color:#ddd;background:#f7f7f7;color:#a0a5aa}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover{border-color:#5b9dd9;color:#fff;background:#00a0d2;-webkit-box-shadow:none;box-shadow:none;outline:0}.tablenav .displaying-num{margin-left:7px}.tablenav .one-page .displaying-num{display:inline-block;margin-top:5px;margin-left:0}.tablenav .actions{overflow:hidden;padding:2px 0 0 8px}.wp-filter .actions{display:inline-block;vertical-align:middle}.tablenav .delete{margin-left:20px}.tablenav .dots{border-color:transparent}.tablenav .next,.tablenav .prev{border-color:transparent;color:#0073aa}.tablenav .next:hover,.tablenav .prev:hover{border-color:transparent;color:#00a0d2}.tablenav .view-switch{float:left;margin:0 5px;padding-top:3px}.wp-filter .view-switch{display:inline-block;vertical-align:middle;padding:12px 0;margin:0 2px 0 8px}.media-toolbar.wp-filter .view-switch{margin:0 2px 0 12px}.view-switch a{float:right;width:28px;height:28px;text-align:center;line-height:24px;text-decoration:none}.view-switch a:before{color:#b4b9be;display:inline-block;font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.view-switch a:focus:before,.view-switch a:hover:before{color:#727272}.view-switch a.current:before{color:#0073aa}.view-switch .view-list:before{content:"\f163"}.view-switch .view-excerpt:before{content:"\f164"}.view-switch .view-grid:before{content:"\f509"}.filter{float:right;margin:-5px 10px 0 0}.filter .subsubsub{margin-right:-10px;margin-top:13px}.screen-per-page{width:4em}#posts-filter .wp-filter{margin-bottom:0}#posts-filter fieldset{float:right;margin:0 0 1em 1.5ex;padding:0}#posts-filter fieldset legend{padding:0 1px .2em 0}.row-actions,.row-actions-visible{padding:2px 0 0}p.pagenav{margin:0;display:inline}.pagenav span{font-weight:600;margin:0 6px}.row-title{font-size:14px!important;font-weight:600}.column-comment .comment-author{margin-bottom:.6em}.column-author img,.column-comment .comment-author img,.column-username img{float:right;margin-left:10px;margin-top:1px}.row-actions{color:#ddd;font-size:13px;position:relative;right:-9999em}.plugins,.plugins td,.plugins th,.row-actions .network_active,.row-actions .network_only{color:#000}.rtl .row-actions a{display:inline-block}.comment-item:hover .row-actions,.mobile .row-actions,.no-js .row-actions,.row-actions.visible,tr:hover .row-actions{position:static}#wpbody-content .inline-edit-row fieldset{font-size:12px;float:right;margin:0;padding:0;width:100%}#wpbody-content .inline-edit-row fieldset .inline-edit-col,tr.inline-edit-row td{padding:0 .5em}#wpbody-content .quick-edit-row-post .inline-edit-col-left{width:40%}#wpbody-content .quick-edit-row-post .inline-edit-col-right{width:39%}#wpbody-content .inline-edit-row-post .inline-edit-col-center{width:20%}#wpbody-content .quick-edit-row-page .inline-edit-col-left{width:50%}#wpbody-content .bulk-edit-row-post .inline-edit-col-right,#wpbody-content .quick-edit-row-page .inline-edit-col-right{width:49%}#wpbody-content .bulk-edit-row .inline-edit-col-left{width:30%}#wpbody-content .bulk-edit-row-page .inline-edit-col-right{width:69%}#wpbody-content .bulk-edit-row .inline-edit-col-bottom{float:left;width:69%}#wpbody-content .inline-edit-row-page .inline-edit-col-right{margin-top:27px}.inline-edit-row fieldset .inline-edit-group{clear:both;line-height:2.5}.inline-edit-row p.submit{clear:both;padding:.5em;margin:.5em 0 0}.inline-edit-row span.error{line-height:22px;margin:0 15px;padding:3px 5px}#the-list .inline-edit-row .inline-edit-legend{margin:0;padding:.2em .5em 0;line-height:2.5;font-weight:600}#the-list #bulk-edit.inline-edit-row .inline-edit-legend{padding:.2em .5em}.inline-edit-row fieldset span.checkbox-title,.inline-edit-row fieldset span.title{margin:0;padding:0;font-style:italic}.inline-edit-row fieldset label,.inline-edit-row fieldset span.inline-edit-categories-label{display:block;margin:.2em 0;line-height:2.5}.inline-edit-row fieldset.inline-edit-date label{display:inline-block;margin:0;line-height:1.5;vertical-align:baseline}.inline-edit-row fieldset label.inline-edit-tags{margin-top:0}.inline-edit-row fieldset label.inline-edit-tags span.title{margin:.2em 0;width:auto}.inline-edit-row fieldset label span.title,.inline-edit-row fieldset.inline-edit-date legend{display:block;float:right;width:6em;line-height:2.5}#posts-filter fieldset.inline-edit-date legend{padding:0}.inline-edit-row fieldset.inline-edit-date select{margin:1px;line-height:28px}.inline-edit-row fieldset .timestamp-wrap,.inline-edit-row fieldset label span.input-text-wrap{display:block;margin-right:6em}.quick-edit-row-post fieldset.inline-edit-col-right label span.title{width:auto;padding-left:.5em}.inline-edit-row .inline-edit-or{margin:.2em 0 .2em 6px;line-height:2.5}.inline-edit-row .input-text-wrap input[type=text]{width:100%}.inline-edit-row fieldset label input[type=checkbox]{vertical-align:middle}.inline-edit-row fieldset label textarea{width:100%;height:4em;vertical-align:top}#bulk-titles,ul.cat-checklist{height:12em;border:1px solid #ddd;overflow-y:scroll;padding:0 5px}#wpbody-content .bulk-edit-row fieldset .inline-edit-group label{max-width:50%}#wpbody-content .quick-edit-row fieldset .inline-edit-group label.alignleft:first-child{margin-left:.5em}.inline-edit-col-right .input-text-wrap input.inline-edit-menu-order-input{width:6em}.inline-edit-row .inline-edit-legend{text-transform:uppercase}.inline-edit-row fieldset .inline-edit-date{float:right}.inline-edit-row fieldset input[name=hh],.inline-edit-row fieldset input[name=jj],.inline-edit-row fieldset input[name=mn]{font-size:12px;width:2.3em}.inline-edit-row fieldset input[name=aa]{font-size:12px;width:3.5em}.inline-edit-row fieldset label input.inline-edit-password-input{width:8em}ul.cat-checklist{margin:0;background-color:#fff}#bulk-titles{display:block;margin:0 0 5px;line-height:140%}.inline-edit-row fieldset ul.cat-checklist input,.inline-edit-row fieldset ul.cat-checklist li{margin:0;position:relative}.inline-edit-row #bulk-titles div,.inline-edit-row fieldset ul.cat-checklist label{font-style:normal;font-size:11px}.inline-edit-row fieldset label input.inline-edit-menu-order-input{width:3em}.inline-edit-row fieldset label input.inline-edit-slug-input{width:75%}.inline-edit-row #post_parent,.inline-edit-row select[name=page_template]{max-width:80%}.ie8 .inline-edit-row #post_parent,.ie8 .inline-edit-row select[name=page_template]{width:250px}.quick-edit-row-post fieldset label.inline-edit-status{float:right}#bulk-titles div{margin:.2em .3em}#bulk-titles div a{cursor:pointer;display:block;float:right;height:18px;margin:0 -2px 0 3px;overflow:hidden;position:relative;width:20px}#bulk-titles div a:before{position:relative;top:-3px}.plugins tbody,.plugins tbody th.check-column{padding:8px 2px 0 0}.plugins tbody th.check-column input[type=checkbox]{margin-top:4px}.updates-table .plugin-title p{margin-top:0}.plugins .inactive th.check-column,.plugins tfoot td.check-column,.plugins thead td.check-column{padding-right:6px}.plugins tr{background:#fff}.plugins p{margin:0 4px;padding:0}.plugins .desc p{margin:0 0 8px}.plugins td.desc{line-height:1.5em}.plugins .desc ol,.plugins .desc ul{margin:0 2em 0 0}.plugins .desc ul{list-style-type:disc}.plugins .row-actions{font-size:13px}.plugins .active td,.plugins .active th,.plugins .inactive td,.plugins .inactive th{padding:10px 9px}.plugins .active td,.plugins .active th{background-color:#f7fcfe}.plugins .update td,.plugins .update th{border-bottom:0}.plugin-update-tr td{border-top:0}.plugin-install #the-list td,.plugins .active td,.plugins .active th,.plugins .inactive td,.plugins .inactive th,.upgrade .plugins td,.upgrade .plugins th{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugins tr.active+tr.inactive td,.plugins tr.active+tr.inactive th,.plugins tr.active.plugin-update-tr+tr.inactive td,.plugins tr.active.plugin-update-tr+tr.inactive th{border-top:1px solid rgba(0,0,0,.03);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1;box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1}.plugins .update td,.plugins .update th,.plugins .updated td,.plugins .updated th,.plugins tr.active+tr.inactive.update td,.plugins tr.active+tr.inactive.update th,.plugins tr.active+tr.inactive.updated td,.plugins tr.active+tr.inactive.updated th,.upgrade .plugins tr:last-of-type td,.upgrade .plugins tr:last-of-type th{-webkit-box-shadow:none;box-shadow:none}.plugins .active.update td,.plugins .active.update th,tr.active.update+tr.plugin-update-tr .plugin-update{background-color:#fef7f1}.plugin-update-tr.active td,.plugins .active th.check-column{border-right:4px solid #00a0d2}.plugins .active.update th.check-column,.plugins .active.update+.plugin-update-tr .plugin-update{border-right:4px solid #d54e21}#wpbody-content .plugins .plugin-title,#wpbody-content .plugins .theme-title{padding-left:12px;white-space:nowrap}.updates-table-screenshot{float:right;padding:0 0 5px 10px}.plugins .inactive .plugin-title strong{font-weight:400}.plugins .row-actions,.plugins .second{padding:0 0 5px}.plugins .update .row-actions,.plugins .update .second,.plugins .updated .row-actions,.plugins .updated .second{padding-bottom:0}.plugins-php .widefat tfoot td,.plugins-php .widefat tfoot th{border-top-style:solid;border-top-width:1px}.plugin-update-tr .update-message{font-size:13px;font-weight:400;margin:0 31px 8px 10px;padding:6px 40px 8px 12px;background-color:#f7f7f7;background-color:rgba(0,0,0,.03)}.plugin-card .install-now:before,.plugin-card .update-now:before,.plugin-update-tr .update-message:before{color:#d54e21;display:inline-block;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}.plugin-card .update-now:before,.plugin-update-tr .update-message:before{content:"\f463"}.plugin-update-tr .update-message:before{margin:0 -30px 0 10px}.plugin-card .install-now:before,.plugin-card .update-now:before{margin:3px -2px 0 5px}.plugin-card .updating-message:before,.plugin-update-tr .updating-message:before{content:"\f463";-webkit-animation:rotation 2s infinite linear;animation:rotation 2s infinite linear}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(-359deg);transform:rotate(-359deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(-359deg);transform:rotate(-359deg)}}.plugin-card .updated-message:before,.plugin-update-tr .updated-message:before{color:#79ba49;content:"\f147"}.wp-list-table.plugins tbody tr.plugin-update-tr td.plugin-update{overflow:hidden;padding:0;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}tr.active+tr.plugin-update-tr .plugin-update{background-color:#f7fcfe}tr.active+tr.plugin-update-tr:not(.updated) .plugin-update .update-message{background-color:#fcf3ef}.plugin-install-php h2{clear:both}.plugin-install-php h3{margin:2.5em 0 8px}.plugin-install-php .wp-filter{margin-bottom:0}.plugin-group{overflow:hidden;margin-top:1.5em}.plugin-group h3{margin-top:0}.plugin-card{float:right;margin:0 8px 16px;width:48.5%;width:-webkit-calc(50% - 8px);width:calc(50% - 8px);background-color:#fff;border:1px solid #ddd;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.plugin-card:nth-child(odd){clear:both;margin-right:0}.plugin-card:nth-child(even){margin-left:0}@media screen and (min-width:1600px){.plugin-card{width:30%;width:-webkit-calc(33.1% - 8px);width:calc(33.1% - 8px)}.plugin-card:nth-child(odd){clear:none;margin-right:8px}.plugin-card:nth-child(even){margin-left:8px}.plugin-card:nth-child(3n+1){clear:both;margin-right:0}.plugin-card:nth-child(3n){margin-left:0}}.plugin-card-top{position:relative;padding:20px 20px 10px;min-height:135px}.plugin-action-buttons,div.action-links{margin:0}.plugin-card h3{margin:0 0 12px;font-size:18px;line-height:1.3}.plugin-card .desc,.plugin-card .name{margin-right:148px;margin-left:120px}.plugin-card .action-links{position:absolute;top:20px;left:20px;width:120px}.plugin-action-buttons{clear:left;float:left;margin-right:2em;margin-bottom:1em;text-align:left}.plugin-action-buttons li{margin-bottom:10px}.plugin-card-bottom{clear:both;padding:12px 20px;background-color:#fafafa;border-top:1px solid #ddd;overflow:hidden}.plugin-card-bottom .star-rating{display:inline}.plugin-card-update-failed .update-now{font-weight:600}.plugin-card-update-failed .notice-error{margin:0;padding-right:16px;-webkit-box-shadow:0 -1px 0 #ddd;box-shadow:0 -1px 0 #ddd}.plugin-card-update-failed .plugin-card-bottom{display:none}.plugin-card .column-rating{line-height:23px}.plugin-card .column-rating,.plugin-card .column-updated{margin-bottom:4px}.plugin-card .column-downloaded,.plugin-card .column-rating{float:right;clear:right;max-width:180px}.plugin-card .column-compatibility,.plugin-card .column-updated{text-align:left;float:left;clear:left;width:65%;width:-webkit-calc(100% - 180px);width:calc(100% - 180px)}.plugin-card .column-compatibility span:before{font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;right:-2px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}.plugin-card .compatibility-incompatible:before{content:"\f158"}.plugin-card .compatibility-compatible:before{content:"\f147"}.plugin-icon{position:absolute;top:20px;right:20px;width:128px;height:128px;margin:0 0 20px 20px}.no-plugin-results{color:#666;font-size:18px;font-style:normal;margin:0;padding:100px 0 0;text-align:center}.wp-list-table .site-deleted,.wp-list-table tr.site-deleted{background:#ff8573}.wp-list-table .site-spammed,.wp-list-table tr.site-spammed{background:#faafaa}.wp-list-table .site-archived,.wp-list-table tr.site-archived{background:#ffebe8}.wp-list-table .site-mature,.wp-list-table tr.site-mature{background:#fecac2}.sites.fixed .column-lastupdated,.sites.fixed .column-registered{width:20%}.sites.fixed .column-users{width:80px}@media screen and (max-width:1100px) and (min-width:782px),(max-width:480px){.plugin-card .action-links{position:static;margin-right:148px;width:auto}.plugin-action-buttons{float:none;margin:1em 0 0;text-align:right}.plugin-action-buttons li{display:inline-block;vertical-align:middle}.plugin-action-buttons li .button{margin-left:20px}.plugin-card .desc,.plugin-card .name{margin-left:0}.plugin-card .desc p:first-of-type{margin-top:0}.fixed .column-date{width:14%}}@media screen and (max-width:782px){.plugins #the-list tr td,.plugins tr.active+tr.inactive td,.plugins tr.active+tr.inactive th.check-column{border-top:none}.tablenav{height:auto}.tablenav.top{margin:20px 0 5px}.tablenav.bottom{position:relative;margin-top:15px}.tablenav br{display:none}.tablenav br.clear{display:block}.form-wrap>p,.tablenav .view-switch,.tablenav.top .actions,.tablenav.top .displaying-num,.tablenav.top .tablenav-pages.one-page{display:none}.view-switch a{width:36px;height:36px;line-height:33px}.tablenav.bottom .displaying-num{position:absolute;left:0;top:11px;margin:0;font-size:14px}.tablenav .tablenav-pages{width:100%;height:auto;text-align:center;margin:0 0 25px}.tablenav.bottom .tablenav-pages{margin-top:25px}.tablenav.bottom .tablenav-pages.one-page{margin:15px 0 0;height:0}.tablenav-pages .pagination-links{font-size:16px}.tablenav-pages .pagination-links a,.tablenav-pages-navspan{padding:9px 11px 12px;font-size:18px}.tablenav-pages-navspan{height:18px}.tablenav-pages .pagination-links .current-page{padding:8px 9px 9px;font-size:16px}.comment-count{font-size:14px}.wp-list-table th.column-primary~th,.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-primary~td:not(.check-column){display:none}.wp-list-table thead th.column-primary{width:100%}.wp-list-table tr th.check-column{display:table-cell;width:35px}.wp-list-table .column-primary .toggle-row{display:block}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.check-column){position:relative;clear:both;display:block;width:auto!important}.wp-list-table td.column-primary{padding-left:50px}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-primary~td:not(.check-column){padding:3px 35% 3px 8px}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.column-primary)::before{position:absolute;right:10px;display:block;overflow:hidden;width:32%;content:attr(data-colname);white-space:nowrap;text-overflow:ellipsis}.wp-list-table .is-expanded td:not(.hidden){display:block!important;overflow:hidden}.column-posts,.widefat .num{text-align:right}#comments-form .fixed .column-author,#commentsdiv .fixed .column-author{display:none!important}.fixed .column-comment .comment-author{display:block}#the-comment-list .is-expanded td{-webkit-box-shadow:none;box-shadow:none}#the-comment-list .is-expanded td:last-child{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.post-com-count .screen-reader-text{position:static;width:auto;height:auto;margin:0}.column-comments .post-com-count-approved:after,.column-comments .post-com-count-no-comments:after,.column-response .post-com-count-approved:after,.column-response .post-com-count-no-comments:after{content:none}.column-comments .post-com-count [aria-hidden=true],.column-response .post-com-count [aria-hidden=true]{display:none}#edithead label,.column-comments .post-com-count-wrapper>a,.column-response .post-com-count-wrapper>a{display:block}.column-comments .post-com-count-wrapper,.column-response .post-com-count-wrapper{white-space:normal}.column-comments .post-com-count-approved,.column-comments .post-com-count-no-comments,.column-response .post-com-count-approved,.column-response .post-com-count-no-comments{margin-top:0;margin-left:.5em}.column-comments .post-com-count-pending,.column-response .post-com-count-pending{position:static;height:auto;min-width:0;padding:0;border:none;-webkit-border-radius:0;border-radius:0;background:0 0;color:#bb2a2a;font-size:inherit;line-height:inherit;text-align:right}.column-comments .post-com-count-pending:hover,.column-response .post-com-count-pending:hover{color:#dc3232}.widefat tfoot td.check-column,.widefat thead td.check-column{padding-top:10px}.widefat *{word-wrap:normal}#wpbody-content .bulk-edit-row .inline-edit-col-bottom,#wpbody-content .bulk-edit-row .inline-edit-col-left,#wpbody-content .bulk-edit-row-page .inline-edit-col-right,#wpbody-content .bulk-edit-row-post .inline-edit-col-right,#wpbody-content .inline-edit-row-post .inline-edit-col-center,#wpbody-content .quick-edit-row-page .inline-edit-col-left,#wpbody-content .quick-edit-row-page .inline-edit-col-right,#wpbody-content .quick-edit-row-post .inline-edit-col-left,#wpbody-content .quick-edit-row-post .inline-edit-col-right{float:none;width:100%}#wpbody-content .bulk-edit-row fieldset .inline-edit-col label,#wpbody-content .bulk-edit-row fieldset .inline-edit-group label,#wpbody-content .quick-edit-row fieldset .inline-edit-col label,#wpbody-content .quick-edit-row fieldset .inline-edit-group label{max-width:none;float:none;margin-bottom:5px}#wpbody .bulk-edit-row fieldset select{display:block;width:100%;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.inline-edit-row #bulk-titles div,.inline-edit-row fieldset ul.cat-checklist label{font-size:16px}.inline-edit-row fieldset label span.title,.inline-edit-row fieldset.inline-edit-date legend{float:none}.inline-edit-row fieldset label.inline-edit-tags{padding:0 .5em}.inline-edit-row fieldset .inline-edit-col label.inline-edit-tags{padding:0}.inline-edit-row fieldset .timestamp-wrap,.inline-edit-row fieldset label span.input-text-wrap{margin-right:0}.inline-edit-row fieldset input[name=hh],.inline-edit-row fieldset input[name=jj],.inline-edit-row fieldset input[name=mn]{width:3em}.inline-edit-row fieldset input[name=aa]{width:4.5em}.inline-edit-row .inline-edit-or{margin:0 0 0 6px}#commentsdiv #edithead .inside,#edithead .inside{float:none;text-align:right;padding:3px 5px}#commentsdiv #edithead .inside input,#edithead .inside input{width:100%}#bulk-titles div{margin:.8em .3em}.plugin-card,.plugin-update-tr .update-message{margin-right:0}#bulk-titles div a{height:22px}#wpbody-content .updates-table .plugin-title{width:auto;white-space:normal}.link-manager-php #posts-filter{margin-top:25px}.link-manager-php .tablenav.bottom{overflow:hidden}.comments-box .toggle-row,.wp-list-table.plugins .toggle-row{display:none}#wpbody-content .wp-list-table.plugins td{display:block;width:auto;padding:10px 9px}#wpbody-content .wp-list-table.plugins .column-description{padding-top:2px}#wpbody-content .wp-list-table.plugins .plugin-title,#wpbody-content .wp-list-table.plugins .theme-title{padding-left:12px;white-space:normal}.wp-list-table.plugins .plugin-title,.wp-list-table.plugins .theme-title{padding-top:13px;padding-bottom:4px}.plugins #the-list .update td,.plugins #the-list .update th,.plugins #the-list tr>td:not(:last-child),.wp-list-table.plugins #the-list .theme-title{-webkit-box-shadow:none;box-shadow:none;border-top:none}.plugins tbody{padding:1px 0 0}.plugins .plugin-update-tr:before,.plugins tr.active+tr.inactive td.column-description,.plugins tr.active+tr.inactive th.check-column{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugins .plugin-update-tr:before{content:"";display:table-cell}.plugins .active.update+.plugin-update-tr:before{border-right:4px solid #d54e21;background-color:#fef7f1}.plugins #the-list .plugin-update-tr .plugin-update{border-right:none}.wp-list-table.plugins .plugin-title strong,.wp-list-table.plugins .theme-title strong{font-size:1.4em;line-height:1.5}table.plugin-install .column-description,table.plugin-install .column-name,table.plugin-install .column-rating,table.plugin-install .column-version{display:block;width:auto}table.plugin-install th.column-description,table.plugin-install th.column-name,table.plugin-install th.column-rating,table.plugin-install th.column-version{display:none}table.plugin-install td.column-name strong{font-size:1.4em;line-height:1.6em}table.plugin-install #the-list td{-webkit-box-shadow:none;box-shadow:none}table.plugin-install #the-list tr{display:block;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugin-card{margin-left:0;width:100%}}
\ No newline at end of file
+.response-links{display:block;margin-bottom:1em}.response-links a{display:block}.response-links a.comments-edit-item-link{font-weight:600}.response-links a.comments-view-item-link{font-size:12px}.post-com-count-wrapper strong{font-weight:400}.comments-view-item-link{display:inline-block;clear:both}.column-comments .post-com-count-wrapper,.column-response .post-com-count-wrapper{white-space:nowrap;word-wrap:normal}.column-comments .post-com-count,.column-response .post-com-count{display:inline-block;vertical-align:top}.column-comments .post-com-count-approved,.column-comments .post-com-count-no-comments,.column-response .post-com-count-approved,.column-response .post-com-count-no-comments{margin-top:5px}.column-comments .comment-count-approved,.column-comments .comment-count-no-comments,.column-response .comment-count-approved,.column-response .comment-count-no-comments{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;padding:0 8px;min-width:24px;height:2em;-webkit-border-radius:5px;border-radius:5px;background-color:#72777c;color:#fff;font-size:11px;line-height:21px;text-align:center}.ie8 .column-comments .comment-count-approved,.ie8 .column-comments .comment-count-no-comments,.ie8 .column-response .comment-count-approved,.ie8 .column-response .comment-count-no-comments{min-width:0}.column-comments .post-com-count-approved:after,.column-comments .post-com-count-no-comments:after,.column-response .post-com-count-approved:after,.column-response .post-com-count-no-comments:after{content:"";display:block;margin-right:8px;width:0;height:0;border-top:5px solid #72777c;border-left:5px solid transparent}.column-comments .post-com-count-approved:focus .comment-count-approved,.column-comments .post-com-count-approved:hover .comment-count-approved,.column-response .post-com-count-approved:focus .comment-count-approved,.column-response .post-com-count-approved:hover .comment-count-approved{background:#0073aa}.column-comments .post-com-count-approved:focus:after,.column-comments .post-com-count-approved:hover:after,.column-response .post-com-count-approved:focus:after,.column-response .post-com-count-approved:hover:after{border-top-color:#0073aa}.column-comments .post-com-count-pending,.column-response .post-com-count-pending{position:relative;right:-3px;padding:0 5px;min-width:7px;height:17px;border:2px solid #fff;-webkit-border-radius:11px;border-radius:11px;background:#ca4a1f;color:#fff;font-size:9px;line-height:17px;text-align:center}.column-comments .post-com-count-no-pending,.column-response .post-com-count-no-pending{display:none}.commentlist li{padding:1em 1em .2em;margin:0;border-bottom:1px solid #ccc}.commentlist li li{border-bottom:0;padding:0}.commentlist p{padding:0;margin:0 0 .8em}#submitted-on,.submitted-on{color:#555d66}#replyrow td{padding:2px}#replysubmit{margin:0;padding:5px 7px 10px;overflow:hidden;text-align:center}#replysubmit .button{margin-left:5px}#replysubmit .error{color:red;line-height:21px;text-align:center}#replyrow.inline-edit-row fieldset.comment-reply{font-size:inherit;line-height:inherit}#replyrow legend{margin:0;padding:.2em 5px 0;font-size:13px;line-height:1.4;font-weight:600}#replyrow.inline-edit-row label{display:inline;vertical-align:baseline;line-height:inherit}#commentsdiv #edithead .inside,#edithead .inside{float:right;padding:3px 5px 2px 0;margin:0;text-align:center}#edithead .inside input{width:180px}#edithead label{padding:2px 0}#replycontainer{padding:5px}#replycontent{height:120px;-webkit-box-shadow:none;box-shadow:none}#replyerror{border-color:#ddd;background-color:#f9f9f9}.commentlist .avatar{vertical-align:text-top}#the-comment-list div.undo,#the-comment-list tr.undo{background-color:#f5f5f5}#the-comment-list .unapproved td,#the-comment-list .unapproved th{background-color:#fef7f1}#the-comment-list .unapproved th.check-column{border-right:4px solid #d54e21}#the-comment-list .unapproved th.check-column input{margin-right:4px}#the-comment-list .approve a{color:#006505}#the-comment-list .unapprove a{color:#d98500}#the-comment-list td,#the-comment-list th{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}#the-comment-list tr:last-child td,#the-comment-list tr:last-child th{-webkit-box-shadow:none;box-shadow:none}#the-comment-list tr.unapproved+tr.approved td,#the-comment-list tr.unapproved+tr.approved th{border-top:1px solid rgba(0,0,0,.03)}.vim-current,.vim-current td,.vim-current th{background-color:#e4f2fd!important}th .comment-grey-bubble{height:16px;width:16px}th .comment-grey-bubble:before{content:"\f101";font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;right:-4px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}table.fixed{table-layout:fixed}.fixed .column-rating,.fixed .column-visible{width:8%}.fixed .column-author,.fixed .column-date,.fixed .column-format,.fixed .column-links,.fixed .column-parent,.fixed .column-posts{width:10%}.fixed .column-posts{width:74px}.fixed .column-comment .comment-author{display:none}.fixed .column-categories,.fixed .column-rel,.fixed .column-response,.fixed .column-role,.fixed .column-tags{width:15%}.fixed .column-slug{width:25%}.fixed .column-locations{width:35%}.fixed .column-comments{width:5.5em;padding:8px 0;text-align:right}.fixed .column-comments .vers{padding-right:3px}td.column-title strong,td.plugin-title strong{display:block;margin-bottom:.2em;font-size:14px}td.column-title p,td.plugin-title p{margin:6px 0}table.media .column-title .media-icon{float:right;min-height:60px;margin:0 0 0 9px}table.media .column-title .media-icon img{max-width:60px;height:auto;vertical-align:top}table.media .column-title .has-media-icon~.row-actions{margin-right:70px}table.media .column-title .filename{margin-bottom:.2em}.wp-list-table a{-webkit-transition:none;transition:none}#the-list tr:last-child td,#the-list tr:last-child th{border-bottom:none!important;-webkit-box-shadow:none;box-shadow:none}#comments-form .fixed .column-author{width:20%}#comments-form .fixed .column-date{width:14%}#commentsdiv.postbox .inside{margin:0;padding:0}#commentsdiv .inside .row-actions{line-height:18px}#commentsdiv .inside .column-author{width:25%}#commentsdiv .column-comment p{margin:.6em 0;padding:0}#commentsdiv #replyrow td{padding:0}#commentsdiv p{padding:8px 10px;margin:0}#commentsdiv .comments-box{border:0}#commentsdiv .comments-box thead td,#commentsdiv .comments-box thead th{background:0 0;padding:0 7px 4px;font-style:italic}#commentsdiv .comments-box tr:last-child td{border-bottom:0 none}#commentsdiv #edithead .inside input{width:160px}.sorting-indicator{display:block;visibility:hidden;width:10px;height:4px;margin-top:8px;margin-right:7px}.sorting-indicator:before{content:"\f142";font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0;top:-4px;right:-8px;line-height:10px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}.column-comments .sorting-indicator:before{top:0;right:-10px}th.desc a:focus span.sorting-indicator:before,th.desc:hover span.sorting-indicator:before,th.sorted.asc .sorting-indicator:before{content:"\f142"}th.asc a:focus span.sorting-indicator:before,th.asc:hover span.sorting-indicator:before,th.sorted.desc .sorting-indicator:before{content:"\f140"}.wp-list-table .toggle-row{position:absolute;left:8px;top:10px;display:none;padding:0;width:40px;height:40px;border:none;outline:0;background:0 0}.wp-list-table .toggle-row:hover{cursor:pointer}.wp-list-table .toggle-row:focus:before{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 .wp-list-table .toggle-row:focus:before{outline:#5b9dd9 solid 1px}.wp-list-table .toggle-row:active{-webkit-box-shadow:none;box-shadow:none}.wp-list-table .toggle-row:before{position:absolute;top:-5px;right:10px;-webkit-border-radius:50%;border-radius:50%;display:block;padding:1px 0 1px 2px;color:#444;content:"\f140";font:400 20px/1 dashicons;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none}.wp-list-table .is-expanded .toggle-row:before{content:"\f142"}tr.wp-locked .locked-indicator{margin-right:6px;height:20px;width:16px}tr.wp-locked .locked-indicator:before{color:#82878c;content:"\f160";display:inline-block;float:right;font:400 20px/1 dashicons;speak:none;vertical-align:middle;margin-right:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}tr.wp-locked .check-column input[type=checkbox],tr.wp-locked .check-column label,tr.wp-locked .row-actions .inline,tr.wp-locked .row-actions .trash{display:none}tr .locked-info{height:0;opacity:0}tr.wp-locked .locked-info{margin-top:8px;height:auto;opacity:1}.locked-text{vertical-align:top}tr.locked-info,tr.wp-locked .locked-info{-webkit-transition:height 1s,opacity .5s;transition:height 1s,opacity .5s}.fixed .column-comments .sorting-indicator{margin-top:3px}#menu-locations-wrap .widefat{width:60%}.widefat th.sortable,.widefat th.sorted{padding:0}th.sortable a,th.sorted a{display:block;overflow:hidden;padding:8px}.fixed .column-comments.sortable a,.fixed .column-comments.sorted a{padding:8px 0}th.sortable a span,th.sorted a span{float:right;cursor:pointer}th.asc a:focus span.sorting-indicator,th.asc:hover span.sorting-indicator,th.desc a:focus span.sorting-indicator,th.desc:hover span.sorting-indicator,th.sorted .sorting-indicator{visibility:visible}.tablenav-pages a,.tablenav-pages-navspan{font-weight:600;padding:0 2px}.tablenav-pages .current-page{margin:0 0 0 2px;padding-bottom:5px;font-size:13px;text-align:center}.tablenav .total-pages{margin-left:2px}.tablenav #table-paging{margin-right:2px}.tablenav a.button-secondary{display:block;margin:3px 0 0 8px}.tablenav{clear:both;height:30px;margin:6px 0 4px;vertical-align:middle}.tablenav.themes{max-width:98%}.tablenav .tablenav-pages{float:left;height:28px;margin-top:3px;cursor:default;color:#555}.tablenav .no-pages,.tablenav .one-page .pagination-links{display:none}.tablenav .tablenav-pages a,.tablenav-pages span.current{text-decoration:none;padding:3px 6px}.tablenav .tablenav-pages a,.tablenav-pages-navspan{display:inline-block;min-width:17px;border:1px solid #ccc;padding:3px 5px 7px;background:#e5e5e5;font-size:16px;line-height:1;font-weight:400;text-align:center}.tablenav-pages-navspan{height:16px;border-color:#ddd;background:#f7f7f7;color:#a0a5aa}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover{border-color:#5b9dd9;color:#fff;background:#00a0d2;-webkit-box-shadow:none;box-shadow:none;outline:0}.tablenav .displaying-num{margin-left:7px}.tablenav .one-page .displaying-num{display:inline-block;margin-top:5px;margin-left:0}.tablenav .actions{overflow:hidden;padding:2px 0 0 8px}.wp-filter .actions{display:inline-block;vertical-align:middle}.tablenav .delete{margin-left:20px}.tablenav .dots{border-color:transparent}.tablenav .next,.tablenav .prev{border-color:transparent;color:#0073aa}.tablenav .next:hover,.tablenav .prev:hover{border-color:transparent;color:#00a0d2}.tablenav .view-switch{float:left;margin:0 5px;padding-top:3px}.wp-filter .view-switch{display:inline-block;vertical-align:middle;padding:12px 0;margin:0 2px 0 8px}.media-toolbar.wp-filter .view-switch{margin:0 2px 0 12px}.view-switch a{float:right;width:28px;height:28px;text-align:center;line-height:24px;text-decoration:none}.view-switch a:before{color:#b4b9be;display:inline-block;font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.view-switch a:focus:before,.view-switch a:hover:before{color:#727272}.view-switch a.current:before{color:#0073aa}.view-switch .view-list:before{content:"\f163"}.view-switch .view-excerpt:before{content:"\f164"}.view-switch .view-grid:before{content:"\f509"}.filter{float:right;margin:-5px 10px 0 0}.filter .subsubsub{margin-right:-10px;margin-top:13px}.screen-per-page{width:4em}#posts-filter .wp-filter{margin-bottom:0}#posts-filter fieldset{float:right;margin:0 0 1em 1.5ex;padding:0}#posts-filter fieldset legend{padding:0 1px .2em 0}.row-actions,.row-actions-visible{padding:2px 0 0}p.pagenav{margin:0;display:inline}.pagenav span{font-weight:600;margin:0 6px}.row-title{font-size:14px!important;font-weight:600}.column-comment .comment-author{margin-bottom:.6em}.column-author img,.column-comment .comment-author img,.column-username img{float:right;margin-left:10px;margin-top:1px}.row-actions{color:#ddd;font-size:13px;position:relative;right:-9999em}.plugins,.plugins td,.plugins th,.row-actions .network_active,.row-actions .network_only{color:#000}.rtl .row-actions a{display:inline-block}.comment-item:hover .row-actions,.mobile .row-actions,.no-js .row-actions,.row-actions.visible,tr:hover .row-actions{position:static}#wpbody-content .inline-edit-row fieldset{font-size:12px;float:right;margin:0;padding:0;width:100%}#wpbody-content .inline-edit-row fieldset .inline-edit-col,tr.inline-edit-row td{padding:0 .5em}#wpbody-content .quick-edit-row-post .inline-edit-col-left{width:40%}#wpbody-content .quick-edit-row-post .inline-edit-col-right{width:39%}#wpbody-content .inline-edit-row-post .inline-edit-col-center{width:20%}#wpbody-content .quick-edit-row-page .inline-edit-col-left{width:50%}#wpbody-content .bulk-edit-row-post .inline-edit-col-right,#wpbody-content .quick-edit-row-page .inline-edit-col-right{width:49%}#wpbody-content .bulk-edit-row .inline-edit-col-left{width:30%}#wpbody-content .bulk-edit-row-page .inline-edit-col-right{width:69%}#wpbody-content .bulk-edit-row .inline-edit-col-bottom{float:left;width:69%}#wpbody-content .inline-edit-row-page .inline-edit-col-right{margin-top:27px}.inline-edit-row fieldset .inline-edit-group{clear:both;line-height:2.5}.inline-edit-row p.submit{clear:both;padding:.5em;margin:.5em 0 0}.inline-edit-row span.error{line-height:22px;margin:0 15px;padding:3px 5px}#the-list .inline-edit-row .inline-edit-legend{margin:0;padding:.2em .5em 0;line-height:2.5;font-weight:600}#the-list #bulk-edit.inline-edit-row .inline-edit-legend{padding:.2em .5em}.inline-edit-row fieldset span.checkbox-title,.inline-edit-row fieldset span.title{margin:0;padding:0;font-style:italic}.inline-edit-row fieldset label,.inline-edit-row fieldset span.inline-edit-categories-label{display:block;margin:.2em 0;line-height:2.5}.inline-edit-row fieldset.inline-edit-date label{display:inline-block;margin:0;line-height:1.5;vertical-align:baseline}.inline-edit-row fieldset label.inline-edit-tags{margin-top:0}.inline-edit-row fieldset label.inline-edit-tags span.title{margin:.2em 0;width:auto}.inline-edit-row fieldset label span.title,.inline-edit-row fieldset.inline-edit-date legend{display:block;float:right;width:6em;line-height:2.5}#posts-filter fieldset.inline-edit-date legend{padding:0}.inline-edit-row fieldset.inline-edit-date select{margin:1px;line-height:28px}.inline-edit-row fieldset .timestamp-wrap,.inline-edit-row fieldset label span.input-text-wrap{display:block;margin-right:6em}.quick-edit-row-post fieldset.inline-edit-col-right label span.title{width:auto;padding-left:.5em}.inline-edit-row .inline-edit-or{margin:.2em 0 .2em 6px;line-height:2.5}.inline-edit-row .input-text-wrap input[type=text]{width:100%}.inline-edit-row fieldset label input[type=checkbox]{vertical-align:middle}.inline-edit-row fieldset label textarea{width:100%;height:4em;vertical-align:top}#bulk-titles,ul.cat-checklist{height:12em;border:1px solid #ddd;overflow-y:scroll;padding:0 5px}#wpbody-content .bulk-edit-row fieldset .inline-edit-group label{max-width:50%}#wpbody-content .quick-edit-row fieldset .inline-edit-group label.alignleft:first-child{margin-left:.5em}.inline-edit-col-right .input-text-wrap input.inline-edit-menu-order-input{width:6em}.inline-edit-row .inline-edit-legend{text-transform:uppercase}.inline-edit-row fieldset .inline-edit-date{float:right}.inline-edit-row fieldset input[name=hh],.inline-edit-row fieldset input[name=jj],.inline-edit-row fieldset input[name=mn]{font-size:12px;width:2.3em}.inline-edit-row fieldset input[name=aa]{font-size:12px;width:3.5em}.inline-edit-row fieldset label input.inline-edit-password-input{width:8em}ul.cat-checklist{margin:0;background-color:#fff}#bulk-titles{display:block;margin:0 0 5px;line-height:140%}.inline-edit-row fieldset ul.cat-checklist input,.inline-edit-row fieldset ul.cat-checklist li{margin:0;position:relative}.inline-edit-row #bulk-titles div,.inline-edit-row fieldset ul.cat-checklist label{font-style:normal;font-size:11px}.inline-edit-row fieldset label input.inline-edit-menu-order-input{width:3em}.inline-edit-row fieldset label input.inline-edit-slug-input{width:75%}.inline-edit-row #post_parent,.inline-edit-row select[name=page_template]{max-width:80%}.ie8 .inline-edit-row #post_parent,.ie8 .inline-edit-row select[name=page_template]{width:250px}.quick-edit-row-post fieldset label.inline-edit-status{float:right}#bulk-titles div{margin:.2em .3em}#bulk-titles div a{cursor:pointer;display:block;float:right;height:18px;margin:0 -2px 0 3px;overflow:hidden;position:relative;width:20px}#bulk-titles div a:before{position:relative;top:-3px}.plugins tbody,.plugins tbody th.check-column{padding:8px 2px 0 0}.plugins tbody th.check-column input[type=checkbox]{margin-top:4px}.updates-table .plugin-title p{margin-top:0}.plugins .inactive th.check-column,.plugins tfoot td.check-column,.plugins thead td.check-column{padding-right:6px}.plugins tr{background:#fff}.plugins p{margin:0 4px;padding:0}.plugins .desc p{margin:0 0 8px}.plugins td.desc{line-height:1.5em}.plugins .desc ol,.plugins .desc ul{margin:0 2em 0 0}.plugins .desc ul{list-style-type:disc}.plugins .row-actions{font-size:13px}.plugins .active td,.plugins .active th,.plugins .inactive td,.plugins .inactive th{padding:10px 9px}.plugins .active td,.plugins .active th{background-color:#f7fcfe}.plugins .update td,.plugins .update th{border-bottom:0}.plugin-install #the-list td,.plugins .active td,.plugins .active th,.plugins .inactive td,.plugins .inactive th,.upgrade .plugins td,.upgrade .plugins th{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugins tr.active+tr.inactive td,.plugins tr.active+tr.inactive th,.plugins tr.active.plugin-update-tr+tr.inactive td,.plugins tr.active.plugin-update-tr+tr.inactive th{border-top:1px solid rgba(0,0,0,.03);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1;box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1}.plugins .update td,.plugins .update th,.plugins .updated td,.plugins .updated th,.plugins tr.active+tr.inactive.update td,.plugins tr.active+tr.inactive.update th,.plugins tr.active+tr.inactive.updated td,.plugins tr.active+tr.inactive.updated th,.upgrade .plugins tr:last-of-type td,.upgrade .plugins tr:last-of-type th{-webkit-box-shadow:none;box-shadow:none}.plugin-update-tr.active td,.plugins .active th.check-column{border-right:4px solid #00a0d2}#wpbody-content .plugins .plugin-title,#wpbody-content .plugins .theme-title{padding-left:12px;white-space:nowrap}.updates-table-screenshot{float:right;padding:0 0 5px 10px}.plugins .inactive .plugin-title strong{font-weight:400}.plugins .row-actions,.plugins .second{padding:0 0 5px}.plugins .update .row-actions,.plugins .update .second,.plugins .updated .row-actions,.plugins .updated .second{padding-bottom:0}.plugins-php .widefat tfoot td,.plugins-php .widefat tfoot th{border-top-style:solid;border-top-width:1px}.plugins .plugin-update-tr .plugin-update{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);overflow:hidden;padding:0}.plugins .plugin-update-tr .notice,.plugins .plugin-update-tr div[class=update-message]{margin:5px 40px 15px 20px}.plugins .notice p{margin:.5em 0}.plugin-card .update-now:before{color:#f56e28;content:"\f463";display:inline-block;font:400 20px/1 dashicons;margin:3px -2px 0 5px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}.plugin-card .updating-message:before{content:"\f463";-webkit-animation:rotation 2s infinite linear;animation:rotation 2s infinite linear}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(-359deg);transform:rotate(-359deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(-359deg);transform:rotate(-359deg)}}.plugin-card .updated-message:before{color:#79ba49;content:"\f147"}.plugin-install-php h2{clear:both}.plugin-install-php h3{margin:2.5em 0 8px}.plugin-install-php .wp-filter{margin-bottom:0}.plugin-group{overflow:hidden;margin-top:1.5em}.plugin-group h3{margin-top:0}.plugin-card{float:right;margin:0 8px 16px;width:48.5%;width:-webkit-calc(50% - 8px);width:calc(50% - 8px);background-color:#fff;border:1px solid #ddd;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.plugin-card:nth-child(odd){clear:both;margin-right:0}.plugin-card:nth-child(even){margin-left:0}@media screen and (min-width:1600px){.plugin-card{width:30%;width:-webkit-calc(33.1% - 8px);width:calc(33.1% - 8px)}.plugin-card:nth-child(odd){clear:none;margin-right:8px}.plugin-card:nth-child(even){margin-left:8px}.plugin-card:nth-child(3n+1){clear:both;margin-right:0}.plugin-card:nth-child(3n){margin-left:0}}.plugin-card-top{position:relative;padding:20px 20px 10px;min-height:135px}.plugin-action-buttons,div.action-links{margin:0}.plugin-card h3{margin:0 0 12px;font-size:18px;line-height:1.3}.plugin-card .desc,.plugin-card .name{margin-right:148px;margin-left:120px}.plugin-card .action-links{position:absolute;top:20px;left:20px;width:120px}.plugin-action-buttons{clear:left;float:left;margin-right:2em;margin-bottom:1em;text-align:left}.plugin-action-buttons li{margin-bottom:10px}.plugin-card-bottom{clear:both;padding:12px 20px;background-color:#fafafa;border-top:1px solid #ddd;overflow:hidden}.plugin-card-bottom .star-rating{display:inline}.plugin-card-update-failed .update-now{font-weight:600}.plugin-card-update-failed .notice-error{margin:0;padding-right:16px;-webkit-box-shadow:0 -1px 0 #ddd;box-shadow:0 -1px 0 #ddd}.plugin-card-update-failed .plugin-card-bottom{display:none}.plugin-card .column-rating{line-height:23px}.plugin-card .column-rating,.plugin-card .column-updated{margin-bottom:4px}.plugin-card .column-downloaded,.plugin-card .column-rating{float:right;clear:right;max-width:180px}.plugin-card .column-compatibility,.plugin-card .column-updated{text-align:left;float:left;clear:left;width:65%;width:-webkit-calc(100% - 180px);width:calc(100% - 180px)}.plugin-card .column-compatibility span:before{font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;right:-2px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}.plugin-card .compatibility-incompatible:before{content:"\f158"}.plugin-card .compatibility-compatible:before{content:"\f147"}.plugin-icon{position:absolute;top:20px;right:20px;width:128px;height:128px;margin:0 0 20px 20px}.no-plugin-results{color:#666;font-size:18px;font-style:normal;margin:0;padding:100px 0 0;text-align:center}.wp-list-table .site-deleted,.wp-list-table tr.site-deleted{background:#ff8573}.wp-list-table .site-spammed,.wp-list-table tr.site-spammed{background:#faafaa}.wp-list-table .site-archived,.wp-list-table tr.site-archived{background:#ffebe8}.wp-list-table .site-mature,.wp-list-table tr.site-mature{background:#fecac2}.sites.fixed .column-lastupdated,.sites.fixed .column-registered{width:20%}.sites.fixed .column-users{width:80px}@media screen and (max-width:1100px) and (min-width:782px),(max-width:480px){.plugin-card .action-links{position:static;margin-right:148px;width:auto}.plugin-action-buttons{float:none;margin:1em 0 0;text-align:right}.plugin-action-buttons li{display:inline-block;vertical-align:middle}.plugin-action-buttons li .button{margin-left:20px}.plugin-card .desc,.plugin-card .name{margin-left:0}.plugin-card .desc p:first-of-type{margin-top:0}.fixed .column-date{width:14%}}@media screen and (max-width:782px){.plugins #the-list tr td,.plugins tr.active+tr.inactive td,.plugins tr.active+tr.inactive th.check-column{border-top:none}.tablenav{height:auto}.tablenav.top{margin:20px 0 5px}.tablenav.bottom{position:relative;margin-top:15px}.tablenav br{display:none}.tablenav br.clear{display:block}.form-wrap>p,.tablenav .view-switch,.tablenav.top .actions,.tablenav.top .displaying-num,.tablenav.top .tablenav-pages.one-page{display:none}.view-switch a{width:36px;height:36px;line-height:33px}.tablenav.bottom .displaying-num{position:absolute;left:0;top:11px;margin:0;font-size:14px}.tablenav .tablenav-pages{width:100%;height:auto;text-align:center;margin:0 0 25px}.tablenav.bottom .tablenav-pages{margin-top:25px}.tablenav.bottom .tablenav-pages.one-page{margin:15px 0 0;height:0}.tablenav-pages .pagination-links{font-size:16px}.tablenav-pages .pagination-links a,.tablenav-pages-navspan{padding:9px 11px 12px;font-size:18px}.tablenav-pages-navspan{height:18px}.tablenav-pages .pagination-links .current-page{padding:8px 9px 9px;font-size:16px}.comment-count{font-size:14px}.wp-list-table th.column-primary~th,.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-primary~td:not(.check-column){display:none}.wp-list-table thead th.column-primary{width:100%}.wp-list-table tr th.check-column{display:table-cell;width:35px}.wp-list-table .column-primary .toggle-row{display:block}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.check-column){position:relative;clear:both;display:block;width:auto!important}.wp-list-table td.column-primary{padding-left:50px}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-primary~td:not(.check-column){padding:3px 35% 3px 8px}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.column-primary)::before{position:absolute;right:10px;display:block;overflow:hidden;width:32%;content:attr(data-colname);white-space:nowrap;text-overflow:ellipsis}.wp-list-table .is-expanded td:not(.hidden){display:block!important;overflow:hidden}.column-posts,.widefat .num{text-align:right}#comments-form .fixed .column-author,#commentsdiv .fixed .column-author{display:none!important}.fixed .column-comment .comment-author{display:block}#the-comment-list .is-expanded td{-webkit-box-shadow:none;box-shadow:none}#the-comment-list .is-expanded td:last-child{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.post-com-count .screen-reader-text{position:static;width:auto;height:auto;margin:0}.column-comments .post-com-count-approved:after,.column-comments .post-com-count-no-comments:after,.column-response .post-com-count-approved:after,.column-response .post-com-count-no-comments:after{content:none}.column-comments .post-com-count [aria-hidden=true],.column-response .post-com-count [aria-hidden=true]{display:none}#edithead label,.column-comments .post-com-count-wrapper>a,.column-response .post-com-count-wrapper>a{display:block}.column-comments .post-com-count-wrapper,.column-response .post-com-count-wrapper{white-space:normal}.column-comments .post-com-count-approved,.column-comments .post-com-count-no-comments,.column-response .post-com-count-approved,.column-response .post-com-count-no-comments{margin-top:0;margin-left:.5em}.column-comments .post-com-count-pending,.column-response .post-com-count-pending{position:static;height:auto;min-width:0;padding:0;border:none;-webkit-border-radius:0;border-radius:0;background:0 0;color:#bb2a2a;font-size:inherit;line-height:inherit;text-align:right}.column-comments .post-com-count-pending:hover,.column-response .post-com-count-pending:hover{color:#dc3232}.widefat tfoot td.check-column,.widefat thead td.check-column{padding-top:10px}.widefat *{word-wrap:normal}#wpbody-content .bulk-edit-row .inline-edit-col-bottom,#wpbody-content .bulk-edit-row .inline-edit-col-left,#wpbody-content .bulk-edit-row-page .inline-edit-col-right,#wpbody-content .bulk-edit-row-post .inline-edit-col-right,#wpbody-content .inline-edit-row-post .inline-edit-col-center,#wpbody-content .quick-edit-row-page .inline-edit-col-left,#wpbody-content .quick-edit-row-page .inline-edit-col-right,#wpbody-content .quick-edit-row-post .inline-edit-col-left,#wpbody-content .quick-edit-row-post .inline-edit-col-right{float:none;width:100%}#wpbody-content .bulk-edit-row fieldset .inline-edit-col label,#wpbody-content .bulk-edit-row fieldset .inline-edit-group label,#wpbody-content .quick-edit-row fieldset .inline-edit-col label,#wpbody-content .quick-edit-row fieldset .inline-edit-group label{max-width:none;float:none;margin-bottom:5px}#wpbody .bulk-edit-row fieldset select{display:block;width:100%;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.inline-edit-row #bulk-titles div,.inline-edit-row fieldset ul.cat-checklist label{font-size:16px}.inline-edit-row fieldset label span.title,.inline-edit-row fieldset.inline-edit-date legend{float:none}.inline-edit-row fieldset label.inline-edit-tags{padding:0 .5em}.inline-edit-row fieldset .inline-edit-col label.inline-edit-tags{padding:0}.inline-edit-row fieldset .timestamp-wrap,.inline-edit-row fieldset label span.input-text-wrap{margin-right:0}.inline-edit-row fieldset input[name=hh],.inline-edit-row fieldset input[name=jj],.inline-edit-row fieldset input[name=mn]{width:3em}.inline-edit-row fieldset input[name=aa]{width:4.5em}.inline-edit-row .inline-edit-or{margin:0 0 0 6px}#commentsdiv #edithead .inside,#edithead .inside{float:none;text-align:right;padding:3px 5px}#commentsdiv #edithead .inside input,#edithead .inside input{width:100%}#bulk-titles div{margin:.8em .3em}.plugin-card,.plugin-update-tr .update-message,.plugins .plugin-update-tr .update-message{margin-right:0}#bulk-titles div a{height:22px}#wpbody-content .updates-table .plugin-title{width:auto;white-space:normal}.link-manager-php #posts-filter{margin-top:25px}.link-manager-php .tablenav.bottom{overflow:hidden}.comments-box .toggle-row,.wp-list-table.plugins .toggle-row{display:none}#wpbody-content .wp-list-table.plugins td{display:block;width:auto;padding:10px 9px}#wpbody-content .wp-list-table.plugins .column-description{padding-top:2px}#wpbody-content .wp-list-table.plugins .plugin-title,#wpbody-content .wp-list-table.plugins .theme-title{padding-left:12px;white-space:normal}.wp-list-table.plugins .plugin-title,.wp-list-table.plugins .theme-title{padding-top:13px;padding-bottom:4px}.plugins #the-list .update td,.plugins #the-list .update th,.plugins #the-list tr>td:not(:last-child),.wp-list-table.plugins #the-list .theme-title{-webkit-box-shadow:none;box-shadow:none;border-top:none}.plugins tbody{padding:1px 0 0}.plugins .plugin-update-tr:before,.plugins tr.active+tr.inactive td.column-description,.plugins tr.active+tr.inactive th.check-column{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugins .plugin-update-tr:before{content:"";display:table-cell}.plugins #the-list .plugin-update-tr .plugin-update{border-right:none}.plugins .active.update+.plugin-update-tr:before{background-color:#f7fcfe;border-right:4px solid #00a0d2}.wp-list-table.plugins .plugin-title strong,.wp-list-table.plugins .theme-title strong{font-size:1.4em;line-height:1.5}table.plugin-install .column-description,table.plugin-install .column-name,table.plugin-install .column-rating,table.plugin-install .column-version{display:block;width:auto}table.plugin-install th.column-description,table.plugin-install th.column-name,table.plugin-install th.column-rating,table.plugin-install th.column-version{display:none}table.plugin-install td.column-name strong{font-size:1.4em;line-height:1.6em}table.plugin-install #the-list td{-webkit-box-shadow:none;box-shadow:none}table.plugin-install #the-list tr{display:block;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugin-card{margin-left:0;width:100%}}@media screen and (max-width:480px){.tablenav-pages .current-page{margin:0}.tablenav-pages .tablenav-paging-text{float:right;width:100%;padding-top:.5em}}
\ No newline at end of file
index d9d2d4595db48146b89b5c0d637391fd9033722c..b66f0c0d8431368661b153130829c314f662e89c 100644 (file)
@@ -700,7 +700,7 @@ th.asc a:focus span.sorting-indicator {
        background: #e5e5e5;
        font-size: 16px;
        line-height: 1;
-       font-weight: normal;
+       font-weight: 400;
        text-align: center;
 }
 
@@ -1271,10 +1271,6 @@ ul.cat-checklist {
        border-bottom: 0;
 }
 
-.plugin-update-tr td {
-       border-top: 0;
-}
-
 .plugins .inactive td,
 .plugins .inactive th,
 .plugins .active td,
@@ -1309,22 +1305,11 @@ ul.cat-checklist {
        box-shadow: none;
 }
 
-.plugins .active.update td,
-.plugins .active.update th,
-tr.active.update + tr.plugin-update-tr .plugin-update {
-       background-color: #fef7f1;
-}
-
 .plugins .active th.check-column,
 .plugin-update-tr.active td {
        border-left: 4px solid #00a0d2;
 }
 
-.plugins .active.update th.check-column,
-.plugins .active.update + .plugin-update-tr .plugin-update {
-       border-left: 4px solid #d54e21;
-}
-
 #wpbody-content .plugins .plugin-title,
 #wpbody-content .plugins .theme-title {
        padding-right: 12px;
@@ -1358,42 +1343,34 @@ tr.active.update + tr.plugin-update-tr .plugin-update {
        border-top-width: 1px;
 }
 
-.plugin-update-tr .update-message {
-       font-size: 13px;
-       font-weight: normal;
-       margin: 0 10px 8px 31px;
-       padding: 6px 12px 8px 40px;
-       background-color: #f7f7f7;
-       background-color: rgba(0,0,0,0.03);
+.plugins .plugin-update-tr .plugin-update {
+       -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1);
+       box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1);
+       overflow: hidden; /* clearfix */
+       padding: 0;
 }
 
-.plugin-update-tr .update-message:before,
-.plugin-card .update-now:before,
-.plugin-card .install-now:before {
-       color: #d54e21;
+.plugins .plugin-update-tr .notice,
+.plugins .plugin-update-tr div[class="update-message"] { /* back-compat for pre-4.6 */
+       margin: 5px 20px 15px 40px;
+}
+
+.plugins .notice p {
+       margin: 0.5em 0;
+}
+
+.plugin-card .update-now:before {
+       color: #f56e28;
+       content: "\f463";
        display: inline-block;
        font: normal 20px/1 dashicons;
+       margin: 3px 5px 0 -2px;
        speak: none;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        vertical-align: top;
 }
 
-.plugin-update-tr .update-message:before,
-.plugin-card .update-now:before {
-       content: "\f463";
-}
-
-.plugin-update-tr .update-message:before {
-       margin: 0 10px 0 -30px;
-}
-
-.plugin-card .update-now:before,
-.plugin-card .install-now:before {
-       margin: 3px 5px 0 -2px;
-}
-
-.plugin-update-tr .updating-message:before,
 .plugin-card .updating-message:before {
        content: "\f463";
        -webkit-animation: rotation 2s infinite linear;
@@ -1422,28 +1399,11 @@ tr.active.update + tr.plugin-update-tr .plugin-update {
        }
 }
 
-.plugin-update-tr .updated-message:before,
 .plugin-card .updated-message:before {
        color: #79ba49;
        content: "\f147";
 }
 
-.wp-list-table.plugins tbody tr.plugin-update-tr td.plugin-update {
-       overflow: hidden; /* clearfix */
-       padding: 0;
-       -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1);
-       box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1);
-}
-
-/* update notices for active plugins */
-tr.active + tr.plugin-update-tr .plugin-update {
-       background-color: #f7fcfe;
-}
-
-tr.active + tr.plugin-update-tr:not(.updated) .plugin-update .update-message {
-       background-color: #fcf3ef;
-}
-
 .plugin-install-php h2 {
        clear: both;
 }
@@ -2140,6 +2100,15 @@ div.action-links,
                margin-left: 0;
        }
 
+       .plugins .active.update + .plugin-update-tr:before {
+               background-color: #f7fcfe;
+               border-left: 4px solid #00a0d2;
+       }
+
+       .plugins .plugin-update-tr .update-message {
+               margin-left: 0;
+       }
+
        .wp-list-table.plugins .plugin-title strong,
        .wp-list-table.plugins .theme-title strong {
                font-size: 1.4em;
@@ -2184,3 +2153,15 @@ div.action-links,
                width: 100%;
        }
 }
+
+@media screen and ( max-width: 480px ) {
+       .tablenav-pages .current-page {
+               margin: 0;
+       }
+
+       .tablenav-pages .tablenav-paging-text {
+               float: left;
+               width: 100%;
+               padding-top: 0.5em;
+       }
+}
index dab2c99edf75869994f7c2fb995236dcc65df101..cb07782ac97551ea4751726664a63a17069e2073 100644 (file)
@@ -1 +1 @@
-.response-links{display:block;margin-bottom:1em}.response-links a{display:block}.response-links a.comments-edit-item-link{font-weight:600}.response-links a.comments-view-item-link{font-size:12px}.post-com-count-wrapper strong{font-weight:400}.comments-view-item-link{display:inline-block;clear:both}.column-comments .post-com-count-wrapper,.column-response .post-com-count-wrapper{white-space:nowrap;word-wrap:normal}.column-comments .post-com-count,.column-response .post-com-count{display:inline-block;vertical-align:top}.column-comments .post-com-count-approved,.column-comments .post-com-count-no-comments,.column-response .post-com-count-approved,.column-response .post-com-count-no-comments{margin-top:5px}.column-comments .comment-count-approved,.column-comments .comment-count-no-comments,.column-response .comment-count-approved,.column-response .comment-count-no-comments{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;padding:0 8px;min-width:24px;height:2em;-webkit-border-radius:5px;border-radius:5px;background-color:#72777c;color:#fff;font-size:11px;line-height:21px;text-align:center}.ie8 .column-comments .comment-count-approved,.ie8 .column-comments .comment-count-no-comments,.ie8 .column-response .comment-count-approved,.ie8 .column-response .comment-count-no-comments{min-width:0}.column-comments .post-com-count-approved:after,.column-comments .post-com-count-no-comments:after,.column-response .post-com-count-approved:after,.column-response .post-com-count-no-comments:after{content:"";display:block;margin-left:8px;width:0;height:0;border-top:5px solid #72777c;border-right:5px solid transparent}.column-comments .post-com-count-approved:focus .comment-count-approved,.column-comments .post-com-count-approved:hover .comment-count-approved,.column-response .post-com-count-approved:focus .comment-count-approved,.column-response .post-com-count-approved:hover .comment-count-approved{background:#0073aa}.column-comments .post-com-count-approved:focus:after,.column-comments .post-com-count-approved:hover:after,.column-response .post-com-count-approved:focus:after,.column-response .post-com-count-approved:hover:after{border-top-color:#0073aa}.column-comments .post-com-count-pending,.column-response .post-com-count-pending{position:relative;left:-3px;padding:0 5px;min-width:7px;height:17px;border:2px solid #fff;-webkit-border-radius:11px;border-radius:11px;background:#ca4a1f;color:#fff;font-size:9px;line-height:17px;text-align:center}.column-comments .post-com-count-no-pending,.column-response .post-com-count-no-pending{display:none}.commentlist li{padding:1em 1em .2em;margin:0;border-bottom:1px solid #ccc}.commentlist li li{border-bottom:0;padding:0}.commentlist p{padding:0;margin:0 0 .8em}#submitted-on,.submitted-on{color:#555d66}#replyrow td{padding:2px}#replysubmit{margin:0;padding:5px 7px 10px;overflow:hidden;text-align:center}#replysubmit .button{margin-right:5px}#replysubmit .error{color:red;line-height:21px;text-align:center}#replyrow.inline-edit-row fieldset.comment-reply{font-size:inherit;line-height:inherit}#replyrow legend{margin:0;padding:.2em 5px 0;font-size:13px;line-height:1.4;font-weight:600}#replyrow.inline-edit-row label{display:inline;vertical-align:baseline;line-height:inherit}#commentsdiv #edithead .inside,#edithead .inside{float:left;padding:3px 0 2px 5px;margin:0;text-align:center}#edithead .inside input{width:180px}#edithead label{padding:2px 0}#replycontainer{padding:5px}#replycontent{height:120px;-webkit-box-shadow:none;box-shadow:none}#replyerror{border-color:#ddd;background-color:#f9f9f9}.commentlist .avatar{vertical-align:text-top}#the-comment-list div.undo,#the-comment-list tr.undo{background-color:#f5f5f5}#the-comment-list .unapproved td,#the-comment-list .unapproved th{background-color:#fef7f1}#the-comment-list .unapproved th.check-column{border-left:4px solid #d54e21}#the-comment-list .unapproved th.check-column input{margin-left:4px}#the-comment-list .approve a{color:#006505}#the-comment-list .unapprove a{color:#d98500}#the-comment-list td,#the-comment-list th{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}#the-comment-list tr:last-child td,#the-comment-list tr:last-child th{-webkit-box-shadow:none;box-shadow:none}#the-comment-list tr.unapproved+tr.approved td,#the-comment-list tr.unapproved+tr.approved th{border-top:1px solid rgba(0,0,0,.03)}.vim-current,.vim-current td,.vim-current th{background-color:#e4f2fd!important}th .comment-grey-bubble{height:16px;width:16px}th .comment-grey-bubble:before{content:"\f101";font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;left:-4px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}table.fixed{table-layout:fixed}.fixed .column-rating,.fixed .column-visible{width:8%}.fixed .column-author,.fixed .column-date,.fixed .column-format,.fixed .column-links,.fixed .column-parent,.fixed .column-posts{width:10%}.fixed .column-posts{width:74px}.fixed .column-comment .comment-author{display:none}.fixed .column-categories,.fixed .column-rel,.fixed .column-response,.fixed .column-role,.fixed .column-tags{width:15%}.fixed .column-slug{width:25%}.fixed .column-locations{width:35%}.fixed .column-comments{width:5.5em;padding:8px 0;text-align:left}.fixed .column-comments .vers{padding-left:3px}td.column-title strong,td.plugin-title strong{display:block;margin-bottom:.2em;font-size:14px}td.column-title p,td.plugin-title p{margin:6px 0}table.media .column-title .media-icon{float:left;min-height:60px;margin:0 9px 0 0}table.media .column-title .media-icon img{max-width:60px;height:auto;vertical-align:top}table.media .column-title .has-media-icon~.row-actions{margin-left:70px}table.media .column-title .filename{margin-bottom:.2em}.wp-list-table a{-webkit-transition:none;transition:none}#the-list tr:last-child td,#the-list tr:last-child th{border-bottom:none!important;-webkit-box-shadow:none;box-shadow:none}#comments-form .fixed .column-author{width:20%}#comments-form .fixed .column-date{width:14%}#commentsdiv.postbox .inside{margin:0;padding:0}#commentsdiv .inside .row-actions{line-height:18px}#commentsdiv .inside .column-author{width:25%}#commentsdiv .column-comment p{margin:.6em 0;padding:0}#commentsdiv #replyrow td{padding:0}#commentsdiv p{padding:8px 10px;margin:0}#commentsdiv .comments-box{border:0}#commentsdiv .comments-box thead td,#commentsdiv .comments-box thead th{background:0 0;padding:0 7px 4px;font-style:italic}#commentsdiv .comments-box tr:last-child td{border-bottom:0 none}#commentsdiv #edithead .inside input{width:160px}.sorting-indicator{display:block;visibility:hidden;width:10px;height:4px;margin-top:8px;margin-left:7px}.sorting-indicator:before{content:"\f142";font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0;top:-4px;left:-8px;line-height:10px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}.column-comments .sorting-indicator:before{top:0;left:-10px}th.desc a:focus span.sorting-indicator:before,th.desc:hover span.sorting-indicator:before,th.sorted.asc .sorting-indicator:before{content:"\f142"}th.asc a:focus span.sorting-indicator:before,th.asc:hover span.sorting-indicator:before,th.sorted.desc .sorting-indicator:before{content:"\f140"}.wp-list-table .toggle-row{position:absolute;right:8px;top:10px;display:none;padding:0;width:40px;height:40px;border:none;outline:0;background:0 0}.wp-list-table .toggle-row:hover{cursor:pointer}.wp-list-table .toggle-row:focus:before{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 .wp-list-table .toggle-row:focus:before{outline:#5b9dd9 solid 1px}.wp-list-table .toggle-row:active{-webkit-box-shadow:none;box-shadow:none}.wp-list-table .toggle-row:before{position:absolute;top:-5px;left:10px;-webkit-border-radius:50%;border-radius:50%;display:block;padding:1px 2px 1px 0;color:#444;content:"\f140";font:400 20px/1 dashicons;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none}.wp-list-table .is-expanded .toggle-row:before{content:"\f142"}tr.wp-locked .locked-indicator{margin-left:6px;height:20px;width:16px}tr.wp-locked .locked-indicator:before{color:#82878c;content:"\f160";display:inline-block;float:left;font:400 20px/1 dashicons;speak:none;vertical-align:middle;margin-left:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}tr.wp-locked .check-column input[type=checkbox],tr.wp-locked .check-column label,tr.wp-locked .row-actions .inline,tr.wp-locked .row-actions .trash{display:none}tr .locked-info{height:0;opacity:0}tr.wp-locked .locked-info{margin-top:8px;height:auto;opacity:1}.locked-text{vertical-align:top}tr.locked-info,tr.wp-locked .locked-info{-webkit-transition:height 1s,opacity .5s;transition:height 1s,opacity .5s}.fixed .column-comments .sorting-indicator{margin-top:3px}#menu-locations-wrap .widefat{width:60%}.widefat th.sortable,.widefat th.sorted{padding:0}th.sortable a,th.sorted a{display:block;overflow:hidden;padding:8px}.fixed .column-comments.sortable a,.fixed .column-comments.sorted a{padding:8px 0}th.sortable a span,th.sorted a span{float:left;cursor:pointer}th.asc a:focus span.sorting-indicator,th.asc:hover span.sorting-indicator,th.desc a:focus span.sorting-indicator,th.desc:hover span.sorting-indicator,th.sorted .sorting-indicator{visibility:visible}.tablenav-pages a,.tablenav-pages-navspan{font-weight:600;padding:0 2px}.tablenav-pages .current-page{margin:0 2px 0 0;padding-bottom:5px;font-size:13px;text-align:center}.tablenav .total-pages{margin-right:2px}.tablenav #table-paging{margin-left:2px}.tablenav a.button-secondary{display:block;margin:3px 8px 0 0}.tablenav{clear:both;height:30px;margin:6px 0 4px;vertical-align:middle}.tablenav.themes{max-width:98%}.tablenav .tablenav-pages{float:right;height:28px;margin-top:3px;cursor:default;color:#555}.tablenav .no-pages,.tablenav .one-page .pagination-links{display:none}.tablenav .tablenav-pages a,.tablenav-pages span.current{text-decoration:none;padding:3px 6px}.tablenav .tablenav-pages a,.tablenav-pages-navspan{display:inline-block;min-width:17px;border:1px solid #ccc;padding:3px 5px 7px;background:#e5e5e5;font-size:16px;line-height:1;font-weight:400;text-align:center}.tablenav-pages-navspan{height:16px;border-color:#ddd;background:#f7f7f7;color:#a0a5aa}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover{border-color:#5b9dd9;color:#fff;background:#00a0d2;-webkit-box-shadow:none;box-shadow:none;outline:0}.tablenav .displaying-num{margin-right:7px}.tablenav .one-page .displaying-num{display:inline-block;margin-top:5px;margin-right:0}.tablenav .actions{overflow:hidden;padding:2px 8px 0 0}.wp-filter .actions{display:inline-block;vertical-align:middle}.tablenav .delete{margin-right:20px}.tablenav .dots{border-color:transparent}.tablenav .next,.tablenav .prev{border-color:transparent;color:#0073aa}.tablenav .next:hover,.tablenav .prev:hover{border-color:transparent;color:#00a0d2}.tablenav .view-switch{float:right;margin:0 5px;padding-top:3px}.wp-filter .view-switch{display:inline-block;vertical-align:middle;padding:12px 0;margin:0 8px 0 2px}.media-toolbar.wp-filter .view-switch{margin:0 12px 0 2px}.view-switch a{float:left;width:28px;height:28px;text-align:center;line-height:24px;text-decoration:none}.view-switch a:before{color:#b4b9be;display:inline-block;font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.view-switch a:focus:before,.view-switch a:hover:before{color:#727272}.view-switch a.current:before{color:#0073aa}.view-switch .view-list:before{content:"\f163"}.view-switch .view-excerpt:before{content:"\f164"}.view-switch .view-grid:before{content:"\f509"}.filter{float:left;margin:-5px 0 0 10px}.filter .subsubsub{margin-left:-10px;margin-top:13px}.screen-per-page{width:4em}#posts-filter .wp-filter{margin-bottom:0}#posts-filter fieldset{float:left;margin:0 1.5ex 1em 0;padding:0}#posts-filter fieldset legend{padding:0 0 .2em 1px}.row-actions,.row-actions-visible{padding:2px 0 0}p.pagenav{margin:0;display:inline}.pagenav span{font-weight:600;margin:0 6px}.row-title{font-size:14px!important;font-weight:600}.column-comment .comment-author{margin-bottom:.6em}.column-author img,.column-comment .comment-author img,.column-username img{float:left;margin-right:10px;margin-top:1px}.row-actions{color:#ddd;font-size:13px;position:relative;left:-9999em}.plugins,.plugins td,.plugins th,.row-actions .network_active,.row-actions .network_only{color:#000}.rtl .row-actions a{display:inline-block}.comment-item:hover .row-actions,.mobile .row-actions,.no-js .row-actions,.row-actions.visible,tr:hover .row-actions{position:static}#wpbody-content .inline-edit-row fieldset{font-size:12px;float:left;margin:0;padding:0;width:100%}#wpbody-content .inline-edit-row fieldset .inline-edit-col,tr.inline-edit-row td{padding:0 .5em}#wpbody-content .quick-edit-row-post .inline-edit-col-left{width:40%}#wpbody-content .quick-edit-row-post .inline-edit-col-right{width:39%}#wpbody-content .inline-edit-row-post .inline-edit-col-center{width:20%}#wpbody-content .quick-edit-row-page .inline-edit-col-left{width:50%}#wpbody-content .bulk-edit-row-post .inline-edit-col-right,#wpbody-content .quick-edit-row-page .inline-edit-col-right{width:49%}#wpbody-content .bulk-edit-row .inline-edit-col-left{width:30%}#wpbody-content .bulk-edit-row-page .inline-edit-col-right{width:69%}#wpbody-content .bulk-edit-row .inline-edit-col-bottom{float:right;width:69%}#wpbody-content .inline-edit-row-page .inline-edit-col-right{margin-top:27px}.inline-edit-row fieldset .inline-edit-group{clear:both;line-height:2.5}.inline-edit-row p.submit{clear:both;padding:.5em;margin:.5em 0 0}.inline-edit-row span.error{line-height:22px;margin:0 15px;padding:3px 5px}#the-list .inline-edit-row .inline-edit-legend{margin:0;padding:.2em .5em 0;line-height:2.5;font-weight:600}#the-list #bulk-edit.inline-edit-row .inline-edit-legend{padding:.2em .5em}.inline-edit-row fieldset span.checkbox-title,.inline-edit-row fieldset span.title{margin:0;padding:0;font-style:italic}.inline-edit-row fieldset label,.inline-edit-row fieldset span.inline-edit-categories-label{display:block;margin:.2em 0;line-height:2.5}.inline-edit-row fieldset.inline-edit-date label{display:inline-block;margin:0;line-height:1.5;vertical-align:baseline}.inline-edit-row fieldset label.inline-edit-tags{margin-top:0}.inline-edit-row fieldset label.inline-edit-tags span.title{margin:.2em 0;width:auto}.inline-edit-row fieldset label span.title,.inline-edit-row fieldset.inline-edit-date legend{display:block;float:left;width:6em;line-height:2.5}#posts-filter fieldset.inline-edit-date legend{padding:0}.inline-edit-row fieldset.inline-edit-date select{margin:1px;line-height:28px}.inline-edit-row fieldset .timestamp-wrap,.inline-edit-row fieldset label span.input-text-wrap{display:block;margin-left:6em}.quick-edit-row-post fieldset.inline-edit-col-right label span.title{width:auto;padding-right:.5em}.inline-edit-row .inline-edit-or{margin:.2em 6px .2em 0;line-height:2.5}.inline-edit-row .input-text-wrap input[type=text]{width:100%}.inline-edit-row fieldset label input[type=checkbox]{vertical-align:middle}.inline-edit-row fieldset label textarea{width:100%;height:4em;vertical-align:top}#bulk-titles,ul.cat-checklist{height:12em;border:1px solid #ddd;overflow-y:scroll;padding:0 5px}#wpbody-content .bulk-edit-row fieldset .inline-edit-group label{max-width:50%}#wpbody-content .quick-edit-row fieldset .inline-edit-group label.alignleft:first-child{margin-right:.5em}.inline-edit-col-right .input-text-wrap input.inline-edit-menu-order-input{width:6em}.inline-edit-row .inline-edit-legend{text-transform:uppercase}.inline-edit-row fieldset .inline-edit-date{float:left}.inline-edit-row fieldset input[name=hh],.inline-edit-row fieldset input[name=jj],.inline-edit-row fieldset input[name=mn]{font-size:12px;width:2.3em}.inline-edit-row fieldset input[name=aa]{font-size:12px;width:3.5em}.inline-edit-row fieldset label input.inline-edit-password-input{width:8em}ul.cat-checklist{margin:0;background-color:#fff}#bulk-titles{display:block;margin:0 0 5px;line-height:140%}.inline-edit-row fieldset ul.cat-checklist input,.inline-edit-row fieldset ul.cat-checklist li{margin:0;position:relative}.inline-edit-row #bulk-titles div,.inline-edit-row fieldset ul.cat-checklist label{font-style:normal;font-size:11px}.inline-edit-row fieldset label input.inline-edit-menu-order-input{width:3em}.inline-edit-row fieldset label input.inline-edit-slug-input{width:75%}.inline-edit-row #post_parent,.inline-edit-row select[name=page_template]{max-width:80%}.ie8 .inline-edit-row #post_parent,.ie8 .inline-edit-row select[name=page_template]{width:250px}.quick-edit-row-post fieldset label.inline-edit-status{float:left}#bulk-titles div{margin:.2em .3em}#bulk-titles div a{cursor:pointer;display:block;float:left;height:18px;margin:0 3px 0 -2px;overflow:hidden;position:relative;width:20px}#bulk-titles div a:before{position:relative;top:-3px}.plugins tbody,.plugins tbody th.check-column{padding:8px 0 0 2px}.plugins tbody th.check-column input[type=checkbox]{margin-top:4px}.updates-table .plugin-title p{margin-top:0}.plugins .inactive th.check-column,.plugins tfoot td.check-column,.plugins thead td.check-column{padding-left:6px}.plugins tr{background:#fff}.plugins p{margin:0 4px;padding:0}.plugins .desc p{margin:0 0 8px}.plugins td.desc{line-height:1.5em}.plugins .desc ol,.plugins .desc ul{margin:0 0 0 2em}.plugins .desc ul{list-style-type:disc}.plugins .row-actions{font-size:13px}.plugins .active td,.plugins .active th,.plugins .inactive td,.plugins .inactive th{padding:10px 9px}.plugins .active td,.plugins .active th{background-color:#f7fcfe}.plugins .update td,.plugins .update th{border-bottom:0}.plugin-update-tr td{border-top:0}.plugin-install #the-list td,.plugins .active td,.plugins .active th,.plugins .inactive td,.plugins .inactive th,.upgrade .plugins td,.upgrade .plugins th{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugins tr.active+tr.inactive td,.plugins tr.active+tr.inactive th,.plugins tr.active.plugin-update-tr+tr.inactive td,.plugins tr.active.plugin-update-tr+tr.inactive th{border-top:1px solid rgba(0,0,0,.03);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1;box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1}.plugins .update td,.plugins .update th,.plugins .updated td,.plugins .updated th,.plugins tr.active+tr.inactive.update td,.plugins tr.active+tr.inactive.update th,.plugins tr.active+tr.inactive.updated td,.plugins tr.active+tr.inactive.updated th,.upgrade .plugins tr:last-of-type td,.upgrade .plugins tr:last-of-type th{-webkit-box-shadow:none;box-shadow:none}.plugins .active.update td,.plugins .active.update th,tr.active.update+tr.plugin-update-tr .plugin-update{background-color:#fef7f1}.plugin-update-tr.active td,.plugins .active th.check-column{border-left:4px solid #00a0d2}.plugins .active.update th.check-column,.plugins .active.update+.plugin-update-tr .plugin-update{border-left:4px solid #d54e21}#wpbody-content .plugins .plugin-title,#wpbody-content .plugins .theme-title{padding-right:12px;white-space:nowrap}.updates-table-screenshot{float:left;padding:0 10px 5px 0}.plugins .inactive .plugin-title strong{font-weight:400}.plugins .row-actions,.plugins .second{padding:0 0 5px}.plugins .update .row-actions,.plugins .update .second,.plugins .updated .row-actions,.plugins .updated .second{padding-bottom:0}.plugins-php .widefat tfoot td,.plugins-php .widefat tfoot th{border-top-style:solid;border-top-width:1px}.plugin-update-tr .update-message{font-size:13px;font-weight:400;margin:0 10px 8px 31px;padding:6px 12px 8px 40px;background-color:#f7f7f7;background-color:rgba(0,0,0,.03)}.plugin-card .install-now:before,.plugin-card .update-now:before,.plugin-update-tr .update-message:before{color:#d54e21;display:inline-block;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}.plugin-card .update-now:before,.plugin-update-tr .update-message:before{content:"\f463"}.plugin-update-tr .update-message:before{margin:0 10px 0 -30px}.plugin-card .install-now:before,.plugin-card .update-now:before{margin:3px 5px 0 -2px}.plugin-card .updating-message:before,.plugin-update-tr .updating-message:before{content:"\f463";-webkit-animation:rotation 2s infinite linear;animation:rotation 2s infinite linear}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.plugin-card .updated-message:before,.plugin-update-tr .updated-message:before{color:#79ba49;content:"\f147"}.wp-list-table.plugins tbody tr.plugin-update-tr td.plugin-update{overflow:hidden;padding:0;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}tr.active+tr.plugin-update-tr .plugin-update{background-color:#f7fcfe}tr.active+tr.plugin-update-tr:not(.updated) .plugin-update .update-message{background-color:#fcf3ef}.plugin-install-php h2{clear:both}.plugin-install-php h3{margin:2.5em 0 8px}.plugin-install-php .wp-filter{margin-bottom:0}.plugin-group{overflow:hidden;margin-top:1.5em}.plugin-group h3{margin-top:0}.plugin-card{float:left;margin:0 8px 16px;width:48.5%;width:-webkit-calc(50% - 8px);width:calc(50% - 8px);background-color:#fff;border:1px solid #ddd;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.plugin-card:nth-child(odd){clear:both;margin-left:0}.plugin-card:nth-child(even){margin-right:0}@media screen and (min-width:1600px){.plugin-card{width:30%;width:-webkit-calc(33.1% - 8px);width:calc(33.1% - 8px)}.plugin-card:nth-child(odd){clear:none;margin-left:8px}.plugin-card:nth-child(even){margin-right:8px}.plugin-card:nth-child(3n+1){clear:both;margin-left:0}.plugin-card:nth-child(3n){margin-right:0}}.plugin-card-top{position:relative;padding:20px 20px 10px;min-height:135px}.plugin-action-buttons,div.action-links{margin:0}.plugin-card h3{margin:0 0 12px;font-size:18px;line-height:1.3}.plugin-card .desc,.plugin-card .name{margin-left:148px;margin-right:120px}.plugin-card .action-links{position:absolute;top:20px;right:20px;width:120px}.plugin-action-buttons{clear:right;float:right;margin-left:2em;margin-bottom:1em;text-align:right}.plugin-action-buttons li{margin-bottom:10px}.plugin-card-bottom{clear:both;padding:12px 20px;background-color:#fafafa;border-top:1px solid #ddd;overflow:hidden}.plugin-card-bottom .star-rating{display:inline}.plugin-card-update-failed .update-now{font-weight:600}.plugin-card-update-failed .notice-error{margin:0;padding-left:16px;-webkit-box-shadow:0 -1px 0 #ddd;box-shadow:0 -1px 0 #ddd}.plugin-card-update-failed .plugin-card-bottom{display:none}.plugin-card .column-rating{line-height:23px}.plugin-card .column-rating,.plugin-card .column-updated{margin-bottom:4px}.plugin-card .column-downloaded,.plugin-card .column-rating{float:left;clear:left;max-width:180px}.plugin-card .column-compatibility,.plugin-card .column-updated{text-align:right;float:right;clear:right;width:65%;width:-webkit-calc(100% - 180px);width:calc(100% - 180px)}.plugin-card .column-compatibility span:before{font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;left:-2px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}.plugin-card .compatibility-incompatible:before{content:"\f158"}.plugin-card .compatibility-compatible:before{content:"\f147"}.plugin-icon{position:absolute;top:20px;left:20px;width:128px;height:128px;margin:0 20px 20px 0}.no-plugin-results{color:#666;font-size:18px;font-style:normal;margin:0;padding:100px 0 0;text-align:center}.wp-list-table .site-deleted,.wp-list-table tr.site-deleted{background:#ff8573}.wp-list-table .site-spammed,.wp-list-table tr.site-spammed{background:#faafaa}.wp-list-table .site-archived,.wp-list-table tr.site-archived{background:#ffebe8}.wp-list-table .site-mature,.wp-list-table tr.site-mature{background:#fecac2}.sites.fixed .column-lastupdated,.sites.fixed .column-registered{width:20%}.sites.fixed .column-users{width:80px}@media screen and (max-width:1100px) and (min-width:782px),(max-width:480px){.plugin-card .action-links{position:static;margin-left:148px;width:auto}.plugin-action-buttons{float:none;margin:1em 0 0;text-align:left}.plugin-action-buttons li{display:inline-block;vertical-align:middle}.plugin-action-buttons li .button{margin-right:20px}.plugin-card .desc,.plugin-card .name{margin-right:0}.plugin-card .desc p:first-of-type{margin-top:0}.fixed .column-date{width:14%}}@media screen and (max-width:782px){.plugins #the-list tr td,.plugins tr.active+tr.inactive td,.plugins tr.active+tr.inactive th.check-column{border-top:none}.tablenav{height:auto}.tablenav.top{margin:20px 0 5px}.tablenav.bottom{position:relative;margin-top:15px}.tablenav br{display:none}.tablenav br.clear{display:block}.form-wrap>p,.tablenav .view-switch,.tablenav.top .actions,.tablenav.top .displaying-num,.tablenav.top .tablenav-pages.one-page{display:none}.view-switch a{width:36px;height:36px;line-height:33px}.tablenav.bottom .displaying-num{position:absolute;right:0;top:11px;margin:0;font-size:14px}.tablenav .tablenav-pages{width:100%;height:auto;text-align:center;margin:0 0 25px}.tablenav.bottom .tablenav-pages{margin-top:25px}.tablenav.bottom .tablenav-pages.one-page{margin:15px 0 0;height:0}.tablenav-pages .pagination-links{font-size:16px}.tablenav-pages .pagination-links a,.tablenav-pages-navspan{padding:9px 11px 12px;font-size:18px}.tablenav-pages-navspan{height:18px}.tablenav-pages .pagination-links .current-page{padding:8px 9px 9px;font-size:16px}.comment-count{font-size:14px}.wp-list-table th.column-primary~th,.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-primary~td:not(.check-column){display:none}.wp-list-table thead th.column-primary{width:100%}.wp-list-table tr th.check-column{display:table-cell;width:35px}.wp-list-table .column-primary .toggle-row{display:block}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.check-column){position:relative;clear:both;display:block;width:auto!important}.wp-list-table td.column-primary{padding-right:50px}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-primary~td:not(.check-column){padding:3px 8px 3px 35%}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.column-primary)::before{position:absolute;left:10px;display:block;overflow:hidden;width:32%;content:attr(data-colname);white-space:nowrap;text-overflow:ellipsis}.wp-list-table .is-expanded td:not(.hidden){display:block!important;overflow:hidden}.column-posts,.widefat .num{text-align:left}#comments-form .fixed .column-author,#commentsdiv .fixed .column-author{display:none!important}.fixed .column-comment .comment-author{display:block}#the-comment-list .is-expanded td{-webkit-box-shadow:none;box-shadow:none}#the-comment-list .is-expanded td:last-child{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.post-com-count .screen-reader-text{position:static;width:auto;height:auto;margin:0}.column-comments .post-com-count-approved:after,.column-comments .post-com-count-no-comments:after,.column-response .post-com-count-approved:after,.column-response .post-com-count-no-comments:after{content:none}.column-comments .post-com-count [aria-hidden=true],.column-response .post-com-count [aria-hidden=true]{display:none}#edithead label,.column-comments .post-com-count-wrapper>a,.column-response .post-com-count-wrapper>a{display:block}.column-comments .post-com-count-wrapper,.column-response .post-com-count-wrapper{white-space:normal}.column-comments .post-com-count-approved,.column-comments .post-com-count-no-comments,.column-response .post-com-count-approved,.column-response .post-com-count-no-comments{margin-top:0;margin-right:.5em}.column-comments .post-com-count-pending,.column-response .post-com-count-pending{position:static;height:auto;min-width:0;padding:0;border:none;-webkit-border-radius:0;border-radius:0;background:0 0;color:#bb2a2a;font-size:inherit;line-height:inherit;text-align:left}.column-comments .post-com-count-pending:hover,.column-response .post-com-count-pending:hover{color:#dc3232}.widefat tfoot td.check-column,.widefat thead td.check-column{padding-top:10px}.widefat *{word-wrap:normal}#wpbody-content .bulk-edit-row .inline-edit-col-bottom,#wpbody-content .bulk-edit-row .inline-edit-col-left,#wpbody-content .bulk-edit-row-page .inline-edit-col-right,#wpbody-content .bulk-edit-row-post .inline-edit-col-right,#wpbody-content .inline-edit-row-post .inline-edit-col-center,#wpbody-content .quick-edit-row-page .inline-edit-col-left,#wpbody-content .quick-edit-row-page .inline-edit-col-right,#wpbody-content .quick-edit-row-post .inline-edit-col-left,#wpbody-content .quick-edit-row-post .inline-edit-col-right{float:none;width:100%}#wpbody-content .bulk-edit-row fieldset .inline-edit-col label,#wpbody-content .bulk-edit-row fieldset .inline-edit-group label,#wpbody-content .quick-edit-row fieldset .inline-edit-col label,#wpbody-content .quick-edit-row fieldset .inline-edit-group label{max-width:none;float:none;margin-bottom:5px}#wpbody .bulk-edit-row fieldset select{display:block;width:100%;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.inline-edit-row #bulk-titles div,.inline-edit-row fieldset ul.cat-checklist label{font-size:16px}.inline-edit-row fieldset label span.title,.inline-edit-row fieldset.inline-edit-date legend{float:none}.inline-edit-row fieldset label.inline-edit-tags{padding:0 .5em}.inline-edit-row fieldset .inline-edit-col label.inline-edit-tags{padding:0}.inline-edit-row fieldset .timestamp-wrap,.inline-edit-row fieldset label span.input-text-wrap{margin-left:0}.inline-edit-row fieldset input[name=hh],.inline-edit-row fieldset input[name=jj],.inline-edit-row fieldset input[name=mn]{width:3em}.inline-edit-row fieldset input[name=aa]{width:4.5em}.inline-edit-row .inline-edit-or{margin:0 6px 0 0}#commentsdiv #edithead .inside,#edithead .inside{float:none;text-align:left;padding:3px 5px}#commentsdiv #edithead .inside input,#edithead .inside input{width:100%}#bulk-titles div{margin:.8em .3em}.plugin-card,.plugin-update-tr .update-message{margin-left:0}#bulk-titles div a{height:22px}#wpbody-content .updates-table .plugin-title{width:auto;white-space:normal}.link-manager-php #posts-filter{margin-top:25px}.link-manager-php .tablenav.bottom{overflow:hidden}.comments-box .toggle-row,.wp-list-table.plugins .toggle-row{display:none}#wpbody-content .wp-list-table.plugins td{display:block;width:auto;padding:10px 9px}#wpbody-content .wp-list-table.plugins .column-description{padding-top:2px}#wpbody-content .wp-list-table.plugins .plugin-title,#wpbody-content .wp-list-table.plugins .theme-title{padding-right:12px;white-space:normal}.wp-list-table.plugins .plugin-title,.wp-list-table.plugins .theme-title{padding-top:13px;padding-bottom:4px}.plugins #the-list .update td,.plugins #the-list .update th,.plugins #the-list tr>td:not(:last-child),.wp-list-table.plugins #the-list .theme-title{-webkit-box-shadow:none;box-shadow:none;border-top:none}.plugins tbody{padding:1px 0 0}.plugins .plugin-update-tr:before,.plugins tr.active+tr.inactive td.column-description,.plugins tr.active+tr.inactive th.check-column{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugins .plugin-update-tr:before{content:"";display:table-cell}.plugins .active.update+.plugin-update-tr:before{border-left:4px solid #d54e21;background-color:#fef7f1}.plugins #the-list .plugin-update-tr .plugin-update{border-left:none}.wp-list-table.plugins .plugin-title strong,.wp-list-table.plugins .theme-title strong{font-size:1.4em;line-height:1.5}table.plugin-install .column-description,table.plugin-install .column-name,table.plugin-install .column-rating,table.plugin-install .column-version{display:block;width:auto}table.plugin-install th.column-description,table.plugin-install th.column-name,table.plugin-install th.column-rating,table.plugin-install th.column-version{display:none}table.plugin-install td.column-name strong{font-size:1.4em;line-height:1.6em}table.plugin-install #the-list td{-webkit-box-shadow:none;box-shadow:none}table.plugin-install #the-list tr{display:block;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugin-card{margin-right:0;width:100%}}
\ No newline at end of file
+.response-links{display:block;margin-bottom:1em}.response-links a{display:block}.response-links a.comments-edit-item-link{font-weight:600}.response-links a.comments-view-item-link{font-size:12px}.post-com-count-wrapper strong{font-weight:400}.comments-view-item-link{display:inline-block;clear:both}.column-comments .post-com-count-wrapper,.column-response .post-com-count-wrapper{white-space:nowrap;word-wrap:normal}.column-comments .post-com-count,.column-response .post-com-count{display:inline-block;vertical-align:top}.column-comments .post-com-count-approved,.column-comments .post-com-count-no-comments,.column-response .post-com-count-approved,.column-response .post-com-count-no-comments{margin-top:5px}.column-comments .comment-count-approved,.column-comments .comment-count-no-comments,.column-response .comment-count-approved,.column-response .comment-count-no-comments{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;padding:0 8px;min-width:24px;height:2em;-webkit-border-radius:5px;border-radius:5px;background-color:#72777c;color:#fff;font-size:11px;line-height:21px;text-align:center}.ie8 .column-comments .comment-count-approved,.ie8 .column-comments .comment-count-no-comments,.ie8 .column-response .comment-count-approved,.ie8 .column-response .comment-count-no-comments{min-width:0}.column-comments .post-com-count-approved:after,.column-comments .post-com-count-no-comments:after,.column-response .post-com-count-approved:after,.column-response .post-com-count-no-comments:after{content:"";display:block;margin-left:8px;width:0;height:0;border-top:5px solid #72777c;border-right:5px solid transparent}.column-comments .post-com-count-approved:focus .comment-count-approved,.column-comments .post-com-count-approved:hover .comment-count-approved,.column-response .post-com-count-approved:focus .comment-count-approved,.column-response .post-com-count-approved:hover .comment-count-approved{background:#0073aa}.column-comments .post-com-count-approved:focus:after,.column-comments .post-com-count-approved:hover:after,.column-response .post-com-count-approved:focus:after,.column-response .post-com-count-approved:hover:after{border-top-color:#0073aa}.column-comments .post-com-count-pending,.column-response .post-com-count-pending{position:relative;left:-3px;padding:0 5px;min-width:7px;height:17px;border:2px solid #fff;-webkit-border-radius:11px;border-radius:11px;background:#ca4a1f;color:#fff;font-size:9px;line-height:17px;text-align:center}.column-comments .post-com-count-no-pending,.column-response .post-com-count-no-pending{display:none}.commentlist li{padding:1em 1em .2em;margin:0;border-bottom:1px solid #ccc}.commentlist li li{border-bottom:0;padding:0}.commentlist p{padding:0;margin:0 0 .8em}#submitted-on,.submitted-on{color:#555d66}#replyrow td{padding:2px}#replysubmit{margin:0;padding:5px 7px 10px;overflow:hidden;text-align:center}#replysubmit .button{margin-right:5px}#replysubmit .error{color:red;line-height:21px;text-align:center}#replyrow.inline-edit-row fieldset.comment-reply{font-size:inherit;line-height:inherit}#replyrow legend{margin:0;padding:.2em 5px 0;font-size:13px;line-height:1.4;font-weight:600}#replyrow.inline-edit-row label{display:inline;vertical-align:baseline;line-height:inherit}#commentsdiv #edithead .inside,#edithead .inside{float:left;padding:3px 0 2px 5px;margin:0;text-align:center}#edithead .inside input{width:180px}#edithead label{padding:2px 0}#replycontainer{padding:5px}#replycontent{height:120px;-webkit-box-shadow:none;box-shadow:none}#replyerror{border-color:#ddd;background-color:#f9f9f9}.commentlist .avatar{vertical-align:text-top}#the-comment-list div.undo,#the-comment-list tr.undo{background-color:#f5f5f5}#the-comment-list .unapproved td,#the-comment-list .unapproved th{background-color:#fef7f1}#the-comment-list .unapproved th.check-column{border-left:4px solid #d54e21}#the-comment-list .unapproved th.check-column input{margin-left:4px}#the-comment-list .approve a{color:#006505}#the-comment-list .unapprove a{color:#d98500}#the-comment-list td,#the-comment-list th{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}#the-comment-list tr:last-child td,#the-comment-list tr:last-child th{-webkit-box-shadow:none;box-shadow:none}#the-comment-list tr.unapproved+tr.approved td,#the-comment-list tr.unapproved+tr.approved th{border-top:1px solid rgba(0,0,0,.03)}.vim-current,.vim-current td,.vim-current th{background-color:#e4f2fd!important}th .comment-grey-bubble{height:16px;width:16px}th .comment-grey-bubble:before{content:"\f101";font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;left:-4px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}table.fixed{table-layout:fixed}.fixed .column-rating,.fixed .column-visible{width:8%}.fixed .column-author,.fixed .column-date,.fixed .column-format,.fixed .column-links,.fixed .column-parent,.fixed .column-posts{width:10%}.fixed .column-posts{width:74px}.fixed .column-comment .comment-author{display:none}.fixed .column-categories,.fixed .column-rel,.fixed .column-response,.fixed .column-role,.fixed .column-tags{width:15%}.fixed .column-slug{width:25%}.fixed .column-locations{width:35%}.fixed .column-comments{width:5.5em;padding:8px 0;text-align:left}.fixed .column-comments .vers{padding-left:3px}td.column-title strong,td.plugin-title strong{display:block;margin-bottom:.2em;font-size:14px}td.column-title p,td.plugin-title p{margin:6px 0}table.media .column-title .media-icon{float:left;min-height:60px;margin:0 9px 0 0}table.media .column-title .media-icon img{max-width:60px;height:auto;vertical-align:top}table.media .column-title .has-media-icon~.row-actions{margin-left:70px}table.media .column-title .filename{margin-bottom:.2em}.wp-list-table a{-webkit-transition:none;transition:none}#the-list tr:last-child td,#the-list tr:last-child th{border-bottom:none!important;-webkit-box-shadow:none;box-shadow:none}#comments-form .fixed .column-author{width:20%}#comments-form .fixed .column-date{width:14%}#commentsdiv.postbox .inside{margin:0;padding:0}#commentsdiv .inside .row-actions{line-height:18px}#commentsdiv .inside .column-author{width:25%}#commentsdiv .column-comment p{margin:.6em 0;padding:0}#commentsdiv #replyrow td{padding:0}#commentsdiv p{padding:8px 10px;margin:0}#commentsdiv .comments-box{border:0}#commentsdiv .comments-box thead td,#commentsdiv .comments-box thead th{background:0 0;padding:0 7px 4px;font-style:italic}#commentsdiv .comments-box tr:last-child td{border-bottom:0 none}#commentsdiv #edithead .inside input{width:160px}.sorting-indicator{display:block;visibility:hidden;width:10px;height:4px;margin-top:8px;margin-left:7px}.sorting-indicator:before{content:"\f142";font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0;top:-4px;left:-8px;line-height:10px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}.column-comments .sorting-indicator:before{top:0;left:-10px}th.desc a:focus span.sorting-indicator:before,th.desc:hover span.sorting-indicator:before,th.sorted.asc .sorting-indicator:before{content:"\f142"}th.asc a:focus span.sorting-indicator:before,th.asc:hover span.sorting-indicator:before,th.sorted.desc .sorting-indicator:before{content:"\f140"}.wp-list-table .toggle-row{position:absolute;right:8px;top:10px;display:none;padding:0;width:40px;height:40px;border:none;outline:0;background:0 0}.wp-list-table .toggle-row:hover{cursor:pointer}.wp-list-table .toggle-row:focus:before{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 .wp-list-table .toggle-row:focus:before{outline:#5b9dd9 solid 1px}.wp-list-table .toggle-row:active{-webkit-box-shadow:none;box-shadow:none}.wp-list-table .toggle-row:before{position:absolute;top:-5px;left:10px;-webkit-border-radius:50%;border-radius:50%;display:block;padding:1px 2px 1px 0;color:#444;content:"\f140";font:400 20px/1 dashicons;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none}.wp-list-table .is-expanded .toggle-row:before{content:"\f142"}tr.wp-locked .locked-indicator{margin-left:6px;height:20px;width:16px}tr.wp-locked .locked-indicator:before{color:#82878c;content:"\f160";display:inline-block;float:left;font:400 20px/1 dashicons;speak:none;vertical-align:middle;margin-left:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}tr.wp-locked .check-column input[type=checkbox],tr.wp-locked .check-column label,tr.wp-locked .row-actions .inline,tr.wp-locked .row-actions .trash{display:none}tr .locked-info{height:0;opacity:0}tr.wp-locked .locked-info{margin-top:8px;height:auto;opacity:1}.locked-text{vertical-align:top}tr.locked-info,tr.wp-locked .locked-info{-webkit-transition:height 1s,opacity .5s;transition:height 1s,opacity .5s}.fixed .column-comments .sorting-indicator{margin-top:3px}#menu-locations-wrap .widefat{width:60%}.widefat th.sortable,.widefat th.sorted{padding:0}th.sortable a,th.sorted a{display:block;overflow:hidden;padding:8px}.fixed .column-comments.sortable a,.fixed .column-comments.sorted a{padding:8px 0}th.sortable a span,th.sorted a span{float:left;cursor:pointer}th.asc a:focus span.sorting-indicator,th.asc:hover span.sorting-indicator,th.desc a:focus span.sorting-indicator,th.desc:hover span.sorting-indicator,th.sorted .sorting-indicator{visibility:visible}.tablenav-pages a,.tablenav-pages-navspan{font-weight:600;padding:0 2px}.tablenav-pages .current-page{margin:0 2px 0 0;padding-bottom:5px;font-size:13px;text-align:center}.tablenav .total-pages{margin-right:2px}.tablenav #table-paging{margin-left:2px}.tablenav a.button-secondary{display:block;margin:3px 8px 0 0}.tablenav{clear:both;height:30px;margin:6px 0 4px;vertical-align:middle}.tablenav.themes{max-width:98%}.tablenav .tablenav-pages{float:right;height:28px;margin-top:3px;cursor:default;color:#555}.tablenav .no-pages,.tablenav .one-page .pagination-links{display:none}.tablenav .tablenav-pages a,.tablenav-pages span.current{text-decoration:none;padding:3px 6px}.tablenav .tablenav-pages a,.tablenav-pages-navspan{display:inline-block;min-width:17px;border:1px solid #ccc;padding:3px 5px 7px;background:#e5e5e5;font-size:16px;line-height:1;font-weight:400;text-align:center}.tablenav-pages-navspan{height:16px;border-color:#ddd;background:#f7f7f7;color:#a0a5aa}.tablenav .tablenav-pages a:focus,.tablenav .tablenav-pages a:hover{border-color:#5b9dd9;color:#fff;background:#00a0d2;-webkit-box-shadow:none;box-shadow:none;outline:0}.tablenav .displaying-num{margin-right:7px}.tablenav .one-page .displaying-num{display:inline-block;margin-top:5px;margin-right:0}.tablenav .actions{overflow:hidden;padding:2px 8px 0 0}.wp-filter .actions{display:inline-block;vertical-align:middle}.tablenav .delete{margin-right:20px}.tablenav .dots{border-color:transparent}.tablenav .next,.tablenav .prev{border-color:transparent;color:#0073aa}.tablenav .next:hover,.tablenav .prev:hover{border-color:transparent;color:#00a0d2}.tablenav .view-switch{float:right;margin:0 5px;padding-top:3px}.wp-filter .view-switch{display:inline-block;vertical-align:middle;padding:12px 0;margin:0 8px 0 2px}.media-toolbar.wp-filter .view-switch{margin:0 12px 0 2px}.view-switch a{float:left;width:28px;height:28px;text-align:center;line-height:24px;text-decoration:none}.view-switch a:before{color:#b4b9be;display:inline-block;font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.view-switch a:focus:before,.view-switch a:hover:before{color:#727272}.view-switch a.current:before{color:#0073aa}.view-switch .view-list:before{content:"\f163"}.view-switch .view-excerpt:before{content:"\f164"}.view-switch .view-grid:before{content:"\f509"}.filter{float:left;margin:-5px 0 0 10px}.filter .subsubsub{margin-left:-10px;margin-top:13px}.screen-per-page{width:4em}#posts-filter .wp-filter{margin-bottom:0}#posts-filter fieldset{float:left;margin:0 1.5ex 1em 0;padding:0}#posts-filter fieldset legend{padding:0 0 .2em 1px}.row-actions,.row-actions-visible{padding:2px 0 0}p.pagenav{margin:0;display:inline}.pagenav span{font-weight:600;margin:0 6px}.row-title{font-size:14px!important;font-weight:600}.column-comment .comment-author{margin-bottom:.6em}.column-author img,.column-comment .comment-author img,.column-username img{float:left;margin-right:10px;margin-top:1px}.row-actions{color:#ddd;font-size:13px;position:relative;left:-9999em}.plugins,.plugins td,.plugins th,.row-actions .network_active,.row-actions .network_only{color:#000}.rtl .row-actions a{display:inline-block}.comment-item:hover .row-actions,.mobile .row-actions,.no-js .row-actions,.row-actions.visible,tr:hover .row-actions{position:static}#wpbody-content .inline-edit-row fieldset{font-size:12px;float:left;margin:0;padding:0;width:100%}#wpbody-content .inline-edit-row fieldset .inline-edit-col,tr.inline-edit-row td{padding:0 .5em}#wpbody-content .quick-edit-row-post .inline-edit-col-left{width:40%}#wpbody-content .quick-edit-row-post .inline-edit-col-right{width:39%}#wpbody-content .inline-edit-row-post .inline-edit-col-center{width:20%}#wpbody-content .quick-edit-row-page .inline-edit-col-left{width:50%}#wpbody-content .bulk-edit-row-post .inline-edit-col-right,#wpbody-content .quick-edit-row-page .inline-edit-col-right{width:49%}#wpbody-content .bulk-edit-row .inline-edit-col-left{width:30%}#wpbody-content .bulk-edit-row-page .inline-edit-col-right{width:69%}#wpbody-content .bulk-edit-row .inline-edit-col-bottom{float:right;width:69%}#wpbody-content .inline-edit-row-page .inline-edit-col-right{margin-top:27px}.inline-edit-row fieldset .inline-edit-group{clear:both;line-height:2.5}.inline-edit-row p.submit{clear:both;padding:.5em;margin:.5em 0 0}.inline-edit-row span.error{line-height:22px;margin:0 15px;padding:3px 5px}#the-list .inline-edit-row .inline-edit-legend{margin:0;padding:.2em .5em 0;line-height:2.5;font-weight:600}#the-list #bulk-edit.inline-edit-row .inline-edit-legend{padding:.2em .5em}.inline-edit-row fieldset span.checkbox-title,.inline-edit-row fieldset span.title{margin:0;padding:0;font-style:italic}.inline-edit-row fieldset label,.inline-edit-row fieldset span.inline-edit-categories-label{display:block;margin:.2em 0;line-height:2.5}.inline-edit-row fieldset.inline-edit-date label{display:inline-block;margin:0;line-height:1.5;vertical-align:baseline}.inline-edit-row fieldset label.inline-edit-tags{margin-top:0}.inline-edit-row fieldset label.inline-edit-tags span.title{margin:.2em 0;width:auto}.inline-edit-row fieldset label span.title,.inline-edit-row fieldset.inline-edit-date legend{display:block;float:left;width:6em;line-height:2.5}#posts-filter fieldset.inline-edit-date legend{padding:0}.inline-edit-row fieldset.inline-edit-date select{margin:1px;line-height:28px}.inline-edit-row fieldset .timestamp-wrap,.inline-edit-row fieldset label span.input-text-wrap{display:block;margin-left:6em}.quick-edit-row-post fieldset.inline-edit-col-right label span.title{width:auto;padding-right:.5em}.inline-edit-row .inline-edit-or{margin:.2em 6px .2em 0;line-height:2.5}.inline-edit-row .input-text-wrap input[type=text]{width:100%}.inline-edit-row fieldset label input[type=checkbox]{vertical-align:middle}.inline-edit-row fieldset label textarea{width:100%;height:4em;vertical-align:top}#bulk-titles,ul.cat-checklist{height:12em;border:1px solid #ddd;overflow-y:scroll;padding:0 5px}#wpbody-content .bulk-edit-row fieldset .inline-edit-group label{max-width:50%}#wpbody-content .quick-edit-row fieldset .inline-edit-group label.alignleft:first-child{margin-right:.5em}.inline-edit-col-right .input-text-wrap input.inline-edit-menu-order-input{width:6em}.inline-edit-row .inline-edit-legend{text-transform:uppercase}.inline-edit-row fieldset .inline-edit-date{float:left}.inline-edit-row fieldset input[name=hh],.inline-edit-row fieldset input[name=jj],.inline-edit-row fieldset input[name=mn]{font-size:12px;width:2.3em}.inline-edit-row fieldset input[name=aa]{font-size:12px;width:3.5em}.inline-edit-row fieldset label input.inline-edit-password-input{width:8em}ul.cat-checklist{margin:0;background-color:#fff}#bulk-titles{display:block;margin:0 0 5px;line-height:140%}.inline-edit-row fieldset ul.cat-checklist input,.inline-edit-row fieldset ul.cat-checklist li{margin:0;position:relative}.inline-edit-row #bulk-titles div,.inline-edit-row fieldset ul.cat-checklist label{font-style:normal;font-size:11px}.inline-edit-row fieldset label input.inline-edit-menu-order-input{width:3em}.inline-edit-row fieldset label input.inline-edit-slug-input{width:75%}.inline-edit-row #post_parent,.inline-edit-row select[name=page_template]{max-width:80%}.ie8 .inline-edit-row #post_parent,.ie8 .inline-edit-row select[name=page_template]{width:250px}.quick-edit-row-post fieldset label.inline-edit-status{float:left}#bulk-titles div{margin:.2em .3em}#bulk-titles div a{cursor:pointer;display:block;float:left;height:18px;margin:0 3px 0 -2px;overflow:hidden;position:relative;width:20px}#bulk-titles div a:before{position:relative;top:-3px}.plugins tbody,.plugins tbody th.check-column{padding:8px 0 0 2px}.plugins tbody th.check-column input[type=checkbox]{margin-top:4px}.updates-table .plugin-title p{margin-top:0}.plugins .inactive th.check-column,.plugins tfoot td.check-column,.plugins thead td.check-column{padding-left:6px}.plugins tr{background:#fff}.plugins p{margin:0 4px;padding:0}.plugins .desc p{margin:0 0 8px}.plugins td.desc{line-height:1.5em}.plugins .desc ol,.plugins .desc ul{margin:0 0 0 2em}.plugins .desc ul{list-style-type:disc}.plugins .row-actions{font-size:13px}.plugins .active td,.plugins .active th,.plugins .inactive td,.plugins .inactive th{padding:10px 9px}.plugins .active td,.plugins .active th{background-color:#f7fcfe}.plugins .update td,.plugins .update th{border-bottom:0}.plugin-install #the-list td,.plugins .active td,.plugins .active th,.plugins .inactive td,.plugins .inactive th,.upgrade .plugins td,.upgrade .plugins th{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugins tr.active+tr.inactive td,.plugins tr.active+tr.inactive th,.plugins tr.active.plugin-update-tr+tr.inactive td,.plugins tr.active.plugin-update-tr+tr.inactive th{border-top:1px solid rgba(0,0,0,.03);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1;box-shadow:inset 0 1px 0 rgba(0,0,0,.02),inset 0 -1px 0 #e1e1e1}.plugins .update td,.plugins .update th,.plugins .updated td,.plugins .updated th,.plugins tr.active+tr.inactive.update td,.plugins tr.active+tr.inactive.update th,.plugins tr.active+tr.inactive.updated td,.plugins tr.active+tr.inactive.updated th,.upgrade .plugins tr:last-of-type td,.upgrade .plugins tr:last-of-type th{-webkit-box-shadow:none;box-shadow:none}.plugin-update-tr.active td,.plugins .active th.check-column{border-left:4px solid #00a0d2}#wpbody-content .plugins .plugin-title,#wpbody-content .plugins .theme-title{padding-right:12px;white-space:nowrap}.updates-table-screenshot{float:left;padding:0 10px 5px 0}.plugins .inactive .plugin-title strong{font-weight:400}.plugins .row-actions,.plugins .second{padding:0 0 5px}.plugins .update .row-actions,.plugins .update .second,.plugins .updated .row-actions,.plugins .updated .second{padding-bottom:0}.plugins-php .widefat tfoot td,.plugins-php .widefat tfoot th{border-top-style:solid;border-top-width:1px}.plugins .plugin-update-tr .plugin-update{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);overflow:hidden;padding:0}.plugins .plugin-update-tr .notice,.plugins .plugin-update-tr div[class=update-message]{margin:5px 20px 15px 40px}.plugins .notice p{margin:.5em 0}.plugin-card .update-now:before{color:#f56e28;content:"\f463";display:inline-block;font:400 20px/1 dashicons;margin:3px 5px 0 -2px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}.plugin-card .updating-message:before{content:"\f463";-webkit-animation:rotation 2s infinite linear;animation:rotation 2s infinite linear}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.plugin-card .updated-message:before{color:#79ba49;content:"\f147"}.plugin-install-php h2{clear:both}.plugin-install-php h3{margin:2.5em 0 8px}.plugin-install-php .wp-filter{margin-bottom:0}.plugin-group{overflow:hidden;margin-top:1.5em}.plugin-group h3{margin-top:0}.plugin-card{float:left;margin:0 8px 16px;width:48.5%;width:-webkit-calc(50% - 8px);width:calc(50% - 8px);background-color:#fff;border:1px solid #ddd;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.plugin-card:nth-child(odd){clear:both;margin-left:0}.plugin-card:nth-child(even){margin-right:0}@media screen and (min-width:1600px){.plugin-card{width:30%;width:-webkit-calc(33.1% - 8px);width:calc(33.1% - 8px)}.plugin-card:nth-child(odd){clear:none;margin-left:8px}.plugin-card:nth-child(even){margin-right:8px}.plugin-card:nth-child(3n+1){clear:both;margin-left:0}.plugin-card:nth-child(3n){margin-right:0}}.plugin-card-top{position:relative;padding:20px 20px 10px;min-height:135px}.plugin-action-buttons,div.action-links{margin:0}.plugin-card h3{margin:0 0 12px;font-size:18px;line-height:1.3}.plugin-card .desc,.plugin-card .name{margin-left:148px;margin-right:120px}.plugin-card .action-links{position:absolute;top:20px;right:20px;width:120px}.plugin-action-buttons{clear:right;float:right;margin-left:2em;margin-bottom:1em;text-align:right}.plugin-action-buttons li{margin-bottom:10px}.plugin-card-bottom{clear:both;padding:12px 20px;background-color:#fafafa;border-top:1px solid #ddd;overflow:hidden}.plugin-card-bottom .star-rating{display:inline}.plugin-card-update-failed .update-now{font-weight:600}.plugin-card-update-failed .notice-error{margin:0;padding-left:16px;-webkit-box-shadow:0 -1px 0 #ddd;box-shadow:0 -1px 0 #ddd}.plugin-card-update-failed .plugin-card-bottom{display:none}.plugin-card .column-rating{line-height:23px}.plugin-card .column-rating,.plugin-card .column-updated{margin-bottom:4px}.plugin-card .column-downloaded,.plugin-card .column-rating{float:left;clear:left;max-width:180px}.plugin-card .column-compatibility,.plugin-card .column-updated{text-align:right;float:right;clear:right;width:65%;width:-webkit-calc(100% - 180px);width:calc(100% - 180px)}.plugin-card .column-compatibility span:before{font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;left:-2px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#444}.plugin-card .compatibility-incompatible:before{content:"\f158"}.plugin-card .compatibility-compatible:before{content:"\f147"}.plugin-icon{position:absolute;top:20px;left:20px;width:128px;height:128px;margin:0 20px 20px 0}.no-plugin-results{color:#666;font-size:18px;font-style:normal;margin:0;padding:100px 0 0;text-align:center}.wp-list-table .site-deleted,.wp-list-table tr.site-deleted{background:#ff8573}.wp-list-table .site-spammed,.wp-list-table tr.site-spammed{background:#faafaa}.wp-list-table .site-archived,.wp-list-table tr.site-archived{background:#ffebe8}.wp-list-table .site-mature,.wp-list-table tr.site-mature{background:#fecac2}.sites.fixed .column-lastupdated,.sites.fixed .column-registered{width:20%}.sites.fixed .column-users{width:80px}@media screen and (max-width:1100px) and (min-width:782px),(max-width:480px){.plugin-card .action-links{position:static;margin-left:148px;width:auto}.plugin-action-buttons{float:none;margin:1em 0 0;text-align:left}.plugin-action-buttons li{display:inline-block;vertical-align:middle}.plugin-action-buttons li .button{margin-right:20px}.plugin-card .desc,.plugin-card .name{margin-right:0}.plugin-card .desc p:first-of-type{margin-top:0}.fixed .column-date{width:14%}}@media screen and (max-width:782px){.plugins #the-list tr td,.plugins tr.active+tr.inactive td,.plugins tr.active+tr.inactive th.check-column{border-top:none}.tablenav{height:auto}.tablenav.top{margin:20px 0 5px}.tablenav.bottom{position:relative;margin-top:15px}.tablenav br{display:none}.tablenav br.clear{display:block}.form-wrap>p,.tablenav .view-switch,.tablenav.top .actions,.tablenav.top .displaying-num,.tablenav.top .tablenav-pages.one-page{display:none}.view-switch a{width:36px;height:36px;line-height:33px}.tablenav.bottom .displaying-num{position:absolute;right:0;top:11px;margin:0;font-size:14px}.tablenav .tablenav-pages{width:100%;height:auto;text-align:center;margin:0 0 25px}.tablenav.bottom .tablenav-pages{margin-top:25px}.tablenav.bottom .tablenav-pages.one-page{margin:15px 0 0;height:0}.tablenav-pages .pagination-links{font-size:16px}.tablenav-pages .pagination-links a,.tablenav-pages-navspan{padding:9px 11px 12px;font-size:18px}.tablenav-pages-navspan{height:18px}.tablenav-pages .pagination-links .current-page{padding:8px 9px 9px;font-size:16px}.comment-count{font-size:14px}.wp-list-table th.column-primary~th,.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-primary~td:not(.check-column){display:none}.wp-list-table thead th.column-primary{width:100%}.wp-list-table tr th.check-column{display:table-cell;width:35px}.wp-list-table .column-primary .toggle-row{display:block}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.check-column){position:relative;clear:both;display:block;width:auto!important}.wp-list-table td.column-primary{padding-right:50px}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-primary~td:not(.check-column){padding:3px 8px 3px 35%}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.column-primary)::before{position:absolute;left:10px;display:block;overflow:hidden;width:32%;content:attr(data-colname);white-space:nowrap;text-overflow:ellipsis}.wp-list-table .is-expanded td:not(.hidden){display:block!important;overflow:hidden}.column-posts,.widefat .num{text-align:left}#comments-form .fixed .column-author,#commentsdiv .fixed .column-author{display:none!important}.fixed .column-comment .comment-author{display:block}#the-comment-list .is-expanded td{-webkit-box-shadow:none;box-shadow:none}#the-comment-list .is-expanded td:last-child{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.post-com-count .screen-reader-text{position:static;width:auto;height:auto;margin:0}.column-comments .post-com-count-approved:after,.column-comments .post-com-count-no-comments:after,.column-response .post-com-count-approved:after,.column-response .post-com-count-no-comments:after{content:none}.column-comments .post-com-count [aria-hidden=true],.column-response .post-com-count [aria-hidden=true]{display:none}#edithead label,.column-comments .post-com-count-wrapper>a,.column-response .post-com-count-wrapper>a{display:block}.column-comments .post-com-count-wrapper,.column-response .post-com-count-wrapper{white-space:normal}.column-comments .post-com-count-approved,.column-comments .post-com-count-no-comments,.column-response .post-com-count-approved,.column-response .post-com-count-no-comments{margin-top:0;margin-right:.5em}.column-comments .post-com-count-pending,.column-response .post-com-count-pending{position:static;height:auto;min-width:0;padding:0;border:none;-webkit-border-radius:0;border-radius:0;background:0 0;color:#bb2a2a;font-size:inherit;line-height:inherit;text-align:left}.column-comments .post-com-count-pending:hover,.column-response .post-com-count-pending:hover{color:#dc3232}.widefat tfoot td.check-column,.widefat thead td.check-column{padding-top:10px}.widefat *{word-wrap:normal}#wpbody-content .bulk-edit-row .inline-edit-col-bottom,#wpbody-content .bulk-edit-row .inline-edit-col-left,#wpbody-content .bulk-edit-row-page .inline-edit-col-right,#wpbody-content .bulk-edit-row-post .inline-edit-col-right,#wpbody-content .inline-edit-row-post .inline-edit-col-center,#wpbody-content .quick-edit-row-page .inline-edit-col-left,#wpbody-content .quick-edit-row-page .inline-edit-col-right,#wpbody-content .quick-edit-row-post .inline-edit-col-left,#wpbody-content .quick-edit-row-post .inline-edit-col-right{float:none;width:100%}#wpbody-content .bulk-edit-row fieldset .inline-edit-col label,#wpbody-content .bulk-edit-row fieldset .inline-edit-group label,#wpbody-content .quick-edit-row fieldset .inline-edit-col label,#wpbody-content .quick-edit-row fieldset .inline-edit-group label{max-width:none;float:none;margin-bottom:5px}#wpbody .bulk-edit-row fieldset select{display:block;width:100%;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.inline-edit-row #bulk-titles div,.inline-edit-row fieldset ul.cat-checklist label{font-size:16px}.inline-edit-row fieldset label span.title,.inline-edit-row fieldset.inline-edit-date legend{float:none}.inline-edit-row fieldset label.inline-edit-tags{padding:0 .5em}.inline-edit-row fieldset .inline-edit-col label.inline-edit-tags{padding:0}.inline-edit-row fieldset .timestamp-wrap,.inline-edit-row fieldset label span.input-text-wrap{margin-left:0}.inline-edit-row fieldset input[name=hh],.inline-edit-row fieldset input[name=jj],.inline-edit-row fieldset input[name=mn]{width:3em}.inline-edit-row fieldset input[name=aa]{width:4.5em}.inline-edit-row .inline-edit-or{margin:0 6px 0 0}#commentsdiv #edithead .inside,#edithead .inside{float:none;text-align:left;padding:3px 5px}#commentsdiv #edithead .inside input,#edithead .inside input{width:100%}#bulk-titles div{margin:.8em .3em}.plugin-card,.plugin-update-tr .update-message,.plugins .plugin-update-tr .update-message{margin-left:0}#bulk-titles div a{height:22px}#wpbody-content .updates-table .plugin-title{width:auto;white-space:normal}.link-manager-php #posts-filter{margin-top:25px}.link-manager-php .tablenav.bottom{overflow:hidden}.comments-box .toggle-row,.wp-list-table.plugins .toggle-row{display:none}#wpbody-content .wp-list-table.plugins td{display:block;width:auto;padding:10px 9px}#wpbody-content .wp-list-table.plugins .column-description{padding-top:2px}#wpbody-content .wp-list-table.plugins .plugin-title,#wpbody-content .wp-list-table.plugins .theme-title{padding-right:12px;white-space:normal}.wp-list-table.plugins .plugin-title,.wp-list-table.plugins .theme-title{padding-top:13px;padding-bottom:4px}.plugins #the-list .update td,.plugins #the-list .update th,.plugins #the-list tr>td:not(:last-child),.wp-list-table.plugins #the-list .theme-title{-webkit-box-shadow:none;box-shadow:none;border-top:none}.plugins tbody{padding:1px 0 0}.plugins .plugin-update-tr:before,.plugins tr.active+tr.inactive td.column-description,.plugins tr.active+tr.inactive th.check-column{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugins .plugin-update-tr:before{content:"";display:table-cell}.plugins #the-list .plugin-update-tr .plugin-update{border-left:none}.plugins .active.update+.plugin-update-tr:before{background-color:#f7fcfe;border-left:4px solid #00a0d2}.wp-list-table.plugins .plugin-title strong,.wp-list-table.plugins .theme-title strong{font-size:1.4em;line-height:1.5}table.plugin-install .column-description,table.plugin-install .column-name,table.plugin-install .column-rating,table.plugin-install .column-version{display:block;width:auto}table.plugin-install th.column-description,table.plugin-install th.column-name,table.plugin-install th.column-rating,table.plugin-install th.column-version{display:none}table.plugin-install td.column-name strong{font-size:1.4em;line-height:1.6em}table.plugin-install #the-list td{-webkit-box-shadow:none;box-shadow:none}table.plugin-install #the-list tr{display:block;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}.plugin-card{margin-right:0;width:100%}}@media screen and (max-width:480px){.tablenav-pages .current-page{margin:0}.tablenav-pages .tablenav-paging-text{float:left;width:100%;padding-top:.5em}}
\ No newline at end of file
index b28acaf6ebf7d6647744b5dd85806f69ea39352e..c870e28c00486bd01e0e0c9e8029141f2e09ad0c 100644 (file)
@@ -8,15 +8,11 @@ body {
        padding: 0;
 }
 
-html {
-       background: #f1f1f1;
-}
-
 body {
        background: #f1f1f1;
        min-width: 0;
        color: #444;
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        font-size: 13px;
        line-height: 1.4em;
 }
@@ -87,7 +83,7 @@ p {
        margin-top: 20px;
        margin-right: 0;
        padding: 26px 24px 46px;
-       font-weight: normal;
+       font-weight: 400;
        overflow: hidden;
        background: #fff;
        -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13);
@@ -95,7 +91,7 @@ p {
 }
 
 .login form .forgetmenot {
-       font-weight: normal;
+       font-weight: 400;
        float: right;
        margin-bottom: 0;
 }
@@ -137,7 +133,7 @@ p {
        color: #444;
        height: 84px;
        font-size: 20px;
-       font-weight: normal;
+       font-weight: 400;
        line-height: 1.3em;
        margin: 0 auto 25px;
        padding: 0;
index 876f94ecf7bd81d2d8a842ac9948c78be813fb8b..7e116e62c2ff10f52cae6841bf019dce1d20bab8 100644 (file)
@@ -1 +1 @@
-#pass-strength-result,input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.meta-box-sortables select,p.submit{max-width:100%}#your-profile label+a,.wp-admin select,fieldset label,label{vertical-align:middle}#pressthis-code-wrap,textarea{overflow:auto}input,textarea{box-sizing:border-box}input[type=text],input[type=search],input[type=radio],input[type=tel],input[type=time],input[type=url],input[type=week],input[type=password],input[type=checkbox],input[type=color],input[type=date],input[type=datetime],input[type=datetime-local],input[type=email],input[type=month],input[type=number],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out}input[type=text]:focus,input[type=search]:focus,input[type=radio]:focus,input[type=tel]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=password]:focus,input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[type=url],input[type=email]{direction:ltr}input[type=number]{height:28px;line-height:inherit}input[type=radio],input[type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#82878c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#00a0d2}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-left:4px;line-height:10px}input[type=radio]:checked:before,input[type=checkbox]:checked:before{float:right;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:"\f147";margin:-3px -4px 0 0;color:#1e8cbe}input[type=radio]:checked:before{content:"\2022";text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}@-moz-document url-prefix(){.form-table input.tog,input[type=radio],input[type=checkbox]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;-webkit-border-radius:0;border-radius:0}textarea{padding:2px 6px;line-height:1.4;resize:vertical}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input.readonly,input[readonly],textarea.readonly,textarea[readonly]{background-color:#eee}::-webkit-input-placeholder{color:#72777c}::-moz-placeholder{color:#72777c;opacity:1}:-ms-input-placeholder{color:#72777c}.form-invalid input,.form-invalid input:focus,.form-invalid select,.form-invalid select:focus{border-color:#dc3232!important;-webkit-box-shadow:0 0 2px rgba(204,0,0,.8);box-shadow:0 0 2px rgba(204,0,0,.8)}.form-table .form-required.form-invalid td:after{content:"\f534";font:400 20px/1 dashicons;color:#dc3232;margin-right:-25px;vertical-align:middle}.form-table .form-required.user-pass1-wrap.form-invalid td:after{content:''}.form-table .form-required.user-pass1-wrap.form-invalid .password-input-wrapper:after{content:'\f534';font:400 20px/1 dashicons;color:#dc3232;margin:0 -29px 0 6px;vertical-align:middle}.form-input-tip{color:#666}input.disabled,input:disabled,select.disabled,select:disabled,textarea.disabled,textarea:disabled{background:rgba(255,255,255,.5);border-color:rgba(222,222,222,.75);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);color:rgba(51,51,51,.5)}input[type=file].disabled,input[type=file]:disabled,input[type=range].disabled,input[type=range]:disabled{background:0 0;-webkit-box-shadow:none;box-shadow:none}input[type=radio].disabled,input[type=radio].disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before,input[type=checkbox].disabled,input[type=checkbox].disabled:checked:before,input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px}.wp-admin .button-cancel{padding:0 5px;line-height:2}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:none}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:right;margin-top:20px;padding-top:10px}.textright p.submit{border:none;text-align:left}table.form-table+input+input+p.submit,table.form-table+input+p.submit,table.form-table+p.submit{border-top:none;padding-top:0}#major-publishing-actions input,#minor-publishing-actions .preview,#minor-publishing-actions input{text-align:center}input.all-options,textarea.all-options{width:250px}input.large-text,textarea.large-text{width:99%}input.regular-text{width:25em}input.small-text{width:50px;padding:1px 6px}input[type=number].small-text{width:65px}input.tiny-text{width:35px}input[type=number].tiny-text{width:45px}#doaction,#doaction2,#post-query-submit{margin:1px 0 0 8px}.tablenav #changeit,.tablenav #clear-recent-list,.tablenav #delete_all,.wp-filter #delete_all{margin-top:1px}.tablenav .actions select{float:right;margin-left:6px;max-width:200px}.ie8 .tablenav .actions select{width:155px}.ie8 .tablenav .actions select#cat{width:200px}#timezone_string option{margin-right:1em}button.wp-hide-pw>.dashicons{position:relative;top:3px}#misc-publishing-actions label,.options-media-php label[for*="_size_"]{vertical-align:baseline}#misc-publishing-actions label[for=post_status]:before{content:"\f173";display:inline-block;font:400 20px/1 dashicons;speak:none;right:-1px;padding:0 0 0 5px;position:relative;top:0;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#pass1-text,.pw-weak,.show-password #pass1{display:none}#pass-strength-result{background-color:#eee;border:1px solid #ddd;color:#23282d;margin:-2px 1px 5px 5px;padding:3px 5px;text-align:center;width:25em;box-sizing:border-box;opacity:0}#pass-strength-result.short{background-color:#f1adad;border-color:#e35b5b;opacity:1}#pass-strength-result.bad{background-color:#fbc5a9;border-color:#f78b53;opacity:1}#pass-strength-result.good{background-color:#ffe399;border-color:#ffc733;opacity:1}#pass-strength-result.strong{background-color:#c1e1b9;border-color:#83c373;opacity:1}#pass1-text.short,#pass1.short{border-color:#e35b5b}#pass1-text.bad,#pass1.bad{border-color:#f78b53}#pass1-text.good,#pass1.good{border-color:#ffc733}#pass1-text.strong,#pass1.strong{border-color:#83c373}.indicator-hint{padding-top:8px}.show-password #pass1-text{display:inline-block}.form-table span.description.important{font-size:12px}p.search-box{float:left;margin:0}.network-admin.themes-php p.search-box{clear:right}.search-box input[name="s"],.tablenav .search-plugins input[name="s"],.tagsdiv .newtag{float:right;height:28px;margin:0 0 0 4px}input[type=text].ui-autocomplete-loading,input[type=email].ui-autocomplete-loading{background-image:url(../images/loading.gif);background-repeat:no-repeat;background-position:left center;visibility:visible}input.ui-autocomplete-input.open{border-bottom-color:transparent}ul#add-to-blog-users{margin:0 14px 0 0}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:right}.ui-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}.form-table{border-collapse:collapse;margin-top:.5em;width:100%;clear:both}.form-table,.form-table td,.form-table td p,.form-table th,.form-wrap label{font-size:14px}.form-table td{margin-bottom:9px;padding:15px 10px;line-height:1.3;vertical-align:middle}.form-table th,.form-wrap label{color:#23282d;font-weight:400;text-shadow:none;vertical-align:baseline}.form-table th{vertical-align:top;text-align:right;padding:20px 0 20px 10px;width:200px;line-height:1.3;font-weight:600}.form-table th.th-full{width:auto;font-weight:400}.form-table td p{margin-top:4px;margin-bottom:0}.form-table .date-time-doc{margin-top:1em}.form-table p.timezone-info{margin:1em 0}.form-table td fieldset label{margin:.25em 0 .5em!important;display:inline-block}.form-table td fieldset label,.form-table td fieldset li,.form-table td fieldset p{line-height:1.4em}.form-table input.tog,.form-table input[type=radio]{margin-top:-4px;margin-left:4px;float:none}.form-table .pre{padding:8px;margin:0}table.form-table td .updated{font-size:13px}table.form-table td .updated p{font-size:13px;margin:.3em 0}#profile-page .form-table textarea{width:500px;margin-bottom:6px}#profile-page .form-table #rich_editing{margin-left:5px}#your-profile legend{font-size:22px}#display_name{width:15em}#adduser .form-field input,#createuser .form-field input{width:25em}.color-option{display:inline-block;width:24%;padding:5px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:3px;cursor:pointer}.color-option.selected,.color-option:hover{background:#ddd}.color-palette{width:100%;border-spacing:0;border-collapse:collapse}.color-palette td{height:20px;padding:0;border:none}.tool-box .title{margin:8px 0;font-size:18px;font-weight:400;line-height:24px}.label-responsive{vertical-align:middle}#export-filters p{margin:0 0 1em}#export-filters p.submit{margin:7px 0 5px}.card{position:relative;margin-top:20px;padding:.7em 2em 1em;min-width:255px;max-width:520px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff}.pressthis h4{margin:2em 0 1em}.pressthis textarea{width:100%;font-size:1em}.login form,.login h1 a{overflow:hidden;font-weight:400}.pressthis-bookmarklet-wrapper{margin:20px 0 8px;vertical-align:top;position:relative;z-index:1}.pressthis-bookmarklet,.pressthis-bookmarklet:active,.pressthis-bookmarklet:focus,.pressthis-bookmarklet:hover{display:inline-block;position:relative;cursor:move;color:#32373c;background:#e5e5e5;-webkit-border-radius:5px;border-radius:5px;border:1px solid #b4b9be;font-style:normal;line-height:16px;font-size:14px;text-decoration:none}.pressthis-bookmarklet:active{outline:0}.pressthis-bookmarklet:after{content:"";width:70%;height:55%;z-index:-1;position:absolute;left:10px;bottom:9px;background:0 0;-webkit-transform:skew(-20deg) rotate(-6deg);-ms-transform:skew(-20deg) rotate(-6deg);transform:skew(-20deg) rotate(-6deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.6);box-shadow:0 10px 8px rgba(0,0,0,.6)}.pressthis-bookmarklet:hover:after{-webkit-transform:skew(-20deg) rotate(-9deg);-ms-transform:skew(-20deg) rotate(-9deg);transform:skew(-20deg) rotate(-9deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.7);box-shadow:0 10px 8px rgba(0,0,0,.7)}.pressthis-bookmarklet span{display:inline-block;margin:0;padding:0 9px 8px 12px}.pressthis-bookmarklet span:before{color:#72777c;font:400 20px/1 dashicons;content:"\f157";position:relative;display:inline-block;top:4px;margin-left:4px}.pressthis-js-toggle,.pressthis-js-toggle.button.button{margin-right:10px;padding:0;height:auto;vertical-align:top}.pressthis-js-toggle .dashicons{margin:5px 7px 6px 8px;color:#555d66}.timezone-info code{white-space:nowrap}.defaultavatarpicker .avatar{margin:2px 0;vertical-align:middle}.options-general-php .date-time-text{display:inline-block;min-width:10em}.options-general-php input.small-text{width:56px}.options-general-php .spinner{float:none;margin:0 3px}.options-general-php .language-install-spinner,.settings-php .language-install-spinner{display:inline-block;float:none;margin:-3px 5px 0;vertical-align:middle}.setup-php textarea{max-width:100%}.form-field #site-address{max-width:25em}.form-field #domain{max-width:22em}.form-field #admin-email,.form-field #blog_last_updated,.form-field #blog_registered,.form-field #path,.form-field #site-title{max-width:25em}.form-field #path{margin-bottom:5px}#search-sites,#search-users{max-width:100%}.request-filesystem-credentials-dialog{display:none}.request-filesystem-credentials-dialog .notification-dialog{top:15%;max-height:85%}.request-filesystem-credentials-dialog-content{margin:25px}#request-filesystem-credentials-title{font-size:1.3em;margin:1em 0}.request-filesystem-credentials-form legend{font-size:1em;padding:1.33em 0;font-weight:600}.request-filesystem-credentials-form input[type=text],.request-filesystem-credentials-form input[type=password]{display:block}.request-filesystem-credentials-dialog input[type=text],.request-filesystem-credentials-dialog input[type=password]{width:100%}.request-filesystem-credentials-form .field-title{font-weight:600}.request-filesystem-credentials-dialog label[for=hostname],.request-filesystem-credentials-dialog label[for=public_key],.request-filesystem-credentials-dialog label[for=private_key]{display:block;margin-bottom:1em}.request-filesystem-credentials-dialog .ftp-password,.request-filesystem-credentials-dialog .ftp-username{float:right;width:48%}.request-filesystem-credentials-dialog .ftp-password{margin-right:4%}.request-filesystem-credentials-dialog .request-filesystem-credentials-action-buttons{text-align:left}.request-filesystem-credentials-dialog label[for=ftp]{margin-left:10px}#request-filesystem-credentials-dialog .button:not(:last-child){margin-left:10px}#request-filesystem-credentials-form .cancel-button{display:none}#request-filesystem-credentials-dialog .cancel-button{display:inline}@media screen and (max-width:782px){textarea{-webkit-appearance:none}input[type=text],input[type=search],input[type=password],input[type=email],input[type=number]{-webkit-appearance:none;padding:6px 10px}input[type=number]{height:40px}input.code{padding-bottom:5px;padding-top:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox],input[type=checkbox]{-webkit-appearance:none;padding:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox]{margin-bottom:8px}.widefat tfoot td input[type=checkbox]:before,.widefat th input[type=checkbox]:before,.widefat thead td input[type=checkbox]:before,input[type=checkbox]:checked:before{font:400 30px/1 dashicons;margin:-3px -5px}input[type=radio],input[type=checkbox]{height:25px;width:25px}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox]{margin-top:-3px}input[type=radio]:checked:before{vertical-align:middle;width:9px;height:9px;margin:7px;line-height:16px}.wp-upload-form input[type=submit]{margin-top:10px}#wpbody select{height:36px;font-size:16px}.wp-admin .button-cancel{padding:0;font-size:14px}#adduser .form-field input,#createuser .form-field input{width:100%}.form-table{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table td,.form-table th,.label-responsive{display:block;width:auto;vertical-align:middle}.label-responsive{margin:.5em 0}.export-filters li{margin-bottom:0}.form-table .color-palette td{display:table-cell;width:15px}.form-table table.color-palette{margin-left:10px}input,textarea{font-size:16px}#profile-page .form-table textarea,.form-table span.description,.form-table td input[type=text],.form-table td input[type=password],.form-table td input[type=email],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table .form-required.form-invalid td:after{float:left;margin:-30px 0 0 3px}#wpbody .form-table td select{height:40px}.form-table input[type=text].small-text,input[type=text].small-text,input[type=search].small-text,input[type=password].small-text,input[type=number].small-text{width:auto;max-width:55px;display:inline;padding:3px 6px;margin:0 3px}#pass-strength-result{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:8px}p.search-box{float:none;position:absolute;bottom:0;width:98%;height:90px;margin-bottom:20px}p.search-box input[name="s"]{height:auto;float:none;width:100%;margin-bottom:10px;vertical-align:middle;-webkit-appearance:none}p.search-box input[type=submit]{margin-bottom:10px}.form-table span.description{display:inline;padding:4px 0 0;line-height:1.4em;font-size:14px}.form-table th{padding-top:10px;padding-bottom:0;border-bottom:0}.form-table td{margin-bottom:0;padding-bottom:6px;padding-top:4px;padding-right:0}.form-table.permalink-structure td code{margin-right:32px}.form-table.permalink-structure td input[type=text]{margin-right:32px;margin-top:4px;width:96%}.form-table input.regular-text{width:100%}.form-table label{font-size:14px}.form-table fieldset label{display:block}#local-time,#utc-time{display:block;float:none;margin-top:.5em}.form-field #domain{max-width:none}.wp-pwd{position:relative}.wp-pwd [type=text],.wp-pwd [type=password]{padding-left:40px}.wp-pwd button.button{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;line-height:2;margin:0;padding:5px 10px;position:absolute;left:0;top:0}.wp-pwd button.button:active,.wp-pwd button.button:focus,.wp-pwd button.button:hover{background:0 0}.wp-pwd .button .text{display:none}.options-general-php input[type=text].small-text{max-width:60px;margin:0}}.locale-he-il em,.locale-zh-cn #local-time,.locale-zh-cn #utc-time,.locale-zh-cn .form-wrap p,.locale-zh-cn .howto,.locale-zh-cn .inline-edit-row fieldset span.checkbox-title,.locale-zh-cn .inline-edit-row fieldset span.title,.locale-zh-cn .js .input-with-default-title,.locale-zh-cn .link-to-original,.locale-zh-cn .tablenav .displaying-num,.locale-zh-cn p.description,.locale-zh-cn p.help,.locale-zh-cn p.install-help,.locale-zh-cn span.description{font-style:normal}body,html{background:#f1f1f1}@media only screen and (max-width:768px){.form-field input[type=text],.form-field input[type=password],.form-field input[type=email],.form-field select,.form-field textarea{width:99%}.form-wrap .form-field{padding:0}#profile-page .form-table textarea{max-width:400px;width:auto}}.locale-de-de #customize-header-actions .button,.locale-de-de-formal #customize-header-actions .button,.locale-ru-ru #customize-header-actions .button{padding:0 5px 1px}@media only screen and (max-height:480px){.request-filesystem-credentials-dialog .notification-dialog{width:100%;height:100%;max-height:100%;position:fixed;top:0;margin:0;right:0}}@media screen and (max-width:600px){.color-option{width:49%}}@media only screen and (max-width:320px){.options-general-php .date-time-text.date-time-custom-text{min-width:0;margin-left:.5em}}body.rtl,body.rtl .press-this a.wp-switch-editor{font-family:Tahoma,Arial,sans-serif}.rtl h1,.rtl h2,.rtl h3,.rtl h4,.rtl h5,.rtl h6{font-family:Arial,sans-serif;font-weight:700}body.locale-he-il,body.locale-he-il .press-this a.wp-switch-editor{font-family:Arial,sans-serif}.locale-he-il em{font-weight:700}.locale-zh-cn .hdnle a{font-size:12px}.locale-zh-cn form.upgrade .hint{font-style:normal;font-size:100%}.locale-zh-cn #sort-buttons{font-size:1em!important}.locale-de-de #customize-header-actions .spinner,.locale-de-de-formal #customize-header-actions .spinner{margin:16px 3px 0}.locale-ru-ru #adminmenu{width:inherit}.locale-ru-ru #adminmenu,.locale-ru-ru #wpbody{margin-right:0}.locale-ru-ru .inline-edit-row fieldset label span.title,.locale-ru-ru .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-right:8em}.locale-ru-ru.post-new-php .tagsdiv .newtag,.locale-ru-ru.post-php .tagsdiv .newtag{width:165px}.locale-ru-ru.press-this .posting{margin-left:277px}.locale-ru-ru .press-this-sidebar{width:265px}.locale-ru-ru #customize-header-actions .spinner{margin:16px 3px 0}.locale-lt-lt .inline-edit-row fieldset label span.title,.locale-lt-lt .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap{margin-right:8em}@media screen and (max-width:782px){.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap,.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-right:0}}body,html{height:100%;margin:0;padding:0}body{min-width:0;color:#444;font-family:"Open Sans",sans-serif;font-size:13px;line-height:1.4em}a{color:#0073aa;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;outline:0}a:active,a:hover{color:#00a0d2}a:focus{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 a:focus{outline:#5b9dd9 solid 1px}p{line-height:1.5}.login #login_error,.login .message{border-right:4px solid #00a0d2;padding:12px;margin-right:0;background-color:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.login #login_error{border-right-color:#dc3232}#loginform p.submit,.login-action-lostpassword p.submit{border:none;margin:-10px 0 20px}.login *{margin:0;padding:0}.login form{margin-top:20px;margin-right:0;padding:26px 24px 46px;background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}.login form .forgetmenot{font-weight:400;float:right;margin-bottom:0}.login .button-primary{float:left}#login form p{margin-bottom:0}#login form p.submit{margin:0;padding:0}.login label{color:#72777c;font-size:14px}.login form .forgetmenot label{font-size:12px;line-height:19px}.login h1{text-align:center}.login h1 a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:84px;background-size:84px;background-position:center top;background-repeat:no-repeat;color:#444;height:84px;font-size:20px;line-height:1.3em;margin:0 auto 25px;padding:0;text-decoration:none;width:84px;text-indent:-9999px;outline:0;display:block}#login{width:320px;padding:8% 0 0;margin:auto}.login #backtoblog,.login #nav{font-size:13px;padding:0 24px}.login #nav{margin:24px 0 0}#backtoblog{margin:16px 0}.login #backtoblog a,.login #nav a{text-decoration:none;color:#555d66}.login #backtoblog a:hover,.login #nav a:hover,.login h1 a:hover{color:#00a0d2}.login #backtoblog a:focus,.login #nav a:focus,.login h1 a:focus{color:#124964}.login form .input,.login input[type=text]{font-size:24px;width:100%;padding:3px;margin:2px 0 16px 6px}.login form .input,.login form input[type=checkbox],.login input[type=text]{background:#fbfbfb}.ie7 .login form .input,.ie8 .login form .input{font-family:sans-serif}.login-action-rp input[type=text]{-webkit-box-shadow:none;box-shadow:none;margin:0}.login #pass-strength-result{font-weight:600;margin:-1px 0 16px 5px;padding:6px 5px;text-align:center;width:100%}.mobile #login{padding:20px 0}.mobile #login form{margin-right:0}.mobile #login #backtoblog,.mobile #login #nav{margin-right:8px}body.interim-login{height:auto}.interim-login #login{padding:0;margin:5px auto 20px}.interim-login.login h1 a{width:auto}.interim-login #login_error,.interim-login.login .message{margin:0 0 16px}.interim-login.login form{margin:0}@-ms-viewport{width:device-width}@media screen and (max-width:782px){.interim-login input[type=checkbox]{height:16px;width:16px}.interim-login input[type=checkbox]:checked:before{width:16px;font:400 21px/1 dashicons;margin:-3px -4px 0 0}}
\ No newline at end of file
+#pass-strength-result,input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.meta-box-sortables select,p.submit{max-width:100%}#your-profile label+a,.wp-admin select,fieldset label,label{vertical-align:middle}#pressthis-code-wrap,textarea{overflow:auto}input,textarea{box-sizing:border-box}input[type=text],input[type=search],input[type=radio],input[type=tel],input[type=time],input[type=url],input[type=week],input[type=password],input[type=checkbox],input[type=color],input[type=date],input[type=datetime],input[type=datetime-local],input[type=email],input[type=month],input[type=number],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out}input[type=text]:focus,input[type=search]:focus,input[type=radio]:focus,input[type=tel]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=password]:focus,input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[type=url],input[type=email]{direction:ltr}input[type=number]{height:28px;line-height:1}input[type=radio],input[type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 0 0 4px;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#82878c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#00a0d2}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-left:4px;line-height:10px}input[type=radio]:checked:before,input[type=checkbox]:checked:before{float:right;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:"\f147";margin:-3px -4px 0 0;color:#1e8cbe}input[type=radio]:checked:before{content:"\2022";text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}@-moz-document url-prefix(){.form-table input.tog,input[type=radio],input[type=checkbox]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;-webkit-border-radius:0;border-radius:0}textarea{padding:2px 6px;line-height:1.4;resize:vertical}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input.readonly,input[readonly],textarea.readonly,textarea[readonly]{background-color:#eee}::-webkit-input-placeholder{color:#72777c}::-moz-placeholder{color:#72777c;opacity:1}:-ms-input-placeholder{color:#72777c}.form-invalid input,.form-invalid input:focus,.form-invalid select,.form-invalid select:focus{border-color:#dc3232!important;-webkit-box-shadow:0 0 2px rgba(204,0,0,.8);box-shadow:0 0 2px rgba(204,0,0,.8)}.form-table .form-required.form-invalid td:after{content:"\f534";font:400 20px/1 dashicons;color:#dc3232;margin-right:-25px;vertical-align:middle}.form-table .form-required.user-pass1-wrap.form-invalid td:after{content:''}.form-table .form-required.user-pass1-wrap.form-invalid .password-input-wrapper:after{content:'\f534';font:400 20px/1 dashicons;color:#dc3232;margin:0 -29px 0 6px;vertical-align:middle}.form-input-tip{color:#666}input.disabled,input:disabled,select.disabled,select:disabled,textarea.disabled,textarea:disabled{background:rgba(255,255,255,.5);border-color:rgba(222,222,222,.75);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);color:rgba(51,51,51,.5)}input[type=file].disabled,input[type=file]:disabled,input[type=range].disabled,input[type=range]:disabled{background:0 0;-webkit-box-shadow:none;box-shadow:none}input[type=radio].disabled,input[type=radio].disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before,input[type=checkbox].disabled,input[type=checkbox].disabled:checked:before,input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px}.wp-admin .button-cancel{padding:0 5px;line-height:2}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:none}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:right;margin-top:20px;padding-top:10px}.textright p.submit{border:none;text-align:left}table.form-table+input+input+p.submit,table.form-table+input+p.submit,table.form-table+p.submit{border-top:none;padding-top:0}#major-publishing-actions input,#minor-publishing-actions .preview,#minor-publishing-actions input{text-align:center}input.all-options,textarea.all-options{width:250px}input.large-text,textarea.large-text{width:99%}input.regular-text{width:25em}input.small-text{width:50px;padding:1px 6px}input[type=number].small-text{width:65px}input.tiny-text{width:35px}input[type=number].tiny-text{width:45px}#doaction,#doaction2,#post-query-submit{margin:1px 0 0 8px}.tablenav #changeit,.tablenav #clear-recent-list,.tablenav #delete_all,.wp-filter #delete_all{margin-top:1px}.tablenav .actions select{float:right;margin-left:6px;max-width:200px}.ie8 .tablenav .actions select{width:155px}.ie8 .tablenav .actions select#cat{width:200px}#timezone_string option{margin-right:1em}button.wp-hide-pw>.dashicons{position:relative;top:3px}#misc-publishing-actions label,.options-media-php label[for*="_size_"]{vertical-align:baseline}#misc-publishing-actions label[for=post_status]:before{content:"\f173";display:inline-block;font:400 20px/1 dashicons;speak:none;right:-1px;padding:0 0 0 5px;position:relative;top:0;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#pass1-text,.pw-weak,.show-password #pass1{display:none}#pass-strength-result{background-color:#eee;border:1px solid #ddd;color:#23282d;margin:-2px 1px 5px 5px;padding:3px 5px;text-align:center;width:25em;box-sizing:border-box;opacity:0}#pass-strength-result.short{background-color:#f1adad;border-color:#e35b5b;opacity:1}#pass-strength-result.bad{background-color:#fbc5a9;border-color:#f78b53;opacity:1}#pass-strength-result.good{background-color:#ffe399;border-color:#ffc733;opacity:1}#pass-strength-result.strong{background-color:#c1e1b9;border-color:#83c373;opacity:1}#pass1-text.short,#pass1.short{border-color:#e35b5b}#pass1-text.bad,#pass1.bad{border-color:#f78b53}#pass1-text.good,#pass1.good{border-color:#ffc733}#pass1-text.strong,#pass1.strong{border-color:#83c373}.indicator-hint{padding-top:8px}.show-password #pass1-text{display:inline-block}.form-table span.description.important{font-size:12px}p.search-box{float:left;margin:0}.network-admin.themes-php p.search-box{clear:right}.search-box input[name="s"],.tablenav .search-plugins input[name="s"],.tagsdiv .newtag{float:right;height:28px;margin:0 0 0 4px}.js.plugins-php .search-box .wp-filter-search{margin:0;width:280px;font-size:16px;font-weight:300;line-height:1.5;padding:3px 5px;height:32px}input[type=text].ui-autocomplete-loading,input[type=email].ui-autocomplete-loading{background-image:url(../images/loading.gif);background-repeat:no-repeat;background-position:left center;visibility:visible}input.ui-autocomplete-input.open{border-bottom-color:transparent}ul#add-to-blog-users{margin:0 14px 0 0}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:right}.ui-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}.form-table{border-collapse:collapse;margin-top:.5em;width:100%;clear:both}.form-table,.form-table td,.form-table td p,.form-table th{font-size:14px}.form-table td{margin-bottom:9px;padding:15px 10px;line-height:1.3;vertical-align:middle}.form-table th,.form-wrap label{color:#23282d;font-weight:400;text-shadow:none;vertical-align:baseline}.form-table th{vertical-align:top;text-align:right;padding:20px 0 20px 10px;width:200px;line-height:1.3;font-weight:600}.form-table th.th-full{width:auto;font-weight:400}.form-table td p{margin-top:4px;margin-bottom:0}.form-table .date-time-doc{margin-top:1em}.form-table p.timezone-info{margin:1em 0}.form-table td fieldset label{margin:.25em 0 .5em!important;display:inline-block}.form-table td fieldset label,.form-table td fieldset li,.form-table td fieldset p{line-height:1.4em}.form-table input.tog,.form-table input[type=radio]{margin-top:-4px;margin-left:4px;float:none}.form-table .pre{padding:8px;margin:0}table.form-table td .updated{font-size:13px}table.form-table td .updated p{font-size:13px;margin:.3em 0}#profile-page .form-table textarea{width:500px;margin-bottom:6px}#profile-page .form-table #rich_editing{margin-left:5px}#your-profile legend{font-size:22px}#display_name{width:15em}#adduser .form-field input,#createuser .form-field input{width:25em}.color-option{display:inline-block;width:24%;padding:5px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:3px;cursor:pointer}.color-option.selected,.color-option:hover{background:#ddd}.color-palette{width:100%;border-spacing:0;border-collapse:collapse}.color-palette td{height:20px;padding:0;border:none}.tool-box .title{margin:8px 0;font-size:18px;font-weight:400;line-height:24px}.label-responsive{vertical-align:middle}#export-filters p{margin:0 0 1em}#export-filters p.submit{margin:7px 0 5px}.card{position:relative;margin-top:20px;padding:.7em 2em 1em;min-width:255px;max-width:520px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff}.pressthis h4{margin:2em 0 1em}.pressthis textarea{width:100%;font-size:1em}.login form,.login h1 a{overflow:hidden;font-weight:400}.pressthis-bookmarklet-wrapper{margin:20px 0 8px;vertical-align:top;position:relative;z-index:1}.pressthis-bookmarklet,.pressthis-bookmarklet:active,.pressthis-bookmarklet:focus,.pressthis-bookmarklet:hover{display:inline-block;position:relative;cursor:move;color:#32373c;background:#e5e5e5;-webkit-border-radius:5px;border-radius:5px;border:1px solid #b4b9be;font-style:normal;line-height:16px;font-size:14px;text-decoration:none}.pressthis-bookmarklet:active{outline:0}.pressthis-bookmarklet:after{content:"";width:70%;height:55%;z-index:-1;position:absolute;left:10px;bottom:9px;background:0 0;-webkit-transform:skew(-20deg) rotate(-6deg);-ms-transform:skew(-20deg) rotate(-6deg);transform:skew(-20deg) rotate(-6deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.6);box-shadow:0 10px 8px rgba(0,0,0,.6)}.pressthis-bookmarklet:hover:after{-webkit-transform:skew(-20deg) rotate(-9deg);-ms-transform:skew(-20deg) rotate(-9deg);transform:skew(-20deg) rotate(-9deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.7);box-shadow:0 10px 8px rgba(0,0,0,.7)}.pressthis-bookmarklet span{display:inline-block;margin:0;padding:0 9px 8px 12px}.pressthis-bookmarklet span:before{color:#72777c;font:400 20px/1 dashicons;content:"\f157";position:relative;display:inline-block;top:4px;margin-left:4px}.pressthis-js-toggle,.pressthis-js-toggle.button.button{margin-right:10px;padding:0;height:auto;vertical-align:top}.pressthis-js-toggle .dashicons{margin:5px 7px 6px 8px;color:#555d66}.timezone-info code{white-space:nowrap}.defaultavatarpicker .avatar{margin:2px 0;vertical-align:middle}.options-general-php .date-time-text{display:inline-block;min-width:10em}.options-general-php input.small-text{width:56px}.options-general-php .spinner{float:none;margin:0 3px}.options-general-php .language-install-spinner,.settings-php .language-install-spinner{display:inline-block;float:none;margin:-3px 5px 0;vertical-align:middle}.setup-php textarea{max-width:100%}.form-field #site-address{max-width:25em}.form-field #domain{max-width:22em}.form-field #admin-email,.form-field #blog_last_updated,.form-field #blog_registered,.form-field #path,.form-field #site-title{max-width:25em}.form-field #path{margin-bottom:5px}#search-sites,#search-users{max-width:100%}.request-filesystem-credentials-dialog{display:none}.request-filesystem-credentials-dialog .notification-dialog{top:10%;max-height:85%}.request-filesystem-credentials-dialog-content{margin:25px}#request-filesystem-credentials-title{font-size:1.3em;margin:1em 0}.request-filesystem-credentials-form legend{font-size:1em;padding:1.33em 0 0;font-weight:600}.request-filesystem-credentials-form input[type=text],.request-filesystem-credentials-form input[type=password]{display:block}.request-filesystem-credentials-dialog input[type=text],.request-filesystem-credentials-dialog input[type=password]{width:100%}.request-filesystem-credentials-form .field-title{font-weight:600}.request-filesystem-credentials-dialog label[for=hostname],.request-filesystem-credentials-dialog label[for=public_key],.request-filesystem-credentials-dialog label[for=private_key]{display:block;margin-bottom:1em}.request-filesystem-credentials-dialog .request-filesystem-credentials-action-buttons{text-align:left}.request-filesystem-credentials-dialog label[for=ftp]{margin-left:10px}.request-filesystem-credentials-dialog #auth-keys-desc{margin-bottom:0}#request-filesystem-credentials-dialog .button:not(:last-child){margin-left:10px}#request-filesystem-credentials-form .cancel-button{display:none}#request-filesystem-credentials-dialog .cancel-button{display:inline}.request-filesystem-credentials-dialog .ftp-password,.request-filesystem-credentials-dialog .ftp-username{float:none;width:auto}.request-filesystem-credentials-dialog .ftp-username{margin-bottom:1em}.request-filesystem-credentials-dialog .ftp-password{margin:0}.request-filesystem-credentials-dialog .ftp-password em{color:#888}.request-filesystem-credentials-dialog label{display:block;line-height:1.5;margin-bottom:1em}.request-filesystem-credentials-form #ssh-keys legend{font-size:1.3em}.request-filesystem-credentials-form .notice{margin:0 0 20px;clear:both}@media screen and (max-width:782px){textarea{-webkit-appearance:none}input[type=text],input[type=search],input[type=password],input[type=email],input[type=number]{-webkit-appearance:none;padding:6px 10px}input[type=number]{height:40px}input.code{padding-bottom:5px;padding-top:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox],input[type=checkbox]{-webkit-appearance:none;padding:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox]{margin-bottom:8px}.widefat tfoot td input[type=checkbox]:before,.widefat th input[type=checkbox]:before,.widefat thead td input[type=checkbox]:before,input[type=checkbox]:checked:before{font:400 30px/1 dashicons;margin:-3px -5px}input[type=radio],input[type=checkbox]{height:25px;width:25px}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox]{margin-top:-3px}input[type=radio]:checked:before{vertical-align:middle;width:9px;height:9px;margin:7px;line-height:16px}.wp-upload-form input[type=submit]{margin-top:10px}#wpbody select{height:36px;font-size:16px}.wp-admin .button-cancel{padding:0;font-size:14px}#adduser .form-field input,#createuser .form-field input{width:100%}.form-table{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table td,.form-table th,.label-responsive{display:block;width:auto;vertical-align:middle}.label-responsive{margin:.5em 0}.export-filters li{margin-bottom:0}.form-table .color-palette td{display:table-cell;width:15px}.form-table table.color-palette{margin-left:10px}input,textarea{font-size:16px}#profile-page .form-table textarea,.form-table span.description,.form-table td input[type=text],.form-table td input[type=password],.form-table td input[type=email],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table .form-required.form-invalid td:after{float:left;margin:-30px 0 0 3px}#wpbody .form-table td select{height:40px}.form-table input[type=text].small-text,input[type=text].small-text,input[type=search].small-text,input[type=password].small-text,input[type=number].small-text{width:auto;max-width:55px;display:inline;padding:3px 6px;margin:0 3px}#pass-strength-result{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:8px}p.search-box{float:none;position:absolute;bottom:0;width:98%;height:90px;margin-bottom:20px}p.search-box input[name="s"]{height:auto;float:none;width:100%;margin-bottom:10px;vertical-align:middle;-webkit-appearance:none}p.search-box input[type=submit]{margin-bottom:10px}.form-table span.description{display:inline;padding:4px 0 0;line-height:1.4em;font-size:14px}.form-table th{padding-top:10px;padding-bottom:0;border-bottom:0}.form-table td{margin-bottom:0;padding-bottom:6px;padding-top:4px;padding-right:0}.form-table.permalink-structure td code{margin-right:32px}.form-table.permalink-structure td input[type=text]{margin-right:32px;margin-top:4px;width:96%}.form-table input.regular-text{width:100%}.form-table label{font-size:14px}.form-table fieldset label{display:block}#local-time,#utc-time{display:block;float:none;margin-top:.5em}.form-field #domain{max-width:none}.wp-pwd{position:relative}.wp-pwd [type=text],.wp-pwd [type=password]{padding-left:40px}.wp-pwd button.button{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;line-height:2;margin:0;padding:5px 10px;position:absolute;left:0;top:0}.wp-pwd button.button:active,.wp-pwd button.button:focus,.wp-pwd button.button:hover{background:0 0}.wp-pwd .button .text{display:none}.options-general-php input[type=text].small-text{max-width:60px;margin:0}}.locale-he-il em,.locale-zh-cn #local-time,.locale-zh-cn #utc-time,.locale-zh-cn .form-wrap p,.locale-zh-cn .howto,.locale-zh-cn .inline-edit-row fieldset span.checkbox-title,.locale-zh-cn .inline-edit-row fieldset span.title,.locale-zh-cn .js .input-with-default-title,.locale-zh-cn .link-to-original,.locale-zh-cn .tablenav .displaying-num,.locale-zh-cn p.description,.locale-zh-cn p.help,.locale-zh-cn p.install-help,.locale-zh-cn span.description{font-style:normal}@media only screen and (max-width:768px){.form-field input[type=text],.form-field input[type=password],.form-field input[type=email],.form-field select,.form-field textarea{width:99%}.form-wrap .form-field{padding:0}#profile-page .form-table textarea{max-width:400px;width:auto}}.locale-de-de #customize-header-actions .button,.locale-de-de-formal #customize-header-actions .button,.locale-ru-ru #customize-header-actions .button{padding:0 5px 1px}@media only screen and (max-height:480px){.request-filesystem-credentials-dialog .notification-dialog{width:100%;height:100%;max-height:100%;position:fixed;top:0;margin:0;right:0}}@media screen and (max-width:600px){.color-option{width:49%}}@media only screen and (max-width:320px){.options-general-php .date-time-text.date-time-custom-text{min-width:0;margin-left:.5em}}body.rtl,body.rtl .press-this a.wp-switch-editor{font-family:Tahoma,Arial,sans-serif}.rtl h1,.rtl h2,.rtl h3,.rtl h4,.rtl h5,.rtl h6{font-family:Arial,sans-serif;font-weight:600}body.locale-he-il,body.locale-he-il .press-this a.wp-switch-editor{font-family:Arial,sans-serif}.locale-he-il em{font-weight:600}.locale-zh-cn .hdnle a{font-size:12px}.locale-zh-cn form.upgrade .hint{font-style:normal;font-size:100%}.locale-zh-cn #sort-buttons{font-size:1em!important}.locale-de-de #customize-header-actions .spinner,.locale-de-de-formal #customize-header-actions .spinner{margin:16px 3px 0}.locale-ru-ru #adminmenu{width:inherit}.locale-ru-ru #adminmenu,.locale-ru-ru #wpbody{margin-right:0}.locale-ru-ru .inline-edit-row fieldset label span.title,.locale-ru-ru .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-right:8em}.locale-ru-ru.post-new-php .tagsdiv .newtag,.locale-ru-ru.post-php .tagsdiv .newtag{width:165px}.locale-ru-ru.press-this .posting{margin-left:277px}.locale-ru-ru .press-this-sidebar{width:265px}.locale-ru-ru #customize-header-actions .spinner{margin:16px 3px 0}.locale-lt-lt .inline-edit-row fieldset label span.title,.locale-lt-lt .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap{margin-right:8em}@media screen and (max-width:782px){.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap,.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-right:0}}body,html{height:100%;margin:0;padding:0}body{background:#f1f1f1;min-width:0;color:#444;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:1.4em}a{color:#0073aa;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;outline:0}a:active,a:hover{color:#00a0d2}a:focus{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 a:focus{outline:#5b9dd9 solid 1px}p{line-height:1.5}.login #login_error,.login .message{border-right:4px solid #00a0d2;padding:12px;margin-right:0;background-color:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.login #login_error{border-right-color:#dc3232}#loginform p.submit,.login-action-lostpassword p.submit{border:none;margin:-10px 0 20px}.login *{margin:0;padding:0}.login form{margin-top:20px;margin-right:0;padding:26px 24px 46px;background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}.login form .forgetmenot{font-weight:400;float:right;margin-bottom:0}.login .button-primary{float:left}#login form p{margin-bottom:0}#login form p.submit{margin:0;padding:0}.login label{color:#72777c;font-size:14px}.login form .forgetmenot label{font-size:12px;line-height:19px}.login h1{text-align:center}.login h1 a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:84px;background-size:84px;background-position:center top;background-repeat:no-repeat;color:#444;height:84px;font-size:20px;line-height:1.3em;margin:0 auto 25px;padding:0;text-decoration:none;width:84px;text-indent:-9999px;outline:0;display:block}#login{width:320px;padding:8% 0 0;margin:auto}.login #backtoblog,.login #nav{font-size:13px;padding:0 24px}.login #nav{margin:24px 0 0}#backtoblog{margin:16px 0}.login #backtoblog a,.login #nav a{text-decoration:none;color:#555d66}.login #backtoblog a:hover,.login #nav a:hover,.login h1 a:hover{color:#00a0d2}.login #backtoblog a:focus,.login #nav a:focus,.login h1 a:focus{color:#124964}.login form .input,.login input[type=text]{font-size:24px;width:100%;padding:3px;margin:2px 0 16px 6px}.login form .input,.login form input[type=checkbox],.login input[type=text]{background:#fbfbfb}.ie7 .login form .input,.ie8 .login form .input{font-family:sans-serif}.login-action-rp input[type=text]{-webkit-box-shadow:none;box-shadow:none;margin:0}.login #pass-strength-result{font-weight:600;margin:-1px 0 16px 5px;padding:6px 5px;text-align:center;width:100%}.mobile #login{padding:20px 0}.mobile #login form{margin-right:0}.mobile #login #backtoblog,.mobile #login #nav{margin-right:8px}body.interim-login{height:auto}.interim-login #login{padding:0;margin:5px auto 20px}.interim-login.login h1 a{width:auto}.interim-login #login_error,.interim-login.login .message{margin:0 0 16px}.interim-login.login form{margin:0}@-ms-viewport{width:device-width}@media screen and (max-width:782px){.interim-login input[type=checkbox]{height:16px;width:16px}.interim-login input[type=checkbox]:checked:before{width:16px;font:400 21px/1 dashicons;margin:-3px -4px 0 0}}
\ No newline at end of file
index 4cb2f85ab7595f3386790a15b2c3127b3db140ce..9f69e9c918a8d20baa9f2b47a9c66f6b0c8a0a5a 100644 (file)
@@ -8,15 +8,11 @@ body {
        padding: 0;
 }
 
-html {
-       background: #f1f1f1;
-}
-
 body {
        background: #f1f1f1;
        min-width: 0;
        color: #444;
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        font-size: 13px;
        line-height: 1.4em;
 }
@@ -87,7 +83,7 @@ p {
        margin-top: 20px;
        margin-left: 0;
        padding: 26px 24px 46px;
-       font-weight: normal;
+       font-weight: 400;
        overflow: hidden;
        background: #fff;
        -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13);
@@ -95,7 +91,7 @@ p {
 }
 
 .login form .forgetmenot {
-       font-weight: normal;
+       font-weight: 400;
        float: left;
        margin-bottom: 0;
 }
@@ -137,7 +133,7 @@ p {
        color: #444;
        height: 84px;
        font-size: 20px;
-       font-weight: normal;
+       font-weight: 400;
        line-height: 1.3em;
        margin: 0 auto 25px;
        padding: 0;
index 284615a7d9fbc77e2e78da3394d66b03e26d37eb..31dd8627928db4584e450237a9ba007dc974f5a1 100644 (file)
@@ -1 +1 @@
-#pass-strength-result,input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.meta-box-sortables select,p.submit{max-width:100%}#your-profile label+a,.wp-admin select,fieldset label,label{vertical-align:middle}#pressthis-code-wrap,textarea{overflow:auto}input,textarea{box-sizing:border-box}input[type=text],input[type=search],input[type=radio],input[type=tel],input[type=time],input[type=url],input[type=week],input[type=password],input[type=checkbox],input[type=color],input[type=date],input[type=datetime],input[type=datetime-local],input[type=email],input[type=month],input[type=number],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out}input[type=text]:focus,input[type=search]:focus,input[type=radio]:focus,input[type=tel]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=password]:focus,input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[type=url],input[type=email]{direction:ltr}input[type=number]{height:28px;line-height:inherit}input[type=radio],input[type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#82878c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#00a0d2}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-right:4px;line-height:10px}input[type=radio]:checked:before,input[type=checkbox]:checked:before{float:left;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:"\f147";margin:-3px 0 0 -4px;color:#1e8cbe}input[type=radio]:checked:before{content:"\2022";text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}@-moz-document url-prefix(){.form-table input.tog,input[type=radio],input[type=checkbox]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;-webkit-border-radius:0;border-radius:0}textarea{padding:2px 6px;line-height:1.4;resize:vertical}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input.readonly,input[readonly],textarea.readonly,textarea[readonly]{background-color:#eee}::-webkit-input-placeholder{color:#72777c}::-moz-placeholder{color:#72777c;opacity:1}:-ms-input-placeholder{color:#72777c}.form-invalid input,.form-invalid input:focus,.form-invalid select,.form-invalid select:focus{border-color:#dc3232!important;-webkit-box-shadow:0 0 2px rgba(204,0,0,.8);box-shadow:0 0 2px rgba(204,0,0,.8)}.form-table .form-required.form-invalid td:after{content:"\f534";font:400 20px/1 dashicons;color:#dc3232;margin-left:-25px;vertical-align:middle}.form-table .form-required.user-pass1-wrap.form-invalid td:after{content:''}.form-table .form-required.user-pass1-wrap.form-invalid .password-input-wrapper:after{content:'\f534';font:400 20px/1 dashicons;color:#dc3232;margin:0 6px 0 -29px;vertical-align:middle}.form-input-tip{color:#666}input.disabled,input:disabled,select.disabled,select:disabled,textarea.disabled,textarea:disabled{background:rgba(255,255,255,.5);border-color:rgba(222,222,222,.75);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);color:rgba(51,51,51,.5)}input[type=file].disabled,input[type=file]:disabled,input[type=range].disabled,input[type=range]:disabled{background:0 0;-webkit-box-shadow:none;box-shadow:none}input[type=radio].disabled,input[type=radio].disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before,input[type=checkbox].disabled,input[type=checkbox].disabled:checked:before,input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px}.wp-admin .button-cancel{padding:0 5px;line-height:2}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;border:none}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:left;margin-top:20px;padding-top:10px}.textright p.submit{border:none;text-align:right}table.form-table+input+input+p.submit,table.form-table+input+p.submit,table.form-table+p.submit{border-top:none;padding-top:0}#major-publishing-actions input,#minor-publishing-actions .preview,#minor-publishing-actions input{text-align:center}input.all-options,textarea.all-options{width:250px}input.large-text,textarea.large-text{width:99%}input.regular-text{width:25em}input.small-text{width:50px;padding:1px 6px}input[type=number].small-text{width:65px}input.tiny-text{width:35px}input[type=number].tiny-text{width:45px}#doaction,#doaction2,#post-query-submit{margin:1px 8px 0 0}.tablenav #changeit,.tablenav #clear-recent-list,.tablenav #delete_all,.wp-filter #delete_all{margin-top:1px}.tablenav .actions select{float:left;margin-right:6px;max-width:200px}.ie8 .tablenav .actions select{width:155px}.ie8 .tablenav .actions select#cat{width:200px}#timezone_string option{margin-left:1em}button.wp-hide-pw>.dashicons{position:relative;top:3px}#misc-publishing-actions label,.options-media-php label[for*="_size_"]{vertical-align:baseline}#misc-publishing-actions label[for=post_status]:before{content:"\f173";display:inline-block;font:400 20px/1 dashicons;speak:none;left:-1px;padding:0 5px 0 0;position:relative;top:0;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#pass1-text,.pw-weak,.show-password #pass1{display:none}#pass-strength-result{background-color:#eee;border:1px solid #ddd;color:#23282d;margin:-2px 5px 5px 1px;padding:3px 5px;text-align:center;width:25em;box-sizing:border-box;opacity:0}#pass-strength-result.short{background-color:#f1adad;border-color:#e35b5b;opacity:1}#pass-strength-result.bad{background-color:#fbc5a9;border-color:#f78b53;opacity:1}#pass-strength-result.good{background-color:#ffe399;border-color:#ffc733;opacity:1}#pass-strength-result.strong{background-color:#c1e1b9;border-color:#83c373;opacity:1}#pass1-text.short,#pass1.short{border-color:#e35b5b}#pass1-text.bad,#pass1.bad{border-color:#f78b53}#pass1-text.good,#pass1.good{border-color:#ffc733}#pass1-text.strong,#pass1.strong{border-color:#83c373}.indicator-hint{padding-top:8px}.show-password #pass1-text{display:inline-block}.form-table span.description.important{font-size:12px}p.search-box{float:right;margin:0}.network-admin.themes-php p.search-box{clear:left}.search-box input[name="s"],.tablenav .search-plugins input[name="s"],.tagsdiv .newtag{float:left;height:28px;margin:0 4px 0 0}input[type=text].ui-autocomplete-loading,input[type=email].ui-autocomplete-loading{background-image:url(../images/loading.gif);background-repeat:no-repeat;background-position:right center;visibility:visible}input.ui-autocomplete-input.open{border-bottom-color:transparent}ul#add-to-blog-users{margin:0 0 0 14px}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:left}.ui-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}.form-table{border-collapse:collapse;margin-top:.5em;width:100%;clear:both}.form-table,.form-table td,.form-table td p,.form-table th,.form-wrap label{font-size:14px}.form-table td{margin-bottom:9px;padding:15px 10px;line-height:1.3;vertical-align:middle}.form-table th,.form-wrap label{color:#23282d;font-weight:400;text-shadow:none;vertical-align:baseline}.form-table th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;width:200px;line-height:1.3;font-weight:600}.form-table th.th-full{width:auto;font-weight:400}.form-table td p{margin-top:4px;margin-bottom:0}.form-table .date-time-doc{margin-top:1em}.form-table p.timezone-info{margin:1em 0}.form-table td fieldset label{margin:.25em 0 .5em!important;display:inline-block}.form-table td fieldset label,.form-table td fieldset li,.form-table td fieldset p{line-height:1.4em}.form-table input.tog,.form-table input[type=radio]{margin-top:-4px;margin-right:4px;float:none}.form-table .pre{padding:8px;margin:0}table.form-table td .updated{font-size:13px}table.form-table td .updated p{font-size:13px;margin:.3em 0}#profile-page .form-table textarea{width:500px;margin-bottom:6px}#profile-page .form-table #rich_editing{margin-right:5px}#your-profile legend{font-size:22px}#display_name{width:15em}#adduser .form-field input,#createuser .form-field input{width:25em}.color-option{display:inline-block;width:24%;padding:5px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:3px;cursor:pointer}.color-option.selected,.color-option:hover{background:#ddd}.color-palette{width:100%;border-spacing:0;border-collapse:collapse}.color-palette td{height:20px;padding:0;border:none}.tool-box .title{margin:8px 0;font-size:18px;font-weight:400;line-height:24px}.label-responsive{vertical-align:middle}#export-filters p{margin:0 0 1em}#export-filters p.submit{margin:7px 0 5px}.card{position:relative;margin-top:20px;padding:.7em 2em 1em;min-width:255px;max-width:520px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff}.pressthis h4{margin:2em 0 1em}.pressthis textarea{width:100%;font-size:1em}.login form,.login h1 a{overflow:hidden;font-weight:400}.pressthis-bookmarklet-wrapper{margin:20px 0 8px;vertical-align:top;position:relative;z-index:1}.pressthis-bookmarklet,.pressthis-bookmarklet:active,.pressthis-bookmarklet:focus,.pressthis-bookmarklet:hover{display:inline-block;position:relative;cursor:move;color:#32373c;background:#e5e5e5;-webkit-border-radius:5px;border-radius:5px;border:1px solid #b4b9be;font-style:normal;line-height:16px;font-size:14px;text-decoration:none}.pressthis-bookmarklet:active{outline:0}.pressthis-bookmarklet:after{content:"";width:70%;height:55%;z-index:-1;position:absolute;right:10px;bottom:9px;background:0 0;-webkit-transform:skew(20deg) rotate(6deg);-ms-transform:skew(20deg) rotate(6deg);transform:skew(20deg) rotate(6deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.6);box-shadow:0 10px 8px rgba(0,0,0,.6)}.pressthis-bookmarklet:hover:after{-webkit-transform:skew(20deg) rotate(9deg);-ms-transform:skew(20deg) rotate(9deg);transform:skew(20deg) rotate(9deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.7);box-shadow:0 10px 8px rgba(0,0,0,.7)}.pressthis-bookmarklet span{display:inline-block;margin:0;padding:0 12px 8px 9px}.pressthis-bookmarklet span:before{color:#72777c;font:400 20px/1 dashicons;content:"\f157";position:relative;display:inline-block;top:4px;margin-right:4px}.pressthis-js-toggle,.pressthis-js-toggle.button.button{margin-left:10px;padding:0;height:auto;vertical-align:top}.pressthis-js-toggle .dashicons{margin:5px 8px 6px 7px;color:#555d66}.timezone-info code{white-space:nowrap}.defaultavatarpicker .avatar{margin:2px 0;vertical-align:middle}.options-general-php .date-time-text{display:inline-block;min-width:10em}.options-general-php input.small-text{width:56px}.options-general-php .spinner{float:none;margin:0 3px}.options-general-php .language-install-spinner,.settings-php .language-install-spinner{display:inline-block;float:none;margin:-3px 5px 0;vertical-align:middle}.setup-php textarea{max-width:100%}.form-field #site-address{max-width:25em}.form-field #domain{max-width:22em}.form-field #admin-email,.form-field #blog_last_updated,.form-field #blog_registered,.form-field #path,.form-field #site-title{max-width:25em}.form-field #path{margin-bottom:5px}#search-sites,#search-users{max-width:100%}.request-filesystem-credentials-dialog{display:none}.request-filesystem-credentials-dialog .notification-dialog{top:15%;max-height:85%}.request-filesystem-credentials-dialog-content{margin:25px}#request-filesystem-credentials-title{font-size:1.3em;margin:1em 0}.request-filesystem-credentials-form legend{font-size:1em;padding:1.33em 0;font-weight:600}.request-filesystem-credentials-form input[type=text],.request-filesystem-credentials-form input[type=password]{display:block}.request-filesystem-credentials-dialog input[type=text],.request-filesystem-credentials-dialog input[type=password]{width:100%}.request-filesystem-credentials-form .field-title{font-weight:600}.request-filesystem-credentials-dialog label[for=hostname],.request-filesystem-credentials-dialog label[for=public_key],.request-filesystem-credentials-dialog label[for=private_key]{display:block;margin-bottom:1em}.request-filesystem-credentials-dialog .ftp-password,.request-filesystem-credentials-dialog .ftp-username{float:left;width:48%}.request-filesystem-credentials-dialog .ftp-password{margin-left:4%}.request-filesystem-credentials-dialog .request-filesystem-credentials-action-buttons{text-align:right}.request-filesystem-credentials-dialog label[for=ftp]{margin-right:10px}#request-filesystem-credentials-dialog .button:not(:last-child){margin-right:10px}#request-filesystem-credentials-form .cancel-button{display:none}#request-filesystem-credentials-dialog .cancel-button{display:inline}@media screen and (max-width:782px){textarea{-webkit-appearance:none}input[type=text],input[type=search],input[type=password],input[type=email],input[type=number]{-webkit-appearance:none;padding:6px 10px}input[type=number]{height:40px}input.code{padding-bottom:5px;padding-top:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox],input[type=checkbox]{-webkit-appearance:none;padding:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox]{margin-bottom:8px}.widefat tfoot td input[type=checkbox]:before,.widefat th input[type=checkbox]:before,.widefat thead td input[type=checkbox]:before,input[type=checkbox]:checked:before{font:400 30px/1 dashicons;margin:-3px -5px}input[type=radio],input[type=checkbox]{height:25px;width:25px}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox]{margin-top:-3px}input[type=radio]:checked:before{vertical-align:middle;width:9px;height:9px;margin:7px;line-height:16px}.wp-upload-form input[type=submit]{margin-top:10px}#wpbody select{height:36px;font-size:16px}.wp-admin .button-cancel{padding:0;font-size:14px}#adduser .form-field input,#createuser .form-field input{width:100%}.form-table{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table td,.form-table th,.label-responsive{display:block;width:auto;vertical-align:middle}.label-responsive{margin:.5em 0}.export-filters li{margin-bottom:0}.form-table .color-palette td{display:table-cell;width:15px}.form-table table.color-palette{margin-right:10px}input,textarea{font-size:16px}#profile-page .form-table textarea,.form-table span.description,.form-table td input[type=text],.form-table td input[type=password],.form-table td input[type=email],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table .form-required.form-invalid td:after{float:right;margin:-30px 3px 0 0}#wpbody .form-table td select{height:40px}.form-table input[type=text].small-text,input[type=text].small-text,input[type=search].small-text,input[type=password].small-text,input[type=number].small-text{width:auto;max-width:55px;display:inline;padding:3px 6px;margin:0 3px}#pass-strength-result{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:8px}p.search-box{float:none;position:absolute;bottom:0;width:98%;height:90px;margin-bottom:20px}p.search-box input[name="s"]{height:auto;float:none;width:100%;margin-bottom:10px;vertical-align:middle;-webkit-appearance:none}p.search-box input[type=submit]{margin-bottom:10px}.form-table span.description{display:inline;padding:4px 0 0;line-height:1.4em;font-size:14px}.form-table th{padding-top:10px;padding-bottom:0;border-bottom:0}.form-table td{margin-bottom:0;padding-bottom:6px;padding-top:4px;padding-left:0}.form-table.permalink-structure td code{margin-left:32px}.form-table.permalink-structure td input[type=text]{margin-left:32px;margin-top:4px;width:96%}.form-table input.regular-text{width:100%}.form-table label{font-size:14px}.form-table fieldset label{display:block}#local-time,#utc-time{display:block;float:none;margin-top:.5em}.form-field #domain{max-width:none}.wp-pwd{position:relative}.wp-pwd [type=text],.wp-pwd [type=password]{padding-right:40px}.wp-pwd button.button{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;line-height:2;margin:0;padding:5px 10px;position:absolute;right:0;top:0}.wp-pwd button.button:active,.wp-pwd button.button:focus,.wp-pwd button.button:hover{background:0 0}.wp-pwd .button .text{display:none}.options-general-php input[type=text].small-text{max-width:60px;margin:0}}.locale-he-il em,.locale-zh-cn #local-time,.locale-zh-cn #utc-time,.locale-zh-cn .form-wrap p,.locale-zh-cn .howto,.locale-zh-cn .inline-edit-row fieldset span.checkbox-title,.locale-zh-cn .inline-edit-row fieldset span.title,.locale-zh-cn .js .input-with-default-title,.locale-zh-cn .link-to-original,.locale-zh-cn .tablenav .displaying-num,.locale-zh-cn p.description,.locale-zh-cn p.help,.locale-zh-cn p.install-help,.locale-zh-cn span.description{font-style:normal}body,html{background:#f1f1f1}@media only screen and (max-width:768px){.form-field input[type=text],.form-field input[type=password],.form-field input[type=email],.form-field select,.form-field textarea{width:99%}.form-wrap .form-field{padding:0}#profile-page .form-table textarea{max-width:400px;width:auto}}.locale-de-de #customize-header-actions .button,.locale-de-de-formal #customize-header-actions .button,.locale-ru-ru #customize-header-actions .button{padding:0 5px 1px}@media only screen and (max-height:480px){.request-filesystem-credentials-dialog .notification-dialog{width:100%;height:100%;max-height:100%;position:fixed;top:0;margin:0;left:0}}@media screen and (max-width:600px){.color-option{width:49%}}@media only screen and (max-width:320px){.options-general-php .date-time-text.date-time-custom-text{min-width:0;margin-right:.5em}}body.rtl,body.rtl .press-this a.wp-switch-editor{font-family:Tahoma,Arial,sans-serif}.rtl h1,.rtl h2,.rtl h3,.rtl h4,.rtl h5,.rtl h6{font-family:Arial,sans-serif;font-weight:700}body.locale-he-il,body.locale-he-il .press-this a.wp-switch-editor{font-family:Arial,sans-serif}.locale-he-il em{font-weight:700}.locale-zh-cn .hdnle a{font-size:12px}.locale-zh-cn form.upgrade .hint{font-style:normal;font-size:100%}.locale-zh-cn #sort-buttons{font-size:1em!important}.locale-de-de #customize-header-actions .spinner,.locale-de-de-formal #customize-header-actions .spinner{margin:16px 3px 0}.locale-ru-ru #adminmenu{width:inherit}.locale-ru-ru #adminmenu,.locale-ru-ru #wpbody{margin-left:0}.locale-ru-ru .inline-edit-row fieldset label span.title,.locale-ru-ru .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-left:8em}.locale-ru-ru.post-new-php .tagsdiv .newtag,.locale-ru-ru.post-php .tagsdiv .newtag{width:165px}.locale-ru-ru.press-this .posting{margin-right:277px}.locale-ru-ru .press-this-sidebar{width:265px}.locale-ru-ru #customize-header-actions .spinner{margin:16px 3px 0}.locale-lt-lt .inline-edit-row fieldset label span.title,.locale-lt-lt .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap{margin-left:8em}@media screen and (max-width:782px){.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap,.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-left:0}}body,html{height:100%;margin:0;padding:0}body{min-width:0;color:#444;font-family:"Open Sans",sans-serif;font-size:13px;line-height:1.4em}a{color:#0073aa;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;outline:0}a:active,a:hover{color:#00a0d2}a:focus{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 a:focus{outline:#5b9dd9 solid 1px}p{line-height:1.5}.login #login_error,.login .message{border-left:4px solid #00a0d2;padding:12px;margin-left:0;background-color:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.login #login_error{border-left-color:#dc3232}#loginform p.submit,.login-action-lostpassword p.submit{border:none;margin:-10px 0 20px}.login *{margin:0;padding:0}.login form{margin-top:20px;margin-left:0;padding:26px 24px 46px;background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}.login form .forgetmenot{font-weight:400;float:left;margin-bottom:0}.login .button-primary{float:right}#login form p{margin-bottom:0}#login form p.submit{margin:0;padding:0}.login label{color:#72777c;font-size:14px}.login form .forgetmenot label{font-size:12px;line-height:19px}.login h1{text-align:center}.login h1 a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:84px;background-size:84px;background-position:center top;background-repeat:no-repeat;color:#444;height:84px;font-size:20px;line-height:1.3em;margin:0 auto 25px;padding:0;text-decoration:none;width:84px;text-indent:-9999px;outline:0;display:block}#login{width:320px;padding:8% 0 0;margin:auto}.login #backtoblog,.login #nav{font-size:13px;padding:0 24px}.login #nav{margin:24px 0 0}#backtoblog{margin:16px 0}.login #backtoblog a,.login #nav a{text-decoration:none;color:#555d66}.login #backtoblog a:hover,.login #nav a:hover,.login h1 a:hover{color:#00a0d2}.login #backtoblog a:focus,.login #nav a:focus,.login h1 a:focus{color:#124964}.login form .input,.login input[type=text]{font-size:24px;width:100%;padding:3px;margin:2px 6px 16px 0}.login form .input,.login form input[type=checkbox],.login input[type=text]{background:#fbfbfb}.ie7 .login form .input,.ie8 .login form .input{font-family:sans-serif}.login-action-rp input[type=text]{-webkit-box-shadow:none;box-shadow:none;margin:0}.login #pass-strength-result{font-weight:600;margin:-1px 5px 16px 0;padding:6px 5px;text-align:center;width:100%}.mobile #login{padding:20px 0}.mobile #login form{margin-left:0}.mobile #login #backtoblog,.mobile #login #nav{margin-left:8px}body.interim-login{height:auto}.interim-login #login{padding:0;margin:5px auto 20px}.interim-login.login h1 a{width:auto}.interim-login #login_error,.interim-login.login .message{margin:0 0 16px}.interim-login.login form{margin:0}@-ms-viewport{width:device-width}@media screen and (max-width:782px){.interim-login input[type=checkbox]{height:16px;width:16px}.interim-login input[type=checkbox]:checked:before{width:16px;font:400 21px/1 dashicons;margin:-3px 0 0 -4px}}
\ No newline at end of file
+#pass-strength-result,input,textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.meta-box-sortables select,p.submit{max-width:100%}#your-profile label+a,.wp-admin select,fieldset label,label{vertical-align:middle}#pressthis-code-wrap,textarea{overflow:auto}input,textarea{box-sizing:border-box}input[type=text],input[type=search],input[type=radio],input[type=tel],input[type=time],input[type=url],input[type=week],input[type=password],input[type=checkbox],input[type=color],input[type=date],input[type=datetime],input[type=datetime-local],input[type=email],input[type=month],input[type=number],select,textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out}input[type=text]:focus,input[type=search]:focus,input[type=radio]:focus,input[type=tel]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=password]:focus,input[type=checkbox]:focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,select:focus,textarea:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}input[type=url],input[type=email]{direction:ltr}input[type=number]{height:28px;line-height:1}input[type=radio],input[type=checkbox]{border:1px solid #b4b9be;background:#fff;color:#555;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:-4px 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:middle;width:16px;min-width:16px;-webkit-appearance:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-transition:.05s border-color ease-in-out;transition:.05s border-color ease-in-out}input[type=radio]:checked+label:before{color:#82878c}.wp-core-ui input[type=reset]:active,.wp-core-ui input[type=reset]:hover{color:#00a0d2}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox],td>input[type=checkbox]{margin-top:0}.wp-admin p label input[type=checkbox]{margin-top:-4px}.wp-admin p label input[type=radio]{margin-top:-2px}input[type=radio]{-webkit-border-radius:50%;border-radius:50%;margin-right:4px;line-height:10px}input[type=radio]:checked:before,input[type=checkbox]:checked:before{float:left;display:inline-block;vertical-align:middle;width:16px;font:400 21px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}input[type=checkbox]:checked:before{content:"\f147";margin:-3px 0 0 -4px;color:#1e8cbe}input[type=radio]:checked:before{content:"\2022";text-indent:-9999px;-webkit-border-radius:50px;border-radius:50px;font-size:24px;width:6px;height:6px;margin:4px;line-height:16px;background-color:#1e8cbe}@-moz-document url-prefix(){.form-table input.tog,input[type=radio],input[type=checkbox]{margin-bottom:-1px}}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration{display:none}.ie8 input[type=password]{font-family:sans-serif}button,input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}input,select,textarea{font-size:14px;-webkit-border-radius:0;border-radius:0}textarea{padding:2px 6px;line-height:1.4;resize:vertical}.wp-admin input[type=file]{padding:3px 0}label{cursor:pointer}input,select{margin:1px;padding:3px 5px}input.code{padding-top:6px}textarea.code{line-height:1.4;padding:4px 6px 1px}input.readonly,input[readonly],textarea.readonly,textarea[readonly]{background-color:#eee}::-webkit-input-placeholder{color:#72777c}::-moz-placeholder{color:#72777c;opacity:1}:-ms-input-placeholder{color:#72777c}.form-invalid input,.form-invalid input:focus,.form-invalid select,.form-invalid select:focus{border-color:#dc3232!important;-webkit-box-shadow:0 0 2px rgba(204,0,0,.8);box-shadow:0 0 2px rgba(204,0,0,.8)}.form-table .form-required.form-invalid td:after{content:"\f534";font:400 20px/1 dashicons;color:#dc3232;margin-left:-25px;vertical-align:middle}.form-table .form-required.user-pass1-wrap.form-invalid td:after{content:''}.form-table .form-required.user-pass1-wrap.form-invalid .password-input-wrapper:after{content:'\f534';font:400 20px/1 dashicons;color:#dc3232;margin:0 6px 0 -29px;vertical-align:middle}.form-input-tip{color:#666}input.disabled,input:disabled,select.disabled,select:disabled,textarea.disabled,textarea:disabled{background:rgba(255,255,255,.5);border-color:rgba(222,222,222,.75);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.04);box-shadow:inset 0 1px 2px rgba(0,0,0,.04);color:rgba(51,51,51,.5)}input[type=file].disabled,input[type=file]:disabled,input[type=range].disabled,input[type=range]:disabled{background:0 0;-webkit-box-shadow:none;box-shadow:none}input[type=radio].disabled,input[type=radio].disabled:checked:before,input[type=radio]:disabled,input[type=radio]:disabled:checked:before,input[type=checkbox].disabled,input[type=checkbox].disabled:checked:before,input[type=checkbox]:disabled,input[type=checkbox]:disabled:checked:before{opacity:.7}.wp-admin select{padding:2px;line-height:28px;height:28px}.wp-admin .button-cancel{padding:0 5px;line-height:2}.wp-admin select[multiple]{height:auto}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;border:none}form p.submit a.cancel:hover{text-decoration:none}p.submit{text-align:left;margin-top:20px;padding-top:10px}.textright p.submit{border:none;text-align:right}table.form-table+input+input+p.submit,table.form-table+input+p.submit,table.form-table+p.submit{border-top:none;padding-top:0}#major-publishing-actions input,#minor-publishing-actions .preview,#minor-publishing-actions input{text-align:center}input.all-options,textarea.all-options{width:250px}input.large-text,textarea.large-text{width:99%}input.regular-text{width:25em}input.small-text{width:50px;padding:1px 6px}input[type=number].small-text{width:65px}input.tiny-text{width:35px}input[type=number].tiny-text{width:45px}#doaction,#doaction2,#post-query-submit{margin:1px 8px 0 0}.tablenav #changeit,.tablenav #clear-recent-list,.tablenav #delete_all,.wp-filter #delete_all{margin-top:1px}.tablenav .actions select{float:left;margin-right:6px;max-width:200px}.ie8 .tablenav .actions select{width:155px}.ie8 .tablenav .actions select#cat{width:200px}#timezone_string option{margin-left:1em}button.wp-hide-pw>.dashicons{position:relative;top:3px}#misc-publishing-actions label,.options-media-php label[for*="_size_"]{vertical-align:baseline}#misc-publishing-actions label[for=post_status]:before{content:"\f173";display:inline-block;font:400 20px/1 dashicons;speak:none;left:-1px;padding:0 5px 0 0;position:relative;top:0;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#pass1-text,.pw-weak,.show-password #pass1{display:none}#pass-strength-result{background-color:#eee;border:1px solid #ddd;color:#23282d;margin:-2px 5px 5px 1px;padding:3px 5px;text-align:center;width:25em;box-sizing:border-box;opacity:0}#pass-strength-result.short{background-color:#f1adad;border-color:#e35b5b;opacity:1}#pass-strength-result.bad{background-color:#fbc5a9;border-color:#f78b53;opacity:1}#pass-strength-result.good{background-color:#ffe399;border-color:#ffc733;opacity:1}#pass-strength-result.strong{background-color:#c1e1b9;border-color:#83c373;opacity:1}#pass1-text.short,#pass1.short{border-color:#e35b5b}#pass1-text.bad,#pass1.bad{border-color:#f78b53}#pass1-text.good,#pass1.good{border-color:#ffc733}#pass1-text.strong,#pass1.strong{border-color:#83c373}.indicator-hint{padding-top:8px}.show-password #pass1-text{display:inline-block}.form-table span.description.important{font-size:12px}p.search-box{float:right;margin:0}.network-admin.themes-php p.search-box{clear:left}.search-box input[name="s"],.tablenav .search-plugins input[name="s"],.tagsdiv .newtag{float:left;height:28px;margin:0 4px 0 0}.js.plugins-php .search-box .wp-filter-search{margin:0;width:280px;font-size:16px;font-weight:300;line-height:1.5;padding:3px 5px;height:32px}input[type=text].ui-autocomplete-loading,input[type=email].ui-autocomplete-loading{background-image:url(../images/loading.gif);background-repeat:no-repeat;background-position:right center;visibility:visible}input.ui-autocomplete-input.open{border-bottom-color:transparent}ul#add-to-blog-users{margin:0 0 0 14px}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:left}.ui-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}.form-table{border-collapse:collapse;margin-top:.5em;width:100%;clear:both}.form-table,.form-table td,.form-table td p,.form-table th{font-size:14px}.form-table td{margin-bottom:9px;padding:15px 10px;line-height:1.3;vertical-align:middle}.form-table th,.form-wrap label{color:#23282d;font-weight:400;text-shadow:none;vertical-align:baseline}.form-table th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;width:200px;line-height:1.3;font-weight:600}.form-table th.th-full{width:auto;font-weight:400}.form-table td p{margin-top:4px;margin-bottom:0}.form-table .date-time-doc{margin-top:1em}.form-table p.timezone-info{margin:1em 0}.form-table td fieldset label{margin:.25em 0 .5em!important;display:inline-block}.form-table td fieldset label,.form-table td fieldset li,.form-table td fieldset p{line-height:1.4em}.form-table input.tog,.form-table input[type=radio]{margin-top:-4px;margin-right:4px;float:none}.form-table .pre{padding:8px;margin:0}table.form-table td .updated{font-size:13px}table.form-table td .updated p{font-size:13px;margin:.3em 0}#profile-page .form-table textarea{width:500px;margin-bottom:6px}#profile-page .form-table #rich_editing{margin-right:5px}#your-profile legend{font-size:22px}#display_name{width:15em}#adduser .form-field input,#createuser .form-field input{width:25em}.color-option{display:inline-block;width:24%;padding:5px 15px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:3px;cursor:pointer}.color-option.selected,.color-option:hover{background:#ddd}.color-palette{width:100%;border-spacing:0;border-collapse:collapse}.color-palette td{height:20px;padding:0;border:none}.tool-box .title{margin:8px 0;font-size:18px;font-weight:400;line-height:24px}.label-responsive{vertical-align:middle}#export-filters p{margin:0 0 1em}#export-filters p.submit{margin:7px 0 5px}.card{position:relative;margin-top:20px;padding:.7em 2em 1em;min-width:255px;max-width:520px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff}.pressthis h4{margin:2em 0 1em}.pressthis textarea{width:100%;font-size:1em}.login form,.login h1 a{overflow:hidden;font-weight:400}.pressthis-bookmarklet-wrapper{margin:20px 0 8px;vertical-align:top;position:relative;z-index:1}.pressthis-bookmarklet,.pressthis-bookmarklet:active,.pressthis-bookmarklet:focus,.pressthis-bookmarklet:hover{display:inline-block;position:relative;cursor:move;color:#32373c;background:#e5e5e5;-webkit-border-radius:5px;border-radius:5px;border:1px solid #b4b9be;font-style:normal;line-height:16px;font-size:14px;text-decoration:none}.pressthis-bookmarklet:active{outline:0}.pressthis-bookmarklet:after{content:"";width:70%;height:55%;z-index:-1;position:absolute;right:10px;bottom:9px;background:0 0;-webkit-transform:skew(20deg) rotate(6deg);-ms-transform:skew(20deg) rotate(6deg);transform:skew(20deg) rotate(6deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.6);box-shadow:0 10px 8px rgba(0,0,0,.6)}.pressthis-bookmarklet:hover:after{-webkit-transform:skew(20deg) rotate(9deg);-ms-transform:skew(20deg) rotate(9deg);transform:skew(20deg) rotate(9deg);-webkit-box-shadow:0 10px 8px rgba(0,0,0,.7);box-shadow:0 10px 8px rgba(0,0,0,.7)}.pressthis-bookmarklet span{display:inline-block;margin:0;padding:0 12px 8px 9px}.pressthis-bookmarklet span:before{color:#72777c;font:400 20px/1 dashicons;content:"\f157";position:relative;display:inline-block;top:4px;margin-right:4px}.pressthis-js-toggle,.pressthis-js-toggle.button.button{margin-left:10px;padding:0;height:auto;vertical-align:top}.pressthis-js-toggle .dashicons{margin:5px 8px 6px 7px;color:#555d66}.timezone-info code{white-space:nowrap}.defaultavatarpicker .avatar{margin:2px 0;vertical-align:middle}.options-general-php .date-time-text{display:inline-block;min-width:10em}.options-general-php input.small-text{width:56px}.options-general-php .spinner{float:none;margin:0 3px}.options-general-php .language-install-spinner,.settings-php .language-install-spinner{display:inline-block;float:none;margin:-3px 5px 0;vertical-align:middle}.setup-php textarea{max-width:100%}.form-field #site-address{max-width:25em}.form-field #domain{max-width:22em}.form-field #admin-email,.form-field #blog_last_updated,.form-field #blog_registered,.form-field #path,.form-field #site-title{max-width:25em}.form-field #path{margin-bottom:5px}#search-sites,#search-users{max-width:100%}.request-filesystem-credentials-dialog{display:none}.request-filesystem-credentials-dialog .notification-dialog{top:10%;max-height:85%}.request-filesystem-credentials-dialog-content{margin:25px}#request-filesystem-credentials-title{font-size:1.3em;margin:1em 0}.request-filesystem-credentials-form legend{font-size:1em;padding:1.33em 0 0;font-weight:600}.request-filesystem-credentials-form input[type=text],.request-filesystem-credentials-form input[type=password]{display:block}.request-filesystem-credentials-dialog input[type=text],.request-filesystem-credentials-dialog input[type=password]{width:100%}.request-filesystem-credentials-form .field-title{font-weight:600}.request-filesystem-credentials-dialog label[for=hostname],.request-filesystem-credentials-dialog label[for=public_key],.request-filesystem-credentials-dialog label[for=private_key]{display:block;margin-bottom:1em}.request-filesystem-credentials-dialog .request-filesystem-credentials-action-buttons{text-align:right}.request-filesystem-credentials-dialog label[for=ftp]{margin-right:10px}.request-filesystem-credentials-dialog #auth-keys-desc{margin-bottom:0}#request-filesystem-credentials-dialog .button:not(:last-child){margin-right:10px}#request-filesystem-credentials-form .cancel-button{display:none}#request-filesystem-credentials-dialog .cancel-button{display:inline}.request-filesystem-credentials-dialog .ftp-password,.request-filesystem-credentials-dialog .ftp-username{float:none;width:auto}.request-filesystem-credentials-dialog .ftp-username{margin-bottom:1em}.request-filesystem-credentials-dialog .ftp-password{margin:0}.request-filesystem-credentials-dialog .ftp-password em{color:#888}.request-filesystem-credentials-dialog label{display:block;line-height:1.5;margin-bottom:1em}.request-filesystem-credentials-form #ssh-keys legend{font-size:1.3em}.request-filesystem-credentials-form .notice{margin:0 0 20px;clear:both}@media screen and (max-width:782px){textarea{-webkit-appearance:none}input[type=text],input[type=search],input[type=password],input[type=email],input[type=number]{-webkit-appearance:none;padding:6px 10px}input[type=number]{height:40px}input.code{padding-bottom:5px;padding-top:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox],input[type=checkbox]{-webkit-appearance:none;padding:10px}.widefat tfoot td input[type=checkbox],.widefat th input[type=checkbox],.widefat thead td input[type=checkbox]{margin-bottom:8px}.widefat tfoot td input[type=checkbox]:before,.widefat th input[type=checkbox]:before,.widefat thead td input[type=checkbox]:before,input[type=checkbox]:checked:before{font:400 30px/1 dashicons;margin:-3px -5px}input[type=radio],input[type=checkbox]{height:25px;width:25px}.wp-admin p input[type=radio],.wp-admin p input[type=checkbox]{margin-top:-3px}input[type=radio]:checked:before{vertical-align:middle;width:9px;height:9px;margin:7px;line-height:16px}.wp-upload-form input[type=submit]{margin-top:10px}#wpbody select{height:36px;font-size:16px}.wp-admin .button-cancel{padding:0;font-size:14px}#adduser .form-field input,#createuser .form-field input{width:100%}.form-table{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table td,.form-table th,.label-responsive{display:block;width:auto;vertical-align:middle}.label-responsive{margin:.5em 0}.export-filters li{margin-bottom:0}.form-table .color-palette td{display:table-cell;width:15px}.form-table table.color-palette{margin-right:10px}input,textarea{font-size:16px}#profile-page .form-table textarea,.form-table span.description,.form-table td input[type=text],.form-table td input[type=password],.form-table td input[type=email],.form-table td select,.form-table td textarea{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block;max-width:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-table .form-required.form-invalid td:after{float:right;margin:-30px 3px 0 0}#wpbody .form-table td select{height:40px}.form-table input[type=text].small-text,input[type=text].small-text,input[type=search].small-text,input[type=password].small-text,input[type=number].small-text{width:auto;max-width:55px;display:inline;padding:3px 6px;margin:0 3px}#pass-strength-result{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:8px}p.search-box{float:none;position:absolute;bottom:0;width:98%;height:90px;margin-bottom:20px}p.search-box input[name="s"]{height:auto;float:none;width:100%;margin-bottom:10px;vertical-align:middle;-webkit-appearance:none}p.search-box input[type=submit]{margin-bottom:10px}.form-table span.description{display:inline;padding:4px 0 0;line-height:1.4em;font-size:14px}.form-table th{padding-top:10px;padding-bottom:0;border-bottom:0}.form-table td{margin-bottom:0;padding-bottom:6px;padding-top:4px;padding-left:0}.form-table.permalink-structure td code{margin-left:32px}.form-table.permalink-structure td input[type=text]{margin-left:32px;margin-top:4px;width:96%}.form-table input.regular-text{width:100%}.form-table label{font-size:14px}.form-table fieldset label{display:block}#local-time,#utc-time{display:block;float:none;margin-top:.5em}.form-field #domain{max-width:none}.wp-pwd{position:relative}.wp-pwd [type=text],.wp-pwd [type=password]{padding-right:40px}.wp-pwd button.button{background:0 0;border:none;-webkit-box-shadow:none;box-shadow:none;line-height:2;margin:0;padding:5px 10px;position:absolute;right:0;top:0}.wp-pwd button.button:active,.wp-pwd button.button:focus,.wp-pwd button.button:hover{background:0 0}.wp-pwd .button .text{display:none}.options-general-php input[type=text].small-text{max-width:60px;margin:0}}.locale-he-il em,.locale-zh-cn #local-time,.locale-zh-cn #utc-time,.locale-zh-cn .form-wrap p,.locale-zh-cn .howto,.locale-zh-cn .inline-edit-row fieldset span.checkbox-title,.locale-zh-cn .inline-edit-row fieldset span.title,.locale-zh-cn .js .input-with-default-title,.locale-zh-cn .link-to-original,.locale-zh-cn .tablenav .displaying-num,.locale-zh-cn p.description,.locale-zh-cn p.help,.locale-zh-cn p.install-help,.locale-zh-cn span.description{font-style:normal}@media only screen and (max-width:768px){.form-field input[type=text],.form-field input[type=password],.form-field input[type=email],.form-field select,.form-field textarea{width:99%}.form-wrap .form-field{padding:0}#profile-page .form-table textarea{max-width:400px;width:auto}}.locale-de-de #customize-header-actions .button,.locale-de-de-formal #customize-header-actions .button,.locale-ru-ru #customize-header-actions .button{padding:0 5px 1px}@media only screen and (max-height:480px){.request-filesystem-credentials-dialog .notification-dialog{width:100%;height:100%;max-height:100%;position:fixed;top:0;margin:0;left:0}}@media screen and (max-width:600px){.color-option{width:49%}}@media only screen and (max-width:320px){.options-general-php .date-time-text.date-time-custom-text{min-width:0;margin-right:.5em}}body.rtl,body.rtl .press-this a.wp-switch-editor{font-family:Tahoma,Arial,sans-serif}.rtl h1,.rtl h2,.rtl h3,.rtl h4,.rtl h5,.rtl h6{font-family:Arial,sans-serif;font-weight:600}body.locale-he-il,body.locale-he-il .press-this a.wp-switch-editor{font-family:Arial,sans-serif}.locale-he-il em{font-weight:600}.locale-zh-cn .hdnle a{font-size:12px}.locale-zh-cn form.upgrade .hint{font-style:normal;font-size:100%}.locale-zh-cn #sort-buttons{font-size:1em!important}.locale-de-de #customize-header-actions .spinner,.locale-de-de-formal #customize-header-actions .spinner{margin:16px 3px 0}.locale-ru-ru #adminmenu{width:inherit}.locale-ru-ru #adminmenu,.locale-ru-ru #wpbody{margin-left:0}.locale-ru-ru .inline-edit-row fieldset label span.title,.locale-ru-ru .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-left:8em}.locale-ru-ru.post-new-php .tagsdiv .newtag,.locale-ru-ru.post-php .tagsdiv .newtag{width:165px}.locale-ru-ru.press-this .posting{margin-right:277px}.locale-ru-ru .press-this-sidebar{width:265px}.locale-ru-ru #customize-header-actions .spinner{margin:16px 3px 0}.locale-lt-lt .inline-edit-row fieldset label span.title,.locale-lt-lt .inline-edit-row fieldset.inline-edit-date legend{width:8em}.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap{margin-left:8em}@media screen and (max-width:782px){.locale-lt-lt .inline-edit-row fieldset .timestamp-wrap,.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap,.locale-ru-ru .inline-edit-row fieldset .timestamp-wrap,.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap{margin-left:0}}body,html{height:100%;margin:0;padding:0}body{background:#f1f1f1;min-width:0;color:#444;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:1.4em}a{color:#0073aa;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;outline:0}a:active,a:hover{color:#00a0d2}a:focus{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.ie8 a:focus{outline:#5b9dd9 solid 1px}p{line-height:1.5}.login #login_error,.login .message{border-left:4px solid #00a0d2;padding:12px;margin-left:0;background-color:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.login #login_error{border-left-color:#dc3232}#loginform p.submit,.login-action-lostpassword p.submit{border:none;margin:-10px 0 20px}.login *{margin:0;padding:0}.login form{margin-top:20px;margin-left:0;padding:26px 24px 46px;background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13)}.login form .forgetmenot{font-weight:400;float:left;margin-bottom:0}.login .button-primary{float:right}#login form p{margin-bottom:0}#login form p.submit{margin:0;padding:0}.login label{color:#72777c;font-size:14px}.login form .forgetmenot label{font-size:12px;line-height:19px}.login h1{text-align:center}.login h1 a{background-image:url(../images/w-logo-blue.png?ver=20131202);background-image:none,url(../images/wordpress-logo.svg?ver=20131107);-webkit-background-size:84px;background-size:84px;background-position:center top;background-repeat:no-repeat;color:#444;height:84px;font-size:20px;line-height:1.3em;margin:0 auto 25px;padding:0;text-decoration:none;width:84px;text-indent:-9999px;outline:0;display:block}#login{width:320px;padding:8% 0 0;margin:auto}.login #backtoblog,.login #nav{font-size:13px;padding:0 24px}.login #nav{margin:24px 0 0}#backtoblog{margin:16px 0}.login #backtoblog a,.login #nav a{text-decoration:none;color:#555d66}.login #backtoblog a:hover,.login #nav a:hover,.login h1 a:hover{color:#00a0d2}.login #backtoblog a:focus,.login #nav a:focus,.login h1 a:focus{color:#124964}.login form .input,.login input[type=text]{font-size:24px;width:100%;padding:3px;margin:2px 6px 16px 0}.login form .input,.login form input[type=checkbox],.login input[type=text]{background:#fbfbfb}.ie7 .login form .input,.ie8 .login form .input{font-family:sans-serif}.login-action-rp input[type=text]{-webkit-box-shadow:none;box-shadow:none;margin:0}.login #pass-strength-result{font-weight:600;margin:-1px 5px 16px 0;padding:6px 5px;text-align:center;width:100%}.mobile #login{padding:20px 0}.mobile #login form{margin-left:0}.mobile #login #backtoblog,.mobile #login #nav{margin-left:8px}body.interim-login{height:auto}.interim-login #login{padding:0;margin:5px auto 20px}.interim-login.login h1 a{width:auto}.interim-login #login_error,.interim-login.login .message{margin:0 0 16px}.interim-login.login form{margin:0}@-ms-viewport{width:device-width}@media screen and (max-width:782px){.interim-login input[type=checkbox]{height:16px;width:16px}.interim-login input[type=checkbox]:checked:before{width:16px;font:400 21px/1 dashicons;margin:-3px 0 0 -4px}}
\ No newline at end of file
index 43cb84a15e6b17d9b08ac51e94ea2ea4ce956209..4406d96eff206fce1d9c68ba2473f1b506905a0e 100644 (file)
 #find-posts-close {
        width: 36px;
        height: 36px;
+       border: none;
+       padding: 0;
        position: absolute;
        top: 0;
        left: 0;
        cursor: pointer;
        text-align: center;
+       background: none;
        color: #666;
 }
 
-#find-posts-close:hover {
+#find-posts-close:hover,
+#find-posts-close:focus {
        color: #00a0d2;
 }
 
+#find-posts-close:focus {
+       outline: none;
+       -webkit-box-shadow:
+               0 0 0 1px #5b9dd9,
+               0 0 2px 1px rgba(30, 140, 190, .8);
+       box-shadow:
+               0 0 0 1px #5b9dd9,
+               0 0 2px 1px rgba(30, 140, 190, .8);
+}
+
 #find-posts-close:before {
        font: normal 20px/36px dashicons;
        vertical-align: top;
@@ -799,7 +813,7 @@ border color while dragging a file over the uploader drop area */
 }
 
 .edit-attachment-frame .attachment-info .filename {
-       font-weight: normal;
+       font-weight: 400;
        color: #666;
 }
 
index 36c906d37263bc820d551635767d917ebdb0704a..8af1af5c3b113761f7fa2f02670106a40a63dd19 100644 (file)
@@ -1 +1 @@
-.imgedit-wait,.ui-find-overlay{opacity:.7;filter:alpha(opacity=70)}.media-item .describe{border-collapse:collapse;width:100%;border-top:1px solid #ddd;clear:both;cursor:default}.media-item.media-blank .describe{border:0}.media-item .describe th{vertical-align:top;text-align:right;padding:5px 10px 10px;width:140px}.media-item .describe .align th{padding-top:0}.media-item .media-item-info tr{background-color:transparent}.media-item .describe td{padding:0 0 8px 8px;vertical-align:top}.media-item thead.media-item-info td{padding:4px 10px 0}.media-item .media-item-info .A1B1{padding:0 10px 0 0}.media-item td.savesend{padding-bottom:15px}.media-item .thumbnail{max-height:128px;max-width:128px}#wpbody-content #async-upload-wrap a{display:none}.media-upload-form{margin-top:20px}.media-upload-form td label{margin-left:6px;margin-right:2px}.media-upload-form .align .field label{display:inline;padding:0 23px 0 0;margin:0 3px 0 1em;font-weight:600}.media-upload-form tr.image-size label{margin:0 5px 0 0;font-weight:600}.media-upload-form th.label label{font-weight:600;margin:.5em;font-size:13px}.media-upload-form th.label label span{padding:0 5px}.media-item .describe input[type=text],.media-item .describe textarea{width:460px}.media-item .describe p.help{margin:0;padding:0 5px 0 0}.describe-toggle-off,.describe-toggle-on,.media-item .edit-attachment{display:block;line-height:36px;float:left;margin-left:10px}.media-item .describe-toggle-off,.media-item.open .describe-toggle-on{display:none}.media-item.open .describe-toggle-off{display:block}.js .html-uploader #plupload-upload-ui,.media-item .startclosed,.media-item .startopen{display:none}.media-upload-form .media-item{min-height:36px;margin-bottom:1px;position:relative;width:100%;background:#fff}.media-upload-form .media-item,.media-upload-form .media-item .error{-webkit-box-shadow:0 1px 0 #ddd;box-shadow:0 1px 0 #ddd}#media-items:empty{border:0}.media-item .filename{line-height:36px;overflow:hidden;margin-right:6px}.media-item .pinkynail{float:right;margin:2px 3px 0 10px;max-width:40px;max-height:32px}.media-item .original{position:relative;height:34px}.media-item .progress{float:left;height:22px;margin:7px 6px;width:200px;line-height:2em;padding:0;overflow:hidden;-webkit-border-radius:22px;border-radius:22px;background:#ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.media-item .bar{z-index:9;width:0;height:100%;margin-top:-22px;-webkit-border-radius:22px;border-radius:22px;background-color:#0073aa;-webkit-box-shadow:inset 0 0 2px rgba(0,0,0,.3);box-shadow:inset 0 0 2px rgba(0,0,0,.3)}.media-item .progress .percent{z-index:10;position:relative;width:200px;padding:0;color:#fff;text-align:center;line-height:22px;font-weight:400;text-shadow:0 1px 2px rgba(0,0,0,.2)}.upload-php .fixed .column-parent{width:15%}.js .html-uploader #html-upload-ui{display:block}.media-upload-form .media-item .error,.media-upload-form .media-item.error{width:auto;margin:0 0 1px}.media-upload-form .media-item .error{padding:10px 14px 10px 0}.media-item .error-div a.dismiss{display:block;float:left;margin:0 15px 0 10px}.find-box{background-color:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);width:600px;overflow:hidden;margin-right:-300px;position:fixed;top:30px;bottom:30px;right:50%;z-index:100105}.find-box-head{background:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 16px 0 36px;position:absolute;top:0;right:0;left:0}.find-box-inside{overflow:auto;padding:16px;background-color:#fff;position:absolute;top:37px;bottom:45px;overflow-y:scroll;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.find-box-search{padding-bottom:16px}.find-box-search .spinner{float:none;right:105px;position:absolute}#find-posts-response,.find-box-search{position:relative}#find-posts-input,#find-posts-search{float:right}#find-posts-input{width:140px;height:28px;margin:0 0 0 4px}.widefat .found-radio{padding-left:0;width:16px}#find-posts-close{width:36px;height:36px;position:absolute;top:0;left:0;cursor:pointer;text-align:center;color:#666}#find-posts-close:hover{color:#00a0d2}#find-posts-close:before{font:400 20px/36px dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f158"}.find-box-buttons{padding:8px 16px;background:#fcfcfc;border-top:1px solid #ddd;position:absolute;bottom:0;right:0;left:0}@media screen and (max-width:782px){.find-box-inside{bottom:57px}}@media screen and (max-width:660px){.find-box{top:0;bottom:0;right:0;left:0;margin:0;width:100%}}.ui-find-overlay{position:fixed;top:0;right:0;left:0;bottom:0;background:#000;z-index:100100}ul#dismissed-updates{display:none}form.upgrade{margin-top:8px}form.upgrade .hint{font-style:italic;font-size:85%;margin:-.5em 0 2em}#poststuff .inside .the-tagcloud{margin:5px 0 10px;padding:8px;border:1px solid #ddd;line-height:1.8em;word-spacing:3px}.drag-drop #drag-drop-area{border:4px dashed #b4b9be;height:200px}.drag-drop .drag-drop-inside{margin:70px auto 0;width:250px}.drag-drop-inside p{color:#a0a5aa;font-size:14px;margin:5px 0;display:none}.drag-drop .drag-drop-inside p{text-align:center}.drag-drop-inside p.drag-drop-info{font-size:20px}.drag-drop .drag-drop-inside p,.drag-drop-inside p.drag-drop-buttons{display:block}.media-frame.mode-grid .media-frame-menu,.media-frame.mode-grid .media-frame-router,.media-frame.mode-grid .media-frame-title,.upload-php .mode-grid .hide-sidebar .media-sidebar{display:none}.drag-drop.drag-over #drag-drop-area{border-color:#83b4d8}#plupload-upload-ui{position:relative}.media-frame.mode-grid,.media-frame.mode-grid .attachments-browser .attachments,.media-frame.mode-grid .media-frame-content,.media-frame.mode-grid .uploader-inline-content{position:static}.media-frame.mode-grid .media-frame-content{background-color:transparent;border:none}.upload-php .mode-grid .media-sidebar{position:relative;width:auto;margin-bottom:16px;padding:0 16px;border-right:4px solid #dd3d36;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);background-color:#fff}.upload-php .mode-grid .media-sidebar .media-uploader-status{border-bottom:none;padding-bottom:0;max-width:100%}.upload-php .mode-grid .media-sidebar .upload-error{margin:12px 0;padding:4px 0 0;border:none;-webkit-box-shadow:none;box-shadow:none;background:0 0}.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors{top:-10px;left:-14px;padding:10px}.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:before{content:"\f153";display:block;font:400 16px/1 dashicons;color:#b4b9be}.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:focus:before,.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:hover:before{color:#c00}.upload-php .mode-grid .media-sidebar .media-uploader-status.errors h2,.upload-php .mode-grid .media-sidebar .media-uploader-status.errors h3{display:none}.media-frame.mode-grid .uploader-inline{position:relative;top:auto;left:auto;right:auto;bottom:auto;padding-top:0;margin-top:0;border:4px dashed #b4b9be}.media-frame.mode-select .attachments-browser.fixed .attachments{position:relative;top:94px;padding-bottom:94px}.media-frame.mode-grid .attachment.details:focus,.media-frame.mode-grid .attachment:focus,.media-frame.mode-grid .selected.attachment:focus{-webkit-box-shadow:inset 0 0 2px 3px #f1f1f1,inset 0 0 0 7px #5b9dd9;box-shadow:inset 0 0 2px 3px #f1f1f1,inset 0 0 0 7px #5b9dd9;outline:0}.media-frame.mode-grid .selected.attachment{-webkit-box-shadow:inset 0 0 0 5px #f1f1f1,inset 0 0 0 7px #ccc;box-shadow:inset 0 0 0 5px #f1f1f1,inset 0 0 0 7px #ccc}.media-frame.mode-grid .attachment.details{-webkit-box-shadow:inset 0 0 0 3px #f1f1f1,inset 0 0 0 7px #1e8cbe;box-shadow:inset 0 0 0 3px #f1f1f1,inset 0 0 0 7px #1e8cbe}.media-frame.mode-grid.mode-select .attachment .thumbnail{opacity:.65}.media-frame.mode-select .attachment.selected .thumbnail{opacity:1}.media-frame.mode-grid .media-toolbar{margin-bottom:15px;height:auto}.media-frame.mode-grid .media-toolbar select{margin:0 0 0 10px;font-size:14px}.media-frame.mode-grid.mode-edit .media-toolbar-secondary>.select-mode-toggle-button{margin:0 0 0 8px;vertical-align:middle}.media-frame.mode-grid .attachments-browser .bulk-select{display:inline-block;margin:0 0 0 10px}.media-frame.mode-grid .search{margin-top:0}.media-frame.mode-grid .spinner{margin-top:16px}.attachments-browser .media-toolbar-secondary>.media-button{margin-left:10px}.media-frame.mode-select .attachments-browser.fixed .media-toolbar{position:fixed;top:32px;right:auto;left:20px;margin-top:0}.media-frame.mode-grid .attachments-browser{padding:0}.media-frame.mode-grid .attachments-browser .attachments{padding:2px}.media-frame.mode-grid .attachments-browser .no-media{color:#666;font-size:18px;font-style:normal;margin:0;padding:100px 0 0;text-align:center}.edit-attachment-frame{display:block;height:100%;width:100%}.edit-attachment-frame .edit-media-header{overflow:hidden}.upload-php .media-modal-close .media-modal-icon:before{content:"\f335";font-size:22px}.edit-attachment-frame .edit-media-header .left,.edit-attachment-frame .edit-media-header .right,.upload-php .media-modal-close{cursor:pointer;color:#72777c;background-color:transparent;height:50px;width:50px;padding:0;position:absolute;text-align:center;border:0;border-right:1px solid #ddd;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.upload-php .media-modal-close{top:0;left:0}.edit-attachment-frame .edit-media-header .left{left:102px}.edit-attachment-frame .edit-media-header .right{left:51px}.edit-attachment-frame .media-frame-title{right:0;left:150px}.edit-attachment-frame .edit-media-header .left:before,.edit-attachment-frame .edit-media-header .right:before{font:400 20px/50px dashicons!important;display:inline;font-weight:300}.edit-attachment-frame .edit-media-header .left:focus,.edit-attachment-frame .edit-media-header .left:hover,.edit-attachment-frame .edit-media-header .right:focus,.edit-attachment-frame .edit-media-header .right:hover,.upload-php .media-modal-close:focus,.upload-php .media-modal-close:hover{background:#ddd;border-color:#ccc;color:#000;outline:0;-webkit-box-shadow:none;box-shadow:none}.upload-php .media-modal-close:focus .media-modal-icon:before,.upload-php .media-modal-close:hover .media-modal-icon:before{color:#000}.edit-attachment-frame .edit-media-header .left:before,.rtl .edit-attachment-frame .edit-media-header .right:before{content:"\f345"}.edit-attachment-frame .edit-media-header .right:before,.rtl .edit-attachment-frame .edit-media-header .left:before{content:"\f341"}.edit-attachment-frame .edit-media-header .left.disabled,.edit-attachment-frame .edit-media-header .left.disabled:hover,.edit-attachment-frame .edit-media-header .right.disabled,.edit-attachment-frame .edit-media-header .right.disabled:hover{color:#ccc;background:inherit;cursor:default;pointer-events:none}.edit-attachment-frame .media-frame-content,.edit-attachment-frame .media-frame-router{right:0}.edit-attachment-frame .media-frame-content{border-bottom:none;bottom:0;top:50px}.edit-attachment-frame .attachment-details{position:absolute;overflow:auto;top:0;bottom:0;left:0;right:0;-webkit-box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1);box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1)}.edit-attachment-frame .attachment-media-view{float:right;width:65%;height:100%}.edit-attachment-frame .attachment-media-view .thumbnail{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:16px;height:100%}.edit-attachment-frame .attachment-media-view .details-image{display:block;margin-bottom:16px;max-width:100%;max-height:90%;max-height:-webkit-calc(100% - 42px);max-height:calc(100% - 42px)}.edit-attachment-frame .wp-media-wrapper{margin-bottom:12px}.edit-attachment-frame input,.edit-attachment-frame textarea{padding:6px 8px;line-height:16px}.edit-attachment-frame .attachment-info{overflow:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:0;padding:12px 16px 0;width:35%;height:100%;-webkit-box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1);box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1);border-bottom:0;border-right:1px solid #ddd;background:#f3f3f3}.edit-attachment-frame .attachment-info .details,.edit-attachment-frame .attachment-info .settings{position:relative;overflow:hidden;float:none;margin-bottom:15px;padding-bottom:15px;border-bottom:1px solid #ddd}.edit-attachment-frame .attachment-info .filename{font-weight:400;color:#666}.edit-attachment-frame .attachment-info .thumbnail{margin-bottom:12px}.attachment-info .actions{margin-bottom:16px}.attachment-info .actions a{display:inline;text-decoration:none}.wp_attachment_details label[for=content]{font-size:13px;line-height:1.5;margin:1em 0}.wp_attachment_details #attachment_caption{height:4em}.describe .image-editor{vertical-align:top}.imgedit-wrap{position:relative;padding-top:10px}.imgedit-settings fieldset,.imgedit-settings p{margin:8px 0}.imgedit-settings legend{margin-bottom:5px}.describe .imgedit-wrap .imgedit-settings{padding:0 5px}.wp_attachment_holder div.updated{margin-top:0}.wp_attachment_holder .imgedit-wrap>div{height:auto}.wp_attachment_holder .imgedit-wrap .imgedit-panel-content{padding:3px 0 0 16px;float:right}.wp_attachment_holder .imgedit-wrap .imgedit-settings{float:left;width:250px}.imgedit-settings input{margin-top:0;vertical-align:middle}.imgedit-wait{position:absolute;top:0;bottom:0;width:100%;background:#fff;display:none}.imgedit-wait:before{content:"";display:block;width:20px;height:20px;position:absolute;right:50%;top:50%;margin:-10px -10px 0 0;background:url(../images/spinner.gif) center no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;-webkit-transform:translateZ(0);transform:translateZ(0)}.no-float{float:none}.A1B1 .button,.A1B1 .spinner,.wp_attachment_image .button,.wp_attachment_image .spinner{float:right}.imgedit-settings .disabled,.media-disabled{color:#a0a5aa}.A1B1{overflow:hidden}.no-js .wp_attachment_image .button{display:none}.imgedit-menu{min-width:300px;margin:0 0 12px}.imgedit-menu .note-no-rotate{clear:both;margin:0;padding:1em 0 0}.image-editor .imgedit-menu .button{float:right;width:32px;height:32px;margin:0 0 0 8px;padding:0;background:#f1f1f1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:16px;color:#72777c}.imgedit-menu .button:before{font:400 20px/1 dashicons;speak:none;vertical-align:middle}.imgedit-menu .button.disabled{border-color:#ccc;background-color:#ddd;color:#72777c;filter:alpha(opacity=50);opacity:.5;cursor:default}.imgedit-crop:before{content:"\f165"}.imgedit-rleft:before{content:"\f166"}.imgedit-rright:before{content:"\f167"}.imgedit-flipv:before{content:"\f168"}.imgedit-fliph:before{content:"\f169"}.imgedit-undo:before{content:"\f171"}.imgedit-redo:before{content:"\f172"}.imgedit-crop-wrap{position:relative}.imgedit-crop{margin:0 0 0 8px}.imgedit-rleft{margin:0 3px}.imgedit-rright{margin:0 3px 0 8px}.imgedit-flipv{margin:0 3px}.imgedit-fliph{margin:0 3px 0 8px}.imgedit-undo{margin:0 3px}.imgedit-redo{margin:0 3px 0 8px}.imgedit-thumbnail-preview{margin:10px 0 0 8px}.imgedit-thumbnail-preview-caption{display:block}#poststuff .imgedit-group-top h2,#poststuff .imgedit-group-top h3{display:inline-block;margin:0;padding:0;font-size:14px;line-height:1.4}.imgedit-group-top h2 a,.imgedit-group-top h3 a{text-decoration:none}.imgedit-applyto .imgedit-label{display:block;padding:.5em 0 0}.imgedit-help{display:none;font-style:italic}.image-editor .imgedit-settings .imgedit-help-toggle,.image-editor .imgedit-settings .imgedit-help-toggle:active,.image-editor .imgedit-settings .imgedit-help-toggle:hover{border:1px solid transparent;margin:-1px -1px 0 0;padding:0;background:0 0;color:#0074a2;font-size:20px;line-height:1;cursor:pointer;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-box-shadow:none;box-shadow:none}.image-editor .imgedit-settings .imgedit-help-toggle:focus{color:#0074a2;border-color:#5b9dd9;outline:0;-webkit-box-shadow:0 0 3px rgba(0,115,170,.8);box-shadow:0 0 3px rgba(0,115,170,.8)}.form-table td.imgedit-response{padding:0}.imgedit-submit{margin:8px 0 0}.imgedit-submit-btn{margin-right:20px}.imgedit-wrap .nowrap{white-space:nowrap;font-size:12px;line-height:inherit}span.imgedit-scale-warn{color:red;font-size:20px;font-style:normal;visibility:hidden;vertical-align:middle}.imgedit-save-target{margin:8px 0}.imgedit-group{margin-bottom:8px;padding:10px}.imgedit-settings .imgedit-crop-ratio input[type=text],.imgedit-settings .imgedit-crop-sel input[type=text],.imgedit-settings .imgedit-scale input[type=text]{width:50px;font-size:14px;padding:3px 5px}.imgedit-separator{display:inline-block;width:7px;text-align:center;vertical-align:middle;font-size:13px;color:#444}.imgedit-settings .imgedit-scale .button{margin-bottom:0}audio,video{display:inline-block;max-width:100%}.mejs-container{width:100%;max-width:100%}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.imgedit-wait:before{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){.wp_attachment_details label[for=content]{font-size:14px;line-height:1.5em}.media-upload-form .media-item .error,.media-upload-form .media-item.error{font-size:13px;line-height:1.5}.media-upload-form .media-item.error{padding:1px 10px}.media-upload-form .media-item .error{padding:10px 12px 10px 0}.imgedit-settings .imgedit-crop-ratio input[type=text],.imgedit-settings .imgedit-crop-sel input[type=text],.imgedit-settings .imgedit-scale input[type=text]{width:60px;font-size:16px;padding:6px 10px}.imgedit-applyto .imgedit-label{vertical-align:middle}}@media only screen and (max-width:1120px){#wp-media-grid .wp-filter .attachment-filters{max-width:100%}}@media only screen and (max-width:782px){.media-frame.mode-select .attachments-browser.fixed .media-toolbar{top:46px;left:10px}}@media only screen and (max-width:600px){.media-frame.mode-select .attachments-browser.fixed .media-toolbar{top:0}}@media only screen and (max-width:480px){.edit-attachment-frame .media-frame-title{left:110px}.edit-attachment-frame .edit-media-header .left,.edit-attachment-frame .edit-media-header .right,.upload-php .media-modal-close{width:40px;height:40px}.upload-php .media-modal-close .media-modal-icon{margin:9px 10px}.edit-attachment-frame .edit-media-header .left:before,.edit-attachment-frame .edit-media-header .right:before{line-height:40px!important}.edit-attachment-frame .edit-media-header .left{left:82px}.edit-attachment-frame .edit-media-header .right{left:41px}.edit-attachment-frame .media-frame-content{top:40px}.edit-attachment-frame .attachment-media-view{float:none;height:auto;width:100%}.edit-attachment-frame .attachment-info{height:auto;width:100%}}@media only screen and (max-width:640px),screen and (max-height:400px){.upload-php .mode-grid .media-sidebar{max-width:100%}}
\ No newline at end of file
+.imgedit-wait,.ui-find-overlay{opacity:.7;filter:alpha(opacity=70)}.media-item .describe{border-collapse:collapse;width:100%;border-top:1px solid #ddd;clear:both;cursor:default}.media-item.media-blank .describe{border:0}.media-item .describe th{vertical-align:top;text-align:right;padding:5px 10px 10px;width:140px}.media-item .describe .align th{padding-top:0}.media-item .media-item-info tr{background-color:transparent}.media-item .describe td{padding:0 0 8px 8px;vertical-align:top}.media-item thead.media-item-info td{padding:4px 10px 0}.media-item .media-item-info .A1B1{padding:0 10px 0 0}.media-item td.savesend{padding-bottom:15px}.media-item .thumbnail{max-height:128px;max-width:128px}#wpbody-content #async-upload-wrap a{display:none}.media-upload-form{margin-top:20px}.media-upload-form td label{margin-left:6px;margin-right:2px}.media-upload-form .align .field label{display:inline;padding:0 23px 0 0;margin:0 3px 0 1em;font-weight:600}.media-upload-form tr.image-size label{margin:0 5px 0 0;font-weight:600}.media-upload-form th.label label{font-weight:600;margin:.5em;font-size:13px}.media-upload-form th.label label span{padding:0 5px}.media-item .describe input[type=text],.media-item .describe textarea{width:460px}.media-item .describe p.help{margin:0;padding:0 5px 0 0}.describe-toggle-off,.describe-toggle-on,.media-item .edit-attachment{display:block;line-height:36px;float:left;margin-left:10px}.media-item .describe-toggle-off,.media-item.open .describe-toggle-on{display:none}.media-item.open .describe-toggle-off{display:block}.js .html-uploader #plupload-upload-ui,.media-item .startclosed,.media-item .startopen{display:none}.media-upload-form .media-item{min-height:36px;margin-bottom:1px;position:relative;width:100%;background:#fff}.media-upload-form .media-item,.media-upload-form .media-item .error{-webkit-box-shadow:0 1px 0 #ddd;box-shadow:0 1px 0 #ddd}#media-items:empty{border:0}.media-item .filename{line-height:36px;overflow:hidden;margin-right:6px}.media-item .pinkynail{float:right;margin:2px 3px 0 10px;max-width:40px;max-height:32px}.media-item .original{position:relative;height:34px}.media-item .progress{float:left;height:22px;margin:7px 6px;width:200px;line-height:2em;padding:0;overflow:hidden;-webkit-border-radius:22px;border-radius:22px;background:#ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.media-item .bar{z-index:9;width:0;height:100%;margin-top:-22px;-webkit-border-radius:22px;border-radius:22px;background-color:#0073aa;-webkit-box-shadow:inset 0 0 2px rgba(0,0,0,.3);box-shadow:inset 0 0 2px rgba(0,0,0,.3)}.media-item .progress .percent{z-index:10;position:relative;width:200px;padding:0;color:#fff;text-align:center;line-height:22px;font-weight:400;text-shadow:0 1px 2px rgba(0,0,0,.2)}.upload-php .fixed .column-parent{width:15%}.js .html-uploader #html-upload-ui{display:block}.media-upload-form .media-item .error,.media-upload-form .media-item.error{width:auto;margin:0 0 1px}.media-upload-form .media-item .error{padding:10px 14px 10px 0}.media-item .error-div a.dismiss{display:block;float:left;margin:0 15px 0 10px}.find-box{background-color:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);width:600px;overflow:hidden;margin-right:-300px;position:fixed;top:30px;bottom:30px;right:50%;z-index:100105}.find-box-head{background:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 16px 0 36px;position:absolute;top:0;right:0;left:0}.find-box-inside{overflow:auto;padding:16px;background-color:#fff;position:absolute;top:37px;bottom:45px;overflow-y:scroll;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.find-box-search{padding-bottom:16px}.find-box-search .spinner{float:none;right:105px;position:absolute}#find-posts-response,.find-box-search{position:relative}#find-posts-input,#find-posts-search{float:right}#find-posts-input{width:140px;height:28px;margin:0 0 0 4px}.widefat .found-radio{padding-left:0;width:16px}#find-posts-close{width:36px;height:36px;border:none;padding:0;position:absolute;top:0;left:0;cursor:pointer;text-align:center;background:0 0;color:#666}#find-posts-close:focus,#find-posts-close:hover{color:#00a0d2}#find-posts-close:focus{outline:0;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#find-posts-close:before{font:400 20px/36px dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f158"}.find-box-buttons{padding:8px 16px;background:#fcfcfc;border-top:1px solid #ddd;position:absolute;bottom:0;right:0;left:0}@media screen and (max-width:782px){.find-box-inside{bottom:57px}}@media screen and (max-width:660px){.find-box{top:0;bottom:0;right:0;left:0;margin:0;width:100%}}.ui-find-overlay{position:fixed;top:0;right:0;left:0;bottom:0;background:#000;z-index:100100}ul#dismissed-updates{display:none}form.upgrade{margin-top:8px}form.upgrade .hint{font-style:italic;font-size:85%;margin:-.5em 0 2em}#poststuff .inside .the-tagcloud{margin:5px 0 10px;padding:8px;border:1px solid #ddd;line-height:1.8em;word-spacing:3px}.drag-drop #drag-drop-area{border:4px dashed #b4b9be;height:200px}.drag-drop .drag-drop-inside{margin:70px auto 0;width:250px}.drag-drop-inside p{color:#a0a5aa;font-size:14px;margin:5px 0;display:none}.drag-drop .drag-drop-inside p{text-align:center}.drag-drop-inside p.drag-drop-info{font-size:20px}.drag-drop .drag-drop-inside p,.drag-drop-inside p.drag-drop-buttons{display:block}.media-frame.mode-grid .media-frame-menu,.media-frame.mode-grid .media-frame-router,.media-frame.mode-grid .media-frame-title,.upload-php .mode-grid .hide-sidebar .media-sidebar{display:none}.drag-drop.drag-over #drag-drop-area{border-color:#83b4d8}#plupload-upload-ui{position:relative}.media-frame.mode-grid,.media-frame.mode-grid .attachments-browser .attachments,.media-frame.mode-grid .media-frame-content,.media-frame.mode-grid .uploader-inline-content{position:static}.media-frame.mode-grid .media-frame-content{background-color:transparent;border:none}.upload-php .mode-grid .media-sidebar{position:relative;width:auto;margin-bottom:16px;padding:0 16px;border-right:4px solid #dd3d36;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);background-color:#fff}.upload-php .mode-grid .media-sidebar .media-uploader-status{border-bottom:none;padding-bottom:0;max-width:100%}.upload-php .mode-grid .media-sidebar .upload-error{margin:12px 0;padding:4px 0 0;border:none;-webkit-box-shadow:none;box-shadow:none;background:0 0}.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors{top:-10px;left:-14px;padding:10px}.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:before{content:"\f153";display:block;font:400 16px/1 dashicons;color:#b4b9be}.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:focus:before,.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:hover:before{color:#c00}.upload-php .mode-grid .media-sidebar .media-uploader-status.errors h2,.upload-php .mode-grid .media-sidebar .media-uploader-status.errors h3{display:none}.media-frame.mode-grid .uploader-inline{position:relative;top:auto;left:auto;right:auto;bottom:auto;padding-top:0;margin-top:0;border:4px dashed #b4b9be}.media-frame.mode-select .attachments-browser.fixed .attachments{position:relative;top:94px;padding-bottom:94px}.media-frame.mode-grid .attachment.details:focus,.media-frame.mode-grid .attachment:focus,.media-frame.mode-grid .selected.attachment:focus{-webkit-box-shadow:inset 0 0 2px 3px #f1f1f1,inset 0 0 0 7px #5b9dd9;box-shadow:inset 0 0 2px 3px #f1f1f1,inset 0 0 0 7px #5b9dd9;outline:0}.media-frame.mode-grid .selected.attachment{-webkit-box-shadow:inset 0 0 0 5px #f1f1f1,inset 0 0 0 7px #ccc;box-shadow:inset 0 0 0 5px #f1f1f1,inset 0 0 0 7px #ccc}.media-frame.mode-grid .attachment.details{-webkit-box-shadow:inset 0 0 0 3px #f1f1f1,inset 0 0 0 7px #1e8cbe;box-shadow:inset 0 0 0 3px #f1f1f1,inset 0 0 0 7px #1e8cbe}.media-frame.mode-grid.mode-select .attachment .thumbnail{opacity:.65}.media-frame.mode-select .attachment.selected .thumbnail{opacity:1}.media-frame.mode-grid .media-toolbar{margin-bottom:15px;height:auto}.media-frame.mode-grid .media-toolbar select{margin:0 0 0 10px;font-size:14px}.media-frame.mode-grid.mode-edit .media-toolbar-secondary>.select-mode-toggle-button{margin:0 0 0 8px;vertical-align:middle}.media-frame.mode-grid .attachments-browser .bulk-select{display:inline-block;margin:0 0 0 10px}.media-frame.mode-grid .search{margin-top:0}.media-frame.mode-grid .spinner{margin-top:16px}.attachments-browser .media-toolbar-secondary>.media-button{margin-left:10px}.media-frame.mode-select .attachments-browser.fixed .media-toolbar{position:fixed;top:32px;right:auto;left:20px;margin-top:0}.media-frame.mode-grid .attachments-browser{padding:0}.media-frame.mode-grid .attachments-browser .attachments{padding:2px}.media-frame.mode-grid .attachments-browser .no-media{color:#666;font-size:18px;font-style:normal;margin:0;padding:100px 0 0;text-align:center}.edit-attachment-frame{display:block;height:100%;width:100%}.edit-attachment-frame .edit-media-header{overflow:hidden}.upload-php .media-modal-close .media-modal-icon:before{content:"\f335";font-size:22px}.edit-attachment-frame .edit-media-header .left,.edit-attachment-frame .edit-media-header .right,.upload-php .media-modal-close{cursor:pointer;color:#72777c;background-color:transparent;height:50px;width:50px;padding:0;position:absolute;text-align:center;border:0;border-right:1px solid #ddd;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.upload-php .media-modal-close{top:0;left:0}.edit-attachment-frame .edit-media-header .left{left:102px}.edit-attachment-frame .edit-media-header .right{left:51px}.edit-attachment-frame .media-frame-title{right:0;left:150px}.edit-attachment-frame .edit-media-header .left:before,.edit-attachment-frame .edit-media-header .right:before{font:400 20px/50px dashicons!important;display:inline;font-weight:300}.edit-attachment-frame .edit-media-header .left:focus,.edit-attachment-frame .edit-media-header .left:hover,.edit-attachment-frame .edit-media-header .right:focus,.edit-attachment-frame .edit-media-header .right:hover,.upload-php .media-modal-close:focus,.upload-php .media-modal-close:hover{background:#ddd;border-color:#ccc;color:#000;outline:0;-webkit-box-shadow:none;box-shadow:none}.upload-php .media-modal-close:focus .media-modal-icon:before,.upload-php .media-modal-close:hover .media-modal-icon:before{color:#000}.edit-attachment-frame .edit-media-header .left:before,.rtl .edit-attachment-frame .edit-media-header .right:before{content:"\f345"}.edit-attachment-frame .edit-media-header .right:before,.rtl .edit-attachment-frame .edit-media-header .left:before{content:"\f341"}.edit-attachment-frame .edit-media-header .left.disabled,.edit-attachment-frame .edit-media-header .left.disabled:hover,.edit-attachment-frame .edit-media-header .right.disabled,.edit-attachment-frame .edit-media-header .right.disabled:hover{color:#ccc;background:inherit;cursor:default;pointer-events:none}.edit-attachment-frame .media-frame-content,.edit-attachment-frame .media-frame-router{right:0}.edit-attachment-frame .media-frame-content{border-bottom:none;bottom:0;top:50px}.edit-attachment-frame .attachment-details{position:absolute;overflow:auto;top:0;bottom:0;left:0;right:0;-webkit-box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1);box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1)}.edit-attachment-frame .attachment-media-view{float:right;width:65%;height:100%}.edit-attachment-frame .attachment-media-view .thumbnail{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:16px;height:100%}.edit-attachment-frame .attachment-media-view .details-image{display:block;margin-bottom:16px;max-width:100%;max-height:90%;max-height:-webkit-calc(100% - 42px);max-height:calc(100% - 42px)}.edit-attachment-frame .wp-media-wrapper{margin-bottom:12px}.edit-attachment-frame input,.edit-attachment-frame textarea{padding:6px 8px;line-height:16px}.edit-attachment-frame .attachment-info{overflow:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:0;padding:12px 16px 0;width:35%;height:100%;-webkit-box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1);box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1);border-bottom:0;border-right:1px solid #ddd;background:#f3f3f3}.edit-attachment-frame .attachment-info .details,.edit-attachment-frame .attachment-info .settings{position:relative;overflow:hidden;float:none;margin-bottom:15px;padding-bottom:15px;border-bottom:1px solid #ddd}.edit-attachment-frame .attachment-info .filename{font-weight:400;color:#666}.edit-attachment-frame .attachment-info .thumbnail{margin-bottom:12px}.attachment-info .actions{margin-bottom:16px}.attachment-info .actions a{display:inline;text-decoration:none}.wp_attachment_details label[for=content]{font-size:13px;line-height:1.5;margin:1em 0}.wp_attachment_details #attachment_caption{height:4em}.describe .image-editor{vertical-align:top}.imgedit-wrap{position:relative;padding-top:10px}.imgedit-settings fieldset,.imgedit-settings p{margin:8px 0}.imgedit-settings legend{margin-bottom:5px}.describe .imgedit-wrap .imgedit-settings{padding:0 5px}.wp_attachment_holder div.updated{margin-top:0}.wp_attachment_holder .imgedit-wrap>div{height:auto}.wp_attachment_holder .imgedit-wrap .imgedit-panel-content{padding:3px 0 0 16px;float:right}.wp_attachment_holder .imgedit-wrap .imgedit-settings{float:left;width:250px}.imgedit-settings input{margin-top:0;vertical-align:middle}.imgedit-wait{position:absolute;top:0;bottom:0;width:100%;background:#fff;display:none}.imgedit-wait:before{content:"";display:block;width:20px;height:20px;position:absolute;right:50%;top:50%;margin:-10px -10px 0 0;background:url(../images/spinner.gif) center no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;-webkit-transform:translateZ(0);transform:translateZ(0)}.no-float{float:none}.A1B1 .button,.A1B1 .spinner,.wp_attachment_image .button,.wp_attachment_image .spinner{float:right}.imgedit-settings .disabled,.media-disabled{color:#a0a5aa}.A1B1{overflow:hidden}.no-js .wp_attachment_image .button{display:none}.imgedit-menu{min-width:300px;margin:0 0 12px}.imgedit-menu .note-no-rotate{clear:both;margin:0;padding:1em 0 0}.image-editor .imgedit-menu .button{float:right;width:32px;height:32px;margin:0 0 0 8px;padding:0;background:#f1f1f1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:16px;color:#72777c}.imgedit-menu .button:before{font:400 20px/1 dashicons;speak:none;vertical-align:middle}.imgedit-menu .button.disabled{border-color:#ccc;background-color:#ddd;color:#72777c;filter:alpha(opacity=50);opacity:.5;cursor:default}.imgedit-crop:before{content:"\f165"}.imgedit-rleft:before{content:"\f166"}.imgedit-rright:before{content:"\f167"}.imgedit-flipv:before{content:"\f168"}.imgedit-fliph:before{content:"\f169"}.imgedit-undo:before{content:"\f171"}.imgedit-redo:before{content:"\f172"}.imgedit-crop-wrap{position:relative}.imgedit-crop{margin:0 0 0 8px}.imgedit-rleft{margin:0 3px}.imgedit-rright{margin:0 3px 0 8px}.imgedit-flipv{margin:0 3px}.imgedit-fliph{margin:0 3px 0 8px}.imgedit-undo{margin:0 3px}.imgedit-redo{margin:0 3px 0 8px}.imgedit-thumbnail-preview{margin:10px 0 0 8px}.imgedit-thumbnail-preview-caption{display:block}#poststuff .imgedit-group-top h2,#poststuff .imgedit-group-top h3{display:inline-block;margin:0;padding:0;font-size:14px;line-height:1.4}.imgedit-group-top h2 a,.imgedit-group-top h3 a{text-decoration:none}.imgedit-applyto .imgedit-label{display:block;padding:.5em 0 0}.imgedit-help{display:none;font-style:italic}.image-editor .imgedit-settings .imgedit-help-toggle,.image-editor .imgedit-settings .imgedit-help-toggle:active,.image-editor .imgedit-settings .imgedit-help-toggle:hover{border:1px solid transparent;margin:-1px -1px 0 0;padding:0;background:0 0;color:#0074a2;font-size:20px;line-height:1;cursor:pointer;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-box-shadow:none;box-shadow:none}.image-editor .imgedit-settings .imgedit-help-toggle:focus{color:#0074a2;border-color:#5b9dd9;outline:0;-webkit-box-shadow:0 0 3px rgba(0,115,170,.8);box-shadow:0 0 3px rgba(0,115,170,.8)}.form-table td.imgedit-response{padding:0}.imgedit-submit{margin:8px 0 0}.imgedit-submit-btn{margin-right:20px}.imgedit-wrap .nowrap{white-space:nowrap;font-size:12px;line-height:inherit}span.imgedit-scale-warn{color:red;font-size:20px;font-style:normal;visibility:hidden;vertical-align:middle}.imgedit-save-target{margin:8px 0}.imgedit-group{margin-bottom:8px;padding:10px}.imgedit-settings .imgedit-crop-ratio input[type=text],.imgedit-settings .imgedit-crop-sel input[type=text],.imgedit-settings .imgedit-scale input[type=text]{width:50px;font-size:14px;padding:3px 5px}.imgedit-separator{display:inline-block;width:7px;text-align:center;vertical-align:middle;font-size:13px;color:#444}.imgedit-settings .imgedit-scale .button{margin-bottom:0}audio,video{display:inline-block;max-width:100%}.mejs-container{width:100%;max-width:100%}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.imgedit-wait:before{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){.wp_attachment_details label[for=content]{font-size:14px;line-height:1.5em}.media-upload-form .media-item .error,.media-upload-form .media-item.error{font-size:13px;line-height:1.5}.media-upload-form .media-item.error{padding:1px 10px}.media-upload-form .media-item .error{padding:10px 12px 10px 0}.imgedit-settings .imgedit-crop-ratio input[type=text],.imgedit-settings .imgedit-crop-sel input[type=text],.imgedit-settings .imgedit-scale input[type=text]{width:60px;font-size:16px;padding:6px 10px}.imgedit-applyto .imgedit-label{vertical-align:middle}}@media only screen and (max-width:1120px){#wp-media-grid .wp-filter .attachment-filters{max-width:100%}}@media only screen and (max-width:782px){.media-frame.mode-select .attachments-browser.fixed .media-toolbar{top:46px;left:10px}}@media only screen and (max-width:600px){.media-frame.mode-select .attachments-browser.fixed .media-toolbar{top:0}}@media only screen and (max-width:480px){.edit-attachment-frame .media-frame-title{left:110px}.edit-attachment-frame .edit-media-header .left,.edit-attachment-frame .edit-media-header .right,.upload-php .media-modal-close{width:40px;height:40px}.upload-php .media-modal-close .media-modal-icon{margin:9px 10px}.edit-attachment-frame .edit-media-header .left:before,.edit-attachment-frame .edit-media-header .right:before{line-height:40px!important}.edit-attachment-frame .edit-media-header .left{left:82px}.edit-attachment-frame .edit-media-header .right{left:41px}.edit-attachment-frame .media-frame-content{top:40px}.edit-attachment-frame .attachment-media-view{float:none;height:auto;width:100%}.edit-attachment-frame .attachment-info{height:auto;width:100%}}@media only screen and (max-width:640px),screen and (max-height:400px){.upload-php .mode-grid .media-sidebar{max-width:100%}}
\ No newline at end of file
index 71424c914c2dd4dc7ce24b442d2a89d669830d1d..22cc406f23c787b82bcee2a2ec2e06b955bfd0e0 100644 (file)
 #find-posts-close {
        width: 36px;
        height: 36px;
+       border: none;
+       padding: 0;
        position: absolute;
        top: 0;
        right: 0;
        cursor: pointer;
        text-align: center;
+       background: none;
        color: #666;
 }
 
-#find-posts-close:hover {
+#find-posts-close:hover,
+#find-posts-close:focus {
        color: #00a0d2;
 }
 
+#find-posts-close:focus {
+       outline: none;
+       -webkit-box-shadow:
+               0 0 0 1px #5b9dd9,
+               0 0 2px 1px rgba(30, 140, 190, .8);
+       box-shadow:
+               0 0 0 1px #5b9dd9,
+               0 0 2px 1px rgba(30, 140, 190, .8);
+}
+
 #find-posts-close:before {
        font: normal 20px/36px dashicons;
        vertical-align: top;
@@ -799,7 +813,7 @@ border color while dragging a file over the uploader drop area */
 }
 
 .edit-attachment-frame .attachment-info .filename {
-       font-weight: normal;
+       font-weight: 400;
        color: #666;
 }
 
index fe21fe8a34efe485f407dd374e17cba5a666c518..47395ef646ab13b325e75b9bfcd3ec4c6cb3d280 100644 (file)
@@ -1 +1 @@
-.imgedit-wait,.ui-find-overlay{opacity:.7;filter:alpha(opacity=70)}.media-item .describe{border-collapse:collapse;width:100%;border-top:1px solid #ddd;clear:both;cursor:default}.media-item.media-blank .describe{border:0}.media-item .describe th{vertical-align:top;text-align:left;padding:5px 10px 10px;width:140px}.media-item .describe .align th{padding-top:0}.media-item .media-item-info tr{background-color:transparent}.media-item .describe td{padding:0 8px 8px 0;vertical-align:top}.media-item thead.media-item-info td{padding:4px 10px 0}.media-item .media-item-info .A1B1{padding:0 0 0 10px}.media-item td.savesend{padding-bottom:15px}.media-item .thumbnail{max-height:128px;max-width:128px}#wpbody-content #async-upload-wrap a{display:none}.media-upload-form{margin-top:20px}.media-upload-form td label{margin-right:6px;margin-left:2px}.media-upload-form .align .field label{display:inline;padding:0 0 0 23px;margin:0 1em 0 3px;font-weight:600}.media-upload-form tr.image-size label{margin:0 0 0 5px;font-weight:600}.media-upload-form th.label label{font-weight:600;margin:.5em;font-size:13px}.media-upload-form th.label label span{padding:0 5px}.media-item .describe input[type=text],.media-item .describe textarea{width:460px}.media-item .describe p.help{margin:0;padding:0 0 0 5px}.describe-toggle-off,.describe-toggle-on,.media-item .edit-attachment{display:block;line-height:36px;float:right;margin-right:10px}.media-item .describe-toggle-off,.media-item.open .describe-toggle-on{display:none}.media-item.open .describe-toggle-off{display:block}.js .html-uploader #plupload-upload-ui,.media-item .startclosed,.media-item .startopen{display:none}.media-upload-form .media-item{min-height:36px;margin-bottom:1px;position:relative;width:100%;background:#fff}.media-upload-form .media-item,.media-upload-form .media-item .error{-webkit-box-shadow:0 1px 0 #ddd;box-shadow:0 1px 0 #ddd}#media-items:empty{border:0}.media-item .filename{line-height:36px;overflow:hidden;margin-left:6px}.media-item .pinkynail{float:left;margin:2px 10px 0 3px;max-width:40px;max-height:32px}.media-item .original{position:relative;height:34px}.media-item .progress{float:right;height:22px;margin:7px 6px;width:200px;line-height:2em;padding:0;overflow:hidden;-webkit-border-radius:22px;border-radius:22px;background:#ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.media-item .bar{z-index:9;width:0;height:100%;margin-top:-22px;-webkit-border-radius:22px;border-radius:22px;background-color:#0073aa;-webkit-box-shadow:inset 0 0 2px rgba(0,0,0,.3);box-shadow:inset 0 0 2px rgba(0,0,0,.3)}.media-item .progress .percent{z-index:10;position:relative;width:200px;padding:0;color:#fff;text-align:center;line-height:22px;font-weight:400;text-shadow:0 1px 2px rgba(0,0,0,.2)}.upload-php .fixed .column-parent{width:15%}.js .html-uploader #html-upload-ui{display:block}.media-upload-form .media-item .error,.media-upload-form .media-item.error{width:auto;margin:0 0 1px}.media-upload-form .media-item .error{padding:10px 0 10px 14px}.media-item .error-div a.dismiss{display:block;float:right;margin:0 10px 0 15px}.find-box{background-color:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);width:600px;overflow:hidden;margin-left:-300px;position:fixed;top:30px;bottom:30px;left:50%;z-index:100105}.find-box-head{background:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 36px 0 16px;position:absolute;top:0;left:0;right:0}.find-box-inside{overflow:auto;padding:16px;background-color:#fff;position:absolute;top:37px;bottom:45px;overflow-y:scroll;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.find-box-search{padding-bottom:16px}.find-box-search .spinner{float:none;left:105px;position:absolute}#find-posts-response,.find-box-search{position:relative}#find-posts-input,#find-posts-search{float:left}#find-posts-input{width:140px;height:28px;margin:0 4px 0 0}.widefat .found-radio{padding-right:0;width:16px}#find-posts-close{width:36px;height:36px;position:absolute;top:0;right:0;cursor:pointer;text-align:center;color:#666}#find-posts-close:hover{color:#00a0d2}#find-posts-close:before{font:400 20px/36px dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f158"}.find-box-buttons{padding:8px 16px;background:#fcfcfc;border-top:1px solid #ddd;position:absolute;bottom:0;left:0;right:0}@media screen and (max-width:782px){.find-box-inside{bottom:57px}}@media screen and (max-width:660px){.find-box{top:0;bottom:0;left:0;right:0;margin:0;width:100%}}.ui-find-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000;z-index:100100}ul#dismissed-updates{display:none}form.upgrade{margin-top:8px}form.upgrade .hint{font-style:italic;font-size:85%;margin:-.5em 0 2em}#poststuff .inside .the-tagcloud{margin:5px 0 10px;padding:8px;border:1px solid #ddd;line-height:1.8em;word-spacing:3px}.drag-drop #drag-drop-area{border:4px dashed #b4b9be;height:200px}.drag-drop .drag-drop-inside{margin:70px auto 0;width:250px}.drag-drop-inside p{color:#a0a5aa;font-size:14px;margin:5px 0;display:none}.drag-drop .drag-drop-inside p{text-align:center}.drag-drop-inside p.drag-drop-info{font-size:20px}.drag-drop .drag-drop-inside p,.drag-drop-inside p.drag-drop-buttons{display:block}.media-frame.mode-grid .media-frame-menu,.media-frame.mode-grid .media-frame-router,.media-frame.mode-grid .media-frame-title,.upload-php .mode-grid .hide-sidebar .media-sidebar{display:none}.drag-drop.drag-over #drag-drop-area{border-color:#83b4d8}#plupload-upload-ui{position:relative}.media-frame.mode-grid,.media-frame.mode-grid .attachments-browser .attachments,.media-frame.mode-grid .media-frame-content,.media-frame.mode-grid .uploader-inline-content{position:static}.media-frame.mode-grid .media-frame-content{background-color:transparent;border:none}.upload-php .mode-grid .media-sidebar{position:relative;width:auto;margin-bottom:16px;padding:0 16px;border-left:4px solid #dd3d36;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);background-color:#fff}.upload-php .mode-grid .media-sidebar .media-uploader-status{border-bottom:none;padding-bottom:0;max-width:100%}.upload-php .mode-grid .media-sidebar .upload-error{margin:12px 0;padding:4px 0 0;border:none;-webkit-box-shadow:none;box-shadow:none;background:0 0}.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors{top:-10px;right:-14px;padding:10px}.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:before{content:"\f153";display:block;font:400 16px/1 dashicons;color:#b4b9be}.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:focus:before,.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:hover:before{color:#c00}.upload-php .mode-grid .media-sidebar .media-uploader-status.errors h2,.upload-php .mode-grid .media-sidebar .media-uploader-status.errors h3{display:none}.media-frame.mode-grid .uploader-inline{position:relative;top:auto;right:auto;left:auto;bottom:auto;padding-top:0;margin-top:0;border:4px dashed #b4b9be}.media-frame.mode-select .attachments-browser.fixed .attachments{position:relative;top:94px;padding-bottom:94px}.media-frame.mode-grid .attachment.details:focus,.media-frame.mode-grid .attachment:focus,.media-frame.mode-grid .selected.attachment:focus{-webkit-box-shadow:inset 0 0 2px 3px #f1f1f1,inset 0 0 0 7px #5b9dd9;box-shadow:inset 0 0 2px 3px #f1f1f1,inset 0 0 0 7px #5b9dd9;outline:0}.media-frame.mode-grid .selected.attachment{-webkit-box-shadow:inset 0 0 0 5px #f1f1f1,inset 0 0 0 7px #ccc;box-shadow:inset 0 0 0 5px #f1f1f1,inset 0 0 0 7px #ccc}.media-frame.mode-grid .attachment.details{-webkit-box-shadow:inset 0 0 0 3px #f1f1f1,inset 0 0 0 7px #1e8cbe;box-shadow:inset 0 0 0 3px #f1f1f1,inset 0 0 0 7px #1e8cbe}.media-frame.mode-grid.mode-select .attachment .thumbnail{opacity:.65}.media-frame.mode-select .attachment.selected .thumbnail{opacity:1}.media-frame.mode-grid .media-toolbar{margin-bottom:15px;height:auto}.media-frame.mode-grid .media-toolbar select{margin:0 10px 0 0;font-size:14px}.media-frame.mode-grid.mode-edit .media-toolbar-secondary>.select-mode-toggle-button{margin:0 8px 0 0;vertical-align:middle}.media-frame.mode-grid .attachments-browser .bulk-select{display:inline-block;margin:0 10px 0 0}.media-frame.mode-grid .search{margin-top:0}.media-frame.mode-grid .spinner{margin-top:16px}.attachments-browser .media-toolbar-secondary>.media-button{margin-right:10px}.media-frame.mode-select .attachments-browser.fixed .media-toolbar{position:fixed;top:32px;left:auto;right:20px;margin-top:0}.media-frame.mode-grid .attachments-browser{padding:0}.media-frame.mode-grid .attachments-browser .attachments{padding:2px}.media-frame.mode-grid .attachments-browser .no-media{color:#666;font-size:18px;font-style:normal;margin:0;padding:100px 0 0;text-align:center}.edit-attachment-frame{display:block;height:100%;width:100%}.edit-attachment-frame .edit-media-header{overflow:hidden}.upload-php .media-modal-close .media-modal-icon:before{content:"\f335";font-size:22px}.edit-attachment-frame .edit-media-header .left,.edit-attachment-frame .edit-media-header .right,.upload-php .media-modal-close{cursor:pointer;color:#72777c;background-color:transparent;height:50px;width:50px;padding:0;position:absolute;text-align:center;border:0;border-left:1px solid #ddd;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.upload-php .media-modal-close{top:0;right:0}.edit-attachment-frame .edit-media-header .left{right:102px}.edit-attachment-frame .edit-media-header .right{right:51px}.edit-attachment-frame .media-frame-title{left:0;right:150px}.edit-attachment-frame .edit-media-header .left:before,.edit-attachment-frame .edit-media-header .right:before{font:400 20px/50px dashicons!important;display:inline;font-weight:300}.edit-attachment-frame .edit-media-header .left:focus,.edit-attachment-frame .edit-media-header .left:hover,.edit-attachment-frame .edit-media-header .right:focus,.edit-attachment-frame .edit-media-header .right:hover,.upload-php .media-modal-close:focus,.upload-php .media-modal-close:hover{background:#ddd;border-color:#ccc;color:#000;outline:0;-webkit-box-shadow:none;box-shadow:none}.upload-php .media-modal-close:focus .media-modal-icon:before,.upload-php .media-modal-close:hover .media-modal-icon:before{color:#000}.edit-attachment-frame .edit-media-header .left:before,.rtl .edit-attachment-frame .edit-media-header .right:before{content:"\f341"}.edit-attachment-frame .edit-media-header .right:before,.rtl .edit-attachment-frame .edit-media-header .left:before{content:"\f345"}.edit-attachment-frame .edit-media-header .left.disabled,.edit-attachment-frame .edit-media-header .left.disabled:hover,.edit-attachment-frame .edit-media-header .right.disabled,.edit-attachment-frame .edit-media-header .right.disabled:hover{color:#ccc;background:inherit;cursor:default;pointer-events:none}.edit-attachment-frame .media-frame-content,.edit-attachment-frame .media-frame-router{left:0}.edit-attachment-frame .media-frame-content{border-bottom:none;bottom:0;top:50px}.edit-attachment-frame .attachment-details{position:absolute;overflow:auto;top:0;bottom:0;right:0;left:0;-webkit-box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1);box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1)}.edit-attachment-frame .attachment-media-view{float:left;width:65%;height:100%}.edit-attachment-frame .attachment-media-view .thumbnail{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:16px;height:100%}.edit-attachment-frame .attachment-media-view .details-image{display:block;margin-bottom:16px;max-width:100%;max-height:90%;max-height:-webkit-calc(100% - 42px);max-height:calc(100% - 42px)}.edit-attachment-frame .wp-media-wrapper{margin-bottom:12px}.edit-attachment-frame input,.edit-attachment-frame textarea{padding:6px 8px;line-height:16px}.edit-attachment-frame .attachment-info{overflow:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:0;padding:12px 16px 0;width:35%;height:100%;-webkit-box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1);box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1);border-bottom:0;border-left:1px solid #ddd;background:#f3f3f3}.edit-attachment-frame .attachment-info .details,.edit-attachment-frame .attachment-info .settings{position:relative;overflow:hidden;float:none;margin-bottom:15px;padding-bottom:15px;border-bottom:1px solid #ddd}.edit-attachment-frame .attachment-info .filename{font-weight:400;color:#666}.edit-attachment-frame .attachment-info .thumbnail{margin-bottom:12px}.attachment-info .actions{margin-bottom:16px}.attachment-info .actions a{display:inline;text-decoration:none}.wp_attachment_details label[for=content]{font-size:13px;line-height:1.5;margin:1em 0}.wp_attachment_details #attachment_caption{height:4em}.describe .image-editor{vertical-align:top}.imgedit-wrap{position:relative;padding-top:10px}.imgedit-settings fieldset,.imgedit-settings p{margin:8px 0}.imgedit-settings legend{margin-bottom:5px}.describe .imgedit-wrap .imgedit-settings{padding:0 5px}.wp_attachment_holder div.updated{margin-top:0}.wp_attachment_holder .imgedit-wrap>div{height:auto}.wp_attachment_holder .imgedit-wrap .imgedit-panel-content{padding:3px 16px 0 0;float:left}.wp_attachment_holder .imgedit-wrap .imgedit-settings{float:right;width:250px}.imgedit-settings input{margin-top:0;vertical-align:middle}.imgedit-wait{position:absolute;top:0;bottom:0;width:100%;background:#fff;display:none}.imgedit-wait:before{content:"";display:block;width:20px;height:20px;position:absolute;left:50%;top:50%;margin:-10px 0 0 -10px;background:url(../images/spinner.gif) center no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;-webkit-transform:translateZ(0);transform:translateZ(0)}.no-float{float:none}.A1B1 .button,.A1B1 .spinner,.wp_attachment_image .button,.wp_attachment_image .spinner{float:left}.imgedit-settings .disabled,.media-disabled{color:#a0a5aa}.A1B1{overflow:hidden}.no-js .wp_attachment_image .button{display:none}.imgedit-menu{min-width:300px;margin:0 0 12px}.imgedit-menu .note-no-rotate{clear:both;margin:0;padding:1em 0 0}.image-editor .imgedit-menu .button{float:left;width:32px;height:32px;margin:0 8px 0 0;padding:0;background:#f1f1f1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:16px;color:#72777c}.imgedit-menu .button:before{font:400 20px/1 dashicons;speak:none;vertical-align:middle}.imgedit-menu .button.disabled{border-color:#ccc;background-color:#ddd;color:#72777c;filter:alpha(opacity=50);opacity:.5;cursor:default}.imgedit-crop:before{content:"\f165"}.imgedit-rleft:before{content:"\f166"}.imgedit-rright:before{content:"\f167"}.imgedit-flipv:before{content:"\f168"}.imgedit-fliph:before{content:"\f169"}.imgedit-undo:before{content:"\f171"}.imgedit-redo:before{content:"\f172"}.imgedit-crop-wrap{position:relative}.imgedit-crop{margin:0 8px 0 0}.imgedit-rleft{margin:0 3px}.imgedit-rright{margin:0 8px 0 3px}.imgedit-flipv{margin:0 3px}.imgedit-fliph{margin:0 8px 0 3px}.imgedit-undo{margin:0 3px}.imgedit-redo{margin:0 8px 0 3px}.imgedit-thumbnail-preview{margin:10px 8px 0 0}.imgedit-thumbnail-preview-caption{display:block}#poststuff .imgedit-group-top h2,#poststuff .imgedit-group-top h3{display:inline-block;margin:0;padding:0;font-size:14px;line-height:1.4}.imgedit-group-top h2 a,.imgedit-group-top h3 a{text-decoration:none}.imgedit-applyto .imgedit-label{display:block;padding:.5em 0 0}.imgedit-help{display:none;font-style:italic}.image-editor .imgedit-settings .imgedit-help-toggle,.image-editor .imgedit-settings .imgedit-help-toggle:active,.image-editor .imgedit-settings .imgedit-help-toggle:hover{border:1px solid transparent;margin:-1px 0 0 -1px;padding:0;background:0 0;color:#0074a2;font-size:20px;line-height:1;cursor:pointer;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-box-shadow:none;box-shadow:none}.image-editor .imgedit-settings .imgedit-help-toggle:focus{color:#0074a2;border-color:#5b9dd9;outline:0;-webkit-box-shadow:0 0 3px rgba(0,115,170,.8);box-shadow:0 0 3px rgba(0,115,170,.8)}.form-table td.imgedit-response{padding:0}.imgedit-submit{margin:8px 0 0}.imgedit-submit-btn{margin-left:20px}.imgedit-wrap .nowrap{white-space:nowrap;font-size:12px;line-height:inherit}span.imgedit-scale-warn{color:red;font-size:20px;font-style:normal;visibility:hidden;vertical-align:middle}.imgedit-save-target{margin:8px 0}.imgedit-group{margin-bottom:8px;padding:10px}.imgedit-settings .imgedit-crop-ratio input[type=text],.imgedit-settings .imgedit-crop-sel input[type=text],.imgedit-settings .imgedit-scale input[type=text]{width:50px;font-size:14px;padding:3px 5px}.imgedit-separator{display:inline-block;width:7px;text-align:center;vertical-align:middle;font-size:13px;color:#444}.imgedit-settings .imgedit-scale .button{margin-bottom:0}audio,video{display:inline-block;max-width:100%}.mejs-container{width:100%;max-width:100%}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.imgedit-wait:before{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){.wp_attachment_details label[for=content]{font-size:14px;line-height:1.5em}.media-upload-form .media-item .error,.media-upload-form .media-item.error{font-size:13px;line-height:1.5}.media-upload-form .media-item.error{padding:1px 10px}.media-upload-form .media-item .error{padding:10px 0 10px 12px}.imgedit-settings .imgedit-crop-ratio input[type=text],.imgedit-settings .imgedit-crop-sel input[type=text],.imgedit-settings .imgedit-scale input[type=text]{width:60px;font-size:16px;padding:6px 10px}.imgedit-applyto .imgedit-label{vertical-align:middle}}@media only screen and (max-width:1120px){#wp-media-grid .wp-filter .attachment-filters{max-width:100%}}@media only screen and (max-width:782px){.media-frame.mode-select .attachments-browser.fixed .media-toolbar{top:46px;right:10px}}@media only screen and (max-width:600px){.media-frame.mode-select .attachments-browser.fixed .media-toolbar{top:0}}@media only screen and (max-width:480px){.edit-attachment-frame .media-frame-title{right:110px}.edit-attachment-frame .edit-media-header .left,.edit-attachment-frame .edit-media-header .right,.upload-php .media-modal-close{width:40px;height:40px}.upload-php .media-modal-close .media-modal-icon{margin:9px 10px}.edit-attachment-frame .edit-media-header .left:before,.edit-attachment-frame .edit-media-header .right:before{line-height:40px!important}.edit-attachment-frame .edit-media-header .left{right:82px}.edit-attachment-frame .edit-media-header .right{right:41px}.edit-attachment-frame .media-frame-content{top:40px}.edit-attachment-frame .attachment-media-view{float:none;height:auto;width:100%}.edit-attachment-frame .attachment-info{height:auto;width:100%}}@media only screen and (max-width:640px),screen and (max-height:400px){.upload-php .mode-grid .media-sidebar{max-width:100%}}
\ No newline at end of file
+.imgedit-wait,.ui-find-overlay{opacity:.7;filter:alpha(opacity=70)}.media-item .describe{border-collapse:collapse;width:100%;border-top:1px solid #ddd;clear:both;cursor:default}.media-item.media-blank .describe{border:0}.media-item .describe th{vertical-align:top;text-align:left;padding:5px 10px 10px;width:140px}.media-item .describe .align th{padding-top:0}.media-item .media-item-info tr{background-color:transparent}.media-item .describe td{padding:0 8px 8px 0;vertical-align:top}.media-item thead.media-item-info td{padding:4px 10px 0}.media-item .media-item-info .A1B1{padding:0 0 0 10px}.media-item td.savesend{padding-bottom:15px}.media-item .thumbnail{max-height:128px;max-width:128px}#wpbody-content #async-upload-wrap a{display:none}.media-upload-form{margin-top:20px}.media-upload-form td label{margin-right:6px;margin-left:2px}.media-upload-form .align .field label{display:inline;padding:0 0 0 23px;margin:0 1em 0 3px;font-weight:600}.media-upload-form tr.image-size label{margin:0 0 0 5px;font-weight:600}.media-upload-form th.label label{font-weight:600;margin:.5em;font-size:13px}.media-upload-form th.label label span{padding:0 5px}.media-item .describe input[type=text],.media-item .describe textarea{width:460px}.media-item .describe p.help{margin:0;padding:0 0 0 5px}.describe-toggle-off,.describe-toggle-on,.media-item .edit-attachment{display:block;line-height:36px;float:right;margin-right:10px}.media-item .describe-toggle-off,.media-item.open .describe-toggle-on{display:none}.media-item.open .describe-toggle-off{display:block}.js .html-uploader #plupload-upload-ui,.media-item .startclosed,.media-item .startopen{display:none}.media-upload-form .media-item{min-height:36px;margin-bottom:1px;position:relative;width:100%;background:#fff}.media-upload-form .media-item,.media-upload-form .media-item .error{-webkit-box-shadow:0 1px 0 #ddd;box-shadow:0 1px 0 #ddd}#media-items:empty{border:0}.media-item .filename{line-height:36px;overflow:hidden;margin-left:6px}.media-item .pinkynail{float:left;margin:2px 10px 0 3px;max-width:40px;max-height:32px}.media-item .original{position:relative;height:34px}.media-item .progress{float:right;height:22px;margin:7px 6px;width:200px;line-height:2em;padding:0;overflow:hidden;-webkit-border-radius:22px;border-radius:22px;background:#ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.media-item .bar{z-index:9;width:0;height:100%;margin-top:-22px;-webkit-border-radius:22px;border-radius:22px;background-color:#0073aa;-webkit-box-shadow:inset 0 0 2px rgba(0,0,0,.3);box-shadow:inset 0 0 2px rgba(0,0,0,.3)}.media-item .progress .percent{z-index:10;position:relative;width:200px;padding:0;color:#fff;text-align:center;line-height:22px;font-weight:400;text-shadow:0 1px 2px rgba(0,0,0,.2)}.upload-php .fixed .column-parent{width:15%}.js .html-uploader #html-upload-ui{display:block}.media-upload-form .media-item .error,.media-upload-form .media-item.error{width:auto;margin:0 0 1px}.media-upload-form .media-item .error{padding:10px 0 10px 14px}.media-item .error-div a.dismiss{display:block;float:right;margin:0 10px 0 15px}.find-box{background-color:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);width:600px;overflow:hidden;margin-left:-300px;position:fixed;top:30px;bottom:30px;left:50%;z-index:100105}.find-box-head{background:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:18px;font-weight:600;line-height:36px;padding:0 36px 0 16px;position:absolute;top:0;left:0;right:0}.find-box-inside{overflow:auto;padding:16px;background-color:#fff;position:absolute;top:37px;bottom:45px;overflow-y:scroll;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.find-box-search{padding-bottom:16px}.find-box-search .spinner{float:none;left:105px;position:absolute}#find-posts-response,.find-box-search{position:relative}#find-posts-input,#find-posts-search{float:left}#find-posts-input{width:140px;height:28px;margin:0 4px 0 0}.widefat .found-radio{padding-right:0;width:16px}#find-posts-close{width:36px;height:36px;border:none;padding:0;position:absolute;top:0;right:0;cursor:pointer;text-align:center;background:0 0;color:#666}#find-posts-close:focus,#find-posts-close:hover{color:#00a0d2}#find-posts-close:focus{outline:0;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#find-posts-close:before{font:400 20px/36px dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f158"}.find-box-buttons{padding:8px 16px;background:#fcfcfc;border-top:1px solid #ddd;position:absolute;bottom:0;left:0;right:0}@media screen and (max-width:782px){.find-box-inside{bottom:57px}}@media screen and (max-width:660px){.find-box{top:0;bottom:0;left:0;right:0;margin:0;width:100%}}.ui-find-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000;z-index:100100}ul#dismissed-updates{display:none}form.upgrade{margin-top:8px}form.upgrade .hint{font-style:italic;font-size:85%;margin:-.5em 0 2em}#poststuff .inside .the-tagcloud{margin:5px 0 10px;padding:8px;border:1px solid #ddd;line-height:1.8em;word-spacing:3px}.drag-drop #drag-drop-area{border:4px dashed #b4b9be;height:200px}.drag-drop .drag-drop-inside{margin:70px auto 0;width:250px}.drag-drop-inside p{color:#a0a5aa;font-size:14px;margin:5px 0;display:none}.drag-drop .drag-drop-inside p{text-align:center}.drag-drop-inside p.drag-drop-info{font-size:20px}.drag-drop .drag-drop-inside p,.drag-drop-inside p.drag-drop-buttons{display:block}.media-frame.mode-grid .media-frame-menu,.media-frame.mode-grid .media-frame-router,.media-frame.mode-grid .media-frame-title,.upload-php .mode-grid .hide-sidebar .media-sidebar{display:none}.drag-drop.drag-over #drag-drop-area{border-color:#83b4d8}#plupload-upload-ui{position:relative}.media-frame.mode-grid,.media-frame.mode-grid .attachments-browser .attachments,.media-frame.mode-grid .media-frame-content,.media-frame.mode-grid .uploader-inline-content{position:static}.media-frame.mode-grid .media-frame-content{background-color:transparent;border:none}.upload-php .mode-grid .media-sidebar{position:relative;width:auto;margin-bottom:16px;padding:0 16px;border-left:4px solid #dd3d36;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);background-color:#fff}.upload-php .mode-grid .media-sidebar .media-uploader-status{border-bottom:none;padding-bottom:0;max-width:100%}.upload-php .mode-grid .media-sidebar .upload-error{margin:12px 0;padding:4px 0 0;border:none;-webkit-box-shadow:none;box-shadow:none;background:0 0}.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors{top:-10px;right:-14px;padding:10px}.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:before{content:"\f153";display:block;font:400 16px/1 dashicons;color:#b4b9be}.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:focus:before,.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:hover:before{color:#c00}.upload-php .mode-grid .media-sidebar .media-uploader-status.errors h2,.upload-php .mode-grid .media-sidebar .media-uploader-status.errors h3{display:none}.media-frame.mode-grid .uploader-inline{position:relative;top:auto;right:auto;left:auto;bottom:auto;padding-top:0;margin-top:0;border:4px dashed #b4b9be}.media-frame.mode-select .attachments-browser.fixed .attachments{position:relative;top:94px;padding-bottom:94px}.media-frame.mode-grid .attachment.details:focus,.media-frame.mode-grid .attachment:focus,.media-frame.mode-grid .selected.attachment:focus{-webkit-box-shadow:inset 0 0 2px 3px #f1f1f1,inset 0 0 0 7px #5b9dd9;box-shadow:inset 0 0 2px 3px #f1f1f1,inset 0 0 0 7px #5b9dd9;outline:0}.media-frame.mode-grid .selected.attachment{-webkit-box-shadow:inset 0 0 0 5px #f1f1f1,inset 0 0 0 7px #ccc;box-shadow:inset 0 0 0 5px #f1f1f1,inset 0 0 0 7px #ccc}.media-frame.mode-grid .attachment.details{-webkit-box-shadow:inset 0 0 0 3px #f1f1f1,inset 0 0 0 7px #1e8cbe;box-shadow:inset 0 0 0 3px #f1f1f1,inset 0 0 0 7px #1e8cbe}.media-frame.mode-grid.mode-select .attachment .thumbnail{opacity:.65}.media-frame.mode-select .attachment.selected .thumbnail{opacity:1}.media-frame.mode-grid .media-toolbar{margin-bottom:15px;height:auto}.media-frame.mode-grid .media-toolbar select{margin:0 10px 0 0;font-size:14px}.media-frame.mode-grid.mode-edit .media-toolbar-secondary>.select-mode-toggle-button{margin:0 8px 0 0;vertical-align:middle}.media-frame.mode-grid .attachments-browser .bulk-select{display:inline-block;margin:0 10px 0 0}.media-frame.mode-grid .search{margin-top:0}.media-frame.mode-grid .spinner{margin-top:16px}.attachments-browser .media-toolbar-secondary>.media-button{margin-right:10px}.media-frame.mode-select .attachments-browser.fixed .media-toolbar{position:fixed;top:32px;left:auto;right:20px;margin-top:0}.media-frame.mode-grid .attachments-browser{padding:0}.media-frame.mode-grid .attachments-browser .attachments{padding:2px}.media-frame.mode-grid .attachments-browser .no-media{color:#666;font-size:18px;font-style:normal;margin:0;padding:100px 0 0;text-align:center}.edit-attachment-frame{display:block;height:100%;width:100%}.edit-attachment-frame .edit-media-header{overflow:hidden}.upload-php .media-modal-close .media-modal-icon:before{content:"\f335";font-size:22px}.edit-attachment-frame .edit-media-header .left,.edit-attachment-frame .edit-media-header .right,.upload-php .media-modal-close{cursor:pointer;color:#72777c;background-color:transparent;height:50px;width:50px;padding:0;position:absolute;text-align:center;border:0;border-left:1px solid #ddd;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.upload-php .media-modal-close{top:0;right:0}.edit-attachment-frame .edit-media-header .left{right:102px}.edit-attachment-frame .edit-media-header .right{right:51px}.edit-attachment-frame .media-frame-title{left:0;right:150px}.edit-attachment-frame .edit-media-header .left:before,.edit-attachment-frame .edit-media-header .right:before{font:400 20px/50px dashicons!important;display:inline;font-weight:300}.edit-attachment-frame .edit-media-header .left:focus,.edit-attachment-frame .edit-media-header .left:hover,.edit-attachment-frame .edit-media-header .right:focus,.edit-attachment-frame .edit-media-header .right:hover,.upload-php .media-modal-close:focus,.upload-php .media-modal-close:hover{background:#ddd;border-color:#ccc;color:#000;outline:0;-webkit-box-shadow:none;box-shadow:none}.upload-php .media-modal-close:focus .media-modal-icon:before,.upload-php .media-modal-close:hover .media-modal-icon:before{color:#000}.edit-attachment-frame .edit-media-header .left:before,.rtl .edit-attachment-frame .edit-media-header .right:before{content:"\f341"}.edit-attachment-frame .edit-media-header .right:before,.rtl .edit-attachment-frame .edit-media-header .left:before{content:"\f345"}.edit-attachment-frame .edit-media-header .left.disabled,.edit-attachment-frame .edit-media-header .left.disabled:hover,.edit-attachment-frame .edit-media-header .right.disabled,.edit-attachment-frame .edit-media-header .right.disabled:hover{color:#ccc;background:inherit;cursor:default;pointer-events:none}.edit-attachment-frame .media-frame-content,.edit-attachment-frame .media-frame-router{left:0}.edit-attachment-frame .media-frame-content{border-bottom:none;bottom:0;top:50px}.edit-attachment-frame .attachment-details{position:absolute;overflow:auto;top:0;bottom:0;right:0;left:0;-webkit-box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1);box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1)}.edit-attachment-frame .attachment-media-view{float:left;width:65%;height:100%}.edit-attachment-frame .attachment-media-view .thumbnail{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:16px;height:100%}.edit-attachment-frame .attachment-media-view .details-image{display:block;margin-bottom:16px;max-width:100%;max-height:90%;max-height:-webkit-calc(100% - 42px);max-height:calc(100% - 42px)}.edit-attachment-frame .wp-media-wrapper{margin-bottom:12px}.edit-attachment-frame input,.edit-attachment-frame textarea{padding:6px 8px;line-height:16px}.edit-attachment-frame .attachment-info{overflow:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:0;padding:12px 16px 0;width:35%;height:100%;-webkit-box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1);box-shadow:inset 0 4px 4px -4px rgba(0,0,0,.1);border-bottom:0;border-left:1px solid #ddd;background:#f3f3f3}.edit-attachment-frame .attachment-info .details,.edit-attachment-frame .attachment-info .settings{position:relative;overflow:hidden;float:none;margin-bottom:15px;padding-bottom:15px;border-bottom:1px solid #ddd}.edit-attachment-frame .attachment-info .filename{font-weight:400;color:#666}.edit-attachment-frame .attachment-info .thumbnail{margin-bottom:12px}.attachment-info .actions{margin-bottom:16px}.attachment-info .actions a{display:inline;text-decoration:none}.wp_attachment_details label[for=content]{font-size:13px;line-height:1.5;margin:1em 0}.wp_attachment_details #attachment_caption{height:4em}.describe .image-editor{vertical-align:top}.imgedit-wrap{position:relative;padding-top:10px}.imgedit-settings fieldset,.imgedit-settings p{margin:8px 0}.imgedit-settings legend{margin-bottom:5px}.describe .imgedit-wrap .imgedit-settings{padding:0 5px}.wp_attachment_holder div.updated{margin-top:0}.wp_attachment_holder .imgedit-wrap>div{height:auto}.wp_attachment_holder .imgedit-wrap .imgedit-panel-content{padding:3px 16px 0 0;float:left}.wp_attachment_holder .imgedit-wrap .imgedit-settings{float:right;width:250px}.imgedit-settings input{margin-top:0;vertical-align:middle}.imgedit-wait{position:absolute;top:0;bottom:0;width:100%;background:#fff;display:none}.imgedit-wait:before{content:"";display:block;width:20px;height:20px;position:absolute;left:50%;top:50%;margin:-10px 0 0 -10px;background:url(../images/spinner.gif) center no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;-webkit-transform:translateZ(0);transform:translateZ(0)}.no-float{float:none}.A1B1 .button,.A1B1 .spinner,.wp_attachment_image .button,.wp_attachment_image .spinner{float:left}.imgedit-settings .disabled,.media-disabled{color:#a0a5aa}.A1B1{overflow:hidden}.no-js .wp_attachment_image .button{display:none}.imgedit-menu{min-width:300px;margin:0 0 12px}.imgedit-menu .note-no-rotate{clear:both;margin:0;padding:1em 0 0}.image-editor .imgedit-menu .button{float:left;width:32px;height:32px;margin:0 8px 0 0;padding:0;background:#f1f1f1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:16px;color:#72777c}.imgedit-menu .button:before{font:400 20px/1 dashicons;speak:none;vertical-align:middle}.imgedit-menu .button.disabled{border-color:#ccc;background-color:#ddd;color:#72777c;filter:alpha(opacity=50);opacity:.5;cursor:default}.imgedit-crop:before{content:"\f165"}.imgedit-rleft:before{content:"\f166"}.imgedit-rright:before{content:"\f167"}.imgedit-flipv:before{content:"\f168"}.imgedit-fliph:before{content:"\f169"}.imgedit-undo:before{content:"\f171"}.imgedit-redo:before{content:"\f172"}.imgedit-crop-wrap{position:relative}.imgedit-crop{margin:0 8px 0 0}.imgedit-rleft{margin:0 3px}.imgedit-rright{margin:0 8px 0 3px}.imgedit-flipv{margin:0 3px}.imgedit-fliph{margin:0 8px 0 3px}.imgedit-undo{margin:0 3px}.imgedit-redo{margin:0 8px 0 3px}.imgedit-thumbnail-preview{margin:10px 8px 0 0}.imgedit-thumbnail-preview-caption{display:block}#poststuff .imgedit-group-top h2,#poststuff .imgedit-group-top h3{display:inline-block;margin:0;padding:0;font-size:14px;line-height:1.4}.imgedit-group-top h2 a,.imgedit-group-top h3 a{text-decoration:none}.imgedit-applyto .imgedit-label{display:block;padding:.5em 0 0}.imgedit-help{display:none;font-style:italic}.image-editor .imgedit-settings .imgedit-help-toggle,.image-editor .imgedit-settings .imgedit-help-toggle:active,.image-editor .imgedit-settings .imgedit-help-toggle:hover{border:1px solid transparent;margin:-1px 0 0 -1px;padding:0;background:0 0;color:#0074a2;font-size:20px;line-height:1;cursor:pointer;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-box-shadow:none;box-shadow:none}.image-editor .imgedit-settings .imgedit-help-toggle:focus{color:#0074a2;border-color:#5b9dd9;outline:0;-webkit-box-shadow:0 0 3px rgba(0,115,170,.8);box-shadow:0 0 3px rgba(0,115,170,.8)}.form-table td.imgedit-response{padding:0}.imgedit-submit{margin:8px 0 0}.imgedit-submit-btn{margin-left:20px}.imgedit-wrap .nowrap{white-space:nowrap;font-size:12px;line-height:inherit}span.imgedit-scale-warn{color:red;font-size:20px;font-style:normal;visibility:hidden;vertical-align:middle}.imgedit-save-target{margin:8px 0}.imgedit-group{margin-bottom:8px;padding:10px}.imgedit-settings .imgedit-crop-ratio input[type=text],.imgedit-settings .imgedit-crop-sel input[type=text],.imgedit-settings .imgedit-scale input[type=text]{width:50px;font-size:14px;padding:3px 5px}.imgedit-separator{display:inline-block;width:7px;text-align:center;vertical-align:middle;font-size:13px;color:#444}.imgedit-settings .imgedit-scale .button{margin-bottom:0}audio,video{display:inline-block;max-width:100%}.mejs-container{width:100%;max-width:100%}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.imgedit-wait:before{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){.wp_attachment_details label[for=content]{font-size:14px;line-height:1.5em}.media-upload-form .media-item .error,.media-upload-form .media-item.error{font-size:13px;line-height:1.5}.media-upload-form .media-item.error{padding:1px 10px}.media-upload-form .media-item .error{padding:10px 0 10px 12px}.imgedit-settings .imgedit-crop-ratio input[type=text],.imgedit-settings .imgedit-crop-sel input[type=text],.imgedit-settings .imgedit-scale input[type=text]{width:60px;font-size:16px;padding:6px 10px}.imgedit-applyto .imgedit-label{vertical-align:middle}}@media only screen and (max-width:1120px){#wp-media-grid .wp-filter .attachment-filters{max-width:100%}}@media only screen and (max-width:782px){.media-frame.mode-select .attachments-browser.fixed .media-toolbar{top:46px;right:10px}}@media only screen and (max-width:600px){.media-frame.mode-select .attachments-browser.fixed .media-toolbar{top:0}}@media only screen and (max-width:480px){.edit-attachment-frame .media-frame-title{right:110px}.edit-attachment-frame .edit-media-header .left,.edit-attachment-frame .edit-media-header .right,.upload-php .media-modal-close{width:40px;height:40px}.upload-php .media-modal-close .media-modal-icon{margin:9px 10px}.edit-attachment-frame .edit-media-header .left:before,.edit-attachment-frame .edit-media-header .right:before{line-height:40px!important}.edit-attachment-frame .edit-media-header .left{right:82px}.edit-attachment-frame .edit-media-header .right{right:41px}.edit-attachment-frame .media-frame-content{top:40px}.edit-attachment-frame .attachment-media-view{float:none;height:auto;width:100%}.edit-attachment-frame .attachment-info{height:auto;width:100%}}@media only screen and (max-width:640px),screen and (max-height:400px){.upload-php .mode-grid .media-sidebar{max-width:100%}}
\ No newline at end of file
index c2455b3fd055757b72bc81881eafeb44c3de6c37..e5496043b93a5e890d03ada89bf8b81e941add7c 100644 (file)
@@ -6,7 +6,7 @@
 }
 
 ul.add-menu-item-tabs li {
-       padding: 3px 8px 3px 5px;
+       padding: 3px 8px 4px 5px;
 }
 
 .accordion-section ul.category-tabs,
@@ -71,7 +71,7 @@ ul.add-menu-item-tabs li {
 .is-submenu {
        color: #555d66; /* #fafafa background */
        font-style: italic;
-       font-weight: normal;
+       font-weight: 400;
        margin-right: 4px;
 }
 
@@ -215,7 +215,7 @@ ul.add-menu-item-tabs li {
 }
 
 .menu-location-title label {
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .menu-location-menus select {
index a6b32908c30c10c912050ce5915874a31dbd0ac3..afc8bc0bc313d600b1e75395659b4cd0680f723b 100644 (file)
@@ -1 +1 @@
-.no-js #message{display:block}ul.add-menu-item-tabs li{padding:3px 8px 3px 5px}.accordion-section ul.add-menu-item-tabs,.accordion-section ul.category-tabs,.accordion-section ul.wp-tab-bar{margin:0}.accordion-section .categorychecklist{margin:13px 0}#nav-menu-meta .accordion-section-content{padding:18px 13px}#nav-menu-meta .button-controls{margin-bottom:0}#nav-menus-frame{margin-right:300px;margin-top:23px}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-right:-300px;clear:both;float:right;padding-top:0}#menu-settings-column .inside{clear:both;margin:10px 0 0}.metabox-holder-disabled .accordion-section-content,.metabox-holder-disabled .accordion-section-title,.metabox-holder-disabled .postbox{opacity:.5;filter:alpha(opacity=50)}.metabox-holder-disabled .button-controls .select-all{display:none}#wpbody{position:relative}.blank-slate .menu-settings{border:none;margin-top:0;padding-top:0;overflow:hidden}.is-submenu{color:#555d66;font-style:italic;font-weight:400;margin-right:4px}.manage-menus{margin-top:23px;padding:10px;overflow:hidden;background:#fbfbfb}.manage-menus .selected-menu,.manage-menus .submit-btn,.manage-menus select,.nav-menus-php .add-new-menu-action{display:inline-block;margin-left:3px;vertical-align:middle}.manage-menus select,.menu-location-menus select{max-width:100%}.menu-edit #post-body-content h3{margin:1em 0 10px}.menu-settings{border-top:1px solid #eee;margin-top:2em}.menu-settings dl{margin:0 0 10px;overflow:hidden;padding-right:18%}.menu-settings dd{float:right;margin:0;width:100%}.menu-settings dt{float:right;clear:both;width:21.951%;padding:3px 0 0;margin-right:-21.951%}.menu-settings label{vertical-align:baseline}.menu-edit .checkbox-input{margin-top:4px}.theme-location-set{color:#72777c;font-size:11px}#add-custom-link .howto,#cancel-save{font-size:12px}#menu-management-liquid{float:right;min-width:100%;margin-top:3px}#menu-management{position:relative;margin-left:20px;margin-top:-3px;width:100%;background:#f5f5f5}#menu-management .menu-edit{margin-bottom:20px}.nav-menus-php #post-body{padding:0 10px 10px;border-top:1px solid #fff;border-bottom:1px solid #ddd;background:#fff}#nav-menu-footer,#nav-menu-header{padding:0 10px}#nav-menu-header{border-bottom:1px solid #ddd;margin-bottom:0}#nav-menu-header .menu-name-label{display:inline-block;vertical-align:middle;margin-left:7px;font-style:italic}.nav-menus-php #post-body div.error,.nav-menus-php #post-body div.updated{margin:0}.nav-menus-php #post-body-content{position:relative;float:none}#menu-management .menu-add-new abbr{font-weight:600}#select-nav-menu-container{text-align:left;padding:0 10px 3px;margin-bottom:5px}#select-nav-menu{width:100px;display:inline}#menu-name-label{margin-top:-2px}.widefat .menu-locations .menu-location-title{padding:13px 10px 0}.menu-location-title label{font-weight:700}.menu-location-menus select{float:right}#locations-nav-menu-wrapper{padding:5px 0}.locations-nav-menu-select select{float:right;width:160px;margin-left:5px}.locations-row-links{float:right;margin:6px 6px 0 0}.locations-add-menu-link,.locations-edit-menu-link{margin:0 3px}.locations-edit-menu-link{padding-left:3px;border-left:1px solid #ccc}#menu-management .inside{padding:0 10px}.customlinkdiv .menu-item-textbox,.postbox .howto input{width:180px;float:left}.accordion-container .outer-border{margin:0}.customlinkdiv p{margin-top:0}#nav-menu-theme-locations .howto select{width:100%}#nav-menu-theme-locations .button-controls{text-align:left}.add-menu-item-view-all{height:400px}#menu-container .submit{margin:0 0 10px;padding:0}.nav-menus-php .meta-sep,.nav-menus-php .submitcancel,.nav-menus-php .submitdelete{display:block;float:right;margin:6px 0;line-height:15px}.meta-sep{padding:0 2px}#cancel-save{text-decoration:underline;margin-right:20px;margin-top:5px}.button-primary.right,.button-secondary.right,.button.right{float:left}.list-controls{float:right;margin-top:5px}.add-to-menu{float:left}.button-controls{clear:both;margin:10px 0}.hide-all,.show-all{cursor:pointer}.hide-all{display:none}#menu-name{width:270px;vertical-align:middle}#manage-menu .inside{padding:0}#available-links dt{display:block}#add-custom-link label span{display:block;float:right;margin-top:5px;padding-left:5px}.menu-item-textbox{width:180px}.customlinkdiv label,.nav-menus-php .howto span{float:right;margin-top:6px}.quick-search{width:190px}.quick-search-wrap .spinner{float:none;margin:-3px 0 0 -10px}.nav-menus-php .list-wrap{display:none;clear:both;margin-bottom:10px}.nav-menus-php .postbox p.submit{margin-bottom:0}.nav-menus-php .list li{display:none;margin:0 0 5px}.nav-menus-php .list li .menu-item-title{cursor:pointer;display:block}.nav-menus-php .list li .menu-item-title input{margin-left:3px;margin-top:-3px}.menu-item-title input[type=checkbox]{display:inline-block;margin-top:-4px}#menu-container .inside{padding-bottom:10px}.menu{padding-top:1em}#menu-to-edit{margin:0;padding:.1em 0}.menu ul{width:100%}.menu li{margin-bottom:0;position:relative}.menu-item-bar{clear:both;line-height:1.5em;position:relative;margin:9px 0 0}.menu-item-bar .menu-item-handle{border:1px solid #ddd;position:relative;padding:10px 15px;height:auto;min-height:20px;width:382px;line-height:30px;overflow:hidden;word-wrap:break-word}.menu-item-bar .menu-item-handle:hover{border-color:#999}#menu-to-edit .menu-item-invalid .menu-item-handle{background:#f6c9cc;border-color:#f1acb1}.no-js .menu-item-edit-active .item-edit{display:none}.js .menu-item-handle{cursor:move}#cancel-save,.item-controls a:hover{cursor:pointer}.menu li.deleting .menu-item-handle{background-image:none;background-color:#f66}.menu-item-handle .item-title{font-size:13px;font-weight:600;line-height:20px;display:block;margin-left:13em}.menu-item-handle .menu-item-title.no-title{color:#72777c}li.menu-item.ui-sortable-helper .menu-item-bar{margin-top:0}li.menu-item.ui-sortable-helper .menu-item-transport .menu-item-bar{margin-top:13px}.menu .sortable-placeholder{height:35px;width:410px;margin-top:13px}.menu-item .menu-item-transport:empty{display:none}.menu-item-depth-0{margin-right:0}.menu-item-depth-1{margin-right:30px}.menu-item-depth-2{margin-right:60px}.menu-item-depth-3{margin-right:90px}.menu-item-depth-4{margin-right:120px}.menu-item-depth-5{margin-right:150px}.menu-item-depth-6{margin-right:180px}.menu-item-depth-7{margin-right:210px}.menu-item-depth-8{margin-right:240px}.menu-item-depth-9{margin-right:270px}.menu-item-depth-10{margin-right:300px}.menu-item-depth-11{margin-right:330px}.menu-item-depth-0 .menu-item-transport{margin-right:0}.menu-item-depth-1 .menu-item-transport{margin-right:-30px}.menu-item-depth-2 .menu-item-transport{margin-right:-60px}.menu-item-depth-3 .menu-item-transport{margin-right:-90px}.menu-item-depth-4 .menu-item-transport{margin-right:-120px}.menu-item-depth-5 .menu-item-transport{margin-right:-150px}.menu-item-depth-6 .menu-item-transport{margin-right:-180px}.menu-item-depth-7 .menu-item-transport{margin-right:-210px}.menu-item-depth-8 .menu-item-transport{margin-right:-240px}.menu-item-depth-9 .menu-item-transport{margin-right:-270px}.menu-item-depth-10 .menu-item-transport{margin-right:-300px}.menu-item-depth-11 .menu-item-transport{margin-right:-330px}body.menu-max-depth-0{min-width:950px!important}body.menu-max-depth-1{min-width:980px!important}body.menu-max-depth-2{min-width:1010px!important}body.menu-max-depth-3{min-width:1040px!important}body.menu-max-depth-4{min-width:1070px!important}body.menu-max-depth-5{min-width:1100px!important}body.menu-max-depth-6{min-width:1130px!important}body.menu-max-depth-7{min-width:1160px!important}body.menu-max-depth-8{min-width:1190px!important}body.menu-max-depth-9{min-width:1220px!important}body.menu-max-depth-10{min-width:1250px!important}body.menu-max-depth-11{min-width:1280px!important}.item-type{display:inline-block;padding:12px 16px;color:#666;font-size:12px;line-height:18px}.item-controls{font-size:12px;position:absolute;left:20px;top:-1px}.item-controls a{text-decoration:none}.item-controls .item-order{padding-left:10px}.nav-menus-php .item-edit{position:absolute;left:-20px;top:0;display:block;width:30px;height:40px;margin-left:0!important;text-indent:100%;outline:0;overflow:hidden;white-space:nowrap}.no-js.nav-menus-php .item-edit{position:static;float:left;width:auto;height:auto;margin-left:-10px!important;padding:12px 0;color:#0073aa;text-decoration:underline;font-size:12px;line-height:18px;text-indent:0}.nav-menus-php .item-edit:before{margin-top:10px;margin-right:4px;width:20px;-webkit-border-radius:50%;border-radius:50%;text-indent:-1px}.no-js.nav-menus-php .item-edit:before{display:none}.rtl .nav-menus-php .item-edit:before{text-indent:1px}.nav-menus-php .item-edit:focus{-webkit-box-shadow:none;box-shadow:none}.nav-menus-php .item-edit:focus:before{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.menu-instructions-inactive{display:none}.menu-item-settings{display:block;width:402px;padding:10px 10px 10px 0;position:relative;z-index:10;border:1px solid #e5e5e5;border-top:none;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.menu-item-settings .field-move a{display:none;margin:0 2px}.menu-item-edit-active .menu-item-settings{display:block}.menu-item-edit-inactive .menu-item-settings{display:none}.add-menu-item-pagelinks{margin:.5em auto;text-align:center}.link-to-original{display:block;margin:0 0 10px;padding:3px 5px 5px;border:1px solid #ddd;color:#72777c;font-size:12px;font-style:italic}.hidden-field,.nav-menus-php .blank-slate .menu-settings{display:none}.link-to-original a{padding-right:4px;font-style:normal}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-left:10px;float:right}.description-thin{width:190px}.description-wide{width:390px}.menu-item-actions{padding-top:15px}.nav-menus-php .major-publishing-actions{clear:both;padding:7px 0 6px}.nav-menus-php .major-publishing-actions .publishing-action{text-align:left;float:left}.nav-menus-php .delete-action{float:right;margin-top:2px}.nav-menus-php .submitbox .submitcancel{border-bottom:1px solid #0073aa;padding:1px 2px;color:#0073aa;text-decoration:none}.nav-menus-php .submitbox .submitcancel:hover{background:#0073aa;color:#fff}.nav-menus-php .major-publishing-actions .form-invalid{padding-right:4px;margin-right:-4px}#menu-item-name-wrap,#menu-item-url-wrap,#nav-menus-frame,.button-controls{display:block}@media only screen and (min-width:769px) and (max-width:1000px){body.menu-max-depth-0{min-width:0!important}#menu-management-liquid{width:100%}.nav-menus-php #post-body-content{min-width:0}.menu-item-bar .menu-item-handle{width:90%}}@media screen and (max-width:782px){body.nav-menus-php{min-width:0!important}#nav-menus-frame{margin-right:0;float:none;width:100%}#wpbody-content #menu-settings-column{display:block;width:100%;float:none;margin-right:0}#side-sortables .add-menu-item-tabs{margin:15px 0 14px}ul.add-menu-item-tabs li.tabs{padding:13px 15px 14px}.nav-menus-php .item-controls .item-type{margin-top:2px}.nav-menus-php .customlinkdiv .howto input{width:65%}.nav-menus-php .quick-search{width:85%}#menu-management-liquid{margin-top:25px}.nav-menus-php .menu-name-label.howto span{margin-top:13px}.menu-name-label #menu-name{margin-top:4px}.nav-menus-php .major-publishing-actions .publishing-action{margin-top:6px}.nav-menus-php .delete-action{font-size:14px;line-height:50px;margin-top:12px}.description-wide,.menu-item-bar .menu-item-handle,.menu-item-settings{width:auto}.menu-item-settings{padding:10px}.menu-item-settings .description-thin,.menu-item-settings .description-wide,.menu-item-settings input{width:100%}.menu-item-settings input[type=checkbox],.menu-item-settings input[type=radio]{width:25px}.menu-settings dl{padding-right:0}.menu-settings dd{float:none;width:100%;margin-bottom:15px}.menu-settings dt{float:none;width:auto;margin-right:0;margin-bottom:15px}.manage-menus select{margin:.5em 0}.widefat .menu-locations .menu-location-title{padding-top:16px}}@media only screen and (max-width:768px){#menu-locations-wrap .widefat{width:100%}}
\ No newline at end of file
+.no-js #message{display:block}ul.add-menu-item-tabs li{padding:3px 8px 4px 5px}.accordion-section ul.add-menu-item-tabs,.accordion-section ul.category-tabs,.accordion-section ul.wp-tab-bar{margin:0}.accordion-section .categorychecklist{margin:13px 0}#nav-menu-meta .accordion-section-content{padding:18px 13px}#nav-menu-meta .button-controls{margin-bottom:0}#nav-menus-frame{margin-right:300px;margin-top:23px}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-right:-300px;clear:both;float:right;padding-top:0}#menu-settings-column .inside{clear:both;margin:10px 0 0}.metabox-holder-disabled .accordion-section-content,.metabox-holder-disabled .accordion-section-title,.metabox-holder-disabled .postbox{opacity:.5;filter:alpha(opacity=50)}.metabox-holder-disabled .button-controls .select-all{display:none}#wpbody{position:relative}.blank-slate .menu-settings{border:none;margin-top:0;padding-top:0;overflow:hidden}.is-submenu{color:#555d66;font-style:italic;font-weight:400;margin-right:4px}#menu-management .menu-add-new abbr,.menu-location-title label{font-weight:600}.manage-menus{margin-top:23px;padding:10px;overflow:hidden;background:#fbfbfb}.manage-menus .selected-menu,.manage-menus .submit-btn,.manage-menus select,.nav-menus-php .add-new-menu-action{display:inline-block;margin-left:3px;vertical-align:middle}.manage-menus select,.menu-location-menus select{max-width:100%}.menu-edit #post-body-content h3{margin:1em 0 10px}.menu-settings{border-top:1px solid #eee;margin-top:2em}.menu-settings dl{margin:0 0 10px;overflow:hidden;padding-right:18%}.menu-settings dd{float:right;margin:0;width:100%}.menu-settings dt{float:right;clear:both;width:21.951%;padding:3px 0 0;margin-right:-21.951%}.menu-settings label{vertical-align:baseline}.menu-edit .checkbox-input{margin-top:4px}.theme-location-set{color:#72777c;font-size:11px}#add-custom-link .howto,#cancel-save{font-size:12px}#menu-management-liquid{float:right;min-width:100%;margin-top:3px}#menu-management{position:relative;margin-left:20px;margin-top:-3px;width:100%;background:#f5f5f5}#menu-management .menu-edit{margin-bottom:20px}.nav-menus-php #post-body{padding:0 10px 10px;border-top:1px solid #fff;border-bottom:1px solid #ddd;background:#fff}#nav-menu-footer,#nav-menu-header{padding:0 10px}#nav-menu-header{border-bottom:1px solid #ddd;margin-bottom:0}#nav-menu-header .menu-name-label{display:inline-block;vertical-align:middle;margin-left:7px;font-style:italic}.nav-menus-php #post-body div.error,.nav-menus-php #post-body div.updated{margin:0}.nav-menus-php #post-body-content{position:relative;float:none}#select-nav-menu-container{text-align:left;padding:0 10px 3px;margin-bottom:5px}#select-nav-menu{width:100px;display:inline}#menu-name-label{margin-top:-2px}.widefat .menu-locations .menu-location-title{padding:13px 10px 0}.menu-location-menus select{float:right}#locations-nav-menu-wrapper{padding:5px 0}.locations-nav-menu-select select{float:right;width:160px;margin-left:5px}.locations-row-links{float:right;margin:6px 6px 0 0}.locations-add-menu-link,.locations-edit-menu-link{margin:0 3px}.locations-edit-menu-link{padding-left:3px;border-left:1px solid #ccc}#menu-management .inside{padding:0 10px}.customlinkdiv .menu-item-textbox,.postbox .howto input{width:180px;float:left}.accordion-container .outer-border{margin:0}.customlinkdiv p{margin-top:0}#nav-menu-theme-locations .howto select{width:100%}#nav-menu-theme-locations .button-controls{text-align:left}.add-menu-item-view-all{height:400px}#menu-container .submit{margin:0 0 10px;padding:0}.nav-menus-php .meta-sep,.nav-menus-php .submitcancel,.nav-menus-php .submitdelete{display:block;float:right;margin:6px 0;line-height:15px}.meta-sep{padding:0 2px}#cancel-save{text-decoration:underline;margin-right:20px;margin-top:5px}.button-primary.right,.button-secondary.right,.button.right{float:left}.list-controls{float:right;margin-top:5px}.add-to-menu{float:left}.button-controls{clear:both;margin:10px 0}.hide-all,.show-all{cursor:pointer}.hide-all{display:none}#menu-name{width:270px;vertical-align:middle}#manage-menu .inside{padding:0}#available-links dt{display:block}#add-custom-link label span{display:block;float:right;margin-top:5px;padding-left:5px}.menu-item-textbox{width:180px}.customlinkdiv label,.nav-menus-php .howto span{float:right;margin-top:6px}.quick-search{width:190px}.quick-search-wrap .spinner{float:none;margin:-3px 0 0 -10px}.nav-menus-php .list-wrap{display:none;clear:both;margin-bottom:10px}.nav-menus-php .postbox p.submit{margin-bottom:0}.nav-menus-php .list li{display:none;margin:0 0 5px}.nav-menus-php .list li .menu-item-title{cursor:pointer;display:block}.nav-menus-php .list li .menu-item-title input{margin-left:3px;margin-top:-3px}.menu-item-title input[type=checkbox]{display:inline-block;margin-top:-4px}#menu-container .inside{padding-bottom:10px}.menu{padding-top:1em}#menu-to-edit{margin:0;padding:.1em 0}.menu ul{width:100%}.menu li{margin-bottom:0;position:relative}.menu-item-bar{clear:both;line-height:1.5em;position:relative;margin:9px 0 0}.menu-item-bar .menu-item-handle{border:1px solid #ddd;position:relative;padding:10px 15px;height:auto;min-height:20px;width:382px;line-height:30px;overflow:hidden;word-wrap:break-word}.menu-item-bar .menu-item-handle:hover{border-color:#999}#menu-to-edit .menu-item-invalid .menu-item-handle{background:#f6c9cc;border-color:#f1acb1}.no-js .menu-item-edit-active .item-edit{display:none}.js .menu-item-handle{cursor:move}#cancel-save,.item-controls a:hover{cursor:pointer}.menu li.deleting .menu-item-handle{background-image:none;background-color:#f66}.menu-item-handle .item-title{font-size:13px;font-weight:600;line-height:20px;display:block;margin-left:13em}.menu-item-handle .menu-item-title.no-title{color:#72777c}li.menu-item.ui-sortable-helper .menu-item-bar{margin-top:0}li.menu-item.ui-sortable-helper .menu-item-transport .menu-item-bar{margin-top:13px}.menu .sortable-placeholder{height:35px;width:410px;margin-top:13px}.menu-item .menu-item-transport:empty{display:none}.menu-item-depth-0{margin-right:0}.menu-item-depth-1{margin-right:30px}.menu-item-depth-2{margin-right:60px}.menu-item-depth-3{margin-right:90px}.menu-item-depth-4{margin-right:120px}.menu-item-depth-5{margin-right:150px}.menu-item-depth-6{margin-right:180px}.menu-item-depth-7{margin-right:210px}.menu-item-depth-8{margin-right:240px}.menu-item-depth-9{margin-right:270px}.menu-item-depth-10{margin-right:300px}.menu-item-depth-11{margin-right:330px}.menu-item-depth-0 .menu-item-transport{margin-right:0}.menu-item-depth-1 .menu-item-transport{margin-right:-30px}.menu-item-depth-2 .menu-item-transport{margin-right:-60px}.menu-item-depth-3 .menu-item-transport{margin-right:-90px}.menu-item-depth-4 .menu-item-transport{margin-right:-120px}.menu-item-depth-5 .menu-item-transport{margin-right:-150px}.menu-item-depth-6 .menu-item-transport{margin-right:-180px}.menu-item-depth-7 .menu-item-transport{margin-right:-210px}.menu-item-depth-8 .menu-item-transport{margin-right:-240px}.menu-item-depth-9 .menu-item-transport{margin-right:-270px}.menu-item-depth-10 .menu-item-transport{margin-right:-300px}.menu-item-depth-11 .menu-item-transport{margin-right:-330px}body.menu-max-depth-0{min-width:950px!important}body.menu-max-depth-1{min-width:980px!important}body.menu-max-depth-2{min-width:1010px!important}body.menu-max-depth-3{min-width:1040px!important}body.menu-max-depth-4{min-width:1070px!important}body.menu-max-depth-5{min-width:1100px!important}body.menu-max-depth-6{min-width:1130px!important}body.menu-max-depth-7{min-width:1160px!important}body.menu-max-depth-8{min-width:1190px!important}body.menu-max-depth-9{min-width:1220px!important}body.menu-max-depth-10{min-width:1250px!important}body.menu-max-depth-11{min-width:1280px!important}.item-type{display:inline-block;padding:12px 16px;color:#666;font-size:12px;line-height:18px}.item-controls{font-size:12px;position:absolute;left:20px;top:-1px}.item-controls a{text-decoration:none}.item-controls .item-order{padding-left:10px}.nav-menus-php .item-edit{position:absolute;left:-20px;top:0;display:block;width:30px;height:40px;margin-left:0!important;text-indent:100%;outline:0;overflow:hidden;white-space:nowrap}.no-js.nav-menus-php .item-edit{position:static;float:left;width:auto;height:auto;margin-left:-10px!important;padding:12px 0;color:#0073aa;text-decoration:underline;font-size:12px;line-height:18px;text-indent:0}.nav-menus-php .item-edit:before{margin-top:10px;margin-right:4px;width:20px;-webkit-border-radius:50%;border-radius:50%;text-indent:-1px}.no-js.nav-menus-php .item-edit:before{display:none}.rtl .nav-menus-php .item-edit:before{text-indent:1px}.nav-menus-php .item-edit:focus{-webkit-box-shadow:none;box-shadow:none}.nav-menus-php .item-edit:focus:before{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.menu-instructions-inactive{display:none}.menu-item-settings{display:block;width:402px;padding:10px 10px 10px 0;position:relative;z-index:10;border:1px solid #e5e5e5;border-top:none;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.menu-item-settings .field-move a{display:none;margin:0 2px}.menu-item-edit-active .menu-item-settings{display:block}.menu-item-edit-inactive .menu-item-settings{display:none}.add-menu-item-pagelinks{margin:.5em auto;text-align:center}.link-to-original{display:block;margin:0 0 10px;padding:3px 5px 5px;border:1px solid #ddd;color:#72777c;font-size:12px;font-style:italic}.hidden-field,.nav-menus-php .blank-slate .menu-settings{display:none}.link-to-original a{padding-right:4px;font-style:normal}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-left:10px;float:right}.description-thin{width:190px}.description-wide{width:390px}.menu-item-actions{padding-top:15px}.nav-menus-php .major-publishing-actions{clear:both;padding:7px 0 6px}.nav-menus-php .major-publishing-actions .publishing-action{text-align:left;float:left}.nav-menus-php .delete-action{float:right;margin-top:2px}.nav-menus-php .submitbox .submitcancel{border-bottom:1px solid #0073aa;padding:1px 2px;color:#0073aa;text-decoration:none}.nav-menus-php .submitbox .submitcancel:hover{background:#0073aa;color:#fff}.nav-menus-php .major-publishing-actions .form-invalid{padding-right:4px;margin-right:-4px}#menu-item-name-wrap,#menu-item-url-wrap,#nav-menus-frame,.button-controls{display:block}@media only screen and (min-width:769px) and (max-width:1000px){body.menu-max-depth-0{min-width:0!important}#menu-management-liquid{width:100%}.nav-menus-php #post-body-content{min-width:0}.menu-item-bar .menu-item-handle{width:90%}}@media screen and (max-width:782px){body.nav-menus-php{min-width:0!important}#nav-menus-frame{margin-right:0;float:none;width:100%}#wpbody-content #menu-settings-column{display:block;width:100%;float:none;margin-right:0}#side-sortables .add-menu-item-tabs{margin:15px 0 14px}ul.add-menu-item-tabs li.tabs{padding:13px 15px 14px}.nav-menus-php .item-controls .item-type{margin-top:2px}.nav-menus-php .customlinkdiv .howto input{width:65%}.nav-menus-php .quick-search{width:85%}#menu-management-liquid{margin-top:25px}.nav-menus-php .menu-name-label.howto span{margin-top:13px}.menu-name-label #menu-name{margin-top:4px}.nav-menus-php .major-publishing-actions .publishing-action{margin-top:6px}.nav-menus-php .delete-action{font-size:14px;line-height:50px;margin-top:12px}.description-wide,.menu-item-bar .menu-item-handle,.menu-item-settings{width:auto}.menu-item-settings{padding:10px}.menu-item-settings .description-thin,.menu-item-settings .description-wide,.menu-item-settings input{width:100%}.menu-item-settings input[type=checkbox],.menu-item-settings input[type=radio]{width:25px}.menu-settings dl{padding-right:0}.menu-settings dd{float:none;width:100%;margin-bottom:15px}.menu-settings dt{float:none;width:auto;margin-right:0;margin-bottom:15px}.manage-menus select{margin:.5em 0}.widefat .menu-locations .menu-location-title{padding-top:16px}}@media only screen and (max-width:768px){#menu-locations-wrap .widefat{width:100%}}
\ No newline at end of file
index a230d9d541729dd1b6c09d772a2251f204382ca9..2e4ee7cbaee5133dbfeda1c75c6e98608e2128c3 100644 (file)
@@ -6,7 +6,7 @@
 }
 
 ul.add-menu-item-tabs li {
-       padding: 3px 5px 3px 8px;
+       padding: 3px 5px 4px 8px;
 }
 
 .accordion-section ul.category-tabs,
@@ -71,7 +71,7 @@ ul.add-menu-item-tabs li {
 .is-submenu {
        color: #555d66; /* #fafafa background */
        font-style: italic;
-       font-weight: normal;
+       font-weight: 400;
        margin-left: 4px;
 }
 
@@ -215,7 +215,7 @@ ul.add-menu-item-tabs li {
 }
 
 .menu-location-title label {
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .menu-location-menus select {
index de800b0e49a00fae345d4a87ee415479449f26f1..da00a5323ecb640f85b6b49f416c6d08ab4fa79a 100644 (file)
@@ -1 +1 @@
-.no-js #message{display:block}ul.add-menu-item-tabs li{padding:3px 5px 3px 8px}.accordion-section ul.add-menu-item-tabs,.accordion-section ul.category-tabs,.accordion-section ul.wp-tab-bar{margin:0}.accordion-section .categorychecklist{margin:13px 0}#nav-menu-meta .accordion-section-content{padding:18px 13px}#nav-menu-meta .button-controls{margin-bottom:0}#nav-menus-frame{margin-left:300px;margin-top:23px}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-left:-300px;clear:both;float:left;padding-top:0}#menu-settings-column .inside{clear:both;margin:10px 0 0}.metabox-holder-disabled .accordion-section-content,.metabox-holder-disabled .accordion-section-title,.metabox-holder-disabled .postbox{opacity:.5;filter:alpha(opacity=50)}.metabox-holder-disabled .button-controls .select-all{display:none}#wpbody{position:relative}.blank-slate .menu-settings{border:none;margin-top:0;padding-top:0;overflow:hidden}.is-submenu{color:#555d66;font-style:italic;font-weight:400;margin-left:4px}.manage-menus{margin-top:23px;padding:10px;overflow:hidden;background:#fbfbfb}.manage-menus .selected-menu,.manage-menus .submit-btn,.manage-menus select,.nav-menus-php .add-new-menu-action{display:inline-block;margin-right:3px;vertical-align:middle}.manage-menus select,.menu-location-menus select{max-width:100%}.menu-edit #post-body-content h3{margin:1em 0 10px}.menu-settings{border-top:1px solid #eee;margin-top:2em}.menu-settings dl{margin:0 0 10px;overflow:hidden;padding-left:18%}.menu-settings dd{float:left;margin:0;width:100%}.menu-settings dt{float:left;clear:both;width:21.951%;padding:3px 0 0;margin-left:-21.951%}.menu-settings label{vertical-align:baseline}.menu-edit .checkbox-input{margin-top:4px}.theme-location-set{color:#72777c;font-size:11px}#add-custom-link .howto,#cancel-save{font-size:12px}#menu-management-liquid{float:left;min-width:100%;margin-top:3px}#menu-management{position:relative;margin-right:20px;margin-top:-3px;width:100%;background:#f5f5f5}#menu-management .menu-edit{margin-bottom:20px}.nav-menus-php #post-body{padding:0 10px 10px;border-top:1px solid #fff;border-bottom:1px solid #ddd;background:#fff}#nav-menu-footer,#nav-menu-header{padding:0 10px}#nav-menu-header{border-bottom:1px solid #ddd;margin-bottom:0}#nav-menu-header .menu-name-label{display:inline-block;vertical-align:middle;margin-right:7px;font-style:italic}.nav-menus-php #post-body div.error,.nav-menus-php #post-body div.updated{margin:0}.nav-menus-php #post-body-content{position:relative;float:none}#menu-management .menu-add-new abbr{font-weight:600}#select-nav-menu-container{text-align:right;padding:0 10px 3px;margin-bottom:5px}#select-nav-menu{width:100px;display:inline}#menu-name-label{margin-top:-2px}.widefat .menu-locations .menu-location-title{padding:13px 10px 0}.menu-location-title label{font-weight:700}.menu-location-menus select{float:left}#locations-nav-menu-wrapper{padding:5px 0}.locations-nav-menu-select select{float:left;width:160px;margin-right:5px}.locations-row-links{float:left;margin:6px 0 0 6px}.locations-add-menu-link,.locations-edit-menu-link{margin:0 3px}.locations-edit-menu-link{padding-right:3px;border-right:1px solid #ccc}#menu-management .inside{padding:0 10px}.customlinkdiv .menu-item-textbox,.postbox .howto input{width:180px;float:right}.accordion-container .outer-border{margin:0}.customlinkdiv p{margin-top:0}#nav-menu-theme-locations .howto select{width:100%}#nav-menu-theme-locations .button-controls{text-align:right}.add-menu-item-view-all{height:400px}#menu-container .submit{margin:0 0 10px;padding:0}.nav-menus-php .meta-sep,.nav-menus-php .submitcancel,.nav-menus-php .submitdelete{display:block;float:left;margin:6px 0;line-height:15px}.meta-sep{padding:0 2px}#cancel-save{text-decoration:underline;margin-left:20px;margin-top:5px}.button-primary.right,.button-secondary.right,.button.right{float:right}.list-controls{float:left;margin-top:5px}.add-to-menu{float:right}.button-controls{clear:both;margin:10px 0}.hide-all,.show-all{cursor:pointer}.hide-all{display:none}#menu-name{width:270px;vertical-align:middle}#manage-menu .inside{padding:0}#available-links dt{display:block}#add-custom-link label span{display:block;float:left;margin-top:5px;padding-right:5px}.menu-item-textbox{width:180px}.customlinkdiv label,.nav-menus-php .howto span{float:left;margin-top:6px}.quick-search{width:190px}.quick-search-wrap .spinner{float:none;margin:-3px -10px 0 0}.nav-menus-php .list-wrap{display:none;clear:both;margin-bottom:10px}.nav-menus-php .postbox p.submit{margin-bottom:0}.nav-menus-php .list li{display:none;margin:0 0 5px}.nav-menus-php .list li .menu-item-title{cursor:pointer;display:block}.nav-menus-php .list li .menu-item-title input{margin-right:3px;margin-top:-3px}.menu-item-title input[type=checkbox]{display:inline-block;margin-top:-4px}#menu-container .inside{padding-bottom:10px}.menu{padding-top:1em}#menu-to-edit{margin:0;padding:.1em 0}.menu ul{width:100%}.menu li{margin-bottom:0;position:relative}.menu-item-bar{clear:both;line-height:1.5em;position:relative;margin:9px 0 0}.menu-item-bar .menu-item-handle{border:1px solid #ddd;position:relative;padding:10px 15px;height:auto;min-height:20px;width:382px;line-height:30px;overflow:hidden;word-wrap:break-word}.menu-item-bar .menu-item-handle:hover{border-color:#999}#menu-to-edit .menu-item-invalid .menu-item-handle{background:#f6c9cc;border-color:#f1acb1}.no-js .menu-item-edit-active .item-edit{display:none}.js .menu-item-handle{cursor:move}#cancel-save,.item-controls a:hover{cursor:pointer}.menu li.deleting .menu-item-handle{background-image:none;background-color:#f66}.menu-item-handle .item-title{font-size:13px;font-weight:600;line-height:20px;display:block;margin-right:13em}.menu-item-handle .menu-item-title.no-title{color:#72777c}li.menu-item.ui-sortable-helper .menu-item-bar{margin-top:0}li.menu-item.ui-sortable-helper .menu-item-transport .menu-item-bar{margin-top:13px}.menu .sortable-placeholder{height:35px;width:410px;margin-top:13px}.menu-item .menu-item-transport:empty{display:none}.menu-item-depth-0{margin-left:0}.menu-item-depth-1{margin-left:30px}.menu-item-depth-2{margin-left:60px}.menu-item-depth-3{margin-left:90px}.menu-item-depth-4{margin-left:120px}.menu-item-depth-5{margin-left:150px}.menu-item-depth-6{margin-left:180px}.menu-item-depth-7{margin-left:210px}.menu-item-depth-8{margin-left:240px}.menu-item-depth-9{margin-left:270px}.menu-item-depth-10{margin-left:300px}.menu-item-depth-11{margin-left:330px}.menu-item-depth-0 .menu-item-transport{margin-left:0}.menu-item-depth-1 .menu-item-transport{margin-left:-30px}.menu-item-depth-2 .menu-item-transport{margin-left:-60px}.menu-item-depth-3 .menu-item-transport{margin-left:-90px}.menu-item-depth-4 .menu-item-transport{margin-left:-120px}.menu-item-depth-5 .menu-item-transport{margin-left:-150px}.menu-item-depth-6 .menu-item-transport{margin-left:-180px}.menu-item-depth-7 .menu-item-transport{margin-left:-210px}.menu-item-depth-8 .menu-item-transport{margin-left:-240px}.menu-item-depth-9 .menu-item-transport{margin-left:-270px}.menu-item-depth-10 .menu-item-transport{margin-left:-300px}.menu-item-depth-11 .menu-item-transport{margin-left:-330px}body.menu-max-depth-0{min-width:950px!important}body.menu-max-depth-1{min-width:980px!important}body.menu-max-depth-2{min-width:1010px!important}body.menu-max-depth-3{min-width:1040px!important}body.menu-max-depth-4{min-width:1070px!important}body.menu-max-depth-5{min-width:1100px!important}body.menu-max-depth-6{min-width:1130px!important}body.menu-max-depth-7{min-width:1160px!important}body.menu-max-depth-8{min-width:1190px!important}body.menu-max-depth-9{min-width:1220px!important}body.menu-max-depth-10{min-width:1250px!important}body.menu-max-depth-11{min-width:1280px!important}.item-type{display:inline-block;padding:12px 16px;color:#666;font-size:12px;line-height:18px}.item-controls{font-size:12px;position:absolute;right:20px;top:-1px}.item-controls a{text-decoration:none}.item-controls .item-order{padding-right:10px}.nav-menus-php .item-edit{position:absolute;right:-20px;top:0;display:block;width:30px;height:40px;margin-right:0!important;text-indent:100%;outline:0;overflow:hidden;white-space:nowrap}.no-js.nav-menus-php .item-edit{position:static;float:right;width:auto;height:auto;margin-right:-10px!important;padding:12px 0;color:#0073aa;text-decoration:underline;font-size:12px;line-height:18px;text-indent:0}.nav-menus-php .item-edit:before{margin-top:10px;margin-left:4px;width:20px;-webkit-border-radius:50%;border-radius:50%;text-indent:-1px}.no-js.nav-menus-php .item-edit:before{display:none}.rtl .nav-menus-php .item-edit:before{text-indent:1px}.nav-menus-php .item-edit:focus{-webkit-box-shadow:none;box-shadow:none}.nav-menus-php .item-edit:focus:before{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.menu-instructions-inactive{display:none}.menu-item-settings{display:block;width:402px;padding:10px 0 10px 10px;position:relative;z-index:10;border:1px solid #e5e5e5;border-top:none;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.menu-item-settings .field-move a{display:none;margin:0 2px}.menu-item-edit-active .menu-item-settings{display:block}.menu-item-edit-inactive .menu-item-settings{display:none}.add-menu-item-pagelinks{margin:.5em auto;text-align:center}.link-to-original{display:block;margin:0 0 10px;padding:3px 5px 5px;border:1px solid #ddd;color:#72777c;font-size:12px;font-style:italic}.hidden-field,.nav-menus-php .blank-slate .menu-settings{display:none}.link-to-original a{padding-left:4px;font-style:normal}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-right:10px;float:left}.description-thin{width:190px}.description-wide{width:390px}.menu-item-actions{padding-top:15px}.nav-menus-php .major-publishing-actions{clear:both;padding:7px 0 6px}.nav-menus-php .major-publishing-actions .publishing-action{text-align:right;float:right}.nav-menus-php .delete-action{float:left;margin-top:2px}.nav-menus-php .submitbox .submitcancel{border-bottom:1px solid #0073aa;padding:1px 2px;color:#0073aa;text-decoration:none}.nav-menus-php .submitbox .submitcancel:hover{background:#0073aa;color:#fff}.nav-menus-php .major-publishing-actions .form-invalid{padding-left:4px;margin-left:-4px}#menu-item-name-wrap,#menu-item-url-wrap,#nav-menus-frame,.button-controls{display:block}@media only screen and (min-width:769px) and (max-width:1000px){body.menu-max-depth-0{min-width:0!important}#menu-management-liquid{width:100%}.nav-menus-php #post-body-content{min-width:0}.menu-item-bar .menu-item-handle{width:90%}}@media screen and (max-width:782px){body.nav-menus-php{min-width:0!important}#nav-menus-frame{margin-left:0;float:none;width:100%}#wpbody-content #menu-settings-column{display:block;width:100%;float:none;margin-left:0}#side-sortables .add-menu-item-tabs{margin:15px 0 14px}ul.add-menu-item-tabs li.tabs{padding:13px 15px 14px}.nav-menus-php .item-controls .item-type{margin-top:2px}.nav-menus-php .customlinkdiv .howto input{width:65%}.nav-menus-php .quick-search{width:85%}#menu-management-liquid{margin-top:25px}.nav-menus-php .menu-name-label.howto span{margin-top:13px}.menu-name-label #menu-name{margin-top:4px}.nav-menus-php .major-publishing-actions .publishing-action{margin-top:6px}.nav-menus-php .delete-action{font-size:14px;line-height:50px;margin-top:12px}.description-wide,.menu-item-bar .menu-item-handle,.menu-item-settings{width:auto}.menu-item-settings{padding:10px}.menu-item-settings .description-thin,.menu-item-settings .description-wide,.menu-item-settings input{width:100%}.menu-item-settings input[type=checkbox],.menu-item-settings input[type=radio]{width:25px}.menu-settings dl{padding-left:0}.menu-settings dd{float:none;width:100%;margin-bottom:15px}.menu-settings dt{float:none;width:auto;margin-left:0;margin-bottom:15px}.manage-menus select{margin:.5em 0}.widefat .menu-locations .menu-location-title{padding-top:16px}}@media only screen and (max-width:768px){#menu-locations-wrap .widefat{width:100%}}
\ No newline at end of file
+.no-js #message{display:block}ul.add-menu-item-tabs li{padding:3px 5px 4px 8px}.accordion-section ul.add-menu-item-tabs,.accordion-section ul.category-tabs,.accordion-section ul.wp-tab-bar{margin:0}.accordion-section .categorychecklist{margin:13px 0}#nav-menu-meta .accordion-section-content{padding:18px 13px}#nav-menu-meta .button-controls{margin-bottom:0}#nav-menus-frame{margin-left:300px;margin-top:23px}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-left:-300px;clear:both;float:left;padding-top:0}#menu-settings-column .inside{clear:both;margin:10px 0 0}.metabox-holder-disabled .accordion-section-content,.metabox-holder-disabled .accordion-section-title,.metabox-holder-disabled .postbox{opacity:.5;filter:alpha(opacity=50)}.metabox-holder-disabled .button-controls .select-all{display:none}#wpbody{position:relative}.blank-slate .menu-settings{border:none;margin-top:0;padding-top:0;overflow:hidden}.is-submenu{color:#555d66;font-style:italic;font-weight:400;margin-left:4px}#menu-management .menu-add-new abbr,.menu-location-title label{font-weight:600}.manage-menus{margin-top:23px;padding:10px;overflow:hidden;background:#fbfbfb}.manage-menus .selected-menu,.manage-menus .submit-btn,.manage-menus select,.nav-menus-php .add-new-menu-action{display:inline-block;margin-right:3px;vertical-align:middle}.manage-menus select,.menu-location-menus select{max-width:100%}.menu-edit #post-body-content h3{margin:1em 0 10px}.menu-settings{border-top:1px solid #eee;margin-top:2em}.menu-settings dl{margin:0 0 10px;overflow:hidden;padding-left:18%}.menu-settings dd{float:left;margin:0;width:100%}.menu-settings dt{float:left;clear:both;width:21.951%;padding:3px 0 0;margin-left:-21.951%}.menu-settings label{vertical-align:baseline}.menu-edit .checkbox-input{margin-top:4px}.theme-location-set{color:#72777c;font-size:11px}#add-custom-link .howto,#cancel-save{font-size:12px}#menu-management-liquid{float:left;min-width:100%;margin-top:3px}#menu-management{position:relative;margin-right:20px;margin-top:-3px;width:100%;background:#f5f5f5}#menu-management .menu-edit{margin-bottom:20px}.nav-menus-php #post-body{padding:0 10px 10px;border-top:1px solid #fff;border-bottom:1px solid #ddd;background:#fff}#nav-menu-footer,#nav-menu-header{padding:0 10px}#nav-menu-header{border-bottom:1px solid #ddd;margin-bottom:0}#nav-menu-header .menu-name-label{display:inline-block;vertical-align:middle;margin-right:7px;font-style:italic}.nav-menus-php #post-body div.error,.nav-menus-php #post-body div.updated{margin:0}.nav-menus-php #post-body-content{position:relative;float:none}#select-nav-menu-container{text-align:right;padding:0 10px 3px;margin-bottom:5px}#select-nav-menu{width:100px;display:inline}#menu-name-label{margin-top:-2px}.widefat .menu-locations .menu-location-title{padding:13px 10px 0}.menu-location-menus select{float:left}#locations-nav-menu-wrapper{padding:5px 0}.locations-nav-menu-select select{float:left;width:160px;margin-right:5px}.locations-row-links{float:left;margin:6px 0 0 6px}.locations-add-menu-link,.locations-edit-menu-link{margin:0 3px}.locations-edit-menu-link{padding-right:3px;border-right:1px solid #ccc}#menu-management .inside{padding:0 10px}.customlinkdiv .menu-item-textbox,.postbox .howto input{width:180px;float:right}.accordion-container .outer-border{margin:0}.customlinkdiv p{margin-top:0}#nav-menu-theme-locations .howto select{width:100%}#nav-menu-theme-locations .button-controls{text-align:right}.add-menu-item-view-all{height:400px}#menu-container .submit{margin:0 0 10px;padding:0}.nav-menus-php .meta-sep,.nav-menus-php .submitcancel,.nav-menus-php .submitdelete{display:block;float:left;margin:6px 0;line-height:15px}.meta-sep{padding:0 2px}#cancel-save{text-decoration:underline;margin-left:20px;margin-top:5px}.button-primary.right,.button-secondary.right,.button.right{float:right}.list-controls{float:left;margin-top:5px}.add-to-menu{float:right}.button-controls{clear:both;margin:10px 0}.hide-all,.show-all{cursor:pointer}.hide-all{display:none}#menu-name{width:270px;vertical-align:middle}#manage-menu .inside{padding:0}#available-links dt{display:block}#add-custom-link label span{display:block;float:left;margin-top:5px;padding-right:5px}.menu-item-textbox{width:180px}.customlinkdiv label,.nav-menus-php .howto span{float:left;margin-top:6px}.quick-search{width:190px}.quick-search-wrap .spinner{float:none;margin:-3px -10px 0 0}.nav-menus-php .list-wrap{display:none;clear:both;margin-bottom:10px}.nav-menus-php .postbox p.submit{margin-bottom:0}.nav-menus-php .list li{display:none;margin:0 0 5px}.nav-menus-php .list li .menu-item-title{cursor:pointer;display:block}.nav-menus-php .list li .menu-item-title input{margin-right:3px;margin-top:-3px}.menu-item-title input[type=checkbox]{display:inline-block;margin-top:-4px}#menu-container .inside{padding-bottom:10px}.menu{padding-top:1em}#menu-to-edit{margin:0;padding:.1em 0}.menu ul{width:100%}.menu li{margin-bottom:0;position:relative}.menu-item-bar{clear:both;line-height:1.5em;position:relative;margin:9px 0 0}.menu-item-bar .menu-item-handle{border:1px solid #ddd;position:relative;padding:10px 15px;height:auto;min-height:20px;width:382px;line-height:30px;overflow:hidden;word-wrap:break-word}.menu-item-bar .menu-item-handle:hover{border-color:#999}#menu-to-edit .menu-item-invalid .menu-item-handle{background:#f6c9cc;border-color:#f1acb1}.no-js .menu-item-edit-active .item-edit{display:none}.js .menu-item-handle{cursor:move}#cancel-save,.item-controls a:hover{cursor:pointer}.menu li.deleting .menu-item-handle{background-image:none;background-color:#f66}.menu-item-handle .item-title{font-size:13px;font-weight:600;line-height:20px;display:block;margin-right:13em}.menu-item-handle .menu-item-title.no-title{color:#72777c}li.menu-item.ui-sortable-helper .menu-item-bar{margin-top:0}li.menu-item.ui-sortable-helper .menu-item-transport .menu-item-bar{margin-top:13px}.menu .sortable-placeholder{height:35px;width:410px;margin-top:13px}.menu-item .menu-item-transport:empty{display:none}.menu-item-depth-0{margin-left:0}.menu-item-depth-1{margin-left:30px}.menu-item-depth-2{margin-left:60px}.menu-item-depth-3{margin-left:90px}.menu-item-depth-4{margin-left:120px}.menu-item-depth-5{margin-left:150px}.menu-item-depth-6{margin-left:180px}.menu-item-depth-7{margin-left:210px}.menu-item-depth-8{margin-left:240px}.menu-item-depth-9{margin-left:270px}.menu-item-depth-10{margin-left:300px}.menu-item-depth-11{margin-left:330px}.menu-item-depth-0 .menu-item-transport{margin-left:0}.menu-item-depth-1 .menu-item-transport{margin-left:-30px}.menu-item-depth-2 .menu-item-transport{margin-left:-60px}.menu-item-depth-3 .menu-item-transport{margin-left:-90px}.menu-item-depth-4 .menu-item-transport{margin-left:-120px}.menu-item-depth-5 .menu-item-transport{margin-left:-150px}.menu-item-depth-6 .menu-item-transport{margin-left:-180px}.menu-item-depth-7 .menu-item-transport{margin-left:-210px}.menu-item-depth-8 .menu-item-transport{margin-left:-240px}.menu-item-depth-9 .menu-item-transport{margin-left:-270px}.menu-item-depth-10 .menu-item-transport{margin-left:-300px}.menu-item-depth-11 .menu-item-transport{margin-left:-330px}body.menu-max-depth-0{min-width:950px!important}body.menu-max-depth-1{min-width:980px!important}body.menu-max-depth-2{min-width:1010px!important}body.menu-max-depth-3{min-width:1040px!important}body.menu-max-depth-4{min-width:1070px!important}body.menu-max-depth-5{min-width:1100px!important}body.menu-max-depth-6{min-width:1130px!important}body.menu-max-depth-7{min-width:1160px!important}body.menu-max-depth-8{min-width:1190px!important}body.menu-max-depth-9{min-width:1220px!important}body.menu-max-depth-10{min-width:1250px!important}body.menu-max-depth-11{min-width:1280px!important}.item-type{display:inline-block;padding:12px 16px;color:#666;font-size:12px;line-height:18px}.item-controls{font-size:12px;position:absolute;right:20px;top:-1px}.item-controls a{text-decoration:none}.item-controls .item-order{padding-right:10px}.nav-menus-php .item-edit{position:absolute;right:-20px;top:0;display:block;width:30px;height:40px;margin-right:0!important;text-indent:100%;outline:0;overflow:hidden;white-space:nowrap}.no-js.nav-menus-php .item-edit{position:static;float:right;width:auto;height:auto;margin-right:-10px!important;padding:12px 0;color:#0073aa;text-decoration:underline;font-size:12px;line-height:18px;text-indent:0}.nav-menus-php .item-edit:before{margin-top:10px;margin-left:4px;width:20px;-webkit-border-radius:50%;border-radius:50%;text-indent:-1px}.no-js.nav-menus-php .item-edit:before{display:none}.rtl .nav-menus-php .item-edit:before{text-indent:1px}.nav-menus-php .item-edit:focus{-webkit-box-shadow:none;box-shadow:none}.nav-menus-php .item-edit:focus:before{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.menu-instructions-inactive{display:none}.menu-item-settings{display:block;width:402px;padding:10px 0 10px 10px;position:relative;z-index:10;border:1px solid #e5e5e5;border-top:none;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.menu-item-settings .field-move a{display:none;margin:0 2px}.menu-item-edit-active .menu-item-settings{display:block}.menu-item-edit-inactive .menu-item-settings{display:none}.add-menu-item-pagelinks{margin:.5em auto;text-align:center}.link-to-original{display:block;margin:0 0 10px;padding:3px 5px 5px;border:1px solid #ddd;color:#72777c;font-size:12px;font-style:italic}.hidden-field,.nav-menus-php .blank-slate .menu-settings{display:none}.link-to-original a{padding-left:4px;font-style:normal}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-right:10px;float:left}.description-thin{width:190px}.description-wide{width:390px}.menu-item-actions{padding-top:15px}.nav-menus-php .major-publishing-actions{clear:both;padding:7px 0 6px}.nav-menus-php .major-publishing-actions .publishing-action{text-align:right;float:right}.nav-menus-php .delete-action{float:left;margin-top:2px}.nav-menus-php .submitbox .submitcancel{border-bottom:1px solid #0073aa;padding:1px 2px;color:#0073aa;text-decoration:none}.nav-menus-php .submitbox .submitcancel:hover{background:#0073aa;color:#fff}.nav-menus-php .major-publishing-actions .form-invalid{padding-left:4px;margin-left:-4px}#menu-item-name-wrap,#menu-item-url-wrap,#nav-menus-frame,.button-controls{display:block}@media only screen and (min-width:769px) and (max-width:1000px){body.menu-max-depth-0{min-width:0!important}#menu-management-liquid{width:100%}.nav-menus-php #post-body-content{min-width:0}.menu-item-bar .menu-item-handle{width:90%}}@media screen and (max-width:782px){body.nav-menus-php{min-width:0!important}#nav-menus-frame{margin-left:0;float:none;width:100%}#wpbody-content #menu-settings-column{display:block;width:100%;float:none;margin-left:0}#side-sortables .add-menu-item-tabs{margin:15px 0 14px}ul.add-menu-item-tabs li.tabs{padding:13px 15px 14px}.nav-menus-php .item-controls .item-type{margin-top:2px}.nav-menus-php .customlinkdiv .howto input{width:65%}.nav-menus-php .quick-search{width:85%}#menu-management-liquid{margin-top:25px}.nav-menus-php .menu-name-label.howto span{margin-top:13px}.menu-name-label #menu-name{margin-top:4px}.nav-menus-php .major-publishing-actions .publishing-action{margin-top:6px}.nav-menus-php .delete-action{font-size:14px;line-height:50px;margin-top:12px}.description-wide,.menu-item-bar .menu-item-handle,.menu-item-settings{width:auto}.menu-item-settings{padding:10px}.menu-item-settings .description-thin,.menu-item-settings .description-wide,.menu-item-settings input{width:100%}.menu-item-settings input[type=checkbox],.menu-item-settings input[type=radio]{width:25px}.menu-settings dl{padding-left:0}.menu-settings dd{float:none;width:100%;margin-bottom:15px}.menu-settings dt{float:none;width:auto;margin-left:0;margin-bottom:15px}.manage-menus select{margin:.5em 0}.widefat .menu-locations .menu-location-title{padding-top:16px}}@media only screen and (max-width:768px){#menu-locations-wrap .widefat{width:100%}}
\ No newline at end of file
index 90d8cdcf50512decebdbfed1c7c98142609e5429..9aa4e9300f0fcc6354a8372d9ec2ccd0dcd45b3d 100644 (file)
@@ -77,7 +77,7 @@ object {
 */
 body {
        color: #404040;
-       font-family: "Open Sans", Helvetica, Arial, sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        font-size: 20px;
        font-weight: 400;
        line-height: 1.6;
index 2bb1662a7d87f3bb4c698880cff5d2879ad68ba6..ef01fe0a5425068be03535275f505835a5539053 100644 (file)
@@ -1 +1 @@
-embed,iframe,img,object{max-width:100%}a,a:visited{color:#0073aa}a:active,a:focus,a:hover{color:#00a0d2}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-right:1.5em}dt{font-weight:700}dd{margin:0 1.5em 1.5em}img{height:auto}body{color:#404040;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:20px;font-weight:400;line-height:1.6}@media (max-width:640px){body{font-size:16px}}@media (max-width:320px){body{margin:0 15px}}#tinymce b,#tinymce strong{font-weight:700!important}blockquote{margin:1em 1.5em;color:#9ea7af;font-size:em(25px);font-style:italic}@media (max-width:900px){body#tinymce{padding-top:30px!important}blockquote{margin:1.5em 1em}}ol,ul{margin:0 .75em 1.5em 0}
\ No newline at end of file
+embed,iframe,img,object{max-width:100%}a,a:visited{color:#0073aa}a:active,a:focus,a:hover{color:#00a0d2}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-right:1.5em}dt{font-weight:700}dd{margin:0 1.5em 1.5em}img{height:auto}body{color:#404040;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:20px;font-weight:400;line-height:1.6}@media (max-width:640px){body{font-size:16px}}@media (max-width:320px){body{margin:0 15px}}#tinymce b,#tinymce strong{font-weight:700!important}blockquote{margin:1em 1.5em;color:#9ea7af;font-size:em(25px);font-style:italic}@media (max-width:900px){body#tinymce{padding-top:30px!important}blockquote{margin:1.5em 1em}}ol,ul{margin:0 .75em 1.5em 0}
\ No newline at end of file
index 96ff42616814a6b58d0d0080cd8ab7410ed78b76..8e10d86d554a03772bbf6803d4d186b3d7b16d61 100644 (file)
@@ -77,7 +77,7 @@ object {
 */
 body {
        color: #404040;
-       font-family: "Open Sans", Helvetica, Arial, sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        font-size: 20px;
        font-weight: 400;
        line-height: 1.6;
index c840de57b97305b2fd1b15c74d75fc8af4749a7f..e1f6031b0e8510d3615f0692513a2975c86ab050 100644 (file)
@@ -1 +1 @@
-embed,iframe,img,object{max-width:100%}a,a:visited{color:#0073aa}a:active,a:focus,a:hover{color:#00a0d2}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-left:1.5em}dt{font-weight:700}dd{margin:0 1.5em 1.5em}img{height:auto}body{color:#404040;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:20px;font-weight:400;line-height:1.6}@media (max-width:640px){body{font-size:16px}}@media (max-width:320px){body{margin:0 15px}}#tinymce b,#tinymce strong{font-weight:700!important}blockquote{margin:1em 1.5em;color:#9ea7af;font-size:em(25px);font-style:italic}@media (max-width:900px){body#tinymce{padding-top:30px!important}blockquote{margin:1.5em 1em}}ol,ul{margin:0 0 1.5em .75em}
\ No newline at end of file
+embed,iframe,img,object{max-width:100%}a,a:visited{color:#0073aa}a:active,a:focus,a:hover{color:#00a0d2}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-left:1.5em}dt{font-weight:700}dd{margin:0 1.5em 1.5em}img{height:auto}body{color:#404040;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:20px;font-weight:400;line-height:1.6}@media (max-width:640px){body{font-size:16px}}@media (max-width:320px){body{margin:0 15px}}#tinymce b,#tinymce strong{font-weight:700!important}blockquote{margin:1em 1.5em;color:#9ea7af;font-size:em(25px);font-style:italic}@media (max-width:900px){body#tinymce{padding-top:30px!important}blockquote{margin:1.5em 1em}}ol,ul{margin:0 0 1.5em .75em}
\ No newline at end of file
index 7caf0c4a0478664af24e40a905b942756e70e3fc..2c471494dea7b73a2670d9b73a3bd00f4d0836cc 100644 (file)
@@ -81,7 +81,7 @@ abbr[title] {
 
 b,
 strong {
-       font-weight: bold;
+       font-weight: 700;
 }
 
 dfn {
@@ -232,7 +232,7 @@ textarea {
 }
 
 optgroup {
-       font-weight: bold;
+       font-weight: 700;
 }
 
 table {
@@ -294,7 +294,7 @@ input,
 select,
 textarea {
        color: #404040;
-       font-family: "Open Sans", Helvetica, Arial, sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        font-size: 20px;
        font-weight: 400;
        line-height: 1.6;
@@ -2072,7 +2072,7 @@ html {
        display: inline-block;
        margin: 0 8px 0 0;
        font-size: 14px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .setting-modal {
index e0b495a00734e91be175e00bf2e842fdc2e5fd4d..07be2b99996a79502526ebf1acc89ee2c57cd22c 100644 (file)
@@ -1 +1 @@
-body,fieldset{margin:0}.screen-reader-text,fieldset,legend,td,th{padding:0}.current-site,.post-options .post-option,.postform{text-overflow:ellipsis;white-space:nowrap}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi){*,:after,:before{-webkit-font-smoothing:antialiased}}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}fieldset,img,legend{border:0}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}::-webkit-input-placeholder{color:#72777c}::-moz-placeholder{color:#72777c;opacity:1}:-ms-input-placeholder{color:#72777c}.clearfix:after,.clearfix:before{content:"";display:table}.clearfix:after{clear:both}.hide-if-js{display:none}.screen-reader-text{position:absolute;margin:-1px;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}body,button,input,select,textarea{color:#404040;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:20px;font-weight:400;line-height:1.6}b,dt,strong{font-weight:700}h1,h2,h3,h4,h5,h6{clear:both}p{margin-bottom:1.5em}.scan-submit{display:inline-block;margin:0;text-decoration:none;white-space:nowrap;cursor:pointer;-webkit-appearance:none}.split-button{position:relative;display:inline-block;vertical-align:middle}.split-button-body{display:none;position:absolute;bottom:39px;left:0;border:1px solid #ddd;background-color:#fff;min-width:180px;max-width:100%;margin:0;padding:8px;list-style:none;-webkit-box-shadow:-1px 0 4px rgba(0,0,0,.15);box-shadow:-1px 0 4px rgba(0,0,0,.15)}.split-button-body:after,.split-button-body:before{position:absolute;left:12px;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.split-button-body:before{bottom:-18px;border-top-color:#ccc;border-width:9px;left:11px}.split-button-body:after{bottom:-16px;border-top-color:#fff;border-width:8px}.split-button-body .split-button-option{display:block;padding:5px 15px;margin:0;width:100%;text-align:right;line-height:2}.is-open .split-button-body{display:block}.split-button-primary,.split-button-toggle{-webkit-border-radius:0;border-radius:0;display:block;margin:0;font-size:13px;text-decoration:none;white-space:nowrap;cursor:pointer;-webkit-appearance:none;line-height:2;padding:0 10px 1px;background:#0085ba;border-color:#0073aa #006799 #006799;border-width:1px;border-style:solid;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-shadow:0 -1px 1px #006799,-1px 0 1px #006799,0 1px 1px #006799,1px 0 1px #006799}.split-button-primary{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;border-left:0 none;float:right}.split-button-toggle{padding:0;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border-right:1px solid #006799;float:left}.split-button-toggle i{margin:4px 0 3px 20px;padding:0 10px}.split-button-primary:hover,.split-button-toggle:hover{outline:0;background:#008ec2;border-color:#006799}.split-button-primary:focus,.split-button-toggle:focus{outline:0;-webkit-box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db;box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db}.split-button-primary:active,.split-button-toggle:active{background:#0073aa;border-color:#006799;-webkit-box-shadow:inset 0 2px 10px #006799,0 1px 0 #0073aa;box-shadow:inset 0 2px 10px #006799,0 1px 0 #0073aa}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.postform,textarea{vertical-align:top}[type=checkbox],[type=radio]{padding:0}[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}[type=email],[type=url],[type=password],[type=search],[type=text],textarea{padding:.4em .75em;color:#32373c;border:1px solid #ccc}[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=search]:focus,[type=text]:focus,textarea:focus{color:#32373c;outline:0}textarea{overflow:auto;padding-right:3px}a,a:visited{color:#0073aa}a:active,a:focus,a:hover{color:#00a0d2}ol,ul{margin:0 3em 1.5em 0}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-right:1.5em}dd{margin:0 1.5em 1.5em}#post-formats-select br{display:none}.post-format{width:1px;height:1px;position:absolute;top:-9999px}.lt-ie9 .post-format{margin:17px 13px 0 12px;position:static;top:auto;float:right;width:16px;height:16px}.add-category,.post-format-icon,.tagsdiv .ajaxtag,.tagsdiv .newtag{position:relative}.post-format-icon{display:block;padding:13px 13px 14px 2px;cursor:pointer}.post-format-icon:after,.post-format-icon:before{content:"";display:inline-block;width:20px;height:20px;margin-left:10px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;color:#9ea7af;font-weight:400;font-style:normal;vertical-align:top;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon:before{content:"\f109"}.post-format-icon:after{display:none;content:"\f147";float:left}.post-format:checked+.post-format-icon{-webkit-box-shadow:inset -6px 0 0 #00a0d2;box-shadow:inset -6px 0 0 #00a0d2;background:rgba(46,162,204,.1)}.post-format:checked+.post-format-icon:after,.post-format:checked+.post-format-icon:before{color:#32373c}.post-format:focus+.post-format-icon{background:#00a0d2;color:#fff}.post-format:focus+.post-format-icon:after,.post-format:focus+.post-format-icon:before{color:#fff}.post-format:checked+.post-format-icon:after{display:block}.lt-ie9 .post-format-icon{margin-right:16px}.post-format-aside:before{content:"\f123"}.post-format-image:before{content:"\f128"}.post-format-video:before{content:"\f126"}.post-format-audio:before{content:"\f127"}.post-format-quote:before{content:"\f122"}.post-format-link:before{content:"\f103"}.post-format-gallery:before{content:"\f161"}.tagsdiv p{margin:0}.tagsdiv .newtag{display:block;padding:11px 16px 11px 58px;width:100%;border:0;border-bottom:1px solid #e5e5e5;font-size:16px}.tagsdiv .tagadd{position:absolute;top:0;left:0;bottom:1px;border:0;-webkit-border-radius:0;border-radius:0;margin:0;padding:0 16px;background:#f7f7f7;border-right:1px solid #f1f1f1;-webkit-box-shadow:none;box-shadow:none}.tagsdiv .tagadd:active,.tagsdiv .tagadd:focus,.tagsdiv .tagadd:hover{outline:0;background:#2991b7;border-color:#20708e;color:#fff;-webkit-box-shadow:none;box-shadow:none}.tagsdiv .howto{color:#727272;font-style:italic;margin:10px 16px 6px 0}.ac_results{padding:0;margin:-1px -1px 0 0;list-style:none;position:absolute;z-index:10000;display:none;border:1px solid #d8d8d8;background-color:#fff;font-size:14px}.ac_results li{padding:6px 16px;white-space:nowrap;text-align:right}.ac_results .ac_over{background-color:#00a0d2;color:#fff;cursor:pointer}.ac_match{text-decoration:underline}.tagchecklist{padding:16px 28px 5px}.tagchecklist:after,.tagchecklist:before{content:"";display:table}.tagchecklist:after{clear:both}.tagchecklist span{display:block;margin-left:25px;float:right;font-size:13px;line-height:1.8;white-space:nowrap;cursor:default}@media (max-width:600px){.tagchecklist span{margin-bottom:15px;font-size:16px;line-height:1.3}}.tagchecklist .ntdelbutton{margin:1px -17px 0 0;cursor:pointer;width:20px;height:20px;display:block;float:right;text-indent:0;overflow:hidden;position:absolute;outline:0}.tagchecklist .ntdelbutton:before{content:"\f153";display:block;margin:2px 0;height:20px;width:20px;background:100% 0;color:#9ea7af;font:400 16px/1 dashicons;text-align:center;speak:none;-webkit-font-smoothing:antialiased}.tagchecklist .ntdelbutton:focus:before{color:#00a0d2}.tagsdiv+p{margin:0}.press-this .tagcloud-link{display:block;margin:0 16px 5px;padding:0;text-decoration:none;outline:0}.tagcloud-link:focus{text-decoration:underline}.popular-tags{border:none;line-height:2em;padding:8px 12px 12px;text-align:justify}.popular-tags a{padding:0 3px}.the-tagcloud{margin:0;padding:16px}.the-tagcloud a{text-decoration:none;outline:0}.the-tagcloud a:focus{text-decoration:underline}.tagcloud h3{margin:2px 0 12px}.add-category-name,input[type=search].categories-search{display:block;width:100%;padding:.85714em 1.07143em;border:0;-webkit-border-radius:0;border-radius:0;border-bottom:1px solid #e5e5e5;font-size:14px;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (max-width:600px){.add-category-name,input[type=search].categories-search{font-size:16px}}.press-this .add-cat-toggle{float:left;margin-top:-45px;line-height:20px;padding:12px 10px 8px;color:#0073aa}.press-this .add-cat-toggle:focus{text-decoration:none;color:#00a0d2}.press-this .add-cat-toggle.is-toggled{padding:10px}.press-this .add-cat-toggle.is-toggled .dashicons:before{content:"\f179"}.add-category{border-bottom:1px solid #e5e5e5}.add-category.is-hidden{display:none}.add-category .add-cat-submit{position:absolute;top:0;left:0;border:0;-webkit-border-radius:0;border-radius:0;padding:12px 16px;background:#f7f7f7;border-right:1px solid #f1f1f1}.add-category .add-cat-submit:active,.add-category .add-cat-submit:focus,.add-category .add-cat-submit:hover{outline:0;background:#2991b7;border-color:#20708e;color:#fff}.postform-wrapper{padding:12px}.postform{display:block;margin:0;width:100%;height:34px;-webkit-border-radius:0;border-radius:0;border:1px solid #e5e5e5;background:#fff;-webkit-background-size:20px 20px;background-size:20px 20px;overflow:hidden;line-height:21px;text-decoration:none;cursor:pointer;outline:0}.postform:focus{border-color:#0073aa;-webkit-box-shadow:0 0 0 3px #00a0d2;box-shadow:0 0 0 3px #00a0d2;outline:0;-moz-outline:none;-moz-user-focus:ignore}.alert,.scan{border-bottom:1px solid #e5e5e5}.postform::-ms-expand{display:none}.postform::-ms-value{background:0 0;color:#727272}.postform:-moz-focusring{color:transparent;text-shadow:0 0 0 #727272}.categories-select,.categories-select ul{margin:0;padding:0;list-style:none}.category{position:relative;display:block;padding:13px 16px 14px;cursor:pointer;background:#fff}.category.selected:focus,.category:focus{outline:0;background:#00a0d2;color:#fff}.category.selected{-webkit-box-shadow:inset -6px 0 0 #00a0d2;box-shadow:inset -6px 0 0 #00a0d2;background:#E9F5F9}.category.selected:after{display:inline-block;content:"\f147";position:absolute;top:13px;left:0;width:20px;height:20px;margin-left:10px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;color:#23282d;font-weight:400;font-style:normal;vertical-align:top;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.category.selected:focus:after{color:#fff}.categories-select ul .category{padding-right:24px}.categories-select ul ul .category{padding-right:32px}.categories-select ul ul ul .category{padding-right:40px}.categories-select ul ul ul ul .category{padding-right:48px}.categories-select ul ul ul ul ul .category{padding-right:56px}.categories-select ul ul ul ul ul ul .category{padding-right:64px}.categories-select .is-hidden{display:none}.categories-select .is-hidden.searched-parent{display:block}.categories-search-wrapper{position:relative}.categories-search-wrapper.is-hidden{display:none}.categories-search-wrapper label{position:absolute;top:50%;left:10px;margin-top:-10px;color:#9ea7af}html{overflow:auto;background:#fff;-webkit-box-shadow:10px 0 0 rgba(0,0,0,.3);box-shadow:10px 0 0 rgba(0,0,0,.3)}body{overflow-x:hidden;height:100%}@media (max-width:900px){body{font-size:16px}}@media (max-width:320px){body{font-size:14px}}.lt-ie9{overflow:visible}.adminbar{position:relative;width:100%;padding:0 .8em;min-height:3.2em;background:#23282d;color:#fff;z-index:9999}.adminbar:after,.adminbar:before{content:"";display:table}.adminbar:after{clear:both}.adminbar .dashicons{color:#a0a5aa}.press-this .adminbar button{position:absolute;top:50%;left:6px;margin-top:-13px;padding:0 10px 1px;font-size:13px}.current-site{margin-top:.5625em;font-size:16px;line-height:44px;font-weight:400;overflow:hidden}@media (max-width:600px){.current-site{margin:3px 0 0}}.current-site-link{text-decoration:none}.current-site-link:focus{outline:0}.current-site-link:focus .current-site-name{text-decoration:underline}.current-site-name{color:#ededed}@media (max-width:320px){.adminbar{min-height:45px}.current-site{margin:0;font-size:14px}.current-site-name{font-weight:600}}.current-site .dashicons-wordpress{position:relative;top:-1px;margin-left:10px;vertical-align:middle}.options,.options.closed .on-open,.options.open .on-closed{display:none}@media (max-width:900px){.options{display:block}.scan form{-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.scan.is-hidden form{opacity:.2;pointer-events:none}}.options-panel-back.is-hidden{display:none}.options:focus .dashicons{color:#fff;text-decoration:none}.options .dashicons{margin-top:3px}.options{color:#00a0d2}.alert{position:relative;margin:0;padding:16px 50px;font-size:14px}.alert:before{content:"";position:absolute;top:50%;right:30px;width:8px;height:8px;margin-top:-4px;-webkit-border-radius:50%;border-radius:50%;background:#00a0d2}@media (max-width:600px){.alert{padding:16px 35px}.alert:before{right:15px}}.alert.is-error:before{background:red}.scan{position:relative}.scan-url{display:block;border:0;padding:.85714em 1.07143em;font-size:14px;width:100%}@media (max-width:600px){.scan-url{font-size:16px}}.scan-submit{position:absolute;top:0;left:0;bottom:0;padding:0 1.07143em;background:#f7f7f7;border:0;border-right:1px solid #f1f1f1;-webkit-border-radius:0;border-radius:0;color:#555;font-size:14px;line-height:1.6}.scan-submit:focus,.scan-submit:hover{background:#008ec2;border-color:#006799;color:#fff;outline:0}.scan-submit:active{background:#0073aa;border-color:#006799;color:#fff}.scan-submit:visited{color:#555}.wrapper{position:relative;margin-bottom:60px;margin-left:320px}.wrapper:after,.wrapper:before{content:"";display:table}.wrapper:after{clear:both}@media (max-width:900px){.wrapper{margin:0;width:100%}}.editor-wrapper{overflow:auto;float:right;width:100%}.editor-wrapper:after,.editor-wrapper:before{content:"";display:table}.editor-wrapper:after{clear:both}.editor{padding:0 1.5em 4.75em;max-width:700px;margin:0 auto}.spinner{height:20px;width:20px;display:inline-block;visibility:hidden;background:url(../images/spinner.gif) center no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;opacity:.7;filter:alpha(opacity=70);line-height:1;vertical-align:middle}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.spinner{background-image:url(../images/spinner-2x.gif)}}.spinner.is-active{visibility:visible}@media (min-width:901px){.editor{max-width:760px}}@media (max-width:320px){.editor{padding:0}}.post-title,.post-title-placeholder{margin:0;padding:.83em 0;width:100%;border-bottom:1px solid #e5e5e5;font-size:32px;line-height:1.4;font-weight:700}.post-title-placeholder:active,.post-title-placeholder:focus,.post-title:active,.post-title:focus{outline:0;-webkit-box-shadow:inset 0 -3px 0 #00a0d2;box-shadow:inset 0 -3px 0 #00a0d2;border-color:#00a0d2}@media (max-width:900px){.post-title,.post-title-placeholder{font-size:24px}}@media (max-height:400px){.post-title,.post-title-placeholder{padding:15px 0;font-size:16px}}@media (max-width:320px){.post-title,.post-title-placeholder{font-size:16px;font-weight:600;padding:1.14286em 1.42857em}}.post-title{background:url(data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///////wAAACH5BAEHAAIALAAAAAABAAEAAAICVAEAOw==);background:0 0,none}.post-title:before{content:"\a0";display:inline-block;width:0;speak:none}.post-title-placeholder{position:absolute;border:0;color:#82878c;z-index:-1}.post-title-placeholder.is-hidden{display:none}.media-list-container{position:relative;padding:2px 0;border-bottom:1px solid #e5e5e5;display:none}.media-list-inner-container{overflow:auto;max-height:150px;max-height:40vw}.media-list-container.has-media{display:block}.media-list-inner-container:after,.media-list-inner-container:before{content:"";display:table}.media-list-inner-container:after{clear:both}.media-list{margin:0;padding:0}@media (min-width:321px){.media-list-inner-container{max-height:250px;max-height:40vw}}.wppt-all-media-list{list-style:none;margin:0;padding:0}.is-embed:focus,.suggested-media-thumbnail:focus{outline:0;-webkit-box-shadow:inset 0 0 0 3px #00a0d2;box-shadow:inset 0 0 0 3px #00a0d2}.suggested-media-thumbnail{position:relative;display:block;float:right;width:16.66%;padding:16.66% 16.66% 0 0;background-position:center;background-repeat:no-repeat;-webkit-background-size:cover;background-size:cover;background-color:#d8d8d8;color:#fff;color:rgba(255,255,255,.6);cursor:pointer}.suggested-media-thumbnail:active,.suggested-media-thumbnail:focus,.suggested-media-thumbnail:hover{color:#fff}.suggested-media-thumbnail:after,.suggested-media-thumbnail:before{display:inline-block;position:absolute;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.suggested-media-thumbnail:before{right:50%;top:50%;margin:-20px -20px 0 0;font-size:40px}.suggested-media-thumbnail:after{content:"\f132";left:3%;bottom:2%}@media (min-width:601px){.media-list-inner-container{max-height:200px;max-height:18.75vw}.suggested-media-thumbnail{width:12.5%;padding:12.5% 12.5% 0 0}}.is-embed:before{content:"\f104";color:#fff;color:rgba(255,255,255,.9)}.is-embed.is-audio:active:before,.is-embed.is-audio:focus:before,.is-embed.is-audio:hover:before,.is-embed.is-tweet:active:before,.is-embed.is-tweet:focus:before,.is-embed.is-tweet:hover:before{color:#fff}.is-embed.is-video{background-color:#23282d}.is-embed.is-video:active:before,.is-embed.is-video:focus:before,.is-embed.is-video:hover:before{color:rgba(255,255,255,.2)}.is-embed.is-video:before{content:"\f236"}.is-embed.is-audio{background-color:#ff7d44}.is-embed.is-audio:before{content:"\f127"}.is-embed.is-tweet{background-color:#55acee}.is-embed.is-tweet:before{content:"\f301"}.no-media{margin:0;padding:0;border:0}.press-this-actions{position:fixed;bottom:0;right:0;width:100%;background:#f1f1f1;background:rgba(241,241,241,.9);border-top:1px solid #e5e5e5}.add-media{float:right;margin:14px 30px 14px 0;font-size:0}@media (max-width:320px){.add-media{margin:10px 10px 10px 0}}.insert-media{color:#9ea7af;float:right;margin:0;padding:0;border:0;border-left:1px solid #e5e5e5;-webkit-border-radius:0;border-radius:0;background:0 0;-webkit-box-shadow:none;box-shadow:none;overflow:hidden}.insert-media:active,.insert-media:focus,.insert-media:hover{margin:0;background:0 0;border-color:#e5e5e5;color:#23282d}.insert-media:active,.insert-media:focus{outline:0;color:#00a0d2;text-decoration:none}.insert-media .dashicons{padding:11px;width:63px;height:58px;font-size:40px}@media (max-width:320px){.insert-media .dashicons{width:55px;height:49px;padding:14px;font-size:20px}}#wp-link-wrap,.post-actions{font-size:13px}.post-actions{float:left;margin:14px 0 14px 30px}@media (max-width:320px){.post-actions{margin:10px 0 10px 10px}}.publish-button .saving-draft,.publish-button.is-saving .publish{display:none}.publish-button.is-saving .saving-draft{display:inline}.editor .wp-media-buttons{float:none}.editor div.mce-toolbar-grp{padding:.71429em 0;background:0 0;border:0}@media (max-height:400px),(max-width:320px){.editor div.mce-toolbar-grp{padding:0}}.mce-stack-layout:after,.mce-stack-layout:before{content:"";display:table}.mce-stack-layout:after{clear:both}.mce-container.mce-toolbar{float:right}.mce-container.mce-toolbar:nth-child(2){float:left}@media (max-width:600px){.mce-first .mce-btn:nth-child(3),.mce-first .mce-btn:nth-child(4){position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.mce-first .mce-btn:nth-child(3):focus,.mce-first .mce-btn:nth-child(4):focus{position:static;margin:1px;padding:inherit;height:auto;width:auto;overflow:visible;clip:auto;border:1px solid #999}}#wp-link-wrap input[type=text]{padding:3px 5px;margin:1px}@media screen and (max-width:782px){#wp-link-wrap{font-size:14px}#wp-link-wrap input[type=text]{padding:6px 10px}}#wp-link-wrap .howto{color:#666;font-style:italic}.options-panel{position:relative;float:left;margin-left:-320px;width:320px;border-right:1px solid #e5e5e5;font-size:14px;-webkit-box-shadow:-5001px 5000px 0 5000px #fff,-5000px 5000px 0 5000px #e5e5e5;box-shadow:-5001px 5000px 0 5000px #fff,-5000px 5000px 0 5000px #e5e5e5;outline:0}.options-panel-back{position:absolute;top:0;left:0;bottom:0;width:320px;outline:0}@media (max-width:900px){.press-this-actions{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.press-this-actions.is-hidden{-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%)}.options-panel{background:#fff;-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.options-panel.is-hidden{visibility:hidden}.options-panel.is-off-screen{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}@media (max-width:320px){.options-panel{margin-left:-100%;width:100%;border:0;-webkit-box-shadow:-5001px 5000px 0 5000px #fff;box-shadow:-5001px 5000px 0 5000px #fff}.options-panel-back{width:100%}}.post-options{background:#fff;position:absolute;left:0;width:100%;overflow-x:hidden}.post-options .post-option-contents{margin-right:3px;color:#32373c}.post-option-forward:before{position:absolute;top:50%;left:8px;margin-top:-10px;content:"\f341"}.post-option,.setting-modal,.setting-title{position:relative}.post-option-back:before{content:"\f345"}.lt-ie9 .options-panel,.lt-ie9 .post-options{border-right:1px solid #e5e5e5}.lt-ie9 .post-options.is-off-screen{border:0}.post-options .post-option{display:block;width:100%;padding:13px 14px 13px 37px;border-bottom:1px solid #e5e5e5;text-decoration:none;text-align:right;color:#9ea7af;overflow:hidden;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.post-options .post-option:focus{outline:0;-webkit-box-shadow:inset -5px 0 0 #00a0d2;box-shadow:inset -5px 0 0 #00a0d2;border-color:#e5e5e5}.is-off-screen>.post-option{left:100%}.is-hidden>.post-option{visibility:hidden}.post-option-title{display:inline-block;margin:0 8px 0 0;font-size:14px;font-weight:400}.setting-modal{top:0;right:0;width:100%;overflow:hidden;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.setting-modal.is-hidden{visibility:hidden;height:0}.setting-modal.is-off-screen{right:100%}@media (min-width:1px){.is-off-screen>.post-option{left:auto;-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}.setting-modal.is-off-screen{right:0;-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%)}}.press-this .modal-close{display:block;width:100%;padding:13px 14px;border-bottom:1px solid #e5e5e5;color:#00a0d2;text-decoration:none;text-align:right}.press-this .modal-close:focus{outline:0;-webkit-box-shadow:inset -5px 0 0 #00a0d2;box-shadow:inset -5px 0 0 #00a0d2;border-color:#e5e5e5}.setting-title{top:-1px;margin-right:11px}#pressthis{color:#404040;resize:none;padding-top:30px;font-size:16px}.wp-editor-wrap .quicktags-toolbar{background:0 0;border:none}.wp-editor-wrap .wp-editor-tools{z-index:0}.wp-editor-wrap .wp-editor-tabs{padding:2px}.wp-editor-wrap .wp-switch-editor{top:0;margin:3px 5px 0 0;padding:3px 8px;background:#f5f5f5;color:#555;border-color:#ccc}.wp-editor-wrap .wp-switch-editor:hover{background:#fafafa;border-color:#999;color:#23282d}.wp-editor-wrap.html-active .switch-html,.wp-editor-wrap.tmce-active .switch-tmce{background:#fff;border-color:#d8d8d8}.wp-link-input input{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:right}.ui-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}
\ No newline at end of file
+body,fieldset{margin:0}.screen-reader-text,fieldset,legend,td,th{padding:0}.current-site,.post-options .post-option,.postform{text-overflow:ellipsis;white-space:nowrap}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi){*,:after,:before{-webkit-font-smoothing:antialiased}}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}fieldset,img,legend{border:0}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}::-webkit-input-placeholder{color:#72777c}::-moz-placeholder{color:#72777c;opacity:1}:-ms-input-placeholder{color:#72777c}.clearfix:after,.clearfix:before{content:"";display:table}.clearfix:after{clear:both}.hide-if-js{display:none}.screen-reader-text{position:absolute;margin:-1px;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}body,button,input,select,textarea{color:#404040;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:20px;font-weight:400;line-height:1.6}b,dt,strong{font-weight:700}h1,h2,h3,h4,h5,h6{clear:both}p{margin-bottom:1.5em}.scan-submit{display:inline-block;margin:0;text-decoration:none;white-space:nowrap;cursor:pointer;-webkit-appearance:none}.split-button{position:relative;display:inline-block;vertical-align:middle}.split-button-body{display:none;position:absolute;bottom:39px;left:0;border:1px solid #ddd;background-color:#fff;min-width:180px;max-width:100%;margin:0;padding:8px;list-style:none;-webkit-box-shadow:-1px 0 4px rgba(0,0,0,.15);box-shadow:-1px 0 4px rgba(0,0,0,.15)}.split-button-body:after,.split-button-body:before{position:absolute;left:12px;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.split-button-body:before{bottom:-18px;border-top-color:#ccc;border-width:9px;left:11px}.split-button-body:after{bottom:-16px;border-top-color:#fff;border-width:8px}.split-button-body .split-button-option{display:block;padding:5px 15px;margin:0;width:100%;text-align:right;line-height:2}.is-open .split-button-body{display:block}.split-button-primary,.split-button-toggle{-webkit-border-radius:0;border-radius:0;display:block;margin:0;font-size:13px;text-decoration:none;white-space:nowrap;cursor:pointer;-webkit-appearance:none;line-height:2;padding:0 10px 1px;background:#0085ba;border-color:#0073aa #006799 #006799;border-width:1px;border-style:solid;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-shadow:0 -1px 1px #006799,-1px 0 1px #006799,0 1px 1px #006799,1px 0 1px #006799}.split-button-primary{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;border-left:0 none;float:right}.split-button-toggle{padding:0;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border-right:1px solid #006799;float:left}.split-button-toggle i{margin:4px 0 3px 20px;padding:0 10px}.split-button-primary:hover,.split-button-toggle:hover{outline:0;background:#008ec2;border-color:#006799}.split-button-primary:focus,.split-button-toggle:focus{outline:0;-webkit-box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db;box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db}.split-button-primary:active,.split-button-toggle:active{background:#0073aa;border-color:#006799;-webkit-box-shadow:inset 0 2px 10px #006799,0 1px 0 #0073aa;box-shadow:inset 0 2px 10px #006799,0 1px 0 #0073aa}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.postform,textarea{vertical-align:top}[type=checkbox],[type=radio]{padding:0}[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}[type=text],[type=email],[type=url],[type=password],[type=search],textarea{padding:.4em .75em;color:#32373c;border:1px solid #ccc}[type=text]:focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=search]:focus,textarea:focus{color:#32373c;outline:0}textarea{overflow:auto;padding-right:3px}a,a:visited{color:#0073aa}a:active,a:focus,a:hover{color:#00a0d2}ol,ul{margin:0 3em 1.5em 0}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-right:1.5em}dd{margin:0 1.5em 1.5em}#post-formats-select br{display:none}.post-format{width:1px;height:1px;position:absolute;top:-9999px}.lt-ie9 .post-format{margin:17px 13px 0 12px;position:static;top:auto;float:right;width:16px;height:16px}.add-category,.post-format-icon,.tagsdiv .ajaxtag,.tagsdiv .newtag{position:relative}.post-format-icon{display:block;padding:13px 13px 14px 2px;cursor:pointer}.post-format-icon:after,.post-format-icon:before{content:"";display:inline-block;width:20px;height:20px;margin-left:10px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;color:#9ea7af;font-weight:400;font-style:normal;vertical-align:top;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon:before{content:"\f109"}.post-format-icon:after{display:none;content:"\f147";float:left}.post-format:checked+.post-format-icon{-webkit-box-shadow:inset -6px 0 0 #00a0d2;box-shadow:inset -6px 0 0 #00a0d2;background:rgba(46,162,204,.1)}.post-format:checked+.post-format-icon:after,.post-format:checked+.post-format-icon:before{color:#32373c}.post-format:focus+.post-format-icon{background:#00a0d2;color:#fff}.post-format:focus+.post-format-icon:after,.post-format:focus+.post-format-icon:before{color:#fff}.post-format:checked+.post-format-icon:after{display:block}.lt-ie9 .post-format-icon{margin-right:16px}.post-format-aside:before{content:"\f123"}.post-format-image:before{content:"\f128"}.post-format-video:before{content:"\f126"}.post-format-audio:before{content:"\f127"}.post-format-quote:before{content:"\f122"}.post-format-link:before{content:"\f103"}.post-format-gallery:before{content:"\f161"}.tagsdiv p{margin:0}.tagsdiv .newtag{display:block;padding:11px 16px 11px 58px;width:100%;border:0;border-bottom:1px solid #e5e5e5;font-size:16px}.tagsdiv .tagadd{position:absolute;top:0;left:0;bottom:1px;border:0;-webkit-border-radius:0;border-radius:0;margin:0;padding:0 16px;background:#f7f7f7;border-right:1px solid #f1f1f1;-webkit-box-shadow:none;box-shadow:none}.tagsdiv .tagadd:active,.tagsdiv .tagadd:focus,.tagsdiv .tagadd:hover{outline:0;background:#2991b7;border-color:#20708e;color:#fff;-webkit-box-shadow:none;box-shadow:none}.tagsdiv .howto{color:#727272;font-style:italic;margin:10px 16px 6px 0}.ac_results{padding:0;margin:-1px -1px 0 0;list-style:none;position:absolute;z-index:10000;display:none;border:1px solid #d8d8d8;background-color:#fff;font-size:14px}.ac_results li{padding:6px 16px;white-space:nowrap;text-align:right}.ac_results .ac_over{background-color:#00a0d2;color:#fff;cursor:pointer}.ac_match{text-decoration:underline}.tagchecklist{padding:16px 28px 5px}.tagchecklist:after,.tagchecklist:before{content:"";display:table}.tagchecklist:after{clear:both}.tagchecklist span{display:block;margin-left:25px;float:right;font-size:13px;line-height:1.8;white-space:nowrap;cursor:default}@media (max-width:600px){.tagchecklist span{margin-bottom:15px;font-size:16px;line-height:1.3}}.tagchecklist .ntdelbutton{margin:1px -17px 0 0;cursor:pointer;width:20px;height:20px;display:block;float:right;text-indent:0;overflow:hidden;position:absolute;outline:0}.tagchecklist .ntdelbutton:before{content:"\f153";display:block;margin:2px 0;height:20px;width:20px;background:100% 0;color:#9ea7af;font:400 16px/1 dashicons;text-align:center;speak:none;-webkit-font-smoothing:antialiased}.tagchecklist .ntdelbutton:focus:before{color:#00a0d2}.tagsdiv+p{margin:0}.press-this .tagcloud-link{display:block;margin:0 16px 5px;padding:0;text-decoration:none;outline:0}.tagcloud-link:focus{text-decoration:underline}.popular-tags{border:none;line-height:2em;padding:8px 12px 12px;text-align:justify}.popular-tags a{padding:0 3px}.the-tagcloud{margin:0;padding:16px}.the-tagcloud a{text-decoration:none;outline:0}.the-tagcloud a:focus{text-decoration:underline}.tagcloud h3{margin:2px 0 12px}.add-category-name,input[type=search].categories-search{display:block;width:100%;padding:.85714em 1.07143em;border:0;-webkit-border-radius:0;border-radius:0;border-bottom:1px solid #e5e5e5;font-size:14px;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (max-width:600px){.add-category-name,input[type=search].categories-search{font-size:16px}}.press-this .add-cat-toggle{float:left;margin-top:-45px;line-height:20px;padding:12px 10px 8px;color:#0073aa}.press-this .add-cat-toggle:focus{text-decoration:none;color:#00a0d2}.press-this .add-cat-toggle.is-toggled{padding:10px}.press-this .add-cat-toggle.is-toggled .dashicons:before{content:"\f179"}.add-category{border-bottom:1px solid #e5e5e5}.add-category.is-hidden{display:none}.add-category .add-cat-submit{position:absolute;top:0;left:0;border:0;-webkit-border-radius:0;border-radius:0;padding:12px 16px;background:#f7f7f7;border-right:1px solid #f1f1f1}.add-category .add-cat-submit:active,.add-category .add-cat-submit:focus,.add-category .add-cat-submit:hover{outline:0;background:#2991b7;border-color:#20708e;color:#fff}.postform-wrapper{padding:12px}.postform{display:block;margin:0;width:100%;height:34px;-webkit-border-radius:0;border-radius:0;border:1px solid #e5e5e5;background:#fff;-webkit-background-size:20px 20px;background-size:20px 20px;overflow:hidden;line-height:21px;text-decoration:none;cursor:pointer;outline:0}.postform:focus{border-color:#0073aa;-webkit-box-shadow:0 0 0 3px #00a0d2;box-shadow:0 0 0 3px #00a0d2;outline:0;-moz-outline:none;-moz-user-focus:ignore}.alert,.scan{border-bottom:1px solid #e5e5e5}.postform::-ms-expand{display:none}.postform::-ms-value{background:0 0;color:#727272}.postform:-moz-focusring{color:transparent;text-shadow:0 0 0 #727272}.categories-select,.categories-select ul{margin:0;padding:0;list-style:none}.category{position:relative;display:block;padding:13px 16px 14px;cursor:pointer;background:#fff}.category.selected:focus,.category:focus{outline:0;background:#00a0d2;color:#fff}.category.selected{-webkit-box-shadow:inset -6px 0 0 #00a0d2;box-shadow:inset -6px 0 0 #00a0d2;background:#E9F5F9}.category.selected:after{display:inline-block;content:"\f147";position:absolute;top:13px;left:0;width:20px;height:20px;margin-left:10px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;color:#23282d;font-weight:400;font-style:normal;vertical-align:top;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.category.selected:focus:after{color:#fff}.categories-select ul .category{padding-right:24px}.categories-select ul ul .category{padding-right:32px}.categories-select ul ul ul .category{padding-right:40px}.categories-select ul ul ul ul .category{padding-right:48px}.categories-select ul ul ul ul ul .category{padding-right:56px}.categories-select ul ul ul ul ul ul .category{padding-right:64px}.categories-select .is-hidden{display:none}.categories-select .is-hidden.searched-parent{display:block}.categories-search-wrapper{position:relative}.categories-search-wrapper.is-hidden{display:none}.categories-search-wrapper label{position:absolute;top:50%;left:10px;margin-top:-10px;color:#9ea7af}html{overflow:auto;background:#fff;-webkit-box-shadow:10px 0 0 rgba(0,0,0,.3);box-shadow:10px 0 0 rgba(0,0,0,.3)}body{overflow-x:hidden;height:100%}@media (max-width:900px){body{font-size:16px}}@media (max-width:320px){body{font-size:14px}}.lt-ie9{overflow:visible}.adminbar{position:relative;width:100%;padding:0 .8em;min-height:3.2em;background:#23282d;color:#fff;z-index:9999}.adminbar:after,.adminbar:before{content:"";display:table}.adminbar:after{clear:both}.adminbar .dashicons{color:#a0a5aa}.press-this .adminbar button{position:absolute;top:50%;left:6px;margin-top:-13px;padding:0 10px 1px;font-size:13px}.current-site{margin-top:.5625em;font-size:16px;line-height:44px;font-weight:400;overflow:hidden}@media (max-width:600px){.current-site{margin:3px 0 0}}.current-site-link{text-decoration:none}.current-site-link:focus{outline:0}.current-site-link:focus .current-site-name{text-decoration:underline}.current-site-name{color:#ededed}@media (max-width:320px){.adminbar{min-height:45px}.current-site{margin:0;font-size:14px}.current-site-name{font-weight:600}}.current-site .dashicons-wordpress{position:relative;top:-1px;margin-left:10px;vertical-align:middle}.options,.options.closed .on-open,.options.open .on-closed{display:none}@media (max-width:900px){.options{display:block}.scan form{-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.scan.is-hidden form{opacity:.2;pointer-events:none}}.options-panel-back.is-hidden{display:none}.options:focus .dashicons{color:#fff;text-decoration:none}.options .dashicons{margin-top:3px}.options{color:#00a0d2}.alert{position:relative;margin:0;padding:16px 50px;font-size:14px}.alert:before{content:"";position:absolute;top:50%;right:30px;width:8px;height:8px;margin-top:-4px;-webkit-border-radius:50%;border-radius:50%;background:#00a0d2}@media (max-width:600px){.alert{padding:16px 35px}.alert:before{right:15px}}.alert.is-error:before{background:red}.scan{position:relative}.scan-url{display:block;border:0;padding:.85714em 1.07143em;font-size:14px;width:100%}@media (max-width:600px){.scan-url{font-size:16px}}.scan-submit{position:absolute;top:0;left:0;bottom:0;padding:0 1.07143em;background:#f7f7f7;border:0;border-right:1px solid #f1f1f1;-webkit-border-radius:0;border-radius:0;color:#555;font-size:14px;line-height:1.6}.scan-submit:focus,.scan-submit:hover{background:#008ec2;border-color:#006799;color:#fff;outline:0}.scan-submit:active{background:#0073aa;border-color:#006799;color:#fff}.scan-submit:visited{color:#555}.wrapper{position:relative;margin-bottom:60px;margin-left:320px}.wrapper:after,.wrapper:before{content:"";display:table}.wrapper:after{clear:both}@media (max-width:900px){.wrapper{margin:0;width:100%}}.editor-wrapper{overflow:auto;float:right;width:100%}.editor-wrapper:after,.editor-wrapper:before{content:"";display:table}.editor-wrapper:after{clear:both}.editor{padding:0 1.5em 4.75em;max-width:700px;margin:0 auto}.spinner{height:20px;width:20px;display:inline-block;visibility:hidden;background:url(../images/spinner.gif) center no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;opacity:.7;filter:alpha(opacity=70);line-height:1;vertical-align:middle}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.spinner{background-image:url(../images/spinner-2x.gif)}}.spinner.is-active{visibility:visible}@media (min-width:901px){.editor{max-width:760px}}@media (max-width:320px){.editor{padding:0}}.post-title,.post-title-placeholder{margin:0;padding:.83em 0;width:100%;border-bottom:1px solid #e5e5e5;font-size:32px;line-height:1.4;font-weight:700}.post-title-placeholder:active,.post-title-placeholder:focus,.post-title:active,.post-title:focus{outline:0;-webkit-box-shadow:inset 0 -3px 0 #00a0d2;box-shadow:inset 0 -3px 0 #00a0d2;border-color:#00a0d2}@media (max-width:900px){.post-title,.post-title-placeholder{font-size:24px}}@media (max-height:400px){.post-title,.post-title-placeholder{padding:15px 0;font-size:16px}}@media (max-width:320px){.post-title,.post-title-placeholder{font-size:16px;font-weight:600;padding:1.14286em 1.42857em}}.post-title{background:url(data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///////wAAACH5BAEHAAIALAAAAAABAAEAAAICVAEAOw==);background:0 0,none}.post-title:before{content:"\a0";display:inline-block;width:0;speak:none}.post-title-placeholder{position:absolute;border:0;color:#82878c;z-index:-1}.post-title-placeholder.is-hidden{display:none}.media-list-container{position:relative;padding:2px 0;border-bottom:1px solid #e5e5e5;display:none}.media-list-inner-container{overflow:auto;max-height:150px;max-height:40vw}.media-list-container.has-media{display:block}.media-list-inner-container:after,.media-list-inner-container:before{content:"";display:table}.media-list-inner-container:after{clear:both}.media-list{margin:0;padding:0}@media (min-width:321px){.media-list-inner-container{max-height:250px;max-height:40vw}}.wppt-all-media-list{list-style:none;margin:0;padding:0}.is-embed:focus,.suggested-media-thumbnail:focus{outline:0;-webkit-box-shadow:inset 0 0 0 3px #00a0d2;box-shadow:inset 0 0 0 3px #00a0d2}.suggested-media-thumbnail{position:relative;display:block;float:right;width:16.66%;padding:16.66% 16.66% 0 0;background-position:center;background-repeat:no-repeat;-webkit-background-size:cover;background-size:cover;background-color:#d8d8d8;color:#fff;color:rgba(255,255,255,.6);cursor:pointer}.suggested-media-thumbnail:active,.suggested-media-thumbnail:focus,.suggested-media-thumbnail:hover{color:#fff}.suggested-media-thumbnail:after,.suggested-media-thumbnail:before{display:inline-block;position:absolute;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.suggested-media-thumbnail:before{right:50%;top:50%;margin:-20px -20px 0 0;font-size:40px}.suggested-media-thumbnail:after{content:"\f132";left:3%;bottom:2%}@media (min-width:601px){.media-list-inner-container{max-height:200px;max-height:18.75vw}.suggested-media-thumbnail{width:12.5%;padding:12.5% 12.5% 0 0}}.is-embed:before{content:"\f104";color:#fff;color:rgba(255,255,255,.9)}.is-embed.is-audio:active:before,.is-embed.is-audio:focus:before,.is-embed.is-audio:hover:before,.is-embed.is-tweet:active:before,.is-embed.is-tweet:focus:before,.is-embed.is-tweet:hover:before{color:#fff}.is-embed.is-video{background-color:#23282d}.is-embed.is-video:active:before,.is-embed.is-video:focus:before,.is-embed.is-video:hover:before{color:rgba(255,255,255,.2)}.is-embed.is-video:before{content:"\f236"}.is-embed.is-audio{background-color:#ff7d44}.is-embed.is-audio:before{content:"\f127"}.is-embed.is-tweet{background-color:#55acee}.is-embed.is-tweet:before{content:"\f301"}.no-media{margin:0;padding:0;border:0}.press-this-actions{position:fixed;bottom:0;right:0;width:100%;background:#f1f1f1;background:rgba(241,241,241,.9);border-top:1px solid #e5e5e5}.add-media{float:right;margin:14px 30px 14px 0;font-size:0}@media (max-width:320px){.add-media{margin:10px 10px 10px 0}}.insert-media{color:#9ea7af;float:right;margin:0;padding:0;border:0;border-left:1px solid #e5e5e5;-webkit-border-radius:0;border-radius:0;background:0 0;-webkit-box-shadow:none;box-shadow:none;overflow:hidden}.insert-media:active,.insert-media:focus,.insert-media:hover{margin:0;background:0 0;border-color:#e5e5e5;color:#23282d}.insert-media:active,.insert-media:focus{outline:0;color:#00a0d2;text-decoration:none}.insert-media .dashicons{padding:11px;width:63px;height:58px;font-size:40px}@media (max-width:320px){.insert-media .dashicons{width:55px;height:49px;padding:14px;font-size:20px}}#wp-link-wrap,.post-actions{font-size:13px}.post-actions{float:left;margin:14px 0 14px 30px}@media (max-width:320px){.post-actions{margin:10px 0 10px 10px}}.publish-button .saving-draft,.publish-button.is-saving .publish{display:none}.publish-button.is-saving .saving-draft{display:inline}.editor .wp-media-buttons{float:none}.editor div.mce-toolbar-grp{padding:.71429em 0;background:0 0;border:0}@media (max-height:400px),(max-width:320px){.editor div.mce-toolbar-grp{padding:0}}.mce-stack-layout:after,.mce-stack-layout:before{content:"";display:table}.mce-stack-layout:after{clear:both}.mce-container.mce-toolbar{float:right}.mce-container.mce-toolbar:nth-child(2){float:left}@media (max-width:600px){.mce-first .mce-btn:nth-child(3),.mce-first .mce-btn:nth-child(4){position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.mce-first .mce-btn:nth-child(3):focus,.mce-first .mce-btn:nth-child(4):focus{position:static;margin:1px;padding:inherit;height:auto;width:auto;overflow:visible;clip:auto;border:1px solid #999}}#wp-link-wrap input[type=text]{padding:3px 5px;margin:1px}@media screen and (max-width:782px){#wp-link-wrap{font-size:14px}#wp-link-wrap input[type=text]{padding:6px 10px}}#wp-link-wrap .howto{color:#666;font-style:italic}.options-panel{position:relative;float:left;margin-left:-320px;width:320px;border-right:1px solid #e5e5e5;font-size:14px;-webkit-box-shadow:-5001px 5000px 0 5000px #fff,-5000px 5000px 0 5000px #e5e5e5;box-shadow:-5001px 5000px 0 5000px #fff,-5000px 5000px 0 5000px #e5e5e5;outline:0}.options-panel-back{position:absolute;top:0;left:0;bottom:0;width:320px;outline:0}@media (max-width:900px){.press-this-actions{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.press-this-actions.is-hidden{-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%)}.options-panel{background:#fff;-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.options-panel.is-hidden{visibility:hidden}.options-panel.is-off-screen{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}@media (max-width:320px){.options-panel{margin-left:-100%;width:100%;border:0;-webkit-box-shadow:-5001px 5000px 0 5000px #fff;box-shadow:-5001px 5000px 0 5000px #fff}.options-panel-back{width:100%}}.post-options{background:#fff;position:absolute;left:0;width:100%;overflow-x:hidden}.post-options .post-option-contents{margin-right:3px;color:#32373c}.post-option-forward:before{position:absolute;top:50%;left:8px;margin-top:-10px;content:"\f341"}.post-option,.setting-modal,.setting-title{position:relative}.post-option-back:before{content:"\f345"}.lt-ie9 .options-panel,.lt-ie9 .post-options{border-right:1px solid #e5e5e5}.lt-ie9 .post-options.is-off-screen{border:0}.post-options .post-option{display:block;width:100%;padding:13px 14px 13px 37px;border-bottom:1px solid #e5e5e5;text-decoration:none;text-align:right;color:#9ea7af;overflow:hidden;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.post-options .post-option:focus{outline:0;-webkit-box-shadow:inset -5px 0 0 #00a0d2;box-shadow:inset -5px 0 0 #00a0d2;border-color:#e5e5e5}.is-off-screen>.post-option{left:100%}.is-hidden>.post-option{visibility:hidden}.post-option-title{display:inline-block;margin:0 8px 0 0;font-size:14px;font-weight:400}.setting-modal{top:0;right:0;width:100%;overflow:hidden;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.setting-modal.is-hidden{visibility:hidden;height:0}.setting-modal.is-off-screen{right:100%}@media (min-width:1px){.is-off-screen>.post-option{left:auto;-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}.setting-modal.is-off-screen{right:0;-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%)}}.press-this .modal-close{display:block;width:100%;padding:13px 14px;border-bottom:1px solid #e5e5e5;color:#00a0d2;text-decoration:none;text-align:right}.press-this .modal-close:focus{outline:0;-webkit-box-shadow:inset -5px 0 0 #00a0d2;box-shadow:inset -5px 0 0 #00a0d2;border-color:#e5e5e5}.setting-title{top:-1px;margin-right:11px}#pressthis{color:#404040;resize:none;padding-top:30px;font-size:16px}.wp-editor-wrap .quicktags-toolbar{background:0 0;border:none}.wp-editor-wrap .wp-editor-tools{z-index:0}.wp-editor-wrap .wp-editor-tabs{padding:2px}.wp-editor-wrap .wp-switch-editor{top:0;margin:3px 5px 0 0;padding:3px 8px;background:#f5f5f5;color:#555;border-color:#ccc}.wp-editor-wrap .wp-switch-editor:hover{background:#fafafa;border-color:#999;color:#23282d}.wp-editor-wrap.html-active .switch-html,.wp-editor-wrap.tmce-active .switch-tmce{background:#fff;border-color:#d8d8d8}.wp-link-input input{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:right}.ui-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}
\ No newline at end of file
index 73dadce4e7b3846e728de92ec14cbe57e2ac7985..1ec3ba06bf431f48559330b934fff6ffcfc48448 100644 (file)
@@ -81,7 +81,7 @@ abbr[title] {
 
 b,
 strong {
-       font-weight: bold;
+       font-weight: 700;
 }
 
 dfn {
@@ -232,7 +232,7 @@ textarea {
 }
 
 optgroup {
-       font-weight: bold;
+       font-weight: 700;
 }
 
 table {
@@ -294,7 +294,7 @@ input,
 select,
 textarea {
        color: #404040;
-       font-family: "Open Sans", Helvetica, Arial, sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        font-size: 20px;
        font-weight: 400;
        line-height: 1.6;
@@ -2072,7 +2072,7 @@ html {
        display: inline-block;
        margin: 0 0 0 8px;
        font-size: 14px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .setting-modal {
index 195d483dc92342da527cc74b595cd4415fab050e..2e3377a8b6af99dfc3fd074c4bcdd96defe240bc 100644 (file)
@@ -1 +1 @@
-body,fieldset{margin:0}.screen-reader-text,fieldset,legend,td,th{padding:0}.current-site,.post-options .post-option,.postform{text-overflow:ellipsis;white-space:nowrap}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi){*,:after,:before{-webkit-font-smoothing:antialiased}}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}fieldset,img,legend{border:0}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}::-webkit-input-placeholder{color:#72777c}::-moz-placeholder{color:#72777c;opacity:1}:-ms-input-placeholder{color:#72777c}.clearfix:after,.clearfix:before{content:"";display:table}.clearfix:after{clear:both}.hide-if-js{display:none}.screen-reader-text{position:absolute;margin:-1px;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}body,button,input,select,textarea{color:#404040;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:20px;font-weight:400;line-height:1.6}b,dt,strong{font-weight:700}h1,h2,h3,h4,h5,h6{clear:both}p{margin-bottom:1.5em}.scan-submit{display:inline-block;margin:0;text-decoration:none;white-space:nowrap;cursor:pointer;-webkit-appearance:none}.split-button{position:relative;display:inline-block;vertical-align:middle}.split-button-body{display:none;position:absolute;bottom:39px;right:0;border:1px solid #ddd;background-color:#fff;min-width:180px;max-width:100%;margin:0;padding:8px;list-style:none;-webkit-box-shadow:1px 0 4px rgba(0,0,0,.15);box-shadow:1px 0 4px rgba(0,0,0,.15)}.split-button-body:after,.split-button-body:before{position:absolute;right:12px;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.split-button-body:before{bottom:-18px;border-top-color:#ccc;border-width:9px;right:11px}.split-button-body:after{bottom:-16px;border-top-color:#fff;border-width:8px}.split-button-body .split-button-option{display:block;padding:5px 15px;margin:0;width:100%;text-align:left;line-height:2}.is-open .split-button-body{display:block}.split-button-primary,.split-button-toggle{-webkit-border-radius:0;border-radius:0;display:block;margin:0;font-size:13px;text-decoration:none;white-space:nowrap;cursor:pointer;-webkit-appearance:none;line-height:2;padding:0 10px 1px;background:#0085ba;border-color:#0073aa #006799 #006799;border-width:1px;border-style:solid;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799}.split-button-primary{-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border-right:0 none;float:left}.split-button-toggle{padding:0;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;border-left:1px solid #006799;float:right}.split-button-toggle i{margin:4px 20px 3px 0;padding:0 10px}.split-button-primary:hover,.split-button-toggle:hover{outline:0;background:#008ec2;border-color:#006799}.split-button-primary:focus,.split-button-toggle:focus{outline:0;-webkit-box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db;box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db}.split-button-primary:active,.split-button-toggle:active{background:#0073aa;border-color:#006799;-webkit-box-shadow:inset 0 2px 10px #006799,0 1px 0 #0073aa;box-shadow:inset 0 2px 10px #006799,0 1px 0 #0073aa}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.postform,textarea{vertical-align:top}[type=checkbox],[type=radio]{padding:0}[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}[type=email],[type=url],[type=password],[type=search],[type=text],textarea{padding:.4em .75em;color:#32373c;border:1px solid #ccc}[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=search]:focus,[type=text]:focus,textarea:focus{color:#32373c;outline:0}textarea{overflow:auto;padding-left:3px}a,a:visited{color:#0073aa}a:active,a:focus,a:hover{color:#00a0d2}ol,ul{margin:0 0 1.5em 3em}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-left:1.5em}dd{margin:0 1.5em 1.5em}#post-formats-select br{display:none}.post-format{width:1px;height:1px;position:absolute;top:-9999px}.lt-ie9 .post-format{margin:17px 12px 0 13px;position:static;top:auto;float:left;width:16px;height:16px}.add-category,.post-format-icon,.tagsdiv .ajaxtag,.tagsdiv .newtag{position:relative}.post-format-icon{display:block;padding:13px 2px 14px 13px;cursor:pointer}.post-format-icon:after,.post-format-icon:before{content:"";display:inline-block;width:20px;height:20px;margin-right:10px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;color:#9ea7af;font-weight:400;font-style:normal;vertical-align:top;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon:before{content:"\f109"}.post-format-icon:after{display:none;content:"\f147";float:right}.post-format:checked+.post-format-icon{-webkit-box-shadow:inset 6px 0 0 #00a0d2;box-shadow:inset 6px 0 0 #00a0d2;background:rgba(46,162,204,.1)}.post-format:checked+.post-format-icon:after,.post-format:checked+.post-format-icon:before{color:#32373c}.post-format:focus+.post-format-icon{background:#00a0d2;color:#fff}.post-format:focus+.post-format-icon:after,.post-format:focus+.post-format-icon:before{color:#fff}.post-format:checked+.post-format-icon:after{display:block}.lt-ie9 .post-format-icon{margin-left:16px}.post-format-aside:before{content:"\f123"}.post-format-image:before{content:"\f128"}.post-format-video:before{content:"\f126"}.post-format-audio:before{content:"\f127"}.post-format-quote:before{content:"\f122"}.post-format-link:before{content:"\f103"}.post-format-gallery:before{content:"\f161"}.tagsdiv p{margin:0}.tagsdiv .newtag{display:block;padding:11px 58px 11px 16px;width:100%;border:0;border-bottom:1px solid #e5e5e5;font-size:16px}.tagsdiv .tagadd{position:absolute;top:0;right:0;bottom:1px;border:0;-webkit-border-radius:0;border-radius:0;margin:0;padding:0 16px;background:#f7f7f7;border-left:1px solid #f1f1f1;-webkit-box-shadow:none;box-shadow:none}.tagsdiv .tagadd:active,.tagsdiv .tagadd:focus,.tagsdiv .tagadd:hover{outline:0;background:#2991b7;border-color:#20708e;color:#fff;-webkit-box-shadow:none;box-shadow:none}.tagsdiv .howto{color:#727272;font-style:italic;margin:10px 0 6px 16px}.ac_results{padding:0;margin:-1px 0 0 -1px;list-style:none;position:absolute;z-index:10000;display:none;border:1px solid #d8d8d8;background-color:#fff;font-size:14px}.ac_results li{padding:6px 16px;white-space:nowrap;text-align:left}.ac_results .ac_over{background-color:#00a0d2;color:#fff;cursor:pointer}.ac_match{text-decoration:underline}.tagchecklist{padding:16px 28px 5px}.tagchecklist:after,.tagchecklist:before{content:"";display:table}.tagchecklist:after{clear:both}.tagchecklist span{display:block;margin-right:25px;float:left;font-size:13px;line-height:1.8;white-space:nowrap;cursor:default}@media (max-width:600px){.tagchecklist span{margin-bottom:15px;font-size:16px;line-height:1.3}}.tagchecklist .ntdelbutton{margin:1px 0 0 -17px;cursor:pointer;width:20px;height:20px;display:block;float:left;text-indent:0;overflow:hidden;position:absolute;outline:0}.tagchecklist .ntdelbutton:before{content:"\f153";display:block;margin:2px 0;height:20px;width:20px;background:0 0;color:#9ea7af;font:400 16px/1 dashicons;text-align:center;speak:none;-webkit-font-smoothing:antialiased}.tagchecklist .ntdelbutton:focus:before{color:#00a0d2}.tagsdiv+p{margin:0}.press-this .tagcloud-link{display:block;margin:0 16px 5px;padding:0;text-decoration:none;outline:0}.tagcloud-link:focus{text-decoration:underline}.popular-tags{border:none;line-height:2em;padding:8px 12px 12px;text-align:justify}.popular-tags a{padding:0 3px}.the-tagcloud{margin:0;padding:16px}.the-tagcloud a{text-decoration:none;outline:0}.the-tagcloud a:focus{text-decoration:underline}.tagcloud h3{margin:2px 0 12px}.add-category-name,input[type=search].categories-search{display:block;width:100%;padding:.85714em 1.07143em;border:0;-webkit-border-radius:0;border-radius:0;border-bottom:1px solid #e5e5e5;font-size:14px;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (max-width:600px){.add-category-name,input[type=search].categories-search{font-size:16px}}.press-this .add-cat-toggle{float:right;margin-top:-45px;line-height:20px;padding:12px 10px 8px;color:#0073aa}.press-this .add-cat-toggle:focus{text-decoration:none;color:#00a0d2}.press-this .add-cat-toggle.is-toggled{padding:10px}.press-this .add-cat-toggle.is-toggled .dashicons:before{content:"\f179"}.add-category{border-bottom:1px solid #e5e5e5}.add-category.is-hidden{display:none}.add-category .add-cat-submit{position:absolute;top:0;right:0;border:0;-webkit-border-radius:0;border-radius:0;padding:12px 16px;background:#f7f7f7;border-left:1px solid #f1f1f1}.add-category .add-cat-submit:active,.add-category .add-cat-submit:focus,.add-category .add-cat-submit:hover{outline:0;background:#2991b7;border-color:#20708e;color:#fff}.postform-wrapper{padding:12px}.postform{display:block;margin:0;width:100%;height:34px;-webkit-border-radius:0;border-radius:0;border:1px solid #e5e5e5;background:#fff;-webkit-background-size:20px 20px;background-size:20px 20px;overflow:hidden;line-height:21px;text-decoration:none;cursor:pointer;outline:0}.postform:focus{border-color:#0073aa;-webkit-box-shadow:0 0 0 3px #00a0d2;box-shadow:0 0 0 3px #00a0d2;outline:0;-moz-outline:none;-moz-user-focus:ignore}.alert,.scan{border-bottom:1px solid #e5e5e5}.postform::-ms-expand{display:none}.postform::-ms-value{background:0 0;color:#727272}.postform:-moz-focusring{color:transparent;text-shadow:0 0 0 #727272}.categories-select,.categories-select ul{margin:0;padding:0;list-style:none}.category{position:relative;display:block;padding:13px 16px 14px;cursor:pointer;background:#fff}.category.selected:focus,.category:focus{outline:0;background:#00a0d2;color:#fff}.category.selected{-webkit-box-shadow:inset 6px 0 0 #00a0d2;box-shadow:inset 6px 0 0 #00a0d2;background:#E9F5F9}.category.selected:after{display:inline-block;content:"\f147";position:absolute;top:13px;right:0;width:20px;height:20px;margin-right:10px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;color:#23282d;font-weight:400;font-style:normal;vertical-align:top;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.category.selected:focus:after{color:#fff}.categories-select ul .category{padding-left:24px}.categories-select ul ul .category{padding-left:32px}.categories-select ul ul ul .category{padding-left:40px}.categories-select ul ul ul ul .category{padding-left:48px}.categories-select ul ul ul ul ul .category{padding-left:56px}.categories-select ul ul ul ul ul ul .category{padding-left:64px}.categories-select .is-hidden{display:none}.categories-select .is-hidden.searched-parent{display:block}.categories-search-wrapper{position:relative}.categories-search-wrapper.is-hidden{display:none}.categories-search-wrapper label{position:absolute;top:50%;right:10px;margin-top:-10px;color:#9ea7af}html{overflow:auto;background:#fff;-webkit-box-shadow:-10px 0 0 rgba(0,0,0,.3);box-shadow:-10px 0 0 rgba(0,0,0,.3)}body{overflow-x:hidden;height:100%}@media (max-width:900px){body{font-size:16px}}@media (max-width:320px){body{font-size:14px}}.lt-ie9{overflow:visible}.adminbar{position:relative;width:100%;padding:0 .8em;min-height:3.2em;background:#23282d;color:#fff;z-index:9999}.adminbar:after,.adminbar:before{content:"";display:table}.adminbar:after{clear:both}.adminbar .dashicons{color:#a0a5aa}.press-this .adminbar button{position:absolute;top:50%;right:6px;margin-top:-13px;padding:0 10px 1px;font-size:13px}.current-site{margin-top:.5625em;font-size:16px;line-height:44px;font-weight:400;overflow:hidden}@media (max-width:600px){.current-site{margin:3px 0 0}}.current-site-link{text-decoration:none}.current-site-link:focus{outline:0}.current-site-link:focus .current-site-name{text-decoration:underline}.current-site-name{color:#ededed}@media (max-width:320px){.adminbar{min-height:45px}.current-site{margin:0;font-size:14px}.current-site-name{font-weight:600}}.current-site .dashicons-wordpress{position:relative;top:-1px;margin-right:10px;vertical-align:middle}.options,.options.closed .on-open,.options.open .on-closed{display:none}@media (max-width:900px){.options{display:block}.scan form{-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.scan.is-hidden form{opacity:.2;pointer-events:none}}.options-panel-back.is-hidden{display:none}.options:focus .dashicons{color:#fff;text-decoration:none}.options .dashicons{margin-top:3px}.options{color:#00a0d2}.alert{position:relative;margin:0;padding:16px 50px;font-size:14px}.alert:before{content:"";position:absolute;top:50%;left:30px;width:8px;height:8px;margin-top:-4px;-webkit-border-radius:50%;border-radius:50%;background:#00a0d2}@media (max-width:600px){.alert{padding:16px 35px}.alert:before{left:15px}}.alert.is-error:before{background:red}.scan{position:relative}.scan-url{display:block;border:0;padding:.85714em 1.07143em;font-size:14px;width:100%}@media (max-width:600px){.scan-url{font-size:16px}}.scan-submit{position:absolute;top:0;right:0;bottom:0;padding:0 1.07143em;background:#f7f7f7;border:0;border-left:1px solid #f1f1f1;-webkit-border-radius:0;border-radius:0;color:#555;font-size:14px;line-height:1.6}.scan-submit:focus,.scan-submit:hover{background:#008ec2;border-color:#006799;color:#fff;outline:0}.scan-submit:active{background:#0073aa;border-color:#006799;color:#fff}.scan-submit:visited{color:#555}.wrapper{position:relative;margin-bottom:60px;margin-right:320px}.wrapper:after,.wrapper:before{content:"";display:table}.wrapper:after{clear:both}@media (max-width:900px){.wrapper{margin:0;width:100%}}.editor-wrapper{overflow:auto;float:left;width:100%}.editor-wrapper:after,.editor-wrapper:before{content:"";display:table}.editor-wrapper:after{clear:both}.editor{padding:0 1.5em 4.75em;max-width:700px;margin:0 auto}.spinner{height:20px;width:20px;display:inline-block;visibility:hidden;background:url(../images/spinner.gif) center no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;opacity:.7;filter:alpha(opacity=70);line-height:1;vertical-align:middle}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.spinner{background-image:url(../images/spinner-2x.gif)}}.spinner.is-active{visibility:visible}@media (min-width:901px){.editor{max-width:760px}}@media (max-width:320px){.editor{padding:0}}.post-title,.post-title-placeholder{margin:0;padding:.83em 0;width:100%;border-bottom:1px solid #e5e5e5;font-size:32px;line-height:1.4;font-weight:700}.post-title-placeholder:active,.post-title-placeholder:focus,.post-title:active,.post-title:focus{outline:0;-webkit-box-shadow:inset 0 -3px 0 #00a0d2;box-shadow:inset 0 -3px 0 #00a0d2;border-color:#00a0d2}@media (max-width:900px){.post-title,.post-title-placeholder{font-size:24px}}@media (max-height:400px){.post-title,.post-title-placeholder{padding:15px 0;font-size:16px}}@media (max-width:320px){.post-title,.post-title-placeholder{font-size:16px;font-weight:600;padding:1.14286em 1.42857em}}.post-title{background:url(data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///////wAAACH5BAEHAAIALAAAAAABAAEAAAICVAEAOw==);background:0 0,none}.post-title:before{content:"\a0";display:inline-block;width:0;speak:none}.post-title-placeholder{position:absolute;border:0;color:#82878c;z-index:-1}.post-title-placeholder.is-hidden{display:none}.media-list-container{position:relative;padding:2px 0;border-bottom:1px solid #e5e5e5;display:none}.media-list-inner-container{overflow:auto;max-height:150px;max-height:40vw}.media-list-container.has-media{display:block}.media-list-inner-container:after,.media-list-inner-container:before{content:"";display:table}.media-list-inner-container:after{clear:both}.media-list{margin:0;padding:0}@media (min-width:321px){.media-list-inner-container{max-height:250px;max-height:40vw}}.wppt-all-media-list{list-style:none;margin:0;padding:0}.is-embed:focus,.suggested-media-thumbnail:focus{outline:0;-webkit-box-shadow:inset 0 0 0 3px #00a0d2;box-shadow:inset 0 0 0 3px #00a0d2}.suggested-media-thumbnail{position:relative;display:block;float:left;width:16.66%;padding:16.66% 0 0 16.66%;background-position:center;background-repeat:no-repeat;-webkit-background-size:cover;background-size:cover;background-color:#d8d8d8;color:#fff;color:rgba(255,255,255,.6);cursor:pointer}.suggested-media-thumbnail:active,.suggested-media-thumbnail:focus,.suggested-media-thumbnail:hover{color:#fff}.suggested-media-thumbnail:after,.suggested-media-thumbnail:before{display:inline-block;position:absolute;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.suggested-media-thumbnail:before{left:50%;top:50%;margin:-20px 0 0 -20px;font-size:40px}.suggested-media-thumbnail:after{content:"\f132";right:3%;bottom:2%}@media (min-width:601px){.media-list-inner-container{max-height:200px;max-height:18.75vw}.suggested-media-thumbnail{width:12.5%;padding:12.5% 0 0 12.5%}}.is-embed:before{content:"\f104";color:#fff;color:rgba(255,255,255,.9)}.is-embed.is-audio:active:before,.is-embed.is-audio:focus:before,.is-embed.is-audio:hover:before,.is-embed.is-tweet:active:before,.is-embed.is-tweet:focus:before,.is-embed.is-tweet:hover:before{color:#fff}.is-embed.is-video{background-color:#23282d}.is-embed.is-video:active:before,.is-embed.is-video:focus:before,.is-embed.is-video:hover:before{color:rgba(255,255,255,.2)}.is-embed.is-video:before{content:"\f236"}.is-embed.is-audio{background-color:#ff7d44}.is-embed.is-audio:before{content:"\f127"}.is-embed.is-tweet{background-color:#55acee}.is-embed.is-tweet:before{content:"\f301"}.no-media{margin:0;padding:0;border:0}.press-this-actions{position:fixed;bottom:0;left:0;width:100%;background:#f1f1f1;background:rgba(241,241,241,.9);border-top:1px solid #e5e5e5}.add-media{float:left;margin:14px 0 14px 30px;font-size:0}@media (max-width:320px){.add-media{margin:10px 0 10px 10px}}.insert-media{color:#9ea7af;float:left;margin:0;padding:0;border:0;border-right:1px solid #e5e5e5;-webkit-border-radius:0;border-radius:0;background:0 0;-webkit-box-shadow:none;box-shadow:none;overflow:hidden}.insert-media:active,.insert-media:focus,.insert-media:hover{margin:0;background:0 0;border-color:#e5e5e5;color:#23282d}.insert-media:active,.insert-media:focus{outline:0;color:#00a0d2;text-decoration:none}.insert-media .dashicons{padding:11px;width:63px;height:58px;font-size:40px}@media (max-width:320px){.insert-media .dashicons{width:55px;height:49px;padding:14px;font-size:20px}}#wp-link-wrap,.post-actions{font-size:13px}.post-actions{float:right;margin:14px 30px 14px 0}@media (max-width:320px){.post-actions{margin:10px 10px 10px 0}}.publish-button .saving-draft,.publish-button.is-saving .publish{display:none}.publish-button.is-saving .saving-draft{display:inline}.editor .wp-media-buttons{float:none}.editor div.mce-toolbar-grp{padding:.71429em 0;background:0 0;border:0}@media (max-height:400px),(max-width:320px){.editor div.mce-toolbar-grp{padding:0}}.mce-stack-layout:after,.mce-stack-layout:before{content:"";display:table}.mce-stack-layout:after{clear:both}.mce-container.mce-toolbar{float:left}.mce-container.mce-toolbar:nth-child(2){float:right}@media (max-width:600px){.mce-first .mce-btn:nth-child(3),.mce-first .mce-btn:nth-child(4){position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.mce-first .mce-btn:nth-child(3):focus,.mce-first .mce-btn:nth-child(4):focus{position:static;margin:1px;padding:inherit;height:auto;width:auto;overflow:visible;clip:auto;border:1px solid #999}}#wp-link-wrap input[type=text]{padding:3px 5px;margin:1px}@media screen and (max-width:782px){#wp-link-wrap{font-size:14px}#wp-link-wrap input[type=text]{padding:6px 10px}}#wp-link-wrap .howto{color:#666;font-style:italic}.options-panel{position:relative;float:right;margin-right:-320px;width:320px;border-left:1px solid #e5e5e5;font-size:14px;-webkit-box-shadow:5001px 5000px 0 5000px #fff,5000px 5000px 0 5000px #e5e5e5;box-shadow:5001px 5000px 0 5000px #fff,5000px 5000px 0 5000px #e5e5e5;outline:0}.options-panel-back{position:absolute;top:0;right:0;bottom:0;width:320px;outline:0}@media (max-width:900px){.press-this-actions{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.press-this-actions.is-hidden{-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%)}.options-panel{background:#fff;-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.options-panel.is-hidden{visibility:hidden}.options-panel.is-off-screen{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}@media (max-width:320px){.options-panel{margin-right:-100%;width:100%;border:0;-webkit-box-shadow:5001px 5000px 0 5000px #fff;box-shadow:5001px 5000px 0 5000px #fff}.options-panel-back{width:100%}}.post-options{background:#fff;position:absolute;right:0;width:100%;overflow-x:hidden}.post-options .post-option-contents{margin-left:3px;color:#32373c}.post-option-forward:before{position:absolute;top:50%;right:8px;margin-top:-10px;content:"\f345"}.post-option,.setting-modal,.setting-title{position:relative}.post-option-back:before{content:"\f341"}.lt-ie9 .options-panel,.lt-ie9 .post-options{border-left:1px solid #e5e5e5}.lt-ie9 .post-options.is-off-screen{border:0}.post-options .post-option{display:block;width:100%;padding:13px 37px 13px 14px;border-bottom:1px solid #e5e5e5;text-decoration:none;text-align:left;color:#9ea7af;overflow:hidden;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.post-options .post-option:focus{outline:0;-webkit-box-shadow:inset 5px 0 0 #00a0d2;box-shadow:inset 5px 0 0 #00a0d2;border-color:#e5e5e5}.is-off-screen>.post-option{right:100%}.is-hidden>.post-option{visibility:hidden}.post-option-title{display:inline-block;margin:0 0 0 8px;font-size:14px;font-weight:400}.setting-modal{top:0;left:0;width:100%;overflow:hidden;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.setting-modal.is-hidden{visibility:hidden;height:0}.setting-modal.is-off-screen{left:100%}@media (min-width:1px){.is-off-screen>.post-option{right:auto;-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%)}.setting-modal.is-off-screen{left:0;-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}}.press-this .modal-close{display:block;width:100%;padding:13px 14px;border-bottom:1px solid #e5e5e5;color:#00a0d2;text-decoration:none;text-align:left}.press-this .modal-close:focus{outline:0;-webkit-box-shadow:inset 5px 0 0 #00a0d2;box-shadow:inset 5px 0 0 #00a0d2;border-color:#e5e5e5}.setting-title{top:-1px;margin-left:11px}#pressthis{color:#404040;resize:none;padding-top:30px;font-size:16px}.wp-editor-wrap .quicktags-toolbar{background:0 0;border:none}.wp-editor-wrap .wp-editor-tools{z-index:0}.wp-editor-wrap .wp-editor-tabs{padding:2px}.wp-editor-wrap .wp-switch-editor{top:0;margin:3px 0 0 5px;padding:3px 8px;background:#f5f5f5;color:#555;border-color:#ccc}.wp-editor-wrap .wp-switch-editor:hover{background:#fafafa;border-color:#999;color:#23282d}.wp-editor-wrap.html-active .switch-html,.wp-editor-wrap.tmce-active .switch-tmce{background:#fff;border-color:#d8d8d8}.wp-link-input input{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:left}.ui-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}
\ No newline at end of file
+body,fieldset{margin:0}.screen-reader-text,fieldset,legend,td,th{padding:0}.current-site,.post-options .post-option,.postform{text-overflow:ellipsis;white-space:nowrap}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi){*,:after,:before{-webkit-font-smoothing:antialiased}}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}fieldset,img,legend{border:0}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}::-webkit-input-placeholder{color:#72777c}::-moz-placeholder{color:#72777c;opacity:1}:-ms-input-placeholder{color:#72777c}.clearfix:after,.clearfix:before{content:"";display:table}.clearfix:after{clear:both}.hide-if-js{display:none}.screen-reader-text{position:absolute;margin:-1px;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}body,button,input,select,textarea{color:#404040;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:20px;font-weight:400;line-height:1.6}b,dt,strong{font-weight:700}h1,h2,h3,h4,h5,h6{clear:both}p{margin-bottom:1.5em}.scan-submit{display:inline-block;margin:0;text-decoration:none;white-space:nowrap;cursor:pointer;-webkit-appearance:none}.split-button{position:relative;display:inline-block;vertical-align:middle}.split-button-body{display:none;position:absolute;bottom:39px;right:0;border:1px solid #ddd;background-color:#fff;min-width:180px;max-width:100%;margin:0;padding:8px;list-style:none;-webkit-box-shadow:1px 0 4px rgba(0,0,0,.15);box-shadow:1px 0 4px rgba(0,0,0,.15)}.split-button-body:after,.split-button-body:before{position:absolute;right:12px;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.split-button-body:before{bottom:-18px;border-top-color:#ccc;border-width:9px;right:11px}.split-button-body:after{bottom:-16px;border-top-color:#fff;border-width:8px}.split-button-body .split-button-option{display:block;padding:5px 15px;margin:0;width:100%;text-align:left;line-height:2}.is-open .split-button-body{display:block}.split-button-primary,.split-button-toggle{-webkit-border-radius:0;border-radius:0;display:block;margin:0;font-size:13px;text-decoration:none;white-space:nowrap;cursor:pointer;-webkit-appearance:none;line-height:2;padding:0 10px 1px;background:#0085ba;border-color:#0073aa #006799 #006799;border-width:1px;border-style:solid;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799}.split-button-primary{-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border-right:0 none;float:left}.split-button-toggle{padding:0;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;border-left:1px solid #006799;float:right}.split-button-toggle i{margin:4px 20px 3px 0;padding:0 10px}.split-button-primary:hover,.split-button-toggle:hover{outline:0;background:#008ec2;border-color:#006799}.split-button-primary:focus,.split-button-toggle:focus{outline:0;-webkit-box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db;box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db}.split-button-primary:active,.split-button-toggle:active{background:#0073aa;border-color:#006799;-webkit-box-shadow:inset 0 2px 10px #006799,0 1px 0 #0073aa;box-shadow:inset 0 2px 10px #006799,0 1px 0 #0073aa}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.postform,textarea{vertical-align:top}[type=checkbox],[type=radio]{padding:0}[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}[type=text],[type=email],[type=url],[type=password],[type=search],textarea{padding:.4em .75em;color:#32373c;border:1px solid #ccc}[type=text]:focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=search]:focus,textarea:focus{color:#32373c;outline:0}textarea{overflow:auto;padding-left:3px}a,a:visited{color:#0073aa}a:active,a:focus,a:hover{color:#00a0d2}ol,ul{margin:0 0 1.5em 3em}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-left:1.5em}dd{margin:0 1.5em 1.5em}#post-formats-select br{display:none}.post-format{width:1px;height:1px;position:absolute;top:-9999px}.lt-ie9 .post-format{margin:17px 12px 0 13px;position:static;top:auto;float:left;width:16px;height:16px}.add-category,.post-format-icon,.tagsdiv .ajaxtag,.tagsdiv .newtag{position:relative}.post-format-icon{display:block;padding:13px 2px 14px 13px;cursor:pointer}.post-format-icon:after,.post-format-icon:before{content:"";display:inline-block;width:20px;height:20px;margin-right:10px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;color:#9ea7af;font-weight:400;font-style:normal;vertical-align:top;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.post-format-icon:before{content:"\f109"}.post-format-icon:after{display:none;content:"\f147";float:right}.post-format:checked+.post-format-icon{-webkit-box-shadow:inset 6px 0 0 #00a0d2;box-shadow:inset 6px 0 0 #00a0d2;background:rgba(46,162,204,.1)}.post-format:checked+.post-format-icon:after,.post-format:checked+.post-format-icon:before{color:#32373c}.post-format:focus+.post-format-icon{background:#00a0d2;color:#fff}.post-format:focus+.post-format-icon:after,.post-format:focus+.post-format-icon:before{color:#fff}.post-format:checked+.post-format-icon:after{display:block}.lt-ie9 .post-format-icon{margin-left:16px}.post-format-aside:before{content:"\f123"}.post-format-image:before{content:"\f128"}.post-format-video:before{content:"\f126"}.post-format-audio:before{content:"\f127"}.post-format-quote:before{content:"\f122"}.post-format-link:before{content:"\f103"}.post-format-gallery:before{content:"\f161"}.tagsdiv p{margin:0}.tagsdiv .newtag{display:block;padding:11px 58px 11px 16px;width:100%;border:0;border-bottom:1px solid #e5e5e5;font-size:16px}.tagsdiv .tagadd{position:absolute;top:0;right:0;bottom:1px;border:0;-webkit-border-radius:0;border-radius:0;margin:0;padding:0 16px;background:#f7f7f7;border-left:1px solid #f1f1f1;-webkit-box-shadow:none;box-shadow:none}.tagsdiv .tagadd:active,.tagsdiv .tagadd:focus,.tagsdiv .tagadd:hover{outline:0;background:#2991b7;border-color:#20708e;color:#fff;-webkit-box-shadow:none;box-shadow:none}.tagsdiv .howto{color:#727272;font-style:italic;margin:10px 0 6px 16px}.ac_results{padding:0;margin:-1px 0 0 -1px;list-style:none;position:absolute;z-index:10000;display:none;border:1px solid #d8d8d8;background-color:#fff;font-size:14px}.ac_results li{padding:6px 16px;white-space:nowrap;text-align:left}.ac_results .ac_over{background-color:#00a0d2;color:#fff;cursor:pointer}.ac_match{text-decoration:underline}.tagchecklist{padding:16px 28px 5px}.tagchecklist:after,.tagchecklist:before{content:"";display:table}.tagchecklist:after{clear:both}.tagchecklist span{display:block;margin-right:25px;float:left;font-size:13px;line-height:1.8;white-space:nowrap;cursor:default}@media (max-width:600px){.tagchecklist span{margin-bottom:15px;font-size:16px;line-height:1.3}}.tagchecklist .ntdelbutton{margin:1px 0 0 -17px;cursor:pointer;width:20px;height:20px;display:block;float:left;text-indent:0;overflow:hidden;position:absolute;outline:0}.tagchecklist .ntdelbutton:before{content:"\f153";display:block;margin:2px 0;height:20px;width:20px;background:0 0;color:#9ea7af;font:400 16px/1 dashicons;text-align:center;speak:none;-webkit-font-smoothing:antialiased}.tagchecklist .ntdelbutton:focus:before{color:#00a0d2}.tagsdiv+p{margin:0}.press-this .tagcloud-link{display:block;margin:0 16px 5px;padding:0;text-decoration:none;outline:0}.tagcloud-link:focus{text-decoration:underline}.popular-tags{border:none;line-height:2em;padding:8px 12px 12px;text-align:justify}.popular-tags a{padding:0 3px}.the-tagcloud{margin:0;padding:16px}.the-tagcloud a{text-decoration:none;outline:0}.the-tagcloud a:focus{text-decoration:underline}.tagcloud h3{margin:2px 0 12px}.add-category-name,input[type=search].categories-search{display:block;width:100%;padding:.85714em 1.07143em;border:0;-webkit-border-radius:0;border-radius:0;border-bottom:1px solid #e5e5e5;font-size:14px;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (max-width:600px){.add-category-name,input[type=search].categories-search{font-size:16px}}.press-this .add-cat-toggle{float:right;margin-top:-45px;line-height:20px;padding:12px 10px 8px;color:#0073aa}.press-this .add-cat-toggle:focus{text-decoration:none;color:#00a0d2}.press-this .add-cat-toggle.is-toggled{padding:10px}.press-this .add-cat-toggle.is-toggled .dashicons:before{content:"\f179"}.add-category{border-bottom:1px solid #e5e5e5}.add-category.is-hidden{display:none}.add-category .add-cat-submit{position:absolute;top:0;right:0;border:0;-webkit-border-radius:0;border-radius:0;padding:12px 16px;background:#f7f7f7;border-left:1px solid #f1f1f1}.add-category .add-cat-submit:active,.add-category .add-cat-submit:focus,.add-category .add-cat-submit:hover{outline:0;background:#2991b7;border-color:#20708e;color:#fff}.postform-wrapper{padding:12px}.postform{display:block;margin:0;width:100%;height:34px;-webkit-border-radius:0;border-radius:0;border:1px solid #e5e5e5;background:#fff;-webkit-background-size:20px 20px;background-size:20px 20px;overflow:hidden;line-height:21px;text-decoration:none;cursor:pointer;outline:0}.postform:focus{border-color:#0073aa;-webkit-box-shadow:0 0 0 3px #00a0d2;box-shadow:0 0 0 3px #00a0d2;outline:0;-moz-outline:none;-moz-user-focus:ignore}.alert,.scan{border-bottom:1px solid #e5e5e5}.postform::-ms-expand{display:none}.postform::-ms-value{background:0 0;color:#727272}.postform:-moz-focusring{color:transparent;text-shadow:0 0 0 #727272}.categories-select,.categories-select ul{margin:0;padding:0;list-style:none}.category{position:relative;display:block;padding:13px 16px 14px;cursor:pointer;background:#fff}.category.selected:focus,.category:focus{outline:0;background:#00a0d2;color:#fff}.category.selected{-webkit-box-shadow:inset 6px 0 0 #00a0d2;box-shadow:inset 6px 0 0 #00a0d2;background:#E9F5F9}.category.selected:after{display:inline-block;content:"\f147";position:absolute;top:13px;right:0;width:20px;height:20px;margin-right:10px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;color:#23282d;font-weight:400;font-style:normal;vertical-align:top;text-align:center;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.category.selected:focus:after{color:#fff}.categories-select ul .category{padding-left:24px}.categories-select ul ul .category{padding-left:32px}.categories-select ul ul ul .category{padding-left:40px}.categories-select ul ul ul ul .category{padding-left:48px}.categories-select ul ul ul ul ul .category{padding-left:56px}.categories-select ul ul ul ul ul ul .category{padding-left:64px}.categories-select .is-hidden{display:none}.categories-select .is-hidden.searched-parent{display:block}.categories-search-wrapper{position:relative}.categories-search-wrapper.is-hidden{display:none}.categories-search-wrapper label{position:absolute;top:50%;right:10px;margin-top:-10px;color:#9ea7af}html{overflow:auto;background:#fff;-webkit-box-shadow:-10px 0 0 rgba(0,0,0,.3);box-shadow:-10px 0 0 rgba(0,0,0,.3)}body{overflow-x:hidden;height:100%}@media (max-width:900px){body{font-size:16px}}@media (max-width:320px){body{font-size:14px}}.lt-ie9{overflow:visible}.adminbar{position:relative;width:100%;padding:0 .8em;min-height:3.2em;background:#23282d;color:#fff;z-index:9999}.adminbar:after,.adminbar:before{content:"";display:table}.adminbar:after{clear:both}.adminbar .dashicons{color:#a0a5aa}.press-this .adminbar button{position:absolute;top:50%;right:6px;margin-top:-13px;padding:0 10px 1px;font-size:13px}.current-site{margin-top:.5625em;font-size:16px;line-height:44px;font-weight:400;overflow:hidden}@media (max-width:600px){.current-site{margin:3px 0 0}}.current-site-link{text-decoration:none}.current-site-link:focus{outline:0}.current-site-link:focus .current-site-name{text-decoration:underline}.current-site-name{color:#ededed}@media (max-width:320px){.adminbar{min-height:45px}.current-site{margin:0;font-size:14px}.current-site-name{font-weight:600}}.current-site .dashicons-wordpress{position:relative;top:-1px;margin-right:10px;vertical-align:middle}.options,.options.closed .on-open,.options.open .on-closed{display:none}@media (max-width:900px){.options{display:block}.scan form{-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.scan.is-hidden form{opacity:.2;pointer-events:none}}.options-panel-back.is-hidden{display:none}.options:focus .dashicons{color:#fff;text-decoration:none}.options .dashicons{margin-top:3px}.options{color:#00a0d2}.alert{position:relative;margin:0;padding:16px 50px;font-size:14px}.alert:before{content:"";position:absolute;top:50%;left:30px;width:8px;height:8px;margin-top:-4px;-webkit-border-radius:50%;border-radius:50%;background:#00a0d2}@media (max-width:600px){.alert{padding:16px 35px}.alert:before{left:15px}}.alert.is-error:before{background:red}.scan{position:relative}.scan-url{display:block;border:0;padding:.85714em 1.07143em;font-size:14px;width:100%}@media (max-width:600px){.scan-url{font-size:16px}}.scan-submit{position:absolute;top:0;right:0;bottom:0;padding:0 1.07143em;background:#f7f7f7;border:0;border-left:1px solid #f1f1f1;-webkit-border-radius:0;border-radius:0;color:#555;font-size:14px;line-height:1.6}.scan-submit:focus,.scan-submit:hover{background:#008ec2;border-color:#006799;color:#fff;outline:0}.scan-submit:active{background:#0073aa;border-color:#006799;color:#fff}.scan-submit:visited{color:#555}.wrapper{position:relative;margin-bottom:60px;margin-right:320px}.wrapper:after,.wrapper:before{content:"";display:table}.wrapper:after{clear:both}@media (max-width:900px){.wrapper{margin:0;width:100%}}.editor-wrapper{overflow:auto;float:left;width:100%}.editor-wrapper:after,.editor-wrapper:before{content:"";display:table}.editor-wrapper:after{clear:both}.editor{padding:0 1.5em 4.75em;max-width:700px;margin:0 auto}.spinner{height:20px;width:20px;display:inline-block;visibility:hidden;background:url(../images/spinner.gif) center no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;opacity:.7;filter:alpha(opacity=70);line-height:1;vertical-align:middle}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.spinner{background-image:url(../images/spinner-2x.gif)}}.spinner.is-active{visibility:visible}@media (min-width:901px){.editor{max-width:760px}}@media (max-width:320px){.editor{padding:0}}.post-title,.post-title-placeholder{margin:0;padding:.83em 0;width:100%;border-bottom:1px solid #e5e5e5;font-size:32px;line-height:1.4;font-weight:700}.post-title-placeholder:active,.post-title-placeholder:focus,.post-title:active,.post-title:focus{outline:0;-webkit-box-shadow:inset 0 -3px 0 #00a0d2;box-shadow:inset 0 -3px 0 #00a0d2;border-color:#00a0d2}@media (max-width:900px){.post-title,.post-title-placeholder{font-size:24px}}@media (max-height:400px){.post-title,.post-title-placeholder{padding:15px 0;font-size:16px}}@media (max-width:320px){.post-title,.post-title-placeholder{font-size:16px;font-weight:600;padding:1.14286em 1.42857em}}.post-title{background:url(data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///////wAAACH5BAEHAAIALAAAAAABAAEAAAICVAEAOw==);background:0 0,none}.post-title:before{content:"\a0";display:inline-block;width:0;speak:none}.post-title-placeholder{position:absolute;border:0;color:#82878c;z-index:-1}.post-title-placeholder.is-hidden{display:none}.media-list-container{position:relative;padding:2px 0;border-bottom:1px solid #e5e5e5;display:none}.media-list-inner-container{overflow:auto;max-height:150px;max-height:40vw}.media-list-container.has-media{display:block}.media-list-inner-container:after,.media-list-inner-container:before{content:"";display:table}.media-list-inner-container:after{clear:both}.media-list{margin:0;padding:0}@media (min-width:321px){.media-list-inner-container{max-height:250px;max-height:40vw}}.wppt-all-media-list{list-style:none;margin:0;padding:0}.is-embed:focus,.suggested-media-thumbnail:focus{outline:0;-webkit-box-shadow:inset 0 0 0 3px #00a0d2;box-shadow:inset 0 0 0 3px #00a0d2}.suggested-media-thumbnail{position:relative;display:block;float:left;width:16.66%;padding:16.66% 0 0 16.66%;background-position:center;background-repeat:no-repeat;-webkit-background-size:cover;background-size:cover;background-color:#d8d8d8;color:#fff;color:rgba(255,255,255,.6);cursor:pointer}.suggested-media-thumbnail:active,.suggested-media-thumbnail:focus,.suggested-media-thumbnail:hover{color:#fff}.suggested-media-thumbnail:after,.suggested-media-thumbnail:before{display:inline-block;position:absolute;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:400;font-style:normal;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.suggested-media-thumbnail:before{left:50%;top:50%;margin:-20px 0 0 -20px;font-size:40px}.suggested-media-thumbnail:after{content:"\f132";right:3%;bottom:2%}@media (min-width:601px){.media-list-inner-container{max-height:200px;max-height:18.75vw}.suggested-media-thumbnail{width:12.5%;padding:12.5% 0 0 12.5%}}.is-embed:before{content:"\f104";color:#fff;color:rgba(255,255,255,.9)}.is-embed.is-audio:active:before,.is-embed.is-audio:focus:before,.is-embed.is-audio:hover:before,.is-embed.is-tweet:active:before,.is-embed.is-tweet:focus:before,.is-embed.is-tweet:hover:before{color:#fff}.is-embed.is-video{background-color:#23282d}.is-embed.is-video:active:before,.is-embed.is-video:focus:before,.is-embed.is-video:hover:before{color:rgba(255,255,255,.2)}.is-embed.is-video:before{content:"\f236"}.is-embed.is-audio{background-color:#ff7d44}.is-embed.is-audio:before{content:"\f127"}.is-embed.is-tweet{background-color:#55acee}.is-embed.is-tweet:before{content:"\f301"}.no-media{margin:0;padding:0;border:0}.press-this-actions{position:fixed;bottom:0;left:0;width:100%;background:#f1f1f1;background:rgba(241,241,241,.9);border-top:1px solid #e5e5e5}.add-media{float:left;margin:14px 0 14px 30px;font-size:0}@media (max-width:320px){.add-media{margin:10px 0 10px 10px}}.insert-media{color:#9ea7af;float:left;margin:0;padding:0;border:0;border-right:1px solid #e5e5e5;-webkit-border-radius:0;border-radius:0;background:0 0;-webkit-box-shadow:none;box-shadow:none;overflow:hidden}.insert-media:active,.insert-media:focus,.insert-media:hover{margin:0;background:0 0;border-color:#e5e5e5;color:#23282d}.insert-media:active,.insert-media:focus{outline:0;color:#00a0d2;text-decoration:none}.insert-media .dashicons{padding:11px;width:63px;height:58px;font-size:40px}@media (max-width:320px){.insert-media .dashicons{width:55px;height:49px;padding:14px;font-size:20px}}#wp-link-wrap,.post-actions{font-size:13px}.post-actions{float:right;margin:14px 30px 14px 0}@media (max-width:320px){.post-actions{margin:10px 10px 10px 0}}.publish-button .saving-draft,.publish-button.is-saving .publish{display:none}.publish-button.is-saving .saving-draft{display:inline}.editor .wp-media-buttons{float:none}.editor div.mce-toolbar-grp{padding:.71429em 0;background:0 0;border:0}@media (max-height:400px),(max-width:320px){.editor div.mce-toolbar-grp{padding:0}}.mce-stack-layout:after,.mce-stack-layout:before{content:"";display:table}.mce-stack-layout:after{clear:both}.mce-container.mce-toolbar{float:left}.mce-container.mce-toolbar:nth-child(2){float:right}@media (max-width:600px){.mce-first .mce-btn:nth-child(3),.mce-first .mce-btn:nth-child(4){position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.mce-first .mce-btn:nth-child(3):focus,.mce-first .mce-btn:nth-child(4):focus{position:static;margin:1px;padding:inherit;height:auto;width:auto;overflow:visible;clip:auto;border:1px solid #999}}#wp-link-wrap input[type=text]{padding:3px 5px;margin:1px}@media screen and (max-width:782px){#wp-link-wrap{font-size:14px}#wp-link-wrap input[type=text]{padding:6px 10px}}#wp-link-wrap .howto{color:#666;font-style:italic}.options-panel{position:relative;float:right;margin-right:-320px;width:320px;border-left:1px solid #e5e5e5;font-size:14px;-webkit-box-shadow:5001px 5000px 0 5000px #fff,5000px 5000px 0 5000px #e5e5e5;box-shadow:5001px 5000px 0 5000px #fff,5000px 5000px 0 5000px #e5e5e5;outline:0}.options-panel-back{position:absolute;top:0;right:0;bottom:0;width:320px;outline:0}@media (max-width:900px){.press-this-actions{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.press-this-actions.is-hidden{-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%)}.options-panel{background:#fff;-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.options-panel.is-hidden{visibility:hidden}.options-panel.is-off-screen{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}@media (max-width:320px){.options-panel{margin-right:-100%;width:100%;border:0;-webkit-box-shadow:5001px 5000px 0 5000px #fff;box-shadow:5001px 5000px 0 5000px #fff}.options-panel-back{width:100%}}.post-options{background:#fff;position:absolute;right:0;width:100%;overflow-x:hidden}.post-options .post-option-contents{margin-left:3px;color:#32373c}.post-option-forward:before{position:absolute;top:50%;right:8px;margin-top:-10px;content:"\f345"}.post-option,.setting-modal,.setting-title{position:relative}.post-option-back:before{content:"\f341"}.lt-ie9 .options-panel,.lt-ie9 .post-options{border-left:1px solid #e5e5e5}.lt-ie9 .post-options.is-off-screen{border:0}.post-options .post-option{display:block;width:100%;padding:13px 37px 13px 14px;border-bottom:1px solid #e5e5e5;text-decoration:none;text-align:left;color:#9ea7af;overflow:hidden;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.post-options .post-option:focus{outline:0;-webkit-box-shadow:inset 5px 0 0 #00a0d2;box-shadow:inset 5px 0 0 #00a0d2;border-color:#e5e5e5}.is-off-screen>.post-option{right:100%}.is-hidden>.post-option{visibility:hidden}.post-option-title{display:inline-block;margin:0 0 0 8px;font-size:14px;font-weight:400}.setting-modal{top:0;left:0;width:100%;overflow:hidden;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.setting-modal.is-hidden{visibility:hidden;height:0}.setting-modal.is-off-screen{left:100%}@media (min-width:1px){.is-off-screen>.post-option{right:auto;-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%)}.setting-modal.is-off-screen{left:0;-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}}.press-this .modal-close{display:block;width:100%;padding:13px 14px;border-bottom:1px solid #e5e5e5;color:#00a0d2;text-decoration:none;text-align:left}.press-this .modal-close:focus{outline:0;-webkit-box-shadow:inset 5px 0 0 #00a0d2;box-shadow:inset 5px 0 0 #00a0d2;border-color:#e5e5e5}.setting-title{top:-1px;margin-left:11px}#pressthis{color:#404040;resize:none;padding-top:30px;font-size:16px}.wp-editor-wrap .quicktags-toolbar{background:0 0;border:none}.wp-editor-wrap .wp-editor-tools{z-index:0}.wp-editor-wrap .wp-editor-tabs{padding:2px}.wp-editor-wrap .wp-switch-editor{top:0;margin:3px 0 0 5px;padding:3px 8px;background:#f5f5f5;color:#555;border-color:#ccc}.wp-editor-wrap .wp-switch-editor:hover{background:#fafafa;border-color:#999;color:#23282d}.wp-editor-wrap.html-active .switch-html,.wp-editor-wrap.tmce-active .switch-tmce{background:#fff;border-color:#d8d8d8}.wp-link-input input{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#32373c;outline:0;-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:left}.ui-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}
\ No newline at end of file
index 096f9a2c7baeb80fbe9e3222d1e6ceb8ebf1627f..12114e9d0ce2a8e87e5c4bf5fcb48d1cf90d9036 100644 (file)
@@ -149,7 +149,7 @@ body.folded .revisions .loading-indicator {
 }
 
 .revisions-controls .author-card .author-name {
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .comparing-two-revisions .diff-meta-to strong {
index 8d4839375205a60ba0c96cc815bb03de29139f2b..35e40f7a98c317022384028e7d07f152cb569a78 100644 (file)
@@ -1 +1 @@
-.revisions-control-frame,.revisions-diff-frame{position:relative}.revisions-controls{padding-top:40px;height:100px;z-index:1}.revisions-controls input[type=checkbox]{position:relative;top:-1px;vertical-align:text-bottom}.revisions.pinned .revisions-controls{position:fixed;top:0;height:82px;background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-diff,.revisions-meta{background-color:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-tickmarks{position:relative;margin:0 auto;height:.7em;top:7px;max-width:70%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:#fff}.revisions-tickmarks>div{position:absolute;height:100%;border-right:1px solid #a0a5aa;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.revisions-tickmarks>div:first-child{border-width:0}.comparing-two-revisions .revisions-controls{height:140px}.comparing-two-revisions.pinned .revisions-controls{height:124px}.revisions .diff-error{position:absolute;text-align:center;margin:0 auto;width:100%;display:none}.revisions.diff-error .diff-error{display:block}.revisions .loading-indicator{position:absolute;vertical-align:middle;opacity:0;width:100%;width:-webkit-calc(100% - 30px);width:calc(100% - 30px);top:50%;top:-webkit-calc(50% - 10px);top:calc(50% - 10px);-webkit-transition:opacity .5s;transition:opacity .5s;filter:alpha(opacity=0)}body.folded .revisions .loading-indicator{margin-right:-32px}.revisions .loading-indicator span.spinner{display:block;margin:0 auto;float:none}.revisions.loading .loading-indicator{opacity:1;filter:alpha(opacity=100)}.revisions .diff{-webkit-transition:opacity .5s;transition:opacity .5s}.revisions.loading .diff{opacity:.5;filter:alpha(opacity=50)}.revisions.diff-error .diff{visibility:hidden}.revisions-meta{margin-top:20px;box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions.pinned .revisions-meta{-webkit-box-shadow:none;box-shadow:none}.revision-toggle-compare-mode{position:absolute;top:0;left:0}.comparing-two-revisions .revisions-next,.comparing-two-revisions .revisions-previous,.revisions-meta .diff-meta-to strong{display:none}.revisions-controls .author-card .date{color:#72777c}.revisions-controls .author-card.autosave{color:#d54e21}.revisions-controls .author-card .author-name{font-weight:700}.comparing-two-revisions .diff-meta-to strong{display:block}.revisions.pinned .revisions-buttons{padding:0 11px}.revisions-next,.revisions-previous{position:relative;z-index:1}.revisions-previous{float:right}.revisions-next{float:left}.revisions-controls .wp-slider{max-width:70%;margin:0 auto;top:-3px}.revisions-diff{padding:15px;box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-diff h3:first-child{margin-top:0}#revisions-meta-restored img,.post-revisions li img{vertical-align:middle}table.diff tbody tr td:nth-child(2){width:4%}table.diff{table-layout:fixed;width:100%;white-space:pre-wrap}table.diff col.content{width:auto}table.diff col.content.diffsplit{width:48%}table.diff col.diffsplit.middle{width:auto}table.diff col.ltype{width:30px}table.diff tr{background-color:transparent}table.diff td,table.diff th{font-family:Consolas,Monaco,monospace;font-size:14px;line-height:1.618;padding:.5em;vertical-align:top;word-wrap:break-word}table.diff td h1,table.diff td h2,table.diff td h3,table.diff td h4,table.diff td h5,table.diff td h6{margin:0}table.diff .diff-addedline ins,table.diff .diff-deletedline del{text-decoration:none}table.diff .diff-deletedline{background-color:#ffe9e9}table.diff .diff-deletedline del{background-color:#faa}table.diff .diff-addedline{background-color:#e9ffe9}table.diff .diff-addedline ins{background-color:#afa}.diff-meta{padding:5px;clear:both;min-height:32px}.diff-title strong{line-height:32px;min-width:60px;text-align:left;float:right;margin-left:5px}.revisions-controls .author-card .author-info{font-size:12px;line-height:16px}.revisions-controls .author-card .author-info,.revisions-controls .author-card .avatar{float:right;margin-right:6px;margin-left:6px}.revisions-controls .author-card .byline{display:block;font-size:12px}.revisions-controls .author-card .avatar{vertical-align:middle}.diff-meta input.restore-revision{float:left;margin-right:6px;margin-left:6px;margin-top:4px}.diff-meta-from{display:none}.comparing-two-revisions .diff-meta-from{display:block}.revisions-tooltip{position:absolute;bottom:105px;margin-left:0;margin-right:-69px;z-index:0;max-width:350px;min-width:130px;padding:8px 4px;opacity:0}.revisions-tooltip.flipped{margin-right:0;margin-left:-70px}.revisions.pinned .revisions-tooltip{display:none!important}.comparing-two-revisions .revisions-tooltip{bottom:145px}.revisions-tooltip-arrow{width:70px;height:15px;overflow:hidden;position:absolute;right:0;margin-right:35px;bottom:-15px}.revisions-tooltip.flipped .revisions-tooltip-arrow{margin-right:0;margin-left:35px;right:auto;left:0}.revisions-tooltip-arrow>span{content:"";position:absolute;right:20px;top:-20px;width:25px;height:25px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.revisions-tooltip.flipped .revisions-tooltip-arrow>span{right:auto;left:20px}.ie8 .revisions-tooltip-arrow>span{right:15px;top:-25px;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)"}.ie8 .revisions-tooltip.flipped .revisions-tooltip-arrow>span{left:25px}.revisions-tooltip,.revisions-tooltip-arrow>span{border:1px solid #ddd;background-color:#fff}.revisions-tooltip{display:none}.arrow{width:70px;height:16px;overflow:hidden;position:absolute;right:0;margin-right:-35px;bottom:90px;z-index:10000}.arrow.top{top:-16px;bottom:auto}.arrow.left{right:20%}.arrow:after{z-index:9999;background-color:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1);content:"";position:absolute;right:20px;top:-20px;width:25px;height:25px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.revisions-tooltip,.revisions-tooltip-arrow:after{border-width:1px;border-style:solid}div.revisions-controls>.wp-slider>.ui-slider-handle{margin-right:-10px}.rtl div.revisions-controls>.wp-slider>.ui-slider-handle{margin-left:-10px}.wp-slider.ui-slider{position:relative;border:1px solid #ddd;text-align:right;cursor:pointer}.wp-slider .ui-slider-handle{-webkit-border-radius:50%;border-radius:50%;height:18px;margin-top:-5px;outline:0;padding:2px;position:absolute;width:18px;z-index:2;-ms-touch-action:none;touch-action:none}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus{background:#f7f7f7;border:1px solid #ccc;-webkit-box-shadow:0 1px 0 #ccc;box-shadow:0 1px 0 #ccc}.wp-slider .ui-slider-handle.ui-state-hover,.wp-slider .ui-slider-handle:hover{background:#fafafa;border-color:#999}.wp-slider .ui-slider-handle.ui-state-active,.wp-slider .ui-slider-handle:active{background:#eee;border-color:#999;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);-webkit-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.wp-slider .ui-slider-handle:before{background:0 0;position:absolute;top:2px;right:2px;color:#555;content:"\f229";font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-slider .ui-slider-handle.ui-state-hover:before,.wp-slider .ui-slider-handle:hover:before{color:#23282d}.wp-slider .ui-slider-handle.from-handle:before,.wp-slider .ui-slider-handle.to-handle:before{font-size:20px!important;margin:-1px -1px 0 0}.wp-slider .ui-slider-handle.from-handle:before{content:"\f141"}.wp-slider .ui-slider-handle.to-handle:before{content:"\f139"}.rtl .wp-slider .ui-slider-handle.from-handle:before{content:"\f139"}.rtl .wp-slider .ui-slider-handle.to-handle:before{content:"\f141";left:-1px}.wp-slider .ui-slider-range{position:absolute;font-size:.7em;display:block;border:0;background-color:transparent;background-image:none}.wp-slider.ui-slider-horizontal{height:.7em}.wp-slider.ui-slider-horizontal .ui-slider-handle{top:-.25em;margin-right:-.6em}.wp-slider.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.wp-slider.ui-slider-horizontal .ui-slider-range-min{right:0}.wp-slider.ui-slider-horizontal .ui-slider-range-max{left:0}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.revision-tick.completed-false{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){#diff-next-revision,#diff-previous-revision{margin-top:-1em}table.diff{-ms-word-break:break-all;word-break:break-all;word-wrap:break-word}}
\ No newline at end of file
+.revisions-control-frame,.revisions-diff-frame{position:relative}.revisions-controls{padding-top:40px;height:100px;z-index:1}.revisions-controls input[type=checkbox]{position:relative;top:-1px;vertical-align:text-bottom}.revisions.pinned .revisions-controls{position:fixed;top:0;height:82px;background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-diff,.revisions-meta{background-color:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-tickmarks{position:relative;margin:0 auto;height:.7em;top:7px;max-width:70%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:#fff}.revisions-tickmarks>div{position:absolute;height:100%;border-right:1px solid #a0a5aa;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.revisions-tickmarks>div:first-child{border-width:0}.comparing-two-revisions .revisions-controls{height:140px}.comparing-two-revisions.pinned .revisions-controls{height:124px}.revisions .diff-error{position:absolute;text-align:center;margin:0 auto;width:100%;display:none}.revisions.diff-error .diff-error{display:block}.revisions .loading-indicator{position:absolute;vertical-align:middle;opacity:0;width:100%;width:-webkit-calc(100% - 30px);width:calc(100% - 30px);top:50%;top:-webkit-calc(50% - 10px);top:calc(50% - 10px);-webkit-transition:opacity .5s;transition:opacity .5s;filter:alpha(opacity=0)}body.folded .revisions .loading-indicator{margin-right:-32px}.revisions .loading-indicator span.spinner{display:block;margin:0 auto;float:none}.revisions.loading .loading-indicator{opacity:1;filter:alpha(opacity=100)}.revisions .diff{-webkit-transition:opacity .5s;transition:opacity .5s}.revisions.loading .diff{opacity:.5;filter:alpha(opacity=50)}.revisions.diff-error .diff{visibility:hidden}.revisions-meta{margin-top:20px;box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions.pinned .revisions-meta{-webkit-box-shadow:none;box-shadow:none}.revision-toggle-compare-mode{position:absolute;top:0;left:0}.comparing-two-revisions .revisions-next,.comparing-two-revisions .revisions-previous,.revisions-meta .diff-meta-to strong{display:none}.revisions-controls .author-card .date{color:#72777c}.revisions-controls .author-card.autosave{color:#d54e21}.revisions-controls .author-card .author-name{font-weight:600}.comparing-two-revisions .diff-meta-to strong{display:block}.revisions.pinned .revisions-buttons{padding:0 11px}.revisions-next,.revisions-previous{position:relative;z-index:1}.revisions-previous{float:right}.revisions-next{float:left}.revisions-controls .wp-slider{max-width:70%;margin:0 auto;top:-3px}.revisions-diff{padding:15px;box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-diff h3:first-child{margin-top:0}#revisions-meta-restored img,.post-revisions li img{vertical-align:middle}table.diff tbody tr td:nth-child(2){width:4%}table.diff{table-layout:fixed;width:100%;white-space:pre-wrap}table.diff col.content{width:auto}table.diff col.content.diffsplit{width:48%}table.diff col.diffsplit.middle{width:auto}table.diff col.ltype{width:30px}table.diff tr{background-color:transparent}table.diff td,table.diff th{font-family:Consolas,Monaco,monospace;font-size:14px;line-height:1.618;padding:.5em;vertical-align:top;word-wrap:break-word}table.diff td h1,table.diff td h2,table.diff td h3,table.diff td h4,table.diff td h5,table.diff td h6{margin:0}table.diff .diff-addedline ins,table.diff .diff-deletedline del{text-decoration:none}table.diff .diff-deletedline{background-color:#ffe9e9}table.diff .diff-deletedline del{background-color:#faa}table.diff .diff-addedline{background-color:#e9ffe9}table.diff .diff-addedline ins{background-color:#afa}.diff-meta{padding:5px;clear:both;min-height:32px}.diff-title strong{line-height:32px;min-width:60px;text-align:left;float:right;margin-left:5px}.revisions-controls .author-card .author-info{font-size:12px;line-height:16px}.revisions-controls .author-card .author-info,.revisions-controls .author-card .avatar{float:right;margin-right:6px;margin-left:6px}.revisions-controls .author-card .byline{display:block;font-size:12px}.revisions-controls .author-card .avatar{vertical-align:middle}.diff-meta input.restore-revision{float:left;margin-right:6px;margin-left:6px;margin-top:4px}.diff-meta-from{display:none}.comparing-two-revisions .diff-meta-from{display:block}.revisions-tooltip{position:absolute;bottom:105px;margin-left:0;margin-right:-69px;z-index:0;max-width:350px;min-width:130px;padding:8px 4px;opacity:0}.revisions-tooltip.flipped{margin-right:0;margin-left:-70px}.revisions.pinned .revisions-tooltip{display:none!important}.comparing-two-revisions .revisions-tooltip{bottom:145px}.revisions-tooltip-arrow{width:70px;height:15px;overflow:hidden;position:absolute;right:0;margin-right:35px;bottom:-15px}.revisions-tooltip.flipped .revisions-tooltip-arrow{margin-right:0;margin-left:35px;right:auto;left:0}.revisions-tooltip-arrow>span{content:"";position:absolute;right:20px;top:-20px;width:25px;height:25px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.revisions-tooltip.flipped .revisions-tooltip-arrow>span{right:auto;left:20px}.ie8 .revisions-tooltip-arrow>span{right:15px;top:-25px;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)"}.ie8 .revisions-tooltip.flipped .revisions-tooltip-arrow>span{left:25px}.revisions-tooltip,.revisions-tooltip-arrow>span{border:1px solid #ddd;background-color:#fff}.revisions-tooltip{display:none}.arrow{width:70px;height:16px;overflow:hidden;position:absolute;right:0;margin-right:-35px;bottom:90px;z-index:10000}.arrow.top{top:-16px;bottom:auto}.arrow.left{right:20%}.arrow:after{z-index:9999;background-color:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1);content:"";position:absolute;right:20px;top:-20px;width:25px;height:25px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.revisions-tooltip,.revisions-tooltip-arrow:after{border-width:1px;border-style:solid}div.revisions-controls>.wp-slider>.ui-slider-handle{margin-right:-10px}.rtl div.revisions-controls>.wp-slider>.ui-slider-handle{margin-left:-10px}.wp-slider.ui-slider{position:relative;border:1px solid #ddd;text-align:right;cursor:pointer}.wp-slider .ui-slider-handle{-webkit-border-radius:50%;border-radius:50%;height:18px;margin-top:-5px;outline:0;padding:2px;position:absolute;width:18px;z-index:2;-ms-touch-action:none;touch-action:none}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus{background:#f7f7f7;border:1px solid #ccc;-webkit-box-shadow:0 1px 0 #ccc;box-shadow:0 1px 0 #ccc}.wp-slider .ui-slider-handle.ui-state-hover,.wp-slider .ui-slider-handle:hover{background:#fafafa;border-color:#999}.wp-slider .ui-slider-handle.ui-state-active,.wp-slider .ui-slider-handle:active{background:#eee;border-color:#999;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);-webkit-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.wp-slider .ui-slider-handle:before{background:0 0;position:absolute;top:2px;right:2px;color:#555;content:"\f229";font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-slider .ui-slider-handle.ui-state-hover:before,.wp-slider .ui-slider-handle:hover:before{color:#23282d}.wp-slider .ui-slider-handle.from-handle:before,.wp-slider .ui-slider-handle.to-handle:before{font-size:20px!important;margin:-1px -1px 0 0}.wp-slider .ui-slider-handle.from-handle:before{content:"\f141"}.wp-slider .ui-slider-handle.to-handle:before{content:"\f139"}.rtl .wp-slider .ui-slider-handle.from-handle:before{content:"\f139"}.rtl .wp-slider .ui-slider-handle.to-handle:before{content:"\f141";left:-1px}.wp-slider .ui-slider-range{position:absolute;font-size:.7em;display:block;border:0;background-color:transparent;background-image:none}.wp-slider.ui-slider-horizontal{height:.7em}.wp-slider.ui-slider-horizontal .ui-slider-handle{top:-.25em;margin-right:-.6em}.wp-slider.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.wp-slider.ui-slider-horizontal .ui-slider-range-min{right:0}.wp-slider.ui-slider-horizontal .ui-slider-range-max{left:0}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.revision-tick.completed-false{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){#diff-next-revision,#diff-previous-revision{margin-top:-1em}table.diff{-ms-word-break:break-all;word-break:break-all;word-wrap:break-word}}
\ No newline at end of file
index 8a867dcf2de1215c00da76d7bceef2d9ce37eb2c..6ae57ef8d4e71b9f0103bd1cf8e03cb0c784b2cc 100644 (file)
@@ -149,7 +149,7 @@ body.folded .revisions .loading-indicator {
 }
 
 .revisions-controls .author-card .author-name {
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .comparing-two-revisions .diff-meta-to strong {
index 0ec0fbe6ba2bd4c0dd72e7e367e0889d4d780f06..72667617f6649b82ec6190723942b4cf0e9cf471 100644 (file)
@@ -1 +1 @@
-.revisions-control-frame,.revisions-diff-frame{position:relative}.revisions-controls{padding-top:40px;height:100px;z-index:1}.revisions-controls input[type=checkbox]{position:relative;top:-1px;vertical-align:text-bottom}.revisions.pinned .revisions-controls{position:fixed;top:0;height:82px;background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-diff,.revisions-meta{background-color:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-tickmarks{position:relative;margin:0 auto;height:.7em;top:7px;max-width:70%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:#fff}.revisions-tickmarks>div{position:absolute;height:100%;border-left:1px solid #a0a5aa;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.revisions-tickmarks>div:first-child{border-width:0}.comparing-two-revisions .revisions-controls{height:140px}.comparing-two-revisions.pinned .revisions-controls{height:124px}.revisions .diff-error{position:absolute;text-align:center;margin:0 auto;width:100%;display:none}.revisions.diff-error .diff-error{display:block}.revisions .loading-indicator{position:absolute;vertical-align:middle;opacity:0;width:100%;width:-webkit-calc(100% - 30px);width:calc(100% - 30px);top:50%;top:-webkit-calc(50% - 10px);top:calc(50% - 10px);-webkit-transition:opacity .5s;transition:opacity .5s;filter:alpha(opacity=0)}body.folded .revisions .loading-indicator{margin-left:-32px}.revisions .loading-indicator span.spinner{display:block;margin:0 auto;float:none}.revisions.loading .loading-indicator{opacity:1;filter:alpha(opacity=100)}.revisions .diff{-webkit-transition:opacity .5s;transition:opacity .5s}.revisions.loading .diff{opacity:.5;filter:alpha(opacity=50)}.revisions.diff-error .diff{visibility:hidden}.revisions-meta{margin-top:20px;box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions.pinned .revisions-meta{-webkit-box-shadow:none;box-shadow:none}.revision-toggle-compare-mode{position:absolute;top:0;right:0}.comparing-two-revisions .revisions-next,.comparing-two-revisions .revisions-previous,.revisions-meta .diff-meta-to strong{display:none}.revisions-controls .author-card .date{color:#72777c}.revisions-controls .author-card.autosave{color:#d54e21}.revisions-controls .author-card .author-name{font-weight:700}.comparing-two-revisions .diff-meta-to strong{display:block}.revisions.pinned .revisions-buttons{padding:0 11px}.revisions-next,.revisions-previous{position:relative;z-index:1}.revisions-previous{float:left}.revisions-next{float:right}.revisions-controls .wp-slider{max-width:70%;margin:0 auto;top:-3px}.revisions-diff{padding:15px;box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-diff h3:first-child{margin-top:0}#revisions-meta-restored img,.post-revisions li img{vertical-align:middle}table.diff tbody tr td:nth-child(2){width:4%}table.diff{table-layout:fixed;width:100%;white-space:pre-wrap}table.diff col.content{width:auto}table.diff col.content.diffsplit{width:48%}table.diff col.diffsplit.middle{width:auto}table.diff col.ltype{width:30px}table.diff tr{background-color:transparent}table.diff td,table.diff th{font-family:Consolas,Monaco,monospace;font-size:14px;line-height:1.618;padding:.5em;vertical-align:top;word-wrap:break-word}table.diff td h1,table.diff td h2,table.diff td h3,table.diff td h4,table.diff td h5,table.diff td h6{margin:0}table.diff .diff-addedline ins,table.diff .diff-deletedline del{text-decoration:none}table.diff .diff-deletedline{background-color:#ffe9e9}table.diff .diff-deletedline del{background-color:#faa}table.diff .diff-addedline{background-color:#e9ffe9}table.diff .diff-addedline ins{background-color:#afa}.diff-meta{padding:5px;clear:both;min-height:32px}.diff-title strong{line-height:32px;min-width:60px;text-align:right;float:left;margin-right:5px}.revisions-controls .author-card .author-info{font-size:12px;line-height:16px}.revisions-controls .author-card .author-info,.revisions-controls .author-card .avatar{float:left;margin-left:6px;margin-right:6px}.revisions-controls .author-card .byline{display:block;font-size:12px}.revisions-controls .author-card .avatar{vertical-align:middle}.diff-meta input.restore-revision{float:right;margin-left:6px;margin-right:6px;margin-top:4px}.diff-meta-from{display:none}.comparing-two-revisions .diff-meta-from{display:block}.revisions-tooltip{position:absolute;bottom:105px;margin-right:0;margin-left:-69px;z-index:0;max-width:350px;min-width:130px;padding:8px 4px;opacity:0}.revisions-tooltip.flipped{margin-left:0;margin-right:-70px}.revisions.pinned .revisions-tooltip{display:none!important}.comparing-two-revisions .revisions-tooltip{bottom:145px}.revisions-tooltip-arrow{width:70px;height:15px;overflow:hidden;position:absolute;left:0;margin-left:35px;bottom:-15px}.revisions-tooltip.flipped .revisions-tooltip-arrow{margin-left:0;margin-right:35px;left:auto;right:0}.revisions-tooltip-arrow>span{content:"";position:absolute;left:20px;top:-20px;width:25px;height:25px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.revisions-tooltip.flipped .revisions-tooltip-arrow>span{left:auto;right:20px}.ie8 .revisions-tooltip-arrow>span{left:15px;top:-25px;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)"}.ie8 .revisions-tooltip.flipped .revisions-tooltip-arrow>span{right:25px}.revisions-tooltip,.revisions-tooltip-arrow>span{border:1px solid #ddd;background-color:#fff}.revisions-tooltip{display:none}.arrow{width:70px;height:16px;overflow:hidden;position:absolute;left:0;margin-left:-35px;bottom:90px;z-index:10000}.arrow.top{top:-16px;bottom:auto}.arrow.left{left:20%}.arrow:after{z-index:9999;background-color:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1);content:"";position:absolute;left:20px;top:-20px;width:25px;height:25px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.revisions-tooltip,.revisions-tooltip-arrow:after{border-width:1px;border-style:solid}div.revisions-controls>.wp-slider>.ui-slider-handle{margin-left:-10px}.rtl div.revisions-controls>.wp-slider>.ui-slider-handle{margin-right:-10px}.wp-slider.ui-slider{position:relative;border:1px solid #ddd;text-align:left;cursor:pointer}.wp-slider .ui-slider-handle{-webkit-border-radius:50%;border-radius:50%;height:18px;margin-top:-5px;outline:0;padding:2px;position:absolute;width:18px;z-index:2;-ms-touch-action:none;touch-action:none}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus{background:#f7f7f7;border:1px solid #ccc;-webkit-box-shadow:0 1px 0 #ccc;box-shadow:0 1px 0 #ccc}.wp-slider .ui-slider-handle.ui-state-hover,.wp-slider .ui-slider-handle:hover{background:#fafafa;border-color:#999}.wp-slider .ui-slider-handle.ui-state-active,.wp-slider .ui-slider-handle:active{background:#eee;border-color:#999;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);-webkit-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.wp-slider .ui-slider-handle:before{background:0 0;position:absolute;top:2px;left:2px;color:#555;content:"\f229";font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-slider .ui-slider-handle.ui-state-hover:before,.wp-slider .ui-slider-handle:hover:before{color:#23282d}.wp-slider .ui-slider-handle.from-handle:before,.wp-slider .ui-slider-handle.to-handle:before{font-size:20px!important;margin:-1px 0 0 -1px}.wp-slider .ui-slider-handle.from-handle:before{content:"\f139"}.wp-slider .ui-slider-handle.to-handle:before{content:"\f141"}.rtl .wp-slider .ui-slider-handle.from-handle:before{content:"\f141"}.rtl .wp-slider .ui-slider-handle.to-handle:before{content:"\f139";right:-1px}.wp-slider .ui-slider-range{position:absolute;font-size:.7em;display:block;border:0;background-color:transparent;background-image:none}.wp-slider.ui-slider-horizontal{height:.7em}.wp-slider.ui-slider-horizontal .ui-slider-handle{top:-.25em;margin-left:-.6em}.wp-slider.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.wp-slider.ui-slider-horizontal .ui-slider-range-min{left:0}.wp-slider.ui-slider-horizontal .ui-slider-range-max{right:0}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.revision-tick.completed-false{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){#diff-next-revision,#diff-previous-revision{margin-top:-1em}table.diff{-ms-word-break:break-all;word-break:break-all;word-wrap:break-word}}
\ No newline at end of file
+.revisions-control-frame,.revisions-diff-frame{position:relative}.revisions-controls{padding-top:40px;height:100px;z-index:1}.revisions-controls input[type=checkbox]{position:relative;top:-1px;vertical-align:text-bottom}.revisions.pinned .revisions-controls{position:fixed;top:0;height:82px;background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-diff,.revisions-meta{background-color:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-tickmarks{position:relative;margin:0 auto;height:.7em;top:7px;max-width:70%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:#fff}.revisions-tickmarks>div{position:absolute;height:100%;border-left:1px solid #a0a5aa;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.revisions-tickmarks>div:first-child{border-width:0}.comparing-two-revisions .revisions-controls{height:140px}.comparing-two-revisions.pinned .revisions-controls{height:124px}.revisions .diff-error{position:absolute;text-align:center;margin:0 auto;width:100%;display:none}.revisions.diff-error .diff-error{display:block}.revisions .loading-indicator{position:absolute;vertical-align:middle;opacity:0;width:100%;width:-webkit-calc(100% - 30px);width:calc(100% - 30px);top:50%;top:-webkit-calc(50% - 10px);top:calc(50% - 10px);-webkit-transition:opacity .5s;transition:opacity .5s;filter:alpha(opacity=0)}body.folded .revisions .loading-indicator{margin-left:-32px}.revisions .loading-indicator span.spinner{display:block;margin:0 auto;float:none}.revisions.loading .loading-indicator{opacity:1;filter:alpha(opacity=100)}.revisions .diff{-webkit-transition:opacity .5s;transition:opacity .5s}.revisions.loading .diff{opacity:.5;filter:alpha(opacity=50)}.revisions.diff-error .diff{visibility:hidden}.revisions-meta{margin-top:20px;box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions.pinned .revisions-meta{-webkit-box-shadow:none;box-shadow:none}.revision-toggle-compare-mode{position:absolute;top:0;right:0}.comparing-two-revisions .revisions-next,.comparing-two-revisions .revisions-previous,.revisions-meta .diff-meta-to strong{display:none}.revisions-controls .author-card .date{color:#72777c}.revisions-controls .author-card.autosave{color:#d54e21}.revisions-controls .author-card .author-name{font-weight:600}.comparing-two-revisions .diff-meta-to strong{display:block}.revisions.pinned .revisions-buttons{padding:0 11px}.revisions-next,.revisions-previous{position:relative;z-index:1}.revisions-previous{float:left}.revisions-next{float:right}.revisions-controls .wp-slider{max-width:70%;margin:0 auto;top:-3px}.revisions-diff{padding:15px;box-shadow:0 1px 3px rgba(0,0,0,.1)}.revisions-diff h3:first-child{margin-top:0}#revisions-meta-restored img,.post-revisions li img{vertical-align:middle}table.diff tbody tr td:nth-child(2){width:4%}table.diff{table-layout:fixed;width:100%;white-space:pre-wrap}table.diff col.content{width:auto}table.diff col.content.diffsplit{width:48%}table.diff col.diffsplit.middle{width:auto}table.diff col.ltype{width:30px}table.diff tr{background-color:transparent}table.diff td,table.diff th{font-family:Consolas,Monaco,monospace;font-size:14px;line-height:1.618;padding:.5em;vertical-align:top;word-wrap:break-word}table.diff td h1,table.diff td h2,table.diff td h3,table.diff td h4,table.diff td h5,table.diff td h6{margin:0}table.diff .diff-addedline ins,table.diff .diff-deletedline del{text-decoration:none}table.diff .diff-deletedline{background-color:#ffe9e9}table.diff .diff-deletedline del{background-color:#faa}table.diff .diff-addedline{background-color:#e9ffe9}table.diff .diff-addedline ins{background-color:#afa}.diff-meta{padding:5px;clear:both;min-height:32px}.diff-title strong{line-height:32px;min-width:60px;text-align:right;float:left;margin-right:5px}.revisions-controls .author-card .author-info{font-size:12px;line-height:16px}.revisions-controls .author-card .author-info,.revisions-controls .author-card .avatar{float:left;margin-left:6px;margin-right:6px}.revisions-controls .author-card .byline{display:block;font-size:12px}.revisions-controls .author-card .avatar{vertical-align:middle}.diff-meta input.restore-revision{float:right;margin-left:6px;margin-right:6px;margin-top:4px}.diff-meta-from{display:none}.comparing-two-revisions .diff-meta-from{display:block}.revisions-tooltip{position:absolute;bottom:105px;margin-right:0;margin-left:-69px;z-index:0;max-width:350px;min-width:130px;padding:8px 4px;opacity:0}.revisions-tooltip.flipped{margin-left:0;margin-right:-70px}.revisions.pinned .revisions-tooltip{display:none!important}.comparing-two-revisions .revisions-tooltip{bottom:145px}.revisions-tooltip-arrow{width:70px;height:15px;overflow:hidden;position:absolute;left:0;margin-left:35px;bottom:-15px}.revisions-tooltip.flipped .revisions-tooltip-arrow{margin-left:0;margin-right:35px;left:auto;right:0}.revisions-tooltip-arrow>span{content:"";position:absolute;left:20px;top:-20px;width:25px;height:25px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.revisions-tooltip.flipped .revisions-tooltip-arrow>span{left:auto;right:20px}.ie8 .revisions-tooltip-arrow>span{left:15px;top:-25px;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)"}.ie8 .revisions-tooltip.flipped .revisions-tooltip-arrow>span{right:25px}.revisions-tooltip,.revisions-tooltip-arrow>span{border:1px solid #ddd;background-color:#fff}.revisions-tooltip{display:none}.arrow{width:70px;height:16px;overflow:hidden;position:absolute;left:0;margin-left:-35px;bottom:90px;z-index:10000}.arrow.top{top:-16px;bottom:auto}.arrow.left{left:20%}.arrow:after{z-index:9999;background-color:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1);content:"";position:absolute;left:20px;top:-20px;width:25px;height:25px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.revisions-tooltip,.revisions-tooltip-arrow:after{border-width:1px;border-style:solid}div.revisions-controls>.wp-slider>.ui-slider-handle{margin-left:-10px}.rtl div.revisions-controls>.wp-slider>.ui-slider-handle{margin-right:-10px}.wp-slider.ui-slider{position:relative;border:1px solid #ddd;text-align:left;cursor:pointer}.wp-slider .ui-slider-handle{-webkit-border-radius:50%;border-radius:50%;height:18px;margin-top:-5px;outline:0;padding:2px;position:absolute;width:18px;z-index:2;-ms-touch-action:none;touch-action:none}.wp-slider .ui-slider-handle,.wp-slider .ui-slider-handle.focus{background:#f7f7f7;border:1px solid #ccc;-webkit-box-shadow:0 1px 0 #ccc;box-shadow:0 1px 0 #ccc}.wp-slider .ui-slider-handle.ui-state-hover,.wp-slider .ui-slider-handle:hover{background:#fafafa;border-color:#999}.wp-slider .ui-slider-handle.ui-state-active,.wp-slider .ui-slider-handle:active{background:#eee;border-color:#999;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);-webkit-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.wp-slider .ui-slider-handle:before{background:0 0;position:absolute;top:2px;left:2px;color:#555;content:"\f229";font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-slider .ui-slider-handle.ui-state-hover:before,.wp-slider .ui-slider-handle:hover:before{color:#23282d}.wp-slider .ui-slider-handle.from-handle:before,.wp-slider .ui-slider-handle.to-handle:before{font-size:20px!important;margin:-1px 0 0 -1px}.wp-slider .ui-slider-handle.from-handle:before{content:"\f139"}.wp-slider .ui-slider-handle.to-handle:before{content:"\f141"}.rtl .wp-slider .ui-slider-handle.from-handle:before{content:"\f141"}.rtl .wp-slider .ui-slider-handle.to-handle:before{content:"\f139";right:-1px}.wp-slider .ui-slider-range{position:absolute;font-size:.7em;display:block;border:0;background-color:transparent;background-image:none}.wp-slider.ui-slider-horizontal{height:.7em}.wp-slider.ui-slider-horizontal .ui-slider-handle{top:-.25em;margin-left:-.6em}.wp-slider.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.wp-slider.ui-slider-horizontal .ui-slider-range-min{left:0}.wp-slider.ui-slider-horizontal .ui-slider-range-max{right:0}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.revision-tick.completed-false{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){#diff-next-revision,#diff-previous-revision{margin-top:-1em}table.diff{-ms-word-break:break-all;word-break:break-all;word-wrap:break-word}}
\ No newline at end of file
index b66fda377a52eee6dda067ab3f09f2f9484f2303..09ea369abed6d25afd11efaa6c2509cae0f6a71b 100644 (file)
        margin-top: 5px;
 }
 
+/* rtl:ignore */
+.site-icon-preview .favicon,
+.site-icon-preview .app-icon-preview {
+       direction: ltr;
+}
+
 .customize-control-site_icon .favicon-preview {
        float: right;
        margin-left: 12px;
index 56586516fcb9b72bf1a7c88b5be0be320d53f8bb..10f1e6565f649e1f0fba973bd8ffe7379d9e31f0 100644 (file)
@@ -1 +1 @@
-.site-icon-preview .favicon-preview{margin:5px 0 20px;overflow:hidden;position:relative;max-width:180px}.site-icon-preview .browser-title,.site-icon-preview .favicon{height:16px;right:88px;overflow:hidden;position:absolute;top:16px}.site-icon-preview .favicon{width:16px}.site-icon-preview .browser-title{right:109px;width:72px;white-space:nowrap}.site-icon-preview .app-icon-preview{background-color:#000;-webkit-border-radius:16px;border-radius:16px;height:64px;overflow:hidden;width:64px;margin-top:5px}.customize-control-site_icon .favicon-preview{float:right;margin-left:12px;margin-bottom:0}.customize-control-site_icon .app-icon-preview{margin-top:9px}
\ No newline at end of file
+.site-icon-preview .favicon-preview{margin:5px 0 20px;overflow:hidden;position:relative;max-width:180px}.site-icon-preview .browser-title,.site-icon-preview .favicon{height:16px;right:88px;overflow:hidden;position:absolute;top:16px}.site-icon-preview .favicon{width:16px}.site-icon-preview .browser-title{right:109px;width:72px;white-space:nowrap}.site-icon-preview .app-icon-preview{background-color:#000;-webkit-border-radius:16px;border-radius:16px;height:64px;overflow:hidden;width:64px;margin-top:5px}.site-icon-preview .app-icon-preview,.site-icon-preview .favicon{direction:ltr}.customize-control-site_icon .favicon-preview{float:right;margin-left:12px;margin-bottom:0}.customize-control-site_icon .app-icon-preview{margin-top:9px}
\ No newline at end of file
index 77b8425323e9dafd4fd860c7b39b043374b35570..a4ac1ed2c385d40656633ab7d2a2e3fc5dceb823 100644 (file)
        margin-top: 5px;
 }
 
+/* rtl:ignore */
+.site-icon-preview .favicon,
+.site-icon-preview .app-icon-preview {
+       direction: ltr;
+}
+
 .customize-control-site_icon .favicon-preview {
        float: left;
        margin-right: 12px;
index c5b9111c7fcea69bd191240e91204455604f97f8..df0e33978e045f1e2c1f7ca2db8708882239de53 100644 (file)
@@ -1 +1 @@
-.site-icon-preview .favicon-preview{margin:5px 0 20px;overflow:hidden;position:relative;max-width:180px}.site-icon-preview .browser-title,.site-icon-preview .favicon{height:16px;left:88px;overflow:hidden;position:absolute;top:16px}.site-icon-preview .favicon{width:16px}.site-icon-preview .browser-title{left:109px;width:72px;white-space:nowrap}.site-icon-preview .app-icon-preview{background-color:#000;-webkit-border-radius:16px;border-radius:16px;height:64px;overflow:hidden;width:64px;margin-top:5px}.customize-control-site_icon .favicon-preview{float:left;margin-right:12px;margin-bottom:0}.customize-control-site_icon .app-icon-preview{margin-top:9px}
\ No newline at end of file
+.site-icon-preview .favicon-preview{margin:5px 0 20px;overflow:hidden;position:relative;max-width:180px}.site-icon-preview .browser-title,.site-icon-preview .favicon{height:16px;left:88px;overflow:hidden;position:absolute;top:16px}.site-icon-preview .favicon{width:16px}.site-icon-preview .browser-title{left:109px;width:72px;white-space:nowrap}.site-icon-preview .app-icon-preview{background-color:#000;-webkit-border-radius:16px;border-radius:16px;height:64px;overflow:hidden;width:64px;margin-top:5px}.site-icon-preview .app-icon-preview,.site-icon-preview .favicon{direction:ltr}.customize-control-site_icon .favicon-preview{float:left;margin-right:12px;margin-bottom:0}.customize-control-site_icon .app-icon-preview{margin-top:9px}
\ No newline at end of file
index 7f7b77b7ed7035bd142a8b959636d1a0652e08af..b6202982820e385059de562425a641c498061230 100644 (file)
        clear: both;
 }
 
-.themes-php .wrap h1 {
-       float: right;
+.themes-php:not(.network-admin) .wrap h1 {
        margin-bottom: 15px;
 }
 
-.network-admin.themes-php .wrap h1 {
-       margin-bottom: 0;
-}
-
 .themes-php .wrap h1 .button {
        margin-right: 20px;
 }
 }
 
 /* Position admin messages */
-.themes-php div.updated,
-.themes-php div.error,
-.themes-php div.notice {
-       margin: 0 0 20px 0;
-       clear: both;
+.theme .notice,
+.theme .notice.is-dismissible {
+       right: 0;
+       margin: 0;
+       position: absolute;
+       left: 0;
+       top: 0;
 }
 
 /**
        opacity: 0;
        position: absolute;
        top: 35%;
-       left: 25%;
-       right: 25%;
+       left: 20%;
+       right: 20%;
        background: #23282d;
        background: rgba(0,0,0,0.7);
        color: #fff;
        opacity: 1;
 }
 
-/**
- * Displays a theme update notice
- * when an update is available.
- */
-.theme-browser .theme .theme-update,
-.theme-browser .theme .theme-installed {
-       background: #d54e21;
-       background: rgba(213, 78, 33, 0.95);
-       color: #fff;
-       display: block;
-       font-size: 13px;
-       font-weight: 400;
-       height: 48px;
-       line-height: 48px;
-       padding: 0 10px;
-       position: absolute;
-       top: 0;
-       left: 0;
-       right: 0;
-       border-bottom: 1px solid rgba(0,0,0,0.25);
-       overflow: hidden;
-}
-
-.theme-browser .theme .theme-update:before,
-.theme-browser .theme .theme-installed:before {
-       content: "\f463";
-       display: inline-block;
-       font: normal 20px/1 dashicons;
-       margin: 0 0 0 6px;
-       opacity: 0.8;
-       position: relative;
-       top: 5px;
-       speak: none;
-       -webkit-font-smoothing: antialiased;
-}
-
-
 /**
  * The currently active theme
  */
        -webkit-overflow-scrolling: touch;
 }
 
-body.folded .theme-overlay .theme-wrap {
+body.folded .theme-browser ~ .theme-overlay .theme-wrap {
        right: 70px;
 }
 
@@ -721,6 +681,8 @@ body.folded .theme-overlay .theme-wrap {
        font-weight: 100;
        margin: 10px 0 0;
        line-height: 1.3;
+       word-wrap: break-word;
+       overflow-wrap: break-word;
 }
 
 .theme-overlay .theme-version {
@@ -763,7 +725,7 @@ body.folded .theme-overlay .theme-wrap {
 
 .theme-overlay .theme-tags span {
        color: #444;
-       font-weight: bold;
+       font-weight: 600;
        margin-left: 5px;
 }
 
@@ -772,7 +734,7 @@ body.folded .theme-overlay .theme-wrap {
        border: 1px solid #eee;
        border-right: 4px solid #00a0d2;
        font-size: 14px;
-       font-weight: normal;
+       font-weight: 400;
        margin-top: 30px;
        padding: 10px 20px 10px 10px;
 }
@@ -951,7 +913,6 @@ body.folded .theme-overlay .theme-wrap {
 }
 
 @media only screen and (max-width: 650px) {
-       .theme-overlay .theme-update,
        .theme-overlay .theme-description {
                margin-right: 0;
        }
@@ -1041,11 +1002,18 @@ body.folded .theme-overlay .theme-wrap {
 .theme-browser .theme .theme-installed {
        background: #0073aa;
 }
-.theme-browser .theme .theme-installed:before {
+.theme-browser .theme .notice-success p:before {
+       color: #79ba49;
        content: "\f147";
+       display: inline-block;
+       font: normal 20px/1 'dashicons';
+       -webkit-font-smoothing: antialiased;
+       -moz-osx-font-smoothing: grayscale;
+       vertical-align: top;
 }
-.theme-browser .theme.is-installed .theme-actions .button-primary {
-       display: none !important;
+
+.theme-install.updated-message:before {
+       content: '';
 }
 
 .theme-install-php .wp-filter {
@@ -1056,13 +1024,16 @@ body.folded .theme-overlay .theme-wrap {
 .theme-install-php a.browse-themes {
        cursor: pointer;
 }
-.theme-install-php a.browse-themes,
-.theme-install-php.show-upload-theme a.upload {
+
+.upload-view-toggle .browse,
+.plugin-install-tab-upload .upload-view-toggle .upload {
        display: none;
 }
-.theme-install-php.show-upload-theme a.browse-themes {
+
+.plugin-install-tab-upload .upload-view-toggle .browse {
        display: inline;
 }
+
 .upload-theme,
 .upload-plugin {
        -webkit-box-sizing: border-box;
@@ -1070,16 +1041,24 @@ body.folded .theme-overlay .theme-wrap {
        box-sizing: border-box;
        display: none;
        margin: 0;
-       padding: 0;
+       padding: 50px 0;
        width: 100%;
        overflow: hidden;
        position: relative;
        top: 10px;
 }
-body.show-upload-theme .upload-theme,
-.upload-plugin {
+
+.upload-plugin-wrap {
+       display: none;
+}
+
+.show-upload-view .upload-theme,
+.show-upload-view .upload-plugin,
+.show-upload-view .upload-plugin-wrap,
+.plugin-install-tab-upload .upload-plugin {
        display: block;
 }
+
 .upload-theme .wp-upload-form,
 .upload-plugin .wp-upload-form {
        background: #fafafa;
@@ -1094,13 +1073,9 @@ body.show-upload-theme .upload-theme,
        font-size: 18px;
        font-style: normal;
        margin: 0;
-       padding: 40px 0 0;
+       padding: 0;
        text-align: center;
 }
-body.show-upload-theme .upload-theme + .wp-filter,
-body.show-upload-theme .upload-theme + .wp-filter + .theme-browser {
-       display: none;
-}
 
 p.no-themes {
        clear: both;
@@ -1113,14 +1088,10 @@ p.no-themes {
        display: none;
 }
 
-body.no-results p.no-themes {
+.no-results p.no-themes {
        display: block;
 }
 
-body.show-upload-theme p.no-themes {
-       display: none !important;
-}
-
 .theme-install-php .add-new-theme {
        display: none !important;
 }
@@ -1388,12 +1359,28 @@ body.full-overlay-active {
        pointer-events: none;
 }
 
+.theme-install-overlay .close-full-overlay,
+.theme-install-overlay .previous-theme,
+.theme-install-overlay .next-theme {
+       border-right: 0;
+       border-top: 0;
+       border-bottom: 0;
+}
+
+.theme-install-overlay .close-full-overlay:before,
+.theme-install-overlay .previous-theme:before,
+.theme-install-overlay .next-theme:before {
+       top: 2px;
+       right: 0;
+}
+
 /* Collapse Button */
 .wp-core-ui .wp-full-overlay .collapse-sidebar {
        position: fixed;
-       bottom: 8px;
-       right: 10px;
-       padding: 0;
+       bottom: 0;
+       right: 0;
+       padding: 9px 10px 9px 0;
+       height: 45px;
        color: #656a6f;
        outline: 0;
        line-height: 1;
@@ -1455,6 +1442,10 @@ body.full-overlay-active {
        -moz-osx-font-smoothing: grayscale;
 }
 
+.wp-core-ui .wp-full-overlay.collapsed .collapse-sidebar {
+       padding: 9px 10px;
+}
+
 /* rtl:ignore */
 .wp-full-overlay.collapsed .collapse-sidebar-arrow:before,
 .rtl .wp-full-overlay .collapse-sidebar-arrow:before {
@@ -1497,6 +1488,7 @@ body.full-overlay-active {
        width: 300px;
        height: 45px;
        border-top: 1px solid #ddd;
+       background: #eee;
 }
 
 .wp-full-overlay-footer .devices {
@@ -1696,7 +1688,7 @@ body.full-overlay-active {
        max-width: 100%;
 }
 
-.theme-install-overlay .wp-full-overlay-header .theme-install {
+.theme-install-overlay .wp-full-overlay-header .button {
        float: left;
        margin: 8px 0 0 10px;
        /* For when .theme-install is a span rather than a.button-primary (already installed theme) */
@@ -1791,3 +1783,12 @@ body.full-overlay-active {
                line-height: normal;
        }
 }
+
+@media aural {
+       .theme .notice:before,
+       .theme-info .updating-message:before,
+       .theme-info .updated-message:before,
+       .theme-install.updating-message:before {
+               speak: none;
+       }
+}
index d560f6d662e16ace820426803b7fd468b1a6f96b..cdd6a8d4b653f7ef1ed64865c6ed8d2bafb21d85 100644 (file)
@@ -1 +1 @@
-.theme-browser .themes{clear:both}.themes-php .wrap h1{float:right;margin-bottom:15px}.network-admin.themes-php .wrap h1{margin-bottom:0}.themes-php .wrap h1 .button{margin-right:20px}.themes-php .wp-filter-search{position:relative;top:-2px;right:20px;margin:0;width:280px;font-size:16px;font-weight:300;line-height:1.5}.themes-php div.error,.themes-php div.notice,.themes-php div.updated{margin:0 0 20px;clear:both}.theme-browser .theme{cursor:pointer;float:right;margin:0 0 4% 4%;position:relative;width:30.6%;border:1px solid #ddd;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ie8 .theme-browser .theme{width:30%;margin:0 0 4% 3%}.theme-browser .theme:nth-child(3n){margin-left:0}.theme-browser .theme:focus,.theme-browser .theme:hover{cursor:pointer}.theme-browser .theme .theme-name{font-size:15px;font-weight:600;height:18px;margin:0;padding:15px;-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#fff;background:rgba(255,255,255,.65)}.theme-browser .theme .theme-actions{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";opacity:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;position:absolute;bottom:0;left:0;height:38px;padding:9px 10px 0;background:rgba(244,244,244,.7);border-right:1px solid rgba(0,0,0,.05)}.theme-browser .theme.focus .theme-actions,.theme-browser .theme:focus .theme-actions,.theme-browser .theme:hover .theme-actions{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";opacity:1}.theme-browser .theme .theme-actions .button-primary{margin-left:3px}.theme-browser .theme .theme-actions .button-secondary{float:none;margin-right:3px}.theme-browser .theme .theme-screenshot{display:block;overflow:hidden;position:relative;-webkit-backface-visibility:hidden;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.theme-browser .theme .theme-screenshot:after{content:"";display:block;padding-top:66.66666%}.theme-browser .theme .theme-screenshot img{height:auto;position:absolute;right:0;top:0;width:100%;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.theme-browser .theme:focus .theme-screenshot,.theme-browser .theme:hover .theme-screenshot{background:#fff}.theme-browser.rendered .theme:focus .theme-screenshot img,.theme-browser.rendered .theme:hover .theme-screenshot img{opacity:.4}.theme-browser .theme .more-details{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";opacity:0;position:absolute;top:35%;left:25%;right:25%;background:#23282d;background:rgba(0,0,0,.7);color:#fff;font-size:15px;text-shadow:0 1px 0 rgba(0,0,0,.6);-webkit-font-smoothing:antialiased;font-weight:600;padding:15px 12px;text-align:center;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.theme-browser .theme:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.theme-browser .theme:focus .more-details{opacity:1}.theme-browser .theme.active:focus .theme-actions{display:block}.theme-browser.rendered .theme:focus .more-details,.theme-browser.rendered .theme:hover .more-details{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";opacity:1}.theme-browser .theme .theme-installed,.theme-browser .theme .theme-update{background:#d54e21;background:rgba(213,78,33,.95);color:#fff;display:block;font-size:13px;font-weight:400;height:48px;line-height:48px;padding:0 10px;position:absolute;top:0;left:0;right:0;border-bottom:1px solid rgba(0,0,0,.25);overflow:hidden}.theme-browser .theme .theme-installed:before,.theme-browser .theme .theme-update:before{content:"\f463";display:inline-block;font:400 20px/1 dashicons;margin:0 0 0 6px;opacity:.8;position:relative;top:5px;speak:none;-webkit-font-smoothing:antialiased}.theme-browser .theme.active .theme-name{background:#23282d;color:#fff;padding-left:110px;font-weight:300;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.5);box-shadow:inset 0 1px 1px rgba(0,0,0,.5)}.theme-browser .customize-control .theme.active .theme-name{padding-left:15px}.theme-browser .theme.active .theme-name span{font-weight:600}.theme-browser .theme.active .theme-actions{background:rgba(49,49,49,.7);border-right:none;opacity:1}.theme-browser .theme.active .theme-actions .button-primary{margin-left:0}.theme-browser .theme .theme-author{background:#23282d;color:#eee;display:none;font-size:14px;margin:0 10px;padding:5px 10px;position:absolute;bottom:56px}.theme-browser .theme.display-author .theme-author{display:block}.theme-browser .theme.display-author .theme-author a{color:inherit;text-decoration:none}.theme-browser .theme.add-new-theme{border:none;-webkit-box-shadow:none;box-shadow:none}.theme-browser .theme.add-new-theme a{text-decoration:none;display:block;position:relative;z-index:1}.theme-browser .theme.add-new-theme a:after{display:block;content:"";background:0 0;background:rgba(0,0,0,0);position:absolute;top:0;right:0;left:0;bottom:0;padding:0;text-shadow:none;border:5px dashed #d5d2ca;border:5px dashed rgba(0,0,0,.1);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.theme-overlay .theme-actions,.theme-overlay .theme-wrap{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.theme-browser .theme.add-new-theme span:after{background:#e5e5e5;background:rgba(153,153,153,.1);-webkit-border-radius:50%;border-radius:50%;display:inline-block;content:"\f132";-webkit-font-smoothing:antialiased;font:400 74px/115px dashicons;width:100px;height:100px;vertical-align:middle;text-align:center;color:#999;position:absolute;top:30%;right:50%;margin-right:-50px;text-indent:-4px;padding:0;text-shadow:none;z-index:4}.rtl .theme-browser .theme.add-new-theme span:after{text-indent:4px}.theme-browser .theme.add-new-theme a:focus .theme-screenshot,.theme-browser .theme.add-new-theme a:hover .theme-screenshot{background:0 0}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{background:#fff;color:#0073aa}.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{border-color:transparent;color:#fff;background:#0073aa;content:""}.theme-browser .theme.add-new-theme .theme-name{background:0 0;text-align:center;-webkit-box-shadow:none;box-shadow:none;font-weight:400;position:relative;top:0;margin-top:-18px;padding-top:0;padding-bottom:48px}.theme-browser .theme.add-new-theme a:focus .theme-name,.theme-browser .theme.add-new-theme a:hover .theme-name{color:#fff;z-index:2}.theme-overlay .theme-backdrop{position:absolute;right:-20px;left:0;top:0;bottom:0;background:#f1f1f1;background:rgba(238,238,238,.9);z-index:10000}.theme-overlay .theme-header{position:absolute;top:0;right:0;left:0;height:48px;border-bottom:1px solid #ddd}.theme-overlay .theme-header button{padding:0}.theme-overlay .theme-header .close{cursor:pointer;height:48px;width:50px;text-align:center;float:left;border:0;border-right:1px solid #ddd;background-color:transparent;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.theme-overlay .theme-header .close:before{font:400 22px/50px dashicons!important;color:#72777c;display:inline-block;content:"\f335";font-weight:300}.theme-overlay .theme-header .left,.theme-overlay .theme-header .right{cursor:pointer;color:#72777c;background-color:transparent;height:48px;width:54px;float:right;text-align:center;border:0;border-left:1px solid #ddd;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.theme-overlay .theme-header .close:focus,.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:focus,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:focus,.theme-overlay .theme-header .right:hover{background:#ddd;border-color:#ccc;color:#000}.theme-overlay .theme-header .close:focus:before,.theme-overlay .theme-header .close:hover:before{color:#000}.theme-overlay .theme-header .close:focus,.theme-overlay .theme-header .left:focus,.theme-overlay .theme-header .right:focus{-webkit-box-shadow:none;box-shadow:none;outline:0}.theme-overlay .theme-header .left.disabled,.theme-overlay .theme-header .left.disabled:hover,.theme-overlay .theme-header .right.disabled,.theme-overlay .theme-header .right.disabled:hover{color:#ccc;background:inherit;cursor:inherit}.theme-overlay .theme-header .left:before,.theme-overlay .theme-header .right:before{font:400 20px/50px dashicons!important;display:inline;font-weight:300}.customize-support .theme-overlay .theme-actions a[href="themes.php?page=custom-header"],.customize-support .theme-overlay .theme-actions a[href="themes.php?page=custom-background"],.theme-overlay .theme-actions .active-theme,.theme-overlay.active .theme-actions .inactive-theme{display:none}.theme-overlay .theme-header .left:before{content:"\f345"}.theme-overlay .theme-header .right:before{content:"\f341"}.theme-overlay .theme-wrap{clear:both;position:fixed;top:9%;right:190px;left:30px;bottom:3%;background:#fff;-webkit-box-shadow:0 1px 20px 5px rgba(0,0,0,.1);box-shadow:0 1px 20px 5px rgba(0,0,0,.1);z-index:10000;box-sizing:border-box;-webkit-overflow-scrolling:touch}body.folded .theme-overlay .theme-wrap{right:70px}.theme-overlay .theme-about{position:absolute;top:49px;bottom:57px;right:0;left:0;overflow:auto;padding:2% 4%}.theme-overlay .theme-actions{position:absolute;text-align:center;bottom:0;right:0;left:0;padding:10px 25px 5px;background:#f3f3f3;z-index:30;box-sizing:border-box;border-top:1px solid #eee}.theme-overlay .screenshot,.upload-plugin,.upload-theme{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.ie8 .theme-overlay .theme-actions{border:1px solid #eee}.theme-overlay .theme-actions a{margin-left:5px;margin-bottom:5px}.broken-themes a.delete-theme,.theme-overlay .theme-actions .delete-theme{color:#a00;text-decoration:none;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;background:0 0}.theme-overlay .theme-actions .delete-theme{position:absolute;left:10px;bottom:5px}.broken-themes a.delete-theme:focus,.broken-themes a.delete-theme:hover,.theme-overlay .theme-actions .delete-theme:focus,.theme-overlay .theme-actions .delete-theme:hover{background:#d54e21;color:#fff;border-color:#d54e21}.theme-overlay .theme-actions .inactive-theme,.theme-overlay.active .theme-actions .active-theme{display:block}.theme-overlay .theme-screenshots{float:right;margin:0 0 0 30px;width:55%;max-width:880px;text-align:center}.theme-overlay .screenshot{border:1px solid #fff;box-sizing:border-box;overflow:hidden;position:relative;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2)}.theme-overlay .screenshot:after{content:"";display:block;padding-top:75%}.theme-overlay .screenshot img{height:auto;position:absolute;right:0;top:0;width:100%}.theme-overlay.small-screenshot .theme-screenshots{position:absolute;width:302px}.theme-overlay.small-screenshot .theme-info{margin-right:350px;width:auto}.theme-overlay .screenshot.thumb{background:#ccc;border:1px solid #eee;float:none;display:inline-block;margin:10px 5px 0;width:140px;height:80px;cursor:pointer}.theme-overlay .screenshot.thumb:after{content:"";display:block;padding-top:100%}.theme-overlay .screenshot.thumb img{cursor:pointer;position:absolute;right:0;top:0;width:100%;height:auto}.theme-overlay .screenshot.selected{background:0 0;border:2px solid #00a0d2}.theme-overlay .screenshot.selected img{opacity:.8}.theme-browser .theme .theme-screenshot.blank,.theme-overlay .screenshot.blank{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYGWO8d+/efwYkoKioiMRjYGBC4WHhUK6A8T8QIJt8//59ZC493AAAQssKpBK4F5AAAAAASUVORK5CYII=)}.theme-overlay .theme-info{width:40%;float:right}.theme-overlay .current-label{background:#32373c;color:#fff;font-size:11px;display:inline-block;padding:2px 8px;-webkit-border-radius:2px;border-radius:2px;margin:0 0 -10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.theme-overlay .theme-name{color:#23282d;font-size:32px;font-weight:100;margin:10px 0 0;line-height:1.3}.theme-overlay .theme-version{color:#72777c;font-size:13px;font-weight:400;float:none;display:inline-block;margin-right:10px}.theme-overlay .theme-author{margin:15px 0 25px;color:#72777c;font-size:16px;font-weight:400;line-height:inherit}.theme-overlay .theme-author a{text-decoration:none}.theme-overlay .theme-description{color:#555;font-size:15px;font-weight:400;line-height:1.5;margin:30px 0 0}.theme-overlay .theme-tags{border-top:3px solid #eee;color:#82878c;font-size:13px;font-weight:400;margin:30px 0 0;padding-top:20px}.theme-overlay .theme-tags span{color:#444;font-weight:700;margin-left:5px}.theme-overlay .parent-theme{background:#f7fcfe;border:1px solid #eee;border-right:4px solid #00a0d2;font-size:14px;font-weight:400;margin-top:30px;padding:10px 20px 10px 10px}.theme-overlay .parent-theme strong{font-weight:700}.single-theme .theme,.single-theme .theme-overlay .theme-backdrop,.single-theme .theme-overlay .theme-header{display:none}.single-theme .theme-overlay .theme-wrap{clear:both;min-height:330px;position:relative;right:auto;left:auto;top:auto;bottom:auto;z-index:10}.single-theme .theme-overlay .theme-about{padding:30px 30px 70px;position:static}.single-theme .theme-overlay .theme-actions{position:absolute}@media only screen and (min-width:2000px){#wpwrap .theme-browser .theme{width:17.6%;margin:0 0 3% 3%}#wpwrap .theme-browser .theme:nth-child(3n),#wpwrap .theme-browser .theme:nth-child(4n){margin-left:3%}#wpwrap .theme-browser .theme:nth-child(5n){margin-left:0}}@media only screen and (min-width:1680px){.theme-overlay .theme-wrap{width:1450px;margin:0 auto}}@media only screen and (min-width:1640px){.theme-browser .theme{width:22.7%;margin:0 0 3% 3%}.theme-browser .theme .theme-screenshot:after{padding-top:75%}.theme-browser .theme:nth-child(3n){margin-left:3%}.theme-browser .theme:nth-child(4n){margin-left:0}}@media only screen and (max-width:1120px){.theme-browser .theme{width:47.5%;margin-left:0}.theme-browser .theme:nth-child(even){margin-left:0}.theme-browser .theme:nth-child(odd){margin-left:5%}}@media only screen and (max-width:900px){.theme-overlay .theme-wrap{right:65px}}@media only screen and (max-width:780px){.theme-overlay .theme-wrap,body.folded .theme-overlay .theme-wrap{top:0;left:0;bottom:0;right:0;padding:70px 20px 20px;border:none;z-index:100000;position:fixed}.theme-browser .theme.active .theme-name span{display:none}.theme-overlay .theme-screenshots{width:40%}.theme-overlay .theme-info{width:50%}.single-theme .theme-wrap{padding:10px}.theme-browser .theme .theme-actions{padding:5px 10px 4px}.theme-overlay.small-screenshot .theme-screenshots{position:static;float:none;max-width:302px}.theme-overlay.small-screenshot .theme-info{margin-right:0;width:auto}.theme:focus .more-details,.theme:hover .more-details,.theme:not(.active):focus .theme-actions,.theme:not(.active):hover .theme-actions{display:none}.theme-browser.rendered .theme:focus .theme-screenshot img,.theme-browser.rendered .theme:hover .theme-screenshot img{opacity:1}}@media only screen and (max-width:480px){.theme-browser .theme{width:100%;margin-left:0}.theme-browser .theme:nth-child(2n),.theme-browser .theme:nth-child(3n){margin-left:0}}@media only screen and (max-width:650px){.theme-overlay .theme-description,.theme-overlay .theme-update{margin-right:0}.theme-overlay .theme-actions .delete-theme{position:relative;left:auto;bottom:auto}.theme-overlay .theme-actions .inactive-theme{display:inline}.theme-overlay .theme-screenshots{width:100%;float:none}.theme-overlay .theme-info{width:100%}.theme-overlay .theme-author{margin:5px 0 15px}.theme-overlay .current-label{margin-top:10px;font-size:13px}.themes-php .wp-filter-search{float:none;clear:both;right:0;top:0;left:0;margin:10px 0;width:100%;max-width:280px}.theme-browser .theme.add-new-theme span:after{font:400 60px/90px dashicons;width:80px;height:80px;top:30%;right:50%;text-indent:0;margin-right:-40px}.single-theme .theme-wrap{margin:0 -10px 0 -12px;padding:10px}.single-theme .theme-overlay .theme-about{padding:10px;overflow:visible}.single-theme .current-label{display:none}.single-theme .theme-overlay .theme-actions{position:static}}.broken-themes{clear:both}.broken-themes table{text-align:right;width:50%;border-spacing:3px;padding:3px}.theme-browser .theme .theme-installed{background:#0073aa}.theme-browser .theme .theme-installed:before{content:"\f147"}.theme-browser .theme.is-installed .theme-actions .button-primary{display:none!important}.theme-install-php .wp-filter{padding:0 20px}.theme-install-php a.browse-themes,.theme-install-php a.upload{cursor:pointer}.theme-install-php a.browse-themes,.theme-install-php.show-upload-theme a.upload{display:none}.theme-install-php.show-upload-theme a.browse-themes{display:inline}.upload-plugin,.upload-theme{box-sizing:border-box;display:none;margin:0;padding:0;width:100%;overflow:hidden;position:relative;top:10px}.wp-full-overlay,.wp-full-overlay-main,.wp-full-overlay-sidebar{top:0;height:100%;bottom:0;right:0}.upload-plugin,body.show-upload-theme .upload-theme{display:block}body.show-upload-theme .upload-theme+.wp-filter,body.show-upload-theme .upload-theme+.wp-filter+.theme-browser,p.no-themes{display:none}.upload-plugin .wp-upload-form,.upload-theme .wp-upload-form{background:#fafafa;border:1px solid #e5e5e5;padding:30px;margin:30px auto;max-width:380px}.upload-plugin .install-help,.upload-theme .install-help{color:#555d66;font-size:18px;font-style:normal;margin:0;padding:40px 0 0;text-align:center}p.no-themes{clear:both;color:#666;font-size:18px;font-style:normal;margin:0;padding:100px 0;text-align:center}body.no-results p.no-themes{display:block}.theme-install-php .add-new-theme,body.show-upload-theme p.no-themes{display:none!important}@media only screen and (max-width:1120px){.upload-theme .wp-upload-form{margin:20px 0;max-width:100%}.upload-theme .install-help{font-size:15px;padding:20px 0 0;text-align:right}}.theme-details .theme-rating{line-height:23px}.theme-details .star-rating{display:inline}.theme-details .no-rating,.theme-details .num-ratings{font-size:11px;color:#72777c}.theme-details .no-rating{display:block;line-height:20px}.appearance_page_custom-header #headimg{border:1px solid #ddd;overflow:hidden;width:100%}.appearance_page_custom-header #upload-form p label{font-size:12px}.appearance_page_custom-header .available-headers .default-header{float:right;margin:0 0 20px 20px}.appearance_page_custom-header .random-header{clear:both;margin:0 0 20px 20px;vertical-align:middle}.appearance_page_custom-header .available-headers label input,.appearance_page_custom-header .random-header label input{margin-left:10px}.appearance_page_custom-header .available-headers label img{vertical-align:middle}div#custom-background-image{min-height:100px;border:1px solid #ddd}div#custom-background-image img{max-width:400px;max-height:300px}body.full-overlay-active{overflow:hidden}.wp-full-overlay{z-index:500000;position:fixed;overflow:visible;left:0;min-width:0}.wp-full-overlay-sidebar{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;width:300px;padding:0;margin:0;z-index:10;background:#eee;border-left:none}.wp-full-overlay.collapsed,.wp-full-overlay.expanded .wp-full-overlay-sidebar{margin-right:0!important}.wp-full-overlay.expanded{margin-right:300px}.wp-full-overlay.collapsed .wp-full-overlay-sidebar{overflow:visible;margin-right:-300px}.wp-full-overlay-sidebar:after{content:"";display:block;position:absolute;top:0;bottom:0;left:0;width:3px;z-index:1000}.wp-full-overlay-main{position:absolute;left:0}.wp-full-overlay-sidebar .wp-full-overlay-header{position:absolute;right:0;left:0;height:45px;padding:0 15px;line-height:45px;z-index:10;margin:0;border-top:none;-webkit-box-shadow:none;box-shadow:none}.wp-full-overlay-sidebar .wp-full-overlay-header a.back{margin-top:9px}.wp-full-overlay-sidebar .wp-full-overlay-footer{bottom:0;border-bottom:none;border-top:none;-webkit-box-shadow:none;box-shadow:none}.wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{position:absolute;top:45px;bottom:45px;right:0;left:0;overflow:auto}.theme-install-overlay .wp-full-overlay-sidebar .wp-full-overlay-header{padding:0}.theme-install-overlay .close-full-overlay,.theme-install-overlay .next-theme,.theme-install-overlay .previous-theme{display:block;position:relative;float:right;width:45px;height:45px;padding-left:2px;background:#eee;border-left:1px solid #ddd;color:#444;cursor:pointer;text-decoration:none;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.theme-install-overlay .close-full-overlay:focus,.theme-install-overlay .close-full-overlay:hover,.theme-install-overlay .next-theme:focus,.theme-install-overlay .next-theme:hover,.theme-install-overlay .previous-theme:focus,.theme-install-overlay .previous-theme:hover{background:#ddd;border-color:#ccc;color:#000;outline:0;-webkit-box-shadow:none;box-shadow:none}.theme-install-overlay .close-full-overlay:before{font:400 22px/1 dashicons;content:"\f335";position:relative;top:7px;right:13px}.theme-install-overlay .previous-theme:before{font:400 20px/1 dashicons;content:"\f345";position:relative;top:6px;right:14px}.theme-install-overlay .next-theme:before{font:400 20px/1 dashicons;content:"\f341";position:relative;top:6px;right:13px}.theme-install-overlay .next-theme.disabled,.theme-install-overlay .next-theme.disabled:focus,.theme-install-overlay .next-theme.disabled:hover,.theme-install-overlay .previous-theme.disabled,.theme-install-overlay .previous-theme.disabled:focus,.theme-install-overlay .previous-theme.disabled:hover{color:#b4b9be;background:#eee;cursor:default;pointer-events:none}.wp-core-ui .wp-full-overlay .collapse-sidebar{position:fixed;bottom:8px;right:10px;padding:0;color:#656a6f;outline:0;line-height:1;background-color:transparent!important;border:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}.wp-core-ui .wp-full-overlay .collapse-sidebar:focus,.wp-core-ui .wp-full-overlay .collapse-sidebar:hover{color:#0073aa}.wp-full-overlay .collapse-sidebar-arrow,.wp-full-overlay .collapse-sidebar-label{display:inline-block;vertical-align:middle;line-height:20px}.wp-full-overlay .collapse-sidebar-arrow{width:20px;height:20px;margin:0 2px;-webkit-border-radius:50%;border-radius:50%;overflow:hidden}.wp-full-overlay .collapse-sidebar:focus .collapse-sidebar-arrow,.wp-full-overlay .collapse-sidebar:hover .collapse-sidebar-arrow{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.wp-full-overlay .collapse-sidebar-label{margin-right:3px}.wp-full-overlay.collapsed .collapse-sidebar-label{display:none}.wp-full-overlay .collapse-sidebar-arrow:before{display:block;content:"\f148";background:#eee;font:400 20px/1 dashicons;speak:none;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.rtl .wp-full-overlay .collapse-sidebar-arrow:before,.wp-full-overlay.collapsed .collapse-sidebar-arrow:before{-webkit-transform:rotate(180.001deg);-ms-transform:rotate(180.001deg);transform:rotate(180.001deg)}.rtl .wp-full-overlay.collapsed .collapse-sidebar-arrow:before{-webkit-transform:none;-ms-transform:none;transform:none}.wp-full-overlay,.wp-full-overlay .collapse-sidebar,.wp-full-overlay-main,.wp-full-overlay-sidebar{-webkit-transition-property:right,left,top,bottom,width,margin;transition-property:right,left,top,bottom,width,margin;-webkit-transition-duration:.2s;transition-duration:.2s}.wp-full-overlay{background:#191e23}.wp-full-overlay-main{background-color:#f1f1f1}.expanded .wp-full-overlay-footer{position:fixed;bottom:0;right:0;width:300px;height:45px;border-top:1px solid #ddd}.wp-full-overlay-footer .devices{float:left}.wp-full-overlay-footer .devices button{cursor:pointer;background:0 0;border:none;height:45px;padding:0 3px;margin:0 -4px 0 0;-webkit-box-shadow:none;box-shadow:none;border-top:1px solid transparent;border-bottom:4px solid transparent;-webkit-transition:background .1s ease-in-out;transition:background .1s ease-in-out}.wp-full-overlay-footer .devices button:before{display:inline-block;-webkit-font-smoothing:antialiased;font:400 20px/30px dashicons;vertical-align:top;margin:3px 0;padding:4px 8px;color:#656a6f}.wp-full-overlay-footer .devices button.active{border-bottom-color:#191e23}.wp-full-overlay-footer .devices button:focus,.wp-full-overlay-footer .devices button:hover{background-color:#fff}.wp-full-overlay-footer .devices button:focus{-webkit-box-shadow:none;box-shadow:none;outline:0;background-color:#fff;border-bottom-color:#0073aa}.wp-full-overlay-footer .devices button.active:before,.wp-full-overlay-footer .devices button:focus:before,.wp-full-overlay-footer .devices button:hover:before{color:#191e23}.wp-full-overlay-footer .devices .preview-desktop:before{content:"\f472"}.wp-full-overlay-footer .devices .preview-tablet:before{content:"\f471"}.wp-full-overlay-footer .devices .preview-mobile:before{content:"\f470"}@media screen and (max-width:1024px){.wp-full-overlay-footer .devices{display:none}}.collapsed .wp-full-overlay-footer .devices button:before{display:none}.preview-mobile .wp-full-overlay-main{margin:auto -160px auto 0;width:320px;height:480px;max-height:100%;max-width:100%;right:50%}.preview-tablet .wp-full-overlay-main{margin:auto -360px auto 0;width:720px;height:1080px;max-height:100%;max-width:100%;right:50%}.customize-support .hide-if-customize,.customize-support .wp-core-ui .hide-if-customize,.customize-support.wp-core-ui .hide-if-customize,.no-customize-support .hide-if-no-customize,.no-customize-support .wp-core-ui .hide-if-no-customize,.no-customize-support.wp-core-ui .hide-if-no-customize{display:none}#customize-container{display:none;background:#fff;z-index:500000;position:fixed;overflow:visible;top:0;bottom:0;right:0;left:0;height:100%}.customize-active #customize-container{display:block}.customize-loading #customize-container iframe{opacity:0}#customize-container iframe,.theme-install-overlay iframe{height:100%;width:100%;z-index:20;-webkit-transition:opacity .3s;transition:opacity .3s}#customize-controls{margin-top:0}.theme-install-overlay{display:none}.theme-install-overlay.single-theme{display:block}.install-theme-info{display:none;padding:10px 20px 60px}.single-theme .install-theme-info{padding-top:15px}.theme-install-overlay .install-theme-info{display:block}.install-theme-info .theme-install{float:left;margin-top:18px}.install-theme-info .theme-name{font-size:16px;line-height:24px;margin-bottom:0;margin-top:0}.install-theme-info .theme-screenshot{margin:15px 0;width:258px;border:1px solid #ccc}.install-theme-info .theme-details{overflow:hidden}.theme-details .theme-version{margin:15px 0}.theme-details .theme-description{float:right;color:#72777c;line-height:20px;max-width:100%}.theme-install-overlay .wp-full-overlay-header .theme-install{float:left;margin:8px 0 0 10px;line-height:26px}.theme-install-overlay .wp-full-overlay-sidebar{background:#eee;border-left:1px solid #ddd}.theme-install-overlay .wp-full-overlay-sidebar-content{background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.theme-install-overlay .wp-full-overlay-main{position:absolute;z-index:0;background-color:#f1f1f1}.customize-loading #customize-container{background-color:#f1f1f1}#customize-preview.wp-full-overlay-main:before,.customize-loading #customize-container:before,.theme-install-overlay .wp-full-overlay-main:before{content:"";display:block;width:20px;height:20px;position:absolute;right:50%;top:50%;z-index:-1;margin:-10px -10px 0 0;-webkit-transform:translateZ(0);transform:translateZ(0);background:url(../images/spinner.gif) center center no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px}#customize-preview.wp-full-overlay-main.iframe-ready:before,.theme-install-overlay.iframe-ready .wp-full-overlay-main:before{background-image:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.wp-full-overlay .collapse-sidebar-arrow{background-image:url(../images/arrows-2x.png);-webkit-background-size:15px 123px;background-size:15px 123px}#customize-preview.wp-full-overlay-main:before,.customize-loading #customize-container:before,.theme-install-overlay .wp-full-overlay-main:before{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){.available-theme .action-links .delete-theme{float:none;margin:0;padding:0;clear:both}.available-theme .action-links .delete-theme a{padding:0}.broken-themes table{width:100%}.theme-install-overlay .wp-full-overlay-header .theme-install{margin-top:6px;line-height:normal}}
\ No newline at end of file
+.theme-browser .themes{clear:both}.themes-php:not(.network-admin) .wrap h1{margin-bottom:15px}.themes-php .wrap h1 .button{margin-right:20px}.themes-php .wp-filter-search{position:relative;top:-2px;right:20px;margin:0;width:280px;font-size:16px;font-weight:300;line-height:1.5}.theme .notice,.theme .notice.is-dismissible{right:0;margin:0;position:absolute;left:0;top:0}.theme-browser .theme{cursor:pointer;float:right;margin:0 0 4% 4%;position:relative;width:30.6%;border:1px solid #ddd;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ie8 .theme-browser .theme{width:30%;margin:0 0 4% 3%}.theme-browser .theme:nth-child(3n){margin-left:0}.theme-browser .theme:focus,.theme-browser .theme:hover{cursor:pointer}.theme-browser .theme .theme-name{font-size:15px;font-weight:600;height:18px;margin:0;padding:15px;-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#fff;background:rgba(255,255,255,.65)}.theme-browser .theme .theme-actions{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";opacity:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;position:absolute;bottom:0;left:0;height:38px;padding:9px 10px 0;background:rgba(244,244,244,.7);border-right:1px solid rgba(0,0,0,.05)}.theme-browser .theme.focus .theme-actions,.theme-browser .theme:focus .theme-actions,.theme-browser .theme:hover .theme-actions{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";opacity:1}.theme-browser .theme .theme-actions .button-primary{margin-left:3px}.theme-browser .theme .theme-actions .button-secondary{float:none;margin-right:3px}.theme-browser .theme .theme-screenshot{display:block;overflow:hidden;position:relative;-webkit-backface-visibility:hidden;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.theme-browser .theme .theme-screenshot:after{content:"";display:block;padding-top:66.66666%}.theme-browser .theme .theme-screenshot img{height:auto;position:absolute;right:0;top:0;width:100%;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.theme-browser .theme:focus .theme-screenshot,.theme-browser .theme:hover .theme-screenshot{background:#fff}.theme-browser.rendered .theme:focus .theme-screenshot img,.theme-browser.rendered .theme:hover .theme-screenshot img{opacity:.4}.theme-browser .theme .more-details{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";opacity:0;position:absolute;top:35%;left:20%;right:20%;background:#23282d;background:rgba(0,0,0,.7);color:#fff;font-size:15px;text-shadow:0 1px 0 rgba(0,0,0,.6);-webkit-font-smoothing:antialiased;font-weight:600;padding:15px 12px;text-align:center;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.theme-browser .theme:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.theme-browser .theme:focus .more-details{opacity:1}.theme-browser .theme.active:focus .theme-actions{display:block}.theme-browser.rendered .theme:focus .more-details,.theme-browser.rendered .theme:hover .more-details{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";opacity:1}.theme-browser .theme.active .theme-name{background:#23282d;color:#fff;padding-left:110px;font-weight:300;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.5);box-shadow:inset 0 1px 1px rgba(0,0,0,.5)}.theme-browser .customize-control .theme.active .theme-name{padding-left:15px}.theme-browser .theme.active .theme-name span{font-weight:600}.theme-browser .theme.active .theme-actions{background:rgba(49,49,49,.7);border-right:none;opacity:1}.theme-browser .theme.active .theme-actions .button-primary{margin-left:0}.theme-browser .theme .theme-author{background:#23282d;color:#eee;display:none;font-size:14px;margin:0 10px;padding:5px 10px;position:absolute;bottom:56px}.theme-browser .theme.display-author .theme-author{display:block}.theme-browser .theme.display-author .theme-author a{color:inherit;text-decoration:none}.theme-browser .theme.add-new-theme{border:none;-webkit-box-shadow:none;box-shadow:none}.theme-browser .theme.add-new-theme a{text-decoration:none;display:block;position:relative;z-index:1}.theme-browser .theme.add-new-theme a:after{display:block;content:"";background:0 0;background:rgba(0,0,0,0);position:absolute;top:0;right:0;left:0;bottom:0;padding:0;text-shadow:none;border:5px dashed #d5d2ca;border:5px dashed rgba(0,0,0,.1);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.theme-overlay .theme-actions,.theme-overlay .theme-wrap{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.theme-browser .theme.add-new-theme span:after{background:#e5e5e5;background:rgba(153,153,153,.1);-webkit-border-radius:50%;border-radius:50%;display:inline-block;content:"\f132";-webkit-font-smoothing:antialiased;font:400 74px/115px dashicons;width:100px;height:100px;vertical-align:middle;text-align:center;color:#999;position:absolute;top:30%;right:50%;margin-right:-50px;text-indent:-4px;padding:0;text-shadow:none;z-index:4}.rtl .theme-browser .theme.add-new-theme span:after{text-indent:4px}.theme-browser .theme.add-new-theme a:focus .theme-screenshot,.theme-browser .theme.add-new-theme a:hover .theme-screenshot{background:0 0}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{background:#fff;color:#0073aa}.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{border-color:transparent;color:#fff;background:#0073aa;content:""}.theme-browser .theme.add-new-theme .theme-name{background:0 0;text-align:center;-webkit-box-shadow:none;box-shadow:none;font-weight:400;position:relative;top:0;margin-top:-18px;padding-top:0;padding-bottom:48px}.theme-browser .theme.add-new-theme a:focus .theme-name,.theme-browser .theme.add-new-theme a:hover .theme-name{color:#fff;z-index:2}.theme-overlay .theme-backdrop{position:absolute;right:-20px;left:0;top:0;bottom:0;background:#f1f1f1;background:rgba(238,238,238,.9);z-index:10000}.theme-overlay .theme-header .close,.theme-overlay .theme-header .left,.theme-overlay .theme-header .right{cursor:pointer;background-color:transparent;height:48px;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;text-align:center}.theme-overlay .theme-header{position:absolute;top:0;right:0;left:0;height:48px;border-bottom:1px solid #ddd}.theme-overlay .theme-header button{padding:0}.theme-overlay .theme-header .close{width:50px;float:left;border:0;border-right:1px solid #ddd;transition:color .1s ease-in-out,background .1s ease-in-out}.theme-overlay .theme-header .close:before{font:400 22px/50px dashicons!important;color:#72777c;display:inline-block;content:"\f335";font-weight:300}.theme-overlay .theme-header .left,.theme-overlay .theme-header .right{color:#72777c;width:54px;float:right;border:0;border-left:1px solid #ddd;transition:color .1s ease-in-out,background .1s ease-in-out}.theme-overlay .theme-header .close:focus,.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:focus,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:focus,.theme-overlay .theme-header .right:hover{background:#ddd;border-color:#ccc;color:#000}.theme-overlay .theme-header .close:focus:before,.theme-overlay .theme-header .close:hover:before{color:#000}.theme-overlay .theme-header .close:focus,.theme-overlay .theme-header .left:focus,.theme-overlay .theme-header .right:focus{-webkit-box-shadow:none;box-shadow:none;outline:0}.theme-overlay .theme-header .left.disabled,.theme-overlay .theme-header .left.disabled:hover,.theme-overlay .theme-header .right.disabled,.theme-overlay .theme-header .right.disabled:hover{color:#ccc;background:inherit;cursor:inherit}.theme-overlay .theme-header .left:before,.theme-overlay .theme-header .right:before{font:400 20px/50px dashicons!important;display:inline;font-weight:300}.customize-support .theme-overlay .theme-actions a[href="themes.php?page=custom-header"],.customize-support .theme-overlay .theme-actions a[href="themes.php?page=custom-background"],.theme-overlay .theme-actions .active-theme,.theme-overlay.active .theme-actions .inactive-theme{display:none}.theme-overlay .theme-header .left:before{content:"\f345"}.theme-overlay .theme-header .right:before{content:"\f341"}.theme-overlay .theme-wrap{clear:both;position:fixed;top:9%;right:190px;left:30px;bottom:3%;background:#fff;-webkit-box-shadow:0 1px 20px 5px rgba(0,0,0,.1);box-shadow:0 1px 20px 5px rgba(0,0,0,.1);z-index:10000;box-sizing:border-box;-webkit-overflow-scrolling:touch}body.folded .theme-browser~.theme-overlay .theme-wrap{right:70px}.theme-overlay .theme-about{position:absolute;top:49px;bottom:57px;right:0;left:0;overflow:auto;padding:2% 4%}.theme-overlay .theme-actions{position:absolute;text-align:center;bottom:0;right:0;left:0;padding:10px 25px 5px;background:#f3f3f3;z-index:30;box-sizing:border-box;border-top:1px solid #eee}.theme-overlay .screenshot,.upload-plugin,.upload-theme{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.ie8 .theme-overlay .theme-actions{border:1px solid #eee}.theme-overlay .theme-actions a{margin-left:5px;margin-bottom:5px}.broken-themes a.delete-theme,.theme-overlay .theme-actions .delete-theme{color:#a00;text-decoration:none;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;background:0 0}.theme-overlay .theme-actions .delete-theme{position:absolute;left:10px;bottom:5px}.broken-themes a.delete-theme:focus,.broken-themes a.delete-theme:hover,.theme-overlay .theme-actions .delete-theme:focus,.theme-overlay .theme-actions .delete-theme:hover{background:#d54e21;color:#fff;border-color:#d54e21}.theme-overlay .theme-actions .inactive-theme,.theme-overlay.active .theme-actions .active-theme{display:block}.theme-overlay .theme-screenshots{float:right;margin:0 0 0 30px;width:55%;max-width:880px;text-align:center}.theme-overlay .screenshot{border:1px solid #fff;box-sizing:border-box;overflow:hidden;position:relative;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2)}.theme-overlay .screenshot:after{content:"";display:block;padding-top:75%}.theme-overlay .screenshot img{height:auto;position:absolute;right:0;top:0;width:100%}.theme-overlay.small-screenshot .theme-screenshots{position:absolute;width:302px}.theme-overlay.small-screenshot .theme-info{margin-right:350px;width:auto}.theme-overlay .screenshot.thumb{background:#ccc;border:1px solid #eee;float:none;display:inline-block;margin:10px 5px 0;width:140px;height:80px;cursor:pointer}.theme-overlay .screenshot.thumb:after{content:"";display:block;padding-top:100%}.theme-overlay .screenshot.thumb img{cursor:pointer;position:absolute;right:0;top:0;width:100%;height:auto}.theme-overlay .screenshot.selected{background:0 0;border:2px solid #00a0d2}.theme-overlay .screenshot.selected img{opacity:.8}.theme-browser .theme .theme-screenshot.blank,.theme-overlay .screenshot.blank{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYGWO8d+/efwYkoKioiMRjYGBC4WHhUK6A8T8QIJt8//59ZC493AAAQssKpBK4F5AAAAAASUVORK5CYII=)}.theme-overlay .theme-info{width:40%;float:right}.theme-overlay .current-label{background:#32373c;color:#fff;font-size:11px;display:inline-block;padding:2px 8px;-webkit-border-radius:2px;border-radius:2px;margin:0 0 -10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.theme-overlay .theme-name{color:#23282d;font-size:32px;font-weight:100;margin:10px 0 0;line-height:1.3;word-wrap:break-word;overflow-wrap:break-word}.theme-overlay .theme-version{color:#72777c;font-size:13px;font-weight:400;float:none;display:inline-block;margin-right:10px}.theme-overlay .theme-author{margin:15px 0 25px;color:#72777c;font-size:16px;font-weight:400;line-height:inherit}.theme-overlay .theme-author a{text-decoration:none}.theme-overlay .theme-description{color:#555;font-size:15px;font-weight:400;line-height:1.5;margin:30px 0 0}.theme-overlay .theme-tags{border-top:3px solid #eee;color:#82878c;font-size:13px;font-weight:400;margin:30px 0 0;padding-top:20px}.theme-overlay .theme-tags span{color:#444;font-weight:600;margin-left:5px}.theme-overlay .parent-theme{background:#f7fcfe;border:1px solid #eee;border-right:4px solid #00a0d2;font-size:14px;font-weight:400;margin-top:30px;padding:10px 20px 10px 10px}.theme-overlay .parent-theme strong{font-weight:700}.single-theme .theme,.single-theme .theme-overlay .theme-backdrop,.single-theme .theme-overlay .theme-header{display:none}.single-theme .theme-overlay .theme-wrap{clear:both;min-height:330px;position:relative;right:auto;left:auto;top:auto;bottom:auto;z-index:10}.single-theme .theme-overlay .theme-about{padding:30px 30px 70px;position:static}.single-theme .theme-overlay .theme-actions{position:absolute}@media only screen and (min-width:2000px){#wpwrap .theme-browser .theme{width:17.6%;margin:0 0 3% 3%}#wpwrap .theme-browser .theme:nth-child(3n),#wpwrap .theme-browser .theme:nth-child(4n){margin-left:3%}#wpwrap .theme-browser .theme:nth-child(5n){margin-left:0}}@media only screen and (min-width:1680px){.theme-overlay .theme-wrap{width:1450px;margin:0 auto}}@media only screen and (min-width:1640px){.theme-browser .theme{width:22.7%;margin:0 0 3% 3%}.theme-browser .theme .theme-screenshot:after{padding-top:75%}.theme-browser .theme:nth-child(3n){margin-left:3%}.theme-browser .theme:nth-child(4n){margin-left:0}}@media only screen and (max-width:1120px){.theme-browser .theme{width:47.5%;margin-left:0}.theme-browser .theme:nth-child(even){margin-left:0}.theme-browser .theme:nth-child(odd){margin-left:5%}}@media only screen and (max-width:900px){.theme-overlay .theme-wrap{right:65px}}@media only screen and (max-width:780px){.theme-overlay .theme-wrap,body.folded .theme-overlay .theme-wrap{top:0;left:0;bottom:0;right:0;padding:70px 20px 20px;border:none;z-index:100000;position:fixed}.theme-browser .theme.active .theme-name span{display:none}.theme-overlay .theme-screenshots{width:40%}.theme-overlay .theme-info{width:50%}.single-theme .theme-wrap{padding:10px}.theme-browser .theme .theme-actions{padding:5px 10px 4px}.theme-overlay.small-screenshot .theme-screenshots{position:static;float:none;max-width:302px}.theme-overlay.small-screenshot .theme-info{margin-right:0;width:auto}.theme:focus .more-details,.theme:hover .more-details,.theme:not(.active):focus .theme-actions,.theme:not(.active):hover .theme-actions{display:none}.theme-browser.rendered .theme:focus .theme-screenshot img,.theme-browser.rendered .theme:hover .theme-screenshot img{opacity:1}}@media only screen and (max-width:480px){.theme-browser .theme{width:100%;margin-left:0}.theme-browser .theme:nth-child(2n),.theme-browser .theme:nth-child(3n){margin-left:0}}@media only screen and (max-width:650px){.theme-overlay .theme-description{margin-right:0}.theme-overlay .theme-actions .delete-theme{position:relative;left:auto;bottom:auto}.theme-overlay .theme-actions .inactive-theme{display:inline}.theme-overlay .theme-screenshots{width:100%;float:none}.theme-overlay .theme-info{width:100%}.theme-overlay .theme-author{margin:5px 0 15px}.theme-overlay .current-label{margin-top:10px;font-size:13px}.themes-php .wp-filter-search{float:none;clear:both;right:0;top:0;left:0;margin:10px 0;width:100%;max-width:280px}.theme-browser .theme.add-new-theme span:after{font:400 60px/90px dashicons;width:80px;height:80px;top:30%;right:50%;text-indent:0;margin-right:-40px}.single-theme .theme-wrap{margin:0 -10px 0 -12px;padding:10px}.single-theme .theme-overlay .theme-about{padding:10px;overflow:visible}.single-theme .current-label{display:none}.single-theme .theme-overlay .theme-actions{position:static}}.broken-themes{clear:both}.broken-themes table{text-align:right;width:50%;border-spacing:3px;padding:3px}.theme-browser .theme .theme-installed{background:#0073aa}.theme-browser .theme .notice-success p:before{color:#79ba49;content:"\f147";display:inline-block;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}.theme-install.updated-message:before{content:''}.theme-install-php .wp-filter{padding:0 20px}.theme-install-php a.browse-themes,.theme-install-php a.upload{cursor:pointer}.plugin-install-tab-upload .upload-view-toggle .upload,.upload-view-toggle .browse{display:none}.plugin-install-tab-upload .upload-view-toggle .browse{display:inline}.upload-plugin,.upload-theme{box-sizing:border-box;display:none;margin:0;padding:50px 0;width:100%;overflow:hidden;position:relative;top:10px}.wp-full-overlay,.wp-full-overlay-main,.wp-full-overlay-sidebar{top:0;height:100%;bottom:0;right:0}.upload-plugin-wrap{display:none}.plugin-install-tab-upload .upload-plugin,.show-upload-view .upload-plugin,.show-upload-view .upload-plugin-wrap,.show-upload-view .upload-theme{display:block}.upload-plugin .wp-upload-form,.upload-theme .wp-upload-form{background:#fafafa;border:1px solid #e5e5e5;padding:30px;margin:30px auto;max-width:380px}.upload-plugin .install-help,.upload-theme .install-help{color:#555d66;font-size:18px;font-style:normal;margin:0;padding:0;text-align:center}p.no-themes{clear:both;color:#666;font-size:18px;font-style:normal;margin:0;padding:100px 0;text-align:center;display:none}.no-results p.no-themes{display:block}.theme-install-php .add-new-theme{display:none!important}@media only screen and (max-width:1120px){.upload-theme .wp-upload-form{margin:20px 0;max-width:100%}.upload-theme .install-help{font-size:15px;padding:20px 0 0;text-align:right}}.theme-details .theme-rating{line-height:23px}.theme-details .star-rating{display:inline}.theme-details .no-rating,.theme-details .num-ratings{font-size:11px;color:#72777c}.theme-details .no-rating{display:block;line-height:20px}.appearance_page_custom-header #headimg{border:1px solid #ddd;overflow:hidden;width:100%}.appearance_page_custom-header #upload-form p label{font-size:12px}.appearance_page_custom-header .available-headers .default-header{float:right;margin:0 0 20px 20px}.appearance_page_custom-header .random-header{clear:both;margin:0 0 20px 20px;vertical-align:middle}.appearance_page_custom-header .available-headers label input,.appearance_page_custom-header .random-header label input{margin-left:10px}.appearance_page_custom-header .available-headers label img{vertical-align:middle}div#custom-background-image{min-height:100px;border:1px solid #ddd}div#custom-background-image img{max-width:400px;max-height:300px}body.full-overlay-active{overflow:hidden}.wp-full-overlay{z-index:500000;position:fixed;overflow:visible;left:0;min-width:0}.wp-full-overlay-sidebar{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;width:300px;padding:0;margin:0;z-index:10;background:#eee;border-left:none}.wp-full-overlay.collapsed,.wp-full-overlay.expanded .wp-full-overlay-sidebar{margin-right:0!important}.wp-full-overlay.expanded{margin-right:300px}.wp-full-overlay.collapsed .wp-full-overlay-sidebar{overflow:visible;margin-right:-300px}.wp-full-overlay-sidebar:after{content:"";display:block;position:absolute;top:0;bottom:0;left:0;width:3px;z-index:1000}.wp-full-overlay-main{position:absolute;left:0}.wp-full-overlay-sidebar .wp-full-overlay-header{position:absolute;right:0;left:0;height:45px;padding:0 15px;line-height:45px;z-index:10;margin:0;border-top:none;-webkit-box-shadow:none;box-shadow:none}.wp-full-overlay-sidebar .wp-full-overlay-header a.back{margin-top:9px}.wp-full-overlay-sidebar .wp-full-overlay-footer{bottom:0;border-bottom:none;border-top:none;-webkit-box-shadow:none;box-shadow:none}.wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{position:absolute;top:45px;bottom:45px;right:0;left:0;overflow:auto}.theme-install-overlay .wp-full-overlay-sidebar .wp-full-overlay-header{padding:0}.theme-install-overlay .close-full-overlay,.theme-install-overlay .next-theme,.theme-install-overlay .previous-theme{display:block;position:relative;float:right;width:45px;height:45px;padding-left:2px;background:#eee;border-left:1px solid #ddd;color:#444;cursor:pointer;text-decoration:none;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.theme-install-overlay .close-full-overlay:focus,.theme-install-overlay .close-full-overlay:hover,.theme-install-overlay .next-theme:focus,.theme-install-overlay .next-theme:hover,.theme-install-overlay .previous-theme:focus,.theme-install-overlay .previous-theme:hover{background:#ddd;border-color:#ccc;color:#000;outline:0;-webkit-box-shadow:none;box-shadow:none}.theme-install-overlay .close-full-overlay:before{font:400 22px/1 dashicons;content:"\f335";position:relative;top:7px;right:13px}.theme-install-overlay .previous-theme:before{font:400 20px/1 dashicons;content:"\f345";position:relative;top:6px;right:14px}.theme-install-overlay .next-theme:before{font:400 20px/1 dashicons;content:"\f341";position:relative;top:6px;right:13px}.theme-install-overlay .next-theme.disabled,.theme-install-overlay .next-theme.disabled:focus,.theme-install-overlay .next-theme.disabled:hover,.theme-install-overlay .previous-theme.disabled,.theme-install-overlay .previous-theme.disabled:focus,.theme-install-overlay .previous-theme.disabled:hover{color:#b4b9be;background:#eee;cursor:default;pointer-events:none}.theme-install-overlay .close-full-overlay,.theme-install-overlay .next-theme,.theme-install-overlay .previous-theme{border-right:0;border-top:0;border-bottom:0}.theme-install-overlay .close-full-overlay:before,.theme-install-overlay .next-theme:before,.theme-install-overlay .previous-theme:before{top:2px;right:0}.wp-core-ui .wp-full-overlay .collapse-sidebar{position:fixed;bottom:0;right:0;padding:9px 10px 9px 0;height:45px;color:#656a6f;outline:0;line-height:1;background-color:transparent!important;border:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}.wp-core-ui .wp-full-overlay .collapse-sidebar:focus,.wp-core-ui .wp-full-overlay .collapse-sidebar:hover{color:#0073aa}.wp-full-overlay .collapse-sidebar-arrow,.wp-full-overlay .collapse-sidebar-label{display:inline-block;vertical-align:middle;line-height:20px}.wp-full-overlay .collapse-sidebar-arrow{width:20px;height:20px;margin:0 2px;-webkit-border-radius:50%;border-radius:50%;overflow:hidden}.wp-full-overlay .collapse-sidebar:focus .collapse-sidebar-arrow,.wp-full-overlay .collapse-sidebar:hover .collapse-sidebar-arrow{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.wp-full-overlay .collapse-sidebar-label{margin-right:3px}.wp-full-overlay.collapsed .collapse-sidebar-label{display:none}.wp-full-overlay .collapse-sidebar-arrow:before{display:block;content:"\f148";background:#eee;font:400 20px/1 dashicons;speak:none;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-core-ui .wp-full-overlay.collapsed .collapse-sidebar{padding:9px 10px}.rtl .wp-full-overlay .collapse-sidebar-arrow:before,.wp-full-overlay.collapsed .collapse-sidebar-arrow:before{-webkit-transform:rotate(180.001deg);-ms-transform:rotate(180.001deg);transform:rotate(180.001deg)}.rtl .wp-full-overlay.collapsed .collapse-sidebar-arrow:before{-webkit-transform:none;-ms-transform:none;transform:none}.wp-full-overlay,.wp-full-overlay .collapse-sidebar,.wp-full-overlay-main,.wp-full-overlay-sidebar{-webkit-transition-property:right,left,top,bottom,width,margin;transition-property:right,left,top,bottom,width,margin;-webkit-transition-duration:.2s;transition-duration:.2s}.wp-full-overlay{background:#191e23}.wp-full-overlay-main{background-color:#f1f1f1}.expanded .wp-full-overlay-footer{position:fixed;bottom:0;right:0;width:300px;height:45px;border-top:1px solid #ddd;background:#eee}.wp-full-overlay-footer .devices{float:left}.wp-full-overlay-footer .devices button{cursor:pointer;background:0 0;border:none;height:45px;padding:0 3px;margin:0 -4px 0 0;-webkit-box-shadow:none;box-shadow:none;border-top:1px solid transparent;border-bottom:4px solid transparent;-webkit-transition:background .1s ease-in-out;transition:background .1s ease-in-out}.wp-full-overlay-footer .devices button:before{display:inline-block;-webkit-font-smoothing:antialiased;font:400 20px/30px dashicons;vertical-align:top;margin:3px 0;padding:4px 8px;color:#656a6f}.wp-full-overlay-footer .devices button.active{border-bottom-color:#191e23}.wp-full-overlay-footer .devices button:focus,.wp-full-overlay-footer .devices button:hover{background-color:#fff}.wp-full-overlay-footer .devices button:focus{-webkit-box-shadow:none;box-shadow:none;outline:0;background-color:#fff;border-bottom-color:#0073aa}.wp-full-overlay-footer .devices button.active:before,.wp-full-overlay-footer .devices button:focus:before,.wp-full-overlay-footer .devices button:hover:before{color:#191e23}.wp-full-overlay-footer .devices .preview-desktop:before{content:"\f472"}.wp-full-overlay-footer .devices .preview-tablet:before{content:"\f471"}.wp-full-overlay-footer .devices .preview-mobile:before{content:"\f470"}@media screen and (max-width:1024px){.wp-full-overlay-footer .devices{display:none}}.collapsed .wp-full-overlay-footer .devices button:before{display:none}.preview-mobile .wp-full-overlay-main{margin:auto -160px auto 0;width:320px;height:480px;max-height:100%;max-width:100%;right:50%}.preview-tablet .wp-full-overlay-main{margin:auto -360px auto 0;width:720px;height:1080px;max-height:100%;max-width:100%;right:50%}.customize-support .hide-if-customize,.customize-support .wp-core-ui .hide-if-customize,.customize-support.wp-core-ui .hide-if-customize,.no-customize-support .hide-if-no-customize,.no-customize-support .wp-core-ui .hide-if-no-customize,.no-customize-support.wp-core-ui .hide-if-no-customize{display:none}#customize-container{display:none;background:#fff;z-index:500000;position:fixed;overflow:visible;top:0;bottom:0;right:0;left:0;height:100%}.customize-active #customize-container{display:block}.customize-loading #customize-container iframe{opacity:0}#customize-container iframe,.theme-install-overlay iframe{height:100%;width:100%;z-index:20;-webkit-transition:opacity .3s;transition:opacity .3s}#customize-controls{margin-top:0}.theme-install-overlay{display:none}.theme-install-overlay.single-theme{display:block}.install-theme-info{display:none;padding:10px 20px 60px}.single-theme .install-theme-info{padding-top:15px}.theme-install-overlay .install-theme-info{display:block}.install-theme-info .theme-install{float:left;margin-top:18px}.install-theme-info .theme-name{font-size:16px;line-height:24px;margin-bottom:0;margin-top:0}.install-theme-info .theme-screenshot{margin:15px 0;width:258px;border:1px solid #ccc}.install-theme-info .theme-details{overflow:hidden}.theme-details .theme-version{margin:15px 0}.theme-details .theme-description{float:right;color:#72777c;line-height:20px;max-width:100%}.theme-install-overlay .wp-full-overlay-header .button{float:left;margin:8px 0 0 10px;line-height:26px}.theme-install-overlay .wp-full-overlay-sidebar{background:#eee;border-left:1px solid #ddd}.theme-install-overlay .wp-full-overlay-sidebar-content{background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.theme-install-overlay .wp-full-overlay-main{position:absolute;z-index:0;background-color:#f1f1f1}.customize-loading #customize-container{background-color:#f1f1f1}#customize-preview.wp-full-overlay-main:before,.customize-loading #customize-container:before,.theme-install-overlay .wp-full-overlay-main:before{content:"";display:block;width:20px;height:20px;position:absolute;right:50%;top:50%;z-index:-1;margin:-10px -10px 0 0;-webkit-transform:translateZ(0);transform:translateZ(0);background:url(../images/spinner.gif) center center no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px}#customize-preview.wp-full-overlay-main.iframe-ready:before,.theme-install-overlay.iframe-ready .wp-full-overlay-main:before{background-image:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.wp-full-overlay .collapse-sidebar-arrow{background-image:url(../images/arrows-2x.png);-webkit-background-size:15px 123px;background-size:15px 123px}#customize-preview.wp-full-overlay-main:before,.customize-loading #customize-container:before,.theme-install-overlay .wp-full-overlay-main:before{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){.available-theme .action-links .delete-theme{float:none;margin:0;padding:0;clear:both}.available-theme .action-links .delete-theme a{padding:0}.broken-themes table{width:100%}.theme-install-overlay .wp-full-overlay-header .theme-install{margin-top:6px;line-height:normal}}@media aural{.theme .notice:before,.theme-info .updated-message:before,.theme-info .updating-message:before,.theme-install.updating-message:before{speak:none}}
\ No newline at end of file
index 4947567d54355092713cd9f3eb92c97cb144a137..ab67ad0646fcc1a89b9e76b35f7aec9eb805385f 100644 (file)
        clear: both;
 }
 
-.themes-php .wrap h1 {
-       float: left;
+.themes-php:not(.network-admin) .wrap h1 {
        margin-bottom: 15px;
 }
 
-.network-admin.themes-php .wrap h1 {
-       margin-bottom: 0;
-}
-
 .themes-php .wrap h1 .button {
        margin-left: 20px;
 }
 }
 
 /* Position admin messages */
-.themes-php div.updated,
-.themes-php div.error,
-.themes-php div.notice {
-       margin: 0 0 20px 0;
-       clear: both;
+.theme .notice,
+.theme .notice.is-dismissible {
+       left: 0;
+       margin: 0;
+       position: absolute;
+       right: 0;
+       top: 0;
 }
 
 /**
        opacity: 0;
        position: absolute;
        top: 35%;
-       right: 25%;
-       left: 25%;
+       right: 20%;
+       left: 20%;
        background: #23282d;
        background: rgba(0,0,0,0.7);
        color: #fff;
        opacity: 1;
 }
 
-/**
- * Displays a theme update notice
- * when an update is available.
- */
-.theme-browser .theme .theme-update,
-.theme-browser .theme .theme-installed {
-       background: #d54e21;
-       background: rgba(213, 78, 33, 0.95);
-       color: #fff;
-       display: block;
-       font-size: 13px;
-       font-weight: 400;
-       height: 48px;
-       line-height: 48px;
-       padding: 0 10px;
-       position: absolute;
-       top: 0;
-       right: 0;
-       left: 0;
-       border-bottom: 1px solid rgba(0,0,0,0.25);
-       overflow: hidden;
-}
-
-.theme-browser .theme .theme-update:before,
-.theme-browser .theme .theme-installed:before {
-       content: "\f463";
-       display: inline-block;
-       font: normal 20px/1 dashicons;
-       margin: 0 6px 0 0;
-       opacity: 0.8;
-       position: relative;
-       top: 5px;
-       speak: none;
-       -webkit-font-smoothing: antialiased;
-}
-
-
 /**
  * The currently active theme
  */
        -webkit-overflow-scrolling: touch;
 }
 
-body.folded .theme-overlay .theme-wrap {
+body.folded .theme-browser ~ .theme-overlay .theme-wrap {
        left: 70px;
 }
 
@@ -721,6 +681,8 @@ body.folded .theme-overlay .theme-wrap {
        font-weight: 100;
        margin: 10px 0 0;
        line-height: 1.3;
+       word-wrap: break-word;
+       overflow-wrap: break-word;
 }
 
 .theme-overlay .theme-version {
@@ -763,7 +725,7 @@ body.folded .theme-overlay .theme-wrap {
 
 .theme-overlay .theme-tags span {
        color: #444;
-       font-weight: bold;
+       font-weight: 600;
        margin-right: 5px;
 }
 
@@ -772,7 +734,7 @@ body.folded .theme-overlay .theme-wrap {
        border: 1px solid #eee;
        border-left: 4px solid #00a0d2;
        font-size: 14px;
-       font-weight: normal;
+       font-weight: 400;
        margin-top: 30px;
        padding: 10px 10px 10px 20px;
 }
@@ -951,7 +913,6 @@ body.folded .theme-overlay .theme-wrap {
 }
 
 @media only screen and (max-width: 650px) {
-       .theme-overlay .theme-update,
        .theme-overlay .theme-description {
                margin-left: 0;
        }
@@ -1041,11 +1002,18 @@ body.folded .theme-overlay .theme-wrap {
 .theme-browser .theme .theme-installed {
        background: #0073aa;
 }
-.theme-browser .theme .theme-installed:before {
+.theme-browser .theme .notice-success p:before {
+       color: #79ba49;
        content: "\f147";
+       display: inline-block;
+       font: normal 20px/1 'dashicons';
+       -webkit-font-smoothing: antialiased;
+       -moz-osx-font-smoothing: grayscale;
+       vertical-align: top;
 }
-.theme-browser .theme.is-installed .theme-actions .button-primary {
-       display: none !important;
+
+.theme-install.updated-message:before {
+       content: '';
 }
 
 .theme-install-php .wp-filter {
@@ -1056,13 +1024,16 @@ body.folded .theme-overlay .theme-wrap {
 .theme-install-php a.browse-themes {
        cursor: pointer;
 }
-.theme-install-php a.browse-themes,
-.theme-install-php.show-upload-theme a.upload {
+
+.upload-view-toggle .browse,
+.plugin-install-tab-upload .upload-view-toggle .upload {
        display: none;
 }
-.theme-install-php.show-upload-theme a.browse-themes {
+
+.plugin-install-tab-upload .upload-view-toggle .browse {
        display: inline;
 }
+
 .upload-theme,
 .upload-plugin {
        -webkit-box-sizing: border-box;
@@ -1070,16 +1041,24 @@ body.folded .theme-overlay .theme-wrap {
        box-sizing: border-box;
        display: none;
        margin: 0;
-       padding: 0;
+       padding: 50px 0;
        width: 100%;
        overflow: hidden;
        position: relative;
        top: 10px;
 }
-body.show-upload-theme .upload-theme,
-.upload-plugin {
+
+.upload-plugin-wrap {
+       display: none;
+}
+
+.show-upload-view .upload-theme,
+.show-upload-view .upload-plugin,
+.show-upload-view .upload-plugin-wrap,
+.plugin-install-tab-upload .upload-plugin {
        display: block;
 }
+
 .upload-theme .wp-upload-form,
 .upload-plugin .wp-upload-form {
        background: #fafafa;
@@ -1094,13 +1073,9 @@ body.show-upload-theme .upload-theme,
        font-size: 18px;
        font-style: normal;
        margin: 0;
-       padding: 40px 0 0;
+       padding: 0;
        text-align: center;
 }
-body.show-upload-theme .upload-theme + .wp-filter,
-body.show-upload-theme .upload-theme + .wp-filter + .theme-browser {
-       display: none;
-}
 
 p.no-themes {
        clear: both;
@@ -1113,14 +1088,10 @@ p.no-themes {
        display: none;
 }
 
-body.no-results p.no-themes {
+.no-results p.no-themes {
        display: block;
 }
 
-body.show-upload-theme p.no-themes {
-       display: none !important;
-}
-
 .theme-install-php .add-new-theme {
        display: none !important;
 }
@@ -1388,12 +1359,28 @@ body.full-overlay-active {
        pointer-events: none;
 }
 
+.theme-install-overlay .close-full-overlay,
+.theme-install-overlay .previous-theme,
+.theme-install-overlay .next-theme {
+       border-left: 0;
+       border-top: 0;
+       border-bottom: 0;
+}
+
+.theme-install-overlay .close-full-overlay:before,
+.theme-install-overlay .previous-theme:before,
+.theme-install-overlay .next-theme:before {
+       top: 2px;
+       left: 0;
+}
+
 /* Collapse Button */
 .wp-core-ui .wp-full-overlay .collapse-sidebar {
        position: fixed;
-       bottom: 8px;
-       left: 10px;
-       padding: 0;
+       bottom: 0;
+       left: 0;
+       padding: 9px 0 9px 10px;
+       height: 45px;
        color: #656a6f;
        outline: 0;
        line-height: 1;
@@ -1455,6 +1442,10 @@ body.full-overlay-active {
        -moz-osx-font-smoothing: grayscale;
 }
 
+.wp-core-ui .wp-full-overlay.collapsed .collapse-sidebar {
+       padding: 9px 10px;
+}
+
 /* rtl:ignore */
 .wp-full-overlay.collapsed .collapse-sidebar-arrow:before,
 .rtl .wp-full-overlay .collapse-sidebar-arrow:before {
@@ -1497,6 +1488,7 @@ body.full-overlay-active {
        width: 300px;
        height: 45px;
        border-top: 1px solid #ddd;
+       background: #eee;
 }
 
 .wp-full-overlay-footer .devices {
@@ -1696,7 +1688,7 @@ body.full-overlay-active {
        max-width: 100%;
 }
 
-.theme-install-overlay .wp-full-overlay-header .theme-install {
+.theme-install-overlay .wp-full-overlay-header .button {
        float: right;
        margin: 8px 10px 0 0;
        /* For when .theme-install is a span rather than a.button-primary (already installed theme) */
@@ -1791,3 +1783,12 @@ body.full-overlay-active {
                line-height: normal;
        }
 }
+
+@media aural {
+       .theme .notice:before,
+       .theme-info .updating-message:before,
+       .theme-info .updated-message:before,
+       .theme-install.updating-message:before {
+               speak: none;
+       }
+}
index 36ed56009f947418fa77be96b8b6dd5d71e9754e..0dc2017ae3f42d5c47b1535098c9bf879ecb24c1 100644 (file)
@@ -1 +1 @@
-.theme-browser .themes{clear:both}.themes-php .wrap h1{float:left;margin-bottom:15px}.network-admin.themes-php .wrap h1{margin-bottom:0}.themes-php .wrap h1 .button{margin-left:20px}.themes-php .wp-filter-search{position:relative;top:-2px;left:20px;margin:0;width:280px;font-size:16px;font-weight:300;line-height:1.5}.themes-php div.error,.themes-php div.notice,.themes-php div.updated{margin:0 0 20px;clear:both}.theme-browser .theme{cursor:pointer;float:left;margin:0 4% 4% 0;position:relative;width:30.6%;border:1px solid #ddd;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ie8 .theme-browser .theme{width:30%;margin:0 3% 4% 0}.theme-browser .theme:nth-child(3n){margin-right:0}.theme-browser .theme:focus,.theme-browser .theme:hover{cursor:pointer}.theme-browser .theme .theme-name{font-size:15px;font-weight:600;height:18px;margin:0;padding:15px;-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#fff;background:rgba(255,255,255,.65)}.theme-browser .theme .theme-actions{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";opacity:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;position:absolute;bottom:0;right:0;height:38px;padding:9px 10px 0;background:rgba(244,244,244,.7);border-left:1px solid rgba(0,0,0,.05)}.theme-browser .theme.focus .theme-actions,.theme-browser .theme:focus .theme-actions,.theme-browser .theme:hover .theme-actions{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";opacity:1}.theme-browser .theme .theme-actions .button-primary{margin-right:3px}.theme-browser .theme .theme-actions .button-secondary{float:none;margin-left:3px}.theme-browser .theme .theme-screenshot{display:block;overflow:hidden;position:relative;-webkit-backface-visibility:hidden;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.theme-browser .theme .theme-screenshot:after{content:"";display:block;padding-top:66.66666%}.theme-browser .theme .theme-screenshot img{height:auto;position:absolute;left:0;top:0;width:100%;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.theme-browser .theme:focus .theme-screenshot,.theme-browser .theme:hover .theme-screenshot{background:#fff}.theme-browser.rendered .theme:focus .theme-screenshot img,.theme-browser.rendered .theme:hover .theme-screenshot img{opacity:.4}.theme-browser .theme .more-details{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";opacity:0;position:absolute;top:35%;right:25%;left:25%;background:#23282d;background:rgba(0,0,0,.7);color:#fff;font-size:15px;text-shadow:0 1px 0 rgba(0,0,0,.6);-webkit-font-smoothing:antialiased;font-weight:600;padding:15px 12px;text-align:center;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.theme-browser .theme:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.theme-browser .theme:focus .more-details{opacity:1}.theme-browser .theme.active:focus .theme-actions{display:block}.theme-browser.rendered .theme:focus .more-details,.theme-browser.rendered .theme:hover .more-details{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";opacity:1}.theme-browser .theme .theme-installed,.theme-browser .theme .theme-update{background:#d54e21;background:rgba(213,78,33,.95);color:#fff;display:block;font-size:13px;font-weight:400;height:48px;line-height:48px;padding:0 10px;position:absolute;top:0;right:0;left:0;border-bottom:1px solid rgba(0,0,0,.25);overflow:hidden}.theme-browser .theme .theme-installed:before,.theme-browser .theme .theme-update:before{content:"\f463";display:inline-block;font:400 20px/1 dashicons;margin:0 6px 0 0;opacity:.8;position:relative;top:5px;speak:none;-webkit-font-smoothing:antialiased}.theme-browser .theme.active .theme-name{background:#23282d;color:#fff;padding-right:110px;font-weight:300;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.5);box-shadow:inset 0 1px 1px rgba(0,0,0,.5)}.theme-browser .customize-control .theme.active .theme-name{padding-right:15px}.theme-browser .theme.active .theme-name span{font-weight:600}.theme-browser .theme.active .theme-actions{background:rgba(49,49,49,.7);border-left:none;opacity:1}.theme-browser .theme.active .theme-actions .button-primary{margin-right:0}.theme-browser .theme .theme-author{background:#23282d;color:#eee;display:none;font-size:14px;margin:0 10px;padding:5px 10px;position:absolute;bottom:56px}.theme-browser .theme.display-author .theme-author{display:block}.theme-browser .theme.display-author .theme-author a{color:inherit;text-decoration:none}.theme-browser .theme.add-new-theme{border:none;-webkit-box-shadow:none;box-shadow:none}.theme-browser .theme.add-new-theme a{text-decoration:none;display:block;position:relative;z-index:1}.theme-browser .theme.add-new-theme a:after{display:block;content:"";background:0 0;background:rgba(0,0,0,0);position:absolute;top:0;left:0;right:0;bottom:0;padding:0;text-shadow:none;border:5px dashed #d5d2ca;border:5px dashed rgba(0,0,0,.1);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.theme-overlay .theme-actions,.theme-overlay .theme-wrap{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.theme-browser .theme.add-new-theme span:after{background:#e5e5e5;background:rgba(153,153,153,.1);-webkit-border-radius:50%;border-radius:50%;display:inline-block;content:"\f132";-webkit-font-smoothing:antialiased;font:400 74px/115px dashicons;width:100px;height:100px;vertical-align:middle;text-align:center;color:#999;position:absolute;top:30%;left:50%;margin-left:-50px;text-indent:-4px;padding:0;text-shadow:none;z-index:4}.rtl .theme-browser .theme.add-new-theme span:after{text-indent:4px}.theme-browser .theme.add-new-theme a:focus .theme-screenshot,.theme-browser .theme.add-new-theme a:hover .theme-screenshot{background:0 0}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{background:#fff;color:#0073aa}.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{border-color:transparent;color:#fff;background:#0073aa;content:""}.theme-browser .theme.add-new-theme .theme-name{background:0 0;text-align:center;-webkit-box-shadow:none;box-shadow:none;font-weight:400;position:relative;top:0;margin-top:-18px;padding-top:0;padding-bottom:48px}.theme-browser .theme.add-new-theme a:focus .theme-name,.theme-browser .theme.add-new-theme a:hover .theme-name{color:#fff;z-index:2}.theme-overlay .theme-backdrop{position:absolute;left:-20px;right:0;top:0;bottom:0;background:#f1f1f1;background:rgba(238,238,238,.9);z-index:10000}.theme-overlay .theme-header{position:absolute;top:0;left:0;right:0;height:48px;border-bottom:1px solid #ddd}.theme-overlay .theme-header button{padding:0}.theme-overlay .theme-header .close{cursor:pointer;height:48px;width:50px;text-align:center;float:right;border:0;border-left:1px solid #ddd;background-color:transparent;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.theme-overlay .theme-header .close:before{font:400 22px/50px dashicons!important;color:#72777c;display:inline-block;content:"\f335";font-weight:300}.theme-overlay .theme-header .left,.theme-overlay .theme-header .right{cursor:pointer;color:#72777c;background-color:transparent;height:48px;width:54px;float:left;text-align:center;border:0;border-right:1px solid #ddd;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.theme-overlay .theme-header .close:focus,.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:focus,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:focus,.theme-overlay .theme-header .right:hover{background:#ddd;border-color:#ccc;color:#000}.theme-overlay .theme-header .close:focus:before,.theme-overlay .theme-header .close:hover:before{color:#000}.theme-overlay .theme-header .close:focus,.theme-overlay .theme-header .left:focus,.theme-overlay .theme-header .right:focus{-webkit-box-shadow:none;box-shadow:none;outline:0}.theme-overlay .theme-header .left.disabled,.theme-overlay .theme-header .left.disabled:hover,.theme-overlay .theme-header .right.disabled,.theme-overlay .theme-header .right.disabled:hover{color:#ccc;background:inherit;cursor:inherit}.theme-overlay .theme-header .left:before,.theme-overlay .theme-header .right:before{font:400 20px/50px dashicons!important;display:inline;font-weight:300}.customize-support .theme-overlay .theme-actions a[href="themes.php?page=custom-header"],.customize-support .theme-overlay .theme-actions a[href="themes.php?page=custom-background"],.theme-overlay .theme-actions .active-theme,.theme-overlay.active .theme-actions .inactive-theme{display:none}.theme-overlay .theme-header .left:before{content:"\f341"}.theme-overlay .theme-header .right:before{content:"\f345"}.theme-overlay .theme-wrap{clear:both;position:fixed;top:9%;left:190px;right:30px;bottom:3%;background:#fff;-webkit-box-shadow:0 1px 20px 5px rgba(0,0,0,.1);box-shadow:0 1px 20px 5px rgba(0,0,0,.1);z-index:10000;box-sizing:border-box;-webkit-overflow-scrolling:touch}body.folded .theme-overlay .theme-wrap{left:70px}.theme-overlay .theme-about{position:absolute;top:49px;bottom:57px;left:0;right:0;overflow:auto;padding:2% 4%}.theme-overlay .theme-actions{position:absolute;text-align:center;bottom:0;left:0;right:0;padding:10px 25px 5px;background:#f3f3f3;z-index:30;box-sizing:border-box;border-top:1px solid #eee}.theme-overlay .screenshot,.upload-plugin,.upload-theme{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.ie8 .theme-overlay .theme-actions{border:1px solid #eee}.theme-overlay .theme-actions a{margin-right:5px;margin-bottom:5px}.broken-themes a.delete-theme,.theme-overlay .theme-actions .delete-theme{color:#a00;text-decoration:none;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;background:0 0}.theme-overlay .theme-actions .delete-theme{position:absolute;right:10px;bottom:5px}.broken-themes a.delete-theme:focus,.broken-themes a.delete-theme:hover,.theme-overlay .theme-actions .delete-theme:focus,.theme-overlay .theme-actions .delete-theme:hover{background:#d54e21;color:#fff;border-color:#d54e21}.theme-overlay .theme-actions .inactive-theme,.theme-overlay.active .theme-actions .active-theme{display:block}.theme-overlay .theme-screenshots{float:left;margin:0 30px 0 0;width:55%;max-width:880px;text-align:center}.theme-overlay .screenshot{border:1px solid #fff;box-sizing:border-box;overflow:hidden;position:relative;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2)}.theme-overlay .screenshot:after{content:"";display:block;padding-top:75%}.theme-overlay .screenshot img{height:auto;position:absolute;left:0;top:0;width:100%}.theme-overlay.small-screenshot .theme-screenshots{position:absolute;width:302px}.theme-overlay.small-screenshot .theme-info{margin-left:350px;width:auto}.theme-overlay .screenshot.thumb{background:#ccc;border:1px solid #eee;float:none;display:inline-block;margin:10px 5px 0;width:140px;height:80px;cursor:pointer}.theme-overlay .screenshot.thumb:after{content:"";display:block;padding-top:100%}.theme-overlay .screenshot.thumb img{cursor:pointer;position:absolute;left:0;top:0;width:100%;height:auto}.theme-overlay .screenshot.selected{background:0 0;border:2px solid #00a0d2}.theme-overlay .screenshot.selected img{opacity:.8}.theme-browser .theme .theme-screenshot.blank,.theme-overlay .screenshot.blank{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYGWO8d+/efwYkoKioiMRjYGBC4WHhUK6A8T8QIJt8//59ZC493AAAQssKpBK4F5AAAAAASUVORK5CYII=)}.theme-overlay .theme-info{width:40%;float:left}.theme-overlay .current-label{background:#32373c;color:#fff;font-size:11px;display:inline-block;padding:2px 8px;-webkit-border-radius:2px;border-radius:2px;margin:0 0 -10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.theme-overlay .theme-name{color:#23282d;font-size:32px;font-weight:100;margin:10px 0 0;line-height:1.3}.theme-overlay .theme-version{color:#72777c;font-size:13px;font-weight:400;float:none;display:inline-block;margin-left:10px}.theme-overlay .theme-author{margin:15px 0 25px;color:#72777c;font-size:16px;font-weight:400;line-height:inherit}.theme-overlay .theme-author a{text-decoration:none}.theme-overlay .theme-description{color:#555;font-size:15px;font-weight:400;line-height:1.5;margin:30px 0 0}.theme-overlay .theme-tags{border-top:3px solid #eee;color:#82878c;font-size:13px;font-weight:400;margin:30px 0 0;padding-top:20px}.theme-overlay .theme-tags span{color:#444;font-weight:700;margin-right:5px}.theme-overlay .parent-theme{background:#f7fcfe;border:1px solid #eee;border-left:4px solid #00a0d2;font-size:14px;font-weight:400;margin-top:30px;padding:10px 10px 10px 20px}.theme-overlay .parent-theme strong{font-weight:700}.single-theme .theme,.single-theme .theme-overlay .theme-backdrop,.single-theme .theme-overlay .theme-header{display:none}.single-theme .theme-overlay .theme-wrap{clear:both;min-height:330px;position:relative;left:auto;right:auto;top:auto;bottom:auto;z-index:10}.single-theme .theme-overlay .theme-about{padding:30px 30px 70px;position:static}.single-theme .theme-overlay .theme-actions{position:absolute}@media only screen and (min-width:2000px){#wpwrap .theme-browser .theme{width:17.6%;margin:0 3% 3% 0}#wpwrap .theme-browser .theme:nth-child(3n),#wpwrap .theme-browser .theme:nth-child(4n){margin-right:3%}#wpwrap .theme-browser .theme:nth-child(5n){margin-right:0}}@media only screen and (min-width:1680px){.theme-overlay .theme-wrap{width:1450px;margin:0 auto}}@media only screen and (min-width:1640px){.theme-browser .theme{width:22.7%;margin:0 3% 3% 0}.theme-browser .theme .theme-screenshot:after{padding-top:75%}.theme-browser .theme:nth-child(3n){margin-right:3%}.theme-browser .theme:nth-child(4n){margin-right:0}}@media only screen and (max-width:1120px){.theme-browser .theme{width:47.5%;margin-right:0}.theme-browser .theme:nth-child(even){margin-right:0}.theme-browser .theme:nth-child(odd){margin-right:5%}}@media only screen and (max-width:900px){.theme-overlay .theme-wrap{left:65px}}@media only screen and (max-width:780px){.theme-overlay .theme-wrap,body.folded .theme-overlay .theme-wrap{top:0;right:0;bottom:0;left:0;padding:70px 20px 20px;border:none;z-index:100000;position:fixed}.theme-browser .theme.active .theme-name span{display:none}.theme-overlay .theme-screenshots{width:40%}.theme-overlay .theme-info{width:50%}.single-theme .theme-wrap{padding:10px}.theme-browser .theme .theme-actions{padding:5px 10px 4px}.theme-overlay.small-screenshot .theme-screenshots{position:static;float:none;max-width:302px}.theme-overlay.small-screenshot .theme-info{margin-left:0;width:auto}.theme:focus .more-details,.theme:hover .more-details,.theme:not(.active):focus .theme-actions,.theme:not(.active):hover .theme-actions{display:none}.theme-browser.rendered .theme:focus .theme-screenshot img,.theme-browser.rendered .theme:hover .theme-screenshot img{opacity:1}}@media only screen and (max-width:480px){.theme-browser .theme{width:100%;margin-right:0}.theme-browser .theme:nth-child(2n),.theme-browser .theme:nth-child(3n){margin-right:0}}@media only screen and (max-width:650px){.theme-overlay .theme-description,.theme-overlay .theme-update{margin-left:0}.theme-overlay .theme-actions .delete-theme{position:relative;right:auto;bottom:auto}.theme-overlay .theme-actions .inactive-theme{display:inline}.theme-overlay .theme-screenshots{width:100%;float:none}.theme-overlay .theme-info{width:100%}.theme-overlay .theme-author{margin:5px 0 15px}.theme-overlay .current-label{margin-top:10px;font-size:13px}.themes-php .wp-filter-search{float:none;clear:both;left:0;top:0;right:0;margin:10px 0;width:100%;max-width:280px}.theme-browser .theme.add-new-theme span:after{font:400 60px/90px dashicons;width:80px;height:80px;top:30%;left:50%;text-indent:0;margin-left:-40px}.single-theme .theme-wrap{margin:0 -12px 0 -10px;padding:10px}.single-theme .theme-overlay .theme-about{padding:10px;overflow:visible}.single-theme .current-label{display:none}.single-theme .theme-overlay .theme-actions{position:static}}.broken-themes{clear:both}.broken-themes table{text-align:left;width:50%;border-spacing:3px;padding:3px}.theme-browser .theme .theme-installed{background:#0073aa}.theme-browser .theme .theme-installed:before{content:"\f147"}.theme-browser .theme.is-installed .theme-actions .button-primary{display:none!important}.theme-install-php .wp-filter{padding:0 20px}.theme-install-php a.browse-themes,.theme-install-php a.upload{cursor:pointer}.theme-install-php a.browse-themes,.theme-install-php.show-upload-theme a.upload{display:none}.theme-install-php.show-upload-theme a.browse-themes{display:inline}.upload-plugin,.upload-theme{box-sizing:border-box;display:none;margin:0;padding:0;width:100%;overflow:hidden;position:relative;top:10px}.wp-full-overlay,.wp-full-overlay-main,.wp-full-overlay-sidebar{top:0;height:100%;bottom:0;left:0}.upload-plugin,body.show-upload-theme .upload-theme{display:block}body.show-upload-theme .upload-theme+.wp-filter,body.show-upload-theme .upload-theme+.wp-filter+.theme-browser,p.no-themes{display:none}.upload-plugin .wp-upload-form,.upload-theme .wp-upload-form{background:#fafafa;border:1px solid #e5e5e5;padding:30px;margin:30px auto;max-width:380px}.upload-plugin .install-help,.upload-theme .install-help{color:#555d66;font-size:18px;font-style:normal;margin:0;padding:40px 0 0;text-align:center}p.no-themes{clear:both;color:#666;font-size:18px;font-style:normal;margin:0;padding:100px 0;text-align:center}body.no-results p.no-themes{display:block}.theme-install-php .add-new-theme,body.show-upload-theme p.no-themes{display:none!important}@media only screen and (max-width:1120px){.upload-theme .wp-upload-form{margin:20px 0;max-width:100%}.upload-theme .install-help{font-size:15px;padding:20px 0 0;text-align:left}}.theme-details .theme-rating{line-height:23px}.theme-details .star-rating{display:inline}.theme-details .no-rating,.theme-details .num-ratings{font-size:11px;color:#72777c}.theme-details .no-rating{display:block;line-height:20px}.appearance_page_custom-header #headimg{border:1px solid #ddd;overflow:hidden;width:100%}.appearance_page_custom-header #upload-form p label{font-size:12px}.appearance_page_custom-header .available-headers .default-header{float:left;margin:0 20px 20px 0}.appearance_page_custom-header .random-header{clear:both;margin:0 20px 20px 0;vertical-align:middle}.appearance_page_custom-header .available-headers label input,.appearance_page_custom-header .random-header label input{margin-right:10px}.appearance_page_custom-header .available-headers label img{vertical-align:middle}div#custom-background-image{min-height:100px;border:1px solid #ddd}div#custom-background-image img{max-width:400px;max-height:300px}body.full-overlay-active{overflow:hidden}.wp-full-overlay{z-index:500000;position:fixed;overflow:visible;right:0;min-width:0}.wp-full-overlay-sidebar{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;width:300px;padding:0;margin:0;z-index:10;background:#eee;border-right:none}.wp-full-overlay.collapsed,.wp-full-overlay.expanded .wp-full-overlay-sidebar{margin-left:0!important}.wp-full-overlay.expanded{margin-left:300px}.wp-full-overlay.collapsed .wp-full-overlay-sidebar{overflow:visible;margin-left:-300px}.wp-full-overlay-sidebar:after{content:"";display:block;position:absolute;top:0;bottom:0;right:0;width:3px;z-index:1000}.wp-full-overlay-main{position:absolute;right:0}.wp-full-overlay-sidebar .wp-full-overlay-header{position:absolute;left:0;right:0;height:45px;padding:0 15px;line-height:45px;z-index:10;margin:0;border-top:none;-webkit-box-shadow:none;box-shadow:none}.wp-full-overlay-sidebar .wp-full-overlay-header a.back{margin-top:9px}.wp-full-overlay-sidebar .wp-full-overlay-footer{bottom:0;border-bottom:none;border-top:none;-webkit-box-shadow:none;box-shadow:none}.wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{position:absolute;top:45px;bottom:45px;left:0;right:0;overflow:auto}.theme-install-overlay .wp-full-overlay-sidebar .wp-full-overlay-header{padding:0}.theme-install-overlay .close-full-overlay,.theme-install-overlay .next-theme,.theme-install-overlay .previous-theme{display:block;position:relative;float:left;width:45px;height:45px;padding-right:2px;background:#eee;border-right:1px solid #ddd;color:#444;cursor:pointer;text-decoration:none;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.theme-install-overlay .close-full-overlay:focus,.theme-install-overlay .close-full-overlay:hover,.theme-install-overlay .next-theme:focus,.theme-install-overlay .next-theme:hover,.theme-install-overlay .previous-theme:focus,.theme-install-overlay .previous-theme:hover{background:#ddd;border-color:#ccc;color:#000;outline:0;-webkit-box-shadow:none;box-shadow:none}.theme-install-overlay .close-full-overlay:before{font:400 22px/1 dashicons;content:"\f335";position:relative;top:7px;left:13px}.theme-install-overlay .previous-theme:before{font:400 20px/1 dashicons;content:"\f341";position:relative;top:6px;left:14px}.theme-install-overlay .next-theme:before{font:400 20px/1 dashicons;content:"\f345";position:relative;top:6px;left:13px}.theme-install-overlay .next-theme.disabled,.theme-install-overlay .next-theme.disabled:focus,.theme-install-overlay .next-theme.disabled:hover,.theme-install-overlay .previous-theme.disabled,.theme-install-overlay .previous-theme.disabled:focus,.theme-install-overlay .previous-theme.disabled:hover{color:#b4b9be;background:#eee;cursor:default;pointer-events:none}.wp-core-ui .wp-full-overlay .collapse-sidebar{position:fixed;bottom:8px;left:10px;padding:0;color:#656a6f;outline:0;line-height:1;background-color:transparent!important;border:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}.wp-core-ui .wp-full-overlay .collapse-sidebar:focus,.wp-core-ui .wp-full-overlay .collapse-sidebar:hover{color:#0073aa}.wp-full-overlay .collapse-sidebar-arrow,.wp-full-overlay .collapse-sidebar-label{display:inline-block;vertical-align:middle;line-height:20px}.wp-full-overlay .collapse-sidebar-arrow{width:20px;height:20px;margin:0 2px;-webkit-border-radius:50%;border-radius:50%;overflow:hidden}.wp-full-overlay .collapse-sidebar:focus .collapse-sidebar-arrow,.wp-full-overlay .collapse-sidebar:hover .collapse-sidebar-arrow{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.wp-full-overlay .collapse-sidebar-label{margin-left:3px}.wp-full-overlay.collapsed .collapse-sidebar-label{display:none}.wp-full-overlay .collapse-sidebar-arrow:before{display:block;content:"\f148";background:#eee;font:400 20px/1 dashicons;speak:none;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.rtl .wp-full-overlay .collapse-sidebar-arrow:before,.wp-full-overlay.collapsed .collapse-sidebar-arrow:before{-webkit-transform:rotate(180.001deg);-ms-transform:rotate(180.001deg);transform:rotate(180.001deg)}.rtl .wp-full-overlay.collapsed .collapse-sidebar-arrow:before{-webkit-transform:none;-ms-transform:none;transform:none}.wp-full-overlay,.wp-full-overlay .collapse-sidebar,.wp-full-overlay-main,.wp-full-overlay-sidebar{-webkit-transition-property:left,right,top,bottom,width,margin;transition-property:left,right,top,bottom,width,margin;-webkit-transition-duration:.2s;transition-duration:.2s}.wp-full-overlay{background:#191e23}.wp-full-overlay-main{background-color:#f1f1f1}.expanded .wp-full-overlay-footer{position:fixed;bottom:0;left:0;width:300px;height:45px;border-top:1px solid #ddd}.wp-full-overlay-footer .devices{float:right}.wp-full-overlay-footer .devices button{cursor:pointer;background:0 0;border:none;height:45px;padding:0 3px;margin:0 0 0 -4px;-webkit-box-shadow:none;box-shadow:none;border-top:1px solid transparent;border-bottom:4px solid transparent;-webkit-transition:background .1s ease-in-out;transition:background .1s ease-in-out}.wp-full-overlay-footer .devices button:before{display:inline-block;-webkit-font-smoothing:antialiased;font:400 20px/30px dashicons;vertical-align:top;margin:3px 0;padding:4px 8px;color:#656a6f}.wp-full-overlay-footer .devices button.active{border-bottom-color:#191e23}.wp-full-overlay-footer .devices button:focus,.wp-full-overlay-footer .devices button:hover{background-color:#fff}.wp-full-overlay-footer .devices button:focus{-webkit-box-shadow:none;box-shadow:none;outline:0;background-color:#fff;border-bottom-color:#0073aa}.wp-full-overlay-footer .devices button.active:before,.wp-full-overlay-footer .devices button:focus:before,.wp-full-overlay-footer .devices button:hover:before{color:#191e23}.wp-full-overlay-footer .devices .preview-desktop:before{content:"\f472"}.wp-full-overlay-footer .devices .preview-tablet:before{content:"\f471"}.wp-full-overlay-footer .devices .preview-mobile:before{content:"\f470"}@media screen and (max-width:1024px){.wp-full-overlay-footer .devices{display:none}}.collapsed .wp-full-overlay-footer .devices button:before{display:none}.preview-mobile .wp-full-overlay-main{margin:auto 0 auto -160px;width:320px;height:480px;max-height:100%;max-width:100%;left:50%}.preview-tablet .wp-full-overlay-main{margin:auto 0 auto -360px;width:720px;height:1080px;max-height:100%;max-width:100%;left:50%}.customize-support .hide-if-customize,.customize-support .wp-core-ui .hide-if-customize,.customize-support.wp-core-ui .hide-if-customize,.no-customize-support .hide-if-no-customize,.no-customize-support .wp-core-ui .hide-if-no-customize,.no-customize-support.wp-core-ui .hide-if-no-customize{display:none}#customize-container{display:none;background:#fff;z-index:500000;position:fixed;overflow:visible;top:0;bottom:0;left:0;right:0;height:100%}.customize-active #customize-container{display:block}.customize-loading #customize-container iframe{opacity:0}#customize-container iframe,.theme-install-overlay iframe{height:100%;width:100%;z-index:20;-webkit-transition:opacity .3s;transition:opacity .3s}#customize-controls{margin-top:0}.theme-install-overlay{display:none}.theme-install-overlay.single-theme{display:block}.install-theme-info{display:none;padding:10px 20px 60px}.single-theme .install-theme-info{padding-top:15px}.theme-install-overlay .install-theme-info{display:block}.install-theme-info .theme-install{float:right;margin-top:18px}.install-theme-info .theme-name{font-size:16px;line-height:24px;margin-bottom:0;margin-top:0}.install-theme-info .theme-screenshot{margin:15px 0;width:258px;border:1px solid #ccc}.install-theme-info .theme-details{overflow:hidden}.theme-details .theme-version{margin:15px 0}.theme-details .theme-description{float:left;color:#72777c;line-height:20px;max-width:100%}.theme-install-overlay .wp-full-overlay-header .theme-install{float:right;margin:8px 10px 0 0;line-height:26px}.theme-install-overlay .wp-full-overlay-sidebar{background:#eee;border-right:1px solid #ddd}.theme-install-overlay .wp-full-overlay-sidebar-content{background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.theme-install-overlay .wp-full-overlay-main{position:absolute;z-index:0;background-color:#f1f1f1}.customize-loading #customize-container{background-color:#f1f1f1}#customize-preview.wp-full-overlay-main:before,.customize-loading #customize-container:before,.theme-install-overlay .wp-full-overlay-main:before{content:"";display:block;width:20px;height:20px;position:absolute;left:50%;top:50%;z-index:-1;margin:-10px 0 0 -10px;-webkit-transform:translateZ(0);transform:translateZ(0);background:url(../images/spinner.gif) center center no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px}#customize-preview.wp-full-overlay-main.iframe-ready:before,.theme-install-overlay.iframe-ready .wp-full-overlay-main:before{background-image:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.wp-full-overlay .collapse-sidebar-arrow{background-image:url(../images/arrows-2x.png);-webkit-background-size:15px 123px;background-size:15px 123px}#customize-preview.wp-full-overlay-main:before,.customize-loading #customize-container:before,.theme-install-overlay .wp-full-overlay-main:before{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){.available-theme .action-links .delete-theme{float:none;margin:0;padding:0;clear:both}.available-theme .action-links .delete-theme a{padding:0}.broken-themes table{width:100%}.theme-install-overlay .wp-full-overlay-header .theme-install{margin-top:6px;line-height:normal}}
\ No newline at end of file
+.theme-browser .themes{clear:both}.themes-php:not(.network-admin) .wrap h1{margin-bottom:15px}.themes-php .wrap h1 .button{margin-left:20px}.themes-php .wp-filter-search{position:relative;top:-2px;left:20px;margin:0;width:280px;font-size:16px;font-weight:300;line-height:1.5}.theme .notice,.theme .notice.is-dismissible{left:0;margin:0;position:absolute;right:0;top:0}.theme-browser .theme{cursor:pointer;float:left;margin:0 4% 4% 0;position:relative;width:30.6%;border:1px solid #ddd;-webkit-box-shadow:0 1px 1px -1px rgba(0,0,0,.1);box-shadow:0 1px 1px -1px rgba(0,0,0,.1);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ie8 .theme-browser .theme{width:30%;margin:0 3% 4% 0}.theme-browser .theme:nth-child(3n){margin-right:0}.theme-browser .theme:focus,.theme-browser .theme:hover{cursor:pointer}.theme-browser .theme .theme-name{font-size:15px;font-weight:600;height:18px;margin:0;padding:15px;-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#fff;background:rgba(255,255,255,.65)}.theme-browser .theme .theme-actions{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";opacity:0;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;position:absolute;bottom:0;right:0;height:38px;padding:9px 10px 0;background:rgba(244,244,244,.7);border-left:1px solid rgba(0,0,0,.05)}.theme-browser .theme.focus .theme-actions,.theme-browser .theme:focus .theme-actions,.theme-browser .theme:hover .theme-actions{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";opacity:1}.theme-browser .theme .theme-actions .button-primary{margin-right:3px}.theme-browser .theme .theme-actions .button-secondary{float:none;margin-left:3px}.theme-browser .theme .theme-screenshot{display:block;overflow:hidden;position:relative;-webkit-backface-visibility:hidden;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.theme-browser .theme .theme-screenshot:after{content:"";display:block;padding-top:66.66666%}.theme-browser .theme .theme-screenshot img{height:auto;position:absolute;left:0;top:0;width:100%;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.theme-browser .theme:focus .theme-screenshot,.theme-browser .theme:hover .theme-screenshot{background:#fff}.theme-browser.rendered .theme:focus .theme-screenshot img,.theme-browser.rendered .theme:hover .theme-screenshot img{opacity:.4}.theme-browser .theme .more-details{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";opacity:0;position:absolute;top:35%;right:20%;left:20%;background:#23282d;background:rgba(0,0,0,.7);color:#fff;font-size:15px;text-shadow:0 1px 0 rgba(0,0,0,.6);-webkit-font-smoothing:antialiased;font-weight:600;padding:15px 12px;text-align:center;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.theme-browser .theme:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.theme-browser .theme:focus .more-details{opacity:1}.theme-browser .theme.active:focus .theme-actions{display:block}.theme-browser.rendered .theme:focus .more-details,.theme-browser.rendered .theme:hover .more-details{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";opacity:1}.theme-browser .theme.active .theme-name{background:#23282d;color:#fff;padding-right:110px;font-weight:300;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.5);box-shadow:inset 0 1px 1px rgba(0,0,0,.5)}.theme-browser .customize-control .theme.active .theme-name{padding-right:15px}.theme-browser .theme.active .theme-name span{font-weight:600}.theme-browser .theme.active .theme-actions{background:rgba(49,49,49,.7);border-left:none;opacity:1}.theme-browser .theme.active .theme-actions .button-primary{margin-right:0}.theme-browser .theme .theme-author{background:#23282d;color:#eee;display:none;font-size:14px;margin:0 10px;padding:5px 10px;position:absolute;bottom:56px}.theme-browser .theme.display-author .theme-author{display:block}.theme-browser .theme.display-author .theme-author a{color:inherit;text-decoration:none}.theme-browser .theme.add-new-theme{border:none;-webkit-box-shadow:none;box-shadow:none}.theme-browser .theme.add-new-theme a{text-decoration:none;display:block;position:relative;z-index:1}.theme-browser .theme.add-new-theme a:after{display:block;content:"";background:0 0;background:rgba(0,0,0,0);position:absolute;top:0;left:0;right:0;bottom:0;padding:0;text-shadow:none;border:5px dashed #d5d2ca;border:5px dashed rgba(0,0,0,.1);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.theme-overlay .theme-actions,.theme-overlay .theme-wrap{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.theme-browser .theme.add-new-theme span:after{background:#e5e5e5;background:rgba(153,153,153,.1);-webkit-border-radius:50%;border-radius:50%;display:inline-block;content:"\f132";-webkit-font-smoothing:antialiased;font:400 74px/115px dashicons;width:100px;height:100px;vertical-align:middle;text-align:center;color:#999;position:absolute;top:30%;left:50%;margin-left:-50px;text-indent:-4px;padding:0;text-shadow:none;z-index:4}.rtl .theme-browser .theme.add-new-theme span:after{text-indent:4px}.theme-browser .theme.add-new-theme a:focus .theme-screenshot,.theme-browser .theme.add-new-theme a:hover .theme-screenshot{background:0 0}.theme-browser .theme.add-new-theme a:focus span:after,.theme-browser .theme.add-new-theme a:hover span:after{background:#fff;color:#0073aa}.theme-browser .theme.add-new-theme a:focus:after,.theme-browser .theme.add-new-theme a:hover:after{border-color:transparent;color:#fff;background:#0073aa;content:""}.theme-browser .theme.add-new-theme .theme-name{background:0 0;text-align:center;-webkit-box-shadow:none;box-shadow:none;font-weight:400;position:relative;top:0;margin-top:-18px;padding-top:0;padding-bottom:48px}.theme-browser .theme.add-new-theme a:focus .theme-name,.theme-browser .theme.add-new-theme a:hover .theme-name{color:#fff;z-index:2}.theme-overlay .theme-backdrop{position:absolute;left:-20px;right:0;top:0;bottom:0;background:#f1f1f1;background:rgba(238,238,238,.9);z-index:10000}.theme-overlay .theme-header .close,.theme-overlay .theme-header .left,.theme-overlay .theme-header .right{cursor:pointer;background-color:transparent;height:48px;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;text-align:center}.theme-overlay .theme-header{position:absolute;top:0;left:0;right:0;height:48px;border-bottom:1px solid #ddd}.theme-overlay .theme-header button{padding:0}.theme-overlay .theme-header .close{width:50px;float:right;border:0;border-left:1px solid #ddd;transition:color .1s ease-in-out,background .1s ease-in-out}.theme-overlay .theme-header .close:before{font:400 22px/50px dashicons!important;color:#72777c;display:inline-block;content:"\f335";font-weight:300}.theme-overlay .theme-header .left,.theme-overlay .theme-header .right{color:#72777c;width:54px;float:left;border:0;border-right:1px solid #ddd;transition:color .1s ease-in-out,background .1s ease-in-out}.theme-overlay .theme-header .close:focus,.theme-overlay .theme-header .close:hover,.theme-overlay .theme-header .left:focus,.theme-overlay .theme-header .left:hover,.theme-overlay .theme-header .right:focus,.theme-overlay .theme-header .right:hover{background:#ddd;border-color:#ccc;color:#000}.theme-overlay .theme-header .close:focus:before,.theme-overlay .theme-header .close:hover:before{color:#000}.theme-overlay .theme-header .close:focus,.theme-overlay .theme-header .left:focus,.theme-overlay .theme-header .right:focus{-webkit-box-shadow:none;box-shadow:none;outline:0}.theme-overlay .theme-header .left.disabled,.theme-overlay .theme-header .left.disabled:hover,.theme-overlay .theme-header .right.disabled,.theme-overlay .theme-header .right.disabled:hover{color:#ccc;background:inherit;cursor:inherit}.theme-overlay .theme-header .left:before,.theme-overlay .theme-header .right:before{font:400 20px/50px dashicons!important;display:inline;font-weight:300}.customize-support .theme-overlay .theme-actions a[href="themes.php?page=custom-header"],.customize-support .theme-overlay .theme-actions a[href="themes.php?page=custom-background"],.theme-overlay .theme-actions .active-theme,.theme-overlay.active .theme-actions .inactive-theme{display:none}.theme-overlay .theme-header .left:before{content:"\f341"}.theme-overlay .theme-header .right:before{content:"\f345"}.theme-overlay .theme-wrap{clear:both;position:fixed;top:9%;left:190px;right:30px;bottom:3%;background:#fff;-webkit-box-shadow:0 1px 20px 5px rgba(0,0,0,.1);box-shadow:0 1px 20px 5px rgba(0,0,0,.1);z-index:10000;box-sizing:border-box;-webkit-overflow-scrolling:touch}body.folded .theme-browser~.theme-overlay .theme-wrap{left:70px}.theme-overlay .theme-about{position:absolute;top:49px;bottom:57px;left:0;right:0;overflow:auto;padding:2% 4%}.theme-overlay .theme-actions{position:absolute;text-align:center;bottom:0;left:0;right:0;padding:10px 25px 5px;background:#f3f3f3;z-index:30;box-sizing:border-box;border-top:1px solid #eee}.theme-overlay .screenshot,.upload-plugin,.upload-theme{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.ie8 .theme-overlay .theme-actions{border:1px solid #eee}.theme-overlay .theme-actions a{margin-right:5px;margin-bottom:5px}.broken-themes a.delete-theme,.theme-overlay .theme-actions .delete-theme{color:#a00;text-decoration:none;border-color:transparent;-webkit-box-shadow:none;box-shadow:none;background:0 0}.theme-overlay .theme-actions .delete-theme{position:absolute;right:10px;bottom:5px}.broken-themes a.delete-theme:focus,.broken-themes a.delete-theme:hover,.theme-overlay .theme-actions .delete-theme:focus,.theme-overlay .theme-actions .delete-theme:hover{background:#d54e21;color:#fff;border-color:#d54e21}.theme-overlay .theme-actions .inactive-theme,.theme-overlay.active .theme-actions .active-theme{display:block}.theme-overlay .theme-screenshots{float:left;margin:0 30px 0 0;width:55%;max-width:880px;text-align:center}.theme-overlay .screenshot{border:1px solid #fff;box-sizing:border-box;overflow:hidden;position:relative;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2)}.theme-overlay .screenshot:after{content:"";display:block;padding-top:75%}.theme-overlay .screenshot img{height:auto;position:absolute;left:0;top:0;width:100%}.theme-overlay.small-screenshot .theme-screenshots{position:absolute;width:302px}.theme-overlay.small-screenshot .theme-info{margin-left:350px;width:auto}.theme-overlay .screenshot.thumb{background:#ccc;border:1px solid #eee;float:none;display:inline-block;margin:10px 5px 0;width:140px;height:80px;cursor:pointer}.theme-overlay .screenshot.thumb:after{content:"";display:block;padding-top:100%}.theme-overlay .screenshot.thumb img{cursor:pointer;position:absolute;left:0;top:0;width:100%;height:auto}.theme-overlay .screenshot.selected{background:0 0;border:2px solid #00a0d2}.theme-overlay .screenshot.selected img{opacity:.8}.theme-browser .theme .theme-screenshot.blank,.theme-overlay .screenshot.blank{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYGWO8d+/efwYkoKioiMRjYGBC4WHhUK6A8T8QIJt8//59ZC493AAAQssKpBK4F5AAAAAASUVORK5CYII=)}.theme-overlay .theme-info{width:40%;float:left}.theme-overlay .current-label{background:#32373c;color:#fff;font-size:11px;display:inline-block;padding:2px 8px;-webkit-border-radius:2px;border-radius:2px;margin:0 0 -10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.theme-overlay .theme-name{color:#23282d;font-size:32px;font-weight:100;margin:10px 0 0;line-height:1.3;word-wrap:break-word;overflow-wrap:break-word}.theme-overlay .theme-version{color:#72777c;font-size:13px;font-weight:400;float:none;display:inline-block;margin-left:10px}.theme-overlay .theme-author{margin:15px 0 25px;color:#72777c;font-size:16px;font-weight:400;line-height:inherit}.theme-overlay .theme-author a{text-decoration:none}.theme-overlay .theme-description{color:#555;font-size:15px;font-weight:400;line-height:1.5;margin:30px 0 0}.theme-overlay .theme-tags{border-top:3px solid #eee;color:#82878c;font-size:13px;font-weight:400;margin:30px 0 0;padding-top:20px}.theme-overlay .theme-tags span{color:#444;font-weight:600;margin-right:5px}.theme-overlay .parent-theme{background:#f7fcfe;border:1px solid #eee;border-left:4px solid #00a0d2;font-size:14px;font-weight:400;margin-top:30px;padding:10px 10px 10px 20px}.theme-overlay .parent-theme strong{font-weight:700}.single-theme .theme,.single-theme .theme-overlay .theme-backdrop,.single-theme .theme-overlay .theme-header{display:none}.single-theme .theme-overlay .theme-wrap{clear:both;min-height:330px;position:relative;left:auto;right:auto;top:auto;bottom:auto;z-index:10}.single-theme .theme-overlay .theme-about{padding:30px 30px 70px;position:static}.single-theme .theme-overlay .theme-actions{position:absolute}@media only screen and (min-width:2000px){#wpwrap .theme-browser .theme{width:17.6%;margin:0 3% 3% 0}#wpwrap .theme-browser .theme:nth-child(3n),#wpwrap .theme-browser .theme:nth-child(4n){margin-right:3%}#wpwrap .theme-browser .theme:nth-child(5n){margin-right:0}}@media only screen and (min-width:1680px){.theme-overlay .theme-wrap{width:1450px;margin:0 auto}}@media only screen and (min-width:1640px){.theme-browser .theme{width:22.7%;margin:0 3% 3% 0}.theme-browser .theme .theme-screenshot:after{padding-top:75%}.theme-browser .theme:nth-child(3n){margin-right:3%}.theme-browser .theme:nth-child(4n){margin-right:0}}@media only screen and (max-width:1120px){.theme-browser .theme{width:47.5%;margin-right:0}.theme-browser .theme:nth-child(even){margin-right:0}.theme-browser .theme:nth-child(odd){margin-right:5%}}@media only screen and (max-width:900px){.theme-overlay .theme-wrap{left:65px}}@media only screen and (max-width:780px){.theme-overlay .theme-wrap,body.folded .theme-overlay .theme-wrap{top:0;right:0;bottom:0;left:0;padding:70px 20px 20px;border:none;z-index:100000;position:fixed}.theme-browser .theme.active .theme-name span{display:none}.theme-overlay .theme-screenshots{width:40%}.theme-overlay .theme-info{width:50%}.single-theme .theme-wrap{padding:10px}.theme-browser .theme .theme-actions{padding:5px 10px 4px}.theme-overlay.small-screenshot .theme-screenshots{position:static;float:none;max-width:302px}.theme-overlay.small-screenshot .theme-info{margin-left:0;width:auto}.theme:focus .more-details,.theme:hover .more-details,.theme:not(.active):focus .theme-actions,.theme:not(.active):hover .theme-actions{display:none}.theme-browser.rendered .theme:focus .theme-screenshot img,.theme-browser.rendered .theme:hover .theme-screenshot img{opacity:1}}@media only screen and (max-width:480px){.theme-browser .theme{width:100%;margin-right:0}.theme-browser .theme:nth-child(2n),.theme-browser .theme:nth-child(3n){margin-right:0}}@media only screen and (max-width:650px){.theme-overlay .theme-description{margin-left:0}.theme-overlay .theme-actions .delete-theme{position:relative;right:auto;bottom:auto}.theme-overlay .theme-actions .inactive-theme{display:inline}.theme-overlay .theme-screenshots{width:100%;float:none}.theme-overlay .theme-info{width:100%}.theme-overlay .theme-author{margin:5px 0 15px}.theme-overlay .current-label{margin-top:10px;font-size:13px}.themes-php .wp-filter-search{float:none;clear:both;left:0;top:0;right:0;margin:10px 0;width:100%;max-width:280px}.theme-browser .theme.add-new-theme span:after{font:400 60px/90px dashicons;width:80px;height:80px;top:30%;left:50%;text-indent:0;margin-left:-40px}.single-theme .theme-wrap{margin:0 -12px 0 -10px;padding:10px}.single-theme .theme-overlay .theme-about{padding:10px;overflow:visible}.single-theme .current-label{display:none}.single-theme .theme-overlay .theme-actions{position:static}}.broken-themes{clear:both}.broken-themes table{text-align:left;width:50%;border-spacing:3px;padding:3px}.theme-browser .theme .theme-installed{background:#0073aa}.theme-browser .theme .notice-success p:before{color:#79ba49;content:"\f147";display:inline-block;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}.theme-install.updated-message:before{content:''}.theme-install-php .wp-filter{padding:0 20px}.theme-install-php a.browse-themes,.theme-install-php a.upload{cursor:pointer}.plugin-install-tab-upload .upload-view-toggle .upload,.upload-view-toggle .browse{display:none}.plugin-install-tab-upload .upload-view-toggle .browse{display:inline}.upload-plugin,.upload-theme{box-sizing:border-box;display:none;margin:0;padding:50px 0;width:100%;overflow:hidden;position:relative;top:10px}.wp-full-overlay,.wp-full-overlay-main,.wp-full-overlay-sidebar{top:0;height:100%;bottom:0;left:0}.upload-plugin-wrap{display:none}.plugin-install-tab-upload .upload-plugin,.show-upload-view .upload-plugin,.show-upload-view .upload-plugin-wrap,.show-upload-view .upload-theme{display:block}.upload-plugin .wp-upload-form,.upload-theme .wp-upload-form{background:#fafafa;border:1px solid #e5e5e5;padding:30px;margin:30px auto;max-width:380px}.upload-plugin .install-help,.upload-theme .install-help{color:#555d66;font-size:18px;font-style:normal;margin:0;padding:0;text-align:center}p.no-themes{clear:both;color:#666;font-size:18px;font-style:normal;margin:0;padding:100px 0;text-align:center;display:none}.no-results p.no-themes{display:block}.theme-install-php .add-new-theme{display:none!important}@media only screen and (max-width:1120px){.upload-theme .wp-upload-form{margin:20px 0;max-width:100%}.upload-theme .install-help{font-size:15px;padding:20px 0 0;text-align:left}}.theme-details .theme-rating{line-height:23px}.theme-details .star-rating{display:inline}.theme-details .no-rating,.theme-details .num-ratings{font-size:11px;color:#72777c}.theme-details .no-rating{display:block;line-height:20px}.appearance_page_custom-header #headimg{border:1px solid #ddd;overflow:hidden;width:100%}.appearance_page_custom-header #upload-form p label{font-size:12px}.appearance_page_custom-header .available-headers .default-header{float:left;margin:0 20px 20px 0}.appearance_page_custom-header .random-header{clear:both;margin:0 20px 20px 0;vertical-align:middle}.appearance_page_custom-header .available-headers label input,.appearance_page_custom-header .random-header label input{margin-right:10px}.appearance_page_custom-header .available-headers label img{vertical-align:middle}div#custom-background-image{min-height:100px;border:1px solid #ddd}div#custom-background-image img{max-width:400px;max-height:300px}body.full-overlay-active{overflow:hidden}.wp-full-overlay{z-index:500000;position:fixed;overflow:visible;right:0;min-width:0}.wp-full-overlay-sidebar{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;width:300px;padding:0;margin:0;z-index:10;background:#eee;border-right:none}.wp-full-overlay.collapsed,.wp-full-overlay.expanded .wp-full-overlay-sidebar{margin-left:0!important}.wp-full-overlay.expanded{margin-left:300px}.wp-full-overlay.collapsed .wp-full-overlay-sidebar{overflow:visible;margin-left:-300px}.wp-full-overlay-sidebar:after{content:"";display:block;position:absolute;top:0;bottom:0;right:0;width:3px;z-index:1000}.wp-full-overlay-main{position:absolute;right:0}.wp-full-overlay-sidebar .wp-full-overlay-header{position:absolute;left:0;right:0;height:45px;padding:0 15px;line-height:45px;z-index:10;margin:0;border-top:none;-webkit-box-shadow:none;box-shadow:none}.wp-full-overlay-sidebar .wp-full-overlay-header a.back{margin-top:9px}.wp-full-overlay-sidebar .wp-full-overlay-footer{bottom:0;border-bottom:none;border-top:none;-webkit-box-shadow:none;box-shadow:none}.wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{position:absolute;top:45px;bottom:45px;left:0;right:0;overflow:auto}.theme-install-overlay .wp-full-overlay-sidebar .wp-full-overlay-header{padding:0}.theme-install-overlay .close-full-overlay,.theme-install-overlay .next-theme,.theme-install-overlay .previous-theme{display:block;position:relative;float:left;width:45px;height:45px;padding-right:2px;background:#eee;border-right:1px solid #ddd;color:#444;cursor:pointer;text-decoration:none;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.theme-install-overlay .close-full-overlay:focus,.theme-install-overlay .close-full-overlay:hover,.theme-install-overlay .next-theme:focus,.theme-install-overlay .next-theme:hover,.theme-install-overlay .previous-theme:focus,.theme-install-overlay .previous-theme:hover{background:#ddd;border-color:#ccc;color:#000;outline:0;-webkit-box-shadow:none;box-shadow:none}.theme-install-overlay .close-full-overlay:before{font:400 22px/1 dashicons;content:"\f335";position:relative;top:7px;left:13px}.theme-install-overlay .previous-theme:before{font:400 20px/1 dashicons;content:"\f341";position:relative;top:6px;left:14px}.theme-install-overlay .next-theme:before{font:400 20px/1 dashicons;content:"\f345";position:relative;top:6px;left:13px}.theme-install-overlay .next-theme.disabled,.theme-install-overlay .next-theme.disabled:focus,.theme-install-overlay .next-theme.disabled:hover,.theme-install-overlay .previous-theme.disabled,.theme-install-overlay .previous-theme.disabled:focus,.theme-install-overlay .previous-theme.disabled:hover{color:#b4b9be;background:#eee;cursor:default;pointer-events:none}.theme-install-overlay .close-full-overlay,.theme-install-overlay .next-theme,.theme-install-overlay .previous-theme{border-left:0;border-top:0;border-bottom:0}.theme-install-overlay .close-full-overlay:before,.theme-install-overlay .next-theme:before,.theme-install-overlay .previous-theme:before{top:2px;left:0}.wp-core-ui .wp-full-overlay .collapse-sidebar{position:fixed;bottom:0;left:0;padding:9px 0 9px 10px;height:45px;color:#656a6f;outline:0;line-height:1;background-color:transparent!important;border:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}.wp-core-ui .wp-full-overlay .collapse-sidebar:focus,.wp-core-ui .wp-full-overlay .collapse-sidebar:hover{color:#0073aa}.wp-full-overlay .collapse-sidebar-arrow,.wp-full-overlay .collapse-sidebar-label{display:inline-block;vertical-align:middle;line-height:20px}.wp-full-overlay .collapse-sidebar-arrow{width:20px;height:20px;margin:0 2px;-webkit-border-radius:50%;border-radius:50%;overflow:hidden}.wp-full-overlay .collapse-sidebar:focus .collapse-sidebar-arrow,.wp-full-overlay .collapse-sidebar:hover .collapse-sidebar-arrow{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.wp-full-overlay .collapse-sidebar-label{margin-left:3px}.wp-full-overlay.collapsed .collapse-sidebar-label{display:none}.wp-full-overlay .collapse-sidebar-arrow:before{display:block;content:"\f148";background:#eee;font:400 20px/1 dashicons;speak:none;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-core-ui .wp-full-overlay.collapsed .collapse-sidebar{padding:9px 10px}.rtl .wp-full-overlay .collapse-sidebar-arrow:before,.wp-full-overlay.collapsed .collapse-sidebar-arrow:before{-webkit-transform:rotate(180.001deg);-ms-transform:rotate(180.001deg);transform:rotate(180.001deg)}.rtl .wp-full-overlay.collapsed .collapse-sidebar-arrow:before{-webkit-transform:none;-ms-transform:none;transform:none}.wp-full-overlay,.wp-full-overlay .collapse-sidebar,.wp-full-overlay-main,.wp-full-overlay-sidebar{-webkit-transition-property:left,right,top,bottom,width,margin;transition-property:left,right,top,bottom,width,margin;-webkit-transition-duration:.2s;transition-duration:.2s}.wp-full-overlay{background:#191e23}.wp-full-overlay-main{background-color:#f1f1f1}.expanded .wp-full-overlay-footer{position:fixed;bottom:0;left:0;width:300px;height:45px;border-top:1px solid #ddd;background:#eee}.wp-full-overlay-footer .devices{float:right}.wp-full-overlay-footer .devices button{cursor:pointer;background:0 0;border:none;height:45px;padding:0 3px;margin:0 0 0 -4px;-webkit-box-shadow:none;box-shadow:none;border-top:1px solid transparent;border-bottom:4px solid transparent;-webkit-transition:background .1s ease-in-out;transition:background .1s ease-in-out}.wp-full-overlay-footer .devices button:before{display:inline-block;-webkit-font-smoothing:antialiased;font:400 20px/30px dashicons;vertical-align:top;margin:3px 0;padding:4px 8px;color:#656a6f}.wp-full-overlay-footer .devices button.active{border-bottom-color:#191e23}.wp-full-overlay-footer .devices button:focus,.wp-full-overlay-footer .devices button:hover{background-color:#fff}.wp-full-overlay-footer .devices button:focus{-webkit-box-shadow:none;box-shadow:none;outline:0;background-color:#fff;border-bottom-color:#0073aa}.wp-full-overlay-footer .devices button.active:before,.wp-full-overlay-footer .devices button:focus:before,.wp-full-overlay-footer .devices button:hover:before{color:#191e23}.wp-full-overlay-footer .devices .preview-desktop:before{content:"\f472"}.wp-full-overlay-footer .devices .preview-tablet:before{content:"\f471"}.wp-full-overlay-footer .devices .preview-mobile:before{content:"\f470"}@media screen and (max-width:1024px){.wp-full-overlay-footer .devices{display:none}}.collapsed .wp-full-overlay-footer .devices button:before{display:none}.preview-mobile .wp-full-overlay-main{margin:auto 0 auto -160px;width:320px;height:480px;max-height:100%;max-width:100%;left:50%}.preview-tablet .wp-full-overlay-main{margin:auto 0 auto -360px;width:720px;height:1080px;max-height:100%;max-width:100%;left:50%}.customize-support .hide-if-customize,.customize-support .wp-core-ui .hide-if-customize,.customize-support.wp-core-ui .hide-if-customize,.no-customize-support .hide-if-no-customize,.no-customize-support .wp-core-ui .hide-if-no-customize,.no-customize-support.wp-core-ui .hide-if-no-customize{display:none}#customize-container{display:none;background:#fff;z-index:500000;position:fixed;overflow:visible;top:0;bottom:0;left:0;right:0;height:100%}.customize-active #customize-container{display:block}.customize-loading #customize-container iframe{opacity:0}#customize-container iframe,.theme-install-overlay iframe{height:100%;width:100%;z-index:20;-webkit-transition:opacity .3s;transition:opacity .3s}#customize-controls{margin-top:0}.theme-install-overlay{display:none}.theme-install-overlay.single-theme{display:block}.install-theme-info{display:none;padding:10px 20px 60px}.single-theme .install-theme-info{padding-top:15px}.theme-install-overlay .install-theme-info{display:block}.install-theme-info .theme-install{float:right;margin-top:18px}.install-theme-info .theme-name{font-size:16px;line-height:24px;margin-bottom:0;margin-top:0}.install-theme-info .theme-screenshot{margin:15px 0;width:258px;border:1px solid #ccc}.install-theme-info .theme-details{overflow:hidden}.theme-details .theme-version{margin:15px 0}.theme-details .theme-description{float:left;color:#72777c;line-height:20px;max-width:100%}.theme-install-overlay .wp-full-overlay-header .button{float:right;margin:8px 10px 0 0;line-height:26px}.theme-install-overlay .wp-full-overlay-sidebar{background:#eee;border-right:1px solid #ddd}.theme-install-overlay .wp-full-overlay-sidebar-content{background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.theme-install-overlay .wp-full-overlay-main{position:absolute;z-index:0;background-color:#f1f1f1}.customize-loading #customize-container{background-color:#f1f1f1}#customize-preview.wp-full-overlay-main:before,.customize-loading #customize-container:before,.theme-install-overlay .wp-full-overlay-main:before{content:"";display:block;width:20px;height:20px;position:absolute;left:50%;top:50%;z-index:-1;margin:-10px 0 0 -10px;-webkit-transform:translateZ(0);transform:translateZ(0);background:url(../images/spinner.gif) center center no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px}#customize-preview.wp-full-overlay-main.iframe-ready:before,.theme-install-overlay.iframe-ready .wp-full-overlay-main:before{background-image:none}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.wp-full-overlay .collapse-sidebar-arrow{background-image:url(../images/arrows-2x.png);-webkit-background-size:15px 123px;background-size:15px 123px}#customize-preview.wp-full-overlay-main:before,.customize-loading #customize-container:before,.theme-install-overlay .wp-full-overlay-main:before{background-image:url(../images/spinner-2x.gif)}}@media screen and (max-width:782px){.available-theme .action-links .delete-theme{float:none;margin:0;padding:0;clear:both}.available-theme .action-links .delete-theme a{padding:0}.broken-themes table{width:100%}.theme-install-overlay .wp-full-overlay-header .theme-install{margin-top:6px;line-height:normal}}@media aural{.theme .notice:before,.theme-info .updated-message:before,.theme-info .updating-message:before,.theme-install.updating-message:before{speak:none}}
\ No newline at end of file
index 1ac2ed55c2f1202b938594a061290ce7e63dcabf..de640db3c4da5d746d264f4e6f1a0884ba184b92 100644 (file)
@@ -347,6 +347,7 @@ div#widgets-right .closed .widgets-sortables {
 .js .widgets-holder-wrap.closed .widget,
 .js .widgets-holder-wrap.closed .sidebar-description,
 .js .widgets-holder-wrap.closed .remove-inactive-widgets,
+.js .widgets-holder-wrap.closed .description,
 .js .closed br.clear {
        display: none;
 }
@@ -368,7 +369,7 @@ div#widgets-right .closed .widgets-sortables {
 /* Dragging widgets over the available widget area show's a "Deactivate" message */
 #removing-widget {
        display: none;
-       font-weight: normal;
+       font-weight: 400;
        padding-right: 15px;
        font-size: 12px;
        line-height: 1;
index 16d18d854122b8f3384b57311d03076e3fe43aca..bd4a56cd1dc7633ebfd5733e681fe5ef8419724f 100644 (file)
@@ -1 +1 @@
-.widget,.widget-placeholder{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.widget{margin:0 auto 10px;position:relative;box-sizing:border-box}.widget-top{font-size:13px;font-weight:600;background:#f7f7f7}.widget-top a.widget-action,.widget-top a.widget-action:hover{-webkit-box-shadow:none;box-shadow:none;outline:0;text-decoration:none}.widget-title h3,.widget-title h4{margin:0;padding:15px;font-size:1em;line-height:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.widgets-holder-wrap .widget-inside{border-top:none;padding:1px 15px 15px;line-height:16px}#available-widgets .widget-description,#widgets-right a.widget-control-edit,.in-widget-title{color:#666}.deleting .widget-title,.deleting .widget-top a.widget-action:after{color:#a0a5aa}.widget.ui-draggable-dragging{min-width:100%}.widget.ui-sortable-helper{opacity:.8}.widget-placeholder{border:1px dashed #b4b9be;margin:0 auto 10px;height:45px;width:100%;box-sizing:border-box}#widgets-right .widget-placeholder{margin-top:0}#widgets-right .closed .widget-placeholder{height:0;border:0;margin-top:-10px}.sidebar-name{position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.sidebar-name-arrow{position:absolute;top:0;left:0;bottom:0}.js .sidebar-name{cursor:pointer}.sidebar-name h2,.sidebar-name h3{margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap}.widgets-holder-wrap .description{padding:0 0 15px;margin:0;font-style:normal;color:#72777c}.inactive-sidebar .description,.widget-holder .description{color:#555d66}#widgets-right .widgets-holder-wrap .description{padding-right:7px;padding-left:7px}div.widget-liquid-left{margin:0;width:38%;float:right}div.widget-liquid-right{float:left;width:58%}div#widgets-left{padding-top:12px}div#widgets-left .closed .sidebar-name,div#widgets-left .inactive-sidebar.closed .sidebar-name{margin-bottom:10px}div#widgets-left .sidebar-name h2,div#widgets-left .sidebar-name h3{padding:10px 0;margin:0 0 0 10px}#widgets-left .sidebar-name .sidebar-name-arrow:before{padding:9px}#widgets-left .widgets-holder-wrap,div#widgets-left .widget-holder{background:0 0;border:none}#widgets-left .widgets-holder-wrap{border:none;-webkit-box-shadow:none;box-shadow:none}#available-widgets .widget-action{display:none}#available-widgets .widget{margin:0}#available-widgets .widget:nth-child(odd){clear:both}#available-widgets .widget .widget-description{display:block;padding:10px 15px;font-size:12px}#available-widgets #widget-list{position:relative}#widgets-left .inactive-sidebar{clear:both;width:100%;background:0 0;padding:0;margin:0 0 20px;border:none;-webkit-box-shadow:none;box-shadow:none}#widgets-left .inactive-sidebar.first{margin-top:40px}div#widgets-left .inactive-sidebar .widget.expanded{right:auto}.widget-title-action{float:left;position:relative}div#widgets-left .inactive-sidebar .widgets-sortables{min-height:42px;padding:0;background:0 0;margin:0;position:relative}div#widgets-right .sidebars-column-1,div#widgets-right .sidebars-column-2{max-width:450px}div#widgets-right .widgets-holder-wrap{margin:10px 0 0}div#widgets-right .sidebar-description{min-height:20px;margin-top:-5px}div#widgets-right .sidebar-name h2,div#widgets-right .sidebar-name h3{padding:15px 7px}div#widgets-right .sidebar-name .sidebar-name-arrow:before{top:2px}div#widgets-right .widget-top{padding:0}div#widgets-right .widgets-sortables{padding:0 8px;margin-bottom:9px;position:relative;min-height:123px}div#widgets-right .closed .widgets-sortables{min-height:0;margin-bottom:0}.remove-inactive-widgets .spinner,.sidebar-name .spinner{float:none;position:relative;top:-2px;margin:-5px 5px}#widgets-right .widgets-holder-wrap.widget-hover{border-color:#72777c;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}.widgets_access #widgets-left .widget .widget-top{cursor:auto}.widgets_access #wpwrap .widget-control-edit,.widgets_access #wpwrap .widgets-holder-wrap.closed .sidebar-description,.widgets_access #wpwrap .widgets-holder-wrap.closed .widget{display:block}.widgets_access #widgets-left .widget .widget-top:hover,.widgets_access #widgets-right .widget .widget-top:hover{border-color:#ddd}#available-widgets .widget-control-edit .edit,#widgets-left .inactive-sidebar .widget-control-edit .add,#widgets-right .widget-control-edit .add{display:none}.editwidget .widget-inside,.widget-control-edit{display:block;padding:0 15px}.widget-control-edit{color:#666;background:#EEE;line-height:43px;border-right:1px solid #DDD}#widgets-left .widget-control-edit:hover,#widgets-right .widget-control-edit:hover{color:#fff;background:#444;border-right:0;outline:#444 solid 1px}.widgets-holder-wrap .sidebar-description,.widgets-holder-wrap .sidebar-name{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.editwidget{margin:0 auto}.editwidget .widget-control-actions{margin-top:20px}.js .closed br.clear,.js .widgets-holder-wrap.closed .remove-inactive-widgets,.js .widgets-holder-wrap.closed .sidebar-description,.js .widgets-holder-wrap.closed .widget{display:none}.js .widgets-holder-wrap.closed .widget.ui-sortable-helper{display:block}#access-off,.no-js .widget-holder .description,.widget-control-noform,.widget-description,.widget-inside,.widgets_access #access-on,.widgets_access .sidebar-name-arrow,.widgets_access .widget-action,.widgets_access .widget-holder .description{display:none}.widget-inside{background:#fff}#removing-widget{display:none;font-weight:400;padding-right:15px;font-size:12px;line-height:1;color:#000}.js #removing-widget{color:#00a0d2}.widgets_access #widget-list,.widgets_access .widget-holder{padding-top:10px}.widgets_access #access-off{display:inline}.widgets_access .sidebar-name,.widgets_access .widget .widget-top{cursor:default}.widget-liquid-left #widgets-left.chooser #available-widgets .widget,.widget-liquid-left #widgets-left.chooser .inactive-sidebar{-webkit-transition:opacity .1s linear;transition:opacity .1s linear;opacity:.2;pointer-events:none}.widget-liquid-left #widgets-left.chooser #available-widgets .widget-in-question{opacity:1;pointer-events:auto}#available-widgets .widget-top:hover,#widgets-left .widget-in-question .widget-top,#widgets-left .widget-top:hover,.widgets-chooser ul,div#widgets-right .widget-top:hover{border-color:#999;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1)}.widgets-chooser ul.widgets-chooser-sidebars{margin:0;list-style-type:none;max-height:300px;overflow:auto}.widgets-chooser{display:none}.widgets-chooser ul{border:1px solid #ccc}.widgets-chooser li{padding:10px 35px 10px 15px;border-bottom:1px solid #ccc;background:#fff;margin:0;cursor:pointer;outline:0;position:relative;-webkit-transition:background .2s ease-in-out;transition:background .2s ease-in-out}.widgets-chooser li:focus,.widgets-chooser li:hover{background:rgba(255,255,255,.7)}.widgets-chooser li:focus:before{content:"\f147";display:block;-webkit-font-smoothing:antialiased;font:400 26px/1 dashicons;color:#555d66;position:absolute;top:7px;right:5px}.widgets-chooser li:last-child{border:none}.widgets-chooser li.widgets-chooser-selected{background:#00a0d2;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{content:"\f147";display:block;-webkit-font-smoothing:antialiased;font:400 26px/1 dashicons;color:#fff;position:absolute;top:7px;right:5px}.widgets-chooser .widgets-chooser-actions{padding:10px 0 12px;text-align:center}.widgets-chooser button{margin-left:5px}#available-widgets .widget .widget-top{cursor:pointer}#available-widgets .widget.ui-draggable-dragging .widget-top{cursor:move}@media screen and (max-width:480px){div.widget-liquid-left{width:100%;float:none;border-left:none;padding-left:0}#widgets-left #available-widgets .widget-top,#widgets-left .inactive-sidebar .widgets-sortables,#widgets-left .sidebar-name{margin-left:0}div.widget-liquid-right{width:100%;float:none}div.widget{margin:0 auto 10px!important;max-width:480px}}@media screen and (max-width:320px){div.widget{max-width:320px}}@media only screen and (min-width:1250px){#widgets-left #available-widgets .widget{width:49%;float:right}.widget.ui-draggable-dragging{min-width:49%}#widgets-left #available-widgets .widget:nth-child(even){float:left}#widgets-right .sidebars-column-1,#widgets-right .sidebars-column-2{float:right;width:49%}#widgets-right .sidebars-column-1{margin-left:2%}#widgets-right.single-sidebar .sidebars-column-1,#widgets-right.single-sidebar .sidebars-column-2{float:none;width:100%;margin:0}}
\ No newline at end of file
+.widget,.widget-placeholder{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.widget{margin:0 auto 10px;position:relative;box-sizing:border-box}.widget-top{font-size:13px;font-weight:600;background:#f7f7f7}.widget-top a.widget-action,.widget-top a.widget-action:hover{-webkit-box-shadow:none;box-shadow:none;outline:0;text-decoration:none}.widget-title h3,.widget-title h4{margin:0;padding:15px;font-size:1em;line-height:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.widgets-holder-wrap .widget-inside{border-top:none;padding:1px 15px 15px;line-height:16px}#available-widgets .widget-description,#widgets-right a.widget-control-edit,.in-widget-title{color:#666}.deleting .widget-title,.deleting .widget-top a.widget-action:after{color:#a0a5aa}.widget.ui-draggable-dragging{min-width:100%}.widget.ui-sortable-helper{opacity:.8}.widget-placeholder{border:1px dashed #b4b9be;margin:0 auto 10px;height:45px;width:100%;box-sizing:border-box}#widgets-right .widget-placeholder{margin-top:0}#widgets-right .closed .widget-placeholder{height:0;border:0;margin-top:-10px}.sidebar-name{position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.sidebar-name-arrow{position:absolute;top:0;left:0;bottom:0}.js .sidebar-name{cursor:pointer}.sidebar-name h2,.sidebar-name h3{margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap}.widgets-holder-wrap .description{padding:0 0 15px;margin:0;font-style:normal;color:#72777c}.inactive-sidebar .description,.widget-holder .description{color:#555d66}#widgets-right .widgets-holder-wrap .description{padding-right:7px;padding-left:7px}div.widget-liquid-left{margin:0;width:38%;float:right}div.widget-liquid-right{float:left;width:58%}div#widgets-left{padding-top:12px}div#widgets-left .closed .sidebar-name,div#widgets-left .inactive-sidebar.closed .sidebar-name{margin-bottom:10px}div#widgets-left .sidebar-name h2,div#widgets-left .sidebar-name h3{padding:10px 0;margin:0 0 0 10px}#widgets-left .sidebar-name .sidebar-name-arrow:before{padding:9px}#widgets-left .widgets-holder-wrap,div#widgets-left .widget-holder{background:0 0;border:none}#widgets-left .widgets-holder-wrap{border:none;-webkit-box-shadow:none;box-shadow:none}#available-widgets .widget-action{display:none}#available-widgets .widget{margin:0}#available-widgets .widget:nth-child(odd){clear:both}#available-widgets .widget .widget-description{display:block;padding:10px 15px;font-size:12px}#available-widgets #widget-list{position:relative}#widgets-left .inactive-sidebar{clear:both;width:100%;background:0 0;padding:0;margin:0 0 20px;border:none;-webkit-box-shadow:none;box-shadow:none}#widgets-left .inactive-sidebar.first{margin-top:40px}div#widgets-left .inactive-sidebar .widget.expanded{right:auto}.widget-title-action{float:left;position:relative}div#widgets-left .inactive-sidebar .widgets-sortables{min-height:42px;padding:0;background:0 0;margin:0;position:relative}div#widgets-right .sidebars-column-1,div#widgets-right .sidebars-column-2{max-width:450px}div#widgets-right .widgets-holder-wrap{margin:10px 0 0}div#widgets-right .sidebar-description{min-height:20px;margin-top:-5px}div#widgets-right .sidebar-name h2,div#widgets-right .sidebar-name h3{padding:15px 7px}div#widgets-right .sidebar-name .sidebar-name-arrow:before{top:2px}div#widgets-right .widget-top{padding:0}div#widgets-right .widgets-sortables{padding:0 8px;margin-bottom:9px;position:relative;min-height:123px}div#widgets-right .closed .widgets-sortables{min-height:0;margin-bottom:0}.remove-inactive-widgets .spinner,.sidebar-name .spinner{float:none;position:relative;top:-2px;margin:-5px 5px}#widgets-right .widgets-holder-wrap.widget-hover{border-color:#72777c;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}.widgets_access #widgets-left .widget .widget-top{cursor:auto}.widgets_access #wpwrap .widget-control-edit,.widgets_access #wpwrap .widgets-holder-wrap.closed .sidebar-description,.widgets_access #wpwrap .widgets-holder-wrap.closed .widget{display:block}.widgets_access #widgets-left .widget .widget-top:hover,.widgets_access #widgets-right .widget .widget-top:hover{border-color:#ddd}#available-widgets .widget-control-edit .edit,#widgets-left .inactive-sidebar .widget-control-edit .add,#widgets-right .widget-control-edit .add{display:none}.editwidget .widget-inside,.widget-control-edit{display:block;padding:0 15px}.widget-control-edit{color:#666;background:#EEE;line-height:43px;border-right:1px solid #DDD}#widgets-left .widget-control-edit:hover,#widgets-right .widget-control-edit:hover{color:#fff;background:#444;border-right:0;outline:#444 solid 1px}.widgets-holder-wrap .sidebar-description,.widgets-holder-wrap .sidebar-name{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.editwidget{margin:0 auto}.editwidget .widget-control-actions{margin-top:20px}.js .closed br.clear,.js .widgets-holder-wrap.closed .description,.js .widgets-holder-wrap.closed .remove-inactive-widgets,.js .widgets-holder-wrap.closed .sidebar-description,.js .widgets-holder-wrap.closed .widget{display:none}.js .widgets-holder-wrap.closed .widget.ui-sortable-helper{display:block}#access-off,.no-js .widget-holder .description,.widget-control-noform,.widget-description,.widget-inside,.widgets_access #access-on,.widgets_access .sidebar-name-arrow,.widgets_access .widget-action,.widgets_access .widget-holder .description{display:none}.widget-inside{background:#fff}#removing-widget{display:none;font-weight:400;padding-right:15px;font-size:12px;line-height:1;color:#000}.js #removing-widget{color:#00a0d2}.widgets_access #widget-list,.widgets_access .widget-holder{padding-top:10px}.widgets_access #access-off{display:inline}.widgets_access .sidebar-name,.widgets_access .widget .widget-top{cursor:default}.widget-liquid-left #widgets-left.chooser #available-widgets .widget,.widget-liquid-left #widgets-left.chooser .inactive-sidebar{-webkit-transition:opacity .1s linear;transition:opacity .1s linear;opacity:.2;pointer-events:none}.widget-liquid-left #widgets-left.chooser #available-widgets .widget-in-question{opacity:1;pointer-events:auto}#available-widgets .widget-top:hover,#widgets-left .widget-in-question .widget-top,#widgets-left .widget-top:hover,.widgets-chooser ul,div#widgets-right .widget-top:hover{border-color:#999;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1)}.widgets-chooser ul.widgets-chooser-sidebars{margin:0;list-style-type:none;max-height:300px;overflow:auto}.widgets-chooser{display:none}.widgets-chooser ul{border:1px solid #ccc}.widgets-chooser li{padding:10px 35px 10px 15px;border-bottom:1px solid #ccc;background:#fff;margin:0;cursor:pointer;outline:0;position:relative;-webkit-transition:background .2s ease-in-out;transition:background .2s ease-in-out}.widgets-chooser li:focus,.widgets-chooser li:hover{background:rgba(255,255,255,.7)}.widgets-chooser li:focus:before{content:"\f147";display:block;-webkit-font-smoothing:antialiased;font:400 26px/1 dashicons;color:#555d66;position:absolute;top:7px;right:5px}.widgets-chooser li:last-child{border:none}.widgets-chooser li.widgets-chooser-selected{background:#00a0d2;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{content:"\f147";display:block;-webkit-font-smoothing:antialiased;font:400 26px/1 dashicons;color:#fff;position:absolute;top:7px;right:5px}.widgets-chooser .widgets-chooser-actions{padding:10px 0 12px;text-align:center}.widgets-chooser button{margin-left:5px}#available-widgets .widget .widget-top{cursor:pointer}#available-widgets .widget.ui-draggable-dragging .widget-top{cursor:move}@media screen and (max-width:480px){div.widget-liquid-left{width:100%;float:none;border-left:none;padding-left:0}#widgets-left #available-widgets .widget-top,#widgets-left .inactive-sidebar .widgets-sortables,#widgets-left .sidebar-name{margin-left:0}div.widget-liquid-right{width:100%;float:none}div.widget{margin:0 auto 10px!important;max-width:480px}}@media screen and (max-width:320px){div.widget{max-width:320px}}@media only screen and (min-width:1250px){#widgets-left #available-widgets .widget{width:49%;float:right}.widget.ui-draggable-dragging{min-width:49%}#widgets-left #available-widgets .widget:nth-child(even){float:left}#widgets-right .sidebars-column-1,#widgets-right .sidebars-column-2{float:right;width:49%}#widgets-right .sidebars-column-1{margin-left:2%}#widgets-right.single-sidebar .sidebars-column-1,#widgets-right.single-sidebar .sidebars-column-2{float:none;width:100%;margin:0}}
\ No newline at end of file
index c2d6754fdd038ca7d4b848332bf26afa0cec74cc..f0be076c0e5a01253f0c792d420b0e09a7db6db3 100644 (file)
@@ -347,6 +347,7 @@ div#widgets-right .closed .widgets-sortables {
 .js .widgets-holder-wrap.closed .widget,
 .js .widgets-holder-wrap.closed .sidebar-description,
 .js .widgets-holder-wrap.closed .remove-inactive-widgets,
+.js .widgets-holder-wrap.closed .description,
 .js .closed br.clear {
        display: none;
 }
@@ -368,7 +369,7 @@ div#widgets-right .closed .widgets-sortables {
 /* Dragging widgets over the available widget area show's a "Deactivate" message */
 #removing-widget {
        display: none;
-       font-weight: normal;
+       font-weight: 400;
        padding-left: 15px;
        font-size: 12px;
        line-height: 1;
index f1e5dfac3d6325b30a75b120c996ab33869f67ad..23628ff4abbc9f8b6ab7d6750971a5cc0a340d6f 100644 (file)
@@ -1 +1 @@
-.widget,.widget-placeholder{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.widget{margin:0 auto 10px;position:relative;box-sizing:border-box}.widget-top{font-size:13px;font-weight:600;background:#f7f7f7}.widget-top a.widget-action,.widget-top a.widget-action:hover{-webkit-box-shadow:none;box-shadow:none;outline:0;text-decoration:none}.widget-title h3,.widget-title h4{margin:0;padding:15px;font-size:1em;line-height:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.widgets-holder-wrap .widget-inside{border-top:none;padding:1px 15px 15px;line-height:16px}#available-widgets .widget-description,#widgets-right a.widget-control-edit,.in-widget-title{color:#666}.deleting .widget-title,.deleting .widget-top a.widget-action:after{color:#a0a5aa}.widget.ui-draggable-dragging{min-width:100%}.widget.ui-sortable-helper{opacity:.8}.widget-placeholder{border:1px dashed #b4b9be;margin:0 auto 10px;height:45px;width:100%;box-sizing:border-box}#widgets-right .widget-placeholder{margin-top:0}#widgets-right .closed .widget-placeholder{height:0;border:0;margin-top:-10px}.sidebar-name{position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.sidebar-name-arrow{position:absolute;top:0;right:0;bottom:0}.js .sidebar-name{cursor:pointer}.sidebar-name h2,.sidebar-name h3{margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap}.widgets-holder-wrap .description{padding:0 0 15px;margin:0;font-style:normal;color:#72777c}.inactive-sidebar .description,.widget-holder .description{color:#555d66}#widgets-right .widgets-holder-wrap .description{padding-left:7px;padding-right:7px}div.widget-liquid-left{margin:0;width:38%;float:left}div.widget-liquid-right{float:right;width:58%}div#widgets-left{padding-top:12px}div#widgets-left .closed .sidebar-name,div#widgets-left .inactive-sidebar.closed .sidebar-name{margin-bottom:10px}div#widgets-left .sidebar-name h2,div#widgets-left .sidebar-name h3{padding:10px 0;margin:0 10px 0 0}#widgets-left .sidebar-name .sidebar-name-arrow:before{padding:9px}#widgets-left .widgets-holder-wrap,div#widgets-left .widget-holder{background:0 0;border:none}#widgets-left .widgets-holder-wrap{border:none;-webkit-box-shadow:none;box-shadow:none}#available-widgets .widget-action{display:none}#available-widgets .widget{margin:0}#available-widgets .widget:nth-child(odd){clear:both}#available-widgets .widget .widget-description{display:block;padding:10px 15px;font-size:12px}#available-widgets #widget-list{position:relative}#widgets-left .inactive-sidebar{clear:both;width:100%;background:0 0;padding:0;margin:0 0 20px;border:none;-webkit-box-shadow:none;box-shadow:none}#widgets-left .inactive-sidebar.first{margin-top:40px}div#widgets-left .inactive-sidebar .widget.expanded{left:auto}.widget-title-action{float:right;position:relative}div#widgets-left .inactive-sidebar .widgets-sortables{min-height:42px;padding:0;background:0 0;margin:0;position:relative}div#widgets-right .sidebars-column-1,div#widgets-right .sidebars-column-2{max-width:450px}div#widgets-right .widgets-holder-wrap{margin:10px 0 0}div#widgets-right .sidebar-description{min-height:20px;margin-top:-5px}div#widgets-right .sidebar-name h2,div#widgets-right .sidebar-name h3{padding:15px 7px}div#widgets-right .sidebar-name .sidebar-name-arrow:before{top:2px}div#widgets-right .widget-top{padding:0}div#widgets-right .widgets-sortables{padding:0 8px;margin-bottom:9px;position:relative;min-height:123px}div#widgets-right .closed .widgets-sortables{min-height:0;margin-bottom:0}.remove-inactive-widgets .spinner,.sidebar-name .spinner{float:none;position:relative;top:-2px;margin:-5px 5px}#widgets-right .widgets-holder-wrap.widget-hover{border-color:#72777c;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}.widgets_access #widgets-left .widget .widget-top{cursor:auto}.widgets_access #wpwrap .widget-control-edit,.widgets_access #wpwrap .widgets-holder-wrap.closed .sidebar-description,.widgets_access #wpwrap .widgets-holder-wrap.closed .widget{display:block}.widgets_access #widgets-left .widget .widget-top:hover,.widgets_access #widgets-right .widget .widget-top:hover{border-color:#ddd}#available-widgets .widget-control-edit .edit,#widgets-left .inactive-sidebar .widget-control-edit .add,#widgets-right .widget-control-edit .add{display:none}.editwidget .widget-inside,.widget-control-edit{display:block;padding:0 15px}.widget-control-edit{color:#666;background:#EEE;line-height:43px;border-left:1px solid #DDD}#widgets-left .widget-control-edit:hover,#widgets-right .widget-control-edit:hover{color:#fff;background:#444;border-left:0;outline:#444 solid 1px}.widgets-holder-wrap .sidebar-description,.widgets-holder-wrap .sidebar-name{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.editwidget{margin:0 auto}.editwidget .widget-control-actions{margin-top:20px}.js .closed br.clear,.js .widgets-holder-wrap.closed .remove-inactive-widgets,.js .widgets-holder-wrap.closed .sidebar-description,.js .widgets-holder-wrap.closed .widget{display:none}.js .widgets-holder-wrap.closed .widget.ui-sortable-helper{display:block}#access-off,.no-js .widget-holder .description,.widget-control-noform,.widget-description,.widget-inside,.widgets_access #access-on,.widgets_access .sidebar-name-arrow,.widgets_access .widget-action,.widgets_access .widget-holder .description{display:none}.widget-inside{background:#fff}#removing-widget{display:none;font-weight:400;padding-left:15px;font-size:12px;line-height:1;color:#000}.js #removing-widget{color:#00a0d2}.widgets_access #widget-list,.widgets_access .widget-holder{padding-top:10px}.widgets_access #access-off{display:inline}.widgets_access .sidebar-name,.widgets_access .widget .widget-top{cursor:default}.widget-liquid-left #widgets-left.chooser #available-widgets .widget,.widget-liquid-left #widgets-left.chooser .inactive-sidebar{-webkit-transition:opacity .1s linear;transition:opacity .1s linear;opacity:.2;pointer-events:none}.widget-liquid-left #widgets-left.chooser #available-widgets .widget-in-question{opacity:1;pointer-events:auto}#available-widgets .widget-top:hover,#widgets-left .widget-in-question .widget-top,#widgets-left .widget-top:hover,.widgets-chooser ul,div#widgets-right .widget-top:hover{border-color:#999;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1)}.widgets-chooser ul.widgets-chooser-sidebars{margin:0;list-style-type:none;max-height:300px;overflow:auto}.widgets-chooser{display:none}.widgets-chooser ul{border:1px solid #ccc}.widgets-chooser li{padding:10px 15px 10px 35px;border-bottom:1px solid #ccc;background:#fff;margin:0;cursor:pointer;outline:0;position:relative;-webkit-transition:background .2s ease-in-out;transition:background .2s ease-in-out}.widgets-chooser li:focus,.widgets-chooser li:hover{background:rgba(255,255,255,.7)}.widgets-chooser li:focus:before{content:"\f147";display:block;-webkit-font-smoothing:antialiased;font:400 26px/1 dashicons;color:#555d66;position:absolute;top:7px;left:5px}.widgets-chooser li:last-child{border:none}.widgets-chooser li.widgets-chooser-selected{background:#00a0d2;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{content:"\f147";display:block;-webkit-font-smoothing:antialiased;font:400 26px/1 dashicons;color:#fff;position:absolute;top:7px;left:5px}.widgets-chooser .widgets-chooser-actions{padding:10px 0 12px;text-align:center}.widgets-chooser button{margin-right:5px}#available-widgets .widget .widget-top{cursor:pointer}#available-widgets .widget.ui-draggable-dragging .widget-top{cursor:move}@media screen and (max-width:480px){div.widget-liquid-left{width:100%;float:none;border-right:none;padding-right:0}#widgets-left #available-widgets .widget-top,#widgets-left .inactive-sidebar .widgets-sortables,#widgets-left .sidebar-name{margin-right:0}div.widget-liquid-right{width:100%;float:none}div.widget{margin:0 auto 10px!important;max-width:480px}}@media screen and (max-width:320px){div.widget{max-width:320px}}@media only screen and (min-width:1250px){#widgets-left #available-widgets .widget{width:49%;float:left}.widget.ui-draggable-dragging{min-width:49%}#widgets-left #available-widgets .widget:nth-child(even){float:right}#widgets-right .sidebars-column-1,#widgets-right .sidebars-column-2{float:left;width:49%}#widgets-right .sidebars-column-1{margin-right:2%}#widgets-right.single-sidebar .sidebars-column-1,#widgets-right.single-sidebar .sidebars-column-2{float:none;width:100%;margin:0}}
\ No newline at end of file
+.widget,.widget-placeholder{-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.widget{margin:0 auto 10px;position:relative;box-sizing:border-box}.widget-top{font-size:13px;font-weight:600;background:#f7f7f7}.widget-top a.widget-action,.widget-top a.widget-action:hover{-webkit-box-shadow:none;box-shadow:none;outline:0;text-decoration:none}.widget-title h3,.widget-title h4{margin:0;padding:15px;font-size:1em;line-height:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.widgets-holder-wrap .widget-inside{border-top:none;padding:1px 15px 15px;line-height:16px}#available-widgets .widget-description,#widgets-right a.widget-control-edit,.in-widget-title{color:#666}.deleting .widget-title,.deleting .widget-top a.widget-action:after{color:#a0a5aa}.widget.ui-draggable-dragging{min-width:100%}.widget.ui-sortable-helper{opacity:.8}.widget-placeholder{border:1px dashed #b4b9be;margin:0 auto 10px;height:45px;width:100%;box-sizing:border-box}#widgets-right .widget-placeholder{margin-top:0}#widgets-right .closed .widget-placeholder{height:0;border:0;margin-top:-10px}.sidebar-name{position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.sidebar-name-arrow{position:absolute;top:0;right:0;bottom:0}.js .sidebar-name{cursor:pointer}.sidebar-name h2,.sidebar-name h3{margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap}.widgets-holder-wrap .description{padding:0 0 15px;margin:0;font-style:normal;color:#72777c}.inactive-sidebar .description,.widget-holder .description{color:#555d66}#widgets-right .widgets-holder-wrap .description{padding-left:7px;padding-right:7px}div.widget-liquid-left{margin:0;width:38%;float:left}div.widget-liquid-right{float:right;width:58%}div#widgets-left{padding-top:12px}div#widgets-left .closed .sidebar-name,div#widgets-left .inactive-sidebar.closed .sidebar-name{margin-bottom:10px}div#widgets-left .sidebar-name h2,div#widgets-left .sidebar-name h3{padding:10px 0;margin:0 10px 0 0}#widgets-left .sidebar-name .sidebar-name-arrow:before{padding:9px}#widgets-left .widgets-holder-wrap,div#widgets-left .widget-holder{background:0 0;border:none}#widgets-left .widgets-holder-wrap{border:none;-webkit-box-shadow:none;box-shadow:none}#available-widgets .widget-action{display:none}#available-widgets .widget{margin:0}#available-widgets .widget:nth-child(odd){clear:both}#available-widgets .widget .widget-description{display:block;padding:10px 15px;font-size:12px}#available-widgets #widget-list{position:relative}#widgets-left .inactive-sidebar{clear:both;width:100%;background:0 0;padding:0;margin:0 0 20px;border:none;-webkit-box-shadow:none;box-shadow:none}#widgets-left .inactive-sidebar.first{margin-top:40px}div#widgets-left .inactive-sidebar .widget.expanded{left:auto}.widget-title-action{float:right;position:relative}div#widgets-left .inactive-sidebar .widgets-sortables{min-height:42px;padding:0;background:0 0;margin:0;position:relative}div#widgets-right .sidebars-column-1,div#widgets-right .sidebars-column-2{max-width:450px}div#widgets-right .widgets-holder-wrap{margin:10px 0 0}div#widgets-right .sidebar-description{min-height:20px;margin-top:-5px}div#widgets-right .sidebar-name h2,div#widgets-right .sidebar-name h3{padding:15px 7px}div#widgets-right .sidebar-name .sidebar-name-arrow:before{top:2px}div#widgets-right .widget-top{padding:0}div#widgets-right .widgets-sortables{padding:0 8px;margin-bottom:9px;position:relative;min-height:123px}div#widgets-right .closed .widgets-sortables{min-height:0;margin-bottom:0}.remove-inactive-widgets .spinner,.sidebar-name .spinner{float:none;position:relative;top:-2px;margin:-5px 5px}#widgets-right .widgets-holder-wrap.widget-hover{border-color:#72777c;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}.widgets_access #widgets-left .widget .widget-top{cursor:auto}.widgets_access #wpwrap .widget-control-edit,.widgets_access #wpwrap .widgets-holder-wrap.closed .sidebar-description,.widgets_access #wpwrap .widgets-holder-wrap.closed .widget{display:block}.widgets_access #widgets-left .widget .widget-top:hover,.widgets_access #widgets-right .widget .widget-top:hover{border-color:#ddd}#available-widgets .widget-control-edit .edit,#widgets-left .inactive-sidebar .widget-control-edit .add,#widgets-right .widget-control-edit .add{display:none}.editwidget .widget-inside,.widget-control-edit{display:block;padding:0 15px}.widget-control-edit{color:#666;background:#EEE;line-height:43px;border-left:1px solid #DDD}#widgets-left .widget-control-edit:hover,#widgets-right .widget-control-edit:hover{color:#fff;background:#444;border-left:0;outline:#444 solid 1px}.widgets-holder-wrap .sidebar-description,.widgets-holder-wrap .sidebar-name{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.editwidget{margin:0 auto}.editwidget .widget-control-actions{margin-top:20px}.js .closed br.clear,.js .widgets-holder-wrap.closed .description,.js .widgets-holder-wrap.closed .remove-inactive-widgets,.js .widgets-holder-wrap.closed .sidebar-description,.js .widgets-holder-wrap.closed .widget{display:none}.js .widgets-holder-wrap.closed .widget.ui-sortable-helper{display:block}#access-off,.no-js .widget-holder .description,.widget-control-noform,.widget-description,.widget-inside,.widgets_access #access-on,.widgets_access .sidebar-name-arrow,.widgets_access .widget-action,.widgets_access .widget-holder .description{display:none}.widget-inside{background:#fff}#removing-widget{display:none;font-weight:400;padding-left:15px;font-size:12px;line-height:1;color:#000}.js #removing-widget{color:#00a0d2}.widgets_access #widget-list,.widgets_access .widget-holder{padding-top:10px}.widgets_access #access-off{display:inline}.widgets_access .sidebar-name,.widgets_access .widget .widget-top{cursor:default}.widget-liquid-left #widgets-left.chooser #available-widgets .widget,.widget-liquid-left #widgets-left.chooser .inactive-sidebar{-webkit-transition:opacity .1s linear;transition:opacity .1s linear;opacity:.2;pointer-events:none}.widget-liquid-left #widgets-left.chooser #available-widgets .widget-in-question{opacity:1;pointer-events:auto}#available-widgets .widget-top:hover,#widgets-left .widget-in-question .widget-top,#widgets-left .widget-top:hover,.widgets-chooser ul,div#widgets-right .widget-top:hover{border-color:#999;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1)}.widgets-chooser ul.widgets-chooser-sidebars{margin:0;list-style-type:none;max-height:300px;overflow:auto}.widgets-chooser{display:none}.widgets-chooser ul{border:1px solid #ccc}.widgets-chooser li{padding:10px 15px 10px 35px;border-bottom:1px solid #ccc;background:#fff;margin:0;cursor:pointer;outline:0;position:relative;-webkit-transition:background .2s ease-in-out;transition:background .2s ease-in-out}.widgets-chooser li:focus,.widgets-chooser li:hover{background:rgba(255,255,255,.7)}.widgets-chooser li:focus:before{content:"\f147";display:block;-webkit-font-smoothing:antialiased;font:400 26px/1 dashicons;color:#555d66;position:absolute;top:7px;left:5px}.widgets-chooser li:last-child{border:none}.widgets-chooser li.widgets-chooser-selected{background:#00a0d2;color:#fff}.widgets-chooser li.widgets-chooser-selected:before,.widgets-chooser li.widgets-chooser-selected:focus:before{content:"\f147";display:block;-webkit-font-smoothing:antialiased;font:400 26px/1 dashicons;color:#fff;position:absolute;top:7px;left:5px}.widgets-chooser .widgets-chooser-actions{padding:10px 0 12px;text-align:center}.widgets-chooser button{margin-right:5px}#available-widgets .widget .widget-top{cursor:pointer}#available-widgets .widget.ui-draggable-dragging .widget-top{cursor:move}@media screen and (max-width:480px){div.widget-liquid-left{width:100%;float:none;border-right:none;padding-right:0}#widgets-left #available-widgets .widget-top,#widgets-left .inactive-sidebar .widgets-sortables,#widgets-left .sidebar-name{margin-right:0}div.widget-liquid-right{width:100%;float:none}div.widget{margin:0 auto 10px!important;max-width:480px}}@media screen and (max-width:320px){div.widget{max-width:320px}}@media only screen and (min-width:1250px){#widgets-left #available-widgets .widget{width:49%;float:left}.widget.ui-draggable-dragging{min-width:49%}#widgets-left #available-widgets .widget:nth-child(even){float:right}#widgets-right .sidebars-column-1,#widgets-right .sidebars-column-2{float:left;width:49%}#widgets-right .sidebars-column-1{margin-right:2%}#widgets-right.single-sidebar .sidebars-column-1,#widgets-right.single-sidebar .sidebars-column-2{float:none;width:100%;margin:0}}
\ No newline at end of file
index dba32c661e5d7d3b7bf84ee45d0af4819baf0557..a03986f5949f11cb3a1763953b9c0993bc9838d1 100644 (file)
@@ -410,7 +410,7 @@ if ( current_theme_supports( 'custom-background', 'default-color' ) )
        }
 
        /**
-        * AJAX handler for adding custom background context to an attachment.
+        * Ajax handler for adding custom background context to an attachment.
         *
         * Triggered when the user adds a new background image from the
         * Media Manager.
index a46bd94b7f0af21160cf46ae05bcbb00cbce74a4..fc5adb670ede0b7267b34295b906f3d1ac4b66bf 100644 (file)
@@ -966,7 +966,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
         */
        public function admin_page() {
                if ( ! current_user_can('edit_theme_options') )
-                       wp_die(__('You do not have permission to customize headers.'));
+                       wp_die(__('Sorry, you are not allowed to customize headers.'));
                $step = $this->step();
                if ( 2 == $step )
                        $this->step_2();
@@ -1183,7 +1183,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
                $attachment_id = wp_insert_attachment( $object, $cropped );
                $metadata = wp_generate_attachment_metadata( $attachment_id, $cropped );
                /**
-                * Filter the header image attachment metadata.
+                * Filters the header image attachment metadata.
                 *
                 * @since 3.9.0
                 *
index 7f667d373d913d3dc93c9ebc17d3089599ce1cd3..bd8e11819b895cad7bba61e5c8a2fc21f539e7ea 100644 (file)
@@ -15,7 +15,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
 if ( ! current_user_can( 'customize' ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to customize the appearance of this site.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to customize this site.' ) . '</p>',
                403
        );
 }
@@ -118,12 +118,12 @@ do_action( 'customize_controls_print_scripts' );
                        submit_button( $save_text, 'primary save', 'save', false );
                        ?>
                        <span class="spinner"></span>
-                       <a class="customize-controls-preview-toggle" href="#">
+                       <button type="button" class="customize-controls-preview-toggle">
                                <span class="controls"><?php _e( 'Customize' ); ?></span>
                                <span class="preview"><?php _e( 'Preview' ); ?></span>
-                       </a>
+                       </button>
                        <a class="customize-controls-close" href="<?php echo esc_url( $wp_customize->get_return_url() ); ?>">
-                               <span class="screen-reader-text"><?php _e( 'Cancel' ); ?></span>
+                               <span class="screen-reader-text"><?php _e( 'Close the Customizer and go back to the previous page' ); ?></span>
                        </a>
                </div>
 
@@ -134,7 +134,7 @@ do_action( 'customize_controls_print_scripts' );
                                        <span class="preview-notice"><?php
                                                echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title site-title">' . get_bloginfo( 'name' ) . '</strong>' );
                                        ?></span>
-                                       <button class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
+                                       <button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
                                </div>
                                <div class="customize-panel-description"><?php
                                        _e( 'The Customizer allows you to preview changes to your site before publishing them. You can also navigate to different pages on your site to preview them.' );
@@ -178,7 +178,7 @@ do_action( 'customize_controls_print_scripts' );
        <?php
 
        /**
-        * Print templates, control scripts, and settings in the footer.
+        * Prints templates, control scripts, and settings in the footer.
         *
         * @since 3.4.0
         */
index f5448ab349855c71c01e28ced615673177a4861d..f0ecec92e8a1909c2d4c6b53c99ec53fd7487318 100644 (file)
@@ -11,7 +11,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
 if ( ! current_user_can( 'edit_posts' ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to edit comments.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to edit comments.' ) . '</p>',
                403
        );
 }
@@ -210,7 +210,7 @@ if ( isset( $_REQUEST['error'] ) ) {
                        $error_msg = __( 'Invalid comment ID.' );
                        break;
                case 2 :
-                       $error_msg = __( 'You are not allowed to edit comments on this post.' );
+                       $error_msg = __( 'Sorry, you are not allowed to edit comments on this post.' );
                        break;
        }
        if ( $error_msg )
index ea5428fe496e4e5ca370477015b9214d7e07f286..bd229b90c9cc2ae082beab1123ad6b87638228dc 100644 (file)
@@ -11,9 +11,9 @@ if ( !defined('ABSPATH') )
        die('-1');
 
 /**
- * @global string  $post_type
- * @global object  $post_type_object
- * @global WP_Post $post
+ * @global string       $post_type
+ * @global WP_Post_Type $post_type_object
+ * @global WP_Post      $post
  */
 global $post_type, $post_type_object, $post;
 
@@ -21,7 +21,7 @@ wp_enqueue_script('post');
 $_wp_editor_expand = $_content_editor_dfw = false;
 
 /**
- * Filter whether to enable the 'expand' functionality in the post editor.
+ * Filters whether to enable the 'expand' functionality in the post editor.
  *
  * @since 4.0.0
  * @since 4.1.0 Added the `$post_type` parameter.
@@ -129,7 +129,7 @@ if ( $viewable ) {
 
 }
 
-/* translators: Publish box date format, see http://php.net/date */
+/* translators: Publish box date format, see https://secure.php.net/date */
 $scheduled_date = date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) );
 
 $messages['post'] = array(
@@ -163,7 +163,7 @@ $messages['page'] = array(
 $messages['attachment'] = array_fill( 1, 10, __( 'Media file updated.' ) ); // Hack, for now.
 
 /**
- * Filter the post updated messages.
+ * Filters the post updated messages.
  *
  * @since 3.0.0
  *
@@ -219,7 +219,7 @@ $publish_callback_args = null;
 if ( post_type_supports($post_type, 'revisions') && 'auto-draft' != $post->post_status ) {
        $revisions = wp_get_post_revisions( $post_ID );
 
-       // We should aim to show the revisions metabox only when there are revisions.
+       // We should aim to show the revisions meta box only when there are revisions.
        if ( count( $revisions ) > 1 ) {
                reset( $revisions ); // Reset pointer for key()
                $publish_callback_args = array( 'revisions_count' => count( $revisions ), 'revision_id' => key( $revisions ) );
@@ -543,7 +543,7 @@ do_action( 'edit_form_top', $post ); ?>
 <div id="titlewrap">
        <?php
        /**
-        * Filter the title field placeholder text.
+        * Filters the title field placeholder text.
         *
         * @since 3.1.0
         *
index e73ee484b0e58aeb8835cb3f298d16d15f79c50f..9fac3e934cecee068c66e5e32750f99f652521af 100644 (file)
@@ -82,14 +82,14 @@ if ( 'approved' === wp_get_comment_status( $comment ) && $comment->comment_post_
 
 <fieldset class="misc-pub-section misc-pub-comment-status" id="comment-status-radio">
 <legend class="screen-reader-text"><?php _e( 'Comment status' ); ?></legend>
-<label class="approved"><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php _ex( 'Approved', 'comment status' ); ?></label><br />
-<label class="waiting"><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php _ex( 'Pending', 'comment status' ); ?></label><br />
-<label class="spam"><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php _ex( 'Spam', 'comment status' ); ?></label>
+<label><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php _ex( 'Approved', 'comment status' ); ?></label><br />
+<label><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php _ex( 'Pending', 'comment status' ); ?></label><br />
+<label><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php _ex( 'Spam', 'comment status' ); ?></label>
 </fieldset>
 
 <div class="misc-pub-section curtime misc-pub-curtime">
 <?php
-/* translators: Publish box date format, see http://php.net/date */
+/* translators: Publish box date format, see https://secure.php.net/date */
 $datef = __( 'M j, Y @ H:i' );
 ?>
 <span id="timestamp"><?php
@@ -143,7 +143,7 @@ endif; ?>
 
 <?php
        /**
-        * Filter miscellaneous actions for the edit comment form sidebar.
+        * Filters miscellaneous actions for the edit comment form sidebar.
         *
         * @since 4.3.0
         *
index a50685efbfbf870c9556556d0dc4379d8b4d5f24..7d218dd5764d2d23b4ea71c27c893c2c7568da8b 100644 (file)
@@ -45,7 +45,7 @@ if ( 'category' == $taxonomy ) {
 }
 
 /**
- * Use with caution, see http://codex.wordpress.org/Function_Reference/wp_reset_vars
+ * Use with caution, see https://codex.wordpress.org/Function_Reference/wp_reset_vars
  */
 wp_reset_vars( array( 'wp_http_referer' ) );
 
@@ -74,9 +74,15 @@ do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
 <div id="message" class="updated">
        <p><strong><?php echo $message; ?></strong></p>
        <?php if ( $wp_http_referer ) { ?>
-       <p><a href="<?php echo esc_url( $wp_http_referer ); ?>"><?php printf( __( '&larr; Back to %s' ), $tax->labels->name ); ?></a></p>
+       <p><a href="<?php echo esc_url( $wp_http_referer ); ?>"><?php
+               /* translators: %s: taxonomy name */
+               printf( _x( '&larr; Back to %s', 'admin screen' ), $tax->labels->name );
+       ?></a></p>
        <?php } else { ?>
-       <p><a href="<?php echo esc_url( wp_get_referer() ); ?>"><?php printf( __( '&larr; Back to %s' ), $tax->labels->name ); ?></a></p>
+       <p><a href="<?php echo esc_url( wp_get_referer() ); ?>"><?php
+               /* translators: %s: taxonomy name */
+               printf( _x( '&larr; Back to %s', 'admin screen' ), $tax->labels->name );
+       ?></a></p>
        <?php } ?>
 </div>
 <?php endif; ?>
@@ -127,7 +133,7 @@ do_action( "{$taxonomy}_term_edit_form_top", $tag, $taxonomy );
                        <th scope="row"><label for="slug"><?php _e( 'Slug' ); ?></label></th>
                        <?php
                        /**
-                        * Filter the editable slug.
+                        * Filters the editable slug.
                         *
                         * Note: This is a multi-use hook in that it is leveraged both for editable
                         * post URIs and term slugs.
index b953da683a87e2e7b2be3c50633a25cf2d1aa471..dbb1f483635dca0d1e131b310e14b0768a83f6a5 100644 (file)
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 if ( ! $taxnow )
-       wp_die( __( 'Invalid taxonomy' ) );
+       wp_die( __( 'Invalid taxonomy.' ) );
 
 $tax = get_taxonomy( $taxnow );
 
 if ( ! $tax )
-       wp_die( __( 'Invalid taxonomy' ) );
+       wp_die( __( 'Invalid taxonomy.' ) );
 
 if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) {
-   wp_die( __( 'You are not allowed to manage these items.' ) );
+   wp_die( __( 'Sorry, you are not allowed to manage these items.' ) );
 }
 
 if ( ! current_user_can( $tax->cap->manage_terms ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to manage these items.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to manage these items.' ) . '</p>',
                403
        );
 }
@@ -71,7 +71,7 @@ case 'add-tag':
        if ( ! current_user_can( $tax->cap->edit_terms ) ) {
                wp_die(
                        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-                       '<p>' . __( 'You are not allowed to add this item.' ) . '</p>',
+                       '<p>' . __( 'Sorry, you are not allowed to add this item.' ) . '</p>',
                        403
                );
        }
@@ -111,7 +111,7 @@ case 'delete':
        if ( ! current_user_can( $tax->cap->delete_terms ) ) {
                wp_die(
                        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-                       '<p>' . __( 'You are not allowed to delete this item.' ) . '</p>',
+                       '<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
                        403
                );
        }
@@ -128,7 +128,7 @@ case 'bulk-delete':
        if ( ! current_user_can( $tax->cap->delete_terms ) ) {
                wp_die(
                        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-                       '<p>' . __( 'You are not allowed to delete these items.' ) . '</p>',
+                       '<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
                        403
                );
        }
@@ -171,7 +171,7 @@ case 'editedtag':
        if ( ! current_user_can( $tax->cap->edit_terms ) ) {
                wp_die(
                        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-                       '<p>' . __( 'You are not allowed to edit this item.' ) . '</p>',
+                       '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
                        403
                );
        }
@@ -205,7 +205,16 @@ if ( $location ) {
        if ( ! empty( $_REQUEST['paged'] ) ) {
                $location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location );
        }
-       wp_redirect( $location );
+
+       /**
+        * Filters the taxonomy redirect destination URL.
+        *
+        * @since 4.6.0
+        * 
+        * @param string $location The destination URL.
+        * @param object $tax      The taxonomy object.
+        */
+       wp_redirect( apply_filters( 'redirect_term_location', $location, $tax ) );
        exit;
 }
 
@@ -288,7 +297,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
 if ( ! current_user_can( $tax->cap->edit_terms ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to edit this item.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
                403
        );
 }
@@ -321,87 +330,21 @@ if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
 endif; ?>
 <div id="ajax-response"></div>
 
-<form class="search-form" method="get">
+<form class="search-form wp-clearfix" method="get">
 <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
 <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
 
 <?php $wp_list_table->search_box( $tax->labels->search_items, 'tag' ); ?>
 
 </form>
-<br class="clear" />
-
-<div id="col-container">
-
-<div id="col-right">
-<div class="col-wrap">
-<form id="posts-filter" method="post">
-<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
-<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
-
-<?php $wp_list_table->display(); ?>
 
-<br class="clear" />
-</form>
-
-<?php if ( 'category' == $taxonomy ) : ?>
-<div class="form-wrap">
-<p>
-       <?php
-       echo '<strong>' . __( 'Note:' ) . '</strong><br />';
-       printf(
-               /* translators: %s: default category */
-               __( 'Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category %s.' ),
-               /** This filter is documented in wp-includes/category-template.php */
-               '<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ) ) . '</strong>'
-       );
-       ?>
-</p>
-<?php if ( current_user_can( 'import' ) ) : ?>
-<p><?php printf( __( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ), esc_url( $import_link ) ) ?></p>
-<?php endif; ?>
-</div>
-<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
-<div class="form-wrap">
-<p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) ) ;?></p>
-</div>
-<?php endif;
-
-/**
- * Fires after the taxonomy list table.
- *
- * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
- *
- * @since 3.0.0
- *
- * @param string $taxonomy The taxonomy name.
- */
-do_action( "after-{$taxonomy}-table", $taxonomy );
-?>
-
-</div>
-</div><!-- /col-right -->
+<div id="col-container" class="wp-clearfix">
 
 <div id="col-left">
 <div class="col-wrap">
 
 <?php
 
-if ( !is_null( $tax->labels->popular_items ) ) {
-       if ( current_user_can( $tax->cap->edit_terms ) )
-               $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) );
-       else
-               $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) );
-
-       if ( $tag_cloud ) :
-       ?>
-<div class="tagcloud">
-<h2><?php echo $tax->labels->popular_items; ?></h2>
-<?php echo $tag_cloud; unset( $tag_cloud ); ?>
-</div>
-<?php
-endif;
-}
-
 if ( current_user_can($tax->cap->edit_terms) ) {
        if ( 'category' == $taxonomy ) {
                /**
@@ -493,7 +436,7 @@ do_action( "{$taxonomy}_term_new_form_tag" );
        );
 
        /**
-        * Filter the taxonomy parent drop-down on the Edit Term page.
+        * Filters the taxonomy parent drop-down on the Edit Term page.
         *
         * @since 3.7.0
         * @since 4.2.0 Added `$context` parameter.
@@ -597,11 +540,78 @@ if ( 'category' == $taxonomy ) {
 do_action( "{$taxonomy}_add_form", $taxonomy );
 ?>
 </form></div>
-<?php } ?>
+<?php }
+
+if ( ! is_null( $tax->labels->popular_items ) ) {
+       if ( current_user_can( $tax->cap->edit_terms ) ) {
+               $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) );
+       } else {
+               $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) );
+       }
+
+       if ( $tag_cloud ) :
+       ?>
+<div class="tagcloud">
+<h2><?php echo $tax->labels->popular_items; ?></h2>
+<?php echo $tag_cloud; unset( $tag_cloud ); ?>
+</div>
+<?php
+       endif;
+}
+
+?>
 
 </div>
 </div><!-- /col-left -->
 
+<div id="col-right">
+<div class="col-wrap">
+<form id="posts-filter" method="post">
+<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
+<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" />
+
+<?php $wp_list_table->display(); ?>
+
+</form>
+
+<?php if ( 'category' == $taxonomy ) : ?>
+<div class="form-wrap edit-term-notes">
+<p>
+       <?php
+       echo '<strong>' . __( 'Note:' ) . '</strong><br />';
+       printf(
+               /* translators: %s: default category */
+               __( 'Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category %s.' ),
+               /** This filter is documented in wp-includes/category-template.php */
+               '<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ) ) . '</strong>'
+       );
+       ?>
+</p>
+<?php if ( current_user_can( 'import' ) ) : ?>
+<p><?php printf( __( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ), esc_url( $import_link ) ) ?></p>
+<?php endif; ?>
+</div>
+<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
+<div class="form-wrap edit-term-notes">
+<p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) ) ;?></p>
+</div>
+<?php endif;
+
+/**
+ * Fires after the taxonomy list table.
+ *
+ * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
+ *
+ * @since 3.0.0
+ *
+ * @param string $taxonomy The taxonomy name.
+ */
+do_action( "after-{$taxonomy}-table", $taxonomy );
+?>
+
+</div>
+</div><!-- /col-right -->
+
 </div><!-- /col-container -->
 </div><!-- /wrap -->
 
index 27d8f6895b415aa91d1fbfa0f8869a00e88b829a..59cb4f195436362eb184a3d3e6304c6adc1232ca 100644 (file)
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 if ( ! $typenow )
-       wp_die( __( 'Invalid post type' ) );
+       wp_die( __( 'Invalid post type.' ) );
 
 if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) {
-       wp_die( __( 'You are not allowed to edit posts in this post type.' ) );
+       wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) );
 }
 
 if ( 'attachment' === $typenow ) {
@@ -23,8 +23,8 @@ if ( 'attachment' === $typenow ) {
 }
 
 /**
- * @global string $post_type
- * @global object $post_type_object
+ * @global string       $post_type
+ * @global WP_Post_Type $post_type_object
  */
 global $post_type, $post_type_object;
 
@@ -32,12 +32,12 @@ $post_type = $typenow;
 $post_type_object = get_post_type_object( $post_type );
 
 if ( ! $post_type_object )
-       wp_die( __( 'Invalid post type' ) );
+       wp_die( __( 'Invalid post type.' ) );
 
 if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to edit posts in this post type.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to edit posts in this post type.' ) . '</p>',
                403
        );
 }
@@ -103,7 +103,7 @@ if ( $doaction ) {
 
                        foreach ( (array) $post_ids as $post_id ) {
                                if ( !current_user_can( 'delete_post', $post_id) )
-                                       wp_die( __('You are not allowed to move this item to the Trash.') );
+                                       wp_die( __('Sorry, you are not allowed to move this item to the Trash.') );
 
                                if ( wp_check_post_lock( $post_id ) ) {
                                        $locked++;
@@ -122,7 +122,7 @@ if ( $doaction ) {
                        $untrashed = 0;
                        foreach ( (array) $post_ids as $post_id ) {
                                if ( !current_user_can( 'delete_post', $post_id) )
-                                       wp_die( __('You are not allowed to restore this item from the Trash.') );
+                                       wp_die( __('Sorry, you are not allowed to restore this item from the Trash.') );
 
                                if ( !wp_untrash_post($post_id) )
                                        wp_die( __('Error in restoring from Trash.') );
@@ -137,7 +137,7 @@ if ( $doaction ) {
                                $post_del = get_post($post_id);
 
                                if ( !current_user_can( 'delete_post', $post_id ) )
-                                       wp_die( __('You are not allowed to delete this item.') );
+                                       wp_die( __('Sorry, you are not allowed to delete this item.') );
 
                                if ( $post_del->post_type == 'attachment' ) {
                                        if ( ! wp_delete_attachment($post_id) )
@@ -194,7 +194,7 @@ if ( 'post' == $post_type ) {
                '<p>' . __('You can customize the display of this screen&#8217;s contents in a number of ways:') . '</p>' .
                '<ul>' .
                        '<li>' . __('You can hide/display columns based on your needs and decide how many posts to list per screen using the Screen Options tab.') . '</li>' .
-                       '<li>' . __('You can filter the list of posts by post status using the text links in the upper left to show All, Published, Draft, or Trashed posts. The default view is to show all posts.') . '</li>' .
+                       '<li>' . __( 'You can filter the list of posts by post status using the text links above the posts list to only show posts with that status. The default view is to show all posts.' ) . '</li>' .
                        '<li>' . __('You can view posts in a simple title list or with an excerpt using the Screen Options tab.') . '</li>' .
                        '<li>' . __('You can refine the list to show only posts in a specific category or from a specific month by using the dropdown menus above the posts list. Click the Filter button after making your selection. You also can refine the list by clicking on the post author, category or tag in the posts list.') . '</li>' .
                '</ul>'
@@ -283,7 +283,7 @@ $bulk_messages['page'] = array(
 );
 
 /**
- * Filter the bulk action updated messages.
+ * Filters the bulk action updated messages.
  *
  * By default, custom post types use the messages for the 'post' post type.
  *
index 5ce4e34c7e31d1bedff6fe49886d646f03e6e0f5..ebf5a910eab0788676c52416e79b53a77243da41 100644 (file)
@@ -10,7 +10,7 @@
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 if ( !current_user_can('export') )
-       wp_die(__('You do not have sufficient permissions to export the content of this site.'));
+       wp_die(__('Sorry, you are not allowed to export the content of this site.'));
 
 /** Load WordPress export API */
 require_once( ABSPATH . 'wp-admin/includes/export.php' );
@@ -103,7 +103,7 @@ if ( isset( $_GET['download'] ) ) {
        }
 
        /**
-        * Filter the export args.
+        * Filters the export args.
         *
         * @since 3.5.0
         *
index 440f0853cc835c1b278c776c6825437241f4a519..b47465d73a4614c3eb20b7137a0ac1ebb9147eb4 100644 (file)
@@ -19,7 +19,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
 
 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
 
-<div class="about-text"><?php printf( __( 'Thank you for updating! WordPress %s streamlines your workflow, whether you&#8217;re writing or building your site.' ), $display_version ); ?></div>
+<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version. WordPress %s changes a lot behind the scenes to make your WordPress experience even better!' ), $display_version ); ?></p>
 
 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
 
@@ -47,7 +47,7 @@ $themes_url = current_user_can( 'switch_themes' ) ? admin_url( 'themes.php' ) :
 
 printf( __( 'Every plugin and theme in WordPress.org&#8217;s directory is 100%% GPL or a similarly free and compatible license, so you can feel safe finding <a href="%1$s">plugins</a> and <a href="%2$s">themes</a> there. If you get a plugin or theme from another source, make sure to <a href="%3$s">ask them if it&#8217;s GPL</a> first. If they don&#8217;t respect the WordPress license, we don&#8217;t recommend them.' ), $plugins_url, $themes_url, 'https://wordpress.org/about/license/' ); ?></p>
 
-<p><?php _e( 'Don&#8217;t you wish all software came with these freedoms? So do we! For more information, check out the <a href="http://www.fsf.org/">Free Software Foundation</a>.' ); ?></p>
+<p><?php _e( 'Don&#8217;t you wish all software came with these freedoms? So do we! For more information, check out the <a href="https://www.fsf.org/">Free Software Foundation</a>.' ); ?></p>
 
 </div>
 <?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
diff --git a/wp-admin/images/browser-rtl.png b/wp-admin/images/browser-rtl.png
new file mode 100644 (file)
index 0000000..a4d3695
Binary files /dev/null and b/wp-admin/images/browser-rtl.png differ
index a1ce80e2b341838ee95f2659eff52e3456203db6..51837662305b30480d41d2be1df2ea84e0300d67 100644 (file)
@@ -11,8 +11,9 @@ define('WP_LOAD_IMPORTERS', true);
 /** Load WordPress Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
-if ( !current_user_can('import') )
-       wp_die(__('You do not have sufficient permissions to import content in this site.'));
+if ( ! current_user_can( 'import' ) ) {
+       wp_die( __( 'Sorry, you are not allowed to import content.' ) );
+}
 
 $title = __('Import');
 
@@ -29,10 +30,12 @@ get_current_screen()->set_help_sidebar(
        '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
 );
 
-if ( current_user_can( 'install_plugins' ) )
+if ( current_user_can( 'install_plugins' ) ) {
+       // List of popular importer plugins from the WordPress.org API.
        $popular_importers = wp_get_popular_importers();
-else
-       $popular_importers = array();
+} else {
+       $popular_importers = array();
+}
 
 // Detect and redirect invalid importers like 'movabletype', which is registered as 'mt'
 if ( ! empty( $_GET['invalid'] ) && isset( $popular_importers[ $_GET['invalid'] ] ) ) {
@@ -46,6 +49,7 @@ if ( ! empty( $_GET['invalid'] ) && isset( $popular_importers[ $_GET['invalid']
 
 add_thickbox();
 wp_enqueue_script( 'plugin-install' );
+wp_enqueue_script( 'updates' );
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
 $parent_file = 'tools.php';
@@ -64,7 +68,7 @@ $parent_file = 'tools.php';
 <p><?php _e('If you have posts or comments in another system, WordPress can import those into this site. To get started, choose a system to import from below:'); ?></p>
 
 <?php
-
+// Registered (already installed) importers. They're stored in the global $wp_importers.
 $importers = get_importers();
 
 // If a popular importer is not registered, create a dummy registration that links to the plugin installer.
@@ -73,6 +77,8 @@ foreach ( $popular_importers as $pop_importer => $pop_data ) {
                continue;
        if ( isset( $importers[ $pop_data['importer-id'] ] ) )
                continue;
+
+       // Fill the array of registered (already installed) importers with data of the popular importers from the WordPress.org API.
        $importers[ $pop_data['importer-id'] ] = array( $pop_data['name'], $pop_data['description'], 'install' => $pop_data['plugin-slug'] );
 }
 
@@ -83,43 +89,106 @@ if ( empty( $importers ) ) {
 ?>
 <table class="widefat importers striped">
 
-<?php
-       foreach ($importers as $importer_id => $data) {
-               $action = '';
+       <?php
+       foreach ( $importers as $importer_id => $data ) {
+               $plugin_slug = $action = '';
+               $is_plugin_installed = false;
+
                if ( isset( $data['install'] ) ) {
                        $plugin_slug = $data['install'];
+
                        if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin_slug ) ) {
-                               // Looks like Importer is installed, But not active
+                               // Looks like an importer is installed, but not active.
                                $plugins = get_plugins( '/' . $plugin_slug );
-                               if ( !empty($plugins) ) {
-                                       $keys = array_keys($plugins);
+                               if ( ! empty( $plugins ) ) {
+                                       $keys = array_keys( $plugins );
                                        $plugin_file = $plugin_slug . '/' . $keys[0];
-                                       $action = '<a href="' . esc_url(wp_nonce_url(admin_url('plugins.php?action=activate&plugin=' . $plugin_file . '&from=import'), 'activate-plugin_' . $plugin_file)) .
-                                                                                       '"title="' . esc_attr__('Activate importer') . '"">' . $data[0] . '</a>';
+                                       $url = wp_nonce_url( add_query_arg( array(
+                                               'action' => 'activate',
+                                               'plugin' => $plugin_file,
+                                               'from'   => 'import',
+                                       ), admin_url( 'plugins.php' ) ), 'activate-plugin_' . $plugin_file );
+                                       $action = sprintf(
+                                               '<a href="%s" aria-label="%s">%s</a>',
+                                               esc_url( $url ),
+                                               /* translators: %s: Importer name */
+                                               esc_attr( sprintf( __( 'Run %s' ), $data[0] ) ),
+                                               __( 'Run Importer' )
+                                       );
+
+                                       $is_plugin_installed = true;
                                }
                        }
-                       if ( empty($action) ) {
+
+                       if ( empty( $action ) ) {
                                if ( is_main_site() ) {
-                                       $action = '<a href="' . esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug .
-                                                                               '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox open-plugin-details-modal" title="' .
-                                                                               esc_attr__('Install importer') . '">' . $data[0] . '</a>';
+                                       $url = wp_nonce_url( add_query_arg( array(
+                                               'action' => 'install-plugin',
+                                               'plugin' => $plugin_slug,
+                                               'from'   => 'import',
+                                       ), self_admin_url( 'update.php' ) ), 'install-plugin_' . $plugin_slug );
+                                       $action = sprintf(
+                                               '<a href="%1$s" class="install-now" data-slug="%2$s" data-name="%3$s" aria-label="%4$s">%5$s</a>',
+                                               esc_url( $url ),
+                                               esc_attr( $plugin_slug ),
+                                               esc_attr( $data[0] ),
+                                               /* translators: %s: Importer name */
+                                               esc_attr( sprintf( __( 'Install %s' ), $data[0] ) ),
+                                               __( 'Install Now' )
+                                       );
                                } else {
-                                       $action = $data[0];
-                                       $data[1] = sprintf( __( 'This importer is not installed. Please install importers from <a href="%s">the main site</a>.' ), get_admin_url( $current_site->blog_id, 'import.php' ) );
+                                       $action = sprintf(
+                                               /* translators: URL to wp-admin/import.php */
+                                               __( 'This importer is not installed. Please install importers from <a href="%s">the main site</a>.' ),
+                                               get_admin_url( get_current_network_id(), 'import.php' )
+                                       );
                                }
                        }
                } else {
-                       $action = "<a href='" . esc_url( "admin.php?import=$importer_id" ) . "' title='" . esc_attr( wptexturize( strip_tags( $data[1] ) ) ) ."'>{$data[0]}</a>";
+                       $url = add_query_arg( array(
+                               'import' => $importer_id,
+                       ), self_admin_url( 'admin.php' ) );
+                       $action = sprintf(
+                               '<a href="%1$s" aria-label="%2$s">%3$s</a>',
+                               esc_url( $url ),
+                               /* translators: %s: Importer name */
+                               esc_attr( sprintf( __( 'Run %s' ), $data[0] ) ),
+                               __( 'Run Importer' )
+                       );
+
+                       $is_plugin_installed = true;
+               }
+
+               if ( ! $is_plugin_installed && is_main_site() ) {
+                       $url = add_query_arg( array(
+                               'tab'       => 'plugin-information',
+                               'plugin'    => $plugin_slug,
+                               'from'      => 'import',
+                               'TB_iframe' => 'true',
+                               'width'     => 600,
+                               'height'    => 550,
+                       ), network_admin_url( 'plugin-install.php' ) );
+                       $action .= sprintf(
+                               ' | <a href="%1$s" class="thickbox open-plugin-details-modal" aria-label="%2$s">%3$s</a>',
+                               esc_url( $url ),
+                               /* translators: %s: Importer name */
+                               esc_attr( sprintf( __( 'More information about %s' ), $data[0] ) ),
+                               __( 'Details' )
+                       );
                }
 
                echo "
-                       <tr>
-                               <td class='import-system row-title'>$action</td>
-                               <td class='desc'>{$data[1]}</td>
+                       <tr class='importer-item'>
+                               <td class='import-system'>
+                                       <span class='importer-title'>{$data[0]}</span>
+                                       <span class='importer-action'>{$action}</span>
+                               </td>
+                               <td class='desc'>
+                                       <span class='importer-desc'>{$data[1]}</span>
+                               </td>
                        </tr>";
        }
-?>
-
+       ?>
 </table>
 <?php
 }
@@ -131,5 +200,7 @@ if ( current_user_can('install_plugins') )
 </div>
 
 <?php
+wp_print_request_filesystem_credentials_modal();
+wp_print_admin_notice_templates();
 
 include( ABSPATH . 'wp-admin/admin-footer.php' );
index 38051e394775b0fcc06a1a54ba6f59c4cff0c1f0..141e8aa08efb289f0697e26f0644a946b07f3f71 100644 (file)
@@ -43,7 +43,13 @@ add_action( 'admin_head', 'wp_color_scheme_settings' );
 add_action( 'admin_head', 'wp_site_icon'             );
 add_action( 'admin_head', '_ipad_meta'               );
 
-add_action( 'post_edit_form_tag', 'post_form_autocomplete_off' );
+// Prerendering.
+if ( ! is_customize_preview() ) {
+       add_filter( 'admin_print_styles', 'wp_resource_hints', 1 );
+}
+
+add_action( 'admin_print_scripts-post.php',     'wp_page_reload_on_back_button_js' );
+add_action( 'admin_print_scripts-post-new.php', 'wp_page_reload_on_back_button_js' );
 
 add_action( 'update_option_home',          'update_home_siteurl', 10, 2 );
 add_action( 'update_option_siteurl',       'update_home_siteurl', 10, 2 );
@@ -97,8 +103,8 @@ add_action( 'admin_notices', 'default_password_nag' );
 add_action( 'profile_update', 'default_password_nag_edit_user', 10, 2 );
 
 // Update hooks.
-add_action( 'admin_init', 'wp_plugin_update_rows' );
-add_action( 'admin_init', 'wp_theme_update_rows'  );
+add_action( 'load-plugins.php', 'wp_plugin_update_rows', 20 ); // After wp_update_plugins() is called.
+add_action( 'load-themes.php', 'wp_theme_update_rows', 20 ); // After wp_update_themes() is called.
 
 add_action( 'admin_notices', 'update_nag',      3  );
 add_action( 'admin_notices', 'maintenance_nag', 10 );
@@ -110,3 +116,6 @@ add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' );
 
 // Upgrade hooks.
 add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
+add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );
+add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
+add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
index 0f5583682bf2a66ba6910bcd2ec1c5721cc954e5..dc965d63cc176df106249b2833e9f85f1fc28e64 100644 (file)
@@ -32,7 +32,7 @@ function wp_ajax_nopriv_heartbeat() {
                $data = wp_unslash( (array) $_POST['data'] );
 
                /**
-                * Filter Heartbeat AJAX response in no-privilege environments.
+                * Filters Heartbeat Ajax response in no-privilege environments.
                 *
                 * @since 3.6.0
                 *
@@ -44,7 +44,7 @@ function wp_ajax_nopriv_heartbeat() {
        }
 
        /**
-        * Filter Heartbeat AJAX response when no data is passed.
+        * Filters Heartbeat Ajax response when no data is passed.
         *
         * @since 3.6.0
         *
@@ -132,7 +132,7 @@ function wp_ajax_ajax_tag_search() {
        $s = trim( $s );
 
        /**
-        * Filter the minimum number of characters required to fire a tag search via AJAX.
+        * Filters the minimum number of characters required to fire a tag search via Ajax.
         *
         * @since 4.0.0
         *
@@ -174,7 +174,6 @@ function wp_ajax_wp_compression_test() {
                header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' );
                header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
                header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
-               header( 'Pragma: no-cache' );
                header('Content-Type: application/javascript; charset=UTF-8');
                $force_gzip = ( defined('ENFORCE_GZIP') && ENFORCE_GZIP );
                $test_str = '"wpCompressionTest Lorem ipsum dolor sit amet consectetuer mollis sapien urna ut a. Eu nonummy condimentum fringilla tempor pretium platea vel nibh netus Maecenas. Hac molestie amet justo quis pellentesque est ultrices interdum nibh Morbi. Cras mattis pretium Phasellus ante ipsum ipsum ut sociis Suspendisse Lorem. Ante et non molestie. Porta urna Vestibulum egestas id congue nibh eu risus gravida sit. Ac augue auctor Ut et non a elit massa id sodales. Elit eu Nulla at nibh adipiscing mattis lacus mauris at tempus. Netus nibh quis suscipit nec feugiat eget sed lorem et urna. Pellentesque lacus at ut massa consectetuer ligula ut auctor semper Pellentesque. Ut metus massa nibh quam Curabitur molestie nec mauris congue. Volutpat molestie elit justo facilisis neque ac risus Ut nascetur tristique. Vitae sit lorem tellus et quis Phasellus lacus tincidunt nunc Fusce. Pharetra wisi Suspendisse mus sagittis libero lacinia Integer consequat ac Phasellus. Et urna ac cursus tortor aliquam Aliquam amet tellus volutpat Vestibulum. Justo interdum condimentum In augue congue tellus sollicitudin Quisque quis nibh."';
@@ -336,7 +335,7 @@ function wp_ajax_logged_in() {
 /**
  * Sends back current comment total and new page links if they need to be updated.
  *
- * Contrary to normal success AJAX response ("1"), die with time() on success.
+ * Contrary to normal success Ajax response ("1"), die with time() on success.
  *
  * @access private
  * @since 2.7.0
@@ -352,8 +351,18 @@ function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) {
 
        // JS didn't send us everything we need to know. Just die with success message
        if ( ! $total || ! $per_page || ! $page || ! $url ) {
-               $time = time();
-               $comment = get_comment( $comment_id );
+               $time           = time();
+               $comment        = get_comment( $comment_id );
+               $comment_status = '';
+               $comment_link   = '';
+
+               if ( $comment ) {
+                       $comment_status = $comment->comment_approved;
+               }
+
+               if ( 1 === (int) $comment_status ) {
+                       $comment_link = get_comment_link( $comment );
+               }
 
                $counts = wp_count_comments();
 
@@ -362,7 +371,7 @@ function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) {
                        // Here for completeness - not used.
                        'id' => $comment_id,
                        'supplemental' => array(
-                               'status' => $comment ? $comment->comment_approved : '',
+                               'status' => $comment_status,
                                'postId' => $comment ? $comment->comment_post_ID : '',
                                'time' => $time,
                                'in_moderation' => $counts->moderated,
@@ -373,7 +382,8 @@ function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) {
                                'i18n_moderation_text' => sprintf(
                                        _nx( '%s in moderation', '%s in moderation', $counts->moderated, 'comments' ),
                                        number_format_i18n( $counts->moderated )
-                               )
+                               ),
+                               'comment_link' => $comment_link,
                        )
                ) );
                $x->send();
@@ -395,14 +405,20 @@ function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) {
                                $status = $query_vars['comment_status'];
                        if ( !empty( $query_vars['p'] ) )
                                $post_id = (int) $query_vars['p'];
+                       if ( ! empty( $query_vars['comment_type'] ) )
+                               $type = $query_vars['comment_type'];
                }
 
-               $comment_count = wp_count_comments($post_id);
+               if ( empty( $type ) ) {
+                       // Only use the comment count if not filtering by a comment_type.
+                       $comment_count = wp_count_comments($post_id);
 
-               // We're looking for a known type of comment count.
-               if ( isset( $comment_count->$status ) )
-                       $total = $comment_count->$status;
-                       // Else use the decremented value from above.
+                       // We're looking for a known type of comment count.
+                       if ( isset( $comment_count->$status ) ) {
+                               $total = $comment_count->$status;
+                       }
+               }
+               // Else use the decremented value from above.
        }
 
        // The time since the last comment count.
@@ -951,7 +967,7 @@ function wp_ajax_get_comments( $action ) {
        $x = new WP_Ajax_Response();
        ob_start();
        foreach ( $wp_list_table->items as $comment ) {
-               if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) )
+               if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) && 0 === $comment->comment_approved )
                        continue;
                get_comment( $comment );
                $wp_list_table->single_row( $comment );
@@ -1605,10 +1621,10 @@ function wp_ajax_inline_save() {
 
        if ( 'page' == $_POST['post_type'] ) {
                if ( ! current_user_can( 'edit_page', $post_ID ) )
-                       wp_die( __( 'You are not allowed to edit this page.' ) );
+                       wp_die( __( 'Sorry, you are not allowed to edit this page.' ) );
        } else {
                if ( ! current_user_can( 'edit_post', $post_ID ) )
-                       wp_die( __( 'You are not allowed to edit this post.' ) );
+                       wp_die( __( 'Sorry, you are not allowed to edit this post.' ) );
        }
 
        if ( $last = wp_check_post_lock( $post_ID ) ) {
@@ -1672,13 +1688,15 @@ function wp_ajax_inline_save() {
        $mode = $_POST['post_view'] === 'excerpt' ? 'excerpt' : 'list';
 
        $level = 0;
-       $request_post = array( get_post( $_POST['post_ID'] ) );
-       $parent = $request_post[0]->post_parent;
-
-       while ( $parent > 0 ) {
-               $parent_post = get_post( $parent );
-               $parent = $parent_post->post_parent;
-               $level++;
+       if ( is_post_type_hierarchical( $wp_list_table->screen->post_type ) ) {
+               $request_post = array( get_post( $_POST['post_ID'] ) );
+               $parent       = $request_post[0]->post_parent;
+
+               while ( $parent > 0 ) {
+                       $parent_post = get_post( $parent );
+                       $parent      = $parent_post->post_parent;
+                       $level++;
+               }
        }
 
        $wp_list_table->display_rows( array( get_post( $_POST['post_ID'] ) ), $level );
@@ -1791,7 +1809,7 @@ function wp_ajax_find_posts() {
                if ( '0000-00-00 00:00:00' == $post->post_date ) {
                        $time = '';
                } else {
-                       /* translators: date format in table columns, see http://php.net/date */
+                       /* translators: date format in table columns, see https://secure.php.net/date */
                        $time = mysql2date(__('Y/m/d'), $post->post_date);
                }
 
@@ -2001,7 +2019,7 @@ function wp_ajax_upload_attachment() {
                echo wp_json_encode( array(
                        'success' => false,
                        'data'    => array(
-                               'message'  => __( 'You do not have permission to upload files.' ),
+                               'message'  => __( 'Sorry, you are not allowed to upload files.' ),
                                'filename' => $_FILES['async-upload']['name'],
                        )
                ) );
@@ -2146,7 +2164,32 @@ function wp_ajax_set_post_thumbnail() {
 }
 
 /**
- * AJAX handler for setting the featured image for an attachment.
+ * Ajax handler for retrieving HTML for the featured image.
+ *
+ * @since 4.6.0
+ */
+function wp_ajax_get_post_thumbnail_html() {
+       $post_ID = intval( $_POST['post_id'] );
+
+       check_ajax_referer( "update-post_$post_ID" );
+
+       if ( ! current_user_can( 'edit_post', $post_ID ) ) {
+               wp_die( -1 );
+       }
+
+       $thumbnail_id = intval( $_POST['thumbnail_id'] );
+
+       // For backward compatibility, -1 refers to no featured image.
+       if ( -1 === $thumbnail_id ) {
+               $thumbnail_id = null;
+       }
+
+       $return = _wp_post_thumbnail_html( $thumbnail_id, $post_ID );
+       wp_send_json_success( $return );
+}
+
+/**
+ * Ajax handler for setting the featured image for an attachment.
  *
  * @since 4.0.0
  *
@@ -2276,7 +2319,7 @@ function wp_ajax_wp_remove_post_lock() {
                wp_die( 0 );
 
        /**
-        * Filter the post lock window duration.
+        * Filters the post lock window duration.
         *
         * @since 3.3.0
         *
@@ -2373,7 +2416,7 @@ function wp_ajax_query_attachments() {
                $query['post_status'] .= ',private';
 
        /**
-        * Filter the arguments passed to WP_Query during an AJAX
+        * Filters the arguments passed to WP_Query during an Ajax
         * call for querying attachments.
         *
         * @since 3.7.0
@@ -2466,7 +2509,7 @@ function wp_ajax_save_attachment() {
 }
 
 /**
- * Ajax handler for saving backwards compatible attachment attributes.
+ * Ajax handler for saving backward compatible attachment attributes.
  *
  * @since 3.5.0
  */
@@ -2552,7 +2595,7 @@ function wp_ajax_save_attachment_order() {
  * Ajax handler for sending an attachment to the editor.
  *
  * Generates the HTML to send an attachment to the editor.
- * Backwards compatible with the media_send_to_editor filter
+ * Backward compatible with the {@see 'media_send_to_editor'} filter
  * and the chain of filters that follow.
  *
  * @since 3.5.0
@@ -2617,7 +2660,7 @@ function wp_ajax_send_attachment_to_editor() {
  *
  * Generates the HTML to send a non-image embed link to the editor.
  *
- * Backwards compatible with the following filters:
+ * Backward compatible with the following filters:
  * - file_send_to_editor_url
  * - audio_send_to_editor_url
  * - video_send_to_editor_url
@@ -2711,7 +2754,7 @@ function wp_ajax_heartbeat() {
 
        if ( ! empty( $data ) ) {
                /**
-                * Filter the Heartbeat response received.
+                * Filters the Heartbeat response received.
                 *
                 * @since 3.6.0
                 *
@@ -2723,7 +2766,7 @@ function wp_ajax_heartbeat() {
        }
 
        /**
-        * Filter the Heartbeat response sent.
+        * Filters the Heartbeat response sent.
         *
         * @since 3.6.0
         *
@@ -2855,6 +2898,28 @@ function wp_ajax_query_themes() {
                        '_wpnonce' => wp_create_nonce( 'install-theme_' . $theme->slug )
                ), $update_php );
 
+               if ( current_user_can( 'switch_themes' ) ) {
+                       if ( is_multisite() ) {
+                               $theme->activate_url = add_query_arg( array(
+                                       'action'   => 'enable',
+                                       '_wpnonce' => wp_create_nonce( 'enable-theme_' . $theme->slug ),
+                                       'theme'    => $theme->slug,
+                               ), network_admin_url( 'themes.php' ) );
+                       } else {
+                               $theme->activate_url = add_query_arg( array(
+                                       'action'     => 'activate',
+                                       '_wpnonce'   => wp_create_nonce( 'switch-theme_' . $theme->slug ),
+                                       'stylesheet' => $theme->slug,
+                               ), admin_url( 'themes.php' ) );
+                       }
+               }
+
+               if ( ! is_multisite() && current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
+                       $theme->customize_url = add_query_arg( array(
+                               'return' => urlencode( network_admin_url( 'theme-install.php', 'relative' ) ),
+                       ), wp_customize_url( $theme->slug ) );
+               }
+
                $theme->name        = wp_kses( $theme->name, $themes_allowedtags );
                $theme->author      = wp_kses( $theme->author, $themes_allowedtags );
                $theme->version     = wp_kses( $theme->version, $themes_allowedtags );
@@ -2868,7 +2933,7 @@ function wp_ajax_query_themes() {
 }
 
 /**
- * Apply [embed] AJAX handlers to a string.
+ * Apply [embed] Ajax handlers to a string.
  *
  * @since 4.0.0
  *
@@ -3029,7 +3094,7 @@ function wp_ajax_parse_media_shortcode() {
 }
 
 /**
- * AJAX handler for destroying multiple open sessions for a user.
+ * Ajax handler for destroying multiple open sessions for a user.
  *
  * @since 4.1.0
  */
@@ -3063,99 +3128,8 @@ function wp_ajax_destroy_sessions() {
        wp_send_json_success( array( 'message' => $message ) );
 }
 
-
-/**
- * AJAX handler for updating a plugin.
- *
- * @since 4.2.0
- *
- * @see Plugin_Upgrader
- */
-function wp_ajax_update_plugin() {
-       global $wp_filesystem;
-
-       $plugin = urldecode( $_POST['plugin'] );
-
-       $status = array(
-               'update'     => 'plugin',
-               'plugin'     => $plugin,
-               'slug'       => sanitize_key( $_POST['slug'] ),
-               'oldVersion' => '',
-               'newVersion' => '',
-       );
-
-       $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
-       if ( $plugin_data['Version'] ) {
-               $status['oldVersion'] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
-       }
-
-       if ( ! current_user_can( 'update_plugins' ) ) {
-               $status['error'] = __( 'You do not have sufficient permissions to update plugins for this site.' );
-               wp_send_json_error( $status );
-       }
-
-       check_ajax_referer( 'updates' );
-
-       include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
-
-       wp_update_plugins();
-
-       $skin = new Automatic_Upgrader_Skin();
-       $upgrader = new Plugin_Upgrader( $skin );
-       $result = $upgrader->bulk_upgrade( array( $plugin ) );
-
-       if ( is_array( $result ) && empty( $result[$plugin] ) && is_wp_error( $skin->result ) ) {
-               $result = $skin->result;
-       }
-
-       if ( is_array( $result ) && !empty( $result[ $plugin ] ) ) {
-               $plugin_update_data = current( $result );
-
-               /*
-                * If the `update_plugins` site transient is empty (e.g. when you update
-                * two plugins in quick succession before the transient repopulates),
-                * this may be the return.
-                *
-                * Preferably something can be done to ensure `update_plugins` isn't empty.
-                * For now, surface some sort of error here.
-                */
-               if ( $plugin_update_data === true ) {
-                       $status['error'] = __( 'Plugin update failed.' );
-                       wp_send_json_error( $status );
-               }
-
-               $plugin_data = get_plugins( '/' . $result[ $plugin ]['destination_name'] );
-               $plugin_data = reset( $plugin_data );
-
-               if ( $plugin_data['Version'] ) {
-                       $status['newVersion'] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
-               }
-
-               wp_send_json_success( $status );
-       } else if ( is_wp_error( $result ) ) {
-               $status['error'] = $result->get_error_message();
-               wp_send_json_error( $status );
-
-       } else if ( is_bool( $result ) && ! $result ) {
-               $status['errorCode'] = 'unable_to_connect_to_filesystem';
-               $status['error'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.' );
-
-               // Pass through the error from WP_Filesystem if one was raised
-               if ( is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
-                       $status['error'] = $wp_filesystem->errors->get_error_message();
-               }
-
-               wp_send_json_error( $status );
-
-       } else {
-               // An unhandled error occured
-               $status['error'] = __( 'Plugin update failed.' );
-               wp_send_json_error( $status );
-       }
-}
-
 /**
- * AJAX handler for saving a post from Press This.
+ * Ajax handler for saving a post from Press This.
  *
  * @since 4.2.0
  *
@@ -3170,7 +3144,7 @@ function wp_ajax_press_this_save_post() {
 }
 
 /**
- * AJAX handler for creating new category from Press This.
+ * Ajax handler for creating new category from Press This.
  *
  * @since 4.2.0
  *
@@ -3185,7 +3159,7 @@ function wp_ajax_press_this_add_category() {
 }
 
 /**
- * AJAX handler for cropping an image.
+ * Ajax handler for cropping an image.
  *
  * @since 4.3.0
  *
@@ -3273,7 +3247,7 @@ function wp_ajax_crop_image() {
                        $metadata = wp_generate_attachment_metadata( $attachment_id, $cropped );
 
                        /**
-                        * Filter the cropped image attachment metadata.
+                        * Filters the cropped image attachment metadata.
                         *
                         * @since 4.3.0
                         *
@@ -3285,7 +3259,7 @@ function wp_ajax_crop_image() {
                        wp_update_attachment_metadata( $attachment_id, $metadata );
 
                        /**
-                        * Filter the attachment ID for a cropped image.
+                        * Filters the attachment ID for a cropped image.
                         *
                         * @since 4.3.0
                         *
@@ -3327,3 +3301,618 @@ function wp_ajax_save_wporg_username() {
 
        wp_send_json_success( update_user_meta( get_current_user_id(), 'wporg_favorites', $username ) );
 }
+
+/**
+ * Ajax handler for installing a theme.
+ *
+ * @since 4.6.0
+ *
+ * @see Theme_Upgrader
+ */
+function wp_ajax_install_theme() {
+       check_ajax_referer( 'updates' );
+
+       if ( empty( $_POST['slug'] ) ) {
+               wp_send_json_error( array(
+                       'slug'         => '',
+                       'errorCode'    => 'no_theme_specified',
+                       'errorMessage' => __( 'No theme specified.' ),
+               ) );
+       }
+
+       $slug = sanitize_key( wp_unslash( $_POST['slug'] ) );
+
+       $status = array(
+               'install' => 'theme',
+               'slug'    => $slug,
+       );
+
+       if ( ! current_user_can( 'install_themes' ) ) {
+               $status['errorMessage'] = __( 'Sorry, you are not allowed to install themes on this site.' );
+               wp_send_json_error( $status );
+       }
+
+       include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
+       include_once( ABSPATH . 'wp-admin/includes/theme.php' );
+
+       $api = themes_api( 'theme_information', array(
+               'slug'   => $slug,
+               'fields' => array( 'sections' => false ),
+       ) );
+
+       if ( is_wp_error( $api ) ) {
+               $status['errorMessage'] = $api->get_error_message();
+               wp_send_json_error( $status );
+       }
+
+       $skin     = new WP_Ajax_Upgrader_Skin();
+       $upgrader = new Theme_Upgrader( $skin );
+       $result   = $upgrader->install( $api->download_link );
+
+       if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
+               $status['debug'] = $skin->get_upgrade_messages();
+       }
+
+       if ( is_wp_error( $result ) ) {
+               $status['errorCode']    = $result->get_error_code();
+               $status['errorMessage'] = $result->get_error_message();
+               wp_send_json_error( $status );
+       } elseif ( is_wp_error( $skin->result ) ) {
+               $status['errorCode']    = $skin->result->get_error_code();
+               $status['errorMessage'] = $skin->result->get_error_message();
+               wp_send_json_error( $status );
+       } elseif ( $skin->get_errors()->get_error_code() ) {
+               $status['errorMessage'] = $skin->get_error_messages();
+               wp_send_json_error( $status );
+       } elseif ( is_null( $result ) ) {
+               global $wp_filesystem;
+
+               $status['errorCode']    = 'unable_to_connect_to_filesystem';
+               $status['errorMessage'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.' );
+
+               // Pass through the error from WP_Filesystem if one was raised.
+               if ( $wp_filesystem instanceof WP_Filesystem_Base && is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
+                       $status['errorMessage'] = esc_html( $wp_filesystem->errors->get_error_message() );
+               }
+
+               wp_send_json_error( $status );
+       }
+
+       $status['themeName'] = wp_get_theme( $slug )->get( 'Name' );
+
+       if ( current_user_can( 'switch_themes' ) ) {
+               if ( is_multisite() ) {
+                       $status['activateUrl'] = add_query_arg( array(
+                               'action'   => 'enable',
+                               '_wpnonce' => wp_create_nonce( 'enable-theme_' . $slug ),
+                               'theme'    => $slug,
+                       ), network_admin_url( 'themes.php' ) );
+               } else {
+                       $status['activateUrl'] = add_query_arg( array(
+                               'action'     => 'activate',
+                               '_wpnonce'   => wp_create_nonce( 'switch-theme_' . $slug ),
+                               'stylesheet' => $slug,
+                       ), admin_url( 'themes.php' ) );
+               }
+       }
+
+       if ( ! is_multisite() && current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
+               $status['customizeUrl'] = add_query_arg( array(
+                       'return' => urlencode( network_admin_url( 'theme-install.php', 'relative' ) ),
+               ), wp_customize_url( $slug ) );
+       }
+
+       /*
+        * See WP_Theme_Install_List_Table::_get_theme_status() if we wanted to check
+        * on post-install status.
+        */
+       wp_send_json_success( $status );
+}
+
+/**
+ * Ajax handler for updating a theme.
+ *
+ * @since 4.6.0
+ *
+ * @see Theme_Upgrader
+ */
+function wp_ajax_update_theme() {
+       check_ajax_referer( 'updates' );
+
+       if ( empty( $_POST['slug'] ) ) {
+               wp_send_json_error( array(
+                       'slug'         => '',
+                       'errorCode'    => 'no_theme_specified',
+                       'errorMessage' => __( 'No theme specified.' ),
+               ) );
+       }
+
+       $stylesheet = sanitize_key( wp_unslash( $_POST['slug'] ) );
+       $status     = array(
+               'update'     => 'theme',
+               'slug'       => $stylesheet,
+               'newVersion' => '',
+       );
+
+       if ( ! current_user_can( 'update_themes' ) ) {
+               $status['errorMessage'] = __( 'Sorry, you are not allowed to update themes for this site.' );
+               wp_send_json_error( $status );
+       }
+
+       include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
+
+       $current = get_site_transient( 'update_themes' );
+       if ( empty( $current ) ) {
+               wp_update_themes();
+       }
+
+       $skin     = new WP_Ajax_Upgrader_Skin();
+       $upgrader = new Theme_Upgrader( $skin );
+       $result   = $upgrader->bulk_upgrade( array( $stylesheet ) );
+
+       if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
+               $status['debug'] = $skin->get_upgrade_messages();
+       }
+
+       if ( is_wp_error( $skin->result ) ) {
+               $status['errorCode']    = $skin->result->get_error_code();
+               $status['errorMessage'] = $skin->result->get_error_message();
+               wp_send_json_error( $status );
+       } elseif ( $skin->get_errors()->get_error_code() ) {
+               $status['errorMessage'] = $skin->get_error_messages();
+               wp_send_json_error( $status );
+       } elseif ( is_array( $result ) && ! empty( $result[ $stylesheet ] ) ) {
+
+               // Theme is already at the latest version.
+               if ( true === $result[ $stylesheet ] ) {
+                       $status['errorMessage'] = $upgrader->strings['up_to_date'];
+                       wp_send_json_error( $status );
+               }
+
+               $theme = wp_get_theme( $stylesheet );
+               if ( $theme->get( 'Version' ) ) {
+                       $status['newVersion'] = $theme->get( 'Version' );
+               }
+
+               wp_send_json_success( $status );
+       } elseif ( false === $result ) {
+               global $wp_filesystem;
+
+               $status['errorCode']    = 'unable_to_connect_to_filesystem';
+               $status['errorMessage'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.' );
+
+               // Pass through the error from WP_Filesystem if one was raised.
+               if ( $wp_filesystem instanceof WP_Filesystem_Base && is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
+                       $status['errorMessage'] = esc_html( $wp_filesystem->errors->get_error_message() );
+               }
+
+               wp_send_json_error( $status );
+       }
+
+       // An unhandled error occurred.
+       $status['errorMessage'] = __( 'Update failed.' );
+       wp_send_json_error( $status );
+}
+
+/**
+ * Ajax handler for deleting a theme.
+ *
+ * @since 4.6.0
+ *
+ * @see delete_theme()
+ */
+function wp_ajax_delete_theme() {
+       check_ajax_referer( 'updates' );
+
+       if ( empty( $_POST['slug'] ) ) {
+               wp_send_json_error( array(
+                       'slug'         => '',
+                       'errorCode'    => 'no_theme_specified',
+                       'errorMessage' => __( 'No theme specified.' ),
+               ) );
+       }
+
+       $stylesheet = sanitize_key( wp_unslash( $_POST['slug'] ) );
+       $status     = array(
+               'delete' => 'theme',
+               'slug'   => $stylesheet,
+       );
+
+       if ( ! current_user_can( 'delete_themes' ) ) {
+               $status['errorMessage'] = __( 'Sorry, you are not allowed to delete themes on this site.' );
+               wp_send_json_error( $status );
+       }
+
+       if ( ! wp_get_theme( $stylesheet )->exists() ) {
+               $status['errorMessage'] = __( 'The requested theme does not exist.' );
+               wp_send_json_error( $status );
+       }
+
+       // Check filesystem credentials. `delete_theme()` will bail otherwise.
+       $url = wp_nonce_url( 'themes.php?action=delete&stylesheet=' . urlencode( $stylesheet ), 'delete-theme_' . $stylesheet );
+       ob_start();
+       $credentials = request_filesystem_credentials( $url );
+       ob_end_clean();
+       if ( false === $credentials || ! WP_Filesystem( $credentials ) ) {
+               global $wp_filesystem;
+
+               $status['errorCode']    = 'unable_to_connect_to_filesystem';
+               $status['errorMessage'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.' );
+
+               // Pass through the error from WP_Filesystem if one was raised.
+               if ( $wp_filesystem instanceof WP_Filesystem_Base && is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
+                       $status['errorMessage'] = esc_html( $wp_filesystem->errors->get_error_message() );
+               }
+
+               wp_send_json_error( $status );
+       }
+
+       include_once( ABSPATH . 'wp-admin/includes/theme.php' );
+
+       $result = delete_theme( $stylesheet );
+
+       if ( is_wp_error( $result ) ) {
+               $status['errorMessage'] = $result->get_error_message();
+               wp_send_json_error( $status );
+       } elseif ( false === $result ) {
+               $status['errorMessage'] = __( 'Theme could not be deleted.' );
+               wp_send_json_error( $status );
+       }
+
+       wp_send_json_success( $status );
+}
+
+/**
+ * Ajax handler for installing a plugin.
+ *
+ * @since 4.6.0
+ *
+ * @see Plugin_Upgrader
+ */
+function wp_ajax_install_plugin() {
+       check_ajax_referer( 'updates' );
+
+       if ( empty( $_POST['slug'] ) ) {
+               wp_send_json_error( array(
+                       'slug'         => '',
+                       'errorCode'    => 'no_plugin_specified',
+                       'errorMessage' => __( 'No plugin specified.' ),
+               ) );
+       }
+
+       $status = array(
+               'install' => 'plugin',
+               'slug'    => sanitize_key( wp_unslash( $_POST['slug'] ) ),
+       );
+
+       if ( ! current_user_can( 'install_plugins' ) ) {
+               $status['errorMessage'] = __( 'Sorry, you are not allowed to install plugins on this site.' );
+               wp_send_json_error( $status );
+       }
+
+       include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
+       include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
+
+       $api = plugins_api( 'plugin_information', array(
+               'slug'   => sanitize_key( wp_unslash( $_POST['slug'] ) ),
+               'fields' => array(
+                       'sections' => false,
+               ),
+       ) );
+
+       if ( is_wp_error( $api ) ) {
+               $status['errorMessage'] = $api->get_error_message();
+               wp_send_json_error( $status );
+       }
+
+       $status['pluginName'] = $api->name;
+
+       $skin     = new WP_Ajax_Upgrader_Skin();
+       $upgrader = new Plugin_Upgrader( $skin );
+       $result   = $upgrader->install( $api->download_link );
+
+       if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
+               $status['debug'] = $skin->get_upgrade_messages();
+       }
+
+       if ( is_wp_error( $result ) ) {
+               $status['errorCode']    = $result->get_error_code();
+               $status['errorMessage'] = $result->get_error_message();
+               wp_send_json_error( $status );
+       } elseif ( is_wp_error( $skin->result ) ) {
+               $status['errorCode']    = $skin->result->get_error_code();
+               $status['errorMessage'] = $skin->result->get_error_message();
+               wp_send_json_error( $status );
+       } elseif ( $skin->get_errors()->get_error_code() ) {
+               $status['errorMessage'] = $skin->get_error_messages();
+               wp_send_json_error( $status );
+       } elseif ( is_null( $result ) ) {
+               global $wp_filesystem;
+
+               $status['errorCode']    = 'unable_to_connect_to_filesystem';
+               $status['errorMessage'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.' );
+
+               // Pass through the error from WP_Filesystem if one was raised.
+               if ( $wp_filesystem instanceof WP_Filesystem_Base && is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
+                       $status['errorMessage'] = esc_html( $wp_filesystem->errors->get_error_message() );
+               }
+
+               wp_send_json_error( $status );
+       }
+
+       $install_status = install_plugin_install_status( $api );
+
+       if ( current_user_can( 'activate_plugins' ) && is_plugin_inactive( $install_status['file'] ) ) {
+               $status['activateUrl'] = add_query_arg( array(
+                       '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $install_status['file'] ),
+                       'action'   => 'activate',
+                       'plugin'   => $install_status['file'],
+               ), network_admin_url( 'plugins.php' ) );
+       }
+
+       if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) {
+               $status['activateUrl'] = add_query_arg( array( 'networkwide' => 1 ), $status['activateUrl'] );
+       }
+
+       wp_send_json_success( $status );
+}
+
+/**
+ * Ajax handler for updating a plugin.
+ *
+ * @since 4.2.0
+ *
+ * @see Plugin_Upgrader
+ */
+function wp_ajax_update_plugin() {
+       check_ajax_referer( 'updates' );
+
+       if ( empty( $_POST['plugin'] ) || empty( $_POST['slug'] ) ) {
+               wp_send_json_error( array(
+                       'slug'         => '',
+                       'errorCode'    => 'no_plugin_specified',
+                       'errorMessage' => __( 'No plugin specified.' ),
+               ) );
+       }
+
+       $plugin = plugin_basename( sanitize_text_field( wp_unslash( $_POST['plugin'] ) ) );
+
+       $status = array(
+               'update'     => 'plugin',
+               'slug'       => sanitize_key( wp_unslash( $_POST['slug'] ) ),
+               'oldVersion' => '',
+               'newVersion' => '',
+       );
+
+       if ( ! current_user_can( 'update_plugins' ) || 0 !== validate_file( $plugin ) ) {
+               $status['errorMessage'] = __( 'Sorry, you are not allowed to update plugins for this site.' );
+               wp_send_json_error( $status );
+       }
+
+       $plugin_data          = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
+       $status['plugin']     = $plugin;
+       $status['pluginName'] = $plugin_data['Name'];
+
+       if ( $plugin_data['Version'] ) {
+               /* translators: %s: Plugin version */
+               $status['oldVersion'] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
+       }
+
+       include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
+
+       wp_update_plugins();
+
+       $skin     = new WP_Ajax_Upgrader_Skin();
+       $upgrader = new Plugin_Upgrader( $skin );
+       $result   = $upgrader->bulk_upgrade( array( $plugin ) );
+
+       if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
+               $status['debug'] = $skin->get_upgrade_messages();
+       }
+
+       if ( is_wp_error( $skin->result ) ) {
+               $status['errorCode']    = $skin->result->get_error_code();
+               $status['errorMessage'] = $skin->result->get_error_message();
+               wp_send_json_error( $status );
+       } elseif ( $skin->get_errors()->get_error_code() ) {
+               $status['errorMessage'] = $skin->get_error_messages();
+               wp_send_json_error( $status );
+       } elseif ( is_array( $result ) && ! empty( $result[ $plugin ] ) ) {
+               $plugin_update_data = current( $result );
+
+               /*
+                * If the `update_plugins` site transient is empty (e.g. when you update
+                * two plugins in quick succession before the transient repopulates),
+                * this may be the return.
+                *
+                * Preferably something can be done to ensure `update_plugins` isn't empty.
+                * For now, surface some sort of error here.
+                */
+               if ( true === $plugin_update_data ) {
+                       $status['errorMessage'] = __( 'Plugin update failed.' );
+                       wp_send_json_error( $status );
+               }
+
+               $plugin_data = get_plugins( '/' . $result[ $plugin ]['destination_name'] );
+               $plugin_data = reset( $plugin_data );
+
+               if ( $plugin_data['Version'] ) {
+                       /* translators: %s: Plugin version */
+                       $status['newVersion'] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
+               }
+               wp_send_json_success( $status );
+       } elseif ( false === $result ) {
+               global $wp_filesystem;
+
+               $status['errorCode']    = 'unable_to_connect_to_filesystem';
+               $status['errorMessage'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.' );
+
+               // Pass through the error from WP_Filesystem if one was raised.
+               if ( $wp_filesystem instanceof WP_Filesystem_Base && is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
+                       $status['errorMessage'] = esc_html( $wp_filesystem->errors->get_error_message() );
+               }
+
+               wp_send_json_error( $status );
+       }
+
+       // An unhandled error occurred.
+       $status['errorMessage'] = __( 'Plugin update failed.' );
+       wp_send_json_error( $status );
+}
+
+/**
+ * Ajax handler for deleting a plugin.
+ *
+ * @since 4.6.0
+ *
+ * @see delete_plugins()
+ */
+function wp_ajax_delete_plugin() {
+       check_ajax_referer( 'updates' );
+
+       if ( empty( $_POST['slug'] ) || empty( $_POST['plugin'] ) ) {
+               wp_send_json_error( array(
+                       'slug'         => '',
+                       'errorCode'    => 'no_plugin_specified',
+                       'errorMessage' => __( 'No plugin specified.' ),
+               ) );
+       }
+
+       $plugin = plugin_basename( sanitize_text_field( wp_unslash( $_POST['plugin'] ) ) );
+
+       $status = array(
+               'delete' => 'plugin',
+               'slug'   => sanitize_key( wp_unslash( $_POST['slug'] ) ),
+       );
+
+       if ( ! current_user_can( 'delete_plugins' ) || 0 !== validate_file( $plugin ) ) {
+               $status['errorMessage'] = __( 'Sorry, you are not allowed to delete plugins for this site.' );
+               wp_send_json_error( $status );
+       }
+
+       $plugin_data          = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
+       $status['plugin']     = $plugin;
+       $status['pluginName'] = $plugin_data['Name'];
+
+       if ( is_plugin_active( $plugin ) ) {
+               $status['errorMessage'] = __( 'You cannot delete a plugin while it is active on the main site.' );
+               wp_send_json_error( $status );
+       }
+
+       // Check filesystem credentials. `delete_plugins()` will bail otherwise.
+       $url = wp_nonce_url( 'plugins.php?action=delete-selected&verify-delete=1&checked[]=' . $plugin, 'bulk-plugins' );
+       ob_start();
+       $credentials = request_filesystem_credentials( $url );
+       ob_end_clean();
+       if ( false === $credentials || ! WP_Filesystem( $credentials ) ) {
+               global $wp_filesystem;
+
+               $status['errorCode']    = 'unable_to_connect_to_filesystem';
+               $status['errorMessage'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.' );
+
+               // Pass through the error from WP_Filesystem if one was raised.
+               if ( $wp_filesystem instanceof WP_Filesystem_Base && is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
+                       $status['errorMessage'] = esc_html( $wp_filesystem->errors->get_error_message() );
+               }
+
+               wp_send_json_error( $status );
+       }
+
+       $result = delete_plugins( array( $plugin ) );
+
+       if ( is_wp_error( $result ) ) {
+               $status['errorMessage'] = $result->get_error_message();
+               wp_send_json_error( $status );
+       } elseif ( false === $result ) {
+               $status['errorMessage'] = __( 'Plugin could not be deleted.' );
+               wp_send_json_error( $status );
+       }
+
+       wp_send_json_success( $status );
+}
+
+/**
+ * Ajax handler for searching plugins.
+ *
+ * @since 4.6.0
+ *
+ * @global string $s Search term.
+ */
+function wp_ajax_search_plugins() {
+       check_ajax_referer( 'updates' );
+
+       $pagenow = isset( $_POST['pagenow'] ) ? sanitize_key( $_POST['pagenow'] ) : '';
+       if ( 'plugins-network' === $pagenow || 'plugins' === $pagenow ) {
+               set_current_screen( $pagenow );
+       }
+
+       /** @var WP_Plugins_List_Table $wp_list_table */
+       $wp_list_table = _get_list_table( 'WP_Plugins_List_Table', array(
+               'screen' => get_current_screen(),
+       ) );
+
+       $status = array();
+
+       if ( ! $wp_list_table->ajax_user_can() ) {
+               $status['errorMessage'] = __( 'Sorry, you are not allowed to manage plugins for this site.' );
+               wp_send_json_error( $status );
+       }
+
+       // Set the correct requester, so pagination works.
+       $_SERVER['REQUEST_URI'] = add_query_arg( array_diff_key( $_POST, array(
+               '_ajax_nonce' => null,
+               'action'      => null,
+       ) ), network_admin_url( 'plugins.php', 'relative' ) );
+
+       $GLOBALS['s'] = wp_unslash( $_POST['s'] );
+
+       $wp_list_table->prepare_items();
+
+       ob_start();
+       $wp_list_table->display();
+       $status['count'] = count( $wp_list_table->items );
+       $status['items'] = ob_get_clean();
+
+       wp_send_json_success( $status );
+}
+
+/**
+ * Ajax handler for searching plugins to install.
+ *
+ * @since 4.6.0
+ */
+function wp_ajax_search_install_plugins() {
+       check_ajax_referer( 'updates' );
+
+       $pagenow = isset( $_POST['pagenow'] ) ? sanitize_key( $_POST['pagenow'] ) : '';
+       if ( 'plugin-install-network' === $pagenow || 'plugin-install' === $pagenow ) {
+               set_current_screen( $pagenow );
+       }
+
+       /** @var WP_Plugin_Install_List_Table $wp_list_table */
+       $wp_list_table = _get_list_table( 'WP_Plugin_Install_List_Table', array(
+               'screen' => get_current_screen(),
+       ) );
+
+       $status = array();
+
+       if ( ! $wp_list_table->ajax_user_can() ) {
+               $status['errorMessage'] = __( 'Sorry, you are not allowed to manage plugins for this site.' );
+               wp_send_json_error( $status );
+       }
+
+       // Set the correct requester, so pagination works.
+       $_SERVER['REQUEST_URI'] = add_query_arg( array_diff_key( $_POST, array(
+               '_ajax_nonce' => null,
+               'action'      => null,
+       ) ), network_admin_url( 'plugin-install.php', 'relative' ) );
+
+       $wp_list_table->prepare_items();
+
+       ob_start();
+       $wp_list_table->display();
+       $status['count'] = (int) $wp_list_table->get_pagination_arg( 'total_items' );
+       $status['items'] = ob_get_clean();
+
+       wp_send_json_success( $status );
+}
index 0d8502658835661ef1d05863bea44b69b101b8f2..cd952a7f11ea1ed6affc9af0b8ebf21d3d951993 100644 (file)
@@ -29,7 +29,7 @@ function edit_link( $link_id = 0 ) {
        if ( ! current_user_can( 'manage_links' ) ) {
                wp_die(
                        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-                       '<p>' . __( 'You do not have sufficient permissions to edit the links for this site.' ) . '</p>',
+                       '<p>' . __( 'Sorry, you are not allowed to edit the links for this site.' ) . '</p>',
                        403
                );
        }
@@ -131,11 +131,11 @@ function wp_get_link_cats( $link_id = 0 ) {
  *
  * @since 2.0.0
  *
- * @param int $link_id ID of link to retrieve.
+ * @param int|stdClass $link Link ID or object to retrieve.
  * @return object Link object for editing.
  */
-function get_link_to_edit( $link_id ) {
-       return get_bookmark( $link_id, OBJECT, 'edit' );
+function get_link_to_edit( $link ) {
+       return get_bookmark( $link, OBJECT, 'edit' );
 }
 
 /**
@@ -312,5 +312,5 @@ function wp_link_manager_disabled_message() {
                wp_die( sprintf( __( 'If you are looking to use the link manager, please install the <a href="%s">Link Manager</a> plugin.' ), $link ) );
        }
 
-       wp_die( __( 'You do not have sufficient permissions to edit the links for this site.' ) );
+       wp_die( __( 'Sorry, you are not allowed to edit the links for this site.' ) );
 }
diff --git a/wp-admin/includes/class-automatic-upgrader-skin.php b/wp-admin/includes/class-automatic-upgrader-skin.php
new file mode 100644 (file)
index 0000000..23fab8b
--- /dev/null
@@ -0,0 +1,115 @@
+<?php
+/**
+ * Upgrader API: Automatic_Upgrader_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Upgrader Skin for Automatic WordPress Upgrades
+ *
+ * This skin is designed to be used when no output is intended, all output
+ * is captured and stored for the caller to process and log/email/discard.
+ *
+ * @since 3.7.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
+ *
+ * @see Bulk_Upgrader_Skin
+ */
+class Automatic_Upgrader_Skin extends WP_Upgrader_Skin {
+       protected $messages = array();
+
+       /**
+        * Determines whether the upgrader needs FTP/SSH details in order to connect
+        * to the filesystem.
+        *
+        * @since 3.7.0
+        * @since 4.6.0 The `$context` parameter default changed from `false` to an empty string.
+        *
+        * @see request_filesystem_credentials()
+        *
+        * @param bool   $error                        Optional. Whether the current request has failed to connect.
+        *                                             Default false.
+        * @param string $context                      Optional. Full path to the directory that is tested
+        *                                             for being writable. Default empty.
+        * @param bool   $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false.
+        * @return bool True on success, false on failure.
+        */
+       public function request_filesystem_credentials( $error = false, $context = '', $allow_relaxed_file_ownership = false ) {
+               if ( $context ) {
+                       $this->options['context'] = $context;
+               }
+               // TODO: fix up request_filesystem_credentials(), or split it, to allow us to request a no-output version
+               // This will output a credentials form in event of failure, We don't want that, so just hide with a buffer
+               ob_start();
+               $result = parent::request_filesystem_credentials( $error, $context, $allow_relaxed_file_ownership );
+               ob_end_clean();
+               return $result;
+       }
+
+       /**
+        * @access public
+        *
+        * @return array
+        */
+       public function get_upgrade_messages() {
+               return $this->messages;
+       }
+
+       /**
+        * @param string|array|WP_Error $data
+        */
+       public function feedback( $data ) {
+               if ( is_wp_error( $data ) ) {
+                       $string = $data->get_error_message();
+               } elseif ( is_array( $data ) ) {
+                       return;
+               } else {
+                       $string = $data;
+               }
+               if ( ! empty( $this->upgrader->strings[ $string ] ) )
+                       $string = $this->upgrader->strings[ $string ];
+
+               if ( strpos( $string, '%' ) !== false ) {
+                       $args = func_get_args();
+                       $args = array_splice( $args, 1 );
+                       if ( ! empty( $args ) )
+                               $string = vsprintf( $string, $args );
+               }
+
+               $string = trim( $string );
+
+               // Only allow basic HTML in the messages, as it'll be used in emails/logs rather than direct browser output.
+               $string = wp_kses( $string, array(
+                       'a' => array(
+                               'href' => true
+                       ),
+                       'br' => true,
+                       'em' => true,
+                       'strong' => true,
+               ) );
+
+               if ( empty( $string ) )
+                       return;
+
+               $this->messages[] = $string;
+       }
+
+       /**
+        * @access public
+        */
+       public function header() {
+               ob_start();
+       }
+
+       /**
+        * @access public
+        */
+       public function footer() {
+               $output = ob_get_clean();
+               if ( ! empty( $output ) )
+                       $this->feedback( $output );
+       }
+}
diff --git a/wp-admin/includes/class-bulk-plugin-upgrader-skin.php b/wp-admin/includes/class-bulk-plugin-upgrader-skin.php
new file mode 100644 (file)
index 0000000..1441c90
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/**
+ * Upgrader API: Bulk_Plugin_Upgrader_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Bulk Plugin Upgrader Skin for WordPress Plugin Upgrades.
+ *
+ * @since 3.0.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
+ *
+ * @see Bulk_Upgrader_Skin
+ */
+class Bulk_Plugin_Upgrader_Skin extends Bulk_Upgrader_Skin {
+       public $plugin_info = array(); // Plugin_Upgrader::bulk() will fill this in.
+
+       public function add_strings() {
+               parent::add_strings();
+               $this->upgrader->strings['skin_before_update_header'] = __('Updating Plugin %1$s (%2$d/%3$d)');
+       }
+
+       /**
+        *
+        * @param string $title
+        */
+       public function before($title = '') {
+               parent::before($this->plugin_info['Title']);
+       }
+
+       /**
+        *
+        * @param string $title
+        */
+       public function after($title = '') {
+               parent::after($this->plugin_info['Title']);
+               $this->decrement_update_count( 'plugin' );
+       }
+
+       /**
+        * @access public
+        */
+       public function bulk_footer() {
+               parent::bulk_footer();
+               $update_actions =  array(
+                       'plugins_page' => '<a href="' . self_admin_url( 'plugins.php' ) . '" target="_parent">' . __( 'Return to Plugins page' ) . '</a>',
+                       'updates_page' => '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>'
+               );
+               if ( ! current_user_can( 'activate_plugins' ) )
+                       unset( $update_actions['plugins_page'] );
+
+               /**
+                * Filters the list of action links available following bulk plugin updates.
+                *
+                * @since 3.0.0
+                *
+                * @param array $update_actions Array of plugin action links.
+                * @param array $plugin_info    Array of information for the last-updated plugin.
+                */
+               $update_actions = apply_filters( 'update_bulk_plugins_complete_actions', $update_actions, $this->plugin_info );
+
+               if ( ! empty($update_actions) )
+                       $this->feedback(implode(' | ', (array)$update_actions));
+       }
+}
diff --git a/wp-admin/includes/class-bulk-theme-upgrader-skin.php b/wp-admin/includes/class-bulk-theme-upgrader-skin.php
new file mode 100644 (file)
index 0000000..dba4c0b
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/**
+ * Upgrader API: Bulk_Plugin_Upgrader_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Bulk Theme Upgrader Skin for WordPress Theme Upgrades.
+ *
+ * @since 3.0.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
+ *
+ * @see Bulk_Upgrader_Skin
+ */
+class Bulk_Theme_Upgrader_Skin extends Bulk_Upgrader_Skin {
+       public $theme_info = array(); // Theme_Upgrader::bulk() will fill this in.
+
+       public function add_strings() {
+               parent::add_strings();
+               $this->upgrader->strings['skin_before_update_header'] = __('Updating Theme %1$s (%2$d/%3$d)');
+       }
+
+       /**
+        *
+        * @param string $title
+        */
+       public function before($title = '') {
+               parent::before( $this->theme_info->display('Name') );
+       }
+
+       /**
+        *
+        * @param string $title
+        */
+       public function after($title = '') {
+               parent::after( $this->theme_info->display('Name') );
+               $this->decrement_update_count( 'theme' );
+       }
+
+       /**
+        * @access public
+        */
+       public function bulk_footer() {
+               parent::bulk_footer();
+               $update_actions =  array(
+                       'themes_page' => '<a href="' . self_admin_url( 'themes.php' ) . '" target="_parent">' . __( 'Return to Themes page' ) . '</a>',
+                       'updates_page' => '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>'
+               );
+               if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) )
+                       unset( $update_actions['themes_page'] );
+
+               /**
+                * Filters the list of action links available following bulk theme updates.
+                *
+                * @since 3.0.0
+                *
+                * @param array $update_actions Array of theme action links.
+                * @param array $theme_info     Array of information for the last-updated theme.
+                */
+               $update_actions = apply_filters( 'update_bulk_theme_complete_actions', $update_actions, $this->theme_info );
+
+               if ( ! empty($update_actions) )
+                       $this->feedback(implode(' | ', (array)$update_actions));
+       }
+}
diff --git a/wp-admin/includes/class-bulk-upgrader-skin.php b/wp-admin/includes/class-bulk-upgrader-skin.php
new file mode 100644 (file)
index 0000000..16f410f
--- /dev/null
@@ -0,0 +1,175 @@
+<?php
+/**
+ * Upgrader API: Bulk_Upgrader_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Generic Bulk Upgrader Skin for WordPress Upgrades.
+ *
+ * @since 3.0.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
+ *
+ * @see WP_Upgrader_Skin
+ */
+class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
+       public $in_loop = false;
+       /**
+        * @var string|false
+        */
+       public $error = false;
+
+       /**
+        *
+        * @param array $args
+        */
+       public function __construct($args = array()) {
+               $defaults = array( 'url' => '', 'nonce' => '' );
+               $args = wp_parse_args($args, $defaults);
+
+               parent::__construct($args);
+       }
+
+       /**
+        * @access public
+        */
+       public function add_strings() {
+               $this->upgrader->strings['skin_upgrade_start'] = __('The update process is starting. This process may take a while on some hosts, so please be patient.');
+               /* translators: 1: Title of an update, 2: Error message */
+               $this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while updating %1$s: %2$s');
+               /* translators: 1: Title of an update */
+               $this->upgrader->strings['skin_update_failed'] = __('The update of %1$s failed.');
+               /* translators: 1: Title of an update */
+               $this->upgrader->strings['skin_update_successful'] = __( '%1$s updated successfully.' ) . ' <a onclick="%2$s" href="#" class="hide-if-no-js"><span>' . __( 'Show Details' ) . '</span><span class="hidden">' . __( 'Hide Details' ) . '</span></a>';
+               $this->upgrader->strings['skin_upgrade_end'] = __('All updates have been completed.');
+       }
+
+       /**
+        * @param string $string
+        */
+       public function feedback($string) {
+               if ( isset( $this->upgrader->strings[$string] ) )
+                       $string = $this->upgrader->strings[$string];
+
+               if ( strpos($string, '%') !== false ) {
+                       $args = func_get_args();
+                       $args = array_splice($args, 1);
+                       if ( $args ) {
+                               $args = array_map( 'strip_tags', $args );
+                               $args = array_map( 'esc_html', $args );
+                               $string = vsprintf($string, $args);
+                       }
+               }
+               if ( empty($string) )
+                       return;
+               if ( $this->in_loop )
+                       echo "$string<br />\n";
+               else
+                       echo "<p>$string</p>\n";
+       }
+
+       /**
+        * @access public
+        */
+       public function header() {
+               // Nothing, This will be displayed within a iframe.
+       }
+
+       /**
+        * @access public
+        */
+       public function footer() {
+               // Nothing, This will be displayed within a iframe.
+       }
+
+       /**
+        *
+        * @param string|WP_Error $error
+        */
+       public function error($error) {
+               if ( is_string($error) && isset( $this->upgrader->strings[$error] ) )
+                       $this->error = $this->upgrader->strings[$error];
+
+               if ( is_wp_error($error) ) {
+                       $messages = array();
+                       foreach ( $error->get_error_messages() as $emessage ) {
+                               if ( $error->get_error_data() && is_string( $error->get_error_data() ) )
+                                       $messages[] = $emessage . ' ' . esc_html( strip_tags( $error->get_error_data() ) );
+                               else
+                                       $messages[] = $emessage;
+                       }
+                       $this->error = implode(', ', $messages);
+               }
+               echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>';
+       }
+
+       /**
+        * @access public
+        */
+       public function bulk_header() {
+               $this->feedback('skin_upgrade_start');
+       }
+
+       /**
+        * @access public
+        */
+       public function bulk_footer() {
+               $this->feedback('skin_upgrade_end');
+       }
+
+       /**
+        *
+        * @param string $title
+        */
+       public function before($title = '') {
+               $this->in_loop = true;
+               printf( '<h2>' . $this->upgrader->strings['skin_before_update_header'] . ' <span class="spinner waiting-' . $this->upgrader->update_current . '"></span></h2>', $title, $this->upgrader->update_current, $this->upgrader->update_count );
+               echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').css("display", "inline-block");</script>';
+               echo '<div class="update-messages hide-if-js" id="progress-' . esc_attr($this->upgrader->update_current) . '"><p>';
+               $this->flush_output();
+       }
+
+       /**
+        *
+        * @param string $title
+        */
+       public function after($title = '') {
+               echo '</p></div>';
+               if ( $this->error || ! $this->result ) {
+                       if ( $this->error ) {
+                               echo '<div class="error"><p>' . sprintf($this->upgrader->strings['skin_update_failed_error'], $title, '<strong>' . $this->error . '</strong>' ) . '</p></div>';
+                       } else {
+                               echo '<div class="error"><p>' . sprintf($this->upgrader->strings['skin_update_failed'], $title) . '</p></div>';
+                       }
+
+                       echo '<script type="text/javascript">jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').show();</script>';
+               }
+               if ( $this->result && ! is_wp_error( $this->result ) ) {
+                       if ( ! $this->error )
+                               echo '<div class="updated"><p>' . sprintf($this->upgrader->strings['skin_update_successful'], $title, 'jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').toggle();jQuery(\'span\', this).toggle(); return false;') . '</p></div>';
+                       echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>';
+               }
+
+               $this->reset();
+               $this->flush_output();
+       }
+
+       /**
+        * @access public
+        */
+       public function reset() {
+               $this->in_loop = false;
+               $this->error = false;
+       }
+
+       /**
+        * @access public
+        */
+       public function flush_output() {
+               wp_ob_end_flush_all();
+               flush();
+       }
+}
diff --git a/wp-admin/includes/class-core-upgrader.php b/wp-admin/includes/class-core-upgrader.php
new file mode 100644 (file)
index 0000000..3a82ab0
--- /dev/null
@@ -0,0 +1,365 @@
+<?php
+/**
+ * Upgrade API: Core_Upgrader class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Core class used for updating core.
+ *
+ * It allows for WordPress to upgrade itself in combination with
+ * the wp-admin/includes/update-core.php file.
+ *
+ * @since 2.8.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php.
+ *
+ * @see WP_Upgrader
+ */
+class Core_Upgrader extends WP_Upgrader {
+
+       /**
+        * Initialize the upgrade strings.
+        *
+        * @since 2.8.0
+        * @access public
+        */
+       public function upgrade_strings() {
+               $this->strings['up_to_date'] = __('WordPress is at the latest version.');
+               $this->strings['locked'] = __('Another update is currently in progress.');
+               $this->strings['no_package'] = __('Update package not available.');
+               $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>&#8230;');
+               $this->strings['unpack_package'] = __('Unpacking the update&#8230;');
+               $this->strings['copy_failed'] = __('Could not copy files.');
+               $this->strings['copy_failed_space'] = __('Could not copy files. You may have run out of disk space.' );
+               $this->strings['start_rollback'] = __( 'Attempting to roll back to previous version.' );
+               $this->strings['rollback_was_required'] = __( 'Due to an error during updating, WordPress has rolled back to your previous version.' );
+       }
+
+       /**
+        * Upgrade WordPress core.
+        *
+        * @since 2.8.0
+        * @access public
+        *
+        * @global WP_Filesystem_Base $wp_filesystem Subclass
+        * @global callable           $_wp_filesystem_direct_method
+        *
+        * @param object $current Response object for whether WordPress is current.
+        * @param array  $args {
+        *        Optional. Arguments for upgrading WordPress core. Default empty array.
+        *
+        *        @type bool $pre_check_md5    Whether to check the file checksums before
+        *                                     attempting the upgrade. Default true.
+        *        @type bool $attempt_rollback Whether to attempt to rollback the chances if
+        *                                     there is a problem. Default false.
+        *        @type bool $do_rollback      Whether to perform this "upgrade" as a rollback.
+        *                                     Default false.
+        * }
+        * @return null|false|WP_Error False or WP_Error on failure, null on success.
+        */
+       public function upgrade( $current, $args = array() ) {
+               global $wp_filesystem;
+
+               include( ABSPATH . WPINC . '/version.php' ); // $wp_version;
+
+               $start_time = time();
+
+               $defaults = array(
+                       'pre_check_md5'    => true,
+                       'attempt_rollback' => false,
+                       'do_rollback'      => false,
+                       'allow_relaxed_file_ownership' => false,
+               );
+               $parsed_args = wp_parse_args( $args, $defaults );
+
+               $this->init();
+               $this->upgrade_strings();
+
+               // Is an update available?
+               if ( !isset( $current->response ) || $current->response == 'latest' )
+                       return new WP_Error('up_to_date', $this->strings['up_to_date']);
+
+               $res = $this->fs_connect( array( ABSPATH, WP_CONTENT_DIR ), $parsed_args['allow_relaxed_file_ownership'] );
+               if ( ! $res || is_wp_error( $res ) ) {
+                       return $res;
+               }
+
+               $wp_dir = trailingslashit($wp_filesystem->abspath());
+
+               $partial = true;
+               if ( $parsed_args['do_rollback'] )
+                       $partial = false;
+               elseif ( $parsed_args['pre_check_md5'] && ! $this->check_files() )
+                       $partial = false;
+
+               /*
+                * If partial update is returned from the API, use that, unless we're doing
+                * a reinstall. If we cross the new_bundled version number, then use
+                * the new_bundled zip. Don't though if the constant is set to skip bundled items.
+                * If the API returns a no_content zip, go with it. Finally, default to the full zip.
+                */
+               if ( $parsed_args['do_rollback'] && $current->packages->rollback )
+                       $to_download = 'rollback';
+               elseif ( $current->packages->partial && 'reinstall' != $current->response && $wp_version == $current->partial_version && $partial )
+                       $to_download = 'partial';
+               elseif ( $current->packages->new_bundled && version_compare( $wp_version, $current->new_bundled, '<' )
+                       && ( ! defined( 'CORE_UPGRADE_SKIP_NEW_BUNDLED' ) || ! CORE_UPGRADE_SKIP_NEW_BUNDLED ) )
+                       $to_download = 'new_bundled';
+               elseif ( $current->packages->no_content )
+                       $to_download = 'no_content';
+               else
+                       $to_download = 'full';
+
+               // Lock to prevent multiple Core Updates occurring
+               $lock = WP_Upgrader::create_lock( 'core_updater', 15 * MINUTE_IN_SECONDS );
+               if ( ! $lock ) {
+                       return new WP_Error( 'locked', $this->strings['locked'] );
+               }
+
+               $download = $this->download_package( $current->packages->$to_download );
+               if ( is_wp_error( $download ) ) {
+                       WP_Upgrader::release_lock( 'core_updater' );
+                       return $download;
+               }
+
+               $working_dir = $this->unpack_package( $download );
+               if ( is_wp_error( $working_dir ) ) {
+                       WP_Upgrader::release_lock( 'core_updater' );
+                       return $working_dir;
+               }
+
+               // Copy update-core.php from the new version into place.
+               if ( !$wp_filesystem->copy($working_dir . '/wordpress/wp-admin/includes/update-core.php', $wp_dir . 'wp-admin/includes/update-core.php', true) ) {
+                       $wp_filesystem->delete($working_dir, true);
+                       WP_Upgrader::release_lock( 'core_updater' );
+                       return new WP_Error( 'copy_failed_for_update_core_file', __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), 'wp-admin/includes/update-core.php' );
+               }
+               $wp_filesystem->chmod($wp_dir . 'wp-admin/includes/update-core.php', FS_CHMOD_FILE);
+
+               require_once( ABSPATH . 'wp-admin/includes/update-core.php' );
+
+               if ( ! function_exists( 'update_core' ) ) {
+                       WP_Upgrader::release_lock( 'core_updater' );
+                       return new WP_Error( 'copy_failed_space', $this->strings['copy_failed_space'] );
+               }
+
+               $result = update_core( $working_dir, $wp_dir );
+
+               // In the event of an issue, we may be able to roll back.
+               if ( $parsed_args['attempt_rollback'] && $current->packages->rollback && ! $parsed_args['do_rollback'] ) {
+                       $try_rollback = false;
+                       if ( is_wp_error( $result ) ) {
+                               $error_code = $result->get_error_code();
+                               /*
+                                * Not all errors are equal. These codes are critical: copy_failed__copy_dir,
+                                * mkdir_failed__copy_dir, copy_failed__copy_dir_retry, and disk_full.
+                                * do_rollback allows for update_core() to trigger a rollback if needed.
+                                */
+                               if ( false !== strpos( $error_code, 'do_rollback' ) )
+                                       $try_rollback = true;
+                               elseif ( false !== strpos( $error_code, '__copy_dir' ) )
+                                       $try_rollback = true;
+                               elseif ( 'disk_full' === $error_code )
+                                       $try_rollback = true;
+                       }
+
+                       if ( $try_rollback ) {
+                               /** This filter is documented in wp-admin/includes/update-core.php */
+                               apply_filters( 'update_feedback', $result );
+
+                               /** This filter is documented in wp-admin/includes/update-core.php */
+                               apply_filters( 'update_feedback', $this->strings['start_rollback'] );
+
+                               $rollback_result = $this->upgrade( $current, array_merge( $parsed_args, array( 'do_rollback' => true ) ) );
+
+                               $original_result = $result;
+                               $result = new WP_Error( 'rollback_was_required', $this->strings['rollback_was_required'], (object) array( 'update' => $original_result, 'rollback' => $rollback_result ) );
+                       }
+               }
+
+               /** This action is documented in wp-admin/includes/class-wp-upgrader.php */
+               do_action( 'upgrader_process_complete', $this, array( 'action' => 'update', 'type' => 'core' ) );
+
+               // Clear the current updates
+               delete_site_transient( 'update_core' );
+
+               if ( ! $parsed_args['do_rollback'] ) {
+                       $stats = array(
+                               'update_type'      => $current->response,
+                               'success'          => true,
+                               'fs_method'        => $wp_filesystem->method,
+                               'fs_method_forced' => defined( 'FS_METHOD' ) || has_filter( 'filesystem_method' ),
+                               'fs_method_direct' => !empty( $GLOBALS['_wp_filesystem_direct_method'] ) ? $GLOBALS['_wp_filesystem_direct_method'] : '',
+                               'time_taken'       => time() - $start_time,
+                               'reported'         => $wp_version,
+                               'attempted'        => $current->version,
+                       );
+
+                       if ( is_wp_error( $result ) ) {
+                               $stats['success'] = false;
+                               // Did a rollback occur?
+                               if ( ! empty( $try_rollback ) ) {
+                                       $stats['error_code'] = $original_result->get_error_code();
+                                       $stats['error_data'] = $original_result->get_error_data();
+                                       // Was the rollback successful? If not, collect its error too.
+                                       $stats['rollback'] = ! is_wp_error( $rollback_result );
+                                       if ( is_wp_error( $rollback_result ) ) {
+                                               $stats['rollback_code'] = $rollback_result->get_error_code();
+                                               $stats['rollback_data'] = $rollback_result->get_error_data();
+                                       }
+                               } else {
+                                       $stats['error_code'] = $result->get_error_code();
+                                       $stats['error_data'] = $result->get_error_data();
+                               }
+                       }
+
+                       wp_version_check( $stats );
+               }
+
+               WP_Upgrader::release_lock( 'core_updater' );
+
+               return $result;
+       }
+
+       /**
+        * Determines if this WordPress Core version should update to an offered version or not.
+        *
+        * @since 3.7.0
+        * @access public
+        *
+        * @static
+        *
+        * @param string $offered_ver The offered version, of the format x.y.z.
+        * @return bool True if we should update to the offered version, otherwise false.
+        */
+       public static function should_update_to_version( $offered_ver ) {
+               include( ABSPATH . WPINC . '/version.php' ); // $wp_version; // x.y.z
+
+               $current_branch = implode( '.', array_slice( preg_split( '/[.-]/', $wp_version  ), 0, 2 ) ); // x.y
+               $new_branch     = implode( '.', array_slice( preg_split( '/[.-]/', $offered_ver ), 0, 2 ) ); // x.y
+               $current_is_development_version = (bool) strpos( $wp_version, '-' );
+
+               // Defaults:
+               $upgrade_dev   = true;
+               $upgrade_minor = true;
+               $upgrade_major = false;
+
+               // WP_AUTO_UPDATE_CORE = true (all), 'minor', false.
+               if ( defined( 'WP_AUTO_UPDATE_CORE' ) ) {
+                       if ( false === WP_AUTO_UPDATE_CORE ) {
+                               // Defaults to turned off, unless a filter allows it
+                               $upgrade_dev = $upgrade_minor = $upgrade_major = false;
+                       } elseif ( true === WP_AUTO_UPDATE_CORE ) {
+                               // ALL updates for core
+                               $upgrade_dev = $upgrade_minor = $upgrade_major = true;
+                       } elseif ( 'minor' === WP_AUTO_UPDATE_CORE ) {
+                               // Only minor updates for core
+                               $upgrade_dev = $upgrade_major = false;
+                               $upgrade_minor = true;
+                       }
+               }
+
+               // 1: If we're already on that version, not much point in updating?
+               if ( $offered_ver == $wp_version )
+                       return false;
+
+               // 2: If we're running a newer version, that's a nope
+               if ( version_compare( $wp_version, $offered_ver, '>' ) )
+                       return false;
+
+               $failure_data = get_site_option( 'auto_core_update_failed' );
+               if ( $failure_data ) {
+                       // If this was a critical update failure, cannot update.
+                       if ( ! empty( $failure_data['critical'] ) )
+                               return false;
+
+                       // Don't claim we can update on update-core.php if we have a non-critical failure logged.
+                       if ( $wp_version == $failure_data['current'] && false !== strpos( $offered_ver, '.1.next.minor' ) )
+                               return false;
+
+                       // Cannot update if we're retrying the same A to B update that caused a non-critical failure.
+                       // Some non-critical failures do allow retries, like download_failed.
+                       // 3.7.1 => 3.7.2 resulted in files_not_writable, if we are still on 3.7.1 and still trying to update to 3.7.2.
+                       if ( empty( $failure_data['retry'] ) && $wp_version == $failure_data['current'] && $offered_ver == $failure_data['attempted'] )
+                               return false;
+               }
+
+               // 3: 3.7-alpha-25000 -> 3.7-alpha-25678 -> 3.7-beta1 -> 3.7-beta2
+               if ( $current_is_development_version ) {
+
+                       /**
+                        * Filters whether to enable automatic core updates for development versions.
+                        *
+                        * @since 3.7.0
+                        *
+                        * @param bool $upgrade_dev Whether to enable automatic updates for
+                        *                          development versions.
+                        */
+                       if ( ! apply_filters( 'allow_dev_auto_core_updates', $upgrade_dev ) )
+                               return false;
+                       // Else fall through to minor + major branches below.
+               }
+
+               // 4: Minor In-branch updates (3.7.0 -> 3.7.1 -> 3.7.2 -> 3.7.4)
+               if ( $current_branch == $new_branch ) {
+
+                       /**
+                        * Filters whether to enable minor automatic core updates.
+                        *
+                        * @since 3.7.0
+                        *
+                        * @param bool $upgrade_minor Whether to enable minor automatic core updates.
+                        */
+                       return apply_filters( 'allow_minor_auto_core_updates', $upgrade_minor );
+               }
+
+               // 5: Major version updates (3.7.0 -> 3.8.0 -> 3.9.1)
+               if ( version_compare( $new_branch, $current_branch, '>' ) ) {
+
+                       /**
+                        * Filters whether to enable major automatic core updates.
+                        *
+                        * @since 3.7.0
+                        *
+                        * @param bool $upgrade_major Whether to enable major automatic core updates.
+                        */
+                       return apply_filters( 'allow_major_auto_core_updates', $upgrade_major );
+               }
+
+               // If we're not sure, we don't want it
+               return false;
+       }
+
+       /**
+        * Compare the disk file checksums against the expected checksums.
+        *
+        * @since 3.7.0
+        * @access public
+        *
+        * @global string $wp_version
+        * @global string $wp_local_package
+        *
+        * @return bool True if the checksums match, otherwise false.
+        */
+       public function check_files() {
+               global $wp_version, $wp_local_package;
+
+               $checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' );
+
+               if ( ! is_array( $checksums ) )
+                       return false;
+
+               foreach ( $checksums as $file => $checksum ) {
+                       // Skip files which get updated
+                       if ( 'wp-content' == substr( $file, 0, 10 ) )
+                               continue;
+                       if ( ! file_exists( ABSPATH . $file ) || md5_file( ABSPATH . $file ) !== $checksum )
+                               return false;
+               }
+
+               return true;
+       }
+}
diff --git a/wp-admin/includes/class-file-upload-upgrader.php b/wp-admin/includes/class-file-upload-upgrader.php
new file mode 100644 (file)
index 0000000..35baa7f
--- /dev/null
@@ -0,0 +1,125 @@
+<?php
+/**
+ * Upgrade API: File_Upload_Upgrader class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Core class used for handling file uploads.
+ *
+ * This class handles the upload process and passes it as if it's a local file
+ * to the Upgrade/Installer functions.
+ *
+ * @since 2.8.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php.
+ */
+class File_Upload_Upgrader {
+
+       /**
+        * The full path to the file package.
+        *
+        * @since 2.8.0
+        * @access public
+        * @var string $package
+        */
+       public $package;
+
+       /**
+        * The name of the file.
+        *
+        * @since 2.8.0
+        * @access public
+        * @var string $filename
+        */
+       public $filename;
+
+       /**
+        * The ID of the attachment post for this file.
+        *
+        * @since 3.3.0
+        * @access public
+        * @var int $id
+        */
+       public $id = 0;
+
+       /**
+        * Construct the upgrader for a form.
+        *
+        * @since 2.8.0
+        * @access public
+        *
+        * @param string $form      The name of the form the file was uploaded from.
+        * @param string $urlholder The name of the `GET` parameter that holds the filename.
+        */
+       public function __construct( $form, $urlholder ) {
+
+               if ( empty($_FILES[$form]['name']) && empty($_GET[$urlholder]) )
+                       wp_die(__('Please select a file'));
+
+               //Handle a newly uploaded file, Else assume it's already been uploaded
+               if ( ! empty($_FILES) ) {
+                       $overrides = array( 'test_form' => false, 'test_type' => false );
+                       $file = wp_handle_upload( $_FILES[$form], $overrides );
+
+                       if ( isset( $file['error'] ) )
+                               wp_die( $file['error'] );
+
+                       $this->filename = $_FILES[$form]['name'];
+                       $this->package = $file['file'];
+
+                       // Construct the object array
+                       $object = array(
+                               'post_title' => $this->filename,
+                               'post_content' => $file['url'],
+                               'post_mime_type' => $file['type'],
+                               'guid' => $file['url'],
+                               'context' => 'upgrader',
+                               'post_status' => 'private'
+                       );
+
+                       // Save the data.
+                       $this->id = wp_insert_attachment( $object, $file['file'] );
+
+                       // Schedule a cleanup for 2 hours from now in case of failed install.
+                       wp_schedule_single_event( time() + 2 * HOUR_IN_SECONDS, 'upgrader_scheduled_cleanup', array( $this->id ) );
+
+               } elseif ( is_numeric( $_GET[$urlholder] ) ) {
+                       // Numeric Package = previously uploaded file, see above.
+                       $this->id = (int) $_GET[$urlholder];
+                       $attachment = get_post( $this->id );
+                       if ( empty($attachment) )
+                               wp_die(__('Please select a file'));
+
+                       $this->filename = $attachment->post_title;
+                       $this->package = get_attached_file( $attachment->ID );
+               } else {
+                       // Else, It's set to something, Back compat for plugins using the old (pre-3.3) File_Uploader handler.
+                       if ( ! ( ( $uploads = wp_upload_dir() ) && false === $uploads['error'] ) )
+                               wp_die( $uploads['error'] );
+
+                       $this->filename = $_GET[$urlholder];
+                       $this->package = $uploads['basedir'] . '/' . $this->filename;
+               }
+       }
+
+       /**
+        * Delete the attachment/uploaded file.
+        *
+        * @since 3.2.2
+        * @access public
+        *
+        * @return bool Whether the cleanup was successful.
+        */
+       public function cleanup() {
+               if ( $this->id )
+                       wp_delete_attachment( $this->id );
+
+               elseif ( file_exists( $this->package ) )
+                       return @unlink( $this->package );
+
+               return true;
+       }
+}
diff --git a/wp-admin/includes/class-language-pack-upgrader-skin.php b/wp-admin/includes/class-language-pack-upgrader-skin.php
new file mode 100644 (file)
index 0000000..dd62d8a
--- /dev/null
@@ -0,0 +1,87 @@
+<?php
+/**
+ * Upgrader API: Language_Pack_Upgrader_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Translation Upgrader Skin for WordPress Translation Upgrades.
+ *
+ * @since 3.7.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
+ *
+ * @see WP_Upgrader_Skin
+ */
+class Language_Pack_Upgrader_Skin extends WP_Upgrader_Skin {
+       public $language_update = null;
+       public $done_header = false;
+       public $done_footer = false;
+       public $display_footer_actions = true;
+
+       /**
+        *
+        * @param array $args
+        */
+       public function __construct( $args = array() ) {
+               $defaults = array( 'url' => '', 'nonce' => '', 'title' => __( 'Update Translations' ), 'skip_header_footer' => false );
+               $args = wp_parse_args( $args, $defaults );
+               if ( $args['skip_header_footer'] ) {
+                       $this->done_header = true;
+                       $this->done_footer = true;
+                       $this->display_footer_actions = false;
+               }
+               parent::__construct( $args );
+       }
+
+       /**
+        * @access public
+        */
+       public function before() {
+               $name = $this->upgrader->get_name_for_update( $this->language_update );
+
+               echo '<div class="update-messages lp-show-latest">';
+
+               printf( '<h2>' . __( 'Updating translations for %1$s (%2$s)&#8230;' ) . '</h2>', $name, $this->language_update->language );
+       }
+
+       /**
+        *
+        * @param string|WP_Error $error
+        */
+       public function error( $error ) {
+               echo '<div class="lp-error">';
+               parent::error( $error );
+               echo '</div>';
+       }
+
+       /**
+        * @access public
+        */
+       public function after() {
+               echo '</div>';
+       }
+
+       /**
+        * @access public
+        */
+       public function bulk_footer() {
+               $this->decrement_update_count( 'translation' );
+               $update_actions = array();
+               $update_actions['updates_page'] = '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>';
+
+               /**
+                * Filters the list of action links available following a translations update.
+                *
+                * @since 3.7.0
+                *
+                * @param array $update_actions Array of translations update links.
+                */
+               $update_actions = apply_filters( 'update_translations_complete_actions', $update_actions );
+
+               if ( $update_actions && $this->display_footer_actions )
+                       $this->feedback( implode( ' | ', $update_actions ) );
+       }
+}
diff --git a/wp-admin/includes/class-language-pack-upgrader.php b/wp-admin/includes/class-language-pack-upgrader.php
new file mode 100644 (file)
index 0000000..358a01e
--- /dev/null
@@ -0,0 +1,377 @@
+<?php
+/**
+ * Upgrade API: Language_Pack_Upgrader class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Core class used for updating/installing language packs (translations)
+ * for plugins, themes, and core.
+ *
+ * @since 3.7.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php.
+ *
+ * @see WP_Upgrader
+ */
+class Language_Pack_Upgrader extends WP_Upgrader {
+
+       /**
+        * Result of the language pack upgrade.
+        *
+        * @since 3.7.0
+        * @access public
+        * @var array|WP_Error $result
+        * @see WP_Upgrader::$result
+        */
+       public $result;
+
+       /**
+        * Whether a bulk upgrade/install is being performed.
+        *
+        * @since 3.7.0
+        * @access public
+        * @var bool $bulk
+        */
+       public $bulk = true;
+
+       /**
+        * Asynchronously upgrades language packs after other upgrades have been made.
+        *
+        * Hooked to the {@see 'upgrader_process_complete'} action by default.
+        *
+        * @since 3.7.0
+        * @access public
+        * @static
+        *
+        * @param false|WP_Upgrader $upgrader Optional. WP_Upgrader instance or false. If `$upgrader` is
+        *                                    a Language_Pack_Upgrader instance, the method will bail to
+        *                                    avoid recursion. Otherwise unused. Default false.
+        */
+       public static function async_upgrade( $upgrader = false ) {
+               // Avoid recursion.
+               if ( $upgrader && $upgrader instanceof Language_Pack_Upgrader ) {
+                       return;
+               }
+
+               // Nothing to do?
+               $language_updates = wp_get_translation_updates();
+               if ( ! $language_updates ) {
+                       return;
+               }
+
+               /*
+                * Avoid messing with VCS installs, at least for now.
+                * Noted: this is not the ideal way to accomplish this.
+                */
+               $check_vcs = new WP_Automatic_Updater;
+               if ( $check_vcs->is_vcs_checkout( WP_CONTENT_DIR ) ) {
+                       return;
+               }
+
+               foreach ( $language_updates as $key => $language_update ) {
+                       $update = ! empty( $language_update->autoupdate );
+
+                       /**
+                        * Filters whether to asynchronously update translation for core, a plugin, or a theme.
+                        *
+                        * @since 4.0.0
+                        *
+                        * @param bool   $update          Whether to update.
+                        * @param object $language_update The update offer.
+                        */
+                       $update = apply_filters( 'async_update_translation', $update, $language_update );
+
+                       if ( ! $update ) {
+                               unset( $language_updates[ $key ] );
+                       }
+               }
+
+               if ( empty( $language_updates ) ) {
+                       return;
+               }
+
+               // Re-use the automatic upgrader skin if the parent upgrader is using it.
+               if ( $upgrader && $upgrader->skin instanceof Automatic_Upgrader_Skin ) {
+                       $skin = $upgrader->skin;
+               } else {
+                       $skin = new Language_Pack_Upgrader_Skin( array(
+                               'skip_header_footer' => true,
+                       ) );
+               }
+
+               $lp_upgrader = new Language_Pack_Upgrader( $skin );
+               $lp_upgrader->bulk_upgrade( $language_updates );
+       }
+
+       /**
+        * Initialize the upgrade strings.
+        *
+        * @since 3.7.0
+        * @access public
+        */
+       public function upgrade_strings() {
+               $this->strings['starting_upgrade'] = __( 'Some of your translations need updating. Sit tight for a few more seconds while we update them as well.' );
+               $this->strings['up_to_date'] = __( 'The translations are up to date.' );
+               $this->strings['no_package'] = __( 'Update package not available.' );
+               $this->strings['downloading_package'] = __( 'Downloading translation from <span class="code">%s</span>&#8230;' );
+               $this->strings['unpack_package'] = __( 'Unpacking the update&#8230;' );
+               $this->strings['process_failed'] = __( 'Translation update failed.' );
+               $this->strings['process_success'] = __( 'Translation updated successfully.' );
+       }
+
+       /**
+        * Upgrade a language pack.
+        *
+        * @since 3.7.0
+        * @access public
+        *
+        * @param string|false $update Optional. Whether an update offer is available. Default false.
+        * @param array        $args   Optional. Other optional arguments, see
+        *                             Language_Pack_Upgrader::bulk_upgrade(). Default empty array.
+        * @return array|bool|WP_Error The result of the upgrade, or a WP_Error object instead.
+        */
+       public function upgrade( $update = false, $args = array() ) {
+               if ( $update ) {
+                       $update = array( $update );
+               }
+
+               $results = $this->bulk_upgrade( $update, $args );
+
+               if ( ! is_array( $results ) ) {
+                       return $results;
+               }
+
+               return $results[0];
+       }
+
+       /**
+        * Bulk upgrade language packs.
+        *
+        * @since 3.7.0
+        * @access public
+        *
+        * @global WP_Filesystem_Base $wp_filesystem Subclass
+        *
+        * @param array $language_updates Optional. Language pack updates. Default empty array.
+        * @param array $args {
+        *     Optional. Other arguments for upgrading multiple language packs. Default empty array
+        *
+        *     @type bool $clear_update_cache Whether to clear the update cache when done.
+        *                                    Default true.
+        * }
+        * @return array|bool|WP_Error Will return an array of results, or true if there are no updates,
+        *                                   false or WP_Error for initial errors.
+        */
+       public function bulk_upgrade( $language_updates = array(), $args = array() ) {
+               global $wp_filesystem;
+
+               $defaults = array(
+                       'clear_update_cache' => true,
+               );
+               $parsed_args = wp_parse_args( $args, $defaults );
+
+               $this->init();
+               $this->upgrade_strings();
+
+               if ( ! $language_updates )
+                       $language_updates = wp_get_translation_updates();
+
+               if ( empty( $language_updates ) ) {
+                       $this->skin->header();
+                       $this->skin->set_result( true );
+                       $this->skin->feedback( 'up_to_date' );
+                       $this->skin->bulk_footer();
+                       $this->skin->footer();
+                       return true;
+               }
+
+               if ( 'upgrader_process_complete' == current_filter() )
+                       $this->skin->feedback( 'starting_upgrade' );
+
+               // Remove any existing upgrade filters from the plugin/theme upgraders #WP29425 & #WP29230
+               remove_all_filters( 'upgrader_pre_install' );
+               remove_all_filters( 'upgrader_clear_destination' );
+               remove_all_filters( 'upgrader_post_install' );
+               remove_all_filters( 'upgrader_source_selection' );
+
+               add_filter( 'upgrader_source_selection', array( $this, 'check_package' ), 10, 2 );
+
+               $this->skin->header();
+
+               // Connect to the Filesystem first.
+               $res = $this->fs_connect( array( WP_CONTENT_DIR, WP_LANG_DIR ) );
+               if ( ! $res ) {
+                       $this->skin->footer();
+                       return false;
+               }
+
+               $results = array();
+
+               $this->update_count = count( $language_updates );
+               $this->update_current = 0;
+
+               /*
+                * The filesystem's mkdir() is not recursive. Make sure WP_LANG_DIR exists,
+                * as we then may need to create a /plugins or /themes directory inside of it.
+                */
+               $remote_destination = $wp_filesystem->find_folder( WP_LANG_DIR );
+               if ( ! $wp_filesystem->exists( $remote_destination ) )
+                       if ( ! $wp_filesystem->mkdir( $remote_destination, FS_CHMOD_DIR ) )
+                               return new WP_Error( 'mkdir_failed_lang_dir', $this->strings['mkdir_failed'], $remote_destination );
+
+               $language_updates_results = array();
+
+               foreach ( $language_updates as $language_update ) {
+
+                       $this->skin->language_update = $language_update;
+
+                       $destination = WP_LANG_DIR;
+                       if ( 'plugin' == $language_update->type )
+                               $destination .= '/plugins';
+                       elseif ( 'theme' == $language_update->type )
+                               $destination .= '/themes';
+
+                       $this->update_current++;
+
+                       $options = array(
+                               'package' => $language_update->package,
+                               'destination' => $destination,
+                               'clear_destination' => false,
+                               'abort_if_destination_exists' => false, // We expect the destination to exist.
+                               'clear_working' => true,
+                               'is_multi' => true,
+                               'hook_extra' => array(
+                                       'language_update_type' => $language_update->type,
+                                       'language_update' => $language_update,
+                               )
+                       );
+
+                       $result = $this->run( $options );
+
+                       $results[] = $this->result;
+
+                       // Prevent credentials auth screen from displaying multiple times.
+                       if ( false === $result ) {
+                               break;
+                       }
+
+                       $language_updates_results[] = array(
+                               'language' => $language_update->language,
+                               'type'     => $language_update->type,
+                               'slug'     => isset( $language_update->slug ) ? $language_update->slug : 'default',
+                               'version'  => $language_update->version,
+                       );
+               }
+
+               // Remove upgrade hooks which are not required for translation updates.
+               remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
+               remove_action( 'upgrader_process_complete', 'wp_version_check' );
+               remove_action( 'upgrader_process_complete', 'wp_update_plugins' );
+               remove_action( 'upgrader_process_complete', 'wp_update_themes' );
+
+               /** This action is documented in wp-admin/includes/class-wp-upgrader.php */
+               do_action( 'upgrader_process_complete', $this, array(
+                       'action'       => 'update',
+                       'type'         => 'translation',
+                       'bulk'         => true,
+                       'translations' => $language_updates_results
+               ) );
+
+               // Re-add upgrade hooks.
+               add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
+               add_action( 'upgrader_process_complete', 'wp_version_check' );
+               add_action( 'upgrader_process_complete', 'wp_update_plugins' );
+               add_action( 'upgrader_process_complete', 'wp_update_themes' );
+
+               $this->skin->bulk_footer();
+
+               $this->skin->footer();
+
+               // Clean up our hooks, in case something else does an upgrade on this connection.
+               remove_filter( 'upgrader_source_selection', array( $this, 'check_package' ) );
+
+               if ( $parsed_args['clear_update_cache'] ) {
+                       wp_clean_update_cache();
+               }
+
+               return $results;
+       }
+
+       /**
+        * Check the package source to make sure there are .mo and .po files.
+        *
+        * Hooked to the {@see 'upgrader_source_selection'} filter by
+        * Language_Pack_Upgrader::bulk_upgrade().
+        *
+        * @since 3.7.0
+        * @access public
+        *
+        * @global WP_Filesystem_Base $wp_filesystem Subclass
+        *
+        * @param string|WP_Error $source
+        * @param string          $remote_source
+        */
+       public function check_package( $source, $remote_source ) {
+               global $wp_filesystem;
+
+               if ( is_wp_error( $source ) )
+                       return $source;
+
+               // Check that the folder contains a valid language.
+               $files = $wp_filesystem->dirlist( $remote_source );
+
+               // Check to see if a .po and .mo exist in the folder.
+               $po = $mo = false;
+               foreach ( (array) $files as $file => $filedata ) {
+                       if ( '.po' == substr( $file, -3 ) )
+                               $po = true;
+                       elseif ( '.mo' == substr( $file, -3 ) )
+                               $mo = true;
+               }
+
+               if ( ! $mo || ! $po ) {
+                       return new WP_Error( 'incompatible_archive_pomo', $this->strings['incompatible_archive'],
+                               /* translators: 1: .po 2: .mo */
+                               sprintf( __( 'The language pack is missing either the %1$s or %2$s files.' ),
+                                       '<code>.po</code>',
+                                       '<code>.mo</code>'
+                               )
+                       );
+               }
+
+               return $source;
+       }
+
+       /**
+        * Get the name of an item being updated.
+        *
+        * @since 3.7.0
+        * @access public
+        *
+        * @param object $update The data for an update.
+        * @return string The name of the item being updated.
+        */
+       public function get_name_for_update( $update ) {
+               switch ( $update->type ) {
+                       case 'core':
+                               return 'WordPress'; // Not translated
+
+                       case 'theme':
+                               $theme = wp_get_theme( $update->slug );
+                               if ( $theme->exists() )
+                                       return $theme->Get( 'Name' );
+                               break;
+                       case 'plugin':
+                               $plugin_data = get_plugins( '/' . $update->slug );
+                               $plugin_data = reset( $plugin_data );
+                               if ( $plugin_data )
+                                       return $plugin_data['Name'];
+                               break;
+               }
+               return '';
+       }
+
+}
index f36a4a3eef06b6cf4ff1d134ba9bad184a6f0f43..ae0af7a8f101c5ad212fd54840dfba1e3211f37b 100644 (file)
     // ----- Get 'memory_limit' configuration value
     $v_memory_limit = ini_get('memory_limit');
     $v_memory_limit = trim($v_memory_limit);
+    $v_memory_limit_int = (int) $v_memory_limit;
     $last = strtolower(substr($v_memory_limit, -1));
 
     if($last == 'g')
-        //$v_memory_limit = $v_memory_limit*1024*1024*1024;
-        $v_memory_limit = $v_memory_limit*1073741824;
+        //$v_memory_limit_int = $v_memory_limit_int*1024*1024*1024;
+        $v_memory_limit_int = $v_memory_limit_int*1073741824;
     if($last == 'm')
-        //$v_memory_limit = $v_memory_limit*1024*1024;
-        $v_memory_limit = $v_memory_limit*1048576;
+        //$v_memory_limit_int = $v_memory_limit_int*1024*1024;
+        $v_memory_limit_int = $v_memory_limit_int*1048576;
     if($last == 'k')
-        $v_memory_limit = $v_memory_limit*1024;
+        $v_memory_limit_int = $v_memory_limit_int*1024;
 
-    $p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] = floor($v_memory_limit*PCLZIP_TEMPORARY_FILE_RATIO);
+    $p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] = floor($v_memory_limit_int*PCLZIP_TEMPORARY_FILE_RATIO);
 
 
     // ----- Sanity check : No threshold if value lower than 1M
diff --git a/wp-admin/includes/class-plugin-installer-skin.php b/wp-admin/includes/class-plugin-installer-skin.php
new file mode 100644 (file)
index 0000000..34b2020
--- /dev/null
@@ -0,0 +1,96 @@
+<?php
+/**
+ * Upgrader API: Plugin_Installer_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Plugin Installer Skin for WordPress Plugin Installer.
+ *
+ * @since 2.8.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
+ *
+ * @see WP_Upgrader_Skin
+ */
+class Plugin_Installer_Skin extends WP_Upgrader_Skin {
+       public $api;
+       public $type;
+
+       /**
+        *
+        * @param array $args
+        */
+       public function __construct($args = array()) {
+               $defaults = array( 'type' => 'web', 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => '' );
+               $args = wp_parse_args($args, $defaults);
+
+               $this->type = $args['type'];
+               $this->api = isset($args['api']) ? $args['api'] : array();
+
+               parent::__construct($args);
+       }
+
+       /**
+        * @access public
+        */
+       public function before() {
+               if ( !empty($this->api) )
+                       $this->upgrader->strings['process_success'] = sprintf( __('Successfully installed the plugin <strong>%s %s</strong>.'), $this->api->name, $this->api->version);
+       }
+
+       /**
+        * @access public
+        */
+       public function after() {
+               $plugin_file = $this->upgrader->plugin_info();
+
+               $install_actions = array();
+
+               $from = isset($_GET['from']) ? wp_unslash( $_GET['from'] ) : 'plugins';
+
+               if ( 'import' == $from )
+                       $install_actions['activate_plugin'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;from=import&amp;plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ) . '" target="_parent">' . __( 'Activate Plugin &amp; Run Importer' ) . '</a>';
+               else
+                       $install_actions['activate_plugin'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ) . '" target="_parent">' . __( 'Activate Plugin' ) . '</a>';
+
+               if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) {
+                       $install_actions['network_activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;networkwide=1&amp;plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ) . '" target="_parent">' . __( 'Network Activate' ) . '</a>';
+                       unset( $install_actions['activate_plugin'] );
+               }
+
+               if ( 'import' == $from ) {
+                       $install_actions['importers_page'] = '<a href="' . admin_url( 'import.php' ) . '" target="_parent">' . __( 'Return to Importers' ) . '</a>';
+               } elseif ( $this->type == 'web' ) {
+                       $install_actions['plugins_page'] = '<a href="' . self_admin_url( 'plugin-install.php' ) . '" target="_parent">' . __( 'Return to Plugin Installer' ) . '</a>';
+               } elseif ( 'upload' == $this->type && 'plugins' == $from ) {
+                       $install_actions['plugins_page'] = '<a href="' . self_admin_url( 'plugin-install.php' ) . '">' . __( 'Return to Plugin Installer' ) . '</a>';
+               } else {
+                       $install_actions['plugins_page'] = '<a href="' . self_admin_url( 'plugins.php' ) . '" target="_parent">' . __( 'Return to Plugins page' ) . '</a>';
+               }
+
+               if ( ! $this->result || is_wp_error($this->result) ) {
+                       unset( $install_actions['activate_plugin'], $install_actions['network_activate'] );
+               } elseif ( ! current_user_can( 'activate_plugins' ) ) {
+                       unset( $install_actions['activate_plugin'] );
+               }
+
+               /**
+                * Filters the list of action links available following a single plugin installation.
+                *
+                * @since 2.7.0
+                *
+                * @param array  $install_actions Array of plugin action links.
+                * @param object $api             Object containing WordPress.org API plugin data. Empty
+                *                                for non-API installs, such as when a plugin is installed
+                *                                via upload.
+                * @param string $plugin_file     Path to the plugin file.
+                */
+               $install_actions = apply_filters( 'install_plugin_complete_actions', $install_actions, $this->api, $plugin_file );
+
+               if ( ! empty($install_actions) )
+                       $this->feedback(implode(' | ', (array)$install_actions));
+       }
+}
diff --git a/wp-admin/includes/class-plugin-upgrader-skin.php b/wp-admin/includes/class-plugin-upgrader-skin.php
new file mode 100644 (file)
index 0000000..1c4da87
--- /dev/null
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Upgrader API: Plugin_Upgrader_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Plugin Upgrader Skin for WordPress Plugin Upgrades.
+ *
+ * @since 2.8.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
+ *
+ * @see WP_Upgrader_Skin
+ */
+class Plugin_Upgrader_Skin extends WP_Upgrader_Skin {
+       public $plugin = '';
+       public $plugin_active = false;
+       public $plugin_network_active = false;
+
+       /**
+        *
+        * @param array $args
+        */
+       public function __construct( $args = array() ) {
+               $defaults = array( 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => __('Update Plugin') );
+               $args = wp_parse_args($args, $defaults);
+
+               $this->plugin = $args['plugin'];
+
+               $this->plugin_active = is_plugin_active( $this->plugin );
+               $this->plugin_network_active = is_plugin_active_for_network( $this->plugin );
+
+               parent::__construct($args);
+       }
+
+       /**
+        * @access public
+        */
+       public function after() {
+               $this->plugin = $this->upgrader->plugin_info();
+               if ( !empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active ){
+                       // Currently used only when JS is off for a single plugin update?
+                       echo '<iframe title="' . esc_attr__( 'Update progress' ) . '" style="border:0;overflow:hidden" width="100%" height="170" src="' . wp_nonce_url( 'update.php?action=activate-plugin&networkwide=' . $this->plugin_network_active . '&plugin=' . urlencode( $this->plugin ), 'activate-plugin_' . $this->plugin ) . '"></iframe>';
+               }
+
+               $this->decrement_update_count( 'plugin' );
+
+               $update_actions =  array(
+                       'activate_plugin' => '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . urlencode( $this->plugin ), 'activate-plugin_' . $this->plugin) . '" target="_parent">' . __( 'Activate Plugin' ) . '</a>',
+                       'plugins_page' => '<a href="' . self_admin_url( 'plugins.php' ) . '" target="_parent">' . __( 'Return to Plugins page' ) . '</a>'
+               );
+               if ( $this->plugin_active || ! $this->result || is_wp_error( $this->result ) || ! current_user_can( 'activate_plugins' ) )
+                       unset( $update_actions['activate_plugin'] );
+
+               /**
+                * Filters the list of action links available following a single plugin update.
+                *
+                * @since 2.7.0
+                *
+                * @param array  $update_actions Array of plugin action links.
+                * @param string $plugin         Path to the plugin file.
+                */
+               $update_actions = apply_filters( 'update_plugin_complete_actions', $update_actions, $this->plugin );
+
+               if ( ! empty($update_actions) )
+                       $this->feedback(implode(' | ', (array)$update_actions));
+       }
+}
diff --git a/wp-admin/includes/class-plugin-upgrader.php b/wp-admin/includes/class-plugin-upgrader.php
new file mode 100644 (file)
index 0000000..ffb4620
--- /dev/null
@@ -0,0 +1,466 @@
+<?php
+/**
+ * Upgrade API: Plugin_Upgrader class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Core class used for upgrading/installing plugins.
+ *
+ * It is designed to upgrade/install plugins from a local zip, remote zip URL,
+ * or uploaded zip file.
+ *
+ * @since 2.8.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php.
+ *
+ * @see WP_Upgrader
+ */
+class Plugin_Upgrader extends WP_Upgrader {
+
+       /**
+        * Plugin upgrade result.
+        *
+        * @since 2.8.0
+        * @access public
+        * @var array|WP_Error $result
+        *
+        * @see WP_Upgrader::$result
+        */
+       public $result;
+
+       /**
+        * Whether a bulk upgrade/install is being performed.
+        *
+        * @since 2.9.0
+        * @access public
+        * @var bool $bulk
+        */
+       public $bulk = false;
+
+       /**
+        * Initialize the upgrade strings.
+        *
+        * @since 2.8.0
+        * @access public
+        */
+       public function upgrade_strings() {
+               $this->strings['up_to_date'] = __('The plugin is at the latest version.');
+               $this->strings['no_package'] = __('Update package not available.');
+               $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>&#8230;');
+               $this->strings['unpack_package'] = __('Unpacking the update&#8230;');
+               $this->strings['remove_old'] = __('Removing the old version of the plugin&#8230;');
+               $this->strings['remove_old_failed'] = __('Could not remove the old plugin.');
+               $this->strings['process_failed'] = __('Plugin update failed.');
+               $this->strings['process_success'] = __('Plugin updated successfully.');
+               $this->strings['process_bulk_success'] = __('Plugins updated successfully.');
+       }
+
+       /**
+        * Initialize the install strings.
+        *
+        * @since 2.8.0
+        * @access public
+        */
+       public function install_strings() {
+               $this->strings['no_package'] = __('Install package not available.');
+               $this->strings['downloading_package'] = __('Downloading install package from <span class="code">%s</span>&#8230;');
+               $this->strings['unpack_package'] = __('Unpacking the package&#8230;');
+               $this->strings['installing_package'] = __('Installing the plugin&#8230;');
+               $this->strings['no_files'] = __('The plugin contains no files.');
+               $this->strings['process_failed'] = __('Plugin install failed.');
+               $this->strings['process_success'] = __('Plugin installed successfully.');
+       }
+
+       /**
+        * Install a plugin package.
+        *
+        * @since 2.8.0
+        * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional.
+        * @access public
+        *
+        * @param string $package The full local path or URI of the package.
+        * @param array  $args {
+        *     Optional. Other arguments for installing a plugin package. Default empty array.
+        *
+        *     @type bool $clear_update_cache Whether to clear the plugin updates cache if successful.
+        *                                    Default true.
+        * }
+        * @return bool|WP_Error True if the install was successful, false or a WP_Error otherwise.
+        */
+       public function install( $package, $args = array() ) {
+
+               $defaults = array(
+                       'clear_update_cache' => true,
+               );
+               $parsed_args = wp_parse_args( $args, $defaults );
+
+               $this->init();
+               $this->install_strings();
+
+               add_filter('upgrader_source_selection', array($this, 'check_package') );
+               // Clear cache so wp_update_plugins() knows about the new plugin.
+               add_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9, 0 );
+
+               $this->run( array(
+                       'package' => $package,
+                       'destination' => WP_PLUGIN_DIR,
+                       'clear_destination' => false, // Do not overwrite files.
+                       'clear_working' => true,
+                       'hook_extra' => array(
+                               'type' => 'plugin',
+                               'action' => 'install',
+                       )
+               ) );
+
+               remove_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9 );
+               remove_filter('upgrader_source_selection', array($this, 'check_package') );
+
+               if ( ! $this->result || is_wp_error($this->result) )
+                       return $this->result;
+
+               // Force refresh of plugin update information
+               wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
+
+               return true;
+       }
+
+       /**
+        * Upgrade a plugin.
+        *
+        * @since 2.8.0
+        * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional.
+        * @access public
+        *
+        * @param string $plugin The basename path to the main plugin file.
+        * @param array  $args {
+        *     Optional. Other arguments for upgrading a plugin package. Default empty array.
+        *
+        *     @type bool $clear_update_cache Whether to clear the plugin updates cache if successful.
+        *                                    Default true.
+        * }
+        * @return bool|WP_Error True if the upgrade was successful, false or a WP_Error object otherwise.
+        */
+       public function upgrade( $plugin, $args = array() ) {
+
+               $defaults = array(
+                       'clear_update_cache' => true,
+               );
+               $parsed_args = wp_parse_args( $args, $defaults );
+
+               $this->init();
+               $this->upgrade_strings();
+
+               $current = get_site_transient( 'update_plugins' );
+               if ( !isset( $current->response[ $plugin ] ) ) {
+                       $this->skin->before();
+                       $this->skin->set_result(false);
+                       $this->skin->error('up_to_date');
+                       $this->skin->after();
+                       return false;
+               }
+
+               // Get the URL to the zip file
+               $r = $current->response[ $plugin ];
+
+               add_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade'), 10, 2);
+               add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4);
+               //'source_selection' => array($this, 'source_selection'), //there's a trac ticket to move up the directory for zip's which are made a bit differently, useful for non-.org plugins.
+               // Clear cache so wp_update_plugins() knows about the new plugin.
+               add_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9, 0 );
+
+               $this->run( array(
+                       'package' => $r->package,
+                       'destination' => WP_PLUGIN_DIR,
+                       'clear_destination' => true,
+                       'clear_working' => true,
+                       'hook_extra' => array(
+                               'plugin' => $plugin,
+                               'type' => 'plugin',
+                               'action' => 'update',
+                       ),
+               ) );
+
+               // Cleanup our hooks, in case something else does a upgrade on this connection.
+               remove_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9 );
+               remove_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade'));
+               remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'));
+
+               if ( ! $this->result || is_wp_error($this->result) )
+                       return $this->result;
+
+               // Force refresh of plugin update information
+               wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
+
+               return true;
+       }
+
+       /**
+        * Bulk upgrade several plugins at once.
+        *
+        * @since 2.8.0
+        * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional.
+        * @access public
+        *
+        * @param array $plugins Array of the basename paths of the plugins' main files.
+        * @param array $args {
+        *     Optional. Other arguments for upgrading several plugins at once. Default empty array.
+        *
+        *     @type bool $clear_update_cache Whether to clear the plugin updates cache if successful.
+        *                                    Default true.
+        * }
+        * @return array|false An array of results indexed by plugin file, or false if unable to connect to the filesystem.
+        */
+       public function bulk_upgrade( $plugins, $args = array() ) {
+
+               $defaults = array(
+                       'clear_update_cache' => true,
+               );
+               $parsed_args = wp_parse_args( $args, $defaults );
+
+               $this->init();
+               $this->bulk = true;
+               $this->upgrade_strings();
+
+               $current = get_site_transient( 'update_plugins' );
+
+               add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4);
+               add_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9, 0 );
+
+               $this->skin->header();
+
+               // Connect to the Filesystem first.
+               $res = $this->fs_connect( array(WP_CONTENT_DIR, WP_PLUGIN_DIR) );
+               if ( ! $res ) {
+                       $this->skin->footer();
+                       return false;
+               }
+
+               $this->skin->bulk_header();
+
+               /*
+                * Only start maintenance mode if:
+                * - running Multisite and there are one or more plugins specified, OR
+                * - a plugin with an update available is currently active.
+                * @TODO: For multisite, maintenance mode should only kick in for individual sites if at all possible.
+                */
+               $maintenance = ( is_multisite() && ! empty( $plugins ) );
+               foreach ( $plugins as $plugin )
+                       $maintenance = $maintenance || ( is_plugin_active( $plugin ) && isset( $current->response[ $plugin] ) );
+               if ( $maintenance )
+                       $this->maintenance_mode(true);
+
+               $results = array();
+
+               $this->update_count = count($plugins);
+               $this->update_current = 0;
+               foreach ( $plugins as $plugin ) {
+                       $this->update_current++;
+                       $this->skin->plugin_info = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin, false, true);
+
+                       if ( !isset( $current->response[ $plugin ] ) ) {
+                               $this->skin->set_result('up_to_date');
+                               $this->skin->before();
+                               $this->skin->feedback('up_to_date');
+                               $this->skin->after();
+                               $results[$plugin] = true;
+                               continue;
+                       }
+
+                       // Get the URL to the zip file.
+                       $r = $current->response[ $plugin ];
+
+                       $this->skin->plugin_active = is_plugin_active($plugin);
+
+                       $result = $this->run( array(
+                               'package' => $r->package,
+                               'destination' => WP_PLUGIN_DIR,
+                               'clear_destination' => true,
+                               'clear_working' => true,
+                               'is_multi' => true,
+                               'hook_extra' => array(
+                                       'plugin' => $plugin
+                               )
+                       ) );
+
+                       $results[$plugin] = $this->result;
+
+                       // Prevent credentials auth screen from displaying multiple times
+                       if ( false === $result )
+                               break;
+               } //end foreach $plugins
+
+               $this->maintenance_mode(false);
+
+               /** This action is documented in wp-admin/includes/class-wp-upgrader.php */
+               do_action( 'upgrader_process_complete', $this, array(
+                       'action' => 'update',
+                       'type' => 'plugin',
+                       'bulk' => true,
+                       'plugins' => $plugins,
+               ) );
+
+               $this->skin->bulk_footer();
+
+               $this->skin->footer();
+
+               // Cleanup our hooks, in case something else does a upgrade on this connection.
+               remove_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9 );
+               remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'));
+
+               // Force refresh of plugin update information.
+               wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
+
+               return $results;
+       }
+
+       /**
+        * Check a source package to be sure it contains a plugin.
+        *
+        * This function is added to the {@see 'upgrader_source_selection'} filter by
+        * Plugin_Upgrader::install().
+        *
+        * @since 3.3.0
+        * @access public
+        *
+        * @global WP_Filesystem_Base $wp_filesystem Subclass
+        *
+        * @param string $source The path to the downloaded package source.
+        * @return string|WP_Error The source as passed, or a WP_Error object
+        *                         if no plugins were found.
+        */
+       public function check_package($source) {
+               global $wp_filesystem;
+
+               if ( is_wp_error($source) )
+                       return $source;
+
+               $working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit(WP_CONTENT_DIR), $source);
+               if ( ! is_dir($working_directory) ) // Sanity check, if the above fails, let's not prevent installation.
+                       return $source;
+
+               // Check the folder contains at least 1 valid plugin.
+               $plugins_found = false;
+               $files = glob( $working_directory . '*.php' );
+               if ( $files ) {
+                       foreach ( $files as $file ) {
+                               $info = get_plugin_data( $file, false, false );
+                               if ( ! empty( $info['Name'] ) ) {
+                                       $plugins_found = true;
+                                       break;
+                               }
+                       }
+               }
+
+               if ( ! $plugins_found )
+                       return new WP_Error( 'incompatible_archive_no_plugins', $this->strings['incompatible_archive'], __( 'No valid plugins were found.' ) );
+
+               return $source;
+       }
+
+       /**
+        * Retrieve the path to the file that contains the plugin info.
+        *
+        * This isn't used internally in the class, but is called by the skins.
+        *
+        * @since 2.8.0
+        * @access public
+        *
+        * @return string|false The full path to the main plugin file, or false.
+        */
+       public function plugin_info() {
+               if ( ! is_array($this->result) )
+                       return false;
+               if ( empty($this->result['destination_name']) )
+                       return false;
+
+               $plugin = get_plugins('/' . $this->result['destination_name']); //Ensure to pass with leading slash
+               if ( empty($plugin) )
+                       return false;
+
+               $pluginfiles = array_keys($plugin); //Assume the requested plugin is the first in the list
+
+               return $this->result['destination_name'] . '/' . $pluginfiles[0];
+       }
+
+       /**
+        * Deactivates a plugin before it is upgraded.
+        *
+        * Hooked to the {@see 'upgrader_pre_install'} filter by Plugin_Upgrader::upgrade().
+        *
+        * @since 2.8.0
+        * @since 4.1.0 Added a return value.
+        * @access public
+        *
+        * @param bool|WP_Error  $return Upgrade offer return.
+        * @param array          $plugin Plugin package arguments.
+        * @return bool|WP_Error The passed in $return param or WP_Error.
+        */
+       public function deactivate_plugin_before_upgrade($return, $plugin) {
+
+               if ( is_wp_error($return) ) //Bypass.
+                       return $return;
+
+               // When in cron (background updates) don't deactivate the plugin, as we require a browser to reactivate it
+               if ( defined( 'DOING_CRON' ) && DOING_CRON )
+                       return $return;
+
+               $plugin = isset($plugin['plugin']) ? $plugin['plugin'] : '';
+               if ( empty($plugin) )
+                       return new WP_Error('bad_request', $this->strings['bad_request']);
+
+               if ( is_plugin_active($plugin) ) {
+                       //Deactivate the plugin silently, Prevent deactivation hooks from running.
+                       deactivate_plugins($plugin, true);
+               }
+
+               return $return;
+       }
+
+       /**
+        * Delete the old plugin during an upgrade.
+        *
+        * Hooked to the {@see 'upgrader_clear_destination'} filter by
+        * Plugin_Upgrader::upgrade() and Plugin_Upgrader::bulk_upgrade().
+        *
+        * @since 2.8.0
+        * @access public
+        *
+        * @global WP_Filesystem_Base $wp_filesystem Subclass
+     *
+        * @param bool|WP_Error $removed
+        * @param string        $local_destination
+        * @param string        $remote_destination
+        * @param array         $plugin
+        * @return WP_Error|bool
+        */
+       public function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin) {
+               global $wp_filesystem;
+
+               if ( is_wp_error($removed) )
+                       return $removed; //Pass errors through.
+
+               $plugin = isset($plugin['plugin']) ? $plugin['plugin'] : '';
+               if ( empty($plugin) )
+                       return new WP_Error('bad_request', $this->strings['bad_request']);
+
+               $plugins_dir = $wp_filesystem->wp_plugins_dir();
+               $this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin) );
+
+               if ( ! $wp_filesystem->exists($this_plugin_dir) ) //If it's already vanished.
+                       return $removed;
+
+               // If plugin is in its own directory, recursively delete the directory.
+               if ( strpos($plugin, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory separator AND that it's not the root plugin folder
+                       $deleted = $wp_filesystem->delete($this_plugin_dir, true);
+               else
+                       $deleted = $wp_filesystem->delete($plugins_dir . $plugin);
+
+               if ( ! $deleted )
+                       return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']);
+
+               return true;
+       }
+}
diff --git a/wp-admin/includes/class-theme-installer-skin.php b/wp-admin/includes/class-theme-installer-skin.php
new file mode 100644 (file)
index 0000000..57c7810
--- /dev/null
@@ -0,0 +1,98 @@
+<?php
+/**
+ * Upgrader API: Theme_Installer_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Theme Installer Skin for the WordPress Theme Installer.
+ *
+ * @since 2.8.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
+ *
+ * @see WP_Upgrader_Skin
+ */
+class Theme_Installer_Skin extends WP_Upgrader_Skin {
+       public $api;
+       public $type;
+
+       /**
+        *
+        * @param array $args
+        */
+       public function __construct($args = array()) {
+               $defaults = array( 'type' => 'web', 'url' => '', 'theme' => '', 'nonce' => '', 'title' => '' );
+               $args = wp_parse_args($args, $defaults);
+
+               $this->type = $args['type'];
+               $this->api = isset($args['api']) ? $args['api'] : array();
+
+               parent::__construct($args);
+       }
+
+       /**
+        * @access public
+        */
+       public function before() {
+               if ( !empty($this->api) )
+                       $this->upgrader->strings['process_success'] = sprintf( $this->upgrader->strings['process_success_specific'], $this->api->name, $this->api->version);
+       }
+
+       /**
+        * @access public
+        */
+       public function after() {
+               if ( empty($this->upgrader->result['destination_name']) )
+                       return;
+
+               $theme_info = $this->upgrader->theme_info();
+               if ( empty( $theme_info ) )
+                       return;
+
+               $name       = $theme_info->display('Name');
+               $stylesheet = $this->upgrader->result['destination_name'];
+               $template   = $theme_info->get_template();
+
+               $activate_link = add_query_arg( array(
+                       'action'     => 'activate',
+                       'template'   => urlencode( $template ),
+                       'stylesheet' => urlencode( $stylesheet ),
+               ), admin_url('themes.php') );
+               $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
+
+               $install_actions = array();
+
+               if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
+                       $install_actions['preview'] = '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Live Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Live Preview &#8220;%s&#8221;' ), $name ) . '</span></a>';
+               }
+               $install_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink"><span aria-hidden="true">' . __( 'Activate' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Activate &#8220;%s&#8221;' ), $name ) . '</span></a>';
+
+               if ( is_network_admin() && current_user_can( 'manage_network_themes' ) )
+                       $install_actions['network_enable'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=enable&amp;theme=' . urlencode( $stylesheet ), 'enable-theme_' . $stylesheet ) ) . '" target="_parent">' . __( 'Network Enable' ) . '</a>';
+
+               if ( $this->type == 'web' )
+                       $install_actions['themes_page'] = '<a href="' . self_admin_url( 'theme-install.php' ) . '" target="_parent">' . __( 'Return to Theme Installer' ) . '</a>';
+               elseif ( current_user_can( 'switch_themes' ) || current_user_can( 'edit_theme_options' ) )
+                       $install_actions['themes_page'] = '<a href="' . self_admin_url( 'themes.php' ) . '" target="_parent">' . __( 'Return to Themes page' ) . '</a>';
+
+               if ( ! $this->result || is_wp_error($this->result) || is_network_admin() || ! current_user_can( 'switch_themes' ) )
+                       unset( $install_actions['activate'], $install_actions['preview'] );
+
+               /**
+                * Filters the list of action links available following a single theme installation.
+                *
+                * @since 2.8.0
+                *
+                * @param array    $install_actions Array of theme action links.
+                * @param object   $api             Object containing WordPress.org API theme data.
+                * @param string   $stylesheet      Theme directory name.
+                * @param WP_Theme $theme_info      Theme object.
+                */
+               $install_actions = apply_filters( 'install_theme_complete_actions', $install_actions, $this->api, $stylesheet, $theme_info );
+               if ( ! empty($install_actions) )
+                       $this->feedback(implode(' | ', (array)$install_actions));
+       }
+}
diff --git a/wp-admin/includes/class-theme-upgrader-skin.php b/wp-admin/includes/class-theme-upgrader-skin.php
new file mode 100644 (file)
index 0000000..329582e
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Upgrader API: Theme_Upgrader_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Theme Upgrader Skin for WordPress Theme Upgrades.
+ *
+ * @since 2.8.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
+ *
+ * @see WP_Upgrader_Skin
+ */
+class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
+       public $theme = '';
+
+       /**
+        *
+        * @param array $args
+        */
+       public function __construct($args = array()) {
+               $defaults = array( 'url' => '', 'theme' => '', 'nonce' => '', 'title' => __('Update Theme') );
+               $args = wp_parse_args($args, $defaults);
+
+               $this->theme = $args['theme'];
+
+               parent::__construct($args);
+       }
+
+       /**
+        * @access public
+        */
+       public function after() {
+               $this->decrement_update_count( 'theme' );
+
+               $update_actions = array();
+               if ( ! empty( $this->upgrader->result['destination_name'] ) && $theme_info = $this->upgrader->theme_info() ) {
+                       $name       = $theme_info->display('Name');
+                       $stylesheet = $this->upgrader->result['destination_name'];
+                       $template   = $theme_info->get_template();
+
+                       $activate_link = add_query_arg( array(
+                               'action'     => 'activate',
+                               'template'   => urlencode( $template ),
+                               'stylesheet' => urlencode( $stylesheet ),
+                       ), admin_url('themes.php') );
+                       $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
+
+                       if ( get_stylesheet() == $stylesheet ) {
+                               if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
+                                       $update_actions['preview']  = '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Customize' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Customize &#8220;%s&#8221;' ), $name ) . '</span></a>';
+                               }
+                       } elseif ( current_user_can( 'switch_themes' ) ) {
+                               if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
+                                       $update_actions['preview'] = '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Live Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Live Preview &#8220;%s&#8221;' ), $name ) . '</span></a>';
+                               }
+                               $update_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink"><span aria-hidden="true">' . __( 'Activate' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Activate &#8220;%s&#8221;' ), $name ) . '</span></a>';
+                       }
+
+                       if ( ! $this->result || is_wp_error( $this->result ) || is_network_admin() )
+                               unset( $update_actions['preview'], $update_actions['activate'] );
+               }
+
+               $update_actions['themes_page'] = '<a href="' . self_admin_url( 'themes.php' ) . '" target="_parent">' . __( 'Return to Themes page' ) . '</a>';
+
+               /**
+                * Filters the list of action links available following a single theme update.
+                *
+                * @since 2.8.0
+                *
+                * @param array  $update_actions Array of theme action links.
+                * @param string $theme          Theme directory name.
+                */
+               $update_actions = apply_filters( 'update_theme_complete_actions', $update_actions, $this->theme );
+
+               if ( ! empty($update_actions) )
+                       $this->feedback(implode(' | ', (array)$update_actions));
+       }
+}
diff --git a/wp-admin/includes/class-theme-upgrader.php b/wp-admin/includes/class-theme-upgrader.php
new file mode 100644 (file)
index 0000000..76129e3
--- /dev/null
@@ -0,0 +1,603 @@
+<?php
+/**
+ * Upgrade API: Theme_Upgrader class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Core class used for upgrading/installing themes.
+ *
+ * It is designed to upgrade/install themes from a local zip, remote zip URL,
+ * or uploaded zip file.
+ *
+ * @since 2.8.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php.
+ *
+ * @see WP_Upgrader
+ */
+class Theme_Upgrader extends WP_Upgrader {
+
+       /**
+        * Result of the theme upgrade offer.
+        *
+        * @since 2.8.0
+        * @access public
+        * @var array|WP_Error $result
+        * @see WP_Upgrader::$result
+        */
+       public $result;
+
+       /**
+        * Whether multiple themes are being upgraded/installed in bulk.
+        *
+        * @since 2.9.0
+        * @access public
+        * @var bool $bulk
+        */
+       public $bulk = false;
+
+       /**
+        * Initialize the upgrade strings.
+        *
+        * @since 2.8.0
+        * @access public
+        */
+       public function upgrade_strings() {
+               $this->strings['up_to_date'] = __('The theme is at the latest version.');
+               $this->strings['no_package'] = __('Update package not available.');
+               $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>&#8230;');
+               $this->strings['unpack_package'] = __('Unpacking the update&#8230;');
+               $this->strings['remove_old'] = __('Removing the old version of the theme&#8230;');
+               $this->strings['remove_old_failed'] = __('Could not remove the old theme.');
+               $this->strings['process_failed'] = __('Theme update failed.');
+               $this->strings['process_success'] = __('Theme updated successfully.');
+       }
+
+       /**
+        * Initialize the install strings.
+        *
+        * @since 2.8.0
+        * @access public
+        */
+       public function install_strings() {
+               $this->strings['no_package'] = __('Install package not available.');
+               $this->strings['downloading_package'] = __('Downloading install package from <span class="code">%s</span>&#8230;');
+               $this->strings['unpack_package'] = __('Unpacking the package&#8230;');
+               $this->strings['installing_package'] = __('Installing the theme&#8230;');
+               $this->strings['no_files'] = __('The theme contains no files.');
+               $this->strings['process_failed'] = __('Theme install failed.');
+               $this->strings['process_success'] = __('Theme installed successfully.');
+               /* translators: 1: theme name, 2: version */
+               $this->strings['process_success_specific'] = __('Successfully installed the theme <strong>%1$s %2$s</strong>.');
+               $this->strings['parent_theme_search'] = __('This theme requires a parent theme. Checking if it is installed&#8230;');
+               /* translators: 1: theme name, 2: version */
+               $this->strings['parent_theme_prepare_install'] = __('Preparing to install <strong>%1$s %2$s</strong>&#8230;');
+               /* translators: 1: theme name, 2: version */
+               $this->strings['parent_theme_currently_installed'] = __('The parent theme, <strong>%1$s %2$s</strong>, is currently installed.');
+               /* translators: 1: theme name, 2: version */
+               $this->strings['parent_theme_install_success'] = __('Successfully installed the parent theme, <strong>%1$s %2$s</strong>.');
+               $this->strings['parent_theme_not_found'] = __('<strong>The parent theme could not be found.</strong> You will need to install the parent theme, <strong>%s</strong>, before you can use this child theme.');
+       }
+
+       /**
+        * Check if a child theme is being installed and we need to install its parent.
+        *
+        * Hooked to the {@see 'upgrader_post_install'} filter by Theme_Upgrader::install().
+        *
+        * @since 3.4.0
+        * @access public
+        *
+        * @param bool  $install_result
+        * @param array $hook_extra
+        * @param array $child_result
+        * @return type
+        */
+       public function check_parent_theme_filter( $install_result, $hook_extra, $child_result ) {
+               // Check to see if we need to install a parent theme
+               $theme_info = $this->theme_info();
+
+               if ( ! $theme_info->parent() )
+                       return $install_result;
+
+               $this->skin->feedback( 'parent_theme_search' );
+
+               if ( ! $theme_info->parent()->errors() ) {
+                       $this->skin->feedback( 'parent_theme_currently_installed', $theme_info->parent()->display('Name'), $theme_info->parent()->display('Version') );
+                       // We already have the theme, fall through.
+                       return $install_result;
+               }
+
+               // We don't have the parent theme, let's install it.
+               $api = themes_api('theme_information', array('slug' => $theme_info->get('Template'), 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth.
+
+               if ( ! $api || is_wp_error($api) ) {
+                       $this->skin->feedback( 'parent_theme_not_found', $theme_info->get('Template') );
+                       // Don't show activate or preview actions after install
+                       add_filter('install_theme_complete_actions', array($this, 'hide_activate_preview_actions') );
+                       return $install_result;
+               }
+
+               // Backup required data we're going to override:
+               $child_api = $this->skin->api;
+               $child_success_message = $this->strings['process_success'];
+
+               // Override them
+               $this->skin->api = $api;
+               $this->strings['process_success_specific'] = $this->strings['parent_theme_install_success'];//, $api->name, $api->version);
+
+               $this->skin->feedback('parent_theme_prepare_install', $api->name, $api->version);
+
+               add_filter('install_theme_complete_actions', '__return_false', 999); // Don't show any actions after installing the theme.
+
+               // Install the parent theme
+               $parent_result = $this->run( array(
+                       'package' => $api->download_link,
+                       'destination' => get_theme_root(),
+                       'clear_destination' => false, //Do not overwrite files.
+                       'clear_working' => true
+               ) );
+
+               if ( is_wp_error($parent_result) )
+                       add_filter('install_theme_complete_actions', array($this, 'hide_activate_preview_actions') );
+
+               // Start cleaning up after the parents installation
+               remove_filter('install_theme_complete_actions', '__return_false', 999);
+
+               // Reset child's result and data
+               $this->result = $child_result;
+               $this->skin->api = $child_api;
+               $this->strings['process_success'] = $child_success_message;
+
+               return $install_result;
+       }
+
+       /**
+        * Don't display the activate and preview actions to the user.
+        *
+        * Hooked to the {@see 'install_theme_complete_actions'} filter by
+        * Theme_Upgrader::check_parent_theme_filter() when installing
+        * a child theme and installing the parent theme fails.
+        *
+        * @since 3.4.0
+        * @access public
+        *
+        * @param array $actions Preview actions.
+        * @return array
+        */
+       public function hide_activate_preview_actions( $actions ) {
+               unset($actions['activate'], $actions['preview']);
+               return $actions;
+       }
+
+       /**
+        * Install a theme package.
+        *
+        * @since 2.8.0
+        * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional.
+        * @access public
+        *
+        * @param string $package The full local path or URI of the package.
+        * @param array  $args {
+        *     Optional. Other arguments for installing a theme package. Default empty array.
+        *
+        *     @type bool $clear_update_cache Whether to clear the updates cache if successful.
+        *                                    Default true.
+        * }
+        *
+        * @return bool|WP_Error True if the install was successful, false or a WP_Error object otherwise.
+        */
+       public function install( $package, $args = array() ) {
+
+               $defaults = array(
+                       'clear_update_cache' => true,
+               );
+               $parsed_args = wp_parse_args( $args, $defaults );
+
+               $this->init();
+               $this->install_strings();
+
+               add_filter('upgrader_source_selection', array($this, 'check_package') );
+               add_filter('upgrader_post_install', array($this, 'check_parent_theme_filter'), 10, 3);
+               // Clear cache so wp_update_themes() knows about the new theme.
+               add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 );
+
+               $this->run( array(
+                       'package' => $package,
+                       'destination' => get_theme_root(),
+                       'clear_destination' => false, //Do not overwrite files.
+                       'clear_working' => true,
+                       'hook_extra' => array(
+                               'type' => 'theme',
+                               'action' => 'install',
+                       ),
+               ) );
+
+               remove_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9 );
+               remove_filter('upgrader_source_selection', array($this, 'check_package') );
+               remove_filter('upgrader_post_install', array($this, 'check_parent_theme_filter'));
+
+               if ( ! $this->result || is_wp_error($this->result) )
+                       return $this->result;
+
+               // Refresh the Theme Update information
+               wp_clean_themes_cache( $parsed_args['clear_update_cache'] );
+
+               return true;
+       }
+
+       /**
+        * Upgrade a theme.
+        *
+        * @since 2.8.0
+        * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional.
+        * @access public
+        *
+        * @param string $theme The theme slug.
+        * @param array  $args {
+        *     Optional. Other arguments for upgrading a theme. Default empty array.
+        *
+        *     @type bool $clear_update_cache Whether to clear the update cache if successful.
+        *                                    Default true.
+        * }
+        * @return bool|WP_Error True if the upgrade was successful, false or a WP_Error object otherwise.
+        */
+       public function upgrade( $theme, $args = array() ) {
+
+               $defaults = array(
+                       'clear_update_cache' => true,
+               );
+               $parsed_args = wp_parse_args( $args, $defaults );
+
+               $this->init();
+               $this->upgrade_strings();
+
+               // Is an update available?
+               $current = get_site_transient( 'update_themes' );
+               if ( !isset( $current->response[ $theme ] ) ) {
+                       $this->skin->before();
+                       $this->skin->set_result(false);
+                       $this->skin->error( 'up_to_date' );
+                       $this->skin->after();
+                       return false;
+               }
+
+               $r = $current->response[ $theme ];
+
+               add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2);
+               add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2);
+               add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4);
+               // Clear cache so wp_update_themes() knows about the new theme.
+               add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 );
+
+               $this->run( array(
+                       'package' => $r['package'],
+                       'destination' => get_theme_root( $theme ),
+                       'clear_destination' => true,
+                       'clear_working' => true,
+                       'hook_extra' => array(
+                               'theme' => $theme,
+                               'type' => 'theme',
+                               'action' => 'update',
+                       ),
+               ) );
+
+               remove_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9 );
+               remove_filter('upgrader_pre_install', array($this, 'current_before'));
+               remove_filter('upgrader_post_install', array($this, 'current_after'));
+               remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme'));
+
+               if ( ! $this->result || is_wp_error($this->result) )
+                       return $this->result;
+
+               wp_clean_themes_cache( $parsed_args['clear_update_cache'] );
+
+               return true;
+       }
+
+       /**
+        * Upgrade several themes at once.
+        *
+        * @since 3.0.0
+        * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional.
+        * @access public
+        *
+        * @param array $themes The theme slugs.
+        * @param array $args {
+        *     Optional. Other arguments for upgrading several themes at once. Default empty array.
+        *
+        *     @type bool $clear_update_cache Whether to clear the update cache if successful.
+        *                                    Default true.
+        * }
+        * @return array[]|false An array of results, or false if unable to connect to the filesystem.
+        */
+       public function bulk_upgrade( $themes, $args = array() ) {
+
+               $defaults = array(
+                       'clear_update_cache' => true,
+               );
+               $parsed_args = wp_parse_args( $args, $defaults );
+
+               $this->init();
+               $this->bulk = true;
+               $this->upgrade_strings();
+
+               $current = get_site_transient( 'update_themes' );
+
+               add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2);
+               add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2);
+               add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4);
+               // Clear cache so wp_update_themes() knows about the new theme.
+               add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 );
+
+               $this->skin->header();
+
+               // Connect to the Filesystem first.
+               $res = $this->fs_connect( array(WP_CONTENT_DIR) );
+               if ( ! $res ) {
+                       $this->skin->footer();
+                       return false;
+               }
+
+               $this->skin->bulk_header();
+
+               // Only start maintenance mode if:
+               // - running Multisite and there are one or more themes specified, OR
+               // - a theme with an update available is currently in use.
+               // @TODO: For multisite, maintenance mode should only kick in for individual sites if at all possible.
+               $maintenance = ( is_multisite() && ! empty( $themes ) );
+               foreach ( $themes as $theme )
+                       $maintenance = $maintenance || $theme == get_stylesheet() || $theme == get_template();
+               if ( $maintenance )
+                       $this->maintenance_mode(true);
+
+               $results = array();
+
+               $this->update_count = count($themes);
+               $this->update_current = 0;
+               foreach ( $themes as $theme ) {
+                       $this->update_current++;
+
+                       $this->skin->theme_info = $this->theme_info($theme);
+
+                       if ( !isset( $current->response[ $theme ] ) ) {
+                               $this->skin->set_result(true);
+                               $this->skin->before();
+                               $this->skin->feedback( 'up_to_date' );
+                               $this->skin->after();
+                               $results[$theme] = true;
+                               continue;
+                       }
+
+                       // Get the URL to the zip file
+                       $r = $current->response[ $theme ];
+
+                       $result = $this->run( array(
+                               'package' => $r['package'],
+                               'destination' => get_theme_root( $theme ),
+                               'clear_destination' => true,
+                               'clear_working' => true,
+                               'is_multi' => true,
+                               'hook_extra' => array(
+                                       'theme' => $theme
+                               ),
+                       ) );
+
+                       $results[$theme] = $this->result;
+
+                       // Prevent credentials auth screen from displaying multiple times
+                       if ( false === $result )
+                               break;
+               } //end foreach $plugins
+
+               $this->maintenance_mode(false);
+
+               /** This action is documented in wp-admin/includes/class-wp-upgrader.php */
+               do_action( 'upgrader_process_complete', $this, array(
+                       'action' => 'update',
+                       'type' => 'theme',
+                       'bulk' => true,
+                       'themes' => $themes,
+               ) );
+
+               $this->skin->bulk_footer();
+
+               $this->skin->footer();
+
+               // Cleanup our hooks, in case something else does a upgrade on this connection.
+               remove_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9 );
+               remove_filter('upgrader_pre_install', array($this, 'current_before'));
+               remove_filter('upgrader_post_install', array($this, 'current_after'));
+               remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme'));
+
+               // Refresh the Theme Update information
+               wp_clean_themes_cache( $parsed_args['clear_update_cache'] );
+
+               return $results;
+       }
+
+       /**
+        * Check that the package source contains a valid theme.
+        *
+        * Hooked to the {@see 'upgrader_source_selection'} filter by Theme_Upgrader::install().
+        * It will return an error if the theme doesn't have style.css or index.php
+        * files.
+        *
+        * @since 3.3.0
+        * @access public
+        *
+        * @global WP_Filesystem_Base $wp_filesystem Subclass
+        *
+        * @param string $source The full path to the package source.
+        * @return string|WP_Error The source or a WP_Error.
+        */
+       public function check_package( $source ) {
+               global $wp_filesystem;
+
+               if ( is_wp_error($source) )
+                       return $source;
+
+               // Check the folder contains a valid theme
+               $working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit(WP_CONTENT_DIR), $source);
+               if ( ! is_dir($working_directory) ) // Sanity check, if the above fails, let's not prevent installation.
+                       return $source;
+
+               // A proper archive should have a style.css file in the single subdirectory
+               if ( ! file_exists( $working_directory . 'style.css' ) ) {
+                       return new WP_Error( 'incompatible_archive_theme_no_style', $this->strings['incompatible_archive'],
+                               /* translators: %s: style.css */
+                               sprintf( __( 'The theme is missing the %s stylesheet.' ),
+                                       '<code>style.css</code>'
+                               )
+                       );
+               }
+
+               $info = get_file_data( $working_directory . 'style.css', array( 'Name' => 'Theme Name', 'Template' => 'Template' ) );
+
+               if ( empty( $info['Name'] ) ) {
+                       return new WP_Error( 'incompatible_archive_theme_no_name', $this->strings['incompatible_archive'],
+                               /* translators: %s: style.css */
+                               sprintf( __( 'The %s stylesheet doesn&#8217;t contain a valid theme header.' ),
+                                       '<code>style.css</code>'
+                               )
+                       );
+               }
+
+               // If it's not a child theme, it must have at least an index.php to be legit.
+               if ( empty( $info['Template'] ) && ! file_exists( $working_directory . 'index.php' ) ) {
+                       return new WP_Error( 'incompatible_archive_theme_no_index', $this->strings['incompatible_archive'],
+                               /* translators: %s: index.php */
+                               sprintf( __( 'The theme is missing the %s file.' ),
+                                       '<code>index.php</code>'
+                               )
+                       );
+               }
+
+               return $source;
+       }
+
+       /**
+        * Turn on maintenance mode before attempting to upgrade the current theme.
+        *
+        * Hooked to the {@see 'upgrader_pre_install'} filter by Theme_Upgrader::upgrade() and
+        * Theme_Upgrader::bulk_upgrade().
+        *
+        * @since 2.8.0
+        * @access public
+        *
+        * @param bool|WP_Error  $return
+        * @param array          $theme
+        * @return bool|WP_Error
+        */
+       public function current_before($return, $theme) {
+               if ( is_wp_error($return) )
+                       return $return;
+
+               $theme = isset($theme['theme']) ? $theme['theme'] : '';
+
+               if ( $theme != get_stylesheet() ) //If not current
+                       return $return;
+               //Change to maintenance mode now.
+               if ( ! $this->bulk )
+                       $this->maintenance_mode(true);
+
+               return $return;
+       }
+
+       /**
+        * Turn off maintenance mode after upgrading the current theme.
+        *
+        * Hooked to the {@see 'upgrader_post_install'} filter by Theme_Upgrader::upgrade()
+        * and Theme_Upgrader::bulk_upgrade().
+        *
+        * @since 2.8.0
+        * @access public
+        *
+        * @param bool|WP_Error  $return
+        * @param array          $theme
+        * @return bool|WP_Error
+        */
+       public function current_after($return, $theme) {
+               if ( is_wp_error($return) )
+                       return $return;
+
+               $theme = isset($theme['theme']) ? $theme['theme'] : '';
+
+               if ( $theme != get_stylesheet() ) // If not current
+                       return $return;
+
+               // Ensure stylesheet name hasn't changed after the upgrade:
+               if ( $theme == get_stylesheet() && $theme != $this->result['destination_name'] ) {
+                       wp_clean_themes_cache();
+                       $stylesheet = $this->result['destination_name'];
+                       switch_theme( $stylesheet );
+               }
+
+               //Time to remove maintenance mode
+               if ( ! $this->bulk )
+                       $this->maintenance_mode(false);
+               return $return;
+       }
+
+       /**
+        * Delete the old theme during an upgrade.
+        *
+        * Hooked to the {@see 'upgrader_clear_destination'} filter by Theme_Upgrader::upgrade()
+        * and Theme_Upgrader::bulk_upgrade().
+        *
+        * @since 2.8.0
+        * @access public
+        *
+        * @global WP_Filesystem_Base $wp_filesystem Subclass
+        *
+        * @param bool   $removed
+        * @param string $local_destination
+        * @param string $remote_destination
+        * @param array  $theme
+        * @return bool
+        */
+       public function delete_old_theme( $removed, $local_destination, $remote_destination, $theme ) {
+               global $wp_filesystem;
+
+               if ( is_wp_error( $removed ) )
+                       return $removed; // Pass errors through.
+
+               if ( ! isset( $theme['theme'] ) )
+                       return $removed;
+
+               $theme = $theme['theme'];
+               $themes_dir = trailingslashit( $wp_filesystem->wp_themes_dir( $theme ) );
+               if ( $wp_filesystem->exists( $themes_dir . $theme ) ) {
+                       if ( ! $wp_filesystem->delete( $themes_dir . $theme, true ) )
+                               return false;
+               }
+
+               return true;
+       }
+
+       /**
+        * Get the WP_Theme object for a theme.
+        *
+        * @since 2.8.0
+        * @since 3.0.0 The `$theme` argument was added.
+        * @access public
+        *
+        * @param string $theme The directory name of the theme. This is optional, and if not supplied,
+        *                      the directory name from the last result will be used.
+        * @return WP_Theme|false The theme's info object, or false `$theme` is not supplied
+        *                        and the last result isn't set.
+        */
+       public function theme_info($theme = null) {
+
+               if ( empty($theme) ) {
+                       if ( !empty($this->result['destination_name']) )
+                               $theme = $this->result['destination_name'];
+                       else
+                               return false;
+               }
+               return wp_get_theme( $theme );
+       }
+
+}
index 7576de123fb76b433c6f19d15dd62d2fe4bddd0f..9a2f3ecb69788a81d4e10fe89ebf4991ef2e3ac0 100644 (file)
@@ -70,7 +70,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
                        '_wpnonce',
                );
 
-               $original_title = '';
+               $original_title = false;
                if ( 'taxonomy' == $item->type ) {
                        $original_title = get_term_field( 'name', $item->object_id, $item->object, 'raw' );
                        if ( is_wp_error( $original_title ) )
diff --git a/wp-admin/includes/class-wp-ajax-upgrader-skin.php b/wp-admin/includes/class-wp-ajax-upgrader-skin.php
new file mode 100644 (file)
index 0000000..8698e20
--- /dev/null
@@ -0,0 +1,132 @@
+<?php
+/**
+ * Upgrader API: WP_Ajax_Upgrader_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Upgrader Skin for Ajax WordPress upgrades.
+ *
+ * This skin is designed to be used for Ajax updates.
+ *
+ * @since 4.6.0
+ *
+ * @see Automatic_Upgrader_Skin
+ */
+class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin {
+
+       /**
+        * Holds the WP_Error object.
+        *
+        * @since 4.6.0
+        * @access protected
+        * @var null|WP_Error
+        */
+       protected $errors = null;
+
+       /**
+        * Constructor.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param array $args Options for the upgrader, see WP_Upgrader_Skin::__construct().
+        */
+       public function __construct( $args = array() ) {
+               parent::__construct( $args );
+
+               $this->errors = new WP_Error();
+       }
+
+       /**
+        * Retrieves the list of errors.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @return WP_Error Errors during an upgrade.
+        */
+       public function get_errors() {
+               return $this->errors;
+       }
+
+       /**
+        * Retrieves a string for error messages.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @return string Error messages during an upgrade.
+        */
+       public function get_error_messages() {
+               $messages = array();
+
+               foreach ( $this->errors->get_error_codes() as $error_code ) {
+                       if ( $this->errors->get_error_data( $error_code ) && is_string( $this->errors->get_error_data( $error_code ) ) ) {
+                               $messages[] = $this->errors->get_error_message( $error_code ) . ' ' . esc_html( strip_tags( $this->errors->get_error_data( $error_code ) ) );
+                       } else {
+                               $messages[] = $this->errors->get_error_message( $error_code );
+                       }
+               }
+
+               return implode( ', ', $messages );
+       }
+
+       /**
+        * Stores a log entry for an error.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string|WP_Error $errors Errors.
+        */
+       public function error( $errors ) {
+               if ( is_string( $errors ) ) {
+                       $string = $errors;
+                       if ( ! empty( $this->upgrader->strings[ $string ] ) ) {
+                               $string = $this->upgrader->strings[ $string ];
+                       }
+
+                       if ( false !== strpos( $string, '%' ) ) {
+                               $args = func_get_args();
+                               $args = array_splice( $args, 1 );
+                               if ( ! empty( $args ) ) {
+                                       $string = vsprintf( $string, $args );
+                               }
+                       }
+
+                       // Count existing errors to generate an unique error code.
+                       $errors_count = count( $errors->get_error_codes() );
+                       $this->errors->add( 'unknown_upgrade_error_' . $errors_count + 1 , $string );
+               } elseif ( is_wp_error( $errors ) ) {
+                       foreach ( $errors->get_error_codes() as $error_code ) {
+                               $this->errors->add( $error_code, $errors->get_error_message( $error_code ), $errors->get_error_data( $error_code ) );
+                       }
+               }
+
+               $args = func_get_args();
+               call_user_func_array( array( $this, 'parent::error' ), $args );
+       }
+
+       /**
+        * Stores a log entry.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string|array|WP_Error $data Log entry data.
+        */
+       public function feedback( $data ) {
+               if ( is_wp_error( $data ) ) {
+                       foreach ( $data->get_error_codes() as $error_code ) {
+                               $this->errors->add( $error_code, $data->get_error_message( $error_code ), $data->get_error_data( $error_code ) );
+                       }
+               }
+
+               $args = func_get_args();
+               call_user_func_array( array( $this, 'parent::feedback' ), $args );
+       }
+}
diff --git a/wp-admin/includes/class-wp-automatic-updater.php b/wp-admin/includes/class-wp-automatic-updater.php
new file mode 100644 (file)
index 0000000..1219939
--- /dev/null
@@ -0,0 +1,932 @@
+<?php
+/**
+ * Upgrade API: WP_Automatic_Updater class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Core class used for handling automatic background updates.
+ *
+ * @since 3.7.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php.
+ */
+class WP_Automatic_Updater {
+
+       /**
+        * Tracks update results during processing.
+        *
+        * @var array
+        * @access protected
+        */
+       protected $update_results = array();
+
+       /**
+        * Whether the entire automatic updater is disabled.
+        *
+        * @since 3.7.0
+        * @access public
+        */
+       public function is_disabled() {
+               // Background updates are disabled if you don't want file changes.
+               if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS )
+                       return true;
+
+               if ( wp_installing() )
+                       return true;
+
+               // More fine grained control can be done through the WP_AUTO_UPDATE_CORE constant and filters.
+               $disabled = defined( 'AUTOMATIC_UPDATER_DISABLED' ) && AUTOMATIC_UPDATER_DISABLED;
+
+               /**
+                * Filters whether to entirely disable background updates.
+                *
+                * There are more fine-grained filters and controls for selective disabling.
+                * This filter parallels the AUTOMATIC_UPDATER_DISABLED constant in name.
+                *
+                * This also disables update notification emails. That may change in the future.
+                *
+                * @since 3.7.0
+                *
+                * @param bool $disabled Whether the updater should be disabled.
+                */
+               return apply_filters( 'automatic_updater_disabled', $disabled );
+       }
+
+       /**
+        * Check for version control checkouts.
+        *
+        * Checks for Subversion, Git, Mercurial, and Bazaar. It recursively looks up the
+        * filesystem to the top of the drive, erring on the side of detecting a VCS
+        * checkout somewhere.
+        *
+        * ABSPATH is always checked in addition to whatever $context is (which may be the
+        * wp-content directory, for example). The underlying assumption is that if you are
+        * using version control *anywhere*, then you should be making decisions for
+        * how things get updated.
+        *
+        * @since 3.7.0
+        * @access public
+        *
+        * @param string $context The filesystem path to check, in addition to ABSPATH.
+        */
+       public function is_vcs_checkout( $context ) {
+               $context_dirs = array( untrailingslashit( $context ) );
+               if ( $context !== ABSPATH )
+                       $context_dirs[] = untrailingslashit( ABSPATH );
+
+               $vcs_dirs = array( '.svn', '.git', '.hg', '.bzr' );
+               $check_dirs = array();
+
+               foreach ( $context_dirs as $context_dir ) {
+                       // Walk up from $context_dir to the root.
+                       do {
+                               $check_dirs[] = $context_dir;
+
+                               // Once we've hit '/' or 'C:\', we need to stop. dirname will keep returning the input here.
+                               if ( $context_dir == dirname( $context_dir ) )
+                                       break;
+
+                       // Continue one level at a time.
+                       } while ( $context_dir = dirname( $context_dir ) );
+               }
+
+               $check_dirs = array_unique( $check_dirs );
+
+               // Search all directories we've found for evidence of version control.
+               foreach ( $vcs_dirs as $vcs_dir ) {
+                       foreach ( $check_dirs as $check_dir ) {
+                               if ( $checkout = @is_dir( rtrim( $check_dir, '\\/' ) . "/$vcs_dir" ) )
+                                       break 2;
+                       }
+               }
+
+               /**
+                * Filters whether the automatic updater should consider a filesystem
+                * location to be potentially managed by a version control system.
+                *
+                * @since 3.7.0
+                *
+                * @param bool $checkout  Whether a VCS checkout was discovered at $context
+                *                        or ABSPATH, or anywhere higher.
+                * @param string $context The filesystem context (a path) against which
+                *                        filesystem status should be checked.
+                */
+               return apply_filters( 'automatic_updates_is_vcs_checkout', $checkout, $context );
+       }
+
+       /**
+        * Tests to see if we can and should update a specific item.
+        *
+        * @since 3.7.0
+        * @access public
+        *
+        * @global wpdb $wpdb WordPress database abstraction object.
+        *
+        * @param string $type    The type of update being checked: 'core', 'theme',
+        *                        'plugin', 'translation'.
+        * @param object $item    The update offer.
+        * @param string $context The filesystem context (a path) against which filesystem
+        *                        access and status should be checked.
+        */
+       public function should_update( $type, $item, $context ) {
+               // Used to see if WP_Filesystem is set up to allow unattended updates.
+               $skin = new Automatic_Upgrader_Skin;
+
+               if ( $this->is_disabled() )
+                       return false;
+
+               // Only relax the filesystem checks when the update doesn't include new files
+               $allow_relaxed_file_ownership = false;
+               if ( 'core' == $type && isset( $item->new_files ) && ! $item->new_files ) {
+                       $allow_relaxed_file_ownership = true;
+               }
+
+               // If we can't do an auto core update, we may still be able to email the user.
+               if ( ! $skin->request_filesystem_credentials( false, $context, $allow_relaxed_file_ownership ) || $this->is_vcs_checkout( $context ) ) {
+                       if ( 'core' == $type )
+                               $this->send_core_update_notification_email( $item );
+                       return false;
+               }
+
+               // Next up, is this an item we can update?
+               if ( 'core' == $type )
+                       $update = Core_Upgrader::should_update_to_version( $item->current );
+               else
+                       $update = ! empty( $item->autoupdate );
+
+               /**
+                * Filters whether to automatically update core, a plugin, a theme, or a language.
+                *
+                * The dynamic portion of the hook name, `$type`, refers to the type of update
+                * being checked. Can be 'core', 'theme', 'plugin', or 'translation'.
+                *
+                * Generally speaking, plugins, themes, and major core versions are not updated
+                * by default, while translations and minor and development versions for core
+                * are updated by default.
+                *
+                * See the {@see 'allow_dev_auto_core_updates', {@see 'allow_minor_auto_core_updates'},
+                * and {@see 'allow_major_auto_core_updates'} filters for a more straightforward way to
+                * adjust core updates.
+                *
+                * @since 3.7.0
+                *
+                * @param bool   $update Whether to update.
+                * @param object $item   The update offer.
+                */
+               $update = apply_filters( 'auto_update_' . $type, $update, $item );
+
+               if ( ! $update ) {
+                       if ( 'core' == $type )
+                               $this->send_core_update_notification_email( $item );
+                       return false;
+               }
+
+               // If it's a core update, are we actually compatible with its requirements?
+               if ( 'core' == $type ) {
+                       global $wpdb;
+
+                       $php_compat = version_compare( phpversion(), $item->php_version, '>=' );
+                       if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
+                               $mysql_compat = true;
+                       else
+                               $mysql_compat = version_compare( $wpdb->db_version(), $item->mysql_version, '>=' );
+
+                       if ( ! $php_compat || ! $mysql_compat )
+                               return false;
+               }
+
+               return true;
+       }
+
+       /**
+        * Notifies an administrator of a core update.
+        *
+        * @since 3.7.0
+        * @access protected
+        *
+        * @param object $item The update offer.
+        */
+       protected function send_core_update_notification_email( $item ) {
+               $notified = get_site_option( 'auto_core_update_notified' );
+
+               // Don't notify if we've already notified the same email address of the same version.
+               if ( $notified && $notified['email'] == get_site_option( 'admin_email' ) && $notified['version'] == $item->current )
+                       return false;
+
+               // See if we need to notify users of a core update.
+               $notify = ! empty( $item->notify_email );
+
+               /**
+                * Filters whether to notify the site administrator of a new core update.
+                *
+                * By default, administrators are notified when the update offer received
+                * from WordPress.org sets a particular flag. This allows some discretion
+                * in if and when to notify.
+                *
+                * This filter is only evaluated once per release. If the same email address
+                * was already notified of the same new version, WordPress won't repeatedly
+                * email the administrator.
+                *
+                * This filter is also used on about.php to check if a plugin has disabled
+                * these notifications.
+                *
+                * @since 3.7.0
+                *
+                * @param bool   $notify Whether the site administrator is notified.
+                * @param object $item   The update offer.
+                */
+               if ( ! apply_filters( 'send_core_update_notification_email', $notify, $item ) )
+                       return false;
+
+               $this->send_email( 'manual', $item );
+               return true;
+       }
+
+       /**
+        * Update an item, if appropriate.
+        *
+        * @since 3.7.0
+        * @access public
+        *
+        * @param string $type The type of update being checked: 'core', 'theme', 'plugin', 'translation'.
+        * @param object $item The update offer.
+        *
+        * @return null|WP_Error
+        */
+       public function update( $type, $item ) {
+               $skin = new Automatic_Upgrader_Skin;
+
+               switch ( $type ) {
+                       case 'core':
+                               // The Core upgrader doesn't use the Upgrader's skin during the actual main part of the upgrade, instead, firing a filter.
+                               add_filter( 'update_feedback', array( $skin, 'feedback' ) );
+                               $upgrader = new Core_Upgrader( $skin );
+                               $context  = ABSPATH;
+                               break;
+                       case 'plugin':
+                               $upgrader = new Plugin_Upgrader( $skin );
+                               $context  = WP_PLUGIN_DIR; // We don't support custom Plugin directories, or updates for WPMU_PLUGIN_DIR
+                               break;
+                       case 'theme':
+                               $upgrader = new Theme_Upgrader( $skin );
+                               $context  = get_theme_root( $item->theme );
+                               break;
+                       case 'translation':
+                               $upgrader = new Language_Pack_Upgrader( $skin );
+                               $context  = WP_CONTENT_DIR; // WP_LANG_DIR;
+                               break;
+               }
+
+               // Determine whether we can and should perform this update.
+               if ( ! $this->should_update( $type, $item, $context ) )
+                       return false;
+
+               /**
+                * Fires immediately prior to an auto-update.
+                *
+                * @since 4.4.0
+                *
+                * @param string $type    The type of update being checked: 'core', 'theme', 'plugin', or 'translation'.
+                * @param object $item    The update offer.
+                * @param string $context The filesystem context (a path) against which filesystem access and status
+                *                        should be checked.
+                */
+               do_action( 'pre_auto_update', $type, $item, $context );
+
+               $upgrader_item = $item;
+               switch ( $type ) {
+                       case 'core':
+                               $skin->feedback( __( 'Updating to WordPress %s' ), $item->version );
+                               $item_name = sprintf( __( 'WordPress %s' ), $item->version );
+                               break;
+                       case 'theme':
+                               $upgrader_item = $item->theme;
+                               $theme = wp_get_theme( $upgrader_item );
+                               $item_name = $theme->Get( 'Name' );
+                               $skin->feedback( __( 'Updating theme: %s' ), $item_name );
+                               break;
+                       case 'plugin':
+                               $upgrader_item = $item->plugin;
+                               $plugin_data = get_plugin_data( $context . '/' . $upgrader_item );
+                               $item_name = $plugin_data['Name'];
+                               $skin->feedback( __( 'Updating plugin: %s' ), $item_name );
+                               break;
+                       case 'translation':
+                               $language_item_name = $upgrader->get_name_for_update( $item );
+                               $item_name = sprintf( __( 'Translations for %s' ), $language_item_name );
+                               $skin->feedback( sprintf( __( 'Updating translations for %1$s (%2$s)&#8230;' ), $language_item_name, $item->language ) );
+                               break;
+               }
+
+               $allow_relaxed_file_ownership = false;
+               if ( 'core' == $type && isset( $item->new_files ) && ! $item->new_files ) {
+                       $allow_relaxed_file_ownership = true;
+               }
+
+               // Boom, This sites about to get a whole new splash of paint!
+               $upgrade_result = $upgrader->upgrade( $upgrader_item, array(
+                       'clear_update_cache' => false,
+                       // Always use partial builds if possible for core updates.
+                       'pre_check_md5'      => false,
+                       // Only available for core updates.
+                       'attempt_rollback'   => true,
+                       // Allow relaxed file ownership in some scenarios
+                       'allow_relaxed_file_ownership' => $allow_relaxed_file_ownership,
+               ) );
+
+               // If the filesystem is unavailable, false is returned.
+               if ( false === $upgrade_result ) {
+                       $upgrade_result = new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) );
+               }
+
+               if ( 'core' == $type ) {
+                       if ( is_wp_error( $upgrade_result ) && ( 'up_to_date' == $upgrade_result->get_error_code() || 'locked' == $upgrade_result->get_error_code() ) ) {
+                               // These aren't actual errors, treat it as a skipped-update instead to avoid triggering the post-core update failure routines.
+                               return false;
+                       }
+
+                       // Core doesn't output this, so let's append it so we don't get confused.
+                       if ( is_wp_error( $upgrade_result ) ) {
+                               $skin->error( __( 'Installation Failed' ), $upgrade_result );
+                       } else {
+                               $skin->feedback( __( 'WordPress updated successfully' ) );
+                       }
+               }
+
+               $this->update_results[ $type ][] = (object) array(
+                       'item'     => $item,
+                       'result'   => $upgrade_result,
+                       'name'     => $item_name,
+                       'messages' => $skin->get_upgrade_messages()
+               );
+
+               return $upgrade_result;
+       }
+
+       /**
+        * Kicks off the background update process, looping through all pending updates.
+        *
+        * @since 3.7.0
+        * @access public
+        *
+        * @global wpdb   $wpdb
+        * @global string $wp_version
+        */
+       public function run() {
+               global $wpdb, $wp_version;
+
+               if ( $this->is_disabled() )
+                       return;
+
+               if ( ! is_main_network() || ! is_main_site() )
+                       return;
+
+               if ( ! WP_Upgrader::create_lock( 'auto_updater' ) )
+                       return;
+
+               // Don't automatically run these thins, as we'll handle it ourselves
+               remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
+               remove_action( 'upgrader_process_complete', 'wp_version_check' );
+               remove_action( 'upgrader_process_complete', 'wp_update_plugins' );
+               remove_action( 'upgrader_process_complete', 'wp_update_themes' );
+
+               // Next, Plugins
+               wp_update_plugins(); // Check for Plugin updates
+               $plugin_updates = get_site_transient( 'update_plugins' );
+               if ( $plugin_updates && !empty( $plugin_updates->response ) ) {
+                       foreach ( $plugin_updates->response as $plugin ) {
+                               $this->update( 'plugin', $plugin );
+                       }
+                       // Force refresh of plugin update information
+                       wp_clean_plugins_cache();
+               }
+
+               // Next, those themes we all love
+               wp_update_themes();  // Check for Theme updates
+               $theme_updates = get_site_transient( 'update_themes' );
+               if ( $theme_updates && !empty( $theme_updates->response ) ) {
+                       foreach ( $theme_updates->response as $theme ) {
+                               $this->update( 'theme', (object) $theme );
+                       }
+                       // Force refresh of theme update information
+                       wp_clean_themes_cache();
+               }
+
+               // Next, Process any core update
+               wp_version_check(); // Check for Core updates
+               $core_update = find_core_auto_update();
+
+               if ( $core_update )
+                       $this->update( 'core', $core_update );
+
+               // Clean up, and check for any pending translations
+               // (Core_Upgrader checks for core updates)
+               $theme_stats = array();
+               if ( isset( $this->update_results['theme'] ) ) {
+                       foreach ( $this->update_results['theme'] as $upgrade ) {
+                               $theme_stats[ $upgrade->item->theme ] = ( true === $upgrade->result );
+                       }
+               }
+               wp_update_themes( $theme_stats );  // Check for Theme updates
+
+               $plugin_stats = array();
+               if ( isset( $this->update_results['plugin'] ) ) {
+                       foreach ( $this->update_results['plugin'] as $upgrade ) {
+                               $plugin_stats[ $upgrade->item->plugin ] = ( true === $upgrade->result );
+                       }
+               }
+               wp_update_plugins( $plugin_stats ); // Check for Plugin updates
+
+               // Finally, Process any new translations
+               $language_updates = wp_get_translation_updates();
+               if ( $language_updates ) {
+                       foreach ( $language_updates as $update ) {
+                               $this->update( 'translation', $update );
+                       }
+
+                       // Clear existing caches
+                       wp_clean_update_cache();
+
+                       wp_version_check();  // check for Core updates
+                       wp_update_themes();  // Check for Theme updates
+                       wp_update_plugins(); // Check for Plugin updates
+               }
+
+               // Send debugging email to all development installs.
+               if ( ! empty( $this->update_results ) ) {
+                       $development_version = false !== strpos( $wp_version, '-' );
+
+                       /**
+                        * Filters whether to send a debugging email for each automatic background update.
+                        *
+                        * @since 3.7.0
+                        *
+                        * @param bool $development_version By default, emails are sent if the
+                        *                                  install is a development version.
+                        *                                  Return false to avoid the email.
+                        */
+                       if ( apply_filters( 'automatic_updates_send_debug_email', $development_version ) )
+                               $this->send_debug_email();
+
+                       if ( ! empty( $this->update_results['core'] ) )
+                               $this->after_core_update( $this->update_results['core'][0] );
+
+                       /**
+                        * Fires after all automatic updates have run.
+                        *
+                        * @since 3.8.0
+                        *
+                        * @param array $update_results The results of all attempted updates.
+                        */
+                       do_action( 'automatic_updates_complete', $this->update_results );
+               }
+
+               WP_Upgrader::release_lock( 'auto_updater' );
+       }
+
+       /**
+        * If we tried to perform a core update, check if we should send an email,
+        * and if we need to avoid processing future updates.
+        *
+        * @since Unknown
+        * @access protected
+        *
+        * @global string $wp_version
+        *
+        * @param object $update_result The result of the core update. Includes the update offer and result.
+        */
+       protected function after_core_update( $update_result ) {
+               global $wp_version;
+
+               $core_update = $update_result->item;
+               $result      = $update_result->result;
+
+               if ( ! is_wp_error( $result ) ) {
+                       $this->send_email( 'success', $core_update );
+                       return;
+               }
+
+               $error_code = $result->get_error_code();
+
+               // Any of these WP_Error codes are critical failures, as in they occurred after we started to copy core files.
+               // We should not try to perform a background update again until there is a successful one-click update performed by the user.
+               $critical = false;
+               if ( $error_code === 'disk_full' || false !== strpos( $error_code, '__copy_dir' ) ) {
+                       $critical = true;
+               } elseif ( $error_code === 'rollback_was_required' && is_wp_error( $result->get_error_data()->rollback ) ) {
+                       // A rollback is only critical if it failed too.
+                       $critical = true;
+                       $rollback_result = $result->get_error_data()->rollback;
+               } elseif ( false !== strpos( $error_code, 'do_rollback' ) ) {
+                       $critical = true;
+               }
+
+               if ( $critical ) {
+                       $critical_data = array(
+                               'attempted'  => $core_update->current,
+                               'current'    => $wp_version,
+                               'error_code' => $error_code,
+                               'error_data' => $result->get_error_data(),
+                               'timestamp'  => time(),
+                               'critical'   => true,
+                       );
+                       if ( isset( $rollback_result ) ) {
+                               $critical_data['rollback_code'] = $rollback_result->get_error_code();
+                               $critical_data['rollback_data'] = $rollback_result->get_error_data();
+                       }
+                       update_site_option( 'auto_core_update_failed', $critical_data );
+                       $this->send_email( 'critical', $core_update, $result );
+                       return;
+               }
+
+               /*
+                * Any other WP_Error code (like download_failed or files_not_writable) occurs before
+                * we tried to copy over core files. Thus, the failures are early and graceful.
+                *
+                * We should avoid trying to perform a background update again for the same version.
+                * But we can try again if another version is released.
+                *
+                * For certain 'transient' failures, like download_failed, we should allow retries.
+                * In fact, let's schedule a special update for an hour from now. (It's possible
+                * the issue could actually be on WordPress.org's side.) If that one fails, then email.
+                */
+               $send = true;
+               $transient_failures = array( 'incompatible_archive', 'download_failed', 'insane_distro', 'locked' );
+               if ( in_array( $error_code, $transient_failures ) && ! get_site_option( 'auto_core_update_failed' ) ) {
+                       wp_schedule_single_event( time() + HOUR_IN_SECONDS, 'wp_maybe_auto_update' );
+                       $send = false;
+               }
+
+               $n = get_site_option( 'auto_core_update_notified' );
+               // Don't notify if we've already notified the same email address of the same version of the same notification type.
+               if ( $n && 'fail' == $n['type'] && $n['email'] == get_site_option( 'admin_email' ) && $n['version'] == $core_update->current )
+                       $send = false;
+
+               update_site_option( 'auto_core_update_failed', array(
+                       'attempted'  => $core_update->current,
+                       'current'    => $wp_version,
+                       'error_code' => $error_code,
+                       'error_data' => $result->get_error_data(),
+                       'timestamp'  => time(),
+                       'retry'      => in_array( $error_code, $transient_failures ),
+               ) );
+
+               if ( $send )
+                       $this->send_email( 'fail', $core_update, $result );
+       }
+
+       /**
+        * Sends an email upon the completion or failure of a background core update.
+        *
+        * @since 3.7.0
+        * @access protected
+        *
+        * @global string $wp_version
+        *
+        * @param string $type        The type of email to send. Can be one of 'success', 'fail', 'manual', 'critical'.
+        * @param object $core_update The update offer that was attempted.
+        * @param mixed  $result      Optional. The result for the core update. Can be WP_Error.
+        */
+       protected function send_email( $type, $core_update, $result = null ) {
+               update_site_option( 'auto_core_update_notified', array(
+                       'type'      => $type,
+                       'email'     => get_site_option( 'admin_email' ),
+                       'version'   => $core_update->current,
+                       'timestamp' => time(),
+               ) );
+
+               $next_user_core_update = get_preferred_from_update_core();
+               // If the update transient is empty, use the update we just performed
+               if ( ! $next_user_core_update )
+                       $next_user_core_update = $core_update;
+               $newer_version_available = ( 'upgrade' == $next_user_core_update->response && version_compare( $next_user_core_update->version, $core_update->version, '>' ) );
+
+               /**
+                * Filters whether to send an email following an automatic background core update.
+                *
+                * @since 3.7.0
+                *
+                * @param bool   $send        Whether to send the email. Default true.
+                * @param string $type        The type of email to send. Can be one of
+                *                            'success', 'fail', 'critical'.
+                * @param object $core_update The update offer that was attempted.
+                * @param mixed  $result      The result for the core update. Can be WP_Error.
+                */
+               if ( 'manual' !== $type && ! apply_filters( 'auto_core_update_send_email', true, $type, $core_update, $result ) )
+                       return;
+
+               switch ( $type ) {
+                       case 'success' : // We updated.
+                               /* translators: 1: Site name, 2: WordPress version number. */
+                               $subject = __( '[%1$s] Your site has updated to WordPress %2$s' );
+                               break;
+
+                       case 'fail' :   // We tried to update but couldn't.
+                       case 'manual' : // We can't update (and made no attempt).
+                               /* translators: 1: Site name, 2: WordPress version number. */
+                               $subject = __( '[%1$s] WordPress %2$s is available. Please update!' );
+                               break;
+
+                       case 'critical' : // We tried to update, started to copy files, then things went wrong.
+                               /* translators: 1: Site name. */
+                               $subject = __( '[%1$s] URGENT: Your site may be down due to a failed update' );
+                               break;
+
+                       default :
+                               return;
+               }
+
+               // If the auto update is not to the latest version, say that the current version of WP is available instead.
+               $version = 'success' === $type ? $core_update->current : $next_user_core_update->current;
+               $subject = sprintf( $subject, wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ), $version );
+
+               $body = '';
+
+               switch ( $type ) {
+                       case 'success' :
+                               $body .= sprintf( __( 'Howdy! Your site at %1$s has been updated automatically to WordPress %2$s.' ), home_url(), $core_update->current );
+                               $body .= "\n\n";
+                               if ( ! $newer_version_available )
+                                       $body .= __( 'No further action is needed on your part.' ) . ' ';
+
+                               // Can only reference the About screen if their update was successful.
+                               list( $about_version ) = explode( '-', $core_update->current, 2 );
+                               $body .= sprintf( __( "For more on version %s, see the About WordPress screen:" ), $about_version );
+                               $body .= "\n" . admin_url( 'about.php' );
+
+                               if ( $newer_version_available ) {
+                                       $body .= "\n\n" . sprintf( __( 'WordPress %s is also now available.' ), $next_user_core_update->current ) . ' ';
+                                       $body .= __( 'Updating is easy and only takes a few moments:' );
+                                       $body .= "\n" . network_admin_url( 'update-core.php' );
+                               }
+
+                               break;
+
+                       case 'fail' :
+                       case 'manual' :
+                               $body .= sprintf( __( 'Please update your site at %1$s to WordPress %2$s.' ), home_url(), $next_user_core_update->current );
+
+                               $body .= "\n\n";
+
+                               // Don't show this message if there is a newer version available.
+                               // Potential for confusion, and also not useful for them to know at this point.
+                               if ( 'fail' == $type && ! $newer_version_available )
+                                       $body .= __( 'We tried but were unable to update your site automatically.' ) . ' ';
+
+                               $body .= __( 'Updating is easy and only takes a few moments:' );
+                               $body .= "\n" . network_admin_url( 'update-core.php' );
+                               break;
+
+                       case 'critical' :
+                               if ( $newer_version_available )
+                                       $body .= sprintf( __( 'Your site at %1$s experienced a critical failure while trying to update WordPress to version %2$s.' ), home_url(), $core_update->current );
+                               else
+                                       $body .= sprintf( __( 'Your site at %1$s experienced a critical failure while trying to update to the latest version of WordPress, %2$s.' ), home_url(), $core_update->current );
+
+                               $body .= "\n\n" . __( "This means your site may be offline or broken. Don't panic; this can be fixed." );
+
+                               $body .= "\n\n" . __( "Please check out your site now. It's possible that everything is working. If it says you need to update, you should do so:" );
+                               $body .= "\n" . network_admin_url( 'update-core.php' );
+                               break;
+               }
+
+               $critical_support = 'critical' === $type && ! empty( $core_update->support_email );
+               if ( $critical_support ) {
+                       // Support offer if available.
+                       $body .= "\n\n" . sprintf( __( "The WordPress team is willing to help you. Forward this email to %s and the team will work with you to make sure your site is working." ), $core_update->support_email );
+               } else {
+                       // Add a note about the support forums.
+                       $body .= "\n\n" . __( 'If you experience any issues or need support, the volunteers in the WordPress.org support forums may be able to help.' );
+                       $body .= "\n" . __( 'https://wordpress.org/support/' );
+               }
+
+               // Updates are important!
+               if ( $type != 'success' || $newer_version_available ) {
+                       $body .= "\n\n" . __( 'Keeping your site updated is important for security. It also makes the internet a safer place for you and your readers.' );
+               }
+
+               if ( $critical_support ) {
+                       $body .= " " . __( "If you reach out to us, we'll also ensure you'll never have this problem again." );
+               }
+
+               // If things are successful and we're now on the latest, mention plugins and themes if any are out of date.
+               if ( $type == 'success' && ! $newer_version_available && ( get_plugin_updates() || get_theme_updates() ) ) {
+                       $body .= "\n\n" . __( 'You also have some plugins or themes with updates available. Update them now:' );
+                       $body .= "\n" . network_admin_url();
+               }
+
+               $body .= "\n\n" . __( 'The WordPress Team' ) . "\n";
+
+               if ( 'critical' == $type && is_wp_error( $result ) ) {
+                       $body .= "\n***\n\n";
+                       $body .= sprintf( __( 'Your site was running version %s.' ), $GLOBALS['wp_version'] );
+                       $body .= ' ' . __( 'We have some data that describes the error your site encountered.' );
+                       $body .= ' ' . __( 'Your hosting company, support forum volunteers, or a friendly developer may be able to use this information to help you:' );
+
+                       // If we had a rollback and we're still critical, then the rollback failed too.
+                       // Loop through all errors (the main WP_Error, the update result, the rollback result) for code, data, etc.
+                       if ( 'rollback_was_required' == $result->get_error_code() )
+                               $errors = array( $result, $result->get_error_data()->update, $result->get_error_data()->rollback );
+                       else
+                               $errors = array( $result );
+
+                       foreach ( $errors as $error ) {
+                               if ( ! is_wp_error( $error ) )
+                                       continue;
+                               $error_code = $error->get_error_code();
+                               $body .= "\n\n" . sprintf( __( "Error code: %s" ), $error_code );
+                               if ( 'rollback_was_required' == $error_code )
+                                       continue;
+                               if ( $error->get_error_message() )
+                                       $body .= "\n" . $error->get_error_message();
+                               $error_data = $error->get_error_data();
+                               if ( $error_data )
+                                       $body .= "\n" . implode( ', ', (array) $error_data );
+                       }
+                       $body .= "\n";
+               }
+
+               $to  = get_site_option( 'admin_email' );
+               $headers = '';
+
+               $email = compact( 'to', 'subject', 'body', 'headers' );
+
+               /**
+                * Filters the email sent following an automatic background core update.
+                *
+                * @since 3.7.0
+                *
+                * @param array $email {
+                *     Array of email arguments that will be passed to wp_mail().
+                *
+                *     @type string $to      The email recipient. An array of emails
+                *                            can be returned, as handled by wp_mail().
+                *     @type string $subject The email's subject.
+                *     @type string $body    The email message body.
+                *     @type string $headers Any email headers, defaults to no headers.
+                * }
+                * @param string $type        The type of email being sent. Can be one of
+                *                            'success', 'fail', 'manual', 'critical'.
+                * @param object $core_update The update offer that was attempted.
+                * @param mixed  $result      The result for the core update. Can be WP_Error.
+                */
+               $email = apply_filters( 'auto_core_update_email', $email, $type, $core_update, $result );
+
+               wp_mail( $email['to'], wp_specialchars_decode( $email['subject'] ), $email['body'], $email['headers'] );
+       }
+
+       /**
+        * Prepares and sends an email of a full log of background update results, useful for debugging and geekery.
+        *
+        * @since 3.7.0
+        * @access protected
+        */
+       protected function send_debug_email() {
+               $update_count = 0;
+               foreach ( $this->update_results as $type => $updates )
+                       $update_count += count( $updates );
+
+               $body = array();
+               $failures = 0;
+
+               $body[] = sprintf( __( 'WordPress site: %s' ), network_home_url( '/' ) );
+
+               // Core
+               if ( isset( $this->update_results['core'] ) ) {
+                       $result = $this->update_results['core'][0];
+                       if ( $result->result && ! is_wp_error( $result->result ) ) {
+                               $body[] = sprintf( __( 'SUCCESS: WordPress was successfully updated to %s' ), $result->name );
+                       } else {
+                               $body[] = sprintf( __( 'FAILED: WordPress failed to update to %s' ), $result->name );
+                               $failures++;
+                       }
+                       $body[] = '';
+               }
+
+               // Plugins, Themes, Translations
+               foreach ( array( 'plugin', 'theme', 'translation' ) as $type ) {
+                       if ( ! isset( $this->update_results[ $type ] ) )
+                               continue;
+                       $success_items = wp_list_filter( $this->update_results[ $type ], array( 'result' => true ) );
+                       if ( $success_items ) {
+                               $messages = array(
+                                       'plugin'      => __( 'The following plugins were successfully updated:' ),
+                                       'theme'       => __( 'The following themes were successfully updated:' ),
+                                       'translation' => __( 'The following translations were successfully updated:' ),
+                               );
+
+                               $body[] = $messages[ $type ];
+                               foreach ( wp_list_pluck( $success_items, 'name' ) as $name ) {
+                                       $body[] = ' * ' . sprintf( __( 'SUCCESS: %s' ), $name );
+                               }
+                       }
+                       if ( $success_items != $this->update_results[ $type ] ) {
+                               // Failed updates
+                               $messages = array(
+                                       'plugin'      => __( 'The following plugins failed to update:' ),
+                                       'theme'       => __( 'The following themes failed to update:' ),
+                                       'translation' => __( 'The following translations failed to update:' ),
+                               );
+
+                               $body[] = $messages[ $type ];
+                               foreach ( $this->update_results[ $type ] as $item ) {
+                                       if ( ! $item->result || is_wp_error( $item->result ) ) {
+                                               $body[] = ' * ' . sprintf( __( 'FAILED: %s' ), $item->name );
+                                               $failures++;
+                                       }
+                               }
+                       }
+                       $body[] = '';
+               }
+
+               $site_title = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );
+               if ( $failures ) {
+                       $body[] = trim( __(
+"BETA TESTING?
+=============
+
+This debugging email is sent when you are using a development version of WordPress.
+
+If you think these failures might be due to a bug in WordPress, could you report it?
+ * Open a thread in the support forums: https://wordpress.org/support/forum/alphabeta
+ * Or, if you're comfortable writing a bug report: https://core.trac.wordpress.org/
+
+Thanks! -- The WordPress Team" ) );
+                       $body[] = '';
+
+                       $subject = sprintf( __( '[%s] There were failures during background updates' ), $site_title );
+               } else {
+                       $subject = sprintf( __( '[%s] Background updates have finished' ), $site_title );
+               }
+
+               $body[] = trim( __(
+'UPDATE LOG
+==========' ) );
+               $body[] = '';
+
+               foreach ( array( 'core', 'plugin', 'theme', 'translation' ) as $type ) {
+                       if ( ! isset( $this->update_results[ $type ] ) )
+                               continue;
+                       foreach ( $this->update_results[ $type ] as $update ) {
+                               $body[] = $update->name;
+                               $body[] = str_repeat( '-', strlen( $update->name ) );
+                               foreach ( $update->messages as $message )
+                                       $body[] = "  " . html_entity_decode( str_replace( '&#8230;', '...', $message ) );
+                               if ( is_wp_error( $update->result ) ) {
+                                       $results = array( 'update' => $update->result );
+                                       // If we rolled back, we want to know an error that occurred then too.
+                                       if ( 'rollback_was_required' === $update->result->get_error_code() )
+                                               $results = (array) $update->result->get_error_data();
+                                       foreach ( $results as $result_type => $result ) {
+                                               if ( ! is_wp_error( $result ) )
+                                                       continue;
+
+                                               if ( 'rollback' === $result_type ) {
+                                                       /* translators: 1: Error code, 2: Error message. */
+                                                       $body[] = '  ' . sprintf( __( 'Rollback Error: [%1$s] %2$s' ), $result->get_error_code(), $result->get_error_message() );
+                                               } else {
+                                                       /* translators: 1: Error code, 2: Error message. */
+                                                       $body[] = '  ' . sprintf( __( 'Error: [%1$s] %2$s' ), $result->get_error_code(), $result->get_error_message() );
+                                               }
+
+                                               if ( $result->get_error_data() )
+                                                       $body[] = '         ' . implode( ', ', (array) $result->get_error_data() );
+                                       }
+                               }
+                               $body[] = '';
+                       }
+               }
+
+               $email = array(
+                       'to'      => get_site_option( 'admin_email' ),
+                       'subject' => $subject,
+                       'body'    => implode( "\n", $body ),
+                       'headers' => ''
+               );
+
+               /**
+                * Filters the debug email that can be sent following an automatic
+                * background core update.
+                *
+                * @since 3.8.0
+                *
+                * @param array $email {
+                *     Array of email arguments that will be passed to wp_mail().
+                *
+                *     @type string $to      The email recipient. An array of emails
+                *                           can be returned, as handled by wp_mail().
+                *     @type string $subject Email subject.
+                *     @type string $body    Email message body.
+                *     @type string $headers Any email headers. Default empty.
+                * }
+                * @param int   $failures The number of failures encountered while upgrading.
+                * @param mixed $results  The results of all attempted updates.
+                */
+               $email = apply_filters( 'automatic_updates_debug_email', $email, $failures, $this->update_results );
+
+               wp_mail( $email['to'], wp_specialchars_decode( $email['subject'] ), $email['body'], $email['headers'] );
+       }
+}
index a5f96939d510d9cc0e263196125ad66c59520a2a..116a55e06f721e459a16967938c7c01db972ee6d 100644 (file)
@@ -166,7 +166,7 @@ class WP_Comments_List_Table extends WP_List_Table {
        public function get_per_page( $comment_status = 'all' ) {
                $comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' );
                /**
-                * Filter the number of comments listed per page in the comments list table.
+                * Filters the number of comments listed per page in the comments list table.
                 *
                 * @since 2.6.0
                 *
@@ -201,8 +201,7 @@ class WP_Comments_List_Table extends WP_List_Table {
 
                $status_links = array();
                $num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments();
-               //, number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"),
-               //, number_format_i18n($num_comments->spam) ), "<span class='spam-comment-count'>" . number_format_i18n($num_comments->spam) . "</span>")
+
                $stati = array(
                        /* translators: %s: all comments count */
                        'all' => _nx_noop(
@@ -270,7 +269,7 @@ class WP_Comments_List_Table extends WP_List_Table {
                }
 
                /**
-                * Filter the comment status links.
+                * Filters the comment status links.
                 *
                 * @since 2.5.0
                 *
@@ -330,7 +329,7 @@ class WP_Comments_List_Table extends WP_List_Table {
                                <option value=""><?php _e( 'All comment types' ); ?></option>
 <?php
                                /**
-                                * Filter the comment types dropdown menu.
+                                * Filters the comment types dropdown menu.
                                 *
                                 * @since 2.7.0
                                 *
@@ -718,7 +717,7 @@ class WP_Comments_List_Table extends WP_List_Table {
        public function column_date( $comment ) {
                /* translators: 1: comment date, 2: comment time */
                $submitted = sprintf( __( '%1$s at %2$s' ),
-                       /* translators: comment date format. See http://php.net/date */
+                       /* translators: comment date format. See https://secure.php.net/date */
                        get_comment_date( __( 'Y/m/d' ), $comment ),
                        get_comment_date( __( 'g:i a' ), $comment )
                );
index 5c45c974bf54f64d004607706677f8bd5e672320..87cf3f559be7107519c94a61ff4519ec41dcbc43 100644 (file)
@@ -41,6 +41,7 @@ class WP_Filesystem_Base {
 
        /**
         * @access public
+        * @var WP_Error
         */
        public $errors = null;
 
@@ -138,7 +139,7 @@ class WP_Filesystem_Base {
         * @return string The location of the remote path.
         */
        public function find_base_dir( $base = '.', $echo = false ) {
-               _deprecated_function(__FUNCTION__, '2.7', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' );
+               _deprecated_function(__FUNCTION__, '2.7.0', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' );
                $this->verbose = $echo;
                return $this->abspath();
        }
@@ -160,7 +161,7 @@ class WP_Filesystem_Base {
         * @return string The location of the remote path.
         */
        public function get_base_dir( $base = '.', $echo = false ) {
-               _deprecated_function(__FUNCTION__, '2.7', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' );
+               _deprecated_function(__FUNCTION__, '2.7.0', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' );
                $this->verbose = $echo;
                return $this->abspath();
        }
@@ -316,7 +317,7 @@ class WP_Filesystem_Base {
         *
         * From the PHP documentation page for fileperms().
         *
-        * @link http://docs.php.net/fileperms
+        * @link https://secure.php.net/manual/en/function.fileperms.php
         *
         * @access public
         * @since 2.5.0
@@ -384,7 +385,7 @@ class WP_Filesystem_Base {
         * Converts '-rw-r--r--' to 0644
         * From "info at rvgate dot nl"'s comment on the PHP documentation for chmod()
         *
-        * @link http://docs.php.net/manual/en/function.chmod.php#49614
+        * @link https://secure.php.net/manual/en/function.chmod.php#49614
         *
         * @access public
         * @since 2.5.0
index e1202aedd29c9143a5998c52e119c11fddea0263..f337c733c835bd7fd717d69a817b1b4705c1df3b 100644 (file)
@@ -120,13 +120,13 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
                        unlink( $tempfile );
                        return false;
                }
-               
+
                if ( ! @ftp_fget( $this->link, $temp, $file, FTP_BINARY ) ) {
                        fclose( $temp );
                        unlink( $tempfile );
                        return false;
                }
-               
+
                fseek( $temp, 0 ); // Skip back to the start of the file being written to
                $contents = '';
 
@@ -159,8 +159,11 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
        public function put_contents($file, $contents, $mode = false ) {
                $tempfile = wp_tempnam($file);
                $temp = fopen( $tempfile, 'wb+' );
-               if ( ! $temp )
+
+               if ( ! $temp ) {
+                       unlink( $tempfile );
                        return false;
+               }
 
                mbstring_binary_safe_encoding();
 
index fe74d33c1d4d1d9145eeed5d3f174d48e09af45c..ff0b882414be3c22453a6eed50adb7fb1711039e 100644 (file)
@@ -121,8 +121,10 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
 
                $temp = wp_tempnam( $file );
 
-               if ( ! $temphandle = fopen($temp, 'w+') )
+               if ( ! $temphandle = fopen( $temp, 'w+' ) ) {
+                       unlink( $temp );
                        return false;
+               }
 
                mbstring_binary_safe_encoding();
 
index 70f81d056f67e85a37782f2bd65a7e16b99cde1a..158b55598c626380c288a5b414f843655712a45c 100644 (file)
@@ -193,7 +193,8 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
         * 
         * @param string $command
         * @param bool $returnbool
-        * @return bool|string
+        * @return bool|string True on success, false on failure. String if the command was executed, `$returnbool`
+        *                     is false (default), and data from the resulting stream was retrieved.
         */
        public function run_command( $command, $returnbool = false ) {
                if ( ! $this->link )
@@ -330,10 +331,10 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
         *
         * @access public
         *
-        * @param string     $file    Path to the file.
-        * @param string|int $owner   A user name or number.
-        * @param bool       $recursive Optional. If set True changes file owner recursivly. Defaults to False.
-        * @return bool|string Returns true on success or false on failure.
+        * @param string     $file      Path to the file.
+        * @param string|int $owner     A user name or number.
+        * @param bool       $recursive Optional. If set True changes file owner recursivly. Default False.
+        * @return bool True on success or false on failure.
         */
        public function chown( $file, $owner, $recursive = false ) {
                if ( ! $this->exists($file) )
index 32d0883947d017558d2cd204d74074560a283772..ee0f9af59361d517c3d23f75a6eed56d3d7bc48f 100644 (file)
@@ -123,10 +123,10 @@ class WP_List_Table {
         *                            in the list table, e.g. 'posts'. Default empty.
         *     @type string $singular Singular label for an object being listed, e.g. 'post'.
         *                            Default empty
-        *     @type bool   $ajax     Whether the list table supports AJAX. This includes loading
+        *     @type bool   $ajax     Whether the list table supports Ajax. This includes loading
         *                            and sorting data, for example. If true, the class will call
-        *                            the {@see _js_vars()} method in the footer to provide variables
-        *                            to any scripts handling AJAX events. Default false.
+        *                            the _js_vars() method in the footer to provide variables
+        *                            to any scripts handling Ajax events. Default false.
         *     @type string $screen   String containing the hook name used to determine the current
         *                            screen. If left null, the current screen will be automatically set.
         *                            Default null.
@@ -166,7 +166,7 @@ class WP_List_Table {
        }
 
        /**
-        * Make private properties readable for backwards compatibility.
+        * Make private properties readable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -181,7 +181,7 @@ class WP_List_Table {
        }
 
        /**
-        * Make private properties settable for backwards compatibility.
+        * Make private properties settable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -197,7 +197,7 @@ class WP_List_Table {
        }
 
        /**
-        * Make private properties checkable for backwards compatibility.
+        * Make private properties checkable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -212,7 +212,7 @@ class WP_List_Table {
        }
 
        /**
-        * Make private properties un-settable for backwards compatibility.
+        * Make private properties un-settable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -226,7 +226,7 @@ class WP_List_Table {
        }
 
        /**
-        * Make private/protected methods readable for backwards compatibility.
+        * Make private/protected methods readable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -335,13 +335,13 @@ class WP_List_Table {
        }
 
        /**
-        * Display the search box.
+        * Displays the search box.
         *
         * @since 3.1.0
         * @access public
         *
-        * @param string $text The search button text
-        * @param string $input_id The search input id
+        * @param string $text     The 'submit' button label.
+        * @param string $input_id ID attribute value for the search input field.
         */
        public function search_box( $text, $input_id ) {
                if ( empty( $_REQUEST['s'] ) && !$this->has_items() )
@@ -359,9 +359,9 @@ class WP_List_Table {
                        echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
 ?>
 <p class="search-box">
-       <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
-       <input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
-       <?php submit_button( $text, 'button', '', false, array('id' => 'search-submit') ); ?>
+       <label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo $text; ?>:</label>
+       <input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>" />
+       <?php submit_button( $text, 'button', '', false, array( 'id' => 'search-submit' ) ); ?>
 </p>
 <?php
        }
@@ -388,7 +388,7 @@ class WP_List_Table {
        public function views() {
                $views = $this->get_views();
                /**
-                * Filter the list of available list table views.
+                * Filters the list of available list table views.
                 *
                 * The dynamic portion of the hook name, `$this->screen->id`, refers
                 * to the ID of the current screen, usually a string.
@@ -432,13 +432,13 @@ class WP_List_Table {
         * @access protected
         *
         * @param string $which The location of the bulk actions: 'top' or 'bottom'.
-        *                      This is designated as optional for backwards-compatibility.
+        *                      This is designated as optional for backward compatibility.
         */
        protected function bulk_actions( $which = '' ) {
                if ( is_null( $this->_actions ) ) {
                        $no_new_actions = $this->_actions = $this->get_bulk_actions();
                        /**
-                        * Filter the list table Bulk Actions drop-down.
+                        * Filters the list table Bulk Actions drop-down.
                         *
                         * The dynamic portion of the hook name, `$this->screen->id`, refers
                         * to the ID of the current screen, usually a string.
@@ -541,7 +541,7 @@ class WP_List_Table {
                global $wpdb, $wp_locale;
 
                /**
-                * Filter whether to remove the 'Months' drop-down from the post list table.
+                * Filters whether to remove the 'Months' drop-down from the post list table.
                 *
                 * @since 4.2.0
                 *
@@ -568,7 +568,7 @@ class WP_List_Table {
                ", $post_type ) );
 
                /**
-                * Filter the 'Months' drop-down results.
+                * Filters the 'Months' drop-down results.
                 *
                 * @since 3.7.0
                 *
@@ -721,7 +721,7 @@ class WP_List_Table {
                        $per_page = $default;
 
                /**
-                * Filter the number of items to be displayed on each page of the list table.
+                * Filters the number of items to be displayed on each page of the list table.
                 *
                 * The dynamic hook name, $option, refers to the `per_page` option depending
                 * on the type of list table in use. Possible values include: 'edit_comments_per_page',
@@ -763,15 +763,16 @@ class WP_List_Table {
                $output = '<span class="displaying-num">' . sprintf( _n( '%s item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';
 
                $current = $this->get_pagenum();
+               $removable_query_args = wp_removable_query_args();
 
                $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
 
-               $current_url = remove_query_arg( array( 'hotkeys_highlight_last', 'hotkeys_highlight_first' ), $current_url );
+               $current_url = remove_query_arg( $removable_query_args, $current_url );
 
                $page_links = array();
 
                $total_pages_before = '<span class="paging-input">';
-               $total_pages_after  = '</span>';
+               $total_pages_after  = '</span></span>';
 
                $disable_first = $disable_last = $disable_prev = $disable_next = false;
 
@@ -812,9 +813,9 @@ class WP_List_Table {
 
                if ( 'bottom' === $which ) {
                        $html_current_page  = $current;
-                       $total_pages_before = '<span class="screen-reader-text">' . __( 'Current Page' ) . '</span><span id="table-paging" class="paging-input">';
+                       $total_pages_before = '<span class="screen-reader-text">' . __( 'Current Page' ) . '</span><span id="table-paging" class="paging-input"><span class="tablenav-paging-text">';
                } else {
-                       $html_current_page = sprintf( "%s<input class='current-page' id='current-page-selector' type='text' name='paged' value='%s' size='%d' aria-describedby='table-paging' />",
+                       $html_current_page = sprintf( "%s<input class='current-page' id='current-page-selector' type='text' name='paged' value='%s' size='%d' aria-describedby='table-paging' /><span class='tablenav-paging-text'>",
                                '<label for="current-page-selector" class="screen-reader-text">' . __( 'Current Page' ) . '</label>',
                                $current,
                                strlen( $total_pages )
@@ -951,7 +952,7 @@ class WP_List_Table {
                }
 
                /**
-                * Filter the name of the primary column for the current list table.
+                * Filters the name of the primary column for the current list table.
                 *
                 * @since 4.3.0
                 *
@@ -993,7 +994,7 @@ class WP_List_Table {
 
                $sortable_columns = $this->get_sortable_columns();
                /**
-                * Filter the list table sortable columns for a specific screen.
+                * Filters the list table sortable columns for a specific screen.
                 *
                 * The dynamic portion of the hook name, `$this->screen->id`, refers
                 * to the ID of the current screen, usually a string.
index 82894740dc8e6602a6c212af581dc37ebbf2e483..170ec5a2c594fdb92edf1f84796c17764b745d40 100644 (file)
@@ -282,7 +282,7 @@ class WP_Media_List_Table extends WP_List_Table {
                $taxonomies = wp_filter_object_list( $taxonomies, array( 'show_admin_column' => true ), 'and', 'name' );
 
                /**
-                * Filter the taxonomy columns for attachments in the Media list table.
+                * Filters the taxonomy columns for attachments in the Media list table.
                 *
                 * @since 3.5.0
                 *
@@ -312,7 +312,7 @@ class WP_Media_List_Table extends WP_List_Table {
                /* translators: column name */
                $posts_columns['date'] = _x( 'Date', 'column name' );
                /**
-                * Filter the Media list table columns.
+                * Filters the Media list table columns.
                 *
                 * @since 2.5.0
                 *
@@ -476,16 +476,18 @@ class WP_Media_List_Table extends WP_List_Table {
                if ( $parent ) {
                        $title = _draft_or_post_title( $post->post_parent );
                        $parent_type = get_post_type_object( $parent->post_type );
+
+                       if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $post->post_parent ) ) {
+?>
+                               <strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>">
+                                       <?php echo $title ?></a></strong><?php
+                       } elseif ( $parent_type && current_user_can( 'read_post', $post->post_parent ) ) {
 ?>
-                       <strong>
-                       <?php if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $post->post_parent ) ) { ?>
-                               <a href="<?php echo get_edit_post_link( $post->post_parent ); ?>">
-                                       <?php echo $title ?></a><?php
+                               <strong><?php echo $title ?></strong><?php
                        } else {
-                               echo $title;
-                       } ?></strong>
-                       <br />
-                       <?php
+                               _e( '(Private post)' );
+                       }
+
                        if ( $user_can_edit ):
                                $detach_url = add_query_arg( array(
                                        'parent_post_id' => $post->post_parent,
@@ -493,7 +495,7 @@ class WP_Media_List_Table extends WP_List_Table {
                                        '_wpnonce' => wp_create_nonce( 'bulk-' . $this->_args['plural'] )
                                ), 'upload.php' );
                                printf(
-                                       '<a href="%s" class="hide-if-no-js detach-from-parent" aria-label="%s">%s</a>',
+                                       '<br /><a href="%s" class="hide-if-no-js detach-from-parent" aria-label="%s">%s</a>',
                                        $detach_url,
                                        /* translators: %s: title of the post the attachment is attached to */
                                        esc_attr( sprintf( __( 'Detach from &#8220;%s&#8221;' ), $title ) ),
@@ -501,11 +503,11 @@ class WP_Media_List_Table extends WP_List_Table {
                                );
                        endif;
                } else {
-                       _e( '(Unattached)' ); ?><br />
+                       _e( '(Unattached)' ); ?>
                        <?php if ( $user_can_edit ) {
                                $title = _draft_or_post_title( $post->post_parent );
                                printf(
-                                       '<a href="#the-list" onclick="findPosts.open( \'media[]\', \'%s\' ); return false;" class="hide-if-no-js" aria-label="%s">%s</a>',
+                                       '<br /><a href="#the-list" onclick="findPosts.open( \'media[]\', \'%s\' ); return false;" class="hide-if-no-js aria-button-if-js" aria-label="%s">%s</a>',
                                        $post->ID,
                                        /* translators: %s: attachment title */
                                        esc_attr( sprintf( __( 'Attach &#8220;%s&#8221; to existing content' ), $title ) ),
@@ -657,7 +659,7 @@ class WP_Media_List_Table extends WP_List_Table {
                        if ( current_user_can( 'delete_post', $post->ID ) ) {
                                if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
                                        $actions['trash'] = sprintf(
-                                               '<a href="%s" class="submitdelete" aria-label="%s">%s</a>',
+                                               '<a href="%s" class="submitdelete aria-button-if-js" aria-label="%s">%s</a>',
                                                wp_nonce_url( "post.php?action=trash&amp;post=$post->ID", 'trash-post_' . $post->ID ),
                                                /* translators: %s: attachment title */
                                                esc_attr( sprintf( __( 'Move &#8220;%s&#8221; to the Trash' ), $att_title ) ),
@@ -666,7 +668,7 @@ class WP_Media_List_Table extends WP_List_Table {
                                } else {
                                        $delete_ays = ! MEDIA_TRASH ? " onclick='return showNotice.warn();'" : '';
                                        $actions['delete'] = sprintf(
-                                               '<a href="%s" class="submitdelete"%s aria-label="%s">%s</a>',
+                                               '<a href="%s" class="submitdelete aria-button-if-js"%s aria-label="%s">%s</a>',
                                                wp_nonce_url( "post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID ),
                                                $delete_ays,
                                                /* translators: %s: attachment title */
@@ -685,7 +687,7 @@ class WP_Media_List_Table extends WP_List_Table {
 
                        if ( current_user_can( 'edit_post', $post->ID ) ) {
                                $actions['attach'] = sprintf(
-                                       '<a href="#the-list" onclick="findPosts.open( \'media[]\', \'%s\' ); return false;" class="hide-if-no-js" aria-label="%s">%s</a>',
+                                       '<a href="#the-list" onclick="findPosts.open( \'media[]\', \'%s\' ); return false;" class="hide-if-no-js aria-button-if-js" aria-label="%s">%s</a>',
                                        $post->ID,
                                        /* translators: %s: attachment title */
                                        esc_attr( sprintf( __( 'Attach &#8220;%s&#8221; to existing content' ), $att_title ) ),
@@ -706,7 +708,7 @@ class WP_Media_List_Table extends WP_List_Table {
                        if ( current_user_can( 'delete_post', $post->ID ) ) {
                                if ( $this->is_trash ) {
                                        $actions['untrash'] = sprintf(
-                                               '<a href="%s" class="submitdelete" aria-label="%s">%s</a>',
+                                               '<a href="%s" class="submitdelete aria-button-if-js" aria-label="%s">%s</a>',
                                                wp_nonce_url( "post.php?action=untrash&amp;post=$post->ID", 'untrash-post_' . $post->ID ),
                                                /* translators: %s: attachment title */
                                                esc_attr( sprintf( __( 'Restore &#8220;%s&#8221; from the Trash' ), $att_title ) ),
@@ -714,7 +716,7 @@ class WP_Media_List_Table extends WP_List_Table {
                                        );
                                } elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
                                        $actions['trash'] = sprintf(
-                                               '<a href="%s" class="submitdelete" aria-label="%s">%s</a>',
+                                               '<a href="%s" class="submitdelete aria-button-if-js" aria-label="%s">%s</a>',
                                                wp_nonce_url( "post.php?action=trash&amp;post=$post->ID", 'trash-post_' . $post->ID ),
                                                /* translators: %s: attachment title */
                                                esc_attr( sprintf( __( 'Move &#8220;%s&#8221; to the Trash' ), $att_title ) ),
@@ -724,7 +726,7 @@ class WP_Media_List_Table extends WP_List_Table {
                                if ( $this->is_trash || ! EMPTY_TRASH_DAYS || ! MEDIA_TRASH ) {
                                        $delete_ays = ( !$this->is_trash && !MEDIA_TRASH ) ? " onclick='return showNotice.warn();'" : '';
                                        $actions['delete'] = sprintf(
-                                               '<a href="%s" class="submitdelete"%s aria-label="%s">%s</a>',
+                                               '<a href="%s" class="submitdelete aria-button-if-js"%s aria-label="%s">%s</a>',
                                                wp_nonce_url( "post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID ),
                                                $delete_ays,
                                                /* translators: %s: attachment title */
@@ -745,7 +747,7 @@ class WP_Media_List_Table extends WP_List_Table {
                }
 
                /**
-                * Filter the action links for each attachment in the Media list table.
+                * Filters the action links for each attachment in the Media list table.
                 *
                 * @since 2.8.0
                 *
index 9dd1d38f2d9dc382db9dd16430da8abce895ae76..9ce3ffee9be6ccdf8f7a3eccf759397088ee1b64 100644 (file)
@@ -59,6 +59,9 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
        }
 
        /**
+        * Prepares the list of sites for display.
+        *
+        * @since 3.1.0
         *
         * @global string $s
         * @global string $mode
@@ -67,8 +70,6 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
        public function prepare_items() {
                global $s, $mode, $wpdb;
 
-               $current_site = get_current_site();
-
                if ( ! empty( $_REQUEST['mode'] ) ) {
                        $mode = $_REQUEST['mode'] === 'excerpt' ? 'excerpt' : 'list';
                        set_user_setting( 'sites_list_mode', $mode );
@@ -83,7 +84,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
                $s = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST[ 's' ] ) ) : '';
                $wild = '';
                if ( false !== strpos($s, '*') ) {
-                       $wild = '%';
+                       $wild = '*';
                        $s = trim($s, '*');
                }
 
@@ -98,7 +99,11 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
                                $_GET['order'] = $_REQUEST['order'] = 'DESC';
                }
 
-               $query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' ";
+               $args = array(
+                       'number'     => intval( $per_page ),
+                       'offset'     => intval( ( $pagenum - 1 ) * $per_page ),
+                       'network_id' => get_current_network_id(),
+               );
 
                if ( empty($s) ) {
                        // Nothing to do.
@@ -107,67 +112,75 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
                                        preg_match( '/^[0-9]{1,3}\.[0-9]{1,3}\.?$/', $s ) ||
                                        preg_match( '/^[0-9]{1,3}\.$/', $s ) ) {
                        // IPv4 address
-                       $sql = $wpdb->prepare( "SELECT blog_id FROM {$wpdb->registration_log} WHERE {$wpdb->registration_log}.IP LIKE %s", $wpdb->esc_like( $s ) . $wild );
+                       $sql = $wpdb->prepare( "SELECT blog_id FROM {$wpdb->registration_log} WHERE {$wpdb->registration_log}.IP LIKE %s", $wpdb->esc_like( $s ) . ( ! empty( $wild ) ? '%' : '' ) );
                        $reg_blog_ids = $wpdb->get_col( $sql );
 
-                       if ( !$reg_blog_ids )
-                               $reg_blog_ids = array( 0 );
-
-                       $query = "SELECT *
-                               FROM {$wpdb->blogs}
-                               WHERE site_id = '{$wpdb->siteid}'
-                               AND {$wpdb->blogs}.blog_id IN (" . implode( ', ', $reg_blog_ids ) . ")";
+                       if ( $reg_blog_ids ) {
+                               $args['site__in'] = $reg_blog_ids;
+                       }
+               } elseif ( is_numeric( $s ) && empty( $wild ) ) {
+                       $args['ID'] = $s;
                } else {
-                       if ( is_numeric($s) && empty( $wild ) ) {
-                               $query .= $wpdb->prepare( " AND ( {$wpdb->blogs}.blog_id = %s )", $s );
-                       } elseif ( is_subdomain_install() ) {
-                               $blog_s = str_replace( '.' . $current_site->domain, '', $s );
-                               $blog_s = $wpdb->esc_like( $blog_s ) . $wild . $wpdb->esc_like( '.' . $current_site->domain );
-                               $query .= $wpdb->prepare( " AND ( {$wpdb->blogs}.domain LIKE %s ) ", $blog_s );
-                       } else {
-                               if ( $s != trim('/', $current_site->path) ) {
-                                       $blog_s = $wpdb->esc_like( $current_site->path . $s ) . $wild . $wpdb->esc_like( '/' );
-                               } else {
-                                       $blog_s = $wpdb->esc_like( $s );
-                               }
-                               $query .= $wpdb->prepare( " AND  ( {$wpdb->blogs}.path LIKE %s )", $blog_s );
+                       $args['search'] = $s;
+
+                       if ( ! is_subdomain_install() ) {
+                               $args['search_columns'] = array( 'path' );
                        }
                }
 
                $order_by = isset( $_REQUEST['orderby'] ) ? $_REQUEST['orderby'] : '';
-               if ( $order_by === 'registered' ) {
-                       $query .= ' ORDER BY registered ';
-               } elseif ( $order_by === 'lastupdated' ) {
-                       $query .= ' ORDER BY last_updated ';
-               } elseif ( $order_by === 'blogname' ) {
+               if ( 'registered' === $order_by ) {
+                       // registered is a valid field name.
+               } elseif ( 'lastupdated' === $order_by ) {
+                       $order_by = 'last_updated';
+               } elseif ( 'blogname' === $order_by ) {
                        if ( is_subdomain_install() ) {
-                               $query .= ' ORDER BY domain ';
+                               $order_by = 'domain';
                        } else {
-                               $query .= ' ORDER BY path ';
+                               $order_by = 'path';
                        }
-               } elseif ( $order_by === 'blog_id' ) {
-                       $query .= ' ORDER BY blog_id ';
-               } else {
-                       $order_by = null;
+               } elseif ( 'blog_id' === $order_by ) {
+                       $order_by = 'id';
+               } elseif ( ! $order_by ) {
+                       $order_by = false;
                }
 
-               if ( isset( $order_by ) ) {
-                       $order = ( isset( $_REQUEST['order'] ) && 'DESC' === strtoupper( $_REQUEST['order'] ) ) ? "DESC" : "ASC";
-                       $query .= $order;
+               $args['orderby'] = $order_by;
+
+               if ( $order_by ) {
+                       $args['order'] = ( isset( $_REQUEST['order'] ) && 'DESC' === strtoupper( $_REQUEST['order'] ) ) ? "DESC" : "ASC";
                }
 
-               // Don't do an unbounded count on large networks
-               if ( ! wp_is_large_network() )
-                       $total = $wpdb->get_var( str_replace( 'SELECT *', 'SELECT COUNT( blog_id )', $query ) );
+               if ( wp_is_large_network() ) {
+                       $args['no_found_rows'] = true;
+               } else {
+                       $args['no_found_rows'] = false;
+               }
+
+               /**
+                * Filters the arguments for the site query in the sites list table.
+                *
+                * @since 4.6.0
+                *
+                * @param array $args An array of get_sites() arguments.
+                */
+               $args = apply_filters( 'ms_sites_list_table_query_args', $args );
+
+               $_sites = get_sites( $args );
+               if ( is_array( $_sites ) ) {
+                       update_site_cache( $_sites );
 
-               $query .= " LIMIT " . intval( ( $pagenum - 1 ) * $per_page ) . ", " . intval( $per_page );
-               $this->items = $wpdb->get_results( $query, ARRAY_A );
+                       $this->items = array_slice( $_sites, 0, $per_page );
+               }
 
-               if ( wp_is_large_network() )
-                       $total = count($this->items);
+               $total_sites = get_sites( array_merge( $args, array(
+                       'count' => true,
+                       'offset' => 0,
+                       'number' => 0,
+               ) ) );
 
                $this->set_pagination_args( array(
-                       'total_items' => $total,
+                       'total_items' => $total_sites,
                        'per_page' => $per_page,
                ) );
        }
@@ -224,7 +237,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
                }
 
                /**
-                * Filter the displayed site columns in Sites list table.
+                * Filters the displayed site columns in Sites list table.
                 *
                 * @since MU
                 *
@@ -445,6 +458,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
         */
        public function display_rows() {
                foreach ( $this->items as $blog ) {
+                       $blog = $blog->to_array();
                        $class = '';
                        reset( $this->status_list );
 
@@ -531,7 +545,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
                $actions['visit']       = "<a href='" . esc_url( get_home_url( $blog['blog_id'], '/' ) ) . "' rel='permalink'>" . __( 'Visit' ) . '</a>';
 
                /**
-                * Filter the action links displayed for each site in the Sites list table.
+                * Filters the action links displayed for each site in the Sites list table.
                 *
                 * The 'Edit', 'Dashboard', 'Delete', and 'Visit' links are displayed by
                 * default for each site. The site's status determines whether to show the
index 825c04767262a6296220078dcf81591d328f4f7f..d35956c14b12361632d6f547f3f0b2510b6e618d 100644 (file)
@@ -91,7 +91,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
 
                $themes = array(
                        /**
-                        * Filter the full array of WP_Theme objects to list in the Multisite
+                        * Filters the full array of WP_Theme objects to list in the Multisite
                         * themes list table.
                         *
                         * @since 3.1.0
@@ -149,6 +149,10 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
                $this->has_items = ! empty( $themes['all'] );
                $total_this_page = $totals[ $status ];
 
+               wp_localize_script( 'updates', '_wpUpdatesItemCounts', array(
+                       'totals' => $totals,
+               ) );
+
                if ( $orderby ) {
                        $orderby = ucfirst( $orderby );
                        $order = strtoupper( $order );
@@ -468,7 +472,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
                        ), 'themes.php' );
 
                        /* translators: %s: theme name */
-                       $aria_label = sprintf( __( 'Delete %s' ), $theme->display( 'Name' ) );
+                       $aria_label = sprintf( _x( 'Delete %s', 'theme' ), $theme->display( 'Name' ) );
 
                        $actions['delete'] = sprintf( '<a href="%s" class="delete" aria-label="%s">%s</a>',
                                esc_url( wp_nonce_url( $url, 'bulk-themes' ) ),
@@ -477,7 +481,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
                        );
                }
                /**
-                * Filter the action links displayed for each theme in the Multisite
+                * Filters the action links displayed for each theme in the Multisite
                 * themes list table.
                 *
                 * The action links displayed are determined by the theme's status, and
@@ -501,7 +505,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
                $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme, $context );
 
                /**
-                * Filter the action links of a specific theme in the Multisite themes
+                * Filters the action links of a specific theme in the Multisite themes
                 * list table.
                 *
                 * The dynamic portion of the hook name, `$stylesheet`, refers to the
@@ -569,7 +573,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
                        );
                }
                /**
-                * Filter the array of row meta for each theme in the Multisite themes
+                * Filters the array of row meta for each theme in the Multisite themes
                 * list table.
                 *
                 * @since 3.1.0
index 380e4a02d3a43ab1442256973b5a1ebeb9b90cc6..da00131bcd488c5662d20ff6ac47caf2e008ad63 100644 (file)
@@ -172,7 +172,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
                        'blogs'      => __( 'Sites' )
                );
                /**
-                * Filter the columns displayed in the Network Admin Users list table.
+                * Filters the columns displayed in the Network Admin Users list table.
                 *
                 * @since MU
                 *
@@ -351,7 +351,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
                        $actions['view'] = '<a class="' . $class . '" href="' . esc_url( get_home_url( $val->userblog_id ) ) . '">' . __( 'View' ) . '</a>';
 
                        /**
-                        * Filter the action links displayed next the sites a user belongs to
+                        * Filters the action links displayed next the sites a user belongs to
                         * in the Network Admin Users list table.
                         *
                         * @since 3.1.0
@@ -446,7 +446,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
                }
 
                /**
-                * Filter the action links displayed under each user in the Network Admin Users list table.
+                * Filters the action links displayed under each user in the Network Admin Users list table.
                 *
                 * @since 3.2.0
                 *
index 26c8a0a21bffa55d540d97a28526ea645cb4fe53..6e389b1a2e7ba0adbecba004bb03c4e6c876dd9e 100644 (file)
@@ -104,7 +104,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                $nonmenu_tabs = array( 'plugin-information' ); // Valid actions to perform which do not have a Menu item.
 
                /**
-                * Filter the tabs shown on the Plugin Install screen.
+                * Filters the tabs shown on the Plugin Install screen.
                 *
                 * @since 2.7.0
                 *
@@ -114,7 +114,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                $tabs = apply_filters( 'install_plugins_tabs', $tabs );
 
                /**
-                * Filter tabs not associated with a menu item on the Plugin Install screen.
+                * Filters tabs not associated with a menu item on the Plugin Install screen.
                 *
                 * @since 2.7.0
                 *
@@ -191,7 +191,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                }
 
                /**
-                * Filter API request arguments for each Plugin Install screen tab.
+                * Filters API request arguments for each Plugin Install screen tab.
                 *
                 * The dynamic portion of the hook name, `$tab`, refers to the plugin install tabs.
                 * Default tabs include 'featured', 'popular', 'recommended', 'favorites', and 'upload'.
@@ -285,7 +285,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                ?>
        </ul>
 
-       <?php install_search_form( isset( $views['plugin-install-search'] ) ); ?>
+       <?php install_search_form(); ?>
 </div>
 <?php
        }
@@ -461,18 +461,45 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                                                        /* translators: 1: Plugin name and version. */
                                                        $action_links[] = '<a class="install-now button" data-slug="' . esc_attr( $plugin['slug'] ) . '" href="' . esc_url( $status['url'] ) . '" aria-label="' . esc_attr( sprintf( __( 'Install %s now' ), $name ) ) . '" data-name="' . esc_attr( $name ) . '">' . __( 'Install Now' ) . '</a>';
                                                }
-
                                                break;
+
                                        case 'update_available':
                                                if ( $status['url'] ) {
                                                        /* translators: 1: Plugin name and version */
                                                        $action_links[] = '<a class="update-now button aria-button-if-js" data-plugin="' . esc_attr( $status['file'] ) . '" data-slug="' . esc_attr( $plugin['slug'] ) . '" href="' . esc_url( $status['url'] ) . '" aria-label="' . esc_attr( sprintf( __( 'Update %s now' ), $name ) ) . '" data-name="' . esc_attr( $name ) . '">' . __( 'Update Now' ) . '</a>';
                                                }
-
                                                break;
+
                                        case 'latest_installed':
                                        case 'newer_installed':
-                                               $action_links[] = '<span class="button button-disabled">' . _x( 'Installed', 'plugin' ) . '</span>';
+                                               if ( is_plugin_active( $status['file'] ) ) {
+                                                       $action_links[] = '<button type="button" class="button button-disabled" disabled="disabled">' . _x( 'Active', 'plugin' ) . '</button>';
+                                               } elseif ( current_user_can( 'activate_plugins' ) ) {
+                                                       $button_text  = __( 'Activate' );
+                                                       /* translators: %s: Plugin name */
+                                                       $button_label = _x( 'Activate %s', 'plugin' );
+                                                       $activate_url = add_query_arg( array(
+                                                               '_wpnonce'    => wp_create_nonce( 'activate-plugin_' . $status['file'] ),
+                                                               'action'      => 'activate',
+                                                               'plugin'      => $status['file'],
+                                                       ), network_admin_url( 'plugins.php' ) );
+
+                                                       if ( is_network_admin() ) {
+                                                               $button_text  = __( 'Network Activate' );
+                                                               /* translators: %s: Plugin name */
+                                                               $button_label = _x( 'Network Activate %s', 'plugin' );
+                                                               $activate_url = add_query_arg( array( 'networkwide' => 1 ), $activate_url );
+                                                       }
+
+                                                       $action_links[] = sprintf(
+                                                               '<a href="%1$s" class="button activate-now button-secondary" aria-label="%2$s">%3$s</a>',
+                                                               esc_url( $activate_url ),
+                                                               esc_attr( sprintf( $button_label, $plugin['name'] ) ),
+                                                               $button_text
+                                                       );
+                                               } else {
+                                                       $action_links[] = '<button type="button" class="button button-disabled" disabled="disabled">' . _x( 'Installed', 'plugin' ) . '</button>';
+                                               }
                                                break;
                                }
                        }
@@ -494,7 +521,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                        }
 
                        /**
-                        * Filter the install action links for a plugin.
+                        * Filters the install action links for a plugin.
                         *
                         * @since 2.7.0
                         *
index f49d1c869713b0d808a943365620cc94055c8717..4204cf93b31043ff337560cd20b18e852d93a5f2 100644 (file)
@@ -104,7 +104,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
                if ( ! is_multisite() || ( $screen->in_admin( 'network' ) && current_user_can( 'manage_network_plugins' ) ) ) {
 
                        /**
-                        * Filter whether to display the advanced plugins list table.
+                        * Filters whether to display the advanced plugins list table.
                         *
                         * There are two types of advanced plugins - must-use and drop-ins -
                         * which can be used in a single site or Multisite network.
@@ -140,7 +140,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
                if ( ! $screen->in_admin( 'network' ) ) {
                        $show = current_user_can( 'manage_network_plugins' );
                        /**
-                        * Filter whether to display network-active plugins alongside plugins active for the current site.
+                        * Filters whether to display network-active plugins alongside plugins active for the current site.
                         *
                         * This also controls the display of inactive network-only plugins (plugins with
                         * "Network: true" in the plugin header).
@@ -246,6 +246,15 @@ class WP_Plugins_List_Table extends WP_List_Table {
 
                $total_this_page = $totals[ $status ];
 
+               $js_plugins = array();
+               foreach ( $plugins as $key => $list ) {
+                       $js_plugins[ $key ] = array_keys( (array) $list );
+               }
+
+               wp_localize_script( 'updates', '_wpUpdatesItemCounts', array(
+                       'plugins' => $js_plugins,
+               ) );
+
                if ( ! $orderby ) {
                        $orderby = 'Name';
                } else {
@@ -332,6 +341,37 @@ class WP_Plugins_List_Table extends WP_List_Table {
                        _e( 'You do not appear to have any plugins available at this time.' );
        }
 
+       /**
+        * Displays the search box.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string $text     The 'submit' button label.
+        * @param string $input_id ID attribute value for the search input field.
+        */
+       public function search_box( $text, $input_id ) {
+               if ( empty( $_REQUEST['s'] ) && ! $this->has_items() ) {
+                       return;
+               }
+
+               $input_id = $input_id . '-search-input';
+
+               if ( ! empty( $_REQUEST['orderby'] ) ) {
+                       echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
+               }
+               if ( ! empty( $_REQUEST['order'] ) ) {
+                       echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />';
+               }
+               ?>
+               <p class="search-box">
+                       <label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo $text; ?>:</label>
+                       <input type="search" id="<?php echo esc_attr( $input_id ); ?>" class="wp-filter-search" name="s" value="<?php _admin_search_query(); ?>" placeholder="<?php esc_attr_e( 'Search installed plugins...' ); ?>"/>
+                       <?php submit_button( $text, 'button hide-if-js', '', false, array( 'id' => 'search-submit' ) ); ?>
+               </p>
+               <?php
+       }
+
        /**
         *
         * @global string $status
@@ -560,16 +600,16 @@ class WP_Plugins_List_Table extends WP_List_Table {
                                if ( $is_active ) {
                                        if ( current_user_can( 'manage_network_plugins' ) ) {
                                                /* translators: %s: plugin name */
-                                               $actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( __( 'Network deactivate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Deactivate' ) . '</a>';
+                                               $actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Network Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Deactivate' ) . '</a>';
                                                }
                                } else {
                                        if ( current_user_can( 'manage_network_plugins' ) ) {
                                                /* translators: %s: plugin name */
-                                               $actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Network Activate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Activate' ) . '</a>';
+                                               $actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( _x( 'Network Activate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Activate' ) . '</a>';
                                        }
                                        if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) {
                                                /* translators: %s: plugin name */
-                                               $actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( __( 'Delete %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
+                                               $actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
                                        }
                                }
                        } else {
@@ -583,14 +623,14 @@ class WP_Plugins_List_Table extends WP_List_Table {
                                        );
                                } elseif ( $is_active ) {
                                        /* translators: %s: plugin name */
-                                       $actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( __( 'Deactivate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Deactivate' ) . '</a>';
+                                       $actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Deactivate' ) . '</a>';
                                } else {
                                        /* translators: %s: plugin name */
-                                       $actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Activate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Activate' ) . '</a>';
+                                       $actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( _x( 'Activate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Activate' ) . '</a>';
 
                                        if ( ! is_multisite() && current_user_can( 'delete_plugins' ) ) {
                                                /* translators: %s: plugin name */
-                                               $actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( __( 'Delete %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
+                                               $actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
                                        }
                                } // end if $is_active
 
@@ -607,7 +647,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
                if ( $screen->in_admin( 'network' ) ) {
 
                        /**
-                        * Filter the action links displayed for each plugin in the Network Admin Plugins list table.
+                        * Filters the action links displayed for each plugin in the Network Admin Plugins list table.
                         *
                         * The default action links for the Network plugins list table include
                         * 'Network Activate', 'Network Deactivate', 'Edit', and 'Delete'.
@@ -625,7 +665,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
                        $actions = apply_filters( 'network_admin_plugin_action_links', $actions, $plugin_file, $plugin_data, $context );
 
                        /**
-                        * Filter the list of action links displayed for a specific plugin in the Network Admin Plugins list table.
+                        * Filters the list of action links displayed for a specific plugin in the Network Admin Plugins list table.
                         *
                         * The dynamic portion of the hook name, $plugin_file, refers to the path
                         * to the plugin file, relative to the plugins directory.
@@ -645,7 +685,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
                } else {
 
                        /**
-                        * Filter the action links displayed for each plugin in the Plugins list table.
+                        * Filters the action links displayed for each plugin in the Plugins list table.
                         *
                         * The default action links for the site plugins list table include
                         * 'Activate', 'Deactivate', and 'Edit', for a network site, and
@@ -664,7 +704,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
                        $actions = apply_filters( 'plugin_action_links', $actions, $plugin_file, $plugin_data, $context );
 
                        /**
-                        * Filter the list of action links displayed for a specific plugin in the Plugins list table.
+                        * Filters the list of action links displayed for a specific plugin in the Plugins list table.
                         *
                         * The dynamic portion of the hook name, $plugin_file, refers to the path
                         * to the plugin file, relative to the plugins directory.
@@ -757,7 +797,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
                                        }
 
                                        /**
-                                        * Filter the array of row meta for each plugin in the Plugins list table.
+                                        * Filters the array of row meta for each plugin in the Plugins list table.
                                         *
                                         * @since 2.8.0
                                         *
@@ -776,7 +816,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
                                        echo "</div></td>";
                                        break;
                                default:
-                                       $classes = "$column_name column-$column_name$class";
+                                       $classes = "$column_name column-$column_name $class";
 
                                        echo "<td class='$classes{$extra_classes}'>";
 
index 33eca44a8322db0911b66f1b7bd4106d3b5bd9ab..7ef790e31a252f0e06d7ed98b72e599eab1785d0 100644 (file)
@@ -72,8 +72,8 @@ class WP_Posts_List_Table extends WP_List_Table {
         *
         * @see WP_List_Table::__construct() for more information on default arguments.
         *
-        * @global object $post_type_object
-        * @global wpdb   $wpdb
+        * @global WP_Post_Type $post_type_object
+        * @global wpdb         $wpdb
         *
         * @param array $args An associative array of arguments.
         */
@@ -412,31 +412,56 @@ class WP_Posts_List_Table extends WP_List_Table {
        }
 
        /**
-        * @global int $cat
+        * Displays a categories drop-down for filtering on the Posts list table.
+        *
+        * @since 4.6.0
+        * @access protected
+        *
+        * @global int $cat Currently selected category.
+        *
+        * @param string $post_type Post type slug.
+        */
+       protected function categories_dropdown( $post_type ) {
+               global $cat;
+
+               /**
+                * Filters whether to remove the 'Categories' drop-down from the post list table.
+                *
+                * @since 4.6.0
+                *
+                * @param bool   $disable   Whether to disable the categories drop-down. Default false.
+                * @param string $post_type Post type slug.
+                */
+               if ( false !== apply_filters( 'disable_categories_dropdown', false, $post_type ) ) {
+                       return;
+               }
+
+               if ( is_object_in_taxonomy( $post_type, 'category' ) ) {
+                       $dropdown_options = array(
+                               'show_option_all' => get_taxonomy( 'category' )->labels->all_items,
+                               'hide_empty' => 0,
+                               'hierarchical' => 1,
+                               'show_count' => 0,
+                               'orderby' => 'name',
+                               'selected' => $cat
+                       );
+
+                       echo '<label class="screen-reader-text" for="cat">' . __( 'Filter by category' ) . '</label>';
+                       wp_dropdown_categories( $dropdown_options );
+               }
+       }
+
+       /**
         * @param string $which
         */
        protected function extra_tablenav( $which ) {
-               global $cat;
 ?>
                <div class="alignleft actions">
 <?php
                if ( 'top' === $which && !is_singular() ) {
 
                        $this->months_dropdown( $this->screen->post_type );
-
-                       if ( is_object_in_taxonomy( $this->screen->post_type, 'category' ) ) {
-                               $dropdown_options = array(
-                                       'show_option_all' => get_taxonomy( 'category' )->labels->all_items,
-                                       'hide_empty' => 0,
-                                       'hierarchical' => 1,
-                                       'show_count' => 0,
-                                       'orderby' => 'name',
-                                       'selected' => $cat
-                               );
-
-                               echo '<label class="screen-reader-text" for="cat">' . __( 'Filter by category' ) . '</label>';
-                               wp_dropdown_categories( $dropdown_options );
-                       }
+                       $this->categories_dropdown( $this->screen->post_type );
 
                        /**
                         * Fires before the Filter button on the Posts and Pages list tables.
@@ -446,10 +471,13 @@ class WP_Posts_List_Table extends WP_List_Table {
                         *
                         * @since 2.1.0
                         * @since 4.4.0 The `$post_type` parameter was added.
+                        * @since 4.6.0 The `$which` parameter was added.
                         *
                         * @param string $post_type The post type slug.
+                        * @param string $which     The location of the extra table nav markup:
+                        *                          'top' or 'bottom'.
                         */
-                       do_action( 'restrict_manage_posts', $this->screen->post_type );
+                       do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
 
                        submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
                }
@@ -512,7 +540,7 @@ class WP_Posts_List_Table extends WP_List_Table {
                $taxonomies = wp_filter_object_list( $taxonomies, array( 'show_admin_column' => true ), 'and', 'name' );
 
                /**
-                * Filter the taxonomy columns in the Posts list table.
+                * Filters the taxonomy columns in the Posts list table.
                 *
                 * The dynamic portion of the hook name, `$post_type`, refers to the post
                 * type slug.
@@ -545,7 +573,7 @@ class WP_Posts_List_Table extends WP_List_Table {
                if ( 'page' === $post_type ) {
 
                        /**
-                        * Filter the columns displayed in the Pages list table.
+                        * Filters the columns displayed in the Pages list table.
                         *
                         * @since 2.5.0
                         *
@@ -555,7 +583,7 @@ class WP_Posts_List_Table extends WP_List_Table {
                } else {
 
                        /**
-                        * Filter the columns displayed in the Posts list table.
+                        * Filters the columns displayed in the Posts list table.
                         *
                         * @since 1.5.0
                         *
@@ -566,7 +594,7 @@ class WP_Posts_List_Table extends WP_List_Table {
                }
 
                /**
-                * Filter the columns displayed in the Posts list table for a specific post type.
+                * Filters the columns displayed in the Posts list table for a specific post type.
                 *
                 * The dynamic portion of the hook name, `$post_type`, refers to the post type slug.
                 *
@@ -961,7 +989,7 @@ class WP_Posts_List_Table extends WP_List_Table {
                echo '<br />';
                if ( 'excerpt' === $mode ) {
                        /**
-                        * Filter the published time of the post.
+                        * Filters the published time of the post.
                         *
                         * If `$mode` equals 'excerpt', the published time and date are both displayed.
                         * If `$mode` equals 'list' (default), the publish date is displayed, with the
@@ -1248,7 +1276,7 @@ class WP_Posts_List_Table extends WP_List_Table {
                if ( is_post_type_hierarchical( $post->post_type ) ) {
 
                        /**
-                        * Filter the array of row action links on the Pages list table.
+                        * Filters the array of row action links on the Pages list table.
                         *
                         * The filter is evaluated only for hierarchical post types.
                         *
@@ -1263,7 +1291,7 @@ class WP_Posts_List_Table extends WP_List_Table {
                } else {
 
                        /**
-                        * Filter the array of row action links on the Posts list table.
+                        * Filters the array of row action links on the Posts list table.
                         *
                         * The filter is evaluated only for non-hierarchical post types.
                         *
@@ -1305,7 +1333,7 @@ class WP_Posts_List_Table extends WP_List_Table {
                        $show_in_quick_edit = $taxonomy->show_in_quick_edit;
 
                        /**
-                        * Filter whether the current taxonomy should be shown in the Quick Edit panel.
+                        * Filters whether the current taxonomy should be shown in the Quick Edit panel.
                         *
                         * @since 4.2.0
                         *
@@ -1470,7 +1498,7 @@ class WP_Posts_List_Table extends WP_List_Table {
                        $dropdown_args['show_option_no_change'] =  __( '&mdash; No Change &mdash;' );
 
                /**
-                * Filter the arguments used to generate the Quick Edit page-parent drop-down.
+                * Filters the arguments used to generate the Quick Edit page-parent drop-down.
                 *
                 * @since 2.7.0
                 *
index 0288ed0520a62b999e9978935d2168433e3c812b..a00bbaa40e7e7ff142f4437c51dd052b864e3ae3 100644 (file)
@@ -42,7 +42,7 @@ class WP_Press_This {
        public function site_settings() {
                return array(
                        /**
-                        * Filter whether or not Press This should redirect the user in the parent window upon save.
+                        * Filters whether or not Press This should redirect the user in the parent window upon save.
                         *
                         * @since 4.2.0
                         *
@@ -96,7 +96,7 @@ class WP_Press_This {
        }
 
        /**
-        * AJAX handler for saving the post as draft or published.
+        * Ajax handler for saving the post as draft or published.
         *
         * @since 4.2.0
         * @access public
@@ -134,8 +134,9 @@ class WP_Press_This {
                $post_data['post_content'] = $this->side_load_images( $post_id, $post_data['post_content'] );
 
                /**
-                * Filter the post data of a Press This post before saving/updating, after
-                * side_load_images action had run.
+                * Filters the post data of a Press This post before saving/updating.
+                *
+                * The {@see 'side_load_images'} action has already run at this point.
                 *
                 * @since 4.5.0
                 *
@@ -168,7 +169,7 @@ class WP_Press_This {
                        }
 
                        /**
-                        * Filter the URL to redirect to when Press This saves.
+                        * Filters the URL to redirect to when Press This saves.
                         *
                         * @since 4.2.0
                         *
@@ -188,7 +189,7 @@ class WP_Press_This {
        }
 
        /**
-        * AJAX handler for adding a new category.
+        * Ajax handler for adding a new category.
         *
         * @since 4.2.0
         * @access public
@@ -690,7 +691,7 @@ class WP_Press_This {
                }
 
                /**
-                * Filter whether to enable in-source media discovery in Press This.
+                * Filters whether to enable in-source media discovery in Press This.
                 *
                 * @since 4.2.0
                 *
@@ -765,7 +766,7 @@ class WP_Press_This {
                }
 
                /**
-                * Filter the Press This data array.
+                * Filters the Press This data array.
                 *
                 * @since 4.2.0
                 *
@@ -793,36 +794,7 @@ class WP_Press_This {
                        $press_this = str_replace( '.css', '-rtl.css', $press_this );
                }
 
-               $open_sans_font_url = '';
-
-               /* translators: If there are characters in your language that are not supported
-                * by Open Sans, translate this to 'off'. Do not translate into your own language.
-                */
-               if ( 'off' !== _x( 'on', 'Open Sans font: on or off' ) ) {
-                       $subsets = 'latin,latin-ext';
-
-                       /* translators: To add an additional Open Sans character subset specific to your language,
-                        * translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language.
-                        */
-                       $subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)' );
-
-                       if ( 'cyrillic' == $subset ) {
-                               $subsets .= ',cyrillic,cyrillic-ext';
-                       } elseif ( 'greek' == $subset ) {
-                               $subsets .= ',greek,greek-ext';
-                       } elseif ( 'vietnamese' == $subset ) {
-                               $subsets .= ',vietnamese';
-                       }
-
-                       $query_args = array(
-                               'family' => urlencode( 'Open Sans:400italic,700italic,400,600,700' ),
-                               'subset' => urlencode( $subsets ),
-                       );
-
-                       $open_sans_font_url = ',' . add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
-               }
-
-               return $styles . $press_this . $open_sans_font_url;
+               return $styles . $press_this;
        }
 
        /**
@@ -1171,7 +1143,7 @@ class WP_Press_This {
                }
 
                /**
-                * Filter the default HTML tags used in the suggested content for the editor.
+                * Filters the default HTML tags used in the suggested content for the editor.
                 *
                 * The HTML strings use printf format. After filtering the content is added at the specified places with `sprintf()`.
                 *
@@ -1530,6 +1502,9 @@ class WP_Press_This {
        /** This action is documented in wp-admin/admin-footer.php */
        do_action( 'admin_footer' );
 
+       /** This action is documented in wp-admin/admin-footer.php */
+       do_action( 'admin_print_footer_scripts-press-this.php' );
+
        /** This action is documented in wp-admin/admin-footer.php */
        do_action( 'admin_print_footer_scripts' );
 
index ebd20b895a7c0939484d66c38d2d44a6e0978c6c..a7d9a1a5c34c13602f5e135605e8d0c96695dcf9 100644 (file)
@@ -418,9 +418,7 @@ final class WP_Screen {
        }
 
        /**
-        * Sets the old string-based contextual help for the screen.
-        *
-        * For backwards compatibility.
+        * Sets the old string-based contextual help for the screen for backward compatibility.
         *
         * @since 3.3.0
         *
@@ -722,7 +720,7 @@ final class WP_Screen {
        /**
         * Render the screen's help section.
         *
-        * This will trigger the deprecated filters for backwards compatibility.
+        * This will trigger the deprecated filters for backward compatibility.
         *
         * @since 3.3.0
         *
@@ -731,7 +729,7 @@ final class WP_Screen {
        public function render_screen_meta() {
 
                /**
-                * Filter the legacy contextual help list.
+                * Filters the legacy contextual help list.
                 *
                 * @since 2.7.0
                 * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or
@@ -745,7 +743,7 @@ final class WP_Screen {
                $old_help = isset( self::$_old_compat_help[ $this->id ] ) ? self::$_old_compat_help[ $this->id ] : '';
 
                /**
-                * Filter the legacy contextual help text.
+                * Filters the legacy contextual help text.
                 *
                 * @since 2.7.0
                 * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or
@@ -762,7 +760,7 @@ final class WP_Screen {
                if ( empty( $old_help ) && ! $this->get_help_tabs() ) {
 
                        /**
-                        * Filter the default legacy contextual help text.
+                        * Filters the default legacy contextual help text.
                         *
                         * @since 2.8.0
                         * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or
@@ -851,10 +849,10 @@ final class WP_Screen {
                // Setup layout columns
 
                /**
-                * Filter the array of screen layout columns.
+                * Filters the array of screen layout columns.
                 *
                 * This hook provides back-compat for plugins using the back-compat
-                * filter instead of add_screen_option().
+                * Filters instead of add_screen_option().
                 *
                 * @since 2.8.0
                 *
@@ -931,7 +929,7 @@ final class WP_Screen {
                }
 
                /**
-                * Filter the screen settings text displayed in the Screen Options tab.
+                * Filters the screen settings text displayed in the Screen Options tab.
                 *
                 * This filter is currently only used on the Widgets screen to enable
                 * accessibility mode.
@@ -947,7 +945,7 @@ final class WP_Screen {
                        $show_screen = true;
 
                /**
-                * Filter whether to show the Screen Options tab.
+                * Filters whether to show the Screen Options tab.
                 *
                 * @since 3.2.0
                 *
@@ -997,7 +995,7 @@ final class WP_Screen {
                echo $this->_screen_settings;
 
                /**
-                * Filter whether to show the Screen Options submit button.
+                * Filters whether to show the Screen Options submit button.
                 *
                 * @since 4.4.0
                 *
@@ -1206,7 +1204,7 @@ final class WP_Screen {
                $view_mode_post_types = get_post_types( array( 'hierarchical' => false, 'show_ui' => true ) );
 
                /**
-                * Filter the post types that have different view mode options.
+                * Filters the post types that have different view mode options.
                 *
                 * @since 4.4.0
                 *
index 8c06db64595561615d8bceb522750655f9788362..3afc83def7fdca69b62e890e9328739bc1cca3a5 100644 (file)
@@ -121,7 +121,7 @@ class WP_Site_Icon {
                $metadata      = wp_generate_attachment_metadata( $attachment_id, $file );
 
                /**
-                * Filter the site icon attachment metadata.
+                * Filters the site icon attachment metadata.
                 *
                 * @since 4.3.0
                 *
@@ -148,7 +148,7 @@ class WP_Site_Icon {
                $only_crop_sizes = array();
 
                /**
-                * Filter the different dimensions that a site icon is saved in.
+                * Filters the different dimensions that a site icon is saved in.
                 *
                 * @since 4.3.0
                 *
index 7da91a23e1279686ecb695081fad567dabf3ec85..e765794a4e0589ea628fe3ce1716ac6f62229a7a 100644 (file)
@@ -53,7 +53,7 @@ class WP_Terms_List_Table extends WP_List_Table {
                        $taxonomy = 'post_tag';
 
                if ( ! taxonomy_exists( $taxonomy ) )
-                       wp_die( __( 'Invalid taxonomy' ) );
+                       wp_die( __( 'Invalid taxonomy.' ) );
 
                $tax = get_taxonomy( $taxonomy );
 
@@ -79,7 +79,7 @@ class WP_Terms_List_Table extends WP_List_Table {
 
                if ( 'post_tag' === $this->screen->taxonomy ) {
                        /**
-                        * Filter the number of terms displayed per page for the Tags list table.
+                        * Filters the number of terms displayed per page for the Tags list table.
                         *
                         * @since 2.8.0
                         *
@@ -88,7 +88,7 @@ class WP_Terms_List_Table extends WP_List_Table {
                        $tags_per_page = apply_filters( 'edit_tags_per_page', $tags_per_page );
 
                        /**
-                        * Filter the number of terms displayed per page for the Tags list table.
+                        * Filters the number of terms displayed per page for the Tags list table.
                         *
                         * @since 2.7.0
                         * @deprecated 2.8.0 Use edit_tags_per_page instead.
@@ -98,7 +98,7 @@ class WP_Terms_List_Table extends WP_List_Table {
                        $tags_per_page = apply_filters( 'tagsperpage', $tags_per_page );
                } elseif ( 'category' === $this->screen->taxonomy ) {
                        /**
-                        * Filter the number of terms displayed per page for the Categories list table.
+                        * Filters the number of terms displayed per page for the Categories list table.
                         *
                         * @since 2.8.0
                         *
@@ -351,7 +351,7 @@ class WP_Terms_List_Table extends WP_List_Table {
                $pad = str_repeat( '&#8212; ', max( 0, $this->level ) );
 
                /**
-                * Filter display of the term name in the terms list table.
+                * Filters display of the term name in the terms list table.
                 *
                 * The default output may include padding due to the term's
                 * current level in the term hierarchy.
@@ -469,7 +469,7 @@ class WP_Terms_List_Table extends WP_List_Table {
                }
 
                /**
-                * Filter the action links displayed for each term in the Tags list table.
+                * Filters the action links displayed for each term in the Tags list table.
                 *
                 * @since 2.8.0
                 * @deprecated 3.0.0 Use {$taxonomy}_row_actions instead.
@@ -481,7 +481,7 @@ class WP_Terms_List_Table extends WP_List_Table {
                $actions = apply_filters( 'tag_row_actions', $actions, $tag );
 
                /**
-                * Filter the action links displayed for each term in the terms list table.
+                * Filters the action links displayed for each term in the terms list table.
                 *
                 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
                 *
@@ -559,7 +559,7 @@ class WP_Terms_List_Table extends WP_List_Table {
         */
        public function column_default( $tag, $column_name ) {
                /**
-                * Filter the displayed columns in the terms list table.
+                * Filters the displayed columns in the terms list table.
                 *
                 * The dynamic portion of the hook name, `$this->screen->taxonomy`,
                 * refers to the slug of the current taxonomy.
index 3780c89c9518962eeab707aa5457a558b633f9e0..492497ed35afa28aa4a43a0be0317ba68044e08c 100644 (file)
@@ -13,7 +13,7 @@
  * @since 3.1.0
  * @access private
  *
- * @see WP_Thenes_List_Table
+ * @see WP_Themes_List_Table
  */
 class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
 
@@ -72,7 +72,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
                $tabs = apply_filters( 'install_themes_tabs', $tabs );
 
                /**
-                * Filter tabs not associated with a menu item on the Install Themes screen.
+                * Filters tabs not associated with a menu item on the Install Themes screen.
                 *
                 * @since 2.8.0
                 *
@@ -124,7 +124,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
                }
 
                /**
-                * Filter API request arguments for each Install Themes screen tab.
+                * Filters API request arguments for each Install Themes screen tab.
                 *
                 * The dynamic portion of the hook name, `$tab`, refers to the theme install
                 * tabs. Default tabs are 'dashboard', 'search', 'upload', 'featured',
@@ -290,7 +290,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
                $actions[] = '<a class="install-theme-preview" href="' . esc_url( $preview_url ) . '" title="' . esc_attr( sprintf( __( 'Preview %s' ), $name ) ) . '">' . __( 'Preview' ) . '</a>';
 
                /**
-                * Filter the install action links for a theme in the Install Themes list table.
+                * Filters the install action links for a theme in the Install Themes list table.
                 *
                 * @since 3.4.0
                 *
index 2426e61223b61dcdc07633c044670a65f1aa08ab..a232cd05b2f64b6b0c0500796092371cb012a9ac 100644 (file)
@@ -42,7 +42,7 @@ class WP_Themes_List_Table extends WP_List_Table {
         * @return bool
         */
        public function ajax_user_can() {
-               // Do not check edit_theme_options here. AJAX calls for available themes require switch_themes.
+               // Do not check edit_theme_options here. Ajax calls for available themes require switch_themes.
                return current_user_can( 'switch_themes' );
        }
 
@@ -104,7 +104,7 @@ class WP_Themes_List_Table extends WP_List_Table {
                        // Else, fallthrough. install_themes doesn't help if you can't enable it.
                } else {
                        if ( current_user_can( 'install_themes' ) ) {
-                               printf( __( 'You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress.org Theme Directory at any time: just click on the <a href="%s">Install Themes</a> tab above.' ), admin_url( 'theme-install.php' ) );
+                               printf( __( 'You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress Theme Directory at any time: just click on the <a href="%s">Install Themes</a> tab above.' ), admin_url( 'theme-install.php' ) );
 
                                return;
                        }
diff --git a/wp-admin/includes/class-wp-upgrader-skin.php b/wp-admin/includes/class-wp-upgrader-skin.php
new file mode 100644 (file)
index 0000000..4c2b537
--- /dev/null
@@ -0,0 +1,211 @@
+<?php
+/**
+ * Upgrader API: WP_Upgrader_Skin class
+ *
+ * @package WordPress
+ * @subpackage Upgrader
+ * @since 4.6.0
+ */
+
+/**
+ * Generic Skin for the WordPress Upgrader classes. This skin is designed to be extended for specific purposes.
+ *
+ * @since 2.8.0
+ * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php.
+ */
+class WP_Upgrader_Skin {
+
+       public $upgrader;
+       public $done_header = false;
+       public $done_footer = false;
+
+       /**
+        * Holds the result of an upgrade.
+        *
+        * @since 2.8.0
+        * @access public
+        * @var string|bool|WP_Error
+        */
+       public $result = false;
+       public $options = array();
+
+       /**
+        *
+        * @param array $args
+        */
+       public function __construct($args = array()) {
+               $defaults = array( 'url' => '', 'nonce' => '', 'title' => '', 'context' => false );
+               $this->options = wp_parse_args($args, $defaults);
+       }
+
+       /**
+        * @param WP_Upgrader $upgrader
+        */
+       public function set_upgrader(&$upgrader) {
+               if ( is_object($upgrader) )
+                       $this->upgrader =& $upgrader;
+               $this->add_strings();
+       }
+
+       /**
+        * @access public
+        */
+       public function add_strings() {
+       }
+
+       /**
+        * Sets the result of an upgrade.
+        *
+        * @since 2.8.0
+        * @access public
+        *
+        * @param string|bool|WP_Error $result The result of an upgrade.
+        */
+       public function set_result( $result ) {
+               $this->result = $result;
+       }
+
+       /**
+        * Displays a form to the user to request for their FTP/SSH details in order
+        * to connect to the filesystem.
+        *
+        * @since 2.8.0
+        * @since 4.6.0 The `$context` parameter default changed from `false` to an empty string.
+        *
+        * @see request_filesystem_credentials()
+        *
+        * @param bool   $error                        Optional. Whether the current request has failed to connect.
+        *                                             Default false.
+        * @param string $context                      Optional. Full path to the directory that is tested
+        *                                             for being writable. Default empty.
+        * @param bool   $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false.
+        * @return bool False on failure, true on success.
+        */
+       public function request_filesystem_credentials( $error = false, $context = '', $allow_relaxed_file_ownership = false ) {
+               $url = $this->options['url'];
+               if ( ! $context ) {
+                       $context = $this->options['context'];
+               }
+               if ( !empty($this->options['nonce']) ) {
+                       $url = wp_nonce_url($url, $this->options['nonce']);
+               }
+
+               $extra_fields = array();
+
+               return request_filesystem_credentials( $url, '', $error, $context, $extra_fields, $allow_relaxed_file_ownership );
+       }
+
+       /**
+        * @access public
+        */
+       public function header() {
+               if ( $this->done_header ) {
+                       return;
+               }
+               $this->done_header = true;
+               echo '<div class="wrap">';
+               echo '<h1>' . $this->options['title'] . '</h1>';
+       }
+
+       /**
+        * @access public
+        */
+       public function footer() {
+               if ( $this->done_footer ) {
+                       return;
+               }
+               $this->done_footer = true;
+               echo '</div>';
+       }
+
+       /**
+        *
+        * @param string|WP_Error $errors
+        */
+       public function error($errors) {
+               if ( ! $this->done_header )
+                       $this->header();
+               if ( is_string($errors) ) {
+                       $this->feedback($errors);
+               } elseif ( is_wp_error($errors) && $errors->get_error_code() ) {
+                       foreach ( $errors->get_error_messages() as $message ) {
+                               if ( $errors->get_error_data() && is_string( $errors->get_error_data() ) )
+                                       $this->feedback($message . ' ' . esc_html( strip_tags( $errors->get_error_data() ) ) );
+                               else
+                                       $this->feedback($message);
+                       }
+               }
+       }
+
+       /**
+        *
+        * @param string $string
+        */
+       public function feedback($string) {
+               if ( isset( $this->upgrader->strings[$string] ) )
+                       $string = $this->upgrader->strings[$string];
+
+               if ( strpos($string, '%') !== false ) {
+                       $args = func_get_args();
+                       $args = array_splice($args, 1);
+                       if ( $args ) {
+                               $args = array_map( 'strip_tags', $args );
+                               $args = array_map( 'esc_html', $args );
+                               $string = vsprintf($string, $args);
+                       }
+               }
+               if ( empty($string) )
+                       return;
+               show_message($string);
+       }
+
+       /**
+        * @access public
+        */
+       public function before() {}
+
+       /**
+        * @access public
+        */
+       public function after() {}
+
+       /**
+        * Output JavaScript that calls function to decrement the update counts.
+        *
+        * @since 3.9.0
+        *
+        * @param string $type Type of update count to decrement. Likely values include 'plugin',
+        *                     'theme', 'translation', etc.
+        */
+       protected function decrement_update_count( $type ) {
+               if ( ! $this->result || is_wp_error( $this->result ) || 'up_to_date' === $this->result ) {
+                       return;
+               }
+
+               if ( defined( 'IFRAME_REQUEST' ) ) {
+                       echo '<script type="text/javascript">
+                                       if ( window.postMessage && JSON ) {
+                                               window.parent.postMessage( JSON.stringify( { action: "decrementUpdateCount", upgradeType: "' . $type . '" } ), window.location.protocol + "//" + window.location.hostname );
+                                       }
+                               </script>';
+               } else {
+                       echo '<script type="text/javascript">
+                                       (function( wp ) {
+                                               if ( wp && wp.updates.decrementCount ) {
+                                                       wp.updates.decrementCount( "' . $type . '" );
+                                               }
+                                       })( window.wp );
+                               </script>';
+               }
+       }
+
+       /**
+        * @access public
+        */
+       public function bulk_header() {}
+
+       /**
+        * @access public
+        */
+       public function bulk_footer() {}
+}
index c9d32cebe8c5fa6cd93e85afdae8f02519a9d5af..8b2789da0c090c0b43bbec5b37570423e64b039d 100644 (file)
  * @since 2.8.0
  */
 
-/**
- * Generic Skin for the WordPress Upgrader classes. This skin is designed to be extended for specific purposes.
- *
- * @package WordPress
- * @subpackage Upgrader
- * @since 2.8.0
- */
-class WP_Upgrader_Skin {
-
-       public $upgrader;
-       public $done_header = false;
-       public $done_footer = false;
-       public $result = false;
-       public $options = array();
-
-       /**
-        *
-        * @param array $args
-        */
-       public function __construct($args = array()) {
-               $defaults = array( 'url' => '', 'nonce' => '', 'title' => '', 'context' => false );
-               $this->options = wp_parse_args($args, $defaults);
-       }
-
-       /**
-        * @param WP_Upgrader $upgrader
-        */
-       public function set_upgrader(&$upgrader) {
-               if ( is_object($upgrader) )
-                       $this->upgrader =& $upgrader;
-               $this->add_strings();
-       }
-
-       /**
-        * @access public
-        */
-       public function add_strings() {
-       }
-
-       /**
-        *
-        * @param string|false|WP_Error $result
-        */
-       public function set_result($result) {
-               $this->result = $result;
-       }
-
-       /**
-        *
-        * @param bool   $error
-        * @param string $context
-        * @param bool   $allow_relaxed_file_ownership
-        * @return type
-        */
-       public function request_filesystem_credentials( $error = false, $context = false, $allow_relaxed_file_ownership = false ) {
-               $url = $this->options['url'];
-               if ( ! $context ) {
-                       $context = $this->options['context'];
-               }
-               if ( !empty($this->options['nonce']) ) {
-                       $url = wp_nonce_url($url, $this->options['nonce']);
-               }
-
-               $extra_fields = array();
-
-               return request_filesystem_credentials( $url, '', $error, $context, $extra_fields, $allow_relaxed_file_ownership );
-       }
-
-       /**
-        * @access public
-        */
-       public function header() {
-               if ( $this->done_header ) {
-                       return;
-               }
-               $this->done_header = true;
-               echo '<div class="wrap">';
-               echo '<h1>' . $this->options['title'] . '</h1>';
-       }
-
-       /**
-        * @access public
-        */
-       public function footer() {
-               if ( $this->done_footer ) {
-                       return;
-               }
-               $this->done_footer = true;
-               echo '</div>';
-       }
-
-       /**
-        *
-        * @param string|WP_Error $errors
-        */
-       public function error($errors) {
-               if ( ! $this->done_header )
-                       $this->header();
-               if ( is_string($errors) ) {
-                       $this->feedback($errors);
-               } elseif ( is_wp_error($errors) && $errors->get_error_code() ) {
-                       foreach ( $errors->get_error_messages() as $message ) {
-                               if ( $errors->get_error_data() && is_string( $errors->get_error_data() ) )
-                                       $this->feedback($message . ' ' . esc_html( strip_tags( $errors->get_error_data() ) ) );
-                               else
-                                       $this->feedback($message);
-                       }
-               }
-       }
-
-       /**
-        *
-        * @param string $string
-        */
-       public function feedback($string) {
-               if ( isset( $this->upgrader->strings[$string] ) )
-                       $string = $this->upgrader->strings[$string];
-
-               if ( strpos($string, '%') !== false ) {
-                       $args = func_get_args();
-                       $args = array_splice($args, 1);
-                       if ( $args ) {
-                               $args = array_map( 'strip_tags', $args );
-                               $args = array_map( 'esc_html', $args );
-                               $string = vsprintf($string, $args);
-                       }
-               }
-               if ( empty($string) )
-                       return;
-               show_message($string);
-       }
-
-       /**
-        * @access public
-        */
-       public function before() {}
-
-       /**
-        * @access public
-        */
-       public function after() {}
-
-       /**
-        * Output JavaScript that calls function to decrement the update counts.
-        *
-        * @since 3.9.0
-        *
-        * @param string $type Type of update count to decrement. Likely values include 'plugin',
-        *                     'theme', 'translation', etc.
-        */
-       protected function decrement_update_count( $type ) {
-               if ( ! $this->result || is_wp_error( $this->result ) || 'up_to_date' === $this->result ) {
-                       return;
-               }
-
-               if ( defined( 'IFRAME_REQUEST' ) ) {
-                       echo '<script type="text/javascript">
-                                       if ( window.postMessage && JSON ) {
-                                               window.parent.postMessage( JSON.stringify( { action: "decrementUpdateCount", upgradeType: "' . $type . '" } ), window.location.protocol + "//" + window.location.hostname );
-                                       }
-                               </script>';
-               } else {
-                       echo '<script type="text/javascript">
-                                       (function( wp ) {
-                                               if ( wp && wp.updates.decrementCount ) {
-                                                       wp.updates.decrementCount( "' . $type . '" );
-                                               }
-                                       })( window.wp );
-                               </script>';
-               }
-       }
-
-       /**
-        * @access public
-        */
-       public function bulk_header() {}
-
-       /**
-        * @access public
-        */
-       public function bulk_footer() {}
-}
-
-/**
- * Plugin Upgrader Skin for WordPress Plugin Upgrades.
- *
- * @package WordPress
- * @subpackage Upgrader
- * @since 2.8.0
- */
-class Plugin_Upgrader_Skin extends WP_Upgrader_Skin {
-       public $plugin = '';
-       public $plugin_active = false;
-       public $plugin_network_active = false;
-
-       /**
-        *
-        * @param array $args
-        */
-       public function __construct( $args = array() ) {
-               $defaults = array( 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => __('Update Plugin') );
-               $args = wp_parse_args($args, $defaults);
-
-               $this->plugin = $args['plugin'];
-
-               $this->plugin_active = is_plugin_active( $this->plugin );
-               $this->plugin_network_active = is_plugin_active_for_network( $this->plugin );
-
-               parent::__construct($args);
-       }
-
-       /**
-        * @access public
-        */
-       public function after() {
-               $this->plugin = $this->upgrader->plugin_info();
-               if ( !empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active ){
-                       // Currently used only when JS is off for a single plugin update?
-                       echo '<iframe title="' . esc_attr__( 'Update progress' ) . '" style="border:0;overflow:hidden" width="100%" height="170" src="' . wp_nonce_url( 'update.php?action=activate-plugin&networkwide=' . $this->plugin_network_active . '&plugin=' . urlencode( $this->plugin ), 'activate-plugin_' . $this->plugin ) . '"></iframe>';
-               }
-
-               $this->decrement_update_count( 'plugin' );
-
-               $update_actions =  array(
-                       'activate_plugin' => '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . urlencode( $this->plugin ), 'activate-plugin_' . $this->plugin) . '" target="_parent">' . __( 'Activate Plugin' ) . '</a>',
-                       'plugins_page' => '<a href="' . self_admin_url( 'plugins.php' ) . '" target="_parent">' . __( 'Return to Plugins page' ) . '</a>'
-               );
-               if ( $this->plugin_active || ! $this->result || is_wp_error( $this->result ) || ! current_user_can( 'activate_plugins' ) )
-                       unset( $update_actions['activate_plugin'] );
-
-               /**
-                * Filter the list of action links available following a single plugin update.
-                *
-                * @since 2.7.0
-                *
-                * @param array  $update_actions Array of plugin action links.
-                * @param string $plugin         Path to the plugin file.
-                */
-               $update_actions = apply_filters( 'update_plugin_complete_actions', $update_actions, $this->plugin );
-
-               if ( ! empty($update_actions) )
-                       $this->feedback(implode(' | ', (array)$update_actions));
-       }
-}
-
-/**
- * Plugin Upgrader Skin for WordPress Plugin Upgrades.
- *
- * @package WordPress
- * @subpackage Upgrader
- * @since 3.0.0
- */
-class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
-       public $in_loop = false;
-       /**
-        * @var string|false
-        */
-       public $error = false;
-
-       /**
-        *
-        * @param array $args
-        */
-       public function __construct($args = array()) {
-               $defaults = array( 'url' => '', 'nonce' => '' );
-               $args = wp_parse_args($args, $defaults);
-
-               parent::__construct($args);
-       }
-
-       /**
-        * @access public
-        */
-       public function add_strings() {
-               $this->upgrader->strings['skin_upgrade_start'] = __('The update process is starting. This process may take a while on some hosts, so please be patient.');
-               /* translators: 1: Title of an update, 2: Error message */
-               $this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while updating %1$s: %2$s');
-               /* translators: 1: Title of an update */
-               $this->upgrader->strings['skin_update_failed'] = __('The update of %1$s failed.');
-               /* translators: 1: Title of an update */
-               $this->upgrader->strings['skin_update_successful'] = __( '%1$s updated successfully.' ) . ' <a onclick="%2$s" href="#" class="hide-if-no-js"><span>' . __( 'Show Details' ) . '</span><span class="hidden">' . __( 'Hide Details' ) . '</span></a>';
-               $this->upgrader->strings['skin_upgrade_end'] = __('All updates have been completed.');
-       }
-
-       /**
-        * @param string $string
-        */
-       public function feedback($string) {
-               if ( isset( $this->upgrader->strings[$string] ) )
-                       $string = $this->upgrader->strings[$string];
-
-               if ( strpos($string, '%') !== false ) {
-                       $args = func_get_args();
-                       $args = array_splice($args, 1);
-                       if ( $args ) {
-                               $args = array_map( 'strip_tags', $args );
-                               $args = array_map( 'esc_html', $args );
-                               $string = vsprintf($string, $args);
-                       }
-               }
-               if ( empty($string) )
-                       return;
-               if ( $this->in_loop )
-                       echo "$string<br />\n";
-               else
-                       echo "<p>$string</p>\n";
-       }
-
-       /**
-        * @access public
-        */
-       public function header() {
-               // Nothing, This will be displayed within a iframe.
-       }
-
-       /**
-        * @access public
-        */
-       public function footer() {
-               // Nothing, This will be displayed within a iframe.
-       }
-
-       /**
-        *
-        * @param string|WP_Error $error
-        */
-       public function error($error) {
-               if ( is_string($error) && isset( $this->upgrader->strings[$error] ) )
-                       $this->error = $this->upgrader->strings[$error];
-
-               if ( is_wp_error($error) ) {
-                       $messages = array();
-                       foreach ( $error->get_error_messages() as $emessage ) {
-                               if ( $error->get_error_data() && is_string( $error->get_error_data() ) )
-                                       $messages[] = $emessage . ' ' . esc_html( strip_tags( $error->get_error_data() ) );
-                               else
-                                       $messages[] = $emessage;
-                       }
-                       $this->error = implode(', ', $messages);
-               }
-               echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>';
-       }
-
-       /**
-        * @access public
-        */
-       public function bulk_header() {
-               $this->feedback('skin_upgrade_start');
-       }
-
-       /**
-        * @access public
-        */
-       public function bulk_footer() {
-               $this->feedback('skin_upgrade_end');
-       }
-
-       /**
-        *
-        * @param string $title
-        */
-       public function before($title = '') {
-               $this->in_loop = true;
-               printf( '<h2>' . $this->upgrader->strings['skin_before_update_header'] . ' <span class="spinner waiting-' . $this->upgrader->update_current . '"></span></h2>', $title, $this->upgrader->update_current, $this->upgrader->update_count );
-               echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').css("display", "inline-block");</script>';
-               echo '<div class="update-messages hide-if-js" id="progress-' . esc_attr($this->upgrader->update_current) . '"><p>';
-               $this->flush_output();
-       }
-
-       /**
-        *
-        * @param string $title
-        */
-       public function after($title = '') {
-               echo '</p></div>';
-               if ( $this->error || ! $this->result ) {
-                       if ( $this->error ) {
-                               echo '<div class="error"><p>' . sprintf($this->upgrader->strings['skin_update_failed_error'], $title, '<strong>' . $this->error . '</strong>' ) . '</p></div>';
-                       } else {
-                               echo '<div class="error"><p>' . sprintf($this->upgrader->strings['skin_update_failed'], $title) . '</p></div>';
-                       }
-
-                       echo '<script type="text/javascript">jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').show();</script>';
-               }
-               if ( $this->result && ! is_wp_error( $this->result ) ) {
-                       if ( ! $this->error )
-                               echo '<div class="updated"><p>' . sprintf($this->upgrader->strings['skin_update_successful'], $title, 'jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').toggle();jQuery(\'span\', this).toggle(); return false;') . '</p></div>';
-                       echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>';
-               }
-
-               $this->reset();
-               $this->flush_output();
-       }
-
-       /**
-        * @access public
-        */
-       public function reset() {
-               $this->in_loop = false;
-               $this->error = false;
-       }
-
-       /**
-        * @access public
-        */
-       public function flush_output() {
-               wp_ob_end_flush_all();
-               flush();
-       }
-}
-
-class Bulk_Plugin_Upgrader_Skin extends Bulk_Upgrader_Skin {
-       public $plugin_info = array(); // Plugin_Upgrader::bulk() will fill this in.
-
-       public function add_strings() {
-               parent::add_strings();
-               $this->upgrader->strings['skin_before_update_header'] = __('Updating Plugin %1$s (%2$d/%3$d)');
-       }
-
-       /**
-        *
-        * @param string $title
-        */
-       public function before($title = '') {
-               parent::before($this->plugin_info['Title']);
-       }
-
-       /**
-        *
-        * @param string $title
-        */
-       public function after($title = '') {
-               parent::after($this->plugin_info['Title']);
-               $this->decrement_update_count( 'plugin' );
-       }
-
-       /**
-        * @access public
-        */
-       public function bulk_footer() {
-               parent::bulk_footer();
-               $update_actions =  array(
-                       'plugins_page' => '<a href="' . self_admin_url( 'plugins.php' ) . '" target="_parent">' . __( 'Return to Plugins page' ) . '</a>',
-                       'updates_page' => '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>'
-               );
-               if ( ! current_user_can( 'activate_plugins' ) )
-                       unset( $update_actions['plugins_page'] );
-
-               /**
-                * Filter the list of action links available following bulk plugin updates.
-                *
-                * @since 3.0.0
-                *
-                * @param array $update_actions Array of plugin action links.
-                * @param array $plugin_info    Array of information for the last-updated plugin.
-                */
-               $update_actions = apply_filters( 'update_bulk_plugins_complete_actions', $update_actions, $this->plugin_info );
-
-               if ( ! empty($update_actions) )
-                       $this->feedback(implode(' | ', (array)$update_actions));
-       }
-}
-
-class Bulk_Theme_Upgrader_Skin extends Bulk_Upgrader_Skin {
-       public $theme_info = array(); // Theme_Upgrader::bulk() will fill this in.
-
-       public function add_strings() {
-               parent::add_strings();
-               $this->upgrader->strings['skin_before_update_header'] = __('Updating Theme %1$s (%2$d/%3$d)');
-       }
-
-       /**
-        *
-        * @param string $title
-        */
-       public function before($title = '') {
-               parent::before( $this->theme_info->display('Name') );
-       }
-
-       /**
-        *
-        * @param string $title
-        */
-       public function after($title = '') {
-               parent::after( $this->theme_info->display('Name') );
-               $this->decrement_update_count( 'theme' );
-       }
-
-       /**
-        * @access public
-        */
-       public function bulk_footer() {
-               parent::bulk_footer();
-               $update_actions =  array(
-                       'themes_page' => '<a href="' . self_admin_url( 'themes.php' ) . '" target="_parent">' . __( 'Return to Themes page' ) . '</a>',
-                       'updates_page' => '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>'
-               );
-               if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) )
-                       unset( $update_actions['themes_page'] );
-
-               /**
-                * Filter the list of action links available following bulk theme updates.
-                *
-                * @since 3.0.0
-                *
-                * @param array $update_actions Array of theme action links.
-                * @param array $theme_info     Array of information for the last-updated theme.
-                */
-               $update_actions = apply_filters( 'update_bulk_theme_complete_actions', $update_actions, $this->theme_info );
-
-               if ( ! empty($update_actions) )
-                       $this->feedback(implode(' | ', (array)$update_actions));
-       }
-}
-
-/**
- * Plugin Installer Skin for WordPress Plugin Installer.
- *
- * @package WordPress
- * @subpackage Upgrader
- * @since 2.8.0
- */
-class Plugin_Installer_Skin extends WP_Upgrader_Skin {
-       public $api;
-       public $type;
-
-       /**
-        *
-        * @param array $args
-        */
-       public function __construct($args = array()) {
-               $defaults = array( 'type' => 'web', 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => '' );
-               $args = wp_parse_args($args, $defaults);
-
-               $this->type = $args['type'];
-               $this->api = isset($args['api']) ? $args['api'] : array();
-
-               parent::__construct($args);
-       }
-
-       /**
-        * @access public
-        */
-       public function before() {
-               if ( !empty($this->api) )
-                       $this->upgrader->strings['process_success'] = sprintf( __('Successfully installed the plugin <strong>%s %s</strong>.'), $this->api->name, $this->api->version);
-       }
-
-       /**
-        * @access public
-        */
-       public function after() {
-               $plugin_file = $this->upgrader->plugin_info();
-
-               $install_actions = array();
-
-               $from = isset($_GET['from']) ? wp_unslash( $_GET['from'] ) : 'plugins';
-
-               if ( 'import' == $from )
-                       $install_actions['activate_plugin'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;from=import&amp;plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ) . '" target="_parent">' . __( 'Activate Plugin &amp; Run Importer' ) . '</a>';
-               else
-                       $install_actions['activate_plugin'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ) . '" target="_parent">' . __( 'Activate Plugin' ) . '</a>';
-
-               if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) {
-                       $install_actions['network_activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;networkwide=1&amp;plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ) . '" target="_parent">' . __( 'Network Activate' ) . '</a>';
-                       unset( $install_actions['activate_plugin'] );
-               }
-
-               if ( 'import' == $from ) {
-                       $install_actions['importers_page'] = '<a href="' . admin_url( 'import.php' ) . '" target="_parent">' . __( 'Return to Importers' ) . '</a>';
-               } elseif ( $this->type == 'web' ) {
-                       $install_actions['plugins_page'] = '<a href="' . self_admin_url( 'plugin-install.php' ) . '" target="_parent">' . __( 'Return to Plugin Installer' ) . '</a>';
-               } else {
-                       $install_actions['plugins_page'] = '<a href="' . self_admin_url( 'plugins.php' ) . '" target="_parent">' . __( 'Return to Plugins page' ) . '</a>';
-               }
-
-               if ( ! $this->result || is_wp_error($this->result) ) {
-                       unset( $install_actions['activate_plugin'], $install_actions['network_activate'] );
-               } elseif ( ! current_user_can( 'activate_plugins' ) ) {
-                       unset( $install_actions['activate_plugin'] );
-               }
-
-               /**
-                * Filter the list of action links available following a single plugin installation.
-                *
-                * @since 2.7.0
-                *
-                * @param array  $install_actions Array of plugin action links.
-                * @param object $api             Object containing WordPress.org API plugin data. Empty
-                *                                for non-API installs, such as when a plugin is installed
-                *                                via upload.
-                * @param string $plugin_file     Path to the plugin file.
-                */
-               $install_actions = apply_filters( 'install_plugin_complete_actions', $install_actions, $this->api, $plugin_file );
-
-               if ( ! empty($install_actions) )
-                       $this->feedback(implode(' | ', (array)$install_actions));
-       }
-}
-
-/**
- * Theme Installer Skin for the WordPress Theme Installer.
- *
- * @package WordPress
- * @subpackage Upgrader
- * @since 2.8.0
- */
-class Theme_Installer_Skin extends WP_Upgrader_Skin {
-       public $api;
-       public $type;
-
-       /**
-        *
-        * @param array $args
-        */
-       public function __construct($args = array()) {
-               $defaults = array( 'type' => 'web', 'url' => '', 'theme' => '', 'nonce' => '', 'title' => '' );
-               $args = wp_parse_args($args, $defaults);
-
-               $this->type = $args['type'];
-               $this->api = isset($args['api']) ? $args['api'] : array();
-
-               parent::__construct($args);
-       }
-
-       /**
-        * @access public
-        */
-       public function before() {
-               if ( !empty($this->api) )
-                       $this->upgrader->strings['process_success'] = sprintf( $this->upgrader->strings['process_success_specific'], $this->api->name, $this->api->version);
-       }
-
-       /**
-        * @access public
-        */
-       public function after() {
-               if ( empty($this->upgrader->result['destination_name']) )
-                       return;
-
-               $theme_info = $this->upgrader->theme_info();
-               if ( empty( $theme_info ) )
-                       return;
-
-               $name       = $theme_info->display('Name');
-               $stylesheet = $this->upgrader->result['destination_name'];
-               $template   = $theme_info->get_template();
-
-               $activate_link = add_query_arg( array(
-                       'action'     => 'activate',
-                       'template'   => urlencode( $template ),
-                       'stylesheet' => urlencode( $stylesheet ),
-               ), admin_url('themes.php') );
-               $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
-
-               $install_actions = array();
-
-               if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
-                       $install_actions['preview'] = '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Live Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Live Preview &#8220;%s&#8221;' ), $name ) . '</span></a>';
-               }
-               $install_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink"><span aria-hidden="true">' . __( 'Activate' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Activate &#8220;%s&#8221;' ), $name ) . '</span></a>';
-
-               if ( is_network_admin() && current_user_can( 'manage_network_themes' ) )
-                       $install_actions['network_enable'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=enable&amp;theme=' . urlencode( $stylesheet ), 'enable-theme_' . $stylesheet ) ) . '" target="_parent">' . __( 'Network Enable' ) . '</a>';
-
-               if ( $this->type == 'web' )
-                       $install_actions['themes_page'] = '<a href="' . self_admin_url( 'theme-install.php' ) . '" target="_parent">' . __( 'Return to Theme Installer' ) . '</a>';
-               elseif ( current_user_can( 'switch_themes' ) || current_user_can( 'edit_theme_options' ) )
-                       $install_actions['themes_page'] = '<a href="' . self_admin_url( 'themes.php' ) . '" target="_parent">' . __( 'Return to Themes page' ) . '</a>';
-
-               if ( ! $this->result || is_wp_error($this->result) || is_network_admin() || ! current_user_can( 'switch_themes' ) )
-                       unset( $install_actions['activate'], $install_actions['preview'] );
-
-               /**
-                * Filter the list of action links available following a single theme installation.
-                *
-                * @since 2.8.0
-                *
-                * @param array    $install_actions Array of theme action links.
-                * @param object   $api             Object containing WordPress.org API theme data.
-                * @param string   $stylesheet      Theme directory name.
-                * @param WP_Theme $theme_info      Theme object.
-                */
-               $install_actions = apply_filters( 'install_theme_complete_actions', $install_actions, $this->api, $stylesheet, $theme_info );
-               if ( ! empty($install_actions) )
-                       $this->feedback(implode(' | ', (array)$install_actions));
-       }
-}
-
-/**
- * Theme Upgrader Skin for WordPress Theme Upgrades.
- *
- * @package WordPress
- * @subpackage Upgrader
- * @since 2.8.0
- */
-class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
-       public $theme = '';
-
-       /**
-        *
-        * @param array $args
-        */
-       public function __construct($args = array()) {
-               $defaults = array( 'url' => '', 'theme' => '', 'nonce' => '', 'title' => __('Update Theme') );
-               $args = wp_parse_args($args, $defaults);
-
-               $this->theme = $args['theme'];
-
-               parent::__construct($args);
-       }
-
-       /**
-        * @access public
-        */
-       public function after() {
-               $this->decrement_update_count( 'theme' );
-
-               $update_actions = array();
-               if ( ! empty( $this->upgrader->result['destination_name'] ) && $theme_info = $this->upgrader->theme_info() ) {
-                       $name       = $theme_info->display('Name');
-                       $stylesheet = $this->upgrader->result['destination_name'];
-                       $template   = $theme_info->get_template();
-
-                       $activate_link = add_query_arg( array(
-                               'action'     => 'activate',
-                               'template'   => urlencode( $template ),
-                               'stylesheet' => urlencode( $stylesheet ),
-                       ), admin_url('themes.php') );
-                       $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
-
-                       if ( get_stylesheet() == $stylesheet ) {
-                               if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
-                                       $update_actions['preview']  = '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Customize' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Customize &#8220;%s&#8221;' ), $name ) . '</span></a>';
-                               }
-                       } elseif ( current_user_can( 'switch_themes' ) ) {
-                               if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
-                                       $update_actions['preview'] = '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Live Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Live Preview &#8220;%s&#8221;' ), $name ) . '</span></a>';
-                               }
-                               $update_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink"><span aria-hidden="true">' . __( 'Activate' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Activate &#8220;%s&#8221;' ), $name ) . '</span></a>';
-                       }
-
-                       if ( ! $this->result || is_wp_error( $this->result ) || is_network_admin() )
-                               unset( $update_actions['preview'], $update_actions['activate'] );
-               }
-
-               $update_actions['themes_page'] = '<a href="' . self_admin_url( 'themes.php' ) . '" target="_parent">' . __( 'Return to Themes page' ) . '</a>';
-
-               /**
-                * Filter the list of action links available following a single theme update.
-                *
-                * @since 2.8.0
-                *
-                * @param array  $update_actions Array of theme action links.
-                * @param string $theme          Theme directory name.
-                */
-               $update_actions = apply_filters( 'update_theme_complete_actions', $update_actions, $this->theme );
-
-               if ( ! empty($update_actions) )
-                       $this->feedback(implode(' | ', (array)$update_actions));
-       }
-}
-
-/**
- * Translation Upgrader Skin for WordPress Translation Upgrades.
- *
- * @package WordPress
- * @subpackage Upgrader
- * @since 3.7.0
- */
-class Language_Pack_Upgrader_Skin extends WP_Upgrader_Skin {
-       public $language_update = null;
-       public $done_header = false;
-       public $done_footer = false;
-       public $display_footer_actions = true;
-
-       /**
-        *
-        * @param array $args
-        */
-       public function __construct( $args = array() ) {
-               $defaults = array( 'url' => '', 'nonce' => '', 'title' => __( 'Update Translations' ), 'skip_header_footer' => false );
-               $args = wp_parse_args( $args, $defaults );
-               if ( $args['skip_header_footer'] ) {
-                       $this->done_header = true;
-                       $this->done_footer = true;
-                       $this->display_footer_actions = false;
-               }
-               parent::__construct( $args );
-       }
-
-       /**
-        * @access public
-        */
-       public function before() {
-               $name = $this->upgrader->get_name_for_update( $this->language_update );
-
-               echo '<div class="update-messages lp-show-latest">';
-
-               printf( '<h2>' . __( 'Updating translations for %1$s (%2$s)&#8230;' ) . '</h2>', $name, $this->language_update->language );
-       }
-
-       /**
-        *
-        * @param string|WP_Error $error
-        */
-       public function error( $error ) {
-               echo '<div class="lp-error">';
-               parent::error( $error );
-               echo '</div>';
-       }
-
-       /**
-        * @access public
-        */
-       public function after() {
-               echo '</div>';
-       }
-
-       /**
-        * @access public
-        */
-       public function bulk_footer() {
-               $this->decrement_update_count( 'translation' );
-               $update_actions = array();
-               $update_actions['updates_page'] = '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>';
-
-               /**
-                * Filter the list of action links available following a translations update.
-                *
-                * @since 3.7.0
-                *
-                * @param array $update_actions Array of translations update links.
-                */
-               $update_actions = apply_filters( 'update_translations_complete_actions', $update_actions );
-
-               if ( $update_actions && $this->display_footer_actions )
-                       $this->feedback( implode( ' | ', $update_actions ) );
-       }
-}
-
-/**
- * Upgrader Skin for Automatic WordPress Upgrades
- *
- * This skin is designed to be used when no output is intended, all output
- * is captured and stored for the caller to process and log/email/discard.
- *
- * @package WordPress
- * @subpackage Upgrader
- * @since 3.7.0
- */
-class Automatic_Upgrader_Skin extends WP_Upgrader_Skin {
-       protected $messages = array();
+/** WP_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader-skin.php';
 
-       /**
-        *
-        * @param bool   $error
-        * @param string $context
-        * @param bool   $allow_relaxed_file_ownership
-        * @return bool
-        */
-       public function request_filesystem_credentials( $error = false, $context = '', $allow_relaxed_file_ownership = false ) {
-               if ( $context ) {
-                       $this->options['context'] = $context;
-               }
-               // TODO: fix up request_filesystem_credentials(), or split it, to allow us to request a no-output version
-               // This will output a credentials form in event of failure, We don't want that, so just hide with a buffer
-               ob_start();
-               $result = parent::request_filesystem_credentials( $error, $context, $allow_relaxed_file_ownership );
-               ob_end_clean();
-               return $result;
-       }
+/** Plugin_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-plugin-upgrader-skin.php';
 
-       /**
-        * @access public
-        *
-        * @return array
-        */
-       public function get_upgrade_messages() {
-               return $this->messages;
-       }
+/** Theme_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-theme-upgrader-skin.php';
 
-       /**
-        * @param string|array|WP_Error $data
-        */
-       public function feedback( $data ) {
-               if ( is_wp_error( $data ) ) {
-                       $string = $data->get_error_message();
-               } elseif ( is_array( $data ) ) {
-                       return;
-               } else {
-                       $string = $data;
-               }
-               if ( ! empty( $this->upgrader->strings[ $string ] ) )
-                       $string = $this->upgrader->strings[ $string ];
+/** Bulk_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-bulk-upgrader-skin.php';
 
-               if ( strpos( $string, '%' ) !== false ) {
-                       $args = func_get_args();
-                       $args = array_splice( $args, 1 );
-                       if ( ! empty( $args ) )
-                               $string = vsprintf( $string, $args );
-               }
+/** Bulk_Plugin_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-bulk-plugin-upgrader-skin.php';
 
-               $string = trim( $string );
+/** Bulk_Theme_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-bulk-theme-upgrader-skin.php';
 
-               // Only allow basic HTML in the messages, as it'll be used in emails/logs rather than direct browser output.
-               $string = wp_kses( $string, array(
-                       'a' => array(
-                               'href' => true
-                       ),
-                       'br' => true,
-                       'em' => true,
-                       'strong' => true,
-               ) );
+/** Plugin_Installer_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-plugin-installer-skin.php';
 
-               if ( empty( $string ) )
-                       return;
+/** Theme_Installer_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-theme-installer-skin.php';
 
-               $this->messages[] = $string;
-       }
+/** Language_Pack_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-language-pack-upgrader-skin.php';
 
-       /**
-        * @access public
-        */
-       public function header() {
-               ob_start();
-       }
+/** Automatic_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-automatic-upgrader-skin.php';
 
-       /**
-        * @access public
-        */
-       public function footer() {
-               $output = ob_get_clean();
-               if ( ! empty( $output ) )
-                       $this->feedback( $output );
-       }
-}
+/** WP_Ajax_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-wp-ajax-upgrader-skin.php';
index 246f6467609750865faf331078ccc316b12a12ed..485197c49ac213bc20b17484990614134f08de49 100644 (file)
@@ -1,17 +1,46 @@
 <?php
 /**
- * Upgrade API: WP_Upgrader, Plugin_Upgrader, Theme_Upgrader, Language_Pack_Upgrader,
- * Core_Upgrader, File_Upload_Upgrader, and WP_Automatic_Updater classes
+ * Upgrade API: WP_Upgrader class
  *
- * This set of classes are designed to be used to upgrade/install a local set of files
- * on the filesystem via the Filesystem Abstraction classes.
+ * Requires skin classes and WP_Upgrader subclasses for backward compatibility.
  *
  * @package WordPress
  * @subpackage Upgrader
  * @since 2.8.0
  */
 
-require ABSPATH . 'wp-admin/includes/class-wp-upgrader-skins.php';
+/** WP_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader-skin.php';
+
+/** Plugin_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-plugin-upgrader-skin.php';
+
+/** Theme_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-theme-upgrader-skin.php';
+
+/** Bulk_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-bulk-upgrader-skin.php';
+
+/** Bulk_Plugin_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-bulk-plugin-upgrader-skin.php';
+
+/** Bulk_Theme_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-bulk-theme-upgrader-skin.php';
+
+/** Plugin_Installer_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-plugin-installer-skin.php';
+
+/** Theme_Installer_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-theme-installer-skin.php';
+
+/** Language_Pack_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-language-pack-upgrader-skin.php';
+
+/** Automatic_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-automatic-upgrader-skin.php';
+
+/** WP_Ajax_Upgrader_Skin class */
+require_once ABSPATH . 'wp-admin/includes/class-wp-ajax-upgrader-skin.php';
 
 /**
  * Core class used for upgrading/installing a local set of files via
@@ -26,7 +55,7 @@ class WP_Upgrader {
         *
         * @since 2.8.0
         * @access public
-        * @var string $strings
+        * @var array $strings
         */
        public $strings = array();
 
@@ -35,16 +64,16 @@ class WP_Upgrader {
         *
         * @since 2.8.0
         * @access public
-        * @var WP_Upgrader_Skin $skin
+        * @var Automatic_Upgrader_Skin|WP_Upgrader_Skin $skin
         */
        public $skin = null;
 
        /**
         * The result of the installation.
         *
-        * This is set by {@see WP_Upgrader::install_package()}, only when the package is installed
-        * successfully. It will then be an array, unless a {@see WP_Error} is returned by the
-        * {@see 'upgrader_post_install'} filter. In that case, the `WP_Error` will be assigned to
+        * This is set by WP_Upgrader::install_package(), only when the package is installed
+        * successfully. It will then be an array, unless a WP_Error is returned by the
+        * {@see 'upgrader_post_install'} filter. In that case, the WP_Error will be assigned to
         * it.
         *
         * @since 2.8.0
@@ -93,7 +122,7 @@ class WP_Upgrader {
         * @since 2.8.0
         * @access public
         *
-        * @param WP_Upgrader_Skin $skin The upgrader skin to use. Default is a {@see WP_Upgrader_Skin}
+        * @param WP_Upgrader_Skin $skin The upgrader skin to use. Default is a WP_Upgrader_Skin.
         *                               instance.
         */
        public function __construct( $skin = null ) {
@@ -124,13 +153,13 @@ class WP_Upgrader {
         * @access public
         */
        public function generic_strings() {
-               $this->strings['bad_request'] = __('Invalid Data provided.');
+               $this->strings['bad_request'] = __('Invalid data provided.');
                $this->strings['fs_unavailable'] = __('Could not access filesystem.');
                $this->strings['fs_error'] = __('Filesystem error.');
-               $this->strings['fs_no_root_dir'] = __('Unable to locate WordPress Root directory.');
-               $this->strings['fs_no_content_dir'] = __('Unable to locate WordPress Content directory (wp-content).');
-               $this->strings['fs_no_plugins_dir'] = __('Unable to locate WordPress Plugin directory.');
-               $this->strings['fs_no_themes_dir'] = __('Unable to locate WordPress Theme directory.');
+               $this->strings['fs_no_root_dir'] = __('Unable to locate WordPress root directory.');
+               $this->strings['fs_no_content_dir'] = __('Unable to locate WordPress content directory (wp-content).');
+               $this->strings['fs_no_plugins_dir'] = __('Unable to locate WordPress plugin directory.');
+               $this->strings['fs_no_themes_dir'] = __('Unable to locate WordPress theme directory.');
                /* translators: %s: directory name */
                $this->strings['fs_no_folder'] = __('Unable to locate needed folder (%s).');
 
@@ -155,11 +184,11 @@ class WP_Upgrader {
         * @global WP_Filesystem_Base $wp_filesystem Subclass
         *
         * @param array $directories                  Optional. A list of directories. If any of these do
-        *                                            not exist, a {@see WP_Error} object will be returned.
+        *                                            not exist, a WP_Error object will be returned.
         *                                            Default empty array.
         * @param bool  $allow_relaxed_file_ownership Whether to allow relaxed file ownership.
         *                                            Default false.
-        * @return bool|WP_Error True if able to connect, false or a {@see WP_Error} otherwise.
+        * @return bool|WP_Error True if able to connect, false or a WP_Error otherwise.
         */
        public function fs_connect( $directories = array(), $allow_relaxed_file_ownership = false ) {
                global $wp_filesystem;
@@ -218,12 +247,12 @@ class WP_Upgrader {
         *
         * @param string $package The URI of the package. If this is the full path to an
         *                        existing local file, it will be returned untouched.
-        * @return string|WP_Error The full path to the downloaded package file, or a {@see WP_Error} object.
+        * @return string|WP_Error The full path to the downloaded package file, or a WP_Error object.
         */
        public function download_package( $package ) {
 
                /**
-                * Filter whether to return the package.
+                * Filters whether to return the package.
                 *
                 * @since 3.7.0
                 * @access public
@@ -264,7 +293,7 @@ class WP_Upgrader {
         * @param string $package        Full path to the package file.
         * @param bool   $delete_package Optional. Whether to delete the package file after attempting
         *                               to unpack it. Default true.
-        * @return string|WP_Error The path to the unpacked contents, or a {@see WP_Error} on failure.
+        * @return string|WP_Error The path to the unpacked contents, or a WP_Error on failure.
         */
        public function unpack_package( $package, $delete_package = true ) {
                global $wp_filesystem;
@@ -391,10 +420,10 @@ class WP_Upgrader {
         *     @type bool   $abort_if_destination_exists Whether to abort the installation if
         *                                               the destination folder already exists. Default true.
         *     @type array  $hook_extra                  Extra arguments to pass to the filter hooks called by
-        *                                               {@see WP_Upgrader::install_package()}. Default empty array.
+        *                                               WP_Upgrader::install_package(). Default empty array.
         * }
         *
-        * @return array|WP_Error The result (also stored in `WP_Upgrader:$result`), or a {@see WP_Error} on failure.
+        * @return array|WP_Error The result (also stored in `WP_Upgrader::$result`), or a WP_Error on failure.
         */
        public function install_package( $args = array() ) {
                global $wp_filesystem, $wp_theme_directories;
@@ -423,7 +452,7 @@ class WP_Upgrader {
                $this->skin->feedback( 'installing_package' );
 
                /**
-                * Filter the install response before the installation has started.
+                * Filters the install response before the installation has started.
                 *
                 * Returning a truthy value, or one that could be evaluated as a WP_Error
                 * will effectively short-circuit the installation, returning that value
@@ -457,7 +486,7 @@ class WP_Upgrader {
                }
 
                /**
-                * Filter the source file location for the upgrade package.
+                * Filters the source file location for the upgrade package.
                 *
                 * @since 2.8.0
                 * @since 4.4.0 The $hook_extra parameter became available.
@@ -503,7 +532,7 @@ class WP_Upgrader {
                        $removed = $this->clear_destination( $remote_destination );
 
                        /**
-                        * Filter whether the upgrader cleared the destination.
+                        * Filters whether the upgrader cleared the destination.
                         *
                         * @since 2.8.0
                         *
@@ -555,7 +584,7 @@ class WP_Upgrader {
                $this->result = compact( 'source', 'source_files', 'destination', 'destination_name', 'local_destination', 'remote_destination', 'clear_destination' );
 
                /**
-                * Filter the install response after the installation has finished.
+                * Filters the install response after the installation has finished.
                 *
                 * @since 2.8.0
                 *
@@ -600,10 +629,10 @@ class WP_Upgrader {
         *                                               should be false. Default true.
         *     @type bool   $is_multi                    Whether this run is one of multiple upgrade/install
         *                                               actions being performed in bulk. When true, the skin
-        *                                               {@see WP_Upgrader::header()} and {@see WP_Upgrader::footer()}
+        *                                               WP_Upgrader::header() and WP_Upgrader::footer()
         *                                               aren't called. Default false.
         *     @type array  $hook_extra                  Extra arguments to pass to the filter hooks called by
-        *                                               {@see WP_Upgrader::run()}.
+        *                                               WP_Upgrader::run().
         * }
         * @return array|false|WP_error The result from self::install_package() on success, otherwise a WP_Error,
         *                              or false if unable to connect to the filesystem.
@@ -623,7 +652,9 @@ class WP_Upgrader {
                $options = wp_parse_args( $options, $defaults );
 
                /**
-                * Filter the package options before running an update.
+                * Filters the package options before running an update.
+                *
+                * See also {@see 'upgrader_process_complete'}.
                 *
                 * @since 4.3.0
                 *
@@ -636,7 +667,18 @@ class WP_Upgrader {
                 *     @type bool   $clear_working               Clear the working resource.
                 *     @type bool   $abort_if_destination_exists Abort if the Destination directory exists.
                 *     @type bool   $is_multi                    Whether the upgrader is running multiple times.
-                *     @type array  $hook_extra                  Extra hook arguments.
+                *     @type array  $hook_extra {
+                *         Extra hook arguments.
+                *
+                *         @type string $action               Type of action. Default 'update'.
+                *         @type string $type                 Type of update process. Accepts 'plugin', 'theme', or 'core'.
+                *         @type bool   $bulk                 Whether the update process is a bulk update. Default true.
+                *         @type string $plugin               The base plugin path from the plugins directory.
+                *         @type string $theme                The stylesheet or template name of the theme.
+                *         @type string $language_update_type The language pack update type. Accepts 'plugin', 'theme',
+                *                                            or 'core'.
+                *         @type object $language_update      The language pack update offer.
+                *     }
                 * }
                 */
                $options = apply_filters( 'upgrader_package_options', $options );
@@ -716,8 +758,38 @@ class WP_Upgrader {
 
                if ( ! $options['is_multi'] ) {
 
-                       /** This action is documented in wp-admin/includes/class-wp-upgrader.php */
+                       /**
+                        * Fires when the upgrader process is complete.
+                        *
+                        * See also {@see 'upgrader_package_options'}.
+                        *
+                        * @since 3.6.0
+                        * @since 3.7.0 Added to WP_Upgrader::run().
+                        * @since 4.6.0 `$translations` was added as a possible argument to `$hook_extra`.
+                        *
+                        * @param WP_Upgrader $this WP_Upgrader instance. In other contexts, $this, might be a
+                        *                          Theme_Upgrader, Plugin_Upgrader, Core_Upgrade, or Language_Pack_Upgrader instance.
+                        * @param array       $hook_extra {
+                        *     Array of bulk item update data.
+                        *
+                        *     @type string $action       Type of action. Default 'update'.
+                        *     @type string $type         Type of update process. Accepts 'plugin', 'theme', 'translation', or 'core'.
+                        *     @type bool   $bulk         Whether the update process is a bulk update. Default true.
+                        *     @type array  $plugins      Array of the basename paths of the plugins' main files.
+                        *     @type array  $themes       The theme slugs.
+                        *     @type array  $translations {
+                        *         Array of translations update data.
+                        *
+                        *         @type string $language The locale the translation is for.
+                        *         @type string $type     Type of translation. Accepts 'plugin', 'theme', or 'core'.
+                        *         @type string $slug     Text domain the translation is for. The slug of a theme/plugin or
+                        *                                'default' for core translations.
+                        *         @type string $version  The version of a theme, plugin, or core.
+                        *     }
+                        * }
+                        */
                        do_action( 'upgrader_process_complete', $this, $options['hook_extra'] );
+
                        $this->skin->footer();
                }
 
@@ -816,2792 +888,20 @@ class WP_Upgrader {
 
 }
 
-/**
- * Core class used for upgrading/installing plugins.
- *
- * It is designed to upgrade/install plugins from a local zip, remote zip URL,
- * or uploaded zip file.
- *
- * @since 2.8.0
- *
- * @see WP_Upgrader
- */
-class Plugin_Upgrader extends WP_Upgrader {
-
-       /**
-        * Plugin upgrade result.
-        *
-        * @since 2.8.0
-        * @access public
-        * @var array|WP_Error $result
-        *
-        * @see WP_Upgrader::$result
-        */
-       public $result;
-
-       /**
-        * Whether a bulk upgrade/install is being performed.
-        *
-        * @since 2.9.0
-        * @access public
-        * @var bool $bulk
-        */
-       public $bulk = false;
-
-       /**
-        * Initialize the upgrade strings.
-        *
-        * @since 2.8.0
-        * @access public
-        */
-       public function upgrade_strings() {
-               $this->strings['up_to_date'] = __('The plugin is at the latest version.');
-               $this->strings['no_package'] = __('Update package not available.');
-               $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>&#8230;');
-               $this->strings['unpack_package'] = __('Unpacking the update&#8230;');
-               $this->strings['remove_old'] = __('Removing the old version of the plugin&#8230;');
-               $this->strings['remove_old_failed'] = __('Could not remove the old plugin.');
-               $this->strings['process_failed'] = __('Plugin update failed.');
-               $this->strings['process_success'] = __('Plugin updated successfully.');
-               $this->strings['process_bulk_success'] = __('Plugins updated successfully.');
-       }
-
-       /**
-        * Initialize the install strings.
-        *
-        * @since 2.8.0
-        * @access public
-        */
-       public function install_strings() {
-               $this->strings['no_package'] = __('Install package not available.');
-               $this->strings['downloading_package'] = __('Downloading install package from <span class="code">%s</span>&#8230;');
-               $this->strings['unpack_package'] = __('Unpacking the package&#8230;');
-               $this->strings['installing_package'] = __('Installing the plugin&#8230;');
-               $this->strings['no_files'] = __('The plugin contains no files.');
-               $this->strings['process_failed'] = __('Plugin install failed.');
-               $this->strings['process_success'] = __('Plugin installed successfully.');
-       }
-
-       /**
-        * Install a plugin package.
-        *
-        * @since 2.8.0
-        * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional.
-        * @access public
-        *
-        * @param string $package The full local path or URI of the package.
-        * @param array  $args {
-        *     Optional. Other arguments for installing a plugin package. Default empty array.
-        *
-        *     @type bool $clear_update_cache Whether to clear the plugin updates cache if successful.
-        *                                    Default true.
-        * }
-        * @return bool|WP_Error True if the install was successful, false or a WP_Error otherwise.
-        */
-       public function install( $package, $args = array() ) {
-
-               $defaults = array(
-                       'clear_update_cache' => true,
-               );
-               $parsed_args = wp_parse_args( $args, $defaults );
-
-               $this->init();
-               $this->install_strings();
-
-               add_filter('upgrader_source_selection', array($this, 'check_package') );
-               // Clear cache so wp_update_plugins() knows about the new plugin.
-               add_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9, 0 );
-
-               $this->run( array(
-                       'package' => $package,
-                       'destination' => WP_PLUGIN_DIR,
-                       'clear_destination' => false, // Do not overwrite files.
-                       'clear_working' => true,
-                       'hook_extra' => array(
-                               'type' => 'plugin',
-                               'action' => 'install',
-                       )
-               ) );
-
-               remove_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9 );
-               remove_filter('upgrader_source_selection', array($this, 'check_package') );
-
-               if ( ! $this->result || is_wp_error($this->result) )
-                       return $this->result;
-
-               // Force refresh of plugin update information
-               wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
-
-               return true;
-       }
-
-       /**
-        * Upgrade a plugin.
-        *
-        * @since 2.8.0
-        * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional.
-        * @access public
-        *
-        * @param string $plugin The basename path to the main plugin file.
-        * @param array  $args {
-        *     Optional. Other arguments for upgrading a plugin package. Default empty array.
-        *
-        *     @type bool $clear_update_cache Whether to clear the plugin updates cache if successful.
-        *                                    Default true.
-        * }
-        * @return bool|WP_Error True if the upgrade was successful, false or a {@see WP_Error} object otherwise.
-        */
-       public function upgrade( $plugin, $args = array() ) {
-
-               $defaults = array(
-                       'clear_update_cache' => true,
-               );
-               $parsed_args = wp_parse_args( $args, $defaults );
-
-               $this->init();
-               $this->upgrade_strings();
-
-               $current = get_site_transient( 'update_plugins' );
-               if ( !isset( $current->response[ $plugin ] ) ) {
-                       $this->skin->before();
-                       $this->skin->set_result(false);
-                       $this->skin->error('up_to_date');
-                       $this->skin->after();
-                       return false;
-               }
-
-               // Get the URL to the zip file
-               $r = $current->response[ $plugin ];
-
-               add_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade'), 10, 2);
-               add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4);
-               //'source_selection' => array($this, 'source_selection'), //there's a trac ticket to move up the directory for zip's which are made a bit differently, useful for non-.org plugins.
-
-               $this->run( array(
-                       'package' => $r->package,
-                       'destination' => WP_PLUGIN_DIR,
-                       'clear_destination' => true,
-                       'clear_working' => true,
-                       'hook_extra' => array(
-                               'plugin' => $plugin,
-                               'type' => 'plugin',
-                               'action' => 'update',
-                       ),
-               ) );
-
-               // Cleanup our hooks, in case something else does a upgrade on this connection.
-               remove_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade'));
-               remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'));
-
-               if ( ! $this->result || is_wp_error($this->result) )
-                       return $this->result;
-
-               // Force refresh of plugin update information
-               wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
-
-               return true;
-       }
-
-       /**
-        * Bulk upgrade several plugins at once.
-        *
-        * @since 2.8.0
-        * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional.
-        * @access public
-        *
-        * @param array $plugins Array of the basename paths of the plugins' main files.
-        * @param array $args {
-        *     Optional. Other arguments for upgrading several plugins at once. Default empty array.
-        *
-        *     @type bool $clear_update_cache Whether to clear the plugin updates cache if successful.
-        *                                    Default true.
-        * }
-        * @return array|false An array of results indexed by plugin file, or false if unable to connect to the filesystem.
-        */
-       public function bulk_upgrade( $plugins, $args = array() ) {
-
-               $defaults = array(
-                       'clear_update_cache' => true,
-               );
-               $parsed_args = wp_parse_args( $args, $defaults );
-
-               $this->init();
-               $this->bulk = true;
-               $this->upgrade_strings();
-
-               $current = get_site_transient( 'update_plugins' );
-
-               add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4);
-
-               $this->skin->header();
-
-               // Connect to the Filesystem first.
-               $res = $this->fs_connect( array(WP_CONTENT_DIR, WP_PLUGIN_DIR) );
-               if ( ! $res ) {
-                       $this->skin->footer();
-                       return false;
-               }
-
-               $this->skin->bulk_header();
-
-               /*
-                * Only start maintenance mode if:
-                * - running Multisite and there are one or more plugins specified, OR
-                * - a plugin with an update available is currently active.
-                * @TODO: For multisite, maintenance mode should only kick in for individual sites if at all possible.
-                */
-               $maintenance = ( is_multisite() && ! empty( $plugins ) );
-               foreach ( $plugins as $plugin )
-                       $maintenance = $maintenance || ( is_plugin_active( $plugin ) && isset( $current->response[ $plugin] ) );
-               if ( $maintenance )
-                       $this->maintenance_mode(true);
-
-               $results = array();
-
-               $this->update_count = count($plugins);
-               $this->update_current = 0;
-               foreach ( $plugins as $plugin ) {
-                       $this->update_current++;
-                       $this->skin->plugin_info = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin, false, true);
-
-                       if ( !isset( $current->response[ $plugin ] ) ) {
-                               $this->skin->set_result('up_to_date');
-                               $this->skin->before();
-                               $this->skin->feedback('up_to_date');
-                               $this->skin->after();
-                               $results[$plugin] = true;
-                               continue;
-                       }
-
-                       // Get the URL to the zip file.
-                       $r = $current->response[ $plugin ];
-
-                       $this->skin->plugin_active = is_plugin_active($plugin);
-
-                       $result = $this->run( array(
-                               'package' => $r->package,
-                               'destination' => WP_PLUGIN_DIR,
-                               'clear_destination' => true,
-                               'clear_working' => true,
-                               'is_multi' => true,
-                               'hook_extra' => array(
-                                       'plugin' => $plugin
-                               )
-                       ) );
-
-                       $results[$plugin] = $this->result;
-
-                       // Prevent credentials auth screen from displaying multiple times
-                       if ( false === $result )
-                               break;
-               } //end foreach $plugins
-
-               $this->maintenance_mode(false);
-
-               /**
-                * Fires when the bulk upgrader process is complete.
-                *
-                * @since 3.6.0
-                *
-                * @param Plugin_Upgrader $this Plugin_Upgrader instance. In other contexts, $this, might
-                *                              be a Theme_Upgrader or Core_Upgrade instance.
-                * @param array           $data {
-                *     Array of bulk item update data.
-                *
-                *     @type string $action   Type of action. Default 'update'.
-                *     @type string $type     Type of update process. Accepts 'plugin', 'theme', or 'core'.
-                *     @type bool   $bulk     Whether the update process is a bulk update. Default true.
-                *     @type array  $packages Array of plugin, theme, or core packages to update.
-                * }
-                */
-               do_action( 'upgrader_process_complete', $this, array(
-                       'action' => 'update',
-                       'type' => 'plugin',
-                       'bulk' => true,
-                       'plugins' => $plugins,
-               ) );
-
-               $this->skin->bulk_footer();
-
-               $this->skin->footer();
-
-               // Cleanup our hooks, in case something else does a upgrade on this connection.
-               remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'));
-
-               // Force refresh of plugin update information.
-               wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
-
-               return $results;
-       }
-
-       /**
-        * Check a source package to be sure it contains a plugin.
-        *
-        * This function is added to the {@see 'upgrader_source_selection'} filter by
-        * {@see Plugin_Upgrader::install()}.
-        *
-        * @since 3.3.0
-        * @access public
-        *
-        * @global WP_Filesystem_Base $wp_filesystem Subclass
-        *
-        * @param string $source The path to the downloaded package source.
-        * @return string|WP_Error The source as passed, or a {@see WP_Error} object
-        *                         if no plugins were found.
-        */
-       public function check_package($source) {
-               global $wp_filesystem;
-
-               if ( is_wp_error($source) )
-                       return $source;
-
-               $working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit(WP_CONTENT_DIR), $source);
-               if ( ! is_dir($working_directory) ) // Sanity check, if the above fails, let's not prevent installation.
-                       return $source;
-
-               // Check the folder contains at least 1 valid plugin.
-               $plugins_found = false;
-               $files = glob( $working_directory . '*.php' );
-               if ( $files ) {
-                       foreach ( $files as $file ) {
-                               $info = get_plugin_data( $file, false, false );
-                               if ( ! empty( $info['Name'] ) ) {
-                                       $plugins_found = true;
-                                       break;
-                               }
-                       }
-               }
-
-               if ( ! $plugins_found )
-                       return new WP_Error( 'incompatible_archive_no_plugins', $this->strings['incompatible_archive'], __( 'No valid plugins were found.' ) );
-
-               return $source;
-       }
-
-       /**
-        * Retrieve the path to the file that contains the plugin info.
-        *
-        * This isn't used internally in the class, but is called by the skins.
-        *
-        * @since 2.8.0
-        * @access public
-        *
-        * @return string|false The full path to the main plugin file, or false.
-        */
-       public function plugin_info() {
-               if ( ! is_array($this->result) )
-                       return false;
-               if ( empty($this->result['destination_name']) )
-                       return false;
-
-               $plugin = get_plugins('/' . $this->result['destination_name']); //Ensure to pass with leading slash
-               if ( empty($plugin) )
-                       return false;
-
-               $pluginfiles = array_keys($plugin); //Assume the requested plugin is the first in the list
-
-               return $this->result['destination_name'] . '/' . $pluginfiles[0];
-       }
-
-       /**
-        * Deactivates a plugin before it is upgraded.
-        *
-        * Hooked to the {@see 'upgrader_pre_install'} filter by {@see Plugin_Upgrader::upgrade()}.
-        *
-        * @since 2.8.0
-        * @since 4.1.0 Added a return value.
-        * @access public
-        *
-        * @param bool|WP_Error  $return Upgrade offer return.
-        * @param array          $plugin Plugin package arguments.
-        * @return bool|WP_Error The passed in $return param or {@see WP_Error}.
-        */
-       public function deactivate_plugin_before_upgrade($return, $plugin) {
-
-               if ( is_wp_error($return) ) //Bypass.
-                       return $return;
-
-               // When in cron (background updates) don't deactivate the plugin, as we require a browser to reactivate it
-               if ( defined( 'DOING_CRON' ) && DOING_CRON )
-                       return $return;
-
-               $plugin = isset($plugin['plugin']) ? $plugin['plugin'] : '';
-               if ( empty($plugin) )
-                       return new WP_Error('bad_request', $this->strings['bad_request']);
-
-               if ( is_plugin_active($plugin) ) {
-                       //Deactivate the plugin silently, Prevent deactivation hooks from running.
-                       deactivate_plugins($plugin, true);
-               }
-
-               return $return;
-       }
-
-       /**
-        * Delete the old plugin during an upgrade.
-        *
-        * Hooked to the {@see 'upgrader_clear_destination'} filter by
-        * {@see Plugin_Upgrader::upgrade()} and {@see Plugin_Upgrader::bulk_upgrade()}.
-        *
-        * @since 2.8.0
-        * @access public
-        *
-        * @global WP_Filesystem_Base $wp_filesystem Subclass
-     *
-        * @param bool|WP_Error $removed
-        * @param string        $local_destination
-        * @param string        $remote_destination
-        * @param array         $plugin
-        * @return WP_Error|bool
-        */
-       public function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin) {
-               global $wp_filesystem;
-
-               if ( is_wp_error($removed) )
-                       return $removed; //Pass errors through.
-
-               $plugin = isset($plugin['plugin']) ? $plugin['plugin'] : '';
-               if ( empty($plugin) )
-                       return new WP_Error('bad_request', $this->strings['bad_request']);
-
-               $plugins_dir = $wp_filesystem->wp_plugins_dir();
-               $this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin) );
-
-               if ( ! $wp_filesystem->exists($this_plugin_dir) ) //If it's already vanished.
-                       return $removed;
-
-               // If plugin is in its own directory, recursively delete the directory.
-               if ( strpos($plugin, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory separator AND that it's not the root plugin folder
-                       $deleted = $wp_filesystem->delete($this_plugin_dir, true);
-               else
-                       $deleted = $wp_filesystem->delete($plugins_dir . $plugin);
-
-               if ( ! $deleted )
-                       return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']);
-
-               return true;
-       }
-}
-
-/**
- * Core class used for upgrading/installing themes.
- *
- * It is designed to upgrade/install themes from a local zip, remote zip URL,
- * or uploaded zip file.
- *
- * @since 2.8.0
- *
- * @see WP_Upgrader
- */
-class Theme_Upgrader extends WP_Upgrader {
+/** Plugin_Upgrader class */
+require_once ABSPATH . 'wp-admin/includes/class-plugin-upgrader.php';
 
-       /**
-        * Result of the theme upgrade offer.
-        *
-        * @since 2.8.0
-        * @access public
-        * @var array|WP_Error $result
-        * @see WP_Upgrader::$result
-        */
-       public $result;
+/** Theme_Upgrader class */
+require_once ABSPATH . 'wp-admin/includes/class-theme-upgrader.php';
 
-       /**
-        * Whether multiple themes are being upgraded/installed in bulk.
-        *
-        * @since 2.9.0
-        * @access public
-        * @var bool $bulk
-        */
-       public $bulk = false;
+/** Language_Pack_Upgrader class */
+require_once ABSPATH . 'wp-admin/includes/class-language-pack-upgrader.php';
 
-       /**
-        * Initialize the upgrade strings.
-        *
-        * @since 2.8.0
-        * @access public
-        */
-       public function upgrade_strings() {
-               $this->strings['up_to_date'] = __('The theme is at the latest version.');
-               $this->strings['no_package'] = __('Update package not available.');
-               $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>&#8230;');
-               $this->strings['unpack_package'] = __('Unpacking the update&#8230;');
-               $this->strings['remove_old'] = __('Removing the old version of the theme&#8230;');
-               $this->strings['remove_old_failed'] = __('Could not remove the old theme.');
-               $this->strings['process_failed'] = __('Theme update failed.');
-               $this->strings['process_success'] = __('Theme updated successfully.');
-       }
+/** Core_Upgrader class */
+require_once ABSPATH . 'wp-admin/includes/class-core-upgrader.php';
 
-       /**
-        * Initialize the install strings.
-        *
-        * @since 2.8.0
-        * @access public
-        */
-       public function install_strings() {
-               $this->strings['no_package'] = __('Install package not available.');
-               $this->strings['downloading_package'] = __('Downloading install package from <span class="code">%s</span>&#8230;');
-               $this->strings['unpack_package'] = __('Unpacking the package&#8230;');
-               $this->strings['installing_package'] = __('Installing the theme&#8230;');
-               $this->strings['no_files'] = __('The theme contains no files.');
-               $this->strings['process_failed'] = __('Theme install failed.');
-               $this->strings['process_success'] = __('Theme installed successfully.');
-               /* translators: 1: theme name, 2: version */
-               $this->strings['process_success_specific'] = __('Successfully installed the theme <strong>%1$s %2$s</strong>.');
-               $this->strings['parent_theme_search'] = __('This theme requires a parent theme. Checking if it is installed&#8230;');
-               /* translators: 1: theme name, 2: version */
-               $this->strings['parent_theme_prepare_install'] = __('Preparing to install <strong>%1$s %2$s</strong>&#8230;');
-               /* translators: 1: theme name, 2: version */
-               $this->strings['parent_theme_currently_installed'] = __('The parent theme, <strong>%1$s %2$s</strong>, is currently installed.');
-               /* translators: 1: theme name, 2: version */
-               $this->strings['parent_theme_install_success'] = __('Successfully installed the parent theme, <strong>%1$s %2$s</strong>.');
-               $this->strings['parent_theme_not_found'] = __('<strong>The parent theme could not be found.</strong> You will need to install the parent theme, <strong>%s</strong>, before you can use this child theme.');
-       }
+/** File_Upload_Upgrader class */
+require_once ABSPATH . 'wp-admin/includes/class-file-upload-upgrader.php';
 
-       /**
-        * Check if a child theme is being installed and we need to install its parent.
-        *
-        * Hooked to the {@see 'upgrader_post_install'} filter by {@see Theme_Upgrader::install()}.
-        *
-        * @since 3.4.0
-        * @access public
-        *
-        * @param bool  $install_result
-        * @param array $hook_extra
-        * @param array $child_result
-        * @return type
-        */
-       public function check_parent_theme_filter( $install_result, $hook_extra, $child_result ) {
-               // Check to see if we need to install a parent theme
-               $theme_info = $this->theme_info();
-
-               if ( ! $theme_info->parent() )
-                       return $install_result;
-
-               $this->skin->feedback( 'parent_theme_search' );
-
-               if ( ! $theme_info->parent()->errors() ) {
-                       $this->skin->feedback( 'parent_theme_currently_installed', $theme_info->parent()->display('Name'), $theme_info->parent()->display('Version') );
-                       // We already have the theme, fall through.
-                       return $install_result;
-               }
-
-               // We don't have the parent theme, let's install it.
-               $api = themes_api('theme_information', array('slug' => $theme_info->get('Template'), 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth.
-
-               if ( ! $api || is_wp_error($api) ) {
-                       $this->skin->feedback( 'parent_theme_not_found', $theme_info->get('Template') );
-                       // Don't show activate or preview actions after install
-                       add_filter('install_theme_complete_actions', array($this, 'hide_activate_preview_actions') );
-                       return $install_result;
-               }
-
-               // Backup required data we're going to override:
-               $child_api = $this->skin->api;
-               $child_success_message = $this->strings['process_success'];
-
-               // Override them
-               $this->skin->api = $api;
-               $this->strings['process_success_specific'] = $this->strings['parent_theme_install_success'];//, $api->name, $api->version);
-
-               $this->skin->feedback('parent_theme_prepare_install', $api->name, $api->version);
-
-               add_filter('install_theme_complete_actions', '__return_false', 999); // Don't show any actions after installing the theme.
-
-               // Install the parent theme
-               $parent_result = $this->run( array(
-                       'package' => $api->download_link,
-                       'destination' => get_theme_root(),
-                       'clear_destination' => false, //Do not overwrite files.
-                       'clear_working' => true
-               ) );
-
-               if ( is_wp_error($parent_result) )
-                       add_filter('install_theme_complete_actions', array($this, 'hide_activate_preview_actions') );
-
-               // Start cleaning up after the parents installation
-               remove_filter('install_theme_complete_actions', '__return_false', 999);
-
-               // Reset child's result and data
-               $this->result = $child_result;
-               $this->skin->api = $child_api;
-               $this->strings['process_success'] = $child_success_message;
-
-               return $install_result;
-       }
-
-       /**
-        * Don't display the activate and preview actions to the user.
-        *
-        * Hooked to the {@see 'install_theme_complete_actions'} filter by
-        * {@see Theme_Upgrader::check_parent_theme_filter()} when installing
-        * a child theme and installing the parent theme fails.
-        *
-        * @since 3.4.0
-        * @access public
-        *
-        * @param array $actions Preview actions.
-        * @return array
-        */
-       public function hide_activate_preview_actions( $actions ) {
-               unset($actions['activate'], $actions['preview']);
-               return $actions;
-       }
-
-       /**
-        * Install a theme package.
-        *
-        * @since 2.8.0
-        * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional.
-        * @access public
-        *
-        * @param string $package The full local path or URI of the package.
-        * @param array  $args {
-        *     Optional. Other arguments for installing a theme package. Default empty array.
-        *
-        *     @type bool $clear_update_cache Whether to clear the updates cache if successful.
-        *                                    Default true.
-        * }
-        *
-        * @return bool|WP_Error True if the install was successful, false or a {@see WP_Error} object otherwise.
-        */
-       public function install( $package, $args = array() ) {
-
-               $defaults = array(
-                       'clear_update_cache' => true,
-               );
-               $parsed_args = wp_parse_args( $args, $defaults );
-
-               $this->init();
-               $this->install_strings();
-
-               add_filter('upgrader_source_selection', array($this, 'check_package') );
-               add_filter('upgrader_post_install', array($this, 'check_parent_theme_filter'), 10, 3);
-               // Clear cache so wp_update_themes() knows about the new theme.
-               add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 );
-
-               $this->run( array(
-                       'package' => $package,
-                       'destination' => get_theme_root(),
-                       'clear_destination' => false, //Do not overwrite files.
-                       'clear_working' => true,
-                       'hook_extra' => array(
-                               'type' => 'theme',
-                               'action' => 'install',
-                       ),
-               ) );
-
-               remove_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9 );
-               remove_filter('upgrader_source_selection', array($this, 'check_package') );
-               remove_filter('upgrader_post_install', array($this, 'check_parent_theme_filter'));
-
-               if ( ! $this->result || is_wp_error($this->result) )
-                       return $this->result;
-
-               // Refresh the Theme Update information
-               wp_clean_themes_cache( $parsed_args['clear_update_cache'] );
-
-               return true;
-       }
-
-       /**
-        * Upgrade a theme.
-        *
-        * @since 2.8.0
-        * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional.
-        * @access public
-        *
-        * @param string $theme The theme slug.
-        * @param array  $args {
-        *     Optional. Other arguments for upgrading a theme. Default empty array.
-        *
-        *     @type bool $clear_update_cache Whether to clear the update cache if successful.
-        *                                    Default true.
-        * }
-        * @return bool|WP_Error True if the upgrade was successful, false or a {@see WP_Error} object otherwise.
-        */
-       public function upgrade( $theme, $args = array() ) {
-
-               $defaults = array(
-                       'clear_update_cache' => true,
-               );
-               $parsed_args = wp_parse_args( $args, $defaults );
-
-               $this->init();
-               $this->upgrade_strings();
-
-               // Is an update available?
-               $current = get_site_transient( 'update_themes' );
-               if ( !isset( $current->response[ $theme ] ) ) {
-                       $this->skin->before();
-                       $this->skin->set_result(false);
-                       $this->skin->error( 'up_to_date' );
-                       $this->skin->after();
-                       return false;
-               }
-
-               $r = $current->response[ $theme ];
-
-               add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2);
-               add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2);
-               add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4);
-
-               $this->run( array(
-                       'package' => $r['package'],
-                       'destination' => get_theme_root( $theme ),
-                       'clear_destination' => true,
-                       'clear_working' => true,
-                       'hook_extra' => array(
-                               'theme' => $theme,
-                               'type' => 'theme',
-                               'action' => 'update',
-                       ),
-               ) );
-
-               remove_filter('upgrader_pre_install', array($this, 'current_before'));
-               remove_filter('upgrader_post_install', array($this, 'current_after'));
-               remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme'));
-
-               if ( ! $this->result || is_wp_error($this->result) )
-                       return $this->result;
-
-               wp_clean_themes_cache( $parsed_args['clear_update_cache'] );
-
-               return true;
-       }
-
-       /**
-        * Upgrade several themes at once.
-        *
-        * @since 3.0.0
-        * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional.
-        * @access public
-        *
-        * @param array $themes The theme slugs.
-        * @param array $args {
-        *     Optional. Other arguments for upgrading several themes at once. Default empty array.
-        *
-        *     @type bool $clear_update_cache Whether to clear the update cache if successful.
-        *                                    Default true.
-        * }
-        * @return array[]|false An array of results, or false if unable to connect to the filesystem.
-        */
-       public function bulk_upgrade( $themes, $args = array() ) {
-
-               $defaults = array(
-                       'clear_update_cache' => true,
-               );
-               $parsed_args = wp_parse_args( $args, $defaults );
-
-               $this->init();
-               $this->bulk = true;
-               $this->upgrade_strings();
-
-               $current = get_site_transient( 'update_themes' );
-
-               add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2);
-               add_filter('upgrader_post_install', array($this, 'current_after'), 10, 2);
-               add_filter('upgrader_clear_destination', array($this, 'delete_old_theme'), 10, 4);
-
-               $this->skin->header();
-
-               // Connect to the Filesystem first.
-               $res = $this->fs_connect( array(WP_CONTENT_DIR) );
-               if ( ! $res ) {
-                       $this->skin->footer();
-                       return false;
-               }
-
-               $this->skin->bulk_header();
-
-               // Only start maintenance mode if:
-               // - running Multisite and there are one or more themes specified, OR
-               // - a theme with an update available is currently in use.
-               // @TODO: For multisite, maintenance mode should only kick in for individual sites if at all possible.
-               $maintenance = ( is_multisite() && ! empty( $themes ) );
-               foreach ( $themes as $theme )
-                       $maintenance = $maintenance || $theme == get_stylesheet() || $theme == get_template();
-               if ( $maintenance )
-                       $this->maintenance_mode(true);
-
-               $results = array();
-
-               $this->update_count = count($themes);
-               $this->update_current = 0;
-               foreach ( $themes as $theme ) {
-                       $this->update_current++;
-
-                       $this->skin->theme_info = $this->theme_info($theme);
-
-                       if ( !isset( $current->response[ $theme ] ) ) {
-                               $this->skin->set_result(true);
-                               $this->skin->before();
-                               $this->skin->feedback( 'up_to_date' );
-                               $this->skin->after();
-                               $results[$theme] = true;
-                               continue;
-                       }
-
-                       // Get the URL to the zip file
-                       $r = $current->response[ $theme ];
-
-                       $result = $this->run( array(
-                               'package' => $r['package'],
-                               'destination' => get_theme_root( $theme ),
-                               'clear_destination' => true,
-                               'clear_working' => true,
-                               'is_multi' => true,
-                               'hook_extra' => array(
-                                       'theme' => $theme
-                               ),
-                       ) );
-
-                       $results[$theme] = $this->result;
-
-                       // Prevent credentials auth screen from displaying multiple times
-                       if ( false === $result )
-                               break;
-               } //end foreach $plugins
-
-               $this->maintenance_mode(false);
-
-               /** This action is documented in wp-admin/includes/class-wp-upgrader.php */
-               do_action( 'upgrader_process_complete', $this, array(
-                       'action' => 'update',
-                       'type' => 'theme',
-                       'bulk' => true,
-                       'themes' => $themes,
-               ) );
-
-               $this->skin->bulk_footer();
-
-               $this->skin->footer();
-
-               // Cleanup our hooks, in case something else does a upgrade on this connection.
-               remove_filter('upgrader_pre_install', array($this, 'current_before'));
-               remove_filter('upgrader_post_install', array($this, 'current_after'));
-               remove_filter('upgrader_clear_destination', array($this, 'delete_old_theme'));
-
-               // Refresh the Theme Update information
-               wp_clean_themes_cache( $parsed_args['clear_update_cache'] );
-
-               return $results;
-       }
-
-       /**
-        * Check that the package source contains a valid theme.
-        *
-        * Hooked to the {@see 'upgrader_source_selection'} filter by {@see Theme_Upgrader::install()}.
-        * It will return an error if the theme doesn't have style.css or index.php
-        * files.
-        *
-        * @since 3.3.0
-        * @access public
-        *
-        * @global WP_Filesystem_Base $wp_filesystem Subclass
-        *
-        * @param string $source The full path to the package source.
-        * @return string|WP_Error The source or a WP_Error.
-        */
-       public function check_package( $source ) {
-               global $wp_filesystem;
-
-               if ( is_wp_error($source) )
-                       return $source;
-
-               // Check the folder contains a valid theme
-               $working_directory = str_replace( $wp_filesystem->wp_content_dir(), trailingslashit(WP_CONTENT_DIR), $source);
-               if ( ! is_dir($working_directory) ) // Sanity check, if the above fails, let's not prevent installation.
-                       return $source;
-
-               // A proper archive should have a style.css file in the single subdirectory
-               if ( ! file_exists( $working_directory . 'style.css' ) ) {
-                       return new WP_Error( 'incompatible_archive_theme_no_style', $this->strings['incompatible_archive'],
-                               /* translators: %s: style.css */
-                               sprintf( __( 'The theme is missing the %s stylesheet.' ),
-                                       '<code>style.css</code>'
-                               )
-                       );
-               }
-
-               $info = get_file_data( $working_directory . 'style.css', array( 'Name' => 'Theme Name', 'Template' => 'Template' ) );
-
-               if ( empty( $info['Name'] ) ) {
-                       return new WP_Error( 'incompatible_archive_theme_no_name', $this->strings['incompatible_archive'],
-                               /* translators: %s: style.css */
-                               sprintf( __( 'The %s stylesheet doesn&#8217;t contain a valid theme header.' ),
-                                       '<code>style.css</code>'
-                               )
-                       );
-               }
-
-               // If it's not a child theme, it must have at least an index.php to be legit.
-               if ( empty( $info['Template'] ) && ! file_exists( $working_directory . 'index.php' ) ) {
-                       return new WP_Error( 'incompatible_archive_theme_no_index', $this->strings['incompatible_archive'],
-                               /* translators: %s: index.php */
-                               sprintf( __( 'The theme is missing the %s file.' ),
-                                       '<code>index.php</code>'
-                               )
-                       );
-               }
-
-               return $source;
-       }
-
-       /**
-        * Turn on maintenance mode before attempting to upgrade the current theme.
-        *
-        * Hooked to the {@see 'upgrader_pre_install'} filter by {@see Theme_Upgrader::upgrade()} and
-        * {@see Theme_Upgrader::bulk_upgrade()}.
-        *
-        * @since 2.8.0
-        * @access public
-        *
-        * @param bool|WP_Error  $return
-        * @param array          $theme
-        * @return bool|WP_Error
-        */
-       public function current_before($return, $theme) {
-               if ( is_wp_error($return) )
-                       return $return;
-
-               $theme = isset($theme['theme']) ? $theme['theme'] : '';
-
-               if ( $theme != get_stylesheet() ) //If not current
-                       return $return;
-               //Change to maintenance mode now.
-               if ( ! $this->bulk )
-                       $this->maintenance_mode(true);
-
-               return $return;
-       }
-
-       /**
-        * Turn off maintenance mode after upgrading the current theme.
-        *
-        * Hooked to the {@see 'upgrader_post_install'} filter by {@see Theme_Upgrader::upgrade()}
-        * and {@see Theme_Upgrader::bulk_upgrade()}.
-        *
-        * @since 2.8.0
-        * @access public
-        *
-        * @param bool|WP_Error  $return
-        * @param array          $theme
-        * @return bool|WP_Error
-        */
-       public function current_after($return, $theme) {
-               if ( is_wp_error($return) )
-                       return $return;
-
-               $theme = isset($theme['theme']) ? $theme['theme'] : '';
-
-               if ( $theme != get_stylesheet() ) // If not current
-                       return $return;
-
-               // Ensure stylesheet name hasn't changed after the upgrade:
-               if ( $theme == get_stylesheet() && $theme != $this->result['destination_name'] ) {
-                       wp_clean_themes_cache();
-                       $stylesheet = $this->result['destination_name'];
-                       switch_theme( $stylesheet );
-               }
-
-               //Time to remove maintenance mode
-               if ( ! $this->bulk )
-                       $this->maintenance_mode(false);
-               return $return;
-       }
-
-       /**
-        * Delete the old theme during an upgrade.
-        *
-        * Hooked to the {@see 'upgrader_clear_destination'} filter by {@see Theme_Upgrader::upgrade()}
-        * and {@see Theme_Upgrader::bulk_upgrade()}.
-        *
-        * @since 2.8.0
-        * @access public
-        *
-        * @global WP_Filesystem_Base $wp_filesystem Subclass
-        *
-        * @param bool   $removed
-        * @param string $local_destination
-        * @param string $remote_destination
-        * @param array  $theme
-        * @return bool
-        */
-       public function delete_old_theme( $removed, $local_destination, $remote_destination, $theme ) {
-               global $wp_filesystem;
-
-               if ( is_wp_error( $removed ) )
-                       return $removed; // Pass errors through.
-
-               if ( ! isset( $theme['theme'] ) )
-                       return $removed;
-
-               $theme = $theme['theme'];
-               $themes_dir = trailingslashit( $wp_filesystem->wp_themes_dir( $theme ) );
-               if ( $wp_filesystem->exists( $themes_dir . $theme ) ) {
-                       if ( ! $wp_filesystem->delete( $themes_dir . $theme, true ) )
-                               return false;
-               }
-
-               return true;
-       }
-
-       /**
-        * Get the WP_Theme object for a theme.
-        *
-        * @since 2.8.0
-        * @since 3.0.0 The `$theme` argument was added.
-        * @access public
-        *
-        * @param string $theme The directory name of the theme. This is optional, and if not supplied,
-        *                      the directory name from the last result will be used.
-        * @return WP_Theme|false The theme's info object, or false `$theme` is not supplied
-        *                        and the last result isn't set.
-        */
-       public function theme_info($theme = null) {
-
-               if ( empty($theme) ) {
-                       if ( !empty($this->result['destination_name']) )
-                               $theme = $this->result['destination_name'];
-                       else
-                               return false;
-               }
-               return wp_get_theme( $theme );
-       }
-
-}
-
-/**
- * Core class used for updating/installing language packs (translations)
- * for plugins, themes, and core.
- *
- * @since 3.7.0
- *
- * @see WP_Upgrader
- */
-class Language_Pack_Upgrader extends WP_Upgrader {
-
-       /**
-        * Result of the language pack upgrade.
-        *
-        * @since 3.7.0
-        * @access public
-        * @var array|WP_Error $result
-        * @see WP_Upgrader::$result
-        */
-       public $result;
-
-       /**
-        * Whether a bulk upgrade/install is being performed.
-        *
-        * @since 3.7.0
-        * @access public
-        * @var bool $bulk
-        */
-       public $bulk = true;
-
-       /**
-        * Asynchronously upgrades language packs after other upgrades have been made.
-        *
-        * Hooked to the {@see 'upgrader_process_complete'} action by default.
-        *
-        * @since 3.7.0
-        * @access public
-        * @static
-        *
-        * @param false|WP_Upgrader $upgrader Optional. WP_Upgrader instance or false. If `$upgrader` is
-        *                                    a Language_Pack_Upgrader instance, the method will bail to
-        *                                    avoid recursion. Otherwise unused. Default false.
-        */
-       public static function async_upgrade( $upgrader = false ) {
-               // Avoid recursion.
-               if ( $upgrader && $upgrader instanceof Language_Pack_Upgrader ) {
-                       return;
-               }
-
-               // Nothing to do?
-               $language_updates = wp_get_translation_updates();
-               if ( ! $language_updates ) {
-                       return;
-               }
-
-               /*
-                * Avoid messing with VCS installs, at least for now.
-                * Noted: this is not the ideal way to accomplish this.
-                */
-               $check_vcs = new WP_Automatic_Updater;
-               if ( $check_vcs->is_vcs_checkout( WP_CONTENT_DIR ) ) {
-                       return;
-               }
-
-               foreach ( $language_updates as $key => $language_update ) {
-                       $update = ! empty( $language_update->autoupdate );
-
-                       /**
-                        * Filter whether to asynchronously update translation for core, a plugin, or a theme.
-                        *
-                        * @since 4.0.0
-                        *
-                        * @param bool   $update          Whether to update.
-                        * @param object $language_update The update offer.
-                        */
-                       $update = apply_filters( 'async_update_translation', $update, $language_update );
-
-                       if ( ! $update ) {
-                               unset( $language_updates[ $key ] );
-                       }
-               }
-
-               if ( empty( $language_updates ) ) {
-                       return;
-               }
-
-               // Re-use the automatic upgrader skin if the parent upgrader is using it.
-               if ( $upgrader && $upgrader->skin instanceof Automatic_Upgrader_Skin ) {
-                       $skin = $upgrader->skin;
-               } else {
-                       $skin = new Language_Pack_Upgrader_Skin( array(
-                               'skip_header_footer' => true,
-                       ) );
-               }
-
-               $lp_upgrader = new Language_Pack_Upgrader( $skin );
-               $lp_upgrader->bulk_upgrade( $language_updates );
-       }
-
-       /**
-        * Initialize the upgrade strings.
-        *
-        * @since 3.7.0
-        * @access public
-        */
-       public function upgrade_strings() {
-               $this->strings['starting_upgrade'] = __( 'Some of your translations need updating. Sit tight for a few more seconds while we update them as well.' );
-               $this->strings['up_to_date'] = __( 'The translation is up to date.' ); // We need to silently skip this case
-               $this->strings['no_package'] = __( 'Update package not available.' );
-               $this->strings['downloading_package'] = __( 'Downloading translation from <span class="code">%s</span>&#8230;' );
-               $this->strings['unpack_package'] = __( 'Unpacking the update&#8230;' );
-               $this->strings['process_failed'] = __( 'Translation update failed.' );
-               $this->strings['process_success'] = __( 'Translation updated successfully.' );
-       }
-
-       /**
-        * Upgrade a language pack.
-        *
-        * @since 3.7.0
-        * @access public
-        *
-        * @param string|false $update Optional. Whether an update offer is available. Default false.
-        * @param array        $args   Optional. Other optional arguments, see
-        *                             {@see Language_Pack_Upgrader::bulk_upgrade()}. Default empty array.
-        * @return array|bool|WP_Error The result of the upgrade, or a {@see wP_Error} object instead.
-        */
-       public function upgrade( $update = false, $args = array() ) {
-               if ( $update ) {
-                       $update = array( $update );
-               }
-
-               $results = $this->bulk_upgrade( $update, $args );
-
-               if ( ! is_array( $results ) ) {
-                       return $results;
-               }
-
-               return $results[0];
-       }
-
-       /**
-        * Bulk upgrade language packs.
-        *
-        * @since 3.7.0
-        * @access public
-        *
-        * @global WP_Filesystem_Base $wp_filesystem Subclass
-        *
-        * @param array $language_updates Optional. Language pack updates. Default empty array.
-        * @param array $args {
-        *     Optional. Other arguments for upgrading multiple language packs. Default empty array
-        *
-        *     @type bool $clear_update_cache Whether to clear the update cache when done.
-        *                                    Default true.
-        * }
-        * @return array|bool|WP_Error Will return an array of results, or true if there are no updates,
-        *                                   false or WP_Error for initial errors.
-        */
-       public function bulk_upgrade( $language_updates = array(), $args = array() ) {
-               global $wp_filesystem;
-
-               $defaults = array(
-                       'clear_update_cache' => true,
-               );
-               $parsed_args = wp_parse_args( $args, $defaults );
-
-               $this->init();
-               $this->upgrade_strings();
-
-               if ( ! $language_updates )
-                       $language_updates = wp_get_translation_updates();
-
-               if ( empty( $language_updates ) ) {
-                       $this->skin->header();
-                       $this->skin->before();
-                       $this->skin->set_result( true );
-                       $this->skin->feedback( 'up_to_date' );
-                       $this->skin->after();
-                       $this->skin->bulk_footer();
-                       $this->skin->footer();
-                       return true;
-               }
-
-               if ( 'upgrader_process_complete' == current_filter() )
-                       $this->skin->feedback( 'starting_upgrade' );
-
-               // Remove any existing upgrade filters from the plugin/theme upgraders #WP29425 & #WP29230
-               remove_all_filters( 'upgrader_pre_install' );
-               remove_all_filters( 'upgrader_clear_destination' );
-               remove_all_filters( 'upgrader_post_install' );
-               remove_all_filters( 'upgrader_source_selection' );
-
-               add_filter( 'upgrader_source_selection', array( $this, 'check_package' ), 10, 2 );
-
-               $this->skin->header();
-
-               // Connect to the Filesystem first.
-               $res = $this->fs_connect( array( WP_CONTENT_DIR, WP_LANG_DIR ) );
-               if ( ! $res ) {
-                       $this->skin->footer();
-                       return false;
-               }
-
-               $results = array();
-
-               $this->update_count = count( $language_updates );
-               $this->update_current = 0;
-
-               /*
-                * The filesystem's mkdir() is not recursive. Make sure WP_LANG_DIR exists,
-                * as we then may need to create a /plugins or /themes directory inside of it.
-                */
-               $remote_destination = $wp_filesystem->find_folder( WP_LANG_DIR );
-               if ( ! $wp_filesystem->exists( $remote_destination ) )
-                       if ( ! $wp_filesystem->mkdir( $remote_destination, FS_CHMOD_DIR ) )
-                               return new WP_Error( 'mkdir_failed_lang_dir', $this->strings['mkdir_failed'], $remote_destination );
-
-               foreach ( $language_updates as $language_update ) {
-
-                       $this->skin->language_update = $language_update;
-
-                       $destination = WP_LANG_DIR;
-                       if ( 'plugin' == $language_update->type )
-                               $destination .= '/plugins';
-                       elseif ( 'theme' == $language_update->type )
-                               $destination .= '/themes';
-
-                       $this->update_current++;
-
-                       $options = array(
-                               'package' => $language_update->package,
-                               'destination' => $destination,
-                               'clear_destination' => false,
-                               'abort_if_destination_exists' => false, // We expect the destination to exist.
-                               'clear_working' => true,
-                               'is_multi' => true,
-                               'hook_extra' => array(
-                                       'language_update_type' => $language_update->type,
-                                       'language_update' => $language_update,
-                               )
-                       );
-
-                       $result = $this->run( $options );
-
-                       $results[] = $this->result;
-
-                       // Prevent credentials auth screen from displaying multiple times.
-                       if ( false === $result )
-                               break;
-               }
-
-               $this->skin->bulk_footer();
-
-               $this->skin->footer();
-
-               // Clean up our hooks, in case something else does an upgrade on this connection.
-               remove_filter( 'upgrader_source_selection', array( $this, 'check_package' ) );
-
-               if ( $parsed_args['clear_update_cache'] ) {
-                       wp_clean_update_cache();
-               }
-
-               return $results;
-       }
-
-       /**
-        * Check the package source to make sure there are .mo and .po files.
-        *
-        * Hooked to the {@see 'upgrader_source_selection'} filter by
-        * {@see Language_Pack_Upgrader::bulk_upgrade()}.
-        *
-        * @since 3.7.0
-        * @access public
-        *
-        * @global WP_Filesystem_Base $wp_filesystem Subclass
-        *
-        * @param string|WP_Error $source
-        * @param string          $remote_source
-        */
-       public function check_package( $source, $remote_source ) {
-               global $wp_filesystem;
-
-               if ( is_wp_error( $source ) )
-                       return $source;
-
-               // Check that the folder contains a valid language.
-               $files = $wp_filesystem->dirlist( $remote_source );
-
-               // Check to see if a .po and .mo exist in the folder.
-               $po = $mo = false;
-               foreach ( (array) $files as $file => $filedata ) {
-                       if ( '.po' == substr( $file, -3 ) )
-                               $po = true;
-                       elseif ( '.mo' == substr( $file, -3 ) )
-                               $mo = true;
-               }
-
-               if ( ! $mo || ! $po ) {
-                       return new WP_Error( 'incompatible_archive_pomo', $this->strings['incompatible_archive'],
-                               /* translators: 1: .po 2: .mo */
-                               sprintf( __( 'The language pack is missing either the %1$s or %2$s files.' ),
-                                       '<code>.po</code>',
-                                       '<code>.mo</code>'
-                               )
-                       );
-               }
-
-               return $source;
-       }
-
-       /**
-        * Get the name of an item being updated.
-        *
-        * @since 3.7.0
-        * @access public
-        *
-        * @param object $update The data for an update.
-        * @return string The name of the item being updated.
-        */
-       public function get_name_for_update( $update ) {
-               switch ( $update->type ) {
-                       case 'core':
-                               return 'WordPress'; // Not translated
-
-                       case 'theme':
-                               $theme = wp_get_theme( $update->slug );
-                               if ( $theme->exists() )
-                                       return $theme->Get( 'Name' );
-                               break;
-                       case 'plugin':
-                               $plugin_data = get_plugins( '/' . $update->slug );
-                               $plugin_data = reset( $plugin_data );
-                               if ( $plugin_data )
-                                       return $plugin_data['Name'];
-                               break;
-               }
-               return '';
-       }
-
-}
-
-/**
- * Core class used for updating core.
- *
- * It allows for WordPress to upgrade itself in combination with
- * the wp-admin/includes/update-core.php file.
- *
- * @since 2.8.0
- *
- * @see WP_Upgrader
- */
-class Core_Upgrader extends WP_Upgrader {
-
-       /**
-        * Initialize the upgrade strings.
-        *
-        * @since 2.8.0
-        * @access public
-        */
-       public function upgrade_strings() {
-               $this->strings['up_to_date'] = __('WordPress is at the latest version.');
-               $this->strings['locked'] = __('Another update is currently in progress.');
-               $this->strings['no_package'] = __('Update package not available.');
-               $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>&#8230;');
-               $this->strings['unpack_package'] = __('Unpacking the update&#8230;');
-               $this->strings['copy_failed'] = __('Could not copy files.');
-               $this->strings['copy_failed_space'] = __('Could not copy files. You may have run out of disk space.' );
-               $this->strings['start_rollback'] = __( 'Attempting to roll back to previous version.' );
-               $this->strings['rollback_was_required'] = __( 'Due to an error during updating, WordPress has rolled back to your previous version.' );
-       }
-
-       /**
-        * Upgrade WordPress core.
-        *
-        * @since 2.8.0
-        * @access public
-        *
-        * @global WP_Filesystem_Base $wp_filesystem Subclass
-        * @global callable           $_wp_filesystem_direct_method
-        *
-        * @param object $current Response object for whether WordPress is current.
-        * @param array  $args {
-        *        Optional. Arguments for upgrading WordPress core. Default empty array.
-        *
-        *        @type bool $pre_check_md5    Whether to check the file checksums before
-        *                                     attempting the upgrade. Default true.
-        *        @type bool $attempt_rollback Whether to attempt to rollback the chances if
-        *                                     there is a problem. Default false.
-        *        @type bool $do_rollback      Whether to perform this "upgrade" as a rollback.
-        *                                     Default false.
-        * }
-        * @return null|false|WP_Error False or WP_Error on failure, null on success.
-        */
-       public function upgrade( $current, $args = array() ) {
-               global $wp_filesystem;
-
-               include( ABSPATH . WPINC . '/version.php' ); // $wp_version;
-
-               $start_time = time();
-
-               $defaults = array(
-                       'pre_check_md5'    => true,
-                       'attempt_rollback' => false,
-                       'do_rollback'      => false,
-                       'allow_relaxed_file_ownership' => false,
-               );
-               $parsed_args = wp_parse_args( $args, $defaults );
-
-               $this->init();
-               $this->upgrade_strings();
-
-               // Is an update available?
-               if ( !isset( $current->response ) || $current->response == 'latest' )
-                       return new WP_Error('up_to_date', $this->strings['up_to_date']);
-
-               $res = $this->fs_connect( array( ABSPATH, WP_CONTENT_DIR ), $parsed_args['allow_relaxed_file_ownership'] );
-               if ( ! $res || is_wp_error( $res ) ) {
-                       return $res;
-               }
-
-               $wp_dir = trailingslashit($wp_filesystem->abspath());
-
-               $partial = true;
-               if ( $parsed_args['do_rollback'] )
-                       $partial = false;
-               elseif ( $parsed_args['pre_check_md5'] && ! $this->check_files() )
-                       $partial = false;
-
-               /*
-                * If partial update is returned from the API, use that, unless we're doing
-                * a reinstall. If we cross the new_bundled version number, then use
-                * the new_bundled zip. Don't though if the constant is set to skip bundled items.
-                * If the API returns a no_content zip, go with it. Finally, default to the full zip.
-                */
-               if ( $parsed_args['do_rollback'] && $current->packages->rollback )
-                       $to_download = 'rollback';
-               elseif ( $current->packages->partial && 'reinstall' != $current->response && $wp_version == $current->partial_version && $partial )
-                       $to_download = 'partial';
-               elseif ( $current->packages->new_bundled && version_compare( $wp_version, $current->new_bundled, '<' )
-                       && ( ! defined( 'CORE_UPGRADE_SKIP_NEW_BUNDLED' ) || ! CORE_UPGRADE_SKIP_NEW_BUNDLED ) )
-                       $to_download = 'new_bundled';
-               elseif ( $current->packages->no_content )
-                       $to_download = 'no_content';
-               else
-                       $to_download = 'full';
-
-               // Lock to prevent multiple Core Updates occuring
-               $lock = WP_Upgrader::create_lock( 'core_updater', 15 * MINUTE_IN_SECONDS );
-               if ( ! $lock ) {
-                       return new WP_Error( 'locked', $this->strings['locked'] );
-               }
-
-               $download = $this->download_package( $current->packages->$to_download );
-               if ( is_wp_error( $download ) ) {
-                       WP_Upgrader::release_lock( 'core_updater' );
-                       return $download;
-               }
-
-               $working_dir = $this->unpack_package( $download );
-               if ( is_wp_error( $working_dir ) ) {
-                       WP_Upgrader::release_lock( 'core_updater' );
-                       return $working_dir;
-               }
-
-               // Copy update-core.php from the new version into place.
-               if ( !$wp_filesystem->copy($working_dir . '/wordpress/wp-admin/includes/update-core.php', $wp_dir . 'wp-admin/includes/update-core.php', true) ) {
-                       $wp_filesystem->delete($working_dir, true);
-                       WP_Upgrader::release_lock( 'core_updater' );
-                       return new WP_Error( 'copy_failed_for_update_core_file', __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), 'wp-admin/includes/update-core.php' );
-               }
-               $wp_filesystem->chmod($wp_dir . 'wp-admin/includes/update-core.php', FS_CHMOD_FILE);
-
-               require_once( ABSPATH . 'wp-admin/includes/update-core.php' );
-
-               if ( ! function_exists( 'update_core' ) ) {
-                       WP_Upgrader::release_lock( 'core_updater' );
-                       return new WP_Error( 'copy_failed_space', $this->strings['copy_failed_space'] );
-               }
-
-               $result = update_core( $working_dir, $wp_dir );
-
-               // In the event of an issue, we may be able to roll back.
-               if ( $parsed_args['attempt_rollback'] && $current->packages->rollback && ! $parsed_args['do_rollback'] ) {
-                       $try_rollback = false;
-                       if ( is_wp_error( $result ) ) {
-                               $error_code = $result->get_error_code();
-                               /*
-                                * Not all errors are equal. These codes are critical: copy_failed__copy_dir,
-                                * mkdir_failed__copy_dir, copy_failed__copy_dir_retry, and disk_full.
-                                * do_rollback allows for update_core() to trigger a rollback if needed.
-                                */
-                               if ( false !== strpos( $error_code, 'do_rollback' ) )
-                                       $try_rollback = true;
-                               elseif ( false !== strpos( $error_code, '__copy_dir' ) )
-                                       $try_rollback = true;
-                               elseif ( 'disk_full' === $error_code )
-                                       $try_rollback = true;
-                       }
-
-                       if ( $try_rollback ) {
-                               /** This filter is documented in wp-admin/includes/update-core.php */
-                               apply_filters( 'update_feedback', $result );
-
-                               /** This filter is documented in wp-admin/includes/update-core.php */
-                               apply_filters( 'update_feedback', $this->strings['start_rollback'] );
-
-                               $rollback_result = $this->upgrade( $current, array_merge( $parsed_args, array( 'do_rollback' => true ) ) );
-
-                               $original_result = $result;
-                               $result = new WP_Error( 'rollback_was_required', $this->strings['rollback_was_required'], (object) array( 'update' => $original_result, 'rollback' => $rollback_result ) );
-                       }
-               }
-
-               /** This action is documented in wp-admin/includes/class-wp-upgrader.php */
-               do_action( 'upgrader_process_complete', $this, array( 'action' => 'update', 'type' => 'core' ) );
-
-               // Clear the current updates
-               delete_site_transient( 'update_core' );
-
-               if ( ! $parsed_args['do_rollback'] ) {
-                       $stats = array(
-                               'update_type'      => $current->response,
-                               'success'          => true,
-                               'fs_method'        => $wp_filesystem->method,
-                               'fs_method_forced' => defined( 'FS_METHOD' ) || has_filter( 'filesystem_method' ),
-                               'fs_method_direct' => !empty( $GLOBALS['_wp_filesystem_direct_method'] ) ? $GLOBALS['_wp_filesystem_direct_method'] : '',
-                               'time_taken'       => time() - $start_time,
-                               'reported'         => $wp_version,
-                               'attempted'        => $current->version,
-                       );
-
-                       if ( is_wp_error( $result ) ) {
-                               $stats['success'] = false;
-                               // Did a rollback occur?
-                               if ( ! empty( $try_rollback ) ) {
-                                       $stats['error_code'] = $original_result->get_error_code();
-                                       $stats['error_data'] = $original_result->get_error_data();
-                                       // Was the rollback successful? If not, collect its error too.
-                                       $stats['rollback'] = ! is_wp_error( $rollback_result );
-                                       if ( is_wp_error( $rollback_result ) ) {
-                                               $stats['rollback_code'] = $rollback_result->get_error_code();
-                                               $stats['rollback_data'] = $rollback_result->get_error_data();
-                                       }
-                               } else {
-                                       $stats['error_code'] = $result->get_error_code();
-                                       $stats['error_data'] = $result->get_error_data();
-                               }
-                       }
-
-                       wp_version_check( $stats );
-               }
-
-               WP_Upgrader::release_lock( 'core_updater' );
-
-               return $result;
-       }
-
-       /**
-        * Determines if this WordPress Core version should update to an offered version or not.
-        *
-        * @since 3.7.0
-        * @access public
-        *
-        * @static
-        *
-        * @param string $offered_ver The offered version, of the format x.y.z.
-        * @return bool True if we should update to the offered version, otherwise false.
-        */
-       public static function should_update_to_version( $offered_ver ) {
-               include( ABSPATH . WPINC . '/version.php' ); // $wp_version; // x.y.z
-
-               $current_branch = implode( '.', array_slice( preg_split( '/[.-]/', $wp_version  ), 0, 2 ) ); // x.y
-               $new_branch     = implode( '.', array_slice( preg_split( '/[.-]/', $offered_ver ), 0, 2 ) ); // x.y
-               $current_is_development_version = (bool) strpos( $wp_version, '-' );
-
-               // Defaults:
-               $upgrade_dev   = true;
-               $upgrade_minor = true;
-               $upgrade_major = false;
-
-               // WP_AUTO_UPDATE_CORE = true (all), 'minor', false.
-               if ( defined( 'WP_AUTO_UPDATE_CORE' ) ) {
-                       if ( false === WP_AUTO_UPDATE_CORE ) {
-                               // Defaults to turned off, unless a filter allows it
-                               $upgrade_dev = $upgrade_minor = $upgrade_major = false;
-                       } elseif ( true === WP_AUTO_UPDATE_CORE ) {
-                               // ALL updates for core
-                               $upgrade_dev = $upgrade_minor = $upgrade_major = true;
-                       } elseif ( 'minor' === WP_AUTO_UPDATE_CORE ) {
-                               // Only minor updates for core
-                               $upgrade_dev = $upgrade_major = false;
-                               $upgrade_minor = true;
-                       }
-               }
-
-               // 1: If we're already on that version, not much point in updating?
-               if ( $offered_ver == $wp_version )
-                       return false;
-
-               // 2: If we're running a newer version, that's a nope
-               if ( version_compare( $wp_version, $offered_ver, '>' ) )
-                       return false;
-
-               $failure_data = get_site_option( 'auto_core_update_failed' );
-               if ( $failure_data ) {
-                       // If this was a critical update failure, cannot update.
-                       if ( ! empty( $failure_data['critical'] ) )
-                               return false;
-
-                       // Don't claim we can update on update-core.php if we have a non-critical failure logged.
-                       if ( $wp_version == $failure_data['current'] && false !== strpos( $offered_ver, '.1.next.minor' ) )
-                               return false;
-
-                       // Cannot update if we're retrying the same A to B update that caused a non-critical failure.
-                       // Some non-critical failures do allow retries, like download_failed.
-                       // 3.7.1 => 3.7.2 resulted in files_not_writable, if we are still on 3.7.1 and still trying to update to 3.7.2.
-                       if ( empty( $failure_data['retry'] ) && $wp_version == $failure_data['current'] && $offered_ver == $failure_data['attempted'] )
-                               return false;
-               }
-
-               // 3: 3.7-alpha-25000 -> 3.7-alpha-25678 -> 3.7-beta1 -> 3.7-beta2
-               if ( $current_is_development_version ) {
-
-                       /**
-                        * Filter whether to enable automatic core updates for development versions.
-                        *
-                        * @since 3.7.0
-                        *
-                        * @param bool $upgrade_dev Whether to enable automatic updates for
-                        *                          development versions.
-                        */
-                       if ( ! apply_filters( 'allow_dev_auto_core_updates', $upgrade_dev ) )
-                               return false;
-                       // Else fall through to minor + major branches below.
-               }
-
-               // 4: Minor In-branch updates (3.7.0 -> 3.7.1 -> 3.7.2 -> 3.7.4)
-               if ( $current_branch == $new_branch ) {
-
-                       /**
-                        * Filter whether to enable minor automatic core updates.
-                        *
-                        * @since 3.7.0
-                        *
-                        * @param bool $upgrade_minor Whether to enable minor automatic core updates.
-                        */
-                       return apply_filters( 'allow_minor_auto_core_updates', $upgrade_minor );
-               }
-
-               // 5: Major version updates (3.7.0 -> 3.8.0 -> 3.9.1)
-               if ( version_compare( $new_branch, $current_branch, '>' ) ) {
-
-                       /**
-                        * Filter whether to enable major automatic core updates.
-                        *
-                        * @since 3.7.0
-                        *
-                        * @param bool $upgrade_major Whether to enable major automatic core updates.
-                        */
-                       return apply_filters( 'allow_major_auto_core_updates', $upgrade_major );
-               }
-
-               // If we're not sure, we don't want it
-               return false;
-       }
-
-       /**
-        * Compare the disk file checksums against the expected checksums.
-        *
-        * @since 3.7.0
-        * @access public
-        *
-        * @global string $wp_version
-        * @global string $wp_local_package
-        *
-        * @return bool True if the checksums match, otherwise false.
-        */
-       public function check_files() {
-               global $wp_version, $wp_local_package;
-
-               $checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' );
-
-               if ( ! is_array( $checksums ) )
-                       return false;
-
-               foreach ( $checksums as $file => $checksum ) {
-                       // Skip files which get updated
-                       if ( 'wp-content' == substr( $file, 0, 10 ) )
-                               continue;
-                       if ( ! file_exists( ABSPATH . $file ) || md5_file( ABSPATH . $file ) !== $checksum )
-                               return false;
-               }
-
-               return true;
-       }
-}
-
-/**
- * Core class used for handling file uploads.
- *
- * This class handles the upload process and passes it as if it's a local file
- * to the Upgrade/Installer functions.
- *
- * @since 2.8.0
- */
-class File_Upload_Upgrader {
-
-       /**
-        * The full path to the file package.
-        *
-        * @since 2.8.0
-        * @access public
-        * @var string $package
-        */
-       public $package;
-
-       /**
-        * The name of the file.
-        *
-        * @since 2.8.0
-        * @access public
-        * @var string $filename
-        */
-       public $filename;
-
-       /**
-        * The ID of the attachment post for this file.
-        *
-        * @since 3.3.0
-        * @access public
-        * @var int $id
-        */
-       public $id = 0;
-
-       /**
-        * Construct the upgrader for a form.
-        *
-        * @since 2.8.0
-        * @access public
-        *
-        * @param string $form      The name of the form the file was uploaded from.
-        * @param string $urlholder The name of the `GET` parameter that holds the filename.
-        */
-       public function __construct( $form, $urlholder ) {
-
-               if ( empty($_FILES[$form]['name']) && empty($_GET[$urlholder]) )
-                       wp_die(__('Please select a file'));
-
-               //Handle a newly uploaded file, Else assume it's already been uploaded
-               if ( ! empty($_FILES) ) {
-                       $overrides = array( 'test_form' => false, 'test_type' => false );
-                       $file = wp_handle_upload( $_FILES[$form], $overrides );
-
-                       if ( isset( $file['error'] ) )
-                               wp_die( $file['error'] );
-
-                       $this->filename = $_FILES[$form]['name'];
-                       $this->package = $file['file'];
-
-                       // Construct the object array
-                       $object = array(
-                               'post_title' => $this->filename,
-                               'post_content' => $file['url'],
-                               'post_mime_type' => $file['type'],
-                               'guid' => $file['url'],
-                               'context' => 'upgrader',
-                               'post_status' => 'private'
-                       );
-
-                       // Save the data.
-                       $this->id = wp_insert_attachment( $object, $file['file'] );
-
-                       // Schedule a cleanup for 2 hours from now in case of failed install.
-                       wp_schedule_single_event( time() + 2 * HOUR_IN_SECONDS, 'upgrader_scheduled_cleanup', array( $this->id ) );
-
-               } elseif ( is_numeric( $_GET[$urlholder] ) ) {
-                       // Numeric Package = previously uploaded file, see above.
-                       $this->id = (int) $_GET[$urlholder];
-                       $attachment = get_post( $this->id );
-                       if ( empty($attachment) )
-                               wp_die(__('Please select a file'));
-
-                       $this->filename = $attachment->post_title;
-                       $this->package = get_attached_file( $attachment->ID );
-               } else {
-                       // Else, It's set to something, Back compat for plugins using the old (pre-3.3) File_Uploader handler.
-                       if ( ! ( ( $uploads = wp_upload_dir() ) && false === $uploads['error'] ) )
-                               wp_die( $uploads['error'] );
-
-                       $this->filename = $_GET[$urlholder];
-                       $this->package = $uploads['basedir'] . '/' . $this->filename;
-               }
-       }
-
-       /**
-        * Delete the attachment/uploaded file.
-        *
-        * @since 3.2.2
-        * @access public
-        *
-        * @return bool Whether the cleanup was successful.
-        */
-       public function cleanup() {
-               if ( $this->id )
-                       wp_delete_attachment( $this->id );
-
-               elseif ( file_exists( $this->package ) )
-                       return @unlink( $this->package );
-
-               return true;
-       }
-}
-
-/**
- * Core class used for handling automatic background updates.
- *
- * @since 3.7.0
- */
-class WP_Automatic_Updater {
-
-       /**
-        * Tracks update results during processing.
-        *
-        * @var array
-        * @access protected
-        */
-       protected $update_results = array();
-
-       /**
-        * Whether the entire automatic updater is disabled.
-        *
-        * @since 3.7.0
-        * @access public
-        */
-       public function is_disabled() {
-               // Background updates are disabled if you don't want file changes.
-               if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS )
-                       return true;
-
-               if ( wp_installing() )
-                       return true;
-
-               // More fine grained control can be done through the WP_AUTO_UPDATE_CORE constant and filters.
-               $disabled = defined( 'AUTOMATIC_UPDATER_DISABLED' ) && AUTOMATIC_UPDATER_DISABLED;
-
-               /**
-                * Filter whether to entirely disable background updates.
-                *
-                * There are more fine-grained filters and controls for selective disabling.
-                * This filter parallels the AUTOMATIC_UPDATER_DISABLED constant in name.
-                *
-                * This also disables update notification emails. That may change in the future.
-                *
-                * @since 3.7.0
-                *
-                * @param bool $disabled Whether the updater should be disabled.
-                */
-               return apply_filters( 'automatic_updater_disabled', $disabled );
-       }
-
-       /**
-        * Check for version control checkouts.
-        *
-        * Checks for Subversion, Git, Mercurial, and Bazaar. It recursively looks up the
-        * filesystem to the top of the drive, erring on the side of detecting a VCS
-        * checkout somewhere.
-        *
-        * ABSPATH is always checked in addition to whatever $context is (which may be the
-        * wp-content directory, for example). The underlying assumption is that if you are
-        * using version control *anywhere*, then you should be making decisions for
-        * how things get updated.
-        *
-        * @since 3.7.0
-        * @access public
-        *
-        * @param string $context The filesystem path to check, in addition to ABSPATH.
-        */
-       public function is_vcs_checkout( $context ) {
-               $context_dirs = array( untrailingslashit( $context ) );
-               if ( $context !== ABSPATH )
-                       $context_dirs[] = untrailingslashit( ABSPATH );
-
-               $vcs_dirs = array( '.svn', '.git', '.hg', '.bzr' );
-               $check_dirs = array();
-
-               foreach ( $context_dirs as $context_dir ) {
-                       // Walk up from $context_dir to the root.
-                       do {
-                               $check_dirs[] = $context_dir;
-
-                               // Once we've hit '/' or 'C:\', we need to stop. dirname will keep returning the input here.
-                               if ( $context_dir == dirname( $context_dir ) )
-                                       break;
-
-                       // Continue one level at a time.
-                       } while ( $context_dir = dirname( $context_dir ) );
-               }
-
-               $check_dirs = array_unique( $check_dirs );
-
-               // Search all directories we've found for evidence of version control.
-               foreach ( $vcs_dirs as $vcs_dir ) {
-                       foreach ( $check_dirs as $check_dir ) {
-                               if ( $checkout = @is_dir( rtrim( $check_dir, '\\/' ) . "/$vcs_dir" ) )
-                                       break 2;
-                       }
-               }
-
-               /**
-                * Filter whether the automatic updater should consider a filesystem
-                * location to be potentially managed by a version control system.
-                *
-                * @since 3.7.0
-                *
-                * @param bool $checkout  Whether a VCS checkout was discovered at $context
-                *                        or ABSPATH, or anywhere higher.
-                * @param string $context The filesystem context (a path) against which
-                *                        filesystem status should be checked.
-                */
-               return apply_filters( 'automatic_updates_is_vcs_checkout', $checkout, $context );
-       }
-
-       /**
-        * Tests to see if we can and should update a specific item.
-        *
-        * @since 3.7.0
-        * @access public
-        *
-        * @global wpdb $wpdb WordPress database abstraction object.
-        *
-        * @param string $type    The type of update being checked: 'core', 'theme',
-        *                        'plugin', 'translation'.
-        * @param object $item    The update offer.
-        * @param string $context The filesystem context (a path) against which filesystem
-        *                        access and status should be checked.
-        */
-       public function should_update( $type, $item, $context ) {
-               // Used to see if WP_Filesystem is set up to allow unattended updates.
-               $skin = new Automatic_Upgrader_Skin;
-
-               if ( $this->is_disabled() )
-                       return false;
-
-               // Only relax the filesystem checks when the update doesn't include new files
-               $allow_relaxed_file_ownership = false;
-               if ( 'core' == $type && isset( $item->new_files ) && ! $item->new_files ) {
-                       $allow_relaxed_file_ownership = true;
-               }
-
-               // If we can't do an auto core update, we may still be able to email the user.
-               if ( ! $skin->request_filesystem_credentials( false, $context, $allow_relaxed_file_ownership ) || $this->is_vcs_checkout( $context ) ) {
-                       if ( 'core' == $type )
-                               $this->send_core_update_notification_email( $item );
-                       return false;
-               }
-
-               // Next up, is this an item we can update?
-               if ( 'core' == $type )
-                       $update = Core_Upgrader::should_update_to_version( $item->current );
-               else
-                       $update = ! empty( $item->autoupdate );
-
-               /**
-                * Filter whether to automatically update core, a plugin, a theme, or a language.
-                *
-                * The dynamic portion of the hook name, `$type`, refers to the type of update
-                * being checked. Can be 'core', 'theme', 'plugin', or 'translation'.
-                *
-                * Generally speaking, plugins, themes, and major core versions are not updated
-                * by default, while translations and minor and development versions for core
-                * are updated by default.
-                *
-                * See the {@see 'allow_dev_auto_core_updates', {@see 'allow_minor_auto_core_updates'},
-                * and {@see 'allow_major_auto_core_updates'} filters for a more straightforward way to
-                * adjust core updates.
-                *
-                * @since 3.7.0
-                *
-                * @param bool   $update Whether to update.
-                * @param object $item   The update offer.
-                */
-               $update = apply_filters( 'auto_update_' . $type, $update, $item );
-
-               if ( ! $update ) {
-                       if ( 'core' == $type )
-                               $this->send_core_update_notification_email( $item );
-                       return false;
-               }
-
-               // If it's a core update, are we actually compatible with its requirements?
-               if ( 'core' == $type ) {
-                       global $wpdb;
-
-                       $php_compat = version_compare( phpversion(), $item->php_version, '>=' );
-                       if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
-                               $mysql_compat = true;
-                       else
-                               $mysql_compat = version_compare( $wpdb->db_version(), $item->mysql_version, '>=' );
-
-                       if ( ! $php_compat || ! $mysql_compat )
-                               return false;
-               }
-
-               return true;
-       }
-
-       /**
-        * Notifies an administrator of a core update.
-        *
-        * @since 3.7.0
-        * @access protected
-        *
-        * @param object $item The update offer.
-        */
-       protected function send_core_update_notification_email( $item ) {
-               $notified = get_site_option( 'auto_core_update_notified' );
-
-               // Don't notify if we've already notified the same email address of the same version.
-               if ( $notified && $notified['email'] == get_site_option( 'admin_email' ) && $notified['version'] == $item->current )
-                       return false;
-
-               // See if we need to notify users of a core update.
-               $notify = ! empty( $item->notify_email );
-
-               /**
-                * Filter whether to notify the site administrator of a new core update.
-                *
-                * By default, administrators are notified when the update offer received
-                * from WordPress.org sets a particular flag. This allows some discretion
-                * in if and when to notify.
-                *
-                * This filter is only evaluated once per release. If the same email address
-                * was already notified of the same new version, WordPress won't repeatedly
-                * email the administrator.
-                *
-                * This filter is also used on about.php to check if a plugin has disabled
-                * these notifications.
-                *
-                * @since 3.7.0
-                *
-                * @param bool   $notify Whether the site administrator is notified.
-                * @param object $item   The update offer.
-                */
-               if ( ! apply_filters( 'send_core_update_notification_email', $notify, $item ) )
-                       return false;
-
-               $this->send_email( 'manual', $item );
-               return true;
-       }
-
-       /**
-        * Update an item, if appropriate.
-        *
-        * @since 3.7.0
-        * @access public
-        *
-        * @param string $type The type of update being checked: 'core', 'theme', 'plugin', 'translation'.
-        * @param object $item The update offer.
-        *
-        * @return null|WP_Error
-        */
-       public function update( $type, $item ) {
-               $skin = new Automatic_Upgrader_Skin;
-
-               switch ( $type ) {
-                       case 'core':
-                               // The Core upgrader doesn't use the Upgrader's skin during the actual main part of the upgrade, instead, firing a filter.
-                               add_filter( 'update_feedback', array( $skin, 'feedback' ) );
-                               $upgrader = new Core_Upgrader( $skin );
-                               $context  = ABSPATH;
-                               break;
-                       case 'plugin':
-                               $upgrader = new Plugin_Upgrader( $skin );
-                               $context  = WP_PLUGIN_DIR; // We don't support custom Plugin directories, or updates for WPMU_PLUGIN_DIR
-                               break;
-                       case 'theme':
-                               $upgrader = new Theme_Upgrader( $skin );
-                               $context  = get_theme_root( $item->theme );
-                               break;
-                       case 'translation':
-                               $upgrader = new Language_Pack_Upgrader( $skin );
-                               $context  = WP_CONTENT_DIR; // WP_LANG_DIR;
-                               break;
-               }
-
-               // Determine whether we can and should perform this update.
-               if ( ! $this->should_update( $type, $item, $context ) )
-                       return false;
-
-               /**
-                * Fires immediately prior to an auto-update.
-                *
-                * @since 4.4.0
-                *
-                * @param string $type    The type of update being checked: 'core', 'theme', 'plugin', or 'translation'.
-                * @param object $item    The update offer.
-                * @param string $context The filesystem context (a path) against which filesystem access and status
-                *                        should be checked.
-                */
-               do_action( 'pre_auto_update', $type, $item, $context );
-
-               $upgrader_item = $item;
-               switch ( $type ) {
-                       case 'core':
-                               $skin->feedback( __( 'Updating to WordPress %s' ), $item->version );
-                               $item_name = sprintf( __( 'WordPress %s' ), $item->version );
-                               break;
-                       case 'theme':
-                               $upgrader_item = $item->theme;
-                               $theme = wp_get_theme( $upgrader_item );
-                               $item_name = $theme->Get( 'Name' );
-                               $skin->feedback( __( 'Updating theme: %s' ), $item_name );
-                               break;
-                       case 'plugin':
-                               $upgrader_item = $item->plugin;
-                               $plugin_data = get_plugin_data( $context . '/' . $upgrader_item );
-                               $item_name = $plugin_data['Name'];
-                               $skin->feedback( __( 'Updating plugin: %s' ), $item_name );
-                               break;
-                       case 'translation':
-                               $language_item_name = $upgrader->get_name_for_update( $item );
-                               $item_name = sprintf( __( 'Translations for %s' ), $language_item_name );
-                               $skin->feedback( sprintf( __( 'Updating translations for %1$s (%2$s)&#8230;' ), $language_item_name, $item->language ) );
-                               break;
-               }
-
-               $allow_relaxed_file_ownership = false;
-               if ( 'core' == $type && isset( $item->new_files ) && ! $item->new_files ) {
-                       $allow_relaxed_file_ownership = true;
-               }
-
-               // Boom, This sites about to get a whole new splash of paint!
-               $upgrade_result = $upgrader->upgrade( $upgrader_item, array(
-                       'clear_update_cache' => false,
-                       // Always use partial builds if possible for core updates.
-                       'pre_check_md5'      => false,
-                       // Only available for core updates.
-                       'attempt_rollback'   => true,
-                       // Allow relaxed file ownership in some scenarios
-                       'allow_relaxed_file_ownership' => $allow_relaxed_file_ownership,
-               ) );
-
-               // If the filesystem is unavailable, false is returned.
-               if ( false === $upgrade_result ) {
-                       $upgrade_result = new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) );
-               }
-
-               if ( 'core' == $type ) {
-                       if ( is_wp_error( $upgrade_result ) && ( 'up_to_date' == $upgrade_result->get_error_code() || 'locked' == $upgrade_result->get_error_code() ) ) {
-                               // These aren't actual errors, treat it as a skipped-update instead to avoid triggering the post-core update failure routines.
-                               return false;
-                       }
-
-                       // Core doesn't output this, so let's append it so we don't get confused.
-                       if ( is_wp_error( $upgrade_result ) ) {
-                               $skin->error( __( 'Installation Failed' ), $upgrade_result );
-                       } else {
-                               $skin->feedback( __( 'WordPress updated successfully' ) );
-                       }
-               }
-
-               $this->update_results[ $type ][] = (object) array(
-                       'item'     => $item,
-                       'result'   => $upgrade_result,
-                       'name'     => $item_name,
-                       'messages' => $skin->get_upgrade_messages()
-               );
-
-               return $upgrade_result;
-       }
-
-       /**
-        * Kicks off the background update process, looping through all pending updates.
-        *
-        * @since 3.7.0
-        * @access public
-        *
-        * @global wpdb   $wpdb
-        * @global string $wp_version
-        */
-       public function run() {
-               global $wpdb, $wp_version;
-
-               if ( $this->is_disabled() )
-                       return;
-
-               if ( ! is_main_network() || ! is_main_site() )
-                       return;
-
-               if ( ! WP_Upgrader::create_lock( 'auto_updater' ) )
-                       return;
-
-               // Don't automatically run these thins, as we'll handle it ourselves
-               remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
-               remove_action( 'upgrader_process_complete', 'wp_version_check' );
-               remove_action( 'upgrader_process_complete', 'wp_update_plugins' );
-               remove_action( 'upgrader_process_complete', 'wp_update_themes' );
-
-               // Next, Plugins
-               wp_update_plugins(); // Check for Plugin updates
-               $plugin_updates = get_site_transient( 'update_plugins' );
-               if ( $plugin_updates && !empty( $plugin_updates->response ) ) {
-                       foreach ( $plugin_updates->response as $plugin ) {
-                               $this->update( 'plugin', $plugin );
-                       }
-                       // Force refresh of plugin update information
-                       wp_clean_plugins_cache();
-               }
-
-               // Next, those themes we all love
-               wp_update_themes();  // Check for Theme updates
-               $theme_updates = get_site_transient( 'update_themes' );
-               if ( $theme_updates && !empty( $theme_updates->response ) ) {
-                       foreach ( $theme_updates->response as $theme ) {
-                               $this->update( 'theme', (object) $theme );
-                       }
-                       // Force refresh of theme update information
-                       wp_clean_themes_cache();
-               }
-
-               // Next, Process any core update
-               wp_version_check(); // Check for Core updates
-               $core_update = find_core_auto_update();
-
-               if ( $core_update )
-                       $this->update( 'core', $core_update );
-
-               // Clean up, and check for any pending translations
-               // (Core_Upgrader checks for core updates)
-               $theme_stats = array();
-               if ( isset( $this->update_results['theme'] ) ) {
-                       foreach ( $this->update_results['theme'] as $upgrade ) {
-                               $theme_stats[ $upgrade->item->theme ] = ( true === $upgrade->result );
-                       }
-               }
-               wp_update_themes( $theme_stats );  // Check for Theme updates
-
-               $plugin_stats = array();
-               if ( isset( $this->update_results['plugin'] ) ) {
-                       foreach ( $this->update_results['plugin'] as $upgrade ) {
-                               $plugin_stats[ $upgrade->item->plugin ] = ( true === $upgrade->result );
-                       }
-               }
-               wp_update_plugins( $plugin_stats ); // Check for Plugin updates
-
-               // Finally, Process any new translations
-               $language_updates = wp_get_translation_updates();
-               if ( $language_updates ) {
-                       foreach ( $language_updates as $update ) {
-                               $this->update( 'translation', $update );
-                       }
-
-                       // Clear existing caches
-                       wp_clean_update_cache();
-
-                       wp_version_check();  // check for Core updates
-                       wp_update_themes();  // Check for Theme updates
-                       wp_update_plugins(); // Check for Plugin updates
-               }
-
-               // Send debugging email to all development installs.
-               if ( ! empty( $this->update_results ) ) {
-                       $development_version = false !== strpos( $wp_version, '-' );
-
-                       /**
-                        * Filter whether to send a debugging email for each automatic background update.
-                        *
-                        * @since 3.7.0
-                        *
-                        * @param bool $development_version By default, emails are sent if the
-                        *                                  install is a development version.
-                        *                                  Return false to avoid the email.
-                        */
-                       if ( apply_filters( 'automatic_updates_send_debug_email', $development_version ) )
-                               $this->send_debug_email();
-
-                       if ( ! empty( $this->update_results['core'] ) )
-                               $this->after_core_update( $this->update_results['core'][0] );
-
-                       /**
-                        * Fires after all automatic updates have run.
-                        *
-                        * @since 3.8.0
-                        *
-                        * @param array $update_results The results of all attempted updates.
-                        */
-                       do_action( 'automatic_updates_complete', $this->update_results );
-               }
-
-               WP_Upgrader::release_lock( 'auto_updater' );
-       }
-
-       /**
-        * If we tried to perform a core update, check if we should send an email,
-        * and if we need to avoid processing future updates.
-        *
-        * @since Unknown
-        * @access protected
-        *
-        * @global string $wp_version
-        *
-        * @param object $update_result The result of the core update. Includes the update offer and result.
-        */
-       protected function after_core_update( $update_result ) {
-               global $wp_version;
-
-               $core_update = $update_result->item;
-               $result      = $update_result->result;
-
-               if ( ! is_wp_error( $result ) ) {
-                       $this->send_email( 'success', $core_update );
-                       return;
-               }
-
-               $error_code = $result->get_error_code();
-
-               // Any of these WP_Error codes are critical failures, as in they occurred after we started to copy core files.
-               // We should not try to perform a background update again until there is a successful one-click update performed by the user.
-               $critical = false;
-               if ( $error_code === 'disk_full' || false !== strpos( $error_code, '__copy_dir' ) ) {
-                       $critical = true;
-               } elseif ( $error_code === 'rollback_was_required' && is_wp_error( $result->get_error_data()->rollback ) ) {
-                       // A rollback is only critical if it failed too.
-                       $critical = true;
-                       $rollback_result = $result->get_error_data()->rollback;
-               } elseif ( false !== strpos( $error_code, 'do_rollback' ) ) {
-                       $critical = true;
-               }
-
-               if ( $critical ) {
-                       $critical_data = array(
-                               'attempted'  => $core_update->current,
-                               'current'    => $wp_version,
-                               'error_code' => $error_code,
-                               'error_data' => $result->get_error_data(),
-                               'timestamp'  => time(),
-                               'critical'   => true,
-                       );
-                       if ( isset( $rollback_result ) ) {
-                               $critical_data['rollback_code'] = $rollback_result->get_error_code();
-                               $critical_data['rollback_data'] = $rollback_result->get_error_data();
-                       }
-                       update_site_option( 'auto_core_update_failed', $critical_data );
-                       $this->send_email( 'critical', $core_update, $result );
-                       return;
-               }
-
-               /*
-                * Any other WP_Error code (like download_failed or files_not_writable) occurs before
-                * we tried to copy over core files. Thus, the failures are early and graceful.
-                *
-                * We should avoid trying to perform a background update again for the same version.
-                * But we can try again if another version is released.
-                *
-                * For certain 'transient' failures, like download_failed, we should allow retries.
-                * In fact, let's schedule a special update for an hour from now. (It's possible
-                * the issue could actually be on WordPress.org's side.) If that one fails, then email.
-                */
-               $send = true;
-               $transient_failures = array( 'incompatible_archive', 'download_failed', 'insane_distro', 'locked' );
-               if ( in_array( $error_code, $transient_failures ) && ! get_site_option( 'auto_core_update_failed' ) ) {
-                       wp_schedule_single_event( time() + HOUR_IN_SECONDS, 'wp_maybe_auto_update' );
-                       $send = false;
-               }
-
-               $n = get_site_option( 'auto_core_update_notified' );
-               // Don't notify if we've already notified the same email address of the same version of the same notification type.
-               if ( $n && 'fail' == $n['type'] && $n['email'] == get_site_option( 'admin_email' ) && $n['version'] == $core_update->current )
-                       $send = false;
-
-               update_site_option( 'auto_core_update_failed', array(
-                       'attempted'  => $core_update->current,
-                       'current'    => $wp_version,
-                       'error_code' => $error_code,
-                       'error_data' => $result->get_error_data(),
-                       'timestamp'  => time(),
-                       'retry'      => in_array( $error_code, $transient_failures ),
-               ) );
-
-               if ( $send )
-                       $this->send_email( 'fail', $core_update, $result );
-       }
-
-       /**
-        * Sends an email upon the completion or failure of a background core update.
-        *
-        * @since 3.7.0
-        * @access protected
-        *
-        * @global string $wp_version
-        *
-        * @param string $type        The type of email to send. Can be one of 'success', 'fail', 'manual', 'critical'.
-        * @param object $core_update The update offer that was attempted.
-        * @param mixed  $result      Optional. The result for the core update. Can be WP_Error.
-        */
-       protected function send_email( $type, $core_update, $result = null ) {
-               update_site_option( 'auto_core_update_notified', array(
-                       'type'      => $type,
-                       'email'     => get_site_option( 'admin_email' ),
-                       'version'   => $core_update->current,
-                       'timestamp' => time(),
-               ) );
-
-               $next_user_core_update = get_preferred_from_update_core();
-               // If the update transient is empty, use the update we just performed
-               if ( ! $next_user_core_update )
-                       $next_user_core_update = $core_update;
-               $newer_version_available = ( 'upgrade' == $next_user_core_update->response && version_compare( $next_user_core_update->version, $core_update->version, '>' ) );
-
-               /**
-                * Filter whether to send an email following an automatic background core update.
-                *
-                * @since 3.7.0
-                *
-                * @param bool   $send        Whether to send the email. Default true.
-                * @param string $type        The type of email to send. Can be one of
-                *                            'success', 'fail', 'critical'.
-                * @param object $core_update The update offer that was attempted.
-                * @param mixed  $result      The result for the core update. Can be WP_Error.
-                */
-               if ( 'manual' !== $type && ! apply_filters( 'auto_core_update_send_email', true, $type, $core_update, $result ) )
-                       return;
-
-               switch ( $type ) {
-                       case 'success' : // We updated.
-                               /* translators: 1: Site name, 2: WordPress version number. */
-                               $subject = __( '[%1$s] Your site has updated to WordPress %2$s' );
-                               break;
-
-                       case 'fail' :   // We tried to update but couldn't.
-                       case 'manual' : // We can't update (and made no attempt).
-                               /* translators: 1: Site name, 2: WordPress version number. */
-                               $subject = __( '[%1$s] WordPress %2$s is available. Please update!' );
-                               break;
-
-                       case 'critical' : // We tried to update, started to copy files, then things went wrong.
-                               /* translators: 1: Site name. */
-                               $subject = __( '[%1$s] URGENT: Your site may be down due to a failed update' );
-                               break;
-
-                       default :
-                               return;
-               }
-
-               // If the auto update is not to the latest version, say that the current version of WP is available instead.
-               $version = 'success' === $type ? $core_update->current : $next_user_core_update->current;
-               $subject = sprintf( $subject, wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ), $version );
-
-               $body = '';
-
-               switch ( $type ) {
-                       case 'success' :
-                               $body .= sprintf( __( 'Howdy! Your site at %1$s has been updated automatically to WordPress %2$s.' ), home_url(), $core_update->current );
-                               $body .= "\n\n";
-                               if ( ! $newer_version_available )
-                                       $body .= __( 'No further action is needed on your part.' ) . ' ';
-
-                               // Can only reference the About screen if their update was successful.
-                               list( $about_version ) = explode( '-', $core_update->current, 2 );
-                               $body .= sprintf( __( "For more on version %s, see the About WordPress screen:" ), $about_version );
-                               $body .= "\n" . admin_url( 'about.php' );
-
-                               if ( $newer_version_available ) {
-                                       $body .= "\n\n" . sprintf( __( 'WordPress %s is also now available.' ), $next_user_core_update->current ) . ' ';
-                                       $body .= __( 'Updating is easy and only takes a few moments:' );
-                                       $body .= "\n" . network_admin_url( 'update-core.php' );
-                               }
-
-                               break;
-
-                       case 'fail' :
-                       case 'manual' :
-                               $body .= sprintf( __( 'Please update your site at %1$s to WordPress %2$s.' ), home_url(), $next_user_core_update->current );
-
-                               $body .= "\n\n";
-
-                               // Don't show this message if there is a newer version available.
-                               // Potential for confusion, and also not useful for them to know at this point.
-                               if ( 'fail' == $type && ! $newer_version_available )
-                                       $body .= __( 'We tried but were unable to update your site automatically.' ) . ' ';
-
-                               $body .= __( 'Updating is easy and only takes a few moments:' );
-                               $body .= "\n" . network_admin_url( 'update-core.php' );
-                               break;
-
-                       case 'critical' :
-                               if ( $newer_version_available )
-                                       $body .= sprintf( __( 'Your site at %1$s experienced a critical failure while trying to update WordPress to version %2$s.' ), home_url(), $core_update->current );
-                               else
-                                       $body .= sprintf( __( 'Your site at %1$s experienced a critical failure while trying to update to the latest version of WordPress, %2$s.' ), home_url(), $core_update->current );
-
-                               $body .= "\n\n" . __( "This means your site may be offline or broken. Don't panic; this can be fixed." );
-
-                               $body .= "\n\n" . __( "Please check out your site now. It's possible that everything is working. If it says you need to update, you should do so:" );
-                               $body .= "\n" . network_admin_url( 'update-core.php' );
-                               break;
-               }
-
-               $critical_support = 'critical' === $type && ! empty( $core_update->support_email );
-               if ( $critical_support ) {
-                       // Support offer if available.
-                       $body .= "\n\n" . sprintf( __( "The WordPress team is willing to help you. Forward this email to %s and the team will work with you to make sure your site is working." ), $core_update->support_email );
-               } else {
-                       // Add a note about the support forums.
-                       $body .= "\n\n" . __( 'If you experience any issues or need support, the volunteers in the WordPress.org support forums may be able to help.' );
-                       $body .= "\n" . __( 'https://wordpress.org/support/' );
-               }
-
-               // Updates are important!
-               if ( $type != 'success' || $newer_version_available ) {
-                       $body .= "\n\n" . __( 'Keeping your site updated is important for security. It also makes the internet a safer place for you and your readers.' );
-               }
-
-               if ( $critical_support ) {
-                       $body .= " " . __( "If you reach out to us, we'll also ensure you'll never have this problem again." );
-               }
-
-               // If things are successful and we're now on the latest, mention plugins and themes if any are out of date.
-               if ( $type == 'success' && ! $newer_version_available && ( get_plugin_updates() || get_theme_updates() ) ) {
-                       $body .= "\n\n" . __( 'You also have some plugins or themes with updates available. Update them now:' );
-                       $body .= "\n" . network_admin_url();
-               }
-
-               $body .= "\n\n" . __( 'The WordPress Team' ) . "\n";
-
-               if ( 'critical' == $type && is_wp_error( $result ) ) {
-                       $body .= "\n***\n\n";
-                       $body .= sprintf( __( 'Your site was running version %s.' ), $GLOBALS['wp_version'] );
-                       $body .= ' ' . __( 'We have some data that describes the error your site encountered.' );
-                       $body .= ' ' . __( 'Your hosting company, support forum volunteers, or a friendly developer may be able to use this information to help you:' );
-
-                       // If we had a rollback and we're still critical, then the rollback failed too.
-                       // Loop through all errors (the main WP_Error, the update result, the rollback result) for code, data, etc.
-                       if ( 'rollback_was_required' == $result->get_error_code() )
-                               $errors = array( $result, $result->get_error_data()->update, $result->get_error_data()->rollback );
-                       else
-                               $errors = array( $result );
-
-                       foreach ( $errors as $error ) {
-                               if ( ! is_wp_error( $error ) )
-                                       continue;
-                               $error_code = $error->get_error_code();
-                               $body .= "\n\n" . sprintf( __( "Error code: %s" ), $error_code );
-                               if ( 'rollback_was_required' == $error_code )
-                                       continue;
-                               if ( $error->get_error_message() )
-                                       $body .= "\n" . $error->get_error_message();
-                               $error_data = $error->get_error_data();
-                               if ( $error_data )
-                                       $body .= "\n" . implode( ', ', (array) $error_data );
-                       }
-                       $body .= "\n";
-               }
-
-               $to  = get_site_option( 'admin_email' );
-               $headers = '';
-
-               $email = compact( 'to', 'subject', 'body', 'headers' );
-
-               /**
-                * Filter the email sent following an automatic background core update.
-                *
-                * @since 3.7.0
-                *
-                * @param array $email {
-                *     Array of email arguments that will be passed to wp_mail().
-                *
-                *     @type string $to      The email recipient. An array of emails
-                *                            can be returned, as handled by wp_mail().
-                *     @type string $subject The email's subject.
-                *     @type string $body    The email message body.
-                *     @type string $headers Any email headers, defaults to no headers.
-                * }
-                * @param string $type        The type of email being sent. Can be one of
-                *                            'success', 'fail', 'manual', 'critical'.
-                * @param object $core_update The update offer that was attempted.
-                * @param mixed  $result      The result for the core update. Can be WP_Error.
-                */
-               $email = apply_filters( 'auto_core_update_email', $email, $type, $core_update, $result );
-
-               wp_mail( $email['to'], wp_specialchars_decode( $email['subject'] ), $email['body'], $email['headers'] );
-       }
-
-       /**
-        * Prepares and sends an email of a full log of background update results, useful for debugging and geekery.
-        *
-        * @since 3.7.0
-        * @access protected
-        */
-       protected function send_debug_email() {
-               $update_count = 0;
-               foreach ( $this->update_results as $type => $updates )
-                       $update_count += count( $updates );
-
-               $body = array();
-               $failures = 0;
-
-               $body[] = sprintf( __( 'WordPress site: %s' ), network_home_url( '/' ) );
-
-               // Core
-               if ( isset( $this->update_results['core'] ) ) {
-                       $result = $this->update_results['core'][0];
-                       if ( $result->result && ! is_wp_error( $result->result ) ) {
-                               $body[] = sprintf( __( 'SUCCESS: WordPress was successfully updated to %s' ), $result->name );
-                       } else {
-                               $body[] = sprintf( __( 'FAILED: WordPress failed to update to %s' ), $result->name );
-                               $failures++;
-                       }
-                       $body[] = '';
-               }
-
-               // Plugins, Themes, Translations
-               foreach ( array( 'plugin', 'theme', 'translation' ) as $type ) {
-                       if ( ! isset( $this->update_results[ $type ] ) )
-                               continue;
-                       $success_items = wp_list_filter( $this->update_results[ $type ], array( 'result' => true ) );
-                       if ( $success_items ) {
-                               $messages = array(
-                                       'plugin'      => __( 'The following plugins were successfully updated:' ),
-                                       'theme'       => __( 'The following themes were successfully updated:' ),
-                                       'translation' => __( 'The following translations were successfully updated:' ),
-                               );
-
-                               $body[] = $messages[ $type ];
-                               foreach ( wp_list_pluck( $success_items, 'name' ) as $name ) {
-                                       $body[] = ' * ' . sprintf( __( 'SUCCESS: %s' ), $name );
-                               }
-                       }
-                       if ( $success_items != $this->update_results[ $type ] ) {
-                               // Failed updates
-                               $messages = array(
-                                       'plugin'      => __( 'The following plugins failed to update:' ),
-                                       'theme'       => __( 'The following themes failed to update:' ),
-                                       'translation' => __( 'The following translations failed to update:' ),
-                               );
-
-                               $body[] = $messages[ $type ];
-                               foreach ( $this->update_results[ $type ] as $item ) {
-                                       if ( ! $item->result || is_wp_error( $item->result ) ) {
-                                               $body[] = ' * ' . sprintf( __( 'FAILED: %s' ), $item->name );
-                                               $failures++;
-                                       }
-                               }
-                       }
-                       $body[] = '';
-               }
-
-               $site_title = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );
-               if ( $failures ) {
-                       $body[] = trim( __(
-"BETA TESTING?
-=============
-
-This debugging email is sent when you are using a development version of WordPress.
-
-If you think these failures might be due to a bug in WordPress, could you report it?
- * Open a thread in the support forums: https://wordpress.org/support/forum/alphabeta
- * Or, if you're comfortable writing a bug report: https://core.trac.wordpress.org/
-
-Thanks! -- The WordPress Team" ) );
-                       $body[] = '';
-
-                       $subject = sprintf( __( '[%s] There were failures during background updates' ), $site_title );
-               } else {
-                       $subject = sprintf( __( '[%s] Background updates have finished' ), $site_title );
-               }
-
-               $body[] = trim( __(
-'UPDATE LOG
-==========' ) );
-               $body[] = '';
-
-               foreach ( array( 'core', 'plugin', 'theme', 'translation' ) as $type ) {
-                       if ( ! isset( $this->update_results[ $type ] ) )
-                               continue;
-                       foreach ( $this->update_results[ $type ] as $update ) {
-                               $body[] = $update->name;
-                               $body[] = str_repeat( '-', strlen( $update->name ) );
-                               foreach ( $update->messages as $message )
-                                       $body[] = "  " . html_entity_decode( str_replace( '&#8230;', '...', $message ) );
-                               if ( is_wp_error( $update->result ) ) {
-                                       $results = array( 'update' => $update->result );
-                                       // If we rolled back, we want to know an error that occurred then too.
-                                       if ( 'rollback_was_required' === $update->result->get_error_code() )
-                                               $results = (array) $update->result->get_error_data();
-                                       foreach ( $results as $result_type => $result ) {
-                                               if ( ! is_wp_error( $result ) )
-                                                       continue;
-
-                                               if ( 'rollback' === $result_type ) {
-                                                       /* translators: 1: Error code, 2: Error message. */
-                                                       $body[] = '  ' . sprintf( __( 'Rollback Error: [%1$s] %2$s' ), $result->get_error_code(), $result->get_error_message() );
-                                               } else {
-                                                       /* translators: 1: Error code, 2: Error message. */
-                                                       $body[] = '  ' . sprintf( __( 'Error: [%1$s] %2$s' ), $result->get_error_code(), $result->get_error_message() );
-                                               }
-
-                                               if ( $result->get_error_data() )
-                                                       $body[] = '         ' . implode( ', ', (array) $result->get_error_data() );
-                                       }
-                               }
-                               $body[] = '';
-                       }
-               }
-
-               $email = array(
-                       'to'      => get_site_option( 'admin_email' ),
-                       'subject' => $subject,
-                       'body'    => implode( "\n", $body ),
-                       'headers' => ''
-               );
-
-               /**
-                * Filter the debug email that can be sent following an automatic
-                * background core update.
-                *
-                * @since 3.8.0
-                *
-                * @param array $email {
-                *     Array of email arguments that will be passed to wp_mail().
-                *
-                *     @type string $to      The email recipient. An array of emails
-                *                           can be returned, as handled by wp_mail().
-                *     @type string $subject Email subject.
-                *     @type string $body    Email message body.
-                *     @type string $headers Any email headers. Default empty.
-                * }
-                * @param int   $failures The number of failures encountered while upgrading.
-                * @param mixed $results  The results of all attempted updates.
-                */
-               $email = apply_filters( 'automatic_updates_debug_email', $email, $failures, $this->update_results );
-
-               wp_mail( $email['to'], wp_specialchars_decode( $email['subject'] ), $email['body'], $email['headers'] );
-       }
-}
+/** WP_Automatic_Updater class */
+require_once ABSPATH . 'wp-admin/includes/class-wp-automatic-updater.php';
index 9e26867df95fde4151bb833b368d87abb3dcb98e..80720b6c0f07d13f6ef68697dd45f23b0bf74955 100644 (file)
@@ -125,7 +125,7 @@ class WP_Users_List_Table extends WP_List_Table {
                        $args['order'] = $_REQUEST['order'];
 
                /**
-                * Filter the query arguments used to retrieve users for the current users list table.
+                * Filters the query arguments used to retrieve users for the current users list table.
                 *
                 * @since 4.4.0
                 *
@@ -160,7 +160,7 @@ class WP_Users_List_Table extends WP_List_Table {
         * with this table.
         *
         * Provides a list of roles and user count for that role for easy
-        * filtering of the user table.
+        * Filtersing of the user table.
         *
         * @since  3.1.0
         * @access protected
@@ -275,8 +275,11 @@ class WP_Users_List_Table extends WP_List_Table {
                 * in the Users list table.
                 *
                 * @since 3.5.0
+                * @since 4.6.0 The `$which` parameter was added.
+                *
+                * @param string $which The location of the extra table nav markup: 'top' or 'bottom'.
                 */
-               do_action( 'restrict_manage_users' );
+               do_action( 'restrict_manage_users', $which );
                echo '</div>';
        }
 
@@ -336,7 +339,6 @@ class WP_Users_List_Table extends WP_List_Table {
        protected function get_sortable_columns() {
                $c = array(
                        'username' => 'login',
-                       'name'     => 'name',
                        'email'    => 'email',
                );
 
@@ -412,7 +414,7 @@ class WP_Users_List_Table extends WP_List_Table {
                                $actions['remove'] = "<a class='submitdelete' href='" . wp_nonce_url( $url."action=remove&amp;user=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Remove' ) . "</a>";
 
                        /**
-                        * Filter the action links displayed under each user in the Users list table.
+                        * Filters the action links displayed under each user in the Users list table.
                         *
                         * @since 2.8.0
                         *
@@ -488,7 +490,7 @@ class WP_Users_List_Table extends WP_List_Table {
                                                break;
                                        default:
                                                /**
-                                                * Filter the display output of custom columns in the Users list table.
+                                                * Filters the display output of custom columns in the Users list table.
                                                 *
                                                 * @since 2.8.0
                                                 *
@@ -547,7 +549,7 @@ class WP_Users_List_Table extends WP_List_Table {
                }
 
                /**
-                * Filter the returned array of roles for a user.
+                * Filters the returned array of roles for a user.
                 *
                 * @since 4.4.0
                 *
index 3037c4102e744b4444c3cdd40271f2ac400e4c43..87e0a25d53a02243c9c6ab2fdea1c7fd3e25682c 100644 (file)
@@ -46,7 +46,7 @@ function comment_exists( $comment_author, $comment_date, $timezone = 'blog' ) {
  */
 function edit_comment() {
        if ( ! current_user_can( 'edit_comment', (int) $_POST['comment_ID'] ) )
-               wp_die ( __( 'You are not allowed to edit comments on this post.' ) );
+               wp_die ( __( 'Sorry, you are not allowed to edit comments on this post.' ) );
 
        if ( isset( $_POST['newcomment_author'] ) )
                $_POST['comment_author'] = $_POST['newcomment_author'];
@@ -102,7 +102,7 @@ function get_comment_to_edit( $id ) {
 
        $comment->comment_content = format_to_edit( $comment->comment_content );
        /**
-        * Filter the comment content before editing.
+        * Filters the comment content before editing.
         *
         * @since 2.0.0
         *
index 02ebbe7aa1bf6120cca83e21a69d2e0a78c97b00..2b9d2f235017f88ebd46038d4c888798eaf84800 100644 (file)
@@ -36,6 +36,7 @@ __('Freetown', 'continents-cities');
 __('Gaborone', 'continents-cities');
 __('Harare', 'continents-cities');
 __('Johannesburg', 'continents-cities');
+__('Juba', 'continents-cities');
 __('Kampala', 'continents-cities');
 __('Khartoum', 'continents-cities');
 __('Kigali', 'continents-cities');
@@ -63,6 +64,7 @@ __('Timbuktu', 'continents-cities');
 __('Tripoli', 'continents-cities');
 __('Tunis', 'continents-cities');
 __('Windhoek', 'continents-cities');
+
 __('America', 'continents-cities');
 __('Adak', 'continents-cities');
 __('Anchorage', 'continents-cities');
@@ -78,6 +80,7 @@ __('Jujuy', 'continents-cities');
 __('La Rioja', 'continents-cities');
 __('Mendoza', 'continents-cities');
 __('Rio Gallegos', 'continents-cities');
+__('Salta', 'continents-cities');
 __('San Juan', 'continents-cities');
 __('San Luis', 'continents-cities');
 __('Tucuman', 'continents-cities');
@@ -87,6 +90,7 @@ __('Asuncion', 'continents-cities');
 __('Atikokan', 'continents-cities');
 __('Atka', 'continents-cities');
 __('Bahia', 'continents-cities');
+__('Bahia Banderas', 'continents-cities');
 __('Barbados', 'continents-cities');
 __('Belem', 'continents-cities');
 __('Belize', 'continents-cities');
@@ -94,16 +98,20 @@ __('Blanc-Sablon', 'continents-cities');
 __('Boa Vista', 'continents-cities');
 __('Bogota', 'continents-cities');
 __('Boise', 'continents-cities');
+__('Buenos Aires', 'continents-cities');
 __('Cambridge Bay', 'continents-cities');
 __('Campo Grande', 'continents-cities');
 __('Cancun', 'continents-cities');
 __('Caracas', 'continents-cities');
+__('Catamarca', 'continents-cities');
 __('Cayenne', 'continents-cities');
 __('Cayman', 'continents-cities');
 __('Chicago', 'continents-cities');
 __('Chihuahua', 'continents-cities');
 __('Coral Harbour', 'continents-cities');
+__('Cordoba', 'continents-cities');
 __('Costa Rica', 'continents-cities');
+__('Creston', 'continents-cities');
 __('Cuiaba', 'continents-cities');
 __('Curacao', 'continents-cities');
 __('Danmarkshavn', 'continents-cities');
@@ -116,6 +124,7 @@ __('Edmonton', 'continents-cities');
 __('Eirunepe', 'continents-cities');
 __('El Salvador', 'continents-cities');
 __('Ensenada', 'continents-cities');
+__('Fort Nelson', 'continents-cities');
 __('Fort Wayne', 'continents-cities');
 __('Fortaleza', 'continents-cities');
 __('Glace Bay', 'continents-cities');
@@ -139,25 +148,33 @@ __('Tell City', 'continents-cities');
 __('Vevay', 'continents-cities');
 __('Vincennes', 'continents-cities');
 __('Winamac', 'continents-cities');
+__('Indianapolis', 'continents-cities');
 __('Inuvik', 'continents-cities');
 __('Iqaluit', 'continents-cities');
 __('Jamaica', 'continents-cities');
+__('Jujuy', 'continents-cities');
 __('Juneau', 'continents-cities');
 __('Kentucky', 'continents-cities');
 __('Louisville', 'continents-cities');
 __('Monticello', 'continents-cities');
 __('Knox IN', 'continents-cities');
+__('Kralendijk', 'continents-cities');
 __('La Paz', 'continents-cities');
 __('Lima', 'continents-cities');
 __('Los Angeles', 'continents-cities');
+__('Louisville', 'continents-cities');
+__('Lower Princes', 'continents-cities');
 __('Maceio', 'continents-cities');
 __('Managua', 'continents-cities');
 __('Manaus', 'continents-cities');
 __('Marigot', 'continents-cities');
 __('Martinique', 'continents-cities');
+__('Matamoros', 'continents-cities');
 __('Mazatlan', 'continents-cities');
+__('Mendoza', 'continents-cities');
 __('Menominee', 'continents-cities');
 __('Merida', 'continents-cities');
+__('Metlakatla', 'continents-cities');
 __('Mexico City', 'continents-cities');
 __('Miquelon', 'continents-cities');
 __('Moncton', 'continents-cities');
@@ -171,14 +188,16 @@ __('Nipigon', 'continents-cities');
 __('Nome', 'continents-cities');
 __('Noronha', 'continents-cities');
 __('North Dakota', 'continents-cities');
+__('Beulah', 'continents-cities');
 __('Center', 'continents-cities');
 __('New Salem', 'continents-cities');
+__('Ojinaga', 'continents-cities');
 __('Panama', 'continents-cities');
 __('Pangnirtung', 'continents-cities');
 __('Paramaribo', 'continents-cities');
 __('Phoenix', 'continents-cities');
-__('Port-au-Prince', 'continents-cities');
 __('Port of Spain', 'continents-cities');
+__('Port-au-Prince', 'continents-cities');
 __('Porto Acre', 'continents-cities');
 __('Porto Velho', 'continents-cities');
 __('Puerto Rico', 'continents-cities');
@@ -189,11 +208,14 @@ __('Regina', 'continents-cities');
 __('Resolute', 'continents-cities');
 __('Rio Branco', 'continents-cities');
 __('Rosario', 'continents-cities');
+__('Santa Isabel', 'continents-cities');
+__('Santarem', 'continents-cities');
 __('Santiago', 'continents-cities');
 __('Santo Domingo', 'continents-cities');
 __('Sao Paulo', 'continents-cities');
 __('Scoresbysund', 'continents-cities');
 __('Shiprock', 'continents-cities');
+__('Sitka', 'continents-cities');
 __('St Barthelemy', 'continents-cities');
 __('St Johns', 'continents-cities');
 __('St Kitts', 'continents-cities');
@@ -213,19 +235,24 @@ __('Whitehorse', 'continents-cities');
 __('Winnipeg', 'continents-cities');
 __('Yakutat', 'continents-cities');
 __('Yellowknife', 'continents-cities');
+
 __('Antarctica', 'continents-cities');
 __('Casey', 'continents-cities');
 __('Davis', 'continents-cities');
 __('DumontDUrville', 'continents-cities');
+__('Macquarie', 'continents-cities');
 __('Mawson', 'continents-cities');
 __('McMurdo', 'continents-cities');
 __('Palmer', 'continents-cities');
 __('Rothera', 'continents-cities');
 __('South Pole', 'continents-cities');
 __('Syowa', 'continents-cities');
+__('Troll', 'continents-cities');
 __('Vostok', 'continents-cities');
+
 __('Arctic', 'continents-cities');
 __('Longyearbyen', 'continents-cities');
+
 __('Asia', 'continents-cities');
 __('Aden', 'continents-cities');
 __('Almaty', 'continents-cities');
@@ -239,10 +266,12 @@ __('Baghdad', 'continents-cities');
 __('Bahrain', 'continents-cities');
 __('Baku', 'continents-cities');
 __('Bangkok', 'continents-cities');
+__('Barnaul', 'continents-cities');
 __('Beirut', 'continents-cities');
 __('Bishkek', 'continents-cities');
 __('Brunei', 'continents-cities');
 __('Calcutta', 'continents-cities');
+__('Chita', 'continents-cities');
 __('Choibalsan', 'continents-cities');
 __('Chongqing', 'continents-cities');
 __('Chungking', 'continents-cities');
@@ -255,6 +284,7 @@ __('Dubai', 'continents-cities');
 __('Dushanbe', 'continents-cities');
 __('Gaza', 'continents-cities');
 __('Harbin', 'continents-cities');
+__('Hebron', 'continents-cities');
 __('Ho Chi Minh', 'continents-cities');
 __('Hong Kong', 'continents-cities');
 __('Hovd', 'continents-cities');
@@ -267,7 +297,9 @@ __('Kabul', 'continents-cities');
 __('Kamchatka', 'continents-cities');
 __('Karachi', 'continents-cities');
 __('Kashgar', 'continents-cities');
+__('Kathmandu', 'continents-cities');
 __('Katmandu', 'continents-cities');
+__('Khandyga', 'continents-cities');
 __('Kolkata', 'continents-cities');
 __('Krasnoyarsk', 'continents-cities');
 __('Kuala Lumpur', 'continents-cities');
@@ -280,6 +312,7 @@ __('Makassar', 'continents-cities');
 __('Manila', 'continents-cities');
 __('Muscat', 'continents-cities');
 __('Nicosia', 'continents-cities');
+__('Novokuznetsk', 'continents-cities');
 __('Novosibirsk', 'continents-cities');
 __('Omsk', 'continents-cities');
 __('Oral', 'continents-cities');
@@ -296,6 +329,7 @@ __('Samarkand', 'continents-cities');
 __('Seoul', 'continents-cities');
 __('Shanghai', 'continents-cities');
 __('Singapore', 'continents-cities');
+__('Srednekolymsk', 'continents-cities');
 __('Taipei', 'continents-cities');
 __('Tashkent', 'continents-cities');
 __('Tbilisi', 'continents-cities');
@@ -304,15 +338,18 @@ __('Tel Aviv', 'continents-cities');
 __('Thimbu', 'continents-cities');
 __('Thimphu', 'continents-cities');
 __('Tokyo', 'continents-cities');
+__('Tomsk', 'continents-cities');
 __('Ujung Pandang', 'continents-cities');
 __('Ulaanbaatar', 'continents-cities');
 __('Ulan Bator', 'continents-cities');
 __('Urumqi', 'continents-cities');
+__('Ust-Nera', 'continents-cities');
 __('Vientiane', 'continents-cities');
 __('Vladivostok', 'continents-cities');
 __('Yakutsk', 'continents-cities');
 __('Yekaterinburg', 'continents-cities');
 __('Yerevan', 'continents-cities');
+
 __('Atlantic', 'continents-cities');
 __('Azores', 'continents-cities');
 __('Bermuda', 'continents-cities');
@@ -326,6 +363,7 @@ __('Reykjavik', 'continents-cities');
 __('South Georgia', 'continents-cities');
 __('St Helena', 'continents-cities');
 __('Stanley', 'continents-cities');
+
 __('Australia', 'continents-cities');
 __('ACT', 'continents-cities');
 __('Adelaide', 'continents-cities');
@@ -340,8 +378,8 @@ __('LHI', 'continents-cities');
 __('Lindeman', 'continents-cities');
 __('Lord Howe', 'continents-cities');
 __('Melbourne', 'continents-cities');
-__('North', 'continents-cities');
 __('NSW', 'continents-cities');
+__('North', 'continents-cities');
 __('Perth', 'continents-cities');
 __('Queensland', 'continents-cities');
 __('South', 'continents-cities');
@@ -350,6 +388,7 @@ __('Tasmania', 'continents-cities');
 __('Victoria', 'continents-cities');
 __('West', 'continents-cities');
 __('Yancowinna', 'continents-cities');
+
 __('Etc', 'continents-cities');
 __('GMT', 'continents-cities');
 __('GMT+0', 'continents-cities');
@@ -383,12 +422,14 @@ __('GMT-9', 'continents-cities');
 __('GMT0', 'continents-cities');
 __('Greenwich', 'continents-cities');
 __('UCT', 'continents-cities');
-__('Universal', 'continents-cities');
 __('UTC', 'continents-cities');
+__('Universal', 'continents-cities');
 __('Zulu', 'continents-cities');
+
 __('Europe', 'continents-cities');
 __('Amsterdam', 'continents-cities');
 __('Andorra', 'continents-cities');
+__('Astrakhan', 'continents-cities');
 __('Athens', 'continents-cities');
 __('Belfast', 'continents-cities');
 __('Belgrade', 'continents-cities');
@@ -397,6 +438,7 @@ __('Bratislava', 'continents-cities');
 __('Brussels', 'continents-cities');
 __('Bucharest', 'continents-cities');
 __('Budapest', 'continents-cities');
+__('Busingen', 'continents-cities');
 __('Chisinau', 'continents-cities');
 __('Copenhagen', 'continents-cities');
 __('Dublin', 'continents-cities');
@@ -404,9 +446,11 @@ __('Gibraltar', 'continents-cities');
 __('Guernsey', 'continents-cities');
 __('Helsinki', 'continents-cities');
 __('Isle of Man', 'continents-cities');
+__('Istanbul', 'continents-cities');
 __('Jersey', 'continents-cities');
 __('Kaliningrad', 'continents-cities');
 __('Kiev', 'continents-cities');
+__('Kirov', 'continents-cities');
 __('Lisbon', 'continents-cities');
 __('Ljubljana', 'continents-cities');
 __('London', 'continents-cities');
@@ -417,6 +461,7 @@ __('Mariehamn', 'continents-cities');
 __('Minsk', 'continents-cities');
 __('Monaco', 'continents-cities');
 __('Moscow', 'continents-cities');
+__('Nicosia', 'continents-cities');
 __('Oslo', 'continents-cities');
 __('Paris', 'continents-cities');
 __('Podgorica', 'continents-cities');
@@ -433,6 +478,7 @@ __('Stockholm', 'continents-cities');
 __('Tallinn', 'continents-cities');
 __('Tirane', 'continents-cities');
 __('Tiraspol', 'continents-cities');
+__('Ulyanovsk', 'continents-cities');
 __('Uzhgorod', 'continents-cities');
 __('Vaduz', 'continents-cities');
 __('Vatican', 'continents-cities');
@@ -443,6 +489,7 @@ __('Warsaw', 'continents-cities');
 __('Zagreb', 'continents-cities');
 __('Zaporozhye', 'continents-cities');
 __('Zurich', 'continents-cities');
+
 __('Indian', 'continents-cities');
 __('Antananarivo', 'continents-cities');
 __('Chagos', 'continents-cities');
@@ -455,10 +502,13 @@ __('Maldives', 'continents-cities');
 __('Mauritius', 'continents-cities');
 __('Mayotte', 'continents-cities');
 __('Reunion', 'continents-cities');
+
 __('Pacific', 'continents-cities');
 __('Apia', 'continents-cities');
 __('Auckland', 'continents-cities');
+__('Bougainville', 'continents-cities');
 __('Chatham', 'continents-cities');
+__('Chuuk', 'continents-cities');
 __('Easter', 'continents-cities');
 __('Efate', 'continents-cities');
 __('Enderbury', 'continents-cities');
@@ -484,6 +534,7 @@ __('Noumea', 'continents-cities');
 __('Pago Pago', 'continents-cities');
 __('Palau', 'continents-cities');
 __('Pitcairn', 'continents-cities');
+__('Pohnpei', 'continents-cities');
 __('Ponape', 'continents-cities');
 __('Port Moresby', 'continents-cities');
 __('Rarotonga', 'continents-cities');
index 5a234857d879df49090507201227ec89e62de77d..e517f956c76161a2f77dbb1ce93ac03acbef902c 100644 (file)
@@ -65,7 +65,7 @@ function wp_dashboard_setup() {
                do_action( 'wp_network_dashboard_setup' );
 
                /**
-                * Filter the list of widgets to load for the Network Admin dashboard.
+                * Filters the list of widgets to load for the Network Admin dashboard.
                 *
                 * @since 3.1.0
                 *
@@ -82,7 +82,7 @@ function wp_dashboard_setup() {
                do_action( 'wp_user_dashboard_setup' );
 
                /**
-                * Filter the list of widgets to load for the User Admin dashboard.
+                * Filters the list of widgets to load for the User Admin dashboard.
                 *
                 * @since 3.1.0
                 *
@@ -99,7 +99,7 @@ function wp_dashboard_setup() {
                do_action( 'wp_dashboard_setup' );
 
                /**
-                * Filter the list of widgets to load for the admin dashboard.
+                * Filters the list of widgets to load for the admin dashboard.
                 *
                 * @since 2.5.0
                 *
@@ -148,6 +148,14 @@ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_
        $screen = get_current_screen();
        global $wp_dashboard_control_callbacks;
 
+       $private_callback_args = array( '__widget_basename' => $widget_name );
+
+       if ( is_null( $callback_args ) ) {
+               $callback_args = $private_callback_args;
+       } else if ( is_array( $callback_args ) ) {
+               $callback_args = array_merge( $callback_args, $private_callback_args );
+       }
+
        if ( $control_callback && current_user_can( 'edit_dashboard' ) && is_callable( $control_callback ) ) {
                $wp_dashboard_control_callbacks[$widget_id] = $control_callback;
                if ( isset( $_GET['edit'] ) && $widget_id == $_GET['edit'] ) {
@@ -263,7 +271,7 @@ function wp_dashboard_right_now() {
        }
        // Comments
        $num_comm = wp_count_comments();
-       if ( $num_comm && $num_comm->approved ) {
+       if ( $num_comm && ( $num_comm->approved || $num_comm->moderated ) ) {
                $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->approved ), number_format_i18n( $num_comm->approved ) );
                ?>
                <li class="comment-count"><a href="edit-comments.php"><?php echo $text; ?></a></li>
@@ -283,7 +291,7 @@ function wp_dashboard_right_now() {
        }
 
        /**
-        * Filter the array of extra elements to list in the 'At a Glance'
+        * Filters the array of extra elements to list in the 'At a Glance'
         * dashboard widget.
         *
         * Prior to 3.8.0, the widget was named 'Right Now'. Each element
@@ -308,7 +316,7 @@ function wp_dashboard_right_now() {
        if ( ! is_network_admin() && ! is_user_admin() && current_user_can( 'manage_options' ) && '0' == get_option( 'blog_public' ) ) {
 
                /**
-                * Filter the link title attribute for the 'Search Engines Discouraged'
+                * Filters the link title attribute for the 'Search Engines Discouraged'
                 * message displayed in the 'At a Glance' dashboard widget.
                 *
                 * Prior to 3.8.0, the widget was named 'Right Now'.
@@ -321,7 +329,7 @@ function wp_dashboard_right_now() {
                $title = apply_filters( 'privacy_on_link_title', '' );
 
                /**
-                * Filter the link label for the 'Search Engines Discouraged' message
+                * Filters the link label for the 'Search Engines Discouraged' message
                 * displayed in the 'At a Glance' dashboard widget.
                 *
                 * Prior to 3.8.0, the widget was named 'Right Now'.
@@ -538,7 +546,7 @@ function wp_dashboard_recent_drafts( $drafts = false ) {
                );
 
                /**
-                * Filter the post query arguments for the 'Recent Drafts' dashboard widget.
+                * Filters the post query arguments for the 'Recent Drafts' dashboard widget.
                 *
                 * @since 4.4.0
                 *
@@ -630,12 +638,10 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
                        $actions['trash'] = "<a href='$trash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1' class='delete vim-d vim-destructive' aria-label='" . esc_attr__( 'Move this comment to the Trash' ) . "'>" . _x( 'Trash', 'verb' ) . '</a>';
                }
 
-               if ( '1' === $comment->comment_approved ) {
-                       $actions['view'] = '<a class="comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '" aria-label="' . esc_attr__( 'View this comment' ) . '">' . __( 'View' ) . '</a>';
-               }
+               $actions['view'] = '<a class="comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '" aria-label="' . esc_attr__( 'View this comment' ) . '">' . __( 'View' ) . '</a>';
 
                /**
-                * Filter the action links displayed for each comment in the 'Recent Comments'
+                * Filters the action links displayed for each comment in the 'Recent Comments'
                 * dashboard widget.
                 *
                 * @since 2.6.0
@@ -653,9 +659,13 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
                        ( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';
 
                        // Reply and quickedit need a hide-if-no-js span
-                       if ( 'reply' == $action || 'quickedit' == $action )
+                       if ( 'reply' == $action || 'quickedit' == $action ) {
                                $action .= ' hide-if-no-js';
+                       }
 
+                       if ( 'view' === $action && '1' !== $comment->comment_approved ) {
+                               $action .= ' hidden';
+                       }
                        $actions_string .= "<span class='$action'>$sep$link</span>";
                }
        }
@@ -804,7 +814,7 @@ function wp_dashboard_recent_posts( $args ) {
        );
 
        /**
-        * Filter the query arguments used for the Recent Posts widget.
+        * Filters the query arguments used for the Recent Posts widget.
         *
         * @since 4.2.0
         *
@@ -833,10 +843,10 @@ function wp_dashboard_recent_posts( $args ) {
                        } elseif ( date( 'Y-m-d', $time ) == $tomorrow ) {
                                $relative = __( 'Tomorrow' );
                        } elseif ( date( 'Y', $time ) !== date( 'Y', current_time( 'timestamp' ) ) ) {
-                               /* translators: date and time format for recent posts on the dashboard, from a different calendar year, see http://php.net/date */
+                               /* translators: date and time format for recent posts on the dashboard, from a different calendar year, see https://secure.php.net/date */
                                $relative = date_i18n( __( 'M jS Y' ), $time );
                        } else {
-                               /* translators: date and time format for recent posts on the dashboard, see http://php.net/date */
+                               /* translators: date and time format for recent posts on the dashboard, see https://secure.php.net/date */
                                $relative = date_i18n( __( 'M jS' ), $time );
                        }
 
@@ -945,7 +955,7 @@ function wp_dashboard_rss_output( $widget_id ) {
  * If $check_urls is empty, look for the rss feed url found in the dashboard
  * widget options of $widget_id. If cached, call $callback, a function that
  * echoes out output for this widget. If not cache, echo a "Loading..." stub
- * which is later replaced by AJAX call (see top of /wp-admin/index.php)
+ * which is later replaced by Ajax call (see top of /wp-admin/index.php)
  *
  * @since 2.5.0
  *
@@ -1066,7 +1076,7 @@ function wp_dashboard_primary() {
                'news' => array(
 
                        /**
-                        * Filter the primary link URL for the 'WordPress News' dashboard widget.
+                        * Filters the primary link URL for the 'WordPress News' dashboard widget.
                         *
                         * @since 2.5.0
                         *
@@ -1075,7 +1085,7 @@ function wp_dashboard_primary() {
                        'link' => apply_filters( 'dashboard_primary_link', __( 'https://wordpress.org/news/' ) ),
 
                        /**
-                        * Filter the primary feed URL for the 'WordPress News' dashboard widget.
+                        * Filters the primary feed URL for the 'WordPress News' dashboard widget.
                         *
                         * @since 2.3.0
                         *
@@ -1084,7 +1094,7 @@ function wp_dashboard_primary() {
                        'url' => apply_filters( 'dashboard_primary_feed', __( 'http://wordpress.org/news/feed/' ) ),
 
                        /**
-                        * Filter the primary link title for the 'WordPress News' dashboard widget.
+                        * Filters the primary link title for the 'WordPress News' dashboard widget.
                         *
                         * @since 2.3.0
                         *
@@ -1099,7 +1109,7 @@ function wp_dashboard_primary() {
                'planet' => array(
 
                        /**
-                        * Filter the secondary link URL for the 'WordPress News' dashboard widget.
+                        * Filters the secondary link URL for the 'WordPress News' dashboard widget.
                         *
                         * @since 2.3.0
                         *
@@ -1108,7 +1118,7 @@ function wp_dashboard_primary() {
                        'link' => apply_filters( 'dashboard_secondary_link', __( 'https://planet.wordpress.org/' ) ),
 
                        /**
-                        * Filter the secondary feed URL for the 'WordPress News' dashboard widget.
+                        * Filters the secondary feed URL for the 'WordPress News' dashboard widget.
                         *
                         * @since 2.3.0
                         *
@@ -1117,7 +1127,7 @@ function wp_dashboard_primary() {
                        'url' => apply_filters( 'dashboard_secondary_feed', __( 'https://planet.wordpress.org/feed/' ) ),
 
                        /**
-                        * Filter the secondary link title for the 'WordPress News' dashboard widget.
+                        * Filters the secondary link title for the 'WordPress News' dashboard widget.
                         *
                         * @since 2.3.0
                         *
@@ -1126,7 +1136,7 @@ function wp_dashboard_primary() {
                        'title'        => apply_filters( 'dashboard_secondary_title', __( 'Other WordPress News' ) ),
 
                        /**
-                        * Filter the number of secondary link items for the 'WordPress News' dashboard widget.
+                        * Filters the number of secondary link items for the 'WordPress News' dashboard widget.
                         *
                         * @since 4.4.0
                         *
@@ -1259,7 +1269,7 @@ function wp_dashboard_plugins_output( $rss, $args = array() ) {
 /**
  * Display file upload quota on dashboard.
  *
- * Runs on the activity_box_end hook in wp_dashboard_right_now().
+ * Runs on the {@see 'activity_box_end'} hook in wp_dashboard_right_now().
  *
  * @since 3.0.0
  *
@@ -1353,7 +1363,7 @@ function wp_dashboard_browser_nag() {
        }
 
        /**
-       * Filter the notice output for the 'Browse Happy' nag meta box.
+       * Filters the notice output for the 'Browse Happy' nag meta box.
        *
        * @since 3.2.0
        *
index 1c245b368b4fdcd98b285d853ca79ab6aae6db53..2bf25d3336a30fdfc9ad6d144ad7588031f693d0 100644 (file)
@@ -18,7 +18,7 @@
  * @see wp_editor()
  */
 function tinymce_include() {
-       _deprecated_function( __FUNCTION__, '2.1', 'wp_editor()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'wp_editor()' );
 
        wp_tiny_mce();
 }
@@ -31,7 +31,7 @@ function tinymce_include() {
  *
  */
 function documentation_link() {
-       _deprecated_function( __FUNCTION__, '2.5' );
+       _deprecated_function( __FUNCTION__, '2.5.0' );
 }
 
 /**
@@ -48,7 +48,7 @@ function documentation_link() {
  * @return array Shrunk dimensions (width, height).
  */
 function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'wp_constrain_dimensions()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'wp_constrain_dimensions()' );
        return wp_constrain_dimensions( $width, $height, $wmax, $hmax );
 }
 
@@ -64,7 +64,7 @@ function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) {
  * @return array Shrunk dimensions (width, height).
  */
 function get_udims( $width, $height ) {
-       _deprecated_function( __FUNCTION__, '3.5', 'wp_constrain_dimensions()' );
+       _deprecated_function( __FUNCTION__, '3.5.0', 'wp_constrain_dimensions()' );
        return wp_constrain_dimensions( $width, $height, 128, 96 );
 }
 
@@ -80,7 +80,7 @@ function get_udims( $width, $height ) {
  * @param array $popular_ids Unused.
  */
 function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) {
-       _deprecated_function( __FUNCTION__, '2.6', 'wp_category_checklist()' );
+       _deprecated_function( __FUNCTION__, '2.6.0', 'wp_category_checklist()' );
        global $post_ID;
        wp_category_checklist( $post_ID );
 }
@@ -95,7 +95,7 @@ function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array()
  * @param int $default Unused.
  */
 function dropdown_link_categories( $default = 0 ) {
-       _deprecated_function( __FUNCTION__, '2.6', 'wp_link_category_checklist()' );
+       _deprecated_function( __FUNCTION__, '2.6.0', 'wp_link_category_checklist()' );
        global $link_id;
        wp_link_category_checklist( $link_id );
 }
@@ -111,7 +111,7 @@ function dropdown_link_categories( $default = 0 ) {
  * @return string Full filesystem path to edit.
  */
 function get_real_file_to_edit( $file ) {
-       _deprecated_function( __FUNCTION__, '2.9' );
+       _deprecated_function( __FUNCTION__, '2.9.0' );
 
        return WP_CONTENT_DIR . $file;
 }
@@ -131,7 +131,7 @@ function get_real_file_to_edit( $file ) {
  * @return bool|null False if no categories were found.
  */
 function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'wp_dropdown_categories()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'wp_dropdown_categories()' );
        if (!$categories )
                $categories = get_categories( array('hide_empty' => 0) );
 
@@ -165,7 +165,7 @@ function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $le
  * @param callable $sanitize_callback A callback function that sanitizes the option's value.
  */
 function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'register_setting()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'register_setting()' );
        register_setting( $option_group, $option_name, $sanitize_callback );
 }
 
@@ -181,7 +181,7 @@ function add_option_update_handler( $option_group, $option_name, $sanitize_callb
  * @param callable $sanitize_callback
  */
 function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'unregister_setting()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'unregister_setting()' );
        unregister_setting( $option_group, $option_name, $sanitize_callback );
 }
 
@@ -194,7 +194,7 @@ function remove_option_update_handler( $option_group, $option_name, $sanitize_ca
  * @param string $filename
 **/
 function codepress_get_lang( $filename ) {
-       _deprecated_function( __FUNCTION__, '3.0' );
+       _deprecated_function( __FUNCTION__, '3.0.0' );
 }
 
 /**
@@ -204,7 +204,7 @@ function codepress_get_lang( $filename ) {
  * @deprecated 3.0.0
 **/
 function codepress_footer_js() {
-       _deprecated_function( __FUNCTION__, '3.0' );
+       _deprecated_function( __FUNCTION__, '3.0.0' );
 }
 
 /**
@@ -214,7 +214,7 @@ function codepress_footer_js() {
  * @deprecated 3.0.0
 **/
 function use_codepress() {
-       _deprecated_function( __FUNCTION__, '3.0' );
+       _deprecated_function( __FUNCTION__, '3.0.0' );
 }
 
 /**
@@ -225,7 +225,7 @@ function use_codepress() {
  * @return array List of user IDs.
  */
 function get_author_user_ids() {
-       _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
+       _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
 
        global $wpdb;
        if ( !is_multisite() )
@@ -245,7 +245,7 @@ function get_author_user_ids() {
  * @return array|bool List of editable authors. False if no editable users.
  */
 function get_editable_authors( $user_id ) {
-       _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
+       _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
 
        global $wpdb;
 
@@ -271,7 +271,7 @@ function get_editable_authors( $user_id ) {
  * @return array Array of editable user IDs, empty array otherwise.
  */
 function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'post' ) {
-       _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
+       _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
 
        global $wpdb;
 
@@ -304,7 +304,7 @@ function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'p
  * @deprecated 3.1.0 Use get_users()
  */
 function get_nonauthor_user_ids() {
-       _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
+       _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
 
        global $wpdb;
 
@@ -480,7 +480,7 @@ class WP_User_Search {
         * @return WP_User_Search
         */
        function __construct( $search_term = '', $page = '', $role = '' ) {
-               _deprecated_function( __FUNCTION__, '3.1', 'WP_User_Query' );
+               _deprecated_function( __FUNCTION__, '3.1.0', 'WP_User_Query' );
 
                $this->search_term = wp_unslash( $search_term );
                $this->raw_page = ( '' == $page ) ? false : (int) $page;
@@ -670,7 +670,7 @@ endif;
  * @return array List of posts from others.
  */
 function get_others_unpublished_posts( $user_id, $type = 'any' ) {
-       _deprecated_function( __FUNCTION__, '3.1' );
+       _deprecated_function( __FUNCTION__, '3.1.0' );
 
        global $wpdb;
 
@@ -703,7 +703,7 @@ function get_others_unpublished_posts( $user_id, $type = 'any' ) {
  * @return array List of drafts from other users.
  */
 function get_others_drafts($user_id) {
-       _deprecated_function( __FUNCTION__, '3.1' );
+       _deprecated_function( __FUNCTION__, '3.1.0' );
 
        return get_others_unpublished_posts($user_id, 'draft');
 }
@@ -718,7 +718,7 @@ function get_others_drafts($user_id) {
  * @return array List of posts with pending review post type from other users.
  */
 function get_others_pending($user_id) {
-       _deprecated_function( __FUNCTION__, '3.1' );
+       _deprecated_function( __FUNCTION__, '3.1.0' );
 
        return get_others_unpublished_posts($user_id, 'pending');
 }
@@ -731,7 +731,7 @@ function get_others_pending($user_id) {
  * @see wp_dashboard_quick_press()
  */
 function wp_dashboard_quick_press_output() {
-       _deprecated_function( __FUNCTION__, '3.2', 'wp_dashboard_quick_press()' );
+       _deprecated_function( __FUNCTION__, '3.2.0', 'wp_dashboard_quick_press()' );
        wp_dashboard_quick_press();
 }
 
@@ -745,7 +745,7 @@ function wp_dashboard_quick_press_output() {
  * @staticvar int $num
  */
 function wp_tiny_mce( $teeny = false, $settings = false ) {
-       _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
+       _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
 
        static $num = 1;
 
@@ -771,7 +771,7 @@ function wp_tiny_mce( $teeny = false, $settings = false ) {
  * @see wp_editor()
  */
 function wp_preload_dialogs() {
-       _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
+       _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
 }
 
 /**
@@ -781,7 +781,7 @@ function wp_preload_dialogs() {
  * @see wp_editor()
  */
 function wp_print_editor_js() {
-       _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
+       _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
 }
 
 /**
@@ -791,7 +791,7 @@ function wp_print_editor_js() {
  * @see wp_editor()
  */
 function wp_quicktags() {
-       _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
+       _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
 }
 
 /**
@@ -802,7 +802,7 @@ function wp_quicktags() {
  * @see WP_Screen::render_screen_layout()
  */
 function screen_layout( $screen ) {
-       _deprecated_function( __FUNCTION__, '3.3', '$current_screen->render_screen_layout()' );
+       _deprecated_function( __FUNCTION__, '3.3.0', '$current_screen->render_screen_layout()' );
 
        $current_screen = get_current_screen();
 
@@ -822,7 +822,7 @@ function screen_layout( $screen ) {
  * @see WP_Screen::render_per_page_options()
  */
 function screen_options( $screen ) {
-       _deprecated_function( __FUNCTION__, '3.3', '$current_screen->render_per_page_options()' );
+       _deprecated_function( __FUNCTION__, '3.3.0', '$current_screen->render_per_page_options()' );
 
        $current_screen = get_current_screen();
 
@@ -854,7 +854,7 @@ function screen_meta( $screen ) {
  * @see WP_Admin_Bar
  */
 function favorite_actions() {
-       _deprecated_function( __FUNCTION__, '3.2', 'WP_Admin_Bar' );
+       _deprecated_function( __FUNCTION__, '3.2.0', 'WP_Admin_Bar' );
 }
 
 /**
@@ -866,7 +866,7 @@ function favorite_actions() {
  * @return null|string
  */
 function media_upload_image() {
-       _deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
+       _deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
        return wp_media_upload_handler();
 }
 
@@ -879,7 +879,7 @@ function media_upload_image() {
  * @return null|string
  */
 function media_upload_audio() {
-       _deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
+       _deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
        return wp_media_upload_handler();
 }
 
@@ -892,7 +892,7 @@ function media_upload_audio() {
  * @return null|string
  */
 function media_upload_video() {
-       _deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
+       _deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
        return wp_media_upload_handler();
 }
 
@@ -905,7 +905,7 @@ function media_upload_video() {
  * @return null|string
  */
 function media_upload_file() {
-       _deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
+       _deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
        return wp_media_upload_handler();
 }
 
@@ -918,7 +918,7 @@ function media_upload_file() {
  * @return string
  */
 function type_url_form_image() {
-       _deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('image')" );
+       _deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('image')" );
        return wp_media_insert_url_form( 'image' );
 }
 
@@ -931,7 +931,7 @@ function type_url_form_image() {
  * @return string
  */
 function type_url_form_audio() {
-       _deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('audio')" );
+       _deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('audio')" );
        return wp_media_insert_url_form( 'audio' );
 }
 
@@ -944,7 +944,7 @@ function type_url_form_audio() {
  * @return string
  */
 function type_url_form_video() {
-       _deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('video')" );
+       _deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('video')" );
        return wp_media_insert_url_form( 'video' );
 }
 
@@ -957,7 +957,7 @@ function type_url_form_video() {
  * @return string
  */
 function type_url_form_file() {
-       _deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('file')" );
+       _deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('file')" );
        return wp_media_insert_url_form( 'file' );
 }
 
@@ -974,7 +974,7 @@ function type_url_form_file() {
  * @param string    $help   The content of an 'Overview' help tab.
  */
 function add_contextual_help( $screen, $help ) {
-       _deprecated_function( __FUNCTION__, '3.3', 'get_current_screen()->add_help_tab()' );
+       _deprecated_function( __FUNCTION__, '3.3.0', 'get_current_screen()->add_help_tab()' );
 
        if ( is_string( $screen ) )
                $screen = convert_to_screen( $screen );
@@ -992,7 +992,7 @@ function add_contextual_help( $screen, $help ) {
  * @return array $themes Array of allowed themes.
  */
 function get_allowed_themes() {
-       _deprecated_function( __FUNCTION__, '3.4', "wp_get_themes( array( 'allowed' => true ) )" );
+       _deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'allowed' => true ) )" );
 
        $themes = wp_get_themes( array( 'allowed' => true ) );
 
@@ -1014,7 +1014,7 @@ function get_allowed_themes() {
  * @return array
  */
 function get_broken_themes() {
-       _deprecated_function( __FUNCTION__, '3.4', "wp_get_themes( array( 'errors' => true )" );
+       _deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'errors' => true )" );
 
        $themes = wp_get_themes( array( 'errors' => true ) );
        $broken = array();
@@ -1039,7 +1039,7 @@ function get_broken_themes() {
  * @return WP_Theme
  */
 function current_theme_info() {
-       _deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme()' );
+       _deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' );
 
        return wp_get_theme();
 }
@@ -1052,7 +1052,7 @@ function current_theme_info() {
  * @deprecated 3.5.0
  */
 function _insert_into_post_button( $type ) {
-       _deprecated_function( __FUNCTION__, '3.5' );
+       _deprecated_function( __FUNCTION__, '3.5.0' );
 }
 
 /**
@@ -1063,7 +1063,7 @@ function _insert_into_post_button( $type ) {
  * @deprecated 3.5.0
  */
 function _media_button($title, $icon, $type, $id) {
-       _deprecated_function( __FUNCTION__, '3.5' );
+       _deprecated_function( __FUNCTION__, '3.5.0' );
 }
 
 /**
@@ -1077,7 +1077,7 @@ function _media_button($title, $icon, $type, $id) {
  * @return object
  */
 function get_post_to_edit( $id ) {
-       _deprecated_function( __FUNCTION__, '3.5', 'get_post()' );
+       _deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' );
 
        return get_post( $id, OBJECT, 'edit' );
 }
@@ -1092,7 +1092,7 @@ function get_post_to_edit( $id ) {
  * @return WP_Post Post object containing all the default post data as attributes
  */
 function get_default_page_to_edit() {
-       _deprecated_function( __FUNCTION__, '3.5', "get_default_post_to_edit( 'page' )" );
+       _deprecated_function( __FUNCTION__, '3.5.0', "get_default_post_to_edit( 'page' )" );
 
        $page = get_default_post_to_edit();
        $page->post_type = 'page';
@@ -1112,12 +1112,12 @@ function get_default_page_to_edit() {
  * @return string Thumbnail path on success, Error string on failure.
  */
 function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
-       _deprecated_function( __FUNCTION__, '3.5', 'image_resize()' );
+       _deprecated_function( __FUNCTION__, '3.5.0', 'image_resize()' );
        return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) );
 }
 
 /**
- * This was once used to display a metabox for the nav menu theme locations.
+ * This was once used to display a meta box for the nav menu theme locations.
  *
  * Deprecated in favor of a 'Manage Locations' tab added to nav menus management screen.
  *
@@ -1125,7 +1125,7 @@ function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
  * @deprecated 3.6.0
  */
 function wp_nav_menu_locations_meta_box() {
-       _deprecated_function( __FUNCTION__, '3.6' );
+       _deprecated_function( __FUNCTION__, '3.6.0' );
 }
 
 /**
@@ -1139,7 +1139,7 @@ function wp_nav_menu_locations_meta_box() {
  * @see Core_Upgrader
  */
 function wp_update_core($current, $feedback = '') {
-       _deprecated_function( __FUNCTION__, '3.7', 'new Core_Upgrader();' );
+       _deprecated_function( __FUNCTION__, '3.7.0', 'new Core_Upgrader();' );
 
        if ( !empty($feedback) )
                add_filter('update_feedback', $feedback);
@@ -1162,7 +1162,7 @@ function wp_update_core($current, $feedback = '') {
  * @see Plugin_Upgrader
  */
 function wp_update_plugin($plugin, $feedback = '') {
-       _deprecated_function( __FUNCTION__, '3.7', 'new Plugin_Upgrader();' );
+       _deprecated_function( __FUNCTION__, '3.7.0', 'new Plugin_Upgrader();' );
 
        if ( !empty($feedback) )
                add_filter('update_feedback', $feedback);
@@ -1175,7 +1175,7 @@ function wp_update_plugin($plugin, $feedback = '') {
 /**
  * This was once used to kick-off the Theme Updater.
  *
- * Deprecated in favor of instantating a Theme_Upgrader instance directly,
+ * Deprecated in favor of instantiating a Theme_Upgrader instance directly,
  * and calling the 'upgrade' method.
  * Unused since 2.8.0.
  *
@@ -1184,7 +1184,7 @@ function wp_update_plugin($plugin, $feedback = '') {
  * @see Theme_Upgrader
  */
 function wp_update_theme($theme, $feedback = '') {
-       _deprecated_function( __FUNCTION__, '3.7', 'new Theme_Upgrader();' );
+       _deprecated_function( __FUNCTION__, '3.7.0', 'new Theme_Upgrader();' );
 
        if ( !empty($feedback) )
                add_filter('update_feedback', $feedback);
@@ -1203,7 +1203,7 @@ function wp_update_theme($theme, $feedback = '') {
  * @param int|bool $id
  */
 function the_attachment_links( $id = false ) {
-       _deprecated_function( __FUNCTION__, '3.7' );
+       _deprecated_function( __FUNCTION__, '3.7.0' );
 }
 
 /**
@@ -1305,7 +1305,7 @@ function wp_dashboard_secondary_control() {}
  * @param int $new_ID
  */
 function _relocate_children( $old_ID, $new_ID ) {
-       _deprecated_function( __FUNCTION__, '3.9' );
+       _deprecated_function( __FUNCTION__, '3.9.0' );
 }
 
 /**
@@ -1332,7 +1332,7 @@ function _relocate_children( $old_ID, $new_ID ) {
  * @return string The resulting page's hook_suffix.
  */
 function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {
-       _deprecated_function( __FUNCTION__, '4.5', 'add_menu_page()' );
+       _deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
 
        global $_wp_last_object_menu;
 
@@ -1365,7 +1365,7 @@ function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $fu
  * @return string The resulting page's hook_suffix.
  */
 function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {
-       _deprecated_function( __FUNCTION__, '4.5', 'add_menu_page()' );
+       _deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
 
        global $_wp_last_utility_menu;
 
@@ -1373,3 +1373,26 @@ function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $f
 
        return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_utility_menu);
 }
+
+/**
+ * Disables autocomplete on the 'post' form (Add/Edit Post screens) for WebKit browsers,
+ * as they disregard the autocomplete setting on the editor textarea. That can break the editor
+ * when the user navigates to it with the browser's Back button. See #28037
+ *
+ * Replaced with wp_page_reload_on_back_button_js() that also fixes this problem.
+ *
+ * @since 4.0.0
+ * $deprecated 4.6.0
+ *
+ * @global bool $is_safari
+ * @global bool $is_chrome
+ */
+function post_form_autocomplete_off() {
+       global $is_safari, $is_chrome;
+
+       _deprecated_function( __FUNCTION__, '4.6.0' );
+
+       if ( $is_safari || $is_chrome ) {
+               echo ' autocomplete="off"';
+       }
+}
index dcfd6034f549241c3658d295b649951e93acf6ec..8c34f0e3aa8c97448bd3df3deb56206ad0e51982 100644 (file)
@@ -40,7 +40,7 @@ $messages['post_tag'] = array(
 );
 
 /**
- * Filter the messages displayed when a tag is updated.
+ * Filters the messages displayed when a tag is updated.
  *
  * @since 3.7.0
  *
index 4b18c9c0a391e6a7fd2baa29ede3a24acd12488d..25bf5e7fea328bca3e57d65ea239d12705b37c0d 100644 (file)
@@ -49,7 +49,7 @@ function export_wp( $args = array() ) {
        $date = date( 'Y-m-d' );
        $wp_filename = $sitename . 'wordpress.' . $date . '.xml';
        /**
-        * Filter the export filename.
+        * Filters the export filename.
         *
         * @since 4.4.0
         *
@@ -182,7 +182,7 @@ function export_wp( $args = array() ) {
                if ( empty( $category->name ) )
                        return;
 
-               echo '<wp:cat_name>' . wxr_cdata( $category->name ) . '</wp:cat_name>';
+               echo '<wp:cat_name>' . wxr_cdata( $category->name ) . "</wp:cat_name>\n";
        }
 
        /**
@@ -196,7 +196,7 @@ function export_wp( $args = array() ) {
                if ( empty( $category->description ) )
                        return;
 
-               echo '<wp:category_description>' . wxr_cdata( $category->description ) . '</wp:category_description>';
+               echo '<wp:category_description>' . wxr_cdata( $category->description ) . "</wp:category_description>\n";
        }
 
        /**
@@ -210,7 +210,7 @@ function export_wp( $args = array() ) {
                if ( empty( $tag->name ) )
                        return;
 
-               echo '<wp:tag_name>' . wxr_cdata( $tag->name ) . '</wp:tag_name>';
+               echo '<wp:tag_name>' . wxr_cdata( $tag->name ) . "</wp:tag_name>\n";
        }
 
        /**
@@ -224,7 +224,7 @@ function export_wp( $args = array() ) {
                if ( empty( $tag->description ) )
                        return;
 
-               echo '<wp:tag_description>' . wxr_cdata( $tag->description ) . '</wp:tag_description>';
+               echo '<wp:tag_description>' . wxr_cdata( $tag->description ) . "</wp:tag_description>\n";
        }
 
        /**
@@ -238,7 +238,7 @@ function export_wp( $args = array() ) {
                if ( empty( $term->name ) )
                        return;
 
-               echo '<wp:term_name>' . wxr_cdata( $term->name ) . '</wp:term_name>';
+               echo '<wp:term_name>' . wxr_cdata( $term->name ) . "</wp:term_name>\n";
        }
 
        /**
@@ -252,7 +252,38 @@ function export_wp( $args = array() ) {
                if ( empty( $term->description ) )
                        return;
 
-               echo '<wp:term_description>' . wxr_cdata( $term->description ) . '</wp:term_description>';
+               echo "\t\t<wp:term_description>" . wxr_cdata( $term->description ) . "</wp:term_description>\n";
+       }
+
+       /**
+        * Output term meta XML tags for a given term object.
+        *
+        * @since 4.6.0
+        *
+        * @param WP_Term $term Term object.
+        */
+       function wxr_term_meta( $term ) {
+               global $wpdb;
+
+               $termmeta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->termmeta WHERE term_id = %d", $term->term_id ) );
+
+               foreach ( $termmeta as $meta ) {
+                       /**
+                        * Filters whether to selectively skip term meta used for WXR exports.
+                        *
+                        * Returning a truthy value to the filter will skip the current meta
+                        * object from being exported.
+                        *
+                        * @since 4.6.0
+                        *
+                        * @param bool   $skip     Whether to skip the current piece of term meta. Default false.
+                        * @param string $meta_key Current meta key.
+                        * @param object $meta     Current meta object.
+                        */
+                       if ( ! apply_filters( 'wxr_export_skip_termmeta', false, $meta->meta_key, $meta ) ) {
+                               printf( "\t\t<wp:termmeta>\n\t\t\t<wp:meta_key>%s</wp:meta_key>\n\t\t\t<wp:meta_value>%s</wp:meta_value>\n\t\t</wp:termmeta>\n", wxr_cdata( $meta->meta_key ), wxr_cdata( $meta->meta_value ) );
+                       }
+               }
        }
 
        /**
@@ -386,13 +417,34 @@ function export_wp( $args = array() ) {
 <?php wxr_authors_list( $post_ids ); ?>
 
 <?php foreach ( $cats as $c ) : ?>
-       <wp:category><wp:term_id><?php echo intval( $c->term_id ); ?></wp:term_id><wp:category_nicename><?php echo wxr_cdata( $c->slug ); ?></wp:category_nicename><wp:category_parent><?php echo wxr_cdata( $c->parent ? $cats[$c->parent]->slug : '' ); ?></wp:category_parent><?php wxr_cat_name( $c ); ?><?php wxr_category_description( $c ); ?></wp:category>
+       <wp:category>
+               <wp:term_id><?php echo intval( $c->term_id ); ?></wp:term_id>
+               <wp:category_nicename><?php echo wxr_cdata( $c->slug ); ?></wp:category_nicename>
+               <wp:category_parent><?php echo wxr_cdata( $c->parent ? $cats[$c->parent]->slug : '' ); ?></wp:category_parent>
+               <?php wxr_cat_name( $c );
+               wxr_category_description( $c );
+               wxr_term_meta( $c ); ?>
+       </wp:category>
 <?php endforeach; ?>
 <?php foreach ( $tags as $t ) : ?>
-       <wp:tag><wp:term_id><?php echo intval( $t->term_id ); ?></wp:term_id><wp:tag_slug><?php echo wxr_cdata( $t->slug ); ?></wp:tag_slug><?php wxr_tag_name( $t ); ?><?php wxr_tag_description( $t ); ?></wp:tag>
+       <wp:tag>
+               <wp:term_id><?php echo intval( $t->term_id ); ?></wp:term_id>
+               <wp:tag_slug><?php echo wxr_cdata( $t->slug ); ?></wp:tag_slug>
+               <?php wxr_tag_name( $t );
+               wxr_tag_description( $t );
+               wxr_term_meta( $t ); ?>
+       </wp:tag>
 <?php endforeach; ?>
 <?php foreach ( $terms as $t ) : ?>
-       <wp:term><wp:term_id><?php echo wxr_cdata( $t->term_id ); ?></wp:term_id><wp:term_taxonomy><?php echo wxr_cdata( $t->taxonomy ); ?></wp:term_taxonomy><wp:term_slug><?php echo wxr_cdata( $t->slug ); ?></wp:term_slug><wp:term_parent><?php echo wxr_cdata( $t->parent ? $terms[$t->parent]->slug : '' ); ?></wp:term_parent><?php wxr_term_name( $t ); ?><?php wxr_term_description( $t ); ?></wp:term>
+       <wp:term>
+               <wp:term_id><?php echo wxr_cdata( $t->term_id ); ?></wp:term_id>
+               <wp:term_taxonomy><?php echo wxr_cdata( $t->taxonomy ); ?></wp:term_taxonomy>
+               <wp:term_slug><?php echo wxr_cdata( $t->slug ); ?></wp:term_slug>
+               <wp:term_parent><?php echo wxr_cdata( $t->parent ? $terms[$t->parent]->slug : '' ); ?></wp:term_parent>
+               <?php wxr_term_name( $t );
+               wxr_term_description( $t );
+               wxr_term_meta( $t ); ?>
+       </wp:term>
 <?php endforeach; ?>
 <?php if ( 'all' == $args['content'] ) wxr_nav_menu_terms(); ?>
 
@@ -432,7 +484,7 @@ function export_wp( $args = array() ) {
                <description></description>
                <content:encoded><?php
                        /**
-                        * Filter the post content used for WXR exports.
+                        * Filters the post content used for WXR exports.
                         *
                         * @since 2.5.0
                         *
@@ -442,7 +494,7 @@ function export_wp( $args = array() ) {
                ?></content:encoded>
                <excerpt:encoded><?php
                        /**
-                        * Filter the post excerpt used for WXR exports.
+                        * Filters the post excerpt used for WXR exports.
                         *
                         * @since 2.6.0
                         *
@@ -469,7 +521,7 @@ function export_wp( $args = array() ) {
 <?php  $postmeta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) );
                foreach ( $postmeta as $meta ) :
                        /**
-                        * Filter whether to selectively skip post meta used for WXR exports.
+                        * Filters whether to selectively skip post meta used for WXR exports.
                         *
                         * Returning a truthy value to the filter will skip the current meta
                         * object from being exported.
@@ -508,7 +560,7 @@ function export_wp( $args = array() ) {
 <?php          $c_meta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->commentmeta WHERE comment_id = %d", $c->comment_ID ) );
                        foreach ( $c_meta as $meta ) :
                                /**
-                                * Filter whether to selectively skip comment meta used for WXR exports.
+                                * Filters whether to selectively skip comment meta used for WXR exports.
                                 *
                                 * Returning a truthy value to the filter will skip the current meta
                                 * object from being exported.
index 72f5e2209bccaa2f1227979ac01b308b0c53abd4..face9164b48904870b1d5de1d359b67bb9159182 100644 (file)
@@ -42,6 +42,12 @@ $wp_file_descriptions = array(
        'video.php'             => __( 'Video Attachment Template' ),
        'audio.php'             => __( 'Audio Attachment Template' ),
        'application.php'       => __( 'Application Attachment Template' ),
+       // Embeds
+       'embed.php'             => __( 'Embed Template' ),
+       'embed-404.php'         => __( 'Embed 404 Template' ),
+       'embed-content.php'     => __( 'Embed Content Template' ),
+       'header-embed.php'      => __( 'Embed Header Template' ),
+       'footer-embed.php'      => __( 'Embed Footer Template' ),
        // Stylesheets
        'style.css'             => __( 'Stylesheet' ),
        'editor-style.css'      => __( 'Visual Editor Stylesheet' ),
@@ -162,7 +168,7 @@ function wp_tempnam( $filename = '', $dir = '' ) {
                $dir = get_temp_dir();
        }
 
-       if ( empty( $filename ) || '.' == $filename || '/' == $filename ) {
+       if ( empty( $filename ) || '.' == $filename || '/' == $filename || '\\' == $filename ) {
                $filename = time();
        }
 
@@ -245,7 +251,7 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
        }
 
        /**
-        * Filter the data for a file before it is uploaded to WordPress.
+        * Filters the data for a file before it is uploaded to WordPress.
         *
         * The dynamic portion of the hook name, `$action`, refers to the post action.
         *
@@ -264,7 +270,7 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
 
        // You may have had one or more 'wp_handle_upload_prefilter' functions error out the file. Handle that gracefully.
        if ( isset( $file['error'] ) && ! is_numeric( $file['error'] ) && $file['error'] ) {
-               return $upload_error_handler( $file, $file['error'] );
+               return call_user_func_array( $upload_error_handler, array( &$file, $file['error'] ) );
        }
 
        // Install user overrides. Did we mention that this voids your warranty?
@@ -306,11 +312,11 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
 
        // A correct form post will pass this test.
        if ( $test_form && ( ! isset( $_POST['action'] ) || ( $_POST['action'] != $action ) ) ) {
-               return call_user_func( $upload_error_handler, $file, __( 'Invalid form submission.' ) );
+               return call_user_func_array( $upload_error_handler, array( &$file, __( 'Invalid form submission.' ) ) );
        }
        // A successful upload will pass this test. It makes no sense to override this one.
        if ( isset( $file['error'] ) && $file['error'] > 0 ) {
-               return call_user_func( $upload_error_handler, $file, $upload_error_strings[ $file['error'] ] );
+               return call_user_func_array( $upload_error_handler, array( &$file, $upload_error_strings[ $file['error'] ] ) );
        }
 
        $test_file_size = 'wp_handle_upload' === $action ? $file['size'] : filesize( $file['tmp_name'] );
@@ -321,13 +327,13 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
                } else {
                        $error_msg = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' );
                }
-               return call_user_func( $upload_error_handler, $file, $error_msg );
+               return call_user_func_array( $upload_error_handler, array( &$file, $error_msg ) );
        }
 
        // A properly uploaded file will pass this test. There should be no reason to override this one.
        $test_uploaded_file = 'wp_handle_upload' === $action ? @ is_uploaded_file( $file['tmp_name'] ) : @ is_file( $file['tmp_name'] );
        if ( ! $test_uploaded_file ) {
-               return call_user_func( $upload_error_handler, $file, __( 'Specified file failed upload test.' ) );
+               return call_user_func_array( $upload_error_handler, array( &$file, __( 'Specified file failed upload test.' ) ) );
        }
 
        // A correct MIME type will pass this test. Override $mimes or use the upload_mimes filter.
@@ -342,7 +348,7 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
                        $file['name'] = $proper_filename;
                }
                if ( ( ! $type || !$ext ) && ! current_user_can( 'unfiltered_upload' ) ) {
-                       return call_user_func( $upload_error_handler, $file, __( 'Sorry, this file type is not permitted for security reasons.' ) );
+                       return call_user_func_array( $upload_error_handler, array( &$file, __( 'Sorry, this file type is not permitted for security reasons.' ) ) );
                }
                if ( ! $type ) {
                        $type = $file['type'];
@@ -356,7 +362,7 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
         * overriding this one.
         */
        if ( ! ( ( $uploads = wp_upload_dir( $time ) ) && false === $uploads['error'] ) ) {
-               return call_user_func( $upload_error_handler, $file, $uploads['error'] );
+               return call_user_func_array( $upload_error_handler, array( &$file, $uploads['error'] ) );
        }
 
        $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback );
@@ -393,7 +399,7 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
        }
 
        /**
-        * Filter the data array for the uploaded file.
+        * Filters the data array for the uploaded file.
         *
         * @since 2.1.0
         *
@@ -414,13 +420,15 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
 }
 
 /**
- * Wrapper for _wp_handle_upload(), passes 'wp_handle_upload' action.
+ * Wrapper for _wp_handle_upload().
+ *
+ * Passes the {@see 'wp_handle_upload'} action.
  *
  * @since 2.0.0
  *
  * @see _wp_handle_upload()
  *
- * @param array      $file      Reference to a single element of $_FILES. Call the function once for
+ * @param array      $file      Reference to a single element of `$_FILES`. Call the function once for
  *                              each uploaded file.
  * @param array|bool $overrides Optional. An associative array of names=>values to override default
  *                              variables. Default false.
@@ -442,13 +450,15 @@ function wp_handle_upload( &$file, $overrides = false, $time = null ) {
 }
 
 /**
- * Wrapper for _wp_handle_upload(), passes 'wp_handle_sideload' action
+ * Wrapper for _wp_handle_upload().
+ *
+ * Passes the {@see 'wp_handle_sideload'} action.
  *
  * @since 2.6.0
  *
  * @see _wp_handle_upload()
  *
- * @param array      $file      An array similar to that of a PHP $_FILES POST array
+ * @param array      $file      An array similar to that of a PHP `$_FILES` POST array
  * @param array|bool $overrides Optional. An associative array of names=>values to override default
  *                              variables. Default false.
  * @param string     $time      Optional. Time formatted in 'yyyy/mm'. Default null.
@@ -483,7 +493,9 @@ function download_url( $url, $timeout = 300 ) {
        if ( ! $url )
                return new WP_Error('http_no_url', __('Invalid URL Provided.'));
 
-       $tmpfname = wp_tempnam($url);
+       $url_filename = basename( parse_url( $url, PHP_URL_PATH ) );
+
+       $tmpfname = wp_tempnam( $url_filename );
        if ( ! $tmpfname )
                return new WP_Error('http_no_file', __('Could not create Temporary file.'));
 
@@ -557,9 +569,8 @@ function unzip_file($file, $to) {
        if ( ! $wp_filesystem || !is_object($wp_filesystem) )
                return new WP_Error('fs_unavailable', __('Could not access filesystem.'));
 
-       // Unzip can use a lot of memory, but not this much hopefully
-       /** This filter is documented in wp-admin/admin.php */
-       @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
+       // Unzip can use a lot of memory, but not this much hopefully.
+       wp_raise_memory_limit( 'admin' );
 
        $needed_dirs = array();
        $to = trailingslashit($to);
@@ -583,7 +594,7 @@ function unzip_file($file, $to) {
        }
 
        /**
-        * Filter whether to use ZipArchive to unzip archives.
+        * Filters whether to use ZipArchive to unzip archives.
         *
         * @since 3.0.0
         *
@@ -637,10 +648,13 @@ function _unzip_file_ziparchive($file, $to, $needed_dirs = array() ) {
 
                $uncompressed_size += $info['size'];
 
-               if ( '/' == substr($info['name'], -1) ) // directory
-                       $needed_dirs[] = $to . untrailingslashit($info['name']);
-               else
-                       $needed_dirs[] = $to . untrailingslashit(dirname($info['name']));
+               if ( '/' === substr( $info['name'], -1 ) ) {
+                       // Directory.
+                       $needed_dirs[] = $to . untrailingslashit( $info['name'] );
+               } elseif ( '.' !== $dirname = dirname( $info['name'] ) ) {
+                       // Path to a file.
+                       $needed_dirs[] = $to . untrailingslashit( $dirname );
+               }
        }
 
        /*
@@ -881,7 +895,7 @@ function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_own
        if ( ! class_exists( "WP_Filesystem_$method" ) ) {
 
                /**
-                * Filter the path for a specific filesystem method class file.
+                * Filters the path for a specific filesystem method class file.
                 *
                 * @since 2.6.0
                 *
@@ -943,12 +957,12 @@ function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_own
  *
  * @param array  $args                         Optional. Connection details. Default empty array.
  * @param string $context                      Optional. Full path to the directory that is tested
- *                                             for being writable. Default false.
+ *                                             for being writable. Default empty.
  * @param bool   $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable.
  *                                             Default false.
  * @return string The transport to use, see description for valid return values.
  */
-function get_filesystem_method( $args = array(), $context = false, $allow_relaxed_file_ownership = false ) {
+function get_filesystem_method( $args = array(), $context = '', $allow_relaxed_file_ownership = false ) {
        $method = defined('FS_METHOD') ? FS_METHOD : false; // Please ensure that this is either 'direct', 'ssh2', 'ftpext' or 'ftpsockets'
 
        if ( ! $context ) {
@@ -997,7 +1011,7 @@ function get_filesystem_method( $args = array(), $context = false, $allow_relaxe
        if ( ! $method && ( extension_loaded('sockets') || function_exists('fsockopen') ) ) $method = 'ftpsockets'; //Sockets: Socket extension; PHP Mode: FSockopen / fwrite / fread
 
        /**
-        * Filter the filesystem method to use.
+        * Filters the filesystem method to use.
         *
         * @since 2.6.0
         *
@@ -1013,15 +1027,15 @@ function get_filesystem_method( $args = array(), $context = false, $allow_relaxe
  * Displays a form to the user to request for their FTP/SSH details in order
  * to connect to the filesystem.
  *
- * All chosen/entered details are saved, Excluding the Password.
+ * All chosen/entered details are saved, excluding the password.
  *
  * Hostnames may be in the form of hostname:portnumber (eg: wordpress.org:2467)
  * to specify an alternate FTP/SSH port.
  *
- * Plugins may override this form by returning true|false via the
- * {@see 'request_filesystem_credentials'} filter.
+ * Plugins may override this form by returning true|false via the {@see 'request_filesystem_credentials'} filter.
  *
- * @since 2.5.
+ * @since 2.5.0
+ * @since 4.6.0 The `$context` parameter default changed from `false` to an empty string.
  *
  * @global string $pagenow
  *
@@ -1029,25 +1043,25 @@ function get_filesystem_method( $args = array(), $context = false, $allow_relaxe
  * @param string $type                         Optional. Chosen type of filesystem. Default empty.
  * @param bool   $error                        Optional. Whether the current request has failed to connect.
  *                                             Default false.
- * @param string $context                      Optional. Full path to the directory that is tested
- *                                             for being writable. Default false.
- * @param array  $extra_fields                 Optional. Extra POST fields which should be checked for
- *                                             to be included in the post. Default null.
- * @param bool   $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable.
- *                                             Default false.
+ * @param string $context                      Optional. Full path to the directory that is tested for being
+ *                                             writable. Default empty.
+ * @param array  $extra_fields                 Optional. Extra `POST` fields to be checked for inclusion in
+ *                                             the post. Default null.
+ * @param bool   $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false.
  *
  * @return bool False on failure, true on success.
  */
-function request_filesystem_credentials( $form_post, $type = '', $error = false, $context = false, $extra_fields = null, $allow_relaxed_file_ownership = false ) {
+function request_filesystem_credentials( $form_post, $type = '', $error = false, $context = '', $extra_fields = null, $allow_relaxed_file_ownership = false ) {
        global $pagenow;
 
        /**
-        * Filter the filesystem credentials form output.
+        * Filters the filesystem credentials form output.
         *
         * Returning anything other than an empty string will effectively short-circuit
         * output of the filesystem credentials form, returning that value instead.
         *
         * @since 2.5.0
+        * @since 4.6.0 The `$context` parameter default changed from `false` to an empty string.
         *
         * @param mixed  $output                       Form output to return instead. Default empty.
         * @param string $form_post                    The URL to post the form to.
@@ -1143,9 +1157,10 @@ function request_filesystem_credentials( $form_post, $type = '', $error = false,
                $types[ 'ssh' ] = __('SSH2');
 
        /**
-        * Filter the connection types to output to the filesystem credentials form.
+        * Filters the connection types to output to the filesystem credentials form.
         *
         * @since 2.9.0
+        * @since 4.6.0 The `$context` parameter default changed from `false` to an empty string.
         *
         * @param array  $types       Types of connections.
         * @param array  $credentials Credentials to connect with.
@@ -1157,19 +1172,6 @@ function request_filesystem_credentials( $form_post, $type = '', $error = false,
        $types = apply_filters( 'fs_ftp_connection_types', $types, $credentials, $type, $error, $context );
 
 ?>
-<script type="text/javascript">
-<!--
-jQuery(function($){
-       jQuery("#ssh").click(function () {
-               jQuery("#ssh_keys").show();
-       });
-       jQuery("#ftp, #ftps").click(function () {
-               jQuery("#ssh_keys").hide();
-       });
-       jQuery('#request-filesystem-credentials-form input[value=""]:first').focus();
-});
--->
-</script>
 <form action="<?php echo esc_url( $form_post ) ?>" method="post">
 <div id="request-filesystem-credentials-form" class="request-filesystem-credentials-form">
 <?php
@@ -1216,8 +1218,27 @@ echo "<$heading_tag id='request-filesystem-credentials-title'>" . __( 'Connectio
                <em><?php if ( ! defined('FTP_PASS') ) _e( 'This password will not be stored on the server.' ); ?></em>
        </label>
 </div>
-<?php if ( isset($types['ssh']) ) : ?>
 <fieldset>
+<legend><?php _e( 'Connection Type' ); ?></legend>
+<?php
+       $disabled = disabled( ( defined( 'FTP_SSL' ) && FTP_SSL ) || ( defined( 'FTP_SSH' ) && FTP_SSH ), true, false );
+       foreach ( $types as $name => $text ) : ?>
+       <label for="<?php echo esc_attr( $name ) ?>">
+               <input type="radio" name="connection_type" id="<?php echo esc_attr( $name ) ?>" value="<?php echo esc_attr( $name ) ?>"<?php checked( $name, $connection_type ); echo $disabled; ?> />
+               <?php echo $text; ?>
+       </label>
+<?php
+       endforeach;
+?>
+</fieldset>
+<?php
+if ( isset( $types['ssh'] ) ) {
+       $hidden_class = '';
+       if ( 'ssh' != $connection_type || empty( $connection_type ) ) {
+               $hidden_class = ' class="hidden"';
+       }
+?>
+<fieldset id="ssh-keys"<?php echo $hidden_class; ?>">
 <legend><?php _e( 'Authentication Keys' ); ?></legend>
 <label for="public_key">
        <span class="field-title"><?php _e('Public Key:') ?></span>
@@ -1227,21 +1248,11 @@ echo "<$heading_tag id='request-filesystem-credentials-title'>" . __( 'Connectio
        <span class="field-title"><?php _e('Private Key:') ?></span>
        <input name="private_key" type="text" id="private_key" value="<?php echo esc_attr($private_key) ?>"<?php disabled( defined('FTP_PRIKEY') ); ?> />
 </label>
-</fieldset>
-<span id="auth-keys-desc"><?php _e('Enter the location on the server where the public and private keys are located. If a passphrase is needed, enter that in the password field above.') ?></span>
-<?php endif; ?>
-<fieldset>
-<legend><?php _e( 'Connection Type' ); ?></legend>
-<?php
-       $disabled = disabled( (defined('FTP_SSL') && FTP_SSL) || (defined('FTP_SSH') && FTP_SSH), true, false );
-       foreach ( $types as $name => $text ) : ?>
-       <label for="<?php echo esc_attr($name) ?>">
-               <input type="radio" name="connection_type" id="<?php echo esc_attr($name) ?>" value="<?php echo esc_attr($name) ?>"<?php checked($name, $connection_type); echo $disabled; ?> />
-               <?php echo $text ?>
-       </label>
-       <?php endforeach; ?>
+<p id="auth-keys-desc"><?php _e( 'Enter the location on the server where the public and private keys are located. If a passphrase is needed, enter that in the password field above.' ) ?></p>
 </fieldset>
 <?php
+}
+
 foreach ( (array) $extra_fields as $field ) {
        if ( isset( $_POST[ $field ] ) )
                echo '<input type="hidden" name="' . esc_attr( $field ) . '" value="' . esc_attr( wp_unslash( $_POST[ $field ] ) ) . '" />';
index 8947f537a875ca4931aab5cd42e53914a78db462..928cd1357f7b39831c6d251b546b018573ea0fa0 100644 (file)
@@ -60,11 +60,11 @@ function wp_image_editor($post_id, $msg = false) {
                <legend><?php _e( 'New dimensions:' ); ?></legend>
                <div class="nowrap">
                <label><span class="screen-reader-text"><?php _e( 'scale width' ); ?></span>
-               <input type="text" id="imgedit-scale-width-<?php echo $post_id; ?>" onkeyup="imageEdit.scaleChanged(<?php echo $post_id; ?>, 1)" onblur="imageEdit.scaleChanged(<?php echo $post_id; ?>, 1)" value="<?php echo isset( $meta['width'] ) ? $meta['width'] : 0; ?>" />
+               <input type="text" id="imgedit-scale-width-<?php echo $post_id; ?>" onkeyup="imageEdit.scaleChanged(<?php echo $post_id; ?>, 1, this)" onblur="imageEdit.scaleChanged(<?php echo $post_id; ?>, 1, this)" value="<?php echo isset( $meta['width'] ) ? $meta['width'] : 0; ?>" />
                </label>
                <span class="imgedit-separator">&times;</span>
                <label><span class="screen-reader-text"><?php _e( 'scale height' ); ?></span>
-               <input type="text" id="imgedit-scale-height-<?php echo $post_id; ?>" onkeyup="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0)" onblur="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0)" value="<?php echo isset( $meta['height'] ) ? $meta['height'] : 0; ?>" />
+               <input type="text" id="imgedit-scale-height-<?php echo $post_id; ?>" onkeyup="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0, this)" onblur="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0, this)" value="<?php echo isset( $meta['height'] ) ? $meta['height'] : 0; ?>" />
                </label>
                <span class="imgedit-scale-warn" id="imgedit-scale-warn-<?php echo $post_id; ?>">!</span>
                <input id="imgedit-scale-button" type="button" onclick="imageEdit.action(<?php echo "$post_id, '$nonce'"; ?>, 'scale')" class="button button-primary" value="<?php esc_attr_e( 'Scale' ); ?>" />
@@ -116,11 +116,11 @@ function wp_image_editor($post_id, $msg = false) {
                <legend><?php _e( 'Aspect ratio:' ); ?></legend>
                <div class="nowrap">
                <label><span class="screen-reader-text"><?php _e( 'crop ratio width' ); ?></span>
-               <input type="text" id="imgedit-crop-width-<?php echo $post_id; ?>" onkeyup="imageEdit.setRatioSelection(<?php echo $post_id; ?>, 0, this)" />
+               <input type="text" id="imgedit-crop-width-<?php echo $post_id; ?>" onkeyup="imageEdit.setRatioSelection(<?php echo $post_id; ?>, 0, this)" onblur="imageEdit.setRatioSelection(<?php echo $post_id; ?>, 0, this)" />
                </label>
                <span class="imgedit-separator">:</span>
                <label><span class="screen-reader-text"><?php _e( 'crop ratio height' ); ?></span>
-               <input type="text" id="imgedit-crop-height-<?php echo $post_id; ?>" onkeyup="imageEdit.setRatioSelection(<?php echo $post_id; ?>, 1, this)" />
+               <input type="text" id="imgedit-crop-height-<?php echo $post_id; ?>" onkeyup="imageEdit.setRatioSelection(<?php echo $post_id; ?>, 1, this)" onblur="imageEdit.setRatioSelection(<?php echo $post_id; ?>, 1, this)" />
                </label>
                </div>
        </fieldset>
@@ -129,11 +129,11 @@ function wp_image_editor($post_id, $msg = false) {
                <legend><?php _e( 'Selection:' ); ?></legend>
                <div class="nowrap">
                <label><span class="screen-reader-text"><?php _e( 'selection width' ); ?></span>
-               <input type="text" id="imgedit-sel-width-<?php echo $post_id; ?>" onkeyup="imageEdit.setNumSelection(<?php echo $post_id; ?>)" />
+               <input type="text" id="imgedit-sel-width-<?php echo $post_id; ?>" onkeyup="imageEdit.setNumSelection(<?php echo $post_id; ?>, this)" onblur="imageEdit.setNumSelection(<?php echo $post_id; ?>, this)" />
                </label>
                <span class="imgedit-separator">&times;</span>
                <label><span class="screen-reader-text"><?php _e( 'selection height' ); ?></span>
-               <input type="text" id="imgedit-sel-height-<?php echo $post_id; ?>" onkeyup="imageEdit.setNumSelection(<?php echo $post_id; ?>)" />
+               <input type="text" id="imgedit-sel-height-<?php echo $post_id; ?>" onkeyup="imageEdit.setNumSelection(<?php echo $post_id; ?>, this)" onblur="imageEdit.setNumSelection(<?php echo $post_id; ?>, this)" />
                </label>
                </div>
        </fieldset>
@@ -224,7 +224,6 @@ function wp_image_editor($post_id, $msg = false) {
 
        </div>
        <div class="imgedit-wait" id="imgedit-wait-<?php echo $post_id; ?>"></div>
-       <script type="text/javascript">jQuery( function() { imageEdit.init(<?php echo $post_id; ?>); });</script>
        <div class="hidden" id="imgedit-leaving-<?php echo $post_id; ?>"><?php _e("There are unsaved changes that will be lost. 'OK' to continue, 'Cancel' to return to the Image Editor."); ?></div>
        </div>
 <?php
@@ -243,7 +242,7 @@ function wp_stream_image( $image, $mime_type, $post_id ) {
        if ( $image instanceof WP_Image_Editor ) {
 
                /**
-                * Filter the WP_Image_Editor instance for the image to be streamed to the browser.
+                * Filters the WP_Image_Editor instance for the image to be streamed to the browser.
                 *
                 * @since 3.5.0
                 *
@@ -257,10 +256,10 @@ function wp_stream_image( $image, $mime_type, $post_id ) {
 
                return true;
        } else {
-               _deprecated_argument( __FUNCTION__, '3.5', __( '$image needs to be an WP_Image_Editor object' ) );
+               _deprecated_argument( __FUNCTION__, '3.5.0', __( '$image needs to be an WP_Image_Editor object' ) );
 
                /**
-                * Filter the GD image resource to be streamed to the browser.
+                * Filters the GD image resource to be streamed to the browser.
                 *
                 * @since 2.9.0
                 * @deprecated 3.5.0 Use image_editor_save_pre instead.
@@ -302,7 +301,7 @@ function wp_save_image_file( $filename, $image, $mime_type, $post_id ) {
                $image = apply_filters( 'image_editor_save_pre', $image, $post_id );
 
                /**
-                * Filter whether to skip saving the image file.
+                * Filters whether to skip saving the image file.
                 *
                 * Returning a non-null value will short-circuit the save method,
                 * returning that value instead.
@@ -322,13 +321,13 @@ function wp_save_image_file( $filename, $image, $mime_type, $post_id ) {
 
                return $image->save( $filename, $mime_type );
        } else {
-               _deprecated_argument( __FUNCTION__, '3.5', __( '$image needs to be an WP_Image_Editor object' ) );
+               _deprecated_argument( __FUNCTION__, '3.5.0', __( '$image needs to be an WP_Image_Editor object' ) );
 
                /** This filter is documented in wp-admin/includes/image-edit.php */
                $image = apply_filters( 'image_save_pre', $image, $post_id );
 
                /**
-                * Filter whether to skip saving the image file.
+                * Filters whether to skip saving the image file.
                 *
                 * Returning a non-null value will short-circuit the save method,
                 * returning that value instead.
@@ -388,7 +387,7 @@ function _image_get_preview_ratio($w, $h) {
  * @return resource|false GD image resource, false otherwise.
  */
 function _rotate_image_resource($img, $angle) {
-       _deprecated_function( __FUNCTION__, '3.5', __( 'Use WP_Image_Editor::rotate' ) );
+       _deprecated_function( __FUNCTION__, '3.5.0', __( 'Use WP_Image_Editor::rotate' ) );
        if ( function_exists('imagerotate') ) {
                $rotated = imagerotate($img, $angle, 0);
                if ( is_resource($rotated) ) {
@@ -411,7 +410,7 @@ function _rotate_image_resource($img, $angle) {
  * @return resource (maybe) flipped image resource.
  */
 function _flip_image_resource($img, $horz, $vert) {
-       _deprecated_function( __FUNCTION__, '3.5', __( 'Use WP_Image_Editor::flip' ) );
+       _deprecated_function( __FUNCTION__, '3.5.0', __( 'Use WP_Image_Editor::flip' ) );
        $w = imagesx($img);
        $h = imagesy($img);
        $dst = wp_imagecreatetruecolor($w, $h);
@@ -458,13 +457,13 @@ function _crop_image_resource($img, $x, $y, $w, $h) {
  *
  * @since 2.9.0
  *
- * @param WP_Image_Editor $image   {@see WP_Image_Editor} instance.
+ * @param WP_Image_Editor $image   WP_Image_Editor instance.
  * @param array           $changes Array of change operations.
- * @return WP_Image_Editor {@see WP_Image_Editor} instance with changes applied.
+ * @return WP_Image_Editor WP_Image_Editor instance with changes applied.
  */
 function image_edit_apply_changes( $image, $changes ) {
        if ( is_resource( $image ) )
-               _deprecated_argument( __FUNCTION__, '3.5', __( '$image needs to be an WP_Image_Editor object' ) );
+               _deprecated_argument( __FUNCTION__, '3.5.0', __( '$image needs to be an WP_Image_Editor object' ) );
 
        if ( !is_array($changes) )
                return $image;
@@ -515,7 +514,7 @@ function image_edit_apply_changes( $image, $changes ) {
        if ( $image instanceof WP_Image_Editor ) {
 
                /**
-                * Filter the WP_Image_Editor instance before applying changes to the image.
+                * Filters the WP_Image_Editor instance before applying changes to the image.
                 *
                 * @since 3.5.0
                 *
@@ -526,7 +525,7 @@ function image_edit_apply_changes( $image, $changes ) {
        } elseif ( is_resource( $image ) ) {
 
                /**
-                * Filter the GD image resource before applying changes to the image.
+                * Filters the GD image resource before applying changes to the image.
                 *
                 * @since 2.9.0
                 * @deprecated 3.5.0 Use wp_image_editor_before_change instead.
@@ -586,8 +585,7 @@ function image_edit_apply_changes( $image, $changes ) {
 function stream_preview_image( $post_id ) {
        $post = get_post( $post_id );
 
-       /** This filter is documented in wp-admin/admin.php */
-       @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
+       wp_raise_memory_limit( 'admin' );
 
        $img = wp_get_image_editor( _load_image_to_edit_path( $post_id ) );
 
@@ -827,6 +825,21 @@ function wp_save_image( $post_id ) {
                $success = $delete = $nocrop = true;
        }
 
+       /*
+        * We need to remove any existing resized image files because
+        * a new crop or rotate could generate different sizes (and hence, filenames),
+        * keeping the new resized images from overwriting the existing image files.
+        * https://core.trac.wordpress.org/ticket/32171
+        */
+       if ( defined( 'IMAGE_EDIT_OVERWRITE' ) && IMAGE_EDIT_OVERWRITE && ! empty( $meta['sizes'] ) ) {
+               foreach ( $meta['sizes'] as $size ) {
+                       if ( ! empty( $size['file'] ) && preg_match( '/-e[0-9]{13}-/', $size['file'] ) ) {
+                               $delete_file = path_join( $path_parts['dirname'], $size['file'] );
+                               wp_delete_file( $delete_file );
+                       }
+               }
+       }
+
        if ( isset( $sizes ) ) {
                $_sizes = array();
 
index f0cb0e960e84b25318d82be0657b5511ba291221..4d9e07692186706d6fe4b52595fcd4df1fb847d9 100644 (file)
@@ -107,7 +107,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
                }
 
                /**
-                * Filter the image sizes automatically generated when uploading an image.
+                * Filters the image sizes automatically generated when uploading an image.
                 *
                 * @since 2.9.0
                 * @since 4.4.0 Added the `$metadata` argument.
@@ -174,7 +174,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
                                        'post_content' => '',
                                );
                                /**
-                                * Filter the parameters for the attachment thumbnail creation.
+                                * Filters the parameters for the attachment thumbnail creation.
                                 *
                                 * @since 3.9.0
                                 *
@@ -199,7 +199,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
        }
 
        /**
-        * Filter the generated attachment meta data.
+        * Filters the generated attachment meta data.
         *
         * @since 2.1.0
         *
@@ -337,7 +337,7 @@ function wp_read_image_metadata( $file ) {
        }
 
        /**
-        * Filter the image types to check for exif data.
+        * Filters the image types to check for exif data.
         *
         * @since 2.5.0
         *
@@ -417,7 +417,7 @@ function wp_read_image_metadata( $file ) {
        $meta = wp_kses_post_deep( $meta );
 
        /**
-        * Filter the array of meta data read from an image's exif data.
+        * Filters the array of meta data read from an image's exif data.
         *
         * @since 2.5.0
         * @since 4.4.0 The `$iptc` parameter was added.
@@ -465,7 +465,7 @@ function file_is_displayable_image($path) {
        }
 
        /**
-        * Filter whether the current image is displayable in the browser.
+        * Filters whether the current image is displayable in the browser.
         *
         * @since 2.5.0
         *
@@ -506,7 +506,7 @@ function load_image_to_edit( $attachment_id, $mime_type, $size = 'full' ) {
        }
        if ( is_resource($image) ) {
                /**
-                * Filter the current image being loaded for editing.
+                * Filters the current image being loaded for editing.
                 *
                 * @since 2.9.0
                 *
@@ -542,7 +542,7 @@ function _load_image_to_edit_path( $attachment_id, $size = 'full' ) {
        if ( $filepath && file_exists( $filepath ) ) {
                if ( 'full' != $size && ( $data = image_get_intermediate_size( $attachment_id, $size ) ) ) {
                        /**
-                        * Filter the path to the current image.
+                        * Filters the path to the current image.
                         *
                         * The filter is evaluated for all image sizes except 'full'.
                         *
@@ -556,7 +556,7 @@ function _load_image_to_edit_path( $attachment_id, $size = 'full' ) {
                }
        } elseif ( function_exists( 'fopen' ) && function_exists( 'ini_get' ) && true == ini_get( 'allow_url_fopen' ) ) {
                /**
-                * Filter the image URL if not in the local filesystem.
+                * Filters the image URL if not in the local filesystem.
                 *
                 * The filter is only evaluated if fopen is enabled on the server.
                 *
@@ -570,7 +570,7 @@ function _load_image_to_edit_path( $attachment_id, $size = 'full' ) {
        }
 
        /**
-        * Filter the returned path or URL of the current image.
+        * Filters the returned path or URL of the current image.
         *
         * @since 2.9.0
         *
index fa980e6f167b66a2e35acf6340302882a4d8d220..4f0b78536ff0704503f1d55aba955bb291d373ec 100644 (file)
@@ -126,18 +126,23 @@ function wp_get_popular_importers() {
        include( ABSPATH . WPINC . '/version.php' ); // include an unmodified $wp_version
 
        $locale = get_locale();
-       $popular_importers = get_site_transient( 'popular_importers_' . $locale );
+       $cache_key = 'popular_importers_' . md5( $locale . $wp_version );
+       $popular_importers = get_site_transient( $cache_key );
 
        if ( ! $popular_importers ) {
-               $url = add_query_arg( 'locale', get_locale(), 'http://api.wordpress.org/core/importers/1.1/' );
+               $url = add_query_arg( array(
+                       'locale'  => get_locale(),
+                       'version' => $wp_version,
+               ), 'http://api.wordpress.org/core/importers/1.1/' );
                $options = array( 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url() );
                $response = wp_remote_get( $url, $options );
                $popular_importers = json_decode( wp_remote_retrieve_body( $response ), true );
 
-               if ( is_array( $popular_importers ) )
-                       set_site_transient( 'popular_importers_' . $locale, $popular_importers, 2 * DAY_IN_SECONDS );
-               else
+               if ( is_array( $popular_importers ) ) {
+                       set_site_transient( $cache_key, $popular_importers, 2 * DAY_IN_SECONDS );
+               } else {
                        $popular_importers = false;
+               }
        }
 
        if ( is_array( $popular_importers ) ) {
@@ -157,49 +162,49 @@ function wp_get_popular_importers() {
                // slug => name, description, plugin slug, and register_importer() slug
                'blogger' => array(
                        'name' => __( 'Blogger' ),
-                       'description' => __( 'Install the Blogger importer to import posts, comments, and users from a Blogger blog.' ),
+                       'description' => __( 'Import posts, comments, and users from a Blogger blog.' ),
                        'plugin-slug' => 'blogger-importer',
                        'importer-id' => 'blogger',
                ),
                'wpcat2tag' => array(
                        'name' => __( 'Categories and Tags Converter' ),
-                       'description' => __( 'Install the category/tag converter to convert existing categories to tags or tags to categories, selectively.' ),
+                       'description' => __( 'Convert existing categories to tags or tags to categories, selectively.' ),
                        'plugin-slug' => 'wpcat2tag-importer',
                        'importer-id' => 'wp-cat2tag',
                ),
                'livejournal' => array(
                        'name' => __( 'LiveJournal' ),
-                       'description' => __( 'Install the LiveJournal importer to import posts from LiveJournal using their API.' ),
+                       'description' => __( 'Import posts from LiveJournal using their API.' ),
                        'plugin-slug' => 'livejournal-importer',
                        'importer-id' => 'livejournal',
                ),
                'movabletype' => array(
                        'name' => __( 'Movable Type and TypePad' ),
-                       'description' => __( 'Install the Movable Type importer to import posts and comments from a Movable Type or TypePad blog.' ),
+                       'description' => __( 'Import posts and comments from a Movable Type or TypePad blog.' ),
                        'plugin-slug' => 'movabletype-importer',
                        'importer-id' => 'mt',
                ),
                'opml' => array(
                        'name' => __( 'Blogroll' ),
-                       'description' => __( 'Install the blogroll importer to import links in OPML format.' ),
+                       'description' => __( 'Import links in OPML format.' ),
                        'plugin-slug' => 'opml-importer',
                        'importer-id' => 'opml',
                ),
                'rss' => array(
                        'name' => __( 'RSS' ),
-                       'description' => __( 'Install the RSS importer to import posts from an RSS feed.' ),
+                       'description' => __( 'Import posts from an RSS feed.' ),
                        'plugin-slug' => 'rss-importer',
                        'importer-id' => 'rss',
                ),
                'tumblr' => array(
                        'name' => __( 'Tumblr' ),
-                       'description' => __( 'Install the Tumblr importer to import posts &amp; media from Tumblr using their API.' ),
+                       'description' => __( 'Import posts &amp; media from Tumblr using their API.' ),
                        'plugin-slug' => 'tumblr-importer',
                        'importer-id' => 'tumblr',
                ),
                'wordpress' => array(
                        'name' => 'WordPress',
-                       'description' => __( 'Install the WordPress importer to import posts, pages, comments, custom fields, categories, and tags from a WordPress export file.' ),
+                       'description' => __( 'Import posts, pages, comments, custom fields, categories, and tags from a WordPress export file.' ),
                        'plugin-slug' => 'wordpress-importer',
                        'importer-id' => 'wordpress',
                ),
index 194e8273a1d2ed00180b8463182626a938674177..8b95181c548d56616cf761e798150328cd27a251 100644 (file)
@@ -22,7 +22,7 @@ function media_upload_tabs() {
        );
 
        /**
-        * Filter the available tabs in the legacy (pre-3.5.0) media popup.
+        * Filters the available tabs in the legacy (pre-3.5.0) media popup.
         *
         * @since 2.5.0
         *
@@ -111,7 +111,7 @@ function the_media_upload_tabs() {
  * @param string       $title   Image title attribute.
  * @param string       $align   Image CSS alignment property.
  * @param string       $url     Optional. Image src URL. Default empty.
- * @param bool|string  $rel     Optional. Value for rel attribute or whether to add a dafault value. Default false.
+ * @param bool|string  $rel     Optional. Value for rel attribute or whether to add a default value. Default false.
  * @param string|array $size    Optional. Image size. Accepts any valid image size, or an array of width
  *                              and height values in pixels (in that order). Default 'medium'.
  * @param string       $alt     Optional. Image alt attribute. Default empty.
@@ -135,7 +135,7 @@ function get_image_send_to_editor( $id, $caption, $title, $align, $url = '', $re
                $html = '<a href="' . esc_attr( $url ) . '"' . $rel . '>' . $html . '</a>';
 
        /**
-        * Filter the image HTML markup to send to the editor.
+        * Filters the image HTML markup to send to the editor.
         *
         * @since 2.5.0
         *
@@ -172,13 +172,13 @@ function get_image_send_to_editor( $id, $caption, $title, $align, $url = '', $re
 function image_add_caption( $html, $id, $caption, $title, $align, $url, $size, $alt = '' ) {
 
        /**
-        * Filter the caption text.
+        * Filters the caption text.
         *
         * Note: If the caption text is empty, the caption shortcode will not be appended
         * to the image HTML when inserted into the editor.
         *
         * Passing an empty value also prevents the {@see 'image_add_caption_shortcode'}
-        * filter from being evaluated at the end of {@see image_add_caption()}.
+        * Filters from being evaluated at the end of image_add_caption().
         *
         * @since 4.1.0
         *
@@ -188,7 +188,7 @@ function image_add_caption( $html, $id, $caption, $title, $align, $url, $size, $
        $caption = apply_filters( 'image_add_caption_text', $caption, $id );
 
        /**
-        * Filter whether to disable captions.
+        * Filters whether to disable captions.
         *
         * Prevents image captions from being appended to image HTML when inserted into the editor.
         *
@@ -220,7 +220,7 @@ function image_add_caption( $html, $id, $caption, $title, $align, $url, $size, $
        $shcode = '[caption id="' . $id . '" align="align' . $align     . '" width="' . $width . '"]' . $html . ' ' . $caption . '[/caption]';
 
        /**
-        * Filter the image HTML markup including the caption shortcode.
+        * Filters the image HTML markup including the caption shortcode.
         *
         * @since 2.6.0
         *
@@ -263,11 +263,11 @@ win.send_to_editor( <?php echo wp_json_encode( $html ); ?> );
  *
  * @since 2.5.0
  *
- * @param string $file_id   Index of the {@link $_FILES} array that the file was sent. Required.
+ * @param string $file_id   Index of the `$_FILES` array that the file was sent. Required.
  * @param int    $post_id   The post ID of a post to attach the media item to. Required, but can
  *                          be set to 0, creating a media item that has no relationship to a post.
  * @param array  $post_data Overwrite some of the attachment. Optional.
- * @param array  $overrides Override the {@link wp_handle_upload()} behavior. Optional.
+ * @param array  $overrides Override the wp_handle_upload() behavior. Optional.
  * @return int|WP_Error ID of the attachment or a WP_Error object on failure.
  */
 function media_handle_upload($file_id, $post_id, $post_data = array(), $overrides = array( 'test_form' => false )) {
@@ -380,17 +380,17 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override
 }
 
 /**
- * This handles a sideloaded file in the same way as an uploaded file is handled by {@link media_handle_upload()}
+ * Handles a side-loaded file in the same way as an uploaded file is handled by media_handle_upload().
  *
  * @since 2.6.0
  *
- * @param array $file_array Array similar to a {@link $_FILES} upload array
- * @param int $post_id The post ID the media is associated with
- * @param string $desc Description of the sideloaded file
- * @param array $post_data allows you to overwrite some of the attachment
- * @return int|object The ID of the attachment or a WP_Error on failure
+ * @param array  $file_array Array similar to a `$_FILES` upload array.
+ * @param int    $post_id    The post ID the media is associated with.
+ * @param string $desc       Optional. Description of the side-loaded file. Default null.
+ * @param array  $post_data  Optional. Post data to override. Default empty array.
+ * @return int|object The ID of the attachment or a WP_Error on failure.
  */
-function media_handle_sideload($file_array, $post_id, $desc = null, $post_data = array()) {
+function media_handle_sideload( $file_array, $post_id, $desc = null, $post_data = array() ) {
        $overrides = array('test_form'=>false);
 
        $time = current_time( 'mysql' );
@@ -568,10 +568,12 @@ function media_buttons($editor_id = 'content') {
                $img . __( 'Add Media' )
        );
        /**
-        * Filter the legacy (pre-3.5.0) media buttons.
+        * Filters the legacy (pre-3.5.0) media buttons.
+        *
+        * Use {@see 'media_buttons'} action instead.
         *
         * @since 2.5.0
-        * @deprecated 3.5.0 Use 'media_buttons' action instead.
+        * @deprecated 3.5.0 Use {@see 'media_buttons'} action instead.
         *
         * @param string $string Media buttons context. Default empty.
         */
@@ -608,7 +610,7 @@ function get_upload_iframe_src( $type = null, $post_id = null, $tab = null ) {
                $upload_iframe_src = add_query_arg('tab', $tab, $upload_iframe_src);
 
        /**
-        * Filter the upload iframe source URL for a specific media type.
+        * Filters the upload iframe source URL for a specific media type.
         *
         * The dynamic portion of the hook name, `$type`, refers to the type
         * of media uploaded.
@@ -660,7 +662,7 @@ function media_upload_form_handler() {
                }
 
                /**
-                * Filter the attachment fields to be saved.
+                * Filters the attachment fields to be saved.
                 *
                 * @since 2.5.0
                 *
@@ -716,7 +718,7 @@ function media_upload_form_handler() {
                }
 
                /**
-                * Filter the HTML markup for a media item sent to the editor.
+                * Filters the HTML markup for a media item sent to the editor.
                 *
                 * @since 2.5.0
                 *
@@ -774,7 +776,7 @@ function wp_media_upload_handler() {
                                        $type = $ext_type;
 
                        /**
-                        * Filter the URL sent to the editor for a specific media type.
+                        * Filters the URL sent to the editor for a specific media type.
                         *
                         * The dynamic portion of the hook name, `$type`, refers to the type
                         * of media being sent.
@@ -797,7 +799,7 @@ function wp_media_upload_handler() {
                                $html = "<img src='" . esc_url($src) . "' alt='$alt'$class />";
 
                        /**
-                        * Filter the image URL sent to the editor.
+                        * Filters the image URL sent to the editor.
                         *
                         * @since 2.8.0
                         *
@@ -978,7 +980,7 @@ function image_align_input_fields( $post, $checked = '' ) {
  */
 function image_size_input_fields( $post, $check = '' ) {
        /**
-        * Filter the names and labels of the default image sizes.
+        * Filters the names and labels of the default image sizes.
         *
         * @since 3.3.0
         *
@@ -1132,7 +1134,7 @@ function media_post_single_attachment_fields_to_edit( $form_fields, $post ) {
  * Filters input from media_upload_form_handler() and assigns a default
  * post_title from the file name if none supplied.
  *
- * Illustrates the use of the attachment_fields_to_save filter
+ * Illustrates the use of the {@see 'attachment_fields_to_save'} filter
  * which can be used to add default values to any field before saving to DB.
  *
  * @since 2.5.0
@@ -1285,7 +1287,7 @@ function get_attachment_fields_to_edit($post, $errors = null) {
        }
 
        /**
-        * Filter the attachment fields to edit.
+        * Filters the attachment fields to edit.
         *
         * @since 2.5.0
         *
@@ -1369,7 +1371,7 @@ function get_media_item( $attachment_id, $args = null ) {
        $args = wp_parse_args( $args, $default_args );
 
        /**
-        * Filter the arguments used to retrieve an image for the edit image form.
+        * Filters the arguments used to retrieve an image for the edit image form.
         *
         * @since 3.1.0
         *
@@ -1427,7 +1429,7 @@ function get_media_item( $attachment_id, $args = null ) {
                $media_dims .= "<span id='media-dims-$post->ID'>{$meta['width']}&nbsp;&times;&nbsp;{$meta['height']}</span> ";
 
        /**
-        * Filter the media metadata.
+        * Filters the media metadata.
         *
         * @since 2.5.0
         *
@@ -1845,7 +1847,7 @@ $post_params = array(
 );
 
 /**
- * Filter the media upload post parameters.
+ * Filters the media upload post parameters.
  *
  * @since 3.1.0 As 'swfupload_post_params'
  * @since 3.3.0
@@ -1878,7 +1880,7 @@ if ( wp_is_mobile() && strpos( $_SERVER['HTTP_USER_AGENT'], 'OS 7_' ) !== false
 }
 
 /**
- * Filter the default Plupload settings.
+ * Filters the default Plupload settings.
  *
  * @since 3.3.0
  *
@@ -1985,7 +1987,7 @@ function media_upload_type_form($type = 'file', $errors = null, $id = null) {
        $form_action_url = admin_url("media-upload.php?type=$type&tab=type&post_id=$post_id");
 
        /**
-        * Filter the media upload form action URL.
+        * Filters the media upload form action URL.
         *
         * @since 2.6.0
         *
@@ -2165,7 +2167,7 @@ jQuery(document).ready( function($) {
 <div class="media-item media-blank">
 <?php
 /**
- * Filter the insert media from URL form HTML.
+ * Filters the insert media from URL form HTML.
  *
  * @since 3.3.0
  *
@@ -2418,7 +2420,7 @@ foreach ( $post_mime_types as $mime_type => $label ) {
        $type_links[] = '<li><a href="' . esc_url(add_query_arg(array('post_mime_type'=>$mime_type, 'paged'=>false))) . '"' . $class . '>' . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), '<span id="' . $mime_type . '-counter">' . number_format_i18n( $num_posts[$mime_type] ) . '</span>') . '</a>';
 }
 /**
- * Filter the media upload mime type list items.
+ * Filters the media upload mime type list items.
  *
  * Returned values should begin with an `<li>` tag.
  *
@@ -2764,6 +2766,17 @@ function edit_form_image_editor( $post ) {
 
                echo wp_video_shortcode( $attr );
 
+       else :
+
+               /**
+                * Fires when an attachment type can't be rendered in the edit form.
+                *
+                * @since 4.6.0
+                *
+                * @param WP_Post $post A post object.
+                */
+               do_action( 'wp_edit_form_attachment_display', $post );
+
        endif; ?>
        </div>
        <div class="wp_attachment_details edit-form-section">
@@ -2805,7 +2818,7 @@ function edit_form_image_editor( $post ) {
 }
 
 /**
- * Displays non-editable attachment metadata in the publish metabox
+ * Displays non-editable attachment metadata in the publish meta box.
  *
  * @since 3.5.0
  */
@@ -2865,7 +2878,7 @@ function attachment_submitbox_metadata() {
        if ( preg_match( '#^(audio|video)/#', $post->post_mime_type ) ) {
 
                /**
-                * Filter the audio and video metadata fields to be shown in the publish meta box.
+                * Filters the audio and video metadata fields to be shown in the publish meta box.
                 *
                 * The key for each item in the array should correspond to an attachment
                 * metadata key, and the value should be the desired label.
@@ -2903,7 +2916,7 @@ function attachment_submitbox_metadata() {
                }
 
                /**
-                * Filter the audio attachment metadata fields to be shown in the publish meta box.
+                * Filters the audio attachment metadata fields to be shown in the publish meta box.
                 *
                 * The key for each item in the array should correspond to an attachment
                 * metadata key, and the value should be the desired label.
@@ -3108,7 +3121,7 @@ function wp_media_attach_action( $parent_id, $action = 'attach' ) {
        }
 
        if ( ! current_user_can( 'edit_post', $parent_id ) ) {
-               wp_die( __( 'You are not allowed to edit this post.' ) );
+               wp_die( __( 'Sorry, you are not allowed to edit this post.' ) );
        }
        $ids = array();
        foreach ( (array) $_REQUEST['media'] as $att_id ) {
index 74804022b7034b607256046e6fed685e356e193c..1c6f545f48a34e62db1e6181ba16af16a50f91bf 100644 (file)
@@ -229,7 +229,7 @@ function add_menu_classes($menu) {
        }
 
        /**
-        * Filter administration menus array with classes added for top-level items.
+        * Filters administration menus array with classes added for top-level items.
         *
         * @since 2.7.0
         *
@@ -241,7 +241,7 @@ function add_menu_classes($menu) {
 uksort($menu, "strnatcasecmp"); // make it all pretty
 
 /**
- * Filter whether to enable custom ordering of the administration menu.
+ * Filters whether to enable custom ordering of the administration menu.
  *
  * See the {@see 'menu_order'} filter for reordering menu items.
  *
@@ -258,7 +258,7 @@ if ( apply_filters( 'custom_menu_order', false ) ) {
        $default_menu_order = $menu_order;
 
        /**
-        * Filter the order of administration menu items.
+        * Filters the order of administration menu items.
         *
         * A truthy value must first be passed to the {@see 'custom_menu_order'} filter
         * for this filter to work. Use the following to enable custom menu ordering:
@@ -339,7 +339,7 @@ if ( !user_can_access_admin_page() ) {
         */
        do_action( 'admin_page_access_denied' );
 
-       wp_die( __( 'You do not have sufficient permissions to access this page.' ), 403 );
+       wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 }
 
 $menu = add_menu_classes($menu);
index bf877c3d868ffe0d4a2adc8ce9e3c41de1b586bf..89e17671c9dc566f4a7312b5d1dfeb64b006d782 100644 (file)
@@ -13,7 +13,7 @@
  * @param array    $args {
  *     Array of arguments for building the post submit meta box.
  *
- *     @type string   $id       Meta box ID.
+ *     @type string   $id       Meta box 'id' attribute.
  *     @type string   $title    Meta box title.
  *     @type callable $callback Meta box display callback.
  *     @type array    $args     Extra meta box arguments.
@@ -170,7 +170,7 @@ echo esc_html( $visibility_trans ); ?></span>
 </div><!-- .misc-pub-section -->
 
 <?php
-/* translators: Publish box date format, see http://php.net/date */
+/* translators: Publish box date format, see https://secure.php.net/date */
 $datef = __( 'M j, Y @ H:i' );
 if ( 0 != $post->ID ) {
        if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
@@ -296,7 +296,7 @@ function attachment_submit_meta_box( $post ) {
 
 <div id="misc-publishing-actions">
        <?php
-       /* translators: Publish box date format, see http://php.net/date */
+       /* translators: Publish box date format, see https://secure.php.net/date */
        $datef = __( 'M j, Y @ H:i' );
        $stamp = __('Uploaded on: <b>%1$s</b>');
        $date = date_i18n( $datef, strtotime( $post->post_date ) );
@@ -353,7 +353,7 @@ function attachment_submit_meta_box( $post ) {
  * @param array   $box {
  *     Post formats meta box arguments.
  *
- *     @type string   $id       Meta box ID.
+ *     @type string   $id       Meta box 'id' attribute.
  *     @type string   $title    Meta box title.
  *     @type callable $callback Meta box display callback.
  *     @type array    $args     Extra meta box arguments.
@@ -394,7 +394,7 @@ function post_format_meta_box( $post, $box ) {
  * @param array   $box {
  *     Tags meta box arguments.
  *
- *     @type string   $id       Meta box ID.
+ *     @type string   $id       Meta box 'id' attribute.
  *     @type string   $title    Meta box title.
  *     @type callable $callback Meta box display callback.
  *     @type array    $args {
@@ -455,7 +455,7 @@ function post_tags_meta_box( $post, $box ) {
  * @param array   $box {
  *     Categories meta box arguments.
  *
- *     @type string   $id       Meta box ID.
+ *     @type string   $id       Meta box 'id' attribute.
  *     @type string   $title    Meta box title.
  *     @type callable $callback Meta box display callback.
  *     @type array    $args {
@@ -522,7 +522,7 @@ function post_categories_meta_box( $post, $box ) {
                                        );
 
                                        /**
-                                        * Filter the arguments for the taxonomy parent dropdown on the Post Edit page.
+                                        * Filters the arguments for the taxonomy parent dropdown on the Post Edit page.
                                         *
                                         * @since 4.4.0
                                         *
@@ -798,7 +798,7 @@ function page_attributes_meta_box($post) {
                );
 
                /**
-                * Filter the arguments used to generate a Pages drop-down element.
+                * Filters the arguments used to generate a Pages drop-down element.
                 *
                 * @since 3.3.0
                 *
@@ -835,7 +835,7 @@ function page_attributes_meta_box($post) {
 <label class="screen-reader-text" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
 <?php
 /**
- * Filter the title of the default page template displayed in the drop-down.
+ * Filters the title of the default page template displayed in the drop-down.
  *
  * @since 4.1.0
  *
@@ -853,7 +853,7 @@ $default_title = apply_filters( 'default_page_template_title',  __( 'Default Tem
 <p><strong><?php _e('Order') ?></strong></p>
 <p><label class="screen-reader-text" for="menu_order"><?php _e('Order') ?></label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo esc_attr($post->menu_order) ?>" /></p>
 <?php if ( 'page' == $post->post_type && get_current_screen()->get_help_tabs() ) { ?>
-<p><?php _e( 'Need help? Use the Help tab in the upper right of your screen.' ); ?></p>
+<p><?php _e( 'Need help? Use the Help tab above the screen title.' ); ?></p>
 <?php
        }
 }
@@ -1013,7 +1013,7 @@ function xfn_check( $class, $value = '', $deprecated = '' ) {
        global $link;
 
        if ( !empty( $deprecated ) )
-               _deprecated_argument( __FUNCTION__, '0.0' ); // Never implemented
+               _deprecated_argument( __FUNCTION__, '0.0.0' ); // Never implemented
 
        $link_rel = isset( $link->link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: '';
        $rels = preg_split('/\s+/', $link_rel);
index 4efb1d0b3056ee76b652e6fbbfc74404a2b967b7..0cc57cbc9b8b9c22c9c9273b18c9cdbcad8962db 100644 (file)
@@ -17,10 +17,10 @@ function got_mod_rewrite() {
        $got_rewrite = apache_mod_loaded('mod_rewrite', true);
 
        /**
-        * Filter whether Apache and mod_rewrite are present.
+        * Filters whether Apache and mod_rewrite are present.
         *
         * This filter was previously used to force URL rewriting for other servers,
-        * like nginx. Use the got_url_rewrite filter in got_url_rewrite() instead.
+        * like nginx. Use the {@see 'got_url_rewrite'} filter in got_url_rewrite() instead.
         *
         * @since 2.5.0
         *
@@ -46,7 +46,7 @@ function got_url_rewrite() {
        $got_url_rewrite = ( got_mod_rewrite() || $GLOBALS['is_nginx'] || iis7_supports_permalinks() );
 
        /**
-        * Filter whether URL rewriting is available.
+        * Filters whether URL rewriting is available.
         *
         * @since 3.7.0
         *
@@ -369,7 +369,7 @@ function wp_doc_link_parse( $content ) {
        sort( $functions );
 
        /**
-        * Filter the list of functions and classes to be ignored from the documentation lookup.
+        * Filters the list of functions and classes to be ignored from the documentation lookup.
         *
         * @since 2.8.0
         *
@@ -438,7 +438,7 @@ function set_screen_options() {
                        default:
 
                                /**
-                                * Filter a screen option value before it is set.
+                                * Filters a screen option value before it is set.
                                 *
                                 * The filter can also be used to modify non-standard [items]_per_page
                                 * settings. See the parent function for a full list of standard options.
@@ -881,7 +881,7 @@ function heartbeat_autosave( $response, $data ) {
                } elseif ( empty( $saved ) ) {
                        $response['wp_autosave'] = array( 'success' => false, 'message' => __( 'Error while saving.' ) );
                } else {
-                       /* translators: draft saved date format, see http://php.net/date */
+                       /* translators: draft saved date format, see https://secure.php.net/date */
                        $draft_saved_date_format = __( 'g:i:s a' );
                        /* translators: %s: date and time */
                        $response['wp_autosave'] = array( 'success' => true, 'message' => sprintf( __( 'Draft saved at %s.' ), date_i18n( $draft_saved_date_format ) ) );
@@ -891,24 +891,6 @@ function heartbeat_autosave( $response, $data ) {
        return $response;
 }
 
-/**
- * Disables autocomplete on the 'post' form (Add/Edit Post screens) for WebKit browsers,
- * as they disregard the autocomplete setting on the editor textarea. That can break the editor
- * when the user navigates to it with the browser's Back button. See #28037
- *
- * @since 4.0.0
- *
- * @global bool $is_safari
- * @global bool $is_chrome
- */
-function post_form_autocomplete_off() {
-       global $is_safari, $is_chrome;
-
-       if ( $is_safari || $is_chrome ) {
-               echo ' autocomplete="off"';
-       }
-}
-
 /**
  * Remove single-use URL parameters and create canonical link based on new URL.
  *
@@ -936,3 +918,21 @@ function wp_admin_canonical_url() {
        </script>
 <?php
 }
+
+/**
+ * Outputs JS that reloads the page if the user navigated to it with the Back or Forward button.
+ *
+ * Used on the Edit Post and Add New Post screens. Needed to ensure the page is not loaded from browser cache,
+ * so the post title and editor content are the last saved versions. Ideally this script should run first in the head.
+ *
+ * @since 4.6.0
+ */
+function wp_page_reload_on_back_button_js() {
+       ?>
+       <script>
+               if ( typeof performance !== 'undefined' && performance.navigation && performance.navigation.type === 2 ) {
+                       document.location.reload( true );
+               }
+       </script>
+       <?php
+}
index 84dcefc96adc927be385e9519471626cee8aeb45..81546bd1470a22a4285c5cc9141dfed2a3c6661b 100644 (file)
@@ -16,7 +16,7 @@
  * @deprecated 3.0.0
  */
 function wpmu_menu() {
-       _deprecated_function(__FUNCTION__, '3.0' );
+       _deprecated_function(__FUNCTION__, '3.0.0' );
        // Deprecated. See #11763.
 }
 
@@ -27,7 +27,7 @@ function wpmu_menu() {
  * @see is_upload_space_available()
  */
 function wpmu_checkAvailableSpace() {
-       _deprecated_function(__FUNCTION__, '3.0', 'is_upload_space_available()' );
+       _deprecated_function(__FUNCTION__, '3.0.0', 'is_upload_space_available()' );
 
        if ( !is_upload_space_available() )
                wp_die( __('Sorry, you must delete files before you can upload any more.') );
@@ -39,7 +39,7 @@ function wpmu_checkAvailableSpace() {
  * @deprecated 3.0.0
  */
 function mu_options( $options ) {
-       _deprecated_function(__FUNCTION__, '3.0' );
+       _deprecated_function(__FUNCTION__, '3.0.0' );
        return $options;
 }
 
@@ -50,7 +50,7 @@ function mu_options( $options ) {
  * @see activate_plugin()
  */
 function activate_sitewide_plugin() {
-       _deprecated_function(__FUNCTION__, '3.0', 'activate_plugin()' );
+       _deprecated_function(__FUNCTION__, '3.0.0', 'activate_plugin()' );
        return false;
 }
 
@@ -61,7 +61,7 @@ function activate_sitewide_plugin() {
  * @see deactivate_sitewide_plugin()
  */
 function deactivate_sitewide_plugin( $plugin = false ) {
-       _deprecated_function(__FUNCTION__, '3.0', 'deactivate_plugin()' );
+       _deprecated_function(__FUNCTION__, '3.0.0', 'deactivate_plugin()' );
 }
 
 /**
@@ -71,7 +71,7 @@ function deactivate_sitewide_plugin( $plugin = false ) {
  * @see is_network_only_plugin()
  */
 function is_wpmu_sitewide_plugin( $file ) {
-       _deprecated_function(__FUNCTION__, '3.0', 'is_network_only_plugin()' );
+       _deprecated_function(__FUNCTION__, '3.0.0', 'is_network_only_plugin()' );
        return is_network_only_plugin( $file );
 }
 
@@ -82,7 +82,7 @@ function is_wpmu_sitewide_plugin( $file ) {
  * @see WP_Theme::get_allowed_on_network()
  */
 function get_site_allowed_themes() {
-       _deprecated_function( __FUNCTION__, '3.4', 'WP_Theme::get_allowed_on_network()' );
+       _deprecated_function( __FUNCTION__, '3.4.0', 'WP_Theme::get_allowed_on_network()' );
        return array_map( 'intval', WP_Theme::get_allowed_on_network() );
 }
 
@@ -93,7 +93,7 @@ function get_site_allowed_themes() {
  * @see WP_Theme::get_allowed_on_site()
  */
 function wpmu_get_blog_allowedthemes( $blog_id = 0 ) {
-       _deprecated_function( __FUNCTION__, '3.4', 'WP_Theme::get_allowed_on_site()' );
+       _deprecated_function( __FUNCTION__, '3.4.0', 'WP_Theme::get_allowed_on_site()' );
        return array_map( 'intval', WP_Theme::get_allowed_on_site( $blog_id ) );
 }
 
index 6e8fb07ea3d28948e8a717800097c197b0562819..c88123a1fa2f5d84900614cdf1143987a1d4038b 100644 (file)
@@ -112,7 +112,7 @@ function wpmu_delete_blog( $blog_id, $drop = false ) {
 
                $tables = $wpdb->tables( 'blog' );
                /**
-                * Filter the tables to drop when the site is deleted.
+                * Filters the tables to drop when the site is deleted.
                 *
                 * @since MU
                 *
@@ -128,7 +128,7 @@ function wpmu_delete_blog( $blog_id, $drop = false ) {
                $wpdb->delete( $wpdb->blogs, array( 'blog_id' => $blog_id ) );
 
                /**
-                * Filter the upload base directory to delete when the site is deleted.
+                * Filters the upload base directory to delete when the site is deleted.
                 *
                 * @since MU
                 *
@@ -291,7 +291,7 @@ All at ###SITENAME###
 ###SITEURL###' );
 
        /**
-        * Filter the email text sent when the site admin email is changed.
+        * Filters the email text sent when the site admin email is changed.
         *
         * The following strings have a special meaning and will get replaced dynamically:
         * ###USERNAME###  The current user's username.
@@ -371,7 +371,7 @@ All at ###SITENAME###
 ###SITEURL###' );
 
                /**
-                * Filter the email text sent when a user changes emails.
+                * Filters the email text sent when a user changes emails.
                 *
                 * The following strings have a special meaning and will get replaced dynamically:
                 * ###USERNAME###  The current user's username.
@@ -528,7 +528,7 @@ function update_user_status( $id, $pref, $value, $deprecated = null ) {
        global $wpdb;
 
        if ( null !== $deprecated )
-               _deprecated_argument( __FUNCTION__, '3.1' );
+               _deprecated_argument( __FUNCTION__, '3.0.2' );
 
        $wpdb->update( $wpdb->users, array( sanitize_key( $pref ) => $value ), array( 'ID' => $id ) );
 
@@ -604,7 +604,7 @@ function format_code_lang( $code = '' ) {
                've' => 'Venda', 'vi' => 'Vietnamese', 'vo' => 'Volapük', 'cy' => 'Welsh','wa' => 'Walloon','wo' => 'Wolof', 'xh' => 'Xhosa', 'yi' => 'Yiddish', 'yo' => 'Yoruba', 'za' => 'Zhuang; Chuang', 'zu' => 'Zulu' );
 
        /**
-        * Filter the language codes.
+        * Filters the language codes.
         *
         * @since MU
         *
@@ -621,10 +621,10 @@ function format_code_lang( $code = '' ) {
  * @since 3.0.0
  *
  * @param object $term     The term.
- * @param string $taxonomy The taxonomy for $term. Should be 'category' or 'post_tag', as these are
+ * @param string $taxonomy The taxonomy for `$term`. Should be 'category' or 'post_tag', as these are
  *                         the only taxonomies which are processed by this function; anything else
  *                         will be returned untouched.
- * @return object|array Returns `$term`, after filtering the 'slug' field with {@see sanitize_title()}
+ * @return object|array Returns `$term`, after filtering the 'slug' field with sanitize_title()
  *                      if $taxonomy is 'category' or 'post_tag'.
  */
 function sync_category_tag_slugs( $term, $taxonomy ) {
@@ -730,7 +730,7 @@ function mu_dropdown_languages( $lang_files = array(), $current = '' ) {
        uksort( $output, 'strnatcasecmp' );
 
        /**
-        * Filter the languages available in the dropdown.
+        * Filters the languages available in the dropdown.
         *
         * @since MU
         *
@@ -851,102 +851,6 @@ function choose_primary_blog() {
        <?php
 }
 
-/**
- * Grants Super Admin privileges.
- *
- * @since 3.0.0
- *
- * @global array $super_admins
- *
- * @param int $user_id ID of the user to be granted Super Admin privileges.
- * @return bool True on success, false on failure. This can fail when the user is
- *              already a super admin or when the `$super_admins` global is defined.
- */
-function grant_super_admin( $user_id ) {
-       // If global super_admins override is defined, there is nothing to do here.
-       if ( isset( $GLOBALS['super_admins'] ) ) {
-               return false;
-       }
-
-       /**
-        * Fires before the user is granted Super Admin privileges.
-        *
-        * @since 3.0.0
-        *
-        * @param int $user_id ID of the user that is about to be granted Super Admin privileges.
-        */
-       do_action( 'grant_super_admin', $user_id );
-
-       // Directly fetch site_admins instead of using get_super_admins()
-       $super_admins = get_site_option( 'site_admins', array( 'admin' ) );
-
-       $user = get_userdata( $user_id );
-       if ( $user && ! in_array( $user->user_login, $super_admins ) ) {
-               $super_admins[] = $user->user_login;
-               update_site_option( 'site_admins' , $super_admins );
-
-               /**
-                * Fires after the user is granted Super Admin privileges.
-                *
-                * @since 3.0.0
-                *
-                * @param int $user_id ID of the user that was granted Super Admin privileges.
-                */
-               do_action( 'granted_super_admin', $user_id );
-               return true;
-       }
-       return false;
-}
-
-/**
- * Revokes Super Admin privileges.
- *
- * @since 3.0.0
- *
- * @global array $super_admins
- *
- * @param int $user_id ID of the user Super Admin privileges to be revoked from.
- * @return bool True on success, false on failure. This can fail when the user's email
- *              is the network admin email or when the `$super_admins` global is defined.
- */
-function revoke_super_admin( $user_id ) {
-       // If global super_admins override is defined, there is nothing to do here.
-       if ( isset( $GLOBALS['super_admins'] ) ) {
-               return false;
-       }
-
-       /**
-        * Fires before the user's Super Admin privileges are revoked.
-        *
-        * @since 3.0.0
-        *
-        * @param int $user_id ID of the user Super Admin privileges are being revoked from.
-        */
-       do_action( 'revoke_super_admin', $user_id );
-
-       // Directly fetch site_admins instead of using get_super_admins()
-       $super_admins = get_site_option( 'site_admins', array( 'admin' ) );
-
-       $user = get_userdata( $user_id );
-       if ( $user && 0 !== strcasecmp( $user->user_email, get_site_option( 'admin_email' ) ) ) {
-               if ( false !== ( $key = array_search( $user->user_login, $super_admins ) ) ) {
-                       unset( $super_admins[$key] );
-                       update_site_option( 'site_admins', $super_admins );
-
-                       /**
-                        * Fires after the user's Super Admin privileges are revoked.
-                        *
-                        * @since 3.0.0
-                        *
-                        * @param int $user_id ID of the user Super Admin privileges were revoked from.
-                        */
-                       do_action( 'revoked_super_admin', $user_id );
-                       return true;
-               }
-       }
-       return false;
-}
-
 /**
  * Whether or not we can edit this network from this page.
  *
@@ -969,7 +873,7 @@ function can_edit_network( $site_id ) {
                $result = false;
 
        /**
-        * Filter whether this network can be edited from this page.
+        * Filters whether this network can be edited from this page.
         *
         * @since 3.1.0
         *
@@ -1124,3 +1028,86 @@ jQuery(document).ready( function($) {
 </script>
 <?php
 }
+
+/**
+ * Outputs the HTML for a network's "Edit Site" tabular interface.
+ *
+ * @since 4.6.0
+ *
+ * @param $args {
+ *     Optional. Array or string of Query parameters. Default empty array.
+ *
+ *     @type int    $blog_id  The site ID. Default is the current site.
+ *     @type array  $links    The tabs to include with (label|url|cap) keys.
+ *     @type string $selected The ID of the selected link.
+ * }
+ */
+function network_edit_site_nav( $args = array() ) {
+
+       /**
+        * Filters the links that appear on site-editing network pages.
+        *
+        * Default links: 'site-info', 'site-users', 'site-themes', and 'site-settings'.
+        *
+        * @since 4.6.0
+        *
+        * @param array $links {
+        *     An array of link data representing individual network admin pages.
+        *
+        *     @type array $link_slug {
+        *         An array of information about the individual link to a page.
+        *
+        *         $type string $label Label to use for the link.
+        *         $type string $url   URL, relative to `network_admin_url()` to use for the link.
+        *         $type string $cap   Capability required to see the link.
+        *     }
+        * }
+        */
+       $links = apply_filters( 'network_edit_site_nav_links', array(
+               'site-info'     => array( 'label' => __( 'Info' ),     'url' => 'site-info.php',     'cap' => 'manage_sites' ),
+               'site-users'    => array( 'label' => __( 'Users' ),    'url' => 'site-users.php',    'cap' => 'manage_sites' ),
+               'site-themes'   => array( 'label' => __( 'Themes' ),   'url' => 'site-themes.php',   'cap' => 'manage_sites' ),
+               'site-settings' => array( 'label' => __( 'Settings' ), 'url' => 'site-settings.php', 'cap' => 'manage_sites' )
+       ) );
+
+       // Parse arguments
+       $r = wp_parse_args( $args, array(
+               'blog_id'  => isset( $_GET['blog_id'] ) ? (int) $_GET['blog_id'] : 0,
+               'links'    => $links,
+               'selected' => 'site-info',
+       ) );
+
+       // Setup the links array
+       $screen_links = array();
+
+       // Loop through tabs
+       foreach ( $r['links'] as $link_id => $link ) {
+
+               // Skip link if user can't access
+               if ( ! current_user_can( $link['cap'], $r['blog_id'] ) ) {
+                       continue;
+               }
+
+               // Link classes
+               $classes = array( 'nav-tab' );
+
+               // Selected is set by the parent OR assumed by the $pagenow global
+               if ( $r['selected'] === $link_id || $link['url'] === $GLOBALS['pagenow'] ) {
+                       $classes[] = 'nav-tab-active';
+               }
+
+               // Escape each class
+               $esc_classes = implode( ' ', $classes );
+
+               // Get the URL for this link
+               $url = add_query_arg( array( 'id' => $r['blog_id'] ), network_admin_url( $link['url'] ) );
+
+               // Add link to nav links
+               $screen_links[ $link_id ] = '<a href="' . esc_url( $url ) . '" id="' . esc_attr( $link_id ) . '" class="' . $esc_classes . '">' . esc_html( $link['label'] ) . '</a>';
+       }
+
+       // All done!
+       echo '<h2 class="nav-tab-wrapper wp-clearfix">';
+       echo implode( '', $screen_links );
+       echo '</h2>';
+}
index 18dcc97f6c4574b0da29dadc03c00863fded007a..cb1519c83b739255ab347c792a594fabad042b33 100644 (file)
@@ -70,24 +70,28 @@ function _wp_ajax_menu_quick_search( $request = array() ) {
 
        } elseif ( preg_match('/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*\b)/', $type, $matches) ) {
                if ( 'posttype' == $matches[1] && get_post_type_object( $matches[2] ) ) {
-                       query_posts(array(
-                               'posts_per_page' => 10,
-                               'post_type' => $matches[2],
-                               's' => $query,
-                       ));
-                       if ( ! have_posts() )
+                       $search_results_query = new WP_Query( array(
+                               'no_found_rows'          => true,
+                               'update_post_meta_cache' => false,
+                               'update_post_term_cache' => false,
+                               'posts_per_page'         => 10,
+                               'post_type'              => $matches[2],
+                               's'                      => $query,
+                       ) );
+                       if ( ! $search_results_query->have_posts() ) {
                                return;
-                       while ( have_posts() ) {
-                               the_post();
+                       }
+                       while ( $search_results_query->have_posts() ) {
+                               $post = $search_results_query->next_post();
                                if ( 'markup' == $response_format ) {
-                                       $var_by_ref = get_the_ID();
+                                       $var_by_ref = $post->ID;
                                        echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( get_post( $var_by_ref ) ) ), 0, (object) $args );
                                } elseif ( 'json' == $response_format ) {
                                        echo wp_json_encode(
                                                array(
-                                                       'ID' => get_the_ID(),
-                                                       'post_title' => get_the_title(),
-                                                       'post_type' => get_post_type(),
+                                                       'ID' => $post->ID,
+                                                       'post_title' => get_the_title( $post->ID ),
+                                                       'post_type' => $matches[2],
                                                )
                                        );
                                        echo "\n";
@@ -119,7 +123,7 @@ function _wp_ajax_menu_quick_search( $request = array() ) {
 }
 
 /**
- * Register nav menu metaboxes and advanced menu items
+ * Register nav menu meta boxes and advanced menu items.
  *
  * @since 3.0.0
  **/
@@ -174,7 +178,7 @@ function wp_initial_nav_menu_meta_boxes() {
 }
 
 /**
- * Creates metaboxes for any post type menu item.
+ * Creates meta boxes for any post type menu item..
  *
  * @since 3.0.0
  */
@@ -186,7 +190,7 @@ function wp_nav_menu_post_type_meta_boxes() {
 
        foreach ( $post_types as $post_type ) {
                /**
-                * Filter whether a menu items meta box will be added for the current
+                * Filters whether a menu items meta box will be added for the current
                 * object type.
                 *
                 * If a falsey value is returned instead of an object, the menu items
@@ -208,7 +212,7 @@ function wp_nav_menu_post_type_meta_boxes() {
 }
 
 /**
- * Creates metaboxes for any taxonomy menu item.
+ * Creates meta boxes for any taxonomy menu item.
  *
  * @since 3.0.0
  */
@@ -248,7 +252,7 @@ function wp_nav_menu_disabled_check( $nav_menu_selected_id ) {
 }
 
 /**
- * Displays a metabox for the custom links menu item.
+ * Displays a meta box for the custom links menu item.
  *
  * @since 3.0.0
  *
@@ -285,7 +289,7 @@ function wp_nav_menu_item_link_meta_box() {
 }
 
 /**
- * Displays a metabox for a post type menu item.
+ * Displays a meta box for a post type menu item.
  *
  * @since 3.0.0
  *
@@ -293,12 +297,19 @@ function wp_nav_menu_item_link_meta_box() {
  * @global int|string $nav_menu_selected_id
  *
  * @param string $object Not used.
- * @param string $post_type The post type object.
+ * @param array  $box {
+ *     Post type menu item meta box arguments.
+ *
+ *     @type string       $id       Meta box 'id' attribute.
+ *     @type string       $title    Meta box title.
+ *     @type string       $callback Meta box display callback.
+ *     @type WP_Post_Type $args     Extra meta box arguments (the post type object for this meta box).
+ * }
  */
-function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
+function wp_nav_menu_item_post_type_meta_box( $object, $box ) {
        global $_nav_menu_placeholder, $nav_menu_selected_id;
 
-       $post_type_name = $post_type['args']->name;
+       $post_type_name = $box['args']->name;
 
        // Paginate browsing for large numbers of post objects.
        $per_page = 50;
@@ -316,8 +327,8 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
                'update_post_meta_cache' => false
        );
 
-       if ( isset( $post_type['args']->_default_query ) )
-               $args = array_merge($args, (array) $post_type['args']->_default_query );
+       if ( isset( $box['args']->_default_query ) )
+               $args = array_merge($args, (array) $box['args']->_default_query );
 
        // @todo transient caching of these results with proper invalidation on updating of a post of this type
        $get_posts = new WP_Query;
@@ -400,18 +411,18 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
                                $args['walker'] = $walker;
 
                                /**
-                                * Filter the posts displayed in the 'Most Recent' tab of the current
+                                * Filters the posts displayed in the 'Most Recent' tab of the current
                                 * post type's menu items meta box.
                                 *
                                 * The dynamic portion of the hook name, `$post_type_name`, refers to the post type name.
                                 *
                                 * @since 4.3.0
                                 *
-                                * @param array  $most_recent An array of post objects being listed.
-                                * @param array  $args        An array of WP_Query arguments.
-                                * @param object $post_type   The current post type object for this menu item meta box.
+                                * @param array $most_recent An array of post objects being listed.
+                                * @param array $args        An array of WP_Query arguments.
+                                * @param array $box         Arguments passed to wp_nav_menu_item_post_type_meta_box().
                                 */
-                               $most_recent = apply_filters( "nav_menu_items_{$post_type_name}_recent", $most_recent, $args, $post_type );
+                               $most_recent = apply_filters( "nav_menu_items_{$post_type_name}_recent", $most_recent, $args, $box );
 
                                echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $most_recent), 0, (object) $args );
                                ?>
@@ -508,21 +519,23 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
                                }
 
                                /**
-                                * Filter the posts displayed in the 'View All' tab of the current
+                                * Filters the posts displayed in the 'View All' tab of the current
                                 * post type's menu items meta box.
                                 *
                                 * The dynamic portion of the hook name, `$post_type_name`, refers
                                 * to the slug of the current post type.
                                 *
                                 * @since 3.2.0
+                                * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object.
                                 *
                                 * @see WP_Query::query()
                                 *
-                                * @param array  $posts     The posts for the current post type.
-                                * @param array  $args      An array of WP_Query arguments.
-                                * @param object $post_type The current post type object for this menu item meta box.
+                                * @param array        $posts     The posts for the current post type.
+                                * @param array        $args      An array of WP_Query arguments.
+                                * @param WP_Post_Type $post_type The current post type object for this menu item meta box.
                                 */
                                $posts = apply_filters( "nav_menu_items_{$post_type_name}", $posts, $args, $post_type );
+
                                $checkbox_items = walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $posts), 0, (object) $args );
 
                                if ( 'all' == $current_tab && ! empty( $_REQUEST['selectall'] ) ) {
@@ -564,18 +577,25 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
 }
 
 /**
- * Displays a metabox for a taxonomy menu item.
+ * Displays a meta box for a taxonomy menu item.
  *
  * @since 3.0.0
  *
  * @global int|string $nav_menu_selected_id
  *
  * @param string $object Not used.
- * @param string $taxonomy The taxonomy object.
+ * @param array  $box {
+ *     Taxonomy menu item meta box arguments.
+ *
+ *     @type string $id       Meta box 'id' attribute.
+ *     @type string $title    Meta box title.
+ *     @type string $callback Meta box display callback.
+ *     @type object $args     Extra meta box arguments (the taxonomy object for this meta box).
+ * }
  */
-function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) {
+function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) {
        global $nav_menu_selected_id;
-       $taxonomy_name = $taxonomy['args']->name;
+       $taxonomy_name = $box['args']->name;
 
        // Paginate browsing for large numbers of objects.
        $per_page = 50;
@@ -888,7 +908,7 @@ function wp_get_nav_menu_to_edit( $menu_id = 0 ) {
                        return $result . ' <ul class="menu" id="menu-to-edit"> </ul>';
 
                /**
-                * Filter the Walker class used when adding nav menu items.
+                * Filters the Walker class used when adding nav menu items.
                 *
                 * @since 3.0.0
                 *
@@ -916,11 +936,13 @@ function wp_get_nav_menu_to_edit( $menu_id = 0 ) {
                                $some_invalid_menu_items = true;
                }
 
-               if ( $some_pending_menu_items )
-                       $result .= '<div class="updated inline"><p>' . __('Click Save Menu to make pending menu items public.') . '</p></div>';
+               if ( $some_pending_menu_items ) {
+                       $result .= '<div class="notice notice-info notice-alt inline"><p>' . __( 'Click Save Menu to make pending menu items public.' ) . '</p></div>';
+               }
 
-               if ( $some_invalid_menu_items )
-                       $result .= '<div class="error inline"><p>' . __('There are some invalid menu items. Please check or delete them.') . '</p></div>';
+               if ( $some_invalid_menu_items ) {
+                       $result .= '<div class="notice notice-error notice-alt inline"><p>' . __( 'There are some invalid menu items. Please check or delete them.' ) . '</p></div>';
+               }
 
                $result .= '<ul class="menu" id="menu-to-edit"> ';
                $result .= walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $menu_items), 0, (object) array('walker' => $walker ) );
@@ -1057,3 +1079,46 @@ function wp_nav_menu_update_menu_items ( $nav_menu_selected_id, $nav_menu_select
 
        return $messages;
 }
+
+/**
+ * If a JSON blob of navigation menu data is in POST data, expand it and inject
+ * it into `$_POST` to avoid PHP `max_input_vars` limitations. See #14134.
+ *
+ * @ignore
+ * @since 4.5.3
+ * @access private
+ */
+function _wp_expand_nav_menu_post_data() {
+       if ( ! isset( $_POST['nav-menu-data'] ) ) {
+               return;
+       }
+
+       $data = json_decode( stripslashes( $_POST['nav-menu-data'] ) );
+
+       if ( ! is_null( $data ) && $data ) {
+               foreach ( $data as $post_input_data ) {
+                       // For input names that are arrays (e.g. `menu-item-db-id[3][4][5]`),
+                       // derive the array path keys via regex and set the value in $_POST.
+                       preg_match( '#([^\[]*)(\[(.+)\])?#', $post_input_data->name, $matches );
+
+                       $array_bits = array( $matches[1] );
+
+                       if ( isset( $matches[3] ) ) {
+                               $array_bits = array_merge( $array_bits, explode( '][', $matches[3] ) );
+                       }
+
+                       $new_post_data = array();
+
+                       // Build the new array value from leaf to trunk.
+                       for ( $i = count( $array_bits ) - 1; $i >= 0; $i -- ) {
+                               if ( $i == count( $array_bits ) - 1 ) {
+                                       $new_post_data[ $array_bits[ $i ] ] = wp_slash( $post_input_data->value );
+                               } else {
+                                       $new_post_data = array( $array_bits[ $i ] => $new_post_data );
+                               }
+                       }
+
+                       $_POST = array_replace_recursive( $_POST, $new_post_data );
+               }
+       }
+}
index d034f045cc7bb48e600aa71b2281c8f9dd283255..d04b4f9a28f6e9433f908916f0c7e71519eaa24f 100644 (file)
@@ -52,7 +52,7 @@ function allow_subdomain_install() {
 function allow_subdirectory_install() {
        global $wpdb;
         /**
-         * Filter whether to enable the subdirectory install feature in Multisite.
+         * Filters whether to enable the subdirectory install feature in Multisite.
          *
          * @since 3.0.0
          *
@@ -159,7 +159,7 @@ function network_step1( $errors = false ) {
                $subdomain_install = true;
        } else {
                $subdomain_install = false;
-               if ( $got_mod_rewrite = got_mod_rewrite() ) { // dangerous assumptions 
+               if ( $got_mod_rewrite = got_mod_rewrite() ) { // dangerous assumptions
                        echo '<div class="updated inline"><p><strong>' . __( 'Note:' ) . '</strong> ';
                        /* translators: %s: mod_rewrite */
                        printf( __( 'Please make sure the Apache %s module is installed as it will be used at the end of this installation.' ),
@@ -180,8 +180,8 @@ function network_step1( $errors = false ) {
                        /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite */
                        printf( __( 'If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.' ),
                                '<code>mod_rewrite</code>',
-                               'http://httpd.apache.org/docs/mod/mod_rewrite.html',
-                               'http://www.google.com/search?q=apache+mod_rewrite'
+                               'https://httpd.apache.org/docs/mod/mod_rewrite.html',
+                               'https://www.google.com/search?q=apache+mod_rewrite'
                        );
                        echo '</p></div>';
                }
@@ -405,10 +405,16 @@ function network_step2( $errors = false ) {
 ?>
                <ol>
                        <li><p><?php printf(
-                               /* translators: 1: wp-config.php 2: location of wp-config file */
-                               __( 'Add the following to your %1$s file in %2$s <strong>above</strong> the line reading <code>/* That&#8217;s all, stop editing! Happy blogging. */</code>:' ),
+                               /* translators: 1: wp-config.php 2: location of wp-config file, 3: translated version of "That's all, stop editing! Happy blogging." */
+                               __( 'Add the following to your %1$s file in %2$s <strong>above</strong> the line reading %3$s:' ),
                                '<code>wp-config.php</code>',
-                               '<code>' . $location_of_wp_config . '</code>'
+                               '<code>' . $location_of_wp_config . '</code>',
+                               /*
+                                * translators: This string should only be translated if wp-config-sample.php is localized.
+                                * You can check the localized release package or
+                                * https://i18n.svn.wordpress.org/<locale code>/branches/<wp version>/dist/wp-config-sample.php
+                                */
+                               '<code>/* ' . __( 'That&#8217;s all, stop editing! Happy blogging.' ) . ' */</code>'
                        ); ?></p>
                                <textarea class="code" readonly="readonly" cols="100" rows="7">
 define('MULTISITE', true);
@@ -578,4 +584,4 @@ EOF;
                <p><?php _e( 'Once you complete these steps, your network is enabled and configured. You will have to log in again.' ); ?> <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log In' ); ?></a></p>
 <?php
        }
-}
\ No newline at end of file
+}
index b1727a279e48007fb7c4ad887101c92710420a58..4d558cf0eefab779bb379cd5bb1aef71bda4dfbc 100644 (file)
@@ -20,7 +20,7 @@
  *
  * The second filter, {@see 'plugins_api'}, allows a plugin to override the WordPress.org
  * Plugin Install API entirely. If `$action` is 'query_plugins' or 'plugin_information',
- * an object MUST be passed. If `$action` is 'hot_tags` or 'hot_categories', an array MUST
+ * an object MUST be passed. If `$action` is 'hot_tags' or 'hot_categories', an array MUST
  * be passed.
  *
  * Finally, the third filter, {@see 'plugins_api_result'}, makes it possible to filter the
@@ -113,7 +113,7 @@ function plugins_api( $action, $args = array() ) {
        }
 
        /**
-        * Filter the WordPress.org Plugin Install API arguments.
+        * Filters the WordPress.org Plugin Install API arguments.
         *
         * Important: An object MUST be returned to this filter.
         *
@@ -125,12 +125,12 @@ function plugins_api( $action, $args = array() ) {
        $args = apply_filters( 'plugins_api_args', $args, $action );
 
        /**
-        * Filter the response for the current WordPress.org Plugin Install API request.
+        * Filters the response for the current WordPress.org Plugin Install API request.
         *
         * Passing a non-false value will effectively short-circuit the WordPress.org API request.
         *
         * If `$action` is 'query_plugins' or 'plugin_information', an object MUST be passed.
-        * If `$action` is 'hot_tags` or 'hot_categories', an array should be passed.
+        * If `$action` is 'hot_tags' or 'hot_categories', an array should be passed.
         *
         * @since 2.7.0
         *
@@ -171,7 +171,7 @@ function plugins_api( $action, $args = array() ) {
        }
 
        /**
-        * Filter the Plugin Install API response results.
+        * Filters the Plugin Install API response results.
         *
         * @since 2.7.0
         *
@@ -210,10 +210,11 @@ function install_popular_tags( $args = array() ) {
  */
 function install_dashboard() {
        ?>
-       <p><?php printf( __( 'Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="%1$s">WordPress Plugin Directory</a> or upload a plugin in .zip format via <a href="%2$s">this page</a>.' ), 'https://wordpress.org/plugins/', self_admin_url( 'plugin-install.php?tab=upload' ) ); ?></p>
+       <p><?php printf( __( 'Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="%1$s">WordPress Plugin Directory</a> or upload a plugin in .zip format by clicking the button at the top of this page.' ), 'https://wordpress.org/plugins/' ); ?></p>
 
        <?php display_plugins_table(); ?>
 
+       <div class="plugins-popular-tags-wrapper">
        <h2><?php _e( 'Popular tags' ) ?></h2>
        <p><?php _e( 'You may also browse based on the most popular tags in the Plugin Directory:' ) ?></p>
        <?php
@@ -239,40 +240,32 @@ function install_dashboard() {
                }
                echo wp_generate_tag_cloud($tags, array( 'single_text' => __('%s plugin'), 'multiple_text' => __('%s plugins') ) );
        }
-       echo '</p><br class="clear" />';
+       echo '</p><br class="clear" /></div>';
 }
 
 /**
- * Display search form for searching plugins.
+ * Displays a search form for searching plugins.
  *
  * @since 2.7.0
+ * @since 4.6.0 The `$type_selector` parameter was deprecated.
  *
- * @param bool $type_selector
+ * @param bool $deprecated Not used.
  */
-function install_search_form( $type_selector = true ) {
-       $type = isset($_REQUEST['type']) ? wp_unslash( $_REQUEST['type'] ) : 'term';
-       $term = isset($_REQUEST['s']) ? wp_unslash( $_REQUEST['s'] ) : '';
-       $input_attrs = '';
-       $button_type = 'button screen-reader-text';
-
-       // assume no $type_selector means it's a simplified search form
-       if ( ! $type_selector ) {
-               $input_attrs = 'class="wp-filter-search" placeholder="' . esc_attr__( 'Search Plugins' ) . '" ';
-       }
-
+function install_search_form( $deprecated = true ) {
+       $type = isset( $_REQUEST['type'] ) ? wp_unslash( $_REQUEST['type'] ) : 'term';
+       $term = isset( $_REQUEST['s'] ) ? wp_unslash( $_REQUEST['s'] ) : '';
        ?><form class="search-form search-plugins" method="get">
                <input type="hidden" name="tab" value="search" />
-               <?php if ( $type_selector ) : ?>
+               <label class="screen-reader-text" for="typeselector"><?php _e( 'Search plugins by:' ); ?></label>
                <select name="type" id="typeselector">
-                       <option value="term"<?php selected('term', $type) ?>><?php _e('Keyword'); ?></option>
-                       <option value="author"<?php selected('author', $type) ?>><?php _e('Author'); ?></option>
-                       <option value="tag"<?php selected('tag', $type) ?>><?php _ex('Tag', 'Plugin Installer'); ?></option>
+                       <option value="term"<?php selected( 'term', $type ); ?>><?php _e( 'Keyword' ); ?></option>
+                       <option value="author"<?php selected( 'author', $type ); ?>><?php _e( 'Author' ); ?></option>
+                       <option value="tag"<?php selected( 'tag', $type ); ?>><?php _ex( 'Tag', 'Plugin Installer' ); ?></option>
                </select>
-               <?php endif; ?>
-               <label><span class="screen-reader-text"><?php _e('Search Plugins'); ?></span>
-                       <input type="search" name="s" value="<?php echo esc_attr($term) ?>" <?php echo $input_attrs; ?>/>
+               <label><span class="screen-reader-text"><?php _e( 'Search Plugins' ); ?></span>
+                       <input type="search" name="s" value="<?php echo esc_attr( $term ) ?>" class="wp-filter-search" placeholder="<?php esc_attr_e( 'Search Plugins' ); ?>" />
                </label>
-               <?php submit_button( __( 'Search Plugins' ), $button_type, false, false, array( 'id' => 'search-submit' ) ); ?>
+               <?php submit_button( __( 'Search Plugins' ), 'button hide-if-js', false, false, array( 'id' => 'search-submit' ) ); ?>
        </form><?php
 }
 
@@ -540,41 +533,50 @@ function install_plugin_information() {
        echo "</div>\n";
 
        ?>
-       <div id="<?php echo $_tab; ?>-content" class='<?php echo $_with_banner; ?>'>
+<div id="<?php echo $_tab; ?>-content" class='<?php echo $_with_banner; ?>'>
        <div class="fyi">
                <ul>
-               <?php if ( ! empty( $api->version ) ) { ?>
-                       <li><strong><?php _e( 'Version:' ); ?></strong> <?php echo $api->version; ?></li>
-               <?php } if ( ! empty( $api->author ) ) { ?>
-                       <li><strong><?php _e( 'Author:' ); ?></strong> <?php echo links_add_target( $api->author, '_blank' ); ?></li>
-               <?php } if ( ! empty( $api->last_updated ) ) { ?>
-                       <li><strong><?php _e( 'Last Updated:' ); ?></strong>
-                               <?php printf( __( '%s ago' ), human_time_diff( strtotime( $api->last_updated ) ) ); ?>
-                       </li>
-               <?php } if ( ! empty( $api->requires ) ) { ?>
-                       <li><strong><?php _e( 'Requires WordPress Version:' ); ?></strong> <?php printf( __( '%s or higher' ), $api->requires ); ?></li>
-               <?php } if ( ! empty( $api->tested ) ) { ?>
-                       <li><strong><?php _e( 'Compatible up to:' ); ?></strong> <?php echo $api->tested; ?></li>
-               <?php } if ( ! empty( $api->active_installs ) ) { ?>
-                       <li><strong><?php _e( 'Active Installs:' ); ?></strong> <?php
-                               if ( $api->active_installs >= 1000000 ) {
-                                       _ex( '1+ Million', 'Active plugin installs' );
-                               } else {
-                                       echo number_format_i18n( $api->active_installs ) . '+';
-                               }
-                       ?></li>
-               <?php } if ( ! empty( $api->slug ) && empty( $api->external ) ) { ?>
-                       <li><a target="_blank" href="https://wordpress.org/plugins/<?php echo $api->slug; ?>/"><?php _e( 'WordPress.org Plugin Page &#187;' ); ?></a></li>
-               <?php } if ( ! empty( $api->homepage ) ) { ?>
-                       <li><a target="_blank" href="<?php echo esc_url( $api->homepage ); ?>"><?php _e( 'Plugin Homepage &#187;' ); ?></a></li>
-               <?php } if ( ! empty( $api->donate_link ) && empty( $api->contributors ) ) { ?>
-                       <li><a target="_blank" href="<?php echo esc_url( $api->donate_link ); ?>"><?php _e( 'Donate to this plugin &#187;' ); ?></a></li>
-               <?php } ?>
+                       <?php if ( ! empty( $api->version ) ) { ?>
+                               <li><strong><?php _e( 'Version:' ); ?></strong> <?php echo $api->version; ?></li>
+                       <?php } if ( ! empty( $api->author ) ) { ?>
+                               <li><strong><?php _e( 'Author:' ); ?></strong> <?php echo links_add_target( $api->author, '_blank' ); ?></li>
+                       <?php } if ( ! empty( $api->last_updated ) ) { ?>
+                               <li><strong><?php _e( 'Last Updated:' ); ?></strong>
+                                       <?php
+                                       /* translators: %s: Time since the last update */
+                                       printf( __( '%s ago' ), human_time_diff( strtotime( $api->last_updated ) ) );
+                                       ?>
+                               </li>
+                       <?php } if ( ! empty( $api->requires ) ) { ?>
+                               <li>
+                                       <strong><?php _e( 'Requires WordPress Version:' ); ?></strong>
+                                       <?php
+                                       /* translators: %s: WordPress version */
+                                       printf( __( '%s or higher' ), $api->requires );
+                                       ?>
+                               </li>
+                       <?php } if ( ! empty( $api->tested ) ) { ?>
+                               <li><strong><?php _e( 'Compatible up to:' ); ?></strong> <?php echo $api->tested; ?></li>
+                       <?php } if ( ! empty( $api->active_installs ) ) { ?>
+                               <li><strong><?php _e( 'Active Installs:' ); ?></strong> <?php
+                                       if ( $api->active_installs >= 1000000 ) {
+                                               _ex( '1+ Million', 'Active plugin installs' );
+                                       } else {
+                                               echo number_format_i18n( $api->active_installs ) . '+';
+                                       }
+                                       ?></li>
+                       <?php } if ( ! empty( $api->slug ) && empty( $api->external ) ) { ?>
+                               <li><a target="_blank" href="https://wordpress.org/plugins/<?php echo $api->slug; ?>/"><?php _e( 'WordPress.org Plugin Page &#187;' ); ?></a></li>
+                       <?php } if ( ! empty( $api->homepage ) ) { ?>
+                               <li><a target="_blank" href="<?php echo esc_url( $api->homepage ); ?>"><?php _e( 'Plugin Homepage &#187;' ); ?></a></li>
+                       <?php } if ( ! empty( $api->donate_link ) && empty( $api->contributors ) ) { ?>
+                               <li><a target="_blank" href="<?php echo esc_url( $api->donate_link ); ?>"><?php _e( 'Donate to this plugin &#187;' ); ?></a></li>
+                       <?php } ?>
                </ul>
                <?php if ( ! empty( $api->rating ) ) { ?>
-               <h3><?php _e( 'Average Rating' ); ?></h3>
-               <?php wp_star_rating( array( 'rating' => $api->rating, 'type' => 'percent', 'number' => $api->num_ratings ) ); ?>
-               <p aria-hidden="true" class="fyi-description"><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></p>
+                       <h3><?php _e( 'Average Rating' ); ?></h3>
+                       <?php wp_star_rating( array( 'rating' => $api->rating, 'type' => 'percent', 'number' => $api->num_ratings ) ); ?>
+                       <p aria-hidden="true" class="fyi-description"><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></p>
                <?php }
 
                if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) { ?>
@@ -591,11 +593,11 @@ function install_plugin_information() {
                                ) );
                                ?>
                                <div class="counter-container">
-                                       <span class="counter-label"><a href="https://wordpress.org/support/view/plugin-reviews/<?php echo $api->slug; ?>?filter=<?php echo $key; ?>"
-                                               target="_blank" aria-label="<?php echo $aria_label; ?>"><?php printf( _n( '%d star', '%d stars', $key ), $key ); ?></a></span>
-                                       <span class="counter-back">
-                                               <span class="counter-bar" style="width: <?php echo 92 * $_rating; ?>px;"></span>
-                                       </span>
+                                               <span class="counter-label"><a href="https://wordpress.org/support/view/plugin-reviews/<?php echo $api->slug; ?>?filter=<?php echo $key; ?>"
+                                                                              target="_blank" aria-label="<?php echo $aria_label; ?>"><?php printf( _n( '%d star', '%d stars', $key ), $key ); ?></a></span>
+                                               <span class="counter-back">
+                                                       <span class="counter-bar" style="width: <?php echo 92 * $_rating; ?>px;"></span>
+                                               </span>
                                        <span class="counter-count" aria-hidden="true"><?php echo number_format_i18n( $ratecount ); ?></span>
                                </div>
                                <?php
@@ -628,24 +630,24 @@ function install_plugin_information() {
        </div>
        <div id="section-holder" class="wrap">
        <?php
-               if ( ! empty( $api->tested ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->tested ) ), $api->tested, '>' ) ) {
-                       echo '<div class="notice notice-warning notice-alt"><p>' . __( '<strong>Warning:</strong> This plugin has <strong>not been tested</strong> with your current version of WordPress.' ) . '</p></div>';
-               } elseif ( ! empty( $api->requires ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->requires ) ), $api->requires, '<' ) ) {
-                       echo '<div class="notice notice-warning notice-alt"><p>' . __( '<strong>Warning:</strong> This plugin has <strong>not been marked as compatible</strong> with your version of WordPress.' ) . '</p></div>';
-               }
+       if ( ! empty( $api->tested ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->tested ) ), $api->tested, '>' ) ) {
+               echo '<div class="notice notice-warning notice-alt"><p>' . __( '<strong>Warning:</strong> This plugin has <strong>not been tested</strong> with your current version of WordPress.' ) . '</p></div>';
+       } elseif ( ! empty( $api->requires ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->requires ) ), $api->requires, '<' ) ) {
+               echo '<div class="notice notice-warning notice-alt"><p>' . __( '<strong>Warning:</strong> This plugin has <strong>not been marked as compatible</strong> with your version of WordPress.' ) . '</p></div>';
+       }
 
-               foreach ( (array) $api->sections as $section_name => $content ) {
-                       $content = links_add_base_url( $content, 'https://wordpress.org/plugins/' . $api->slug . '/' );
-                       $content = links_add_target( $content, '_blank' );
+       foreach ( (array) $api->sections as $section_name => $content ) {
+               $content = links_add_base_url( $content, 'https://wordpress.org/plugins/' . $api->slug . '/' );
+               $content = links_add_target( $content, '_blank' );
 
-                       $san_section = esc_attr( $section_name );
+               $san_section = esc_attr( $section_name );
 
-                       $display = ( $section_name === $section ) ? 'block' : 'none';
+               $display = ( $section_name === $section ) ? 'block' : 'none';
 
-                       echo "\t<div id='section-{$san_section}' class='section' style='display: {$display};'>\n";
-                       echo $content;
-                       echo "\t</div>\n";
-               }
+               echo "\t<div id='section-{$san_section}' class='section' style='display: {$display};'>\n";
+               echo $content;
+               echo "\t</div>\n";
+       }
        echo "</div>\n";
        echo "</div>\n";
        echo "</div>\n"; // #plugin-information-scrollable
@@ -655,7 +657,7 @@ function install_plugin_information() {
                switch ( $status['status'] ) {
                        case 'install':
                                if ( $status['url'] ) {
-                                       echo '<a class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . __( 'Install Now' ) . '</a>';
+                                       echo '<a data-slug="' . esc_attr( $api->slug ) . '" id="plugin_install_from_iframe" class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . __( 'Install Now' ) . '</a>';
                                }
                                break;
                        case 'update_available':
@@ -664,6 +666,7 @@ function install_plugin_information() {
                                }
                                break;
                        case 'newer_installed':
+                               /* translators: %s: Plugin version */
                                echo '<a class="button button-primary right disabled">' . sprintf( __( 'Newer Version (%s) Installed'), $status['version'] ) . '</a>';
                                break;
                        case 'latest_installed':
index 25f6828787a1af08c04f3166e8b0152a7dbdef8a..cf6b4babf974596fac35ba192699791a046f5c76 100644 (file)
@@ -86,12 +86,20 @@ function get_plugin_data( $plugin_file, $markup = true, $translate = true ) {
        // Site Wide Only is the old header for Network
        if ( ! $plugin_data['Network'] && $plugin_data['_sitewide'] ) {
                /* translators: 1: Site Wide Only: true, 2: Network: true */
-               _deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The %1$s plugin header is deprecated. Use %2$s instead.' ), '<code>Site Wide Only: true</code>', '<code>Network: true</code>' ) );
+               _deprecated_argument( __FUNCTION__, '3.0.0', sprintf( __( 'The %1$s plugin header is deprecated. Use %2$s instead.' ), '<code>Site Wide Only: true</code>', '<code>Network: true</code>' ) );
                $plugin_data['Network'] = $plugin_data['_sitewide'];
        }
        $plugin_data['Network'] = ( 'true' == strtolower( $plugin_data['Network'] ) );
        unset( $plugin_data['_sitewide'] );
 
+       // If no text domain is defined fall back to the plugin slug.
+       if ( ! $plugin_data['TextDomain'] ) {
+               $plugin_slug = dirname( plugin_basename( $plugin_file ) );
+               if ( '.' !== $plugin_slug && false === strpos( $plugin_slug, '/' ) ) {
+                       $plugin_data['TextDomain'] = $plugin_slug;
+               }
+       }
+
        if ( $markup || $translate ) {
                $plugin_data = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup, $translate );
        } else {
@@ -487,7 +495,7 @@ function is_plugin_active_for_network( $plugin ) {
  * be activated only as a network wide plugin. The plugin would also work
  * when Multisite is not enabled.
  *
- * Checks for "Site Wide Only: true" for backwards compatibility.
+ * Checks for "Site Wide Only: true" for backward compatibility.
  *
  * @since 3.0.0
  *
@@ -570,12 +578,10 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen
                        /**
                         * Fires as a specific plugin is being activated.
                         *
-                        * This hook is the "activation" hook used internally by
-                        * {@see register_activation_hook()}. The dynamic portion of the
-                        * hook name, `$plugin`, refers to the plugin basename.
+                        * This hook is the "activation" hook used internally by register_activation_hook().
+                        * The dynamic portion of the hook name, `$plugin`, refers to the plugin basename.
                         *
-                        * If a plugin is silently activated (such as during an update),
-                        * this hook does not fire.
+                        * If a plugin is silently activated (such as during an update), this hook does not fire.
                         *
                         * @since 2.0.0
                         *
@@ -685,12 +691,10 @@ function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
                        /**
                         * Fires as a specific plugin is being deactivated.
                         *
-                        * This hook is the "deactivation" hook used internally by
-                        * {@see register_deactivation_hook()}. The dynamic portion of the
-                        * hook name, `$plugin`, refers to the plugin basename.
+                        * This hook is the "deactivation" hook used internally by register_deactivation_hook().
+                        * The dynamic portion of the hook name, `$plugin`, refers to the plugin basename.
                         *
-                        * If a plugin is silently deactivated (such as during an update),
-                        * this hook does not fire.
+                        * If a plugin is silently deactivated (such as during an update), this hook does not fire.
                         *
                         * @since 2.0.0
                         *
@@ -778,11 +782,13 @@ function delete_plugins( $plugins, $deprecated = '' ) {
        foreach ( $plugins as $plugin )
                $checked[] = 'checked[]=' . $plugin;
 
-       ob_start();
        $url = wp_nonce_url('plugins.php?action=delete-selected&verify-delete=1&' . implode('&', $checked), 'bulk-plugins');
-       if ( false === ($credentials = request_filesystem_credentials($url)) ) {
-               $data = ob_get_clean();
 
+       ob_start();
+       $credentials = request_filesystem_credentials( $url );
+       $data = ob_get_clean();
+
+       if ( false === $credentials ) {
                if ( ! empty($data) ){
                        include_once( ABSPATH . 'wp-admin/admin-header.php');
                        echo $data;
@@ -792,8 +798,9 @@ function delete_plugins( $plugins, $deprecated = '' ) {
                return;
        }
 
-       if ( ! WP_Filesystem($credentials) ) {
-               request_filesystem_credentials($url, '', true); //Failed to connect, Error and request again
+       if ( ! WP_Filesystem( $credentials ) ) {
+               ob_start();
+               request_filesystem_credentials( $url, '', true ); // Failed to connect, Error and request again.
                $data = ob_get_clean();
 
                if ( ! empty($data) ){
@@ -814,7 +821,7 @@ function delete_plugins( $plugins, $deprecated = '' ) {
        // Get the base plugin folder.
        $plugins_dir = $wp_filesystem->wp_plugins_dir();
        if ( empty( $plugins_dir ) ) {
-               return new WP_Error( 'fs_no_plugins_dir', __( 'Unable to locate WordPress Plugin directory.' ) );
+               return new WP_Error( 'fs_no_plugins_dir', __( 'Unable to locate WordPress plugin directory.' ) );
        }
 
        $plugins_dir = trailingslashit( $plugins_dir );
@@ -933,11 +940,11 @@ function validate_active_plugins() {
 /**
  * Validate the plugin path.
  *
- * Checks that the file exists and {@link validate_file() is valid file}.
+ * Checks that the file exists and is a valid file. See validate_file().
  *
  * @since 2.5.0
  *
- * @param string $plugin Plugin Path
+ * @param string $plugin Plugin Path.
  * @return WP_Error|int 0 on success, WP_Error on failure.
  */
 function validate_plugin($plugin) {
@@ -1003,7 +1010,7 @@ function uninstall_plugin($plugin) {
                unset($uninstallable_plugins);
 
                define('WP_UNINSTALL_PLUGIN', $file);
-               wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . dirname( $file ) );
+               wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $file );
                include( WP_PLUGIN_DIR . '/' . dirname($file) . '/uninstall.php' );
 
                return true;
@@ -1024,7 +1031,7 @@ function uninstall_plugin($plugin) {
                 * Fires in uninstall_plugin() once the plugin has been uninstalled.
                 *
                 * The action concatenates the 'uninstall_' prefix with the basename of the
-                * plugin passed to {@see uninstall_plugin()} to create a dynamically-named action.
+                * plugin passed to uninstall_plugin() to create a dynamically-named action.
                 *
                 * @since 2.7.0
                 */
@@ -1773,12 +1780,12 @@ function register_setting( $option_group, $option_name, $sanitize_callback = ''
        global $new_whitelist_options;
 
        if ( 'misc' == $option_group ) {
-               _deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
+               _deprecated_argument( __FUNCTION__, '3.0.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
                $option_group = 'general';
        }
 
        if ( 'privacy' == $option_group ) {
-               _deprecated_argument( __FUNCTION__, '3.5', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
+               _deprecated_argument( __FUNCTION__, '3.5.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
                $option_group = 'reading';
        }
 
@@ -1802,12 +1809,12 @@ function unregister_setting( $option_group, $option_name, $sanitize_callback = '
        global $new_whitelist_options;
 
        if ( 'misc' == $option_group ) {
-               _deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
+               _deprecated_argument( __FUNCTION__, '3.0.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
                $option_group = 'general';
        }
 
        if ( 'privacy' == $option_group ) {
-               _deprecated_argument( __FUNCTION__, '3.5', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
+               _deprecated_argument( __FUNCTION__, '3.5.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
                $option_group = 'reading';
        }
 
@@ -1819,7 +1826,9 @@ function unregister_setting( $option_group, $option_name, $sanitize_callback = '
 }
 
 /**
- * Refreshes the value of the options whitelist available via the 'whitelist_options' filter.
+ * Refreshes the value of the options whitelist available via the 'whitelist_options' hook.
+ *
+ * See the {@see 'whitelist_options'} filter.
  *
  * @since 2.7.0
  *
index 4eb762def657b3ee521ecdd0d202f433027ae108..790b736cdf2c0c09b5021c24410c827c354e88f8 100644 (file)
@@ -30,14 +30,14 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
 
        if ( $update && ! current_user_can( 'edit_post', $post_data['ID'] ) ) {
                if ( 'page' == $post_data['post_type'] )
-                       return new WP_Error( 'edit_others_pages', __( 'You are not allowed to edit pages as this user.' ) );
+                       return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to edit pages as this user.' ) );
                else
-                       return new WP_Error( 'edit_others_posts', __( 'You are not allowed to edit posts as this user.' ) );
+                       return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to edit posts as this user.' ) );
        } elseif ( ! $update && ! current_user_can( $ptype->cap->create_posts ) ) {
                if ( 'page' == $post_data['post_type'] )
-                       return new WP_Error( 'edit_others_pages', __( 'You are not allowed to create pages as this user.' ) );
+                       return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to create pages as this user.' ) );
                else
-                       return new WP_Error( 'edit_others_posts', __( 'You are not allowed to create posts as this user.' ) );
+                       return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to create posts as this user.' ) );
        }
 
        if ( isset( $post_data['content'] ) )
@@ -68,14 +68,14 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
                 && ! current_user_can( $ptype->cap->edit_others_posts ) ) {
                if ( $update ) {
                        if ( 'page' == $post_data['post_type'] )
-                               return new WP_Error( 'edit_others_pages', __( 'You are not allowed to edit pages as this user.' ) );
+                               return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to edit pages as this user.' ) );
                        else
-                               return new WP_Error( 'edit_others_posts', __( 'You are not allowed to edit posts as this user.' ) );
+                               return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to edit posts as this user.' ) );
                } else {
                        if ( 'page' == $post_data['post_type'] )
-                               return new WP_Error( 'edit_others_pages', __( 'You are not allowed to create pages as this user.' ) );
+                               return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to create pages as this user.' ) );
                        else
-                               return new WP_Error( 'edit_others_posts', __( 'You are not allowed to create posts as this user.' ) );
+                               return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to create posts as this user.' ) );
                }
        }
 
@@ -210,9 +210,9 @@ function edit_post( $post_data = null ) {
        $ptype = get_post_type_object($post_data['post_type']);
        if ( !current_user_can( 'edit_post', $post_ID ) ) {
                if ( 'page' == $post_data['post_type'] )
-                       wp_die( __('You are not allowed to edit this page.' ));
+                       wp_die( __('Sorry, you are not allowed to edit this page.' ));
                else
-                       wp_die( __('You are not allowed to edit this post.' ));
+                       wp_die( __('Sorry, you are not allowed to edit this post.' ));
        }
 
        if ( post_type_supports( $ptype->name, 'revisions' ) ) {
@@ -428,9 +428,9 @@ function bulk_edit_posts( $post_data = null ) {
 
        if ( !current_user_can( $ptype->cap->edit_posts ) ) {
                if ( 'page' == $ptype->name )
-                       wp_die( __('You are not allowed to edit pages.'));
+                       wp_die( __('Sorry, you are not allowed to edit pages.'));
                else
-                       wp_die( __('You are not allowed to edit posts.'));
+                       wp_die( __('Sorry, you are not allowed to edit posts.'));
        }
 
        if ( -1 == $post_data['_status'] ) {
@@ -629,7 +629,7 @@ function get_default_post_to_edit( $post_type = 'post', $create_in_db = false )
        }
 
        /**
-        * Filter the default post content initially used in the "Write Post" form.
+        * Filters the default post content initially used in the "Write Post" form.
         *
         * @since 1.5.0
         *
@@ -639,7 +639,7 @@ function get_default_post_to_edit( $post_type = 'post', $create_in_db = false )
        $post->post_content = apply_filters( 'default_content', $post_content, $post );
 
        /**
-        * Filter the default post title initially used in the "Write Post" form.
+        * Filters the default post title initially used in the "Write Post" form.
         *
         * @since 1.5.0
         *
@@ -649,7 +649,7 @@ function get_default_post_to_edit( $post_type = 'post', $create_in_db = false )
        $post->post_title = apply_filters( 'default_title', $post_title, $post );
 
        /**
-        * Filter the default post excerpt initially used in the "Write Post" form.
+        * Filters the default post excerpt initially used in the "Write Post" form.
         *
         * @since 1.5.0
         *
@@ -721,9 +721,9 @@ function wp_write_post() {
 
        if ( !current_user_can( $ptype->cap->edit_posts ) ) {
                if ( 'page' == $ptype->name )
-                       return new WP_Error( 'edit_pages', __( 'You are not allowed to create pages on this site.' ) );
+                       return new WP_Error( 'edit_pages', __( 'Sorry, you are not allowed to create pages on this site.' ) );
                else
-                       return new WP_Error( 'edit_posts', __( 'You are not allowed to create posts or drafts on this site.' ) );
+                       return new WP_Error( 'edit_posts', __( 'Sorry, you are not allowed to create posts or drafts on this site.' ) );
        }
 
        $_POST['post_mime_type'] = '';
@@ -1029,7 +1029,7 @@ function wp_edit_posts_query( $q = false ) {
                $posts_per_page = 20;
 
        /**
-        * Filter the number of items per page to show for a specific 'per_page' type.
+        * Filters the number of items per page to show for a specific 'per_page' type.
         *
         * The dynamic portion of the hook name, `$post_type`, refers to the post type.
         *
@@ -1044,7 +1044,7 @@ function wp_edit_posts_query( $q = false ) {
        $posts_per_page = apply_filters( "edit_{$post_type}_per_page", $posts_per_page );
 
        /**
-        * Filter the number of posts displayed per page when specifically listing "posts".
+        * Filters the number of posts displayed per page when specifically listing "posts".
         *
         * @since 2.8.0
         *
@@ -1120,7 +1120,7 @@ function wp_edit_attachments_query_vars( $q = false ) {
        }
 
        /**
-        * Filter the number of items to list per page when listing media items.
+        * Filters the number of items to list per page when listing media items.
         *
         * @since 2.9.0
         *
@@ -1166,7 +1166,7 @@ function wp_edit_attachments_query( $q = false ) {
 }
 
 /**
- * Returns the list of classes to be used by a metabox
+ * Returns the list of classes to be used by a meta box.
  *
  * @since 2.5.0
  *
@@ -1188,7 +1188,7 @@ function postbox_classes( $id, $page ) {
        }
 
        /**
-        * Filter the postbox classes for a specific screen and screen ID combo.
+        * Filters the postbox classes for a specific screen and screen ID combo.
         *
         * The dynamic portions of the hook name, `$page` and `$id`, refer to
         * the screen and screen ID, respectively.
@@ -1266,7 +1266,7 @@ function get_sample_permalink($id, $title = null, $name = null) {
        unset($post->filter);
 
        /**
-        * Filter the sample permalink.
+        * Filters the sample permalink.
         *
         * @since 4.4.0
         *
@@ -1329,18 +1329,10 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
                        $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button button-small" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
                }
        } else {
-               if ( function_exists( 'mb_strlen' ) ) {
-                       if ( mb_strlen( $post_name ) > 34 ) {
-                               $post_name_abridged = mb_substr( $post_name, 0, 16 ) . '&hellip;' . mb_substr( $post_name, -16 );
-                       } else {
-                               $post_name_abridged = $post_name;
-                       }
+               if ( mb_strlen( $post_name ) > 34 ) {
+                       $post_name_abridged = mb_substr( $post_name, 0, 16 ) . '&hellip;' . mb_substr( $post_name, -16 );
                } else {
-                       if ( strlen( $post_name ) > 34 ) {
-                               $post_name_abridged = substr( $post_name, 0, 16 ) . '&hellip;' . substr( $post_name, -16 );
-                       } else {
-                               $post_name_abridged = $post_name;
-                       }
+                       $post_name_abridged = $post_name;
                }
 
                $post_name_html = '<span id="editable-post-name">' . esc_html( $post_name_abridged ) . '</span>';
@@ -1354,7 +1346,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
        }
 
        /**
-        * Filter the sample permalink HTML markup.
+        * Filters the sample permalink HTML markup.
         *
         * @since 2.9.0
         * @since 4.4.0 Added `$post` parameter.
@@ -1375,7 +1367,6 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
  *
  * @since 2.9.0
  *
- * @global int   $content_width
  * @global array $_wp_additional_image_sizes
  *
  * @param int $thumbnail_id ID of the attachment used for thumbnail
@@ -1383,7 +1374,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
  * @return string html
  */
 function _wp_post_thumbnail_html( $thumbnail_id = null, $post = null ) {
-       global $content_width, $_wp_additional_image_sizes;
+       global $_wp_additional_image_sizes;
 
        $post               = get_post( $post );
        $post_type_object   = get_post_type_object( $post->post_type );
@@ -1400,7 +1391,7 @@ function _wp_post_thumbnail_html( $thumbnail_id = null, $post = null ) {
                $size = isset( $_wp_additional_image_sizes['post-thumbnail'] ) ? 'post-thumbnail' : array( 266, 266 );
 
                /**
-                * Filter the size used to display the post thumbnail image in the 'Featured Image' meta box.
+                * Filters the size used to display the post thumbnail image in the 'Featured Image' meta box.
                 *
                 * Note: When a theme adds 'post-thumbnail' support, a special 'post-thumbnail'
                 * image size is registered, which differs from the 'thumbnail' image size
@@ -1420,27 +1411,31 @@ function _wp_post_thumbnail_html( $thumbnail_id = null, $post = null ) {
 
                $thumbnail_html = wp_get_attachment_image( $thumbnail_id, $size );
 
-               if ( !empty( $thumbnail_html ) ) {
-                       $ajax_nonce = wp_create_nonce( 'set_post_thumbnail-' . $post->ID );
+               if ( ! empty( $thumbnail_html ) ) {
                        $content = sprintf( $set_thumbnail_link,
                                esc_url( $upload_iframe_src ),
                                ' aria-describedby="set-post-thumbnail-desc"',
                                $thumbnail_html
                        );
                        $content .= '<p class="hide-if-no-js howto" id="set-post-thumbnail-desc">' . __( 'Click the image to edit or update' ) . '</p>';
-                       $content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail" onclick="WPRemoveThumbnail(\'' . $ajax_nonce . '\');return false;">' . esc_html( $post_type_object->labels->remove_featured_image ) . '</a></p>';
+                       $content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail">' . esc_html( $post_type_object->labels->remove_featured_image ) . '</a></p>';
                }
        }
 
+       $content .= '<input type="hidden" id="_thumbnail_id" name="_thumbnail_id" value="' . esc_attr( $thumbnail_id ? $thumbnail_id : '-1' ) . '" />';
+
        /**
-        * Filter the admin post thumbnail HTML markup to return.
+        * Filters the admin post thumbnail HTML markup to return.
         *
         * @since 2.9.0
+        * @since 3.5.0 Added the `$post_id` parameter.
+        * @since 4.6.0 Added the `$thumbnail_id` parameter.
         *
-        * @param string $content Admin post thumbnail HTML markup.
-        * @param int    $post_id Post ID.
+        * @param string $content      Admin post thumbnail HTML markup.
+        * @param int    $post_id      Post ID.
+        * @param int    $thumbnail_id Thumbnail ID.
         */
-       return apply_filters( 'admin_post_thumbnail_html', $content, $post->ID );
+       return apply_filters( 'admin_post_thumbnail_html', $content, $post->ID, $thumbnail_id );
 }
 
 /**
@@ -1509,7 +1504,7 @@ function _admin_notice_post_locked() {
        if ( $user ) {
 
                /**
-                * Filter whether to show the post locked dialog.
+                * Filters whether to show the post locked dialog.
                 *
                 * Returning a falsey value to the filter will short-circuit displaying the dialog.
                 *
@@ -1561,7 +1556,7 @@ function _admin_notice_post_locked() {
                $preview_link = get_preview_post_link( $post->ID, $query_args );
 
                /**
-                * Filter whether to allow the post lock to be overridden.
+                * Filters whether to allow the post lock to be overridden.
                 *
                 * Returning a falsey value to the filter will disable the ability
                 * to override the post lock.
@@ -1721,11 +1716,11 @@ function post_preview() {
        $_POST['ID'] = $post_ID;
 
        if ( ! $post = get_post( $post_ID ) ) {
-               wp_die( __( 'You are not allowed to edit this post.' ) );
+               wp_die( __( 'Sorry, you are not allowed to edit this post.' ) );
        }
 
        if ( ! current_user_can( 'edit_post', $post->ID ) ) {
-               wp_die( __( 'You are not allowed to edit this post.' ) );
+               wp_die( __( 'Sorry, you are not allowed to edit this post.' ) );
        }
 
        $is_autosave = false;
@@ -1750,8 +1745,13 @@ function post_preview() {
                $query_args['preview_id'] = $post->ID;
                $query_args['preview_nonce'] = wp_create_nonce( 'post_preview_' . $post->ID );
 
-               if ( isset( $_POST['post_format'] ) )
+               if ( isset( $_POST['post_format'] ) ) {
                        $query_args['post_format'] = empty( $_POST['post_format'] ) ? 'standard' : sanitize_key( $_POST['post_format'] );
+               }
+
+               if ( isset( $_POST['_thumbnail_id'] ) ) {
+                       $query_args['_thumbnail_id'] = ( intval( $_POST['_thumbnail_id'] ) <= 0 ) ? '-1' : intval( $_POST['_thumbnail_id'] );
+               }
        }
 
        return get_preview_post_link( $post, $query_args );
@@ -1783,7 +1783,7 @@ function wp_autosave( $post_data ) {
        $post = get_post( $post_id );
 
        if ( ! current_user_can( 'edit_post', $post->ID ) ) {
-               return new WP_Error( 'edit_posts', __( 'You are not allowed to edit this item.' ) );
+               return new WP_Error( 'edit_posts', __( 'Sorry, you are not allowed to edit this item.' ) );
        }
 
        if ( 'auto-draft' == $post->post_status )
@@ -1839,7 +1839,7 @@ function redirect_post($post_id = '') {
        }
 
        /**
-        * Filter the post redirect destination URL.
+        * Filters the post redirect destination URL.
         *
         * @since 2.9.0
         *
index 3f038f129475dbe5e6b7ea92f0b5f1545eb75d12..dee879d61a949c75cfceac8eabdbe549e06e8ce7 100644 (file)
@@ -80,14 +80,14 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
                );
 
                /**
-                * Filter revisions text diff options.
+                * Filters revisions text diff options.
                 *
-                * Filter the options passed to {@see wp_text_diff()} when viewing a post revision.
+                * Filters the options passed to wp_text_diff() when viewing a post revision.
                 *
                 * @since 4.1.0
                 *
                 * @param array   $args {
-                *     Associative array of options to pass to {@see wp_text_diff()}.
+                *     Associative array of options to pass to wp_text_diff().
                 *
                 *     @type bool $show_split_view True for split view (two columns), false for
                 *                                 un-split view (single column). Default true.
@@ -119,7 +119,7 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
        }
 
        /**
-        * Filter the fields displayed in the post revision diff UI.
+        * Filters the fields displayed in the post revision diff UI.
         *
         * @since 4.1.0
         *
@@ -213,7 +213,7 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null
                );
 
                /**
-                * Filter the array of revisions used on the revisions screen.
+                * Filters the array of revisions used on the revisions screen.
                 *
                 * @since 4.4.0
                 *
index b043e49b0cbcbad2ca23856404f6a0a01591f4da..83ba531794a4fc3e878d9f6062499ba9890209de 100644 (file)
@@ -36,12 +36,7 @@ $charset_collate = $wpdb->get_charset_collate();
 function wp_get_db_schema( $scope = 'all', $blog_id = null ) {
        global $wpdb;
 
-       $charset_collate = '';
-
-       if ( ! empty($wpdb->charset) )
-               $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
-       if ( ! empty($wpdb->collate) )
-               $charset_collate .= " COLLATE $wpdb->collate";
+       $charset_collate = $wpdb->get_charset_collate();
 
        if ( $blog_id && $blog_id != $wpdb->blogid )
                $old_blog_id = $wpdb->set_blog_id( $blog_id );
@@ -386,7 +381,7 @@ function populate_options() {
        $timezone_string = '';
        $gmt_offset = 0;
        /* translators: default GMT offset or timezone string. Must be either a valid offset (-12 to 14)
-          or a valid timezone string (America/New_York). See http://us3.php.net/manual/en/timezones.php
+          or a valid timezone string (America/New_York). See https://secure.php.net/manual/en/timezones.php
           for all timezone strings supported by PHP.
        */
        $offset_or_tz = _x( '0', 'default GMT offset or timezone string' );
@@ -420,11 +415,11 @@ function populate_options() {
        'default_ping_status' => 'open',
        'default_pingback_flag' => 1,
        'posts_per_page' => 10,
-       /* translators: default date format, see http://php.net/date */
+       /* translators: default date format, see https://secure.php.net/date */
        'date_format' => __('F j, Y'),
-       /* translators: default time format, see http://php.net/date */
+       /* translators: default time format, see https://secure.php.net/date */
        'time_format' => __('g:i a'),
-       /* translators: links last updated date format, see http://php.net/date */
+       /* translators: links last updated date format, see https://secure.php.net/date */
        'links_updated_date_format' => __('F j, Y g:i a'),
        'comment_moderation' => 0,
        'moderation_notify' => 1,
@@ -1028,7 +1023,7 @@ We hope you enjoy your new site. Thanks!
                $sitemeta['illegal_names'][] = 'blog';
 
        /**
-        * Filter meta for a network on creation.
+        * Filters meta for a network on creation.
         *
         * @since 3.7.0
         *
index a72a8078afce50e9ae111b9bbca48f9c9c499a86..c3c4594d93e7d1b9975651ff6416a047cf62cfb0 100644 (file)
@@ -25,7 +25,7 @@ function get_column_headers( $screen ) {
        if ( ! isset( $column_headers[ $screen->id ] ) ) {
 
                /**
-                * Filter the column headers for a list table on a specific screen.
+                * Filters the column headers for a list table on a specific screen.
                 *
                 * The dynamic portion of the hook name, `$screen->id`, refers to the
                 * ID of a specific screen. For example, the screen ID for the Posts
@@ -63,7 +63,7 @@ function get_hidden_columns( $screen ) {
                $hidden = array();
 
                /**
-                * Filter the default list of hidden columns.
+                * Filters the default list of hidden columns.
                 *
                 * @since 4.4.0
                 *
@@ -74,7 +74,7 @@ function get_hidden_columns( $screen ) {
        }
 
        /**
-        * Filter the list of hidden columns.
+        * Filters the list of hidden columns.
         *
         * @since 4.4.0
         * @since 4.4.1 Added the `use_defaults` parameter.
@@ -117,10 +117,19 @@ function meta_box_prefs( $screen ) {
                                // Submit box cannot be hidden
                                if ( 'submitdiv' == $box['id'] || 'linksubmitdiv' == $box['id'] )
                                        continue;
-                               $box_id = $box['id'];
-                               echo '<label for="' . $box_id . '-hide">';
-                               echo '<input class="hide-postbox-tog" name="' . $box_id . '-hide" type="checkbox" id="' . $box_id . '-hide" value="' . $box_id . '"' . (! in_array($box_id, $hidden) ? ' checked="checked"' : '') . ' />';
-                               echo "{$box['title']}</label>\n";
+
+                               $widget_title = $box['title'];
+
+                               if ( is_array( $box['args'] ) && isset( $box['args']['__widget_basename'] ) ) {
+                                       $widget_title = $box['args']['__widget_basename'];
+                               }
+
+                               printf(
+                                       '<label for="%1$s-hide"><input class="hide-postbox-tog" name="%1$s-hide" type="checkbox" id="%1$s-hide" value="%1$s" %2$s />%3$s</label>',
+                                       esc_attr( $box['id'] ),
+                                       checked( in_array( $box['id'], $hidden ), false, false ),
+                                       $widget_title
+                               );
                        }
                }
        }
@@ -153,7 +162,7 @@ function get_hidden_meta_boxes( $screen ) {
                }
 
                /**
-                * Filter the default list of hidden meta boxes.
+                * Filters the default list of hidden meta boxes.
                 *
                 * @since 3.1.0
                 *
@@ -164,7 +173,7 @@ function get_hidden_meta_boxes( $screen ) {
        }
 
        /**
-        * Filter the list of hidden meta boxes.
+        * Filters the list of hidden meta boxes.
         *
         * @since 3.3.0
         *
@@ -200,7 +209,7 @@ function add_screen_option( $option, $args = array() ) {
  *
  * @global WP_Screen $current_screen
  *
- * @return WP_Screen Current screen object
+ * @return WP_Screen|null Current screen object or null when screen not defined.
  */
 function get_current_screen() {
        global $current_screen;
index 19f7ebe37178615471ad7d83ac4d467467e00fd7..524cf05d2742bfc360f3ec0fba5a91fbaf7de4c0 100644 (file)
@@ -242,7 +242,7 @@ function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) {
        $terms = get_object_term_cache( $post_id, $taxonomy );
        if ( false === $terms ) {
                $terms = wp_get_object_terms( $post_id, $taxonomy );
-               wp_cache_add( $post_id, $terms, $taxonomy . '_relationships' );
+               wp_cache_add( $post_id, wp_list_pluck( $terms, 'term_id' ), $taxonomy . '_relationships' );
        }
 
        if ( ! $terms ) {
@@ -259,7 +259,7 @@ function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) {
        $terms_to_edit = esc_attr( join( ',', $term_names ) );
 
        /**
-        * Filter the comma-separated list of terms available to edit.
+        * Filters the comma-separated list of terms available to edit.
         *
         * @since 2.8.0
         *
index 5138fd204ca30e6341005fdc383c7c83b63ef651..57478a11702b0d4faf27d7d0069fa13a58b7b905 100644 (file)
@@ -86,7 +86,7 @@ function wp_terms_checklist( $post_id = 0, $args = array() ) {
        );
 
        /**
-        * Filter the taxonomy terms checklist arguments.
+        * Filters the taxonomy terms checklist arguments.
         *
         * @since 3.4.0
         *
@@ -203,7 +203,7 @@ function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $ech
        $popular_ids = array();
        foreach ( (array) $terms as $term ) {
                $popular_ids[] = $term->term_id;
-               if ( !$echo ) // hack for AJAX use
+               if ( !$echo ) // Hack for Ajax use.
                        continue;
                $id = "popular-$taxonomy-$term->term_id";
                $checked = in_array( $term->term_id, $checked_terms ) ? 'checked="checked"' : '';
@@ -311,7 +311,7 @@ function get_inline_data($post) {
                        $terms = get_object_term_cache( $post->ID, $taxonomy_name );
                        if ( false === $terms ) {
                                $terms = wp_get_object_terms( $post->ID, $taxonomy_name );
-                               wp_cache_add( $post->ID, $terms, $taxonomy_name . '_relationships' );
+                               wp_cache_add( $post->ID, wp_list_pluck( $terms, 'term_id' ), $taxonomy_name . '_relationships' );
                        }
                        $term_ids = empty( $terms ) ? array() : wp_list_pluck( $terms, 'term_id' );
 
@@ -354,7 +354,7 @@ function get_inline_data($post) {
 function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $table_row = true ) {
        global $wp_list_table;
        /**
-        * Filter the in-line comment reply-to form output in the Comments
+        * Filters the in-line comment reply-to form output in the Comments
         * list table.
         *
         * Returning a non-empty value here will short-circuit display
@@ -582,7 +582,7 @@ function meta_form( $post = null ) {
        $post = get_post( $post );
 
        /**
-        * Filter values for the meta key dropdown in the Custom Fields meta box.
+        * Filters values for the meta key dropdown in the Custom Fields meta box.
         *
         * Returning a non-null value will effectively short-circuit and avoid a
         * potentially expensive query against postmeta.
@@ -596,7 +596,7 @@ function meta_form( $post = null ) {
 
        if ( null === $keys ) {
                /**
-                * Filter the number of custom fields to retrieve for the drop-down
+                * Filters the number of custom fields to retrieve for the drop-down
                 * in the Custom Fields meta box.
                 *
                 * @since 2.1.0
@@ -843,7 +843,7 @@ function wp_dropdown_roles( $selected = '' ) {
 function wp_import_upload_form( $action ) {
 
        /**
-        * Filter the maximum allowed upload size for import files.
+        * Filters the maximum allowed upload size for import files.
         *
         * @since 2.3.0
         *
@@ -1027,8 +1027,16 @@ function do_meta_boxes( $screen, $context, $object ) {
                                        $hidden_class = in_array($box['id'], $hidden) ? ' hide-if-js' : '';
                                        echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes($box['id'], $page) . $hidden_class . '" ' . '>' . "\n";
                                        if ( 'dashboard_browser_nag' != $box['id'] ) {
+                                               $widget_title = $box[ 'title' ];
+
+                                               if ( is_array( $box[ 'args' ] ) && isset( $box[ 'args' ][ '__widget_basename' ] ) ) {
+                                                       $widget_title = $box[ 'args' ][ '__widget_basename' ];
+                                                       // Do not pass this parameter to the user callback function.
+                                                       unset( $box[ 'args' ][ '__widget_basename' ] );
+                                               }
+
                                                echo '<button type="button" class="handlediv button-link" aria-expanded="true">';
-                                               echo '<span class="screen-reader-text">' . sprintf( __( 'Toggle panel: %s' ), $box['title'] ) . '</span>';
+                                               echo '<span class="screen-reader-text">' . sprintf( __( 'Toggle panel: %s' ), $widget_title ) . '</span>';
                                                echo '<span class="toggle-indicator" aria-hidden="true"></span>';
                                                echo '</button>';
                                        }
@@ -1060,12 +1068,11 @@ function do_meta_boxes( $screen, $context, $object ) {
  * @param string|array|WP_Screen $screen  The screen or screens on which the meta box is shown (such as a
  *                                        post type, 'link', or 'comment'). Accepts a single screen ID,
  *                                        WP_Screen object, or array of screen IDs.
- * @param string                 $context Optional. The context within the screen where the boxes
- *                                        should display. Available contexts vary from screen to
- *                                        screen. Post edit screen contexts include 'normal', 'side',
- *                                        and 'advanced'. Comments screen contexts include 'normal'
- *                                        and 'side'. Menus meta boxes (accordion sections) all use
- *                                        the 'side' context. Global default is 'advanced'.
+ * @param string                 $context The context within the screen where the box is set to display.
+ *                                        Contexts vary from screen to screen. Post edit screen contexts
+ *                                        include 'normal', 'side', and 'advanced'. Comments screen contexts
+ *                                        include 'normal' and 'side'. Menus meta boxes (accordion sections)
+ *                                        all use the 'side' context.
  */
 function remove_meta_box( $id, $screen, $context ) {
        global $wp_meta_boxes;
@@ -1100,7 +1107,7 @@ function remove_meta_box( $id, $screen, $context ) {
 /**
  * Meta Box Accordion Template Function
  *
- * Largely made up of abstracted code from {@link do_meta_boxes()}, this
+ * Largely made up of abstracted code from do_meta_boxes(), this
  * function serves to build meta boxes as list items for display as
  * a collapsible accordion.
  *
@@ -1197,12 +1204,12 @@ function add_settings_section($id, $title, $callback, $page) {
        global $wp_settings_sections;
 
        if ( 'misc' == $page ) {
-               _deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
+               _deprecated_argument( __FUNCTION__, '3.0.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
                $page = 'general';
        }
 
        if ( 'privacy' == $page ) {
-               _deprecated_argument( __FUNCTION__, '3.5', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
+               _deprecated_argument( __FUNCTION__, '3.5.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
                $page = 'reading';
        }
 
@@ -1248,12 +1255,12 @@ function add_settings_field($id, $title, $callback, $page, $section = 'default',
        global $wp_settings_fields;
 
        if ( 'misc' == $page ) {
-               _deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) );
+               _deprecated_argument( __FUNCTION__, '3.0.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) );
                $page = 'general';
        }
 
        if ( 'privacy' == $page ) {
-               _deprecated_argument( __FUNCTION__, '3.5', __( 'The privacy options group has been removed. Use another settings group.' ) );
+               _deprecated_argument( __FUNCTION__, '3.5.0', __( 'The privacy options group has been removed. Use another settings group.' ) );
                $page = 'reading';
        }
 
@@ -1383,7 +1390,8 @@ function add_settings_error( $setting, $code, $message, $type = 'error' ) {
  *
  * Use the $sanitize argument to manually re-sanitize the option before returning errors.
  * This is useful if you have errors or notices you want to show even when the user
- * hasn't submitted data (i.e. when they first load an options page, or in admin_notices action hook)
+ * hasn't submitted data (i.e. when they first load an options page, or in the {@see 'admin_notices'}
+ * action hook).
  *
  * @since 3.0.0
  *
@@ -1428,16 +1436,16 @@ function get_settings_errors( $setting = '', $sanitize = false ) {
 }
 
 /**
- * Display settings errors registered by {@see add_settings_error()}.
+ * Display settings errors registered by add_settings_error().
  *
  * Part of the Settings API. Outputs a div for each error retrieved by
- * {@see get_settings_errors()}.
+ * get_settings_errors().
  *
  * This is called automatically after a settings page based on the
  * Settings API is submitted. Errors should be added during the validation
- * callback function for a setting defined in {@see register_setting()}
+ * callback function for a setting defined in register_setting().
  *
- * The $sanitize option is passed into {@see get_settings_errors()} and will
+ * The $sanitize option is passed into get_settings_errors() and will
  * re-run the setting sanitization
  * on its current value.
  *
@@ -1451,7 +1459,8 @@ function get_settings_errors( $setting = '', $sanitize = false ) {
  *
  * @param string $setting        Optional slug title of a specific setting who's errors you want.
  * @param bool   $sanitize       Whether to re-sanitize the setting value before returning errors.
- * @param bool   $hide_on_update If set to true errors will not be shown if the settings page has already been submitted.
+ * @param bool   $hide_on_update If set to true errors will not be shown if the settings page has
+ *                               already been submitted.
  */
 function settings_errors( $setting = '', $sanitize = false, $hide_on_update = false ) {
 
@@ -1486,7 +1495,7 @@ function find_posts_div($found_action = '') {
        <div id="find-posts" class="find-box" style="display: none;">
                <div id="find-posts-head" class="find-box-head">
                        <?php _e( 'Attach to existing content' ); ?>
-                       <div id="find-posts-close"></div>
+                       <button type="button" id="find-posts-close"><span class="screen-reader-text"><?php _e( 'Close media attachment panel' ); ?></button>
                </div>
                <div class="find-box-inside">
                        <div class="find-box-search">
@@ -1512,10 +1521,9 @@ function find_posts_div($found_action = '') {
 }
 
 /**
- * Display the post password.
+ * Displays the post password.
  *
- * The password is passed through {@link esc_attr()} to ensure that it
- * is safe for placing in an html attribute.
+ * The password is passed through esc_attr() to ensure that it is safe for placing in an html attribute.
  *
  * @since 2.7.0
  */
@@ -1544,10 +1552,10 @@ function _draft_or_post_title( $post = 0 ) {
 }
 
 /**
- * Display the search query.
+ * Displays the search query.
  *
- * A simple wrapper to display the "s" parameter in a GET URI. This function
- * should only be used when {@link the_search_query()} cannot.
+ * A simple wrapper to display the "s" parameter in a `GET` URI. This function
+ * should only be used when the_search_query() cannot.
  *
  * @since 2.7.0
  */
@@ -1651,11 +1659,19 @@ function iframe_footer() {
         * but run the hooks anyway since they output JavaScript
         * or other needed content.
         */
-        ?>
+
+       /**
+        * @global string $hook_suffix
+        */
+       global $hook_suffix;
+       ?>
        <div class="hidden">
 <?php
        /** This action is documented in wp-admin/admin-footer.php */
-       do_action( 'admin_footer', '' );
+       do_action( 'admin_footer', $hook_suffix );
+
+       /** This action is documented in wp-admin/admin-footer.php */
+       do_action( "admin_print_footer_scripts-$hook_suffix" );
 
        /** This action is documented in wp-admin/admin-footer.php */
        do_action( 'admin_print_footer_scripts' );
@@ -1704,7 +1720,7 @@ function _post_states($post) {
        }
 
        /**
-        * Filter the default post display states used in the posts list table.
+        * Filters the default post display states used in the posts list table.
         *
         * @since 2.8.0
         *
@@ -1755,7 +1771,7 @@ function _media_states( $post ) {
        }
 
        /**
-        * Filter the default media display states for items in the Media list table.
+        * Filters the default media display states for items in the Media list table.
         *
         * @since 3.2.0
         *
@@ -1980,7 +1996,7 @@ function _wp_admin_html_begin() {
  */
 function convert_to_screen( $hook_name ) {
        if ( ! class_exists( 'WP_Screen', false ) ) {
-               _doing_it_wrong( 'convert_to_screen(), add_meta_box()', __( "Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead." ), '3.3' );
+               _doing_it_wrong( 'convert_to_screen(), add_meta_box()', __( "Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead." ), '3.3.0' );
                return (object) array( 'id' => '_invalid', 'base' => '_are_belong_to_us' );
        }
 
@@ -1995,14 +2011,13 @@ function convert_to_screen( $hook_name ) {
  */
 function _local_storage_notice() {
        ?>
-       <div id="local-storage-notice" class="hidden notice">
+       <div id="local-storage-notice" class="hidden notice is-dismissible">
        <p class="local-restore">
-               <?php _e('The backup of this post in your browser is different from the version below.'); ?>
-               <a class="restore-backup" href="#"><?php _e('Restore the backup.'); ?></a>
+               <?php _e( 'The backup of this post in your browser is different from the version below.' ); ?>
+               <button type="button" class="button restore-backup"><?php _e('Restore the backup'); ?></button>
        </p>
-       <p class="undo-restore hidden">
-               <?php _e('Post restored successfully.'); ?>
-               <a class="undo-restore-backup" href="#"><?php _e('Undo.'); ?></a>
+       <p class="help">
+               <?php _e( 'This will replace the current editor content with the last backup version. You can use undo and redo in the editor to get the old content back or to return to the restored version.' ); ?>
        </p>
        </div>
        <?php
@@ -2063,9 +2078,9 @@ function wp_star_rating( $args = array() ) {
 
        $output = '<div class="star-rating">';
        $output .= '<span class="screen-reader-text">' . $title . '</span>';
-       $output .= str_repeat( '<div class="star star-full"></div>', $full_stars );
-       $output .= str_repeat( '<div class="star star-half"></div>', $half_stars );
-       $output .= str_repeat( '<div class="star star-empty"></div>', $empty_stars );
+       $output .= str_repeat( '<div class="star star-full" aria-hidden="true"></div>', $full_stars );
+       $output .= str_repeat( '<div class="star star-half" aria-hidden="true"></div>', $half_stars );
+       $output .= str_repeat( '<div class="star star-empty" aria-hidden="true"></div>', $empty_stars );
        $output .= '</div>';
 
        if ( $r['echo'] ) {
index 27538b748991b0d98095f706dce1e6bcffaa2724..9333beac9b776d0acaa67a2aa697a5bb1247330a 100644 (file)
@@ -29,7 +29,7 @@ $theme_field_defaults = array( 'description' => true, 'sections' => false, 'test
  * @return array
  */
 function install_themes_feature_list() {
-       _deprecated_function( __FUNCTION__, '3.1', 'get_theme_feature_list()' );
+       _deprecated_function( __FUNCTION__, '3.1.0', 'get_theme_feature_list()' );
 
        if ( !$cache = get_transient( 'wporg_theme_feature_list' ) )
                set_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS );
@@ -160,7 +160,7 @@ function install_themes_upload() {
  * @param object $theme
  */
 function display_theme( $theme ) {
-       _deprecated_function( __FUNCTION__, '3.4' );
+       _deprecated_function( __FUNCTION__, '3.4.0' );
        global $wp_list_table;
        if ( ! isset( $wp_list_table ) ) {
                $wp_list_table = _get_list_table('WP_Theme_Install_List_Table');
index e469f5c14c3538a52dc05dbccc81f6036feffbac..73567e1fd171f5dff2d63202075fa4a81a326c96 100644 (file)
@@ -23,13 +23,16 @@ function delete_theme($stylesheet, $redirect = '') {
        if ( empty($stylesheet) )
                return false;
 
-       ob_start();
-       if ( empty( $redirect ) )
+       if ( empty( $redirect ) ) {
                $redirect = wp_nonce_url('themes.php?action=delete&stylesheet=' . urlencode( $stylesheet ), 'delete-theme_' . $stylesheet);
-       if ( false === ($credentials = request_filesystem_credentials($redirect)) ) {
-               $data = ob_get_clean();
+       }
+
+       ob_start();
+       $credentials = request_filesystem_credentials( $redirect );
+       $data = ob_get_clean();
 
-               if ( ! empty($data) ){
+       if ( false === $credentials ) {
+               if ( ! empty( $data ) ){
                        include_once( ABSPATH . 'wp-admin/admin-header.php');
                        echo $data;
                        include( ABSPATH . 'wp-admin/admin-footer.php');
@@ -38,8 +41,9 @@ function delete_theme($stylesheet, $redirect = '') {
                return;
        }
 
-       if ( ! WP_Filesystem($credentials) ) {
-               request_filesystem_credentials($redirect, '', true); // Failed to connect, Error and request again
+       if ( ! WP_Filesystem( $credentials ) ) {
+               ob_start();
+               request_filesystem_credentials( $redirect, '', true ); // Failed to connect, Error and request again.
                $data = ob_get_clean();
 
                if ( ! empty($data) ) {
@@ -83,6 +87,11 @@ function delete_theme($stylesheet, $redirect = '') {
                }
        }
 
+       // Remove the theme from allowed themes on the network.
+       if ( is_multisite() ) {
+               WP_Theme::network_disable_theme( $stylesheet );
+       }
+
        // Force refresh of theme update information.
        delete_site_transient( 'update_themes' );
 
@@ -166,34 +175,43 @@ function get_theme_update_available( $theme ) {
 
                if ( !is_multisite() ) {
                        if ( ! current_user_can('update_themes') ) {
-                               /* translators: 1: theme name, 2: theme details URL, 3: accessibility text, 4: version number */
-                               $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a>.' ) . '</strong></p>',
+                               /* translators: 1: theme name, 2: theme details URL, 3: additional link attributes, 4: version number */
+                               $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.' ) . '</strong></p>',
                                        $theme_name,
                                        esc_url( $details_url ),
-                                       /* translators: 1: theme name, 2: version number */
-                                       esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) ),
+                                       sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
+                                               /* translators: 1: theme name, 2: version number */
+                                               esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) )
+                                       ),
                                        $update['new_version']
                                );
                        } elseif ( empty( $update['package'] ) ) {
-                               /* translators: 1: theme name, 2: theme details URL, 3: accessibility text, 4: version number */
-                               $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ) . '</strong></p>',
+                               /* translators: 1: theme name, 2: theme details URL, 3: additional link attributes, 4: version number */
+                               $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ) . '</strong></p>',
                                        $theme_name,
                                        esc_url( $details_url ),
-                                       /* translators: 1: theme name, 2: version number */
-                                       esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) ),
+                                       sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
+                                               /* translators: 1: theme name, 2: version number */
+                                               esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) )
+                                       ),
                                        $update['new_version']
                                );
                        } else {
-                               /* translators: 1: theme name, 2: theme details URL, 3: accessibility text, 4: version number, 5: update URL, 6: accessibility text */
-                               $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a> or <a href="%5$s" aria-label="%6$s">update now</a>.' ) . '</strong></p>',
+                               /* translators: 1: theme name, 2: theme details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */
+                               $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.' ) . '</strong></p>',
                                        $theme_name,
                                        esc_url( $details_url ),
-                                       /* translators: 1: theme name, 2: version number */
-                                       esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) ),
+                                       sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
+                                               /* translators: 1: theme name, 2: version number */
+                                               esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) )
+                                       ),
                                        $update['new_version'],
                                        $update_url,
-                                       /* translators: %s: theme name */
-                                       esc_attr( sprintf( __( 'Update %s now' ), $theme_name ) )
+                                       sprintf( 'aria-label="%s" id="update-theme" data-slug="%s"',
+                                               /* translators: %s: theme name */
+                                               esc_attr( sprintf( __( 'Update %s now' ), $theme_name ) ),
+                                               $stylesheet
+                                       )
                                );
                        }
                }
@@ -213,28 +231,9 @@ function get_theme_update_available( $theme ) {
 function get_theme_feature_list( $api = true ) {
        // Hard-coded list is used if api not accessible.
        $features = array(
-                       __( 'Colors' ) => array(
-                               'black'   => __( 'Black' ),
-                               'blue'    => __( 'Blue' ),
-                               'brown'   => __( 'Brown' ),
-                               'gray'    => __( 'Gray' ),
-                               'green'   => __( 'Green' ),
-                               'orange'  => __( 'Orange' ),
-                               'pink'    => __( 'Pink' ),
-                               'purple'  => __( 'Purple' ),
-                               'red'     => __( 'Red' ),
-                               'silver'  => __( 'Silver' ),
-                               'tan'     => __( 'Tan' ),
-                               'white'   => __( 'White' ),
-                               'yellow'  => __( 'Yellow' ),
-                               'dark'    => __( 'Dark' ),
-                               'light'   => __( 'Light' ),
-                       ),
 
                __( 'Layout' ) => array(
-                       'fixed-layout'      => __( 'Fixed Layout' ),
-                       'fluid-layout'      => __( 'Fluid Layout' ),
-                       'responsive-layout' => __( 'Responsive Layout' ),
+                       'grid-layout'   => __( 'Grid Layout' ),
                        'one-column'    => __( 'One Column' ),
                        'two-columns'   => __( 'Two Columns' ),
                        'three-columns' => __( 'Three Columns' ),
@@ -245,16 +244,17 @@ function get_theme_feature_list( $api = true ) {
 
                __( 'Features' ) => array(
                        'accessibility-ready'   => __( 'Accessibility Ready' ),
-                       'blavatar'              => __( 'Blavatar' ),
                        'buddypress'            => __( 'BuddyPress' ),
                        'custom-background'     => __( 'Custom Background' ),
                        'custom-colors'         => __( 'Custom Colors' ),
                        'custom-header'         => __( 'Custom Header' ),
+                       'custom-logo'           => __( 'Custom Logo' ),
                        'custom-menu'           => __( 'Custom Menu' ),
                        'editor-style'          => __( 'Editor Style' ),
                        'featured-image-header' => __( 'Featured Image Header' ),
                        'featured-images'       => __( 'Featured Images' ),
                        'flexible-header'       => __( 'Flexible Header' ),
+                       'footer-widgets'        => __( 'Footer Widgets' ),
                        'front-page-post-form'  => __( 'Front Page Posting' ),
                        'full-width-template'   => __( 'Full Width Template' ),
                        'microformats'          => __( 'Microformats' ),
@@ -267,9 +267,15 @@ function get_theme_feature_list( $api = true ) {
                ),
 
                __( 'Subject' )  => array(
-                       'holiday'       => __( 'Holiday' ),
-                       'photoblogging' => __( 'Photoblogging' ),
-                       'seasonal'      => __( 'Seasonal' ),
+                       'blog'           => __( 'Blog' ),
+                       'e-commerce'     => __( 'E-Commerce' ),
+                       'education'      => __( 'Education' ),
+                       'entertainment'  => __( 'Entertainment' ),
+                       'food-and-drink' => __( 'Food & Drink' ),
+                       'holiday'        => __( 'Holiday' ),
+                       'news'           => __( 'News' ),
+                       'photography'    => __( 'Photography' ),
+                       'portfolio'      => __( 'Portfolio' ),
                )
        );
 
@@ -291,10 +297,9 @@ function get_theme_feature_list( $api = true ) {
        set_site_transient( 'wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS );
 
        $category_translations = array(
-               'Colors'   => __( 'Colors' ),
                'Layout'   => __( 'Layout' ),
                'Features' => __( 'Features' ),
-               'Subject'  => __( 'Subject' )
+               'Subject'  => __( 'Subject' ),
        );
 
        // Loop over the wporg canonical list and apply translations
@@ -329,7 +334,7 @@ function get_theme_feature_list( $api = true ) {
  *
  * The second filter, {@see 'themes_api'}, allows a plugin to override the WordPress.org
  * Theme API entirely. If `$action` is 'query_themes', 'theme_information', or 'feature_list',
- * an object MUST be passed. If `$action` is 'hot_tags`, an array should be passed.
+ * an object MUST be passed. If `$action` is 'hot_tags', an array should be passed.
  *
  * Finally, the third filter, {@see 'themes_api_result'}, makes it possible to filter the
  * response object or array, depending on the `$action` type.
@@ -411,7 +416,7 @@ function themes_api( $action, $args = array() ) {
        }
 
        /**
-        * Filter arguments used to query for installer pages from the WordPress.org Themes API.
+        * Filters arguments used to query for installer pages from the WordPress.org Themes API.
         *
         * Important: An object MUST be returned to this filter.
         *
@@ -424,12 +429,12 @@ function themes_api( $action, $args = array() ) {
        $args = apply_filters( 'themes_api_args', $args, $action );
 
        /**
-        * Filter whether to override the WordPress.org Themes API.
+        * Filters whether to override the WordPress.org Themes API.
         *
         * Passing a non-false value will effectively short-circuit the WordPress.org API request.
         *
         * If `$action` is 'query_themes', 'theme_information', or 'feature_list', an object MUST
-        * be passed. If `$action` is 'hot_tags`, an array should be passed.
+        * be passed. If `$action` is 'hot_tags', an array should be passed.
         *
         * @since 2.8.0
         *
@@ -470,14 +475,14 @@ function themes_api( $action, $args = array() ) {
        }
 
        /**
-        * Filter the returned WordPress.org Themes API response.
+        * Filters the returned WordPress.org Themes API response.
         *
         * @since 2.8.0
         *
-        * @param array|object $res    WordPress.org Themes API response.
-        * @param string       $action Requested action. Likely values are 'theme_information',
-        *                             'feature_list', or 'query_themes'.
-        * @param object       $args   Arguments used to query for installer pages from the WordPress.org Themes API.
+        * @param array|object|WP_Error $res    WordPress.org Themes API response.
+        * @param string                $action Requested action. Likely values are 'theme_information',
+        *                                      'feature_list', or 'query_themes'.
+        * @param object                $args   Arguments used to query for installer pages from the WordPress.org Themes API.
         */
        return apply_filters( 'themes_api_result', $res, $action, $args );
 }
@@ -496,7 +501,7 @@ function wp_prepare_themes_for_js( $themes = null ) {
        $current_theme = get_stylesheet();
 
        /**
-        * Filter theme data before it is prepared for JavaScript.
+        * Filters theme data before it is prepared for JavaScript.
         *
         * Passing a non-empty array will result in wp_prepare_themes_for_js() returning
         * early with that value instead.
@@ -582,7 +587,7 @@ function wp_prepare_themes_for_js( $themes = null ) {
        }
 
        /**
-        * Filter the themes prepared for JavaScript, for themes.php.
+        * Filters the themes prepared for JavaScript, for themes.php.
         *
         * Could be useful for changing the order, which is by name by default.
         *
@@ -642,7 +647,11 @@ function customize_themes_print_templates() {
                        <# if ( ! data.active ) { #>
                                <div class="theme-actions">
                                        <div class="inactive-theme">
-                                               <a href="<?php echo $preview_url; ?>" target="_top" class="button button-primary"><?php _e( 'Live Preview' ); ?></a>
+                                               <?php
+                                               /* translators: %s: Theme name */
+                                               $aria_label = sprintf( __( 'Preview %s' ), '{{ data.name }}' );
+                                               ?>
+                                               <a href="<?php echo $preview_url; ?>" target="_top" class="button button-primary" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Live Preview' ); ?></a>
                                        </div>
                                </div>
                        <# } #>
index 2056838f003621004a1bd141ae2f0605a617be44..ee8254d500991a736d85c63e09788c8a0516f88f 100644 (file)
@@ -72,7 +72,7 @@ function translations_api( $type, $args = null ) {
        }
 
        /**
-        * Filter the Translation Install API response results.
+        * Filters the Translation Install API response results.
         *
         * @since 4.0.0
         *
index f990e0984b17774d8aafd74f87506c317df7083b..a378d3ce95977bdeae0d12cd603f38c3d6d4a7e4 100644 (file)
@@ -703,6 +703,8 @@ $_old_files = array(
 'wp-includes/js/tinymce/plugins/wpfullscreen',
 // 4.5
 'wp-includes/theme-compat/comments-popup.php',
+// 4.6
+'wp-admin/includes/class-wp-automatic-upgrader.php', // Wrong file name, see #37628.
 );
 
 /**
@@ -744,16 +746,16 @@ if ( ! defined( 'CORE_UPGRADE_SKIP_NEW_BUNDLED' ) || CORE_UPGRADE_SKIP_NEW_BUNDL
 }
 
 /**
- * Upgrade the core of WordPress.
+ * Upgrades the core of WordPress.
  *
  * This will create a .maintenance file at the base of the WordPress directory
  * to ensure that people can not access the web site, when the files are being
  * copied to their locations.
  *
- * The files in the {@link $_old_files} list will be removed and the new files
+ * The files in the `$_old_files` list will be removed and the new files
  * copied from the zip file after the database is upgraded.
  *
- * The files in the {@link $_new_bundled_files} list will be added to the installation
+ * The files in the `$_new_bundled_files` list will be added to the installation
  * if the version is greater than or equal to the old version being upgraded.
  *
  * The steps for the upgrader for after the new release is downloaded and
@@ -803,7 +805,7 @@ function update_core($from, $to) {
        @set_time_limit( 300 );
 
        /**
-        * Filter feedback messages displayed during the core update process.
+        * Filters feedback messages displayed during the core update process.
         *
         * The filter is first evaluated after the zip file for the latest version
         * has been downloaded and unzipped. It is evaluated five more times during
index e412073ebefa8e8e87c3171b754c1e94976cedbb..74899e37cb4232dfd4f8ba9709365018f491f249 100644 (file)
@@ -230,10 +230,30 @@ function update_nag() {
        if ( ! isset( $cur->response ) || $cur->response != 'upgrade' )
                return false;
 
-       if ( current_user_can('update_core') ) {
-               $msg = sprintf( __( '<a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s" aria-label="Please update WordPress now">Please update now</a>.' ), $cur->current, network_admin_url( 'update-core.php' ) );
+       if ( current_user_can( 'update_core' ) ) {
+               $msg = sprintf(
+                       /* translators: 1: Codex URL to release notes, 2: new WordPress version, 3: URL to network admin, 4: accessibility text */
+                       __( '<a href="%1$s">WordPress %2$s</a> is available! <a href="%3$s" aria-label="%4$s">Please update now</a>.' ),
+                       sprintf(
+                               /* translators: %s: WordPress version */
+                               esc_url( __( 'https://codex.wordpress.org/Version_%s' ) ),
+                               $cur->current
+                       ),
+                       $cur->current,
+                       network_admin_url( 'update-core.php' ),
+                       esc_attr__( 'Please update WordPress now' )
+               );
        } else {
-               $msg = sprintf( __('<a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current );
+               $msg = sprintf(
+                       /* translators: 1: Codex URL to release notes, 2: new WordPress version */
+                       __( '<a href="%1$s">WordPress %2$s</a> is available! Please notify the site administrator.' ),
+                       sprintf(
+                               /* translators: %s: WordPress version */
+                               esc_url( __( 'https://codex.wordpress.org/Version_%s' ) ),
+                               $cur->current
+                       ),
+                       $cur->current
+               );
        }
        echo "<div class='update-nag'>$msg</div>";
 }
@@ -258,7 +278,7 @@ function update_right_now_message() {
        $content = __( 'WordPress %1$s running %2$s theme.' );
 
        /**
-        * Filter the text displayed in the 'At a Glance' dashboard widget.
+        * Filters the text displayed in the 'At a Glance' dashboard widget.
         *
         * Prior to 3.8.0, the widget was named 'Right Now'.
         *
@@ -309,65 +329,84 @@ function wp_plugin_update_rows() {
 }
 
 /**
+ * Displays update information for a plugin.
  *
- * @param string $file
- * @param array  $plugin_data
+ * @param string $file        Plugin basename.
+ * @param array  $plugin_data Plugin information.
  * @return false|void
  */
 function wp_plugin_update_row( $file, $plugin_data ) {
        $current = get_site_transient( 'update_plugins' );
-       if ( !isset( $current->response[ $file ] ) )
+       if ( ! isset( $current->response[ $file ] ) ) {
                return false;
+       }
 
-       $r = $current->response[ $file ];
+       $response = $current->response[ $file ];
 
-       $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array());
-       $plugin_name = wp_kses( $plugin_data['Name'], $plugins_allowedtags );
+       $plugins_allowedtags = array(
+               'a'       => array( 'href' => array(), 'title' => array() ),
+               'abbr'    => array( 'title' => array() ),
+               'acronym' => array( 'title' => array() ),
+               'code'    => array(),
+               'em'      => array(),
+               'strong'  => array(),
+       );
 
-       $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&section=changelog&TB_iframe=true&width=600&height=800');
+       $plugin_name   = wp_kses( $plugin_data['Name'], $plugins_allowedtags );
+       $details_url   = self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $response->slug . '&section=changelog&TB_iframe=true&width=600&height=800' );
 
-       $wp_list_table = _get_list_table('WP_Plugins_List_Table');
+       /** @var WP_Plugins_List_Table $wp_list_table */
+       $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
 
-       if ( is_network_admin() || !is_multisite() ) {
+       if ( is_network_admin() || ! is_multisite() ) {
                if ( is_network_admin() ) {
-                       $active_class = is_plugin_active_for_network( $file ) ? ' active': '';
+                       $active_class = is_plugin_active_for_network( $file ) ? ' active' : '';
                } else {
                        $active_class = is_plugin_active( $file ) ? ' active' : '';
                }
 
-               echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr( $r->slug . '-update' ) . '" data-slug="' . esc_attr( $r->slug ) . '" data-plugin="' . esc_attr( $file ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message">';
+               echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr( $response->slug . '-update' ) . '" data-slug="' . esc_attr( $response->slug ) . '" data-plugin="' . esc_attr( $file ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt"><p>';
 
                if ( ! current_user_can( 'update_plugins' ) ) {
-                       /* translators: 1: plugin name, 2: details URL, 3: accessibility text, 4: version number */
-                       printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>.' ),
+                       /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */
+                       printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.' ),
                                $plugin_name,
                                esc_url( $details_url ),
-                               /* translators: 1: plugin name, 2: version number */
-                               esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $r->new_version ) ),
-                               $r->new_version
+                               sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
+                                       /* translators: 1: plugin name, 2: version number */
+                                       esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
+                               ),
+                               $response->new_version
                        );
-               } elseif ( empty( $r->package ) ) {
-                       /* translators: 1: plugin name, 2: details URL, 3: accessibility text, 4: version number */
-                       printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>' ),
+               } elseif ( empty( $response->package ) ) {
+                       /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */
+                       printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>' ),
                                $plugin_name,
                                esc_url( $details_url ),
-                               /* translators: 1: plugin name, 2: version number */
-                               esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $r->new_version ) ),
-                               $r->new_version
+                               sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
+                                       /* translators: 1: plugin name, 2: version number */
+                                       esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
+                               ),
+                               $response->new_version
                        );
                } else {
-                       /* translators: 1: plugin name, 2: details URL, 3: accessibility text, 4: version number, 5: update URL, 6: accessibility text */
-                       printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="%6$s">update now</a>.' ),
+                       /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */
+                       printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.' ),
                                $plugin_name,
                                esc_url( $details_url ),
-                               /* translators: 1: plugin name, 2: version number */
-                               esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $r->new_version ) ),
-                               $r->new_version,
+                               sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
+                                       /* translators: 1: plugin name, 2: version number */
+                                       esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
+                               ),
+                               $response->new_version,
                                wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ),
-                               /* translators: %s: plugin name */
-                               esc_attr( sprintf( __( 'Update %s now' ), $plugin_name ) )
+                               sprintf( 'class="update-link" aria-label="%s"',
+                                       /* translators: %s: plugin name */
+                                       esc_attr( sprintf( __( 'Update %s now' ), $plugin_name ) )
+                               )
                        );
                }
+
                /**
                 * Fires at the end of the update message container in each
                 * row of the plugins list table.
@@ -380,32 +419,32 @@ function wp_plugin_update_row( $file, $plugin_data ) {
                 * @param array $plugin_data {
                 *     An array of plugin metadata.
                 *
-                *     @type string $name         The human-readable name of the plugin.
-                *     @type string $plugin_uri   Plugin URI.
-                *     @type string $version      Plugin version.
-                *     @type string $description  Plugin description.
-                *     @type string $author       Plugin author.
-                *     @type string $author_uri   Plugin author URI.
-                *     @type string $text_domain  Plugin text domain.
-                *     @type string $domain_path  Relative path to the plugin's .mo file(s).
-                *     @type bool   $network      Whether the plugin can only be activated network wide.
-                *     @type string $title        The human-readable title of the plugin.
-                *     @type string $author_name  Plugin author's name.
-                *     @type bool   $update       Whether there's an available update. Default null.
-                * }
-                * @param array $r {
-                *     An array of metadata about the available plugin update.
-                *
-                *     @type int    $id           Plugin ID.
-                *     @type string $slug         Plugin slug.
-                *     @type string $new_version  New plugin version.
-                *     @type string $url          Plugin URL.
-                *     @type string $package      Plugin update package URL.
-                * }
+                *     @type string $name        The human-readable name of the plugin.
+                *     @type string $plugin_uri  Plugin URI.
+                *     @type string $version     Plugin version.
+                *     @type string $description Plugin description.
+                *     @type string $author      Plugin author.
+                *     @type string $author_uri  Plugin author URI.
+                *     @type string $text_domain Plugin text domain.
+                *     @type string $domain_path Relative path to the plugin's .mo file(s).
+                *     @type bool   $network     Whether the plugin can only be activated network wide.
+                *     @type string $title       The human-readable title of the plugin.
+                *     @type string $author_name Plugin author's name.
+                *     @type bool   $update      Whether there's an available update. Default null.
+                * }
+                * @param array $response {
+                *     An array of metadata about the available plugin update.
+                *
+                *     @type int    $id          Plugin ID.
+                *     @type string $slug        Plugin slug.
+                *     @type string $new_version New plugin version.
+                *     @type string $url         Plugin URL.
+                *     @type string $package     Plugin update package URL.
+                * }
                 */
-               do_action( "in_plugin_update_message-{$file}", $plugin_data, $r );
+               do_action( "in_plugin_update_message-{$file}", $plugin_data, $response );
 
-               echo '</div></td></tr>';
+               echo '</p></div></td></tr>';
        }
 }
 
@@ -446,58 +485,73 @@ function wp_theme_update_rows() {
 }
 
 /**
+ * Displays update information for a theme.
  *
- * @param string   $theme_key
- * @param WP_Theme $theme
+ * @param string   $theme_key Theme stylesheet.
+ * @param WP_Theme $theme     Theme object.
  * @return false|void
  */
 function wp_theme_update_row( $theme_key, $theme ) {
        $current = get_site_transient( 'update_themes' );
-       if ( !isset( $current->response[ $theme_key ] ) )
-               return false;
 
-       $r = $current->response[ $theme_key ];
+       if ( ! isset( $current->response[ $theme_key ] ) ) {
+               return false;
+       }
 
-       $theme_name = $theme['Name'];
+       $response = $current->response[ $theme_key ];
 
-       $details_url = add_query_arg( array( 'TB_iframe' => 'true', 'width' => 1024, 'height' => 800 ), $current->response[ $theme_key ]['url'] );
+       $details_url = add_query_arg( array(
+               'TB_iframe' => 'true',
+               'width'     => 1024,
+               'height'    => 800,
+       ), $current->response[ $theme_key ]['url'] );
 
-       $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
+       /** @var WP_MS_Themes_List_Table $wp_list_table */
+       $wp_list_table = _get_list_table( 'WP_MS_Themes_List_Table' );
 
-       $active = $theme->is_allowed( 'network' ) ? ' active': '';
+       $active = $theme->is_allowed( 'network' ) ? ' active' : '';
 
-       echo '<tr class="plugin-update-tr' . $active . '" id="' . esc_attr( $theme->get_stylesheet() . '-update' ) . '" data-slug="' . esc_attr( $theme->get_stylesheet() ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
-       if ( ! current_user_can('update_themes') ) {
-               /* translators: 1: theme name, 2: details URL, 3: accessibility text, 4: version number */
-               printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>.'),
-                       $theme_name,
+       echo '<tr class="plugin-update-tr' . $active . '" id="' . esc_attr( $theme->get_stylesheet() . '-update' ) . '" data-slug="' . esc_attr( $theme->get_stylesheet() ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt"><p>';
+       if ( ! current_user_can( 'update_themes' ) ) {
+               /* translators: 1: theme name, 2: details URL, 3: additional link attributes, 4: version number */
+               printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.'),
+                       $theme['Name'],
                        esc_url( $details_url ),
-                       /* translators: 1: theme name, 2: version number */
-                       esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $r['new_version'] ) ),
-                       $r['new_version']
+                       sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
+                               /* translators: 1: theme name, 2: version number */
+                               esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme['Name'], $response['new_version'] ) )
+                       ),
+                       $response['new_version']
                );
-       } elseif ( empty( $r['package'] ) ) {
-               /* translators: 1: theme name, 2: details URL, 3: accessibility text, 4: version number */
-               printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ),
-                       $theme_name,
+       } elseif ( empty( $response['package'] ) ) {
+               /* translators: 1: theme name, 2: details URL, 3: additional link attributes, 4: version number */
+               printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ),
+                       $theme['Name'],
                        esc_url( $details_url ),
-                       /* translators: 1: theme name, 2: version number */
-                       esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $r['new_version'] ) ),
-                       $r['new_version']
+                       sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
+                               /* translators: 1: theme name, 2: version number */
+                               esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme['Name'], $response['new_version'] ) )
+                       ),
+                       $response['new_version']
                );
        } else {
-               /* translators: 1: theme name, 2: details URL, 3: accessibility text, 4: version number, 5: update URL, 6: accessibility text */
-               printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="%6$s">update now</a>.' ),
-                       $theme_name,
+               /* translators: 1: theme name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */
+               printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.' ),
+                       $theme['Name'],
                        esc_url( $details_url ),
-                       /* translators: 1: theme name, 2: version number */
-                       esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $r['new_version'] ) ),
-                       $r['new_version'],
+                       sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
+                               /* translators: 1: theme name, 2: version number */
+                               esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme['Name'], $response['new_version'] ) )
+                       ),
+                       $response['new_version'],
                        wp_nonce_url( self_admin_url( 'update.php?action=upgrade-theme&theme=' ) . $theme_key, 'upgrade-theme_' . $theme_key ),
-                       /* translators: %s: theme name */
-                       esc_attr( sprintf( __( 'Update %s now' ), $theme_name ) )
+                       sprintf( 'class="update-link" aria-label="%s"',
+                               /* translators: %s: theme name */
+                               esc_attr( sprintf( __( 'Update %s now' ), $theme['Name'] ) )
+                       )
                );
        }
+
        /**
         * Fires at the end of the update message container in each
         * row of the themes list table.
@@ -507,8 +561,8 @@ function wp_theme_update_row( $theme_key, $theme ) {
         *
         * @since 3.1.0
         *
-        * @param WP_Theme $theme The WP_Theme object.
-        * @param array    $r {
+        * @param WP_Theme $theme    The WP_Theme object.
+        * @param array    $response {
         *     An array of metadata about the available theme update.
         *
         *     @type string $new_version New theme version.
@@ -516,9 +570,9 @@ function wp_theme_update_row( $theme_key, $theme ) {
         *     @type string $package     Theme update package URL.
         * }
         */
-       do_action( "in_theme_update_message-{$theme_key}", $theme, $r );
+       do_action( "in_theme_update_message-{$theme_key}", $theme, $response );
 
-       echo '</div></td></tr>';
+       echo '</p></div></td></tr>';
 }
 
 /**
@@ -557,3 +611,146 @@ function maintenance_nag() {
 
        echo "<div class='update-nag'>$msg</div>";
 }
+
+/**
+ * Prints the JavaScript templates for update admin notices.
+ *
+ * Template takes one argument with four values:
+ *
+ *     param {object} data {
+ *         Arguments for admin notice.
+ *
+ *         @type string id        ID of the notice.
+ *         @type string className Class names for the notice.
+ *         @type string message   The notice's message.
+ *         @type string type      The type of update the notice is for. Either 'plugin' or 'theme'.
+ *     }
+ *
+ * @since 4.6.0
+ */
+function wp_print_admin_notice_templates() {
+       ?>
+       <script id="tmpl-wp-updates-admin-notice" type="text/html">
+               <div <# if ( data.id ) { #>id="{{ data.id }}"<# } #> class="notice {{ data.className }}"><p>{{{ data.message }}}</p></div>
+       </script>
+       <script id="tmpl-wp-bulk-updates-admin-notice" type="text/html">
+               <div id="{{ data.id }}" class="{{ data.className }} notice <# if ( data.errors ) { #>notice-error<# } else { #>notice-success<# } #>">
+                       <p>
+                               <# if ( data.successes ) { #>
+                                       <# if ( 1 === data.successes ) { #>
+                                               <# if ( 'plugin' === data.type ) { #>
+                                                       <?php
+                                                       /* translators: %s: Number of plugins */
+                                                       printf( __( '%s plugin successfully updated.' ), '{{ data.successes }}' );
+                                                       ?>
+                                               <# } else { #>
+                                                       <?php
+                                                       /* translators: %s: Number of themes */
+                                                       printf( __( '%s theme successfully updated.' ), '{{ data.successes }}' );
+                                                       ?>
+                                               <# } #>
+                                       <# } else { #>
+                                               <# if ( 'plugin' === data.type ) { #>
+                                                       <?php
+                                                       /* translators: %s: Number of plugins */
+                                                       printf( __( '%s plugins successfully updated.' ), '{{ data.successes }}' );
+                                                       ?>
+                                               <# } else { #>
+                                                       <?php
+                                                       /* translators: %s: Number of themes */
+                                                       printf( __( '%s themes successfully updated.' ), '{{ data.successes }}' );
+                                                       ?>
+                                               <# } #>
+                                       <# } #>
+                               <# } #>
+                               <# if ( data.errors ) { #>
+                                       <button class="button-link bulk-action-errors-collapsed" aria-expanded="false">
+                                               <# if ( 1 === data.errors ) { #>
+                                                       <?php
+                                                       /* translators: %s: Number of failed updates */
+                                                       printf( __( '%s update failed.' ), '{{ data.errors }}' );
+                                                       ?>
+                                               <# } else { #>
+                                                       <?php
+                                                       /* translators: %s: Number of failed updates */
+                                                       printf( __( '%s updates failed.' ), '{{ data.errors }}' );
+                                                       ?>
+                                               <# } #>
+                                               <span class="screen-reader-text"><?php _e( 'Show more details' ); ?></span>
+                                               <span class="toggle-indicator" aria-hidden="true"></span>
+                                       </button>
+                               <# } #>
+                       </p>
+                       <# if ( data.errors ) { #>
+                               <ul class="bulk-action-errors hidden">
+                                       <# _.each( data.errorMessages, function( errorMessage ) { #>
+                                               <li>{{ errorMessage }}</li>
+                                       <# } ); #>
+                               </ul>
+                       <# } #>
+               </div>
+       </script>
+       <?php
+}
+
+/**
+ * Prints the JavaScript templates for update and deletion rows in list tables.
+ *
+ * The update template takes one argument with four values:
+ *
+ *     param {object} data {
+ *         Arguments for the update row
+ *
+ *         @type string slug    Plugin slug.
+ *         @type string plugin  Plugin base name.
+ *         @type string colspan The number of table columns this row spans.
+ *         @type string content The row content.
+ *     }
+ *
+ * The delete template takes one argument with four values:
+ *
+ *     param {object} data {
+ *         Arguments for the update row
+ *
+ *         @type string slug    Plugin slug.
+ *         @type string plugin  Plugin base name.
+ *         @type string name    Plugin name.
+ *         @type string colspan The number of table columns this row spans.
+ *     }
+ *
+ * @since 4.6.0
+ */
+function wp_print_update_row_templates() {
+       ?>
+       <script id="tmpl-item-update-row" type="text/template">
+               <tr class="plugin-update-tr update" id="{{ data.slug }}-update" data-slug="{{ data.slug }}" <# if ( data.plugin ) { #>data-plugin="{{ data.plugin }}"<# } #>>
+                       <td colspan="{{ data.colspan }}" class="plugin-update colspanchange">
+                               {{{ data.content }}}
+                       </td>
+               </tr>
+       </script>
+       <script id="tmpl-item-deleted-row" type="text/template">
+               <tr class="plugin-deleted-tr inactive deleted" id="{{ data.slug }}-deleted" data-slug="{{ data.slug }}" <# if ( data.plugin ) { #>data-plugin="{{ data.plugin }}"<# } #>>
+                       <td colspan="{{ data.colspan }}" class="plugin-update colspanchange">
+                               <# if ( data.plugin ) { #>
+                                       <?php
+                                       printf(
+                                               /* translators: %s: Plugin name */
+                                               _x( '%s was successfully deleted.', 'plugin' ),
+                                               '<strong>{{{ data.name }}}</strong>'
+                                       );
+                                       ?>
+                               <# } else { #>
+                                       <?php
+                                       printf(
+                                               /* translators: %s: Theme name */
+                                               _x( '%s was successfully deleted.', 'theme' ),
+                                               '<strong>{{{ data.name }}}</strong>'
+                                       );
+                                       ?>
+                               <# } #>
+                       </td>
+               </tr>
+       </script>
+       <?php
+}
index 3ddbc8b17d76012ccc62382e74025d71776d5da6..807673a7f0b9a0cc9053f29280c15211d72469c1 100644 (file)
@@ -38,7 +38,7 @@ if ( !function_exists('wp_install') ) :
  */
 function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated = '', $user_password = '', $language = '' ) {
        if ( !empty( $deprecated ) )
-               _deprecated_argument( __FUNCTION__, '2.6' );
+               _deprecated_argument( __FUNCTION__, '2.6.0' );
 
        wp_check_mysql_version();
        wp_cache_flush();
@@ -191,19 +191,22 @@ function wp_install_defaults( $user_id ) {
        $wpdb->insert( $wpdb->term_relationships, array('term_taxonomy_id' => $cat_tt_id, 'object_id' => 1) );
 
        // Default comment
-       $first_comment_author = __('Mr WordPress');
+       $first_comment_author = __( 'A WordPress Commenter' );
+       $first_comment_email = 'wapuu@wordpress.example';
        $first_comment_url = 'https://wordpress.org/';
-       $first_comment = __('Hi, this is a comment.
-To delete a comment, just log in and view the post&#039;s comments. There you will have the option to edit or delete them.');
+       $first_comment = __( 'Hi, this is a comment.
+To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
+Commenter avatars come from <a href="https://gravatar.com">Gravatar</a>.' );
        if ( is_multisite() ) {
                $first_comment_author = get_site_option( 'first_comment_author', $first_comment_author );
+               $first_comment_email = get_site_option( 'first_comment_email', $first_comment_email );
                $first_comment_url = get_site_option( 'first_comment_url', network_home_url() );
                $first_comment = get_site_option( 'first_comment', $first_comment );
        }
        $wpdb->insert( $wpdb->comments, array(
                'comment_post_ID' => 1,
                'comment_author' => $first_comment_author,
-               'comment_author_email' => '',
+               'comment_author_email' => $first_comment_email,
                'comment_author_url' => $first_comment_url,
                'comment_date' => $now,
                'comment_date_gmt' => $now_gmt,
@@ -317,11 +320,12 @@ function wp_install_maybe_enable_pretty_permalinks() {
                 */
                $wp_rewrite->flush_rules( true );
 
-               // Test against a real WordPress Post, or if none were created, a random 404 page.
-               $test_url = get_permalink( 1 );
+               $test_url = '';
 
-               if ( ! $test_url ) {
-                       $test_url = home_url( '/wordpress-check-for-rewrites/' );
+               // Test against a real WordPress Post
+               $first_post = get_page_by_path( sanitize_title( _x( 'hello-world', 'Default post slug' ) ), OBJECT, 'post' );
+               if ( $first_post ) {
+                       $test_url = get_permalink( $first_post->ID );
                }
 
                /*
@@ -552,6 +556,9 @@ function upgrade_all() {
        if ( $wp_current_db_version < 36686 )
                upgrade_450();
 
+       if ( $wp_current_db_version < 37965 )
+               upgrade_460();
+
        maybe_disable_link_manager();
 
        maybe_disable_automattic_widgets();
@@ -1687,6 +1694,38 @@ function upgrade_450() {
        delete_user_setting( 'wplink' );
 }
 
+/**
+ * Executes changes made in WordPress 4.6.0.
+ *
+ * @ignore
+ * @since 4.6.0
+ *
+ * @global int $wp_current_db_version Current database version.
+ */
+function upgrade_460() {
+       global $wp_current_db_version;
+
+       // Remove unused post meta.
+       if ( $wp_current_db_version < 37854 ) {
+               delete_post_meta_by_key( '_post_restored_from' );
+       }
+
+       // Remove plugins with callback as an array object/method as the uninstall hook, see #13786.
+       if ( $wp_current_db_version < 37965 ) {
+               $uninstall_plugins = get_option( 'uninstall_plugins', array() );
+
+               if ( ! empty( $uninstall_plugins ) ) {
+                       foreach ( $uninstall_plugins as $basename => $callback ) {
+                               if ( is_array( $callback ) && is_object( $callback[0] ) ) {
+                                       unset( $uninstall_plugins[ $basename ] );
+                               }
+                       }
+
+                       update_option( 'uninstall_plugins', $uninstall_plugins );
+               }
+       }
+}
+
 /**
  * Executes network-level upgrade routines.
  *
@@ -2104,7 +2143,7 @@ function dbDelta( $queries = '', $execute = true ) {
        }
 
        /**
-        * Filter the dbDelta SQL queries.
+        * Filters the dbDelta SQL queries.
         *
         * @since 3.3.0
         *
@@ -2133,7 +2172,7 @@ function dbDelta( $queries = '', $execute = true ) {
        }
 
        /**
-        * Filter the dbDelta SQL queries for creating tables and/or databases.
+        * Filters the dbDelta SQL queries for creating tables and/or databases.
         *
         * Queries filterable via this hook contain "CREATE TABLE" or "CREATE DATABASE".
         *
@@ -2144,7 +2183,7 @@ function dbDelta( $queries = '', $execute = true ) {
        $cqueries = apply_filters( 'dbdelta_create_queries', $cqueries );
 
        /**
-        * Filter the dbDelta SQL queries for inserting or updating.
+        * Filters the dbDelta SQL queries for inserting or updating.
         *
         * Queries filterable via this hook contain "INSERT INTO" or "UPDATE".
         *
@@ -2183,83 +2222,168 @@ function dbDelta( $queries = '', $execute = true ) {
                // Separate field lines into an array.
                $flds = explode("\n", $qryline);
 
-               // todo: Remove this?
-               //echo "<hr/><pre>\n".print_r(strtolower($table), true).":\n".print_r($cqueries, true)."</pre><hr/>";
-
                // For every field line specified in the query.
-               foreach ($flds as $fld) {
+               foreach ( $flds as $fld ) {
+                       $fld = trim( $fld, " \t\n\r\0\x0B," ); // Default trim characters, plus ','.
 
                        // Extract the field name.
-                       preg_match("|^([^ ]*)|", trim($fld), $fvals);
+                       preg_match( '|^([^ ]*)|', $fld, $fvals );
                        $fieldname = trim( $fvals[1], '`' );
+                       $fieldname_lowercased = strtolower( $fieldname );
 
                        // Verify the found field name.
                        $validfield = true;
-                       switch (strtolower($fieldname)) {
-                       case '':
-                       case 'primary':
-                       case 'index':
-                       case 'fulltext':
-                       case 'unique':
-                       case 'key':
-                               $validfield = false;
-                               $indices[] = trim(trim($fld), ", \n");
-                               break;
+                       switch ( $fieldname_lowercased ) {
+                               case '':
+                               case 'primary':
+                               case 'index':
+                               case 'fulltext':
+                               case 'unique':
+                               case 'key':
+                               case 'spatial':
+                                       $validfield = false;
+
+                                       /*
+                                        * Normalize the index definition.
+                                        *
+                                        * This is done so the definition can be compared against the result of a
+                                        * `SHOW INDEX FROM $table_name` query which returns the current table
+                                        * index information.
+                                        */
+
+                                       // Extract type, name and columns from the definition.
+                                       preg_match(
+                                                 '/^'
+                                               .   '(?P<index_type>'             // 1) Type of the index.
+                                               .       'PRIMARY\s+KEY|(?:UNIQUE|FULLTEXT|SPATIAL)\s+(?:KEY|INDEX)|KEY|INDEX'
+                                               .   ')'
+                                               .   '\s+'                         // Followed by at least one white space character.
+                                               .   '(?:'                         // Name of the index. Optional if type is PRIMARY KEY.
+                                               .       '`?'                      // Name can be escaped with a backtick.
+                                               .           '(?P<index_name>'     // 2) Name of the index.
+                                               .               '(?:[0-9a-zA-Z$_-]|[\xC2-\xDF][\x80-\xBF])+'
+                                               .           ')'
+                                               .       '`?'                      // Name can be escaped with a backtick.
+                                               .       '\s+'                     // Followed by at least one white space character.
+                                               .   ')*'
+                                               .   '\('                          // Opening bracket for the columns.
+                                               .       '(?P<index_columns>'
+                                               .           '.+?'                 // 3) Column names, index prefixes, and orders.
+                                               .       ')'
+                                               .   '\)'                          // Closing bracket for the columns.
+                                               . '$/im',
+                                               $fld,
+                                               $index_matches
+                                       );
+
+                                       // Uppercase the index type and normalize space characters.
+                                       $index_type = strtoupper( preg_replace( '/\s+/', ' ', trim( $index_matches['index_type'] ) ) );
+
+                                       // 'INDEX' is a synonym for 'KEY', standardize on 'KEY'.
+                                       $index_type = str_replace( 'INDEX', 'KEY', $index_type );
+
+                                       // Escape the index name with backticks. An index for a primary key has no name.
+                                       $index_name = ( 'PRIMARY KEY' === $index_type ) ? '' : '`' . $index_matches['index_name'] . '`';
+
+                                       // Parse the columns. Multiple columns are separated by a comma.
+                                       $index_columns = array_map( 'trim', explode( ',', $index_matches['index_columns'] ) );
+
+                                       // Normalize columns.
+                                       foreach ( $index_columns as &$index_column ) {
+                                               // Extract column name and number of indexed characters (sub_part).
+                                               preg_match(
+                                                         '/'
+                                                       .   '`?'                      // Name can be escaped with a backtick.
+                                                       .       '(?P<column_name>'    // 1) Name of the column.
+                                                       .           '(?:[0-9a-zA-Z$_-]|[\xC2-\xDF][\x80-\xBF])+'
+                                                       .       ')'
+                                                       .   '`?'                      // Name can be escaped with a backtick.
+                                                       .   '(?:'                     // Optional sub part.
+                                                       .       '\s*'                 // Optional white space character between name and opening bracket.
+                                                       .       '\('                  // Opening bracket for the sub part.
+                                                       .           '\s*'             // Optional white space character after opening bracket.
+                                                       .           '(?P<sub_part>'
+                                                       .               '\d+'         // 2) Number of indexed characters.
+                                                       .           ')'
+                                                       .           '\s*'             // Optional white space character before closing bracket.
+                                                       .        '\)'                 // Closing bracket for the sub part.
+                                                       .   ')?'
+                                                       . '/',
+                                                       $index_column,
+                                                       $index_column_matches
+                                               );
+
+                                               // Escape the column name with backticks.
+                                               $index_column = '`' . $index_column_matches['column_name'] . '`';
+
+                                               // Append the optional sup part with the number of indexed characters.
+                                               if ( isset( $index_column_matches['sub_part'] ) ) {
+                                                       $index_column .= '(' . $index_column_matches['sub_part'] . ')';
+                                               }
+                                       }
+
+                                       // Build the normalized index definition and add it to the list of indices.
+                                       $indices[] = "{$index_type} {$index_name} (" . implode( ',', $index_columns ) . ")";
+
+                                       // Destroy no longer needed variables.
+                                       unset( $index_column, $index_column_matches, $index_matches, $index_type, $index_name, $index_columns );
+
+                                       break;
                        }
-                       $fld = trim($fld);
 
                        // If it's a valid field, add it to the field array.
-                       if ($validfield) {
-                               $cfields[strtolower($fieldname)] = trim($fld, ", \n");
+                       if ( $validfield ) {
+                               $cfields[ $fieldname_lowercased ] = $fld;
                        }
                }
 
                // For every field in the table.
-               foreach ($tablefields as $tablefield) {
+               foreach ( $tablefields as $tablefield ) {
+                       $tablefield_field_lowercased = strtolower( $tablefield->Field );
+                       $tablefield_type_lowercased = strtolower( $tablefield->Type );
 
                        // If the table field exists in the field array ...
-                       if (array_key_exists(strtolower($tablefield->Field), $cfields)) {
+                       if ( array_key_exists( $tablefield_field_lowercased, $cfields ) ) {
 
                                // Get the field type from the query.
-                               preg_match("|".$tablefield->Field." ([^ ]*( unsigned)?)|i", $cfields[strtolower($tablefield->Field)], $matches);
+                               preg_match( '|`?' . $tablefield->Field . '`? ([^ ]*( unsigned)?)|i', $cfields[ $tablefield_field_lowercased ], $matches );
                                $fieldtype = $matches[1];
+                               $fieldtype_lowercased = strtolower( $fieldtype );
 
                                // Is actual field type different from the field type in query?
                                if ($tablefield->Type != $fieldtype) {
                                        $do_change = true;
-                                       if ( in_array( strtolower( $fieldtype ), $text_fields ) && in_array( strtolower( $tablefield->Type ), $text_fields ) ) {
-                                               if ( array_search( strtolower( $fieldtype ), $text_fields ) < array_search( strtolower( $tablefield->Type ), $text_fields ) ) {
+                                       if ( in_array( $fieldtype_lowercased, $text_fields ) && in_array( $tablefield_type_lowercased, $text_fields ) ) {
+                                               if ( array_search( $fieldtype_lowercased, $text_fields ) < array_search( $tablefield_type_lowercased, $text_fields ) ) {
                                                        $do_change = false;
                                                }
                                        }
 
-                                       if ( in_array( strtolower( $fieldtype ), $blob_fields ) && in_array( strtolower( $tablefield->Type ), $blob_fields ) ) {
-                                               if ( array_search( strtolower( $fieldtype ), $blob_fields ) < array_search( strtolower( $tablefield->Type ), $blob_fields ) ) {
+                                       if ( in_array( $fieldtype_lowercased, $blob_fields ) && in_array( $tablefield_type_lowercased, $blob_fields ) ) {
+                                               if ( array_search( $fieldtype_lowercased, $blob_fields ) < array_search( $tablefield_type_lowercased, $blob_fields ) ) {
                                                        $do_change = false;
                                                }
                                        }
 
                                        if ( $do_change ) {
-                                       // Add a query to change the column type
-                                               $cqueries[] = "ALTER TABLE {$table} CHANGE COLUMN {$tablefield->Field} " . $cfields[strtolower($tablefield->Field)];
+                                               // Add a query to change the column type.
+                                               $cqueries[] = "ALTER TABLE {$table} CHANGE COLUMN `{$tablefield->Field}` " . $cfields[ $tablefield_field_lowercased ];
                                                $for_update[$table.'.'.$tablefield->Field] = "Changed type of {$table}.{$tablefield->Field} from {$tablefield->Type} to {$fieldtype}";
                                        }
                                }
 
-                               // Get the default value from the array
-                                       // todo: Remove this?
-                                       //echo "{$cfields[strtolower($tablefield->Field)]}<br>";
-                               if (preg_match("| DEFAULT '(.*?)'|i", $cfields[strtolower($tablefield->Field)], $matches)) {
+                               // Get the default value from the array.
+                               if ( preg_match( "| DEFAULT '(.*?)'|i", $cfields[ $tablefield_field_lowercased ], $matches ) ) {
                                        $default_value = $matches[1];
                                        if ($tablefield->Default != $default_value) {
                                                // Add a query to change the column's default value
-                                               $cqueries[] = "ALTER TABLE {$table} ALTER COLUMN {$tablefield->Field} SET DEFAULT '{$default_value}'";
+                                               $cqueries[] = "ALTER TABLE {$table} ALTER COLUMN `{$tablefield->Field}` SET DEFAULT '{$default_value}'";
                                                $for_update[$table.'.'.$tablefield->Field] = "Changed default value of {$table}.{$tablefield->Field} from {$tablefield->Default} to {$default_value}";
                                        }
                                }
 
                                // Remove the field from the array (so it's not added).
-                               unset($cfields[strtolower($tablefield->Field)]);
+                               unset( $cfields[ $tablefield_field_lowercased ] );
                        } else {
                                // This field exists in the table, but not in the creation queries?
                        }
@@ -2302,18 +2426,23 @@ function dbDelta( $queries = '', $execute = true ) {
                                if ( 'FULLTEXT' === strtoupper( $index_data['index_type'] ) ) {
                                        $index_string .= 'FULLTEXT ';
                                }
+                               if ( 'SPATIAL' === strtoupper( $index_data['index_type'] ) ) {
+                                       $index_string .= 'SPATIAL ';
+                               }
                                $index_string .= 'KEY ';
-                               if ($index_name != 'PRIMARY') {
-                                       $index_string .= $index_name;
+                               if ( 'PRIMARY' !== $index_name  ) {
+                                       $index_string .= '`' . $index_name . '`';
                                }
                                $index_columns = '';
 
                                // For each column in the index.
                                foreach ($index_data['columns'] as $column_data) {
-                                       if ($index_columns != '') $index_columns .= ',';
+                                       if ( $index_columns != '' ) {
+                                               $index_columns .= ',';
+                                       }
 
                                        // Add the field to the column list string.
-                                       $index_columns .= $column_data['fieldname'];
+                                       $index_columns .= '`' . $column_data['fieldname'] . '`';
                                        if ($column_data['subpart'] != '') {
                                                $index_columns .= '('.$column_data['subpart'].')';
                                        }
@@ -2332,12 +2461,8 @@ function dbDelta( $queries = '', $execute = true ) {
                                        if ( ! ( ( $aindex = array_search( $index_string, $indices ) ) === false ) ) {
                                                unset( $indices[ $aindex ] );
                                                break;
-                                               // todo: Remove this?
-                                               //echo "<pre style=\"border:1px solid #ccc;margin-top:5px;\">{$table}:<br />Found index:".$index_string."</pre>\n";
                                        }
                                }
-                               // todo: Remove this?
-                               //else echo "<pre style=\"border:1px solid #ccc;margin-top:5px;\">{$table}:<br /><b>Did not find index:</b>".$index_string."<br />".print_r($indices, true)."</pre>\n";
                        }
                }
 
@@ -2355,8 +2480,6 @@ function dbDelta( $queries = '', $execute = true ) {
        $allqueries = array_merge($cqueries, $iqueries);
        if ($execute) {
                foreach ($allqueries as $query) {
-                       // todo: Remove this?
-                       //echo "<pre style=\"border:1px solid #ccc;margin-top:5px;\">".print_r($query, true)."</pre>\n";
                        $wpdb->query($query);
                }
        }
@@ -2800,7 +2923,7 @@ function wp_should_upgrade_global_tables() {
        }
 
        /**
-        * Filter if upgrade routines should be run on global tables.
+        * Filters if upgrade routines should be run on global tables.
         *
         * @param bool $should_upgrade Whether to run the upgrade routines on global tables.
         */
index d92d2aebc6ea84d9cf15348a86b97f68e3198120..f6c52dd9549174043060dda89ac536c6fd616903 100644 (file)
@@ -190,7 +190,7 @@ function edit_user( $user_id = 0 ) {
                  * @since 4.4.0
                  *
                  * @param int    $user_id ID of the newly created user.
-                 * @param string $notify  Type of notification that should happen. See {@see wp_send_new_user_notifications()}
+                 * @param string $notify  Type of notification that should happen. See wp_send_new_user_notifications()
                  *                        for more information on possible values.
                  */
                do_action( 'edit_user_created_user', $user_id, $notify );
@@ -218,7 +218,7 @@ function get_editable_roles() {
        $all_roles = wp_roles()->roles;
 
        /**
-        * Filter the list of editable roles.
+        * Filters the list of editable roles.
         *
         * @since 2.8.0
         *
@@ -261,7 +261,7 @@ function get_users_drafts( $user_id ) {
        $query = $wpdb->prepare("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'draft' AND post_author = %d ORDER BY post_modified DESC", $user_id);
 
        /**
-        * Filter the user's drafts query string.
+        * Filters the user's drafts query string.
         *
         * @since 2.0.0
         *
@@ -275,7 +275,7 @@ function get_users_drafts( $user_id ) {
  * Remove user and optionally reassign posts and links to another user.
  *
  * If the $reassign parameter is not assigned to a User ID, then all posts will
- * be deleted of that user. The action 'delete_user' that is passed the User ID
+ * be deleted of that user. The action {@see 'delete_user'} that is passed the User ID
  * being deleted will be run after the posts are either reassigned or deleted.
  * The user meta will also be deleted that are for that User ID.
  *
@@ -329,7 +329,7 @@ function wp_delete_user( $id, $reassign = null ) {
                }
 
                /**
-                * Filter the list of post types to delete with a user.
+                * Filters the list of post types to delete with a user.
                 *
                 * @since 3.4.0
                 *
@@ -490,6 +490,8 @@ jQuery(document).ready( function($) {
 /**
  * Optional SSL preference that can be turned on by hooking to the 'personal_options' action.
  *
+ * See the {@see 'personal_options'} action.
+ *
  * @since 2.7.0
  *
  * @param object $user User data object
index 6a33d5417a3bd9d982a258f4f8940ef5fd854a4d..86bed0adfc2efc016c6bda14f267be33e6e14c85 100644 (file)
@@ -17,8 +17,10 @@ wp_dashboard_setup();
 wp_enqueue_script( 'dashboard' );
 if ( current_user_can( 'edit_theme_options' ) )
        wp_enqueue_script( 'customize-loader' );
-if ( current_user_can( 'install_plugins' ) )
+if ( current_user_can( 'install_plugins' ) ) {
        wp_enqueue_script( 'plugin-install' );
+       wp_enqueue_script( 'updates' );
+}
 if ( current_user_can( 'upload_files' ) )
        wp_enqueue_script( 'media-upload' );
 add_thickbox();
@@ -29,7 +31,7 @@ if ( wp_is_mobile() )
 $title = __('Dashboard');
 $parent_file = 'index.php';
 
-$help = '<p>' . __( 'Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab in the upper corner.' ) . '</p>';
+$help = '<p>' . __( 'Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab above the screen title.' ) . '</p>';
 
 // Not using chaining here, so as to be parseable by PHP4.
 $screen = get_current_screen();
@@ -69,9 +71,17 @@ if ( current_user_can( 'edit_posts' ) )
 if ( is_blog_admin() && current_user_can( 'edit_posts' ) )
        $help .= '<p>' . __( "<strong>Quick Draft</strong> &mdash; Allows you to create a new post and save it as a draft. Also displays links to the 5 most recent draft posts you've started." ) . '</p>';
 if ( ! is_multisite() && current_user_can( 'install_plugins' ) )
-       $help .= '<p>' . __( '<strong>WordPress News</strong> &mdash; Latest news from the official WordPress project, the <a href="https://planet.wordpress.org/">WordPress Planet</a>, and popular and recent plugins.' ) . '</p>';
+       $help .= '<p>' . sprintf(
+               /* translators: %s: WordPress Planet URL */
+               __( '<strong>WordPress News</strong> &mdash; Latest news from the official WordPress project, the <a href="%s">WordPress Planet</a>, and popular plugins.' ),
+               __( 'https://planet.wordpress.org/' )
+       ) . '</p>';
 else
-       $help .= '<p>' . __( '<strong>WordPress News</strong> &mdash; Latest news from the official WordPress project, the <a href="https://planet.wordpress.org/">WordPress Planet</a>.' ) . '</p>';
+       $help .= '<p>' . sprintf(
+               /* translators: %s: WordPress Planet URL */
+               __( '<strong>WordPress News</strong> &mdash; Latest news from the official WordPress project and the <a href="%s">WordPress Planet</a>.' ),
+               __( 'https://planet.wordpress.org/' )
+       ) . '</p>';
 if ( current_user_can( 'edit_theme_options' ) )
        $help .= '<p>' . __( '<strong>Welcome</strong> &mdash; Shows links for some of the most common tasks when setting up a new site.' ) . '</p>';
 
@@ -111,7 +121,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
                /**
                 * Add content to the welcome panel on the admin dashboard.
                 *
-                * To remove the default welcome panel, use {@see remove_action()}:
+                * To remove the default welcome panel, use remove_action():
                 *
                 *     remove_action( 'welcome_panel', 'wp_welcome_panel' );
                 *
index cb2ae15322b1dde2876ecbee82009c16b852a6dc..6f22cd615f014d4eb1ac9d67a632a55d11e1f10a 100644 (file)
@@ -1 +1 @@
-!function(a){function b(a){var b=a.closest(".accordion-section"),c=b.find("[aria-expanded]").first(),d=b.closest(".accordion-container"),e=d.find(".open"),f=e.find("[aria-expanded]").first(),g=b.find(".accordion-section-content");b.hasClass("cannot-expand")||(d.addClass("opening"),b.hasClass("open")?(b.toggleClass("open"),g.toggle(!0).slideToggle(150)):(f.attr("aria-expanded","false"),e.removeClass("open"),e.find(".accordion-section-content").show().slideUp(150),g.toggle(!1).slideToggle(150),b.toggleClass("open")),setTimeout(function(){d.removeClass("opening")},150),c&&c.attr("aria-expanded",String("false"===c.attr("aria-expanded"))))}a(document).ready(function(){a(".accordion-container").on("click keydown",".accordion-section-title",function(c){("keydown"!==c.type||13===c.which)&&(c.preventDefault(),b(a(this)))})})}(jQuery);
\ No newline at end of file
+!function(a){function b(a){var b=a.closest(".accordion-section"),c=b.find("[aria-expanded]").first(),d=b.closest(".accordion-container"),e=d.find(".open"),f=e.find("[aria-expanded]").first(),g=b.find(".accordion-section-content");b.hasClass("cannot-expand")||(d.addClass("opening"),b.hasClass("open")?(b.toggleClass("open"),g.toggle(!0).slideToggle(150)):(f.attr("aria-expanded","false"),e.removeClass("open"),e.find(".accordion-section-content").show().slideUp(150),g.toggle(!1).slideToggle(150),b.toggleClass("open")),setTimeout(function(){d.removeClass("opening")},150),c&&c.attr("aria-expanded",String("false"===c.attr("aria-expanded"))))}a(document).ready(function(){a(".accordion-container").on("click keydown",".accordion-section-title",function(c){"keydown"===c.type&&13!==c.which||(c.preventDefault(),b(a(this)))})})}(jQuery);
\ No newline at end of file
index 7f0a3d21f04fdf5d9ce7ee67617831ef8ba75ab9..089a8495166877b375e3999c0bc1c0fb974b85da 100644 (file)
@@ -1 +1 @@
-(function(a,b,c,d){function e(a,c){if("undefined"!=typeof c){var d=b.createElement("input");d.name=a,d.value=c,d.type="hidden",p.appendChild(d)}}var f,g,h,i,j,k,l,m,n,o=a.encodeURIComponent,p=b.createElement("form"),q=b.getElementsByTagName("head")[0],r="_press_this_app",s=!0;if(d){if(!c.match(/^https?:/))return void(top.location.href=d);if(d+="&u="+o(c),c.match(/^https:/)&&d.match(/^http:/)&&(s=!1),a.getSelection?h=a.getSelection()+"":b.getSelection?h=b.getSelection()+"":b.selection&&(h=b.selection.createRange().text||""),d+="&buster="+(new Date).getTime(),s||(b.title&&(d+="&t="+o(b.title.substr(0,256))),h&&(d+="&s="+o(h.substr(0,512)))),f=a.outerWidth||b.documentElement.clientWidth||600,g=a.outerHeight||b.documentElement.clientHeight||700,f=800>f||f>5e3?600:.7*f,g=800>g||g>3e3?700:.9*g,!s)return void a.open(d,r,"location,resizable,scrollbars,width="+f+",height="+g);i=q.getElementsByTagName("meta")||[];for(var t=0;t<i.length&&!(t>200);t++){var u=i[t],v=u.getAttribute("name"),w=u.getAttribute("property"),x=u.getAttribute("content");x&&(v?e("_meta["+v+"]",x):w&&e("_meta["+w+"]",x))}j=q.getElementsByTagName("link")||[];for(var y=0;y<j.length&&!(y>=50);y++){var z=j[y],A=z.getAttribute("rel");("canonical"===A||"icon"===A||"shortlink"===A)&&e("_links["+A+"]",z.getAttribute("href"))}b.body.getElementsByClassName&&(k=b.body.getElementsByClassName("hfeed")[0]),k=b.getElementById("content")||k||b.body,l=k.getElementsByTagName("img")||[];for(var B=0;B<l.length&&!(B>=100);B++)n=l[B],n.src.indexOf("avatar")>-1||n.className.indexOf("avatar")>-1||n.width&&n.width<256||n.height&&n.height<128||e("_images[]",n.src);m=b.body.getElementsByTagName("iframe")||[];for(var C=0;C<m.length&&!(C>=50);C++)e("_embeds[]",m[C].src);b.title&&e("t",b.title),h&&e("s",h),p.setAttribute("method","POST"),p.setAttribute("action",d),p.setAttribute("target",r),p.setAttribute("style","display: none;"),a.open("about:blank",r,"location,resizable,scrollbars,width="+f+",height="+g),b.body.appendChild(p),p.submit()}})(window,document,top.location.href,window.pt_url);
\ No newline at end of file
+(function(a,b,c,d){function e(a,c){if("undefined"!=typeof c){var d=b.createElement("input");d.name=a,d.value=c,d.type="hidden",p.appendChild(d)}}var f,g,h,i,j,k,l,m,n,o=a.encodeURIComponent,p=b.createElement("form"),q=b.getElementsByTagName("head")[0],r="_press_this_app",s=!0;if(d){if(!c.match(/^https?:/))return void(top.location.href=d);if(d+="&u="+o(c),c.match(/^https:/)&&d.match(/^http:/)&&(s=!1),a.getSelection?h=a.getSelection()+"":b.getSelection?h=b.getSelection()+"":b.selection&&(h=b.selection.createRange().text||""),d+="&buster="+(new Date).getTime(),s||(b.title&&(d+="&t="+o(b.title.substr(0,256))),h&&(d+="&s="+o(h.substr(0,512)))),f=a.outerWidth||b.documentElement.clientWidth||600,g=a.outerHeight||b.documentElement.clientHeight||700,f=800>f||f>5e3?600:.7*f,g=800>g||g>3e3?700:.9*g,!s)return void a.open(d,r,"location,resizable,scrollbars,width="+f+",height="+g);i=q.getElementsByTagName("meta")||[];for(var t=0;t<i.length&&!(t>200);t++){var u=i[t],v=u.getAttribute("name"),w=u.getAttribute("property"),x=u.getAttribute("content");x&&(v?e("_meta["+v+"]",x):w&&e("_meta["+w+"]",x))}j=q.getElementsByTagName("link")||[];for(var y=0;y<j.length&&!(y>=50);y++){var z=j[y],A=z.getAttribute("rel");"canonical"!==A&&"icon"!==A&&"shortlink"!==A||e("_links["+A+"]",z.getAttribute("href"))}b.body.getElementsByClassName&&(k=b.body.getElementsByClassName("hfeed")[0]),k=b.getElementById("content")||k||b.body,l=k.getElementsByTagName("img")||[];for(var B=0;B<l.length&&!(B>=100);B++)n=l[B],n.src.indexOf("avatar")>-1||n.className.indexOf("avatar")>-1||n.width&&n.width<256||n.height&&n.height<128||e("_images[]",n.src);m=b.body.getElementsByTagName("iframe")||[];for(var C=0;C<m.length&&!(C>=50);C++)e("_embeds[]",m[C].src);b.title&&e("t",b.title),h&&e("s",h),p.setAttribute("method","POST"),p.setAttribute("action",d),p.setAttribute("target",r),p.setAttribute("style","display: none;"),a.open("about:blank",r,"location,resizable,scrollbars,width="+f+",height="+g),b.body.appendChild(p),p.submit()}})(window,document,top.location.href,window.pt_url);
\ No newline at end of file
index 9ad833c83af8cae1fba32e3502bc9b83829538e1..7c6e1d1cd6fa553c888c5767a70268a5b7d03f11 100644 (file)
@@ -1 +1 @@
-!function(a,b){var c,d='<a tabindex="0" class="wp-color-result" />',e='<div class="wp-picker-holder" />',f='<div class="wp-picker-container" />',g='<input type="button" class="button button-small hidden" />';c={options:{defaultColor:!1,change:!1,clear:!1,hide:!0,palettes:!0,width:255,mode:"hsv"},_create:function(){if(a.support.iris){var b=this,c=b.element;a.extend(b.options,c.data()),b.close=a.proxy(b.close,b),b.initialValue=c.val(),c.addClass("wp-color-picker").hide().wrap(f),b.wrap=c.parent(),b.toggler=a(d).insertBefore(c).css({backgroundColor:b.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),b.pickerContainer=a(e).insertAfter(c),b.button=a(g),b.options.defaultColor?b.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString):b.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),c.wrap('<span class="wp-picker-input-wrap" />').after(b.button),c.iris({target:b.pickerContainer,hide:b.options.hide,width:b.options.width,mode:b.options.mode,palettes:b.options.palettes,change:function(c,d){b.toggler.css({backgroundColor:d.color.toString()}),a.isFunction(b.options.change)&&b.options.change.call(this,c,d)}}),c.val(b.initialValue),b._addListeners(),b.options.hide||b.toggler.click()}},_addListeners:function(){var b=this;b.wrap.on("click.wpcolorpicker",function(a){a.stopPropagation()}),b.toggler.click(function(){b.toggler.hasClass("wp-picker-open")?b.close():b.open()}),b.element.change(function(c){var d=a(this),e=d.val();(""===e||"#"===e)&&(b.toggler.css("backgroundColor",""),a.isFunction(b.options.clear)&&b.options.clear.call(this,c))}),b.toggler.on("keyup",function(a){(13===a.keyCode||32===a.keyCode)&&(a.preventDefault(),b.toggler.trigger("click").next().focus())}),b.button.click(function(c){var d=a(this);d.hasClass("wp-picker-clear")?(b.element.val(""),b.toggler.css("backgroundColor",""),a.isFunction(b.options.clear)&&b.options.clear.call(this,c)):d.hasClass("wp-picker-default")&&b.element.val(b.options.defaultColor).change()})},open:function(){this.element.show().iris("toggle").focus(),this.button.removeClass("hidden"),this.wrap.addClass("wp-picker-active"),this.toggler.addClass("wp-picker-open"),a("body").trigger("click.wpcolorpicker").on("click.wpcolorpicker",this.close)},close:function(){this.element.hide().iris("toggle"),this.button.addClass("hidden"),this.wrap.removeClass("wp-picker-active"),this.toggler.removeClass("wp-picker-open"),a("body").off("click.wpcolorpicker",this.close)},color:function(a){return a===b?this.element.iris("option","color"):void this.element.iris("option","color",a)},defaultColor:function(a){return a===b?this.options.defaultColor:void(this.options.defaultColor=a)}},a.widget("wp.wpColorPicker",c)}(jQuery);
\ No newline at end of file
+!function(a,b){var c,d='<a tabindex="0" class="wp-color-result" />',e='<div class="wp-picker-holder" />',f='<div class="wp-picker-container" />',g='<input type="button" class="button button-small hidden" />';c={options:{defaultColor:!1,change:!1,clear:!1,hide:!0,palettes:!0,width:255,mode:"hsv"},_create:function(){if(a.support.iris){var b=this,c=b.element;a.extend(b.options,c.data()),b.close=a.proxy(b.close,b),b.initialValue=c.val(),c.addClass("wp-color-picker").hide().wrap(f),b.wrap=c.parent(),b.toggler=a(d).insertBefore(c).css({backgroundColor:b.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),b.pickerContainer=a(e).insertAfter(c),b.button=a(g),b.options.defaultColor?b.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString):b.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),c.wrap('<span class="wp-picker-input-wrap" />').after(b.button),c.iris({target:b.pickerContainer,hide:b.options.hide,width:b.options.width,mode:b.options.mode,palettes:b.options.palettes,change:function(c,d){b.toggler.css({backgroundColor:d.color.toString()}),a.isFunction(b.options.change)&&b.options.change.call(this,c,d)}}),c.val(b.initialValue),b._addListeners(),b.options.hide||b.toggler.click()}},_addListeners:function(){var b=this;b.wrap.on("click.wpcolorpicker",function(a){a.stopPropagation()}),b.toggler.click(function(){b.toggler.hasClass("wp-picker-open")?b.close():b.open()}),b.element.change(function(c){var d=a(this),e=d.val();""!==e&&"#"!==e||(b.toggler.css("backgroundColor",""),a.isFunction(b.options.clear)&&b.options.clear.call(this,c))}),b.toggler.on("keyup",function(a){13!==a.keyCode&&32!==a.keyCode||(a.preventDefault(),b.toggler.trigger("click").next().focus())}),b.button.click(function(c){var d=a(this);d.hasClass("wp-picker-clear")?(b.element.val(""),b.toggler.css("backgroundColor",""),a.isFunction(b.options.clear)&&b.options.clear.call(this,c)):d.hasClass("wp-picker-default")&&b.element.val(b.options.defaultColor).change()})},open:function(){this.element.show().iris("toggle").focus(),this.button.removeClass("hidden"),this.wrap.addClass("wp-picker-active"),this.toggler.addClass("wp-picker-open"),a("body").trigger("click.wpcolorpicker").on("click.wpcolorpicker",this.close)},close:function(){this.element.hide().iris("toggle"),this.button.addClass("hidden"),this.wrap.removeClass("wp-picker-active"),this.toggler.removeClass("wp-picker-open"),a("body").off("click.wpcolorpicker",this.close)},color:function(a){return a===b?this.element.iris("option","color"):void this.element.iris("option","color",a)},defaultColor:function(a){return a===b?this.options.defaultColor:void(this.options.defaultColor=a)}},a.widget("wp.wpColorPicker",c)}(jQuery);
\ No newline at end of file
index 9cd1fff910a5d8245cbad01b81574461afb61dc3..200d3e47809d1c7f4a84eb719940fe2f1787139d 100644 (file)
@@ -394,7 +394,7 @@ $document.ready( function() {
        }
 
        /*
-        * The `.below-h2` class is here just for backwards compatibility with plugins
+        * The `.below-h2` class is here just for backward compatibility with plugins
         * that are (incorrectly) using it. Do not use. Use `.inline` instead. See #34570.
         */
        $( 'div.updated, div.error, div.notice' ).not( '.inline, .below-h2' ).insertAfter( $( '.wrap h1, .wrap h2' ).first() );
@@ -421,9 +421,7 @@ $document.ready( function() {
                });
        }
 
-       $document.on( 'wp-plugin-update-error', function() {
-               makeNoticesDismissible();
-       });
+       $document.on( 'wp-updates-notice-added wp-plugin-install-error wp-plugin-update-error wp-plugin-delete-error wp-theme-install-error wp-theme-delete-error', makeNoticesDismissible );
 
        // Init screen meta
        screenMeta.init();
index 3c8faad517a6deb5d1761a47f4c1c1592620d79e..c2070ae4d65c09b67c0afb9bc0dee3527429912b 100644 (file)
@@ -1 +1 @@
-var showNotice,adminMenu,columns,validateForm,screenMeta;!function(a,b,c){var d=a(document),e=a(b),f=a(document.body);adminMenu={init:function(){},fold:function(){},restoreMenuState:function(){},toggle:function(){},favorites:function(){}},columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var c=a(this),d=c.val();c.prop("checked")?b.checked(d):b.unchecked(d),columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).removeClass("hidden"),this.colSpanChange(1)},unchecked:function(b){a(".column-"+b).addClass("hidden"),this.colSpanChange(-1)},hidden:function(){return a(".manage-column[id]").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var a=this.id;return a.substring(a,a.length-5)}).get().join(",")}},colSpanChange:function(b){var c,d=a("table").find(".colspanchange");d.length&&(c=parseInt(d.attr("colspan"),10)+b,d.attr("colspan",c.toString()))}},d.ready(function(){columns.init()}),validateForm=function(b){return!a(b).find(".form-required").filter(function(){return""===a("input:visible",this).val()}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).length},showNotice={warn:function(){var a=commonL10n.warnDelete||"";return confirm(a)?!0:!1},note:function(a){alert(a)}},screenMeta={element:null,toggles:null,page:null,init:function(){this.element=a("#screen-meta"),this.toggles=a("#screen-meta-links").find(".show-settings"),this.page=a("#wpcontent"),this.toggles.click(this.toggleEvent)},toggleEvent:function(){var b=a("#"+a(this).attr("aria-controls"));b.length&&(b.is(":visible")?screenMeta.close(b,a(this)):screenMeta.open(b,a(this)))},open:function(b,c){a("#screen-meta-links").find(".screen-meta-toggle").not(c.parent()).css("visibility","hidden"),b.parent().show(),b.slideDown("fast",function(){b.focus(),c.addClass("screen-meta-active").attr("aria-expanded",!0)}),d.trigger("screen:options:open")},close:function(b,c){b.slideUp("fast",function(){c.removeClass("screen-meta-active").attr("aria-expanded",!1),a(".screen-meta-toggle").css("visibility",""),b.parent().hide()}),d.trigger("screen:options:close")}},a(".contextual-help-tabs").delegate("a","click",function(b){var c,d=a(this);return b.preventDefault(),d.is(".active a")?!1:(a(".contextual-help-tabs .active").removeClass("active"),d.parent("li").addClass("active"),c=a(d.attr("href")),a(".help-tab-content").not(c).removeClass("active").hide(),void c.addClass("active").show())}),d.ready(function(){function c(){var c,d=a("a.wp-has-current-submenu");c=b.innerWidth?Math.max(b.innerWidth,document.documentElement.clientWidth):961,f.hasClass("folded")||f.hasClass("auto-fold")&&c&&960>=c&&c>782?d.attr("aria-haspopup","true"):d.attr("aria-haspopup","false")}function g(a){var b,c,d,f,g,h,i,j=a.find(".wp-submenu");g=a.offset().top,h=e.scrollTop(),i=g-h-30,b=g+j.height()+1,c=C.height(),d=60+b-c,f=e.height()+h-50,b-d>f&&(d=b-f),d>i&&(d=i),d>1?j.css("margin-top","-"+d+"px"):j.css("margin-top","")}function h(){a(".notice.is-dismissible").each(function(){var b=a(this),c=a('<button type="button" class="notice-dismiss"><span class="screen-reader-text"></span></button>'),d=commonL10n.dismiss||"";c.find(".screen-reader-text").text(d),c.on("click.wp-dismiss-notice",function(a){a.preventDefault(),b.fadeTo(100,0,function(){b.slideUp(100,function(){b.remove()})})}),b.append(c)})}function i(a){var b=e.scrollTop(),c=!a||"scroll"!==a.type;if(!(y||A||D.data("wp-responsive"))){if(P.menu+P.adminbar<P.window||P.menu+P.adminbar+20>P.wpwrap)return void k();if(O=!0,P.menu+P.adminbar>P.window){if(0>b)return void(L||(L=!0,M=!1,B.css({position:"fixed",top:"",bottom:""})));if(b+P.window>d.height()-1)return void(M||(M=!0,L=!1,B.css({position:"fixed",top:"",bottom:0})));b>K?L?(L=!1,N=B.offset().top-P.adminbar-(b-K),N+P.menu+P.adminbar<b+P.window&&(N=b+P.window-P.menu-P.adminbar),B.css({position:"absolute",top:N,bottom:""})):!M&&B.offset().top+P.menu<b+P.window&&(M=!0,B.css({position:"fixed",top:"",bottom:0})):K>b?M?(M=!1,N=B.offset().top-P.adminbar+(K-b),N+P.menu>b+P.window&&(N=b),B.css({position:"absolute",top:N,bottom:""})):!L&&B.offset().top>=b+P.adminbar&&(L=!0,B.css({position:"fixed",top:"",bottom:""})):c&&(L=M=!1,N=b+P.window-P.menu-P.adminbar-1,N>0?B.css({position:"absolute",top:N,bottom:""}):k())}K=b}}function j(){P={window:e.height(),wpwrap:C.height(),adminbar:J.height(),menu:B.height()}}function k(){!y&&O&&(L=M=O=!1,B.css({position:"",top:"",bottom:""}))}function l(){j(),D.data("wp-responsive")?(f.removeClass("sticky-menu"),k()):P.menu+P.adminbar>P.window?(i(),f.removeClass("sticky-menu")):(f.addClass("sticky-menu"),k())}function m(){a(".aria-button-if-js").attr("role","button")}var n,o,p,q,r,s,t,u,v=!1,w=a("input.current-page"),x=w.val(),y=/iPhone|iPad|iPod/.test(navigator.userAgent),z=-1!==navigator.userAgent.indexOf("Android"),A=a(document.documentElement).hasClass("ie8"),B=a("#adminmenuwrap"),C=a("#wpwrap"),D=a("#adminmenu"),E=a("#wp-responsive-overlay"),F=a("#wp-toolbar"),G=F.find('a[aria-haspopup="true"]'),H=a(".meta-box-sortables"),I=!1,J=a("#wpadminbar"),K=0,L=!1,M=!1,N=0,O=!1,P={window:e.height(),wpwrap:C.height(),adminbar:J.height(),menu:B.height()};D.on("click.wp-submenu-head",".wp-submenu-head",function(b){a(b.target).parent().siblings("a").get(0).click()}),a("#collapse-menu").on("click.collapse-menu",function(){var e,g;a("#adminmenu div.wp-submenu").css("margin-top",""),e=b.innerWidth?Math.max(b.innerWidth,document.documentElement.clientWidth):961,e&&960>e?f.hasClass("auto-fold")?(f.removeClass("auto-fold").removeClass("folded"),setUserSetting("unfold",1),setUserSetting("mfold","o"),g="open"):(f.addClass("auto-fold"),setUserSetting("unfold",0),g="folded"):f.hasClass("folded")?(f.removeClass("folded"),setUserSetting("mfold","o"),g="open"):(f.addClass("folded"),setUserSetting("mfold","f"),g="folded"),c(),d.trigger("wp-collapse-menu",{state:g})}),d.on("wp-window-resized wp-responsive-activate wp-responsive-deactivate",c),("ontouchstart"in b||/IEMobile\/[1-9]/.test(navigator.userAgent))&&(s=y?"touchstart":"click",f.on(s+".wp-mobile-hover",function(b){D.data("wp-responsive")||a(b.target).closest("#adminmenu").length||D.find("li.opensub").removeClass("opensub")}),D.find("a.wp-has-submenu").on(s+".wp-mobile-hover",function(b){var c=a(this).parent();D.data("wp-responsive")||c.hasClass("opensub")||c.hasClass("wp-menu-open")&&!(c.width()<40)||(b.preventDefault(),g(c),D.find("li.opensub").removeClass("opensub"),c.addClass("opensub"))})),y||z||(D.find("li.wp-has-submenu").hoverIntent({over:function(){var b=a(this),c=b.find(".wp-submenu"),d=parseInt(c.css("top"),10);isNaN(d)||d>-5||D.data("wp-responsive")||(g(b),D.find("li.opensub").removeClass("opensub"),b.addClass("opensub"))},out:function(){D.data("wp-responsive")||a(this).removeClass("opensub").find(".wp-submenu").css("margin-top","")},timeout:200,sensitivity:7,interval:90}),D.on("focus.adminmenu",".wp-submenu a",function(b){D.data("wp-responsive")||a(b.target).closest("li.menu-top").addClass("opensub")}).on("blur.adminmenu",".wp-submenu a",function(b){D.data("wp-responsive")||a(b.target).closest("li.menu-top").removeClass("opensub")}).find("li.wp-has-submenu.wp-not-current-submenu").on("focusin.adminmenu",function(){g(a(this))})),a("div.updated, div.error, div.notice").not(".inline, .below-h2").insertAfter(a(".wrap h1, .wrap h2").first()),d.on("wp-plugin-update-error",function(){h()}),screenMeta.init(),a("tbody").children().children(".check-column").find(":checkbox").click(function(b){if("undefined"==b.shiftKey)return!0;if(b.shiftKey){if(!v)return!0;n=a(v).closest("form").find(":checkbox").filter(":visible:enabled"),o=n.index(v),p=n.index(this),q=a(this).prop("checked"),o>0&&p>0&&o!=p&&(r=p>o?n.slice(o,p):n.slice(p,o),r.prop("checked",function(){return a(this).closest("tr").is(":visible")?q:!1}))}v=this;var c=a(this).closest("tbody").find(":checkbox").filter(":visible:enabled").not(":checked");return a(this).closest("table").children("thead, tfoot").find(":checkbox").prop("checked",function(){return 0===c.length}),!0}),a("thead, tfoot").find(".check-column :checkbox").on("click.wp-toggle-checkboxes",function(b){var c=a(this),d=c.closest("table"),e=c.prop("checked"),f=b.shiftKey||c.data("wp-toggle");d.children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return a(this).is(":hidden,:disabled")?!1:f?!a(this).prop("checked"):e?!0:!1}),d.children("thead,  tfoot").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return f?!1:e?!0:!1})}),a("#wpbody-content").on({focusin:function(){clearTimeout(t),u=a(this).find(".row-actions"),a(".row-actions").not(this).removeClass("visible"),u.addClass("visible")},focusout:function(){t=setTimeout(function(){u.removeClass("visible")},30)}},".has-row-actions"),a("tbody").on("click",".toggle-row",function(){a(this).closest("tr").toggleClass("is-expanded")}),a("#default-password-nag-no").click(function(){return setUserSetting("default_password_nag","hide"),a("div.default-password-nag").hide(),!1}),a("#newcontent").bind("keydown.wpevent_InsertTab",function(b){var c,d,e,f,g,h=b.target;if(27==b.keyCode)return b.preventDefault(),void a(h).data("tab-out",!0);if(!(9!=b.keyCode||b.ctrlKey||b.altKey||b.shiftKey)){if(a(h).data("tab-out"))return void a(h).data("tab-out",!1);c=h.selectionStart,d=h.selectionEnd,e=h.value,document.selection?(h.focus(),g=document.selection.createRange(),g.text=" "):c>=0&&(f=this.scrollTop,h.value=e.substring(0,c).concat("    ",e.substring(d)),h.selectionStart=h.selectionEnd=c+1,this.scrollTop=f),b.stopPropagation&&b.stopPropagation(),b.preventDefault&&b.preventDefault()}}),w.length&&w.closest("form").submit(function(){-1==a('select[name="action"]').val()&&-1==a('select[name="action2"]').val()&&w.val()==x&&w.val("1")}),a('.search-box input[type="search"], .search-box input[type="submit"]').mousedown(function(){a('select[name^="action"]').val("-1")}),a("#contextual-help-link, #show-settings-link").on("focus.scroll-into-view",function(a){a.target.scrollIntoView&&a.target.scrollIntoView(!1)}),function(){function b(){c.prop("disabled",""===d.map(function(){return a(this).val()}).get().join(""))}var c,d,e=a("form.wp-upload-form");e.length&&(c=e.find('input[type="submit"]'),d=e.find('input[type="file"]'),b(),d.on("change",b))}(),y||(e.on("scroll.pin-menu",i),d.on("tinymce-editor-init.pin-menu",function(a,b){b.on("wp-autoresize",j)})),b.wpResponsive={init:function(){var c=this;d.on("wp-responsive-activate.wp-responsive",function(){c.activate()}).on("wp-responsive-deactivate.wp-responsive",function(){c.deactivate()}),a("#wp-admin-bar-menu-toggle a").attr("aria-expanded","false"),a("#wp-admin-bar-menu-toggle").on("click.wp-responsive",function(b){b.preventDefault(),J.find(".hover").removeClass("hover"),C.toggleClass("wp-responsive-open"),C.hasClass("wp-responsive-open")?(a(this).find("a").attr("aria-expanded","true"),a("#adminmenu a:first").focus()):a(this).find("a").attr("aria-expanded","false")}),D.on("click.wp-responsive","li.wp-has-submenu > a",function(b){D.data("wp-responsive")&&(a(this).parent("li").toggleClass("selected"),b.preventDefault())}),c.trigger(),d.on("wp-window-resized.wp-responsive",a.proxy(this.trigger,this)),e.on("load.wp-responsive",function(){var a=navigator.userAgent.indexOf("AppleWebKit/")>-1?e.width():b.innerWidth;782>=a&&c.disableSortables()})},activate:function(){l(),f.hasClass("auto-fold")||f.addClass("auto-fold"),D.data("wp-responsive",1),this.disableSortables()},deactivate:function(){l(),D.removeData("wp-responsive"),this.enableSortables()},trigger:function(){var a;b.innerWidth&&(a=Math.max(b.innerWidth,document.documentElement.clientWidth),782>=a?I||(d.trigger("wp-responsive-activate"),I=!0):I&&(d.trigger("wp-responsive-deactivate"),I=!1),480>=a?this.enableOverlay():this.disableOverlay())},enableOverlay:function(){0===E.length&&(E=a('<div id="wp-responsive-overlay"></div>').insertAfter("#wpcontent").hide().on("click.wp-responsive",function(){F.find(".menupop.hover").removeClass("hover"),a(this).hide()})),G.on("click.wp-responsive",function(){E.show()})},disableOverlay:function(){G.off("click.wp-responsive"),E.hide()},disableSortables:function(){if(H.length)try{H.sortable("disable")}catch(a){}},enableSortables:function(){if(H.length)try{H.sortable("enable")}catch(a){}}},a(document).ajaxComplete(function(){m()}),b.wpResponsive.init(),l(),c(),h(),m(),d.on("wp-pin-menu wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu wp-collapse-menu.pin-menu wp-scroll-start.pin-menu",l),a(".wp-initial-focus").focus()}),function(){function a(){d.trigger("wp-window-resized")}function c(){b.clearTimeout(f),f=b.setTimeout(a,200)}var f;e.on("resize.wp-fire-once",c)}(),function(){if("-ms-user-select"in document.documentElement.style&&navigator.userAgent.match(/IEMobile\/10\.0/)){var a=document.createElement("style");a.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.getElementsByTagName("head")[0].appendChild(a)}}()}(jQuery,window);
\ No newline at end of file
+var showNotice,adminMenu,columns,validateForm,screenMeta;!function(a,b,c){var d=a(document),e=a(b),f=a(document.body);adminMenu={init:function(){},fold:function(){},restoreMenuState:function(){},toggle:function(){},favorites:function(){}},columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var c=a(this),d=c.val();c.prop("checked")?b.checked(d):b.unchecked(d),columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).removeClass("hidden"),this.colSpanChange(1)},unchecked:function(b){a(".column-"+b).addClass("hidden"),this.colSpanChange(-1)},hidden:function(){return a(".manage-column[id]").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var a=this.id;return a.substring(a,a.length-5)}).get().join(",")}},colSpanChange:function(b){var c,d=a("table").find(".colspanchange");d.length&&(c=parseInt(d.attr("colspan"),10)+b,d.attr("colspan",c.toString()))}},d.ready(function(){columns.init()}),validateForm=function(b){return!a(b).find(".form-required").filter(function(){return""===a("input:visible",this).val()}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).length},showNotice={warn:function(){var a=commonL10n.warnDelete||"";return!!confirm(a)},note:function(a){alert(a)}},screenMeta={element:null,toggles:null,page:null,init:function(){this.element=a("#screen-meta"),this.toggles=a("#screen-meta-links").find(".show-settings"),this.page=a("#wpcontent"),this.toggles.click(this.toggleEvent)},toggleEvent:function(){var b=a("#"+a(this).attr("aria-controls"));b.length&&(b.is(":visible")?screenMeta.close(b,a(this)):screenMeta.open(b,a(this)))},open:function(b,c){a("#screen-meta-links").find(".screen-meta-toggle").not(c.parent()).css("visibility","hidden"),b.parent().show(),b.slideDown("fast",function(){b.focus(),c.addClass("screen-meta-active").attr("aria-expanded",!0)}),d.trigger("screen:options:open")},close:function(b,c){b.slideUp("fast",function(){c.removeClass("screen-meta-active").attr("aria-expanded",!1),a(".screen-meta-toggle").css("visibility",""),b.parent().hide()}),d.trigger("screen:options:close")}},a(".contextual-help-tabs").delegate("a","click",function(b){var c,d=a(this);return b.preventDefault(),!d.is(".active a")&&(a(".contextual-help-tabs .active").removeClass("active"),d.parent("li").addClass("active"),c=a(d.attr("href")),a(".help-tab-content").not(c).removeClass("active").hide(),void c.addClass("active").show())}),d.ready(function(){function c(){var c,d=a("a.wp-has-current-submenu");c=b.innerWidth?Math.max(b.innerWidth,document.documentElement.clientWidth):961,f.hasClass("folded")||f.hasClass("auto-fold")&&c&&c<=960&&c>782?d.attr("aria-haspopup","true"):d.attr("aria-haspopup","false")}function g(a){var b,c,d,f,g,h,i,j=a.find(".wp-submenu");g=a.offset().top,h=e.scrollTop(),i=g-h-30,b=g+j.height()+1,c=C.height(),d=60+b-c,f=e.height()+h-50,f<b-d&&(d=b-f),d>i&&(d=i),d>1?j.css("margin-top","-"+d+"px"):j.css("margin-top","")}function h(){a(".notice.is-dismissible").each(function(){var b=a(this),c=a('<button type="button" class="notice-dismiss"><span class="screen-reader-text"></span></button>'),d=commonL10n.dismiss||"";c.find(".screen-reader-text").text(d),c.on("click.wp-dismiss-notice",function(a){a.preventDefault(),b.fadeTo(100,0,function(){b.slideUp(100,function(){b.remove()})})}),b.append(c)})}function i(a){var b=e.scrollTop(),c=!a||"scroll"!==a.type;if(!(y||A||D.data("wp-responsive"))){if(P.menu+P.adminbar<P.window||P.menu+P.adminbar+20>P.wpwrap)return void k();if(O=!0,P.menu+P.adminbar>P.window){if(b<0)return void(L||(L=!0,M=!1,B.css({position:"fixed",top:"",bottom:""})));if(b+P.window>d.height()-1)return void(M||(M=!0,L=!1,B.css({position:"fixed",top:"",bottom:0})));b>K?L?(L=!1,N=B.offset().top-P.adminbar-(b-K),N+P.menu+P.adminbar<b+P.window&&(N=b+P.window-P.menu-P.adminbar),B.css({position:"absolute",top:N,bottom:""})):!M&&B.offset().top+P.menu<b+P.window&&(M=!0,B.css({position:"fixed",top:"",bottom:0})):b<K?M?(M=!1,N=B.offset().top-P.adminbar+(K-b),N+P.menu>b+P.window&&(N=b),B.css({position:"absolute",top:N,bottom:""})):!L&&B.offset().top>=b+P.adminbar&&(L=!0,B.css({position:"fixed",top:"",bottom:""})):c&&(L=M=!1,N=b+P.window-P.menu-P.adminbar-1,N>0?B.css({position:"absolute",top:N,bottom:""}):k())}K=b}}function j(){P={window:e.height(),wpwrap:C.height(),adminbar:J.height(),menu:B.height()}}function k(){!y&&O&&(L=M=O=!1,B.css({position:"",top:"",bottom:""}))}function l(){j(),D.data("wp-responsive")?(f.removeClass("sticky-menu"),k()):P.menu+P.adminbar>P.window?(i(),f.removeClass("sticky-menu")):(f.addClass("sticky-menu"),k())}function m(){a(".aria-button-if-js").attr("role","button")}var n,o,p,q,r,s,t,u,v=!1,w=a("input.current-page"),x=w.val(),y=/iPhone|iPad|iPod/.test(navigator.userAgent),z=navigator.userAgent.indexOf("Android")!==-1,A=a(document.documentElement).hasClass("ie8"),B=a("#adminmenuwrap"),C=a("#wpwrap"),D=a("#adminmenu"),E=a("#wp-responsive-overlay"),F=a("#wp-toolbar"),G=F.find('a[aria-haspopup="true"]'),H=a(".meta-box-sortables"),I=!1,J=a("#wpadminbar"),K=0,L=!1,M=!1,N=0,O=!1,P={window:e.height(),wpwrap:C.height(),adminbar:J.height(),menu:B.height()};D.on("click.wp-submenu-head",".wp-submenu-head",function(b){a(b.target).parent().siblings("a").get(0).click()}),a("#collapse-menu").on("click.collapse-menu",function(){var e,g;a("#adminmenu div.wp-submenu").css("margin-top",""),e=b.innerWidth?Math.max(b.innerWidth,document.documentElement.clientWidth):961,e&&e<960?f.hasClass("auto-fold")?(f.removeClass("auto-fold").removeClass("folded"),setUserSetting("unfold",1),setUserSetting("mfold","o"),g="open"):(f.addClass("auto-fold"),setUserSetting("unfold",0),g="folded"):f.hasClass("folded")?(f.removeClass("folded"),setUserSetting("mfold","o"),g="open"):(f.addClass("folded"),setUserSetting("mfold","f"),g="folded"),c(),d.trigger("wp-collapse-menu",{state:g})}),d.on("wp-window-resized wp-responsive-activate wp-responsive-deactivate",c),("ontouchstart"in b||/IEMobile\/[1-9]/.test(navigator.userAgent))&&(s=y?"touchstart":"click",f.on(s+".wp-mobile-hover",function(b){D.data("wp-responsive")||a(b.target).closest("#adminmenu").length||D.find("li.opensub").removeClass("opensub")}),D.find("a.wp-has-submenu").on(s+".wp-mobile-hover",function(b){var c=a(this).parent();D.data("wp-responsive")||c.hasClass("opensub")||c.hasClass("wp-menu-open")&&!(c.width()<40)||(b.preventDefault(),g(c),D.find("li.opensub").removeClass("opensub"),c.addClass("opensub"))})),y||z||(D.find("li.wp-has-submenu").hoverIntent({over:function(){var b=a(this),c=b.find(".wp-submenu"),d=parseInt(c.css("top"),10);isNaN(d)||d>-5||D.data("wp-responsive")||(g(b),D.find("li.opensub").removeClass("opensub"),b.addClass("opensub"))},out:function(){D.data("wp-responsive")||a(this).removeClass("opensub").find(".wp-submenu").css("margin-top","")},timeout:200,sensitivity:7,interval:90}),D.on("focus.adminmenu",".wp-submenu a",function(b){D.data("wp-responsive")||a(b.target).closest("li.menu-top").addClass("opensub")}).on("blur.adminmenu",".wp-submenu a",function(b){D.data("wp-responsive")||a(b.target).closest("li.menu-top").removeClass("opensub")}).find("li.wp-has-submenu.wp-not-current-submenu").on("focusin.adminmenu",function(){g(a(this))})),a("div.updated, div.error, div.notice").not(".inline, .below-h2").insertAfter(a(".wrap h1, .wrap h2").first()),d.on("wp-updates-notice-added wp-plugin-install-error wp-plugin-update-error wp-plugin-delete-error wp-theme-install-error wp-theme-delete-error",h),screenMeta.init(),a("tbody").children().children(".check-column").find(":checkbox").click(function(b){if("undefined"==b.shiftKey)return!0;if(b.shiftKey){if(!v)return!0;n=a(v).closest("form").find(":checkbox").filter(":visible:enabled"),o=n.index(v),p=n.index(this),q=a(this).prop("checked"),0<o&&0<p&&o!=p&&(r=p>o?n.slice(o,p):n.slice(p,o),r.prop("checked",function(){return!!a(this).closest("tr").is(":visible")&&q}))}v=this;var c=a(this).closest("tbody").find(":checkbox").filter(":visible:enabled").not(":checked");return a(this).closest("table").children("thead, tfoot").find(":checkbox").prop("checked",function(){return 0===c.length}),!0}),a("thead, tfoot").find(".check-column :checkbox").on("click.wp-toggle-checkboxes",function(b){var c=a(this),d=c.closest("table"),e=c.prop("checked"),f=b.shiftKey||c.data("wp-toggle");d.children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return!a(this).is(":hidden,:disabled")&&(f?!a(this).prop("checked"):!!e)}),d.children("thead,  tfoot").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return!f&&!!e})}),a("#wpbody-content").on({focusin:function(){clearTimeout(t),u=a(this).find(".row-actions"),a(".row-actions").not(this).removeClass("visible"),u.addClass("visible")},focusout:function(){t=setTimeout(function(){u.removeClass("visible")},30)}},".has-row-actions"),a("tbody").on("click",".toggle-row",function(){a(this).closest("tr").toggleClass("is-expanded")}),a("#default-password-nag-no").click(function(){return setUserSetting("default_password_nag","hide"),a("div.default-password-nag").hide(),!1}),a("#newcontent").bind("keydown.wpevent_InsertTab",function(b){var c,d,e,f,g,h=b.target;if(27==b.keyCode)return b.preventDefault(),void a(h).data("tab-out",!0);if(!(9!=b.keyCode||b.ctrlKey||b.altKey||b.shiftKey)){if(a(h).data("tab-out"))return void a(h).data("tab-out",!1);c=h.selectionStart,d=h.selectionEnd,e=h.value,document.selection?(h.focus(),g=document.selection.createRange(),g.text="\t"):c>=0&&(f=this.scrollTop,h.value=e.substring(0,c).concat("\t",e.substring(d)),h.selectionStart=h.selectionEnd=c+1,this.scrollTop=f),b.stopPropagation&&b.stopPropagation(),b.preventDefault&&b.preventDefault()}}),w.length&&w.closest("form").submit(function(){a('select[name="action"]').val()==-1&&a('select[name="action2"]').val()==-1&&w.val()==x&&w.val("1")}),a('.search-box input[type="search"], .search-box input[type="submit"]').mousedown(function(){a('select[name^="action"]').val("-1")}),a("#contextual-help-link, #show-settings-link").on("focus.scroll-into-view",function(a){a.target.scrollIntoView&&a.target.scrollIntoView(!1)}),function(){function b(){c.prop("disabled",""===d.map(function(){return a(this).val()}).get().join(""))}var c,d,e=a("form.wp-upload-form");e.length&&(c=e.find('input[type="submit"]'),d=e.find('input[type="file"]'),b(),d.on("change",b))}(),y||(e.on("scroll.pin-menu",i),d.on("tinymce-editor-init.pin-menu",function(a,b){b.on("wp-autoresize",j)})),b.wpResponsive={init:function(){var c=this;d.on("wp-responsive-activate.wp-responsive",function(){c.activate()}).on("wp-responsive-deactivate.wp-responsive",function(){c.deactivate()}),a("#wp-admin-bar-menu-toggle a").attr("aria-expanded","false"),a("#wp-admin-bar-menu-toggle").on("click.wp-responsive",function(b){b.preventDefault(),J.find(".hover").removeClass("hover"),C.toggleClass("wp-responsive-open"),C.hasClass("wp-responsive-open")?(a(this).find("a").attr("aria-expanded","true"),a("#adminmenu a:first").focus()):a(this).find("a").attr("aria-expanded","false")}),D.on("click.wp-responsive","li.wp-has-submenu > a",function(b){D.data("wp-responsive")&&(a(this).parent("li").toggleClass("selected"),b.preventDefault())}),c.trigger(),d.on("wp-window-resized.wp-responsive",a.proxy(this.trigger,this)),e.on("load.wp-responsive",function(){var a=navigator.userAgent.indexOf("AppleWebKit/")>-1?e.width():b.innerWidth;a<=782&&c.disableSortables()})},activate:function(){l(),f.hasClass("auto-fold")||f.addClass("auto-fold"),D.data("wp-responsive",1),this.disableSortables()},deactivate:function(){l(),D.removeData("wp-responsive"),this.enableSortables()},trigger:function(){var a;b.innerWidth&&(a=Math.max(b.innerWidth,document.documentElement.clientWidth),a<=782?I||(d.trigger("wp-responsive-activate"),I=!0):I&&(d.trigger("wp-responsive-deactivate"),I=!1),a<=480?this.enableOverlay():this.disableOverlay())},enableOverlay:function(){0===E.length&&(E=a('<div id="wp-responsive-overlay"></div>').insertAfter("#wpcontent").hide().on("click.wp-responsive",function(){F.find(".menupop.hover").removeClass("hover"),a(this).hide()})),G.on("click.wp-responsive",function(){E.show()})},disableOverlay:function(){G.off("click.wp-responsive"),E.hide()},disableSortables:function(){if(H.length)try{H.sortable("disable")}catch(a){}},enableSortables:function(){if(H.length)try{H.sortable("enable")}catch(a){}}},a(document).ajaxComplete(function(){m()}),b.wpResponsive.init(),l(),c(),h(),m(),d.on("wp-pin-menu wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu wp-collapse-menu.pin-menu wp-scroll-start.pin-menu",l),a(".wp-initial-focus").focus()}),function(){function a(){d.trigger("wp-window-resized")}function c(){b.clearTimeout(f),f=b.setTimeout(a,200)}var f;e.on("resize.wp-fire-once",c)}(),function(){if("-ms-user-select"in document.documentElement.style&&navigator.userAgent.match(/IEMobile\/10\.0/)){var a=document.createElement("style");a.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.getElementsByTagName("head")[0].appendChild(a)}}()}(jQuery,window);
\ No newline at end of file
index 5c21af6be4cf2a69b94cf3341d6a51fb0bd0fb82..8fa7bb09ee2cc8960a70e3e8000e4bcbd9a3893a 100644 (file)
@@ -27,6 +27,7 @@
                        this.id = id;
                        this.transport = this.transport || 'refresh';
                        this._dirty = options.dirty || false;
+                       this.notifications = new api.Values({ defaultConstructor: api.Notification });
 
                        // Whenever the setting's value changes, refresh the preview.
                        this.bind( this.preview );
                                case 'postMessage':
                                        return this.previewer.send( 'setting', [ this.id, this() ] );
                        }
+               },
+
+               /**
+                * Find controls associated with this setting.
+                *
+                * @since 4.6.0
+                * @returns {wp.customize.Control[]} Controls associated with setting.
+                */
+               findControls: function() {
+                       var setting = this, controls = [];
+                       api.control.each( function( control ) {
+                               _.each( control.settings, function( controlSetting ) {
+                                       if ( controlSetting.id === setting.id ) {
+                                               controls.push( control );
+                                       }
+                               } );
+                       } );
+                       return controls;
                }
        });
 
                        control.priority = new api.Value();
                        control.active = new api.Value();
                        control.activeArgumentsQueue = [];
+                       control.notifications = new api.Values({ defaultConstructor: api.Notification });
 
                        control.elements = [];
 
 
                                        control.setting = control.settings['default'] || null;
 
+                                       // Add setting notifications to the control notification.
+                                       _.each( control.settings, function( setting ) {
+                                               setting.notifications.bind( 'add', function( settingNotification ) {
+                                                       var controlNotification, code, params;
+                                                       code = setting.id + ':' + settingNotification.code;
+                                                       params = _.extend(
+                                                               {},
+                                                               settingNotification,
+                                                               {
+                                                                       setting: setting.id
+                                                               }
+                                                       );
+                                                       controlNotification = new api.Notification( code, params );
+                                                       control.notifications.add( controlNotification.code, controlNotification );
+                                               } );
+                                               setting.notifications.bind( 'remove', function( settingNotification ) {
+                                                       control.notifications.remove( setting.id + ':' + settingNotification.code );
+                                               } );
+                                       } );
+
                                        control.embed();
                                }) );
                        }
 
                        // After the control is embedded on the page, invoke the "ready" method.
                        control.deferred.embedded.done( function () {
+                               /*
+                                * Note that this debounced/deferred rendering is needed for two reasons:
+                                * 1) The 'remove' event is triggered just _before_ the notification is actually removed.
+                                * 2) Improve performance when adding/removing multiple notifications at a time.
+                                */
+                               var debouncedRenderNotifications = _.debounce( function renderNotifications() {
+                                       control.renderNotifications();
+                               } );
+                               control.notifications.bind( 'add', function( notification ) {
+                                       wp.a11y.speak( notification.message, 'assertive' );
+                                       debouncedRenderNotifications();
+                               } );
+                               control.notifications.bind( 'remove', debouncedRenderNotifications );
+                               control.renderNotifications();
+
                                control.ready();
                        });
                },
                 */
                ready: function() {},
 
+               /**
+                * Get the element inside of a control's container that contains the validation error message.
+                *
+                * Control subclasses may override this to return the proper container to render notifications into.
+                * Injects the notification container for existing controls that lack the necessary container,
+                * including special handling for nav menu items and widgets.
+                *
+                * @since 4.6.0
+                * @returns {jQuery} Setting validation message element.
+                * @this {wp.customize.Control}
+                */
+               getNotificationsContainerElement: function() {
+                       var control = this, controlTitle, notificationsContainer;
+
+                       notificationsContainer = control.container.find( '.customize-control-notifications-container:first' );
+                       if ( notificationsContainer.length ) {
+                               return notificationsContainer;
+                       }
+
+                       notificationsContainer = $( '<div class="customize-control-notifications-container"></div>' );
+
+                       if ( control.container.hasClass( 'customize-control-nav_menu_item' ) ) {
+                               control.container.find( '.menu-item-settings:first' ).prepend( notificationsContainer );
+                       } else if ( control.container.hasClass( 'customize-control-widget_form' ) ) {
+                               control.container.find( '.widget-inside:first' ).prepend( notificationsContainer );
+                       } else {
+                               controlTitle = control.container.find( '.customize-control-title' );
+                               if ( controlTitle.length ) {
+                                       controlTitle.after( notificationsContainer );
+                               } else {
+                                       control.container.prepend( notificationsContainer );
+                               }
+                       }
+                       return notificationsContainer;
+               },
+
+               /**
+                * Render notifications.
+                *
+                * Renders the `control.notifications` into the control's container.
+                * Control subclasses may override this method to do their own handling
+                * of rendering notifications.
+                *
+                * @since 4.6.0
+                * @this {wp.customize.Control}
+                */
+               renderNotifications: function() {
+                       var control = this, container, notifications, hasError = false;
+                       container = control.getNotificationsContainerElement();
+                       if ( ! container || ! container.length ) {
+                               return;
+                       }
+                       notifications = [];
+                       control.notifications.each( function( notification ) {
+                               notifications.push( notification );
+                               if ( 'error' === notification.type ) {
+                                       hasError = true;
+                               }
+                       } );
+
+                       if ( 0 === notifications.length ) {
+                               container.stop().slideUp( 'fast' );
+                       } else {
+                               container.stop().slideDown( 'fast', null, function() {
+                                       $( this ).css( 'height', 'auto' );
+                               } );
+                       }
+
+                       if ( ! control.notificationsTemplate ) {
+                               control.notificationsTemplate = wp.template( 'customize-control-notifications' );
+                       }
+
+                       control.container.toggleClass( 'has-notifications', 0 !== notifications.length );
+                       control.container.toggleClass( 'has-error', hasError );
+                       container.empty().append( $.trim(
+                               control.notificationsTemplate( { notifications: notifications, altNotice: Boolean( control.altNotice ) } )
+                       ) );
+               },
+
                /**
                 * Normal controls do not expand, so just expand its parent
                 *
                                        control.pausePlayer();
                                });
 
-                       control.setting.bind( function( value ) {
+                       /**
+                        * Set attachment data and render content.
+                        *
+                        * Note that BackgroundImage.prototype.ready applies this ready method
+                        * to itself. Since BackgroundImage is an UploadControl, the value
+                        * is the attachment URL instead of the attachment ID. In this case
+                        * we skip fetching the attachment data because we have no ID available,
+                        * and it is the responsibility of the UploadControl to set the control's
+                        * attachmentData before calling the renderContent method.
+                        *
+                        * @param {number|string} value Attachment
+                        */
+                       function setAttachmentDataAndRenderContent( value ) {
+                               var hasAttachmentData = $.Deferred();
 
-                               // Send attachment information to the preview for possible use in `postMessage` transport.
-                               wp.media.attachment( value ).fetch().done( function() {
-                                       wp.customize.previewer.send( control.setting.id + '-attachment-data', this.attributes );
+                               if ( control.extended( api.UploadControl ) ) {
+                                       hasAttachmentData.resolve();
+                               } else {
+                                       value = parseInt( value, 10 );
+                                       if ( _.isNaN( value ) || value <= 0 ) {
+                                               delete control.params.attachment;
+                                               hasAttachmentData.resolve();
+                                       } else if ( control.params.attachment && control.params.attachment.id === value ) {
+                                               hasAttachmentData.resolve();
+                                       }
+                               }
+
+                               // Fetch the attachment data.
+                               if ( 'pending' === hasAttachmentData.state() ) {
+                                       wp.media.attachment( value ).fetch().done( function() {
+                                               control.params.attachment = this.attributes;
+                                               hasAttachmentData.resolve();
+
+                                               // Send attachment information to the preview for possible use in `postMessage` transport.
+                                               wp.customize.previewer.send( control.setting.id + '-attachment-data', this.attributes );
+                                       } );
+                               }
+
+                               hasAttachmentData.done( function() {
+                                       control.renderContent();
                                } );
+                       }
 
-                               // Re-render whenever the control's setting changes.
-                               control.renderContent();
-                       } );
+                       // Ensure attachment data is initially set (for dynamically-instantiated controls).
+                       setAttachmentDataAndRenderContent( control.setting() );
+
+                       // Update the attachment data and re-render the control when the setting changes.
+                       control.setting.bind( setAttachmentDataAndRenderContent );
                },
 
                pausePlayer: function () {
                                        controller.setImageFromAttachment( croppedImage );
                                        controller.frame.close();
                                } ).fail( function() {
-                                       controller.trigger('content:error:crop');
+                                       controller.frame.trigger('content:error:crop');
                                } );
                        } else {
                                this.frame.setState( 'cropper' );
                                                }
                                        } );
                                } );
+
+                               if ( data.settingValidities ) {
+                                       api._handleSettingValidities( {
+                                               settingValidities: data.settingValidities,
+                                               focusInvalidControl: false
+                                       } );
+                               }
                        } );
 
                        this.request = $.ajax( this.previewUrl(), {
                }
        });
 
+       api.settingConstructor = {};
        api.controlConstructor = {
                color:         api.ColorControl,
                media:         api.MediaControl,
                themes: api.ThemesSection
        };
 
+       /**
+        * Handle setting_validities in an error response for the customize-save request.
+        *
+        * Add notifications to the settings and focus on the first control that has an invalid setting.
+        *
+        * @since 4.6.0
+        * @private
+        *
+        * @param {object}  args
+        * @param {object}  args.settingValidities
+        * @param {boolean} [args.focusInvalidControl=false]
+        * @returns {void}
+        */
+       api._handleSettingValidities = function handleSettingValidities( args ) {
+               var invalidSettingControls, invalidSettings = [], wasFocused = false;
+
+               // Find the controls that correspond to each invalid setting.
+               _.each( args.settingValidities, function( validity, settingId ) {
+                       var setting = api( settingId );
+                       if ( setting ) {
+
+                               // Add notifications for invalidities.
+                               if ( _.isObject( validity ) ) {
+                                       _.each( validity, function( params, code ) {
+                                               var notification = new api.Notification( code, params ), existingNotification, needsReplacement = false;
+
+                                               // Remove existing notification if already exists for code but differs in parameters.
+                                               existingNotification = setting.notifications( notification.code );
+                                               if ( existingNotification ) {
+                                                       needsReplacement = ( notification.type !== existingNotification.type ) || ! _.isEqual( notification.data, existingNotification.data );
+                                               }
+                                               if ( needsReplacement ) {
+                                                       setting.notifications.remove( code );
+                                               }
+
+                                               if ( ! setting.notifications.has( notification.code ) ) {
+                                                       setting.notifications.add( code, notification );
+                                               }
+                                               invalidSettings.push( setting.id );
+                                       } );
+                               }
+
+                               // Remove notification errors that are no longer valid.
+                               setting.notifications.each( function( notification ) {
+                                       if ( 'error' === notification.type && ( true === validity || ! validity[ notification.code ] ) ) {
+                                               setting.notifications.remove( notification.code );
+                                       }
+                               } );
+                       }
+               } );
+
+               if ( args.focusInvalidControl ) {
+                       invalidSettingControls = api.findControlsForSettings( invalidSettings );
+
+                       // Focus on the first control that is inside of an expanded section (one that is visible).
+                       _( _.values( invalidSettingControls ) ).find( function( controls ) {
+                               return _( controls ).find( function( control ) {
+                                       var isExpanded = control.section() && api.section.has( control.section() ) && api.section( control.section() ).expanded();
+                                       if ( isExpanded && control.expanded ) {
+                                               isExpanded = control.expanded();
+                                       }
+                                       if ( isExpanded ) {
+                                               control.focus();
+                                               wasFocused = true;
+                                       }
+                                       return wasFocused;
+                               } );
+                       } );
+
+                       // Focus on the first invalid control.
+                       if ( ! wasFocused && ! _.isEmpty( invalidSettingControls ) ) {
+                               _.values( invalidSettingControls )[0][0].focus();
+                       }
+               }
+       };
+
+       /**
+        * Find all controls associated with the given settings.
+        *
+        * @since 4.6.0
+        * @param {string[]} settingIds Setting IDs.
+        * @returns {object<string, wp.customize.Control>} Mapping setting ids to arrays of controls.
+        */
+       api.findControlsForSettings = function findControlsForSettings( settingIds ) {
+               var controls = {}, settingControls;
+               _.each( _.unique( settingIds ), function( settingId ) {
+                       var setting = api( settingId );
+                       if ( setting ) {
+                               settingControls = setting.findControls();
+                               if ( settingControls && settingControls.length > 0 ) {
+                                       controls[ settingId ] = settingControls;
+                               }
+                       }
+               } );
+               return controls;
+       };
+
+       /**
+        * Sort panels, sections, controls by priorities. Hide empty sections and panels.
+        *
+        * @since 4.1.0
+        */
+       api.reflowPaneContents = _.bind( function () {
+
+               var appendContainer, activeElement, rootContainers, rootNodes = [], wasReflowed = false;
+
+               if ( document.activeElement ) {
+                       activeElement = $( document.activeElement );
+               }
+
+               // Sort the sections within each panel
+               api.panel.each( function ( panel ) {
+                       var sections = panel.sections(),
+                               sectionContainers = _.pluck( sections, 'container' );
+                       rootNodes.push( panel );
+                       appendContainer = panel.container.find( 'ul:first' );
+                       if ( ! api.utils.areElementListsEqual( sectionContainers, appendContainer.children( '[id]' ) ) ) {
+                               _( sections ).each( function ( section ) {
+                                       appendContainer.append( section.container );
+                               } );
+                               wasReflowed = true;
+                       }
+               } );
+
+               // Sort the controls within each section
+               api.section.each( function ( section ) {
+                       var controls = section.controls(),
+                               controlContainers = _.pluck( controls, 'container' );
+                       if ( ! section.panel() ) {
+                               rootNodes.push( section );
+                       }
+                       appendContainer = section.container.find( 'ul:first' );
+                       if ( ! api.utils.areElementListsEqual( controlContainers, appendContainer.children( '[id]' ) ) ) {
+                               _( controls ).each( function ( control ) {
+                                       appendContainer.append( control.container );
+                               } );
+                               wasReflowed = true;
+                       }
+               } );
+
+               // Sort the root panels and sections
+               rootNodes.sort( api.utils.prioritySort );
+               rootContainers = _.pluck( rootNodes, 'container' );
+               appendContainer = $( '#customize-theme-controls' ).children( 'ul' ); // @todo This should be defined elsewhere, and to be configurable
+               if ( ! api.utils.areElementListsEqual( rootContainers, appendContainer.children() ) ) {
+                       _( rootNodes ).each( function ( rootNode ) {
+                               appendContainer.append( rootNode.container );
+                       } );
+                       wasReflowed = true;
+               }
+
+               // Now re-trigger the active Value callbacks to that the panels and sections can decide whether they can be rendered
+               api.panel.each( function ( panel ) {
+                       var value = panel.active();
+                       panel.active.callbacks.fireWith( panel.active, [ value, value ] );
+               } );
+               api.section.each( function ( section ) {
+                       var value = section.active();
+                       section.active.callbacks.fireWith( section.active, [ value, value ] );
+               } );
+
+               // Restore focus if there was a reflow and there was an active (focused) element
+               if ( wasReflowed && activeElement ) {
+                       activeElement.focus();
+               }
+               api.trigger( 'pane-contents-reflowed' );
+       }, api );
+
        $( function() {
                api.settings = window._wpCustomizeSettings;
                api.l10n = window._wpCustomizeControlsL10n;
                });
 
                // Expand/Collapse the main customizer customize info.
-               $( '.customize-info' ).find( '> .accordion-section-title .customize-help-toggle' ).on( 'click keydown', function( event ) {
-                       if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
-                               return;
-                       }
-                       event.preventDefault(); // Keep this AFTER the key filter above
-
+               $( '.customize-info' ).find( '> .accordion-section-title .customize-help-toggle' ).on( 'click', function() {
                        var section = $( this ).closest( '.accordion-section' ),
                                content = section.find( '.customize-panel-description:first' );
 
                                var self = this,
                                        processing = api.state( 'processing' ),
                                        submitWhenDoneProcessing,
-                                       submit;
+                                       submit,
+                                       modifiedWhileSaving = {},
+                                       invalidSettings = [],
+                                       invalidControls;
 
                                body.addClass( 'saving' );
 
+                               function captureSettingModifiedDuringSave( setting ) {
+                                       modifiedWhileSaving[ setting.id ] = true;
+                               }
+                               api.bind( 'change', captureSettingModifiedDuringSave );
+
                                submit = function () {
                                        var request, query;
+
+                                       /*
+                                        * Block saving if there are any settings that are marked as
+                                        * invalid from the client (not from the server). Focus on
+                                        * the control.
+                                        */
+                                       api.each( function( setting ) {
+                                               setting.notifications.each( function( notification ) {
+                                                       if ( 'error' === notification.type && ( ! notification.data || ! notification.data.from_server ) ) {
+                                                               invalidSettings.push( setting.id );
+                                                       }
+                                               } );
+                                       } );
+                                       invalidControls = api.findControlsForSettings( invalidSettings );
+                                       if ( ! _.isEmpty( invalidControls ) ) {
+                                               _.values( invalidControls )[0][0].focus();
+                                               body.removeClass( 'saving' );
+                                               api.unbind( 'change', captureSettingModifiedDuringSave );
+                                               return;
+                                       }
+
                                        query = $.extend( self.query(), {
                                                nonce:  self.nonce.save
                                        } );
                                        request = wp.ajax.post( 'customize_save', query );
 
+                                       // Disable save button during the save request.
+                                       saveBtn.prop( 'disabled', true );
+
                                        api.trigger( 'save', request );
 
                                        request.always( function () {
                                                body.removeClass( 'saving' );
+                                               saveBtn.prop( 'disabled', false );
+                                               api.unbind( 'change', captureSettingModifiedDuringSave );
                                        } );
 
                                        request.fail( function ( response ) {
                                                                self.preview.iframe.show();
                                                        } );
                                                }
+
+                                               if ( response.setting_validities ) {
+                                                       api._handleSettingValidities( {
+                                                               settingValidities: response.setting_validities,
+                                                               focusInvalidControl: true
+                                                       } );
+                                               }
+
                                                api.trigger( 'error', response );
                                        } );
 
                                        request.done( function( response ) {
-                                               // Clear setting dirty states
-                                               api.each( function ( value ) {
-                                                       value._dirty = false;
+
+                                               // Clear setting dirty states, if setting wasn't modified while saving.
+                                               api.each( function( setting ) {
+                                                       if ( ! modifiedWhileSaving[ setting.id ] ) {
+                                                               setting._dirty = false;
+                                                       }
                                                } );
 
                                                api.previewer.send( 'saved', response );
 
+                                               if ( response.setting_validities ) {
+                                                       api._handleSettingValidities( {
+                                                               settingValidities: response.setting_validities,
+                                                               focusInvalidControl: true
+                                                       } );
+                                               }
+
                                                api.trigger( 'saved', response );
+
+                                               // Restore the global dirty state if any settings were modified during save.
+                                               if ( ! _.isEmpty( modifiedWhileSaving ) ) {
+                                                       api.state( 'saved' ).set( false );
+                                               }
                                        } );
                                };
 
 
                // Create Settings
                $.each( api.settings.settings, function( id, data ) {
-                       api.create( id, id, data.value, {
+                       var constructor = api.settingConstructor[ data.type ] || api.Setting,
+                               setting;
+
+                       setting = new constructor( id, data.value, {
                                transport: data.transport,
                                previewer: api.previewer,
                                dirty: !! data.dirty
                        } );
+                       api.add( id, setting );
                });
 
                // Create Panels
                        });
                });
 
-               /**
-                * Sort panels, sections, controls by priorities. Hide empty sections and panels.
-                *
-                * @since 4.1.0
-                */
-               api.reflowPaneContents = _.bind( function () {
-
-                       var appendContainer, activeElement, rootContainers, rootNodes = [], wasReflowed = false;
-
-                       if ( document.activeElement ) {
-                               activeElement = $( document.activeElement );
-                       }
-
-                       // Sort the sections within each panel
-                       api.panel.each( function ( panel ) {
-                               var sections = panel.sections(),
-                                       sectionContainers = _.pluck( sections, 'container' );
-                               rootNodes.push( panel );
-                               appendContainer = panel.container.find( 'ul:first' );
-                               if ( ! api.utils.areElementListsEqual( sectionContainers, appendContainer.children( '[id]' ) ) ) {
-                                       _( sections ).each( function ( section ) {
-                                               appendContainer.append( section.container );
-                                       } );
-                                       wasReflowed = true;
-                               }
-                       } );
-
-                       // Sort the controls within each section
-                       api.section.each( function ( section ) {
-                               var controls = section.controls(),
-                                       controlContainers = _.pluck( controls, 'container' );
-                               if ( ! section.panel() ) {
-                                       rootNodes.push( section );
-                               }
-                               appendContainer = section.container.find( 'ul:first' );
-                               if ( ! api.utils.areElementListsEqual( controlContainers, appendContainer.children( '[id]' ) ) ) {
-                                       _( controls ).each( function ( control ) {
-                                               appendContainer.append( control.container );
-                                       } );
-                                       wasReflowed = true;
-                               }
-                       } );
-
-                       // Sort the root panels and sections
-                       rootNodes.sort( api.utils.prioritySort );
-                       rootContainers = _.pluck( rootNodes, 'container' );
-                       appendContainer = $( '#customize-theme-controls' ).children( 'ul' ); // @todo This should be defined elsewhere, and to be configurable
-                       if ( ! api.utils.areElementListsEqual( rootContainers, appendContainer.children() ) ) {
-                               _( rootNodes ).each( function ( rootNode ) {
-                                       appendContainer.append( rootNode.container );
-                               } );
-                               wasReflowed = true;
-                       }
-
-                       // Now re-trigger the active Value callbacks to that the panels and sections can decide whether they can be rendered
-                       api.panel.each( function ( panel ) {
-                               var value = panel.active();
-                               panel.active.callbacks.fireWith( panel.active, [ value, value ] );
-                       } );
-                       api.section.each( function ( section ) {
-                               var value = section.active();
-                               section.active.callbacks.fireWith( section.active, [ value, value ] );
-                       } );
-
-                       // Restore focus if there was a reflow and there was an active (focused) element
-                       if ( wasReflowed && activeElement ) {
-                               activeElement.focus();
-                       }
-                       api.trigger( 'pane-contents-reflowed' );
-               }, api );
                api.bind( 'ready', api.reflowPaneContents );
-               api.reflowPaneContents = _.debounce( api.reflowPaneContents, 100 );
                $( [ api.panel, api.section, api.control ] ).each( function ( i, values ) {
-                       values.bind( 'add', api.reflowPaneContents );
-                       values.bind( 'change', api.reflowPaneContents );
-                       values.bind( 'remove', api.reflowPaneContents );
+                       var debouncedReflowPaneContents = _.debounce( api.reflowPaneContents, 100 );
+                       values.bind( 'add', debouncedReflowPaneContents );
+                       values.bind( 'change', debouncedReflowPaneContents );
+                       values.bind( 'remove', debouncedReflowPaneContents );
                } );
 
                // Check if preview url is valid and load the preview frame.
                        });
 
                        activated.bind( function( to ) {
-                               if ( to )
+                               if ( to ) {
                                        api.trigger( 'activated' );
+                               }
                        });
 
                        // Expose states to the API.
                        overlay.toggleClass( 'collapsed' ).toggleClass( 'expanded' );
                });
 
-               $( '.customize-controls-preview-toggle' ).on( 'click keydown', function( event ) {
-                       if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
+               // Keyboard shortcuts - esc to exit section/panel.
+               $( 'body' ).on( 'keydown', function( event ) {
+                       var collapsedObject, expandedControls = [], expandedSections = [], expandedPanels = [];
+
+                       if ( 27 !== event.which ) { // Esc.
                                return;
                        }
 
+                       // Check for expanded expandable controls (e.g. widgets and nav menus items), sections, and panels.
+                       api.control.each( function( control ) {
+                               if ( control.expanded && control.expanded() && _.isFunction( control.collapse ) ) {
+                                       expandedControls.push( control );
+                               }
+                       });
+                       api.section.each( function( section ) {
+                               if ( section.expanded() ) {
+                                       expandedSections.push( section );
+                               }
+                       });
+                       api.panel.each( function( panel ) {
+                               if ( panel.expanded() ) {
+                                       expandedPanels.push( panel );
+                               }
+                       });
+
+                       // Skip collapsing expanded controls if there are no expanded sections.
+                       if ( expandedControls.length > 0 && 0 === expandedSections.length ) {
+                               expandedControls.length = 0;
+                       }
+
+                       // Collapse the most granular expanded object.
+                       collapsedObject = expandedControls[0] || expandedSections[0] || expandedPanels[0];
+                       if ( collapsedObject ) {
+                               collapsedObject.collapse();
+                               event.preventDefault();
+                       }
+               });
+
+               $( '.customize-controls-preview-toggle' ).on( 'click', function() {
                        overlay.toggleClass( 'preview-only' );
-                       event.preventDefault();
                });
 
                // Previewed device bindings.
                        });
                } );
 
-               /*
-                * When activated, let the loader handle redirecting the page.
-                * If no loader exists, redirect the page ourselves (if a url exists).
-                */
-               api.bind( 'activated', function() {
-                       if ( parent.targetWindow() )
-                               parent.send( 'activated', api.settings.url.activated );
-                       else if ( api.settings.url.activated )
-                               window.location = api.settings.url.activated;
-               });
-
                // Pass titles to the parent
                api.bind( 'title', function( newTitle ) {
                        parent.send( 'title', newTitle );
                        });
                });
 
+               // Update the setting validities.
+               api.previewer.bind( 'selective-refresh-setting-validities', function handleSelectiveRefreshedSettingValidities( settingValidities ) {
+                       api._handleSettingValidities( {
+                               settingValidities: settingValidities,
+                               focusInvalidControl: false
+                       } );
+               } );
+
                // Focus on the control that is associated with the given setting.
                api.previewer.bind( 'focus-control-for-setting', function( settingId ) {
                        var matchedControl;
index c3216cc3991721852e23ae4f8413c8c607b2067a..a9a63de823731b4202a0863c1365810158488b1a 100644 (file)
@@ -1,2 +1,2 @@
-!function(a,b){var c,d,e=wp.customize;e.Setting=e.Value.extend({initialize:function(a,b,c){e.Value.prototype.initialize.call(this,b,c),this.id=a,this.transport=this.transport||"refresh",this._dirty=c.dirty||!1,this.bind(this.preview)},preview:function(){switch(this.transport){case"refresh":return this.previewer.refresh();case"postMessage":return this.previewer.send("setting",[this.id,this()])}}}),e.utils={},e.utils.bubbleChildValueChanges=function(a,c){b.each(c,function(b,c){a[c].bind(function(b,c){a.parent&&b!==c&&a.parent.trigger("change",a)})})},d=function(a){var b,c,d,f;b=this,a=a||{},d=function(){var a;a=b.extended(e.Panel)&&b.expanded&&b.expanded()?b.container.find("ul.control-panel-content"):b.extended(e.Section)&&b.expanded&&b.expanded()?b.container.find("ul.accordion-section-content"):b.container,f=a.find(".control-focus:first"),0===f.length&&(f=a.find("input, select, textarea, button, object, a[href], [tabindex]").filter(":visible").first()),f.focus()},a.completeCallback?(c=a.completeCallback,a.completeCallback=function(){d(),c()}):a.completeCallback=d,b.expand?b.expand(a):a.completeCallback()},e.utils.prioritySort=function(a,b){return a.priority()===b.priority()&&"number"==typeof a.params.instanceNumber&&"number"==typeof b.params.instanceNumber?a.params.instanceNumber-b.params.instanceNumber:a.priority()-b.priority()},e.utils.isKeydownButNotEnterEvent=function(a){return"keydown"===a.type&&13!==a.which},e.utils.areElementListsEqual=function(a,c){var d=a.length===c.length&&-1===_.indexOf(_.map(_.zip(a,c),function(a){return b(a[0]).is(a[1])}),!1);return d},c=e.Class.extend({defaultActiveArguments:{duration:"fast",completeCallback:b.noop},defaultExpandedArguments:{duration:"fast",completeCallback:b.noop},containerType:"container",defaults:{title:"",description:"",priority:100,type:"default",content:null,active:!0,instanceNumber:null},initialize:function(a,c){var d=this;d.id=a,c=c||{},c.params=_.defaults(c.params||{},d.defaults),b.extend(d,c),d.templateSelector="customize-"+d.containerType+"-"+d.params.type,d.container=b(d.params.content),0===d.container.length&&(d.container=b(d.getContainer())),d.deferred={embedded:new b.Deferred},d.priority=new e.Value,d.active=new e.Value,d.activeArgumentsQueue=[],d.expanded=new e.Value,d.expandedArgumentsQueue=[],d.active.bind(function(a){var c=d.activeArgumentsQueue.shift();c=b.extend({},d.defaultActiveArguments,c),a=a&&d.isContextuallyActive(),d.onChangeActive(a,c)}),d.expanded.bind(function(a){var c=d.expandedArgumentsQueue.shift();c=b.extend({},d.defaultExpandedArguments,c),d.onChangeExpanded(a,c)}),d.deferred.embedded.done(function(){d.attachEvents()}),e.utils.bubbleChildValueChanges(d,["priority","active"]),d.priority.set(d.params.priority),d.active.set(d.params.active),d.expanded.set(!1)},ready:function(){},_children:function(a,b){var c=this,d=[];return e[b].each(function(b){b[a].get()===c.id&&d.push(b)}),d.sort(e.utils.prioritySort),d},isContextuallyActive:function(){throw new Error("Container.isContextuallyActive() must be overridden in a subclass.")},onChangeActive:function(a,c){var d,f,g=this;return c.unchanged?void(c.completeCallback&&c.completeCallback()):(d="resolved"===e.previewer.deferred.active.state()?c.duration:0,g.extended(e.Panel)&&(e.panel.each(function(a){a!==g&&a.expanded()&&(f=a,d=0)}),a||_.each(g.sections(),function(a){a.collapse({duration:0})})),b.contains(document,g.container[0])?a?g.container.stop(!0,!0).slideDown(d,c.completeCallback):g.expanded()?g.collapse({duration:d,completeCallback:function(){g.container.stop(!0,!0).slideUp(d,c.completeCallback)}}):g.container.stop(!0,!0).slideUp(d,c.completeCallback):(g.container.toggle(a),c.completeCallback&&c.completeCallback()),void(f&&f._recalculateTopMargin()))},_toggleActive:function(a,b){var c=this;return b=b||{},a&&this.active.get()||!a&&!this.active.get()?(b.unchanged=!0,c.onChangeActive(c.active.get(),b),!1):(b.unchanged=!1,this.activeArgumentsQueue.push(b),this.active.set(a),!0)},activate:function(a){return this._toggleActive(!0,a)},deactivate:function(a){return this._toggleActive(!1,a)},onChangeExpanded:function(){throw new Error("Must override with subclass.")},_toggleExpanded:function(a,b){var c,d=this;return b=b||{},c=b.completeCallback,a&&!d.active()?!1:(b.completeCallback=function(){c&&c.apply(d,arguments),a?d.container.trigger("expanded"):d.container.trigger("collapsed")},a&&d.expanded.get()||!a&&!d.expanded.get()?(b.unchanged=!0,d.onChangeExpanded(d.expanded.get(),b),!1):(b.unchanged=!1,d.expandedArgumentsQueue.push(b),d.expanded.set(a),!0))},expand:function(a){return this._toggleExpanded(!0,a)},collapse:function(a){return this._toggleExpanded(!1,a)},focus:d,getContainer:function(){var a,c=this;return a=0!==b("#tmpl-"+c.templateSelector).length?wp.template(c.templateSelector):wp.template("customize-"+c.containerType+"-default"),a&&c.container?b.trim(a(c.params)):"<li></li>"}}),e.Section=c.extend({containerType:"section",defaults:{title:"",description:"",priority:100,type:"default",content:null,active:!0,instanceNumber:null,panel:null,customizeAction:""},initialize:function(a,d){var f=this;c.prototype.initialize.call(f,a,d),f.id=a,f.panel=new e.Value,f.panel.bind(function(a){b(f.container).toggleClass("control-subsection",!!a)}),f.panel.set(f.params.panel||""),e.utils.bubbleChildValueChanges(f,["panel"]),f.embed(),f.deferred.embedded.done(function(){f.ready()})},embed:function(){var a,c=this;a=function(a){var d;a?e.panel(a,function(a){a.deferred.embedded.done(function(){d=a.container.find("ul:first"),c.container.parent().is(d)||d.append(c.container),c.deferred.embedded.resolve()})}):(d=b("#customize-theme-controls").children("ul"),c.container.parent().is(d)||d.append(c.container),c.deferred.embedded.resolve())},c.panel.bind(a),a(c.panel.get()),c.deferred.embedded.done(function(){e.bind("pane-contents-reflowed",_.debounce(function(){c._recalculateTopMargin()},100))})},attachEvents:function(){var a=this;a.container.find(".accordion-section-title, .customize-section-back").on("click keydown",function(b){e.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),a.expanded()?a.collapse():a.expand())})},isContextuallyActive:function(){var a=this,b=a.controls(),c=0;return _(b).each(function(a){a.active()&&(c+=1)}),0!==c},controls:function(){return this._children("section","control")},onChangeExpanded:function(a,c){var d,f,g,h,i=this,j=i.container.closest(".wp-full-overlay-sidebar-content"),k=i.container.find(".accordion-section-content"),l=i.container.closest(".wp-full-overlay"),m=i.container.find(".customize-section-back"),n=i.container.find(".accordion-section-title").first(),o=b("#customize-header-actions").height();a&&!i.container.hasClass("open")?(c.unchanged?f=c.completeCallback:(j.scrollTop(0),d=function(){var a,b;a=window.matchMedia||window.msMatchMedia,b=90,a&&a("(max-width: 640px)").matches&&(b=45),k.css("height",window.innerHeight-b)},f=function(){i.container.addClass("open"),l.addClass("section-open"),g=k.offset().top,h=j.scrollTop(),k.css("margin-top",o-g-h),d(),n.attr("tabindex","-1"),m.attr("tabindex","0"),m.focus(),c.completeCallback&&c.completeCallback(),b(window).on("resize.customizer-section",_.debounce(d,100)),setTimeout(_.bind(i._recalculateTopMargin,i),0)}),c.allowMultiple||e.section.each(function(a){a!==i&&a.collapse({duration:c.duration})}),i.panel()?e.panel(i.panel()).expand({duration:c.duration,completeCallback:f}):(e.panel.each(function(a){a.collapse()}),f())):!a&&i.container.hasClass("open")?(i.container.removeClass("open"),l.removeClass("section-open"),k.css("margin-top",""),j.scrollTop(0),m.attr("tabindex","-1"),n.attr("tabindex","0"),n.focus(),c.completeCallback&&c.completeCallback(),b(window).off("resize.customizer-section")):c.completeCallback&&c.completeCallback()},_recalculateTopMargin:function(){var a,c,d,e=this;a=e.container.find(".accordion-section-content"),0!==a.length&&(d=b("#customize-header-actions").height(),c=a.offset().top-d,c>0&&a.css("margin-top",parseInt(a.css("margin-top"),10)-c))}}),e.ThemesSection=e.Section.extend({currentTheme:"",overlay:"",template:"",screenshotQueue:null,$window:b(window),initialize:function(){return this.$customizeSidebar=b(".wp-full-overlay-sidebar-content:first"),e.Section.prototype.initialize.apply(this,arguments)},ready:function(){var a=this;a.overlay=a.container.find(".theme-overlay"),a.template=wp.template("customize-themes-details-view"),b("body").on("keyup",function(b){a.overlay.find(".theme-wrap").is(":visible")&&(39===b.keyCode&&a.nextTheme(),37===b.keyCode&&a.previousTheme(),27===b.keyCode&&a.closeDetails())}),_.bindAll(this,"renderScreenshots")},isContextuallyActive:function(){return this.active()},attachEvents:function(){var a=this;a.container.find(".change-theme, .customize-theme").on("click keydown",function(b){e.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),a.expanded()?a.collapse():a.expand())}),a.container.on("click keydown",".left",function(b){e.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),a.previousTheme())}),a.container.on("click keydown",".right",function(b){e.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),a.nextTheme())}),a.container.on("click keydown",".theme-backdrop, .close",function(b){e.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),a.closeDetails())});var b=_.throttle(_.bind(a.renderScreenshots,this),100);a.container.on("input","#themes-filter",function(c){var d,e=c.currentTarget.value.toLowerCase().trim().replace("-"," "),f=a.controls();_.each(f,function(a){a.filter(e)}),b(),d=a.container.find("li.customize-control:visible").length,a.container.find(".theme-count").text(d)}),e.bind("ready",function(){_.each(a.controls().slice(0,3),function(a){var b,c=a.params.theme.screenshot[0];c&&(b=new Image,b.src=c)})})},onChangeExpanded:function(a,c){if(c.unchanged)return void(c.completeCallback&&c.completeCallback());var d,f,g=this,h=g.container.closest(".accordion-section"),i=h.closest(".wp-full-overlay"),j=h.closest(".wp-full-overlay-sidebar-content"),k=j.find(".open"),l=h.find(".customize-theme"),m=h.find(".change-theme"),n=h.find(".control-panel-content");a?(e.section.each(function(a){a!==g&&a.collapse({duration:c.duration})}),e.panel.each(function(a){a.collapse({duration:0})}),n.show(0,function(){d=n.offset().top,f=j.scrollTop(),n.css("margin-top",b("#customize-header-actions").height()-d-f),h.addClass("current-panel"),i.addClass("in-themes-panel"),j.scrollTop(0),_.delay(g.renderScreenshots,10),g.$customizeSidebar.on("scroll.customize-themes-section",_.throttle(g.renderScreenshots,300)),c.completeCallback&&c.completeCallback()}),l.focus()):(k.removeClass("open"),h.removeClass("current-panel"),i.removeClass("in-themes-panel"),g.$customizeSidebar.off("scroll.customize-themes-section"),n.delay(180).hide(0,function(){n.css("margin-top","inherit"),c.completeCallback&&c.completeCallback()}),l.attr("tabindex","0"),m.focus(),j.scrollTop(0))},_recalculateTopMargin:function(){e.Panel.prototype._recalculateTopMargin.call(this)},renderScreenshots:function(){var a=this;null===a.screenshotQueue&&(a.screenshotQueue=a.controls()),a.screenshotQueue.length&&(a.screenshotQueue=_.filter(a.screenshotQueue,function(b){var c=b.container.find(".theme-screenshot"),d=c.find("img");if(!d.length)return!1;if(d.is(":hidden"))return!0;var e=a.$window.scrollTop(),f=e+a.$window.height(),g=d.offset().top,h=c.height(),i=g+h,j=3*h,k=i>=e-j&&f+j>=g;return k&&b.container.trigger("render-screenshot"),!k}))},nextTheme:function(){var a=this;a.getNextTheme()&&a.showDetails(a.getNextTheme(),function(){a.overlay.find(".right").focus()})},getNextTheme:function(){var a,b;return a=e.control("theme_"+this.currentTheme),b=a.container.next("li.customize-control-theme"),b.length?(b=b[0].id.replace("customize-control-",""),a=e.control(b),a.params.theme):!1},previousTheme:function(){var a=this;a.getPreviousTheme()&&a.showDetails(a.getPreviousTheme(),function(){a.overlay.find(".left").focus()})},getPreviousTheme:function(){var a,b;return a=e.control("theme_"+this.currentTheme),b=a.container.prev("li.customize-control-theme"),b.length?(b=b[0].id.replace("customize-control-",""),a=e.control(b),a.params.theme):!1},updateLimits:function(){this.getNextTheme()||this.overlay.find(".right").addClass("disabled"),this.getPreviousTheme()||this.overlay.find(".left").addClass("disabled")},showDetails:function(a,c){var d=this;c=c||function(){},d.currentTheme=a.id,d.overlay.html(d.template(a)).fadeIn("fast").focus(),b("body").addClass("modal-open"),d.containFocus(d.overlay),d.updateLimits(),c()},closeDetails:function(){b("body").removeClass("modal-open"),this.overlay.fadeOut("fast"),e.control("theme_"+this.currentTheme).focus()},containFocus:function(a){var c;a.on("keydown",function(d){return 9===d.keyCode?(c=b(":tabbable",a),c.last()[0]!==d.target||d.shiftKey?c.first()[0]===d.target&&d.shiftKey?(c.last().focus(),!1):void 0:(c.first().focus(),!1)):void 0})}}),e.Panel=c.extend({containerType:"panel",initialize:function(a,b){var d=this;c.prototype.initialize.call(d,a,b),d.embed(),d.deferred.embedded.done(function(){d.ready()})},embed:function(){var a=this,c=b("#customize-theme-controls > ul");a.container.parent().is(c)||(c.append(a.container),a.renderContent()),e.bind("pane-contents-reflowed",_.debounce(function(){a._recalculateTopMargin()},100)),a.deferred.embedded.resolve()},attachEvents:function(){var a,c=this;c.container.find(".accordion-section-title").on("click keydown",function(a){e.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),c.expanded()||c.expand())}),c.container.find(".customize-panel-back").on("click keydown",function(a){e.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),c.expanded()&&c.collapse())}),a=c.container.find(".panel-meta:first"),a.find("> .accordion-section-title .customize-help-toggle").on("click keydown",function(d){if(!e.utils.isKeydownButNotEnterEvent(d)&&(d.preventDefault(),a=c.container.find(".panel-meta"),!a.hasClass("cannot-expand"))){var f=a.find(".customize-panel-description:first");a.hasClass("open")?(a.toggleClass("open"),f.slideUp(c.defaultExpandedArguments.duration),b(this).attr("aria-expanded",!1)):(f.slideDown(c.defaultExpandedArguments.duration),a.toggleClass("open"),b(this).attr("aria-expanded",!0))}})},sections:function(){return this._children("panel","section")},isContextuallyActive:function(){var a=this,b=a.sections(),c=0;return _(b).each(function(a){a.active()&&a.isContextuallyActive()&&(c+=1)}),0!==c},onChangeExpanded:function(a,c){if(c.unchanged)return void(c.completeCallback&&c.completeCallback());var d,f,g=this,h=g.container.closest(".accordion-section"),i=h.closest(".wp-full-overlay"),j=h.closest(".wp-full-overlay-sidebar-content"),k=j.find(".open"),l=i.find("#customize-theme-controls > ul > .accordion-section > .accordion-section-title"),m=h.find(".customize-panel-back"),n=h.find(".accordion-section-title").first(),o=h.find(".control-panel-content"),p=b("#customize-header-actions").height();a?(e.section.each(function(a){g.id!==a.panel()&&a.collapse({duration:0})}),e.panel.each(function(a){g!==a&&a.collapse({duration:0})}),o.show(0,function(){o.parent().show(),d=o.offset().top,f=j.scrollTop(),o.css("margin-top",p-d-f),h.addClass("current-panel"),i.addClass("in-sub-panel"),j.scrollTop(0),c.completeCallback&&c.completeCallback()}),l.attr("tabindex","-1"),m.attr("tabindex","0"),m.focus(),g._recalculateTopMargin()):(k.removeClass("open"),h.removeClass("current-panel"),i.removeClass("in-sub-panel"),o.delay(180).hide(0,function(){o.css("margin-top","inherit"),c.completeCallback&&c.completeCallback()}),l.attr("tabindex","0"),m.attr("tabindex","-1"),n.focus(),j.scrollTop(0))},_recalculateTopMargin:function(){var a,c,d,e=this;a=b("#customize-header-actions").height(),d=e.container.closest(".accordion-section"),c=d.find(".control-panel-content"),c.css("margin-top",parseInt(c.css("margin-top"),10)-(c.offset().top-a))},renderContent:function(){var a,c=this;a=0!==b("#tmpl-"+c.templateSelector+"-content").length?wp.template(c.templateSelector+"-content"):wp.template("customize-panel-default-content"),a&&c.container&&c.container.find(".accordion-sub-container").html(a(c.params))}}),e.Control=e.Class.extend({defaultActiveArguments:{duration:"fast",completeCallback:b.noop},initialize:function(a,c){var d,f,g,h=this;h.params={},b.extend(h,c||{}),h.id=a,h.selector="#customize-control-"+a.replace(/\]/g,"").replace(/\[/g,"-"),h.templateSelector="customize-control-"+h.params.type+"-content",h.container=b(h.params.content?h.params.content:h.selector),h.deferred={embedded:new b.Deferred},h.section=new e.Value,h.priority=new e.Value,h.active=new e.Value,h.activeArgumentsQueue=[],h.elements=[],d=h.container.find("[data-customize-setting-link]"),f={},d.each(function(){var a,c=b(this);if(c.is(":radio")){if(a=c.prop("name"),f[a])return;f[a]=!0,c=d.filter('[name="'+a+'"]')}e(c.data("customizeSettingLink"),function(a){var b=new e.Element(c);h.elements.push(b),b.sync(a),b.set(a())})}),h.active.bind(function(a){var c=h.activeArgumentsQueue.shift();c=b.extend({},h.defaultActiveArguments,c),h.onChangeActive(a,c)}),h.section.set(h.params.section),h.priority.set(isNaN(h.params.priority)?10:h.params.priority),h.active.set(h.params.active),e.utils.bubbleChildValueChanges(h,["section","priority","active"]),g=b.map(h.params.settings,function(a){return a}),0===g.length?(h.setting=null,h.settings={},h.embed()):e.apply(e,g.concat(function(){var a;h.settings={};for(a in h.params.settings)h.settings[a]=e(h.params.settings[a]);h.setting=h.settings["default"]||null,h.embed()})),h.deferred.embedded.done(function(){h.ready()})},embed:function(){var a,b=this;a=function(a){var c;a&&e.section(a,function(a){a.deferred.embedded.done(function(){c=a.container.find("ul:first"),b.container.parent().is(c)||(c.append(b.container),b.renderContent()),b.deferred.embedded.resolve()})})},b.section.bind(a),a(b.section.get())},ready:function(){},expand:function(a){e.section(this.section()).expand(a)},focus:d,onChangeActive:function(a,c){return c.unchanged?void(c.completeCallback&&c.completeCallback()):void(b.contains(document,this.container[0])?a?this.container.slideDown(c.duration,c.completeCallback):this.container.slideUp(c.duration,c.completeCallback):(this.container.toggle(a),c.completeCallback&&c.completeCallback()))},toggle:function(a){return this.onChangeActive(a,this.defaultActiveArguments)},activate:c.prototype.activate,deactivate:c.prototype.deactivate,_toggleActive:c.prototype._toggleActive,dropdownInit:function(){var a=this,b=this.container.find(".dropdown-status"),c=this.params,d=!1,f=function(a){"string"==typeof a&&c.statuses&&c.statuses[a]?b.html(c.statuses[a]).show():b.hide()};this.container.on("click keydown",".dropdown",function(b){e.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),d||a.container.toggleClass("open"),a.container.hasClass("open")&&a.container.parent().parent().find("li.library-selected").focus(),d=!0,setTimeout(function(){d=!1},400))}),this.setting.bind(f),f(this.setting())},renderContent:function(){var a,c=this;0!==b("#tmpl-"+c.templateSelector).length&&(a=wp.template(c.templateSelector),a&&c.container&&c.container.html(a(c.params)))}}),e.ColorControl=e.Control.extend({ready:function(){var a=this,b=this.container.find(".color-picker-hex");b.val(a.setting()).wpColorPicker({change:function(){a.setting.set(b.wpColorPicker("color"))},clear:function(){a.setting.set("")}}),this.setting.bind(function(a){b.val(a),b.wpColorPicker("color",a)})}}),e.MediaControl=e.Control.extend({ready:function(){var a=this;_.bindAll(a,"restoreDefault","removeFile","openFrame","select","pausePlayer"),a.container.on("click keydown",".upload-button",a.openFrame),a.container.on("click keydown",".upload-button",a.pausePlayer),a.container.on("click keydown",".thumbnail-image img",a.openFrame),a.container.on("click keydown",".default-button",a.restoreDefault),a.container.on("click keydown",".remove-button",a.pausePlayer),a.container.on("click keydown",".remove-button",a.removeFile),a.container.on("click keydown",".remove-button",a.cleanupPlayer),e.section(a.section()).container.on("expanded",function(){a.player&&a.player.setControlsSize()}).on("collapsed",function(){a.pausePlayer()}),a.setting.bind(function(b){wp.media.attachment(b).fetch().done(function(){wp.customize.previewer.send(a.setting.id+"-attachment-data",this.attributes)}),a.renderContent()})},pausePlayer:function(){this.player&&this.player.pause()},cleanupPlayer:function(){this.player&&wp.media.mixin.removePlayer(this.player)},openFrame:function(a){e.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),this.frame||this.initFrame(),this.frame.open())},initFrame:function(){this.frame=wp.media({button:{text:this.params.button_labels.frame_button},states:[new wp.media.controller.Library({title:this.params.button_labels.frame_title,library:wp.media.query({type:this.params.mime_type}),multiple:!1,date:!1})]}),this.frame.on("select",this.select)},select:function(){var a,b=this.frame.state().get("selection").first().toJSON(),c=window._wpmejsSettings||{};this.params.attachment=b,this.setting(b.id),a=this.container.find("audio, video").get(0),a?this.player=new MediaElementPlayer(a,c):this.cleanupPlayer()},restoreDefault:function(a){e.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),this.params.attachment=this.params.defaultAttachment,this.setting(this.params.defaultAttachment.url))},removeFile:function(a){e.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),this.params.attachment={},this.setting(""),this.renderContent())}}),e.UploadControl=e.MediaControl.extend({select:function(){var a,b=this.frame.state().get("selection").first().toJSON(),c=window._wpmejsSettings||{};this.params.attachment=b,this.setting(b.url),a=this.container.find("audio, video").get(0),a?this.player=new MediaElementPlayer(a,c):this.cleanupPlayer()},success:function(){},removerVisibility:function(){}}),e.ImageControl=e.UploadControl.extend({thumbnailSrc:function(){}}),e.BackgroundControl=e.UploadControl.extend({ready:function(){e.UploadControl.prototype.ready.apply(this,arguments)},select:function(){e.UploadControl.prototype.select.apply(this,arguments),wp.ajax.post("custom-background-add",{nonce:_wpCustomizeBackground.nonces.add,wp_customize:"on",theme:e.settings.theme.stylesheet,attachment_id:this.params.attachment.id})}}),e.CroppedImageControl=e.MediaControl.extend({openFrame:function(a){e.utils.isKeydownButNotEnterEvent(a)||(this.initFrame(),this.frame.setState("library").open())},initFrame:function(){var a=_wpMediaViewsL10n;this.frame=wp.media({button:{text:a.select,close:!1},states:[new wp.media.controller.Library({title:this.params.button_labels.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.CustomizeImageCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelect,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){var a=this.frame.state().get("selection").first().toJSON();this.params.width!==a.width||this.params.height!==a.height||this.params.flex_width||this.params.flex_height?this.frame.setState("cropper"):(this.setImageFromAttachment(a),this.frame.close())},onCropped:function(a){this.setImageFromAttachment(a)},calculateImageSelectOptions:function(a,b){var c,d,e,f=b.get("control"),g=!!parseInt(f.params.flex_width,10),h=!!parseInt(f.params.flex_height,10),i=a.get("width"),j=a.get("height"),k=parseInt(f.params.width,10),l=parseInt(f.params.height,10),m=k/l,n=k,o=l;return b.set("canSkipCrop",!f.mustBeCropped(g,h,k,l,i,j)),i/j>m?(l=j,k=l*m):(k=i,l=k/m),c=(i-k)/2,d=(j-l)/2,e={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:i,imageHeight:j,minWidth:n>k?k:n,minHeight:o>l?l:o,x1:c,y1:d,x2:k+c,y2:l+d},h===!1&&g===!1&&(e.aspectRatio=k+":"+l),!0===h&&(delete e.minHeight,e.maxWidth=i),!0===g&&(delete e.minWidth,e.maxHeight=j),e},mustBeCropped:function(a,b,c,d,e,f){return!0===a&&!0===b?!1:!0===a&&d===f?!1:!0===b&&c===e?!1:c===e&&d===f?!1:c>=e?!1:!0},onSkippedCrop:function(){var a=this.frame.state().get("selection").first().toJSON();this.setImageFromAttachment(a)},setImageFromAttachment:function(a){this.params.attachment=a,this.setting(a.id)}}),e.SiteIconControl=e.CroppedImageControl.extend({initFrame:function(){var a=_wpMediaViewsL10n;this.frame=wp.media({button:{text:a.select,close:!1},states:[new wp.media.controller.Library({title:this.params.button_labels.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.SiteIconCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelect,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){var a=this.frame.state().get("selection").first().toJSON(),b=this;this.params.width!==a.width||this.params.height!==a.height||this.params.flex_width||this.params.flex_height?this.frame.setState("cropper"):wp.ajax.post("crop-image",{nonce:a.nonces.edit,id:a.id,context:"site-icon",cropDetails:{x1:0,y1:0,width:this.params.width,height:this.params.height,dst_width:this.params.width,dst_height:this.params.height}}).done(function(a){b.setImageFromAttachment(a),b.frame.close()}).fail(function(){b.trigger("content:error:crop")})},setImageFromAttachment:function(a){var c,d=["site_icon-32","thumbnail","full"];_.each(d,function(b){c||_.isUndefined(a.sizes[b])||(c=a.sizes[b])}),this.params.attachment=a,this.setting(a.id),b('link[sizes="32x32"]').attr("href",c.url)},removeFile:function(a){e.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),this.params.attachment={},this.setting(""),this.renderContent(),b('link[rel="icon"]').attr("href",""))}}),e.HeaderControl=e.Control.extend({ready:function(){this.btnRemove=b("#customize-control-header_image .actions .remove"),this.btnNew=b("#customize-control-header_image .actions .new"),_.bindAll(this,"openMedia","removeImage"),this.btnNew.on("click",this.openMedia),this.btnRemove.on("click",this.removeImage),e.HeaderTool.currentHeader=this.getInitialHeaderImage(),new e.HeaderTool.CurrentView({model:e.HeaderTool.currentHeader,el:"#customize-control-header_image .current .container"}),new e.HeaderTool.ChoiceListView({collection:e.HeaderTool.UploadsList=new e.HeaderTool.ChoiceList,el:"#customize-control-header_image .choices .uploaded .list"}),new e.HeaderTool.ChoiceListView({collection:e.HeaderTool.DefaultsList=new e.HeaderTool.DefaultsList,el:"#customize-control-header_image .choices .default .list"}),e.HeaderTool.combinedList=e.HeaderTool.CombinedList=new e.HeaderTool.CombinedList([e.HeaderTool.UploadsList,e.HeaderTool.DefaultsList]),wp.media.controller.Cropper.prototype.defaults.doCropArgs.wp_customize="on",wp.media.controller.Cropper.prototype.defaults.doCropArgs.theme=e.settings.theme.stylesheet},getInitialHeaderImage:function(){if(!e.get().header_image||!e.get().header_image_data||_.contains(["remove-header","random-default-image","random-uploaded-image"],e.get().header_image))return new e.HeaderTool.ImageModel;var a=_.find(_wpCustomizeHeader.uploads,function(a){return a.attachment_id===e.get().header_image_data.attachment_id});return a||(a={url:e.get().header_image,thumbnail_url:e.get().header_image,attachment_id:e.get().header_image_data.attachment_id}),new e.HeaderTool.ImageModel({header:a,choice:a.url.split("/").pop()})},calculateImageSelectOptions:function(a,b){var c,d,f,g,h,i,j=parseInt(_wpCustomizeHeader.data.width,10),k=parseInt(_wpCustomizeHeader.data.height,10),l=!!parseInt(_wpCustomizeHeader.data["flex-width"],10),m=!!parseInt(_wpCustomizeHeader.data["flex-height"],10);return h=a.get("width"),g=a.get("height"),this.headerImage=new e.HeaderTool.ImageModel,this.headerImage.set({themeWidth:j,themeHeight:k,themeFlexWidth:l,themeFlexHeight:m,imageWidth:h,imageHeight:g}),b.set("canSkipCrop",!this.headerImage.shouldBeCropped()),c=j/k,d=h,f=g,d/f>c?(k=f,j=k*c):(j=d,k=j/c),i={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:h,imageHeight:g,x1:0,y1:0,x2:j,y2:k},m===!1&&l===!1&&(i.aspectRatio=j+":"+k),m===!1&&(i.maxHeight=k),l===!1&&(i.maxWidth=j),i},openMedia:function(a){var b=_wpMediaViewsL10n;a.preventDefault(),this.frame=wp.media({button:{text:b.selectAndCrop,close:!1},states:[new wp.media.controller.Library({title:b.chooseImage,library:wp.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:_wpCustomizeHeader.data.width,suggestedHeight:_wpCustomizeHeader.data.height}),new wp.media.controller.Cropper({imgSelectOptions:this.calculateImageSelectOptions})]}),this.frame.on("select",this.onSelect,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this),this.frame.open()},onSelect:function(){this.frame.setState("cropper")},onCropped:function(a){var b=a.url,c=a.attachment_id,d=a.width,e=a.height;this.setImageFromURL(b,c,d,e)},onSkippedCrop:function(a){var b=a.get("url"),c=a.get("width"),d=a.get("height");this.setImageFromURL(b,a.id,c,d)},setImageFromURL:function(a,b,c,d){var f,g={};g.url=a,g.thumbnail_url=a,g.timestamp=_.now(),b&&(g.attachment_id=b),c&&(g.width=c),d&&(g.height=d),f=new e.HeaderTool.ImageModel({header:g,choice:a.split("/").pop()}),e.HeaderTool.UploadsList.add(f),e.HeaderTool.currentHeader.set(f.toJSON()),f.save(),f.importImage()},removeImage:function(){e.HeaderTool.currentHeader.trigger("hide"),e.HeaderTool.CombinedList.trigger("control:removeImage")}}),e.ThemeControl=e.Control.extend({touchDrag:!1,isRendered:!1,renderContent:function(){var a=this,b=arguments;e.section(a.section(),function(c){c.expanded()?(e.Control.prototype.renderContent.apply(a,b),a.isRendered=!0):c.expanded.bind(function(c){c&&!a.isRendered&&(e.Control.prototype.renderContent.apply(a,b),a.isRendered=!0)})})},ready:function(){var a=this;a.container.on("touchmove",".theme",function(){a.touchDrag=!0}),a.container.on("click keydown touchend",".theme",function(c){if(!e.utils.isKeydownButNotEnterEvent(c)){if(a.touchDrag===!0)return a.touchDrag=!1;if(!b(c.target).is(".theme-actions .button")){var d=b(this).data("previewUrl");b(".wp-full-overlay").addClass("customize-loading"),window.parent.location=d}}}),a.container.on("click keydown",".theme-actions .theme-details",function(b){e.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),e.section(a.section()).showDetails(a.params.theme))}),a.container.on("render-screenshot",function(){var a=b(this).find("img"),c=a.data("src");c&&a.attr("src",c)})},filter:function(a){var b=this,c=b.params.theme.name+" "+b.params.theme.description+" "+b.params.theme.tags+" "+b.params.theme.author;c=c.toLowerCase().replace("-"," "),-1!==c.search(a)?b.activate():b.deactivate()}}),e.defaultConstructor=e.Setting,e.control=new e.Values({defaultConstructor:e.Control}),e.section=new e.Values({defaultConstructor:e.Section}),e.panel=new e.Values({defaultConstructor:e.Panel}),e.PreviewFrame=e.Messenger.extend({sensitivity:2e3,initialize:function(a,c){var d=b.Deferred();d.promise(this),this.container=a.container,this.signature=a.signature,b.extend(a,{channel:e.PreviewFrame.uuid()}),e.Messenger.prototype.initialize.call(this,a,c),this.add("previewUrl",a.previewUrl),this.query=b.extend(a.query||{},{customize_messenger_channel:this.channel()}),this.run(d)},run:function(a){var c=this,d=!1,f=!1;this._ready&&this.unbind("ready",this._ready),this._ready=function(){f=!0,d&&a.resolveWith(c)},this.bind("ready",this._ready),this.bind("ready",function(a){if(this.container.addClass("iframe-ready"),a){var b={panel:a.activePanels,section:a.activeSections,control:a.activeControls};_(b).each(function(a,b){e[b].each(function(b,c){var d=!(!a||!a[c]);d?b.activate():b.deactivate()})})}}),this.request=b.ajax(this.previewUrl(),{type:"POST",data:this.query,xhrFields:{withCredentials:!0}}),this.request.fail(function(){a.rejectWith(c,["request failure"]);
-}),this.request.done(function(g){var h,i=c.request.getResponseHeader("Location"),j=c.signature;return i&&i!==c.previewUrl()?void a.rejectWith(c,["redirect",i]):"0"===g?void c.login(a):"-1"===g?void a.rejectWith(c,["cheatin"]):(h=g.lastIndexOf(j),-1===h||h<g.lastIndexOf("</html>")?void a.rejectWith(c,["unsigned"]):(g=g.slice(0,h)+g.slice(h+j.length),c.iframe=b("<iframe />",{title:e.l10n.previewIframeTitle}).appendTo(c.container),c.iframe.one("load",function(){d=!0,f?a.resolveWith(c):setTimeout(function(){a.rejectWith(c,["ready timeout"])},c.sensitivity)}),c.targetWindow(c.iframe[0].contentWindow),c.targetWindow().document.open(),c.targetWindow().document.write(g),void c.targetWindow().document.close()))})},login:function(a){var c,d=this;return c=function(){a.rejectWith(d,["logged out"])},this.triedLogin?c():void b.get(e.settings.url.ajax,{action:"logged-in"}).fail(c).done(function(f){var g;"1"!==f&&c(),g=b("<iframe />",{src:d.previewUrl(),title:e.l10n.previewIframeTitle}).hide(),g.appendTo(d.container),g.on("load",function(){d.triedLogin=!0,g.remove(),d.run(a)})})},destroy:function(){e.Messenger.prototype.destroy.call(this),this.request.abort(),this.iframe&&this.iframe.remove(),delete this.request,delete this.iframe,delete this.targetWindow}}),function(){var a=0;e.PreviewFrame.uuid=function(){return"preview-"+a++}}(),e.setDocumentTitle=function(a){var b,c;b=e.settings.documentTitleTmpl,c=b.replace("%s",a),document.title=c,e.trigger("title",c)},e.Previewer=e.Messenger.extend({refreshBuffer:250,initialize:function(a,c){var d=this,f=/^https?/;b.extend(this,c||{}),this.deferred={active:b.Deferred()},this.refresh=function(a){var b,c=a.refresh,d=function(){b=null,c.call(a)};return function(){if("number"!=typeof b){if(!a.loading)return d();a.abort()}clearTimeout(b),b=setTimeout(d,a.refreshBuffer)}}(this),this.container=e.ensure(a.container),this.allowedUrls=a.allowedUrls,this.signature=a.signature,a.url=window.location.href,e.Messenger.prototype.initialize.call(this,a),this.add("scheme",this.origin()).link(this.origin).setter(function(a){var b=a.match(f);return b?b[0]:""}),this.add("previewUrl",a.previewUrl).setter(function(a){var c;return/\/wp-admin(\/|$)/.test(a.replace(/[#?].*$/,""))?null:(b.each([a.replace(f,d.scheme()),a],function(a,e){return b.each(d.allowedUrls,function(a,b){var d;return b=b.replace(/\/+$/,""),d=e.replace(b,""),0===e.indexOf(b)&&/^([/#?]|$)/.test(d)?(c=e,!1):void 0}),c?!1:void 0}),c?c:null)}),this.previewUrl.bind(this.refresh),this.scroll=0,this.bind("scroll",function(a){this.scroll=a}),this.bind("url",this.previewUrl),this.bind("documentTitle",function(a){e.setDocumentTitle(a)})},query:function(){},abort:function(){this.loading&&(this.loading.destroy(),delete this.loading)},refresh:function(){var a=this;this.send("loading-initiated"),this.abort(),this.loading=new e.PreviewFrame({url:this.url(),previewUrl:this.previewUrl(),query:this.query()||{},container:this.container,signature:this.signature}),this.loading.done(function(){this.bind("synced",function(){a.preview&&a.preview.destroy(),a.preview=this,delete a.loading,a.targetWindow(this.targetWindow()),a.channel(this.channel()),a.deferred.active.resolve(),a.send("active")}),this.send("sync",{scroll:a.scroll,settings:e.get()})}),this.loading.fail(function(b,c){a.send("loading-failed"),"redirect"===b&&c&&a.previewUrl(c),"logged out"===b&&(a.preview&&(a.preview.destroy(),delete a.preview),a.login().done(a.refresh)),"cheatin"===b&&a.cheatin()})},login:function(){var a,c,d,f=this;return this._login?this._login:(a=b.Deferred(),this._login=a.promise(),c=new e.Messenger({channel:"login",url:e.settings.url.login}),d=b("<iframe />",{src:e.settings.url.login,title:e.l10n.loginIframeTitle}).appendTo(this.container),c.targetWindow(d[0].contentWindow),c.bind("login",function(){var b=f.refreshNonces();b.always(function(){d.remove(),c.destroy(),delete f._login}),b.done(function(){a.resolve()}),b.fail(function(){f.cheatin(),a.reject()})}),this._login)},cheatin:function(){b(document.body).empty().addClass("cheatin").append("<h1>"+e.l10n.cheatin+"</h1><p>"+e.l10n.notAllowed+"</p>")},refreshNonces:function(){var a,c=b.Deferred();return c.promise(),a=wp.ajax.post("customize_refresh_nonces",{wp_customize:"on",theme:e.settings.theme.stylesheet}),a.done(function(a){e.trigger("nonce-refresh",a),c.resolve()}),a.fail(function(){c.reject()}),c}}),e.controlConstructor={color:e.ColorControl,media:e.MediaControl,upload:e.UploadControl,image:e.ImageControl,cropped_image:e.CroppedImageControl,site_icon:e.SiteIconControl,header:e.HeaderControl,background:e.BackgroundControl,theme:e.ThemeControl},e.panelConstructor={},e.sectionConstructor={themes:e.ThemesSection},b(function(){if(e.settings=window._wpCustomizeSettings,e.l10n=window._wpCustomizeControlsL10n,e.settings&&b.support.postMessage&&(b.support.cors||!e.settings.isCrossDomain)){var a,c,d=b(document.body),f=d.children(".wp-full-overlay"),g=b("#customize-info .panel-title.site-title"),h=b(".customize-controls-close"),i=b("#save"),j=b("#customize-footer-actions");b("#customize-controls").on("keydown",function(a){var c=13===a.which,d=b(a.target);c&&(d.is("input:not([type=button])")||d.is("select"))&&a.preventDefault()}),b(".customize-info").find("> .accordion-section-title .customize-help-toggle").on("click keydown",function(a){if(!e.utils.isKeydownButNotEnterEvent(a)){a.preventDefault();var c=b(this).closest(".accordion-section"),d=c.find(".customize-panel-description:first");c.hasClass("cannot-expand")||(c.hasClass("open")?(c.toggleClass("open"),d.slideUp(e.Panel.prototype.defaultExpandedArguments.duration),b(this).attr("aria-expanded",!1)):(d.slideDown(e.Panel.prototype.defaultExpandedArguments.duration),c.toggleClass("open"),b(this).attr("aria-expanded",!0)))}}),e.previewer=new e.Previewer({container:"#customize-preview",form:"#customize-controls",previewUrl:e.settings.url.preview,allowedUrls:e.settings.url.allowed,signature:"WP_CUSTOMIZER_SIGNATURE"},{nonce:e.settings.nonce,query:function(){var a={};return e.each(function(b,c){b._dirty&&(a[c]=b())}),{wp_customize:"on",theme:e.settings.theme.stylesheet,customized:JSON.stringify(a),nonce:this.nonce.preview}},save:function(){var a,c,f=this,g=e.state("processing");d.addClass("saving"),c=function(){var a,c;c=b.extend(f.query(),{nonce:f.nonce.save}),a=wp.ajax.post("customize_save",c),e.trigger("save",a),a.always(function(){d.removeClass("saving")}),a.fail(function(a){"0"===a?a="not_logged_in":"-1"===a&&(a="invalid_nonce"),"invalid_nonce"===a?f.cheatin():"not_logged_in"===a&&(f.preview.iframe.hide(),f.login().done(function(){f.save(),f.preview.iframe.show()})),e.trigger("error",a)}),a.done(function(a){e.each(function(a){a._dirty=!1}),e.previewer.send("saved",a),e.trigger("saved",a)})},0===g()?c():(a=function(){0===g()&&(e.state.unbind("change",a),c())},e.state.bind("change",a))}}),e.previewer.bind("nonce",function(a){b.extend(this.nonce,a)}),e.bind("nonce-refresh",function(a){b.extend(e.settings.nonce,a),b.extend(e.previewer.nonce,a),e.previewer.send("nonce-refresh",a)}),b.each(e.settings.settings,function(a,b){e.create(a,a,b.value,{transport:b.transport,previewer:e.previewer,dirty:!!b.dirty})}),b.each(e.settings.panels,function(a,b){var c,d=e.panelConstructor[b.type]||e.Panel;c=new d(a,{params:b}),e.panel.add(a,c)}),b.each(e.settings.sections,function(a,b){var c,d=e.sectionConstructor[b.type]||e.Section;c=new d(a,{params:b}),e.section.add(a,c)}),b.each(e.settings.controls,function(a,b){var c,d=e.controlConstructor[b.type]||e.Control;c=new d(a,{params:b,previewer:e.previewer}),e.control.add(a,c)}),_.each(["panel","section","control"],function(a){var b=e.settings.autofocus[a];b&&e[a](b,function(a){a.deferred.embedded.done(function(){e.previewer.deferred.active.done(function(){a.focus()})})})}),e.reflowPaneContents=_.bind(function(){var a,c,d,f=[],g=!1;document.activeElement&&(c=b(document.activeElement)),e.panel.each(function(b){var c=b.sections(),d=_.pluck(c,"container");f.push(b),a=b.container.find("ul:first"),e.utils.areElementListsEqual(d,a.children("[id]"))||(_(c).each(function(b){a.append(b.container)}),g=!0)}),e.section.each(function(b){var c=b.controls(),d=_.pluck(c,"container");b.panel()||f.push(b),a=b.container.find("ul:first"),e.utils.areElementListsEqual(d,a.children("[id]"))||(_(c).each(function(b){a.append(b.container)}),g=!0)}),f.sort(e.utils.prioritySort),d=_.pluck(f,"container"),a=b("#customize-theme-controls").children("ul"),e.utils.areElementListsEqual(d,a.children())||(_(f).each(function(b){a.append(b.container)}),g=!0),e.panel.each(function(a){var b=a.active();a.active.callbacks.fireWith(a.active,[b,b])}),e.section.each(function(a){var b=a.active();a.active.callbacks.fireWith(a.active,[b,b])}),g&&c&&c.focus(),e.trigger("pane-contents-reflowed")},e),e.bind("ready",e.reflowPaneContents),e.reflowPaneContents=_.debounce(e.reflowPaneContents,100),b([e.panel,e.section,e.control]).each(function(a,b){b.bind("add",e.reflowPaneContents),b.bind("change",e.reflowPaneContents),b.bind("remove",e.reflowPaneContents)}),e.previewer.previewUrl()?e.previewer.refresh():e.previewer.previewUrl(e.settings.url.home),function(){var a=new e.Values,b=a.create("saved"),c=a.create("activated"),d=a.create("processing");a.bind("change",function(){c()?b()?(i.val(e.l10n.saved).prop("disabled",!0),h.find(".screen-reader-text").text(e.l10n.close)):(i.val(e.l10n.save).prop("disabled",!1),h.find(".screen-reader-text").text(e.l10n.cancel)):(i.val(e.l10n.activate).prop("disabled",!1),h.find(".screen-reader-text").text(e.l10n.cancel))}),b(!0),c(e.settings.theme.active),d(0),e.bind("change",function(){a("saved").set(!1)}),e.bind("saved",function(){a("saved").set(!0),a("activated").set(!0)}),c.bind(function(a){a&&e.trigger("activated")}),e.state=a}(),i.click(function(a){e.previewer.save(),a.preventDefault()}).keydown(function(a){9!==a.which&&(13===a.which&&e.previewer.save(),a.preventDefault())}),h.keydown(function(a){9!==a.which&&(13===a.which&&this.click(),a.preventDefault())}),b(".collapse-sidebar").on("click",function(){"true"===b(this).attr("aria-expanded")?b(this).attr({"aria-expanded":"false","aria-label":e.l10n.expandSidebar}):b(this).attr({"aria-expanded":"true","aria-label":e.l10n.collapseSidebar}),f.toggleClass("collapsed").toggleClass("expanded")}),b(".customize-controls-preview-toggle").on("click keydown",function(a){e.utils.isKeydownButNotEnterEvent(a)||(f.toggleClass("preview-only"),a.preventDefault())}),e.previewedDevice=new e.Value,e.bind("ready",function(){_.find(e.settings.previewableDevices,function(a,b){return!0===a["default"]?(e.previewedDevice.set(b),!0):void 0})}),j.find(".devices button").on("click",function(a){e.previewedDevice.set(b(a.currentTarget).data("device"))}),e.previewedDevice.bind(function(a){var c=b(".wp-full-overlay"),d="";j.find(".devices button").removeClass("active").attr("aria-pressed",!1),j.find(".devices .preview-"+a).addClass("active").attr("aria-pressed",!0),b.each(e.settings.previewableDevices,function(a){d+=" preview-"+a}),c.removeClass(d).addClass("preview-"+a)}),g.length&&e("blogname",function(a){var c=function(){g.text(b.trim(a())||e.l10n.untitledBlogName)};a.bind(c),c()}),a=new e.Messenger({url:e.settings.url.parent,channel:"loader"}),a.bind("back",function(){h.on("click.customize-controls-close",function(b){b.preventDefault(),a.send("close")})}),b(window).on("beforeunload",function(){return e.state("saved")()?void 0:(setTimeout(function(){f.removeClass("customize-loading")},1),e.l10n.saveAlert)}),b.each(["saved","change"],function(b,c){e.bind(c,function(){a.send(c)})}),e.bind("activated",function(){a.targetWindow()?a.send("activated",e.settings.url.activated):e.settings.url.activated&&(window.location=e.settings.url.activated)}),e.bind("title",function(b){a.send("title",b)}),a.send("ready"),b.each({background_image:{controls:["background_repeat","background_position_x","background_attachment"],callback:function(a){return!!a}},show_on_front:{controls:["page_on_front","page_for_posts"],callback:function(a){return"page"===a}},header_textcolor:{controls:["header_textcolor"],callback:function(a){return"blank"!==a}}},function(a,c){e(a,function(a){b.each(c.controls,function(b,d){e.control(d,function(b){var d=function(a){b.container.toggle(c.callback(a))};d(a.get()),a.bind(d)})})})}),e.control("display_header_text",function(a){var b="";a.elements[0].unsync(e("header_textcolor")),a.element=new e.Element(a.container.find("input")),a.element.set("blank"!==a.setting()),a.element.bind(function(c){c||(b=e("header_textcolor").get()),a.setting.set(c?b:"blank")}),a.setting.bind(function(b){a.element.set("blank"!==b)})}),e("show_on_front","page_on_front",function(a,b){var c=function(){"page"===a()&&parseInt(b(),10)>0&&e.previewer.previewUrl.set(e.settings.url.home)};a.bind(c),b.bind(c)}),e("page_for_posts",function(a){a.bind(function(a){a=parseInt(a,10),a>0&&e.previewer.previewUrl.set(e.settings.url.home+"?page_id="+a)})}),e.previewer.bind("focus-control-for-setting",function(a){var b;e.control.each(function(c){var d=_.pluck(c.settings,"id");-1!==_.indexOf(d,a)&&(b=c)}),b&&b.focus()}),e.previewer.bind("refresh",function(){e.previewer.refresh()}),e.trigger("ready"),c=h,c.focus(),setTimeout(function(){c.focus()},200)}})}(wp,jQuery);
\ No newline at end of file
+!function(a,b){var c,d,e=wp.customize;e.Setting=e.Value.extend({initialize:function(a,b,c){e.Value.prototype.initialize.call(this,b,c),this.id=a,this.transport=this.transport||"refresh",this._dirty=c.dirty||!1,this.notifications=new e.Values({defaultConstructor:e.Notification}),this.bind(this.preview)},preview:function(){switch(this.transport){case"refresh":return this.previewer.refresh();case"postMessage":return this.previewer.send("setting",[this.id,this()])}},findControls:function(){var a=this,b=[];return e.control.each(function(c){_.each(c.settings,function(d){d.id===a.id&&b.push(c)})}),b}}),e.utils={},e.utils.bubbleChildValueChanges=function(a,c){b.each(c,function(b,c){a[c].bind(function(b,c){a.parent&&b!==c&&a.parent.trigger("change",a)})})},d=function(a){var b,c,d,f;b=this,a=a||{},d=function(){var a;a=b.extended(e.Panel)&&b.expanded&&b.expanded()?b.container.find("ul.control-panel-content"):b.extended(e.Section)&&b.expanded&&b.expanded()?b.container.find("ul.accordion-section-content"):b.container,f=a.find(".control-focus:first"),0===f.length&&(f=a.find("input, select, textarea, button, object, a[href], [tabindex]").filter(":visible").first()),f.focus()},a.completeCallback?(c=a.completeCallback,a.completeCallback=function(){d(),c()}):a.completeCallback=d,b.expand?b.expand(a):a.completeCallback()},e.utils.prioritySort=function(a,b){return a.priority()===b.priority()&&"number"==typeof a.params.instanceNumber&&"number"==typeof b.params.instanceNumber?a.params.instanceNumber-b.params.instanceNumber:a.priority()-b.priority()},e.utils.isKeydownButNotEnterEvent=function(a){return"keydown"===a.type&&13!==a.which},e.utils.areElementListsEqual=function(a,c){var d=a.length===c.length&&-1===_.indexOf(_.map(_.zip(a,c),function(a){return b(a[0]).is(a[1])}),!1);return d},c=e.Class.extend({defaultActiveArguments:{duration:"fast",completeCallback:b.noop},defaultExpandedArguments:{duration:"fast",completeCallback:b.noop},containerType:"container",defaults:{title:"",description:"",priority:100,type:"default",content:null,active:!0,instanceNumber:null},initialize:function(a,c){var d=this;d.id=a,c=c||{},c.params=_.defaults(c.params||{},d.defaults),b.extend(d,c),d.templateSelector="customize-"+d.containerType+"-"+d.params.type,d.container=b(d.params.content),0===d.container.length&&(d.container=b(d.getContainer())),d.deferred={embedded:new b.Deferred},d.priority=new e.Value,d.active=new e.Value,d.activeArgumentsQueue=[],d.expanded=new e.Value,d.expandedArgumentsQueue=[],d.active.bind(function(a){var c=d.activeArgumentsQueue.shift();c=b.extend({},d.defaultActiveArguments,c),a=a&&d.isContextuallyActive(),d.onChangeActive(a,c)}),d.expanded.bind(function(a){var c=d.expandedArgumentsQueue.shift();c=b.extend({},d.defaultExpandedArguments,c),d.onChangeExpanded(a,c)}),d.deferred.embedded.done(function(){d.attachEvents()}),e.utils.bubbleChildValueChanges(d,["priority","active"]),d.priority.set(d.params.priority),d.active.set(d.params.active),d.expanded.set(!1)},ready:function(){},_children:function(a,b){var c=this,d=[];return e[b].each(function(b){b[a].get()===c.id&&d.push(b)}),d.sort(e.utils.prioritySort),d},isContextuallyActive:function(){throw new Error("Container.isContextuallyActive() must be overridden in a subclass.")},onChangeActive:function(a,c){var d,f,g=this;return c.unchanged?void(c.completeCallback&&c.completeCallback()):(d="resolved"===e.previewer.deferred.active.state()?c.duration:0,g.extended(e.Panel)&&(e.panel.each(function(a){a!==g&&a.expanded()&&(f=a,d=0)}),a||_.each(g.sections(),function(a){a.collapse({duration:0})})),b.contains(document,g.container[0])?a?g.container.stop(!0,!0).slideDown(d,c.completeCallback):g.expanded()?g.collapse({duration:d,completeCallback:function(){g.container.stop(!0,!0).slideUp(d,c.completeCallback)}}):g.container.stop(!0,!0).slideUp(d,c.completeCallback):(g.container.toggle(a),c.completeCallback&&c.completeCallback()),void(f&&f._recalculateTopMargin()))},_toggleActive:function(a,b){var c=this;return b=b||{},a&&this.active.get()||!a&&!this.active.get()?(b.unchanged=!0,c.onChangeActive(c.active.get(),b),!1):(b.unchanged=!1,this.activeArgumentsQueue.push(b),this.active.set(a),!0)},activate:function(a){return this._toggleActive(!0,a)},deactivate:function(a){return this._toggleActive(!1,a)},onChangeExpanded:function(){throw new Error("Must override with subclass.")},_toggleExpanded:function(a,b){var c,d=this;return b=b||{},c=b.completeCallback,!(a&&!d.active())&&(b.completeCallback=function(){c&&c.apply(d,arguments),a?d.container.trigger("expanded"):d.container.trigger("collapsed")},a&&d.expanded.get()||!a&&!d.expanded.get()?(b.unchanged=!0,d.onChangeExpanded(d.expanded.get(),b),!1):(b.unchanged=!1,d.expandedArgumentsQueue.push(b),d.expanded.set(a),!0))},expand:function(a){return this._toggleExpanded(!0,a)},collapse:function(a){return this._toggleExpanded(!1,a)},focus:d,getContainer:function(){var a,c=this;return a=0!==b("#tmpl-"+c.templateSelector).length?wp.template(c.templateSelector):wp.template("customize-"+c.containerType+"-default"),a&&c.container?b.trim(a(c.params)):"<li></li>"}}),e.Section=c.extend({containerType:"section",defaults:{title:"",description:"",priority:100,type:"default",content:null,active:!0,instanceNumber:null,panel:null,customizeAction:""},initialize:function(a,d){var f=this;c.prototype.initialize.call(f,a,d),f.id=a,f.panel=new e.Value,f.panel.bind(function(a){b(f.container).toggleClass("control-subsection",!!a)}),f.panel.set(f.params.panel||""),e.utils.bubbleChildValueChanges(f,["panel"]),f.embed(),f.deferred.embedded.done(function(){f.ready()})},embed:function(){var a,c=this;a=function(a){var d;a?e.panel(a,function(a){a.deferred.embedded.done(function(){d=a.container.find("ul:first"),c.container.parent().is(d)||d.append(c.container),c.deferred.embedded.resolve()})}):(d=b("#customize-theme-controls").children("ul"),c.container.parent().is(d)||d.append(c.container),c.deferred.embedded.resolve())},c.panel.bind(a),a(c.panel.get()),c.deferred.embedded.done(function(){e.bind("pane-contents-reflowed",_.debounce(function(){c._recalculateTopMargin()},100))})},attachEvents:function(){var a=this;a.container.find(".accordion-section-title, .customize-section-back").on("click keydown",function(b){e.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),a.expanded()?a.collapse():a.expand())})},isContextuallyActive:function(){var a=this,b=a.controls(),c=0;return _(b).each(function(a){a.active()&&(c+=1)}),0!==c},controls:function(){return this._children("section","control")},onChangeExpanded:function(a,c){var d,f,g,h,i=this,j=i.container.closest(".wp-full-overlay-sidebar-content"),k=i.container.find(".accordion-section-content"),l=i.container.closest(".wp-full-overlay"),m=i.container.find(".customize-section-back"),n=i.container.find(".accordion-section-title").first(),o=b("#customize-header-actions").height();a&&!i.container.hasClass("open")?(c.unchanged?f=c.completeCallback:(j.scrollTop(0),d=function(){var a,b;a=window.matchMedia||window.msMatchMedia,b=90,a&&a("(max-width: 640px)").matches&&(b=45),k.css("height",window.innerHeight-b)},f=function(){i.container.addClass("open"),l.addClass("section-open"),g=k.offset().top,h=j.scrollTop(),k.css("margin-top",o-g-h),d(),n.attr("tabindex","-1"),m.attr("tabindex","0"),m.focus(),c.completeCallback&&c.completeCallback(),b(window).on("resize.customizer-section",_.debounce(d,100)),setTimeout(_.bind(i._recalculateTopMargin,i),0)}),c.allowMultiple||e.section.each(function(a){a!==i&&a.collapse({duration:c.duration})}),i.panel()?e.panel(i.panel()).expand({duration:c.duration,completeCallback:f}):(e.panel.each(function(a){a.collapse()}),f())):!a&&i.container.hasClass("open")?(i.container.removeClass("open"),l.removeClass("section-open"),k.css("margin-top",""),j.scrollTop(0),m.attr("tabindex","-1"),n.attr("tabindex","0"),n.focus(),c.completeCallback&&c.completeCallback(),b(window).off("resize.customizer-section")):c.completeCallback&&c.completeCallback()},_recalculateTopMargin:function(){var a,c,d,e=this;a=e.container.find(".accordion-section-content"),0!==a.length&&(d=b("#customize-header-actions").height(),c=a.offset().top-d,0<c&&a.css("margin-top",parseInt(a.css("margin-top"),10)-c))}}),e.ThemesSection=e.Section.extend({currentTheme:"",overlay:"",template:"",screenshotQueue:null,$window:b(window),initialize:function(){return this.$customizeSidebar=b(".wp-full-overlay-sidebar-content:first"),e.Section.prototype.initialize.apply(this,arguments)},ready:function(){var a=this;a.overlay=a.container.find(".theme-overlay"),a.template=wp.template("customize-themes-details-view"),b("body").on("keyup",function(b){a.overlay.find(".theme-wrap").is(":visible")&&(39===b.keyCode&&a.nextTheme(),37===b.keyCode&&a.previousTheme(),27===b.keyCode&&a.closeDetails())}),_.bindAll(this,"renderScreenshots")},isContextuallyActive:function(){return this.active()},attachEvents:function(){var a=this;a.container.find(".change-theme, .customize-theme").on("click keydown",function(b){e.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),a.expanded()?a.collapse():a.expand())}),a.container.on("click keydown",".left",function(b){e.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),a.previousTheme())}),a.container.on("click keydown",".right",function(b){e.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),a.nextTheme())}),a.container.on("click keydown",".theme-backdrop, .close",function(b){e.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),a.closeDetails())});var b=_.throttle(_.bind(a.renderScreenshots,this),100);a.container.on("input","#themes-filter",function(c){var d,e=c.currentTarget.value.toLowerCase().trim().replace("-"," "),f=a.controls();_.each(f,function(a){a.filter(e)}),b(),d=a.container.find("li.customize-control:visible").length,a.container.find(".theme-count").text(d)}),e.bind("ready",function(){_.each(a.controls().slice(0,3),function(a){var b,c=a.params.theme.screenshot[0];c&&(b=new Image,b.src=c)})})},onChangeExpanded:function(a,c){if(c.unchanged)return void(c.completeCallback&&c.completeCallback());var d,f,g=this,h=g.container.closest(".accordion-section"),i=h.closest(".wp-full-overlay"),j=h.closest(".wp-full-overlay-sidebar-content"),k=j.find(".open"),l=h.find(".customize-theme"),m=h.find(".change-theme"),n=h.find(".control-panel-content");a?(e.section.each(function(a){a!==g&&a.collapse({duration:c.duration})}),e.panel.each(function(a){a.collapse({duration:0})}),n.show(0,function(){d=n.offset().top,f=j.scrollTop(),n.css("margin-top",b("#customize-header-actions").height()-d-f),h.addClass("current-panel"),i.addClass("in-themes-panel"),j.scrollTop(0),_.delay(g.renderScreenshots,10),g.$customizeSidebar.on("scroll.customize-themes-section",_.throttle(g.renderScreenshots,300)),c.completeCallback&&c.completeCallback()}),l.focus()):(k.removeClass("open"),h.removeClass("current-panel"),i.removeClass("in-themes-panel"),g.$customizeSidebar.off("scroll.customize-themes-section"),n.delay(180).hide(0,function(){n.css("margin-top","inherit"),c.completeCallback&&c.completeCallback()}),l.attr("tabindex","0"),m.focus(),j.scrollTop(0))},_recalculateTopMargin:function(){e.Panel.prototype._recalculateTopMargin.call(this)},renderScreenshots:function(){var a=this;null===a.screenshotQueue&&(a.screenshotQueue=a.controls()),a.screenshotQueue.length&&(a.screenshotQueue=_.filter(a.screenshotQueue,function(b){var c=b.container.find(".theme-screenshot"),d=c.find("img");if(!d.length)return!1;if(d.is(":hidden"))return!0;var e=a.$window.scrollTop(),f=e+a.$window.height(),g=d.offset().top,h=c.height(),i=g+h,j=3*h,k=i>=e-j&&g<=f+j;return k&&b.container.trigger("render-screenshot"),!k}))},nextTheme:function(){var a=this;a.getNextTheme()&&a.showDetails(a.getNextTheme(),function(){a.overlay.find(".right").focus()})},getNextTheme:function(){var a,b;return a=e.control("theme_"+this.currentTheme),b=a.container.next("li.customize-control-theme"),!!b.length&&(b=b[0].id.replace("customize-control-",""),a=e.control(b),a.params.theme)},previousTheme:function(){var a=this;a.getPreviousTheme()&&a.showDetails(a.getPreviousTheme(),function(){a.overlay.find(".left").focus()})},getPreviousTheme:function(){var a,b;return a=e.control("theme_"+this.currentTheme),b=a.container.prev("li.customize-control-theme"),!!b.length&&(b=b[0].id.replace("customize-control-",""),a=e.control(b),a.params.theme)},updateLimits:function(){this.getNextTheme()||this.overlay.find(".right").addClass("disabled"),this.getPreviousTheme()||this.overlay.find(".left").addClass("disabled")},showDetails:function(a,c){var d=this;c=c||function(){},d.currentTheme=a.id,d.overlay.html(d.template(a)).fadeIn("fast").focus(),b("body").addClass("modal-open"),d.containFocus(d.overlay),d.updateLimits(),c()},closeDetails:function(){b("body").removeClass("modal-open"),this.overlay.fadeOut("fast"),e.control("theme_"+this.currentTheme).focus()},containFocus:function(a){var c;a.on("keydown",function(d){if(9===d.keyCode)return c=b(":tabbable",a),c.last()[0]!==d.target||d.shiftKey?c.first()[0]===d.target&&d.shiftKey?(c.last().focus(),!1):void 0:(c.first().focus(),!1)})}}),e.Panel=c.extend({containerType:"panel",initialize:function(a,b){var d=this;c.prototype.initialize.call(d,a,b),d.embed(),d.deferred.embedded.done(function(){d.ready()})},embed:function(){var a=this,c=b("#customize-theme-controls > ul");a.container.parent().is(c)||(c.append(a.container),a.renderContent()),e.bind("pane-contents-reflowed",_.debounce(function(){a._recalculateTopMargin()},100)),a.deferred.embedded.resolve()},attachEvents:function(){var a,c=this;c.container.find(".accordion-section-title").on("click keydown",function(a){e.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),c.expanded()||c.expand())}),c.container.find(".customize-panel-back").on("click keydown",function(a){e.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),c.expanded()&&c.collapse())}),a=c.container.find(".panel-meta:first"),a.find("> .accordion-section-title .customize-help-toggle").on("click keydown",function(d){if(!e.utils.isKeydownButNotEnterEvent(d)&&(d.preventDefault(),a=c.container.find(".panel-meta"),!a.hasClass("cannot-expand"))){var f=a.find(".customize-panel-description:first");a.hasClass("open")?(a.toggleClass("open"),f.slideUp(c.defaultExpandedArguments.duration),b(this).attr("aria-expanded",!1)):(f.slideDown(c.defaultExpandedArguments.duration),a.toggleClass("open"),b(this).attr("aria-expanded",!0))}})},sections:function(){return this._children("panel","section")},isContextuallyActive:function(){var a=this,b=a.sections(),c=0;return _(b).each(function(a){a.active()&&a.isContextuallyActive()&&(c+=1)}),0!==c},onChangeExpanded:function(a,c){if(c.unchanged)return void(c.completeCallback&&c.completeCallback());var d,f,g=this,h=g.container.closest(".accordion-section"),i=h.closest(".wp-full-overlay"),j=h.closest(".wp-full-overlay-sidebar-content"),k=j.find(".open"),l=i.find("#customize-theme-controls > ul > .accordion-section > .accordion-section-title"),m=h.find(".customize-panel-back"),n=h.find(".accordion-section-title").first(),o=h.find(".control-panel-content"),p=b("#customize-header-actions").height();a?(e.section.each(function(a){g.id!==a.panel()&&a.collapse({duration:0})}),e.panel.each(function(a){g!==a&&a.collapse({duration:0})}),o.show(0,function(){o.parent().show(),d=o.offset().top,f=j.scrollTop(),o.css("margin-top",p-d-f),h.addClass("current-panel"),i.addClass("in-sub-panel"),j.scrollTop(0),c.completeCallback&&c.completeCallback()}),l.attr("tabindex","-1"),m.attr("tabindex","0"),m.focus(),g._recalculateTopMargin()):(k.removeClass("open"),h.removeClass("current-panel"),i.removeClass("in-sub-panel"),o.delay(180).hide(0,function(){o.css("margin-top","inherit"),c.completeCallback&&c.completeCallback()}),l.attr("tabindex","0"),m.attr("tabindex","-1"),n.focus(),j.scrollTop(0))},_recalculateTopMargin:function(){var a,c,d,e=this;a=b("#customize-header-actions").height(),d=e.container.closest(".accordion-section"),c=d.find(".control-panel-content"),c.css("margin-top",parseInt(c.css("margin-top"),10)-(c.offset().top-a))},renderContent:function(){var a,c=this;a=0!==b("#tmpl-"+c.templateSelector+"-content").length?wp.template(c.templateSelector+"-content"):wp.template("customize-panel-default-content"),a&&c.container&&c.container.find(".accordion-sub-container").html(a(c.params))}}),e.Control=e.Class.extend({defaultActiveArguments:{duration:"fast",completeCallback:b.noop},initialize:function(a,c){var d,f,g,h=this;h.params={},b.extend(h,c||{}),h.id=a,h.selector="#customize-control-"+a.replace(/\]/g,"").replace(/\[/g,"-"),h.templateSelector="customize-control-"+h.params.type+"-content",h.container=b(h.params.content?h.params.content:h.selector),h.deferred={embedded:new b.Deferred},h.section=new e.Value,h.priority=new e.Value,h.active=new e.Value,h.activeArgumentsQueue=[],h.notifications=new e.Values({defaultConstructor:e.Notification}),h.elements=[],d=h.container.find("[data-customize-setting-link]"),f={},d.each(function(){var a,c=b(this);if(c.is(":radio")){if(a=c.prop("name"),f[a])return;f[a]=!0,c=d.filter('[name="'+a+'"]')}e(c.data("customizeSettingLink"),function(a){var b=new e.Element(c);h.elements.push(b),b.sync(a),b.set(a())})}),h.active.bind(function(a){var c=h.activeArgumentsQueue.shift();c=b.extend({},h.defaultActiveArguments,c),h.onChangeActive(a,c)}),h.section.set(h.params.section),h.priority.set(isNaN(h.params.priority)?10:h.params.priority),h.active.set(h.params.active),e.utils.bubbleChildValueChanges(h,["section","priority","active"]),g=b.map(h.params.settings,function(a){return a}),0===g.length?(h.setting=null,h.settings={},h.embed()):e.apply(e,g.concat(function(){var a;h.settings={};for(a in h.params.settings)h.settings[a]=e(h.params.settings[a]);h.setting=h.settings["default"]||null,_.each(h.settings,function(a){a.notifications.bind("add",function(b){var c,d,f;d=a.id+":"+b.code,f=_.extend({},b,{setting:a.id}),c=new e.Notification(d,f),h.notifications.add(c.code,c)}),a.notifications.bind("remove",function(b){h.notifications.remove(a.id+":"+b.code)})}),h.embed()})),h.deferred.embedded.done(function(){var a=_.debounce(function(){h.renderNotifications()});h.notifications.bind("add",function(b){wp.a11y.speak(b.message,"assertive"),a()}),h.notifications.bind("remove",a),h.renderNotifications(),h.ready()})},embed:function(){var a,b=this;a=function(a){var c;a&&e.section(a,function(a){a.deferred.embedded.done(function(){c=a.container.find("ul:first"),b.container.parent().is(c)||(c.append(b.container),b.renderContent()),b.deferred.embedded.resolve()})})},b.section.bind(a),a(b.section.get())},ready:function(){},getNotificationsContainerElement:function(){var a,c,d=this;return c=d.container.find(".customize-control-notifications-container:first"),c.length?c:(c=b('<div class="customize-control-notifications-container"></div>'),d.container.hasClass("customize-control-nav_menu_item")?d.container.find(".menu-item-settings:first").prepend(c):d.container.hasClass("customize-control-widget_form")?d.container.find(".widget-inside:first").prepend(c):(a=d.container.find(".customize-control-title"),a.length?a.after(c):d.container.prepend(c)),c)},renderNotifications:function(){var a,c,d=this,e=!1;a=d.getNotificationsContainerElement(),a&&a.length&&(c=[],d.notifications.each(function(a){c.push(a),"error"===a.type&&(e=!0)}),0===c.length?a.stop().slideUp("fast"):a.stop().slideDown("fast",null,function(){b(this).css("height","auto")}),d.notificationsTemplate||(d.notificationsTemplate=wp.template("customize-control-notifications")),d.container.toggleClass("has-notifications",0!==c.length),d.container.toggleClass("has-error",e),a.empty().append(b.trim(d.notificationsTemplate({notifications:c,altNotice:Boolean(d.altNotice)}))))},expand:function(a){e.section(this.section()).expand(a)},focus:d,onChangeActive:function(a,c){return c.unchanged?void(c.completeCallback&&c.completeCallback()):void(b.contains(document,this.container[0])?a?this.container.slideDown(c.duration,c.completeCallback):this.container.slideUp(c.duration,c.completeCallback):(this.container.toggle(a),c.completeCallback&&c.completeCallback()))},toggle:function(a){return this.onChangeActive(a,this.defaultActiveArguments)},activate:c.prototype.activate,deactivate:c.prototype.deactivate,_toggleActive:c.prototype._toggleActive,dropdownInit:function(){var a=this,b=this.container.find(".dropdown-status"),c=this.params,d=!1,f=function(a){"string"==typeof a&&c.statuses&&c.statuses[a]?b.html(c.statuses[a]).show():b.hide()};this.container.on("click keydown",".dropdown",function(b){e.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),d||a.container.toggleClass("open"),a.container.hasClass("open")&&a.container.parent().parent().find("li.library-selected").focus(),d=!0,setTimeout(function(){d=!1},400))}),this.setting.bind(f),f(this.setting())},renderContent:function(){var a,c=this;0!==b("#tmpl-"+c.templateSelector).length&&(a=wp.template(c.templateSelector),a&&c.container&&c.container.html(a(c.params)))}}),e.ColorControl=e.Control.extend({ready:function(){var a=this,b=this.container.find(".color-picker-hex");b.val(a.setting()).wpColorPicker({change:function(){a.setting.set(b.wpColorPicker("color"))},clear:function(){a.setting.set("")}}),this.setting.bind(function(a){b.val(a),b.wpColorPicker("color",a)})}}),e.MediaControl=e.Control.extend({ready:function(){function a(a){var d=b.Deferred();c.extended(e.UploadControl)?d.resolve():(a=parseInt(a,10),_.isNaN(a)||a<=0?(delete c.params.attachment,d.resolve()):c.params.attachment&&c.params.attachment.id===a&&d.resolve()),"pending"===d.state()&&wp.media.attachment(a).fetch().done(function(){c.params.attachment=this.attributes,d.resolve(),wp.customize.previewer.send(c.setting.id+"-attachment-data",this.attributes)}),d.done(function(){c.renderContent()})}var c=this;_.bindAll(c,"restoreDefault","removeFile","openFrame","select","pausePlayer"),c.container.on("click keydown",".upload-button",c.openFrame),c.container.on("click keydown",".upload-button",c.pausePlayer),c.container.on("click keydown",".thumbnail-image img",c.openFrame),c.container.on("click keydown",".default-button",c.restoreDefault),c.container.on("click keydown",".remove-button",c.pausePlayer),c.container.on("click keydown",".remove-button",c.removeFile),c.container.on("click keydown",".remove-button",c.cleanupPlayer),e.section(c.section()).container.on("expanded",function(){c.player&&c.player.setControlsSize()}).on("collapsed",function(){c.pausePlayer()}),a(c.setting()),c.setting.bind(a)},pausePlayer:function(){this.player&&this.player.pause()},cleanupPlayer:function(){this.player&&wp.media.mixin.removePlayer(this.player)},openFrame:function(a){e.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),this.frame||this.initFrame(),this.frame.open())},initFrame:function(){this.frame=wp.media({button:{text:this.params.button_labels.frame_button},states:[new wp.media.controller.Library({title:this.params.button_labels.frame_title,library:wp.media.query({type:this.params.mime_type}),multiple:!1,date:!1})]}),this.frame.on("select",this.select)},select:function(){var a,b=this.frame.state().get("selection").first().toJSON(),c=window._wpmejsSettings||{};this.params.attachment=b,this.setting(b.id),a=this.container.find("audio, video").get(0),a?this.player=new MediaElementPlayer(a,c):this.cleanupPlayer()},restoreDefault:function(a){e.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),this.params.attachment=this.params.defaultAttachment,this.setting(this.params.defaultAttachment.url))},removeFile:function(a){e.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),this.params.attachment={},this.setting(""),this.renderContent())}}),e.UploadControl=e.MediaControl.extend({select:function(){var a,b=this.frame.state().get("selection").first().toJSON(),c=window._wpmejsSettings||{};this.params.attachment=b,this.setting(b.url),a=this.container.find("audio, video").get(0),a?this.player=new MediaElementPlayer(a,c):this.cleanupPlayer()},success:function(){},removerVisibility:function(){}}),e.ImageControl=e.UploadControl.extend({thumbnailSrc:function(){}}),e.BackgroundControl=e.UploadControl.extend({ready:function(){e.UploadControl.prototype.ready.apply(this,arguments)},select:function(){e.UploadControl.prototype.select.apply(this,arguments),wp.ajax.post("custom-background-add",{nonce:_wpCustomizeBackground.nonces.add,wp_customize:"on",theme:e.settings.theme.stylesheet,attachment_id:this.params.attachment.id})}}),e.CroppedImageControl=e.MediaControl.extend({openFrame:function(a){e.utils.isKeydownButNotEnterEvent(a)||(this.initFrame(),this.frame.setState("library").open())},initFrame:function(){var a=_wpMediaViewsL10n;this.frame=wp.media({button:{text:a.select,close:!1},states:[new wp.media.controller.Library({title:this.params.button_labels.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.CustomizeImageCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelect,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){var a=this.frame.state().get("selection").first().toJSON();this.params.width!==a.width||this.params.height!==a.height||this.params.flex_width||this.params.flex_height?this.frame.setState("cropper"):(this.setImageFromAttachment(a),this.frame.close())},onCropped:function(a){this.setImageFromAttachment(a)},calculateImageSelectOptions:function(a,b){var c,d,e,f=b.get("control"),g=!!parseInt(f.params.flex_width,10),h=!!parseInt(f.params.flex_height,10),i=a.get("width"),j=a.get("height"),k=parseInt(f.params.width,10),l=parseInt(f.params.height,10),m=k/l,n=k,o=l;return b.set("canSkipCrop",!f.mustBeCropped(g,h,k,l,i,j)),i/j>m?(l=j,k=l*m):(k=i,l=k/m),c=(i-k)/2,d=(j-l)/2,e={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:i,imageHeight:j,minWidth:n>k?k:n,minHeight:o>l?l:o,x1:c,y1:d,x2:k+c,y2:l+d},h===!1&&g===!1&&(e.aspectRatio=k+":"+l),!0===h&&(delete e.minHeight,e.maxWidth=i),!0===g&&(delete e.minWidth,e.maxHeight=j),e},mustBeCropped:function(a,b,c,d,e,f){return(!0!==a||!0!==b)&&((!0!==a||d!==f)&&((!0!==b||c!==e)&&((c!==e||d!==f)&&!(e<=c))))},onSkippedCrop:function(){var a=this.frame.state().get("selection").first().toJSON();this.setImageFromAttachment(a)},setImageFromAttachment:function(a){this.params.attachment=a,this.setting(a.id)}}),e.SiteIconControl=e.CroppedImageControl.extend({initFrame:function(){var a=_wpMediaViewsL10n;this.frame=wp.media({button:{text:a.select,close:!1},states:[new wp.media.controller.Library({title:this.params.button_labels.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.SiteIconCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelect,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){var a=this.frame.state().get("selection").first().toJSON(),b=this;this.params.width!==a.width||this.params.height!==a.height||this.params.flex_width||this.params.flex_height?this.frame.setState("cropper"):wp.ajax.post("crop-image",{nonce:a.nonces.edit,id:a.id,context:"site-icon",cropDetails:{x1:0,y1:0,width:this.params.width,height:this.params.height,dst_width:this.params.width,dst_height:this.params.height}}).done(function(a){b.setImageFromAttachment(a),b.frame.close()}).fail(function(){b.frame.trigger("content:error:crop")})},setImageFromAttachment:function(a){var c,d=["site_icon-32","thumbnail","full"];_.each(d,function(b){c||_.isUndefined(a.sizes[b])||(c=a.sizes[b])}),this.params.attachment=a,this.setting(a.id),b('link[sizes="32x32"]').attr("href",c.url)},removeFile:function(a){e.utils.isKeydownButNotEnterEvent(a)||(a.preventDefault(),this.params.attachment={},this.setting(""),this.renderContent(),b('link[rel="icon"]').attr("href",""))}}),e.HeaderControl=e.Control.extend({ready:function(){this.btnRemove=b("#customize-control-header_image .actions .remove"),this.btnNew=b("#customize-control-header_image .actions .new"),_.bindAll(this,"openMedia","removeImage"),this.btnNew.on("click",this.openMedia),this.btnRemove.on("click",this.removeImage),e.HeaderTool.currentHeader=this.getInitialHeaderImage(),new e.HeaderTool.CurrentView({model:e.HeaderTool.currentHeader,el:"#customize-control-header_image .current .container"}),new e.HeaderTool.ChoiceListView({collection:e.HeaderTool.UploadsList=new e.HeaderTool.ChoiceList,el:"#customize-control-header_image .choices .uploaded .list"}),new e.HeaderTool.ChoiceListView({collection:e.HeaderTool.DefaultsList=new e.HeaderTool.DefaultsList,el:"#customize-control-header_image .choices .default .list"}),e.HeaderTool.combinedList=e.HeaderTool.CombinedList=new e.HeaderTool.CombinedList([e.HeaderTool.UploadsList,e.HeaderTool.DefaultsList]),wp.media.controller.Cropper.prototype.defaults.doCropArgs.wp_customize="on",wp.media.controller.Cropper.prototype.defaults.doCropArgs.theme=e.settings.theme.stylesheet},getInitialHeaderImage:function(){if(!e.get().header_image||!e.get().header_image_data||_.contains(["remove-header","random-default-image","random-uploaded-image"],e.get().header_image))return new e.HeaderTool.ImageModel;var a=_.find(_wpCustomizeHeader.uploads,function(a){return a.attachment_id===e.get().header_image_data.attachment_id});return a||(a={url:e.get().header_image,thumbnail_url:e.get().header_image,attachment_id:e.get().header_image_data.attachment_id}),new e.HeaderTool.ImageModel({header:a,choice:a.url.split("/").pop()})},calculateImageSelectOptions:function(a,b){var c,d,f,g,h,i,j=parseInt(_wpCustomizeHeader.data.width,10),k=parseInt(_wpCustomizeHeader.data.height,10),l=!!parseInt(_wpCustomizeHeader.data["flex-width"],10),m=!!parseInt(_wpCustomizeHeader.data["flex-height"],10);return h=a.get("width"),g=a.get("height"),this.headerImage=new e.HeaderTool.ImageModel,this.headerImage.set({themeWidth:j,themeHeight:k,themeFlexWidth:l,themeFlexHeight:m,imageWidth:h,imageHeight:g}),b.set("canSkipCrop",!this.headerImage.shouldBeCropped()),c=j/k,d=h,f=g,d/f>c?(k=f,j=k*c):(j=d,k=j/c),i={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:h,imageHeight:g,x1:0,y1:0,x2:j,y2:k},m===!1&&l===!1&&(i.aspectRatio=j+":"+k),m===!1&&(i.maxHeight=k),l===!1&&(i.maxWidth=j),i},openMedia:function(a){var b=_wpMediaViewsL10n;a.preventDefault(),this.frame=wp.media({button:{text:b.selectAndCrop,close:!1},states:[new wp.media.controller.Library({title:b.chooseImage,library:wp.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:_wpCustomizeHeader.data.width,suggestedHeight:_wpCustomizeHeader.data.height}),new wp.media.controller.Cropper({imgSelectOptions:this.calculateImageSelectOptions})]}),this.frame.on("select",this.onSelect,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this),this.frame.open()},onSelect:function(){this.frame.setState("cropper")},onCropped:function(a){var b=a.url,c=a.attachment_id,d=a.width,e=a.height;this.setImageFromURL(b,c,d,e)},onSkippedCrop:function(a){var b=a.get("url"),c=a.get("width"),d=a.get("height");this.setImageFromURL(b,a.id,c,d)},setImageFromURL:function(a,b,c,d){var f,g={};g.url=a,g.thumbnail_url=a,g.timestamp=_.now(),b&&(g.attachment_id=b),c&&(g.width=c),d&&(g.height=d),f=new e.HeaderTool.ImageModel({header:g,choice:a.split("/").pop()}),e.HeaderTool.UploadsList.add(f),e.HeaderTool.currentHeader.set(f.toJSON()),f.save(),f.importImage()},removeImage:function(){e.HeaderTool.currentHeader.trigger("hide"),e.HeaderTool.CombinedList.trigger("control:removeImage")}}),e.ThemeControl=e.Control.extend({touchDrag:!1,isRendered:!1,renderContent:function(){var a=this,b=arguments;e.section(a.section(),function(c){c.expanded()?(e.Control.prototype.renderContent.apply(a,b),a.isRendered=!0):c.expanded.bind(function(c){
+c&&!a.isRendered&&(e.Control.prototype.renderContent.apply(a,b),a.isRendered=!0)})})},ready:function(){var a=this;a.container.on("touchmove",".theme",function(){a.touchDrag=!0}),a.container.on("click keydown touchend",".theme",function(c){if(!e.utils.isKeydownButNotEnterEvent(c)){if(a.touchDrag===!0)return a.touchDrag=!1;if(!b(c.target).is(".theme-actions .button")){var d=b(this).data("previewUrl");b(".wp-full-overlay").addClass("customize-loading"),window.parent.location=d}}}),a.container.on("click keydown",".theme-actions .theme-details",function(b){e.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),e.section(a.section()).showDetails(a.params.theme))}),a.container.on("render-screenshot",function(){var a=b(this).find("img"),c=a.data("src");c&&a.attr("src",c)})},filter:function(a){var b=this,c=b.params.theme.name+" "+b.params.theme.description+" "+b.params.theme.tags+" "+b.params.theme.author;c=c.toLowerCase().replace("-"," "),-1!==c.search(a)?b.activate():b.deactivate()}}),e.defaultConstructor=e.Setting,e.control=new e.Values({defaultConstructor:e.Control}),e.section=new e.Values({defaultConstructor:e.Section}),e.panel=new e.Values({defaultConstructor:e.Panel}),e.PreviewFrame=e.Messenger.extend({sensitivity:2e3,initialize:function(a,c){var d=b.Deferred();d.promise(this),this.container=a.container,this.signature=a.signature,b.extend(a,{channel:e.PreviewFrame.uuid()}),e.Messenger.prototype.initialize.call(this,a,c),this.add("previewUrl",a.previewUrl),this.query=b.extend(a.query||{},{customize_messenger_channel:this.channel()}),this.run(d)},run:function(a){var c=this,d=!1,f=!1;this._ready&&this.unbind("ready",this._ready),this._ready=function(){f=!0,d&&a.resolveWith(c)},this.bind("ready",this._ready),this.bind("ready",function(a){if(this.container.addClass("iframe-ready"),a){var b={panel:a.activePanels,section:a.activeSections,control:a.activeControls};_(b).each(function(a,b){e[b].each(function(b,c){var d=!(!a||!a[c]);d?b.activate():b.deactivate()})}),a.settingValidities&&e._handleSettingValidities({settingValidities:a.settingValidities,focusInvalidControl:!1})}}),this.request=b.ajax(this.previewUrl(),{type:"POST",data:this.query,xhrFields:{withCredentials:!0}}),this.request.fail(function(){a.rejectWith(c,["request failure"])}),this.request.done(function(g){var h,i=c.request.getResponseHeader("Location"),j=c.signature;return i&&i!==c.previewUrl()?void a.rejectWith(c,["redirect",i]):"0"===g?void c.login(a):"-1"===g?void a.rejectWith(c,["cheatin"]):(h=g.lastIndexOf(j),-1===h||h<g.lastIndexOf("</html>")?void a.rejectWith(c,["unsigned"]):(g=g.slice(0,h)+g.slice(h+j.length),c.iframe=b("<iframe />",{title:e.l10n.previewIframeTitle}).appendTo(c.container),c.iframe.one("load",function(){d=!0,f?a.resolveWith(c):setTimeout(function(){a.rejectWith(c,["ready timeout"])},c.sensitivity)}),c.targetWindow(c.iframe[0].contentWindow),c.targetWindow().document.open(),c.targetWindow().document.write(g),void c.targetWindow().document.close()))})},login:function(a){var c,d=this;return c=function(){a.rejectWith(d,["logged out"])},this.triedLogin?c():void b.get(e.settings.url.ajax,{action:"logged-in"}).fail(c).done(function(f){var g;"1"!==f&&c(),g=b("<iframe />",{src:d.previewUrl(),title:e.l10n.previewIframeTitle}).hide(),g.appendTo(d.container),g.on("load",function(){d.triedLogin=!0,g.remove(),d.run(a)})})},destroy:function(){e.Messenger.prototype.destroy.call(this),this.request.abort(),this.iframe&&this.iframe.remove(),delete this.request,delete this.iframe,delete this.targetWindow}}),function(){var a=0;e.PreviewFrame.uuid=function(){return"preview-"+a++}}(),e.setDocumentTitle=function(a){var b,c;b=e.settings.documentTitleTmpl,c=b.replace("%s",a),document.title=c,e.trigger("title",c)},e.Previewer=e.Messenger.extend({refreshBuffer:250,initialize:function(a,c){var d=this,f=/^https?/;b.extend(this,c||{}),this.deferred={active:b.Deferred()},this.refresh=function(a){var b,c=a.refresh,d=function(){b=null,c.call(a)};return function(){if("number"!=typeof b){if(!a.loading)return d();a.abort()}clearTimeout(b),b=setTimeout(d,a.refreshBuffer)}}(this),this.container=e.ensure(a.container),this.allowedUrls=a.allowedUrls,this.signature=a.signature,a.url=window.location.href,e.Messenger.prototype.initialize.call(this,a),this.add("scheme",this.origin()).link(this.origin).setter(function(a){var b=a.match(f);return b?b[0]:""}),this.add("previewUrl",a.previewUrl).setter(function(a){var c;return/\/wp-admin(\/|$)/.test(a.replace(/[#?].*$/,""))?null:(b.each([a.replace(f,d.scheme()),a],function(a,e){if(b.each(d.allowedUrls,function(a,b){var d;if(b=b.replace(/\/+$/,""),d=e.replace(b,""),0===e.indexOf(b)&&/^([/#?]|$)/.test(d))return c=e,!1}),c)return!1}),c?c:null)}),this.previewUrl.bind(this.refresh),this.scroll=0,this.bind("scroll",function(a){this.scroll=a}),this.bind("url",this.previewUrl),this.bind("documentTitle",function(a){e.setDocumentTitle(a)})},query:function(){},abort:function(){this.loading&&(this.loading.destroy(),delete this.loading)},refresh:function(){var a=this;this.send("loading-initiated"),this.abort(),this.loading=new e.PreviewFrame({url:this.url(),previewUrl:this.previewUrl(),query:this.query()||{},container:this.container,signature:this.signature}),this.loading.done(function(){this.bind("synced",function(){a.preview&&a.preview.destroy(),a.preview=this,delete a.loading,a.targetWindow(this.targetWindow()),a.channel(this.channel()),a.deferred.active.resolve(),a.send("active")}),this.send("sync",{scroll:a.scroll,settings:e.get()})}),this.loading.fail(function(b,c){a.send("loading-failed"),"redirect"===b&&c&&a.previewUrl(c),"logged out"===b&&(a.preview&&(a.preview.destroy(),delete a.preview),a.login().done(a.refresh)),"cheatin"===b&&a.cheatin()})},login:function(){var a,c,d,f=this;return this._login?this._login:(a=b.Deferred(),this._login=a.promise(),c=new e.Messenger({channel:"login",url:e.settings.url.login}),d=b("<iframe />",{src:e.settings.url.login,title:e.l10n.loginIframeTitle}).appendTo(this.container),c.targetWindow(d[0].contentWindow),c.bind("login",function(){var b=f.refreshNonces();b.always(function(){d.remove(),c.destroy(),delete f._login}),b.done(function(){a.resolve()}),b.fail(function(){f.cheatin(),a.reject()})}),this._login)},cheatin:function(){b(document.body).empty().addClass("cheatin").append("<h1>"+e.l10n.cheatin+"</h1><p>"+e.l10n.notAllowed+"</p>")},refreshNonces:function(){var a,c=b.Deferred();return c.promise(),a=wp.ajax.post("customize_refresh_nonces",{wp_customize:"on",theme:e.settings.theme.stylesheet}),a.done(function(a){e.trigger("nonce-refresh",a),c.resolve()}),a.fail(function(){c.reject()}),c}}),e.settingConstructor={},e.controlConstructor={color:e.ColorControl,media:e.MediaControl,upload:e.UploadControl,image:e.ImageControl,cropped_image:e.CroppedImageControl,site_icon:e.SiteIconControl,header:e.HeaderControl,background:e.BackgroundControl,theme:e.ThemeControl},e.panelConstructor={},e.sectionConstructor={themes:e.ThemesSection},e._handleSettingValidities=function(a){var b,c=[],d=!1;_.each(a.settingValidities,function(a,b){var d=e(b);d&&(_.isObject(a)&&_.each(a,function(a,b){var f,g=new e.Notification(b,a),h=!1;f=d.notifications(g.code),f&&(h=g.type!==f.type||!_.isEqual(g.data,f.data)),h&&d.notifications.remove(b),d.notifications.has(g.code)||d.notifications.add(b,g),c.push(d.id)}),d.notifications.each(function(b){"error"!==b.type||!0!==a&&a[b.code]||d.notifications.remove(b.code)}))}),a.focusInvalidControl&&(b=e.findControlsForSettings(c),_(_.values(b)).find(function(a){return _(a).find(function(a){var b=a.section()&&e.section.has(a.section())&&e.section(a.section()).expanded();return b&&a.expanded&&(b=a.expanded()),b&&(a.focus(),d=!0),d})}),d||_.isEmpty(b)||_.values(b)[0][0].focus())},e.findControlsForSettings=function(a){var b,c={};return _.each(_.unique(a),function(a){var d=e(a);d&&(b=d.findControls(),b&&b.length>0&&(c[a]=b))}),c},e.reflowPaneContents=_.bind(function(){var a,c,d,f=[],g=!1;document.activeElement&&(c=b(document.activeElement)),e.panel.each(function(b){var c=b.sections(),d=_.pluck(c,"container");f.push(b),a=b.container.find("ul:first"),e.utils.areElementListsEqual(d,a.children("[id]"))||(_(c).each(function(b){a.append(b.container)}),g=!0)}),e.section.each(function(b){var c=b.controls(),d=_.pluck(c,"container");b.panel()||f.push(b),a=b.container.find("ul:first"),e.utils.areElementListsEqual(d,a.children("[id]"))||(_(c).each(function(b){a.append(b.container)}),g=!0)}),f.sort(e.utils.prioritySort),d=_.pluck(f,"container"),a=b("#customize-theme-controls").children("ul"),e.utils.areElementListsEqual(d,a.children())||(_(f).each(function(b){a.append(b.container)}),g=!0),e.panel.each(function(a){var b=a.active();a.active.callbacks.fireWith(a.active,[b,b])}),e.section.each(function(a){var b=a.active();a.active.callbacks.fireWith(a.active,[b,b])}),g&&c&&c.focus(),e.trigger("pane-contents-reflowed")},e),b(function(){if(e.settings=window._wpCustomizeSettings,e.l10n=window._wpCustomizeControlsL10n,e.settings&&b.support.postMessage&&(b.support.cors||!e.settings.isCrossDomain)){var a,c,d=b(document.body),f=d.children(".wp-full-overlay"),g=b("#customize-info .panel-title.site-title"),h=b(".customize-controls-close"),i=b("#save"),j=b("#customize-footer-actions");b("#customize-controls").on("keydown",function(a){var c=13===a.which,d=b(a.target);c&&(d.is("input:not([type=button])")||d.is("select"))&&a.preventDefault()}),b(".customize-info").find("> .accordion-section-title .customize-help-toggle").on("click",function(){var a=b(this).closest(".accordion-section"),c=a.find(".customize-panel-description:first");a.hasClass("cannot-expand")||(a.hasClass("open")?(a.toggleClass("open"),c.slideUp(e.Panel.prototype.defaultExpandedArguments.duration),b(this).attr("aria-expanded",!1)):(c.slideDown(e.Panel.prototype.defaultExpandedArguments.duration),a.toggleClass("open"),b(this).attr("aria-expanded",!0)))}),e.previewer=new e.Previewer({container:"#customize-preview",form:"#customize-controls",previewUrl:e.settings.url.preview,allowedUrls:e.settings.url.allowed,signature:"WP_CUSTOMIZER_SIGNATURE"},{nonce:e.settings.nonce,query:function(){var a={};return e.each(function(b,c){b._dirty&&(a[c]=b())}),{wp_customize:"on",theme:e.settings.theme.stylesheet,customized:JSON.stringify(a),nonce:this.nonce.preview}},save:function(){function a(a){k[a.id]=!0}var c,f,g,h=this,j=e.state("processing"),k={},l=[];d.addClass("saving"),e.bind("change",a),f=function(){var c,f;return e.each(function(a){a.notifications.each(function(b){"error"!==b.type||b.data&&b.data.from_server||l.push(a.id)})}),g=e.findControlsForSettings(l),_.isEmpty(g)?(f=b.extend(h.query(),{nonce:h.nonce.save}),c=wp.ajax.post("customize_save",f),i.prop("disabled",!0),e.trigger("save",c),c.always(function(){d.removeClass("saving"),i.prop("disabled",!1),e.unbind("change",a)}),c.fail(function(a){"0"===a?a="not_logged_in":"-1"===a&&(a="invalid_nonce"),"invalid_nonce"===a?h.cheatin():"not_logged_in"===a&&(h.preview.iframe.hide(),h.login().done(function(){h.save(),h.preview.iframe.show()})),a.setting_validities&&e._handleSettingValidities({settingValidities:a.setting_validities,focusInvalidControl:!0}),e.trigger("error",a)}),void c.done(function(a){e.each(function(a){k[a.id]||(a._dirty=!1)}),e.previewer.send("saved",a),a.setting_validities&&e._handleSettingValidities({settingValidities:a.setting_validities,focusInvalidControl:!0}),e.trigger("saved",a),_.isEmpty(k)||e.state("saved").set(!1)})):(_.values(g)[0][0].focus(),d.removeClass("saving"),void e.unbind("change",a))},0===j()?f():(c=function(){0===j()&&(e.state.unbind("change",c),f())},e.state.bind("change",c))}}),e.previewer.bind("nonce",function(a){b.extend(this.nonce,a)}),e.bind("nonce-refresh",function(a){b.extend(e.settings.nonce,a),b.extend(e.previewer.nonce,a),e.previewer.send("nonce-refresh",a)}),b.each(e.settings.settings,function(a,b){var c,d=e.settingConstructor[b.type]||e.Setting;c=new d(a,b.value,{transport:b.transport,previewer:e.previewer,dirty:!!b.dirty}),e.add(a,c)}),b.each(e.settings.panels,function(a,b){var c,d=e.panelConstructor[b.type]||e.Panel;c=new d(a,{params:b}),e.panel.add(a,c)}),b.each(e.settings.sections,function(a,b){var c,d=e.sectionConstructor[b.type]||e.Section;c=new d(a,{params:b}),e.section.add(a,c)}),b.each(e.settings.controls,function(a,b){var c,d=e.controlConstructor[b.type]||e.Control;c=new d(a,{params:b,previewer:e.previewer}),e.control.add(a,c)}),_.each(["panel","section","control"],function(a){var b=e.settings.autofocus[a];b&&e[a](b,function(a){a.deferred.embedded.done(function(){e.previewer.deferred.active.done(function(){a.focus()})})})}),e.bind("ready",e.reflowPaneContents),b([e.panel,e.section,e.control]).each(function(a,b){var c=_.debounce(e.reflowPaneContents,100);b.bind("add",c),b.bind("change",c),b.bind("remove",c)}),e.previewer.previewUrl()?e.previewer.refresh():e.previewer.previewUrl(e.settings.url.home),function(){var a=new e.Values,b=a.create("saved"),c=a.create("activated"),d=a.create("processing");a.bind("change",function(){c()?b()?(i.val(e.l10n.saved).prop("disabled",!0),h.find(".screen-reader-text").text(e.l10n.close)):(i.val(e.l10n.save).prop("disabled",!1),h.find(".screen-reader-text").text(e.l10n.cancel)):(i.val(e.l10n.activate).prop("disabled",!1),h.find(".screen-reader-text").text(e.l10n.cancel))}),b(!0),c(e.settings.theme.active),d(0),e.bind("change",function(){a("saved").set(!1)}),e.bind("saved",function(){a("saved").set(!0),a("activated").set(!0)}),c.bind(function(a){a&&e.trigger("activated")}),e.state=a}(),i.click(function(a){e.previewer.save(),a.preventDefault()}).keydown(function(a){9!==a.which&&(13===a.which&&e.previewer.save(),a.preventDefault())}),h.keydown(function(a){9!==a.which&&(13===a.which&&this.click(),a.preventDefault())}),b(".collapse-sidebar").on("click",function(){"true"===b(this).attr("aria-expanded")?b(this).attr({"aria-expanded":"false","aria-label":e.l10n.expandSidebar}):b(this).attr({"aria-expanded":"true","aria-label":e.l10n.collapseSidebar}),f.toggleClass("collapsed").toggleClass("expanded")}),b("body").on("keydown",function(a){var b,c=[],d=[],f=[];27===a.which&&(e.control.each(function(a){a.expanded&&a.expanded()&&_.isFunction(a.collapse)&&c.push(a)}),e.section.each(function(a){a.expanded()&&d.push(a)}),e.panel.each(function(a){a.expanded()&&f.push(a)}),c.length>0&&0===d.length&&(c.length=0),b=c[0]||d[0]||f[0],b&&(b.collapse(),a.preventDefault()))}),b(".customize-controls-preview-toggle").on("click",function(){f.toggleClass("preview-only")}),e.previewedDevice=new e.Value,e.bind("ready",function(){_.find(e.settings.previewableDevices,function(a,b){if(!0===a["default"])return e.previewedDevice.set(b),!0})}),j.find(".devices button").on("click",function(a){e.previewedDevice.set(b(a.currentTarget).data("device"))}),e.previewedDevice.bind(function(a){var c=b(".wp-full-overlay"),d="";j.find(".devices button").removeClass("active").attr("aria-pressed",!1),j.find(".devices .preview-"+a).addClass("active").attr("aria-pressed",!0),b.each(e.settings.previewableDevices,function(a){d+=" preview-"+a}),c.removeClass(d).addClass("preview-"+a)}),g.length&&e("blogname",function(a){var c=function(){g.text(b.trim(a())||e.l10n.untitledBlogName)};a.bind(c),c()}),a=new e.Messenger({url:e.settings.url.parent,channel:"loader"}),a.bind("back",function(){h.on("click.customize-controls-close",function(b){b.preventDefault(),a.send("close")})}),b(window).on("beforeunload",function(){if(!e.state("saved")())return setTimeout(function(){f.removeClass("customize-loading")},1),e.l10n.saveAlert}),b.each(["saved","change"],function(b,c){e.bind(c,function(){a.send(c)})}),e.bind("title",function(b){a.send("title",b)}),a.send("ready"),b.each({background_image:{controls:["background_repeat","background_position_x","background_attachment"],callback:function(a){return!!a}},show_on_front:{controls:["page_on_front","page_for_posts"],callback:function(a){return"page"===a}},header_textcolor:{controls:["header_textcolor"],callback:function(a){return"blank"!==a}}},function(a,c){e(a,function(a){b.each(c.controls,function(b,d){e.control(d,function(b){var d=function(a){b.container.toggle(c.callback(a))};d(a.get()),a.bind(d)})})})}),e.control("display_header_text",function(a){var b="";a.elements[0].unsync(e("header_textcolor")),a.element=new e.Element(a.container.find("input")),a.element.set("blank"!==a.setting()),a.element.bind(function(c){c||(b=e("header_textcolor").get()),a.setting.set(c?b:"blank")}),a.setting.bind(function(b){a.element.set("blank"!==b)})}),e("show_on_front","page_on_front",function(a,b){var c=function(){"page"===a()&&parseInt(b(),10)>0&&e.previewer.previewUrl.set(e.settings.url.home)};a.bind(c),b.bind(c)}),e("page_for_posts",function(a){a.bind(function(a){a=parseInt(a,10),a>0&&e.previewer.previewUrl.set(e.settings.url.home+"?page_id="+a)})}),e.previewer.bind("selective-refresh-setting-validities",function(a){e._handleSettingValidities({settingValidities:a,focusInvalidControl:!1})}),e.previewer.bind("focus-control-for-setting",function(a){var b;e.control.each(function(c){var d=_.pluck(c.settings,"id");-1!==_.indexOf(d,a)&&(b=c)}),b&&b.focus()}),e.previewer.bind("refresh",function(){e.previewer.refresh()}),e.trigger("ready"),c=h,c.focus(),setTimeout(function(){c.focus()},200)}})}(wp,jQuery);
\ No newline at end of file
index 7f0925336b694b7f35743c598cdc232029ef8e97..25090359512f60be57689e66f9555463d316b67c 100644 (file)
                        } );
 
                        // Clear the search results.
-                       $( '.clear-results' ).on( 'click keydown', function( event ) {
-                               if ( event.type === 'keydown' && ( 13 !== event.which && 32 !== event.which ) ) { // "return" or "space" keys only
-                                       return;
-                               }
-
-                               event.preventDefault();
-
-                               $( '#menu-items-search' ).val( '' ).focus();
-                               event.target.value = '';
-                               self.search( event );
+                       $( '.clear-results' ).on( 'click', function() {
+                               self.$search.val( '' ).focus().trigger( 'keyup' );
                        } );
 
                        this.$el.on( 'input', '#custom-menu-item-name.invalid, #custom-menu-item-url.invalid', function() {
                                $otherSections.fadeOut( 100 );
                                $searchSection.find( '.accordion-section-content' ).slideDown( 'fast' );
                                $searchSection.addClass( 'open' );
-                               $searchSection.find( '.clear-results' )
-                                       .prop( 'tabIndex', 0 )
-                                       .addClass( 'is-visible' );
+                               $searchSection.find( '.clear-results' ).addClass( 'is-visible' );
                        } else if ( '' === event.target.value ) {
                                $searchSection.removeClass( 'open' );
                                $otherSections.show();
-                               $searchSection.find( '.clear-results' )
-                                       .prop( 'tabIndex', -1 )
-                                       .removeClass( 'is-visible' );
+                               $searchSection.find( '.clear-results' ).removeClass( 'is-visible' );
                        }
 
                        this.searchTerm = event.target.value;
                                return parseInt( value, 10 );
                        };
 
+                       // Edit menu button.
+                       control.container.find( '.edit-menu' ).on( 'click', function() {
+                               var menuId = control.setting();
+                               api.section( 'nav_menu[' + menuId + ']' ).focus();
+                       });
+                       control.setting.bind( 'change', function() {
+                               if ( 0 === control.setting() ) {
+                                       control.container.find( '.edit-menu' ).addClass( 'hidden' );
+                               } else {
+                                       control.container.find( '.edit-menu' ).removeClass( 'hidden' );
+                               }
+                       });
+
                        // Add/remove menus from the available options when they are added and removed.
                        api.bind( 'add', function( setting ) {
                                var option, menuId, matches = setting.id.match( navMenuIdRegex );
                 */
                initialize: function( id, options ) {
                        var control = this;
+                       control.expanded = new api.Value( false );
+                       control.expandedArgumentsQueue = [];
+                       control.expanded.bind( function( expanded ) {
+                               var args = control.expandedArgumentsQueue.shift();
+                               args = $.extend( {}, control.defaultExpandedArguments, args );
+                               control.onChangeExpanded( expanded, args );
+                       });
                        api.Control.prototype.initialize.call( control, id, options );
                        control.active.validate = function() {
                                var value, section = api.section( control.section() );
                        }
                },
 
+               /**
+                * @since 4.6.0
+                *
+                * @param {Boolean} expanded
+                * @param {Object} [params]
+                * @returns {Boolean} false if state already applied
+                */
+               _toggleExpanded: api.Section.prototype._toggleExpanded,
+
+               /**
+                * @since 4.6.0
+                *
+                * @param {Object} [params]
+                * @returns {Boolean} false if already expanded
+                */
+               expand: api.Section.prototype.expand,
+
                /**
                 * Expand the menu item form control.
                 *
                 * @param {Function} [params.completeCallback] - Function to call when the form toggle has finished animating.
                 */
                expandForm: function( params ) {
-                       this.toggleForm( true, params );
+                       this.expand( params );
                },
 
+               /**
+                * @since 4.6.0
+                *
+                * @param {Object} [params]
+                * @returns {Boolean} false if already collapsed
+                */
+               collapse: api.Section.prototype.collapse,
+
                /**
                 * Collapse the menu item form control.
                 *
                 * @param {Function} [params.completeCallback] - Function to call when the form toggle has finished animating.
                 */
                collapseForm: function( params ) {
-                       this.toggleForm( false, params );
+                       this.collapse( params );
                },
 
                /**
                 * Expand or collapse the menu item control.
                 *
+                * @deprecated this is poor naming, and it is better to directly set control.expanded( showOrHide )
                 * @since 4.5.0 Added params.completeCallback.
                 *
                 * @param {boolean}  [showOrHide] - If not supplied, will be inverse of current visibility
                 * @param {Function} [params.completeCallback] - Function to call when the form toggle has finished animating.
                 */
                toggleForm: function( showOrHide, params ) {
+                       if ( typeof showOrHide === 'undefined' ) {
+                               showOrHide = ! this.expanded();
+                       }
+                       if ( showOrHide ) {
+                               this.expand( params );
+                       } else {
+                               this.collapse( params );
+                       }
+               },
+
+               /**
+                * Expand or collapse the menu item control.
+                *
+                * @since 4.6.0
+                * @param {boolean}  [showOrHide] - If not supplied, will be inverse of current visibility
+                * @param {Object}   [params] - Optional params.
+                * @param {Function} [params.completeCallback] - Function to call when the form toggle has finished animating.
+                */
+               onChangeExpanded: function( showOrHide, params ) {
                        var self = this, $menuitem, $inside, complete;
 
                        $menuitem = this.container;
index d9cf4db7535c59898c75f8f1c461c0bba182feca..37cd600af827c358d8baf48d0e47586e729f40c6 100644 (file)
@@ -1,2 +1,2 @@
-!function(a,b,c){"use strict";function d(a){return"nav_menu_item["+a+"]"}function e(b){return b=b||"",b=c("<div>").text(b).html(),b=c.trim(b),b||a.Menus.data.l10n.unnamed}wpNavMenu.originalInit=wpNavMenu.init,wpNavMenu.options.menuItemDepthPerLevel=20,wpNavMenu.options.sortableItems="> .customize-control-nav_menu_item",wpNavMenu.options.targetTolerance=10,wpNavMenu.init=function(){this.jQueryExtensions()},a.Menus=a.Menus||{},a.Menus.data={itemTypes:[],l10n:{},settingTransport:"refresh",phpIntMax:0,defaultSettingValues:{nav_menu:{},nav_menu_item:{}},locationSlugMappedToName:{}},"undefined"!=typeof _wpCustomizeNavMenusSettings&&c.extend(a.Menus.data,_wpCustomizeNavMenusSettings),a.Menus.generatePlaceholderAutoIncrementId=function(){return-Math.ceil(a.Menus.data.phpIntMax*Math.random())},a.Menus.AvailableItemModel=Backbone.Model.extend(c.extend({id:null},a.Menus.data.defaultSettingValues.nav_menu_item)),a.Menus.AvailableItemCollection=Backbone.Collection.extend({model:a.Menus.AvailableItemModel,sort_key:"order",comparator:function(a){return-a.get(this.sort_key)},sortByField:function(a){this.sort_key=a,this.sort()}}),a.Menus.availableMenuItems=new a.Menus.AvailableItemCollection(a.Menus.data.availableMenuItems),a.Menus.AvailableMenuItemsPanelView=b.Backbone.View.extend({el:"#available-menu-items",events:{"input #menu-items-search":"debounceSearch","keyup #menu-items-search":"debounceSearch","focus .menu-item-tpl":"focus","click .menu-item-tpl":"_submit","click #custom-menu-item-submit":"_submitLink","keypress #custom-menu-item-name":"_submitLink",keydown:"keyboardAccessible"},selected:null,currentMenuControl:null,debounceSearch:null,$search:null,searchTerm:"",rendered:!1,pages:{},sectionContent:"",loading:!1,initialize:function(){var b=this;a.panel.has("nav_menus")&&(this.$search=c("#menu-items-search"),this.sectionContent=this.$el.find(".accordion-section-content"),this.debounceSearch=_.debounce(b.search,500),_.bindAll(this,"close"),c("#customize-controls, .customize-section-back").on("click keydown",function(a){var d=c(a.target).is(".item-delete, .item-delete *"),e=c(a.target).is(".add-new-menu-item, .add-new-menu-item *");!c("body").hasClass("adding-menu-items")||d||e||b.close()}),c(".clear-results").on("click keydown",function(a){("keydown"!==a.type||13===a.which||32===a.which)&&(a.preventDefault(),c("#menu-items-search").val("").focus(),a.target.value="",b.search(a))}),this.$el.on("input","#custom-menu-item-name.invalid, #custom-menu-item-url.invalid",function(){c(this).removeClass("invalid")}),a.panel("nav_menus").container.bind("expanded",function(){b.rendered||(b.initList(),b.rendered=!0)}),this.sectionContent.scroll(function(){var a=b.$el.find(".accordion-section.open .accordion-section-content").prop("scrollHeight"),d=b.$el.find(".accordion-section.open").height();if(!b.loading&&c(this).scrollTop()>.75*a-d){var e=c(this).data("type"),f=c(this).data("object");"search"===e?b.searchTerm&&b.doSearch(b.pages.search):b.loadItems(e,f)}}),a.previewer.bind("url",this.close),b.delegateEvents())},search:function(a){var b=c("#available-menu-items-search"),d=c("#available-menu-items .accordion-section").not(b);a&&this.searchTerm!==a.target.value&&(""===a.target.value||b.hasClass("open")?""===a.target.value&&(b.removeClass("open"),d.show(),b.find(".clear-results").prop("tabIndex",-1).removeClass("is-visible")):(d.fadeOut(100),b.find(".accordion-section-content").slideDown("fast"),b.addClass("open"),b.find(".clear-results").prop("tabIndex",0).addClass("is-visible")),this.searchTerm=a.target.value,this.pages.search=1,this.doSearch(1))},doSearch:function(d){var e,f=this,g=c("#available-menu-items-search"),h=g.find(".accordion-section-content"),i=b.template("available-menu-item");if(f.currentRequest&&f.currentRequest.abort(),!(0>d)){if(d>1)g.addClass("loading-more"),h.attr("aria-busy","true"),b.a11y.speak(a.Menus.data.l10n.itemsLoadingMore);else if(""===f.searchTerm)return h.html(""),void b.a11y.speak("");g.addClass("loading"),f.loading=!0,e={"customize-menus-nonce":a.settings.nonce["customize-menus"],wp_customize:"on",search:f.searchTerm,page:d},f.currentRequest=b.ajax.post("search-available-menu-items-customizer",e),f.currentRequest.done(function(c){var e;1===d&&h.empty(),g.removeClass("loading loading-more"),h.attr("aria-busy","false"),g.addClass("open"),f.loading=!1,e=new a.Menus.AvailableItemCollection(c.items),f.collection.add(e.models),e.each(function(a){h.append(i(a.attributes))}),20>e.length?f.pages.search=-1:f.pages.search=f.pages.search+1,e&&d>1?b.a11y.speak(a.Menus.data.l10n.itemsFoundMore.replace("%d",e.length)):e&&1===d&&b.a11y.speak(a.Menus.data.l10n.itemsFound.replace("%d",e.length))}),f.currentRequest.fail(function(a){a.message&&(h.empty().append(c('<p class="nothing-found"></p>').text(a.message)),b.a11y.speak(a.message)),f.pages.search=-1}),f.currentRequest.always(function(){g.removeClass("loading loading-more"),h.attr("aria-busy","false"),f.loading=!1,f.currentRequest=null})}},initList:function(){var b=this;_.each(a.Menus.data.itemTypes,function(a){b.pages[a.type+":"+a.object]=0,b.loadItems(a.type,a.object)})},loadItems:function(d,e){var f,g,h,i,j=this;h=b.template("available-menu-item"),-1!==j.pages[d+":"+e]&&(i=c("#available-menu-items-"+d+"-"+e),i.find(".accordion-section-title").addClass("loading"),j.loading=!0,f={"customize-menus-nonce":a.settings.nonce["customize-menus"],wp_customize:"on",type:d,object:e,page:j.pages[d+":"+e]},g=b.ajax.post("load-available-menu-items-customizer",f),g.done(function(b){var c,f;return c=b.items,0===c.length?(0===j.pages[d+":"+e]&&i.addClass("cannot-expand").removeClass("loading").find(".accordion-section-title > button").prop("tabIndex",-1),void(j.pages[d+":"+e]=-1)):(c=new a.Menus.AvailableItemCollection(c),j.collection.add(c.models),f=i.find(".accordion-section-content"),c.each(function(a){f.append(h(a.attributes))}),void(j.pages[d+":"+e]+=1))}),g.fail(function(a){"undefined"!=typeof console&&console.error&&console.error(a)}),g.always(function(){i.find(".accordion-section-title").removeClass("loading"),j.loading=!1}))},itemSectionHeight:function(){var a,b,c,d;b=window.innerHeight,a=this.$el.find(".accordion-section:not( #available-menu-items-search ) .accordion-section-content"),c=46*(2+a.length)-13,d=b-c,d>120&&290>d&&a.css("max-height",d)},select:function(a){this.selected=c(a),this.selected.siblings(".menu-item-tpl").removeClass("selected"),this.selected.addClass("selected")},focus:function(a){this.select(c(a.currentTarget))},_submit:function(a){("keypress"!==a.type||13===a.which||32===a.which)&&this.submit(c(a.currentTarget))},submit:function(a){var b,d;a||(a=this.selected),a&&this.currentMenuControl&&(this.select(a),b=c(this.selected).data("menu-item-id"),d=this.collection.findWhere({id:b}),d&&(this.currentMenuControl.addItemToMenu(d.attributes),c(a).find(".menu-item-handle").addClass("item-added")))},_submitLink:function(a){("keypress"!==a.type||13===a.which)&&this.submitLink()},submitLink:function(){var b,d=c("#custom-menu-item-name"),e=c("#custom-menu-item-url");if(this.currentMenuControl){if(""===d.val())return void d.addClass("invalid");if(""===e.val()||"http://"===e.val())return void e.addClass("invalid");b={title:d.val(),url:e.val(),type:"custom",type_label:a.Menus.data.l10n.custom_label,object:""},this.currentMenuControl.addItemToMenu(b),e.val("http://"),d.val("")}},open:function(a){this.currentMenuControl=a,this.itemSectionHeight(),c("body").addClass("adding-menu-items"),_(this.currentMenuControl.getMenuItemControls()).each(function(a){a.collapseForm()}),this.$el.find(".selected").removeClass("selected"),this.$search.focus()},close:function(a){a=a||{},a.returnFocus&&this.currentMenuControl&&this.currentMenuControl.container.find(".add-new-menu-item").focus(),this.currentMenuControl=null,this.selected=null,c("body").removeClass("adding-menu-items"),c("#available-menu-items .menu-item-handle.item-added").removeClass("item-added"),this.$search.val("")},keyboardAccessible:function(a){var b=13===a.which,d=27===a.which,e=9===a.which&&a.shiftKey,f=c(a.target).is(this.$search);(!b||this.$search.val())&&(f&&e?(this.currentMenuControl.container.find(".add-new-menu-item").focus(),a.preventDefault()):d&&this.close({returnFocus:!0}))}}),a.Menus.MenusPanel=a.Panel.extend({attachEvents:function(){a.Panel.prototype.attachEvents.call(this);var b=this,d=b.container.find(".panel-meta"),e=d.find(".customize-help-toggle"),f=d.find(".customize-panel-description"),g=c("#screen-options-wrap"),h=d.find(".customize-screen-options-toggle");h.on("click keydown",function(b){return a.utils.isKeydownButNotEnterEvent(b)?void 0:(b.preventDefault(),f.not(":hidden")&&(f.slideUp("fast"),e.attr("aria-expanded","false")),"true"===h.attr("aria-expanded")?(h.attr("aria-expanded","false"),d.removeClass("open"),d.removeClass("active-menu-screen-options"),g.slideUp("fast")):(h.attr("aria-expanded","true"),d.addClass("open"),d.addClass("active-menu-screen-options"),g.slideDown("fast")),!1)}),e.on("click keydown",function(b){a.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),"true"===h.attr("aria-expanded")&&(h.attr("aria-expanded","false"),e.attr("aria-expanded","true"),d.addClass("open"),d.removeClass("active-menu-screen-options"),g.slideUp("fast"),f.slideDown("fast")))})},ready:function(){var a=this;this.container.find(".hide-column-tog").click(function(){var b=c(this),d=b.val();b.prop("checked")?a.checked(d):a.unchecked(d),a.saveManageColumnsState()}),this.container.find(".hide-column-tog").each(function(){var b=c(this),d=b.val();b.prop("checked")?a.checked(d):a.unchecked(d)})},saveManageColumnsState:_.debounce(function(){var a=this;a._updateHiddenColumnsRequest&&a._updateHiddenColumnsRequest.abort(),a._updateHiddenColumnsRequest=b.ajax.post("hidden-columns",{hidden:a.hidden(),screenoptionnonce:c("#screenoptionnonce").val(),page:"nav-menus"}),a._updateHiddenColumnsRequest.always(function(){a._updateHiddenColumnsRequest=null})},2e3),checked:function(a){this.container.addClass("field-"+a+"-active")},unchecked:function(a){this.container.removeClass("field-"+a+"-active")},hidden:function(){return c(".hide-column-tog").not(":checked").map(function(){var a=this.id;return a.substring(0,a.length-5)}).get().join(",")}}),a.Menus.MenuSection=a.Section.extend({initialize:function(b,d){var e=this;a.Section.prototype.initialize.call(e,b,d),e.deferred.initSortables=c.Deferred()},ready:function(){var b=this;if("undefined"==typeof b.params.menu_id)throw new Error("params.menu_id was not defined");b.active.validate=function(){return a.has(b.id)?!!a(b.id).get():!1},b.populateControls(),b.navMenuLocationSettings={},b.assignedLocations=new a.Value([]),a.each(function(a,c){var d=c.match(/^nav_menu_locations\[(.+?)]/);d&&(b.navMenuLocationSettings[d[1]]=a,a.bind(function(){b.refreshAssignedLocations()}))}),b.assignedLocations.bind(function(a){b.updateAssignedLocationsInSectionTitle(a)}),b.refreshAssignedLocations(),a.bind("pane-contents-reflowed",function(){b.container.parent().length&&(b.container.find(".menu-item .menu-item-reorder-nav button").attr({tabindex:"0","aria-hidden":"false"}),b.container.find(".menu-item.move-up-disabled .menus-move-up").attr({tabindex:"-1","aria-hidden":"true"}),b.container.find(".menu-item.move-down-disabled .menus-move-down").attr({tabindex:"-1","aria-hidden":"true"}),b.container.find(".menu-item.move-left-disabled .menus-move-left").attr({tabindex:"-1","aria-hidden":"true"}),b.container.find(".menu-item.move-right-disabled .menus-move-right").attr({tabindex:"-1","aria-hidden":"true"}))})},populateControls:function(){var b,c,d,e,f,g=this;b=g.id+"[name]",e=a.control(b),e||(e=new a.controlConstructor.nav_menu_name(b,{params:{type:"nav_menu_name",content:'<li id="customize-control-'+g.id.replace("[","-").replace("]","")+'-name" class="customize-control customize-control-nav_menu_name"></li>',label:a.Menus.data.l10n.menuNameLabel,active:!0,section:g.id,priority:0,settings:{"default":g.id}}}),a.control.add(e.id,e),e.active.set(!0)),d=a.control(g.id),d||(d=new a.controlConstructor.nav_menu(g.id,{params:{type:"nav_menu",content:'<li id="customize-control-'+g.id.replace("[","-").replace("]","")+'" class="customize-control customize-control-nav_menu"></li>',section:g.id,priority:998,active:!0,settings:{"default":g.id},menu_id:g.params.menu_id}}),a.control.add(d.id,d),d.active.set(!0)),c=g.id+"[auto_add]",f=a.control(c),f||(f=new a.controlConstructor.nav_menu_auto_add(c,{params:{type:"nav_menu_auto_add",content:'<li id="customize-control-'+g.id.replace("[","-").replace("]","")+'-auto-add" class="customize-control customize-control-nav_menu_auto_add"></li>',label:"",active:!0,section:g.id,priority:999,settings:{"default":g.id}}}),a.control.add(f.id,f),f.active.set(!0))},refreshAssignedLocations:function(){var a=this,b=a.params.menu_id,c=[];_.each(a.navMenuLocationSettings,function(a,d){a()===b&&c.push(d)}),a.assignedLocations.set(c)},updateAssignedLocationsInSectionTitle:function(b){var d,e=this;d=e.container.find(".accordion-section-title:first"),d.find(".menu-in-location").remove(),_.each(b,function(b){var e,f;e=c('<span class="menu-in-location"></span>'),f=a.Menus.data.locationSlugMappedToName[b],e.text(a.Menus.data.l10n.menuLocation.replace("%s",f)),d.append(e)}),e.container.toggleClass("assigned-to-menu-location",0!==b.length)},onChangeExpanded:function(b,d){var e=this;b&&(wpNavMenu.menuList=e.container.find(".accordion-section-content:first"),wpNavMenu.targetList=wpNavMenu.menuList,c("#menu-to-edit").removeAttr("id"),wpNavMenu.menuList.attr("id","menu-to-edit").addClass("menu"),_.each(a.section(e.id).controls(),function(a){"nav_menu_item"===a.params.type&&a.actuallyEmbed()}),"resolved"!==e.deferred.initSortables.state()&&(wpNavMenu.initSortables(),e.deferred.initSortables.resolve(wpNavMenu.menuList),a.control("nav_menu["+String(e.params.menu_id)+"]").reflowMenuItems())),a.Section.prototype.onChangeExpanded.call(e,b,d)}}),a.Menus.NewMenuSection=a.Section.extend({attachEvents:function(){var a=this;this.container.on("click",".add-menu-toggle",function(){a.expanded()?a.collapse():a.expand()})},onChangeExpanded:function(a){var b=this,c=b.container.find(".add-menu-toggle"),d=b.container.find(".new-menu-section-content"),e=b.container.closest(".wp-full-overlay-sidebar-content");a?(c.addClass("open"),c.attr("aria-expanded","true"),d.slideDown("fast",function(){e.scrollTop(e.height())})):(c.removeClass("open"),c.attr("aria-expanded","false"),d.slideUp("fast"),d.find(".menu-name-field").removeClass("invalid"))}}),a.Menus.MenuLocationControl=a.Control.extend({initialize:function(b,c){var d=this,e=b.match(/^nav_menu_locations\[(.+?)]/);d.themeLocation=e[1],a.Control.prototype.initialize.call(d,b,c)},ready:function(){var b=this,c=/^nav_menu\[(-?\d+)]/;b.setting.validate=function(a){return parseInt(a,10)},a.bind("add",function(a){var d,f,g=a.id.match(c);g&&!1!==a()&&(f=g[1],d=new Option(e(a().name),f),b.container.find("select").append(d))}),a.bind("remove",function(a){var d,e=a.id.match(c);e&&(d=parseInt(e[1],10),b.setting()===d&&b.setting.set(""),b.container.find("option[value="+d+"]").remove())}),a.bind("change",function(a){var d,f=a.id.match(c);f&&(d=parseInt(f[1],10),!1===a()?(b.setting()===d&&b.setting.set(""),b.container.find("option[value="+d+"]").remove()):b.container.find("option[value="+d+"]").text(e(a().name)))})}}),a.Menus.MenuItemControl=a.Control.extend({initialize:function(b,c){var d=this;a.Control.prototype.initialize.call(d,b,c),d.active.validate=function(){var b,c=a.section(d.section());return b=c?c.active():!1}},embed:function(){var b,c=this,d=c.section();d&&(b=a.section(d),(b&&b.expanded()||a.settings.autofocus.control===c.id)&&c.actuallyEmbed())},actuallyEmbed:function(){var a=this;"resolved"!==a.deferred.embedded.state()&&(a.renderContent(),a.deferred.embedded.resolve())},ready:function(){if("undefined"==typeof this.params.menu_item_id)throw new Error("params.menu_item_id was not defined");this._setupControlToggle(),this._setupReorderUI(),this._setupUpdateUI(),this._setupRemoveUI(),this._setupLinksUI(),this._setupTitleUI()},_setupControlToggle:function(){var a=this;this.container.find(".menu-item-handle").on("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.getMenuControl();c.isReordering||c.isSorting||a.toggleForm()})},_setupReorderUI:function(){var a,d,e=this;a=b.template("menu-item-reorder-nav"),e.container.find(".item-controls").after(a),d=e.container.find(".menu-item-reorder-nav"),d.find(".menus-move-up, .menus-move-down, .menus-move-left, .menus-move-right").on("click",function(){var a=c(this);a.focus();var b=a.is(".menus-move-up"),d=a.is(".menus-move-down"),f=a.is(".menus-move-left"),g=a.is(".menus-move-right");b?e.moveUp():d?e.moveDown():f?e.moveLeft():g&&e.moveRight(),a.focus()})},_setupUpdateUI:function(){var b=this,c=b.setting();b.elements={},b.elements.url=new a.Element(b.container.find(".edit-menu-item-url")),b.elements.title=new a.Element(b.container.find(".edit-menu-item-title")),b.elements.attr_title=new a.Element(b.container.find(".edit-menu-item-attr-title")),b.elements.target=new a.Element(b.container.find(".edit-menu-item-target")),b.elements.classes=new a.Element(b.container.find(".edit-menu-item-classes")),b.elements.xfn=new a.Element(b.container.find(".edit-menu-item-xfn")),b.elements.description=new a.Element(b.container.find(".edit-menu-item-description")),_.each(b.elements,function(a,d){a.bind(function(c){a.element.is("input[type=checkbox]")&&(c=c?a.element.val():"");var e=b.setting();e&&e[d]!==c&&(e=_.clone(e),e[d]=c,b.setting.set(e))}),c&&("classes"!==d&&"xfn"!==d||!_.isArray(c[d])?a.set(c[d]):a.set(c[d].join(" ")))}),b.setting.bind(function(c,d){var e,f=b.params.menu_item_id,g=[],h=[];!1===c?(e=a.control("nav_menu["+String(d.nav_menu_term_id)+"]"),b.container.remove(),_.each(e.getMenuItemControls(),function(a){d.menu_item_parent===a.setting().menu_item_parent&&a.setting().position>d.position?g.push(a):a.setting().menu_item_parent===f&&h.push(a)}),_.each(g,function(a){var b=_.clone(a.setting());b.position+=h.length,a.setting.set(b)}),_.each(h,function(a,b){var c=_.clone(a.setting());c.position=d.position+b,c.menu_item_parent=d.menu_item_parent,a.setting.set(c)}),e.debouncedReflowMenuItems()):(_.each(c,function(a,d){b.elements[d]&&b.elements[d].set(c[d])}),b.container.find(".menu-item-data-parent-id").val(c.menu_item_parent),(c.position!==d.position||c.menu_item_parent!==d.menu_item_parent)&&b.getMenuControl().debouncedReflowMenuItems())})},_setupRemoveUI:function(){var d,e=this;d=e.container.find(".item-delete"),d.on("click",function(){var d,f,g,h=!0;c("body").hasClass("adding-menu-items")||(h=!1),f=e.container.nextAll(".customize-control-nav_menu_item:visible").first(),g=e.container.prevAll(".customize-control-nav_menu_item:visible").first(),d=f.length?f.find(!1===h?".item-edit":".item-delete").first():g.length?g.find(!1===h?".item-edit":".item-delete").first():e.container.nextAll(".customize-control-nav_menu").find(".add-new-menu-item").first(),e.container.slideUp(function(){e.setting.set(!1),b.a11y.speak(a.Menus.data.l10n.itemDeleted),d.focus()})})},_setupLinksUI:function(){var b;b=this.container.find("a.original-link"),b.on("click",function(b){b.preventDefault(),a.previewer.previewUrl(b.target.toString())})},_setupTitleUI:function(){var b=this;b.setting.bind(function(c){if(c){var d=b.container.find(".menu-item-title"),e=c.title||a.Menus.data.l10n.untitled;c._invalid&&(e=a.Menus.data.l10n.invalidTitleTpl.replace("%s",e)),c.title?d.text(e).removeClass("no-title"):d.text(e).addClass("no-title")}})},getDepth:function(){var b=this,c=b.setting(),d=0;if(!c)return 0;for(;c&&c.menu_item_parent&&(d+=1,b=a.control("nav_menu_item["+c.menu_item_parent+"]"));)c=b.setting();return d},renderContent:function(){var b,c=this,d=c.setting();c.params.title=d.title||"",c.params.depth=c.getDepth(),c.container.data("item-depth",c.params.depth),b=["menu-item","menu-item-depth-"+String(c.params.depth),"menu-item-"+d.object,"menu-item-edit-inactive"],d._invalid?(b.push("menu-item-invalid"),c.params.title=a.Menus.data.l10n.invalidTitleTpl.replace("%s",c.params.title)):"draft"===d.status&&(b.push("pending"),c.params.title=a.Menus.data.pendingTitleTpl.replace("%s",c.params.title)),c.params.el_classes=b.join(" "),c.params.item_type_label=d.type_label,c.params.item_type=d.type,c.params.url=d.url,c.params.target=d.target,c.params.attr_title=d.attr_title,c.params.classes=_.isArray(d.classes)?d.classes.join(" "):d.classes,c.params.attr_title=d.attr_title,c.params.xfn=d.xfn,c.params.description=d.description,c.params.parent=d.menu_item_parent,c.params.original_title=d.original_title||"",c.container.addClass(c.params.el_classes),a.Control.prototype.renderContent.call(c)},getMenuControl:function(){var b=this,c=b.setting();return c&&c.nav_menu_term_id?a.control("nav_menu["+c.nav_menu_term_id+"]"):null},expandControlSection:function(){var a=this.container.closest(".accordion-section");a.hasClass("open")||a.find(".accordion-section-title:first").trigger("click")},expandForm:function(a){this.toggleForm(!0,a)},collapseForm:function(a){this.toggleForm(!1,a)},toggleForm:function(b,c){var d,e,f,g=this;return d=this.container,e=d.find(".menu-item-settings:first"),"undefined"==typeof b&&(b=!e.is(":visible")),e.is(":visible")===b?void(c&&c.completeCallback&&c.completeCallback()):void(b?(a.control.each(function(a){g.params.type===a.params.type&&g!==a&&a.collapseForm()}),f=function(){d.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active"),g.container.trigger("expanded"),c&&c.completeCallback&&c.completeCallback()},d.find(".item-edit").attr("aria-expanded","true"),e.slideDown("fast",f),g.container.trigger("expand")):(f=function(){d.addClass("menu-item-edit-inactive").removeClass("menu-item-edit-active"),g.container.trigger("collapsed"),c&&c.completeCallback&&c.completeCallback()},g.container.trigger("collapse"),d.find(".item-edit").attr("aria-expanded","false"),e.slideUp("fast",f)))},focus:function(a){a=a||{};var b=this,c=a.completeCallback;b.expandControlSection(),a.completeCallback=function(){var a;a=b.container.find(".menu-item-settings").find("input, select, textarea, button, object, a[href], [tabindex]").filter(":visible"),a.first().focus(),c&&c()},b.expandForm(a)},moveUp:function(){this._changePosition(-1),b.a11y.speak(a.Menus.data.l10n.movedUp)},moveDown:function(){this._changePosition(1),b.a11y.speak(a.Menus.data.l10n.movedDown)},moveLeft:function(){this._changeDepth(-1),b.a11y.speak(a.Menus.data.l10n.movedLeft)},moveRight:function(){this._changeDepth(1),b.a11y.speak(a.Menus.data.l10n.movedRight)},_changePosition:function(a){var b,d,e=this,f=_.clone(e.setting()),g=[];if(1!==a&&-1!==a)throw new Error("Offset changes by 1 are only supported.");if(e.setting()){if(_(e.getMenuControl().getMenuItemControls()).each(function(a){a.setting().menu_item_parent===f.menu_item_parent&&g.push(a.setting)}),g.sort(function(a,b){return a().position-b().position}),d=_.indexOf(g,e.setting),-1===d)throw new Error("Expected setting to be among siblings.");0===d&&0>a||d===g.length-1&&a>0||(b=g[d+a],b&&b.set(c.extend(_.clone(b()),{position:f.position})),f.position+=a,e.setting.set(f))}},_changeDepth:function(b){if(1!==b&&-1!==b)throw new Error("Offset changes by 1 are only supported.");var d,e,f,g=this,h=_.clone(g.setting()),i=[];if(_(g.getMenuControl().getMenuItemControls()).each(function(a){a.setting().menu_item_parent===h.menu_item_parent&&i.push(a)}),i.sort(function(a,b){return a.setting().position-b.setting().position}),d=_.indexOf(i,g),-1===d)throw new Error("Expected control to be among siblings.");if(-1===b){if(!h.menu_item_parent)return;f=a.control("nav_menu_item["+h.menu_item_parent+"]"),_(i).chain().slice(d).each(function(a,b){a.setting.set(c.extend({},a.setting(),{menu_item_parent:g.params.menu_item_id,position:b}))}),_(g.getMenuControl().getMenuItemControls()).each(function(a){var b,d;d=a.setting().menu_item_parent===f.setting().menu_item_parent&&a.setting().position>f.setting().position,d&&(b=_.clone(a.setting()),a.setting.set(c.extend(b,{position:b.position+1})))}),h.position=f.setting().position+1,h.menu_item_parent=f.setting().menu_item_parent,g.setting.set(h)}else if(1===b){if(0===d)return;e=i[d-1],h.menu_item_parent=e.params.menu_item_id,h.position=0,_(g.getMenuControl().getMenuItemControls()).each(function(a){a.setting().menu_item_parent===h.menu_item_parent&&(h.position=Math.max(h.position,a.setting().position))}),h.position+=1,g.setting.set(h)}}}),a.Menus.MenuNameControl=a.Control.extend({ready:function(){var b=this,c=b.setting();b.active.validate=function(){var c,d=a.section(b.section());return c=d?d.active():!1},b.nameElement=new a.Element(b.container.find(".menu-name-field")),b.nameElement.bind(function(a){var c=b.setting();c&&c.name!==a&&(c=_.clone(c),c.name=a,b.setting.set(c))}),c&&b.nameElement.set(c.name),b.setting.bind(function(a){a&&b.nameElement.set(a.name)})}}),a.Menus.MenuAutoAddControl=a.Control.extend({ready:function(){var b=this,c=b.setting();b.active.validate=function(){var c,d=a.section(b.section());return c=d?d.active():!1},b.autoAddElement=new a.Element(b.container.find("input[type=checkbox].auto_add")),b.autoAddElement.bind(function(a){var c=b.setting();c&&c.name!==a&&(c=_.clone(c),c.auto_add=a,b.setting.set(c))}),c&&b.autoAddElement.set(c.auto_add),b.setting.bind(function(a){a&&b.autoAddElement.set(a.auto_add)})}}),a.Menus.MenuControl=a.Control.extend({ready:function(){var b,d,f,g=this,h=g.params.menu_id,i=g.setting();if("undefined"==typeof this.params.menu_id)throw new Error("params.menu_id was not defined");g.active.validate=function(){var b,c=a.section(g.section());return b=c?c.active():!1},g.$controlSection=g.container.closest(".control-section"),g.$sectionContent=g.container.closest(".accordion-section-content"),this._setupModel(),a.section(g.section(),function(a){a.deferred.initSortables.done(function(a){g._setupSortable(a)})}),this._setupAddition(),this._setupLocations(),this._setupTitle(),i&&(b=e(i.name),a.control.each(function(c){c.extended(a.controlConstructor.widget_form)&&"nav_menu"===c.params.widget_id_base&&(c.container.find(".nav-menu-widget-form-controls:first").show(),c.container.find(".nav-menu-widget-no-menus-message:first").hide(),f=c.container.find("select"),0===f.find("option[value="+String(h)+"]").length&&f.append(new Option(b,h)))}),d=c("#available-widgets-list .widget-tpl:has( input.id_base[ value=nav_menu ] )"),d.find(".nav-menu-widget-form-controls:first").show(),d.find(".nav-menu-widget-no-menus-message:first").hide(),f=d.find(".widget-inside select:first"),0===f.find("option[value="+String(h)+"]").length&&f.append(new Option(b,h)))},_setupModel:function(){var b=this,c=b.params.menu_id;b.setting.bind(function(d){var f;!1===d?b._handleDeletion():(f=e(d.name),a.control.each(function(b){if(b.extended(a.controlConstructor.widget_form)&&"nav_menu"===b.params.widget_id_base){var d=b.container.find("select");d.find("option[value="+String(c)+"]").text(f)}}))}),b.container.find(".menu-delete").on("click",function(a){a.stopPropagation(),a.preventDefault(),b.setting.set(!1)})},_setupSortable:function(b){var c=this;if(!b.is(c.$sectionContent))throw new Error("Unexpected menuList.");b.on("sortstart",function(){c.isSorting=!0}),b.on("sortstop",function(){setTimeout(function(){var b=c.$sectionContent.sortable("toArray"),d=[],e=0,f=10;c.isSorting=!1,c.$sectionContent.scrollLeft(0),_.each(b,function(b){var c,e,f;f=b.match(/^customize-control-nav_menu_item-(-?\d+)$/,""),f&&(c=parseInt(f[1],10),e=a.control("nav_menu_item["+String(c)+"]"),e&&d.push(e))}),_.each(d,function(a){if(!1!==a.setting()){var b=_.clone(a.setting());e+=1,f+=1,b.position=e,a.priority(f),b.menu_item_parent=parseInt(a.container.find(".menu-item-data-parent-id").val(),10),b.menu_item_parent||(b.menu_item_parent=0),a.setting.set(b)}})})}),c.isReordering=!1,this.container.find(".reorder-toggle").on("click",function(){c.toggleReordering(!c.isReordering)})},_setupAddition:function(){var b=this;this.container.find(".add-new-menu-item").on("click",function(d){b.$sectionContent.hasClass("reordering")||(c("body").hasClass("adding-menu-items")?(c(this).attr("aria-expanded","false"),a.Menus.availableMenuItemsPanel.close(),d.stopPropagation()):(c(this).attr("aria-expanded","true"),a.Menus.availableMenuItemsPanel.open(b)))})},_handleDeletion:function(){var d,e,f,g=this,h=g.params.menu_id,i=0;d=a.section(g.section()),e=function(){d.container.remove(),a.section.remove(d.id)},d&&d.expanded()?d.collapse({completeCallback:function(){e(),b.a11y.speak(a.Menus.data.l10n.menuDeleted),a.panel("nav_menus").focus()}}):e(),a.each(function(a){/^nav_menu\[/.test(a.id)&&!1!==a()&&(i+=1)}),a.control.each(function(b){if(b.extended(a.controlConstructor.widget_form)&&"nav_menu"===b.params.widget_id_base){var c=b.container.find("select");c.val()===String(h)&&c.prop("selectedIndex",0).trigger("change"),b.container.find(".nav-menu-widget-form-controls:first").toggle(0!==i),b.container.find(".nav-menu-widget-no-menus-message:first").toggle(0===i),b.container.find("option[value="+String(h)+"]").remove()}}),f=c("#available-widgets-list .widget-tpl:has( input.id_base[ value=nav_menu ] )"),f.find(".nav-menu-widget-form-controls:first").toggle(0!==i),f.find(".nav-menu-widget-no-menus-message:first").toggle(0===i),f.find("option[value="+String(h)+"]").remove()},_setupLocations:function(){var b=this;b.container.find(".assigned-menu-location").each(function(){var d,f,g=c(this),h=g.find("input[type=checkbox]"),i=a("nav_menu_locations["+h.data("location-id")+"]");f=function(b){var c=a("nav_menu["+String(b)+"]");b&&c&&c()?g.find(".theme-location-set").show().find("span").text(e(c().name)):g.find(".theme-location-set").hide()},d=new a.Element(h),d.set(i.get()===b.params.menu_id),h.on("change",function(){i.set(this.checked?b.params.menu_id:0)}),i.bind(function(a){d.set(a===b.params.menu_id),f(a)}),f(i.get())})},_setupTitle:function(){var b=this;b.setting.bind(function(d){if(d){var f=b.container.closest(".accordion-section"),g=b.params.menu_id,h=f.find(".accordion-section-title"),i=f.find(".customize-section-title h3"),j=f.find(".menu-in-location"),k=i.find(".customize-action"),l=e(d.name);h.text(l),j.length&&j.appendTo(h),i.text(l),k.length&&k.prependTo(i),a.control.each(function(a){/^nav_menu_locations\[/.test(a.id)&&a.container.find("option[value="+g+"]").text(l)}),f.find(".customize-control-checkbox input").each(function(){c(this).prop("checked")&&c(".current-menu-location-name-"+c(this).data("location-id")).text(l)})}})},toggleReordering:function(c){var d=this.container.find(".add-new-menu-item"),e=this.container.find(".reorder-toggle"),f=this.$sectionContent.find(".item-title");c=Boolean(c),c!==this.$sectionContent.hasClass("reordering")&&(this.isReordering=c,this.$sectionContent.toggleClass("reordering",c),this.$sectionContent.sortable(this.isReordering?"disable":"enable"),this.isReordering?(d.attr({tabindex:"-1","aria-hidden":"true"}),e.attr("aria-label",a.Menus.data.l10n.reorderLabelOff),b.a11y.speak(a.Menus.data.l10n.reorderModeOn),f.attr("aria-hidden","false")):(d.removeAttr("tabindex aria-hidden"),e.attr("aria-label",a.Menus.data.l10n.reorderLabelOn),b.a11y.speak(a.Menus.data.l10n.reorderModeOff),f.attr("aria-hidden","true")),c&&_(this.getMenuItemControls()).each(function(a){a.collapseForm()}))},getMenuItemControls:function(){var b=this,c=[],d=b.params.menu_id;return a.control.each(function(a){"nav_menu_item"===a.params.type&&a.setting()&&d===a.setting().nav_menu_term_id&&c.push(a)}),c},reflowMenuItems:function(){var a,b=this,c=b.getMenuItemControls();a=function(b){var c=[],d=b.currentParent;_.each(b.menuItemControls,function(a){d===a.setting().menu_item_parent&&c.push(a)}),c.sort(function(a,b){return a.setting().position-b.setting().position}),_.each(c,function(c){b.currentAbsolutePosition+=1,c.priority.set(b.currentAbsolutePosition),c.container.hasClass("menu-item-depth-"+String(b.currentDepth))||(_.each(c.container.prop("className").match(/menu-item-depth-\d+/g),function(a){
-c.container.removeClass(a)}),c.container.addClass("menu-item-depth-"+String(b.currentDepth))),c.container.data("item-depth",b.currentDepth),b.currentDepth+=1,b.currentParent=c.params.menu_item_id,a(b),b.currentDepth-=1,b.currentParent=d}),c.length&&(_(c).each(function(a){a.container.removeClass("move-up-disabled move-down-disabled move-left-disabled move-right-disabled"),0===b.currentDepth?a.container.addClass("move-left-disabled"):10===b.currentDepth&&a.container.addClass("move-right-disabled")}),c[0].container.addClass("move-up-disabled").addClass("move-right-disabled").toggleClass("move-down-disabled",1===c.length),c[c.length-1].container.addClass("move-down-disabled").toggleClass("move-up-disabled",1===c.length))},a({menuItemControls:c,currentParent:0,currentDepth:0,currentAbsolutePosition:0}),b.container.find(".reorder-toggle").toggle(c.length>1)},debouncedReflowMenuItems:_.debounce(function(){this.reflowMenuItems.apply(this,arguments)},0),addItemToMenu:function(d){var e,f,g,h,i,j=this,k=0,l=10;return _.each(j.getMenuItemControls(),function(a){!1!==a.setting()&&(l=Math.max(l,a.priority()),0===a.setting().menu_item_parent&&(k=Math.max(k,a.setting().position)))}),k+=1,l+=1,d=c.extend({},a.Menus.data.defaultSettingValues.nav_menu_item,d,{nav_menu_term_id:j.params.menu_id,original_title:d.title,position:k}),delete d.id,i=a.Menus.generatePlaceholderAutoIncrementId(),e="nav_menu_item["+String(i)+"]",f={type:"nav_menu_item",transport:a.Menus.data.settingTransport,previewer:a.previewer},g=a.create(e,e,{},f),g.set(d),h=new a.controlConstructor.nav_menu_item(e,{params:{type:"nav_menu_item",content:'<li id="customize-control-nav_menu_item-'+String(i)+'" class="customize-control customize-control-nav_menu_item"></li>',section:j.id,priority:l,active:!0,settings:{"default":e},menu_item_id:i},previewer:a.previewer}),a.control.add(e,h),g.preview(),j.debouncedReflowMenuItems(),b.a11y.speak(a.Menus.data.l10n.itemAdded),h}}),a.Menus.NewMenuControl=a.Control.extend({ready:function(){this._bindHandlers()},_bindHandlers:function(){var a=this,b=c("#customize-control-new_menu_name input"),d=c("#create-new-menu-submit");b.on("keydown",function(b){13===b.which&&a.submit()}),d.on("click",function(b){a.submit(),b.stopPropagation(),b.preventDefault()})},submit:function(){var d,f,g=this,h=g.container.closest(".accordion-section-new-menu"),i=h.find(".menu-name-field").first(),j=i.val(),k=a.Menus.generatePlaceholderAutoIncrementId();return j?(f="nav_menu["+String(k)+"]",a.create(f,f,{},{type:"nav_menu",transport:a.Menus.data.settingTransport,previewer:a.previewer}),a(f).set(c.extend({},a.Menus.data.defaultSettingValues.nav_menu,{name:j})),d=new a.Menus.MenuSection(f,{params:{id:f,panel:"nav_menus",title:e(j),customizeAction:a.Menus.data.l10n.customizingMenus,type:"nav_menu",priority:10,menu_id:k}}),a.section.add(f,d),i.val(""),i.removeClass("invalid"),b.a11y.speak(a.Menus.data.l10n.menuAdded),a.section(f).focus(),void c("#menu-to-edit").css("margin-top",0)):(i.addClass("invalid"),void i.focus())}}),c.extend(a.controlConstructor,{nav_menu_location:a.Menus.MenuLocationControl,nav_menu_item:a.Menus.MenuItemControl,nav_menu:a.Menus.MenuControl,nav_menu_name:a.Menus.MenuNameControl,nav_menu_auto_add:a.Menus.MenuAutoAddControl,new_menu:a.Menus.NewMenuControl}),c.extend(a.panelConstructor,{nav_menus:a.Menus.MenusPanel}),c.extend(a.sectionConstructor,{nav_menu:a.Menus.MenuSection,new_menu:a.Menus.NewMenuSection}),a.bind("ready",function(){a.Menus.availableMenuItemsPanel=new a.Menus.AvailableMenuItemsPanelView({collection:a.Menus.availableMenuItems}),a.bind("saved",function(b){(b.nav_menu_updates||b.nav_menu_item_updates)&&a.Menus.applySavedData(b)}),a.previewer.bind("focus-nav-menu-item-control",a.Menus.focusMenuItemControl)}),a.Menus.applySavedData=function(d){var e={},f={};_(d.nav_menu_updates).each(function(d){var f,g,h,i,j,k,l,m,n,o,p,q;if("inserted"===d.status){if(!d.previous_term_id)throw new Error("Expected previous_term_id");if(!d.term_id)throw new Error("Expected term_id");if(f="nav_menu["+String(d.previous_term_id)+"]",!a.has(f))throw new Error("Expected setting to exist: "+f);if(i=a(f),!a.section.has(f))throw new Error("Expected control to exist: "+f);if(m=a.section(f),l=i.get(),!l)throw new Error("Did not expect setting to be empty (deleted).");l=c.extend(_.clone(l),d.saved_value),e[d.previous_term_id]=d.term_id,g="nav_menu["+String(d.term_id)+"]",j=a.create(g,g,l,{type:"nav_menu",transport:a.Menus.data.settingTransport,previewer:a.previewer}),m.expanded()&&m.collapse(),n=new a.Menus.MenuSection(g,{params:{id:g,panel:"nav_menus",title:l.name,customizeAction:a.Menus.data.l10n.customizingMenus,type:"nav_menu",priority:m.priority.get(),active:!0,menu_id:d.term_id}}),a.section.add(g,n),a.control.each(function(b){if(b.extended(a.controlConstructor.widget_form)&&"nav_menu"===b.params.widget_id_base){var c,e,f;c=b.container.find("select"),e=c.find("option[value="+String(d.previous_term_id)+"]"),f=c.find("option[value="+String(d.term_id)+"]"),f.prop("selected",e.prop("selected")),e.remove()}}),i.callbacks.disable(),i.set(!1),i.preview(),j.preview(),i._dirty=!1,m.container.remove(),a.section.remove(f),q=0,a.each(function(a){/^nav_menu\[/.test(a.id)&&!1!==a()&&(q+=1)}),p=c("#available-widgets-list .widget-tpl:has( input.id_base[ value=nav_menu ] )"),p.find(".nav-menu-widget-form-controls:first").toggle(0!==q),p.find(".nav-menu-widget-no-menus-message:first").toggle(0===q),p.find("option[value="+String(d.previous_term_id)+"]").remove(),b.customize.control.each(function(a){/^nav_menu_locations\[/.test(a.id)&&a.container.find("option[value="+String(d.previous_term_id)+"]").remove()}),a.each(function(b){var c=a.state("saved").get();/^nav_menu_locations\[/.test(b.id)&&b.get()===d.previous_term_id&&(b.set(d.term_id),b._dirty=!1,a.state("saved").set(c),b.preview())}),m.expanded.get()&&n.expand()}else if("updated"===d.status){if(h="nav_menu["+String(d.term_id)+"]",!a.has(h))throw new Error("Expected setting to exist: "+h);k=a(h),_.isEqual(d.saved_value,k.get())||(o=a.state("saved").get(),k.set(d.saved_value),k._dirty=!1,a.state("saved").set(o))}}),_(d.nav_menu_item_updates).each(function(a){a.previous_post_id&&(f[a.previous_post_id]=a.post_id)}),_(d.nav_menu_item_updates).each(function(b){var c,d,g,h,i,j,k;if("inserted"===b.status){if(!b.previous_post_id)throw new Error("Expected previous_post_id");if(!b.post_id)throw new Error("Expected post_id");if(c="nav_menu_item["+String(b.previous_post_id)+"]",!a.has(c))throw new Error("Expected setting to exist: "+c);if(g=a(c),!a.control.has(c))throw new Error("Expected control to exist: "+c);if(j=a.control(c),i=g.get(),!i)throw new Error("Did not expect setting to be empty (deleted).");if(i=_.clone(i),i.menu_item_parent<0){if(!f[i.menu_item_parent])throw new Error("inserted ID for menu_item_parent not available");i.menu_item_parent=f[i.menu_item_parent]}e[i.nav_menu_term_id]&&(i.nav_menu_term_id=e[i.nav_menu_term_id]),d="nav_menu_item["+String(b.post_id)+"]",h=a.create(d,d,i,{type:"nav_menu_item",transport:a.Menus.data.settingTransport,previewer:a.previewer}),k=new a.controlConstructor.nav_menu_item(d,{params:{type:"nav_menu_item",content:'<li id="customize-control-nav_menu_item-'+String(b.post_id)+'" class="customize-control customize-control-nav_menu_item"></li>',menu_id:b.post_id,section:"nav_menu["+String(i.nav_menu_term_id)+"]",priority:j.priority.get(),active:!0,settings:{"default":d},menu_item_id:b.post_id},previewer:a.previewer}),j.container.remove(),a.control.remove(c),a.control.add(d,k),g.callbacks.disable(),g.set(!1),g.preview(),h.preview(),g._dirty=!1,k.container.toggleClass("menu-item-edit-inactive",j.container.hasClass("menu-item-edit-inactive"))}}),_.each(d.widget_nav_menu_updates,function(b,c){var d=a(c);d&&(d._value=b,d.preview())})},a.Menus.focusMenuItemControl=function(b){var c=a.Menus.getMenuItemControl(b);c&&c.focus()},a.Menus.getMenuControl=function(b){return a.control("nav_menu["+b+"]")},a.Menus.getMenuItemControl=function(b){return a.control(d(b))}}(wp.customize,wp,jQuery);
\ No newline at end of file
+!function(a,b,c){"use strict";function d(a){return"nav_menu_item["+a+"]"}function e(b){return b=b||"",b=c("<div>").text(b).html(),b=c.trim(b),b||a.Menus.data.l10n.unnamed}wpNavMenu.originalInit=wpNavMenu.init,wpNavMenu.options.menuItemDepthPerLevel=20,wpNavMenu.options.sortableItems="> .customize-control-nav_menu_item",wpNavMenu.options.targetTolerance=10,wpNavMenu.init=function(){this.jQueryExtensions()},a.Menus=a.Menus||{},a.Menus.data={itemTypes:[],l10n:{},settingTransport:"refresh",phpIntMax:0,defaultSettingValues:{nav_menu:{},nav_menu_item:{}},locationSlugMappedToName:{}},"undefined"!=typeof _wpCustomizeNavMenusSettings&&c.extend(a.Menus.data,_wpCustomizeNavMenusSettings),a.Menus.generatePlaceholderAutoIncrementId=function(){return-Math.ceil(a.Menus.data.phpIntMax*Math.random())},a.Menus.AvailableItemModel=Backbone.Model.extend(c.extend({id:null},a.Menus.data.defaultSettingValues.nav_menu_item)),a.Menus.AvailableItemCollection=Backbone.Collection.extend({model:a.Menus.AvailableItemModel,sort_key:"order",comparator:function(a){return-a.get(this.sort_key)},sortByField:function(a){this.sort_key=a,this.sort()}}),a.Menus.availableMenuItems=new a.Menus.AvailableItemCollection(a.Menus.data.availableMenuItems),a.Menus.AvailableMenuItemsPanelView=b.Backbone.View.extend({el:"#available-menu-items",events:{"input #menu-items-search":"debounceSearch","keyup #menu-items-search":"debounceSearch","focus .menu-item-tpl":"focus","click .menu-item-tpl":"_submit","click #custom-menu-item-submit":"_submitLink","keypress #custom-menu-item-name":"_submitLink",keydown:"keyboardAccessible"},selected:null,currentMenuControl:null,debounceSearch:null,$search:null,searchTerm:"",rendered:!1,pages:{},sectionContent:"",loading:!1,initialize:function(){var b=this;a.panel.has("nav_menus")&&(this.$search=c("#menu-items-search"),this.sectionContent=this.$el.find(".accordion-section-content"),this.debounceSearch=_.debounce(b.search,500),_.bindAll(this,"close"),c("#customize-controls, .customize-section-back").on("click keydown",function(a){var d=c(a.target).is(".item-delete, .item-delete *"),e=c(a.target).is(".add-new-menu-item, .add-new-menu-item *");!c("body").hasClass("adding-menu-items")||d||e||b.close()}),c(".clear-results").on("click",function(){b.$search.val("").focus().trigger("keyup")}),this.$el.on("input","#custom-menu-item-name.invalid, #custom-menu-item-url.invalid",function(){c(this).removeClass("invalid")}),a.panel("nav_menus").container.bind("expanded",function(){b.rendered||(b.initList(),b.rendered=!0)}),this.sectionContent.scroll(function(){var a=b.$el.find(".accordion-section.open .accordion-section-content").prop("scrollHeight"),d=b.$el.find(".accordion-section.open").height();if(!b.loading&&c(this).scrollTop()>.75*a-d){var e=c(this).data("type"),f=c(this).data("object");"search"===e?b.searchTerm&&b.doSearch(b.pages.search):b.loadItems(e,f)}}),a.previewer.bind("url",this.close),b.delegateEvents())},search:function(a){var b=c("#available-menu-items-search"),d=c("#available-menu-items .accordion-section").not(b);a&&this.searchTerm!==a.target.value&&(""===a.target.value||b.hasClass("open")?""===a.target.value&&(b.removeClass("open"),d.show(),b.find(".clear-results").removeClass("is-visible")):(d.fadeOut(100),b.find(".accordion-section-content").slideDown("fast"),b.addClass("open"),b.find(".clear-results").addClass("is-visible")),this.searchTerm=a.target.value,this.pages.search=1,this.doSearch(1))},doSearch:function(d){var e,f=this,g=c("#available-menu-items-search"),h=g.find(".accordion-section-content"),i=b.template("available-menu-item");if(f.currentRequest&&f.currentRequest.abort(),!(d<0)){if(d>1)g.addClass("loading-more"),h.attr("aria-busy","true"),b.a11y.speak(a.Menus.data.l10n.itemsLoadingMore);else if(""===f.searchTerm)return h.html(""),void b.a11y.speak("");g.addClass("loading"),f.loading=!0,e={"customize-menus-nonce":a.settings.nonce["customize-menus"],wp_customize:"on",search:f.searchTerm,page:d},f.currentRequest=b.ajax.post("search-available-menu-items-customizer",e),f.currentRequest.done(function(c){var e;1===d&&h.empty(),g.removeClass("loading loading-more"),h.attr("aria-busy","false"),g.addClass("open"),f.loading=!1,e=new a.Menus.AvailableItemCollection(c.items),f.collection.add(e.models),e.each(function(a){h.append(i(a.attributes))}),20>e.length?f.pages.search=-1:f.pages.search=f.pages.search+1,e&&d>1?b.a11y.speak(a.Menus.data.l10n.itemsFoundMore.replace("%d",e.length)):e&&1===d&&b.a11y.speak(a.Menus.data.l10n.itemsFound.replace("%d",e.length))}),f.currentRequest.fail(function(a){a.message&&(h.empty().append(c('<p class="nothing-found"></p>').text(a.message)),b.a11y.speak(a.message)),f.pages.search=-1}),f.currentRequest.always(function(){g.removeClass("loading loading-more"),h.attr("aria-busy","false"),f.loading=!1,f.currentRequest=null})}},initList:function(){var b=this;_.each(a.Menus.data.itemTypes,function(a){b.pages[a.type+":"+a.object]=0,b.loadItems(a.type,a.object)})},loadItems:function(d,e){var f,g,h,i,j=this;h=b.template("available-menu-item"),-1!==j.pages[d+":"+e]&&(i=c("#available-menu-items-"+d+"-"+e),i.find(".accordion-section-title").addClass("loading"),j.loading=!0,f={"customize-menus-nonce":a.settings.nonce["customize-menus"],wp_customize:"on",type:d,object:e,page:j.pages[d+":"+e]},g=b.ajax.post("load-available-menu-items-customizer",f),g.done(function(b){var c,f;return c=b.items,0===c.length?(0===j.pages[d+":"+e]&&i.addClass("cannot-expand").removeClass("loading").find(".accordion-section-title > button").prop("tabIndex",-1),void(j.pages[d+":"+e]=-1)):(c=new a.Menus.AvailableItemCollection(c),j.collection.add(c.models),f=i.find(".accordion-section-content"),c.each(function(a){f.append(h(a.attributes))}),void(j.pages[d+":"+e]+=1))}),g.fail(function(a){"undefined"!=typeof console&&console.error&&console.error(a)}),g.always(function(){i.find(".accordion-section-title").removeClass("loading"),j.loading=!1}))},itemSectionHeight:function(){var a,b,c,d;b=window.innerHeight,a=this.$el.find(".accordion-section:not( #available-menu-items-search ) .accordion-section-content"),c=46*(2+a.length)-13,d=b-c,120<d&&290>d&&a.css("max-height",d)},select:function(a){this.selected=c(a),this.selected.siblings(".menu-item-tpl").removeClass("selected"),this.selected.addClass("selected")},focus:function(a){this.select(c(a.currentTarget))},_submit:function(a){"keypress"===a.type&&13!==a.which&&32!==a.which||this.submit(c(a.currentTarget))},submit:function(a){var b,d;a||(a=this.selected),a&&this.currentMenuControl&&(this.select(a),b=c(this.selected).data("menu-item-id"),d=this.collection.findWhere({id:b}),d&&(this.currentMenuControl.addItemToMenu(d.attributes),c(a).find(".menu-item-handle").addClass("item-added")))},_submitLink:function(a){"keypress"===a.type&&13!==a.which||this.submitLink()},submitLink:function(){var b,d=c("#custom-menu-item-name"),e=c("#custom-menu-item-url");if(this.currentMenuControl){if(""===d.val())return void d.addClass("invalid");if(""===e.val()||"http://"===e.val())return void e.addClass("invalid");b={title:d.val(),url:e.val(),type:"custom",type_label:a.Menus.data.l10n.custom_label,object:""},this.currentMenuControl.addItemToMenu(b),e.val("http://"),d.val("")}},open:function(a){this.currentMenuControl=a,this.itemSectionHeight(),c("body").addClass("adding-menu-items"),_(this.currentMenuControl.getMenuItemControls()).each(function(a){a.collapseForm()}),this.$el.find(".selected").removeClass("selected"),this.$search.focus()},close:function(a){a=a||{},a.returnFocus&&this.currentMenuControl&&this.currentMenuControl.container.find(".add-new-menu-item").focus(),this.currentMenuControl=null,this.selected=null,c("body").removeClass("adding-menu-items"),c("#available-menu-items .menu-item-handle.item-added").removeClass("item-added"),this.$search.val("")},keyboardAccessible:function(a){var b=13===a.which,d=27===a.which,e=9===a.which&&a.shiftKey,f=c(a.target).is(this.$search);b&&!this.$search.val()||(f&&e?(this.currentMenuControl.container.find(".add-new-menu-item").focus(),a.preventDefault()):d&&this.close({returnFocus:!0}))}}),a.Menus.MenusPanel=a.Panel.extend({attachEvents:function(){a.Panel.prototype.attachEvents.call(this);var b=this,d=b.container.find(".panel-meta"),e=d.find(".customize-help-toggle"),f=d.find(".customize-panel-description"),g=c("#screen-options-wrap"),h=d.find(".customize-screen-options-toggle");h.on("click keydown",function(b){if(!a.utils.isKeydownButNotEnterEvent(b))return b.preventDefault(),f.not(":hidden")&&(f.slideUp("fast"),e.attr("aria-expanded","false")),"true"===h.attr("aria-expanded")?(h.attr("aria-expanded","false"),d.removeClass("open"),d.removeClass("active-menu-screen-options"),g.slideUp("fast")):(h.attr("aria-expanded","true"),d.addClass("open"),d.addClass("active-menu-screen-options"),g.slideDown("fast")),!1}),e.on("click keydown",function(b){a.utils.isKeydownButNotEnterEvent(b)||(b.preventDefault(),"true"===h.attr("aria-expanded")&&(h.attr("aria-expanded","false"),e.attr("aria-expanded","true"),d.addClass("open"),d.removeClass("active-menu-screen-options"),g.slideUp("fast"),f.slideDown("fast")))})},ready:function(){var a=this;this.container.find(".hide-column-tog").click(function(){var b=c(this),d=b.val();b.prop("checked")?a.checked(d):a.unchecked(d),a.saveManageColumnsState()}),this.container.find(".hide-column-tog").each(function(){var b=c(this),d=b.val();b.prop("checked")?a.checked(d):a.unchecked(d)})},saveManageColumnsState:_.debounce(function(){var a=this;a._updateHiddenColumnsRequest&&a._updateHiddenColumnsRequest.abort(),a._updateHiddenColumnsRequest=b.ajax.post("hidden-columns",{hidden:a.hidden(),screenoptionnonce:c("#screenoptionnonce").val(),page:"nav-menus"}),a._updateHiddenColumnsRequest.always(function(){a._updateHiddenColumnsRequest=null})},2e3),checked:function(a){this.container.addClass("field-"+a+"-active")},unchecked:function(a){this.container.removeClass("field-"+a+"-active")},hidden:function(){return c(".hide-column-tog").not(":checked").map(function(){var a=this.id;return a.substring(0,a.length-5)}).get().join(",")}}),a.Menus.MenuSection=a.Section.extend({initialize:function(b,d){var e=this;a.Section.prototype.initialize.call(e,b,d),e.deferred.initSortables=c.Deferred()},ready:function(){var b=this;if("undefined"==typeof b.params.menu_id)throw new Error("params.menu_id was not defined");b.active.validate=function(){return!!a.has(b.id)&&!!a(b.id).get()},b.populateControls(),b.navMenuLocationSettings={},b.assignedLocations=new a.Value([]),a.each(function(a,c){var d=c.match(/^nav_menu_locations\[(.+?)]/);d&&(b.navMenuLocationSettings[d[1]]=a,a.bind(function(){b.refreshAssignedLocations()}))}),b.assignedLocations.bind(function(a){b.updateAssignedLocationsInSectionTitle(a)}),b.refreshAssignedLocations(),a.bind("pane-contents-reflowed",function(){b.container.parent().length&&(b.container.find(".menu-item .menu-item-reorder-nav button").attr({tabindex:"0","aria-hidden":"false"}),b.container.find(".menu-item.move-up-disabled .menus-move-up").attr({tabindex:"-1","aria-hidden":"true"}),b.container.find(".menu-item.move-down-disabled .menus-move-down").attr({tabindex:"-1","aria-hidden":"true"}),b.container.find(".menu-item.move-left-disabled .menus-move-left").attr({tabindex:"-1","aria-hidden":"true"}),b.container.find(".menu-item.move-right-disabled .menus-move-right").attr({tabindex:"-1","aria-hidden":"true"}))})},populateControls:function(){var b,c,d,e,f,g=this;b=g.id+"[name]",e=a.control(b),e||(e=new a.controlConstructor.nav_menu_name(b,{params:{type:"nav_menu_name",content:'<li id="customize-control-'+g.id.replace("[","-").replace("]","")+'-name" class="customize-control customize-control-nav_menu_name"></li>',label:a.Menus.data.l10n.menuNameLabel,active:!0,section:g.id,priority:0,settings:{"default":g.id}}}),a.control.add(e.id,e),e.active.set(!0)),d=a.control(g.id),d||(d=new a.controlConstructor.nav_menu(g.id,{params:{type:"nav_menu",content:'<li id="customize-control-'+g.id.replace("[","-").replace("]","")+'" class="customize-control customize-control-nav_menu"></li>',section:g.id,priority:998,active:!0,settings:{"default":g.id},menu_id:g.params.menu_id}}),a.control.add(d.id,d),d.active.set(!0)),c=g.id+"[auto_add]",f=a.control(c),f||(f=new a.controlConstructor.nav_menu_auto_add(c,{params:{type:"nav_menu_auto_add",content:'<li id="customize-control-'+g.id.replace("[","-").replace("]","")+'-auto-add" class="customize-control customize-control-nav_menu_auto_add"></li>',label:"",active:!0,section:g.id,priority:999,settings:{"default":g.id}}}),a.control.add(f.id,f),f.active.set(!0))},refreshAssignedLocations:function(){var a=this,b=a.params.menu_id,c=[];_.each(a.navMenuLocationSettings,function(a,d){a()===b&&c.push(d)}),a.assignedLocations.set(c)},updateAssignedLocationsInSectionTitle:function(b){var d,e=this;d=e.container.find(".accordion-section-title:first"),d.find(".menu-in-location").remove(),_.each(b,function(b){var e,f;e=c('<span class="menu-in-location"></span>'),f=a.Menus.data.locationSlugMappedToName[b],e.text(a.Menus.data.l10n.menuLocation.replace("%s",f)),d.append(e)}),e.container.toggleClass("assigned-to-menu-location",0!==b.length)},onChangeExpanded:function(b,d){var e=this;b&&(wpNavMenu.menuList=e.container.find(".accordion-section-content:first"),wpNavMenu.targetList=wpNavMenu.menuList,c("#menu-to-edit").removeAttr("id"),wpNavMenu.menuList.attr("id","menu-to-edit").addClass("menu"),_.each(a.section(e.id).controls(),function(a){"nav_menu_item"===a.params.type&&a.actuallyEmbed()}),"resolved"!==e.deferred.initSortables.state()&&(wpNavMenu.initSortables(),e.deferred.initSortables.resolve(wpNavMenu.menuList),a.control("nav_menu["+String(e.params.menu_id)+"]").reflowMenuItems())),a.Section.prototype.onChangeExpanded.call(e,b,d)}}),a.Menus.NewMenuSection=a.Section.extend({attachEvents:function(){var a=this;this.container.on("click",".add-menu-toggle",function(){a.expanded()?a.collapse():a.expand()})},onChangeExpanded:function(a){var b=this,c=b.container.find(".add-menu-toggle"),d=b.container.find(".new-menu-section-content"),e=b.container.closest(".wp-full-overlay-sidebar-content");a?(c.addClass("open"),c.attr("aria-expanded","true"),d.slideDown("fast",function(){e.scrollTop(e.height())})):(c.removeClass("open"),c.attr("aria-expanded","false"),d.slideUp("fast"),d.find(".menu-name-field").removeClass("invalid"))}}),a.Menus.MenuLocationControl=a.Control.extend({initialize:function(b,c){var d=this,e=b.match(/^nav_menu_locations\[(.+?)]/);d.themeLocation=e[1],a.Control.prototype.initialize.call(d,b,c)},ready:function(){var b=this,c=/^nav_menu\[(-?\d+)]/;b.setting.validate=function(a){return parseInt(a,10)},b.container.find(".edit-menu").on("click",function(){var c=b.setting();a.section("nav_menu["+c+"]").focus()}),b.setting.bind("change",function(){0===b.setting()?b.container.find(".edit-menu").addClass("hidden"):b.container.find(".edit-menu").removeClass("hidden")}),a.bind("add",function(a){var d,f,g=a.id.match(c);g&&!1!==a()&&(f=g[1],d=new Option(e(a().name),f),b.container.find("select").append(d))}),a.bind("remove",function(a){var d,e=a.id.match(c);e&&(d=parseInt(e[1],10),b.setting()===d&&b.setting.set(""),b.container.find("option[value="+d+"]").remove())}),a.bind("change",function(a){var d,f=a.id.match(c);f&&(d=parseInt(f[1],10),!1===a()?(b.setting()===d&&b.setting.set(""),b.container.find("option[value="+d+"]").remove()):b.container.find("option[value="+d+"]").text(e(a().name)))})}}),a.Menus.MenuItemControl=a.Control.extend({initialize:function(b,d){var e=this;e.expanded=new a.Value((!1)),e.expandedArgumentsQueue=[],e.expanded.bind(function(a){var b=e.expandedArgumentsQueue.shift();b=c.extend({},e.defaultExpandedArguments,b),e.onChangeExpanded(a,b)}),a.Control.prototype.initialize.call(e,b,d),e.active.validate=function(){var b,c=a.section(e.section());return b=!!c&&c.active()}},embed:function(){var b,c=this,d=c.section();d&&(b=a.section(d),(b&&b.expanded()||a.settings.autofocus.control===c.id)&&c.actuallyEmbed())},actuallyEmbed:function(){var a=this;"resolved"!==a.deferred.embedded.state()&&(a.renderContent(),a.deferred.embedded.resolve())},ready:function(){if("undefined"==typeof this.params.menu_item_id)throw new Error("params.menu_item_id was not defined");this._setupControlToggle(),this._setupReorderUI(),this._setupUpdateUI(),this._setupRemoveUI(),this._setupLinksUI(),this._setupTitleUI()},_setupControlToggle:function(){var a=this;this.container.find(".menu-item-handle").on("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.getMenuControl();c.isReordering||c.isSorting||a.toggleForm()})},_setupReorderUI:function(){var a,d,e=this;a=b.template("menu-item-reorder-nav"),e.container.find(".item-controls").after(a),d=e.container.find(".menu-item-reorder-nav"),d.find(".menus-move-up, .menus-move-down, .menus-move-left, .menus-move-right").on("click",function(){var a=c(this);a.focus();var b=a.is(".menus-move-up"),d=a.is(".menus-move-down"),f=a.is(".menus-move-left"),g=a.is(".menus-move-right");b?e.moveUp():d?e.moveDown():f?e.moveLeft():g&&e.moveRight(),a.focus()})},_setupUpdateUI:function(){var b=this,c=b.setting();b.elements={},b.elements.url=new a.Element(b.container.find(".edit-menu-item-url")),b.elements.title=new a.Element(b.container.find(".edit-menu-item-title")),b.elements.attr_title=new a.Element(b.container.find(".edit-menu-item-attr-title")),b.elements.target=new a.Element(b.container.find(".edit-menu-item-target")),b.elements.classes=new a.Element(b.container.find(".edit-menu-item-classes")),b.elements.xfn=new a.Element(b.container.find(".edit-menu-item-xfn")),b.elements.description=new a.Element(b.container.find(".edit-menu-item-description")),_.each(b.elements,function(a,d){a.bind(function(c){a.element.is("input[type=checkbox]")&&(c=c?a.element.val():"");var e=b.setting();e&&e[d]!==c&&(e=_.clone(e),e[d]=c,b.setting.set(e))}),c&&("classes"!==d&&"xfn"!==d||!_.isArray(c[d])?a.set(c[d]):a.set(c[d].join(" ")))}),b.setting.bind(function(c,d){var e,f=b.params.menu_item_id,g=[],h=[];!1===c?(e=a.control("nav_menu["+String(d.nav_menu_term_id)+"]"),b.container.remove(),_.each(e.getMenuItemControls(),function(a){d.menu_item_parent===a.setting().menu_item_parent&&a.setting().position>d.position?g.push(a):a.setting().menu_item_parent===f&&h.push(a)}),_.each(g,function(a){var b=_.clone(a.setting());b.position+=h.length,a.setting.set(b)}),_.each(h,function(a,b){var c=_.clone(a.setting());c.position=d.position+b,c.menu_item_parent=d.menu_item_parent,a.setting.set(c)}),e.debouncedReflowMenuItems()):(_.each(c,function(a,d){b.elements[d]&&b.elements[d].set(c[d])}),b.container.find(".menu-item-data-parent-id").val(c.menu_item_parent),c.position===d.position&&c.menu_item_parent===d.menu_item_parent||b.getMenuControl().debouncedReflowMenuItems())})},_setupRemoveUI:function(){var d,e=this;d=e.container.find(".item-delete"),d.on("click",function(){var d,f,g,h=!0;c("body").hasClass("adding-menu-items")||(h=!1),f=e.container.nextAll(".customize-control-nav_menu_item:visible").first(),g=e.container.prevAll(".customize-control-nav_menu_item:visible").first(),d=f.length?f.find(!1===h?".item-edit":".item-delete").first():g.length?g.find(!1===h?".item-edit":".item-delete").first():e.container.nextAll(".customize-control-nav_menu").find(".add-new-menu-item").first(),e.container.slideUp(function(){e.setting.set(!1),b.a11y.speak(a.Menus.data.l10n.itemDeleted),d.focus()})})},_setupLinksUI:function(){var b;b=this.container.find("a.original-link"),b.on("click",function(b){b.preventDefault(),a.previewer.previewUrl(b.target.toString())})},_setupTitleUI:function(){var b=this;b.setting.bind(function(c){if(c){var d=b.container.find(".menu-item-title"),e=c.title||a.Menus.data.l10n.untitled;c._invalid&&(e=a.Menus.data.l10n.invalidTitleTpl.replace("%s",e)),c.title?d.text(e).removeClass("no-title"):d.text(e).addClass("no-title")}})},getDepth:function(){var b=this,c=b.setting(),d=0;if(!c)return 0;for(;c&&c.menu_item_parent&&(d+=1,b=a.control("nav_menu_item["+c.menu_item_parent+"]"));)c=b.setting();return d},renderContent:function(){var b,c=this,d=c.setting();c.params.title=d.title||"",c.params.depth=c.getDepth(),c.container.data("item-depth",c.params.depth),b=["menu-item","menu-item-depth-"+String(c.params.depth),"menu-item-"+d.object,"menu-item-edit-inactive"],d._invalid?(b.push("menu-item-invalid"),c.params.title=a.Menus.data.l10n.invalidTitleTpl.replace("%s",c.params.title)):"draft"===d.status&&(b.push("pending"),c.params.title=a.Menus.data.pendingTitleTpl.replace("%s",c.params.title)),c.params.el_classes=b.join(" "),c.params.item_type_label=d.type_label,c.params.item_type=d.type,c.params.url=d.url,c.params.target=d.target,c.params.attr_title=d.attr_title,c.params.classes=_.isArray(d.classes)?d.classes.join(" "):d.classes,c.params.attr_title=d.attr_title,c.params.xfn=d.xfn,c.params.description=d.description,c.params.parent=d.menu_item_parent,c.params.original_title=d.original_title||"",c.container.addClass(c.params.el_classes),a.Control.prototype.renderContent.call(c)},getMenuControl:function(){var b=this,c=b.setting();return c&&c.nav_menu_term_id?a.control("nav_menu["+c.nav_menu_term_id+"]"):null},expandControlSection:function(){var a=this.container.closest(".accordion-section");a.hasClass("open")||a.find(".accordion-section-title:first").trigger("click")},_toggleExpanded:a.Section.prototype._toggleExpanded,expand:a.Section.prototype.expand,expandForm:function(a){this.expand(a)},collapse:a.Section.prototype.collapse,collapseForm:function(a){this.collapse(a)},toggleForm:function(a,b){"undefined"==typeof a&&(a=!this.expanded()),a?this.expand(b):this.collapse(b)},onChangeExpanded:function(b,c){var d,e,f,g=this;return d=this.container,e=d.find(".menu-item-settings:first"),"undefined"==typeof b&&(b=!e.is(":visible")),e.is(":visible")===b?void(c&&c.completeCallback&&c.completeCallback()):void(b?(a.control.each(function(a){g.params.type===a.params.type&&g!==a&&a.collapseForm()}),f=function(){d.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active"),g.container.trigger("expanded"),c&&c.completeCallback&&c.completeCallback()},d.find(".item-edit").attr("aria-expanded","true"),e.slideDown("fast",f),g.container.trigger("expand")):(f=function(){d.addClass("menu-item-edit-inactive").removeClass("menu-item-edit-active"),g.container.trigger("collapsed"),c&&c.completeCallback&&c.completeCallback()},g.container.trigger("collapse"),d.find(".item-edit").attr("aria-expanded","false"),e.slideUp("fast",f)))},focus:function(a){a=a||{};var b=this,c=a.completeCallback;b.expandControlSection(),a.completeCallback=function(){var a;a=b.container.find(".menu-item-settings").find("input, select, textarea, button, object, a[href], [tabindex]").filter(":visible"),a.first().focus(),c&&c()},b.expandForm(a)},moveUp:function(){this._changePosition(-1),b.a11y.speak(a.Menus.data.l10n.movedUp)},moveDown:function(){this._changePosition(1),b.a11y.speak(a.Menus.data.l10n.movedDown)},moveLeft:function(){this._changeDepth(-1),b.a11y.speak(a.Menus.data.l10n.movedLeft)},moveRight:function(){this._changeDepth(1),b.a11y.speak(a.Menus.data.l10n.movedRight)},_changePosition:function(a){var b,d,e=this,f=_.clone(e.setting()),g=[];if(1!==a&&-1!==a)throw new Error("Offset changes by 1 are only supported.");if(e.setting()){if(_(e.getMenuControl().getMenuItemControls()).each(function(a){a.setting().menu_item_parent===f.menu_item_parent&&g.push(a.setting)}),g.sort(function(a,b){return a().position-b().position}),d=_.indexOf(g,e.setting),-1===d)throw new Error("Expected setting to be among siblings.");0===d&&a<0||d===g.length-1&&a>0||(b=g[d+a],b&&b.set(c.extend(_.clone(b()),{position:f.position})),f.position+=a,e.setting.set(f))}},_changeDepth:function(b){if(1!==b&&-1!==b)throw new Error("Offset changes by 1 are only supported.");var d,e,f,g=this,h=_.clone(g.setting()),i=[];if(_(g.getMenuControl().getMenuItemControls()).each(function(a){a.setting().menu_item_parent===h.menu_item_parent&&i.push(a)}),i.sort(function(a,b){return a.setting().position-b.setting().position}),d=_.indexOf(i,g),-1===d)throw new Error("Expected control to be among siblings.");if(-1===b){if(!h.menu_item_parent)return;f=a.control("nav_menu_item["+h.menu_item_parent+"]"),_(i).chain().slice(d).each(function(a,b){a.setting.set(c.extend({},a.setting(),{menu_item_parent:g.params.menu_item_id,position:b}))}),_(g.getMenuControl().getMenuItemControls()).each(function(a){var b,d;d=a.setting().menu_item_parent===f.setting().menu_item_parent&&a.setting().position>f.setting().position,d&&(b=_.clone(a.setting()),a.setting.set(c.extend(b,{position:b.position+1})))}),h.position=f.setting().position+1,h.menu_item_parent=f.setting().menu_item_parent,g.setting.set(h)}else if(1===b){if(0===d)return;e=i[d-1],h.menu_item_parent=e.params.menu_item_id,h.position=0,_(g.getMenuControl().getMenuItemControls()).each(function(a){a.setting().menu_item_parent===h.menu_item_parent&&(h.position=Math.max(h.position,a.setting().position))}),h.position+=1,g.setting.set(h)}}}),a.Menus.MenuNameControl=a.Control.extend({ready:function(){var b=this,c=b.setting();b.active.validate=function(){var c,d=a.section(b.section());return c=!!d&&d.active()},b.nameElement=new a.Element(b.container.find(".menu-name-field")),b.nameElement.bind(function(a){var c=b.setting();c&&c.name!==a&&(c=_.clone(c),c.name=a,b.setting.set(c))}),c&&b.nameElement.set(c.name),b.setting.bind(function(a){a&&b.nameElement.set(a.name)})}}),a.Menus.MenuAutoAddControl=a.Control.extend({ready:function(){var b=this,c=b.setting();b.active.validate=function(){var c,d=a.section(b.section());return c=!!d&&d.active()},b.autoAddElement=new a.Element(b.container.find("input[type=checkbox].auto_add")),b.autoAddElement.bind(function(a){var c=b.setting();c&&c.name!==a&&(c=_.clone(c),c.auto_add=a,b.setting.set(c))}),c&&b.autoAddElement.set(c.auto_add),b.setting.bind(function(a){a&&b.autoAddElement.set(a.auto_add)})}}),a.Menus.MenuControl=a.Control.extend({ready:function(){var b,d,f,g=this,h=g.params.menu_id,i=g.setting();if("undefined"==typeof this.params.menu_id)throw new Error("params.menu_id was not defined");g.active.validate=function(){var b,c=a.section(g.section());return b=!!c&&c.active()},g.$controlSection=g.container.closest(".control-section"),g.$sectionContent=g.container.closest(".accordion-section-content"),this._setupModel(),a.section(g.section(),function(a){a.deferred.initSortables.done(function(a){g._setupSortable(a)})}),this._setupAddition(),this._setupLocations(),this._setupTitle(),i&&(b=e(i.name),a.control.each(function(c){c.extended(a.controlConstructor.widget_form)&&"nav_menu"===c.params.widget_id_base&&(c.container.find(".nav-menu-widget-form-controls:first").show(),c.container.find(".nav-menu-widget-no-menus-message:first").hide(),f=c.container.find("select"),0===f.find("option[value="+String(h)+"]").length&&f.append(new Option(b,h)))}),d=c("#available-widgets-list .widget-tpl:has( input.id_base[ value=nav_menu ] )"),d.find(".nav-menu-widget-form-controls:first").show(),d.find(".nav-menu-widget-no-menus-message:first").hide(),f=d.find(".widget-inside select:first"),0===f.find("option[value="+String(h)+"]").length&&f.append(new Option(b,h)))},_setupModel:function(){var b=this,c=b.params.menu_id;b.setting.bind(function(d){var f;!1===d?b._handleDeletion():(f=e(d.name),a.control.each(function(b){if(b.extended(a.controlConstructor.widget_form)&&"nav_menu"===b.params.widget_id_base){var d=b.container.find("select");d.find("option[value="+String(c)+"]").text(f)}}))}),b.container.find(".menu-delete").on("click",function(a){a.stopPropagation(),a.preventDefault(),b.setting.set(!1)})},_setupSortable:function(b){var c=this;if(!b.is(c.$sectionContent))throw new Error("Unexpected menuList.");b.on("sortstart",function(){c.isSorting=!0}),b.on("sortstop",function(){setTimeout(function(){var b=c.$sectionContent.sortable("toArray"),d=[],e=0,f=10;c.isSorting=!1,c.$sectionContent.scrollLeft(0),_.each(b,function(b){var c,e,f;f=b.match(/^customize-control-nav_menu_item-(-?\d+)$/,""),f&&(c=parseInt(f[1],10),e=a.control("nav_menu_item["+String(c)+"]"),e&&d.push(e))}),_.each(d,function(a){if(!1!==a.setting()){var b=_.clone(a.setting());e+=1,f+=1,b.position=e,a.priority(f),b.menu_item_parent=parseInt(a.container.find(".menu-item-data-parent-id").val(),10),b.menu_item_parent||(b.menu_item_parent=0),a.setting.set(b)}})})}),c.isReordering=!1,this.container.find(".reorder-toggle").on("click",function(){c.toggleReordering(!c.isReordering)})},_setupAddition:function(){var b=this;this.container.find(".add-new-menu-item").on("click",function(d){b.$sectionContent.hasClass("reordering")||(c("body").hasClass("adding-menu-items")?(c(this).attr("aria-expanded","false"),a.Menus.availableMenuItemsPanel.close(),d.stopPropagation()):(c(this).attr("aria-expanded","true"),a.Menus.availableMenuItemsPanel.open(b)))})},_handleDeletion:function(){var d,e,f,g=this,h=g.params.menu_id,i=0;d=a.section(g.section()),e=function(){d.container.remove(),a.section.remove(d.id)},d&&d.expanded()?d.collapse({completeCallback:function(){e(),b.a11y.speak(a.Menus.data.l10n.menuDeleted),a.panel("nav_menus").focus()}}):e(),a.each(function(a){/^nav_menu\[/.test(a.id)&&!1!==a()&&(i+=1)}),a.control.each(function(b){if(b.extended(a.controlConstructor.widget_form)&&"nav_menu"===b.params.widget_id_base){var c=b.container.find("select");c.val()===String(h)&&c.prop("selectedIndex",0).trigger("change"),b.container.find(".nav-menu-widget-form-controls:first").toggle(0!==i),b.container.find(".nav-menu-widget-no-menus-message:first").toggle(0===i),b.container.find("option[value="+String(h)+"]").remove()}}),f=c("#available-widgets-list .widget-tpl:has( input.id_base[ value=nav_menu ] )"),f.find(".nav-menu-widget-form-controls:first").toggle(0!==i),f.find(".nav-menu-widget-no-menus-message:first").toggle(0===i),f.find("option[value="+String(h)+"]").remove()},_setupLocations:function(){var b=this;b.container.find(".assigned-menu-location").each(function(){var d,f,g=c(this),h=g.find("input[type=checkbox]"),i=a("nav_menu_locations["+h.data("location-id")+"]");f=function(b){var c=a("nav_menu["+String(b)+"]");b&&c&&c()?g.find(".theme-location-set").show().find("span").text(e(c().name)):g.find(".theme-location-set").hide()},d=new a.Element(h),d.set(i.get()===b.params.menu_id),h.on("change",function(){i.set(this.checked?b.params.menu_id:0)}),i.bind(function(a){d.set(a===b.params.menu_id),f(a)}),f(i.get())})},_setupTitle:function(){var b=this;b.setting.bind(function(d){if(d){var f=b.container.closest(".accordion-section"),g=b.params.menu_id,h=f.find(".accordion-section-title"),i=f.find(".customize-section-title h3"),j=f.find(".menu-in-location"),k=i.find(".customize-action"),l=e(d.name);h.text(l),j.length&&j.appendTo(h),i.text(l),k.length&&k.prependTo(i),a.control.each(function(a){/^nav_menu_locations\[/.test(a.id)&&a.container.find("option[value="+g+"]").text(l)}),f.find(".customize-control-checkbox input").each(function(){c(this).prop("checked")&&c(".current-menu-location-name-"+c(this).data("location-id")).text(l)})}})},toggleReordering:function(c){var d=this.container.find(".add-new-menu-item"),e=this.container.find(".reorder-toggle"),f=this.$sectionContent.find(".item-title");c=Boolean(c),c!==this.$sectionContent.hasClass("reordering")&&(this.isReordering=c,this.$sectionContent.toggleClass("reordering",c),this.$sectionContent.sortable(this.isReordering?"disable":"enable"),this.isReordering?(d.attr({tabindex:"-1","aria-hidden":"true"}),e.attr("aria-label",a.Menus.data.l10n.reorderLabelOff),b.a11y.speak(a.Menus.data.l10n.reorderModeOn),f.attr("aria-hidden","false")):(d.removeAttr("tabindex aria-hidden"),e.attr("aria-label",a.Menus.data.l10n.reorderLabelOn),b.a11y.speak(a.Menus.data.l10n.reorderModeOff),f.attr("aria-hidden","true")),c&&_(this.getMenuItemControls()).each(function(a){a.collapseForm()}))},getMenuItemControls:function(){var b=this,c=[],d=b.params.menu_id;return a.control.each(function(a){"nav_menu_item"===a.params.type&&a.setting()&&d===a.setting().nav_menu_term_id&&c.push(a);
+}),c},reflowMenuItems:function(){var a,b=this,c=b.getMenuItemControls();a=function(b){var c=[],d=b.currentParent;_.each(b.menuItemControls,function(a){d===a.setting().menu_item_parent&&c.push(a)}),c.sort(function(a,b){return a.setting().position-b.setting().position}),_.each(c,function(c){b.currentAbsolutePosition+=1,c.priority.set(b.currentAbsolutePosition),c.container.hasClass("menu-item-depth-"+String(b.currentDepth))||(_.each(c.container.prop("className").match(/menu-item-depth-\d+/g),function(a){c.container.removeClass(a)}),c.container.addClass("menu-item-depth-"+String(b.currentDepth))),c.container.data("item-depth",b.currentDepth),b.currentDepth+=1,b.currentParent=c.params.menu_item_id,a(b),b.currentDepth-=1,b.currentParent=d}),c.length&&(_(c).each(function(a){a.container.removeClass("move-up-disabled move-down-disabled move-left-disabled move-right-disabled"),0===b.currentDepth?a.container.addClass("move-left-disabled"):10===b.currentDepth&&a.container.addClass("move-right-disabled")}),c[0].container.addClass("move-up-disabled").addClass("move-right-disabled").toggleClass("move-down-disabled",1===c.length),c[c.length-1].container.addClass("move-down-disabled").toggleClass("move-up-disabled",1===c.length))},a({menuItemControls:c,currentParent:0,currentDepth:0,currentAbsolutePosition:0}),b.container.find(".reorder-toggle").toggle(c.length>1)},debouncedReflowMenuItems:_.debounce(function(){this.reflowMenuItems.apply(this,arguments)},0),addItemToMenu:function(d){var e,f,g,h,i,j=this,k=0,l=10;return _.each(j.getMenuItemControls(),function(a){!1!==a.setting()&&(l=Math.max(l,a.priority()),0===a.setting().menu_item_parent&&(k=Math.max(k,a.setting().position)))}),k+=1,l+=1,d=c.extend({},a.Menus.data.defaultSettingValues.nav_menu_item,d,{nav_menu_term_id:j.params.menu_id,original_title:d.title,position:k}),delete d.id,i=a.Menus.generatePlaceholderAutoIncrementId(),e="nav_menu_item["+String(i)+"]",f={type:"nav_menu_item",transport:a.Menus.data.settingTransport,previewer:a.previewer},g=a.create(e,e,{},f),g.set(d),h=new a.controlConstructor.nav_menu_item(e,{params:{type:"nav_menu_item",content:'<li id="customize-control-nav_menu_item-'+String(i)+'" class="customize-control customize-control-nav_menu_item"></li>',section:j.id,priority:l,active:!0,settings:{"default":e},menu_item_id:i},previewer:a.previewer}),a.control.add(e,h),g.preview(),j.debouncedReflowMenuItems(),b.a11y.speak(a.Menus.data.l10n.itemAdded),h}}),a.Menus.NewMenuControl=a.Control.extend({ready:function(){this._bindHandlers()},_bindHandlers:function(){var a=this,b=c("#customize-control-new_menu_name input"),d=c("#create-new-menu-submit");b.on("keydown",function(b){13===b.which&&a.submit()}),d.on("click",function(b){a.submit(),b.stopPropagation(),b.preventDefault()})},submit:function(){var d,f,g=this,h=g.container.closest(".accordion-section-new-menu"),i=h.find(".menu-name-field").first(),j=i.val(),k=a.Menus.generatePlaceholderAutoIncrementId();return j?(f="nav_menu["+String(k)+"]",a.create(f,f,{},{type:"nav_menu",transport:a.Menus.data.settingTransport,previewer:a.previewer}),a(f).set(c.extend({},a.Menus.data.defaultSettingValues.nav_menu,{name:j})),d=new a.Menus.MenuSection(f,{params:{id:f,panel:"nav_menus",title:e(j),customizeAction:a.Menus.data.l10n.customizingMenus,type:"nav_menu",priority:10,menu_id:k}}),a.section.add(f,d),i.val(""),i.removeClass("invalid"),b.a11y.speak(a.Menus.data.l10n.menuAdded),a.section(f).focus(),void c("#menu-to-edit").css("margin-top",0)):(i.addClass("invalid"),void i.focus())}}),c.extend(a.controlConstructor,{nav_menu_location:a.Menus.MenuLocationControl,nav_menu_item:a.Menus.MenuItemControl,nav_menu:a.Menus.MenuControl,nav_menu_name:a.Menus.MenuNameControl,nav_menu_auto_add:a.Menus.MenuAutoAddControl,new_menu:a.Menus.NewMenuControl}),c.extend(a.panelConstructor,{nav_menus:a.Menus.MenusPanel}),c.extend(a.sectionConstructor,{nav_menu:a.Menus.MenuSection,new_menu:a.Menus.NewMenuSection}),a.bind("ready",function(){a.Menus.availableMenuItemsPanel=new a.Menus.AvailableMenuItemsPanelView({collection:a.Menus.availableMenuItems}),a.bind("saved",function(b){(b.nav_menu_updates||b.nav_menu_item_updates)&&a.Menus.applySavedData(b)}),a.previewer.bind("focus-nav-menu-item-control",a.Menus.focusMenuItemControl)}),a.Menus.applySavedData=function(d){var e={},f={};_(d.nav_menu_updates).each(function(d){var f,g,h,i,j,k,l,m,n,o,p,q;if("inserted"===d.status){if(!d.previous_term_id)throw new Error("Expected previous_term_id");if(!d.term_id)throw new Error("Expected term_id");if(f="nav_menu["+String(d.previous_term_id)+"]",!a.has(f))throw new Error("Expected setting to exist: "+f);if(i=a(f),!a.section.has(f))throw new Error("Expected control to exist: "+f);if(m=a.section(f),l=i.get(),!l)throw new Error("Did not expect setting to be empty (deleted).");l=c.extend(_.clone(l),d.saved_value),e[d.previous_term_id]=d.term_id,g="nav_menu["+String(d.term_id)+"]",j=a.create(g,g,l,{type:"nav_menu",transport:a.Menus.data.settingTransport,previewer:a.previewer}),m.expanded()&&m.collapse(),n=new a.Menus.MenuSection(g,{params:{id:g,panel:"nav_menus",title:l.name,customizeAction:a.Menus.data.l10n.customizingMenus,type:"nav_menu",priority:m.priority.get(),active:!0,menu_id:d.term_id}}),a.section.add(g,n),a.control.each(function(b){if(b.extended(a.controlConstructor.widget_form)&&"nav_menu"===b.params.widget_id_base){var c,e,f;c=b.container.find("select"),e=c.find("option[value="+String(d.previous_term_id)+"]"),f=c.find("option[value="+String(d.term_id)+"]"),f.prop("selected",e.prop("selected")),e.remove()}}),i.callbacks.disable(),i.set(!1),i.preview(),j.preview(),i._dirty=!1,m.container.remove(),a.section.remove(f),q=0,a.each(function(a){/^nav_menu\[/.test(a.id)&&!1!==a()&&(q+=1)}),p=c("#available-widgets-list .widget-tpl:has( input.id_base[ value=nav_menu ] )"),p.find(".nav-menu-widget-form-controls:first").toggle(0!==q),p.find(".nav-menu-widget-no-menus-message:first").toggle(0===q),p.find("option[value="+String(d.previous_term_id)+"]").remove(),b.customize.control.each(function(a){/^nav_menu_locations\[/.test(a.id)&&a.container.find("option[value="+String(d.previous_term_id)+"]").remove()}),a.each(function(b){var c=a.state("saved").get();/^nav_menu_locations\[/.test(b.id)&&b.get()===d.previous_term_id&&(b.set(d.term_id),b._dirty=!1,a.state("saved").set(c),b.preview())}),m.expanded.get()&&n.expand()}else if("updated"===d.status){if(h="nav_menu["+String(d.term_id)+"]",!a.has(h))throw new Error("Expected setting to exist: "+h);k=a(h),_.isEqual(d.saved_value,k.get())||(o=a.state("saved").get(),k.set(d.saved_value),k._dirty=!1,a.state("saved").set(o))}}),_(d.nav_menu_item_updates).each(function(a){a.previous_post_id&&(f[a.previous_post_id]=a.post_id)}),_(d.nav_menu_item_updates).each(function(b){var c,d,g,h,i,j,k;if("inserted"===b.status){if(!b.previous_post_id)throw new Error("Expected previous_post_id");if(!b.post_id)throw new Error("Expected post_id");if(c="nav_menu_item["+String(b.previous_post_id)+"]",!a.has(c))throw new Error("Expected setting to exist: "+c);if(g=a(c),!a.control.has(c))throw new Error("Expected control to exist: "+c);if(j=a.control(c),i=g.get(),!i)throw new Error("Did not expect setting to be empty (deleted).");if(i=_.clone(i),i.menu_item_parent<0){if(!f[i.menu_item_parent])throw new Error("inserted ID for menu_item_parent not available");i.menu_item_parent=f[i.menu_item_parent]}e[i.nav_menu_term_id]&&(i.nav_menu_term_id=e[i.nav_menu_term_id]),d="nav_menu_item["+String(b.post_id)+"]",h=a.create(d,d,i,{type:"nav_menu_item",transport:a.Menus.data.settingTransport,previewer:a.previewer}),k=new a.controlConstructor.nav_menu_item(d,{params:{type:"nav_menu_item",content:'<li id="customize-control-nav_menu_item-'+String(b.post_id)+'" class="customize-control customize-control-nav_menu_item"></li>',menu_id:b.post_id,section:"nav_menu["+String(i.nav_menu_term_id)+"]",priority:j.priority.get(),active:!0,settings:{"default":d},menu_item_id:b.post_id},previewer:a.previewer}),j.container.remove(),a.control.remove(c),a.control.add(d,k),g.callbacks.disable(),g.set(!1),g.preview(),h.preview(),g._dirty=!1,k.container.toggleClass("menu-item-edit-inactive",j.container.hasClass("menu-item-edit-inactive"))}}),_.each(d.widget_nav_menu_updates,function(b,c){var d=a(c);d&&(d._value=b,d.preview())})},a.Menus.focusMenuItemControl=function(b){var c=a.Menus.getMenuItemControl(b);c&&c.focus()},a.Menus.getMenuControl=function(b){return a.control("nav_menu["+b+"]")},a.Menus.getMenuItemControl=function(b){return a.control(d(b))}}(wp.customize,wp,jQuery);
\ No newline at end of file
index fee74cfe341d489e3c94f2569ae085ffcd84695a..759802324478465a3d0654e9b0508e8a8234017c 100644 (file)
                                args = $.extend( {}, control.defaultExpandedArguments, args );
                                control.onChangeExpanded( expanded, args );
                        });
+                       control.altNotice = true;
 
                        api.Control.prototype.initialize.call( control, id, options );
                },
                /**
                 * Get the widget_form Customize controls associated with the current sidebar.
                 *
-                * @since 3.9
+                * @since 3.9.0
                 * @return {wp.customize.controlConstructor.widget_form[]}
                 */
                getWidgetFormControls: function() {
                return foundControl;
        };
 
+       /**
+        * Initialize Edit Menu button in Nav Menu widget.
+        */
+       $( document ).on( 'widget-added', function( event, widgetContainer ) {
+               var parsedWidgetId, widgetControl, navMenuSelect, editMenuButton;
+               parsedWidgetId = parseWidgetId( widgetContainer.find( '> .widget-inside > .form > .widget-id' ).val() );
+               if ( 'nav_menu' !== parsedWidgetId.id_base ) {
+                       return;
+               }
+               widgetControl = api.control( 'widget_nav_menu[' + String( parsedWidgetId.number ) + ']' );
+               if ( ! widgetControl ) {
+                       return;
+               }
+               navMenuSelect = widgetContainer.find( 'select[name*="nav_menu"]' );
+               editMenuButton = widgetContainer.find( '.edit-selected-nav-menu > button' );
+               if ( 0 === navMenuSelect.length || 0 === editMenuButton.length ) {
+                       return;
+               }
+               navMenuSelect.on( 'change', function() {
+                       if ( api.section.has( 'nav_menu[' + navMenuSelect.val() + ']' ) ) {
+                               editMenuButton.parent().show();
+                       } else {
+                               editMenuButton.parent().hide();
+                       }
+               });
+               editMenuButton.on( 'click', function() {
+                       var section = api.section( 'nav_menu[' + navMenuSelect.val() + ']' );
+                       if ( section ) {
+                               focusConstructWithBreadcrumb( section, widgetControl );
+                       }
+               } );
+       } );
+
+       /**
+        * Focus (expand) one construct and then focus on another construct after the first is collapsed.
+        *
+        * This overrides the back button to serve the purpose of breadcrumb navigation.
+        *
+        * @param {wp.customize.Section|wp.customize.Panel|wp.customize.Control} focusConstruct - The object to initially focus.
+        * @param {wp.customize.Section|wp.customize.Panel|wp.customize.Control} returnConstruct - The object to return focus.
+        */
+       function focusConstructWithBreadcrumb( focusConstruct, returnConstruct ) {
+               focusConstruct.focus();
+               function onceCollapsed( isExpanded ) {
+                       if ( ! isExpanded ) {
+                               focusConstruct.expanded.unbind( onceCollapsed );
+                               returnConstruct.focus();
+                       }
+               }
+               focusConstruct.expanded.bind( onceCollapsed );
+       }
+
        /**
         * @param {String} widgetId
         * @returns {Object}
index c0a3e8c373f16d52956845d5e81a2776af41964a..0cbcb3583c09fb136755db97b75c1326d20e773b 100644 (file)
@@ -1 +1 @@
-!function(a,b){function c(a){var b,c={number:null,id_base:null};return b=a.match(/^(.+)-(\d+)$/),b?(c.id_base=b[1],c.number=parseInt(b[2],10)):c.id_base=a,c}function d(a){var b,d=c(a);return b="widget_"+d.id_base,d.number&&(b+="["+d.number+"]"),b}if(a&&a.customize){var e,f=a.customize;f.Widgets=f.Widgets||{},f.Widgets.savedWidgetIds={},f.Widgets.data=_wpCustomizeWidgetsSettings||{},e=f.Widgets.data.l10n,delete f.Widgets.data.l10n,f.Widgets.WidgetModel=Backbone.Model.extend({id:null,temp_id:null,classname:null,control_tpl:null,description:null,is_disabled:null,is_multi:null,multi_number:null,name:null,id_base:null,transport:null,params:[],width:null,height:null,search_matched:!0}),f.Widgets.WidgetCollection=Backbone.Collection.extend({model:f.Widgets.WidgetModel,doSearch:function(a){this.terms!==a&&(this.terms=a,this.terms.length>0&&this.search(this.terms),""===this.terms&&this.each(function(a){a.set("search_matched",!0)}))},search:function(a){var b,c;a=a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),a=a.replace(/ /g,")(?=.*"),b=new RegExp("^(?=.*"+a+").+","i"),this.each(function(a){c=[a.get("name"),a.get("id"),a.get("description")].join(" "),a.set("search_matched",b.test(c))})}}),f.Widgets.availableWidgets=new f.Widgets.WidgetCollection(f.Widgets.data.availableWidgets),f.Widgets.SidebarModel=Backbone.Model.extend({after_title:null,after_widget:null,before_title:null,before_widget:null,"class":null,description:null,id:null,name:null,is_rendered:!1}),f.Widgets.SidebarCollection=Backbone.Collection.extend({model:f.Widgets.SidebarModel}),f.Widgets.registeredSidebars=new f.Widgets.SidebarCollection(f.Widgets.data.registeredSidebars),f.Widgets.AvailableWidgetsPanelView=a.Backbone.View.extend({el:"#available-widgets",events:{"input #widgets-search":"search","keyup #widgets-search":"search","change #widgets-search":"search","search #widgets-search":"search","focus .widget-tpl":"focus","click .widget-tpl":"_submit","keypress .widget-tpl":"_submit",keydown:"keyboardAccessible"},selected:null,currentSidebarControl:null,$search:null,initialize:function(){var a=this;this.$search=b("#widgets-search"),_.bindAll(this,"close"),this.listenTo(this.collection,"change",this.updateList),this.updateList(),b("#customize-controls, #available-widgets .customize-section-title").on("click keydown",function(c){var d=b(c.target).is(".add-new-widget, .add-new-widget *");b("body").hasClass("adding-widget")&&!d&&a.close()}),f.previewer.bind("url",this.close)},search:function(a){var b;this.collection.doSearch(a.target.value),this.selected&&!this.selected.is(":visible")&&(this.selected.removeClass("selected"),this.selected=null),this.selected&&!a.target.value&&(this.selected.removeClass("selected"),this.selected=null),!this.selected&&a.target.value&&(b=this.$el.find("> .widget-tpl:visible:first"),b.length&&this.select(b))},updateList:function(){this.collection.each(function(a){var c=b("#widget-tpl-"+a.id);c.toggle(a.get("search_matched")&&!a.get("is_disabled")),a.get("is_disabled")&&c.is(this.selected)&&(this.selected=null)})},select:function(a){this.selected=b(a),this.selected.siblings(".widget-tpl").removeClass("selected"),this.selected.addClass("selected")},focus:function(a){this.select(b(a.currentTarget))},_submit:function(a){("keypress"!==a.type||13===a.which||32===a.which)&&this.submit(b(a.currentTarget))},submit:function(a){var c,d,e;a||(a=this.selected),a&&this.currentSidebarControl&&(this.select(a),c=b(this.selected).data("widget-id"),d=this.collection.findWhere({id:c}),d&&(e=this.currentSidebarControl.addWidget(d.get("id_base")),e&&e.focus(),this.close()))},open:function(a){this.currentSidebarControl=a,_(this.currentSidebarControl.getWidgetFormControls()).each(function(a){a.params.is_wide&&a.collapseForm()}),b("body").addClass("adding-widget"),this.$el.find(".selected").removeClass("selected"),this.collection.doSearch(""),f.settings.browser.mobile||this.$search.focus()},close:function(a){a=a||{},a.returnFocus&&this.currentSidebarControl&&this.currentSidebarControl.container.find(".add-new-widget").focus(),this.currentSidebarControl=null,this.selected=null,b("body").removeClass("adding-widget"),this.$search.val("")},keyboardAccessible:function(a){var c=13===a.which,d=27===a.which,e=40===a.which,f=38===a.which,g=9===a.which,h=a.shiftKey,i=null,j=this.$el.find("> .widget-tpl:visible:first"),k=this.$el.find("> .widget-tpl:visible:last"),l=b(a.target).is(this.$search),m=b(a.target).is(".widget-tpl:visible:last");return e||f?(e?l?i=j:this.selected&&0!==this.selected.nextAll(".widget-tpl:visible").length&&(i=this.selected.nextAll(".widget-tpl:visible:first")):f&&(l?i=k:this.selected&&0!==this.selected.prevAll(".widget-tpl:visible").length&&(i=this.selected.prevAll(".widget-tpl:visible:first"))),this.select(i),void(i?i.focus():this.$search.focus())):void((!c||this.$search.val())&&(c?this.submit():d&&this.close({returnFocus:!0}),this.currentSidebarControl&&g&&(h&&l||!h&&m)&&(this.currentSidebarControl.container.find(".add-new-widget").focus(),a.preventDefault())))}}),f.Widgets.formSyncHandlers={rss:function(a,c,d){var e=c.find(".widget-error:first"),f=b("<div>"+d+"</div>").find(".widget-error:first");e.length&&f.length?e.replaceWith(f):e.length?e.remove():f.length&&c.find(".widget-content:first").prepend(f)}},f.Widgets.WidgetControl=f.Control.extend({defaultExpandedArguments:{duration:"fast",completeCallback:b.noop},initialize:function(a,c){var d=this;d.widgetControlEmbedded=!1,d.widgetContentEmbedded=!1,d.expanded=new f.Value(!1),d.expandedArgumentsQueue=[],d.expanded.bind(function(a){var c=d.expandedArgumentsQueue.shift();c=b.extend({},d.defaultExpandedArguments,c),d.onChangeExpanded(a,c)}),f.Control.prototype.initialize.call(d,a,c)},ready:function(){var a=this;a.section()?f.section(a.section(),function(b){var c=function(d){d&&(a.embedWidgetControl(),b.expanded.unbind(c))};b.expanded()?c(!0):b.expanded.bind(c)}):a.embedWidgetControl()},embedWidgetControl:function(){var a,c=this;c.widgetControlEmbedded||(c.widgetControlEmbedded=!0,a=b(c.params.widget_control),c.container.append(a),c._setupModel(),c._setupWideWidget(),c._setupControlToggle(),c._setupWidgetTitle(),c._setupReorderUI(),c._setupHighlightEffects(),c._setupUpdateUI(),c._setupRemoveUI())},embedWidgetContent:function(){var a,c=this;c.embedWidgetControl(),c.widgetContentEmbedded||(c.widgetContentEmbedded=!0,a=b(c.params.widget_content),c.container.find(".widget-content:first").append(a),b(document).trigger("widget-added",[c.container.find(".widget:first")]))},_setupModel:function(){var a,b=this;a=function(){f.Widgets.savedWidgetIds[b.params.widget_id]=!0},f.bind("ready",a),f.bind("saved",a),this._updateCount=0,this.isWidgetUpdating=!1,this.liveUpdateMode=!0,this.setting.bind(function(a,c){_(c).isEqual(a)||b.isWidgetUpdating||b.updateWidget({instance:a})})},_setupWideWidget:function(){var a,c,d,e,g,h=this;this.params.is_wide&&(a=this.container.find(".widget-inside"),c=a.find("> .form"),d=b(".wp-full-overlay-sidebar-content:first"),this.container.addClass("wide-widget-control"),this.container.find(".widget-content:first").css({"max-width":this.params.width,"min-height":this.params.height}),g=function(){var d,e=h.container.offset().top,f=b(window).height(),g=c.outerHeight();a.css("max-height",f),d=Math.max(0,Math.min(Math.max(e,0),f-g)),a.css("top",d)},e=b("#customize-theme-controls"),this.container.on("expand",function(){g(),d.on("scroll",g),b(window).on("resize",g),e.on("expanded collapsed",g)}),this.container.on("collapsed",function(){d.off("scroll",g),b(window).off("resize",g),e.off("expanded collapsed",g)}),f.each(function(a){0===a.id.indexOf("sidebars_widgets[")&&a.bind(function(){h.container.hasClass("expanded")&&g()})}))},_setupControlToggle:function(){var a,b=this;this.container.find(".widget-top").on("click",function(a){a.preventDefault();var c=b.getSidebarWidgetsControl();c.isReordering||b.expanded(!b.expanded())}),a=this.container.find(".widget-control-close"),a.on("click",function(a){a.preventDefault(),b.collapse(),b.container.find(".widget-top .widget-action:first").focus()})},_setupWidgetTitle:function(){var a,b=this;a=function(){var a=b.setting().title,c=b.container.find(".in-widget-title");a?c.text(": "+a):c.text("")},this.setting.bind(a),a()},_setupReorderUI:function(){var c,d,g,h,i,j=this;c=function(a){a.siblings(".selected").removeClass("selected"),a.addClass("selected");var b=a.data("id")===j.params.sidebar_id;j.container.find(".move-widget-btn").prop("disabled",b)},this.container.find(".widget-title-action").after(b(f.Widgets.data.tpl.widgetReorderNav)),i=_.template(f.Widgets.data.tpl.moveWidgetArea),d=b(i({sidebars:_(f.Widgets.registeredSidebars.toArray()).pluck("attributes")})),this.container.find(".widget-top").after(d),h=function(){var a,e=d.find("li"),g=0;a=e.filter(function(){return b(this).data("id")===j.params.sidebar_id}),e.each(function(){var d,e,h,i=b(this);d=i.data("id"),e=f.Widgets.registeredSidebars.get(d),h=e.get("is_rendered"),i.toggle(h),h&&(g+=1),i.hasClass("selected")&&!h&&c(a)}),g>1?j.container.find(".move-widget").show():j.container.find(".move-widget").hide()},h(),f.Widgets.registeredSidebars.on("change:is_rendered",h),g=this.container.find(".widget-reorder-nav"),g.find(".move-widget, .move-widget-down, .move-widget-up").each(function(){b(this).prepend(j.container.find(".widget-title").text()+": ")}).on("click keypress",function(c){if("keypress"!==c.type||13===c.which||32===c.which)if(b(this).focus(),b(this).is(".move-widget"))j.toggleWidgetMoveArea();else{var d=b(this).is(".move-widget-down"),f=b(this).is(".move-widget-up"),g=j.getWidgetSidebarPosition();if(f&&0===g||d&&g===j.getSidebarWidgetsControl().setting().length-1)return;f?(j.moveUp(),a.a11y.speak(e.widgetMovedUp)):(j.moveDown(),a.a11y.speak(e.widgetMovedDown)),b(this).focus()}}),this.container.find(".widget-area-select").on("click keypress","li",function(a){("keypress"!==a.type||13===a.which||32===a.which)&&(a.preventDefault(),c(b(this)))}),this.container.find(".move-widget-btn").click(function(){j.getSidebarWidgetsControl().toggleReordering(!1);var a,b,c,d,e,g=j.params.sidebar_id,h=j.container.find(".widget-area-select li.selected").data("id");a=f("sidebars_widgets["+g+"]"),b=f("sidebars_widgets["+h+"]"),c=Array.prototype.slice.call(a()),d=Array.prototype.slice.call(b()),e=j.getWidgetSidebarPosition(),c.splice(e,1),d.push(j.params.widget_id),a(c),b(d),j.focus()})},_setupHighlightEffects:function(){var a=this;this.container.on("mouseenter click",function(){a.setting.previewer.send("highlight-widget",a.params.widget_id)}),this.setting.bind(function(){a.setting.previewer.send("highlight-widget",a.params.widget_id)})},_setupUpdateUI:function(){var a,c,d,g,h,i=this;a=this.container.find(".widget:first"),c=a.find(".widget-content:first"),d=this.container.find(".widget-control-save"),d.val(e.saveBtnLabel),d.attr("title",e.saveBtnTooltip),d.removeClass("button-primary").addClass("button-secondary"),d.on("click",function(a){a.preventDefault(),i.updateWidget({disable_form:!0})}),g=_.debounce(function(){i.updateWidget()},250),c.on("keydown","input",function(a){13===a.which&&(a.preventDefault(),i.updateWidget({ignoreActiveElement:!0}))}),c.on("change input propertychange",":input",function(a){i.liveUpdateMode&&("change"===a.type||this.checkValidity&&this.checkValidity())&&g()}),this.setting.previewer.channel.bind("synced",function(){i.container.removeClass("previewer-loading")}),f.previewer.bind("widget-updated",function(a){a===i.params.widget_id&&i.container.removeClass("previewer-loading")}),h=f.Widgets.formSyncHandlers[this.params.widget_id_base],h&&b(document).on("widget-synced",function(b,c){a.is(c)&&h.apply(document,arguments)})},onChangeActive:function(a,b){this.container.toggleClass("widget-rendered",a),b.completeCallback&&b.completeCallback()},_setupRemoveUI:function(){var a,b,c=this;a=this.container.find("a.widget-control-remove"),a.on("click",function(a){a.preventDefault();var b;b=c.container.next().is(".customize-control-widget_form")?c.container.next().find(".widget-action:first"):c.container.prev().is(".customize-control-widget_form")?c.container.prev().find(".widget-action:first"):c.container.next(".customize-control-sidebar_widgets").find(".add-new-widget:first"),c.container.slideUp(function(){var a,d,e=f.Widgets.getSidebarWidgetControlContainingWidget(c.params.widget_id);e&&(a=e.setting().slice(),d=_.indexOf(a,c.params.widget_id),-1!==d&&(a.splice(d,1),e.setting(a),b.focus()))})}),b=function(){a.text(e.removeBtnLabel),a.attr("title",e.removeBtnTooltip)},this.params.is_new?f.bind("saved",b):b()},_getInputs:function(a){return b(a).find(":input[name]")},_getInputsSignature:function(a){var c=_(a).map(function(a){var c,d=b(a);return c=d.is(":checkbox, :radio")?[d.attr("id"),d.attr("name"),d.prop("value")]:[d.attr("id"),d.attr("name")],c.join(",")});return c.join(";")},_getInputState:function(a){return a=b(a),a.is(":radio, :checkbox")?a.prop("checked"):a.is("select[multiple]")?a.find("option:selected").map(function(){return b(this).val()}).get():a.val()},_setInputState:function(a,c){a=b(a),a.is(":radio, :checkbox")?a.prop("checked",c):a.is("select[multiple]")?(c=b.isArray(c)?_.map(c,function(a){return String(a)}):[],a.find("option").each(function(){b(this).prop("selected",-1!==_.indexOf(c,String(this.value)))})):a.val(c)},getSidebarWidgetsControl:function(){var a,b;return a="sidebars_widgets["+this.params.sidebar_id+"]",(b=f.control(a))?b:void 0},updateWidget:function(c){var d,g,h,i,j,k,l,m,n,o,p,q=this;q.embedWidgetContent(),c=b.extend({instance:null,complete:null,ignoreActiveElement:!1},c),d=c.instance,g=c.complete,this._updateCount+=1,j=this._updateCount,h=this.container.find(".widget:first"),i=h.find(".widget-content:first"),i.find(".widget-error").remove(),this.container.addClass("widget-form-loading"),this.container.addClass("previewer-loading"),n=f.state("processing"),n(n()+1),this.liveUpdateMode||this.container.addClass("widget-form-disabled"),k={},k.action="update-widget",k.wp_customize="on",k.nonce=f.settings.nonce["update-widget"],k.theme=f.settings.theme.stylesheet,k.customized=a.customize.previewer.query().customized,l=b.param(k),m=this._getInputs(i),m.each(function(){b(this).data("state"+j,q._getInputState(this))}),l+=d?"&"+b.param({sanitized_widget_setting:JSON.stringify(d)}):"&"+m.serialize(),l+="&"+i.find("~ :input").serialize(),this._previousUpdateRequest&&this._previousUpdateRequest.abort(),o=b.post(a.ajax.settings.url,l),this._previousUpdateRequest=o,o.done(function(a){var d,k,l,n,o=!1;return"0"===a?(f.previewer.preview.iframe.hide(),void f.previewer.login().done(function(){q.updateWidget(c),f.previewer.preview.iframe.show()})):"-1"===a?void f.previewer.cheatin():void(a.success?(k=b("<div>"+a.data.form+"</div>"),l=q._getInputs(k),n=q._getInputsSignature(m)===q._getInputsSignature(l),n&&!q.liveUpdateMode&&(q.liveUpdateMode=!0,q.container.removeClass("widget-form-disabled"),q.container.find('input[name="savewidget"]').hide()),n&&q.liveUpdateMode?(m.each(function(a){var d,e,f,g=b(this),h=b(l[a]);d=g.data("state"+j),e=q._getInputState(h),g.data("sanitized",e),f=!_.isEqual(d,e)&&(c.ignoreActiveElement||!g.is(document.activeElement)),f&&q._setInputState(g,e)}),b(document).trigger("widget-synced",[h,a.data.form])):q.liveUpdateMode?(q.liveUpdateMode=!1,q.container.find('input[name="savewidget"]').show(),o=!0):(i.html(a.data.form),q.container.removeClass("widget-form-disabled"),b(document).trigger("widget-updated",[h])),p=!o&&!_(q.setting()).isEqual(a.data.instance),p?(q.isWidgetUpdating=!0,q.setting(a.data.instance),q.isWidgetUpdating=!1):q.container.removeClass("previewer-loading"),g&&g.call(q,null,{noChange:!p,ajaxFinished:!0})):(d=e.error,a.data&&a.data.message&&(d=a.data.message),g?g.call(q,d):i.prepend('<p class="widget-error"><strong>'+d+"</strong></p>")))}),o.fail(function(a,b){g&&g.call(q,b)}),o.always(function(){q.container.removeClass("widget-form-loading"),m.each(function(){b(this).removeData("state"+j)}),n(n()-1)})},expandControlSection:function(){f.Control.prototype.expand.call(this)},_toggleExpanded:f.Section.prototype._toggleExpanded,expand:f.Section.prototype.expand,expandForm:function(){this.expand()},collapse:f.Section.prototype.collapse,collapseForm:function(){this.collapse()},toggleForm:function(a){"undefined"==typeof a&&(a=!this.expanded()),this.expanded(a)},onChangeExpanded:function(a,b){var c,d,e,g,h=this;return h.embedWidgetControl(),a&&h.embedWidgetContent(),b.unchanged?void(a&&f.Control.prototype.expand.call(h,{completeCallback:b.completeCallback})):(c=this.container.find("div.widget:first"),d=c.find(".widget-inside:first"),void(a?(h.section()&&f.section(h.section())&&h.expandControlSection(),f.control.each(function(a){h.params.type===a.params.type&&h!==a&&a.collapse()}),e=function(){h.container.removeClass("expanding"),h.container.addClass("expanded"),h.container.trigger("expanded")},b.completeCallback&&(g=e,e=function(){g(),b.completeCallback()}),h.params.is_wide?d.fadeIn(b.duration,e):d.slideDown(b.duration,e),h.container.trigger("expand"),h.container.addClass("expanding")):(e=function(){h.container.removeClass("collapsing"),h.container.removeClass("expanded"),h.container.trigger("collapsed")},b.completeCallback&&(g=e,e=function(){g(),b.completeCallback()}),h.container.trigger("collapse"),h.container.addClass("collapsing"),h.params.is_wide?d.fadeOut(b.duration,e):d.slideUp(b.duration,function(){c.css({width:"",margin:""}),e()}))))},getWidgetSidebarPosition:function(){var a,b;return a=this.getSidebarWidgetsControl().setting(),b=_.indexOf(a,this.params.widget_id),-1!==b?b:void 0},moveUp:function(){this._moveWidgetByOne(-1)},moveDown:function(){this._moveWidgetByOne(1)},_moveWidgetByOne:function(a){var b,c,d,e;b=this.getWidgetSidebarPosition(),c=this.getSidebarWidgetsControl().setting,d=Array.prototype.slice.call(c()),e=d[b+a],d[b+a]=this.params.widget_id,d[b]=e,c(d)},toggleWidgetMoveArea:function(a){var c,d=this;c=this.container.find(".move-widget-area"),"undefined"==typeof a&&(a=!c.hasClass("active")),a&&(c.find(".selected").removeClass("selected"),c.find("li").filter(function(){return b(this).data("id")===d.params.sidebar_id}).addClass("selected"),this.container.find(".move-widget-btn").prop("disabled",!0)),c.toggleClass("active",a)},highlightSectionAndControl:function(){var a;a=this.container.is(":hidden")?this.container.closest(".control-section"):this.container,b(".highlighted").removeClass("highlighted"),a.addClass("highlighted"),setTimeout(function(){a.removeClass("highlighted")},500)}}),f.Widgets.WidgetsPanel=f.Panel.extend({ready:function(){var a=this;f.Panel.prototype.ready.call(a),a.deferred.embedded.done(function(){var c,d,g;c=a.container.find(".panel-meta"),d=b("<div></div>",{"class":"no-widget-areas-rendered-notice"}),d.append(b("<em></em>",{text:e.noAreasRendered})),c.append(d),g=function(){return 0===_.filter(a.sections(),function(a){return a.active()}).length},d.toggle(g()),f.previewer.deferred.active.done(function(){d.toggle(g())}),f.bind("pane-contents-reflowed",function(){var a="resolved"===f.previewer.deferred.active.state()?"fast":0;g()?d.slideDown(a):d.slideUp(a)})})},isContextuallyActive:function(){var a=this;return a.active()}}),f.Widgets.SidebarSection=f.Section.extend({ready:function(){var a,b=this;f.Section.prototype.ready.call(this),a=f.Widgets.registeredSidebars.get(b.params.sidebarId),b.active.bind(function(b){a.set("is_rendered",b)}),a.set("is_rendered",b.active())}}),f.Widgets.SidebarControl=f.Control.extend({ready:function(){this.$controlSection=this.container.closest(".control-section"),this.$sectionContent=this.container.closest(".accordion-section-content"),this._setupModel(),this._setupSortable(),this._setupAddition(),this._applyCardinalOrderClassNames()},_setupModel:function(){var a=this;this.setting.bind(function(d,e){var g,h,i;h=_(e).difference(d),d=_(d).filter(function(a){var b=c(a);return!!f.Widgets.availableWidgets.findWhere({id_base:b.id_base})}),g=_(d).map(function(b){var c=f.Widgets.getWidgetFormControlForWidget(b);return c||(c=a.addWidget(b)),c}),g.sort(function(a,b){var c=_.indexOf(d,a.params.widget_id),e=_.indexOf(d,b.params.widget_id);return c-e}),i=0,_(g).each(function(b){b.priority(i),b.section(a.section()),i+=1}),a.priority(i),a._applyCardinalOrderClassNames(),_(g).each(function(b){b.params.sidebar_id=a.params.sidebar_id}),_(h).each(function(d){setTimeout(function(){var e,g,h,i,j,k=!1;f.each(function(b){if(b.id!==a.setting.id&&0===b.id.indexOf("sidebars_widgets[")&&"sidebars_widgets[wp_inactive_widgets]"!==b.id){var c,e=b();c=_.indexOf(e,d),-1!==c&&(k=!0)}}),k||(e=f.Widgets.getWidgetFormControlForWidget(d),g=e&&b.contains(document,e.container[0])&&!b.contains(a.$sectionContent[0],e.container[0]),e&&!g&&(f.control.remove(e.id),e.container.remove()),f.Widgets.savedWidgetIds[d]&&(h=f.value("sidebars_widgets[wp_inactive_widgets]")().slice(),h.push(d),f.value("sidebars_widgets[wp_inactive_widgets]")(_(h).unique())),i=c(d).id_base,j=f.Widgets.availableWidgets.findWhere({id_base:i}),j&&!j.get("is_multi")&&j.set("is_disabled",!1))})})})},_setupSortable:function(){var a=this;this.isReordering=!1,this.$sectionContent.sortable({items:"> .customize-control-widget_form",handle:".widget-top",axis:"y",tolerance:"pointer",connectWith:".accordion-section-content:has(.customize-control-sidebar_widgets)",update:function(){var c,d=a.$sectionContent.sortable("toArray");c=b.map(d,function(a){return b("#"+a).find(":input[name=widget-id]").val()}),a.setting(c)}}),this.$controlSection.find(".accordion-section-title").droppable({accept:".customize-control-widget_form",over:function(){var b=f.section(a.section.get());b.expand({allowMultiple:!0,completeCallback:function(){f.section.each(function(a){a.container.find(".customize-control-sidebar_widgets").length&&a.container.find(".accordion-section-content:first").sortable("refreshPositions")})}})}}),this.container.find(".reorder-toggle").on("click",function(){a.toggleReordering(!a.isReordering)})},_setupAddition:function(){var a=this;this.container.find(".add-new-widget").on("click",function(){var c=b(this);a.$sectionContent.hasClass("reordering")||(b("body").hasClass("adding-widget")?(c.attr("aria-expanded","false"),f.Widgets.availableWidgetsPanel.close()):(c.attr("aria-expanded","true"),f.Widgets.availableWidgetsPanel.open(a)))})},_applyCardinalOrderClassNames:function(){var a=[];return _.each(this.setting(),function(b){var c=f.Widgets.getWidgetFormControlForWidget(b);c&&a.push(c)}),0===a.length||1===f.Widgets.registeredSidebars.length&&a.length<=1?void this.container.find(".reorder-toggle").hide():(this.container.find(".reorder-toggle").show(),b(a).each(function(){b(this.container).removeClass("first-widget").removeClass("last-widget").find(".move-widget-down, .move-widget-up").prop("tabIndex",0)}),_.first(a).container.addClass("first-widget").find(".move-widget-up").prop("tabIndex",-1),void _.last(a).container.addClass("last-widget").find(".move-widget-down").prop("tabIndex",-1))},toggleReordering:function(b){var c=this.$sectionContent.find(".add-new-widget"),d=this.container.find(".reorder-toggle"),f=this.$sectionContent.find(".widget-title");b=Boolean(b),b!==this.$sectionContent.hasClass("reordering")&&(this.isReordering=b,this.$sectionContent.toggleClass("reordering",b),b?(_(this.getWidgetFormControls()).each(function(a){a.collapse()}),c.attr({tabindex:"-1","aria-hidden":"true"}),d.attr("aria-label",e.reorderLabelOff),a.a11y.speak(e.reorderModeOn),f.attr("aria-hidden","true")):(c.removeAttr("tabindex aria-hidden"),d.attr("aria-label",e.reorderLabelOn),a.a11y.speak(e.reorderModeOff),f.attr("aria-hidden","false")))},getWidgetFormControls:function(){var a=[];return _(this.setting()).each(function(b){var c=d(b),e=f.control(c);e&&a.push(e)}),a},addWidget:function(a){var d,e,g,h,i,j,k,l,m,n,o=this,p="widget_form",q=c(a),r=q.number,s=q.id_base,t=f.Widgets.availableWidgets.findWhere({id_base:s});return t?r&&!t.get("is_multi")?!1:(t.get("is_multi")&&!r&&(t.set("multi_number",t.get("multi_number")+1),r=t.get("multi_number")),d=b.trim(b("#widget-tpl-"+t.get("id")).html()),t.get("is_multi")?d=d.replace(/<[^<>]+>/g,function(a){return a.replace(/__i__|%i%/g,r)}):t.set("is_disabled",!0),e=b(d),g=b("<li/>").addClass("customize-control").addClass("customize-control-"+p).append(e),g.find("> .widget-icon").remove(),t.get("is_multi")&&(g.find('input[name="widget_number"]').val(r),g.find('input[name="multi_number"]').val(r)),a=g.find('[name="widget-id"]').val(),g.hide(),i="widget_"+t.get("id_base"),t.get("is_multi")&&(i+="["+r+"]"),g.attr("id","customize-control-"+i.replace(/\]/g,"").replace(/\[/g,"-")),j=f.has(i),j||(m={transport:f.Widgets.data.selectiveRefreshableWidgets[t.get("id_base")]?"postMessage":"refresh",previewer:this.setting.previewer},n=f.create(i,i,"",m),n.set({})),h=f.controlConstructor[p],k=new h(i,{params:{settings:{"default":i},content:g,sidebar_id:o.params.sidebar_id,widget_id:a,widget_id_base:t.get("id_base"),type:p,is_new:!j,width:t.get("width"),height:t.get("height"),is_wide:t.get("is_wide"),active:!0},previewer:o.setting.previewer}),f.control.add(i,k),f.each(function(b){if(b.id!==o.setting.id&&0===b.id.indexOf("sidebars_widgets[")){var c=b().slice(),d=_.indexOf(c,a);-1!==d&&(c.splice(d),b(c))}}),l=this.setting().slice(),-1===_.indexOf(l,a)&&(l.push(a),this.setting(l)),g.slideDown(function(){j&&k.updateWidget({instance:k.setting()})}),k):!1}}),b.extend(f.panelConstructor,{widgets:f.Widgets.WidgetsPanel}),b.extend(f.sectionConstructor,{sidebar:f.Widgets.SidebarSection}),b.extend(f.controlConstructor,{widget_form:f.Widgets.WidgetControl,sidebar_widgets:f.Widgets.SidebarControl}),f.bind("ready",function(){f.Widgets.availableWidgetsPanel=new f.Widgets.AvailableWidgetsPanelView({collection:f.Widgets.availableWidgets}),f.previewer.bind("highlight-widget-control",f.Widgets.highlightWidgetFormControl),f.previewer.bind("focus-widget-control",f.Widgets.focusWidgetFormControl)}),f.Widgets.highlightWidgetFormControl=function(a){var b=f.Widgets.getWidgetFormControlForWidget(a);b&&b.highlightSectionAndControl()},f.Widgets.focusWidgetFormControl=function(a){var b=f.Widgets.getWidgetFormControlForWidget(a);b&&b.focus()},f.Widgets.getSidebarWidgetControlContainingWidget=function(a){var b=null;return f.control.each(function(c){"sidebar_widgets"===c.params.type&&-1!==_.indexOf(c.setting(),a)&&(b=c)}),b},f.Widgets.getWidgetFormControlForWidget=function(a){var b=null;return f.control.each(function(c){"widget_form"===c.params.type&&c.params.widget_id===a&&(b=c)}),b}}}(window.wp,jQuery);
\ No newline at end of file
+!function(a,b){function c(a,b){function c(d){d||(a.expanded.unbind(c),b.focus())}a.focus(),a.expanded.bind(c)}function d(a){var b,c={number:null,id_base:null};return b=a.match(/^(.+)-(\d+)$/),b?(c.id_base=b[1],c.number=parseInt(b[2],10)):c.id_base=a,c}function e(a){var b,c=d(a);return b="widget_"+c.id_base,c.number&&(b+="["+c.number+"]"),b}if(a&&a.customize){var f,g=a.customize;g.Widgets=g.Widgets||{},g.Widgets.savedWidgetIds={},g.Widgets.data=_wpCustomizeWidgetsSettings||{},f=g.Widgets.data.l10n,delete g.Widgets.data.l10n,g.Widgets.WidgetModel=Backbone.Model.extend({id:null,temp_id:null,classname:null,control_tpl:null,description:null,is_disabled:null,is_multi:null,multi_number:null,name:null,id_base:null,transport:null,params:[],width:null,height:null,search_matched:!0}),g.Widgets.WidgetCollection=Backbone.Collection.extend({model:g.Widgets.WidgetModel,doSearch:function(a){this.terms!==a&&(this.terms=a,this.terms.length>0&&this.search(this.terms),""===this.terms&&this.each(function(a){a.set("search_matched",!0)}))},search:function(a){var b,c;a=a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),a=a.replace(/ /g,")(?=.*"),b=new RegExp("^(?=.*"+a+").+","i"),this.each(function(a){c=[a.get("name"),a.get("id"),a.get("description")].join(" "),a.set("search_matched",b.test(c))})}}),g.Widgets.availableWidgets=new g.Widgets.WidgetCollection(g.Widgets.data.availableWidgets),g.Widgets.SidebarModel=Backbone.Model.extend({after_title:null,after_widget:null,before_title:null,before_widget:null,"class":null,description:null,id:null,name:null,is_rendered:!1}),g.Widgets.SidebarCollection=Backbone.Collection.extend({model:g.Widgets.SidebarModel}),g.Widgets.registeredSidebars=new g.Widgets.SidebarCollection(g.Widgets.data.registeredSidebars),g.Widgets.AvailableWidgetsPanelView=a.Backbone.View.extend({el:"#available-widgets",events:{"input #widgets-search":"search","keyup #widgets-search":"search","change #widgets-search":"search","search #widgets-search":"search","focus .widget-tpl":"focus","click .widget-tpl":"_submit","keypress .widget-tpl":"_submit",keydown:"keyboardAccessible"},selected:null,currentSidebarControl:null,$search:null,initialize:function(){var a=this;this.$search=b("#widgets-search"),_.bindAll(this,"close"),this.listenTo(this.collection,"change",this.updateList),this.updateList(),b("#customize-controls, #available-widgets .customize-section-title").on("click keydown",function(c){var d=b(c.target).is(".add-new-widget, .add-new-widget *");b("body").hasClass("adding-widget")&&!d&&a.close()}),g.previewer.bind("url",this.close)},search:function(a){var b;this.collection.doSearch(a.target.value),this.selected&&!this.selected.is(":visible")&&(this.selected.removeClass("selected"),this.selected=null),this.selected&&!a.target.value&&(this.selected.removeClass("selected"),this.selected=null),!this.selected&&a.target.value&&(b=this.$el.find("> .widget-tpl:visible:first"),b.length&&this.select(b))},updateList:function(){this.collection.each(function(a){var c=b("#widget-tpl-"+a.id);c.toggle(a.get("search_matched")&&!a.get("is_disabled")),a.get("is_disabled")&&c.is(this.selected)&&(this.selected=null)})},select:function(a){this.selected=b(a),this.selected.siblings(".widget-tpl").removeClass("selected"),this.selected.addClass("selected")},focus:function(a){this.select(b(a.currentTarget))},_submit:function(a){"keypress"===a.type&&13!==a.which&&32!==a.which||this.submit(b(a.currentTarget))},submit:function(a){var c,d,e;a||(a=this.selected),a&&this.currentSidebarControl&&(this.select(a),c=b(this.selected).data("widget-id"),d=this.collection.findWhere({id:c}),d&&(e=this.currentSidebarControl.addWidget(d.get("id_base")),e&&e.focus(),this.close()))},open:function(a){this.currentSidebarControl=a,_(this.currentSidebarControl.getWidgetFormControls()).each(function(a){a.params.is_wide&&a.collapseForm()}),b("body").addClass("adding-widget"),this.$el.find(".selected").removeClass("selected"),this.collection.doSearch(""),g.settings.browser.mobile||this.$search.focus()},close:function(a){a=a||{},a.returnFocus&&this.currentSidebarControl&&this.currentSidebarControl.container.find(".add-new-widget").focus(),this.currentSidebarControl=null,this.selected=null,b("body").removeClass("adding-widget"),this.$search.val("")},keyboardAccessible:function(a){var c=13===a.which,d=27===a.which,e=40===a.which,f=38===a.which,g=9===a.which,h=a.shiftKey,i=null,j=this.$el.find("> .widget-tpl:visible:first"),k=this.$el.find("> .widget-tpl:visible:last"),l=b(a.target).is(this.$search),m=b(a.target).is(".widget-tpl:visible:last");return e||f?(e?l?i=j:this.selected&&0!==this.selected.nextAll(".widget-tpl:visible").length&&(i=this.selected.nextAll(".widget-tpl:visible:first")):f&&(l?i=k:this.selected&&0!==this.selected.prevAll(".widget-tpl:visible").length&&(i=this.selected.prevAll(".widget-tpl:visible:first"))),this.select(i),void(i?i.focus():this.$search.focus())):void(c&&!this.$search.val()||(c?this.submit():d&&this.close({returnFocus:!0}),this.currentSidebarControl&&g&&(h&&l||!h&&m)&&(this.currentSidebarControl.container.find(".add-new-widget").focus(),a.preventDefault())))}}),g.Widgets.formSyncHandlers={rss:function(a,c,d){var e=c.find(".widget-error:first"),f=b("<div>"+d+"</div>").find(".widget-error:first");e.length&&f.length?e.replaceWith(f):e.length?e.remove():f.length&&c.find(".widget-content:first").prepend(f)}},g.Widgets.WidgetControl=g.Control.extend({defaultExpandedArguments:{duration:"fast",completeCallback:b.noop},initialize:function(a,c){var d=this;d.widgetControlEmbedded=!1,d.widgetContentEmbedded=!1,d.expanded=new g.Value((!1)),d.expandedArgumentsQueue=[],d.expanded.bind(function(a){var c=d.expandedArgumentsQueue.shift();c=b.extend({},d.defaultExpandedArguments,c),d.onChangeExpanded(a,c)}),d.altNotice=!0,g.Control.prototype.initialize.call(d,a,c)},ready:function(){var a=this;a.section()?g.section(a.section(),function(b){var c=function(d){d&&(a.embedWidgetControl(),b.expanded.unbind(c))};b.expanded()?c(!0):b.expanded.bind(c)}):a.embedWidgetControl()},embedWidgetControl:function(){var a,c=this;c.widgetControlEmbedded||(c.widgetControlEmbedded=!0,a=b(c.params.widget_control),c.container.append(a),c._setupModel(),c._setupWideWidget(),c._setupControlToggle(),c._setupWidgetTitle(),c._setupReorderUI(),c._setupHighlightEffects(),c._setupUpdateUI(),c._setupRemoveUI())},embedWidgetContent:function(){var a,c=this;c.embedWidgetControl(),c.widgetContentEmbedded||(c.widgetContentEmbedded=!0,a=b(c.params.widget_content),c.container.find(".widget-content:first").append(a),b(document).trigger("widget-added",[c.container.find(".widget:first")]))},_setupModel:function(){var a,b=this;a=function(){g.Widgets.savedWidgetIds[b.params.widget_id]=!0},g.bind("ready",a),g.bind("saved",a),this._updateCount=0,this.isWidgetUpdating=!1,this.liveUpdateMode=!0,this.setting.bind(function(a,c){_(c).isEqual(a)||b.isWidgetUpdating||b.updateWidget({instance:a})})},_setupWideWidget:function(){var a,c,d,e,f,h=this;this.params.is_wide&&(a=this.container.find(".widget-inside"),c=a.find("> .form"),d=b(".wp-full-overlay-sidebar-content:first"),this.container.addClass("wide-widget-control"),this.container.find(".widget-content:first").css({"max-width":this.params.width,"min-height":this.params.height}),f=function(){var d,e=h.container.offset().top,f=b(window).height(),g=c.outerHeight();a.css("max-height",f),d=Math.max(0,Math.min(Math.max(e,0),f-g)),a.css("top",d)},e=b("#customize-theme-controls"),this.container.on("expand",function(){f(),d.on("scroll",f),b(window).on("resize",f),e.on("expanded collapsed",f)}),this.container.on("collapsed",function(){d.off("scroll",f),b(window).off("resize",f),e.off("expanded collapsed",f)}),g.each(function(a){0===a.id.indexOf("sidebars_widgets[")&&a.bind(function(){h.container.hasClass("expanded")&&f()})}))},_setupControlToggle:function(){var a,b=this;this.container.find(".widget-top").on("click",function(a){a.preventDefault();var c=b.getSidebarWidgetsControl();c.isReordering||b.expanded(!b.expanded())}),a=this.container.find(".widget-control-close"),a.on("click",function(a){a.preventDefault(),b.collapse(),b.container.find(".widget-top .widget-action:first").focus()})},_setupWidgetTitle:function(){var a,b=this;a=function(){var a=b.setting().title,c=b.container.find(".in-widget-title");a?c.text(": "+a):c.text("")},this.setting.bind(a),a()},_setupReorderUI:function(){var c,d,e,h,i,j=this;c=function(a){a.siblings(".selected").removeClass("selected"),a.addClass("selected");var b=a.data("id")===j.params.sidebar_id;j.container.find(".move-widget-btn").prop("disabled",b)},this.container.find(".widget-title-action").after(b(g.Widgets.data.tpl.widgetReorderNav)),i=_.template(g.Widgets.data.tpl.moveWidgetArea),d=b(i({sidebars:_(g.Widgets.registeredSidebars.toArray()).pluck("attributes")})),this.container.find(".widget-top").after(d),h=function(){var a,e=d.find("li"),f=0;a=e.filter(function(){return b(this).data("id")===j.params.sidebar_id}),e.each(function(){var d,e,h,i=b(this);d=i.data("id"),e=g.Widgets.registeredSidebars.get(d),h=e.get("is_rendered"),i.toggle(h),h&&(f+=1),i.hasClass("selected")&&!h&&c(a)}),f>1?j.container.find(".move-widget").show():j.container.find(".move-widget").hide()},h(),g.Widgets.registeredSidebars.on("change:is_rendered",h),e=this.container.find(".widget-reorder-nav"),e.find(".move-widget, .move-widget-down, .move-widget-up").each(function(){b(this).prepend(j.container.find(".widget-title").text()+": ")}).on("click keypress",function(c){if("keypress"!==c.type||13===c.which||32===c.which)if(b(this).focus(),b(this).is(".move-widget"))j.toggleWidgetMoveArea();else{var d=b(this).is(".move-widget-down"),e=b(this).is(".move-widget-up"),g=j.getWidgetSidebarPosition();if(e&&0===g||d&&g===j.getSidebarWidgetsControl().setting().length-1)return;e?(j.moveUp(),a.a11y.speak(f.widgetMovedUp)):(j.moveDown(),a.a11y.speak(f.widgetMovedDown)),b(this).focus()}}),this.container.find(".widget-area-select").on("click keypress","li",function(a){"keypress"===a.type&&13!==a.which&&32!==a.which||(a.preventDefault(),c(b(this)))}),this.container.find(".move-widget-btn").click(function(){j.getSidebarWidgetsControl().toggleReordering(!1);var a,b,c,d,e,f=j.params.sidebar_id,h=j.container.find(".widget-area-select li.selected").data("id");a=g("sidebars_widgets["+f+"]"),b=g("sidebars_widgets["+h+"]"),c=Array.prototype.slice.call(a()),d=Array.prototype.slice.call(b()),e=j.getWidgetSidebarPosition(),c.splice(e,1),d.push(j.params.widget_id),a(c),b(d),j.focus()})},_setupHighlightEffects:function(){var a=this;this.container.on("mouseenter click",function(){a.setting.previewer.send("highlight-widget",a.params.widget_id)}),this.setting.bind(function(){a.setting.previewer.send("highlight-widget",a.params.widget_id)})},_setupUpdateUI:function(){var a,c,d,e,h,i=this;a=this.container.find(".widget:first"),c=a.find(".widget-content:first"),d=this.container.find(".widget-control-save"),d.val(f.saveBtnLabel),d.attr("title",f.saveBtnTooltip),d.removeClass("button-primary").addClass("button-secondary"),d.on("click",function(a){a.preventDefault(),i.updateWidget({disable_form:!0})}),e=_.debounce(function(){i.updateWidget()},250),c.on("keydown","input",function(a){13===a.which&&(a.preventDefault(),i.updateWidget({ignoreActiveElement:!0}))}),c.on("change input propertychange",":input",function(a){i.liveUpdateMode&&("change"===a.type||this.checkValidity&&this.checkValidity())&&e()}),this.setting.previewer.channel.bind("synced",function(){i.container.removeClass("previewer-loading")}),g.previewer.bind("widget-updated",function(a){a===i.params.widget_id&&i.container.removeClass("previewer-loading")}),h=g.Widgets.formSyncHandlers[this.params.widget_id_base],h&&b(document).on("widget-synced",function(b,c){a.is(c)&&h.apply(document,arguments)})},onChangeActive:function(a,b){this.container.toggleClass("widget-rendered",a),b.completeCallback&&b.completeCallback()},_setupRemoveUI:function(){var a,b,c=this;a=this.container.find("a.widget-control-remove"),a.on("click",function(a){a.preventDefault();var b;b=c.container.next().is(".customize-control-widget_form")?c.container.next().find(".widget-action:first"):c.container.prev().is(".customize-control-widget_form")?c.container.prev().find(".widget-action:first"):c.container.next(".customize-control-sidebar_widgets").find(".add-new-widget:first"),c.container.slideUp(function(){var a,d,e=g.Widgets.getSidebarWidgetControlContainingWidget(c.params.widget_id);e&&(a=e.setting().slice(),d=_.indexOf(a,c.params.widget_id),-1!==d&&(a.splice(d,1),e.setting(a),b.focus()))})}),b=function(){a.text(f.removeBtnLabel),a.attr("title",f.removeBtnTooltip)},this.params.is_new?g.bind("saved",b):b()},_getInputs:function(a){return b(a).find(":input[name]")},_getInputsSignature:function(a){var c=_(a).map(function(a){var c,d=b(a);return c=d.is(":checkbox, :radio")?[d.attr("id"),d.attr("name"),d.prop("value")]:[d.attr("id"),d.attr("name")],c.join(",")});return c.join(";")},_getInputState:function(a){return a=b(a),a.is(":radio, :checkbox")?a.prop("checked"):a.is("select[multiple]")?a.find("option:selected").map(function(){return b(this).val()}).get():a.val()},_setInputState:function(a,c){a=b(a),a.is(":radio, :checkbox")?a.prop("checked",c):a.is("select[multiple]")?(c=b.isArray(c)?_.map(c,function(a){return String(a)}):[],a.find("option").each(function(){b(this).prop("selected",-1!==_.indexOf(c,String(this.value)))})):a.val(c)},getSidebarWidgetsControl:function(){var a,b;if(a="sidebars_widgets["+this.params.sidebar_id+"]",b=g.control(a))return b},updateWidget:function(c){var d,e,h,i,j,k,l,m,n,o,p,q=this;q.embedWidgetContent(),c=b.extend({instance:null,complete:null,ignoreActiveElement:!1},c),d=c.instance,e=c.complete,this._updateCount+=1,j=this._updateCount,h=this.container.find(".widget:first"),i=h.find(".widget-content:first"),i.find(".widget-error").remove(),this.container.addClass("widget-form-loading"),this.container.addClass("previewer-loading"),n=g.state("processing"),n(n()+1),this.liveUpdateMode||this.container.addClass("widget-form-disabled"),k={},k.action="update-widget",k.wp_customize="on",k.nonce=g.settings.nonce["update-widget"],k.theme=g.settings.theme.stylesheet,k.customized=a.customize.previewer.query().customized,l=b.param(k),m=this._getInputs(i),m.each(function(){b(this).data("state"+j,q._getInputState(this))}),l+=d?"&"+b.param({sanitized_widget_setting:JSON.stringify(d)}):"&"+m.serialize(),l+="&"+i.find("~ :input").serialize(),this._previousUpdateRequest&&this._previousUpdateRequest.abort(),o=b.post(a.ajax.settings.url,l),this._previousUpdateRequest=o,o.done(function(a){var d,k,l,n,o=!1;return"0"===a?(g.previewer.preview.iframe.hide(),void g.previewer.login().done(function(){q.updateWidget(c),g.previewer.preview.iframe.show()})):"-1"===a?void g.previewer.cheatin():void(a.success?(k=b("<div>"+a.data.form+"</div>"),l=q._getInputs(k),n=q._getInputsSignature(m)===q._getInputsSignature(l),n&&!q.liveUpdateMode&&(q.liveUpdateMode=!0,q.container.removeClass("widget-form-disabled"),q.container.find('input[name="savewidget"]').hide()),n&&q.liveUpdateMode?(m.each(function(a){var d,e,f,g=b(this),h=b(l[a]);d=g.data("state"+j),e=q._getInputState(h),g.data("sanitized",e),f=!_.isEqual(d,e)&&(c.ignoreActiveElement||!g.is(document.activeElement)),f&&q._setInputState(g,e)}),b(document).trigger("widget-synced",[h,a.data.form])):q.liveUpdateMode?(q.liveUpdateMode=!1,q.container.find('input[name="savewidget"]').show(),o=!0):(i.html(a.data.form),q.container.removeClass("widget-form-disabled"),b(document).trigger("widget-updated",[h])),p=!o&&!_(q.setting()).isEqual(a.data.instance),p?(q.isWidgetUpdating=!0,q.setting(a.data.instance),q.isWidgetUpdating=!1):q.container.removeClass("previewer-loading"),e&&e.call(q,null,{noChange:!p,ajaxFinished:!0})):(d=f.error,a.data&&a.data.message&&(d=a.data.message),e?e.call(q,d):i.prepend('<p class="widget-error"><strong>'+d+"</strong></p>")))}),o.fail(function(a,b){e&&e.call(q,b)}),o.always(function(){q.container.removeClass("widget-form-loading"),m.each(function(){b(this).removeData("state"+j)}),n(n()-1)})},expandControlSection:function(){g.Control.prototype.expand.call(this)},_toggleExpanded:g.Section.prototype._toggleExpanded,expand:g.Section.prototype.expand,expandForm:function(){this.expand()},collapse:g.Section.prototype.collapse,collapseForm:function(){this.collapse()},toggleForm:function(a){"undefined"==typeof a&&(a=!this.expanded()),this.expanded(a)},onChangeExpanded:function(a,b){var c,d,e,f,h=this;return h.embedWidgetControl(),a&&h.embedWidgetContent(),b.unchanged?void(a&&g.Control.prototype.expand.call(h,{completeCallback:b.completeCallback})):(c=this.container.find("div.widget:first"),d=c.find(".widget-inside:first"),void(a?(h.section()&&g.section(h.section())&&h.expandControlSection(),g.control.each(function(a){h.params.type===a.params.type&&h!==a&&a.collapse()}),e=function(){h.container.removeClass("expanding"),h.container.addClass("expanded"),h.container.trigger("expanded")},b.completeCallback&&(f=e,e=function(){f(),b.completeCallback()}),h.params.is_wide?d.fadeIn(b.duration,e):d.slideDown(b.duration,e),h.container.trigger("expand"),h.container.addClass("expanding")):(e=function(){h.container.removeClass("collapsing"),h.container.removeClass("expanded"),h.container.trigger("collapsed")},b.completeCallback&&(f=e,e=function(){f(),b.completeCallback()}),h.container.trigger("collapse"),h.container.addClass("collapsing"),h.params.is_wide?d.fadeOut(b.duration,e):d.slideUp(b.duration,function(){c.css({width:"",margin:""}),e()}))))},getWidgetSidebarPosition:function(){var a,b;if(a=this.getSidebarWidgetsControl().setting(),b=_.indexOf(a,this.params.widget_id),b!==-1)return b},moveUp:function(){this._moveWidgetByOne(-1)},moveDown:function(){this._moveWidgetByOne(1)},_moveWidgetByOne:function(a){var b,c,d,e;b=this.getWidgetSidebarPosition(),c=this.getSidebarWidgetsControl().setting,d=Array.prototype.slice.call(c()),e=d[b+a],d[b+a]=this.params.widget_id,d[b]=e,c(d)},toggleWidgetMoveArea:function(a){var c,d=this;c=this.container.find(".move-widget-area"),"undefined"==typeof a&&(a=!c.hasClass("active")),a&&(c.find(".selected").removeClass("selected"),c.find("li").filter(function(){return b(this).data("id")===d.params.sidebar_id}).addClass("selected"),this.container.find(".move-widget-btn").prop("disabled",!0)),c.toggleClass("active",a)},highlightSectionAndControl:function(){var a;a=this.container.is(":hidden")?this.container.closest(".control-section"):this.container,b(".highlighted").removeClass("highlighted"),a.addClass("highlighted"),setTimeout(function(){a.removeClass("highlighted")},500)}}),g.Widgets.WidgetsPanel=g.Panel.extend({ready:function(){var a=this;g.Panel.prototype.ready.call(a),a.deferred.embedded.done(function(){var c,d,e;c=a.container.find(".panel-meta"),d=b("<div></div>",{"class":"no-widget-areas-rendered-notice"}),d.append(b("<em></em>",{text:f.noAreasRendered})),c.append(d),e=function(){return 0===_.filter(a.sections(),function(a){return a.active()}).length},d.toggle(e()),g.previewer.deferred.active.done(function(){d.toggle(e())}),g.bind("pane-contents-reflowed",function(){var a="resolved"===g.previewer.deferred.active.state()?"fast":0;e()?d.slideDown(a):d.slideUp(a)})})},isContextuallyActive:function(){var a=this;return a.active()}}),g.Widgets.SidebarSection=g.Section.extend({ready:function(){var a,b=this;g.Section.prototype.ready.call(this),a=g.Widgets.registeredSidebars.get(b.params.sidebarId),b.active.bind(function(b){a.set("is_rendered",b)}),a.set("is_rendered",b.active())}}),g.Widgets.SidebarControl=g.Control.extend({ready:function(){this.$controlSection=this.container.closest(".control-section"),this.$sectionContent=this.container.closest(".accordion-section-content"),this._setupModel(),this._setupSortable(),this._setupAddition(),this._applyCardinalOrderClassNames()},_setupModel:function(){var a=this;this.setting.bind(function(c,e){var f,h,i;h=_(e).difference(c),c=_(c).filter(function(a){var b=d(a);return!!g.Widgets.availableWidgets.findWhere({id_base:b.id_base})}),f=_(c).map(function(b){var c=g.Widgets.getWidgetFormControlForWidget(b);return c||(c=a.addWidget(b)),c}),f.sort(function(a,b){var d=_.indexOf(c,a.params.widget_id),e=_.indexOf(c,b.params.widget_id);return d-e}),i=0,_(f).each(function(b){b.priority(i),b.section(a.section()),i+=1}),a.priority(i),a._applyCardinalOrderClassNames(),_(f).each(function(b){b.params.sidebar_id=a.params.sidebar_id}),_(h).each(function(c){setTimeout(function(){var e,f,h,i,j,k=!1;g.each(function(b){if(b.id!==a.setting.id&&0===b.id.indexOf("sidebars_widgets[")&&"sidebars_widgets[wp_inactive_widgets]"!==b.id){var d,e=b();d=_.indexOf(e,c),-1!==d&&(k=!0)}}),k||(e=g.Widgets.getWidgetFormControlForWidget(c),f=e&&b.contains(document,e.container[0])&&!b.contains(a.$sectionContent[0],e.container[0]),e&&!f&&(g.control.remove(e.id),e.container.remove()),g.Widgets.savedWidgetIds[c]&&(h=g.value("sidebars_widgets[wp_inactive_widgets]")().slice(),h.push(c),g.value("sidebars_widgets[wp_inactive_widgets]")(_(h).unique())),i=d(c).id_base,j=g.Widgets.availableWidgets.findWhere({id_base:i}),j&&!j.get("is_multi")&&j.set("is_disabled",!1))})})})},_setupSortable:function(){var a=this;this.isReordering=!1,this.$sectionContent.sortable({items:"> .customize-control-widget_form",handle:".widget-top",axis:"y",tolerance:"pointer",connectWith:".accordion-section-content:has(.customize-control-sidebar_widgets)",update:function(){var c,d=a.$sectionContent.sortable("toArray");c=b.map(d,function(a){return b("#"+a).find(":input[name=widget-id]").val()}),a.setting(c)}}),this.$controlSection.find(".accordion-section-title").droppable({accept:".customize-control-widget_form",over:function(){var b=g.section(a.section.get());b.expand({allowMultiple:!0,completeCallback:function(){g.section.each(function(a){a.container.find(".customize-control-sidebar_widgets").length&&a.container.find(".accordion-section-content:first").sortable("refreshPositions")})}})}}),this.container.find(".reorder-toggle").on("click",function(){a.toggleReordering(!a.isReordering)})},_setupAddition:function(){var a=this;this.container.find(".add-new-widget").on("click",function(){var c=b(this);a.$sectionContent.hasClass("reordering")||(b("body").hasClass("adding-widget")?(c.attr("aria-expanded","false"),g.Widgets.availableWidgetsPanel.close()):(c.attr("aria-expanded","true"),g.Widgets.availableWidgetsPanel.open(a)))})},_applyCardinalOrderClassNames:function(){var a=[];return _.each(this.setting(),function(b){var c=g.Widgets.getWidgetFormControlForWidget(b);c&&a.push(c)}),0===a.length||1===g.Widgets.registeredSidebars.length&&a.length<=1?void this.container.find(".reorder-toggle").hide():(this.container.find(".reorder-toggle").show(),b(a).each(function(){b(this.container).removeClass("first-widget").removeClass("last-widget").find(".move-widget-down, .move-widget-up").prop("tabIndex",0)}),_.first(a).container.addClass("first-widget").find(".move-widget-up").prop("tabIndex",-1),void _.last(a).container.addClass("last-widget").find(".move-widget-down").prop("tabIndex",-1))},toggleReordering:function(b){var c=this.$sectionContent.find(".add-new-widget"),d=this.container.find(".reorder-toggle"),e=this.$sectionContent.find(".widget-title");b=Boolean(b),b!==this.$sectionContent.hasClass("reordering")&&(this.isReordering=b,this.$sectionContent.toggleClass("reordering",b),b?(_(this.getWidgetFormControls()).each(function(a){a.collapse()}),c.attr({tabindex:"-1","aria-hidden":"true"}),d.attr("aria-label",f.reorderLabelOff),a.a11y.speak(f.reorderModeOn),e.attr("aria-hidden","true")):(c.removeAttr("tabindex aria-hidden"),d.attr("aria-label",f.reorderLabelOn),a.a11y.speak(f.reorderModeOff),e.attr("aria-hidden","false")))},getWidgetFormControls:function(){var a=[];return _(this.setting()).each(function(b){var c=e(b),d=g.control(c);d&&a.push(d)}),a},addWidget:function(a){var c,e,f,h,i,j,k,l,m,n,o=this,p="widget_form",q=d(a),r=q.number,s=q.id_base,t=g.Widgets.availableWidgets.findWhere({id_base:s});return!!t&&(!(r&&!t.get("is_multi"))&&(t.get("is_multi")&&!r&&(t.set("multi_number",t.get("multi_number")+1),r=t.get("multi_number")),c=b.trim(b("#widget-tpl-"+t.get("id")).html()),t.get("is_multi")?c=c.replace(/<[^<>]+>/g,function(a){return a.replace(/__i__|%i%/g,r)}):t.set("is_disabled",!0),e=b(c),f=b("<li/>").addClass("customize-control").addClass("customize-control-"+p).append(e),f.find("> .widget-icon").remove(),t.get("is_multi")&&(f.find('input[name="widget_number"]').val(r),f.find('input[name="multi_number"]').val(r)),a=f.find('[name="widget-id"]').val(),f.hide(),i="widget_"+t.get("id_base"),t.get("is_multi")&&(i+="["+r+"]"),f.attr("id","customize-control-"+i.replace(/\]/g,"").replace(/\[/g,"-")),j=g.has(i),j||(m={transport:g.Widgets.data.selectiveRefreshableWidgets[t.get("id_base")]?"postMessage":"refresh",previewer:this.setting.previewer},n=g.create(i,i,"",m),n.set({})),h=g.controlConstructor[p],k=new h(i,{params:{settings:{"default":i},content:f,sidebar_id:o.params.sidebar_id,widget_id:a,widget_id_base:t.get("id_base"),type:p,is_new:!j,width:t.get("width"),height:t.get("height"),is_wide:t.get("is_wide"),active:!0},previewer:o.setting.previewer}),g.control.add(i,k),g.each(function(b){if(b.id!==o.setting.id&&0===b.id.indexOf("sidebars_widgets[")){var c=b().slice(),d=_.indexOf(c,a);-1!==d&&(c.splice(d),b(c))}}),l=this.setting().slice(),-1===_.indexOf(l,a)&&(l.push(a),this.setting(l)),f.slideDown(function(){j&&k.updateWidget({instance:k.setting()})}),k))}}),b.extend(g.panelConstructor,{widgets:g.Widgets.WidgetsPanel}),b.extend(g.sectionConstructor,{sidebar:g.Widgets.SidebarSection}),b.extend(g.controlConstructor,{widget_form:g.Widgets.WidgetControl,sidebar_widgets:g.Widgets.SidebarControl}),g.bind("ready",function(){g.Widgets.availableWidgetsPanel=new g.Widgets.AvailableWidgetsPanelView({collection:g.Widgets.availableWidgets}),g.previewer.bind("highlight-widget-control",g.Widgets.highlightWidgetFormControl),g.previewer.bind("focus-widget-control",g.Widgets.focusWidgetFormControl)}),g.Widgets.highlightWidgetFormControl=function(a){var b=g.Widgets.getWidgetFormControlForWidget(a);b&&b.highlightSectionAndControl()},g.Widgets.focusWidgetFormControl=function(a){var b=g.Widgets.getWidgetFormControlForWidget(a);b&&b.focus()},g.Widgets.getSidebarWidgetControlContainingWidget=function(a){var b=null;return g.control.each(function(c){"sidebar_widgets"===c.params.type&&-1!==_.indexOf(c.setting(),a)&&(b=c)}),b},g.Widgets.getWidgetFormControlForWidget=function(a){var b=null;return g.control.each(function(c){"widget_form"===c.params.type&&c.params.widget_id===a&&(b=c)}),b},b(document).on("widget-added",function(a,b){var e,f,h,i;e=d(b.find("> .widget-inside > .form > .widget-id").val()),"nav_menu"===e.id_base&&(f=g.control("widget_nav_menu["+String(e.number)+"]"),f&&(h=b.find('select[name*="nav_menu"]'),i=b.find(".edit-selected-nav-menu > button"),0!==h.length&&0!==i.length&&(h.on("change",function(){g.section.has("nav_menu["+h.val()+"]")?i.parent().show():i.parent().hide()}),i.on("click",function(){var a=g.section("nav_menu["+h.val()+"]");a&&c(a,f)}))))})}}(window.wp,jQuery);
\ No newline at end of file
index 211866f55a2440872620e807055b8569bb1cb786..c6128ec415c6e15a901e28fe534758325b7121c3 100644 (file)
@@ -1 +1 @@
-var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){function b(){if(!(document.documentMode&&document.documentMode<9)){a("body").append('<div class="quick-draft-textarea-clone" style="display: none;"></div>');var b=a(".quick-draft-textarea-clone"),c=a("#content"),d=c.height(),e=a(window).height()-100;b.css({"font-family":c.css("font-family"),"font-size":c.css("font-size"),"line-height":c.css("line-height"),"padding-bottom":c.css("paddingBottom"),"padding-left":c.css("paddingLeft"),"padding-right":c.css("paddingRight"),"padding-top":c.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),c.on("focus input propertychange",function(){var f=a(this),g=f.val()+"&nbsp;",h=b.css("width",f.css("width")).text(g).outerHeight()+2;c.css("overflow-y","auto"),h===d||h>=e&&d>=e||(d=h>e?e:h,c.css("overflow","hidden"),f.css("height",d+"px"))})}}var c,d=a("#welcome-panel"),e=a("#wp_welcome_panel-hide");c=function(b){a.post(ajaxurl,{action:"update-welcome-panel",visible:b,welcomepanelnonce:a("#welcomepanelnonce").val()})},d.hasClass("hidden")&&e.prop("checked")&&d.removeClass("hidden"),a(".welcome-panel-close, .welcome-panel-dismiss a",d).click(function(b){b.preventDefault(),d.addClass("hidden"),c(0),a("#wp_welcome_panel-hide").prop("checked",!1)}),e.click(function(){d.toggleClass("hidden",!this.checked),c(this.checked?1:0)}),ajaxWidgets=["dashboard_primary"],ajaxPopulateWidgets=function(b){function c(b,c){var d,e=a("#"+c+" div.inside:visible").find(".widget-loading");e.length&&(d=e.parent(),setTimeout(function(){d.load(ajaxurl+"?action=dashboard-widgets&widget="+c+"&pagenow="+pagenow,"",function(){d.hide().slideDown("normal",function(){a(this).css("display","")})})},500*b))}b?(b=b.toString(),-1!==a.inArray(b,ajaxWidgets)&&c(0,b)):a.each(ajaxWidgets,c)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),quickPressLoad=function(){var c,d=a("#quickpost-action");a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!1),c=a("#quick-press").submit(function(b){function d(){var b=a(".drafts ul li").first();b.css("background","#fffbe5"),setTimeout(function(){b.css("background","none")},1e3)}b.preventDefault(),a("#dashboard_quick_press #publishing-action .spinner").show(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),a.post(c.attr("action"),c.serializeArray(),function(b){a("#dashboard_quick_press .inside").html(b),a("#quick-press").removeClass("initial-form"),quickPressLoad(),d(),a("#title").focus()})}),a("#publish").click(function(){d.val("post-quickpress-publish")}),a("#title, #tags-input, #content").each(function(){var b=a(this),c=a("#"+this.id+"-prompt-text");""===this.value&&c.removeClass("screen-reader-text"),c.click(function(){a(this).addClass("screen-reader-text"),b.focus()}),b.blur(function(){""===this.value&&c.removeClass("screen-reader-text")}),b.focus(function(){c.addClass("screen-reader-text")})}),a("#quick-press").on("click focusin",function(){wpActiveEditor="content"}),b()},quickPressLoad(),a(".meta-box-sortables").sortable("option","containment","#wpwrap")});
\ No newline at end of file
+var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){function b(){if(!(document.documentMode&&document.documentMode<9)){a("body").append('<div class="quick-draft-textarea-clone" style="display: none;"></div>');var b=a(".quick-draft-textarea-clone"),c=a("#content"),d=c.height(),e=a(window).height()-100;b.css({"font-family":c.css("font-family"),"font-size":c.css("font-size"),"line-height":c.css("line-height"),"padding-bottom":c.css("paddingBottom"),"padding-left":c.css("paddingLeft"),"padding-right":c.css("paddingRight"),"padding-top":c.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),c.on("focus input propertychange",function(){var f=a(this),g=f.val()+"&nbsp;",h=b.css("width",f.css("width")).text(g).outerHeight()+2;c.css("overflow-y","auto"),h===d||h>=e&&d>=e||(d=h>e?e:h,c.css("overflow","hidden"),f.css("height",d+"px"))})}}var c,d=a("#welcome-panel"),e=a("#wp_welcome_panel-hide");c=function(b){a.post(ajaxurl,{action:"update-welcome-panel",visible:b,welcomepanelnonce:a("#welcomepanelnonce").val()})},d.hasClass("hidden")&&e.prop("checked")&&d.removeClass("hidden"),a(".welcome-panel-close, .welcome-panel-dismiss a",d).click(function(b){b.preventDefault(),d.addClass("hidden"),c(0),a("#wp_welcome_panel-hide").prop("checked",!1)}),e.click(function(){d.toggleClass("hidden",!this.checked),c(this.checked?1:0)}),ajaxWidgets=["dashboard_primary"],ajaxPopulateWidgets=function(b){function c(b,c){var d,e=a("#"+c+" div.inside:visible").find(".widget-loading");e.length&&(d=e.parent(),setTimeout(function(){d.load(ajaxurl+"?action=dashboard-widgets&widget="+c+"&pagenow="+pagenow,"",function(){d.hide().slideDown("normal",function(){a(this).css("display","")})})},500*b))}b?(b=b.toString(),a.inArray(b,ajaxWidgets)!==-1&&c(0,b)):a.each(ajaxWidgets,c)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),quickPressLoad=function(){var c,d=a("#quickpost-action");a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!1),c=a("#quick-press").submit(function(b){function d(){var b=a(".drafts ul li").first();b.css("background","#fffbe5"),setTimeout(function(){b.css("background","none")},1e3)}b.preventDefault(),a("#dashboard_quick_press #publishing-action .spinner").show(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),a.post(c.attr("action"),c.serializeArray(),function(b){a("#dashboard_quick_press .inside").html(b),a("#quick-press").removeClass("initial-form"),quickPressLoad(),d(),a("#title").focus()})}),a("#publish").click(function(){d.val("post-quickpress-publish")}),a("#title, #tags-input, #content").each(function(){var b=a(this),c=a("#"+this.id+"-prompt-text");""===this.value&&c.removeClass("screen-reader-text"),c.click(function(){a(this).addClass("screen-reader-text"),b.focus()}),b.blur(function(){""===this.value&&c.removeClass("screen-reader-text")}),b.focus(function(){c.addClass("screen-reader-text")})}),a("#quick-press").on("click focusin",function(){wpActiveEditor="content"}),b()},quickPressLoad(),a(".meta-box-sortables").sortable("option","containment","#wpwrap")});
\ No newline at end of file
index f201362bf0040a898362b2f89e4736fcdcd021d7..3de031022cb37766c87e766de66e71de18660d2f 100644 (file)
@@ -220,12 +220,15 @@ setCommentsList = function() {
                        if ( settings.data.id == replyID )
                                replyButton.text(adminCommentsL10n.replyApprove);
 
-                       c.find('div.comment_status').html('0');
+                       c.find( '.row-actions span.view' ).addClass( 'hidden' ).end()
+                               .find( 'div.comment_status' ).html( '0' );
+
                } else {
                        if ( settings.data.id == replyID )
                                replyButton.text(adminCommentsL10n.reply);
 
-                       c.find('div.comment_status').html('1');
+                       c.find( '.row-actions span.view' ).removeClass( 'hidden' ).end()
+                               .find( 'div.comment_status' ).html( '1' );
                }
 
                diff = $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1;
@@ -563,6 +566,7 @@ setCommentsList = function() {
 commentReply = {
        cid : '',
        act : '',
+       originalContent : '',
 
        init : function() {
                var row = $('#replyrow');
@@ -646,6 +650,7 @@ commentReply = {
                $( '.spinner', replyrow ).removeClass( 'is-active' );
 
                this.cid = '';
+               this.originalContent = '';
        },
 
        open : function(comment_id, post_id, action) {
@@ -655,6 +660,10 @@ commentReply = {
                        h = c.height(),
                        colspanVal = 0;
 
+               if ( ! this.discardCommentChanges() ) {
+                       return false;
+               }
+
                t.close();
                t.cid = comment_id;
 
@@ -663,6 +672,7 @@ commentReply = {
                action = action || 'replyto';
                act = 'edit' == action ? 'edit' : 'replyto';
                act = t.act = act + '-comment';
+               t.originalContent = $('textarea.comment', rowData).val();
                colspanVal = $( '> th:visible, > td:visible', c ).length;
 
                // Make sure it's actually a table and there's a `colspan` value to apply.
@@ -850,6 +860,22 @@ commentReply = {
                        $('table.comments-box').css('display', '');
                        $('#no-comments').remove();
                });
+       },
+
+       /**
+        * Alert the user if they have unsaved changes on a comment that will be
+        * lost if they proceed.
+        *
+        * @returns {boolean}
+        */
+       discardCommentChanges: function() {
+               var editRow = $( '#replyrow' );
+
+               if  ( this.originalContent === $( '#replycontent', editRow ).val() ) {
+                       return true;
+               }
+
+               return window.confirm( adminCommentsL10n.warnCommentChanges );
        }
 };
 
index 701d0da2dd61e1b0f1bd4c0fcd25302caa8e8459..a420abcbc58a75810f5630c702fc09bcde1a455a 100644 (file)
@@ -1 +1 @@
-var setCommentsList,theList,theExtraList,commentReply;!function(a){var b,c,d,e,f,g,h,i,j,k=document.title,l=a("#dashboard_right_now").length;b=function(a){var b=parseInt(a.html().replace(/[^0-9]+/g,""),10);return isNaN(b)?0:b},c=function(a,b){var c="";if(!isNaN(b)){if(b=1>b?"0":b.toString(),b.length>3){for(;b.length>3;)c=thousandsSeparator+b.substr(b.length-3)+c,b=b.substr(0,b.length-3);b+=c}a.html(b)}},f=function(e,f){var g,h,i=".post-com-count-"+f,j="comment-count-no-comments",k="comment-count-approved";d("span.approved-count",e),f&&(g=a("span."+k,i),h=a("span."+j,i),g.each(function(){var d=a(this),f=b(d)+e;1>f&&(f=0),0===f?d.removeClass(k).addClass(j):d.addClass(k).removeClass(j),c(d,f)}),h.each(function(){var b=a(this);e>0?b.removeClass(j).addClass(k):b.addClass(j).removeClass(k),c(b,e)}))},d=function(d,e){a(d).each(function(){var d=a(this),f=b(d)+e;1>f&&(f=0),c(d,f)})},h=function(b){if(l&&b&&b.i18n_comments_text){var c=a("#dashboard_right_now");a(".comment-count a",c).text(b.i18n_comments_text),a(".comment-mod-count a",c).text(b.i18n_moderation_text).parent()[b.in_moderation>0?"removeClass":"addClass"]("hidden")}},g=function(d){var e,f,g,h;j=j||new RegExp(adminCommentsL10n.docTitleCommentsCount.replace("%s","\\([0-9"+thousandsSeparator+"]+\\)")+"?"),i=i||a("<div />"),e=k,h=j.exec(document.title),h?(h=h[0],i.html(h),g=b(i)+d):(i.html(0),g=d),g>=1?(c(i,g),f=j.exec(document.title),f&&(e=document.title.replace(f[0],adminCommentsL10n.docTitleCommentsCount.replace("%s",i.text())+" "))):(f=j.exec(e),f&&(e=e.replace(f[0],adminCommentsL10n.docTitleComments))),document.title=e},e=function(d,e){var f,h,i=".post-com-count-"+e,j="comment-count-no-pending",k="post-com-count-no-pending",m="comment-count-pending";l||g(d),a("span.pending-count").each(function(){var e=a(this),f=b(e)+d;1>f&&(f=0),e.closest(".awaiting-mod")[0===f?"addClass":"removeClass"]("count-0"),c(e,f)}),e&&(f=a("span."+m,i),h=a("span."+j,i),f.each(function(){var e=a(this),f=b(e)+d;1>f&&(f=0),0===f?(e.parent().addClass(k),e.removeClass(m).addClass(j)):(e.parent().removeClass(k),e.addClass(m).removeClass(j)),c(e,f)}),h.each(function(){var b=a(this);d>0?(b.parent().removeClass(k),b.removeClass(j).addClass(m)):(b.parent().addClass(k),b.addClass(j).removeClass(m)),c(b,d)}))},setCommentsList=function(){var b,c,g,i,j,k,m,n,o,p=0;b=a('input[name="_total"]',"#comments-form"),c=a('input[name="_per_page"]',"#comments-form"),g=a('input[name="_page"]',"#comments-form"),k=function(a,c,d){p>c||(d&&(p=c),b.val(a.toString()))},i=function(b,c){var d,g,i,j,k=a("#"+c.element);!0!==c.parsed&&(j=c.parsed.responses[0]),d=a("#replyrow"),g=a("#comment_ID",d).val(),i=a("#replybtn",d),k.is(".unapproved")?(c.data.id==g&&i.text(adminCommentsL10n.replyApprove),k.find("div.comment_status").html("0")):(c.data.id==g&&i.text(adminCommentsL10n.reply),k.find("div.comment_status").html("1")),o=a("#"+c.element).is("."+c.dimClass)?1:-1,j?(h(j.supplemental),e(o,j.supplemental.postId),f(-1*o,j.supplemental.postId)):(e(o),f(-1*o))},j=function(d,e){var f,h,i,j,k,l,m,n=!1,o=a(d.target).attr("data-wp-lists");return d.data._total=b.val()||0,d.data._per_page=c.val()||0,d.data._page=g.val()||0,d.data._url=document.location.href,d.data.comment_status=a('input[name="comment_status"]',"#comments-form").val(),-1!=o.indexOf(":trash=1")?n="trash":-1!=o.indexOf(":spam=1")&&(n="spam"),n&&(h=o.replace(/.*?comment-([0-9]+).*/,"$1"),i=a("#comment-"+h),f=a("#"+n+"-undo-holder").html(),i.find(".check-column :checkbox").prop("checked",!1),i.siblings("#replyrow").length&&commentReply.cid==h&&commentReply.close(),i.is("tr")?(j=i.children(":visible").length,m=a(".author strong",i).text(),k=a('<tr id="undo-'+h+'" class="undo un'+n+'" style="display:none;"><td colspan="'+j+'">'+f+"</td></tr>")):(m=a(".comment-author",i).text(),k=a('<div id="undo-'+h+'" style="display:none;" class="undo un'+n+'">'+f+"</div>")),i.before(k),a("strong","#undo-"+h).text(m),l=a(".undo a","#undo-"+h),l.attr("href","comment.php?action=un"+n+"comment&c="+h+"&_wpnonce="+d.data._ajax_nonce),l.attr("data-wp-lists","delete:the-comment-list:comment-"+h+"::un"+n+"=1"),l.attr("class","vim-z vim-destructive"),a(".avatar",i).first().clone().prependTo("#undo-"+h+" ."+n+"-undo-inside"),l.click(function(b){b.preventDefault(),b.stopPropagation(),e.wpList.del(this),a("#undo-"+h).css({backgroundColor:"#ceb"}).fadeOut(350,function(){a(this).remove(),a("#comment-"+h).css("backgroundColor","").fadeIn(300,function(){a(this).show()})})})),d},m=function(c,g){var i,j,m,o,q,r,s,t,u=!0===g.parsed?{}:g.parsed.responses[0],v=!0===g.parsed?"":u.supplemental.status,w=!0===g.parsed?"":u.supplemental.postId,x=!0===g.parsed?"":u.supplemental,y=a(g.target).parent(),z=a("#"+g.element),A=z.hasClass("approved"),B=z.hasClass("unapproved"),C=z.hasClass("spam"),D=z.hasClass("trash"),E=!1;h(x),y.is("span.undo")?(y.hasClass("unspam")?(q=-1,"trash"===v?r=1:"1"===v?t=1:"0"===v&&(s=1)):y.hasClass("untrash")&&(r=-1,"spam"===v?q=1:"1"===v?t=1:"0"===v&&(s=1)),E=!0):y.is("span.spam")?(A?t=-1:B?s=-1:D&&(r=-1),q=1):y.is("span.unspam")?(A?s=1:B?t=1:D?y.hasClass("approve")?t=1:y.hasClass("unapprove")&&(s=1):C&&(y.hasClass("approve")?t=1:y.hasClass("unapprove")&&(s=1)),q=-1):y.is("span.trash")?(A?t=-1:B?s=-1:C&&(q=-1),r=1):y.is("span.untrash")?(A?s=1:B?t=1:D&&(y.hasClass("approve")?t=1:y.hasClass("unapprove")&&(s=1)),r=-1):y.is("span.approve:not(.unspam):not(.untrash)")?(t=1,s=-1):y.is("span.unapprove:not(.unspam):not(.untrash)")?(t=-1,s=1):y.is("span.delete")&&(C?q=-1:D&&(r=-1)),s&&(e(s,w),d("span.all-count",s)),t&&(f(t,w),d("span.all-count",t)),q&&d("span.spam-count",q),r&&d("span.trash-count",r),l||(j=b.val()?parseInt(b.val(),10):0,a(g.target).parent().is("span.undo")?j++:j--,0>j&&(j=0),"object"==typeof c?u.supplemental.total_items_i18n&&p<u.supplemental.time?(i=u.supplemental.total_items_i18n||"",i&&(a(".displaying-num").text(i),a(".total-pages").text(u.supplemental.total_pages_i18n),a(".tablenav-pages").find(".next-page, .last-page").toggleClass("disabled",u.supplemental.total_pages==a(".current-page").val())),k(j,u.supplemental.time,!0)):u.supplemental.time&&k(j,u.supplemental.time,!1):k(j,c,!1)),theExtraList&&0!==theExtraList.length&&0!==theExtraList.children().length&&!E&&(theList.get(0).wpList.add(theExtraList.children(":eq(0):not(.no-items)").remove().clone()),n(),m=a(":animated","#the-comment-list"),o=function(){a("#the-comment-list tr:visible").length||theList.get(0).wpList.add(theExtraList.find(".no-items").clone())},m.length?m.promise().done(o):o())},n=function(b){var c=a.query.get(),d=a(".total-pages").text(),e=a('input[name="_per_page"]',"#comments-form").val();c.paged||(c.paged=1),c.paged>d||(b?(theExtraList.empty(),c.number=Math.min(8,e)):(c.number=1,c.offset=Math.min(8,e)-1),c.no_placeholder=!0,c.paged++,!0===c.comment_type&&(c.comment_type=""),c=a.extend(c,{action:"fetch-list",list_args:list_args,_ajax_fetch_list_nonce:a("#_ajax_fetch_list_nonce").val()}),a.ajax({url:ajaxurl,global:!1,dataType:"json",data:c,success:function(a){theExtraList.get(0).wpList.add(a.rows)}}))},theExtraList=a("#the-extra-comment-list").wpList({alt:"",delColor:"none",addColor:"none"}),theList=a("#the-comment-list").wpList({alt:"",delBefore:j,dimAfter:i,delAfter:m,addColor:"none"}).bind("wpListDelEnd",function(b,c){var d=a(c.target).attr("data-wp-lists"),e=c.element.replace(/[^0-9]+/g,"");(-1!=d.indexOf(":trash=1")||-1!=d.indexOf(":spam=1"))&&a("#undo-"+e).fadeIn(300,function(){a(this).show()})})},commentReply={cid:"",act:"",init:function(){var b=a("#replyrow");a("a.cancel",b).click(function(){return commentReply.revert()}),a("a.save",b).click(function(){return commentReply.send()}),a("input#author-name, input#author-email, input#author-url",b).keypress(function(a){return 13==a.which?(commentReply.send(),a.preventDefault(),!1):void 0}),a("#the-comment-list .column-comment > p").dblclick(function(){commentReply.toggle(a(this).parent())}),a("#doaction, #doaction2, #post-query-submit").click(function(){a("#the-comment-list #replyrow").length>0&&commentReply.close()}),this.comments_listing=a('#comments-form > input[name="comment_status"]').val()||""},addEvents:function(b){b.each(function(){a(this).find(".column-comment > p").dblclick(function(){commentReply.toggle(a(this).parent())})})},toggle:function(b){"none"!==a(b).css("display")&&(a("#replyrow").parent().is("#com-reply")||window.confirm(adminCommentsL10n.warnQuickEdit))&&a(b).find("a.vim-q").click()},revert:function(){return a("#the-comment-list #replyrow").length<1?!1:(a("#replyrow").fadeOut("fast",function(){commentReply.close()}),!1)},close:function(){var b,c=a("#replyrow");c.parent().is("#com-reply")||(this.cid&&"edit-comment"==this.act&&(b=a("#comment-"+this.cid),b.fadeIn(300,function(){b.show()}).css("backgroundColor","")),"undefined"!=typeof QTags&&QTags.closeAllTags("replycontent"),a("#add-new-comment").css("display",""),c.hide(),a("#com-reply").append(c),a("#replycontent").css("height","").val(""),a("#edithead input").val(""),a(".error",c).empty().hide(),a(".spinner",c).removeClass("is-active"),this.cid="")},open:function(b,c,d){var e,f,g,h,i,j=this,k=a("#comment-"+b),l=k.height(),m=0;return j.close(),j.cid=b,e=a("#replyrow"),f=a("#inline-"+b),d=d||"replyto",g="edit"==d?"edit":"replyto",g=j.act=g+"-comment",m=a("> th:visible, > td:visible",k).length,e.hasClass("inline-edit-row")&&0!==m&&a("td",e).attr("colspan",m),a("#action",e).val(g),a("#comment_post_ID",e).val(c),a("#comment_ID",e).val(b),"edit"==d?(a("#author-name",e).val(a("div.author",f).text()),a("#author-email",e).val(a("div.author-email",f).text()),a("#author-url",e).val(a("div.author-url",f).text()),a("#status",e).val(a("div.comment_status",f).text()),a("#replycontent",e).val(a("textarea.comment",f).val()),a("#edithead, #editlegend, #savebtn",e).show(),a("#replyhead, #replybtn, #addhead, #addbtn",e).hide(),l>120&&(i=l>500?500:l,a("#replycontent",e).css("height",i+"px")),k.after(e).fadeOut("fast",function(){a("#replyrow").fadeIn(300,function(){a(this).show()})})):"add"==d?(a("#addhead, #addbtn",e).show(),a("#replyhead, #replybtn, #edithead, #editlegend, #savebtn",e).hide(),a("#the-comment-list").prepend(e),a("#replyrow").fadeIn(300)):(h=a("#replybtn",e),a("#edithead, #editlegend, #savebtn, #addhead, #addbtn",e).hide(),a("#replyhead, #replybtn",e).show(),k.after(e),k.hasClass("unapproved")?h.text(adminCommentsL10n.replyApprove):h.text(adminCommentsL10n.reply),a("#replyrow").fadeIn(300,function(){a(this).show()})),setTimeout(function(){var b,c,d,e,f;b=a("#replyrow").offset().top,c=b+a("#replyrow").height(),d=window.pageYOffset||document.documentElement.scrollTop,e=document.documentElement.clientHeight||window.innerHeight||0,f=d+e,c>f-20?window.scroll(0,c-e+35):d>b-20&&window.scroll(0,b-35),a("#replycontent").focus().keyup(function(a){27==a.which&&commentReply.revert()})},600),!1},send:function(){var b={};return a("#replysubmit .error").hide(),a("#replysubmit .spinner").addClass("is-active"),a("#replyrow input").not(":button").each(function(){var c=a(this);b[c.attr("name")]=c.val()}),b.content=a("#replycontent").val(),b.id=b.comment_post_ID,b.comments_listing=this.comments_listing,b.p=a('[name="p"]').val(),a("#comment-"+a("#comment_ID").val()).hasClass("unapproved")&&(b.approve_parent=1),a.ajax({type:"POST",url:ajaxurl,data:b,success:function(a){commentReply.show(a)},error:function(a){commentReply.error(a)}}),!1},show:function(b){var c,g,i,j,k,m=this;return"string"==typeof b?(m.error({responseText:b}),!1):(c=wpAjax.parseAjaxResponse(b),c.errors?(m.error({responseText:wpAjax.broken}),!1):(m.revert(),c=c.responses[0],i="#comment-"+c.id,"edit-comment"==m.act&&a(i).remove(),c.supplemental.parent_approved&&(k=a("#comment-"+c.supplemental.parent_approved),e(-1,c.supplemental.parent_post_id),"moderated"==this.comments_listing)?void k.animate({backgroundColor:"#CCEEBB"},400,function(){k.fadeOut()}):(c.supplemental.i18n_comments_text&&(l?h(c.supplemental):(f(1,c.supplemental.parent_post_id),d("span.all-count",1))),g=a.trim(c.data),a(g).hide(),a("#replyrow").after(g),i=a(i),m.addEvents(i),j=i.hasClass("unapproved")?"#FFFFE0":i.closest(".widefat, .postbox").css("backgroundColor"),void i.animate({backgroundColor:"#CCEEBB"},300).animate({backgroundColor:j},300,function(){k&&k.length&&k.animate({backgroundColor:"#CCEEBB"},300).animate({backgroundColor:j},300).removeClass("unapproved").addClass("approved").find("div.comment_status").html("1")}))))},error:function(b){var c=b.statusText;a("#replysubmit .spinner").removeClass("is-active"),b.responseText&&(c=b.responseText.replace(/<.[^<>]*?>/g,"")),c&&a("#replysubmit .error").html(c).show()},addcomment:function(b){var c=this;a("#add-new-comment").fadeOut(200,function(){c.open(0,b,"add"),a("table.comments-box").css("display",""),a("#no-comments").remove()})}},a(document).ready(function(){var b,c,d,e;setCommentsList(),commentReply.init(),a(document).on("click","span.delete a.delete",function(a){a.preventDefault()}),"undefined"!=typeof a.table_hotkeys&&(b=function(b){return function(){var c,d;c="next"==b?"first":"last",d=a(".tablenav-pages ."+b+"-page:not(.disabled)"),d.length&&(window.location=d[0].href.replace(/\&hotkeys_highlight_(first|last)=1/g,"")+"&hotkeys_highlight_"+c+"=1")}},c=function(b,c){window.location=a("span.edit a",c).attr("href")},d=function(){a("#cb-select-all-1").data("wp-toggle",1).trigger("click").removeData("wp-toggle")},e=function(b){return function(){var c=a('select[name="action"]');a('option[value="'+b+'"]',c).prop("selected",!0),a("#doaction").click()}},a.table_hotkeys(a("table.widefat"),["a","u","s","d","r","q","z",["e",c],["shift+x",d],["shift+a",e("approve")],["shift+s",e("spam")],["shift+d",e("delete")],["shift+t",e("trash")],["shift+z",e("untrash")],["shift+u",e("unapprove")]],{highlight_first:adminCommentsL10n.hotkeys_highlight_first,highlight_last:adminCommentsL10n.hotkeys_highlight_last,prev_page_link_cb:b("prev"),next_page_link_cb:b("next"),hotkeys_opts:{disableInInput:!0,type:"keypress",noDisable:'.check-column input[type="checkbox"]'},cycle_expr:"#the-comment-list tr",start_row_index:0})),a("#the-comment-list").on("click",".comment-inline",function(b){b.preventDefault();var c=a(this),d="replyto";"undefined"!=typeof c.data("action")&&(d=c.data("action")),commentReply.open(c.data("commentId"),c.data("postId"),d)})})}(jQuery);
\ No newline at end of file
+var setCommentsList,theList,theExtraList,commentReply;!function(a){var b,c,d,e,f,g,h,i,j,k=document.title,l=a("#dashboard_right_now").length;b=function(a){var b=parseInt(a.html().replace(/[^0-9]+/g,""),10);return isNaN(b)?0:b},c=function(a,b){var c="";if(!isNaN(b)){if(b=b<1?"0":b.toString(),b.length>3){for(;b.length>3;)c=thousandsSeparator+b.substr(b.length-3)+c,b=b.substr(0,b.length-3);b+=c}a.html(b)}},f=function(e,f){var g,h,i=".post-com-count-"+f,j="comment-count-no-comments",k="comment-count-approved";d("span.approved-count",e),f&&(g=a("span."+k,i),h=a("span."+j,i),g.each(function(){var d=a(this),f=b(d)+e;f<1&&(f=0),0===f?d.removeClass(k).addClass(j):d.addClass(k).removeClass(j),c(d,f)}),h.each(function(){var b=a(this);e>0?b.removeClass(j).addClass(k):b.addClass(j).removeClass(k),c(b,e)}))},d=function(d,e){a(d).each(function(){var d=a(this),f=b(d)+e;f<1&&(f=0),c(d,f)})},h=function(b){if(l&&b&&b.i18n_comments_text){var c=a("#dashboard_right_now");a(".comment-count a",c).text(b.i18n_comments_text),a(".comment-mod-count a",c).text(b.i18n_moderation_text).parent()[b.in_moderation>0?"removeClass":"addClass"]("hidden")}},g=function(d){var e,f,g,h;j=j||new RegExp(adminCommentsL10n.docTitleCommentsCount.replace("%s","\\([0-9"+thousandsSeparator+"]+\\)")+"?"),i=i||a("<div />"),e=k,h=j.exec(document.title),h?(h=h[0],i.html(h),g=b(i)+d):(i.html(0),g=d),g>=1?(c(i,g),f=j.exec(document.title),f&&(e=document.title.replace(f[0],adminCommentsL10n.docTitleCommentsCount.replace("%s",i.text())+" "))):(f=j.exec(e),f&&(e=e.replace(f[0],adminCommentsL10n.docTitleComments))),document.title=e},e=function(d,e){var f,h,i=".post-com-count-"+e,j="comment-count-no-pending",k="post-com-count-no-pending",m="comment-count-pending";l||g(d),a("span.pending-count").each(function(){var e=a(this),f=b(e)+d;f<1&&(f=0),e.closest(".awaiting-mod")[0===f?"addClass":"removeClass"]("count-0"),c(e,f)}),e&&(f=a("span."+m,i),h=a("span."+j,i),f.each(function(){var e=a(this),f=b(e)+d;f<1&&(f=0),0===f?(e.parent().addClass(k),e.removeClass(m).addClass(j)):(e.parent().removeClass(k),e.addClass(m).removeClass(j)),c(e,f)}),h.each(function(){var b=a(this);d>0?(b.parent().removeClass(k),b.removeClass(j).addClass(m)):(b.parent().addClass(k),b.addClass(j).removeClass(m)),c(b,d)}))},setCommentsList=function(){var b,c,g,i,j,k,m,n,o,p=0;b=a('input[name="_total"]',"#comments-form"),c=a('input[name="_per_page"]',"#comments-form"),g=a('input[name="_page"]',"#comments-form"),k=function(a,c,d){c<p||(d&&(p=c),b.val(a.toString()))},i=function(b,c){var d,g,i,j,k=a("#"+c.element);!0!==c.parsed&&(j=c.parsed.responses[0]),d=a("#replyrow"),g=a("#comment_ID",d).val(),i=a("#replybtn",d),k.is(".unapproved")?(c.data.id==g&&i.text(adminCommentsL10n.replyApprove),k.find(".row-actions span.view").addClass("hidden").end().find("div.comment_status").html("0")):(c.data.id==g&&i.text(adminCommentsL10n.reply),k.find(".row-actions span.view").removeClass("hidden").end().find("div.comment_status").html("1")),o=a("#"+c.element).is("."+c.dimClass)?1:-1,j?(h(j.supplemental),e(o,j.supplemental.postId),f(-1*o,j.supplemental.postId)):(e(o),f(-1*o))},j=function(d,e){var f,h,i,j,k,l,m,n=!1,o=a(d.target).attr("data-wp-lists");return d.data._total=b.val()||0,d.data._per_page=c.val()||0,d.data._page=g.val()||0,d.data._url=document.location.href,d.data.comment_status=a('input[name="comment_status"]',"#comments-form").val(),o.indexOf(":trash=1")!=-1?n="trash":o.indexOf(":spam=1")!=-1&&(n="spam"),n&&(h=o.replace(/.*?comment-([0-9]+).*/,"$1"),i=a("#comment-"+h),f=a("#"+n+"-undo-holder").html(),i.find(".check-column :checkbox").prop("checked",!1),i.siblings("#replyrow").length&&commentReply.cid==h&&commentReply.close(),i.is("tr")?(j=i.children(":visible").length,m=a(".author strong",i).text(),k=a('<tr id="undo-'+h+'" class="undo un'+n+'" style="display:none;"><td colspan="'+j+'">'+f+"</td></tr>")):(m=a(".comment-author",i).text(),k=a('<div id="undo-'+h+'" style="display:none;" class="undo un'+n+'">'+f+"</div>")),i.before(k),a("strong","#undo-"+h).text(m),l=a(".undo a","#undo-"+h),l.attr("href","comment.php?action=un"+n+"comment&c="+h+"&_wpnonce="+d.data._ajax_nonce),l.attr("data-wp-lists","delete:the-comment-list:comment-"+h+"::un"+n+"=1"),l.attr("class","vim-z vim-destructive"),a(".avatar",i).first().clone().prependTo("#undo-"+h+" ."+n+"-undo-inside"),l.click(function(b){b.preventDefault(),b.stopPropagation(),e.wpList.del(this),a("#undo-"+h).css({backgroundColor:"#ceb"}).fadeOut(350,function(){a(this).remove(),a("#comment-"+h).css("backgroundColor","").fadeIn(300,function(){a(this).show()})})})),d},m=function(c,g){var i,j,m,o,q,r,s,t,u=!0===g.parsed?{}:g.parsed.responses[0],v=!0===g.parsed?"":u.supplemental.status,w=!0===g.parsed?"":u.supplemental.postId,x=!0===g.parsed?"":u.supplemental,y=a(g.target).parent(),z=a("#"+g.element),A=z.hasClass("approved"),B=z.hasClass("unapproved"),C=z.hasClass("spam"),D=z.hasClass("trash"),E=!1;h(x),y.is("span.undo")?(y.hasClass("unspam")?(q=-1,"trash"===v?r=1:"1"===v?t=1:"0"===v&&(s=1)):y.hasClass("untrash")&&(r=-1,"spam"===v?q=1:"1"===v?t=1:"0"===v&&(s=1)),E=!0):y.is("span.spam")?(A?t=-1:B?s=-1:D&&(r=-1),q=1):y.is("span.unspam")?(A?s=1:B?t=1:D?y.hasClass("approve")?t=1:y.hasClass("unapprove")&&(s=1):C&&(y.hasClass("approve")?t=1:y.hasClass("unapprove")&&(s=1)),q=-1):y.is("span.trash")?(A?t=-1:B?s=-1:C&&(q=-1),r=1):y.is("span.untrash")?(A?s=1:B?t=1:D&&(y.hasClass("approve")?t=1:y.hasClass("unapprove")&&(s=1)),r=-1):y.is("span.approve:not(.unspam):not(.untrash)")?(t=1,s=-1):y.is("span.unapprove:not(.unspam):not(.untrash)")?(t=-1,s=1):y.is("span.delete")&&(C?q=-1:D&&(r=-1)),s&&(e(s,w),d("span.all-count",s)),t&&(f(t,w),d("span.all-count",t)),q&&d("span.spam-count",q),r&&d("span.trash-count",r),l||(j=b.val()?parseInt(b.val(),10):0,a(g.target).parent().is("span.undo")?j++:j--,j<0&&(j=0),"object"==typeof c?u.supplemental.total_items_i18n&&p<u.supplemental.time?(i=u.supplemental.total_items_i18n||"",i&&(a(".displaying-num").text(i),a(".total-pages").text(u.supplemental.total_pages_i18n),a(".tablenav-pages").find(".next-page, .last-page").toggleClass("disabled",u.supplemental.total_pages==a(".current-page").val())),k(j,u.supplemental.time,!0)):u.supplemental.time&&k(j,u.supplemental.time,!1):k(j,c,!1)),theExtraList&&0!==theExtraList.length&&0!==theExtraList.children().length&&!E&&(theList.get(0).wpList.add(theExtraList.children(":eq(0):not(.no-items)").remove().clone()),n(),m=a(":animated","#the-comment-list"),o=function(){a("#the-comment-list tr:visible").length||theList.get(0).wpList.add(theExtraList.find(".no-items").clone())},m.length?m.promise().done(o):o())},n=function(b){var c=a.query.get(),d=a(".total-pages").text(),e=a('input[name="_per_page"]',"#comments-form").val();c.paged||(c.paged=1),c.paged>d||(b?(theExtraList.empty(),c.number=Math.min(8,e)):(c.number=1,c.offset=Math.min(8,e)-1),c.no_placeholder=!0,c.paged++,!0===c.comment_type&&(c.comment_type=""),c=a.extend(c,{action:"fetch-list",list_args:list_args,_ajax_fetch_list_nonce:a("#_ajax_fetch_list_nonce").val()}),a.ajax({url:ajaxurl,global:!1,dataType:"json",data:c,success:function(a){theExtraList.get(0).wpList.add(a.rows)}}))},theExtraList=a("#the-extra-comment-list").wpList({alt:"",delColor:"none",addColor:"none"}),theList=a("#the-comment-list").wpList({alt:"",delBefore:j,dimAfter:i,delAfter:m,addColor:"none"}).bind("wpListDelEnd",function(b,c){var d=a(c.target).attr("data-wp-lists"),e=c.element.replace(/[^0-9]+/g,"");d.indexOf(":trash=1")==-1&&d.indexOf(":spam=1")==-1||a("#undo-"+e).fadeIn(300,function(){a(this).show()})})},commentReply={cid:"",act:"",originalContent:"",init:function(){var b=a("#replyrow");a("a.cancel",b).click(function(){return commentReply.revert()}),a("a.save",b).click(function(){return commentReply.send()}),a("input#author-name, input#author-email, input#author-url",b).keypress(function(a){if(13==a.which)return commentReply.send(),a.preventDefault(),!1}),a("#the-comment-list .column-comment > p").dblclick(function(){commentReply.toggle(a(this).parent())}),a("#doaction, #doaction2, #post-query-submit").click(function(){a("#the-comment-list #replyrow").length>0&&commentReply.close()}),this.comments_listing=a('#comments-form > input[name="comment_status"]').val()||""},addEvents:function(b){b.each(function(){a(this).find(".column-comment > p").dblclick(function(){commentReply.toggle(a(this).parent())})})},toggle:function(b){"none"!==a(b).css("display")&&(a("#replyrow").parent().is("#com-reply")||window.confirm(adminCommentsL10n.warnQuickEdit))&&a(b).find("a.vim-q").click()},revert:function(){return!(a("#the-comment-list #replyrow").length<1)&&(a("#replyrow").fadeOut("fast",function(){commentReply.close()}),!1)},close:function(){var b,c=a("#replyrow");c.parent().is("#com-reply")||(this.cid&&"edit-comment"==this.act&&(b=a("#comment-"+this.cid),b.fadeIn(300,function(){b.show()}).css("backgroundColor","")),"undefined"!=typeof QTags&&QTags.closeAllTags("replycontent"),a("#add-new-comment").css("display",""),c.hide(),a("#com-reply").append(c),a("#replycontent").css("height","").val(""),a("#edithead input").val(""),a(".error",c).empty().hide(),a(".spinner",c).removeClass("is-active"),this.cid="",this.originalContent="")},open:function(b,c,d){var e,f,g,h,i,j=this,k=a("#comment-"+b),l=k.height(),m=0;return!!this.discardCommentChanges()&&(j.close(),j.cid=b,e=a("#replyrow"),f=a("#inline-"+b),d=d||"replyto",g="edit"==d?"edit":"replyto",g=j.act=g+"-comment",j.originalContent=a("textarea.comment",f).val(),m=a("> th:visible, > td:visible",k).length,e.hasClass("inline-edit-row")&&0!==m&&a("td",e).attr("colspan",m),a("#action",e).val(g),a("#comment_post_ID",e).val(c),a("#comment_ID",e).val(b),"edit"==d?(a("#author-name",e).val(a("div.author",f).text()),a("#author-email",e).val(a("div.author-email",f).text()),a("#author-url",e).val(a("div.author-url",f).text()),a("#status",e).val(a("div.comment_status",f).text()),a("#replycontent",e).val(a("textarea.comment",f).val()),a("#edithead, #editlegend, #savebtn",e).show(),a("#replyhead, #replybtn, #addhead, #addbtn",e).hide(),l>120&&(i=l>500?500:l,a("#replycontent",e).css("height",i+"px")),k.after(e).fadeOut("fast",function(){a("#replyrow").fadeIn(300,function(){a(this).show()})})):"add"==d?(a("#addhead, #addbtn",e).show(),a("#replyhead, #replybtn, #edithead, #editlegend, #savebtn",e).hide(),a("#the-comment-list").prepend(e),a("#replyrow").fadeIn(300)):(h=a("#replybtn",e),a("#edithead, #editlegend, #savebtn, #addhead, #addbtn",e).hide(),a("#replyhead, #replybtn",e).show(),k.after(e),k.hasClass("unapproved")?h.text(adminCommentsL10n.replyApprove):h.text(adminCommentsL10n.reply),a("#replyrow").fadeIn(300,function(){a(this).show()})),setTimeout(function(){var b,c,d,e,f;b=a("#replyrow").offset().top,c=b+a("#replyrow").height(),d=window.pageYOffset||document.documentElement.scrollTop,e=document.documentElement.clientHeight||window.innerHeight||0,f=d+e,f-20<c?window.scroll(0,c-e+35):b-20<d&&window.scroll(0,b-35),a("#replycontent").focus().keyup(function(a){27==a.which&&commentReply.revert()})},600),!1)},send:function(){var b={};return a("#replysubmit .error").hide(),a("#replysubmit .spinner").addClass("is-active"),a("#replyrow input").not(":button").each(function(){var c=a(this);b[c.attr("name")]=c.val()}),b.content=a("#replycontent").val(),b.id=b.comment_post_ID,b.comments_listing=this.comments_listing,b.p=a('[name="p"]').val(),a("#comment-"+a("#comment_ID").val()).hasClass("unapproved")&&(b.approve_parent=1),a.ajax({type:"POST",url:ajaxurl,data:b,success:function(a){commentReply.show(a)},error:function(a){commentReply.error(a)}}),!1},show:function(b){var c,g,i,j,k,m=this;return"string"==typeof b?(m.error({responseText:b}),!1):(c=wpAjax.parseAjaxResponse(b),c.errors?(m.error({responseText:wpAjax.broken}),!1):(m.revert(),c=c.responses[0],i="#comment-"+c.id,"edit-comment"==m.act&&a(i).remove(),c.supplemental.parent_approved&&(k=a("#comment-"+c.supplemental.parent_approved),e(-1,c.supplemental.parent_post_id),"moderated"==this.comments_listing)?void k.animate({backgroundColor:"#CCEEBB"},400,function(){k.fadeOut()}):(c.supplemental.i18n_comments_text&&(l?h(c.supplemental):(f(1,c.supplemental.parent_post_id),d("span.all-count",1))),g=a.trim(c.data),a(g).hide(),a("#replyrow").after(g),i=a(i),m.addEvents(i),j=i.hasClass("unapproved")?"#FFFFE0":i.closest(".widefat, .postbox").css("backgroundColor"),void i.animate({backgroundColor:"#CCEEBB"},300).animate({backgroundColor:j},300,function(){k&&k.length&&k.animate({backgroundColor:"#CCEEBB"},300).animate({backgroundColor:j},300).removeClass("unapproved").addClass("approved").find("div.comment_status").html("1")}))))},error:function(b){var c=b.statusText;a("#replysubmit .spinner").removeClass("is-active"),b.responseText&&(c=b.responseText.replace(/<.[^<>]*?>/g,"")),c&&a("#replysubmit .error").html(c).show()},addcomment:function(b){var c=this;a("#add-new-comment").fadeOut(200,function(){c.open(0,b,"add"),a("table.comments-box").css("display",""),a("#no-comments").remove()})},discardCommentChanges:function(){var b=a("#replyrow");return this.originalContent===a("#replycontent",b).val()||window.confirm(adminCommentsL10n.warnCommentChanges)}},a(document).ready(function(){var b,c,d,e;setCommentsList(),commentReply.init(),a(document).on("click","span.delete a.delete",function(a){a.preventDefault()}),"undefined"!=typeof a.table_hotkeys&&(b=function(b){return function(){var c,d;c="next"==b?"first":"last",d=a(".tablenav-pages ."+b+"-page:not(.disabled)"),d.length&&(window.location=d[0].href.replace(/\&hotkeys_highlight_(first|last)=1/g,"")+"&hotkeys_highlight_"+c+"=1")}},c=function(b,c){window.location=a("span.edit a",c).attr("href")},d=function(){a("#cb-select-all-1").data("wp-toggle",1).trigger("click").removeData("wp-toggle")},e=function(b){return function(){var c=a('select[name="action"]');a('option[value="'+b+'"]',c).prop("selected",!0),a("#doaction").click()}},a.table_hotkeys(a("table.widefat"),["a","u","s","d","r","q","z",["e",c],["shift+x",d],["shift+a",e("approve")],["shift+s",e("spam")],["shift+d",e("delete")],["shift+t",e("trash")],["shift+z",e("untrash")],["shift+u",e("unapprove")]],{highlight_first:adminCommentsL10n.hotkeys_highlight_first,highlight_last:adminCommentsL10n.hotkeys_highlight_last,prev_page_link_cb:b("prev"),next_page_link_cb:b("next"),hotkeys_opts:{disableInInput:!0,type:"keypress",noDisable:'.check-column input[type="checkbox"]'},cycle_expr:"#the-comment-list tr",start_row_index:0})),a("#the-comment-list").on("click",".comment-inline",function(b){b.preventDefault();var c=a(this),d="replyto";"undefined"!=typeof c.data("action")&&(d=c.data("action")),commentReply.open(c.data("commentId"),c.data("postId"),d)})})}(jQuery);
\ No newline at end of file
index ba5b095203aefa014c8bdc67fcba40f309947e71..bf67c64e04f7c4c88360cacc0b5e9e139a3c2ffd 100644 (file)
@@ -15,7 +15,8 @@
                        $visualEditor = $(),
                        $textTop = $( '#ed_toolbar' ),
                        $textEditor = $( '#content' ),
-                       $textEditorClone = $( '<div id="content-textarea-clone" class="wp-exclude-emoji"></div>' ),
+                       textEditor = $textEditor[0],
+                       oldTextLength = 0,
                        $bottom = $( '#post-status-info' ),
                        $menuBar = $(),
                        $statusBar = $(),
                                sideSortablesHeight: 0
                        };
 
-               $textEditorClone.insertAfter( $textEditor );
-
-               $textEditorClone.css( {
-                       'font-family': $textEditor.css( 'font-family' ),
-                       'font-size': $textEditor.css( 'font-size' ),
-                       'line-height': $textEditor.css( 'line-height' ),
-                       'white-space': 'pre-wrap',
-                       'word-wrap': 'break-word'
-               } );
-
                function getHeights() {
                        var windowWidth = $window.width();
 
                        }
                }
 
-               function textEditorKeyup( event ) {
-                       var VK = jQuery.ui.keyCode,
-                               key = event.keyCode,
-                               range = document.createRange(),
-                               selStart = $textEditor[0].selectionStart,
-                               selEnd = $textEditor[0].selectionEnd,
-                               textNode = $textEditorClone[0].firstChild,
-                               buffer = 10,
-                               offset, cursorTop, cursorBottom, editorTop, editorBottom;
-
-                       if ( selStart && selEnd && selStart !== selEnd ) {
-                               return;
-                       }
-
-                       // These are not TinyMCE ranges.
-                       try {
-                               range.setStart( textNode, selStart );
-                               range.setEnd( textNode, selEnd + 1 );
-                       } catch ( ex ) {}
-
-                       offset = range.getBoundingClientRect();
-
-                       if ( ! offset.height ) {
+               function textEditorResize() {
+                       if ( mceEditor && ! mceEditor.isHidden() ) {
                                return;
                        }
 
-                       cursorTop = offset.top - buffer;
-                       cursorBottom = cursorTop + offset.height + buffer;
-                       editorTop = heights.adminBarHeight + heights.toolsHeight + heights.textTopHeight;
-                       editorBottom = heights.windowHeight - heights.bottomHeight;
-
-                       if ( cursorTop < editorTop && ( key === VK.UP || key === VK.LEFT || key === VK.BACKSPACE ) ) {
-                               window.scrollTo( window.pageXOffset, cursorTop + window.pageYOffset - editorTop );
-                       } else if ( cursorBottom > editorBottom ) {
-                               window.scrollTo( window.pageXOffset, cursorBottom + window.pageYOffset - editorBottom );
-                       }
-               }
-
-               function textEditorResize() {
-                       if ( ( mceEditor && ! mceEditor.isHidden() ) || ( ! mceEditor && initialMode === 'tinymce' ) ) {
+                       if ( ! mceEditor && initialMode === 'tinymce' ) {
                                return;
                        }
 
-                       var textEditorHeight = $textEditor.height(),
-                               hiddenHeight;
+                       var length = textEditor.value.length;
+                       var height = parseInt( textEditor.style.height, 10 );
+                       var top = window.scrollTop;
 
-                       $textEditorClone.width( $textEditor.width() - 22 );
-                       $textEditorClone.text( $textEditor.val() + '&nbsp;' );
+                       if ( length < oldTextLength ) {
+                               // textEditor.scrollHeight is not adjusted until the next line.
+                               textEditor.style.height = 'auto';
 
-                       hiddenHeight = $textEditorClone.height();
+                               if ( textEditor.scrollHeight > autoresizeMinHeight ) {
+                                       textEditor.style.height = textEditor.scrollHeight + 'px';
+                               } else {
+                                       textEditor.style.height = autoresizeMinHeight + 'px';
+                               }
 
-                       if ( hiddenHeight < autoresizeMinHeight ) {
-                               hiddenHeight = autoresizeMinHeight;
-                       }
+                               // Prevent scroll-jumping in Firefox and IE.
+                               window.scrollTop = top;
 
-                       if ( hiddenHeight === textEditorHeight ) {
-                               return;
+                               if ( textEditor.scrollHeight < height ) {
+                                       adjust();
+                               }
+                       } else if ( height < textEditor.scrollHeight ) {
+                               textEditor.style.height = textEditor.scrollHeight + 'px';
+                               adjust();
                        }
 
-                       $textEditor.height( hiddenHeight );
-
-                       adjust();
+                       oldTextLength = length;
                }
 
                // We need to wait for TinyMCE to initialize.
 
                                        if ( event && event.deltaHeight > 0 && event.deltaHeight < 100 ) {
                                                window.scrollBy( 0, event.deltaHeight );
-                                       } else if ( advanced ) {
+                                       } else if ( visual && advanced ) {
                                                fixedBottom = true;
 
                                                $statusBar.css( {
                                        $textEditor.css( {
                                                marginTop: heights.textTopHeight
                                        } );
-
-                                       $textEditorClone.width( contentWrapWidth - 20 - ( borderWidth * 2 ) );
                                }
                        }
                }
 
                        // Adjust when collapsing the menu, changing the columns, changing the body class.
                        $document.on( 'wp-collapse-menu.editor-expand postboxes-columnchange.editor-expand editor-classchange.editor-expand', adjust )
-                               .on( 'postbox-toggled.editor-expand', function() {
+                               .on( 'postbox-toggled.editor-expand postbox-moved.editor-expand', function() {
                                        if ( ! fixedSideTop && ! fixedSideBottom && window.pageYOffset > pinnedToolsTop ) {
                                                fixedSideBottom = true;
                                                window.scrollBy( 0, -1 );
                                });
 
                        $textEditor.on( 'focus.editor-expand input.editor-expand propertychange.editor-expand', textEditorResize );
-                       $textEditor.on( 'keyup.editor-expand', textEditorKeyup );
                        mceBind();
 
                        // Adjust when entering/exiting fullscreen mode.
index b3805dc96018443441fc31e029265a149408df87..513c4a1ef331fb8306ade55120ba635b4e1f51d3 100644 (file)
@@ -1 +1 @@
-!function(a,b,c){"use strict";var d=b(a),e=b(document),f=b("#wpadminbar"),g=b("#wpfooter");b(function(){function c(){var a=d.width();T={windowHeight:d.height(),windowWidth:a,adminBarHeight:a>600?f.outerHeight():0,toolsHeight:t.outerHeight()||0,menuBarHeight:A.outerHeight()||0,visualTopHeight:u.outerHeight()||0,textTopHeight:w.outerHeight()||0,bottomHeight:z.outerHeight()||0,statusBarHeight:B.outerHeight()||0,sideSortablesHeight:C.height()||0},T.menuBarHeight<3&&(T.menuBarHeight=0)}function h(b){var c,d,e,f,g,h=jQuery.ui.keyCode,i=b.keyCode,j=document.createRange(),k=x[0].selectionStart,l=x[0].selectionEnd,m=y[0].firstChild,n=10;if(!k||!l||k===l){try{j.setStart(m,k),j.setEnd(m,l+1)}catch(o){}c=j.getBoundingClientRect(),c.height&&(d=c.top-n,e=d+c.height+n,f=T.adminBarHeight+T.toolsHeight+T.textTopHeight,g=T.windowHeight-T.bottomHeight,f>d&&(i===h.UP||i===h.LEFT||i===h.BACKSPACE)?a.scrollTo(a.pageXOffset,d+a.pageYOffset-f):e>g&&a.scrollTo(a.pageXOffset,e+a.pageYOffset-g))}}function i(){if(!(p&&!p.isHidden()||!p&&"tinymce"===R)){var a,b=x.height();y.width(x.width()-22),y.text(x.val()+"&nbsp;"),a=y.height(),Q>a&&(a=Q),a!==b&&(x.height(a),j())}}function j(b){if(!F||!F.settings.visible){var f,h,j,k,l,m,n,o,q,r=d.scrollTop(),G=b&&b.type,H="scroll"!==G,N=p&&!p.isHidden(),R=Q,U=E.offset().top,V=1,W=s.width();(H||!T.windowHeight)&&c(),N||"resize"!==G||i(),N?(f=u,h=v,n=T.visualTopHeight):(f=w,h=x,n=T.textTopHeight),(N||f.length)&&(m=f.parent().offset().top,o=h.offset().top,q=h.outerHeight(),l=N?Q+n:Q+20,l=q>l+5,l?((!I||H)&&r>=m-T.toolsHeight-T.adminBarHeight&&r<=m-T.toolsHeight-T.adminBarHeight+q-R?(I=!0,t.css({position:"fixed",top:T.adminBarHeight,width:W}),N&&A.length&&A.css({position:"fixed",top:T.adminBarHeight+T.toolsHeight,width:W-2*V-(N?0:f.outerWidth()-f.width())}),f.css({position:"fixed",top:T.adminBarHeight+T.toolsHeight+T.menuBarHeight,width:W-2*V-(N?0:f.outerWidth()-f.width())})):(I||H)&&(r<=m-T.toolsHeight-T.adminBarHeight?(I=!1,t.css({position:"absolute",top:0,width:W}),N&&A.length&&A.css({position:"absolute",top:0,width:W-2*V}),f.css({position:"absolute",top:T.menuBarHeight,width:W-2*V-(N?0:f.outerWidth()-f.width())})):r>=m-T.toolsHeight-T.adminBarHeight+q-R&&(I=!1,t.css({position:"absolute",top:q-R,width:W}),N&&A.length&&A.css({position:"absolute",top:q-R,width:W-2*V}),f.css({position:"absolute",top:q-R+T.menuBarHeight,width:W-2*V-(N?0:f.outerWidth()-f.width())}))),(!J||H&&S)&&r+T.windowHeight<=o+q+T.bottomHeight+T.statusBarHeight+V?b&&b.deltaHeight>0&&b.deltaHeight<100?a.scrollBy(0,b.deltaHeight):S&&(J=!0,B.css({position:"fixed",bottom:T.bottomHeight,visibility:"",width:W-2*V}),z.css({position:"fixed",bottom:0,width:W})):(!S&&J||(J||H)&&r+T.windowHeight>o+q+T.bottomHeight+T.statusBarHeight-V)&&(J=!1,B.attr("style",S?"":"visibility: hidden;"),z.attr("style",""))):H&&(t.css({position:"absolute",top:0,width:W}),N&&A.length&&A.css({position:"absolute",top:0,width:W-2*V}),f.css({position:"absolute",top:T.menuBarHeight,width:W-2*V-(N?0:f.outerWidth()-f.width())}),B.attr("style",S?"":"visibility: hidden;"),z.attr("style","")),D.width()<300&&T.windowWidth>600&&e.height()>C.height()+U+120&&T.windowHeight<q?(T.sideSortablesHeight+O+P>T.windowHeight||K||L?U>=r+O?(C.attr("style",""),K=L=!1):r>M?K?(K=!1,j=C.offset().top-T.adminBarHeight,k=g.offset().top,k<j+T.sideSortablesHeight+P&&(j=k-T.sideSortablesHeight-12),C.css({position:"absolute",top:j,bottom:""})):!L&&T.sideSortablesHeight+C.offset().top+P<r+T.windowHeight&&(L=!0,C.css({position:"fixed",top:"auto",bottom:P})):M>r&&(L?(L=!1,j=C.offset().top-P,k=g.offset().top,k<j+T.sideSortablesHeight+P&&(j=k-T.sideSortablesHeight-12),C.css({position:"absolute",top:j,bottom:""})):!K&&C.offset().top>=r+O&&(K=!0,C.css({position:"fixed",top:O,bottom:""}))):(r>=U-O?C.css({position:"fixed",top:O}):C.attr("style",""),K=L=!1),M=r):(C.attr("style",""),K=L=!1),H&&(s.css({paddingTop:T.toolsHeight}),N?v.css({paddingTop:T.visualTopHeight+T.menuBarHeight}):(x.css({marginTop:T.textTopHeight}),y.width(W-20-2*V))))}}function k(){i(),j()}function l(a){for(var b=1;6>b;b++)setTimeout(a,500*b)}function m(){clearTimeout(q),q=setTimeout(j,100)}function n(){a.pageYOffset&&a.pageYOffset>N&&a.scrollTo(a.pageXOffset,0),r.addClass("wp-editor-expand"),d.on("scroll.editor-expand resize.editor-expand",function(a){j(a.type),m()}),e.on("wp-collapse-menu.editor-expand postboxes-columnchange.editor-expand editor-classchange.editor-expand",j).on("postbox-toggled.editor-expand",function(){!K&&!L&&a.pageYOffset>O&&(L=!0,a.scrollBy(0,-1),j(),a.scrollBy(0,1)),j()}).on("wp-window-resized.editor-expand",function(){p&&!p.isHidden()?p.execCommand("wpAutoResize"):i()}),x.on("focus.editor-expand input.editor-expand propertychange.editor-expand",i),x.on("keyup.editor-expand",h),G(),F&&F.pubsub.subscribe("hidden",k),p&&(p.settings.wp_autoresize_on=!0,p.execCommand("wpAutoResizeOn"),p.isHidden()||p.execCommand("wpAutoResize")),(!p||p.isHidden())&&i(),j(),e.trigger("editor-expand-on")}function o(){var c=parseInt(a.getUserSetting("ed_size",300),10);50>c?c=50:c>5e3&&(c=5e3),a.pageYOffset&&a.pageYOffset>N&&a.scrollTo(a.pageXOffset,0),r.removeClass("wp-editor-expand"),d.off(".editor-expand"),e.off(".editor-expand"),x.off(".editor-expand"),H(),F&&F.pubsub.unsubscribe("hidden",k),b.each([u,w,t,A,z,B,s,v,x,C],function(a,b){b&&b.attr("style","")}),I=J=K=L=!1,p&&(p.settings.wp_autoresize_on=!1,p.execCommand("wpAutoResizeOff"),p.isHidden()||(x.hide(),c&&p.theme.resizeTo(null,c))),c&&x.height(c),e.trigger("editor-expand-off")}var p,q,r=b("#postdivrich"),s=b("#wp-content-wrap"),t=b("#wp-content-editor-tools"),u=b(),v=b(),w=b("#ed_toolbar"),x=b("#content"),y=b('<div id="content-textarea-clone" class="wp-exclude-emoji"></div>'),z=b("#post-status-info"),A=b(),B=b(),C=b("#side-sortables"),D=b("#postbox-container-1"),E=b("#post-body"),F=a.wp.editor&&a.wp.editor.fullscreen,G=function(){},H=function(){},I=!1,J=!1,K=!1,L=!1,M=0,N=130,O=56,P=20,Q=300,R=s.hasClass("tmce-active")?"tinymce":"html",S=!!parseInt(a.getUserSetting("hidetb"),10),T={windowHeight:0,windowWidth:0,adminBarHeight:0,toolsHeight:0,menuBarHeight:0,visualTopHeight:0,textTopHeight:0,bottomHeight:0,statusBarHeight:0,sideSortablesHeight:0};y.insertAfter(x),y.css({"font-family":x.css("font-family"),"font-size":x.css("font-size"),"line-height":x.css("line-height"),"white-space":"pre-wrap","word-wrap":"break-word"}),e.on("tinymce-editor-init.editor-expand",function(c,e){function f(){var a,b,c,d=e.selection.getNode();if(e.wp&&e.wp.getView&&(b=e.wp.getView(d)))c=b.getBoundingClientRect();else{a=e.selection.getRng();try{c=a.getClientRects()[0]}catch(f){}c||(c=d.getBoundingClientRect())}return c.height?c:!1}function g(a){var b=a.keyCode;47>=b&&b!==q.SPACEBAR&&b!==q.ENTER&&b!==q.DELETE&&b!==q.BACKSPACE&&b!==q.UP&&b!==q.LEFT&&b!==q.DOWN&&b!==q.UP||b>=91&&93>=b||b>=112&&123>=b||144===b||145===b||h(b)}function h(b){var c,d,g,h,i=f(),j=50;i&&(c=i.top+e.iframeElement.getBoundingClientRect().top,d=c+i.height,c-=j,d+=j,g=T.adminBarHeight+T.toolsHeight+T.menuBarHeight+T.visualTopHeight,h=T.windowHeight-(S?T.bottomHeight+T.statusBarHeight:0),h-g<i.height||(g>c&&(b===q.UP||b===q.LEFT||b===q.BACKSPACE)?a.scrollTo(a.pageXOffset,c+a.pageYOffset-g):d>h&&a.scrollTo(a.pageXOffset,d+a.pageYOffset-h)))}function k(a){a.state||j()}function m(){d.on("scroll.mce-float-panels",t),setTimeout(function(){e.execCommand("wpAutoResize"),j()},300)}function n(){d.off("scroll.mce-float-panels"),setTimeout(function(){var b=s.offset().top;a.pageYOffset>b&&a.scrollTo(a.pageXOffset,b-T.adminBarHeight),i(),j()},100),j()}function o(){S=!S}var q=a.tinymce.util.VK,t=_.debounce(function(){!b(".mce-floatpanel:hover").length&&a.tinymce.ui.FloatPanel.hideAll(),b(".mce-tooltip").hide()},1e3,!0);"content"===e.id&&(p=e,e.settings.autoresize_min_height=Q,u=s.find(".mce-toolbar-grp"),v=s.find(".mce-edit-area"),B=s.find(".mce-statusbar"),A=s.find(".mce-menubar"),G=function(){e.on("keyup",g),e.on("show",m),e.on("hide",n),e.on("wp-toolbar-toggle",o),e.on("setcontent wp-autoresize wp-toolbar-toggle",j),e.on("undo redo",h),e.on("FullscreenStateChanged",k),d.off("scroll.mce-float-panels").on("scroll.mce-float-panels",t)},H=function(){e.off("keyup",g),e.off("show",m),e.off("hide",n),e.off("wp-toolbar-toggle",o),e.off("setcontent wp-autoresize wp-toolbar-toggle",j),e.off("undo redo",h),e.off("FullscreenStateChanged",k),d.off("scroll.mce-float-panels")},r.hasClass("wp-editor-expand")&&(G(),l(j)))}),r.hasClass("wp-editor-expand")&&(n(),s.hasClass("html-active")&&l(function(){j(),i()})),b("#adv-settings .editor-expand").show(),b("#editor-expand-toggle").on("change.editor-expand",function(){b(this).prop("checked")?(n(),a.setUserSetting("editor_expand","on")):(o(),a.setUserSetting("editor_expand","off"))}),a.editorExpand={on:n,off:o}}),b(function(){function c(){z=J.offset(),z.right=z.left+J.outerWidth(),z.bottom=z.top+J.outerHeight()}function h(){S||(S=!0,e.trigger("dfw-activate"),L.on("keydown.focus-shortcut",v))}function i(){S&&(l(),S=!1,e.trigger("dfw-deactivate"),L.off("keydown.focus-shortcut"))}function j(){return S}function k(){!T&&S&&(T=!0,L.on("keydown.focus",o),K.add(L).on("blur.focus",q),o(),a.setUserSetting("post_dfw","on"),e.trigger("dfw-on"))}function l(){T&&(T=!1,K.add(L).off(".focus"),p(),J.off(".focus"),a.setUserSetting("post_dfw","off"),e.trigger("dfw-off"))}function m(){T?l():k()}function n(){return T}function o(b){var e,f=b&&b.keyCode;return a.navigator.platform&&(e=a.navigator.platform.indexOf("Mac")>-1),27===f||87===f&&b.altKey&&(!e&&b.shiftKey||e&&b.ctrlKey)?void p(b):void(b&&(b.metaKey||b.ctrlKey&&!b.altKey||b.altKey&&b.shiftKey||f&&(47>=f&&8!==f&&13!==f&&32!==f&&46!==f||f>=91&&93>=f||f>=112&&135>=f||f>=144&&150>=f||f>=224))||(w||(w=!0,clearTimeout(F),F=setTimeout(function(){M.show()},600),J.css("z-index",9998),M.on("mouseenter.focus",function(){c(),d.on("scroll.focus",function(){var b=a.pageYOffset;D&&C&&D!==b&&(C<z.top-W||C>z.bottom+W)&&p(),D=b})}).on("mouseleave.focus",function(){A=B=null,U=V=0,d.off("scroll.focus")}).on("mousemove.focus",function(b){var c=b.clientX,d=b.clientY,e=a.pageYOffset,f=a.pageXOffset;if(A&&B&&(c!==A||d!==B))if(B>=d&&d<z.top-e||d>=B&&d>z.bottom-e||A>=c&&c<z.left-f||c>=A&&c>z.right-f){if(U+=Math.abs(A-c),V+=Math.abs(B-d),(d<=z.top-W-e||d>=z.bottom+W-e||c<=z.left-W-f||c>=z.right+W-f)&&(U>10||V>10))return p(),A=B=null,void(U=V=0)}else U=V=0;A=c,B=d}).on("touchstart.focus",function(a){a.preventDefault(),p()}),J.off("mouseenter.focus"),E&&(clearTimeout(E),E=null),H.addClass("focus-on").removeClass("focus-off")),r(),t()))}function p(a){w&&(w=!1,clearTimeout(F),F=setTimeout(function(){M.hide()},200),J.css("z-index",""),M.off("mouseenter.focus mouseleave.focus mousemove.focus touchstart.focus"),"undefined"==typeof a&&J.on("mouseenter.focus",function(){(b.contains(J.get(0),document.activeElement)||G)&&o()}),E=setTimeout(function(){E=null,J.off("mouseenter.focus")},1e3),H.addClass("focus-off").removeClass("focus-on")),s(),u()}function q(){setTimeout(function(){function a(a){return b.contains(a.get(0),document.activeElement)}var c=document.activeElement.compareDocumentPosition(J.get(0));2!==c&&4!==c||!(a(P)||a(I)||a(g))||p()},0)}function r(){!x&&w&&(x=!0,f.on("mouseenter.focus",function(){f.addClass("focus-off")}).on("mouseleave.focus",function(){f.removeClass("focus-off")}))}function s(){x&&(x=!1,f.off(".focus"))}function t(){y||!w||N.find(":focus").length||(y=!0,N.stop().fadeTo("fast",.3).on("mouseenter.focus",u).off("mouseleave.focus"),O.on("focus.focus",u).off("blur.focus"))}function u(){y&&(y=!1,N.stop().fadeTo("fast",1).on("mouseleave.focus",t).off("mouseenter.focus"),O.on("blur.focus",t).off("focus.focus"))}function v(a){a.altKey&&a.shiftKey&&87===a.keyCode&&m()}var w,x,y,z,A,B,C,D,E,F,G,H=b(document.body),I=b("#wpcontent"),J=b("#post-body-content"),K=b("#title"),L=b("#content"),M=b(document.createElement("DIV")),N=b("#edit-slug-box"),O=N.find("a").add(N.find("button")).add(N.find("input")),P=b("#adminmenuwrap"),Q=b(),R=b(),S="on"===a.getUserSetting("editor_expand","on"),T=S?"on"===a.getUserSetting("post_dfw"):!1,U=0,V=0,W=20;H.append(M),M.css({display:"none",position:"fixed",top:f.height(),right:0,bottom:0,left:0,"z-index":9997}),J.css({position:"relative"}),d.on("mousemove.focus",function(a){C=a.pageY}),b("#postdivrich").hasClass("wp-editor-expand")&&L.on("keydown.focus-shortcut",v),e.on("tinymce-editor-setup.focus",function(a,b){b.addButton("dfw",{active:T,classes:"wp-dfw btn widget",disabled:!S,onclick:m,onPostRender:function(){var a=this;e.on("dfw-activate.focus",function(){a.disabled(!1)}).on("dfw-deactivate.focus",function(){a.disabled(!0)}).on("dfw-on.focus",function(){a.active(!0)}).on("dfw-off.focus",function(){a.active(!1)})},tooltip:"Distraction-free writing mode",shortcut:"Alt+Shift+W"}),b.addCommand("wpToggleDFW",m),b.addShortcut("access+w","","wpToggleDFW")}),e.on("tinymce-editor-init.focus",function(a,d){function f(){G=!0}function g(){G=!1}var h,i;"content"===d.id&&(Q=b(d.getWin()),R=b(d.getContentAreaContainer()).find("iframe"),h=function(){d.on("keydown",o),d.on("blur",q),d.on("focus",f),d.on("blur",g),d.on("wp-autoresize",c)},i=function(){d.off("keydown",o),d.off("blur",q),d.off("focus",f),d.off("blur",g),d.off("wp-autoresize",c)},T&&h(),e.on("dfw-on.focus",h).on("dfw-off.focus",i),d.on("click",function(a){a.target===d.getDoc().documentElement&&d.focus()}))}),e.on("quicktags-init",function(a,c){var d;c.settings.buttons&&-1!==(","+c.settings.buttons+",").indexOf(",dfw,")&&(d=b("#"+c.name+"_dfw"),b(document).on("dfw-activate",function(){d.prop("disabled",!1)}).on("dfw-deactivate",function(){d.prop("disabled",!0)}).on("dfw-on",function(){d.addClass("active")}).on("dfw-off",function(){d.removeClass("active")}))}),e.on("editor-expand-on.focus",h).on("editor-expand-off.focus",i),T&&(L.on("keydown.focus",o),K.add(L).on("blur.focus",q)),a.wp=a.wp||{},a.wp.editor=a.wp.editor||{},a.wp.editor.dfw={activate:h,deactivate:i,isActive:j,on:k,off:l,toggle:m,isOn:n}})}(window,window.jQuery);
\ No newline at end of file
+!function(a,b,c){"use strict";var d=b(a),e=b(document),f=b("#wpadminbar"),g=b("#wpfooter");b(function(){function c(){var a=d.width();T={windowHeight:d.height(),windowWidth:a,adminBarHeight:a>600?f.outerHeight():0,toolsHeight:s.outerHeight()||0,menuBarHeight:A.outerHeight()||0,visualTopHeight:t.outerHeight()||0,textTopHeight:v.outerHeight()||0,bottomHeight:z.outerHeight()||0,statusBarHeight:B.outerHeight()||0,sideSortablesHeight:C.height()||0},T.menuBarHeight<3&&(T.menuBarHeight=0)}function h(){if((!o||o.isHidden())&&(o||"tinymce"!==R)){var b=x.value.length,c=parseInt(x.style.height,10),d=a.scrollTop;b<y?(x.style.height="auto",x.scrollHeight>Q?x.style.height=x.scrollHeight+"px":x.style.height=Q+"px",a.scrollTop=d,x.scrollHeight<c&&i()):c<x.scrollHeight&&(x.style.height=x.scrollHeight+"px",i()),y=b}}function i(b){if(!F||!F.settings.visible){var f,i,j,k,l,m,n,p,q,x=d.scrollTop(),y=b&&b.type,G="scroll"!==y,H=o&&!o.isHidden(),N=Q,R=E.offset().top,U=1,V=r.width();!G&&T.windowHeight||c(),H||"resize"!==y||h(),H?(f=t,i=u,n=T.visualTopHeight):(f=v,i=w,n=T.textTopHeight),(H||f.length)&&(m=f.parent().offset().top,p=i.offset().top,q=i.outerHeight(),l=H?Q+n:Q+20,l=q>l+5,l?((!I||G)&&x>=m-T.toolsHeight-T.adminBarHeight&&x<=m-T.toolsHeight-T.adminBarHeight+q-N?(I=!0,s.css({position:"fixed",top:T.adminBarHeight,width:V}),H&&A.length&&A.css({position:"fixed",top:T.adminBarHeight+T.toolsHeight,width:V-2*U-(H?0:f.outerWidth()-f.width())}),f.css({position:"fixed",top:T.adminBarHeight+T.toolsHeight+T.menuBarHeight,width:V-2*U-(H?0:f.outerWidth()-f.width())})):(I||G)&&(x<=m-T.toolsHeight-T.adminBarHeight?(I=!1,s.css({position:"absolute",top:0,width:V}),H&&A.length&&A.css({position:"absolute",top:0,width:V-2*U}),f.css({position:"absolute",top:T.menuBarHeight,width:V-2*U-(H?0:f.outerWidth()-f.width())})):x>=m-T.toolsHeight-T.adminBarHeight+q-N&&(I=!1,s.css({position:"absolute",top:q-N,width:V}),H&&A.length&&A.css({position:"absolute",top:q-N,width:V-2*U}),f.css({position:"absolute",top:q-N+T.menuBarHeight,width:V-2*U-(H?0:f.outerWidth()-f.width())}))),(!J||G&&S)&&x+T.windowHeight<=p+q+T.bottomHeight+T.statusBarHeight+U?b&&b.deltaHeight>0&&b.deltaHeight<100?a.scrollBy(0,b.deltaHeight):H&&S&&(J=!0,B.css({position:"fixed",bottom:T.bottomHeight,visibility:"",width:V-2*U}),z.css({position:"fixed",bottom:0,width:V})):(!S&&J||(J||G)&&x+T.windowHeight>p+q+T.bottomHeight+T.statusBarHeight-U)&&(J=!1,B.attr("style",S?"":"visibility: hidden;"),z.attr("style",""))):G&&(s.css({position:"absolute",top:0,width:V}),H&&A.length&&A.css({position:"absolute",top:0,width:V-2*U}),f.css({position:"absolute",top:T.menuBarHeight,width:V-2*U-(H?0:f.outerWidth()-f.width())}),B.attr("style",S?"":"visibility: hidden;"),z.attr("style","")),D.width()<300&&T.windowWidth>600&&e.height()>C.height()+R+120&&T.windowHeight<q?(T.sideSortablesHeight+O+P>T.windowHeight||K||L?x+O<=R?(C.attr("style",""),K=L=!1):x>M?K?(K=!1,j=C.offset().top-T.adminBarHeight,k=g.offset().top,k<j+T.sideSortablesHeight+P&&(j=k-T.sideSortablesHeight-12),C.css({position:"absolute",top:j,bottom:""})):!L&&T.sideSortablesHeight+C.offset().top+P<x+T.windowHeight&&(L=!0,C.css({position:"fixed",top:"auto",bottom:P})):x<M&&(L?(L=!1,j=C.offset().top-P,k=g.offset().top,k<j+T.sideSortablesHeight+P&&(j=k-T.sideSortablesHeight-12),C.css({position:"absolute",top:j,bottom:""})):!K&&C.offset().top>=x+O&&(K=!0,C.css({position:"fixed",top:O,bottom:""}))):(x>=R-O?C.css({position:"fixed",top:O}):C.attr("style",""),K=L=!1),M=x):(C.attr("style",""),K=L=!1),G&&(r.css({paddingTop:T.toolsHeight}),H?u.css({paddingTop:T.visualTopHeight+T.menuBarHeight}):w.css({marginTop:T.textTopHeight})))}}function j(){h(),i()}function k(a){for(var b=1;b<6;b++)setTimeout(a,500*b)}function l(){clearTimeout(p),p=setTimeout(i,100)}function m(){a.pageYOffset&&a.pageYOffset>N&&a.scrollTo(a.pageXOffset,0),q.addClass("wp-editor-expand"),d.on("scroll.editor-expand resize.editor-expand",function(a){i(a.type),l()}),e.on("wp-collapse-menu.editor-expand postboxes-columnchange.editor-expand editor-classchange.editor-expand",i).on("postbox-toggled.editor-expand postbox-moved.editor-expand",function(){!K&&!L&&a.pageYOffset>O&&(L=!0,a.scrollBy(0,-1),i(),a.scrollBy(0,1)),i()}).on("wp-window-resized.editor-expand",function(){o&&!o.isHidden()?o.execCommand("wpAutoResize"):h()}),w.on("focus.editor-expand input.editor-expand propertychange.editor-expand",h),G(),F&&F.pubsub.subscribe("hidden",j),o&&(o.settings.wp_autoresize_on=!0,o.execCommand("wpAutoResizeOn"),o.isHidden()||o.execCommand("wpAutoResize")),o&&!o.isHidden()||h(),i(),e.trigger("editor-expand-on")}function n(){var c=parseInt(a.getUserSetting("ed_size",300),10);c<50?c=50:c>5e3&&(c=5e3),a.pageYOffset&&a.pageYOffset>N&&a.scrollTo(a.pageXOffset,0),q.removeClass("wp-editor-expand"),d.off(".editor-expand"),e.off(".editor-expand"),w.off(".editor-expand"),H(),F&&F.pubsub.unsubscribe("hidden",j),b.each([t,v,s,A,z,B,r,u,w,C],function(a,b){b&&b.attr("style","")}),I=J=K=L=!1,o&&(o.settings.wp_autoresize_on=!1,o.execCommand("wpAutoResizeOff"),o.isHidden()||(w.hide(),c&&o.theme.resizeTo(null,c))),c&&w.height(c),e.trigger("editor-expand-off")}var o,p,q=b("#postdivrich"),r=b("#wp-content-wrap"),s=b("#wp-content-editor-tools"),t=b(),u=b(),v=b("#ed_toolbar"),w=b("#content"),x=w[0],y=0,z=b("#post-status-info"),A=b(),B=b(),C=b("#side-sortables"),D=b("#postbox-container-1"),E=b("#post-body"),F=a.wp.editor&&a.wp.editor.fullscreen,G=function(){},H=function(){},I=!1,J=!1,K=!1,L=!1,M=0,N=130,O=56,P=20,Q=300,R=r.hasClass("tmce-active")?"tinymce":"html",S=!!parseInt(a.getUserSetting("hidetb"),10),T={windowHeight:0,windowWidth:0,adminBarHeight:0,toolsHeight:0,menuBarHeight:0,visualTopHeight:0,textTopHeight:0,bottomHeight:0,statusBarHeight:0,sideSortablesHeight:0};e.on("tinymce-editor-init.editor-expand",function(c,e){function f(){var a,b,c,d=e.selection.getNode();if(e.wp&&e.wp.getView&&(b=e.wp.getView(d)))c=b.getBoundingClientRect();else{a=e.selection.getRng();try{c=a.getClientRects()[0]}catch(f){}c||(c=d.getBoundingClientRect())}return!!c.height&&c}function g(a){var b=a.keyCode;b<=47&&b!==s.SPACEBAR&&b!==s.ENTER&&b!==s.DELETE&&b!==s.BACKSPACE&&b!==s.UP&&b!==s.LEFT&&b!==s.DOWN&&b!==s.UP||b>=91&&b<=93||b>=112&&b<=123||144===b||145===b||j(b)}function j(b){var c,d,g,h,i=f(),j=50;i&&(c=i.top+e.iframeElement.getBoundingClientRect().top,d=c+i.height,c-=j,d+=j,g=T.adminBarHeight+T.toolsHeight+T.menuBarHeight+T.visualTopHeight,h=T.windowHeight-(S?T.bottomHeight+T.statusBarHeight:0),h-g<i.height||(c<g&&(b===s.UP||b===s.LEFT||b===s.BACKSPACE)?a.scrollTo(a.pageXOffset,c+a.pageYOffset-g):d>h&&a.scrollTo(a.pageXOffset,d+a.pageYOffset-h)))}function l(a){a.state||i()}function m(){d.on("scroll.mce-float-panels",v),setTimeout(function(){e.execCommand("wpAutoResize"),i()},300)}function n(){d.off("scroll.mce-float-panels"),setTimeout(function(){var b=r.offset().top;a.pageYOffset>b&&a.scrollTo(a.pageXOffset,b-T.adminBarHeight),h(),i()},100),i()}function p(){S=!S}var s=a.tinymce.util.VK,v=_.debounce(function(){!b(".mce-floatpanel:hover").length&&a.tinymce.ui.FloatPanel.hideAll(),b(".mce-tooltip").hide()},1e3,!0);"content"===e.id&&(o=e,e.settings.autoresize_min_height=Q,t=r.find(".mce-toolbar-grp"),u=r.find(".mce-edit-area"),B=r.find(".mce-statusbar"),A=r.find(".mce-menubar"),G=function(){e.on("keyup",g),e.on("show",m),e.on("hide",n),e.on("wp-toolbar-toggle",p),e.on("setcontent wp-autoresize wp-toolbar-toggle",i),e.on("undo redo",j),e.on("FullscreenStateChanged",l),d.off("scroll.mce-float-panels").on("scroll.mce-float-panels",v)},H=function(){e.off("keyup",g),e.off("show",m),e.off("hide",n),e.off("wp-toolbar-toggle",p),e.off("setcontent wp-autoresize wp-toolbar-toggle",i),e.off("undo redo",j),e.off("FullscreenStateChanged",l),d.off("scroll.mce-float-panels")},q.hasClass("wp-editor-expand")&&(G(),k(i)))}),q.hasClass("wp-editor-expand")&&(m(),r.hasClass("html-active")&&k(function(){i(),h()})),b("#adv-settings .editor-expand").show(),b("#editor-expand-toggle").on("change.editor-expand",function(){b(this).prop("checked")?(m(),a.setUserSetting("editor_expand","on")):(n(),a.setUserSetting("editor_expand","off"))}),a.editorExpand={on:m,off:n}}),b(function(){function c(){z=J.offset(),z.right=z.left+J.outerWidth(),z.bottom=z.top+J.outerHeight()}function h(){S||(S=!0,e.trigger("dfw-activate"),L.on("keydown.focus-shortcut",v))}function i(){S&&(l(),S=!1,e.trigger("dfw-deactivate"),L.off("keydown.focus-shortcut"))}function j(){return S}function k(){!T&&S&&(T=!0,L.on("keydown.focus",o),K.add(L).on("blur.focus",q),o(),a.setUserSetting("post_dfw","on"),e.trigger("dfw-on"))}function l(){T&&(T=!1,K.add(L).off(".focus"),p(),J.off(".focus"),a.setUserSetting("post_dfw","off"),e.trigger("dfw-off"))}function m(){T?l():k()}function n(){return T}function o(b){var e,f=b&&b.keyCode;return a.navigator.platform&&(e=a.navigator.platform.indexOf("Mac")>-1),27===f||87===f&&b.altKey&&(!e&&b.shiftKey||e&&b.ctrlKey)?void p(b):void(b&&(b.metaKey||b.ctrlKey&&!b.altKey||b.altKey&&b.shiftKey||f&&(f<=47&&8!==f&&13!==f&&32!==f&&46!==f||f>=91&&f<=93||f>=112&&f<=135||f>=144&&f<=150||f>=224))||(w||(w=!0,clearTimeout(F),F=setTimeout(function(){M.show()},600),J.css("z-index",9998),M.on("mouseenter.focus",function(){c(),d.on("scroll.focus",function(){var b=a.pageYOffset;D&&C&&D!==b&&(C<z.top-W||C>z.bottom+W)&&p(),D=b})}).on("mouseleave.focus",function(){A=B=null,U=V=0,d.off("scroll.focus")}).on("mousemove.focus",function(b){var c=b.clientX,d=b.clientY,e=a.pageYOffset,f=a.pageXOffset;if(A&&B&&(c!==A||d!==B))if(d<=B&&d<z.top-e||d>=B&&d>z.bottom-e||c<=A&&c<z.left-f||c>=A&&c>z.right-f){if(U+=Math.abs(A-c),V+=Math.abs(B-d),(d<=z.top-W-e||d>=z.bottom+W-e||c<=z.left-W-f||c>=z.right+W-f)&&(U>10||V>10))return p(),A=B=null,void(U=V=0)}else U=V=0;A=c,B=d}).on("touchstart.focus",function(a){a.preventDefault(),p()}),J.off("mouseenter.focus"),E&&(clearTimeout(E),E=null),H.addClass("focus-on").removeClass("focus-off")),r(),t()))}function p(a){w&&(w=!1,clearTimeout(F),F=setTimeout(function(){M.hide()},200),J.css("z-index",""),M.off("mouseenter.focus mouseleave.focus mousemove.focus touchstart.focus"),"undefined"==typeof a&&J.on("mouseenter.focus",function(){(b.contains(J.get(0),document.activeElement)||G)&&o()}),E=setTimeout(function(){E=null,J.off("mouseenter.focus")},1e3),H.addClass("focus-off").removeClass("focus-on")),s(),u()}function q(){setTimeout(function(){function a(a){return b.contains(a.get(0),document.activeElement)}var c=document.activeElement.compareDocumentPosition(J.get(0));2!==c&&4!==c||!(a(P)||a(I)||a(g))||p()},0)}function r(){!x&&w&&(x=!0,f.on("mouseenter.focus",function(){f.addClass("focus-off")}).on("mouseleave.focus",function(){f.removeClass("focus-off")}))}function s(){x&&(x=!1,f.off(".focus"))}function t(){y||!w||N.find(":focus").length||(y=!0,N.stop().fadeTo("fast",.3).on("mouseenter.focus",u).off("mouseleave.focus"),O.on("focus.focus",u).off("blur.focus"))}function u(){y&&(y=!1,N.stop().fadeTo("fast",1).on("mouseleave.focus",t).off("mouseenter.focus"),O.on("blur.focus",t).off("focus.focus"))}function v(a){a.altKey&&a.shiftKey&&87===a.keyCode&&m()}var w,x,y,z,A,B,C,D,E,F,G,H=b(document.body),I=b("#wpcontent"),J=b("#post-body-content"),K=b("#title"),L=b("#content"),M=b(document.createElement("DIV")),N=b("#edit-slug-box"),O=N.find("a").add(N.find("button")).add(N.find("input")),P=b("#adminmenuwrap"),Q=b(),R=b(),S="on"===a.getUserSetting("editor_expand","on"),T=!!S&&"on"===a.getUserSetting("post_dfw"),U=0,V=0,W=20;H.append(M),M.css({display:"none",position:"fixed",top:f.height(),right:0,bottom:0,left:0,"z-index":9997}),J.css({position:"relative"}),d.on("mousemove.focus",function(a){C=a.pageY}),b("#postdivrich").hasClass("wp-editor-expand")&&L.on("keydown.focus-shortcut",v),e.on("tinymce-editor-setup.focus",function(a,b){b.addButton("dfw",{active:T,classes:"wp-dfw btn widget",disabled:!S,onclick:m,onPostRender:function(){var a=this;e.on("dfw-activate.focus",function(){a.disabled(!1)}).on("dfw-deactivate.focus",function(){a.disabled(!0)}).on("dfw-on.focus",function(){a.active(!0)}).on("dfw-off.focus",function(){a.active(!1)})},tooltip:"Distraction-free writing mode",shortcut:"Alt+Shift+W"}),b.addCommand("wpToggleDFW",m),b.addShortcut("access+w","","wpToggleDFW")}),e.on("tinymce-editor-init.focus",function(a,d){function f(){G=!0}function g(){G=!1}var h,i;"content"===d.id&&(Q=b(d.getWin()),R=b(d.getContentAreaContainer()).find("iframe"),h=function(){d.on("keydown",o),d.on("blur",q),d.on("focus",f),d.on("blur",g),d.on("wp-autoresize",c)},i=function(){d.off("keydown",o),d.off("blur",q),d.off("focus",f),d.off("blur",g),d.off("wp-autoresize",c)},T&&h(),e.on("dfw-on.focus",h).on("dfw-off.focus",i),d.on("click",function(a){a.target===d.getDoc().documentElement&&d.focus()}))}),e.on("quicktags-init",function(a,c){var d;c.settings.buttons&&(","+c.settings.buttons+",").indexOf(",dfw,")!==-1&&(d=b("#"+c.name+"_dfw"),b(document).on("dfw-activate",function(){d.prop("disabled",!1)}).on("dfw-deactivate",function(){d.prop("disabled",!0)}).on("dfw-on",function(){d.addClass("active")}).on("dfw-off",function(){d.removeClass("active")}))}),e.on("editor-expand-on.focus",h).on("editor-expand-off.focus",i),T&&(L.on("keydown.focus",o),K.add(L).on("blur.focus",q)),a.wp=a.wp||{},a.wp.editor=a.wp.editor||{},a.wp.editor.dfw={activate:h,deactivate:i,isActive:j,on:k,off:l,toggle:m,isOn:n}})}(window,window.jQuery);
\ No newline at end of file
index bde22255cc997a8e38ad1a1027100e9b01ca60b7..c42611bb2da10e6a44c411811db5ee45ae034388 100644 (file)
                                blocklist1 = blocklist + '|div|p',
                                blocklist2 = blocklist + '|pre',
                                preserve_linebreaks = false,
-                               preserve_br = false;
+                               preserve_br = false,
+                               preserve = [];
 
                        if ( ! html ) {
                                return '';
                        }
 
-                       // Protect pre|script tags
-                       if ( html.indexOf( '<pre' ) !== -1 || html.indexOf( '<script' ) !== -1 ) {
+                       // Preserve script and style tags.
+                       if ( html.indexOf( '<script' ) !== -1 || html.indexOf( '<style' ) !== -1 ) {
+                               html = html.replace( /<(script|style)[^>]*>[\s\S]*?<\/\1>/g, function( match ) {
+                                       preserve.push( match );
+                                       return '<wp-preserve>';
+                               } );
+                       }
+
+                       // Protect pre tags.
+                       if ( html.indexOf( '<pre' ) !== -1 ) {
                                preserve_linebreaks = true;
-                               html = html.replace( /<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function( a ) {
+                               html = html.replace( /<pre[^>]*>[\s\S]+?<\/pre>/g, function( a ) {
                                        a = a.replace( /<br ?\/?>(\r\n|\n)?/g, '<wp-line-break>' );
                                        a = a.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '<wp-line-break>' );
                                        return a.replace( /\r?\n/g, '<wp-line-break>' );
                                html = html.replace( /<wp-temp-br([^>]*)>/g, '<br$1>' );
                        }
 
+                       // Put back preserved tags.
+                       if ( preserve.length ) {
+                               html = html.replace( /<wp-preserve>/g, function() {
+                                       return preserve.shift();
+                               } );
+                       }
+
                        return html;
                }
 
index c29549e2b627caeade57337f04d663634de5fd35..80a8a829e301d0e55cdc73f4e6b86e4fa46390f8 100644 (file)
@@ -1 +1 @@
-!function(a){function b(){function b(){!i&&window.tinymce&&(i=window.tinymce,j=i.$,j(document).on("click",function(a){var b,c,e=j(a.target);e.hasClass("wp-switch-editor")&&(b=e.attr("data-wp-editor-id"),c=e.hasClass("switch-tmce")?"tmce":"html",d(b,c))}))}function c(a){var b=j(".mce-toolbar-grp",a.getContainer())[0],c=b&&b.clientHeight;return c&&c>10&&200>c?parseInt(c,10):30}function d(a,b){a=a||"content",b=b||"toggle";var d,e,f,g=i.get(a),h=j("#wp-"+a+"-wrap"),k=j("#"+a),l=k[0];if("toggle"===b&&(b=g&&!g.isHidden()?"html":"tmce"),"tmce"===b||"tinymce"===b){if(g&&!g.isHidden())return!1;"undefined"!=typeof window.QTags&&window.QTags.closeAllTags(a),d=parseInt(l.style.height,10)||0,g?(g.show(),!i.Env.iOS&&d&&(e=c(g),d=d-e+14,d>50&&5e3>d&&g.theme.resizeTo(null,d))):i.init(window.tinyMCEPreInit.mceInit[a]),h.removeClass("html-active").addClass("tmce-active"),k.attr("aria-hidden",!0),window.setUserSetting("editor","tinymce")}else if("html"===b){if(g&&g.isHidden())return!1;g?(i.Env.iOS||(f=g.iframeElement,d=f?parseInt(f.style.height,10):0,d&&(e=c(g),d=d+e-14,d>50&&5e3>d&&(l.style.height=d+"px"))),g.hide()):k.css({display:"",visibility:""}),h.removeClass("tmce-active").addClass("html-active"),k.attr("aria-hidden",!1),window.setUserSetting("editor","html")}}function e(a){var b="blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset",c=b+"|div|p",d=b+"|pre",e=!1,f=!1;return a?((-1!==a.indexOf("<pre")||-1!==a.indexOf("<script"))&&(e=!0,a=a.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g,function(a){return a=a.replace(/<br ?\/?>(\r\n|\n)?/g,"<wp-line-break>"),a=a.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"<wp-line-break>"),a.replace(/\r?\n/g,"<wp-line-break>")})),-1!==a.indexOf("[caption")&&(f=!0,a=a.replace(/\[caption[\s\S]+?\[\/caption\]/g,function(a){return a.replace(/<br([^>]*)>/g,"<wp-temp-br$1>").replace(/[\r\n\t]+/,"")})),a=a.replace(new RegExp("\\s*</("+c+")>\\s*","g"),"</$1>\n"),a=a.replace(new RegExp("\\s*<((?:"+c+")(?: [^>]*)?)>","g"),"\n<$1>"),a=a.replace(/(<p [^>]+>.*?)<\/p>/g,"$1</p#>"),a=a.replace(/<div( [^>]*)?>\s*<p>/gi,"<div$1>\n\n"),a=a.replace(/\s*<p>/gi,""),a=a.replace(/\s*<\/p>\s*/gi,"\n\n"),a=a.replace(/\n[\s\u00a0]+\n/g,"\n\n"),a=a.replace(/\s*<br ?\/?>\s*/gi,"\n"),a=a.replace(/\s*<div/g,"\n<div"),a=a.replace(/<\/div>\s*/g,"</div>\n"),a=a.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n"),a=a.replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption"),a=a.replace(new RegExp("\\s*<((?:"+d+")(?: [^>]*)?)\\s*>","g"),"\n<$1>"),a=a.replace(new RegExp("\\s*</("+d+")>\\s*","g"),"</$1>\n"),a=a.replace(/<((li|dt|dd)[^>]*)>/g,"    <$1>"),-1!==a.indexOf("<option")&&(a=a.replace(/\s*<option/g,"\n<option"),a=a.replace(/\s*<\/select>/g,"\n</select>")),-1!==a.indexOf("<hr")&&(a=a.replace(/\s*<hr( [^>]*)?>\s*/g,"\n\n<hr$1>\n\n")),-1!==a.indexOf("<object")&&(a=a.replace(/<object[\s\S]+?<\/object>/g,function(a){return a.replace(/[\r\n]+/g,"")})),a=a.replace(/<\/p#>/g,"</p>\n"),a=a.replace(/\s*(<p [^>]+>[\s\S]*?<\/p>)/g,"\n$1"),a=a.replace(/^\s+/,""),a=a.replace(/[\s\u00a0]+$/,""),e&&(a=a.replace(/<wp-line-break>/g,"\n")),f&&(a=a.replace(/<wp-temp-br([^>]*)>/g,"<br$1>")),a):""}function f(a){var b=!1,c=!1,d="table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary";return a=a.replace(/\r\n|\r/g,"\n"),-1===a.indexOf("\n")?a:(-1!==a.indexOf("<object")&&(a=a.replace(/<object[\s\S]+?<\/object>/g,function(a){return a.replace(/\n+/g,"")})),a=a.replace(/<[^<>]+>/g,function(a){return a.replace(/[\n\t ]+/g," ")}),(-1!==a.indexOf("<pre")||-1!==a.indexOf("<script"))&&(b=!0,a=a.replace(/<(pre|script)[^>]*>[\s\S]*?<\/\1>/g,function(a){return a.replace(/\n/g,"<wp-line-break>")})),-1!==a.indexOf("[caption")&&(c=!0,a=a.replace(/\[caption[\s\S]+?\[\/caption\]/g,function(a){return a=a.replace(/<br([^>]*)>/g,"<wp-temp-br$1>"),a=a.replace(/<[^<>]+>/g,function(a){return a.replace(/[\n\t ]+/," ")}),a.replace(/\s*\n\s*/g,"<wp-temp-br />")})),a+="\n\n",a=a.replace(/<br \/>\s*<br \/>/gi,"\n\n"),a=a.replace(new RegExp("(<(?:"+d+")(?: [^>]*)?>)","gi"),"\n$1"),a=a.replace(new RegExp("(</(?:"+d+")>)","gi"),"$1\n\n"),a=a.replace(/<hr( [^>]*)?>/gi,"<hr$1>\n\n"),a=a.replace(/\s*<option/gi,"<option"),a=a.replace(/<\/option>\s*/gi,"</option>"),a=a.replace(/\n\s*\n+/g,"\n\n"),a=a.replace(/([\s\S]+?)\n\n/g,"<p>$1</p>\n"),a=a.replace(/<p>\s*?<\/p>/gi,""),a=a.replace(new RegExp("<p>\\s*(</?(?:"+d+")(?: [^>]*)?>)\\s*</p>","gi"),"$1"),a=a.replace(/<p>(<li.+?)<\/p>/gi,"$1"),a=a.replace(/<p>\s*<blockquote([^>]*)>/gi,"<blockquote$1><p>"),a=a.replace(/<\/blockquote>\s*<\/p>/gi,"</p></blockquote>"),a=a.replace(new RegExp("<p>\\s*(</?(?:"+d+")(?: [^>]*)?>)","gi"),"$1"),a=a.replace(new RegExp("(</?(?:"+d+")(?: [^>]*)?>)\\s*</p>","gi"),"$1"),a=a.replace(/(<br[^>]*>)\s*\n/gi,"$1"),a=a.replace(/\s*\n/g,"<br />\n"),a=a.replace(new RegExp("(</?(?:"+d+")[^>]*>)\\s*<br />","gi"),"$1"),a=a.replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi,"$1"),a=a.replace(/(?:<p>|<br ?\/?>)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:<\/p>|<br ?\/?>)*/gi,"[caption$1[/caption]"),a=a.replace(/(<(?:div|th|td|form|fieldset|dd)[^>]*>)(.*?)<\/p>/g,function(a,b,c){return c.match(/<p( [^>]*)?>/)?a:b+"<p>"+c+"</p>"}),b&&(a=a.replace(/<wp-line-break>/g,"\n")),c&&(a=a.replace(/<wp-temp-br([^>]*)>/g,"<br$1>")),a)}function g(b){var c={o:k,data:b,unfiltered:b};return a&&a("body").trigger("beforePreWpautop",[c]),c.data=e(c.data),a&&a("body").trigger("afterPreWpautop",[c]),c.data}function h(b){var c={o:k,data:b,unfiltered:b};return a&&a("body").trigger("beforeWpautop",[c]),c.data=f(c.data),a&&a("body").trigger("afterWpautop",[c]),c.data}var i,j,k={};return a?a(document).ready(b):document.addEventListener?(document.addEventListener("DOMContentLoaded",b,!1),window.addEventListener("load",b,!1)):window.attachEvent&&(window.attachEvent("onload",b),document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&b()})),window.wp=window.wp||{},window.wp.editor=window.wp.editor||{},window.wp.editor.autop=h,window.wp.editor.removep=g,k={go:d,wpautop:h,pre_wpautop:g,_wp_Autop:f,_wp_Nop:e}}window.switchEditors=new b}(window.jQuery);
\ No newline at end of file
+!function(a){function b(){function b(){!i&&window.tinymce&&(i=window.tinymce,j=i.$,j(document).on("click",function(a){var b,c,e=j(a.target);e.hasClass("wp-switch-editor")&&(b=e.attr("data-wp-editor-id"),c=e.hasClass("switch-tmce")?"tmce":"html",d(b,c))}))}function c(a){var b=j(".mce-toolbar-grp",a.getContainer())[0],c=b&&b.clientHeight;return c&&c>10&&c<200?parseInt(c,10):30}function d(a,b){a=a||"content",b=b||"toggle";var d,e,f,g=i.get(a),h=j("#wp-"+a+"-wrap"),k=j("#"+a),l=k[0];if("toggle"===b&&(b=g&&!g.isHidden()?"html":"tmce"),"tmce"===b||"tinymce"===b){if(g&&!g.isHidden())return!1;"undefined"!=typeof window.QTags&&window.QTags.closeAllTags(a),d=parseInt(l.style.height,10)||0,g?(g.show(),!i.Env.iOS&&d&&(e=c(g),d=d-e+14,d>50&&d<5e3&&g.theme.resizeTo(null,d))):i.init(window.tinyMCEPreInit.mceInit[a]),h.removeClass("html-active").addClass("tmce-active"),k.attr("aria-hidden",!0),window.setUserSetting("editor","tinymce")}else if("html"===b){if(g&&g.isHidden())return!1;g?(i.Env.iOS||(f=g.iframeElement,d=f?parseInt(f.style.height,10):0,d&&(e=c(g),d=d+e-14,d>50&&d<5e3&&(l.style.height=d+"px"))),g.hide()):k.css({display:"",visibility:""}),h.removeClass("tmce-active").addClass("html-active"),k.attr("aria-hidden",!1),window.setUserSetting("editor","html")}}function e(a){var b="blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset",c=b+"|div|p",d=b+"|pre",e=!1,f=!1,g=[];return a?(a.indexOf("<script")===-1&&a.indexOf("<style")===-1||(a=a.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g,function(a){return g.push(a),"<wp-preserve>"})),a.indexOf("<pre")!==-1&&(e=!0,a=a.replace(/<pre[^>]*>[\s\S]+?<\/pre>/g,function(a){return a=a.replace(/<br ?\/?>(\r\n|\n)?/g,"<wp-line-break>"),a=a.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"<wp-line-break>"),a.replace(/\r?\n/g,"<wp-line-break>")})),a.indexOf("[caption")!==-1&&(f=!0,a=a.replace(/\[caption[\s\S]+?\[\/caption\]/g,function(a){return a.replace(/<br([^>]*)>/g,"<wp-temp-br$1>").replace(/[\r\n\t]+/,"")})),a=a.replace(new RegExp("\\s*</("+c+")>\\s*","g"),"</$1>\n"),a=a.replace(new RegExp("\\s*<((?:"+c+")(?: [^>]*)?)>","g"),"\n<$1>"),a=a.replace(/(<p [^>]+>.*?)<\/p>/g,"$1</p#>"),a=a.replace(/<div( [^>]*)?>\s*<p>/gi,"<div$1>\n\n"),a=a.replace(/\s*<p>/gi,""),a=a.replace(/\s*<\/p>\s*/gi,"\n\n"),a=a.replace(/\n[\s\u00a0]+\n/g,"\n\n"),a=a.replace(/\s*<br ?\/?>\s*/gi,"\n"),a=a.replace(/\s*<div/g,"\n<div"),a=a.replace(/<\/div>\s*/g,"</div>\n"),a=a.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n"),a=a.replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption"),a=a.replace(new RegExp("\\s*<((?:"+d+")(?: [^>]*)?)\\s*>","g"),"\n<$1>"),a=a.replace(new RegExp("\\s*</("+d+")>\\s*","g"),"</$1>\n"),a=a.replace(/<((li|dt|dd)[^>]*)>/g," \t<$1>"),a.indexOf("<option")!==-1&&(a=a.replace(/\s*<option/g,"\n<option"),a=a.replace(/\s*<\/select>/g,"\n</select>")),a.indexOf("<hr")!==-1&&(a=a.replace(/\s*<hr( [^>]*)?>\s*/g,"\n\n<hr$1>\n\n")),a.indexOf("<object")!==-1&&(a=a.replace(/<object[\s\S]+?<\/object>/g,function(a){return a.replace(/[\r\n]+/g,"")})),a=a.replace(/<\/p#>/g,"</p>\n"),a=a.replace(/\s*(<p [^>]+>[\s\S]*?<\/p>)/g,"\n$1"),a=a.replace(/^\s+/,""),a=a.replace(/[\s\u00a0]+$/,""),e&&(a=a.replace(/<wp-line-break>/g,"\n")),f&&(a=a.replace(/<wp-temp-br([^>]*)>/g,"<br$1>")),g.length&&(a=a.replace(/<wp-preserve>/g,function(){return g.shift()})),a):""}function f(a){var b=!1,c=!1,d="table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary";return a=a.replace(/\r\n|\r/g,"\n"),a.indexOf("\n")===-1?a:(a.indexOf("<object")!==-1&&(a=a.replace(/<object[\s\S]+?<\/object>/g,function(a){return a.replace(/\n+/g,"")})),a=a.replace(/<[^<>]+>/g,function(a){return a.replace(/[\n\t ]+/g," ")}),a.indexOf("<pre")===-1&&a.indexOf("<script")===-1||(b=!0,a=a.replace(/<(pre|script)[^>]*>[\s\S]*?<\/\1>/g,function(a){return a.replace(/\n/g,"<wp-line-break>")})),a.indexOf("[caption")!==-1&&(c=!0,a=a.replace(/\[caption[\s\S]+?\[\/caption\]/g,function(a){return a=a.replace(/<br([^>]*)>/g,"<wp-temp-br$1>"),a=a.replace(/<[^<>]+>/g,function(a){return a.replace(/[\n\t ]+/," ")}),a.replace(/\s*\n\s*/g,"<wp-temp-br />")})),a+="\n\n",a=a.replace(/<br \/>\s*<br \/>/gi,"\n\n"),a=a.replace(new RegExp("(<(?:"+d+")(?: [^>]*)?>)","gi"),"\n$1"),a=a.replace(new RegExp("(</(?:"+d+")>)","gi"),"$1\n\n"),a=a.replace(/<hr( [^>]*)?>/gi,"<hr$1>\n\n"),a=a.replace(/\s*<option/gi,"<option"),a=a.replace(/<\/option>\s*/gi,"</option>"),a=a.replace(/\n\s*\n+/g,"\n\n"),a=a.replace(/([\s\S]+?)\n\n/g,"<p>$1</p>\n"),a=a.replace(/<p>\s*?<\/p>/gi,""),a=a.replace(new RegExp("<p>\\s*(</?(?:"+d+")(?: [^>]*)?>)\\s*</p>","gi"),"$1"),a=a.replace(/<p>(<li.+?)<\/p>/gi,"$1"),a=a.replace(/<p>\s*<blockquote([^>]*)>/gi,"<blockquote$1><p>"),a=a.replace(/<\/blockquote>\s*<\/p>/gi,"</p></blockquote>"),a=a.replace(new RegExp("<p>\\s*(</?(?:"+d+")(?: [^>]*)?>)","gi"),"$1"),a=a.replace(new RegExp("(</?(?:"+d+")(?: [^>]*)?>)\\s*</p>","gi"),"$1"),a=a.replace(/(<br[^>]*>)\s*\n/gi,"$1"),a=a.replace(/\s*\n/g,"<br />\n"),a=a.replace(new RegExp("(</?(?:"+d+")[^>]*>)\\s*<br />","gi"),"$1"),a=a.replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi,"$1"),a=a.replace(/(?:<p>|<br ?\/?>)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:<\/p>|<br ?\/?>)*/gi,"[caption$1[/caption]"),a=a.replace(/(<(?:div|th|td|form|fieldset|dd)[^>]*>)(.*?)<\/p>/g,function(a,b,c){return c.match(/<p( [^>]*)?>/)?a:b+"<p>"+c+"</p>"}),b&&(a=a.replace(/<wp-line-break>/g,"\n")),c&&(a=a.replace(/<wp-temp-br([^>]*)>/g,"<br$1>")),a)}function g(b){var c={o:k,data:b,unfiltered:b};return a&&a("body").trigger("beforePreWpautop",[c]),c.data=e(c.data),a&&a("body").trigger("afterPreWpautop",[c]),c.data}function h(b){var c={o:k,data:b,unfiltered:b};return a&&a("body").trigger("beforeWpautop",[c]),c.data=f(c.data),a&&a("body").trigger("afterWpautop",[c]),c.data}var i,j,k={};return a?a(document).ready(b):document.addEventListener?(document.addEventListener("DOMContentLoaded",b,!1),window.addEventListener("load",b,!1)):window.attachEvent&&(window.attachEvent("onload",b),document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&b()})),window.wp=window.wp||{},window.wp.editor=window.wp.editor||{},window.wp.editor.autop=h,window.wp.editor.removep=g,k={go:d,wpautop:h,pre_wpautop:g,_wp_Autop:f,_wp_Nop:e}}window.switchEditors=new b}(window.jQuery);
\ No newline at end of file
index ae7599230168dad7dafb21f32acb3011d495edb9..6af28dc84f393a8b4f04b51f4323f4ffc3f8b6e7 100644 (file)
@@ -8,6 +8,10 @@ var imageEdit = window.imageEdit = {
        _view : false,
 
        intval : function(f) {
+               /*
+                * Bitwise OR operator: one of the obscure ways to truncate floating point figures,
+                * worth reminding JavaScript doesn't have a distinct "integer" type.
+                */
                return f | 0;
        },
 
@@ -79,10 +83,14 @@ var imageEdit = window.imageEdit = {
                return $('input[name="imgedit-target-' + postid + '"]:checked', '#imgedit-save-target-' + postid).val() || 'full';
        },
 
-       scaleChanged : function(postid, x) {
+       scaleChanged : function( postid, x, el ) {
                var w = $('#imgedit-scale-width-' + postid), h = $('#imgedit-scale-height-' + postid),
                warn = $('#imgedit-scale-warn-' + postid), w1 = '', h1 = '';
 
+               if ( false === this.validateNumeric( el ) ) {
+                       return;
+               }
+
                if ( x ) {
                        h1 = ( w.val() !== '' ) ? Math.round( w.val() / this.hold.xy_ratio ) : '';
                        h.val( h1 );
@@ -361,6 +369,8 @@ var imageEdit = window.imageEdit = {
                                btn.removeClass( 'button-activated' );
                                spin.removeClass( 'is-active' );
                        });
+                       // Initialise the Image Editor now that everything is ready.
+                       imageEdit.init( postid );
                });
 
                return dfd;
@@ -586,12 +596,16 @@ var imageEdit = window.imageEdit = {
                });
        },
 
-       setNumSelection : function(postid) {
+       setNumSelection : function( postid, el ) {
                var sel, elX = $('#imgedit-sel-width-' + postid), elY = $('#imgedit-sel-height-' + postid),
                        x = this.intval( elX.val() ), y = this.intval( elY.val() ),
                        img = $('#image-preview-' + postid), imgh = img.height(), imgw = img.width(),
                        sizer = this.hold.sizer, x1, y1, x2, y2, ias = this.iasapi;
 
+               if ( false === this.validateNumeric( el ) ) {
+                       return;
+               }
+
                if ( x < 1 ) {
                        elX.val('');
                        return false;
@@ -650,8 +664,7 @@ var imageEdit = window.imageEdit = {
                        y = this.intval( $('#imgedit-crop-height-' + postid).val() ),
                        h = $('#image-preview-' + postid).height();
 
-               if ( !this.intval( $(el).val() ) ) {
-                       $(el).val('');
+               if ( false === this.validateNumeric( el ) ) {
                        return;
                }
 
@@ -676,6 +689,13 @@ var imageEdit = window.imageEdit = {
                                this.iasapi.update();
                        }
                }
+       },
+
+       validateNumeric: function( el ) {
+               if ( ! this.intval( $( el ).val() ) ) {
+                       $( el ).val( '' );
+                       return false;
+               }
        }
 };
 })(jQuery);
index 5e5ee16aad27c9b9d78404fc3b8de4cb59f47db3..5c59b5839f14175b0325485add161db4de7d982f 100644 (file)
@@ -1 +1 @@
-!function(a){var b=window.imageEdit={iasapi:{},hold:{},postid:"",_view:!1,intval:function(a){return 0|a},setDisabled:function(a,b){b?a.removeClass("disabled").prop("disabled",!1):a.addClass("disabled").prop("disabled",!0)},init:function(b){var c=this,d=a("#image-editor-"+c.postid),e=c.intval(a("#imgedit-x-"+b).val()),f=c.intval(a("#imgedit-y-"+b).val());c.postid!==b&&d.length&&c.close(c.postid),c.hold.w=c.hold.ow=e,c.hold.h=c.hold.oh=f,c.hold.xy_ratio=e/f,c.hold.sizer=parseFloat(a("#imgedit-sizer-"+b).val()),c.postid=b,a("#imgedit-response-"+b).empty(),a('input[type="text"]',"#imgedit-panel-"+b).keypress(function(b){var c=b.keyCode;return c>36&&41>c&&a(this).blur(),13===c?(b.preventDefault(),b.stopPropagation(),!1):void 0})},toggleEditor:function(b,c){var d=a("#imgedit-wait-"+b);c?d.fadeIn("fast"):d.fadeOut("fast")},toggleHelp:function(b){var c=a(b);return c.attr("aria-expanded","false"===c.attr("aria-expanded")?"true":"false").parents(".imgedit-group-top").toggleClass("imgedit-help-toggled").find(".imgedit-help").slideToggle("fast"),!1},getTarget:function(b){return a('input[name="imgedit-target-'+b+'"]:checked',"#imgedit-save-target-"+b).val()||"full"},scaleChanged:function(b,c){var d=a("#imgedit-scale-width-"+b),e=a("#imgedit-scale-height-"+b),f=a("#imgedit-scale-warn-"+b),g="",h="";c?(h=""!==d.val()?Math.round(d.val()/this.hold.xy_ratio):"",e.val(h)):(g=""!==e.val()?Math.round(e.val()*this.hold.xy_ratio):"",d.val(g)),h&&h>this.hold.oh||g&&g>this.hold.ow?f.css("visibility","visible"):f.css("visibility","hidden")},getSelRatio:function(b){var c=this.hold.w,d=this.hold.h,e=this.intval(a("#imgedit-crop-width-"+b).val()),f=this.intval(a("#imgedit-crop-height-"+b).val());return e&&f?e+":"+f:c&&d?c+":"+d:"1:1"},filterHistory:function(b,c){var d,e,f,g,h=a("#imgedit-history-"+b).val(),i=[];if(""!==h){if(h=JSON.parse(h),d=this.intval(a("#imgedit-undone-"+b).val()),d>0)for(;d>0;)h.pop(),d--;if(c){if(!h.length)return this.hold.w=this.hold.ow,this.hold.h=this.hold.oh,"";f=h[h.length-1],f=f.c||f.r||f.f||!1,f&&(this.hold.w=f.fw,this.hold.h=f.fh)}for(e in h)g=h[e],g.hasOwnProperty("c")?i[e]={c:{x:g.c.x,y:g.c.y,w:g.c.w,h:g.c.h}}:g.hasOwnProperty("r")?i[e]={r:g.r.r}:g.hasOwnProperty("f")&&(i[e]={f:g.f.f});return JSON.stringify(i)}return""},refreshEditor:function(c,d,e){var f,g,h=this;h.toggleEditor(c,1),f={action:"imgedit-preview",_ajax_nonce:d,postid:c,history:h.filterHistory(c,1),rand:h.intval(1e6*Math.random())},g=a('<img id="image-preview-'+c+'" alt="" />').on("load",{history:f.history},function(d){var f,h,i,j=a("#imgedit-crop-"+c),k=b;""!==d.data.history&&(i=JSON.parse(d.data.history),i[i.length-1].hasOwnProperty("c")&&(k.setDisabled(a("#image-undo-"+c),!0),a("#image-undo-"+c).focus())),j.empty().append(g),f=Math.max(k.hold.w,k.hold.h),h=Math.max(a(g).width(),a(g).height()),k.hold.sizer=f>h?h/f:1,k.initCrop(c,g,j),k.setCropSelection(c,0),"undefined"!=typeof e&&null!==e&&e(),a("#imgedit-history-"+c).val()&&"0"===a("#imgedit-undone-"+c).val()?a("input.imgedit-submit-btn","#imgedit-panel-"+c).removeAttr("disabled"):a("input.imgedit-submit-btn","#imgedit-panel-"+c).prop("disabled",!0),k.toggleEditor(c,0)}).on("error",function(){a("#imgedit-crop-"+c).empty().append('<div class="error"><p>'+imageEditL10n.error+"</p></div>"),h.toggleEditor(c,0)}).attr("src",ajaxurl+"?"+a.param(f))},action:function(b,c,d){var e,f,g,h,i,j=this;if(j.notsaved(b))return!1;if(e={action:"image-editor",_ajax_nonce:c,postid:b},"scale"===d){if(f=a("#imgedit-scale-width-"+b),g=a("#imgedit-scale-height-"+b),h=j.intval(f.val()),i=j.intval(g.val()),1>h)return f.focus(),!1;if(1>i)return g.focus(),!1;if(h===j.hold.ow||i===j.hold.oh)return!1;e["do"]="scale",e.fwidth=h,e.fheight=i}else{if("restore"!==d)return!1;e["do"]="restore"}j.toggleEditor(b,1),a.post(ajaxurl,e,function(c){a("#image-editor-"+b).empty().append(c),j.toggleEditor(b,0),j._view&&j._view.refresh()})},save:function(c,d){var e,f=this.getTarget(c),g=this.filterHistory(c,0),h=this;return""===g?!1:(this.toggleEditor(c,1),e={action:"image-editor",_ajax_nonce:d,postid:c,history:g,target:f,context:a("#image-edit-context").length?a("#image-edit-context").val():null,"do":"save"},void a.post(ajaxurl,e,function(d){var e=JSON.parse(d);return e.error?(a("#imgedit-response-"+c).html('<div class="error"><p>'+e.error+"</p></div>"),void b.close(c)):(e.fw&&e.fh&&a("#media-dims-"+c).html(e.fw+" &times; "+e.fh),e.thumbnail&&a(".thumbnail","#thumbnail-head-"+c).attr("src",""+e.thumbnail),e.msg&&a("#imgedit-response-"+c).html('<div class="updated"><p>'+e.msg+"</p></div>"),void(h._view?h._view.save():b.close(c)))}))},open:function(b,c,d){this._view=d;var e,f,g=a("#image-editor-"+b),h=a("#media-head-"+b),i=a("#imgedit-open-btn-"+b),j=i.siblings(".spinner");if(!i.hasClass("button-activated"))return j.addClass("is-active"),f={action:"image-editor",_ajax_nonce:c,postid:b,"do":"open"},e=a.ajax({url:ajaxurl,type:"post",data:f,beforeSend:function(){i.addClass("button-activated")}}).done(function(a){g.html(a),h.fadeOut("fast",function(){g.fadeIn("fast"),i.removeClass("button-activated"),j.removeClass("is-active")})})},imgLoaded:function(b){var c=a("#image-preview-"+b),d=a("#imgedit-crop-"+b);this.initCrop(b,c,d),this.setCropSelection(b,0),this.toggleEditor(b,0),a(".imgedit-wrap .imgedit-help-toggle").eq(0).focus()},initCrop:function(c,d,e){var f,g=this,h=a("#imgedit-sel-width-"+c),i=a("#imgedit-sel-height-"+c);g.iasapi=a(d).imgAreaSelect({parent:e,instance:!0,handles:!0,keys:!0,minWidth:3,minHeight:3,onInit:function(b){f=a(b),f.next().css("position","absolute").nextAll(".imgareaselect-outer").css("position","absolute"),e.children().mousedown(function(a){var b,d,e=!1;a.shiftKey&&(b=g.iasapi.getSelection(),d=g.getSelRatio(c),e=b&&b.width&&b.height?b.width+":"+b.height:d),g.iasapi.setOptions({aspectRatio:e})})},onSelectStart:function(){b.setDisabled(a("#imgedit-crop-sel-"+c),1)},onSelectEnd:function(a,d){b.setCropSelection(c,d)},onSelectChange:function(a,c){var d=b.hold.sizer;h.val(b.round(c.width/d)),i.val(b.round(c.height/d))}})},setCropSelection:function(b,c){var d;return c=c||0,!c||c.width<3&&c.height<3?(this.setDisabled(a(".imgedit-crop","#imgedit-panel-"+b),0),this.setDisabled(a("#imgedit-crop-sel-"+b),0),a("#imgedit-sel-width-"+b).val(""),a("#imgedit-sel-height-"+b).val(""),a("#imgedit-selection-"+b).val(""),!1):(d={x:c.x1,y:c.y1,w:c.width,h:c.height},this.setDisabled(a(".imgedit-crop","#imgedit-panel-"+b),1),void a("#imgedit-selection-"+b).val(JSON.stringify(d)))},close:function(b,c){return c=c||!1,c&&this.notsaved(b)?!1:(this.iasapi={},this.hold={},void(this._view?this._view.back():a("#image-editor-"+b).fadeOut("fast",function(){a("#media-head-"+b).fadeIn("fast",function(){a("#imgedit-open-btn-"+b).focus()}),a(this).empty()})))},notsaved:function(b){var c=a("#imgedit-history-"+b).val(),d=""!==c?JSON.parse(c):[],e=this.intval(a("#imgedit-undone-"+b).val());return e<d.length?confirm(a("#imgedit-leaving-"+b).html())?!1:!0:!1},addStep:function(b,c,d){for(var e=this,f=a("#imgedit-history-"+c),g=""!==f.val()?JSON.parse(f.val()):[],h=a("#imgedit-undone-"+c),i=e.intval(h.val());i>0;)g.pop(),i--;h.val(0),g.push(b),f.val(JSON.stringify(g)),e.refreshEditor(c,d,function(){e.setDisabled(a("#image-undo-"+c),!0),e.setDisabled(a("#image-redo-"+c),!1)})},rotate:function(b,c,d,e){return a(e).hasClass("disabled")?!1:void this.addStep({r:{r:b,fw:this.hold.h,fh:this.hold.w}},c,d)},flip:function(b,c,d,e){return a(e).hasClass("disabled")?!1:void this.addStep({f:{f:b,fw:this.hold.w,fh:this.hold.h}},c,d)},crop:function(b,c,d){var e=a("#imgedit-selection-"+b).val(),f=this.intval(a("#imgedit-sel-width-"+b).val()),g=this.intval(a("#imgedit-sel-height-"+b).val());return a(d).hasClass("disabled")||""===e?!1:(e=JSON.parse(e),void(e.w>0&&e.h>0&&f>0&&g>0&&(e.fw=f,e.fh=g,this.addStep({c:e},b,c))))},undo:function(b,c){var d=this,e=a("#image-undo-"+b),f=a("#imgedit-undone-"+b),g=d.intval(f.val())+1;e.hasClass("disabled")||(f.val(g),d.refreshEditor(b,c,function(){var c=a("#imgedit-history-"+b),f=""!==c.val()?JSON.parse(c.val()):[];d.setDisabled(a("#image-redo-"+b),!0),d.setDisabled(e,g<f.length),f.length===g&&a("#image-redo-"+b).focus()}))},redo:function(b,c){var d=this,e=a("#image-redo-"+b),f=a("#imgedit-undone-"+b),g=d.intval(f.val())-1;e.hasClass("disabled")||(f.val(g),d.refreshEditor(b,c,function(){d.setDisabled(a("#image-undo-"+b),!0),d.setDisabled(e,g>0),0===g&&a("#image-undo-"+b).focus()}))},setNumSelection:function(b){var c,d,e,f,g,h=a("#imgedit-sel-width-"+b),i=a("#imgedit-sel-height-"+b),j=this.intval(h.val()),k=this.intval(i.val()),l=a("#image-preview-"+b),m=l.height(),n=l.width(),o=this.hold.sizer,p=this.iasapi;return 1>j?(h.val(""),!1):1>k?(i.val(""),!1):void(j&&k&&(c=p.getSelection())&&(f=c.x1+Math.round(j*o),g=c.y1+Math.round(k*o),d=c.x1,e=c.y1,f>n&&(d=0,f=n,h.val(Math.round(f/o))),g>m&&(e=0,g=m,i.val(Math.round(g/o))),p.setSelection(d,e,f,g),p.update(),this.setCropSelection(b,p.getSelection())))},round:function(a){var b;return a=Math.round(a),this.hold.sizer>.6?a:(b=a.toString().slice(-1),"1"===b?a-1:"9"===b?a+1:a)},setRatioSelection:function(b,c,d){var e,f,g=this.intval(a("#imgedit-crop-width-"+b).val()),h=this.intval(a("#imgedit-crop-height-"+b).val()),i=a("#image-preview-"+b).height();return this.intval(a(d).val())?void(g&&h&&(this.iasapi.setOptions({aspectRatio:g+":"+h}),(e=this.iasapi.getSelection(!0))&&(f=Math.ceil(e.y1+(e.x2-e.x1)/(g/h)),f>i&&(f=i,c?a("#imgedit-crop-height-"+b).val(""):a("#imgedit-crop-width-"+b).val("")),this.iasapi.setSelection(e.x1,e.y1,e.x2,f),this.iasapi.update()))):void a(d).val("")}}}(jQuery);
\ No newline at end of file
+!function(a){var b=window.imageEdit={iasapi:{},hold:{},postid:"",_view:!1,intval:function(a){return 0|a},setDisabled:function(a,b){b?a.removeClass("disabled").prop("disabled",!1):a.addClass("disabled").prop("disabled",!0)},init:function(b){var c=this,d=a("#image-editor-"+c.postid),e=c.intval(a("#imgedit-x-"+b).val()),f=c.intval(a("#imgedit-y-"+b).val());c.postid!==b&&d.length&&c.close(c.postid),c.hold.w=c.hold.ow=e,c.hold.h=c.hold.oh=f,c.hold.xy_ratio=e/f,c.hold.sizer=parseFloat(a("#imgedit-sizer-"+b).val()),c.postid=b,a("#imgedit-response-"+b).empty(),a('input[type="text"]',"#imgedit-panel-"+b).keypress(function(b){var c=b.keyCode;if(36<c&&c<41&&a(this).blur(),13===c)return b.preventDefault(),b.stopPropagation(),!1})},toggleEditor:function(b,c){var d=a("#imgedit-wait-"+b);c?d.fadeIn("fast"):d.fadeOut("fast")},toggleHelp:function(b){var c=a(b);return c.attr("aria-expanded","false"===c.attr("aria-expanded")?"true":"false").parents(".imgedit-group-top").toggleClass("imgedit-help-toggled").find(".imgedit-help").slideToggle("fast"),!1},getTarget:function(b){return a('input[name="imgedit-target-'+b+'"]:checked',"#imgedit-save-target-"+b).val()||"full"},scaleChanged:function(b,c,d){var e=a("#imgedit-scale-width-"+b),f=a("#imgedit-scale-height-"+b),g=a("#imgedit-scale-warn-"+b),h="",i="";!1!==this.validateNumeric(d)&&(c?(i=""!==e.val()?Math.round(e.val()/this.hold.xy_ratio):"",f.val(i)):(h=""!==f.val()?Math.round(f.val()*this.hold.xy_ratio):"",e.val(h)),i&&i>this.hold.oh||h&&h>this.hold.ow?g.css("visibility","visible"):g.css("visibility","hidden"))},getSelRatio:function(b){var c=this.hold.w,d=this.hold.h,e=this.intval(a("#imgedit-crop-width-"+b).val()),f=this.intval(a("#imgedit-crop-height-"+b).val());return e&&f?e+":"+f:c&&d?c+":"+d:"1:1"},filterHistory:function(b,c){var d,e,f,g,h=a("#imgedit-history-"+b).val(),i=[];if(""!==h){if(h=JSON.parse(h),d=this.intval(a("#imgedit-undone-"+b).val()),d>0)for(;d>0;)h.pop(),d--;if(c){if(!h.length)return this.hold.w=this.hold.ow,this.hold.h=this.hold.oh,"";f=h[h.length-1],f=f.c||f.r||f.f||!1,f&&(this.hold.w=f.fw,this.hold.h=f.fh)}for(e in h)g=h[e],g.hasOwnProperty("c")?i[e]={c:{x:g.c.x,y:g.c.y,w:g.c.w,h:g.c.h}}:g.hasOwnProperty("r")?i[e]={r:g.r.r}:g.hasOwnProperty("f")&&(i[e]={f:g.f.f});return JSON.stringify(i)}return""},refreshEditor:function(c,d,e){var f,g,h=this;h.toggleEditor(c,1),f={action:"imgedit-preview",_ajax_nonce:d,postid:c,history:h.filterHistory(c,1),rand:h.intval(1e6*Math.random())},g=a('<img id="image-preview-'+c+'" alt="" />').on("load",{history:f.history},function(d){var f,h,i,j=a("#imgedit-crop-"+c),k=b;""!==d.data.history&&(i=JSON.parse(d.data.history),i[i.length-1].hasOwnProperty("c")&&(k.setDisabled(a("#image-undo-"+c),!0),a("#image-undo-"+c).focus())),j.empty().append(g),f=Math.max(k.hold.w,k.hold.h),h=Math.max(a(g).width(),a(g).height()),k.hold.sizer=f>h?h/f:1,k.initCrop(c,g,j),k.setCropSelection(c,0),"undefined"!=typeof e&&null!==e&&e(),a("#imgedit-history-"+c).val()&&"0"===a("#imgedit-undone-"+c).val()?a("input.imgedit-submit-btn","#imgedit-panel-"+c).removeAttr("disabled"):a("input.imgedit-submit-btn","#imgedit-panel-"+c).prop("disabled",!0),k.toggleEditor(c,0)}).on("error",function(){a("#imgedit-crop-"+c).empty().append('<div class="error"><p>'+imageEditL10n.error+"</p></div>"),h.toggleEditor(c,0)}).attr("src",ajaxurl+"?"+a.param(f))},action:function(b,c,d){var e,f,g,h,i,j=this;if(j.notsaved(b))return!1;if(e={action:"image-editor",_ajax_nonce:c,postid:b},"scale"===d){if(f=a("#imgedit-scale-width-"+b),g=a("#imgedit-scale-height-"+b),h=j.intval(f.val()),i=j.intval(g.val()),h<1)return f.focus(),!1;if(i<1)return g.focus(),!1;if(h===j.hold.ow||i===j.hold.oh)return!1;e["do"]="scale",e.fwidth=h,e.fheight=i}else{if("restore"!==d)return!1;e["do"]="restore"}j.toggleEditor(b,1),a.post(ajaxurl,e,function(c){a("#image-editor-"+b).empty().append(c),j.toggleEditor(b,0),j._view&&j._view.refresh()})},save:function(c,d){var e,f=this.getTarget(c),g=this.filterHistory(c,0),h=this;return""!==g&&(this.toggleEditor(c,1),e={action:"image-editor",_ajax_nonce:d,postid:c,history:g,target:f,context:a("#image-edit-context").length?a("#image-edit-context").val():null,"do":"save"},void a.post(ajaxurl,e,function(d){var e=JSON.parse(d);return e.error?(a("#imgedit-response-"+c).html('<div class="error"><p>'+e.error+"</p></div>"),void b.close(c)):(e.fw&&e.fh&&a("#media-dims-"+c).html(e.fw+" &times; "+e.fh),e.thumbnail&&a(".thumbnail","#thumbnail-head-"+c).attr("src",""+e.thumbnail),e.msg&&a("#imgedit-response-"+c).html('<div class="updated"><p>'+e.msg+"</p></div>"),void(h._view?h._view.save():b.close(c)))}))},open:function(c,d,e){this._view=e;var f,g,h=a("#image-editor-"+c),i=a("#media-head-"+c),j=a("#imgedit-open-btn-"+c),k=j.siblings(".spinner");if(!j.hasClass("button-activated"))return k.addClass("is-active"),g={action:"image-editor",_ajax_nonce:d,postid:c,"do":"open"},f=a.ajax({url:ajaxurl,type:"post",data:g,beforeSend:function(){j.addClass("button-activated")}}).done(function(a){h.html(a),i.fadeOut("fast",function(){h.fadeIn("fast"),j.removeClass("button-activated"),k.removeClass("is-active")}),b.init(c)})},imgLoaded:function(b){var c=a("#image-preview-"+b),d=a("#imgedit-crop-"+b);this.initCrop(b,c,d),this.setCropSelection(b,0),this.toggleEditor(b,0),a(".imgedit-wrap .imgedit-help-toggle").eq(0).focus()},initCrop:function(c,d,e){var f,g=this,h=a("#imgedit-sel-width-"+c),i=a("#imgedit-sel-height-"+c);g.iasapi=a(d).imgAreaSelect({parent:e,instance:!0,handles:!0,keys:!0,minWidth:3,minHeight:3,onInit:function(b){f=a(b),f.next().css("position","absolute").nextAll(".imgareaselect-outer").css("position","absolute"),e.children().mousedown(function(a){var b,d,e=!1;a.shiftKey&&(b=g.iasapi.getSelection(),d=g.getSelRatio(c),e=b&&b.width&&b.height?b.width+":"+b.height:d),g.iasapi.setOptions({aspectRatio:e})})},onSelectStart:function(){b.setDisabled(a("#imgedit-crop-sel-"+c),1)},onSelectEnd:function(a,d){b.setCropSelection(c,d)},onSelectChange:function(a,c){var d=b.hold.sizer;h.val(b.round(c.width/d)),i.val(b.round(c.height/d))}})},setCropSelection:function(b,c){var d;return c=c||0,!c||c.width<3&&c.height<3?(this.setDisabled(a(".imgedit-crop","#imgedit-panel-"+b),0),this.setDisabled(a("#imgedit-crop-sel-"+b),0),a("#imgedit-sel-width-"+b).val(""),a("#imgedit-sel-height-"+b).val(""),a("#imgedit-selection-"+b).val(""),!1):(d={x:c.x1,y:c.y1,w:c.width,h:c.height},this.setDisabled(a(".imgedit-crop","#imgedit-panel-"+b),1),void a("#imgedit-selection-"+b).val(JSON.stringify(d)))},close:function(b,c){return c=c||!1,(!c||!this.notsaved(b))&&(this.iasapi={},this.hold={},void(this._view?this._view.back():a("#image-editor-"+b).fadeOut("fast",function(){a("#media-head-"+b).fadeIn("fast",function(){a("#imgedit-open-btn-"+b).focus()}),a(this).empty()})))},notsaved:function(b){var c=a("#imgedit-history-"+b).val(),d=""!==c?JSON.parse(c):[],e=this.intval(a("#imgedit-undone-"+b).val());return e<d.length&&!confirm(a("#imgedit-leaving-"+b).html())},addStep:function(b,c,d){for(var e=this,f=a("#imgedit-history-"+c),g=""!==f.val()?JSON.parse(f.val()):[],h=a("#imgedit-undone-"+c),i=e.intval(h.val());i>0;)g.pop(),i--;h.val(0),g.push(b),f.val(JSON.stringify(g)),e.refreshEditor(c,d,function(){e.setDisabled(a("#image-undo-"+c),!0),e.setDisabled(a("#image-redo-"+c),!1)})},rotate:function(b,c,d,e){return!a(e).hasClass("disabled")&&void this.addStep({r:{r:b,fw:this.hold.h,fh:this.hold.w}},c,d)},flip:function(b,c,d,e){return!a(e).hasClass("disabled")&&void this.addStep({f:{f:b,fw:this.hold.w,fh:this.hold.h}},c,d)},crop:function(b,c,d){var e=a("#imgedit-selection-"+b).val(),f=this.intval(a("#imgedit-sel-width-"+b).val()),g=this.intval(a("#imgedit-sel-height-"+b).val());return!a(d).hasClass("disabled")&&""!==e&&(e=JSON.parse(e),void(e.w>0&&e.h>0&&f>0&&g>0&&(e.fw=f,e.fh=g,this.addStep({c:e},b,c))))},undo:function(b,c){var d=this,e=a("#image-undo-"+b),f=a("#imgedit-undone-"+b),g=d.intval(f.val())+1;e.hasClass("disabled")||(f.val(g),d.refreshEditor(b,c,function(){var c=a("#imgedit-history-"+b),f=""!==c.val()?JSON.parse(c.val()):[];d.setDisabled(a("#image-redo-"+b),!0),d.setDisabled(e,g<f.length),f.length===g&&a("#image-redo-"+b).focus()}))},redo:function(b,c){var d=this,e=a("#image-redo-"+b),f=a("#imgedit-undone-"+b),g=d.intval(f.val())-1;e.hasClass("disabled")||(f.val(g),d.refreshEditor(b,c,function(){d.setDisabled(a("#image-undo-"+b),!0),d.setDisabled(e,g>0),0===g&&a("#image-undo-"+b).focus()}))},setNumSelection:function(b,c){var d,e,f,g,h,i=a("#imgedit-sel-width-"+b),j=a("#imgedit-sel-height-"+b),k=this.intval(i.val()),l=this.intval(j.val()),m=a("#image-preview-"+b),n=m.height(),o=m.width(),p=this.hold.sizer,q=this.iasapi;if(!1!==this.validateNumeric(c))return k<1?(i.val(""),!1):l<1?(j.val(""),!1):void(k&&l&&(d=q.getSelection())&&(g=d.x1+Math.round(k*p),h=d.y1+Math.round(l*p),e=d.x1,f=d.y1,g>o&&(e=0,g=o,i.val(Math.round(g/p))),h>n&&(f=0,h=n,j.val(Math.round(h/p))),q.setSelection(e,f,g,h),q.update(),this.setCropSelection(b,q.getSelection())))},round:function(a){var b;return a=Math.round(a),this.hold.sizer>.6?a:(b=a.toString().slice(-1),"1"===b?a-1:"9"===b?a+1:a)},setRatioSelection:function(b,c,d){var e,f,g=this.intval(a("#imgedit-crop-width-"+b).val()),h=this.intval(a("#imgedit-crop-height-"+b).val()),i=a("#image-preview-"+b).height();!1!==this.validateNumeric(d)&&g&&h&&(this.iasapi.setOptions({aspectRatio:g+":"+h}),(e=this.iasapi.getSelection(!0))&&(f=Math.ceil(e.y1+(e.x2-e.x1)/(g/h)),f>i&&(f=i,c?a("#imgedit-crop-height-"+b).val(""):a("#imgedit-crop-width-"+b).val("")),this.iasapi.setSelection(e.x1,e.y1,e.x2,f),this.iasapi.update()))},validateNumeric:function(b){if(!this.intval(a(b).val()))return a(b).val(""),!1}}}(jQuery);
\ No newline at end of file
index bfe5f8823a67d04fb5e7daa8c755cf42f4141041..ec42b17bfaa5a52353dc8321266ed9c7e5082fc5 100644 (file)
@@ -1 +1 @@
-window.wp=window.wp||{};var inlineEditPost;!function(a,b){inlineEditPost={init:function(){var b=this,c=a("#inline-edit"),d=a("#bulk-edit");b.type=a("table.widefat").hasClass("pages")?"page":"post",b.what="#post-",c.keyup(function(a){return 27===a.which?inlineEditPost.revert():void 0}),d.keyup(function(a){return 27===a.which?inlineEditPost.revert():void 0}),a(".cancel",c).click(function(){return inlineEditPost.revert()}),a(".save",c).click(function(){return inlineEditPost.save(this)}),a("td",c).keydown(function(b){return 13!==b.which||a(b.target).hasClass("cancel")?void 0:inlineEditPost.save(this)}),a(".cancel",d).click(function(){return inlineEditPost.revert()}),a('#inline-edit .inline-edit-private input[value="private"]').click(function(){var b=a("input.inline-edit-password-input");a(this).prop("checked")?b.val("").prop("disabled",!0):b.prop("disabled",!1)}),a("#the-list").on("click","a.editinline",function(a){a.preventDefault(),inlineEditPost.edit(this)}),a("#bulk-edit").find("fieldset:first").after(a("#inline-edit fieldset.inline-edit-categories").clone()).siblings("fieldset:last").prepend(a("#inline-edit label.inline-edit-tags").clone()),a('select[name="_status"] option[value="future"]',d).remove(),a("#doaction, #doaction2").click(function(c){var d;b.whichBulkButtonId=a(this).attr("id"),d=b.whichBulkButtonId.substr(2),"edit"===a('select[name="'+d+'"]').val()?(c.preventDefault(),b.setBulk()):a("form#posts-filter tr.inline-editor").length>0&&b.revert()})},toggle:function(b){var c=this;"none"===a(c.what+c.getId(b)).css("display")?c.revert():c.edit(b)},setBulk:function(){var b,c="",d=this.type,e=!0;return this.revert(),a("#bulk-edit td").attr("colspan",a("th:visible, td:visible",".widefat:first thead").length),a("table.widefat tbody").prepend(a("#bulk-edit")).prepend('<tr class="hidden"></tr>'),a("#bulk-edit").addClass("inline-editor").show(),a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){e=!1;var b,d=a(this).val();b=a("#inline_"+d+" .post_title").html()||inlineEditL10n.notitle,c+='<div id="ttle'+d+'"><a id="_'+d+'" class="ntdelbutton" title="'+inlineEditL10n.ntdeltitle+'">X</a>'+b+"</div>"}}),e?this.revert():(a("#bulk-titles").html(c),a("#bulk-titles a").click(function(){var b=a(this).attr("id").substr(1);a('table.widefat input[value="'+b+'"]').prop("checked",!1),a("#ttle"+b).remove()}),"post"===d&&(b="post_tag",a('tr.inline-editor textarea[name="tax_input['+b+']"]').suggest(ajaxurl+"?action=ajax-tag-search&tax="+b,{delay:500,minchars:2,multiple:!0,multipleSep:inlineEditL10n.comma})),void a("html, body").animate({scrollTop:0},"fast"))},edit:function(b){var c,d,e,f,g,h,i,j,k,l,m,n=this,o=!0;for(n.revert(),"object"==typeof b&&(b=n.getId(b)),c=["post_title","post_name","post_author","_status","jj","mm","aa","hh","mn","ss","post_password","post_format","menu_order"],"page"===n.type&&c.push("post_parent","page_template"),d=a("#inline-edit").clone(!0),a("td",d).attr("colspan",a("th:visible, td:visible",".widefat:first thead").length),a(n.what+b).removeClass("is-expanded").hide().after(d).after('<tr class="hidden"></tr>'),e=a("#inline_"+b),a(':input[name="post_author"] option[value="'+a(".post_author",e).text()+'"]',d).val()||a(':input[name="post_author"]',d).prepend('<option value="'+a(".post_author",e).text()+'">'+a("#"+n.type+"-"+b+" .author").text()+"</option>"),1===a(':input[name="post_author"] option',d).length&&a("label.inline-edit-author",d).hide(),k=0;k<c.length;k++)l=a("."+c[k],e),l.find("img").replaceWith(function(){return this.alt}),l=l.text(),a(':input[name="'+c[k]+'"]',d).val(l);if("open"===a(".comment_status",e).text()&&a('input[name="comment_status"]',d).prop("checked",!0),"open"===a(".ping_status",e).text()&&a('input[name="ping_status"]',d).prop("checked",!0),"sticky"===a(".sticky",e).text()&&a('input[name="sticky"]',d).prop("checked",!0),a(".post_category",e).each(function(){var c,e=a(this).text();e&&(c=a(this).attr("id").replace("_"+b,""),a("ul."+c+"-checklist :checkbox",d).val(e.split(",")))}),a(".tags_input",e).each(function(){var c=a(this),e=a(this).attr("id").replace("_"+b,""),f=a("textarea.tax_input_"+e,d),g=inlineEditL10n.comma;c.find("img").replaceWith(function(){return this.alt}),c=c.text(),c&&(","!==g&&(c=c.replace(/,/g,g)),f.val(c)),f.suggest(ajaxurl+"?action=ajax-tag-search&tax="+e,{delay:500,minchars:2,multiple:!0,multipleSep:inlineEditL10n.comma})}),f=a("._status",e).text(),"future"!==f&&a('select[name="_status"] option[value="future"]',d).remove(),m=a(".inline-edit-password-input").prop("disabled",!1),"private"===f&&(a('input[name="keep_private"]',d).prop("checked",!0),m.val("").prop("disabled",!0)),g=a('select[name="post_parent"] option[value="'+b+'"]',d),g.length>0){for(h=g[0].className.split("-")[1],i=g;o&&(i=i.next("option"),0!==i.length);)j=i[0].className.split("-")[1],h>=j?o=!1:(i.remove(),i=g);g.remove()}return a(d).attr("id","edit-"+b).addClass("inline-editor").show(),a(".ptitle",d).focus(),!1},save:function(c){var d,e,f=a(".post_status_page").val()||"";return"object"==typeof c&&(c=this.getId(c)),a("table.widefat .spinner").addClass("is-active"),d={action:"inline-save",post_type:typenow,post_ID:c,edit_date:"true",post_status:f},e=a("#edit-"+c).find(":input").serialize(),d=e+"&"+a.param(d),a.post(ajaxurl,d,function(d){var e=a("#edit-"+c+" .inline-edit-save .error");a("table.widefat .spinner").removeClass("is-active"),a(".ac_results").hide(),d?-1!==d.indexOf("<tr")?(a(inlineEditPost.what+c).siblings("tr.hidden").addBack().remove(),a("#edit-"+c).before(d).remove(),a(inlineEditPost.what+c).hide().fadeIn(400,function(){a(this).find(".editinline").focus(),b.a11y.speak(inlineEditL10n.saved)})):(d=d.replace(/<.[^<>]*?>/g,""),e.html(d).show(),b.a11y.speak(e.text())):(e.html(inlineEditL10n.error).show(),b.a11y.speak(inlineEditL10n.error))},"html"),!1},revert:function(){var b=a(".widefat"),c=a(".inline-editor",b).attr("id");return c&&(a(".spinner",b).removeClass("is-active"),a(".ac_results").hide(),"bulk-edit"===c?(a("#bulk-edit",b).removeClass("inline-editor").hide().siblings(".hidden").remove(),a("#bulk-titles").empty(),a("#inlineedit").append(a("#bulk-edit")),a("#"+inlineEditPost.whichBulkButtonId).focus()):(a("#"+c).siblings("tr.hidden").addBack().remove(),c=c.substr(c.lastIndexOf("-")+1),a(this.what+c).show().find(".editinline").focus())),!1},getId:function(b){var c=a(b).closest("tr").attr("id"),d=c.split("-");return d[d.length-1]}},a(document).ready(function(){inlineEditPost.init()}),a(document).on("heartbeat-tick.wp-check-locked-posts",function(b,c){var d=c["wp-check-locked-posts"]||{};a("#the-list tr").each(function(b,c){var e,f,g=c.id,h=a(c);d.hasOwnProperty(g)?h.hasClass("wp-locked")||(e=d[g],h.find(".column-title .locked-text").text(e.text),h.find(".check-column checkbox").prop("checked",!1),e.avatar_src&&(f=a('<img class="avatar avatar-18 photo" width="18" height="18" alt="" />').attr("src",e.avatar_src.replace(/&amp;/g,"&")),h.find(".column-title .locked-avatar").empty().append(f)),h.addClass("wp-locked")):h.hasClass("wp-locked")&&h.removeClass("wp-locked").delay(1e3).find(".locked-info span").empty()})}).on("heartbeat-send.wp-check-locked-posts",function(b,c){var d=[];a("#the-list tr").each(function(a,b){b.id&&d.push(b.id)}),d.length&&(c["wp-check-locked-posts"]=d)}).ready(function(){"undefined"!=typeof b&&b.heartbeat&&b.heartbeat.interval(15)})}(jQuery,window.wp);
\ No newline at end of file
+window.wp=window.wp||{};var inlineEditPost;!function(a,b){inlineEditPost={init:function(){var b=this,c=a("#inline-edit"),d=a("#bulk-edit");b.type=a("table.widefat").hasClass("pages")?"page":"post",b.what="#post-",c.keyup(function(a){if(27===a.which)return inlineEditPost.revert()}),d.keyup(function(a){if(27===a.which)return inlineEditPost.revert()}),a(".cancel",c).click(function(){return inlineEditPost.revert()}),a(".save",c).click(function(){return inlineEditPost.save(this)}),a("td",c).keydown(function(b){if(13===b.which&&!a(b.target).hasClass("cancel"))return inlineEditPost.save(this)}),a(".cancel",d).click(function(){return inlineEditPost.revert()}),a('#inline-edit .inline-edit-private input[value="private"]').click(function(){var b=a("input.inline-edit-password-input");a(this).prop("checked")?b.val("").prop("disabled",!0):b.prop("disabled",!1)}),a("#the-list").on("click","a.editinline",function(a){a.preventDefault(),inlineEditPost.edit(this)}),a("#bulk-edit").find("fieldset:first").after(a("#inline-edit fieldset.inline-edit-categories").clone()).siblings("fieldset:last").prepend(a("#inline-edit label.inline-edit-tags").clone()),a('select[name="_status"] option[value="future"]',d).remove(),a("#doaction, #doaction2").click(function(c){var d;b.whichBulkButtonId=a(this).attr("id"),d=b.whichBulkButtonId.substr(2),"edit"===a('select[name="'+d+'"]').val()?(c.preventDefault(),b.setBulk()):a("form#posts-filter tr.inline-editor").length>0&&b.revert()})},toggle:function(b){var c=this;"none"===a(c.what+c.getId(b)).css("display")?c.revert():c.edit(b)},setBulk:function(){var b,c="",d=this.type,e=!0;return this.revert(),a("#bulk-edit td").attr("colspan",a("th:visible, td:visible",".widefat:first thead").length),a("table.widefat tbody").prepend(a("#bulk-edit")).prepend('<tr class="hidden"></tr>'),a("#bulk-edit").addClass("inline-editor").show(),a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){e=!1;var b,d=a(this).val();b=a("#inline_"+d+" .post_title").html()||inlineEditL10n.notitle,c+='<div id="ttle'+d+'"><a id="_'+d+'" class="ntdelbutton" title="'+inlineEditL10n.ntdeltitle+'">X</a>'+b+"</div>"}}),e?this.revert():(a("#bulk-titles").html(c),a("#bulk-titles a").click(function(){var b=a(this).attr("id").substr(1);a('table.widefat input[value="'+b+'"]').prop("checked",!1),a("#ttle"+b).remove()}),"post"===d&&(b="post_tag",a('tr.inline-editor textarea[name="tax_input['+b+']"]').suggest(ajaxurl+"?action=ajax-tag-search&tax="+b,{delay:500,minchars:2,multiple:!0,multipleSep:inlineEditL10n.comma})),void a("html, body").animate({scrollTop:0},"fast"))},edit:function(b){var c,d,e,f,g,h,i,j,k,l,m,n=this,o=!0;for(n.revert(),"object"==typeof b&&(b=n.getId(b)),c=["post_title","post_name","post_author","_status","jj","mm","aa","hh","mn","ss","post_password","post_format","menu_order"],"page"===n.type&&c.push("post_parent","page_template"),d=a("#inline-edit").clone(!0),a("td",d).attr("colspan",a("th:visible, td:visible",".widefat:first thead").length),a(n.what+b).removeClass("is-expanded").hide().after(d).after('<tr class="hidden"></tr>'),e=a("#inline_"+b),a(':input[name="post_author"] option[value="'+a(".post_author",e).text()+'"]',d).val()||a(':input[name="post_author"]',d).prepend('<option value="'+a(".post_author",e).text()+'">'+a("#"+n.type+"-"+b+" .author").text()+"</option>"),1===a(':input[name="post_author"] option',d).length&&a("label.inline-edit-author",d).hide(),k=0;k<c.length;k++)l=a("."+c[k],e),l.find("img").replaceWith(function(){return this.alt}),l=l.text(),a(':input[name="'+c[k]+'"]',d).val(l);if("open"===a(".comment_status",e).text()&&a('input[name="comment_status"]',d).prop("checked",!0),"open"===a(".ping_status",e).text()&&a('input[name="ping_status"]',d).prop("checked",!0),"sticky"===a(".sticky",e).text()&&a('input[name="sticky"]',d).prop("checked",!0),a(".post_category",e).each(function(){var c,e=a(this).text();e&&(c=a(this).attr("id").replace("_"+b,""),a("ul."+c+"-checklist :checkbox",d).val(e.split(",")))}),a(".tags_input",e).each(function(){var c=a(this),e=a(this).attr("id").replace("_"+b,""),f=a("textarea.tax_input_"+e,d),g=inlineEditL10n.comma;c.find("img").replaceWith(function(){return this.alt}),c=c.text(),c&&(","!==g&&(c=c.replace(/,/g,g)),f.val(c)),f.suggest(ajaxurl+"?action=ajax-tag-search&tax="+e,{delay:500,minchars:2,multiple:!0,multipleSep:inlineEditL10n.comma})}),f=a("._status",e).text(),"future"!==f&&a('select[name="_status"] option[value="future"]',d).remove(),m=a(".inline-edit-password-input").prop("disabled",!1),"private"===f&&(a('input[name="keep_private"]',d).prop("checked",!0),m.val("").prop("disabled",!0)),g=a('select[name="post_parent"] option[value="'+b+'"]',d),g.length>0){for(h=g[0].className.split("-")[1],i=g;o&&(i=i.next("option"),0!==i.length);)j=i[0].className.split("-")[1],j<=h?o=!1:(i.remove(),i=g);g.remove()}return a(d).attr("id","edit-"+b).addClass("inline-editor").show(),a(".ptitle",d).focus(),!1},save:function(c){var d,e,f=a(".post_status_page").val()||"";return"object"==typeof c&&(c=this.getId(c)),a("table.widefat .spinner").addClass("is-active"),d={action:"inline-save",post_type:typenow,post_ID:c,edit_date:"true",post_status:f},e=a("#edit-"+c).find(":input").serialize(),d=e+"&"+a.param(d),a.post(ajaxurl,d,function(d){var e=a("#edit-"+c+" .inline-edit-save .error");a("table.widefat .spinner").removeClass("is-active"),a(".ac_results").hide(),d?-1!==d.indexOf("<tr")?(a(inlineEditPost.what+c).siblings("tr.hidden").addBack().remove(),a("#edit-"+c).before(d).remove(),a(inlineEditPost.what+c).hide().fadeIn(400,function(){a(this).find(".editinline").focus(),b.a11y.speak(inlineEditL10n.saved)})):(d=d.replace(/<.[^<>]*?>/g,""),e.html(d).show(),b.a11y.speak(e.text())):(e.html(inlineEditL10n.error).show(),b.a11y.speak(inlineEditL10n.error))},"html"),!1},revert:function(){var b=a(".widefat"),c=a(".inline-editor",b).attr("id");return c&&(a(".spinner",b).removeClass("is-active"),a(".ac_results").hide(),"bulk-edit"===c?(a("#bulk-edit",b).removeClass("inline-editor").hide().siblings(".hidden").remove(),a("#bulk-titles").empty(),a("#inlineedit").append(a("#bulk-edit")),a("#"+inlineEditPost.whichBulkButtonId).focus()):(a("#"+c).siblings("tr.hidden").addBack().remove(),c=c.substr(c.lastIndexOf("-")+1),a(this.what+c).show().find(".editinline").focus())),!1},getId:function(b){var c=a(b).closest("tr").attr("id"),d=c.split("-");return d[d.length-1]}},a(document).ready(function(){inlineEditPost.init()}),a(document).on("heartbeat-tick.wp-check-locked-posts",function(b,c){var d=c["wp-check-locked-posts"]||{};a("#the-list tr").each(function(b,c){var e,f,g=c.id,h=a(c);d.hasOwnProperty(g)?h.hasClass("wp-locked")||(e=d[g],h.find(".column-title .locked-text").text(e.text),h.find(".check-column checkbox").prop("checked",!1),e.avatar_src&&(f=a('<img class="avatar avatar-18 photo" width="18" height="18" alt="" />').attr("src",e.avatar_src.replace(/&amp;/g,"&")),h.find(".column-title .locked-avatar").empty().append(f)),h.addClass("wp-locked")):h.hasClass("wp-locked")&&h.removeClass("wp-locked").delay(1e3).find(".locked-info span").empty()})}).on("heartbeat-send.wp-check-locked-posts",function(b,c){var d=[];a("#the-list tr").each(function(a,b){b.id&&d.push(b.id)}),d.length&&(c["wp-check-locked-posts"]=d)}).ready(function(){"undefined"!=typeof b&&b.heartbeat&&b.heartbeat.interval(15)})}(jQuery,window.wp);
\ No newline at end of file
index 17095afe9cb1cedb870500a35ac7876f7ec808aa..3bbf4fb72ed8ed4c333108bcfb42d2e0ebfc11d6 100644 (file)
@@ -55,7 +55,7 @@ inlineEditTax = {
                }
 
                editRow = $('#inline-edit').clone(true), rowData = $('#inline_'+id);
-               $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length );
+               $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.wp-list-table.widefat:first thead' ).length );
 
                $(t.what+id).hide().after(editRow).after('<tr class="hidden"></tr>');
 
index 1794b0e91836bfd0f9bc4644bab887cc29313c1f..9ff183add98e8fa9d2b0753ea00a510ea8c36df0 100644 (file)
@@ -1 +1 @@
-window.wp=window.wp||{};var inlineEditTax;!function(a,b){inlineEditTax={init:function(){var b=this,c=a("#inline-edit");b.type=a("#the-list").attr("data-wp-lists").substr(5),b.what="#"+b.type+"-",a("#the-list").on("click","a.editinline",function(){return inlineEditTax.edit(this),!1}),c.keyup(function(a){return 27===a.which?inlineEditTax.revert():void 0}),a(".cancel",c).click(function(){return inlineEditTax.revert()}),a(".save",c).click(function(){return inlineEditTax.save(this)}),a("input, select",c).keydown(function(a){return 13===a.which?inlineEditTax.save(this):void 0}),a('#posts-filter input[type="submit"]').mousedown(function(){b.revert()})},toggle:function(b){var c=this;"none"===a(c.what+c.getId(b)).css("display")?c.revert():c.edit(b)},edit:function(b){var c,d,e,f=this;return f.revert(),"object"==typeof b&&(b=f.getId(b)),c=a("#inline-edit").clone(!0),d=a("#inline_"+b),a("td",c).attr("colspan",a("th:visible, td:visible",".widefat:first thead").length),a(f.what+b).hide().after(c).after('<tr class="hidden"></tr>'),e=a(".name",d),e.find("img").replaceWith(function(){return this.alt}),e=e.text(),a(':input[name="name"]',c).val(e),e=a(".slug",d),e.find("img").replaceWith(function(){return this.alt}),e=e.text(),a(':input[name="slug"]',c).val(e),a(c).attr("id","edit-"+b).addClass("inline-editor").show(),a(".ptitle",c).eq(0).focus(),!1},save:function(c){var d,e,f=a('input[name="taxonomy"]').val()||"";return"object"==typeof c&&(c=this.getId(c)),a("table.widefat .spinner").addClass("is-active"),d={action:"inline-save-tax",tax_type:this.type,tax_ID:c,taxonomy:f},e=a("#edit-"+c).find(":input").serialize(),d=e+"&"+a.param(d),a.post(ajaxurl,d,function(d){var e,f,g,h=a("#edit-"+c+" .inline-edit-save .error");a("table.widefat .spinner").removeClass("is-active"),d?-1!==d.indexOf("<tr")?(a(inlineEditTax.what+c).siblings("tr.hidden").addBack().remove(),f=a(d).attr("id"),a("#edit-"+c).before(d).remove(),f?(g=f.replace(inlineEditTax.type+"-",""),e=a("#"+f)):(g=c,e=a(inlineEditTax.what+c)),a("#parent").find("option[value="+g+"]").text(e.find(".row-title").text()),e.hide().fadeIn(400,function(){e.find(".editinline").focus(),b.a11y.speak(inlineEditL10n.saved)})):(h.html(d).show(),b.a11y.speak(h.text())):(h.html(inlineEditL10n.error).show(),b.a11y.speak(inlineEditL10n.error))}),!1},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");b&&(a("table.widefat .spinner").removeClass("is-active"),a("#"+b).siblings("tr.hidden").addBack().remove(),b=b.substr(b.lastIndexOf("-")+1),a(this.what+b).show().find(".editinline").focus())},getId:function(b){var c="TR"===b.tagName?b.id:a(b).parents("tr").attr("id"),d=c.split("-");return d[d.length-1]}},a(document).ready(function(){inlineEditTax.init()})}(jQuery,window.wp);
\ No newline at end of file
+window.wp=window.wp||{};var inlineEditTax;!function(a,b){inlineEditTax={init:function(){var b=this,c=a("#inline-edit");b.type=a("#the-list").attr("data-wp-lists").substr(5),b.what="#"+b.type+"-",a("#the-list").on("click","a.editinline",function(){return inlineEditTax.edit(this),!1}),c.keyup(function(a){if(27===a.which)return inlineEditTax.revert()}),a(".cancel",c).click(function(){return inlineEditTax.revert()}),a(".save",c).click(function(){return inlineEditTax.save(this)}),a("input, select",c).keydown(function(a){if(13===a.which)return inlineEditTax.save(this)}),a('#posts-filter input[type="submit"]').mousedown(function(){b.revert()})},toggle:function(b){var c=this;"none"===a(c.what+c.getId(b)).css("display")?c.revert():c.edit(b)},edit:function(b){var c,d,e,f=this;return f.revert(),"object"==typeof b&&(b=f.getId(b)),c=a("#inline-edit").clone(!0),d=a("#inline_"+b),a("td",c).attr("colspan",a("th:visible, td:visible",".wp-list-table.widefat:first thead").length),a(f.what+b).hide().after(c).after('<tr class="hidden"></tr>'),e=a(".name",d),e.find("img").replaceWith(function(){return this.alt}),e=e.text(),a(':input[name="name"]',c).val(e),e=a(".slug",d),e.find("img").replaceWith(function(){return this.alt}),e=e.text(),a(':input[name="slug"]',c).val(e),a(c).attr("id","edit-"+b).addClass("inline-editor").show(),a(".ptitle",c).eq(0).focus(),!1},save:function(c){var d,e,f=a('input[name="taxonomy"]').val()||"";return"object"==typeof c&&(c=this.getId(c)),a("table.widefat .spinner").addClass("is-active"),d={action:"inline-save-tax",tax_type:this.type,tax_ID:c,taxonomy:f},e=a("#edit-"+c).find(":input").serialize(),d=e+"&"+a.param(d),a.post(ajaxurl,d,function(d){var e,f,g,h=a("#edit-"+c+" .inline-edit-save .error");a("table.widefat .spinner").removeClass("is-active"),d?-1!==d.indexOf("<tr")?(a(inlineEditTax.what+c).siblings("tr.hidden").addBack().remove(),f=a(d).attr("id"),a("#edit-"+c).before(d).remove(),f?(g=f.replace(inlineEditTax.type+"-",""),e=a("#"+f)):(g=c,e=a(inlineEditTax.what+c)),a("#parent").find("option[value="+g+"]").text(e.find(".row-title").text()),e.hide().fadeIn(400,function(){e.find(".editinline").focus(),b.a11y.speak(inlineEditL10n.saved)})):(h.html(d).show(),b.a11y.speak(h.text())):(h.html(inlineEditL10n.error).show(),b.a11y.speak(inlineEditL10n.error))}),!1},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");b&&(a("table.widefat .spinner").removeClass("is-active"),a("#"+b).siblings("tr.hidden").addBack().remove(),b=b.substr(b.lastIndexOf("-")+1),a(this.what+b).show().find(".editinline").focus())},getId:function(b){var c="TR"===b.tagName?b.id:a(b).parents("tr").attr("id"),d=c.split("-");return d[d.length-1]}},a(document).ready(function(){inlineEditTax.init()})}(jQuery,window.wp);
\ No newline at end of file
index 9fe81e93de48a11b7404614bba14c2393db8d2e7..3151c758c685291e7eeb54003ae5a258094eadf2 100644 (file)
@@ -1 +1 @@
-var wpActiveEditor,send_to_editor;send_to_editor=function(a){var b,c="undefined"!=typeof tinymce,d="undefined"!=typeof QTags;if(wpActiveEditor)c&&(b=tinymce.get(wpActiveEditor));else if(c&&tinymce.activeEditor)b=tinymce.activeEditor,wpActiveEditor=b.id;else if(!d)return!1;if(b&&!b.isHidden()?b.execCommand("mceInsertContent",!1,a):d?QTags.insertContent(a):document.getElementById(wpActiveEditor).value+=a,window.tb_remove)try{window.tb_remove()}catch(e){}};var tb_position;!function(a){tb_position=function(){var b=a("#TB_window"),c=a(window).width(),d=a(window).height(),e=c>833?833:c,f=0;return a("#wpadminbar").length&&(f=parseInt(a("#wpadminbar").css("height"),10)),b.length&&(b.width(e-50).height(d-45-f),a("#TB_iframeContent").width(e-50).height(d-75-f),b.css({"margin-left":"-"+parseInt((e-50)/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&b.css({top:20+f+"px","margin-top":"0"})),a("a.thickbox").each(function(){var b=a(this).attr("href");b&&(b=b.replace(/&width=[0-9]+/g,""),b=b.replace(/&height=[0-9]+/g,""),a(this).attr("href",b+"&width="+(e-80)+"&height="+(d-85-f)))})},a(window).resize(function(){tb_position()})}(jQuery);
\ No newline at end of file
+var wpActiveEditor,send_to_editor;send_to_editor=function(a){var b,c="undefined"!=typeof tinymce,d="undefined"!=typeof QTags;if(wpActiveEditor)c&&(b=tinymce.get(wpActiveEditor));else if(c&&tinymce.activeEditor)b=tinymce.activeEditor,wpActiveEditor=b.id;else if(!d)return!1;if(b&&!b.isHidden()?b.execCommand("mceInsertContent",!1,a):d?QTags.insertContent(a):document.getElementById(wpActiveEditor).value+=a,window.tb_remove)try{window.tb_remove()}catch(e){}};var tb_position;!function(a){tb_position=function(){var b=a("#TB_window"),c=a(window).width(),d=a(window).height(),e=833<c?833:c,f=0;return a("#wpadminbar").length&&(f=parseInt(a("#wpadminbar").css("height"),10)),b.length&&(b.width(e-50).height(d-45-f),a("#TB_iframeContent").width(e-50).height(d-75-f),b.css({"margin-left":"-"+parseInt((e-50)/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&b.css({top:20+f+"px","margin-top":"0"})),a("a.thickbox").each(function(){var b=a(this).attr("href");b&&(b=b.replace(/&width=[0-9]+/g,""),b=b.replace(/&height=[0-9]+/g,""),a(this).attr("href",b+"&width="+(e-80)+"&height="+(d-85-f)))})},a(window).resize(function(){tb_position()})}(jQuery);
\ No newline at end of file
index f0c21752c652a3b122e81b7cc90ec92f68db13c6..e23adebb17d8a8f3c2b85e31f06b241697ff5670 100644 (file)
@@ -1,4 +1,4 @@
-/* global ajaxurl, attachMediaBoxL10n, _wpMediaGridSettings */
+/* global ajaxurl, attachMediaBoxL10n, _wpMediaGridSettings, showNotice */
 
 var findPosts;
 ( function( $ ){
@@ -99,9 +99,15 @@ var findPosts;
                $( '#find-posts-close' ).click( findPosts.close );
                $( '#doaction, #doaction2' ).click( function( event ) {
                        $( 'select[name^="action"]' ).each( function() {
-                               if ( $(this).val() === 'attach' ) {
+                               var optionValue = $( this ).val();
+
+                               if ( 'attach' === optionValue ) {
                                        event.preventDefault();
                                        findPosts.open();
+                               } else if ( 'delete' === optionValue ) {
+                                       if ( ! showNotice.warn() ) {
+                                               event.preventDefault();
+                                       }
                                }
                        });
                });
index 357c58ef3ff824499dedfc0c09022def86c8e161..ca6f8624b99938e948008316b69aaf57535fad3a 100644 (file)
@@ -1 +1 @@
-var findPosts;!function(a){findPosts={open:function(b,c){var d=a(".ui-find-overlay");return 0===d.length&&(a("body").append('<div class="ui-find-overlay"></div>'),findPosts.overlay()),d.show(),b&&c&&a("#affected").attr("name",b).val(c),a("#find-posts").show(),a("#find-posts-input").focus().keyup(function(a){27==a.which&&findPosts.close()}),findPosts.send(),!1},close:function(){a("#find-posts-response").empty(),a("#find-posts").hide(),a(".ui-find-overlay").hide()},overlay:function(){a(".ui-find-overlay").on("click",function(){findPosts.close()})},send:function(){var b={ps:a("#find-posts-input").val(),action:"find_posts",_ajax_nonce:a("#_ajax_nonce").val()},c=a(".find-box-search .spinner");c.addClass("is-active"),a.ajax(ajaxurl,{type:"POST",data:b,dataType:"json"}).always(function(){c.removeClass("is-active")}).done(function(b){b.success||a("#find-posts-response").text(attachMediaBoxL10n.error),a("#find-posts-response").html(b.data)}).fail(function(){a("#find-posts-response").text(attachMediaBoxL10n.error)})}},a(document).ready(function(){var b,c=a("#wp-media-grid");c.length&&window.wp&&window.wp.media&&(b=_wpMediaGridSettings,window.wp.media({frame:"manage",container:c,library:b.queryVars}).open()),a("#find-posts-submit").click(function(b){a('#find-posts-response input[type="radio"]:checked').length||b.preventDefault()}),a("#find-posts .find-box-search :input").keypress(function(a){return 13==a.which?(findPosts.send(),!1):void 0}),a("#find-posts-search").click(findPosts.send),a("#find-posts-close").click(findPosts.close),a("#doaction, #doaction2").click(function(b){a('select[name^="action"]').each(function(){"attach"===a(this).val()&&(b.preventDefault(),findPosts.open())})}),a(".find-box-inside").on("click","tr",function(){a(this).find(".found-radio input").prop("checked",!0)})})}(jQuery);
\ No newline at end of file
+var findPosts;!function(a){findPosts={open:function(b,c){var d=a(".ui-find-overlay");return 0===d.length&&(a("body").append('<div class="ui-find-overlay"></div>'),findPosts.overlay()),d.show(),b&&c&&a("#affected").attr("name",b).val(c),a("#find-posts").show(),a("#find-posts-input").focus().keyup(function(a){27==a.which&&findPosts.close()}),findPosts.send(),!1},close:function(){a("#find-posts-response").empty(),a("#find-posts").hide(),a(".ui-find-overlay").hide()},overlay:function(){a(".ui-find-overlay").on("click",function(){findPosts.close()})},send:function(){var b={ps:a("#find-posts-input").val(),action:"find_posts",_ajax_nonce:a("#_ajax_nonce").val()},c=a(".find-box-search .spinner");c.addClass("is-active"),a.ajax(ajaxurl,{type:"POST",data:b,dataType:"json"}).always(function(){c.removeClass("is-active")}).done(function(b){b.success||a("#find-posts-response").text(attachMediaBoxL10n.error),a("#find-posts-response").html(b.data)}).fail(function(){a("#find-posts-response").text(attachMediaBoxL10n.error)})}},a(document).ready(function(){var b,c=a("#wp-media-grid");c.length&&window.wp&&window.wp.media&&(b=_wpMediaGridSettings,window.wp.media({frame:"manage",container:c,library:b.queryVars}).open()),a("#find-posts-submit").click(function(b){a('#find-posts-response input[type="radio"]:checked').length||b.preventDefault()}),a("#find-posts .find-box-search :input").keypress(function(a){if(13==a.which)return findPosts.send(),!1}),a("#find-posts-search").click(findPosts.send),a("#find-posts-close").click(findPosts.close),a("#doaction, #doaction2").click(function(b){a('select[name^="action"]').each(function(){var c=a(this).val();"attach"===c?(b.preventDefault(),findPosts.open()):"delete"===c&&(showNotice.warn()||b.preventDefault())})}),a(".find-box-inside").on("click","tr",function(){a(this).find(".found-radio input").prop("checked",!0)})})}(jQuery);
\ No newline at end of file
index 7876e30131aa193ee1657df71d16aceaa4e54e35..8fda6814e66521d60aeebfe7cf56ac993bd62dad 100644 (file)
@@ -1 +1 @@
-var wpNavMenu;!function(a){var b;b=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11,sortableItems:"> *",targetTolerance:0},menuList:void 0,targetList:void 0,menusChanged:!1,isRTL:!("undefined"==typeof isRtl||!isRtl),negateIfRTL:"undefined"!=typeof isRtl&&isRtl?-1:1,lastSearch:"",init:function(){b.menuList=a("#menu-to-edit"),b.targetList=b.menuList,this.jQueryExtensions(),this.attachMenuEditListeners(),this.attachQuickSearchListeners(),this.attachThemeLocationsListeners(),this.attachMenuSaveSubmitListeners(),this.attachTabsPanelListeners(),this.attachUnsavedChangesListener(),b.menuList.length&&this.initSortables(),menus.oneThemeLocationNoMenus&&a("#posttype-page").addSelectedToMenu(b.addMenuItemToBottom),this.initManageLocations(),this.initAccessibility(),this.initToggles(),this.initPreviewing()},jQueryExtensions:function(){a.fn.extend({menuItemDepth:function(){var a=b.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return b.pxToDepth(a&&-1!=a.indexOf("px")?a.slice(0,-2):0)},updateDepthClass:function(b,c){return this.each(function(){var d=a(this);c=c||d.menuItemDepth(),a(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+b)})},shiftDepthClass:function(b){return this.each(function(){var c=a(this),d=c.menuItemDepth();a(this).removeClass("menu-item-depth-"+d).addClass("menu-item-depth-"+(d+b))})},childMenuItems:function(){var b=a();return this.each(function(){for(var c=a(this),d=c.menuItemDepth(),e=c.next(".menu-item");e.length&&e.menuItemDepth()>d;)b=b.add(e),e=e.next(".menu-item")}),b},shiftHorizontally:function(b){return this.each(function(){var c=a(this),d=c.menuItemDepth(),e=d+b;c.moveHorizontally(e,d)})},moveHorizontally:function(b,c){return this.each(function(){var d=a(this),e=d.childMenuItems(),f=b-c,g=d.find(".is-submenu");d.updateDepthClass(b,c).updateParentMenuItemDBId(),e&&e.each(function(){var b=a(this),c=b.menuItemDepth(),d=c+f;b.updateDepthClass(d,c).updateParentMenuItemDBId()}),0===b?g.hide():g.show()})},updateParentMenuItemDBId:function(){return this.each(function(){var b=a(this),c=b.find(".menu-item-data-parent-id"),d=parseInt(b.menuItemDepth(),10),e=d-1,f=b.prevAll(".menu-item-depth-"+e).first();0===d?c.val(0):c.val(f.find(".menu-item-data-db-id").val())})},hideAdvancedMenuItemFields:function(){return this.each(function(){var b=a(this);a(".hide-column-tog").not(":checked").each(function(){b.find(".field-"+a(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return 0===a("#menu-to-edit").length?!1:this.each(function(){var d=a(this),e={},f=menus.oneThemeLocationNoMenus&&0===d.find(".tabs-panel-active .categorychecklist li input:checked").length?d.find('#page-all li input[type="checkbox"]'):d.find(".tabs-panel-active .categorychecklist li input:checked"),g=/menu-item\[([^\]]*)/;return c=c||b.addMenuItemToBottom,f.length?(d.find(".button-controls .spinner").addClass("is-active"),a(f).each(function(){var d=a(this),f=g.exec(d.attr("name")),h="undefined"==typeof f[1]?0:parseInt(f[1],10);this.className&&-1!=this.className.indexOf("add-to-top")&&(c=b.addMenuItemToTop),e[h]=d.closest("li").getItemData("add-menu-item",h)}),void b.addItemToMenu(e,c,function(){f.removeAttr("checked"),d.find(".button-controls .spinner").removeClass("is-active")})):!1})},getItemData:function(a,b){a=a||"menu-item";var c,d={},e=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];return b||"menu-item"!=a||(b=this.find(".menu-item-data-db-id").val()),b?(this.find("input").each(function(){var f;for(c=e.length;c--;)"menu-item"==a?f=e[c]+"["+b+"]":"add-menu-item"==a&&(f="menu-item["+b+"]["+e[c]+"]"),this.name&&f==this.name&&(d[e[c]]=this.value)}),d):d},setItemData:function(b,c,d){return c=c||"menu-item",d||"menu-item"!=c||(d=a(".menu-item-data-db-id",this).val()),d?(this.find("input").each(function(){var e,f=a(this);a.each(b,function(a,b){"menu-item"==c?e=a+"["+d+"]":"add-menu-item"==c&&(e="menu-item["+d+"]["+a+"]"),e==f.attr("name")&&f.val(b)})}),this):this}})},countMenuItems:function(b){return a(".menu-item-depth-"+b).length},moveMenuItem:function(c,d){var e,f,g,h=a("#menu-to-edit li"),i=h.length,j=c.parents("li.menu-item"),k=j.childMenuItems(),l=j.getItemData(),m=parseInt(j.menuItemDepth(),10),n=parseInt(j.index(),10),o=j.next(),p=o.childMenuItems(),q=parseInt(o.menuItemDepth(),10)+1,r=j.prev(),s=parseInt(r.menuItemDepth(),10),t=r.getItemData()["menu-item-db-id"];switch(d){case"up":if(f=n-1,0===n)break;0===f&&0!==m&&j.moveHorizontally(0,m),0!==s&&j.moveHorizontally(s,m),k?(e=j.add(k),e.detach().insertBefore(h.eq(f)).updateParentMenuItemDBId()):j.detach().insertBefore(h.eq(f)).updateParentMenuItemDBId();break;case"down":if(k){if(e=j.add(k),o=h.eq(e.length+n),p=0!==o.childMenuItems().length,p&&(g=parseInt(o.menuItemDepth(),10)+1,j.moveHorizontally(g,m)),i===n+e.length)break;e.detach().insertAfter(h.eq(n+e.length)).updateParentMenuItemDBId()}else{if(0!==p.length&&j.moveHorizontally(q,m),i===n+1)break;j.detach().insertAfter(h.eq(n+1)).updateParentMenuItemDBId()}break;case"top":if(0===n)break;k?(e=j.add(k),e.detach().insertBefore(h.eq(0)).updateParentMenuItemDBId()):j.detach().insertBefore(h.eq(0)).updateParentMenuItemDBId();break;case"left":if(0===m)break;j.shiftHorizontally(-1);break;case"right":if(0===n)break;if(l["menu-item-parent-id"]===t)break;j.shiftHorizontally(1)}c.focus(),b.registerChange(),b.refreshKeyboardAccessibility(),b.refreshAdvancedAccessibility()},initAccessibility:function(){var c=a("#menu-to-edit");b.refreshKeyboardAccessibility(),b.refreshAdvancedAccessibility(),c.on("mouseenter.refreshAccessibility focus.refreshAccessibility touchstart.refreshAccessibility",".menu-item",function(){b.refreshAdvancedAccessibilityOfItem(a(this).find("a.item-edit"))}),c.on("click","a.item-edit",function(){b.refreshAdvancedAccessibilityOfItem(a(this))}),c.on("click",".menus-move",function(c){var d=a(this),e=d.data("dir");"undefined"!=typeof e&&b.moveMenuItem(a(this).parents("li.menu-item").find("a.item-edit"),e),c.preventDefault()})},refreshAdvancedAccessibilityOfItem:function(b){if(!0===a(b).data("needs_accessibility_refresh")){var c,d,e,f,g,h,i,j,k,l=a(b),m=l.closest("li.menu-item").first(),n=m.menuItemDepth(),o=0===n,p=l.closest(".menu-item-handle").find(".menu-item-title").text(),q=parseInt(m.index(),10),r=o?n:parseInt(n-1,10),s=m.prevAll(".menu-item-depth-"+r).first().find(".menu-item-title").text(),t=m.prevAll(".menu-item-depth-"+n).first().find(".menu-item-title").text(),u=a("#menu-to-edit li").length,v=m.nextAll(".menu-item-depth-"+n).length;m.find(".field-move").toggle(u>1),0!==q&&(c=m.find(".menus-move-up"),c.attr("aria-label",menus.moveUp).css("display","inline")),0!==q&&o&&(c=m.find(".menus-move-top"),c.attr("aria-label",menus.moveToTop).css("display","inline")),q+1!==u&&0!==q&&(c=m.find(".menus-move-down"),c.attr("aria-label",menus.moveDown).css("display","inline")),0===q&&0!==v&&(c=m.find(".menus-move-down"),c.attr("aria-label",menus.moveDown).css("display","inline")),o||(c=m.find(".menus-move-left"),d=menus.outFrom.replace("%s",s),c.attr("aria-label",menus.moveOutFrom.replace("%s",s)).text(d).css("display","inline")),0!==q&&m.find(".menu-item-data-parent-id").val()!==m.prev().find(".menu-item-data-db-id").val()&&(c=m.find(".menus-move-right"),d=menus.under.replace("%s",t),c.attr("aria-label",menus.moveUnder.replace("%s",t)).text(d).css("display","inline")),o?(e=a(".menu-item-depth-0"),f=e.index(m)+1,u=e.length,g=menus.menuFocus.replace("%1$s",p).replace("%2$d",f).replace("%3$d",u)):(h=m.prevAll(".menu-item-depth-"+parseInt(n-1,10)).first(),i=h.find(".menu-item-data-db-id").val(),j=h.find(".menu-item-title").text(),k=a('.menu-item .menu-item-data-parent-id[value="'+i+'"]'),f=a(k.parents(".menu-item").get().reverse()).index(m)+1,g=menus.subMenuFocus.replace("%1$s",p).replace("%2$d",f).replace("%3$s",j)),l.attr("aria-label",g).text(g),l.data("needs_accessibility_refresh",!1)}},refreshAdvancedAccessibility:function(){a(".menu-item-settings .field-move a").hide(),a("a.item-edit").data("needs_accessibility_refresh",!0),a(".menu-item-edit-active a.item-edit").each(function(){b.refreshAdvancedAccessibilityOfItem(this)})},refreshKeyboardAccessibility:function(){a("a.item-edit").off("focus").on("focus",function(){a(this).off("keydown").on("keydown",function(c){var d,e=a(this),f=e.parents("li.menu-item"),g=f.getItemData();if((37==c.which||38==c.which||39==c.which||40==c.which)&&(e.off("keydown"),1!==a("#menu-to-edit li").length)){switch(d={38:"up",40:"down",37:"left",39:"right"},a("body").hasClass("rtl")&&(d={38:"up",40:"down",39:"left",37:"right"}),d[c.which]){case"up":b.moveMenuItem(e,"up");break;case"down":b.moveMenuItem(e,"down");break;case"left":b.moveMenuItem(e,"left");break;case"right":b.moveMenuItem(e,"right")}return a("#edit-"+g["menu-item-db-id"]).focus(),!1}})})},initPreviewing:function(){a("#menu-to-edit").on("change input",".edit-menu-item-title",function(b){var c,d,e=a(b.currentTarget);c=e.val(),d=e.closest(".menu-item").find(".menu-item-title"),c?d.text(c).removeClass("no-title"):d.text(navMenuL10n.untitled).addClass("no-title")})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus"),columns.useCheckboxesForHidden(),columns.checked=function(b){a(".field-"+b).removeClass("hidden-field")},columns.unchecked=function(b){a(".field-"+b).addClass("hidden-field")},b.menuList.hideAdvancedMenuItemFields(),a(".hide-postbox-tog").click(function(){var b=a(".accordion-container li.accordion-section").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"closed-postboxes",hidden:b,closedpostboxesnonce:jQuery("#closedpostboxesnonce").val(),page:"nav-menus"})})},initSortables:function(){function c(a){var c;j=a.placeholder.prev(".menu-item"),k=a.placeholder.next(".menu-item"),j[0]==a.item[0]&&(j=j.prev(".menu-item")),k[0]==a.item[0]&&(k=k.next(".menu-item")),l=j.length?j.offset().top+j.height():0,m=k.length?k.offset().top+k.height()/3:0,h=k.length?k.menuItemDepth():0,i=j.length?(c=j.menuItemDepth()+1)>b.options.globalMaxDepth?b.options.globalMaxDepth:c:0}function d(a,b){a.placeholder.updateDepthClass(b,q),q=b}function e(){if(!s[0].className)return 0;var a=s[0].className.match(/menu-max-depth-(\d+)/);return a&&a[1]?parseInt(a[1],10):0}function f(c){var d,e=t;if(0!==c){if(c>0)d=p+c,d>t&&(e=d);else if(0>c&&p==t)for(;!a(".menu-item-depth-"+e,b.menuList).length&&e>0;)e--;s.removeClass("menu-max-depth-"+t).addClass("menu-max-depth-"+e),t=e}}var g,h,i,j,k,l,m,n,o,p,q=0,r=b.menuList.offset().left,s=a("body"),t=e();0!==a("#menu-to-edit li").length&&a(".drag-instructions").show(),r+=b.isRTL?b.menuList.width():0,b.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",items:b.options.sortableItems,start:function(e,f){var h,i,j,k,l;b.isRTL&&(f.item[0].style.right="auto"),o=f.item.children(".menu-item-transport"),g=f.item.menuItemDepth(),d(f,g),j=f.item.next()[0]==f.placeholder[0]?f.item.next():f.item,k=j.childMenuItems(),o.append(k),h=o.outerHeight(),h+=h>0?1*f.placeholder.css("margin-top").slice(0,-2):0,h+=f.helper.outerHeight(),n=h,h-=2,f.placeholder.height(h),p=g,k.each(function(){var b=a(this).menuItemDepth();p=b>p?b:p}),i=f.helper.find(".menu-item-handle").outerWidth(),i+=b.depthToPx(p-g),i-=2,f.placeholder.width(i),l=f.placeholder.next(".menu-item"),l.css("margin-top",n+"px"),f.placeholder.detach(),a(this).sortable("refresh"),f.item.after(f.placeholder),l.css("margin-top",0),c(f)},stop:function(a,c){var d,e,h=q-g;d=o.children().insertAfter(c.item),e=c.item.find(".item-title .is-submenu"),q>0?e.show():e.hide(),0!==h&&(c.item.updateDepthClass(q),d.shiftDepthClass(h),f(h)),b.registerChange(),c.item.updateParentMenuItemDBId(),c.item[0].style.top=0,b.isRTL&&(c.item[0].style.left="auto",c.item[0].style.right=0),b.refreshKeyboardAccessibility(),b.refreshAdvancedAccessibility()},change:function(a,d){d.placeholder.parent().hasClass("menu")||(j.length?j.after(d.placeholder):b.menuList.prepend(d.placeholder)),c(d)},sort:function(e,f){var g=f.helper.offset(),j=b.isRTL?g.left+f.helper.width():g.left,o=b.negateIfRTL*b.pxToDepth(j-r);o>i||g.top<l-b.options.targetTolerance?o=i:h>o&&(o=h),o!=q&&d(f,o),m&&g.top+n>m&&(k.after(f.placeholder),c(f),a(this).sortable("refreshPositions"))}})},initManageLocations:function(){a("#menu-locations-wrap form").submit(function(){window.onbeforeunload=null}),a(".menu-location-menus select").on("change",function(){var b=a(this).closest("tr").find(".locations-edit-menu-link");a(this).find("option:selected").data("orig")?b.show():b.hide()})},attachMenuEditListeners:function(){var b=this;a("#update-nav-menu").bind("click",function(a){if(a.target&&a.target.className){if(-1!=a.target.className.indexOf("item-edit"))return b.eventOnClickEditLink(a.target);if(-1!=a.target.className.indexOf("menu-save"))return b.eventOnClickMenuSave(a.target);if(-1!=a.target.className.indexOf("menu-delete"))return b.eventOnClickMenuDelete(a.target);if(-1!=a.target.className.indexOf("item-delete"))return b.eventOnClickMenuItemDelete(a.target);if(-1!=a.target.className.indexOf("item-cancel"))return b.eventOnClickCancelLink(a.target)}}),a('#add-custom-links input[type="text"]').keypress(function(b){a("#customlinkdiv").removeClass("form-invalid"),13===b.keyCode&&(b.preventDefault(),a("#submit-customlinkdiv").click())})},attachMenuSaveSubmitListeners:function(){a("#update-nav-menu").submit(function(){var b=a("#update-nav-menu").serializeArray();a('[name="nav-menu-data"]').val(JSON.stringify(b))})},attachThemeLocationsListeners:function(){var b=a("#nav-menu-theme-locations"),c={};c.action="menu-locations-save",c["menu-settings-column-nonce"]=a("#menu-settings-column-nonce").val(),b.find('input[type="submit"]').click(function(){return b.find("select").each(function(){c[this.name]=a(this).val()}),b.find(".spinner").addClass("is-active"),a.post(ajaxurl,c,function(){b.find(".spinner").removeClass("is-active")}),!1})},attachQuickSearchListeners:function(){var c,d;a("#nav-menu-meta").on("submit",function(a){a.preventDefault()}),d="oninput"in document.createElement("input")?"input":"keyup",a(".quick-search").on(d,function(){var d=a(this);c&&clearTimeout(c),c=setTimeout(function(){b.updateQuickSearchResults(d)},500)}).on("blur",function(){b.lastSearch=""}).attr("autocomplete","off")},updateQuickSearchResults:function(c){var d,e,f=2,g=c.val();g.length<f||b.lastSearch==g||(b.lastSearch=g,d=c.parents(".tabs-panel"),e={action:"menu-quick-search","response-format":"markup",menu:a("#menu").val(),"menu-settings-column-nonce":a("#menu-settings-column-nonce").val(),q:g,type:c.attr("name")},a(".spinner",d).addClass("is-active"),a.post(ajaxurl,e,function(a){b.processQuickSearchQueryResponse(a,e,d)}))},addCustomLink:function(c){var d=a("#custom-menu-item-url").val(),e=a("#custom-menu-item-name").val();return c=c||b.addMenuItemToBottom,""===d||"http://"==d?(a("#customlinkdiv").addClass("form-invalid"),!1):(a(".customlinkdiv .spinner").addClass("is-active"),void this.addLinkToMenu(d,e,c,function(){a(".customlinkdiv .spinner").removeClass("is-active"),a("#custom-menu-item-name").val("").blur(),a("#custom-menu-item-url").val("http://")}))},addLinkToMenu:function(a,c,d,e){d=d||b.addMenuItemToBottom,e=e||function(){},b.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":a,"menu-item-title":c}},d,e)},addItemToMenu:function(b,c,d){var e,f=a("#menu").val(),g=a("#menu-settings-column-nonce").val();c=c||function(){},d=d||function(){},e={action:"add-menu-item",menu:f,"menu-settings-column-nonce":g,"menu-item":b},a.post(ajaxurl,e,function(b){var f=a("#menu-instructions");b=a.trim(b),c(b,e),a("li.pending").hide().fadeIn("slow"),a(".drag-instructions").show(),!f.hasClass("menu-instructions-inactive")&&f.siblings().length&&f.addClass("menu-instructions-inactive"),d()})},addMenuItemToBottom:function(c){a(c).hideAdvancedMenuItemFields().appendTo(b.targetList),b.refreshKeyboardAccessibility(),b.refreshAdvancedAccessibility()},addMenuItemToTop:function(c){a(c).hideAdvancedMenuItemFields().prependTo(b.targetList),b.refreshKeyboardAccessibility(),b.refreshAdvancedAccessibility()},attachUnsavedChangesListener:function(){a("#menu-management input, #menu-management select, #menu-management, #menu-management textarea, .menu-location-menus select").change(function(){b.registerChange()}),0!==a("#menu-to-edit").length||0!==a(".menu-location-menus select").length?window.onbeforeunload=function(){return b.menusChanged?navMenuL10n.saveAlert:void 0}:a("#menu-settings-column").find("input,select").end().find("a").attr("href","#").unbind("click")},registerChange:function(){b.menusChanged=!0},attachTabsPanelListeners:function(){a("#menu-settings-column").bind("click",function(c){var d,e,f,g,h=a(c.target);if(h.hasClass("nav-tab-link"))e=h.data("type"),f=h.parents(".accordion-section-content").first(),a("input",f).removeAttr("checked"),a(".tabs-panel-active",f).removeClass("tabs-panel-active").addClass("tabs-panel-inactive"),a("#"+e,f).removeClass("tabs-panel-inactive").addClass("tabs-panel-active"),a(".tabs",f).removeClass("tabs"),h.parent().addClass("tabs"),a(".quick-search",f).focus(),c.preventDefault();else if(h.hasClass("select-all")){if(d=/#(.*)$/.exec(c.target.href),d&&d[1])return g=a("#"+d[1]+" .tabs-panel-active .menu-item-title input"),g.length===g.filter(":checked").length?g.removeAttr("checked"):g.prop("checked",!0),!1}else{if(h.hasClass("submit-add-to-menu"))return b.registerChange(),c.target.id&&"submit-customlinkdiv"==c.target.id?b.addCustomLink(b.addMenuItemToBottom):c.target.id&&-1!=c.target.id.indexOf("submit-")&&a("#"+c.target.id.replace(/submit-/,"")).addSelectedToMenu(b.addMenuItemToBottom),!1;if(h.hasClass("page-numbers"))return a.post(ajaxurl,c.target.href.replace(/.*\?/,"").replace(/action=([^&]*)/,"")+"&action=menu-get-metabox",function(b){if(-1!=b.indexOf("replace-id")){var c=a.parseJSON(b),d=document.getElementById(c["replace-id"]),e=document.createElement("div"),f=document.createElement("div");c.markup&&d&&(f.innerHTML=c.markup?c.markup:"",d.parentNode.insertBefore(e,d),e.parentNode.removeChild(d),e.parentNode.insertBefore(f,e),e.parentNode.removeChild(e))}}),!1}})},eventOnClickEditLink:function(b){var c,d,e=/#(.*)$/.exec(b.href);return e&&e[1]&&(c=a("#"+e[1]),d=c.parent(),0!==d.length)?(d.hasClass("menu-item-edit-inactive")?(c.data("menu-item-data")||c.data("menu-item-data",c.getItemData()),c.slideDown("fast"),d.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")):(c.slideUp("fast"),d.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")),!1):void 0},eventOnClickCancelLink:function(b){var c=a(b).closest(".menu-item-settings"),d=a(b).closest(".menu-item");return d.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive"),c.setItemData(c.data("menu-item-data")).hide(),!1},eventOnClickMenuSave:function(){var c="",d=a("#menu-name"),e=d.val();return e&&e!=d.attr("title")&&e.replace(/\s+/,"")?(a("#nav-menu-theme-locations select").each(function(){c+='<input type="hidden" name="'+this.name+'" value="'+a(this).val()+'" />'}),a("#update-nav-menu").append(c),b.menuList.find(".menu-item-data-position").val(function(a){return a+1}),window.onbeforeunload=null,!0):(d.parent().addClass("form-invalid"),!1)},eventOnClickMenuDelete:function(){return window.confirm(navMenuL10n.warnDeleteMenu)?(window.onbeforeunload=null,!0):!1},eventOnClickMenuItemDelete:function(c){var d=parseInt(c.id.replace("delete-",""),10);return b.removeMenuItem(a("#menu-item-"+d)),b.registerChange(),!1},processQuickSearchQueryResponse:function(b,c,d){var e,f,g,h={},i=document.getElementById("nav-menu-meta"),j=/menu-item[(\[^]\]*/,k=a("<div>").html(b).find("li");return k.length?(k.each(function(){if(g=a(this),e=j.exec(g.html()),e&&e[1]){for(f=e[1];i.elements["menu-item["+f+"][menu-item-type]"]||h[f];)f--;h[f]=!0,f!=e[1]&&g.html(g.html().replace(new RegExp("menu-item\\["+e[1]+"\\]","g"),"menu-item["+f+"]"))}}),a(".categorychecklist",d).html(k),void a(".spinner",d).removeClass("is-active")):(a(".categorychecklist",d).html("<li><p>"+navMenuL10n.noResultsFound+"</p></li>"),void a(".spinner",d).removeClass("is-active"))},removeMenuItem:function(c){var d=c.childMenuItems();c.addClass("deleting").animate({opacity:0,height:0},350,function(){var e=a("#menu-instructions");c.remove(),d.shiftDepthClass(-1).updateParentMenuItemDBId(),0===a("#menu-to-edit li").length&&(a(".drag-instructions").hide(),e.removeClass("menu-instructions-inactive")),b.refreshAdvancedAccessibility()})},depthToPx:function(a){return a*b.options.menuItemDepthPerLevel},pxToDepth:function(a){return Math.floor(a/b.options.menuItemDepthPerLevel)}},a(document).ready(function(){wpNavMenu.init()})}(jQuery);
\ No newline at end of file
+var wpNavMenu;!function(a){var b;b=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11,sortableItems:"> *",targetTolerance:0},menuList:void 0,targetList:void 0,menusChanged:!1,isRTL:!("undefined"==typeof isRtl||!isRtl),negateIfRTL:"undefined"!=typeof isRtl&&isRtl?-1:1,lastSearch:"",init:function(){b.menuList=a("#menu-to-edit"),b.targetList=b.menuList,this.jQueryExtensions(),this.attachMenuEditListeners(),this.attachQuickSearchListeners(),this.attachThemeLocationsListeners(),this.attachMenuSaveSubmitListeners(),this.attachTabsPanelListeners(),this.attachUnsavedChangesListener(),b.menuList.length&&this.initSortables(),menus.oneThemeLocationNoMenus&&a("#posttype-page").addSelectedToMenu(b.addMenuItemToBottom),this.initManageLocations(),this.initAccessibility(),this.initToggles(),this.initPreviewing()},jQueryExtensions:function(){a.fn.extend({menuItemDepth:function(){var a=b.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return b.pxToDepth(a&&-1!=a.indexOf("px")?a.slice(0,-2):0)},updateDepthClass:function(b,c){return this.each(function(){var d=a(this);c=c||d.menuItemDepth(),a(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+b)})},shiftDepthClass:function(b){return this.each(function(){var c=a(this),d=c.menuItemDepth();a(this).removeClass("menu-item-depth-"+d).addClass("menu-item-depth-"+(d+b))})},childMenuItems:function(){var b=a();return this.each(function(){for(var c=a(this),d=c.menuItemDepth(),e=c.next(".menu-item");e.length&&e.menuItemDepth()>d;)b=b.add(e),e=e.next(".menu-item")}),b},shiftHorizontally:function(b){return this.each(function(){var c=a(this),d=c.menuItemDepth(),e=d+b;c.moveHorizontally(e,d)})},moveHorizontally:function(b,c){return this.each(function(){var d=a(this),e=d.childMenuItems(),f=b-c,g=d.find(".is-submenu");d.updateDepthClass(b,c).updateParentMenuItemDBId(),e&&e.each(function(){var b=a(this),c=b.menuItemDepth(),d=c+f;b.updateDepthClass(d,c).updateParentMenuItemDBId()}),0===b?g.hide():g.show()})},updateParentMenuItemDBId:function(){return this.each(function(){var b=a(this),c=b.find(".menu-item-data-parent-id"),d=parseInt(b.menuItemDepth(),10),e=d-1,f=b.prevAll(".menu-item-depth-"+e).first();0===d?c.val(0):c.val(f.find(".menu-item-data-db-id").val())})},hideAdvancedMenuItemFields:function(){return this.each(function(){var b=a(this);a(".hide-column-tog").not(":checked").each(function(){b.find(".field-"+a(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return 0!==a("#menu-to-edit").length&&this.each(function(){var d=a(this),e={},f=menus.oneThemeLocationNoMenus&&0===d.find(".tabs-panel-active .categorychecklist li input:checked").length?d.find('#page-all li input[type="checkbox"]'):d.find(".tabs-panel-active .categorychecklist li input:checked"),g=/menu-item\[([^\]]*)/;return c=c||b.addMenuItemToBottom,!!f.length&&(d.find(".button-controls .spinner").addClass("is-active"),a(f).each(function(){var d=a(this),f=g.exec(d.attr("name")),h="undefined"==typeof f[1]?0:parseInt(f[1],10);this.className&&-1!=this.className.indexOf("add-to-top")&&(c=b.addMenuItemToTop),e[h]=d.closest("li").getItemData("add-menu-item",h)}),void b.addItemToMenu(e,c,function(){f.removeAttr("checked"),d.find(".button-controls .spinner").removeClass("is-active")}))})},getItemData:function(a,b){a=a||"menu-item";var c,d={},e=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];return b||"menu-item"!=a||(b=this.find(".menu-item-data-db-id").val()),b?(this.find("input").each(function(){var f;for(c=e.length;c--;)"menu-item"==a?f=e[c]+"["+b+"]":"add-menu-item"==a&&(f="menu-item["+b+"]["+e[c]+"]"),this.name&&f==this.name&&(d[e[c]]=this.value)}),d):d},setItemData:function(b,c,d){return c=c||"menu-item",d||"menu-item"!=c||(d=a(".menu-item-data-db-id",this).val()),d?(this.find("input").each(function(){var e,f=a(this);a.each(b,function(a,b){"menu-item"==c?e=a+"["+d+"]":"add-menu-item"==c&&(e="menu-item["+d+"]["+a+"]"),e==f.attr("name")&&f.val(b)})}),this):this}})},countMenuItems:function(b){return a(".menu-item-depth-"+b).length},moveMenuItem:function(c,d){var e,f,g,h=a("#menu-to-edit li"),i=h.length,j=c.parents("li.menu-item"),k=j.childMenuItems(),l=j.getItemData(),m=parseInt(j.menuItemDepth(),10),n=parseInt(j.index(),10),o=j.next(),p=o.childMenuItems(),q=parseInt(o.menuItemDepth(),10)+1,r=j.prev(),s=parseInt(r.menuItemDepth(),10),t=r.getItemData()["menu-item-db-id"];switch(d){case"up":if(f=n-1,0===n)break;0===f&&0!==m&&j.moveHorizontally(0,m),0!==s&&j.moveHorizontally(s,m),k?(e=j.add(k),e.detach().insertBefore(h.eq(f)).updateParentMenuItemDBId()):j.detach().insertBefore(h.eq(f)).updateParentMenuItemDBId();break;case"down":if(k){if(e=j.add(k),o=h.eq(e.length+n),p=0!==o.childMenuItems().length,p&&(g=parseInt(o.menuItemDepth(),10)+1,j.moveHorizontally(g,m)),i===n+e.length)break;e.detach().insertAfter(h.eq(n+e.length)).updateParentMenuItemDBId()}else{if(0!==p.length&&j.moveHorizontally(q,m),i===n+1)break;j.detach().insertAfter(h.eq(n+1)).updateParentMenuItemDBId()}break;case"top":if(0===n)break;k?(e=j.add(k),e.detach().insertBefore(h.eq(0)).updateParentMenuItemDBId()):j.detach().insertBefore(h.eq(0)).updateParentMenuItemDBId();break;case"left":if(0===m)break;j.shiftHorizontally(-1);break;case"right":if(0===n)break;if(l["menu-item-parent-id"]===t)break;j.shiftHorizontally(1)}c.focus(),b.registerChange(),b.refreshKeyboardAccessibility(),b.refreshAdvancedAccessibility()},initAccessibility:function(){var c=a("#menu-to-edit");b.refreshKeyboardAccessibility(),b.refreshAdvancedAccessibility(),c.on("mouseenter.refreshAccessibility focus.refreshAccessibility touchstart.refreshAccessibility",".menu-item",function(){b.refreshAdvancedAccessibilityOfItem(a(this).find("a.item-edit"))}),c.on("click","a.item-edit",function(){b.refreshAdvancedAccessibilityOfItem(a(this))}),c.on("click",".menus-move",function(c){var d=a(this),e=d.data("dir");"undefined"!=typeof e&&b.moveMenuItem(a(this).parents("li.menu-item").find("a.item-edit"),e),c.preventDefault()})},refreshAdvancedAccessibilityOfItem:function(b){if(!0===a(b).data("needs_accessibility_refresh")){var c,d,e,f,g,h,i,j,k,l=a(b),m=l.closest("li.menu-item").first(),n=m.menuItemDepth(),o=0===n,p=l.closest(".menu-item-handle").find(".menu-item-title").text(),q=parseInt(m.index(),10),r=o?n:parseInt(n-1,10),s=m.prevAll(".menu-item-depth-"+r).first().find(".menu-item-title").text(),t=m.prevAll(".menu-item-depth-"+n).first().find(".menu-item-title").text(),u=a("#menu-to-edit li").length,v=m.nextAll(".menu-item-depth-"+n).length;m.find(".field-move").toggle(u>1),0!==q&&(c=m.find(".menus-move-up"),c.attr("aria-label",menus.moveUp).css("display","inline")),0!==q&&o&&(c=m.find(".menus-move-top"),c.attr("aria-label",menus.moveToTop).css("display","inline")),q+1!==u&&0!==q&&(c=m.find(".menus-move-down"),c.attr("aria-label",menus.moveDown).css("display","inline")),0===q&&0!==v&&(c=m.find(".menus-move-down"),c.attr("aria-label",menus.moveDown).css("display","inline")),o||(c=m.find(".menus-move-left"),d=menus.outFrom.replace("%s",s),c.attr("aria-label",menus.moveOutFrom.replace("%s",s)).text(d).css("display","inline")),0!==q&&m.find(".menu-item-data-parent-id").val()!==m.prev().find(".menu-item-data-db-id").val()&&(c=m.find(".menus-move-right"),d=menus.under.replace("%s",t),c.attr("aria-label",menus.moveUnder.replace("%s",t)).text(d).css("display","inline")),o?(e=a(".menu-item-depth-0"),f=e.index(m)+1,u=e.length,g=menus.menuFocus.replace("%1$s",p).replace("%2$d",f).replace("%3$d",u)):(h=m.prevAll(".menu-item-depth-"+parseInt(n-1,10)).first(),i=h.find(".menu-item-data-db-id").val(),j=h.find(".menu-item-title").text(),k=a('.menu-item .menu-item-data-parent-id[value="'+i+'"]'),f=a(k.parents(".menu-item").get().reverse()).index(m)+1,g=menus.subMenuFocus.replace("%1$s",p).replace("%2$d",f).replace("%3$s",j)),l.attr("aria-label",g).text(g),l.data("needs_accessibility_refresh",!1)}},refreshAdvancedAccessibility:function(){a(".menu-item-settings .field-move a").hide(),a("a.item-edit").data("needs_accessibility_refresh",!0),a(".menu-item-edit-active a.item-edit").each(function(){b.refreshAdvancedAccessibilityOfItem(this)})},refreshKeyboardAccessibility:function(){a("a.item-edit").off("focus").on("focus",function(){a(this).off("keydown").on("keydown",function(c){var d,e=a(this),f=e.parents("li.menu-item"),g=f.getItemData();if((37==c.which||38==c.which||39==c.which||40==c.which)&&(e.off("keydown"),1!==a("#menu-to-edit li").length)){switch(d={38:"up",40:"down",37:"left",39:"right"},a("body").hasClass("rtl")&&(d={38:"up",40:"down",39:"left",37:"right"}),d[c.which]){case"up":b.moveMenuItem(e,"up");break;case"down":b.moveMenuItem(e,"down");break;case"left":b.moveMenuItem(e,"left");break;case"right":b.moveMenuItem(e,"right")}return a("#edit-"+g["menu-item-db-id"]).focus(),!1}})})},initPreviewing:function(){a("#menu-to-edit").on("change input",".edit-menu-item-title",function(b){var c,d,e=a(b.currentTarget);c=e.val(),d=e.closest(".menu-item").find(".menu-item-title"),c?d.text(c).removeClass("no-title"):d.text(navMenuL10n.untitled).addClass("no-title")})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus"),columns.useCheckboxesForHidden(),columns.checked=function(b){a(".field-"+b).removeClass("hidden-field")},columns.unchecked=function(b){a(".field-"+b).addClass("hidden-field")},b.menuList.hideAdvancedMenuItemFields(),a(".hide-postbox-tog").click(function(){var b=a(".accordion-container li.accordion-section").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"closed-postboxes",hidden:b,closedpostboxesnonce:jQuery("#closedpostboxesnonce").val(),page:"nav-menus"})})},initSortables:function(){function c(a){var c;j=a.placeholder.prev(".menu-item"),k=a.placeholder.next(".menu-item"),j[0]==a.item[0]&&(j=j.prev(".menu-item")),k[0]==a.item[0]&&(k=k.next(".menu-item")),l=j.length?j.offset().top+j.height():0,m=k.length?k.offset().top+k.height()/3:0,h=k.length?k.menuItemDepth():0,i=j.length?(c=j.menuItemDepth()+1)>b.options.globalMaxDepth?b.options.globalMaxDepth:c:0}function d(a,b){a.placeholder.updateDepthClass(b,q),q=b}function e(){if(!s[0].className)return 0;var a=s[0].className.match(/menu-max-depth-(\d+)/);return a&&a[1]?parseInt(a[1],10):0}function f(c){var d,e=t;if(0!==c){if(c>0)d=p+c,d>t&&(e=d);else if(c<0&&p==t)for(;!a(".menu-item-depth-"+e,b.menuList).length&&e>0;)e--;s.removeClass("menu-max-depth-"+t).addClass("menu-max-depth-"+e),t=e}}var g,h,i,j,k,l,m,n,o,p,q=0,r=b.menuList.offset().left,s=a("body"),t=e();0!==a("#menu-to-edit li").length&&a(".drag-instructions").show(),r+=b.isRTL?b.menuList.width():0,b.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",items:b.options.sortableItems,start:function(e,f){var h,i,j,k,l;b.isRTL&&(f.item[0].style.right="auto"),o=f.item.children(".menu-item-transport"),g=f.item.menuItemDepth(),d(f,g),j=f.item.next()[0]==f.placeholder[0]?f.item.next():f.item,k=j.childMenuItems(),o.append(k),h=o.outerHeight(),h+=h>0?1*f.placeholder.css("margin-top").slice(0,-2):0,h+=f.helper.outerHeight(),n=h,h-=2,f.placeholder.height(h),p=g,k.each(function(){var b=a(this).menuItemDepth();p=b>p?b:p}),i=f.helper.find(".menu-item-handle").outerWidth(),i+=b.depthToPx(p-g),i-=2,f.placeholder.width(i),l=f.placeholder.next(".menu-item"),l.css("margin-top",n+"px"),f.placeholder.detach(),a(this).sortable("refresh"),f.item.after(f.placeholder),l.css("margin-top",0),c(f)},stop:function(a,c){var d,e,h=q-g;d=o.children().insertAfter(c.item),e=c.item.find(".item-title .is-submenu"),0<q?e.show():e.hide(),0!==h&&(c.item.updateDepthClass(q),d.shiftDepthClass(h),f(h)),b.registerChange(),c.item.updateParentMenuItemDBId(),c.item[0].style.top=0,b.isRTL&&(c.item[0].style.left="auto",c.item[0].style.right=0),b.refreshKeyboardAccessibility(),b.refreshAdvancedAccessibility()},change:function(a,d){d.placeholder.parent().hasClass("menu")||(j.length?j.after(d.placeholder):b.menuList.prepend(d.placeholder)),c(d)},sort:function(e,f){var g=f.helper.offset(),j=b.isRTL?g.left+f.helper.width():g.left,o=b.negateIfRTL*b.pxToDepth(j-r);o>i||g.top<l-b.options.targetTolerance?o=i:o<h&&(o=h),o!=q&&d(f,o),m&&g.top+n>m&&(k.after(f.placeholder),c(f),a(this).sortable("refreshPositions"))}})},initManageLocations:function(){a("#menu-locations-wrap form").submit(function(){window.onbeforeunload=null}),a(".menu-location-menus select").on("change",function(){var b=a(this).closest("tr").find(".locations-edit-menu-link");a(this).find("option:selected").data("orig")?b.show():b.hide()})},attachMenuEditListeners:function(){var b=this;a("#update-nav-menu").bind("click",function(a){if(a.target&&a.target.className){if(-1!=a.target.className.indexOf("item-edit"))return b.eventOnClickEditLink(a.target);if(-1!=a.target.className.indexOf("menu-save"))return b.eventOnClickMenuSave(a.target);if(-1!=a.target.className.indexOf("menu-delete"))return b.eventOnClickMenuDelete(a.target);if(-1!=a.target.className.indexOf("item-delete"))return b.eventOnClickMenuItemDelete(a.target);if(-1!=a.target.className.indexOf("item-cancel"))return b.eventOnClickCancelLink(a.target)}}),a('#add-custom-links input[type="text"]').keypress(function(b){a("#customlinkdiv").removeClass("form-invalid"),13===b.keyCode&&(b.preventDefault(),a("#submit-customlinkdiv").click())})},attachMenuSaveSubmitListeners:function(){a("#update-nav-menu").submit(function(){var b=a("#update-nav-menu").serializeArray();a('[name="nav-menu-data"]').val(JSON.stringify(b))})},attachThemeLocationsListeners:function(){var b=a("#nav-menu-theme-locations"),c={};c.action="menu-locations-save",c["menu-settings-column-nonce"]=a("#menu-settings-column-nonce").val(),b.find('input[type="submit"]').click(function(){return b.find("select").each(function(){c[this.name]=a(this).val()}),b.find(".spinner").addClass("is-active"),a.post(ajaxurl,c,function(){b.find(".spinner").removeClass("is-active")}),!1})},attachQuickSearchListeners:function(){var c,d;a("#nav-menu-meta").on("submit",function(a){a.preventDefault()}),d="oninput"in document.createElement("input")?"input":"keyup",a(".quick-search").on(d,function(){var d=a(this);c&&clearTimeout(c),c=setTimeout(function(){b.updateQuickSearchResults(d)},500)}).on("blur",function(){b.lastSearch=""}).attr("autocomplete","off")},updateQuickSearchResults:function(c){var d,e,f=2,g=c.val();g.length<f||b.lastSearch==g||(b.lastSearch=g,d=c.parents(".tabs-panel"),e={action:"menu-quick-search","response-format":"markup",menu:a("#menu").val(),"menu-settings-column-nonce":a("#menu-settings-column-nonce").val(),q:g,type:c.attr("name")},a(".spinner",d).addClass("is-active"),a.post(ajaxurl,e,function(a){b.processQuickSearchQueryResponse(a,e,d)}))},addCustomLink:function(c){var d=a("#custom-menu-item-url").val(),e=a("#custom-menu-item-name").val();return c=c||b.addMenuItemToBottom,""===d||"http://"==d?(a("#customlinkdiv").addClass("form-invalid"),!1):(a(".customlinkdiv .spinner").addClass("is-active"),void this.addLinkToMenu(d,e,c,function(){a(".customlinkdiv .spinner").removeClass("is-active"),a("#custom-menu-item-name").val("").blur(),a("#custom-menu-item-url").val("http://")}))},addLinkToMenu:function(a,c,d,e){d=d||b.addMenuItemToBottom,e=e||function(){},b.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":a,"menu-item-title":c}},d,e)},addItemToMenu:function(b,c,d){var e,f=a("#menu").val(),g=a("#menu-settings-column-nonce").val();c=c||function(){},d=d||function(){},e={action:"add-menu-item",menu:f,"menu-settings-column-nonce":g,"menu-item":b},a.post(ajaxurl,e,function(b){var f=a("#menu-instructions");b=a.trim(b),c(b,e),a("li.pending").hide().fadeIn("slow"),a(".drag-instructions").show(),!f.hasClass("menu-instructions-inactive")&&f.siblings().length&&f.addClass("menu-instructions-inactive"),d()})},addMenuItemToBottom:function(c){a(c).hideAdvancedMenuItemFields().appendTo(b.targetList),b.refreshKeyboardAccessibility(),b.refreshAdvancedAccessibility()},addMenuItemToTop:function(c){a(c).hideAdvancedMenuItemFields().prependTo(b.targetList),b.refreshKeyboardAccessibility(),b.refreshAdvancedAccessibility()},attachUnsavedChangesListener:function(){a("#menu-management input, #menu-management select, #menu-management, #menu-management textarea, .menu-location-menus select").change(function(){b.registerChange()}),0!==a("#menu-to-edit").length||0!==a(".menu-location-menus select").length?window.onbeforeunload=function(){if(b.menusChanged)return navMenuL10n.saveAlert}:a("#menu-settings-column").find("input,select").end().find("a").attr("href","#").unbind("click")},registerChange:function(){b.menusChanged=!0},attachTabsPanelListeners:function(){a("#menu-settings-column").bind("click",function(c){var d,e,f,g,h=a(c.target);if(h.hasClass("nav-tab-link"))e=h.data("type"),f=h.parents(".accordion-section-content").first(),a("input",f).removeAttr("checked"),a(".tabs-panel-active",f).removeClass("tabs-panel-active").addClass("tabs-panel-inactive"),a("#"+e,f).removeClass("tabs-panel-inactive").addClass("tabs-panel-active"),a(".tabs",f).removeClass("tabs"),h.parent().addClass("tabs"),a(".quick-search",f).focus(),c.preventDefault();else if(h.hasClass("select-all")){if(d=/#(.*)$/.exec(c.target.href),d&&d[1])return g=a("#"+d[1]+" .tabs-panel-active .menu-item-title input"),g.length===g.filter(":checked").length?g.removeAttr("checked"):g.prop("checked",!0),!1}else{if(h.hasClass("submit-add-to-menu"))return b.registerChange(),c.target.id&&"submit-customlinkdiv"==c.target.id?b.addCustomLink(b.addMenuItemToBottom):c.target.id&&-1!=c.target.id.indexOf("submit-")&&a("#"+c.target.id.replace(/submit-/,"")).addSelectedToMenu(b.addMenuItemToBottom),!1;if(h.hasClass("page-numbers"))return a.post(ajaxurl,c.target.href.replace(/.*\?/,"").replace(/action=([^&]*)/,"")+"&action=menu-get-metabox",function(b){if(-1!=b.indexOf("replace-id")){var c=a.parseJSON(b),d=document.getElementById(c["replace-id"]),e=document.createElement("div"),f=document.createElement("div");c.markup&&d&&(f.innerHTML=c.markup?c.markup:"",d.parentNode.insertBefore(e,d),e.parentNode.removeChild(d),e.parentNode.insertBefore(f,e),e.parentNode.removeChild(e))}}),!1}})},eventOnClickEditLink:function(b){var c,d,e=/#(.*)$/.exec(b.href);if(e&&e[1]&&(c=a("#"+e[1]),d=c.parent(),0!==d.length))return d.hasClass("menu-item-edit-inactive")?(c.data("menu-item-data")||c.data("menu-item-data",c.getItemData()),c.slideDown("fast"),d.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")):(c.slideUp("fast"),d.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")),!1},eventOnClickCancelLink:function(b){var c=a(b).closest(".menu-item-settings"),d=a(b).closest(".menu-item");return d.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive"),c.setItemData(c.data("menu-item-data")).hide(),!1},eventOnClickMenuSave:function(){var c="",d=a("#menu-name"),e=d.val();return e&&e!=d.attr("title")&&e.replace(/\s+/,"")?(a("#nav-menu-theme-locations select").each(function(){c+='<input type="hidden" name="'+this.name+'" value="'+a(this).val()+'" />'}),a("#update-nav-menu").append(c),b.menuList.find(".menu-item-data-position").val(function(a){return a+1}),window.onbeforeunload=null,!0):(d.parent().addClass("form-invalid"),!1)},eventOnClickMenuDelete:function(){return!!window.confirm(navMenuL10n.warnDeleteMenu)&&(window.onbeforeunload=null,!0)},eventOnClickMenuItemDelete:function(c){var d=parseInt(c.id.replace("delete-",""),10);return b.removeMenuItem(a("#menu-item-"+d)),b.registerChange(),!1},processQuickSearchQueryResponse:function(b,c,d){var e,f,g,h={},i=document.getElementById("nav-menu-meta"),j=/menu-item[(\[^]\]*/,k=a("<div>").html(b).find("li");return k.length?(k.each(function(){if(g=a(this),e=j.exec(g.html()),e&&e[1]){for(f=e[1];i.elements["menu-item["+f+"][menu-item-type]"]||h[f];)f--;h[f]=!0,f!=e[1]&&g.html(g.html().replace(new RegExp("menu-item\\["+e[1]+"\\]","g"),"menu-item["+f+"]"))}}),a(".categorychecklist",d).html(k),void a(".spinner",d).removeClass("is-active")):(a(".categorychecklist",d).html("<li><p>"+navMenuL10n.noResultsFound+"</p></li>"),void a(".spinner",d).removeClass("is-active"))},removeMenuItem:function(c){var d=c.childMenuItems();c.addClass("deleting").animate({opacity:0,height:0},350,function(){var e=a("#menu-instructions");c.remove(),d.shiftDepthClass(-1).updateParentMenuItemDBId(),0===a("#menu-to-edit li").length&&(a(".drag-instructions").hide(),e.removeClass("menu-instructions-inactive")),b.refreshAdvancedAccessibility()})},depthToPx:function(a){return a*b.options.menuItemDepthPerLevel},pxToDepth:function(a){return Math.floor(a/b.options.menuItemDepthPerLevel)}},a(document).ready(function(){wpNavMenu.init()})}(jQuery);
\ No newline at end of file
index a075c269f8dfd64e3f350fb21ba3271979982264..efd26bbc5afc8c0cdba3d89a60730c55903fd1b8 100644 (file)
@@ -18,6 +18,11 @@ var passwordStrength;
                        if (password1 != password2 && password2 && password2.length > 0)
                                return 5;
 
+                       if ( 'undefined' === typeof window.zxcvbn ) {
+                               // Password strength unknown.
+                               return -1;
+                       }
+
                        var result = zxcvbn( password1, blacklist );
                        return result.score;
                },
@@ -70,6 +75,6 @@ var passwordStrength;
                }
        };
 
-       // Backwards compatibility.
+       // Back-compat.
        passwordStrength = wp.passwordStrength.meter;
-})(jQuery);
\ No newline at end of file
+})(jQuery);
index da7ac001d36b5ebf968f9f5fc033127f25196cfa..0bcea95b59be0415ff81e56d2b16b383b8a97773 100644 (file)
@@ -1 +1 @@
-window.wp=window.wp||{};var passwordStrength;!function(a){wp.passwordStrength={meter:function(b,c,d){if(a.isArray(c)||(c=[c.toString()]),b!=d&&d&&d.length>0)return 5;var e=zxcvbn(b,c);return e.score},userInputBlacklist:function(){var b,c,d,e,f=[],g=[],h=["user_login","first_name","last_name","nickname","display_name","email","url","description","weblog_title","admin_email"];for(f.push(document.title),f.push(document.URL),c=h.length,b=0;c>b;b++)e=a("#"+h[b]),0!==e.length&&(f.push(e[0].defaultValue),f.push(e.val()));for(d=f.length,b=0;d>b;b++)f[b]&&(g=g.concat(f[b].replace(/\W/g," ").split(" ")));return g=a.grep(g,function(b,c){return""===b||4>b.length?!1:a.inArray(b,g)===c})}},passwordStrength=wp.passwordStrength.meter}(jQuery);
\ No newline at end of file
+window.wp=window.wp||{};var passwordStrength;!function(a){wp.passwordStrength={meter:function(b,c,d){if(a.isArray(c)||(c=[c.toString()]),b!=d&&d&&d.length>0)return 5;if("undefined"==typeof window.zxcvbn)return-1;var e=zxcvbn(b,c);return e.score},userInputBlacklist:function(){var b,c,d,e,f=[],g=[],h=["user_login","first_name","last_name","nickname","display_name","email","url","description","weblog_title","admin_email"];for(f.push(document.title),f.push(document.URL),c=h.length,b=0;b<c;b++)e=a("#"+h[b]),0!==e.length&&(f.push(e[0].defaultValue),f.push(e.val()));for(d=f.length,b=0;b<d;b++)f[b]&&(g=g.concat(f[b].replace(/\W/g," ").split(" ")));return g=a.grep(g,function(b,c){return!(""===b||4>b.length)&&a.inArray(b,g)===c})}},passwordStrength=wp.passwordStrength.meter}(jQuery);
\ No newline at end of file
index dc0f5a58d82db599bbdc04eb1e98f50f62f42f1a..71b0e705ecf71527c2db6dac9dfded4538643189 100644 (file)
@@ -1,6 +1,8 @@
 /* global plugininstallL10n, tb_click, tb_remove */
 
-/* Plugin Browser Thickbox related JS*/
+/**
+ * Functionality for the plugin install screens.
+ */
 var tb_position;
 jQuery( document ).ready( function( $ ) {
 
@@ -9,7 +11,10 @@ jQuery( document ).ready( function( $ ) {
                $iframeBody,
                $tabbables,
                $firstTabbable,
-               $lastTabbable;
+               $lastTabbable,
+               $uploadViewToggle = $( '.upload-view-toggle' ),
+               $wrap = $ ( '.wrap' ),
+               $body = $( document.body );
 
        tb_position = function() {
                var width = $( window ).width(),
@@ -51,7 +56,7 @@ jQuery( document ).ready( function( $ ) {
         * Custom events: when a Thickbox iframe has loaded and when the Thickbox
         * modal gets removed from the DOM.
         */
-       $( 'body' )
+       $body
                .on( 'thickbox:iframe:loaded', tbWindow, function() {
                        iframeLoaded();
                })
@@ -174,4 +179,25 @@ jQuery( document ).ready( function( $ ) {
                $( '#section-holder div.section' ).hide(); // Hide 'em all.
                $( '#section-' + tab ).show();
        });
+
+       /*
+        * When a user presses the "Upload Plugin" button, show the upload form in place
+        * rather than sending them to the devoted upload plugin page.
+        * The `?tab=upload` page still exists for no-js support and for plugins that
+        * might access it directly. When we're in this page, let the link behave
+        * like a link. Otherwise we're in the normal plugin installer pages and the
+        * link should behave like a toggle button.
+        */
+       if ( ! $wrap.hasClass( 'plugin-install-tab-upload' ) ) {
+               $uploadViewToggle
+                       .attr({
+                               role: 'button',
+                               'aria-expanded': 'false'
+                       })
+                       .on( 'click', function( event ) {
+                               event.preventDefault();
+                               $body.toggleClass( 'show-upload-view' );
+                               $uploadViewToggle.attr( 'aria-expanded', $body.hasClass( 'show-upload-view' ) );
+                       });
+       }
 });
index d0d8d37305d333c439048edaabedffe7a46a1c87..9aa8c3dd214448f39c67e7a4cdbf2bfa18a68c0c 100644 (file)
@@ -1 +1 @@
-var tb_position;jQuery(document).ready(function(a){function b(){var b=e.find("#TB_iframeContent");g=b.contents().find("body"),c(),i.focus(),a("#plugin-information-tabs a",g).on("click",function(){c()}),g.on("keydown",function(a){27===a.which&&tb_remove()})}function c(){var b;h=a(":tabbable",g),i=e.find("#TB_closeWindowButton"),j=h.last(),b=i.add(j),b.off("keydown.wp-plugin-details"),b.on("keydown.wp-plugin-details",function(a){d(a)})}function d(a){9===a.which&&(j[0]!==a.target||a.shiftKey?i[0]===a.target&&a.shiftKey&&(a.preventDefault(),j.focus()):(a.preventDefault(),i.focus()))}var e,f,g,h,i,j;tb_position=function(){var b=a(window).width(),c=a(window).height()-(b>792?60:20),d=b>792?772:b-20;return e=a("#TB_window"),e.length&&(e.width(d).height(c),a("#TB_iframeContent").width(d).height(c),e.css({"margin-left":"-"+parseInt(d/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&e.css({top:"30px","margin-top":"0"})),a("a.thickbox").each(function(){var b=a(this).attr("href");b&&(b=b.replace(/&width=[0-9]+/g,""),b=b.replace(/&height=[0-9]+/g,""),a(this).attr("href",b+"&width="+d+"&height="+c))})},a(window).resize(function(){tb_position()}),a("body").on("thickbox:iframe:loaded",e,function(){b()}).on("thickbox:removed",function(){f.focus()}),a(".thickbox.open-plugin-details-modal").on("click",function(b){var c=a(this).data("title")?plugininstallL10n.plugin_information+" "+a(this).data("title"):plugininstallL10n.plugin_modal_label;b.preventDefault(),b.stopPropagation(),f=a(this),tb_click.call(this),e.attr({role:"dialog","aria-label":plugininstallL10n.plugin_modal_label}),e.find("#TB_iframeContent").attr("title",c)}),a("#plugin-information-tabs a").click(function(b){var c=a(this).attr("name");b.preventDefault(),a("#plugin-information-tabs a.current").removeClass("current"),a(this).addClass("current"),"description"!==c&&a(window).width()<772?a("#plugin-information-content").find(".fyi").hide():a("#plugin-information-content").find(".fyi").show(),a("#section-holder div.section").hide(),a("#section-"+c).show()})});
\ No newline at end of file
+var tb_position;jQuery(document).ready(function(a){function b(){var b=e.find("#TB_iframeContent");g=b.contents().find("body"),c(),i.focus(),a("#plugin-information-tabs a",g).on("click",function(){c()}),g.on("keydown",function(a){27===a.which&&tb_remove()})}function c(){var b;h=a(":tabbable",g),i=e.find("#TB_closeWindowButton"),j=h.last(),b=i.add(j),b.off("keydown.wp-plugin-details"),b.on("keydown.wp-plugin-details",function(a){d(a)})}function d(a){9===a.which&&(j[0]!==a.target||a.shiftKey?i[0]===a.target&&a.shiftKey&&(a.preventDefault(),j.focus()):(a.preventDefault(),i.focus()))}var e,f,g,h,i,j,k=a(".upload-view-toggle"),l=a(".wrap"),m=a(document.body);tb_position=function(){var b=a(window).width(),c=a(window).height()-(792<b?60:20),d=792<b?772:b-20;return e=a("#TB_window"),e.length&&(e.width(d).height(c),a("#TB_iframeContent").width(d).height(c),e.css({"margin-left":"-"+parseInt(d/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&e.css({top:"30px","margin-top":"0"})),a("a.thickbox").each(function(){var b=a(this).attr("href");b&&(b=b.replace(/&width=[0-9]+/g,""),b=b.replace(/&height=[0-9]+/g,""),a(this).attr("href",b+"&width="+d+"&height="+c))})},a(window).resize(function(){tb_position()}),m.on("thickbox:iframe:loaded",e,function(){b()}).on("thickbox:removed",function(){f.focus()}),a(".thickbox.open-plugin-details-modal").on("click",function(b){var c=a(this).data("title")?plugininstallL10n.plugin_information+" "+a(this).data("title"):plugininstallL10n.plugin_modal_label;b.preventDefault(),b.stopPropagation(),f=a(this),tb_click.call(this),e.attr({role:"dialog","aria-label":plugininstallL10n.plugin_modal_label}),e.find("#TB_iframeContent").attr("title",c)}),a("#plugin-information-tabs a").click(function(b){var c=a(this).attr("name");b.preventDefault(),a("#plugin-information-tabs a.current").removeClass("current"),a(this).addClass("current"),"description"!==c&&a(window).width()<772?a("#plugin-information-content").find(".fyi").hide():a("#plugin-information-content").find(".fyi").show(),a("#section-holder div.section").hide(),a("#section-"+c).show()}),l.hasClass("plugin-install-tab-upload")||k.attr({role:"button","aria-expanded":"false"}).on("click",function(a){a.preventDefault(),m.toggleClass("show-upload-view"),k.attr("aria-expanded",m.hasClass("show-upload-view"))})});
\ No newline at end of file
index a4011b449d1066e6e58f097a0a561b4126a82cea..1ead4bed1cc0e4c3bb06ee513f91a6930f637f84 100644 (file)
@@ -271,6 +271,14 @@ jQuery(document).ready( function($) {
                        }
 
                        if ( typeof commentReply !== 'undefined' ) {
+                               /*
+                                * Warn the user they have an unsaved comment before submitting
+                                * the post data for update.
+                                */
+                               if ( ! commentReply.discardCommentChanges() ) {
+                                       return false;
+                               }
+
                                /*
                                 * Close the comment edit/reply form if open to stop the form
                                 * action from interfering with the post's form action.
index a6e0735faa4a115ee04882ccbaf9e48a55aad3d9..769ff9215e985c3093860da345e664e6e63fdbaa 100644 (file)
@@ -1 +1 @@
-var commentsBox,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail,wptitlehint,makeSlugeditClickable,editPermalink;makeSlugeditClickable=editPermalink=function(){},window.wp=window.wp||{},function(a){var b=!1;commentsBox={st:0,get:function(b,c){var d,e=this.st;return c||(c=20),this.st+=c,this.total=b,a("#commentsdiv .spinner").addClass("is-active"),d={action:"get-comments",mode:"single",_ajax_nonce:a("#add_comment_nonce").val(),p:a("#post_ID").val(),start:e,number:c},a.post(ajaxurl,d,function(b){return b=wpAjax.parseAjaxResponse(b),a("#commentsdiv .widefat").show(),a("#commentsdiv .spinner").removeClass("is-active"),"object"==typeof b&&b.responses[0]?(a("#the-comment-list").append(b.responses[0].data),theList=theExtraList=null,a("a[className*=':']").unbind(),void(commentsBox.st>commentsBox.total?a("#show-comments").hide():a("#show-comments").show().children("a").html(postL10n.showcomm))):1==b?void a("#show-comments").html(postL10n.endcomm):void a("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")}),!1},load:function(a){this.st=jQuery("#the-comment-list tr.comment:visible").length,this.get(a)}},WPSetThumbnailHTML=function(b){a(".inside","#postimagediv").html(b)},WPSetThumbnailID=function(b){var c=a('input[value="_thumbnail_id"]',"#list-table");c.length>0&&a("#meta\\["+c.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(b)},WPRemoveThumbnail=function(b){a.post(ajaxurl,{action:"set-post-thumbnail",post_id:a("#post_ID").val(),thumbnail_id:-1,_ajax_nonce:b,cookie:encodeURIComponent(document.cookie)},function(a){"0"==a?alert(setPostThumbnailL10n.error):WPSetThumbnailHTML(a)})},a(document).on("heartbeat-send.refresh-lock",function(b,c){var d=a("#active_post_lock").val(),e=a("#post_ID").val(),f={};e&&a("#post-lock-dialog").length&&(f.post_id=e,d&&(f.lock=d),c["wp-refresh-post-lock"]=f)}).on("heartbeat-tick.refresh-lock",function(b,c){var d,e,f;c["wp-refresh-post-lock"]&&(d=c["wp-refresh-post-lock"],d.lock_error?(e=a("#post-lock-dialog"),e.length&&!e.is(":visible")&&(wp.autosave&&(a(document).one("heartbeat-tick",function(){wp.autosave.server.suspend(),e.removeClass("saving").addClass("saved"),a(window).off("beforeunload.edit-post")}),e.addClass("saving"),wp.autosave.server.triggerSave()),d.lock_error.avatar_src&&(f=a('<img class="avatar avatar-64 photo" width="64" height="64" alt="" />').attr("src",d.lock_error.avatar_src.replace(/&amp;/g,"&")),e.find("div.post-locked-avatar").empty().append(f)),e.show().find(".currently-editing").text(d.lock_error.text),e.find(".wp-tab-first").focus())):d.new_lock&&a("#active_post_lock").val(d.new_lock))}).on("before-autosave.update-post-slug",function(){b=document.activeElement&&"title"===document.activeElement.id}).on("after-autosave.update-post-slug",function(){a("#edit-slug-box > *").length||b||a.post(ajaxurl,{action:"sample-permalink",post_id:a("#post_ID").val(),new_title:a("#title").val(),samplepermalinknonce:a("#samplepermalinknonce").val()},function(b){"-1"!=b&&a("#edit-slug-box").html(b)})})}(jQuery),function(a){function b(){c=!1,window.clearTimeout(d),d=window.setTimeout(function(){c=!0},3e5)}var c,d;a(document).on("heartbeat-send.wp-refresh-nonces",function(b,d){var e,f=a("#wp-auth-check-wrap");(c||f.length&&!f.hasClass("hidden"))&&(e=a("#post_ID").val())&&a("#_wpnonce").val()&&(d["wp-refresh-post-nonces"]={post_id:e})}).on("heartbeat-tick.wp-refresh-nonces",function(c,d){var e=d["wp-refresh-post-nonces"];e&&(b(),e.replace&&a.each(e.replace,function(b,c){a("#"+b).val(c)}),e.heartbeatNonce&&(window.heartbeatSettings.nonce=e.heartbeatNonce))}).ready(function(){b()})}(jQuery),jQuery(document).ready(function(a){function b(){var b,c,d,e,f=0,g=a("#post_name"),h=g.val(),i=a("#sample-permalink"),j=i.html(),l=a("#sample-permalink a").html(),m=a("#edit-slug-buttons"),n=m.html(),o=a("#editable-post-name-full");for(o.find("img").replaceWith(function(){return this.alt}),o=o.html(),i.html(l),d=a("#editable-post-name"),e=d.html(),m.html('<button type="button" class="save button button-small">'+postL10n.ok+'</button> <button type="button" class="cancel button-link">'+postL10n.cancel+"</button>"),m.children(".save").click(function(){var b=d.children("input").val();return b==a("#editable-post-name-full").text()?void m.children(".cancel").click():void a.post(ajaxurl,{action:"sample-permalink",post_id:k,new_slug:b,new_title:a("#title").val(),samplepermalinknonce:a("#samplepermalinknonce").val()},function(c){var d=a("#edit-slug-box");d.html(c),d.hasClass("hidden")&&d.fadeIn("fast",function(){d.removeClass("hidden")}),m.html(n),i.html(j),g.val(b),a(".edit-slug").focus(),wp.a11y.speak(postL10n.permalinkSaved)})}),m.children(".cancel").click(function(){a("#view-post-btn").show(),d.html(e),m.html(n),i.html(j),g.val(h),a(".edit-slug").focus()}),b=0;b<o.length;++b)"%"==o.charAt(b)&&f++;c=f>o.length/4?"":o,d.html('<input type="text" id="new-post-slug" value="'+c+'" autocomplete="off" />').children("input").keydown(function(a){var b=a.which;13===b&&(a.preventDefault(),m.children(".save").click()),27===b&&m.children(".cancel").click()}).keyup(function(){g.val(this.value)}).focus()}var c,d,e,f,g,h="",i=a("#content"),j=a(document),k=a("#post_ID").val()||0,l=a("#submitpost"),m=!0,n=a("#post-visibility-select"),o=a("#timestampdiv"),p=a("#post-status-select"),q=window.navigator.platform?-1!==window.navigator.platform.indexOf("Mac"):!1;if(postboxes.add_postbox_toggles(pagenow),window.name="",a("#post-lock-dialog .notification-dialog").on("keydown",function(b){if(9==b.which){var c=a(b.target);c.hasClass("wp-tab-first")&&b.shiftKey?(a(this).find(".wp-tab-last").focus(),b.preventDefault()):c.hasClass("wp-tab-last")&&!b.shiftKey&&(a(this).find(".wp-tab-first").focus(),b.preventDefault())}}).filter(":visible").find(".wp-tab-first").focus(),wp.heartbeat&&a("#post-lock-dialog").length&&wp.heartbeat.interval(15),e=l.find(":submit, a.submitdelete, #post-preview").on("click.edit-post",function(b){var c=a(this);return c.hasClass("disabled")?void b.preventDefault():void(c.hasClass("submitdelete")||c.is("#post-preview")||a("form#post").off("submit.edit-post").on("submit.edit-post",function(b){b.isDefaultPrevented()||(wp.autosave&&wp.autosave.server.suspend(),"undefined"!=typeof commentReply&&commentReply.close(),m=!1,a(window).off("beforeunload.edit-post"),e.addClass("disabled"),"publish"===c.attr("id")?l.find("#major-publishing-actions .spinner").addClass("is-active"):l.find("#minor-publishing .spinner").addClass("is-active"))}))}),a("#post-preview").on("click.post-preview",function(b){var c=a(this),d=a("form#post"),e=a("input#wp-preview"),f=c.attr("target")||"wp-preview",g=navigator.userAgent.toLowerCase();b.preventDefault(),c.hasClass("disabled")||(wp.autosave&&wp.autosave.server.tempBlockSave(),e.val("dopreview"),d.attr("target",f).submit().attr("target",""),-1!==g.indexOf("safari")&&-1===g.indexOf("chrome")&&d.attr("action",function(a,b){return b+"?t="+(new Date).getTime()}),e.val(""))}),a("#title").on("keydown.editor-focus",function(a){var b;if(9===a.keyCode&&!a.ctrlKey&&!a.altKey&&!a.shiftKey){if(b="undefined"!=typeof tinymce&&tinymce.get("content"),b&&!b.isHidden())b.focus();else{if(!i.length)return;i.focus()}a.preventDefault()}}),a("#auto_draft").val()&&a("#title").blur(function(){var b;this.value&&!a("#edit-slug-box > *").length&&(a("form#post").one("submit",function(){b=!0}),window.setTimeout(function(){!b&&wp.autosave&&wp.autosave.server.triggerSave()},200))}),j.on("autosave-disable-buttons.edit-post",function(){e.addClass("disabled")}).on("autosave-enable-buttons.edit-post",function(){wp.heartbeat&&wp.heartbeat.hasConnectionError()||e.removeClass("disabled")}).on("before-autosave.edit-post",function(){a(".autosave-message").text(postL10n.savingText)}).on("after-autosave.edit-post",function(b,c){a(".autosave-message").text(c.message),a(document.body).hasClass("post-new-php")&&a(".submitbox .submitdelete").show()}),a(window).on("beforeunload.edit-post",function(){var a="undefined"!=typeof tinymce&&tinymce.get("content");return a&&!a.isHidden()&&a.isDirty()||wp.autosave&&wp.autosave.server.postChanged()?postL10n.saveAlert:void 0}).on("unload.edit-post",function(b){m&&(b.target&&"#document"!=b.target.nodeName||a.ajax({type:"POST",url:ajaxurl,async:!1,data:{action:"wp-remove-post-lock",_wpnonce:a("#_wpnonce").val(),post_ID:a("#post_ID").val(),active_post_lock:a("#active_post_lock").val()}}))}),a("#tagsdiv-post_tag").length?window.tagBox&&window.tagBox.init():a(".meta-box-sortables").children("div.postbox").each(function(){return 0===this.id.indexOf("tagsdiv-")?(window.tagBox&&window.tagBox.init(),!1):void 0}),a(".categorydiv").each(function(){var b,c,d,e,f,g=a(this).attr("id");d=g.split("-"),d.shift(),e=d.join("-"),f=e+"_tab","category"==e&&(f="cats"),a("a","#"+e+"-tabs").click(function(b){b.preventDefault();var c=a(this).attr("href");a(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),a("#"+e+"-tabs").siblings(".tabs-panel").hide(),a(c).show(),"#"+e+"-all"==c?deleteUserSetting(f):setUserSetting(f,"pop")}),getUserSetting(f)&&a('a[href="#'+e+'-pop"]',"#"+e+"-tabs").click(),a("#new"+e).one("focus",function(){a(this).val("").removeClass("form-input-tip")}),a("#new"+e).keypress(function(b){13===b.keyCode&&(b.preventDefault(),a("#"+e+"-add-submit").click())}),a("#"+e+"-add-submit").click(function(){a("#new"+e).focus()}),b=function(b){return a("#new"+e).val()?(b.data+="&"+a(":checked","#"+e+"checklist").serialize(),a("#"+e+"-add-submit").prop("disabled",!0),b):!1},c=function(b,c){var d,f=a("#new"+e+"_parent");a("#"+e+"-add-submit").prop("disabled",!1),"undefined"!=c.parsed.responses[0]&&(d=c.parsed.responses[0].supplemental.newcat_parent)&&(f.before(d),f.remove())},a("#"+e+"checklist").wpList({alt:"",response:e+"-ajax-response",addBefore:b,addAfter:c}),a("#"+e+"-add-toggle").click(function(b){b.preventDefault(),a("#"+e+"-adder").toggleClass("wp-hidden-children"),a('a[href="#'+e+'-all"]',"#"+e+"-tabs").click(),a("#new"+e).focus()}),a("#"+e+"checklist, #"+e+"checklist-pop").on("click",'li.popular-category > label input[type="checkbox"]',function(){var b=a(this),c=b.is(":checked"),d=b.val();d&&b.parents("#taxonomy-"+e).length&&a("#in-"+e+"-"+d+", #in-popular-"+e+"-"+d).prop("checked",c)})}),a("#postcustom").length&&a("#the-list").wpList({addAfter:function(){a("table#list-table").show()},addBefore:function(b){return b.data+="&post_id="+a("#post_ID").val(),b}}),a("#submitdiv").length&&(c=a("#timestamp").html(),d=a("#post-visibility-display").html(),f=function(){"public"!=n.find("input:radio:checked").val()?(a("#sticky").prop("checked",!1),a("#sticky-span").hide()):a("#sticky-span").show(),"password"!=n.find("input:radio:checked").val()?a("#password-span").hide():a("#password-span").show()},g=function(){if(!o.length)return!0;var b,d,e,f,g=a("#post_status"),h=a('option[value="publish"]',g),i=a("#aa").val(),j=a("#mm").val(),k=a("#jj").val(),l=a("#hh").val(),m=a("#mn").val();return b=new Date(i,j-1,k,l,m),d=new Date(a("#hidden_aa").val(),a("#hidden_mm").val()-1,a("#hidden_jj").val(),a("#hidden_hh").val(),a("#hidden_mn").val()),e=new Date(a("#cur_aa").val(),a("#cur_mm").val()-1,a("#cur_jj").val(),a("#cur_hh").val(),a("#cur_mn").val()),b.getFullYear()!=i||1+b.getMonth()!=j||b.getDate()!=k||b.getMinutes()!=m?(o.find(".timestamp-wrap").addClass("form-invalid"),!1):(o.find(".timestamp-wrap").removeClass("form-invalid"),b>e&&"future"!=a("#original_post_status").val()?(f=postL10n.publishOnFuture,a("#publish").val(postL10n.schedule)):e>=b&&"publish"!=a("#original_post_status").val()?(f=postL10n.publishOn,a("#publish").val(postL10n.publish)):(f=postL10n.publishOnPast,a("#publish").val(postL10n.update)),d.toUTCString()==b.toUTCString()?a("#timestamp").html(c):a("#timestamp").html("\n"+f+" <b>"+postL10n.dateFormat.replace("%1$s",a('option[value="'+j+'"]',"#mm").attr("data-text")).replace("%2$s",parseInt(k,10)).replace("%3$s",i).replace("%4$s",("00"+l).slice(-2)).replace("%5$s",("00"+m).slice(-2))+"</b> "),"private"==n.find("input:radio:checked").val()?(a("#publish").val(postL10n.update),0===h.length?g.append('<option value="publish">'+postL10n.privatelyPublished+"</option>"):h.html(postL10n.privatelyPublished),a('option[value="publish"]',g).prop("selected",!0),a("#misc-publishing-actions .edit-post-status").hide()):("future"==a("#original_post_status").val()||"draft"==a("#original_post_status").val()?h.length&&(h.remove(),g.val(a("#hidden_post_status").val())):h.html(postL10n.published),g.is(":hidden")&&a("#misc-publishing-actions .edit-post-status").show()),a("#post-status-display").html(a("option:selected",g).text()),"private"==a("option:selected",g).val()||"publish"==a("option:selected",g).val()?a("#save-post").hide():(a("#save-post").show(),"pending"==a("option:selected",g).val()?a("#save-post").show().val(postL10n.savePending):a("#save-post").show().val(postL10n.saveDraft)),!0)},a("#visibility .edit-visibility").click(function(b){b.preventDefault(),n.is(":hidden")&&(f(),n.slideDown("fast",function(){n.find('input[type="radio"]').first().focus()}),a(this).hide())}),n.find(".cancel-post-visibility").click(function(b){n.slideUp("fast"),a("#visibility-radio-"+a("#hidden-post-visibility").val()).prop("checked",!0),a("#post_password").val(a("#hidden-post-password").val()),a("#sticky").prop("checked",a("#hidden-post-sticky").prop("checked")),a("#post-visibility-display").html(d),a("#visibility .edit-visibility").show().focus(),g(),b.preventDefault()}),n.find(".save-post-visibility").click(function(b){n.slideUp("fast"),a("#visibility .edit-visibility").show().focus(),g(),"public"!=n.find("input:radio:checked").val()&&a("#sticky").prop("checked",!1),h=a("#sticky").prop("checked")?"Sticky":"",a("#post-visibility-display").html(postL10n[n.find("input:radio:checked").val()+h]),b.preventDefault()}),n.find("input:radio").change(function(){f()}),o.siblings("a.edit-timestamp").click(function(b){o.is(":hidden")&&(o.slideDown("fast",function(){a("input, select",o.find(".timestamp-wrap")).first().focus()}),a(this).hide()),b.preventDefault()}),o.find(".cancel-timestamp").click(function(b){o.slideUp("fast").siblings("a.edit-timestamp").show().focus(),a("#mm").val(a("#hidden_mm").val()),a("#jj").val(a("#hidden_jj").val()),a("#aa").val(a("#hidden_aa").val()),a("#hh").val(a("#hidden_hh").val()),a("#mn").val(a("#hidden_mn").val()),g(),b.preventDefault()}),o.find(".save-timestamp").click(function(a){g()&&(o.slideUp("fast"),o.siblings("a.edit-timestamp").show().focus()),a.preventDefault()}),a("#post").on("submit",function(b){g()||(b.preventDefault(),o.show(),wp.autosave&&wp.autosave.enableButtons(),a("#publishing-action .spinner").removeClass("is-active"))}),p.siblings("a.edit-post-status").click(function(b){p.is(":hidden")&&(p.slideDown("fast",function(){p.find("select").focus()}),a(this).hide()),b.preventDefault()}),p.find(".save-post-status").click(function(a){p.slideUp("fast").siblings("a.edit-post-status").show().focus(),g(),a.preventDefault()}),p.find(".cancel-post-status").click(function(b){p.slideUp("fast").siblings("a.edit-post-status").show().focus(),a("#post_status").val(a("#hidden_post_status").val()),g(),b.preventDefault()})),a("#titlediv").on("click",".edit-slug",function(){b()}),wptitlehint=function(b){b=b||"title";var c=a("#"+b),d=a("#"+b+"-prompt-text");""===c.val()&&d.removeClass("screen-reader-text"),d.click(function(){a(this).addClass("screen-reader-text"),c.focus()}),c.blur(function(){""===this.value&&d.removeClass("screen-reader-text")}).focus(function(){d.addClass("screen-reader-text")}).keydown(function(b){d.addClass("screen-reader-text"),a(this).unbind(b)})},wptitlehint(),function(){function b(a){h.hasClass("wp-editor-expand")||(f?d.theme.resizeTo(null,e+a.pageY):i.height(Math.max(50,e+a.pageY)),a.preventDefault())}function c(){var b,c;h.hasClass("wp-editor-expand")||(f?(d.focus(),c=parseInt(a("#wp-content-editor-container .mce-toolbar-grp").height(),10),(10>c||c>200)&&(c=30),b=parseInt(a("#content_ifr").css("height"),10)+c-28):(i.focus(),b=parseInt(i.css("height"),10)),j.off(".wp-editor-resize"),b&&b>50&&5e3>b&&setUserSetting("ed_size",b))}var d,e,f,g=a("#post-status-info"),h=a("#postdivrich");return!i.length||"ontouchstart"in window?void a("#content-resize-handle").hide():void g.on("mousedown.wp-editor-resize",function(g){"undefined"!=typeof tinymce&&(d=tinymce.get("content")),d&&!d.isHidden()?(f=!0,e=a("#content_ifr").height()-g.pageY):(f=!1,e=i.height()-g.pageY,i.blur()),j.on("mousemove.wp-editor-resize",b).on("mouseup.wp-editor-resize mouseleave.wp-editor-resize",c),g.preventDefault()}).on("mouseup.wp-editor-resize",c)}(),"undefined"!=typeof tinymce&&a("#post-formats-select input.post-format").on("change.set-editor-class",function(){var b,c,d=this.id;d&&a(this).prop("checked")&&(b=tinymce.get("content"))&&(c=b.getBody(),c.className=c.className.replace(/\bpost-format-[^ ]+/,""),b.dom.addClass(c,"post-format-0"==d?"post-format-standard":d),a(document).trigger("editor-classchange"))}),i.on("keydown.wp-autosave",function(a){if(83===a.which){if(a.shiftKey||a.altKey||q&&(!a.metaKey||a.ctrlKey)||!q&&!a.ctrlKey)return;wp.autosave&&wp.autosave.server.triggerSave(),a.preventDefault()}}),"auto-draft"===a("#original_post_status").val()&&window.history.replaceState){var r;a("#publish").on("click",function(){r=window.location.href,r+=-1!==r.indexOf("?")?"&":"?",r+="wp-post-new-reload=true",window.history.replaceState(null,null,r)})}}),function(a,b){a(function(){function c(){var a,c;a=!d||d.isHidden()?e.val():d.getContent({format:"raw"}),c=b.count(a),c!==g&&f.text(c),g=c}var d,e=a("#content"),f=a("#wp-word-count").find(".word-count"),g=0;a(document).on("tinymce-editor-init",function(a,b){"content"===b.id&&(d=b,b.on("nodechange keyup",_.debounce(c,1e3)))}),e.on("input keyup",_.debounce(c,1e3)),c()})}(jQuery,new wp.utils.WordCounter);
\ No newline at end of file
+var commentsBox,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail,wptitlehint,makeSlugeditClickable,editPermalink;makeSlugeditClickable=editPermalink=function(){},window.wp=window.wp||{},function(a){var b=!1;commentsBox={st:0,get:function(b,c){var d,e=this.st;return c||(c=20),this.st+=c,this.total=b,a("#commentsdiv .spinner").addClass("is-active"),d={action:"get-comments",mode:"single",_ajax_nonce:a("#add_comment_nonce").val(),p:a("#post_ID").val(),start:e,number:c},a.post(ajaxurl,d,function(b){return b=wpAjax.parseAjaxResponse(b),a("#commentsdiv .widefat").show(),a("#commentsdiv .spinner").removeClass("is-active"),"object"==typeof b&&b.responses[0]?(a("#the-comment-list").append(b.responses[0].data),theList=theExtraList=null,a("a[className*=':']").unbind(),void(commentsBox.st>commentsBox.total?a("#show-comments").hide():a("#show-comments").show().children("a").html(postL10n.showcomm))):1==b?void a("#show-comments").html(postL10n.endcomm):void a("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")}),!1},load:function(a){this.st=jQuery("#the-comment-list tr.comment:visible").length,this.get(a)}},WPSetThumbnailHTML=function(b){a(".inside","#postimagediv").html(b)},WPSetThumbnailID=function(b){var c=a('input[value="_thumbnail_id"]',"#list-table");c.length>0&&a("#meta\\["+c.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(b)},WPRemoveThumbnail=function(b){a.post(ajaxurl,{action:"set-post-thumbnail",post_id:a("#post_ID").val(),thumbnail_id:-1,_ajax_nonce:b,cookie:encodeURIComponent(document.cookie)},function(a){"0"==a?alert(setPostThumbnailL10n.error):WPSetThumbnailHTML(a)})},a(document).on("heartbeat-send.refresh-lock",function(b,c){var d=a("#active_post_lock").val(),e=a("#post_ID").val(),f={};e&&a("#post-lock-dialog").length&&(f.post_id=e,d&&(f.lock=d),c["wp-refresh-post-lock"]=f)}).on("heartbeat-tick.refresh-lock",function(b,c){var d,e,f;c["wp-refresh-post-lock"]&&(d=c["wp-refresh-post-lock"],d.lock_error?(e=a("#post-lock-dialog"),e.length&&!e.is(":visible")&&(wp.autosave&&(a(document).one("heartbeat-tick",function(){wp.autosave.server.suspend(),e.removeClass("saving").addClass("saved"),a(window).off("beforeunload.edit-post")}),e.addClass("saving"),wp.autosave.server.triggerSave()),d.lock_error.avatar_src&&(f=a('<img class="avatar avatar-64 photo" width="64" height="64" alt="" />').attr("src",d.lock_error.avatar_src.replace(/&amp;/g,"&")),e.find("div.post-locked-avatar").empty().append(f)),e.show().find(".currently-editing").text(d.lock_error.text),e.find(".wp-tab-first").focus())):d.new_lock&&a("#active_post_lock").val(d.new_lock))}).on("before-autosave.update-post-slug",function(){b=document.activeElement&&"title"===document.activeElement.id}).on("after-autosave.update-post-slug",function(){a("#edit-slug-box > *").length||b||a.post(ajaxurl,{action:"sample-permalink",post_id:a("#post_ID").val(),new_title:a("#title").val(),samplepermalinknonce:a("#samplepermalinknonce").val()},function(b){"-1"!=b&&a("#edit-slug-box").html(b)})})}(jQuery),function(a){function b(){c=!1,window.clearTimeout(d),d=window.setTimeout(function(){c=!0},3e5)}var c,d;a(document).on("heartbeat-send.wp-refresh-nonces",function(b,d){var e,f=a("#wp-auth-check-wrap");(c||f.length&&!f.hasClass("hidden"))&&(e=a("#post_ID").val())&&a("#_wpnonce").val()&&(d["wp-refresh-post-nonces"]={post_id:e})}).on("heartbeat-tick.wp-refresh-nonces",function(c,d){var e=d["wp-refresh-post-nonces"];e&&(b(),e.replace&&a.each(e.replace,function(b,c){a("#"+b).val(c)}),e.heartbeatNonce&&(window.heartbeatSettings.nonce=e.heartbeatNonce))}).ready(function(){b()})}(jQuery),jQuery(document).ready(function(a){function b(){var b,c,d,e,f=0,g=a("#post_name"),h=g.val(),i=a("#sample-permalink"),j=i.html(),l=a("#sample-permalink a").html(),m=a("#edit-slug-buttons"),n=m.html(),o=a("#editable-post-name-full");for(o.find("img").replaceWith(function(){return this.alt}),o=o.html(),i.html(l),d=a("#editable-post-name"),e=d.html(),m.html('<button type="button" class="save button button-small">'+postL10n.ok+'</button> <button type="button" class="cancel button-link">'+postL10n.cancel+"</button>"),m.children(".save").click(function(){var b=d.children("input").val();return b==a("#editable-post-name-full").text()?void m.children(".cancel").click():void a.post(ajaxurl,{action:"sample-permalink",post_id:k,new_slug:b,new_title:a("#title").val(),samplepermalinknonce:a("#samplepermalinknonce").val()},function(c){var d=a("#edit-slug-box");d.html(c),d.hasClass("hidden")&&d.fadeIn("fast",function(){d.removeClass("hidden")}),m.html(n),i.html(j),g.val(b),a(".edit-slug").focus(),wp.a11y.speak(postL10n.permalinkSaved)})}),m.children(".cancel").click(function(){a("#view-post-btn").show(),d.html(e),m.html(n),i.html(j),g.val(h),a(".edit-slug").focus()}),b=0;b<o.length;++b)"%"==o.charAt(b)&&f++;c=f>o.length/4?"":o,d.html('<input type="text" id="new-post-slug" value="'+c+'" autocomplete="off" />').children("input").keydown(function(a){var b=a.which;13===b&&(a.preventDefault(),m.children(".save").click()),27===b&&m.children(".cancel").click()}).keyup(function(){g.val(this.value)}).focus()}var c,d,e,f,g,h="",i=a("#content"),j=a(document),k=a("#post_ID").val()||0,l=a("#submitpost"),m=!0,n=a("#post-visibility-select"),o=a("#timestampdiv"),p=a("#post-status-select"),q=!!window.navigator.platform&&window.navigator.platform.indexOf("Mac")!==-1;if(postboxes.add_postbox_toggles(pagenow),window.name="",a("#post-lock-dialog .notification-dialog").on("keydown",function(b){if(9==b.which){var c=a(b.target);c.hasClass("wp-tab-first")&&b.shiftKey?(a(this).find(".wp-tab-last").focus(),b.preventDefault()):c.hasClass("wp-tab-last")&&!b.shiftKey&&(a(this).find(".wp-tab-first").focus(),b.preventDefault())}}).filter(":visible").find(".wp-tab-first").focus(),wp.heartbeat&&a("#post-lock-dialog").length&&wp.heartbeat.interval(15),e=l.find(":submit, a.submitdelete, #post-preview").on("click.edit-post",function(b){var c=a(this);return c.hasClass("disabled")?void b.preventDefault():void(c.hasClass("submitdelete")||c.is("#post-preview")||a("form#post").off("submit.edit-post").on("submit.edit-post",function(b){if(!b.isDefaultPrevented()){if(wp.autosave&&wp.autosave.server.suspend(),"undefined"!=typeof commentReply){if(!commentReply.discardCommentChanges())return!1;commentReply.close()}m=!1,a(window).off("beforeunload.edit-post"),e.addClass("disabled"),"publish"===c.attr("id")?l.find("#major-publishing-actions .spinner").addClass("is-active"):l.find("#minor-publishing .spinner").addClass("is-active")}}))}),a("#post-preview").on("click.post-preview",function(b){var c=a(this),d=a("form#post"),e=a("input#wp-preview"),f=c.attr("target")||"wp-preview",g=navigator.userAgent.toLowerCase();b.preventDefault(),c.hasClass("disabled")||(wp.autosave&&wp.autosave.server.tempBlockSave(),e.val("dopreview"),d.attr("target",f).submit().attr("target",""),g.indexOf("safari")!==-1&&g.indexOf("chrome")===-1&&d.attr("action",function(a,b){return b+"?t="+(new Date).getTime()}),e.val(""))}),a("#title").on("keydown.editor-focus",function(a){var b;if(9===a.keyCode&&!a.ctrlKey&&!a.altKey&&!a.shiftKey){if(b="undefined"!=typeof tinymce&&tinymce.get("content"),b&&!b.isHidden())b.focus();else{if(!i.length)return;i.focus()}a.preventDefault()}}),a("#auto_draft").val()&&a("#title").blur(function(){var b;this.value&&!a("#edit-slug-box > *").length&&(a("form#post").one("submit",function(){b=!0}),window.setTimeout(function(){!b&&wp.autosave&&wp.autosave.server.triggerSave()},200))}),j.on("autosave-disable-buttons.edit-post",function(){e.addClass("disabled")}).on("autosave-enable-buttons.edit-post",function(){wp.heartbeat&&wp.heartbeat.hasConnectionError()||e.removeClass("disabled")}).on("before-autosave.edit-post",function(){a(".autosave-message").text(postL10n.savingText)}).on("after-autosave.edit-post",function(b,c){a(".autosave-message").text(c.message),a(document.body).hasClass("post-new-php")&&a(".submitbox .submitdelete").show()}),a(window).on("beforeunload.edit-post",function(){var a="undefined"!=typeof tinymce&&tinymce.get("content");if(a&&!a.isHidden()&&a.isDirty()||wp.autosave&&wp.autosave.server.postChanged())return postL10n.saveAlert}).on("unload.edit-post",function(b){m&&(b.target&&"#document"!=b.target.nodeName||a.ajax({type:"POST",url:ajaxurl,async:!1,data:{action:"wp-remove-post-lock",_wpnonce:a("#_wpnonce").val(),post_ID:a("#post_ID").val(),active_post_lock:a("#active_post_lock").val()}}))}),a("#tagsdiv-post_tag").length?window.tagBox&&window.tagBox.init():a(".meta-box-sortables").children("div.postbox").each(function(){if(0===this.id.indexOf("tagsdiv-"))return window.tagBox&&window.tagBox.init(),!1}),a(".categorydiv").each(function(){var b,c,d,e,f,g=a(this).attr("id");d=g.split("-"),d.shift(),e=d.join("-"),f=e+"_tab","category"==e&&(f="cats"),a("a","#"+e+"-tabs").click(function(b){b.preventDefault();var c=a(this).attr("href");a(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),a("#"+e+"-tabs").siblings(".tabs-panel").hide(),a(c).show(),"#"+e+"-all"==c?deleteUserSetting(f):setUserSetting(f,"pop")}),getUserSetting(f)&&a('a[href="#'+e+'-pop"]',"#"+e+"-tabs").click(),a("#new"+e).one("focus",function(){a(this).val("").removeClass("form-input-tip")}),a("#new"+e).keypress(function(b){13===b.keyCode&&(b.preventDefault(),a("#"+e+"-add-submit").click())}),a("#"+e+"-add-submit").click(function(){a("#new"+e).focus()}),b=function(b){return!!a("#new"+e).val()&&(b.data+="&"+a(":checked","#"+e+"checklist").serialize(),a("#"+e+"-add-submit").prop("disabled",!0),b)},c=function(b,c){var d,f=a("#new"+e+"_parent");a("#"+e+"-add-submit").prop("disabled",!1),"undefined"!=c.parsed.responses[0]&&(d=c.parsed.responses[0].supplemental.newcat_parent)&&(f.before(d),f.remove())},a("#"+e+"checklist").wpList({alt:"",response:e+"-ajax-response",addBefore:b,addAfter:c}),a("#"+e+"-add-toggle").click(function(b){b.preventDefault(),a("#"+e+"-adder").toggleClass("wp-hidden-children"),a('a[href="#'+e+'-all"]',"#"+e+"-tabs").click(),a("#new"+e).focus()}),a("#"+e+"checklist, #"+e+"checklist-pop").on("click",'li.popular-category > label input[type="checkbox"]',function(){var b=a(this),c=b.is(":checked"),d=b.val();d&&b.parents("#taxonomy-"+e).length&&a("#in-"+e+"-"+d+", #in-popular-"+e+"-"+d).prop("checked",c)})}),a("#postcustom").length&&a("#the-list").wpList({addAfter:function(){a("table#list-table").show()},addBefore:function(b){return b.data+="&post_id="+a("#post_ID").val(),b}}),a("#submitdiv").length&&(c=a("#timestamp").html(),d=a("#post-visibility-display").html(),f=function(){"public"!=n.find("input:radio:checked").val()?(a("#sticky").prop("checked",!1),a("#sticky-span").hide()):a("#sticky-span").show(),"password"!=n.find("input:radio:checked").val()?a("#password-span").hide():a("#password-span").show()},g=function(){if(!o.length)return!0;var b,d,e,f,g=a("#post_status"),h=a('option[value="publish"]',g),i=a("#aa").val(),j=a("#mm").val(),k=a("#jj").val(),l=a("#hh").val(),m=a("#mn").val();return b=new Date(i,j-1,k,l,m),d=new Date(a("#hidden_aa").val(),a("#hidden_mm").val()-1,a("#hidden_jj").val(),a("#hidden_hh").val(),a("#hidden_mn").val()),e=new Date(a("#cur_aa").val(),a("#cur_mm").val()-1,a("#cur_jj").val(),a("#cur_hh").val(),a("#cur_mn").val()),b.getFullYear()!=i||1+b.getMonth()!=j||b.getDate()!=k||b.getMinutes()!=m?(o.find(".timestamp-wrap").addClass("form-invalid"),!1):(o.find(".timestamp-wrap").removeClass("form-invalid"),b>e&&"future"!=a("#original_post_status").val()?(f=postL10n.publishOnFuture,a("#publish").val(postL10n.schedule)):b<=e&&"publish"!=a("#original_post_status").val()?(f=postL10n.publishOn,a("#publish").val(postL10n.publish)):(f=postL10n.publishOnPast,a("#publish").val(postL10n.update)),d.toUTCString()==b.toUTCString()?a("#timestamp").html(c):a("#timestamp").html("\n"+f+" <b>"+postL10n.dateFormat.replace("%1$s",a('option[value="'+j+'"]',"#mm").attr("data-text")).replace("%2$s",parseInt(k,10)).replace("%3$s",i).replace("%4$s",("00"+l).slice(-2)).replace("%5$s",("00"+m).slice(-2))+"</b> "),"private"==n.find("input:radio:checked").val()?(a("#publish").val(postL10n.update),0===h.length?g.append('<option value="publish">'+postL10n.privatelyPublished+"</option>"):h.html(postL10n.privatelyPublished),a('option[value="publish"]',g).prop("selected",!0),a("#misc-publishing-actions .edit-post-status").hide()):("future"==a("#original_post_status").val()||"draft"==a("#original_post_status").val()?h.length&&(h.remove(),g.val(a("#hidden_post_status").val())):h.html(postL10n.published),g.is(":hidden")&&a("#misc-publishing-actions .edit-post-status").show()),a("#post-status-display").html(a("option:selected",g).text()),"private"==a("option:selected",g).val()||"publish"==a("option:selected",g).val()?a("#save-post").hide():(a("#save-post").show(),"pending"==a("option:selected",g).val()?a("#save-post").show().val(postL10n.savePending):a("#save-post").show().val(postL10n.saveDraft)),!0)},a("#visibility .edit-visibility").click(function(b){b.preventDefault(),n.is(":hidden")&&(f(),n.slideDown("fast",function(){n.find('input[type="radio"]').first().focus()}),a(this).hide())}),n.find(".cancel-post-visibility").click(function(b){n.slideUp("fast"),a("#visibility-radio-"+a("#hidden-post-visibility").val()).prop("checked",!0),a("#post_password").val(a("#hidden-post-password").val()),a("#sticky").prop("checked",a("#hidden-post-sticky").prop("checked")),a("#post-visibility-display").html(d),a("#visibility .edit-visibility").show().focus(),g(),b.preventDefault()}),n.find(".save-post-visibility").click(function(b){n.slideUp("fast"),a("#visibility .edit-visibility").show().focus(),g(),"public"!=n.find("input:radio:checked").val()&&a("#sticky").prop("checked",!1),h=a("#sticky").prop("checked")?"Sticky":"",a("#post-visibility-display").html(postL10n[n.find("input:radio:checked").val()+h]),b.preventDefault()}),n.find("input:radio").change(function(){f()}),o.siblings("a.edit-timestamp").click(function(b){o.is(":hidden")&&(o.slideDown("fast",function(){a("input, select",o.find(".timestamp-wrap")).first().focus()}),a(this).hide()),b.preventDefault()}),o.find(".cancel-timestamp").click(function(b){o.slideUp("fast").siblings("a.edit-timestamp").show().focus(),a("#mm").val(a("#hidden_mm").val()),a("#jj").val(a("#hidden_jj").val()),a("#aa").val(a("#hidden_aa").val()),a("#hh").val(a("#hidden_hh").val()),a("#mn").val(a("#hidden_mn").val()),g(),b.preventDefault()}),o.find(".save-timestamp").click(function(a){g()&&(o.slideUp("fast"),o.siblings("a.edit-timestamp").show().focus()),a.preventDefault()}),a("#post").on("submit",function(b){g()||(b.preventDefault(),o.show(),wp.autosave&&wp.autosave.enableButtons(),a("#publishing-action .spinner").removeClass("is-active"))}),p.siblings("a.edit-post-status").click(function(b){p.is(":hidden")&&(p.slideDown("fast",function(){p.find("select").focus()}),a(this).hide()),b.preventDefault()}),p.find(".save-post-status").click(function(a){p.slideUp("fast").siblings("a.edit-post-status").show().focus(),g(),a.preventDefault()}),p.find(".cancel-post-status").click(function(b){p.slideUp("fast").siblings("a.edit-post-status").show().focus(),a("#post_status").val(a("#hidden_post_status").val()),g(),b.preventDefault()})),a("#titlediv").on("click",".edit-slug",function(){b()}),wptitlehint=function(b){b=b||"title";var c=a("#"+b),d=a("#"+b+"-prompt-text");""===c.val()&&d.removeClass("screen-reader-text"),d.click(function(){a(this).addClass("screen-reader-text"),c.focus()}),c.blur(function(){""===this.value&&d.removeClass("screen-reader-text")}).focus(function(){d.addClass("screen-reader-text")}).keydown(function(b){d.addClass("screen-reader-text"),a(this).unbind(b)})},wptitlehint(),function(){function b(a){h.hasClass("wp-editor-expand")||(f?d.theme.resizeTo(null,e+a.pageY):i.height(Math.max(50,e+a.pageY)),a.preventDefault())}function c(){var b,c;h.hasClass("wp-editor-expand")||(f?(d.focus(),c=parseInt(a("#wp-content-editor-container .mce-toolbar-grp").height(),10),(c<10||c>200)&&(c=30),b=parseInt(a("#content_ifr").css("height"),10)+c-28):(i.focus(),b=parseInt(i.css("height"),10)),j.off(".wp-editor-resize"),b&&b>50&&b<5e3&&setUserSetting("ed_size",b))}var d,e,f,g=a("#post-status-info"),h=a("#postdivrich");return!i.length||"ontouchstart"in window?void a("#content-resize-handle").hide():void g.on("mousedown.wp-editor-resize",function(g){"undefined"!=typeof tinymce&&(d=tinymce.get("content")),d&&!d.isHidden()?(f=!0,e=a("#content_ifr").height()-g.pageY):(f=!1,e=i.height()-g.pageY,i.blur()),j.on("mousemove.wp-editor-resize",b).on("mouseup.wp-editor-resize mouseleave.wp-editor-resize",c),g.preventDefault()}).on("mouseup.wp-editor-resize",c)}(),"undefined"!=typeof tinymce&&a("#post-formats-select input.post-format").on("change.set-editor-class",function(){var b,c,d=this.id;d&&a(this).prop("checked")&&(b=tinymce.get("content"))&&(c=b.getBody(),c.className=c.className.replace(/\bpost-format-[^ ]+/,""),b.dom.addClass(c,"post-format-0"==d?"post-format-standard":d),a(document).trigger("editor-classchange"))}),i.on("keydown.wp-autosave",function(a){if(83===a.which){if(a.shiftKey||a.altKey||q&&(!a.metaKey||a.ctrlKey)||!q&&!a.ctrlKey)return;wp.autosave&&wp.autosave.server.triggerSave(),a.preventDefault()}}),"auto-draft"===a("#original_post_status").val()&&window.history.replaceState){var r;a("#publish").on("click",function(){r=window.location.href,r+=r.indexOf("?")!==-1?"&":"?",r+="wp-post-new-reload=true",window.history.replaceState(null,null,r)})}}),function(a,b){a(function(){function c(){var a,c;a=!d||d.isHidden()?e.val():d.getContent({format:"raw"}),c=b.count(a),c!==g&&f.text(c),g=c}var d,e=a("#content"),f=a("#wp-word-count").find(".word-count"),g=0;a(document).on("tinymce-editor-init",function(a,b){"content"===b.id&&(d=b,b.on("nodechange keyup",_.debounce(c,1e3)))}),e.on("input keyup",_.debounce(c,1e3)),c()})}(jQuery,new wp.utils.WordCounter);
\ No newline at end of file
index 36673a900766185fd7cfc7b050f8022071c97f91..a8222ee296fc2dbf80fea8f1faba0aaa4cb6632d 100644 (file)
@@ -110,7 +110,7 @@ var postboxes;
                                tolerance: 'pointer',
                                forcePlaceholderSize: true,
                                helper: function( event, element ) {
-                                       // `helper: 'clone'` is equilavalent to `return element.clone();`
+                                       // `helper: 'clone'` is equivalent to `return element.clone();`
                                        // Cloning a checked radio and then inserting that clone next to the original
                                        // radio unchecks the original radio (since only one of the two can be checked).
                                        // We get around this by renaming the helper's inputs' name attributes so that,
@@ -139,6 +139,7 @@ var postboxes;
                                                $(ui.sender).sortable('cancel');
 
                                        postboxes._mark_area();
+                                       $document.trigger( 'postbox-moved', ui.item );
                                }
                        });
 
index 0170123c1a770aeea2c79320dc34172671f4c10e..9814badf4b55d395349a2c6ae365bcc947e6e9be 100644 (file)
@@ -1 +1 @@
-var postboxes;!function(a){var b=a(document);postboxes={handle_click:function(){var c,d=a(this),e=d.parent(".postbox"),f=e.attr("id");"dashboard_browser_nag"!==f&&(e.toggleClass("closed"),c=!e.hasClass("closed"),d.hasClass("handlediv")?d.attr("aria-expanded",c):d.closest(".postbox").find("button.handlediv").attr("aria-expanded",c),"press-this"!==postboxes.page&&postboxes.save_state(postboxes.page),f&&(!e.hasClass("closed")&&a.isFunction(postboxes.pbshow)?postboxes.pbshow(f):e.hasClass("closed")&&a.isFunction(postboxes.pbhide)&&postboxes.pbhide(f)),b.trigger("postbox-toggled",e))},add_postbox_toggles:function(c,d){var e=a(".postbox .hndle, .postbox .handlediv");this.page=c,this.init(c,d),e.on("click.postboxes",this.handle_click),a(".postbox .hndle a").click(function(a){a.stopPropagation()}),a(".postbox a.dismiss").on("click.postboxes",function(b){var c=a(this).parents(".postbox").attr("id")+"-hide";b.preventDefault(),a("#"+c).prop("checked",!1).triggerHandler("click")}),a(".hide-postbox-tog").bind("click.postboxes",function(){var d=a(this),e=d.val(),f=a("#"+e);d.prop("checked")?(f.show(),a.isFunction(postboxes.pbshow)&&postboxes.pbshow(e)):(f.hide(),a.isFunction(postboxes.pbhide)&&postboxes.pbhide(e)),postboxes.save_state(c),postboxes._mark_area(),b.trigger("postbox-toggled",f)}),a('.columns-prefs input[type="radio"]').bind("click.postboxes",function(){var b=parseInt(a(this).val(),10);b&&(postboxes._pb_edit(b),postboxes.save_order(c))})},init:function(b,c){var d=a(document.body).hasClass("mobile"),e=a(".postbox .handlediv");a.extend(this,c||{}),a("#wpbody-content").css("overflow","hidden"),a(".meta-box-sortables").sortable({placeholder:"sortable-placeholder",connectWith:".meta-box-sortables",items:".postbox",handle:".hndle",cursor:"move",delay:d?200:0,distance:2,tolerance:"pointer",forcePlaceholderSize:!0,helper:function(a,b){return b.clone().find(":input").attr("name",function(a,b){return"sort_"+parseInt(1e5*Math.random(),10).toString()+"_"+b}).end()},opacity:.65,stop:function(){var c=a(this);return c.find("#dashboard_browser_nag").is(":visible")&&"dashboard_browser_nag"!=this.firstChild.id?void c.sortable("cancel"):void postboxes.save_order(b)},receive:function(b,c){"dashboard_browser_nag"==c.item[0].id&&a(c.sender).sortable("cancel"),postboxes._mark_area()}}),d&&(a(document.body).bind("orientationchange.postboxes",function(){postboxes._pb_change()}),this._pb_change()),this._mark_area(),e.each(function(){var b=a(this);b.attr("aria-expanded",!b.parent(".postbox").hasClass("closed"))})},save_state:function(b){var c,d;"nav-menus"!==b&&(c=a(".postbox").filter(".closed").map(function(){return this.id}).get().join(","),d=a(".postbox").filter(":hidden").map(function(){return this.id}).get().join(","),a.post(ajaxurl,{action:"closed-postboxes",closed:c,hidden:d,closedpostboxesnonce:jQuery("#closedpostboxesnonce").val(),page:b}))},save_order:function(b){var c,d=a(".columns-prefs input:checked").val()||0;c={action:"meta-box-order",_ajax_nonce:a("#meta-box-order-nonce").val(),page_columns:d,page:b},a(".meta-box-sortables").each(function(){c["order["+this.id.split("-")[0]+"]"]=a(this).sortable("toArray").join(",")}),a.post(ajaxurl,c)},_mark_area:function(){var b=a("div.postbox:visible").length,c=a("#post-body #side-sortables");a("#dashboard-widgets .meta-box-sortables:visible").each(function(){var c=a(this);1==b||c.children(".postbox:visible").length?c.removeClass("empty-container"):(c.addClass("empty-container"),c.attr("data-emptyString",postBoxL10n.postBoxEmptyString))}),c.length&&(c.children(".postbox:visible").length?c.removeClass("empty-container"):"280px"==a("#postbox-container-1").css("width")&&c.addClass("empty-container"))},_pb_edit:function(b){var c=a(".metabox-holder").get(0);c&&(c.className=c.className.replace(/columns-\d+/,"columns-"+b)),a(document).trigger("postboxes-columnchange")},_pb_change:function(){var b=a('label.columns-prefs-1 input[type="radio"]');switch(window.orientation){case 90:case-90:b.length&&b.is(":checked")||this._pb_edit(2);break;case 0:case 180:a("#poststuff").length?this._pb_edit(1):b.length&&b.is(":checked")||this._pb_edit(2)}},pbshow:!1,pbhide:!1}}(jQuery);
\ No newline at end of file
+var postboxes;!function(a){var b=a(document);postboxes={handle_click:function(){var c,d=a(this),e=d.parent(".postbox"),f=e.attr("id");"dashboard_browser_nag"!==f&&(e.toggleClass("closed"),c=!e.hasClass("closed"),d.hasClass("handlediv")?d.attr("aria-expanded",c):d.closest(".postbox").find("button.handlediv").attr("aria-expanded",c),"press-this"!==postboxes.page&&postboxes.save_state(postboxes.page),f&&(!e.hasClass("closed")&&a.isFunction(postboxes.pbshow)?postboxes.pbshow(f):e.hasClass("closed")&&a.isFunction(postboxes.pbhide)&&postboxes.pbhide(f)),b.trigger("postbox-toggled",e))},add_postbox_toggles:function(c,d){var e=a(".postbox .hndle, .postbox .handlediv");this.page=c,this.init(c,d),e.on("click.postboxes",this.handle_click),a(".postbox .hndle a").click(function(a){a.stopPropagation()}),a(".postbox a.dismiss").on("click.postboxes",function(b){var c=a(this).parents(".postbox").attr("id")+"-hide";b.preventDefault(),a("#"+c).prop("checked",!1).triggerHandler("click")}),a(".hide-postbox-tog").bind("click.postboxes",function(){var d=a(this),e=d.val(),f=a("#"+e);d.prop("checked")?(f.show(),a.isFunction(postboxes.pbshow)&&postboxes.pbshow(e)):(f.hide(),a.isFunction(postboxes.pbhide)&&postboxes.pbhide(e)),postboxes.save_state(c),postboxes._mark_area(),b.trigger("postbox-toggled",f)}),a('.columns-prefs input[type="radio"]').bind("click.postboxes",function(){var b=parseInt(a(this).val(),10);b&&(postboxes._pb_edit(b),postboxes.save_order(c))})},init:function(c,d){var e=a(document.body).hasClass("mobile"),f=a(".postbox .handlediv");a.extend(this,d||{}),a("#wpbody-content").css("overflow","hidden"),a(".meta-box-sortables").sortable({placeholder:"sortable-placeholder",connectWith:".meta-box-sortables",items:".postbox",handle:".hndle",cursor:"move",delay:e?200:0,distance:2,tolerance:"pointer",forcePlaceholderSize:!0,helper:function(a,b){return b.clone().find(":input").attr("name",function(a,b){return"sort_"+parseInt(1e5*Math.random(),10).toString()+"_"+b}).end()},opacity:.65,stop:function(){var b=a(this);return b.find("#dashboard_browser_nag").is(":visible")&&"dashboard_browser_nag"!=this.firstChild.id?void b.sortable("cancel"):void postboxes.save_order(c)},receive:function(c,d){"dashboard_browser_nag"==d.item[0].id&&a(d.sender).sortable("cancel"),postboxes._mark_area(),b.trigger("postbox-moved",d.item)}}),e&&(a(document.body).bind("orientationchange.postboxes",function(){postboxes._pb_change()}),this._pb_change()),this._mark_area(),f.each(function(){var b=a(this);b.attr("aria-expanded",!b.parent(".postbox").hasClass("closed"))})},save_state:function(b){var c,d;"nav-menus"!==b&&(c=a(".postbox").filter(".closed").map(function(){return this.id}).get().join(","),d=a(".postbox").filter(":hidden").map(function(){return this.id}).get().join(","),a.post(ajaxurl,{action:"closed-postboxes",closed:c,hidden:d,closedpostboxesnonce:jQuery("#closedpostboxesnonce").val(),page:b}))},save_order:function(b){var c,d=a(".columns-prefs input:checked").val()||0;c={action:"meta-box-order",_ajax_nonce:a("#meta-box-order-nonce").val(),page_columns:d,page:b},a(".meta-box-sortables").each(function(){c["order["+this.id.split("-")[0]+"]"]=a(this).sortable("toArray").join(",")}),a.post(ajaxurl,c)},_mark_area:function(){var b=a("div.postbox:visible").length,c=a("#post-body #side-sortables");a("#dashboard-widgets .meta-box-sortables:visible").each(function(){var c=a(this);1==b||c.children(".postbox:visible").length?c.removeClass("empty-container"):(c.addClass("empty-container"),c.attr("data-emptyString",postBoxL10n.postBoxEmptyString))}),c.length&&(c.children(".postbox:visible").length?c.removeClass("empty-container"):"280px"==a("#postbox-container-1").css("width")&&c.addClass("empty-container"))},_pb_edit:function(b){var c=a(".metabox-holder").get(0);c&&(c.className=c.className.replace(/columns-\d+/,"columns-"+b)),a(document).trigger("postboxes-columnchange")},_pb_change:function(){var b=a('label.columns-prefs-1 input[type="radio"]');switch(window.orientation){case 90:case-90:b.length&&b.is(":checked")||this._pb_edit(2);break;case 0:case 180:a("#poststuff").length?this._pb_edit(1):b.length&&b.is(":checked")||this._pb_edit(2)}},pbshow:!1,pbhide:!1}}(jQuery);
\ No newline at end of file
index cb22aba3dfb358e730621139490cd5b47b974d3a..e6d614c89d35f6145ffca14b6e8c4a43a471b66e 100644 (file)
@@ -1 +1 @@
-!function(a,b){var c=function(){function c(a){return a&&b.pressThisL10n?b.pressThisL10n[a]||a:a||""}function d(a){return a=a||"",a.replace(/<!--[\s\S]*?(-->|$)/g,"").replace(/<(script|style)[^>]*>[\s\S]*?(<\/\1>|$)/gi,"").replace(/<\/?[a-z][\s\S]*?(>|$)/gi,"")}function e(a){var b=d(a);try{O.innerHTML=b,b=d(O.value)}catch(c){}return b}function f(b){return b=a.trim(b||""),/^(?:https?:)?\/\//.test(b)?(b=d(b),b.replace(/["\\]+/g,"")):""}function g(){a(".spinner").addClass("is-active"),a(".post-actions button").attr("disabled","disabled")}function h(){a(".spinner").removeClass("is-active"),a(".post-actions button").removeAttr("disabled")}function i(a){var c,d;(!I||I.isHidden())&&(a="reset"===a||aa&&aa>$.value.length,d=$.style.height,a?(c=b.pageYOffset,$.style.height="auto",$.style.height=Math.max($.scrollHeight,_)+"px",b.scrollTo(b.pageXOffset,c)):parseInt($.style.height,10)<$.scrollHeight&&($.style.height=$.scrollHeight+"px"),aa=$.value.length)}function j(){if(!I)return!1;var a,b,c,d=I.selection.getNode();if(I.wp&&I.wp.getView&&(b=I.wp.getView(d)))c=b.getBoundingClientRect();else{a=I.selection.getRng();try{c=a.getClientRects()[0]}catch(e){}c||(c=d.getBoundingClientRect())}return c.height?c:!1}function k(a){var c=b.tinymce.util.VK,d=a.keyCode;47>=d&&d!==c.SPACEBAR&&d!==c.ENTER&&d!==c.DELETE&&d!==c.BACKSPACE&&d!==c.UP&&d!==c.LEFT&&d!==c.DOWN&&d!==c.UP||d>=91&&93>=d||d>=112&&123>=d||144===d||145===d||l(d)}function l(a){var c,d,e,f=j(),g=50,h=65,i=b.tinymce.util.VK;f&&(c=f.top+I.iframeElement.getBoundingClientRect().top,d=c+f.height,c-=g,d+=h,e=L.height(),e<f.height||(0>c&&(a===i.UP||a===i.LEFT||a===i.BACKSPACE)?b.scrollTo(b.pageXOffset,c+b.pageYOffset):d>e&&b.scrollTo(b.pageXOffset,d+b.pageYOffset-e)))}function m(){var b=a("#title-container");return b.find("img.emoji").each(function(){var b=a(this);b.replaceWith(a("<span>").text(b.attr("alt")))}),e(b.text())}function n(){var c=a("#pressthis-form"),d=a('<input type="hidden" name="post_category[]" value="">');I&&I.save(),a("#post_title").val(m()),b.tagBox&&a("div.tagsdiv").each(function(){b.tagBox.flushTags(this,!1,1)}),a(".categories-select .category").each(function(b,e){var f=a(e);f.hasClass("selected")&&c.append(d.clone().val(f.attr("data-term-id")||""))})}function o(d){var e;N=!1,g(),"publish"===d&&a("#post_status").val("publish"),n(),e=a("#pressthis-form").serialize(),a.ajax({type:"post",url:b.ajaxurl,data:e}).always(function(){h(),u(),a(".publish-button").removeClass("is-saving")}).done(function(a){if(a.success){if(a.data.redirect)if(b.opener&&(Q.redirInParent||a.data.force))try{b.opener.location.href=a.data.redirect,b.setTimeout(function(){b.self.close()},200)}catch(c){b.location.href=a.data.redirect}else b.location.href=a.data.redirect}else t(a.data.errorMessage)}).fail(function(){t(c("serverError"))})}function p(a){var c,d,e="";c=f(a.attr("data-wp-src")||""),d=f(R.u),a.hasClass("is-image")?(d||(d=c),e='<a href="'+d+'"><img class="alignnone size-full" src="'+c+'" alt="" /></a>'):e="[embed]"+c+"[/embed]",I&&!I.isHidden()?T?I.execCommand("mceInsertContent",!1,e):I.setContent("<p>"+e+"</p>"+I.getContent()):b.QTags&&b.QTags.insertContent(e)}function q(){var c,d=a("#new-category").val();d&&(c={action:"press-this-add-category",post_id:a("#post_ID").val()||0,name:d,new_cat_nonce:a("#_ajax_nonce-add-category").val()||"",parent:a("#new-category-parent").val()||0},a.post(b.ajaxurl,c,function(b){if(b.success){var c,d,e=a("ul.categories-select");a.each(b.data,function(b,f){var g=a("<li>").append(a('<div class="category selected" tabindex="0" role="checkbox" aria-checked="true">').attr("data-term-id",f.term_id).text(f.name));f.parent?(d&&d.length||(c=e.find('div[data-term-id="'+f.parent+'"]').parent(),d=c.find("ul.children:first"),d.length||(d=a('<ul class="children">').appendTo(c))),d.prepend(g)):e.prepend(g),g.focus()}),H()}else t(b.data.errorMessage)}))}function r(){R.hasData&&a("#scanbar").hide()}function s(b,c){var d=a(".editor-wrapper div.alerts"),e=c?"is-error":"is-notice";d.append(a('<p class="alert '+e+'">').text(b))}function t(a){s(a,!0)}function u(){a("div.alerts").empty()}function v(){R.errors&&a.each(R.errors,function(a,b){t(b)})}function w(a,b,d){var e=K.clone().addClass("is-image");e.attr("data-wp-src",a).css("background-image","url("+b+")").find("span").text(c("suggestedImgAlt").replace("%d",d+1)),J.append(e)}function x(){var b=0;J=a("ul.media-list"),K=a('<li class="suggested-media-thumbnail" tabindex="0"><span class="screen-reader-text"></span></li>'),R._embeds&&a.each(R._embeds,function(a,d){var e="",g="",h=K.clone().addClass("is-embed");d=f(d),d.indexOf("youtube.com/")>-1?(e="https://i.ytimg.com/vi/"+d.replace(/.+v=([^&]+).*/,"$1")+"/hqdefault.jpg",g+=" is-video"):d.indexOf("youtu.be/")>-1?(e="https://i.ytimg.com/vi/"+d.replace(/\/([^\/])$/,"$1")+"/hqdefault.jpg",g+=" is-video"):d.indexOf("dailymotion.com")>-1?(e=d.replace("/video/","/thumbnail/video/"),g+=" is-video"):g+=d.indexOf("soundcloud.com")>-1?" is-audio":d.indexOf("twitter.com")>-1?" is-tweet":" is-video",h.attr("data-wp-src",d).find("span").text(c("suggestedEmbedAlt").replace("%d",a+1)),e&&h.css("background-image","url("+e+")"),J.append(h),b++}),R._images&&a.each(R._images,function(a,c){var d,e=new Image;c=f(c),d=c.replace(/^(http[^\?]+)(\?.*)?$/,"$1"),d=c.indexOf("files.wordpress.com/")>-1?d.replace(/\?.*$/,"")+"?w="+S:c.indexOf("gravatar.com/")>-1?d.replace(/\?.*$/,"")+"?s="+S:c,e.onload=function(){e.width&&e.width<256||e.height&&e.height<128||w(c,d,a)},e.src=c,b++}),b&&a(".media-list-container").addClass("has-media")}function y(){var b=a(".post-options"),c=a(".post-option"),d=a(".setting-modal"),e=a(".modal-close");c.on("click",function(){var c=a(this).index(),e=d.eq(c);b.addClass(V).one(ba,function(){a(this).addClass(W)}),e.removeClass(X).one(ba,function(){a(this).find(".modal-close").focus()})}),e.on("click",function(){var d=a(this).parent(),e=d.index();b.removeClass(X),d.addClass(V),ba?d.one(ba,function(){a(this).addClass(W),c.eq(e-1).focus()}):setTimeout(function(){d.addClass(W),c.eq(e-1).focus()},350)})}function z(){P=!0,a(".options").removeClass("closed").addClass("open"),a(".press-this-actions, #scanbar").addClass(W),a(".options-panel-back").removeClass(W),a(".options-panel").removeClass(X).one(ba,function(){a(".post-option:first").focus()})}function A(){P=!1,a(".options").removeClass("open").addClass("closed"),a(".options-panel-back").addClass(W),a(".press-this-actions, #scanbar").removeClass(W),a(".options-panel").addClass(V).one(ba,function(){a(this).addClass(W),a(".post-options").removeClass(X),a(".setting-modal").addClass(X)})}function B(){var c=a("#title-container"),d=a(".post-title-placeholder");c.on("focus",function(){d.addClass("is-hidden")}).on("blur",function(){c.text()||c.html()||d.removeClass("is-hidden")}).on("keyup",function(){N=!0}).on("paste",function(d){var e,f,g=d.originalEvent.clipboardData||b.clipboardData;if(g){try{e=g.getData("Text")||g.getData("text/plain"),e&&(e=a.trim(e.replace(/\s+/g," ")),b.getSelection?(f=b.getSelection().getRangeAt(0),f&&(f.collapsed||f.deleteContents(),f.insertNode(document.createTextNode(e)))):document.selection&&(f=document.selection.createRange(),f&&(f.text=e)))}catch(h){}d.preventDefault()}N=!0,setTimeout(function(){c.text(m())},50)}),(c.text()||c.html())&&d.addClass("is-hidden")}function C(a){a.hasClass("selected")?a.removeClass("selected").attr("aria-checked","false"):a.addClass("selected").attr("aria-checked","true")}function D(){a(".categories-select").on("click.press-this keydown.press-this",function(b){var c=a(b.target);if(c.is("div.category")){if("keydown"===b.type&&32!==b.keyCode)return;C(c),b.preventDefault()}})}function E(){a(".split-button").removeClass("is-open"),a(".split-button-toggle").attr("aria-expanded","false")}function F(){r(),x(),v(),b.tagBox&&b.tagBox.init(),Y&&a(document.body).css("cursor","pointer")}function G(){var d=a(".split-button");return M.on("tinymce-editor-init",function(a,b){I=b,I.on("nodechange",function(){T=!0}),I.on("focus",function(){E()}),I.on("show",function(){setTimeout(function(){I.execCommand("wpAutoResize")},300)}),I.on("hide",function(){setTimeout(function(){i("reset")},100)}),I.on("keyup",k),I.on("undo redo",l)}).on("click.press-this keypress.press-this",".suggested-media-thumbnail",function(b){("click"===b.type||13===b.keyCode)&&p(a(this))}).on("click.press-this",function(b){a(b.target).closest("button").hasClass("split-button-toggle")||E()}),a(".post-actions").on("click.press-this",function(c){var e,f=a(c.target),g=f.closest("button");g.length&&(g.hasClass("draft-button")?(a(".publish-button").addClass("is-saving"),o("draft")):g.hasClass("publish-button")?(g.addClass("is-saving"),b.history.replaceState&&(e=b.location.href,e+=-1!==e.indexOf("?")?"&":"?",e+="wp-press-this-reload=true",b.history.replaceState(null,null,e)),o("publish")):g.hasClass("preview-button")?(n(),b.opener&&b.opener.focus(),a("#wp-preview").val("dopreview"),a("#pressthis-form").attr("target","_blank").submit().attr("target",""),a("#wp-preview").val("")):g.hasClass("standard-editor-button")?(a(".publish-button").addClass("is-saving"),a("#pt-force-redirect").val("true"),o("draft")):g.hasClass("split-button-toggle")&&(d.hasClass("is-open")?(d.removeClass("is-open"),g.attr("aria-expanded","false")):(d.addClass("is-open"),g.attr("aria-expanded","true"))))}),y(),B(),D(),a(".options").on("click.press-this",function(){a(this).hasClass("open")?A():z()}),a(".options-panel, .options-panel-back").on("focusout.press-this",function(){setTimeout(function(){var b=document.activeElement,c=a(b);!P||!b||c.hasClass("options-panel-back")||"BODY"!==b.nodeName&&(c.closest(".options-panel").length||c.closest(".options").length)||A()},50)}),a("#post-formats-select input").on("change",function(){var b=a(this);b.is(":checked")&&a("#post-option-post-format").text(a('label[for="'+b.attr("id")+'"]').text()||"")}),L.on("beforeunload.press-this",function(){return N||I&&I.isDirty()?c("saveAlert"):void 0}).on("resize.press-this",function(){(!I||I.isHidden())&&i("reset")}),a("button.add-cat-toggle").on("click.press-this",function(){var b=a(this);b.toggleClass("is-toggled"),b.attr("aria-expanded","false"===b.attr("aria-expanded")?"true":"false"),a(".setting-modal .add-category, .categories-search-wrapper").toggleClass("is-hidden")}),a("button.add-cat-submit").on("click.press-this",q),a(".categories-search").on("keyup.press-this",function(){var b=a(this).val().toLowerCase()||"";/[\x20-\xFF]+/.test(b)&&b.length<2||(a.each(U,function(a,b){b.node.removeClass("is-hidden searched-parent")}),b&&a.each(U,function(a,c){-1===c.text.indexOf(b)?c.node.addClass("is-hidden"):c.parents.addClass("searched-parent")}))}),Z.on("focus.press-this input.press-this propertychange.press-this",i),!0}function H(){a(".categories-select").find("li").each(function(){var b=a(this);U.push({node:b,parents:b.parents("li"),text:b.children(".category").text().toLowerCase()})})}var I,J,K,L=a(b),M=a(document),N=!1,O=document.createElement("textarea"),P=!1,Q=b.wpPressThisConfig||{},R=b.wpPressThisData||{},S=128,T=!1,U=[],V="is-off-screen",W="is-hidden",X=V+" "+W,Y=/iPad|iPod|iPhone/.test(b.navigator.userAgent),Z=a("#pressthis"),$=Z[0],_=600,aa=0,ba=function(){var a=document.documentElement.style;return"undefined"!=typeof a.transition?"transitionend":"undefined"!=typeof a.WebkitTransition?"webkitTransitionEnd":!1}();return M.ready(function(){F(),G(),H()}),{renderNotice:s,renderError:t}};b.wp=b.wp||{},b.wp.pressThis=new c}(jQuery,window);
\ No newline at end of file
+!function(a,b){var c=function(){function c(a){return a&&b.pressThisL10n?b.pressThisL10n[a]||a:a||""}function d(a){return a=a||"",a.replace(/<!--[\s\S]*?(-->|$)/g,"").replace(/<(script|style)[^>]*>[\s\S]*?(<\/\1>|$)/gi,"").replace(/<\/?[a-z][\s\S]*?(>|$)/gi,"")}function e(a){var b=d(a);try{O.innerHTML=b,b=d(O.value)}catch(c){}return b}function f(b){return b=a.trim(b||""),/^(?:https?:)?\/\//.test(b)?(b=d(b),b.replace(/["\\]+/g,"")):""}function g(){a(".spinner").addClass("is-active"),a(".post-actions button").attr("disabled","disabled")}function h(){a(".spinner").removeClass("is-active"),a(".post-actions button").removeAttr("disabled")}function i(a){var c,d;I&&!I.isHidden()||(a="reset"===a||aa&&aa>$.value.length,d=$.style.height,a?(c=b.pageYOffset,$.style.height="auto",$.style.height=Math.max($.scrollHeight,_)+"px",b.scrollTo(b.pageXOffset,c)):parseInt($.style.height,10)<$.scrollHeight&&($.style.height=$.scrollHeight+"px"),aa=$.value.length)}function j(){if(!I)return!1;var a,b,c,d=I.selection.getNode();if(I.wp&&I.wp.getView&&(b=I.wp.getView(d)))c=b.getBoundingClientRect();else{a=I.selection.getRng();try{c=a.getClientRects()[0]}catch(e){}c||(c=d.getBoundingClientRect())}return!!c.height&&c}function k(a){var c=b.tinymce.util.VK,d=a.keyCode;d<=47&&d!==c.SPACEBAR&&d!==c.ENTER&&d!==c.DELETE&&d!==c.BACKSPACE&&d!==c.UP&&d!==c.LEFT&&d!==c.DOWN&&d!==c.UP||d>=91&&d<=93||d>=112&&d<=123||144===d||145===d||l(d)}function l(a){var c,d,e,f=j(),g=50,h=65,i=b.tinymce.util.VK;f&&(c=f.top+I.iframeElement.getBoundingClientRect().top,d=c+f.height,c-=g,d+=h,e=L.height(),e<f.height||(c<0&&(a===i.UP||a===i.LEFT||a===i.BACKSPACE)?b.scrollTo(b.pageXOffset,c+b.pageYOffset):d>e&&b.scrollTo(b.pageXOffset,d+b.pageYOffset-e)))}function m(){var b=a("#title-container");return b.find("img.emoji").each(function(){var b=a(this);b.replaceWith(a("<span>").text(b.attr("alt")))}),e(b.text())}function n(){var c=a("#pressthis-form"),d=a('<input type="hidden" name="post_category[]" value="">');I&&I.save(),a("#post_title").val(m()),b.tagBox&&a("div.tagsdiv").each(function(){b.tagBox.flushTags(this,!1,1)}),a(".categories-select .category").each(function(b,e){var f=a(e);f.hasClass("selected")&&c.append(d.clone().val(f.attr("data-term-id")||""))})}function o(d){var e;N=!1,g(),"publish"===d&&a("#post_status").val("publish"),n(),e=a("#pressthis-form").serialize(),a.ajax({type:"post",url:b.ajaxurl,data:e}).always(function(){h(),u(),a(".publish-button").removeClass("is-saving")}).done(function(a){if(a.success){if(a.data.redirect)if(b.opener&&(Q.redirInParent||a.data.force))try{b.opener.location.href=a.data.redirect,b.setTimeout(function(){b.self.close()},200)}catch(c){b.location.href=a.data.redirect}else b.location.href=a.data.redirect}else t(a.data.errorMessage)}).fail(function(){t(c("serverError"))})}function p(a){var c,d,e="";c=f(a.attr("data-wp-src")||""),d=f(R.u),a.hasClass("is-image")?(d||(d=c),e='<a href="'+d+'"><img class="alignnone size-full" src="'+c+'" alt="" /></a>'):e="[embed]"+c+"[/embed]",I&&!I.isHidden()?T?I.execCommand("mceInsertContent",!1,e):I.setContent("<p>"+e+"</p>"+I.getContent()):b.QTags&&b.QTags.insertContent(e)}function q(){var c,d=a("#new-category").val();d&&(c={action:"press-this-add-category",post_id:a("#post_ID").val()||0,name:d,new_cat_nonce:a("#_ajax_nonce-add-category").val()||"",parent:a("#new-category-parent").val()||0},a.post(b.ajaxurl,c,function(b){if(b.success){var c,d,e=a("ul.categories-select");a.each(b.data,function(b,f){var g=a("<li>").append(a('<div class="category selected" tabindex="0" role="checkbox" aria-checked="true">').attr("data-term-id",f.term_id).text(f.name));f.parent?(d&&d.length||(c=e.find('div[data-term-id="'+f.parent+'"]').parent(),d=c.find("ul.children:first"),d.length||(d=a('<ul class="children">').appendTo(c))),d.prepend(g)):e.prepend(g),g.focus()}),H()}else t(b.data.errorMessage)}))}function r(){R.hasData&&a("#scanbar").hide()}function s(b,c){var d=a(".editor-wrapper div.alerts"),e=c?"is-error":"is-notice";d.append(a('<p class="alert '+e+'">').text(b))}function t(a){s(a,!0)}function u(){a("div.alerts").empty()}function v(){R.errors&&a.each(R.errors,function(a,b){t(b)})}function w(a,b,d){var e=K.clone().addClass("is-image");e.attr("data-wp-src",a).css("background-image","url("+b+")").find("span").text(c("suggestedImgAlt").replace("%d",d+1)),J.append(e)}function x(){var b=0;J=a("ul.media-list"),K=a('<li class="suggested-media-thumbnail" tabindex="0"><span class="screen-reader-text"></span></li>'),R._embeds&&a.each(R._embeds,function(a,d){var e="",g="",h=K.clone().addClass("is-embed");d=f(d),d.indexOf("youtube.com/")>-1?(e="https://i.ytimg.com/vi/"+d.replace(/.+v=([^&]+).*/,"$1")+"/hqdefault.jpg",g+=" is-video"):d.indexOf("youtu.be/")>-1?(e="https://i.ytimg.com/vi/"+d.replace(/\/([^\/])$/,"$1")+"/hqdefault.jpg",g+=" is-video"):d.indexOf("dailymotion.com")>-1?(e=d.replace("/video/","/thumbnail/video/"),g+=" is-video"):g+=d.indexOf("soundcloud.com")>-1?" is-audio":d.indexOf("twitter.com")>-1?" is-tweet":" is-video",h.attr("data-wp-src",d).find("span").text(c("suggestedEmbedAlt").replace("%d",a+1)),e&&h.css("background-image","url("+e+")"),J.append(h),b++}),R._images&&a.each(R._images,function(a,c){var d,e=new Image;c=f(c),d=c.replace(/^(http[^\?]+)(\?.*)?$/,"$1"),d=c.indexOf("files.wordpress.com/")>-1?d.replace(/\?.*$/,"")+"?w="+S:c.indexOf("gravatar.com/")>-1?d.replace(/\?.*$/,"")+"?s="+S:c,e.onload=function(){e.width&&e.width<256||e.height&&e.height<128||w(c,d,a)},e.src=c,b++}),b&&a(".media-list-container").addClass("has-media")}function y(){var b=a(".post-options"),c=a(".post-option"),d=a(".setting-modal"),e=a(".modal-close");c.on("click",function(){var c=a(this).index(),e=d.eq(c);b.addClass(V).one(ba,function(){a(this).addClass(W)}),e.removeClass(X).one(ba,function(){a(this).find(".modal-close").focus()})}),e.on("click",function(){var d=a(this).parent(),e=d.index();b.removeClass(X),d.addClass(V),ba?d.one(ba,function(){a(this).addClass(W),c.eq(e-1).focus()}):setTimeout(function(){d.addClass(W),c.eq(e-1).focus()},350)})}function z(){P=!0,a(".options").removeClass("closed").addClass("open"),a(".press-this-actions, #scanbar").addClass(W),a(".options-panel-back").removeClass(W),a(".options-panel").removeClass(X).one(ba,function(){a(".post-option:first").focus()})}function A(){P=!1,a(".options").removeClass("open").addClass("closed"),a(".options-panel-back").addClass(W),a(".press-this-actions, #scanbar").removeClass(W),a(".options-panel").addClass(V).one(ba,function(){a(this).addClass(W),a(".post-options").removeClass(X),a(".setting-modal").addClass(X)})}function B(){var c=a("#title-container"),d=a(".post-title-placeholder");c.on("focus",function(){d.addClass("is-hidden")}).on("blur",function(){c.text()||c.html()||d.removeClass("is-hidden")}).on("keyup",function(){N=!0}).on("paste",function(d){var e,f,g=d.originalEvent.clipboardData||b.clipboardData;if(g){try{e=g.getData("Text")||g.getData("text/plain"),e&&(e=a.trim(e.replace(/\s+/g," ")),b.getSelection?(f=b.getSelection().getRangeAt(0),f&&(f.collapsed||f.deleteContents(),f.insertNode(document.createTextNode(e)))):document.selection&&(f=document.selection.createRange(),f&&(f.text=e)))}catch(h){}d.preventDefault()}N=!0,setTimeout(function(){c.text(m())},50)}),(c.text()||c.html())&&d.addClass("is-hidden")}function C(a){a.hasClass("selected")?a.removeClass("selected").attr("aria-checked","false"):a.addClass("selected").attr("aria-checked","true")}function D(){a(".categories-select").on("click.press-this keydown.press-this",function(b){var c=a(b.target);if(c.is("div.category")){if("keydown"===b.type&&32!==b.keyCode)return;C(c),b.preventDefault()}})}function E(){a(".split-button").removeClass("is-open"),a(".split-button-toggle").attr("aria-expanded","false")}function F(){r(),x(),v(),b.tagBox&&b.tagBox.init(),Y&&a(document.body).css("cursor","pointer")}function G(){var d=a(".split-button");return M.on("tinymce-editor-init",function(a,b){I=b,I.on("nodechange",function(){T=!0}),I.on("focus",function(){E()}),I.on("show",function(){setTimeout(function(){I.execCommand("wpAutoResize")},300)}),I.on("hide",function(){setTimeout(function(){i("reset")},100)}),I.on("keyup",k),I.on("undo redo",l)}).on("click.press-this keypress.press-this",".suggested-media-thumbnail",function(b){"click"!==b.type&&13!==b.keyCode||p(a(this))}).on("click.press-this",function(b){a(b.target).closest("button").hasClass("split-button-toggle")||E()}),a(".post-actions").on("click.press-this",function(c){var e,f=a(c.target),g=f.closest("button");g.length&&(g.hasClass("draft-button")?(a(".publish-button").addClass("is-saving"),o("draft")):g.hasClass("publish-button")?(g.addClass("is-saving"),b.history.replaceState&&(e=b.location.href,e+=e.indexOf("?")!==-1?"&":"?",e+="wp-press-this-reload=true",b.history.replaceState(null,null,e)),o("publish")):g.hasClass("preview-button")?(n(),b.opener&&b.opener.focus(),a("#wp-preview").val("dopreview"),a("#pressthis-form").attr("target","_blank").submit().attr("target",""),a("#wp-preview").val("")):g.hasClass("standard-editor-button")?(a(".publish-button").addClass("is-saving"),a("#pt-force-redirect").val("true"),o("draft")):g.hasClass("split-button-toggle")&&(d.hasClass("is-open")?(d.removeClass("is-open"),g.attr("aria-expanded","false")):(d.addClass("is-open"),g.attr("aria-expanded","true"))))}),y(),B(),D(),a(".options").on("click.press-this",function(){a(this).hasClass("open")?A():z()}),a(".options-panel, .options-panel-back").on("focusout.press-this",function(){setTimeout(function(){var b=document.activeElement,c=a(b);!P||!b||c.hasClass("options-panel-back")||"BODY"!==b.nodeName&&(c.closest(".options-panel").length||c.closest(".options").length)||A()},50)}),a("#post-formats-select input").on("change",function(){var b=a(this);b.is(":checked")&&a("#post-option-post-format").text(a('label[for="'+b.attr("id")+'"]').text()||"")}),L.on("beforeunload.press-this",function(){if(N||I&&I.isDirty())return c("saveAlert")}).on("resize.press-this",function(){I&&!I.isHidden()||i("reset")}),a("button.add-cat-toggle").on("click.press-this",function(){var b=a(this);b.toggleClass("is-toggled"),b.attr("aria-expanded","false"===b.attr("aria-expanded")?"true":"false"),a(".setting-modal .add-category, .categories-search-wrapper").toggleClass("is-hidden")}),a("button.add-cat-submit").on("click.press-this",q),a(".categories-search").on("keyup.press-this",function(){var b=a(this).val().toLowerCase()||"";/[\x20-\xFF]+/.test(b)&&b.length<2||(a.each(U,function(a,b){b.node.removeClass("is-hidden searched-parent")}),b&&a.each(U,function(a,c){c.text.indexOf(b)===-1?c.node.addClass("is-hidden"):c.parents.addClass("searched-parent")}))}),Z.on("focus.press-this input.press-this propertychange.press-this",i),!0}function H(){a(".categories-select").find("li").each(function(){var b=a(this);U.push({node:b,parents:b.parents("li"),text:b.children(".category").text().toLowerCase()})})}var I,J,K,L=a(b),M=a(document),N=!1,O=document.createElement("textarea"),P=!1,Q=b.wpPressThisConfig||{},R=b.wpPressThisData||{},S=128,T=!1,U=[],V="is-off-screen",W="is-hidden",X=V+" "+W,Y=/iPad|iPod|iPhone/.test(b.navigator.userAgent),Z=a("#pressthis"),$=Z[0],_=600,aa=0,ba=function(){var a=document.documentElement.style;return"undefined"!=typeof a.transition?"transitionend":"undefined"!=typeof a.WebkitTransition&&"webkitTransitionEnd"}();return M.ready(function(){F(),G(),H()}),{renderNotice:s,renderError:t}};b.wp=b.wp||{},b.wp.pressThis=new c}(jQuery,window);
\ No newline at end of file
index c970b3aa9d7ff83b83ce15c57ab949b81de1e3a0..be5b435e7745c8755c1c80e66ae35f706e4609c1 100644 (file)
@@ -1 +1 @@
-window.wp=window.wp||{},function(a){var b;b=wp.revisions={model:{},view:{},controller:{}},b.settings=window._wpRevisionsSettings||{},b.debug=!1,b.log=function(){window.console&&b.debug&&window.console.log.apply(window.console,arguments)},a.fn.allOffsets=function(){var b=this.offset()||{top:0,left:0},c=a(window);return _.extend(b,{right:c.width()-b.left-this.outerWidth(),bottom:c.height()-b.top-this.outerHeight()})},a.fn.allPositions=function(){var a=this.position()||{top:0,left:0},b=this.parent();return _.extend(a,{right:b.outerWidth()-a.left-this.outerWidth(),bottom:b.outerHeight()-a.top-this.outerHeight()})},b.model.Slider=Backbone.Model.extend({defaults:{value:null,values:null,min:0,max:1,step:1,range:!1,compareTwoMode:!1},initialize:function(a){this.frame=a.frame,this.revisions=a.revisions,this.listenTo(this.frame,"update:revisions",this.receiveRevisions),this.listenTo(this.frame,"change:compareTwoMode",this.updateMode),this.on("change:from",this.handleLocalChanges),this.on("change:to",this.handleLocalChanges),this.on("change:compareTwoMode",this.updateSliderSettings),this.on("update:revisions",this.updateSliderSettings),this.on("change:hoveredRevision",this.hoverRevision),this.set({max:this.revisions.length-1,compareTwoMode:this.frame.get("compareTwoMode"),from:this.frame.get("from"),to:this.frame.get("to")}),this.updateSliderSettings()},getSliderValue:function(a,b){return isRtl?this.revisions.length-this.revisions.indexOf(this.get(a))-1:this.revisions.indexOf(this.get(b))},updateSliderSettings:function(){this.get("compareTwoMode")?this.set({values:[this.getSliderValue("to","from"),this.getSliderValue("from","to")],value:null,range:!0}):this.set({value:this.getSliderValue("to","to"),values:null,range:!1}),this.trigger("update:slider")},hoverRevision:function(a,b){this.trigger("hovered:revision",b)},updateMode:function(a,b){this.set({compareTwoMode:b})},handleLocalChanges:function(){this.frame.set({from:this.get("from"),to:this.get("to")})},receiveRevisions:function(a,b){(this.get("from")!==a||this.get("to")!==b)&&(this.set({from:a,to:b},{silent:!0}),this.trigger("update:revisions",a,b))}}),b.model.Tooltip=Backbone.Model.extend({defaults:{revision:null,offset:{},hovering:!1,scrubbing:!1},initialize:function(a){this.frame=a.frame,this.revisions=a.revisions,this.slider=a.slider,this.listenTo(this.slider,"hovered:revision",this.updateRevision),this.listenTo(this.slider,"change:hovering",this.setHovering),this.listenTo(this.slider,"change:scrubbing",this.setScrubbing)},updateRevision:function(a){this.set({revision:a})},setHovering:function(a,b){this.set({hovering:b})},setScrubbing:function(a,b){this.set({scrubbing:b})}}),b.model.Revision=Backbone.Model.extend({}),b.model.Revisions=Backbone.Collection.extend({model:b.model.Revision,initialize:function(){_.bindAll(this,"next","prev")},next:function(a){var b=this.indexOf(a);return-1!==b&&b!==this.length-1?this.at(b+1):void 0},prev:function(a){var b=this.indexOf(a);return-1!==b&&0!==b?this.at(b-1):void 0}}),b.model.Field=Backbone.Model.extend({}),b.model.Fields=Backbone.Collection.extend({model:b.model.Field}),b.model.Diff=Backbone.Model.extend({initialize:function(){var a=this.get("fields");this.unset("fields"),this.fields=new b.model.Fields(a)}}),b.model.Diffs=Backbone.Collection.extend({initialize:function(a,b){_.bindAll(this,"getClosestUnloaded"),this.loadAll=_.once(this._loadAll),this.revisions=b.revisions,this.postId=b.postId,this.requests={}},model:b.model.Diff,ensure:function(b,c){var d=this.get(b),e=this.requests[b],f=a.Deferred(),g={},h=b.split(":")[0],i=b.split(":")[1];return g[b]=!0,wp.revisions.log("ensure",b),this.trigger("ensure",g,h,i,f.promise()),d?f.resolveWith(c,[d]):(this.trigger("ensure:load",g,h,i,f.promise()),_.each(g,_.bind(function(a){this.requests[a]&&delete g[a],this.get(a)&&delete g[a]},this)),e||(g[b]=!0,e=this.load(_.keys(g))),e.done(_.bind(function(){f.resolveWith(c,[this.get(b)])},this)).fail(_.bind(function(){f.reject()}))),f.promise()},getClosestUnloaded:function(a,b){var c=this;return _.chain([0].concat(a)).initial().zip(a).sortBy(function(a){return Math.abs(b-a[1])}).map(function(a){return a.join(":")}).filter(function(a){return _.isUndefined(c.get(a))&&!c.requests[a]}).value()},_loadAll:function(b,c,d){var e=this,f=a.Deferred(),g=_.first(this.getClosestUnloaded(b,c),d);return _.size(g)>0?this.load(g).done(function(){e._loadAll(b,c,d).done(function(){f.resolve()})}).fail(function(){1===d?f.reject():e._loadAll(b,c,Math.ceil(d/2)).done(function(){f.resolve()})}):f.resolve(),f},load:function(a){return wp.revisions.log("load",a),this.fetch({data:{compare:a},remove:!1}).done(function(){wp.revisions.log("load:complete",a)})},sync:function(a,b,c){if("read"===a){c=c||{},c.context=this,c.data=_.extend(c.data||{},{action:"get-revision-diffs",post_id:this.postId});var d=wp.ajax.send(c),e=this.requests;return c.data.compare&&_.each(c.data.compare,function(a){e[a]=d}),d.always(function(){c.data.compare&&_.each(c.data.compare,function(a){delete e[a]})}),d}return Backbone.Model.prototype.sync.apply(this,arguments)}}),b.model.FrameState=Backbone.Model.extend({defaults:{loading:!1,error:!1,compareTwoMode:!1},initialize:function(a,c){var d=this.get("initialDiffState");_.bindAll(this,"receiveDiff"),this._debouncedEnsureDiff=_.debounce(this._ensureDiff,200),this.revisions=c.revisions,this.diffs=new b.model.Diffs([],{revisions:this.revisions,postId:this.get("postId")}),this.diffs.set(this.get("diffData")),this.listenTo(this,"change:from",this.changeRevisionHandler),this.listenTo(this,"change:to",this.changeRevisionHandler),this.listenTo(this,"change:compareTwoMode",this.changeMode),this.listenTo(this,"update:revisions",this.updatedRevisions),this.listenTo(this.diffs,"ensure:load",this.updateLoadingStatus),this.listenTo(this,"update:diff",this.updateLoadingStatus),this.set({to:this.revisions.get(d.to),from:this.revisions.get(d.from),compareTwoMode:d.compareTwoMode}),window.history&&window.history.pushState&&(this.router=new b.Router({model:this}),Backbone.history.start({pushState:!0}))},updateLoadingStatus:function(){this.set("error",!1),this.set("loading",!this.diff())},changeMode:function(a,b){var c=this.revisions.indexOf(this.get("to"));b&&0===c&&this.set({from:this.revisions.at(c),to:this.revisions.at(c+1)}),b||0===c||this.set({from:this.revisions.at(c-1),to:this.revisions.at(c)})},updatedRevisions:function(a,b){this.get("compareTwoMode")||this.diffs.loadAll(this.revisions.pluck("id"),b.id,40)},diff:function(){return this.diffs.get(this._diffId)},updateDiff:function(b){var c,d,e,f;return b=b||{},c=this.get("from"),d=this.get("to"),e=(c?c.id:0)+":"+d.id,this._diffId===e?a.Deferred().reject().promise():(this._diffId=e,this.trigger("update:revisions",c,d),f=this.diffs.get(e),f?(this.receiveDiff(f),a.Deferred().resolve().promise()):b.immediate?this._ensureDiff():(this._debouncedEnsureDiff(),a.Deferred().reject().promise()))},changeRevisionHandler:function(){this.updateDiff()},receiveDiff:function(a){_.isUndefined(a)||_.isUndefined(a.id)?this.set({loading:!1,error:!0}):this._diffId===a.id&&this.trigger("update:diff",a)},_ensureDiff:function(){return this.diffs.ensure(this._diffId,this).always(this.receiveDiff)}}),b.view.Frame=wp.Backbone.View.extend({className:"revisions",template:wp.template("revisions-frame"),initialize:function(){this.listenTo(this.model,"update:diff",this.renderDiff),this.listenTo(this.model,"change:compareTwoMode",this.updateCompareTwoMode),this.listenTo(this.model,"change:loading",this.updateLoadingStatus),this.listenTo(this.model,"change:error",this.updateErrorStatus),this.views.set(".revisions-control-frame",new b.view.Controls({model:this.model}))},render:function(){return wp.Backbone.View.prototype.render.apply(this,arguments),a("html").css("overflow-y","scroll"),a("#wpbody-content .wrap").append(this.el),this.updateCompareTwoMode(),this.renderDiff(this.model.diff()),this.views.ready(),this},renderDiff:function(a){this.views.set(".revisions-diff-frame",new b.view.Diff({model:a}))},updateLoadingStatus:function(){this.$el.toggleClass("loading",this.model.get("loading"))},updateErrorStatus:function(){this.$el.toggleClass("diff-error",this.model.get("error"))},updateCompareTwoMode:function(){this.$el.toggleClass("comparing-two-revisions",this.model.get("compareTwoMode"))}}),b.view.Controls=wp.Backbone.View.extend({className:"revisions-controls",initialize:function(){_.bindAll(this,"setWidth"),this.views.add(new b.view.Buttons({model:this.model})),this.views.add(new b.view.Checkbox({model:this.model}));var a=new b.model.Slider({frame:this.model,revisions:this.model.revisions}),c=new b.model.Tooltip({frame:this.model,revisions:this.model.revisions,slider:a});this.views.add(new b.view.Tooltip({model:c})),this.views.add(new b.view.Tickmarks({model:c})),this.views.add(new b.view.Slider({model:a})),this.views.add(new b.view.Metabox({model:this.model}))},ready:function(){this.top=this.$el.offset().top,this.window=a(window),this.window.on("scroll.wp.revisions",{controls:this},function(a){var b=a.data.controls,c=b.$el.parent(),d=b.window.scrollTop(),e=b.views.parent;d>=b.top?(e.$el.hasClass("pinned")||(b.setWidth(),c.css("height",c.height()+"px"),b.window.on("resize.wp.revisions.pinning click.wp.revisions.pinning",{controls:b},function(a){a.data.controls.setWidth()})),e.$el.addClass("pinned")):e.$el.hasClass("pinned")?(b.window.off(".wp.revisions.pinning"),b.$el.css("width","auto"),e.$el.removeClass("pinned"),c.css("height","auto"),b.top=b.$el.offset().top):b.top=b.$el.offset().top})},setWidth:function(){this.$el.css("width",this.$el.parent().width()+"px")}}),b.view.Tickmarks=wp.Backbone.View.extend({className:"revisions-tickmarks",direction:isRtl?"right":"left",initialize:function(){this.listenTo(this.model,"change:revision",this.reportTickPosition)},reportTickPosition:function(a,b){var c,d,e,f,g=this.model.revisions.indexOf(b);d=this.$el.allOffsets(),e=this.$el.parent().allOffsets(),g===this.model.revisions.length-1?c={rightPlusWidth:d.left-e.left+1,leftPlusWidth:d.right-e.right+1}:(f=this.$("div:nth-of-type("+(g+1)+")"),c=f.allPositions(),_.extend(c,{left:c.left+d.left-e.left,right:c.right+d.right-e.right}),_.extend(c,{leftPlusWidth:c.left+f.outerWidth(),rightPlusWidth:c.right+f.outerWidth()})),this.model.set({offset:c})},ready:function(){var a,b;a=this.model.revisions.length-1,b=1/a,this.$el.css("width",50*this.model.revisions.length+"px"),_(a).times(function(a){this.$el.append('<div style="'+this.direction+": "+100*b*a+'%"></div>')},this)}}),b.view.Metabox=wp.Backbone.View.extend({className:"revisions-meta",initialize:function(){this.views.add(new b.view.MetaFrom({model:this.model,className:"diff-meta diff-meta-from"})),this.views.add(new b.view.MetaTo({model:this.model}))}}),b.view.Meta=wp.Backbone.View.extend({template:wp.template("revisions-meta"),events:{"click .restore-revision":"restoreRevision"},initialize:function(){this.listenTo(this.model,"update:revisions",this.render)},prepare:function(){return _.extend(this.model.toJSON()[this.type]||{},{type:this.type})},restoreRevision:function(){document.location=this.model.get("to").attributes.restoreUrl}}),b.view.MetaFrom=b.view.Meta.extend({className:"diff-meta diff-meta-from",type:"from"}),b.view.MetaTo=b.view.Meta.extend({className:"diff-meta diff-meta-to",type:"to"}),b.view.Checkbox=wp.Backbone.View.extend({className:"revisions-checkbox",template:wp.template("revisions-checkbox"),events:{"click .compare-two-revisions":"compareTwoToggle"},initialize:function(){this.listenTo(this.model,"change:compareTwoMode",this.updateCompareTwoMode)},ready:function(){this.model.revisions.length<3&&a(".revision-toggle-compare-mode").hide()},updateCompareTwoMode:function(){this.$(".compare-two-revisions").prop("checked",this.model.get("compareTwoMode"))},compareTwoToggle:function(){this.model.set({compareTwoMode:a(".compare-two-revisions").prop("checked")})}}),b.view.Tooltip=wp.Backbone.View.extend({className:"revisions-tooltip",template:wp.template("revisions-meta"),initialize:function(){this.listenTo(this.model,"change:offset",this.render),this.listenTo(this.model,"change:hovering",this.toggleVisibility),this.listenTo(this.model,"change:scrubbing",this.toggleVisibility)},prepare:function(){return _.isNull(this.model.get("revision"))?void 0:_.extend({type:"tooltip"},{attributes:this.model.get("revision").toJSON()})},render:function(){var a,b,c,d,e={},f=this.model.revisions.indexOf(this.model.get("revision"))+1;d=f/this.model.revisions.length>.5,isRtl?(b=d?"left":"right",c=d?"leftPlusWidth":b):(b=d?"right":"left",c=d?"rightPlusWidth":b),a="right"===b?"left":"right",wp.Backbone.View.prototype.render.apply(this,arguments),e[b]=this.model.get("offset")[c]+"px",e[a]="",this.$el.toggleClass("flipped",d).css(e)},visible:function(){return this.model.get("scrubbing")||this.model.get("hovering")},toggleVisibility:function(){this.visible()?this.$el.stop().show().fadeTo(100-100*this.el.style.opacity,1):this.$el.stop().fadeTo(300*this.el.style.opacity,0,function(){a(this).hide()})}}),b.view.Buttons=wp.Backbone.View.extend({className:"revisions-buttons",template:wp.template("revisions-buttons"),events:{"click .revisions-next .button":"nextRevision","click .revisions-previous .button":"previousRevision"},initialize:function(){this.listenTo(this.model,"update:revisions",this.disabledButtonCheck)},ready:function(){this.disabledButtonCheck()},gotoModel:function(a){var b={to:this.model.revisions.at(a)};a?b.from=this.model.revisions.at(a-1):this.model.unset("from",{silent:!0}),this.model.set(b)},nextRevision:function(){var a=this.model.revisions.indexOf(this.model.get("to"))+1;this.gotoModel(a)},previousRevision:function(){var a=this.model.revisions.indexOf(this.model.get("to"))-1;this.gotoModel(a)},disabledButtonCheck:function(){var b=this.model.revisions.length-1,c=0,d=a(".revisions-next .button"),e=a(".revisions-previous .button"),f=this.model.revisions.indexOf(this.model.get("to"));d.prop("disabled",b===f),e.prop("disabled",c===f)}}),b.view.Slider=wp.Backbone.View.extend({className:"wp-slider",direction:isRtl?"right":"left",events:{mousemove:"mouseMove"},initialize:function(){_.bindAll(this,"start","slide","stop","mouseMove","mouseEnter","mouseLeave"),this.listenTo(this.model,"update:slider",this.applySliderSettings)},ready:function(){this.$el.css("width",50*this.model.revisions.length+"px"),this.$el.slider(_.extend(this.model.toJSON(),{start:this.start,slide:this.slide,stop:this.stop})),this.$el.hoverIntent({over:this.mouseEnter,out:this.mouseLeave,timeout:800}),this.applySliderSettings()},mouseMove:function(b){var c=this.model.revisions.length-1,d=this.$el.allOffsets()[this.direction],e=this.$el.width(),f=e/c,g=(isRtl?a(window).width()-b.pageX:b.pageX)-d,h=Math.floor((g+f/2)/f);0>h?h=0:h>=this.model.revisions.length&&(h=this.model.revisions.length-1),this.model.set({hoveredRevision:this.model.revisions.at(h)})},mouseLeave:function(){this.model.set({hovering:!1})},mouseEnter:function(){this.model.set({hovering:!0})},applySliderSettings:function(){this.$el.slider(_.pick(this.model.toJSON(),"value","values","range"));var a=this.$("a.ui-slider-handle");this.model.get("compareTwoMode")?(a.first().toggleClass("to-handle",!!isRtl).toggleClass("from-handle",!isRtl),a.last().toggleClass("from-handle",!!isRtl).toggleClass("to-handle",!isRtl)):a.removeClass("from-handle to-handle")},start:function(b,c){this.model.set({scrubbing:!0}),a(window).on("mousemove.wp.revisions",{view:this},function(b){var d,e=b.data.view,f=e.$el.offset().left,g=f,h=f+e.$el.width(),i=h,j="0",k="100%",l=a(c.handle);e.model.get("compareTwoMode")&&(d=l.parent().find(".ui-slider-handle"),l.is(d.first())?(i=d.last().offset().left,k=i-g):(f=d.first().offset().left+d.first().width(),j=f-g)),b.pageX<f?l.css("left",j):b.pageX>i?l.css("left",k):l.css("left",b.pageX-g)})},getPosition:function(a){return isRtl?this.model.revisions.length-a-1:a},slide:function(a,b){var c,d;if(this.model.get("compareTwoMode")){if(b.values[1]===b.values[0])return!1;isRtl&&b.values.reverse(),c={from:this.model.revisions.at(this.getPosition(b.values[0])),to:this.model.revisions.at(this.getPosition(b.values[1]))}}else c={to:this.model.revisions.at(this.getPosition(b.value))},this.getPosition(b.value)>0?c.from=this.model.revisions.at(this.getPosition(b.value)-1):c.from=void 0;d=this.model.revisions.at(this.getPosition(b.value)),this.model.get("scrubbing")&&(c.hoveredRevision=d),this.model.set(c)},stop:function(){a(window).off("mousemove.wp.revisions"),this.model.updateSliderSettings(),this.model.set({scrubbing:!1})}}),b.view.Diff=wp.Backbone.View.extend({className:"revisions-diff",template:wp.template("revisions-diff"),prepare:function(){return _.extend({fields:this.model.fields.toJSON()},this.options)}}),b.Router=Backbone.Router.extend({initialize:function(a){this.model=a.model,this.listenTo(this.model,"update:diff",_.debounce(this.updateUrl,250)),this.listenTo(this.model,"change:compareTwoMode",this.updateUrl)},baseUrl:function(a){return this.model.get("baseUrl")+a},updateUrl:function(){var a=this.model.has("from")?this.model.get("from").id:0,b=this.model.get("to").id;this.model.get("compareTwoMode")?this.navigate(this.baseUrl("?from="+a+"&to="+b),{replace:!0}):this.navigate(this.baseUrl("?revision="+b),{replace:!0})},handleRoute:function(a,b){var c=_.isUndefined(b);c||(b=this.model.revisions.get(a),a=this.model.revisions.prev(b),b=b?b.id:0,a=a?a.id:0)}}),b.init=function(){var a;window.adminpage&&"revision-php"===window.adminpage&&(a=new b.model.FrameState({initialDiffState:{to:parseInt(b.settings.to,10),from:parseInt(b.settings.from,10),compareTwoMode:"1"===b.settings.compareTwoMode},diffData:b.settings.diffData,baseUrl:b.settings.baseUrl,postId:parseInt(b.settings.postId,10)},{revisions:new b.model.Revisions(b.settings.revisionData)}),b.view.frame=new b.view.Frame({model:a}).render())},a(b.init)}(jQuery);
\ No newline at end of file
+window.wp=window.wp||{},function(a){var b;b=wp.revisions={model:{},view:{},controller:{}},b.settings=window._wpRevisionsSettings||{},b.debug=!1,b.log=function(){window.console&&b.debug&&window.console.log.apply(window.console,arguments)},a.fn.allOffsets=function(){var b=this.offset()||{top:0,left:0},c=a(window);return _.extend(b,{right:c.width()-b.left-this.outerWidth(),bottom:c.height()-b.top-this.outerHeight()})},a.fn.allPositions=function(){var a=this.position()||{top:0,left:0},b=this.parent();return _.extend(a,{right:b.outerWidth()-a.left-this.outerWidth(),bottom:b.outerHeight()-a.top-this.outerHeight()})},b.model.Slider=Backbone.Model.extend({defaults:{value:null,values:null,min:0,max:1,step:1,range:!1,compareTwoMode:!1},initialize:function(a){this.frame=a.frame,this.revisions=a.revisions,this.listenTo(this.frame,"update:revisions",this.receiveRevisions),this.listenTo(this.frame,"change:compareTwoMode",this.updateMode),this.on("change:from",this.handleLocalChanges),this.on("change:to",this.handleLocalChanges),this.on("change:compareTwoMode",this.updateSliderSettings),this.on("update:revisions",this.updateSliderSettings),this.on("change:hoveredRevision",this.hoverRevision),this.set({max:this.revisions.length-1,compareTwoMode:this.frame.get("compareTwoMode"),from:this.frame.get("from"),to:this.frame.get("to")}),this.updateSliderSettings()},getSliderValue:function(a,b){return isRtl?this.revisions.length-this.revisions.indexOf(this.get(a))-1:this.revisions.indexOf(this.get(b))},updateSliderSettings:function(){this.get("compareTwoMode")?this.set({values:[this.getSliderValue("to","from"),this.getSliderValue("from","to")],value:null,range:!0}):this.set({value:this.getSliderValue("to","to"),values:null,range:!1}),this.trigger("update:slider")},hoverRevision:function(a,b){this.trigger("hovered:revision",b)},updateMode:function(a,b){this.set({compareTwoMode:b})},handleLocalChanges:function(){this.frame.set({from:this.get("from"),to:this.get("to")})},receiveRevisions:function(a,b){this.get("from")===a&&this.get("to")===b||(this.set({from:a,to:b},{silent:!0}),this.trigger("update:revisions",a,b))}}),b.model.Tooltip=Backbone.Model.extend({defaults:{revision:null,offset:{},hovering:!1,scrubbing:!1},initialize:function(a){this.frame=a.frame,this.revisions=a.revisions,this.slider=a.slider,this.listenTo(this.slider,"hovered:revision",this.updateRevision),this.listenTo(this.slider,"change:hovering",this.setHovering),this.listenTo(this.slider,"change:scrubbing",this.setScrubbing)},updateRevision:function(a){this.set({revision:a})},setHovering:function(a,b){this.set({hovering:b})},setScrubbing:function(a,b){this.set({scrubbing:b})}}),b.model.Revision=Backbone.Model.extend({}),b.model.Revisions=Backbone.Collection.extend({model:b.model.Revision,initialize:function(){_.bindAll(this,"next","prev")},next:function(a){var b=this.indexOf(a);if(b!==-1&&b!==this.length-1)return this.at(b+1)},prev:function(a){var b=this.indexOf(a);if(b!==-1&&0!==b)return this.at(b-1)}}),b.model.Field=Backbone.Model.extend({}),b.model.Fields=Backbone.Collection.extend({model:b.model.Field}),b.model.Diff=Backbone.Model.extend({initialize:function(){var a=this.get("fields");this.unset("fields"),this.fields=new b.model.Fields(a)}}),b.model.Diffs=Backbone.Collection.extend({initialize:function(a,b){_.bindAll(this,"getClosestUnloaded"),this.loadAll=_.once(this._loadAll),this.revisions=b.revisions,this.postId=b.postId,this.requests={}},model:b.model.Diff,ensure:function(b,c){var d=this.get(b),e=this.requests[b],f=a.Deferred(),g={},h=b.split(":")[0],i=b.split(":")[1];return g[b]=!0,wp.revisions.log("ensure",b),this.trigger("ensure",g,h,i,f.promise()),d?f.resolveWith(c,[d]):(this.trigger("ensure:load",g,h,i,f.promise()),_.each(g,_.bind(function(a){this.requests[a]&&delete g[a],this.get(a)&&delete g[a]},this)),e||(g[b]=!0,e=this.load(_.keys(g))),e.done(_.bind(function(){f.resolveWith(c,[this.get(b)])},this)).fail(_.bind(function(){f.reject()}))),f.promise()},getClosestUnloaded:function(a,b){var c=this;return _.chain([0].concat(a)).initial().zip(a).sortBy(function(a){return Math.abs(b-a[1])}).map(function(a){return a.join(":")}).filter(function(a){return _.isUndefined(c.get(a))&&!c.requests[a]}).value()},_loadAll:function(b,c,d){var e=this,f=a.Deferred(),g=_.first(this.getClosestUnloaded(b,c),d);return _.size(g)>0?this.load(g).done(function(){e._loadAll(b,c,d).done(function(){f.resolve()})}).fail(function(){1===d?f.reject():e._loadAll(b,c,Math.ceil(d/2)).done(function(){f.resolve()})}):f.resolve(),f},load:function(a){return wp.revisions.log("load",a),this.fetch({data:{compare:a},remove:!1}).done(function(){wp.revisions.log("load:complete",a)})},sync:function(a,b,c){if("read"===a){c=c||{},c.context=this,c.data=_.extend(c.data||{},{action:"get-revision-diffs",post_id:this.postId});var d=wp.ajax.send(c),e=this.requests;return c.data.compare&&_.each(c.data.compare,function(a){e[a]=d}),d.always(function(){c.data.compare&&_.each(c.data.compare,function(a){delete e[a]})}),d}return Backbone.Model.prototype.sync.apply(this,arguments)}}),b.model.FrameState=Backbone.Model.extend({defaults:{loading:!1,error:!1,compareTwoMode:!1},initialize:function(a,c){var d=this.get("initialDiffState");_.bindAll(this,"receiveDiff"),this._debouncedEnsureDiff=_.debounce(this._ensureDiff,200),this.revisions=c.revisions,this.diffs=new b.model.Diffs([],{revisions:this.revisions,postId:this.get("postId")}),this.diffs.set(this.get("diffData")),this.listenTo(this,"change:from",this.changeRevisionHandler),this.listenTo(this,"change:to",this.changeRevisionHandler),this.listenTo(this,"change:compareTwoMode",this.changeMode),this.listenTo(this,"update:revisions",this.updatedRevisions),this.listenTo(this.diffs,"ensure:load",this.updateLoadingStatus),this.listenTo(this,"update:diff",this.updateLoadingStatus),this.set({to:this.revisions.get(d.to),from:this.revisions.get(d.from),compareTwoMode:d.compareTwoMode}),window.history&&window.history.pushState&&(this.router=new b.Router({model:this}),Backbone.history.start({pushState:!0}))},updateLoadingStatus:function(){this.set("error",!1),this.set("loading",!this.diff())},changeMode:function(a,b){var c=this.revisions.indexOf(this.get("to"));b&&0===c&&this.set({from:this.revisions.at(c),to:this.revisions.at(c+1)}),b||0===c||this.set({from:this.revisions.at(c-1),to:this.revisions.at(c)})},updatedRevisions:function(a,b){this.get("compareTwoMode")||this.diffs.loadAll(this.revisions.pluck("id"),b.id,40)},diff:function(){return this.diffs.get(this._diffId)},updateDiff:function(b){var c,d,e,f;return b=b||{},c=this.get("from"),d=this.get("to"),e=(c?c.id:0)+":"+d.id,this._diffId===e?a.Deferred().reject().promise():(this._diffId=e,this.trigger("update:revisions",c,d),f=this.diffs.get(e),f?(this.receiveDiff(f),a.Deferred().resolve().promise()):b.immediate?this._ensureDiff():(this._debouncedEnsureDiff(),a.Deferred().reject().promise()))},changeRevisionHandler:function(){this.updateDiff()},receiveDiff:function(a){_.isUndefined(a)||_.isUndefined(a.id)?this.set({loading:!1,error:!0}):this._diffId===a.id&&this.trigger("update:diff",a)},_ensureDiff:function(){return this.diffs.ensure(this._diffId,this).always(this.receiveDiff)}}),b.view.Frame=wp.Backbone.View.extend({className:"revisions",template:wp.template("revisions-frame"),initialize:function(){this.listenTo(this.model,"update:diff",this.renderDiff),this.listenTo(this.model,"change:compareTwoMode",this.updateCompareTwoMode),this.listenTo(this.model,"change:loading",this.updateLoadingStatus),this.listenTo(this.model,"change:error",this.updateErrorStatus),this.views.set(".revisions-control-frame",new b.view.Controls({model:this.model}))},render:function(){return wp.Backbone.View.prototype.render.apply(this,arguments),a("html").css("overflow-y","scroll"),a("#wpbody-content .wrap").append(this.el),this.updateCompareTwoMode(),this.renderDiff(this.model.diff()),this.views.ready(),this},renderDiff:function(a){this.views.set(".revisions-diff-frame",new b.view.Diff({model:a}))},updateLoadingStatus:function(){this.$el.toggleClass("loading",this.model.get("loading"))},updateErrorStatus:function(){this.$el.toggleClass("diff-error",this.model.get("error"))},updateCompareTwoMode:function(){this.$el.toggleClass("comparing-two-revisions",this.model.get("compareTwoMode"))}}),b.view.Controls=wp.Backbone.View.extend({className:"revisions-controls",initialize:function(){_.bindAll(this,"setWidth"),this.views.add(new b.view.Buttons({model:this.model})),this.views.add(new b.view.Checkbox({model:this.model}));var a=new b.model.Slider({frame:this.model,revisions:this.model.revisions}),c=new b.model.Tooltip({frame:this.model,revisions:this.model.revisions,slider:a});this.views.add(new b.view.Tooltip({model:c})),this.views.add(new b.view.Tickmarks({model:c})),this.views.add(new b.view.Slider({model:a})),this.views.add(new b.view.Metabox({model:this.model}))},ready:function(){this.top=this.$el.offset().top,this.window=a(window),this.window.on("scroll.wp.revisions",{controls:this},function(a){var b=a.data.controls,c=b.$el.parent(),d=b.window.scrollTop(),e=b.views.parent;d>=b.top?(e.$el.hasClass("pinned")||(b.setWidth(),c.css("height",c.height()+"px"),b.window.on("resize.wp.revisions.pinning click.wp.revisions.pinning",{controls:b},function(a){a.data.controls.setWidth()})),e.$el.addClass("pinned")):e.$el.hasClass("pinned")?(b.window.off(".wp.revisions.pinning"),b.$el.css("width","auto"),e.$el.removeClass("pinned"),c.css("height","auto"),b.top=b.$el.offset().top):b.top=b.$el.offset().top})},setWidth:function(){this.$el.css("width",this.$el.parent().width()+"px")}}),b.view.Tickmarks=wp.Backbone.View.extend({className:"revisions-tickmarks",direction:isRtl?"right":"left",initialize:function(){this.listenTo(this.model,"change:revision",this.reportTickPosition)},reportTickPosition:function(a,b){var c,d,e,f,g=this.model.revisions.indexOf(b);d=this.$el.allOffsets(),e=this.$el.parent().allOffsets(),g===this.model.revisions.length-1?c={rightPlusWidth:d.left-e.left+1,leftPlusWidth:d.right-e.right+1}:(f=this.$("div:nth-of-type("+(g+1)+")"),c=f.allPositions(),_.extend(c,{left:c.left+d.left-e.left,right:c.right+d.right-e.right}),_.extend(c,{leftPlusWidth:c.left+f.outerWidth(),rightPlusWidth:c.right+f.outerWidth()})),this.model.set({offset:c})},ready:function(){var a,b;a=this.model.revisions.length-1,b=1/a,this.$el.css("width",50*this.model.revisions.length+"px"),_(a).times(function(a){this.$el.append('<div style="'+this.direction+": "+100*b*a+'%"></div>')},this)}}),b.view.Metabox=wp.Backbone.View.extend({className:"revisions-meta",initialize:function(){this.views.add(new b.view.MetaFrom({model:this.model,className:"diff-meta diff-meta-from"})),this.views.add(new b.view.MetaTo({model:this.model}))}}),b.view.Meta=wp.Backbone.View.extend({template:wp.template("revisions-meta"),events:{"click .restore-revision":"restoreRevision"},initialize:function(){this.listenTo(this.model,"update:revisions",this.render)},prepare:function(){return _.extend(this.model.toJSON()[this.type]||{},{type:this.type})},restoreRevision:function(){document.location=this.model.get("to").attributes.restoreUrl}}),b.view.MetaFrom=b.view.Meta.extend({className:"diff-meta diff-meta-from",type:"from"}),b.view.MetaTo=b.view.Meta.extend({className:"diff-meta diff-meta-to",type:"to"}),b.view.Checkbox=wp.Backbone.View.extend({className:"revisions-checkbox",template:wp.template("revisions-checkbox"),events:{"click .compare-two-revisions":"compareTwoToggle"},initialize:function(){this.listenTo(this.model,"change:compareTwoMode",this.updateCompareTwoMode)},ready:function(){this.model.revisions.length<3&&a(".revision-toggle-compare-mode").hide()},updateCompareTwoMode:function(){this.$(".compare-two-revisions").prop("checked",this.model.get("compareTwoMode"))},compareTwoToggle:function(){this.model.set({compareTwoMode:a(".compare-two-revisions").prop("checked")})}}),b.view.Tooltip=wp.Backbone.View.extend({className:"revisions-tooltip",template:wp.template("revisions-meta"),initialize:function(){this.listenTo(this.model,"change:offset",this.render),this.listenTo(this.model,"change:hovering",this.toggleVisibility),this.listenTo(this.model,"change:scrubbing",this.toggleVisibility)},prepare:function(){return _.isNull(this.model.get("revision"))?void 0:_.extend({type:"tooltip"},{attributes:this.model.get("revision").toJSON()})},render:function(){var a,b,c,d,e={},f=this.model.revisions.indexOf(this.model.get("revision"))+1;d=f/this.model.revisions.length>.5,isRtl?(b=d?"left":"right",c=d?"leftPlusWidth":b):(b=d?"right":"left",c=d?"rightPlusWidth":b),a="right"===b?"left":"right",wp.Backbone.View.prototype.render.apply(this,arguments),e[b]=this.model.get("offset")[c]+"px",e[a]="",this.$el.toggleClass("flipped",d).css(e)},visible:function(){return this.model.get("scrubbing")||this.model.get("hovering")},toggleVisibility:function(){this.visible()?this.$el.stop().show().fadeTo(100-100*this.el.style.opacity,1):this.$el.stop().fadeTo(300*this.el.style.opacity,0,function(){a(this).hide()})}}),b.view.Buttons=wp.Backbone.View.extend({className:"revisions-buttons",template:wp.template("revisions-buttons"),events:{"click .revisions-next .button":"nextRevision","click .revisions-previous .button":"previousRevision"},initialize:function(){this.listenTo(this.model,"update:revisions",this.disabledButtonCheck)},ready:function(){this.disabledButtonCheck()},gotoModel:function(a){var b={to:this.model.revisions.at(a)};a?b.from=this.model.revisions.at(a-1):this.model.unset("from",{silent:!0}),this.model.set(b)},nextRevision:function(){var a=this.model.revisions.indexOf(this.model.get("to"))+1;this.gotoModel(a)},previousRevision:function(){var a=this.model.revisions.indexOf(this.model.get("to"))-1;this.gotoModel(a)},disabledButtonCheck:function(){var b=this.model.revisions.length-1,c=0,d=a(".revisions-next .button"),e=a(".revisions-previous .button"),f=this.model.revisions.indexOf(this.model.get("to"));d.prop("disabled",b===f),e.prop("disabled",c===f)}}),b.view.Slider=wp.Backbone.View.extend({className:"wp-slider",direction:isRtl?"right":"left",events:{mousemove:"mouseMove"},initialize:function(){_.bindAll(this,"start","slide","stop","mouseMove","mouseEnter","mouseLeave"),this.listenTo(this.model,"update:slider",this.applySliderSettings)},ready:function(){this.$el.css("width",50*this.model.revisions.length+"px"),this.$el.slider(_.extend(this.model.toJSON(),{start:this.start,slide:this.slide,stop:this.stop})),this.$el.hoverIntent({over:this.mouseEnter,out:this.mouseLeave,timeout:800}),this.applySliderSettings()},mouseMove:function(b){var c=this.model.revisions.length-1,d=this.$el.allOffsets()[this.direction],e=this.$el.width(),f=e/c,g=(isRtl?a(window).width()-b.pageX:b.pageX)-d,h=Math.floor((g+f/2)/f);h<0?h=0:h>=this.model.revisions.length&&(h=this.model.revisions.length-1),this.model.set({hoveredRevision:this.model.revisions.at(h)})},mouseLeave:function(){this.model.set({hovering:!1})},mouseEnter:function(){this.model.set({hovering:!0})},applySliderSettings:function(){this.$el.slider(_.pick(this.model.toJSON(),"value","values","range"));var a=this.$("a.ui-slider-handle");this.model.get("compareTwoMode")?(a.first().toggleClass("to-handle",!!isRtl).toggleClass("from-handle",!isRtl),a.last().toggleClass("from-handle",!!isRtl).toggleClass("to-handle",!isRtl)):a.removeClass("from-handle to-handle")},start:function(b,c){this.model.set({scrubbing:!0}),a(window).on("mousemove.wp.revisions",{view:this},function(b){var d,e=b.data.view,f=e.$el.offset().left,g=f,h=f+e.$el.width(),i=h,j="0",k="100%",l=a(c.handle);e.model.get("compareTwoMode")&&(d=l.parent().find(".ui-slider-handle"),l.is(d.first())?(i=d.last().offset().left,k=i-g):(f=d.first().offset().left+d.first().width(),j=f-g)),b.pageX<f?l.css("left",j):b.pageX>i?l.css("left",k):l.css("left",b.pageX-g)})},getPosition:function(a){return isRtl?this.model.revisions.length-a-1:a},slide:function(a,b){var c,d;if(this.model.get("compareTwoMode")){if(b.values[1]===b.values[0])return!1;isRtl&&b.values.reverse(),c={from:this.model.revisions.at(this.getPosition(b.values[0])),to:this.model.revisions.at(this.getPosition(b.values[1]))}}else c={to:this.model.revisions.at(this.getPosition(b.value))},this.getPosition(b.value)>0?c.from=this.model.revisions.at(this.getPosition(b.value)-1):c.from=void 0;d=this.model.revisions.at(this.getPosition(b.value)),this.model.get("scrubbing")&&(c.hoveredRevision=d),this.model.set(c)},stop:function(){a(window).off("mousemove.wp.revisions"),this.model.updateSliderSettings(),this.model.set({scrubbing:!1})}}),b.view.Diff=wp.Backbone.View.extend({className:"revisions-diff",template:wp.template("revisions-diff"),prepare:function(){return _.extend({fields:this.model.fields.toJSON()},this.options)}}),b.Router=Backbone.Router.extend({initialize:function(a){this.model=a.model,this.listenTo(this.model,"update:diff",_.debounce(this.updateUrl,250)),this.listenTo(this.model,"change:compareTwoMode",this.updateUrl)},baseUrl:function(a){return this.model.get("baseUrl")+a},updateUrl:function(){var a=this.model.has("from")?this.model.get("from").id:0,b=this.model.get("to").id;this.model.get("compareTwoMode")?this.navigate(this.baseUrl("?from="+a+"&to="+b),{replace:!0}):this.navigate(this.baseUrl("?revision="+b),{replace:!0})},handleRoute:function(a,b){var c=_.isUndefined(b);c||(b=this.model.revisions.get(a),a=this.model.revisions.prev(b),b=b?b.id:0,a=a?a.id:0)}}),b.init=function(){var a;window.adminpage&&"revision-php"===window.adminpage&&(a=new b.model.FrameState({initialDiffState:{to:parseInt(b.settings.to,10),from:parseInt(b.settings.from,10),compareTwoMode:"1"===b.settings.compareTwoMode},diffData:b.settings.diffData,baseUrl:b.settings.baseUrl,postId:parseInt(b.settings.postId,10)},{revisions:new b.model.Revisions(b.settings.revisionData)}),b.view.frame=new b.view.Frame({model:a}).render())},a(b.init)}(jQuery);
\ No newline at end of file
index 8747c0c83e64f0a243de3feb9d67796a3f0ec8b6..51a467ec6214b85e326c13ce6e4463354f737755 100644 (file)
@@ -1 +1 @@
-window.wp=window.wp||{},wp.svgPainter=function(a,b,c,d){"use strict";var e,f,g,h={},i=[];return a(c).ready(function(){c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")&&(a(c.body).removeClass("no-svg").addClass("svg"),wp.svgPainter.init())}),f=function(){function a(){for(;256>j;)e=String.fromCharCode(j),g+=e,i[j]=j,h[j]=f.indexOf(e),++j}function b(a,b,c,d,f,g){var h,i,j=0,k=0,l="",m=0;for(a=String(a),i=a.length;i>k;){for(e=a.charCodeAt(k),e=256>e?c[e]:-1,j=(j<<f)+e,m+=f;m>=g;)m-=g,h=j>>m,l+=d.charAt(h),j^=h<<m;++k}return!b&&m>0&&(l+=d.charAt(j<<g-m)),l}function c(c){return e||a(),c=b(c,!1,i,f,8,6),c+"====".slice(c.length%4||4)}function d(c){var d;e||a(),c=c.replace(/[^A-Za-z0-9\+\/\=]/g,""),c=String(c).split("="),d=c.length;do--d,c[d]=b(c[d],!0,h,g,6,8);while(d>0);return c=c.join("")}var e,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g="",h=[256],i=[256],j=0;return{atob:d,btoa:c}}(),{init:function(){g=this,e=a("#adminmenu .wp-menu-image, #wpadminbar .ab-item"),this.setColors(),this.findElements(),this.paint()},setColors:function(a){"undefined"==typeof a&&"undefined"!=typeof b._wpColorScheme&&(a=b._wpColorScheme),a&&a.icons&&a.icons.base&&a.icons.current&&a.icons.focus&&(h=a.icons)},findElements:function(){e.each(function(){var b=a(this),c=b.css("background-image");c&&-1!=c.indexOf("data:image/svg+xml;base64")&&i.push(b)})},paint:function(){a.each(i,function(a,c){var d=c.parent().parent();d.hasClass("current")||d.hasClass("wp-has-current-submenu")?g.paintElement(c,"current"):(g.paintElement(c,"base"),d.hover(function(){g.paintElement(c,"focus")},function(){b.setTimeout(function(){g.paintElement(c,"base")},100)}))})},paintElement:function(a,c){var d,e,g;if(c&&h.hasOwnProperty(c)&&(g=h[c],g.match(/^(#[0-9a-f]{3}|#[0-9a-f]{6})$/i)&&(d=a.data("wp-ui-svg-"+g),"none"!==d))){if(!d){if(e=a.css("background-image").match(/.+data:image\/svg\+xml;base64,([A-Za-z0-9\+\/\=]+)/),!e||!e[1])return void a.data("wp-ui-svg-"+g,"none");try{d="atob"in b?b.atob(e[1]):f.atob(e[1])}catch(i){}if(!d)return void a.data("wp-ui-svg-"+g,"none");d=d.replace(/fill="(.+?)"/g,'fill="'+g+'"'),d=d.replace(/style="(.+?)"/g,'style="fill:'+g+'"'),d=d.replace(/fill:.*?;/g,"fill: "+g+";"),d="btoa"in b?b.btoa(d):f.btoa(d),a.data("wp-ui-svg-"+g,d)}a.attr("style",'background-image: url("data:image/svg+xml;base64,'+d+'") !important;')}}}}(jQuery,window,document);
\ No newline at end of file
+window.wp=window.wp||{},wp.svgPainter=function(a,b,c,d){"use strict";var e,f,g,h={},i=[];return a(c).ready(function(){c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")&&(a(c.body).removeClass("no-svg").addClass("svg"),wp.svgPainter.init())}),f=function(){function a(){for(;j<256;)e=String.fromCharCode(j),g+=e,i[j]=j,h[j]=f.indexOf(e),++j}function b(a,b,c,d,f,g){var h,i,j=0,k=0,l="",m=0;for(a=String(a),i=a.length;k<i;){for(e=a.charCodeAt(k),e=e<256?c[e]:-1,j=(j<<f)+e,m+=f;m>=g;)m-=g,h=j>>m,l+=d.charAt(h),j^=h<<m;++k}return!b&&m>0&&(l+=d.charAt(j<<g-m)),l}function c(c){return e||a(),c=b(c,!1,i,f,8,6),c+"====".slice(c.length%4||4)}function d(c){var d;e||a(),c=c.replace(/[^A-Za-z0-9\+\/\=]/g,""),c=String(c).split("="),d=c.length;do--d,c[d]=b(c[d],!0,h,g,6,8);while(d>0);return c=c.join("")}var e,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g="",h=[256],i=[256],j=0;return{atob:d,btoa:c}}(),{init:function(){g=this,e=a("#adminmenu .wp-menu-image, #wpadminbar .ab-item"),this.setColors(),this.findElements(),this.paint()},setColors:function(a){"undefined"==typeof a&&"undefined"!=typeof b._wpColorScheme&&(a=b._wpColorScheme),a&&a.icons&&a.icons.base&&a.icons.current&&a.icons.focus&&(h=a.icons)},findElements:function(){e.each(function(){var b=a(this),c=b.css("background-image");c&&c.indexOf("data:image/svg+xml;base64")!=-1&&i.push(b)})},paint:function(){a.each(i,function(a,c){var d=c.parent().parent();d.hasClass("current")||d.hasClass("wp-has-current-submenu")?g.paintElement(c,"current"):(g.paintElement(c,"base"),d.hover(function(){g.paintElement(c,"focus")},function(){b.setTimeout(function(){g.paintElement(c,"base")},100)}))})},paintElement:function(a,c){var d,e,g;if(c&&h.hasOwnProperty(c)&&(g=h[c],g.match(/^(#[0-9a-f]{3}|#[0-9a-f]{6})$/i)&&(d=a.data("wp-ui-svg-"+g),"none"!==d))){if(!d){if(e=a.css("background-image").match(/.+data:image\/svg\+xml;base64,([A-Za-z0-9\+\/\=]+)/),!e||!e[1])return void a.data("wp-ui-svg-"+g,"none");try{d="atob"in b?b.atob(e[1]):f.atob(e[1])}catch(i){}if(!d)return void a.data("wp-ui-svg-"+g,"none");d=d.replace(/fill="(.+?)"/g,'fill="'+g+'"'),d=d.replace(/style="(.+?)"/g,'style="fill:'+g+'"'),d=d.replace(/fill:.*?;/g,"fill: "+g+";"),d="btoa"in b?b.btoa(d):f.btoa(d),a.data("wp-ui-svg-"+g,d)}a.attr("style",'background-image: url("data:image/svg+xml;base64,'+d+'") !important;')}}}}(jQuery,window,document);
\ No newline at end of file
index c31988ec535670fe45f387a8800eb03b46b430a7..c08fc30fe48bf3ef57fb037da640dcdba3a69581 100644 (file)
@@ -1 +1 @@
-var tagBox,array_unique_noempty;!function(a){array_unique_noempty=function(b){var c=[];return a.each(b,function(b,d){d=a.trim(d),d&&-1===a.inArray(d,c)&&c.push(d)}),c},tagBox={clean:function(a){var b=window.tagsBoxL10n.tagDelimiter;return","!==b&&(a=a.replace(new RegExp(b,"g"),",")),a=a.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,""),","!==b&&(a=a.replace(/,/g,b)),a},parseTags:function(b){var c=b.id,d=c.split("-check-num-")[1],e=a(b).closest(".tagsdiv"),f=e.find(".the-tags"),g=window.tagsBoxL10n.tagDelimiter,h=f.val().split(g),i=[];return delete h[d],a.each(h,function(b,c){c=a.trim(c),c&&i.push(c)}),f.val(this.clean(i.join(g))),this.quickClicks(e),!1},quickClicks:function(b){var c,d,e=a(".the-tags",b),f=a(".tagchecklist",b),g=a(b).attr("id");e.length&&(d=e.prop("disabled"),c=e.val().split(window.tagsBoxL10n.tagDelimiter),f.empty(),a.each(c,function(b,c){var e,h;c=a.trim(c),c&&(e=a("<span />").text(c),d||(h=a('<a id="'+g+"-check-num-"+b+'" class="ntdelbutton" tabindex="0">X</a>'),h.on("click keypress",function(b){("click"===b.type||13===b.keyCode)&&(13===b.keyCode&&a(this).closest(".tagsdiv").find("input.newtag").focus(),tagBox.parseTags(this))}),e.prepend("&nbsp;").prepend(h)),f.append(e))}))},flushTags:function(b,c,d){var e,f,g,h=a(".the-tags",b),i=a("input.newtag",b),j=window.tagsBoxL10n.tagDelimiter;return c=c||!1,g=c?a(c).text():i.val(),"undefined"==typeof g?!1:(e=h.val(),f=e?e+j+g:g,f=this.clean(f),f=array_unique_noempty(f.split(j)).join(j),h.val(f),this.quickClicks(b),c||i.val(""),"undefined"==typeof d&&i.focus(),!1)},get:function(b){var c=b.substr(b.indexOf("-")+1);a.post(ajaxurl,{action:"get-tagcloud",tax:c},function(d,e){0!==d&&"success"==e&&(d=a('<p id="tagcloud-'+c+'" class="the-tagcloud">'+d+"</p>"),a("a",d).click(function(){return tagBox.flushTags(a("#"+c),this),!1}),a("#"+b).after(d))})},init:function(){var b=this,c=a("div.ajaxtag");a(".tagsdiv").each(function(){tagBox.quickClicks(this)}),a(".tagadd",c).click(function(){b.flushTags(a(this).closest(".tagsdiv"))}),a("input.newtag",c).keyup(function(b){return 13==b.which?(tagBox.flushTags(a(this).closest(".tagsdiv")),!1):void 0}).keypress(function(a){return 13==a.which?(a.preventDefault(),!1):void 0}).each(function(){var b=a(this).closest("div.tagsdiv").attr("id");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+b,{delay:500,minchars:2,multiple:!0,multipleSep:window.tagsBoxL10n.tagDelimiter})}),a("#post").submit(function(){a("div.tagsdiv").each(function(){tagBox.flushTags(this,!1,1)})}),a(".tagcloud-link").click(function(){return tagBox.get(a(this).attr("id")),a(this).unbind().click(function(){return a(this).siblings(".the-tagcloud").toggle(),!1}),!1})}}}(jQuery);
\ No newline at end of file
+var tagBox,array_unique_noempty;!function(a){array_unique_noempty=function(b){var c=[];return a.each(b,function(b,d){d=a.trim(d),d&&a.inArray(d,c)===-1&&c.push(d)}),c},tagBox={clean:function(a){var b=window.tagsBoxL10n.tagDelimiter;return","!==b&&(a=a.replace(new RegExp(b,"g"),",")),a=a.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,""),","!==b&&(a=a.replace(/,/g,b)),a},parseTags:function(b){var c=b.id,d=c.split("-check-num-")[1],e=a(b).closest(".tagsdiv"),f=e.find(".the-tags"),g=window.tagsBoxL10n.tagDelimiter,h=f.val().split(g),i=[];return delete h[d],a.each(h,function(b,c){c=a.trim(c),c&&i.push(c)}),f.val(this.clean(i.join(g))),this.quickClicks(e),!1},quickClicks:function(b){var c,d,e=a(".the-tags",b),f=a(".tagchecklist",b),g=a(b).attr("id");e.length&&(d=e.prop("disabled"),c=e.val().split(window.tagsBoxL10n.tagDelimiter),f.empty(),a.each(c,function(b,c){var e,h;c=a.trim(c),c&&(e=a("<span />").text(c),d||(h=a('<a id="'+g+"-check-num-"+b+'" class="ntdelbutton" tabindex="0">X</a>'),h.on("click keypress",function(b){"click"!==b.type&&13!==b.keyCode||(13===b.keyCode&&a(this).closest(".tagsdiv").find("input.newtag").focus(),tagBox.parseTags(this))}),e.prepend("&nbsp;").prepend(h)),f.append(e))}))},flushTags:function(b,c,d){var e,f,g,h=a(".the-tags",b),i=a("input.newtag",b),j=window.tagsBoxL10n.tagDelimiter;return c=c||!1,g=c?a(c).text():i.val(),"undefined"!=typeof g&&(e=h.val(),f=e?e+j+g:g,f=this.clean(f),f=array_unique_noempty(f.split(j)).join(j),h.val(f),this.quickClicks(b),c||i.val(""),"undefined"==typeof d&&i.focus(),!1)},get:function(b){var c=b.substr(b.indexOf("-")+1);a.post(ajaxurl,{action:"get-tagcloud",tax:c},function(d,e){0!==d&&"success"==e&&(d=a('<p id="tagcloud-'+c+'" class="the-tagcloud">'+d+"</p>"),a("a",d).click(function(){return tagBox.flushTags(a("#"+c),this),!1}),a("#"+b).after(d))})},init:function(){var b=this,c=a("div.ajaxtag");a(".tagsdiv").each(function(){tagBox.quickClicks(this)}),a(".tagadd",c).click(function(){b.flushTags(a(this).closest(".tagsdiv"))}),a("input.newtag",c).keyup(function(b){if(13==b.which)return tagBox.flushTags(a(this).closest(".tagsdiv")),!1}).keypress(function(a){if(13==a.which)return a.preventDefault(),!1}).each(function(){var b=a(this).closest("div.tagsdiv").attr("id");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+b,{delay:500,minchars:2,multiple:!0,multipleSep:window.tagsBoxL10n.tagDelimiter})}),a("#post").submit(function(){a("div.tagsdiv").each(function(){tagBox.flushTags(this,!1,1)})}),a(".tagcloud-link").click(function(){return tagBox.get(a(this).attr("id")),a(this).unbind().click(function(){return a(this).siblings(".the-tagcloud").toggle(),!1}),!1})}}}(jQuery);
\ No newline at end of file
index 23b9133c5cbba3eeddd2aab1d2a8904df562da78..8b1c1a08cc3aa393982080b7292dc82c7f9f466b 100644 (file)
@@ -1 +1 @@
-jQuery(document).ready(function(a){a("#the-list").on("click",".delete-tag",function(){var b,c=a(this),d=c.parents("tr"),e=!0;return"undefined"!=showNotice&&(e=showNotice.warn()),e&&(b=c.attr("href").replace(/[^?]*\?/,"").replace(/action=delete/,"action=delete-tag"),a.post(ajaxurl,b,function(c){"1"==c?(a("#ajax-response").empty(),d.fadeOut("normal",function(){d.remove()}),a('select#parent option[value="'+b.match(/tag_ID=(\d+)/)[1]+'"]').remove(),a("a.tag-link-"+b.match(/tag_ID=(\d+)/)[1]).remove()):"-1"==c?(a("#ajax-response").empty().append('<div class="error"><p>'+tagsl10n.noPerm+"</p></div>"),d.children().css("backgroundColor","")):(a("#ajax-response").empty().append('<div class="error"><p>'+tagsl10n.broken+"</p></div>"),d.children().css("backgroundColor",""))}),d.children().css("backgroundColor","#f33")),!1}),a("#submit").click(function(){var b=a(this).parents("form");return validateForm(b)?(a.post(ajaxurl,a("#addtag").serialize(),function(c){var d,e,f,g,h;if(a("#ajax-response").empty(),d=wpAjax.parseAjaxResponse(c,"ajax-response"),d&&!d.errors){if(e=b.find("select#parent").val(),e>0&&a("#tag-"+e).length>0?a(".tags #tag-"+e).after(d.responses[0].supplemental.noparents):a(".tags").prepend(d.responses[0].supplemental.parents),a(".tags .no-items").remove(),b.find("select#parent")){for(f=d.responses[1].supplemental,g="",h=0;h<d.responses[1].position;h++)g+="&nbsp;&nbsp;&nbsp;";b.find("select#parent option:selected").after('<option value="'+f.term_id+'">'+g+f.name+"</option>")}a('input[type="text"]:visible, textarea:visible',b).val("")}}),!1):!1})});
\ No newline at end of file
+jQuery(document).ready(function(a){a("#the-list").on("click",".delete-tag",function(){var b,c=a(this),d=c.parents("tr"),e=!0;return"undefined"!=showNotice&&(e=showNotice.warn()),e&&(b=c.attr("href").replace(/[^?]*\?/,"").replace(/action=delete/,"action=delete-tag"),a.post(ajaxurl,b,function(c){"1"==c?(a("#ajax-response").empty(),d.fadeOut("normal",function(){d.remove()}),a('select#parent option[value="'+b.match(/tag_ID=(\d+)/)[1]+'"]').remove(),a("a.tag-link-"+b.match(/tag_ID=(\d+)/)[1]).remove()):"-1"==c?(a("#ajax-response").empty().append('<div class="error"><p>'+tagsl10n.noPerm+"</p></div>"),d.children().css("backgroundColor","")):(a("#ajax-response").empty().append('<div class="error"><p>'+tagsl10n.broken+"</p></div>"),d.children().css("backgroundColor",""))}),d.children().css("backgroundColor","#f33")),!1}),a("#submit").click(function(){var b=a(this).parents("form");return!!validateForm(b)&&(a.post(ajaxurl,a("#addtag").serialize(),function(c){var d,e,f,g,h;if(a("#ajax-response").empty(),d=wpAjax.parseAjaxResponse(c,"ajax-response"),d&&!d.errors){if(e=b.find("select#parent").val(),e>0&&a("#tag-"+e).length>0?a(".tags #tag-"+e).after(d.responses[0].supplemental.noparents):a(".tags").prepend(d.responses[0].supplemental.parents),a(".tags .no-items").remove(),b.find("select#parent")){for(f=d.responses[1].supplemental,g="",h=0;h<d.responses[1].position;h++)g+="&nbsp;&nbsp;&nbsp;";b.find("select#parent option:selected").after('<option value="'+f.term_id+'">'+g+f.name+"</option>")}a('input[type="text"]:visible, textarea:visible',b).val("")}}),!1)})});
\ No newline at end of file
index 9cd738a1c32af144b83ee91432ba9a0e4817242a..18596e824d30048f9013b332235cf2889becf12c 100644 (file)
@@ -375,17 +375,25 @@ themes.view.Theme = wp.Backbone.View.extend({
                'keydown': themes.isInstall ? 'preview': 'expand',
                'touchend': themes.isInstall ? 'preview': 'expand',
                'keyup': 'addFocus',
-               'touchmove': 'preventExpand'
+               'touchmove': 'preventExpand',
+               'click .theme-install': 'installTheme',
+               'click .update-message': 'updateTheme'
        },
 
        touchDrag: false,
 
+       initialize: function() {
+               this.model.on( 'change', this.render, this );
+       },
+
        render: function() {
                var data = this.model.toJSON();
+
                // Render themes using the html template
                this.$el.html( this.html( data ) ).attr({
                        tabindex: 0,
-                       'aria-describedby' : data.id + '-action ' + data.id + '-name'
+                       'aria-describedby' : data.id + '-action ' + data.id + '-name',
+                       'data-slug': data.id
                });
 
                // Renders active theme styles
@@ -394,10 +402,6 @@ themes.view.Theme = wp.Backbone.View.extend({
                if ( this.model.get( 'displayAuthor' ) ) {
                        this.$el.addClass( 'display-author' );
                }
-
-               if ( this.model.get( 'installed' ) ) {
-                       this.$el.addClass( 'is-installed' );
-               }
        },
 
        // Adds a class to the currently active theme
@@ -439,6 +443,11 @@ themes.view.Theme = wp.Backbone.View.extend({
                        return;
                }
 
+               // Prevent the modal from showing when the user clicks one of the direct action buttons.
+               if ( $( event.target ).is( '.theme-actions a, .update-message, .button-link, .notice-dismiss' ) ) {
+                       return;
+               }
+
                // Set focused theme to current element
                themes.focusedTheme = this.$el;
 
@@ -461,7 +470,7 @@ themes.view.Theme = wp.Backbone.View.extend({
                }
 
                // Allow direct link path to installing a theme.
-               if ( $( event.target ).hasClass( 'button-primary' ) ) {
+               if ( $( event.target ).not( '.install-theme-preview' ).parents( '.theme-actions' ).length ) {
                        return;
                }
 
@@ -579,6 +588,46 @@ themes.view.Theme = wp.Backbone.View.extend({
                if ( _.isUndefined( this.model.collection.at( this.model.collection.indexOf( current ) + 1 ) ) ) {
                        $themeInstaller.find( '.next-theme' ).addClass( 'disabled' );
                }
+       },
+
+       installTheme: function( event ) {
+               var _this = this;
+
+               event.preventDefault();
+
+               wp.updates.maybeRequestFilesystemCredentials( event );
+
+               $( document ).on( 'wp-theme-install-success', function( event, response ) {
+                       if ( _this.model.get( 'id' ) === response.slug ) {
+                               _this.model.set( { 'installed': true } );
+                       }
+               } );
+
+               wp.updates.installTheme( {
+                       slug: $( event.target ).data( 'slug' )
+               } );
+       },
+
+       updateTheme: function( event ) {
+               var _this = this;
+               event.preventDefault();
+
+               wp.updates.maybeRequestFilesystemCredentials( event );
+
+               $( document ).on( 'wp-theme-update-success', function( event, response ) {
+                       _this.model.off( 'change', _this.render, _this );
+                       if ( _this.model.get( 'id' ) === response.slug ) {
+                               _this.model.set( {
+                                       hasUpdate: false,
+                                       version: response.newVersion
+                               } );
+                       }
+                       _this.model.on( 'change', _this.render, _this );
+               } );
+
+               wp.updates.updateTheme( {
+                       slug: $( event.target ).parents( 'div.theme' ).first().data( 'slug' )
+               } );
        }
 });
 
@@ -593,7 +642,8 @@ themes.view.Details = wp.Backbone.View.extend({
                'click': 'collapse',
                'click .delete-theme': 'deleteTheme',
                'click .left': 'previousTheme',
-               'click .right': 'nextTheme'
+               'click .right': 'nextTheme',
+               'click #update-theme': 'updateTheme'
        },
 
        // The HTML template for the theme overlay
@@ -619,28 +669,26 @@ themes.view.Details = wp.Backbone.View.extend({
                this.$el.toggleClass( 'active', this.model.get( 'active' ) );
        },
 
-       // Keeps :focus within the theme details elements
+       // Set initial focus and constrain tabbing within the theme browser modal.
        containFocus: function( $el ) {
-               var $target;
 
-               // Move focus to the primary action
+               // Set initial focus on the primary action control.
                _.delay( function() {
                        $( '.theme-wrap a.button-primary:visible' ).focus();
-               }, 500 );
+               }, 100 );
 
+               // Constrain tabbing within the modal.
                $el.on( 'keydown.wp-themes', function( event ) {
+                       var $firstFocusable = $el.find( '.theme-header button:not(.disabled)' ).first(),
+                               $lastFocusable = $el.find( '.theme-actions a:visible' ).last();
 
-                       // Tab key
-                       if ( event.which === 9 ) {
-                               $target = $( event.target );
-
-                               // Keep focus within the overlay by making the last link on theme actions
-                               // switch focus to button.left on tabbing and vice versa
-                               if ( $target.is( 'button.left' ) && event.shiftKey ) {
-                                       $el.find( '.theme-actions a:last-child' ).focus();
+                       // Check for the Tab key.
+                       if ( 9 === event.which ) {
+                               if ( $firstFocusable[0] === event.target && event.shiftKey ) {
+                                       $lastFocusable.focus();
                                        event.preventDefault();
-                               } else if ( $target.is( '.theme-actions a:last-child' ) ) {
-                                       $el.find( 'button.left' ).focus();
+                               } else if ( $lastFocusable[0] === event.target && ! event.shiftKey ) {
+                                       $firstFocusable.focus();
                                        event.preventDefault();
                                }
                        }
@@ -697,10 +745,14 @@ themes.view.Details = wp.Backbone.View.extend({
 
                // Disable Left/Right when at the start or end of the collection
                if ( this.model.cid === this.model.collection.at(0).cid ) {
-                       this.$el.find( '.left' ).addClass( 'disabled' );
+                       this.$el.find( '.left' )
+                               .addClass( 'disabled' )
+                               .prop( 'disabled', true );
                }
                if ( this.model.cid === this.model.collection.at( this.model.collection.length - 1 ).cid ) {
-                       this.$el.find( '.right' ).addClass( 'disabled' );
+                       this.$el.find( '.right' )
+                               .addClass( 'disabled' )
+                               .prop( 'disabled', true );
                }
        },
 
@@ -713,9 +765,56 @@ themes.view.Details = wp.Backbone.View.extend({
                this.trigger( 'theme:collapse' );
        },
 
-       // Confirmation dialog for deleting a theme
-       deleteTheme: function() {
-               return confirm( themes.data.settings.confirmDelete );
+       updateTheme: function( event ) {
+               var _this = this;
+               event.preventDefault();
+
+               wp.updates.maybeRequestFilesystemCredentials( event );
+
+               $( document ).on( 'wp-theme-update-success', function( event, response ) {
+                       if ( _this.model.get( 'id' ) === response.slug ) {
+                               _this.model.set( {
+                                       hasUpdate: false,
+                                       version: response.newVersion
+                               } );
+                       }
+                       _this.render();
+               } );
+
+               wp.updates.updateTheme( {
+                       slug: $( event.target ).data( 'slug' )
+               } );
+       },
+
+       deleteTheme: function( event ) {
+               var _this = this,
+                   _collection = _this.model.collection,
+                   _themes = themes;
+               event.preventDefault();
+
+               // Confirmation dialog for deleting a theme.
+               if ( ! window.confirm( wp.themes.data.settings.confirmDelete ) ) {
+                       return;
+               }
+
+               wp.updates.maybeRequestFilesystemCredentials( event );
+
+               $( document ).one( 'wp-theme-delete-success', function( event, response ) {
+                       _this.$el.find( '.close' ).trigger( 'click' );
+                       $( '[data-slug="' + response.slug + '"' ).css( { backgroundColor:'#faafaa' } ).fadeOut( 350, function() {
+                               $( this ).remove();
+                               _themes.data.themes = _.without( _themes.data.themes, _.findWhere( _themes.data.themes, { id: response.slug } ) );
+
+                               $( '.wp-filter-search' ).val( '' );
+                               _collection.doSearch( '' );
+                               _collection.remove( _this.model );
+                               _collection.trigger( 'themes:update' );
+                       } );
+               } );
+
+               wp.updates.deleteTheme( {
+                       slug: this.model.get( 'id' )
+               } );
        },
 
        nextTheme: function() {
@@ -759,7 +858,8 @@ themes.view.Preview = themes.view.Details.extend({
                'click .devices button': 'previewDevice',
                'click .previous-theme': 'previousTheme',
                'click .next-theme': 'nextTheme',
-               'keyup': 'keyEvent'
+               'keyup': 'keyEvent',
+               'click .theme-install': 'installTheme'
        },
 
        // The HTML template for the theme preview
@@ -859,6 +959,26 @@ themes.view.Preview = themes.view.Details.extend({
                if ( event.keyCode === 37 ) {
                        this.previousTheme();
                }
+       },
+
+       installTheme: function( event ) {
+               var _this   = this,
+                   $target = $( event.target );
+               event.preventDefault();
+
+               if ( $target.hasClass( 'disabled' ) ) {
+                       return;
+               }
+
+               wp.updates.maybeRequestFilesystemCredentials( event );
+
+               $( document ).on( 'wp-theme-install-success', function() {
+                       _this.model.set( { 'installed': true } );
+               } );
+
+               wp.updates.installTheme( {
+                       slug: $target.data( 'slug' )
+               } );
        }
 });
 
@@ -929,6 +1049,11 @@ themes.view.Themes = wp.Backbone.View.extend({
                                return;
                        }
 
+                       // Bail if the filesystem credentials dialog is shown.
+                       if ( $( '#request-filesystem-credentials-dialog' ).is( ':visible' ) ) {
+                               return;
+                       }
+
                        // Pressing the right arrow key fires a theme:next event
                        if ( event.keyCode === 39 ) {
                                self.overlay.nextTheme();
@@ -979,7 +1104,13 @@ themes.view.Themes = wp.Backbone.View.extend({
                this.liveThemeCount = this.collection.count ? this.collection.count : this.collection.length;
                this.count.text( this.liveThemeCount );
 
-               this.announceSearchResults( this.liveThemeCount );
+               /*
+                * In the theme installer the themes count is already announced
+                * because `announceSearchResults` is called on `query:success`.
+                */
+               if ( ! themes.isInstall ) {
+                       this.announceSearchResults( this.liveThemeCount );
+               }
        },
 
        // Iterates through each instance of the collection
@@ -1048,7 +1179,7 @@ themes.view.Themes = wp.Backbone.View.extend({
        // Renders the overlay with the ThemeDetails view
        // Uses the current model data
        expand: function( id ) {
-               var self = this;
+               var self = this, $card, $modal;
 
                // Set the current theme model
                this.model = self.collection.get( id );
@@ -1066,6 +1197,22 @@ themes.view.Themes = wp.Backbone.View.extend({
                });
 
                this.overlay.render();
+
+               if ( this.model.get( 'hasUpdate' ) ) {
+                       $card  = $( '[data-slug="' + this.model.id + '"]' );
+                       $modal = $( this.overlay.el );
+
+                       if ( $card.find( '.updating-message' ).length ) {
+                               $modal.find( '.notice-warning h3' ).remove();
+                               $modal.find( '.notice-warning' )
+                                       .removeClass( 'notice-large' )
+                                       .addClass( 'updating-message' )
+                                       .find( 'p' ).text( wp.updates.l10n.updating );
+                       } else if ( $card.find( '.notice-error' ).length ) {
+                               $modal.find( '.notice-warning' ).remove();
+                       }
+               }
+
                this.$overlay.html( this.overlay.el );
 
                // Bind to theme:next and theme:previous
@@ -1319,6 +1466,8 @@ themes.view.InstallerSearch =  themes.view.Search.extend({
                'keyup': 'search'
        },
 
+       terms: '',
+
        // Handles Ajax request for searching through themes in public repo
        search: function( event ) {
 
@@ -1340,6 +1489,14 @@ themes.view.InstallerSearch =  themes.view.Search.extend({
        doSearch: _.debounce( function( value ) {
                var request = {};
 
+               // Don't do anything if the search terms haven't changed.
+               if ( this.terms === value ) {
+                       return;
+               }
+
+               // Updates terms with the value passed.
+               this.terms = value;
+
                request.search = value;
 
                // Intercept an [author] search.
@@ -1604,16 +1761,18 @@ themes.view.Installer = themes.view.Appearance.extend({
        // in new location
        searchContainer: $( '.wp-filter .search-form' ),
 
+       /*
+        * When users press the "Upload Theme" button, show the upload form in place.
+        */
        uploader: function() {
-               $( 'a.upload' ).on( 'click', function( event ) {
-                       event.preventDefault();
-                       $( 'body' ).addClass( 'show-upload-theme' );
-                       themes.router.navigate( themes.router.baseUrl( '?upload' ), { replace: true } );
-               });
-               $( 'a.browse-themes' ).on( 'click', function( event ) {
-                       event.preventDefault();
-                       $( 'body' ).removeClass( 'show-upload-theme' );
-                       themes.router.navigate( themes.router.baseUrl( '' ), { replace: true } );
+               var uploadViewToggle = $( '.upload-view-toggle' ),
+                       $body = $( document.body );
+
+               uploadViewToggle.on( 'click', function() {
+                       // Toggle the upload view.
+                       $body.toggleClass( 'show-upload-view' );
+                       // Toggle the `aria-expanded` button attribute.
+                       uploadViewToggle.attr( 'aria-expanded', $body.hasClass( 'show-upload-view' ) );
                });
        },
 
@@ -1668,7 +1827,6 @@ themes.InstallerRouter = Backbone.Router.extend({
        routes: {
                'theme-install.php?theme=:slug': 'preview',
                'theme-install.php?browse=:sort': 'sort',
-               'theme-install.php?upload': 'upload',
                'theme-install.php?search=:query': 'search',
                'theme-install.php': 'sort'
        },
@@ -1750,11 +1908,6 @@ themes.RunInstaller = {
                        self.view.trigger( 'theme:close' );
                });
 
-               // Support the `upload` route by going straight to upload section
-               themes.router.on( 'route:upload', function() {
-                       $( 'a.upload' ).trigger( 'click' );
-               });
-
                // The `search` route event. The router populates the input field.
                themes.router.on( 'route:search', function() {
                        $( '.wp-filter-search' ).focus().trigger( 'keyup' );
index a8e8c960a79df9da3a6ea1ba5441a9a56cfdf079..2a025b19054d9eccd601c770b8c8f09dd868ae9c 100644 (file)
@@ -1 +1 @@
-window.wp=window.wp||{},function(a){var b,c;b=wp.themes=wp.themes||{},b.data=_wpThemeSettings,c=b.data.l10n,b.isInstall=!!b.data.settings.isInstall,_.extend(b,{model:{},view:{},routes:{},router:{},template:wp.template}),b.Model=Backbone.Model.extend({initialize:function(){var a;-1!==_.indexOf(b.data.installedThemes,this.get("slug"))&&this.set({installed:!0}),this.set({id:this.get("slug")||this.get("id")}),this.has("sections")&&(a=this.get("sections").description,this.set({description:a}))}}),b.view.Appearance=wp.Backbone.View.extend({el:"#wpbody-content .wrap .theme-browser",window:a(window),page:0,initialize:function(a){_.bindAll(this,"scroller"),this.SearchView=a.SearchView?a.SearchView:b.view.Search,this.window.bind("scroll",_.throttle(this.scroller,300))},render:function(){this.view=new b.view.Themes({collection:this.collection,parent:this}),this.search(),this.view.render(),this.$el.empty().append(this.view.el).addClass("rendered")},searchContainer:a("#wpbody h1:first"),search:function(){var d,e=this;1!==b.data.themes.length&&(d=new this.SearchView({collection:e.collection,parent:this}),d.render(),this.searchContainer.append(a.parseHTML('<label class="screen-reader-text" for="wp-filter-search-input">'+c.search+"</label>")).append(d.el))},scroller:function(){var a,b,c=this;a=this.window.scrollTop()+c.window.height(),b=c.$el.offset().top+c.$el.outerHeight(!1)-c.window.height(),b=Math.round(.9*b),a>b&&this.trigger("theme:scroll")}}),b.Collection=Backbone.Collection.extend({model:b.Model,terms:"",doSearch:function(c){this.terms!==c&&(this.terms=c,this.terms.length>0&&this.search(this.terms),""===this.terms&&(this.reset(b.data.themes),a("body").removeClass("no-results")),this.trigger("themes:update"))},search:function(c){var d,e,f,g,h,i;this.reset(b.data.themes,{silent:!0}),c=c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),c=c.replace(/ /g,")(?=.*"),d=new RegExp("^(?=.*"+c+").+","i"),e=this.filter(function(a){return g=a.get("name").replace(/(<([^>]+)>)/gi,""),h=a.get("description").replace(/(<([^>]+)>)/gi,""),i=a.get("author").replace(/(<([^>]+)>)/gi,""),f=_.union([g,a.get("id"),h,i,a.get("tags")]),d.test(a.get("author"))&&c.length>2&&a.set("displayAuthor",!0),d.test(f)}),0===e.length?this.trigger("query:empty"):a("body").removeClass("no-results"),this.reset(e)},paginate:function(a){var b=this;return a=a||0,b=_(b.rest(20*a)),b=_(b.first(20))},count:!1,query:function(b){var c,d,e,f=this.queries,g=this;if(this.currentQuery.request=b,c=_.find(f,function(a){return _.isEqual(a.request,b)}),d=_.has(b,"page"),d||(this.currentQuery.page=1),c||d){if(d)return this.apiCall(b,d).done(function(a){g.add(a.themes),g.trigger("query:success"),g.loadingThemes=!1}).fail(function(){g.trigger("query:fail")});0===c.themes.length?g.trigger("query:empty"):a("body").removeClass("no-results"),_.isNumber(c.total)&&(this.count=c.total),this.reset(c.themes),c.total||(this.count=this.length),this.trigger("themes:update"),this.trigger("query:success",this.count)}else c=this.apiCall(b).done(function(a){a.themes&&(g.reset(a.themes),e=a.info.results,f.push({themes:a.themes,request:b,total:e})),g.trigger("themes:update"),g.trigger("query:success",e),a.themes&&0===a.themes.length&&g.trigger("query:empty")}).fail(function(){g.trigger("query:fail")})},queries:[],currentQuery:{page:1,request:{}},apiCall:function(b,c){return wp.ajax.send("query-themes",{data:{request:_.extend({per_page:100,fields:{description:!0,tested:!0,requires:!0,rating:!0,downloaded:!0,downloadLink:!0,last_updated:!0,homepage:!0,num_ratings:!0}},b)},beforeSend:function(){c||a("body").addClass("loading-content").removeClass("no-results")}})},loadingThemes:!1}),b.view.Theme=wp.Backbone.View.extend({className:"theme",state:"grid",html:b.template("theme"),events:{click:b.isInstall?"preview":"expand",keydown:b.isInstall?"preview":"expand",touchend:b.isInstall?"preview":"expand",keyup:"addFocus",touchmove:"preventExpand"},touchDrag:!1,render:function(){var a=this.model.toJSON();this.$el.html(this.html(a)).attr({tabindex:0,"aria-describedby":a.id+"-action "+a.id+"-name"}),this.activeTheme(),this.model.get("displayAuthor")&&this.$el.addClass("display-author"),this.model.get("installed")&&this.$el.addClass("is-installed")},activeTheme:function(){this.model.get("active")&&this.$el.addClass("active")},addFocus:function(){var b=a(":focus").hasClass("theme")?a(":focus"):a(":focus").parents(".theme");a(".theme.focus").removeClass("focus"),b.addClass("focus")},expand:function(c){var d=this;return c=c||window.event,"keydown"!==c.type||13===c.which||32===c.which?this.touchDrag===!0?this.touchDrag=!1:void(a(c.target).is(".theme-actions a")||(b.focusedTheme=this.$el,this.trigger("theme:expand",d.model.cid))):void 0},preventExpand:function(){this.touchDrag=!0},preview:function(c){var d,e,f=this;return c=c||window.event,this.touchDrag===!0?this.touchDrag=!1:void(a(c.target).hasClass("button-primary")||("keydown"!==c.type||13===c.which||32===c.which)&&("keydown"===c.type&&13!==c.which&&a(":focus").hasClass("button")||(c.preventDefault(),c=c||window.event,b.focusedTheme=this.$el,e=new b.view.Preview({model:this.model}),e.render(),this.setNavButtonsState(),1===this.model.collection.length?e.$el.addClass("no-navigation"):e.$el.removeClass("no-navigation"),a("div.wrap").append(e.el),this.listenTo(e,"theme:next",function(){return d=f.model,_.isUndefined(f.current)||(d=f.current),f.current=f.model.collection.at(f.model.collection.indexOf(d)+1),_.isUndefined(f.current)?(f.options.parent.parent.trigger("theme:end"),f.current=d):(e.model=f.current,e.render(),this.setNavButtonsState(),void a(".next-theme").focus())}).listenTo(e,"theme:previous",function(){d=f.model,0!==f.model.collection.indexOf(f.current)&&(_.isUndefined(f.current)||(d=f.current),f.current=f.model.collection.at(f.model.collection.indexOf(d)-1),_.isUndefined(f.current)||(e.model=f.current,e.render(),this.setNavButtonsState(),a(".previous-theme").focus()))}),this.listenTo(e,"preview:close",function(){f.current=f.model}))))},setNavButtonsState:function(){var b=a(".theme-install-overlay"),c=_.isUndefined(this.current)?this.model:this.current;0===this.model.collection.indexOf(c)&&b.find(".previous-theme").addClass("disabled"),_.isUndefined(this.model.collection.at(this.model.collection.indexOf(c)+1))&&b.find(".next-theme").addClass("disabled")}}),b.view.Details=wp.Backbone.View.extend({className:"theme-overlay",events:{click:"collapse","click .delete-theme":"deleteTheme","click .left":"previousTheme","click .right":"nextTheme"},html:b.template("theme-single"),render:function(){var a=this.model.toJSON();this.$el.html(this.html(a)),this.activeTheme(),this.navigation(),this.screenshotCheck(this.$el),this.containFocus(this.$el)},activeTheme:function(){this.$el.toggleClass("active",this.model.get("active"))},containFocus:function(b){var c;_.delay(function(){a(".theme-wrap a.button-primary:visible").focus()},500),b.on("keydown.wp-themes",function(d){9===d.which&&(c=a(d.target),c.is("button.left")&&d.shiftKey?(b.find(".theme-actions a:last-child").focus(),d.preventDefault()):c.is(".theme-actions a:last-child")&&(b.find("button.left").focus(),d.preventDefault()))})},collapse:function(c){var d,e=this;c=c||window.event,1!==b.data.themes.length&&(a(c.target).is(".theme-backdrop")||a(c.target).is(".close")||27===c.keyCode)&&(a("body").addClass("closing-overlay"),this.$el.fadeOut(130,function(){a("body").removeClass("closing-overlay"),e.closeOverlay(),d=document.body.scrollTop,b.router.navigate(b.router.baseUrl("")),document.body.scrollTop=d,b.focusedTheme&&b.focusedTheme.focus()}))},navigation:function(){this.model.cid===this.model.collection.at(0).cid&&this.$el.find(".left").addClass("disabled"),this.model.cid===this.model.collection.at(this.model.collection.length-1).cid&&this.$el.find(".right").addClass("disabled")},closeOverlay:function(){a("body").removeClass("modal-open"),this.remove(),this.unbind(),this.trigger("theme:collapse")},deleteTheme:function(){return confirm(b.data.settings.confirmDelete)},nextTheme:function(){var a=this;return a.trigger("theme:next",a.model.cid),!1},previousTheme:function(){var a=this;return a.trigger("theme:previous",a.model.cid),!1},screenshotCheck:function(a){var b,c;b=a.find(".screenshot img"),c=new Image,c.src=b.attr("src"),c.width&&c.width<=300&&a.addClass("small-screenshot")}}),b.view.Preview=b.view.Details.extend({className:"wp-full-overlay expanded",el:".theme-install-overlay",events:{"click .close-full-overlay":"close","click .collapse-sidebar":"collapse","click .devices button":"previewDevice","click .previous-theme":"previousTheme","click .next-theme":"nextTheme",keyup:"keyEvent"},html:b.template("theme-preview"),render:function(){var c,d=this,e=this.model.toJSON();this.$el.removeClass("iframe-ready").html(this.html(e)),c=this.$el.data("current-preview-device"),c&&d.tooglePreviewDeviceButtons(c),b.router.navigate(b.router.baseUrl(b.router.themePath+this.model.get("id")),{replace:!0}),this.$el.fadeIn(200,function(){a("body").addClass("theme-installer-active full-overlay-active"),a(".close-full-overlay").focus()}),this.$el.find("iframe").one("load",function(){d.iframeLoaded()})},iframeLoaded:function(){this.$el.addClass("iframe-ready")},close:function(){return this.$el.fadeOut(200,function(){a("body").removeClass("theme-installer-active full-overlay-active"),b.focusedTheme&&b.focusedTheme.focus()}).removeClass("iframe-ready"),b.router.navigate(b.router.baseUrl("")),this.trigger("preview:close"),this.undelegateEvents(),this.unbind(),!1},collapse:function(b){var d=a(b.currentTarget);return"true"===d.attr("aria-expanded")?d.attr({"aria-expanded":"false","aria-label":c.expandSidebar}):d.attr({"aria-expanded":"true","aria-label":c.collapseSidebar}),this.$el.toggleClass("collapsed").toggleClass("expanded"),!1},previewDevice:function(b){var c=a(b.currentTarget).data("device");this.$el.removeClass("preview-desktop preview-tablet preview-mobile").addClass("preview-"+c).data("current-preview-device",c),this.tooglePreviewDeviceButtons(c)},tooglePreviewDeviceButtons:function(b){var c=a(".wp-full-overlay-footer .devices");c.find("button").removeClass("active").attr("aria-pressed",!1),c.find("button.preview-"+b).addClass("active").attr("aria-pressed",!0)},keyEvent:function(a){27===a.keyCode&&(this.undelegateEvents(),this.close()),39===a.keyCode&&_.once(this.nextTheme()),37===a.keyCode&&this.previousTheme()}}),b.view.Themes=wp.Backbone.View.extend({className:"themes wp-clearfix",$overlay:a("div.theme-overlay"),index:0,count:a(".wrap .theme-count"),liveThemeCount:0,initialize:function(b){var c=this;this.parent=b.parent,this.setView("grid"),c.currentTheme(),this.listenTo(c.collection,"themes:update",function(){c.parent.page=0,c.currentTheme(),c.render(this)}),this.listenTo(c.collection,"query:success",function(a){_.isNumber(a)?(c.count.text(a),c.announceSearchResults(a)):(c.count.text(c.collection.length),c.announceSearchResults(c.collection.length))}),this.listenTo(c.collection,"query:empty",function(){a("body").addClass("no-results")}),this.listenTo(this.parent,"theme:scroll",function(){c.renderThemes(c.parent.page)}),this.listenTo(this.parent,"theme:close",function(){c.overlay&&c.overlay.closeOverlay()}),a("body").on("keyup",function(a){c.overlay&&(39===a.keyCode&&c.overlay.nextTheme(),37===a.keyCode&&c.overlay.previousTheme(),27===a.keyCode&&c.overlay.collapse(a))})},render:function(){this.$el.empty(),1===b.data.themes.length&&(this.singleTheme=new b.view.Details({model:this.collection.models[0]}),this.singleTheme.render(),this.$el.addClass("single-theme"),this.$el.append(this.singleTheme.el)),this.options.collection.size()>0&&this.renderThemes(this.parent.page),this.liveThemeCount=this.collection.count?this.collection.count:this.collection.length,this.count.text(this.liveThemeCount),this.announceSearchResults(this.liveThemeCount)},renderThemes:function(d){var e=this;return e.instance=e.collection.paginate(d),0===e.instance.size()?void this.parent.trigger("theme:end"):(!b.isInstall&&d>=1&&a(".add-new-theme").remove(),e.instance.each(function(a){e.theme=new b.view.Theme({model:a,parent:e}),e.theme.render(),e.$el.append(e.theme.el),e.listenTo(e.theme,"theme:expand",e.expand,e)}),!b.isInstall&&b.data.settings.canInstall&&this.$el.append('<div class="theme add-new-theme"><a href="'+b.data.settings.installURI+'"><div class="theme-screenshot"><span></span></div><h2 class="theme-name">'+c.addNew+"</h2></a></div>"),void this.parent.page++)},currentTheme:function(){var a,b=this;a=b.collection.findWhere({active:!0}),a&&(b.collection.remove(a),b.collection.add(a,{at:0}))},setView:function(a){return a},expand:function(c){var d=this;this.model=d.collection.get(c),b.router.navigate(b.router.baseUrl(b.router.themePath+this.model.id)),this.setView("detail"),a("body").addClass("modal-open"),this.overlay=new b.view.Details({model:d.model}),this.overlay.render(),this.$overlay.html(this.overlay.el),this.listenTo(this.overlay,"theme:next",function(){d.next([d.model.cid])}).listenTo(this.overlay,"theme:previous",function(){d.previous([d.model.cid])})},next:function(a){var b,c,d=this;b=d.collection.get(a[0]),c=d.collection.at(d.collection.indexOf(b)+1),void 0!==c&&(this.overlay.closeOverlay(),d.theme.trigger("theme:expand",c.cid))},previous:function(a){var b,c,d=this;b=d.collection.get(a[0]),c=d.collection.at(d.collection.indexOf(b)-1),void 0!==c&&(this.overlay.closeOverlay(),d.theme.trigger("theme:expand",c.cid))},announceSearchResults:function(a){0===a?wp.a11y.speak(c.noThemesFound):wp.a11y.speak(c.themesFound.replace("%d",a))}}),b.view.Search=wp.Backbone.View.extend({tagName:"input",className:"wp-filter-search",id:"wp-filter-search-input",searching:!1,attributes:{placeholder:c.searchPlaceholder,type:"search","aria-describedby":"live-search-desc"},events:{input:"search",keyup:"search",blur:"pushState"},initialize:function(a){this.parent=a.parent,this.listenTo(this.parent,"theme:close",function(){this.searching=!1})},search:function(a){"keyup"===a.type&&27===a.which&&(a.target.value=""),this.doSearch(a)},doSearch:_.debounce(function(a){var c={};this.collection.doSearch(a.target.value),this.searching&&13!==a.which?c.replace=!0:this.searching=!0,a.target.value?b.router.navigate(b.router.baseUrl(b.router.searchPath+a.target.value),c):b.router.navigate(b.router.baseUrl(""))},500),pushState:function(a){var c=b.router.baseUrl("");a.target.value&&(c=b.router.baseUrl(b.router.searchPath+a.target.value)),this.searching=!1,b.router.navigate(c)}}),b.Router=Backbone.Router.extend({routes:{"themes.php?theme=:slug":"theme","themes.php?search=:query":"search","themes.php?s=:query":"search","themes.php":"themes","":"themes"},baseUrl:function(a){return"themes.php"+a},themePath:"?theme=",searchPath:"?search=",search:function(b){a(".wp-filter-search").val(b)},themes:function(){a(".wp-filter-search").val("")},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),b.Run={init:function(){this.themes=new b.Collection(b.data.themes),this.view=new b.view.Appearance({collection:this.themes}),this.render()},render:function(){this.view.render(),this.routes(),Backbone.history.start({root:b.data.settings.adminUrl,pushState:!0,hashChange:!1})},routes:function(){var c=this;b.router=new b.Router,b.router.on("route:theme",function(a){c.view.view.expand(a)}),b.router.on("route:themes",function(){c.themes.doSearch(""),c.view.trigger("theme:close")}),b.router.on("route:search",function(){a(".wp-filter-search").trigger("keyup")}),this.extraRoutes()},extraRoutes:function(){return!1}},b.view.InstallerSearch=b.view.Search.extend({events:{input:"search",keyup:"search"},search:function(a){("keyup"!==a.type||9!==a.which&&16!==a.which)&&(this.collection=this.options.parent.view.collection,"keyup"===a.type&&27===a.which&&(a.target.value=""),this.doSearch(a.target.value))},doSearch:_.debounce(function(c){var d={};d.search=c,"author:"===c.substring(0,7)&&(d.search="",d.author=c.slice(7)),"tag:"===c.substring(0,4)&&(d.search="",d.tag=[c.slice(4)]),a(".filter-links li > a.current").removeClass("current"),a("body").removeClass("show-filters filters-applied show-favorites-form"),this.collection.query(d),b.router.navigate(b.router.baseUrl(b.router.searchPath+c),{replace:!0})},500)}),b.view.Installer=b.view.Appearance.extend({el:"#wpbody-content .wrap",events:{"click .filter-links li > a":"onSort","click .theme-filter":"onFilter","click .drawer-toggle":"moreFilters","click .filter-drawer .apply-filters":"applyFilters",'click .filter-group [type="checkbox"]':"addFilter","click .filter-drawer .clear-filters":"clearFilters","click .filtered-by":"backToFilters","click .favorites-form-submit":"saveUsername","keyup #wporg-username-input":"saveUsername"},render:function(){var d=this;this.search(),this.uploader(),this.collection=new b.Collection,this.listenTo(this,"theme:end",function(){d.collection.loadingThemes||(d.collection.loadingThemes=!0,d.collection.currentQuery.page++,_.extend(d.collection.currentQuery.request,{page:d.collection.currentQuery.page}),d.collection.query(d.collection.currentQuery.request))}),this.listenTo(this.collection,"query:success",function(){a("body").removeClass("loading-content"),a(".theme-browser").find("div.error").remove()}),this.listenTo(this.collection,"query:fail",function(){a("body").removeClass("loading-content"),a(".theme-browser").find("div.error").remove(),a(".theme-browser").find("div.themes").before('<div class="error"><p>'+c.error+"</p></div>")}),this.view&&this.view.remove(),this.view=new b.view.Themes({collection:this.collection,parent:this}),this.page=0,this.$el.find(".themes").remove(),this.view.render(),this.$el.find(".theme-browser").append(this.view.el).addClass("rendered")},browse:function(a){this.collection.query({browse:a})},onSort:function(c){var d=a(c.target),e=d.data("sort");c.preventDefault(),a("body").removeClass("filters-applied show-filters"),d.hasClass(this.activeClass)||(this.sort(e),b.router.navigate(b.router.baseUrl(b.router.browsePath+e)))},sort:function(b){this.clearSearch(),a(".filter-links li > a, .theme-filter").removeClass(this.activeClass),a('[data-sort="'+b+'"]').addClass(this.activeClass),"favorites"===b?a("body").addClass("show-favorites-form"):a("body").removeClass("show-favorites-form"),this.browse(b)},onFilter:function(b){var c,d=a(b.target),e=d.data("filter");d.hasClass(this.activeClass)||(a(".filter-links li > a, .theme-section").removeClass(this.activeClass),d.addClass(this.activeClass),e&&(e=_.union([e,this.filtersChecked()]),c={tag:[e]},this.collection.query(c)))},addFilter:function(){this.filtersChecked()},applyFilters:function(b){var c,d=this.filtersChecked(),e={tag:d},f=a(".filtered-by .tags");b&&b.preventDefault(),a("body").addClass("filters-applied"),a(".filter-links li > a.current").removeClass("current"),f.empty(),_.each(d,function(b){c=a('label[for="filter-id-'+b+'"]').text(),f.append('<span class="tag">'+c+"</span>")}),this.collection.query(e)},saveUsername:function(b){var c=a("#wporg-username-input").val(),d=a("#wporg-username-nonce").val(),e={browse:"favorites",user:c},f=this;return b&&b.preventDefault(),"keyup"!==b.type||13===b.which?wp.ajax.send("save-wporg-username",{data:{_wpnonce:d,username:c},success:function(){f.collection.query(e)}}):void 0},filtersChecked:function(){var b=a(".filter-group").find(":checkbox"),c=[];return _.each(b.filter(":checked"),function(b){c.push(a(b).prop("value"))}),0===c.length?(a(".filter-drawer .apply-filters").find("span").text(""),a(".filter-drawer .clear-filters").hide(),a("body").removeClass("filters-applied"),!1):(a(".filter-drawer .apply-filters").find("span").text(c.length),a(".filter-drawer .clear-filters").css("display","inline-block"),c)},activeClass:"current",searchContainer:a(".wp-filter .search-form"),uploader:function(){a("a.upload").on("click",function(c){c.preventDefault(),a("body").addClass("show-upload-theme"),b.router.navigate(b.router.baseUrl("?upload"),{replace:!0})}),a("a.browse-themes").on("click",function(c){c.preventDefault(),a("body").removeClass("show-upload-theme"),b.router.navigate(b.router.baseUrl(""),{replace:!0})})},moreFilters:function(c){return c.preventDefault(),a("body").hasClass("filters-applied")?this.backToFilters():a("body").hasClass("show-filters")&&this.filtersChecked()?this.addFilter():(this.clearSearch(),b.router.navigate(b.router.baseUrl("")),void a("body").toggleClass("show-filters"))},clearFilters:function(b){var c=a(".filter-group").find(":checkbox"),d=this;b.preventDefault(),_.each(c.filter(":checked"),function(b){return a(b).prop("checked",!1),d.filtersChecked()})},backToFilters:function(b){b&&b.preventDefault(),a("body").removeClass("filters-applied")},clearSearch:function(){a("#wp-filter-search-input").val("")}}),b.InstallerRouter=Backbone.Router.extend({routes:{"theme-install.php?theme=:slug":"preview","theme-install.php?browse=:sort":"sort","theme-install.php?upload":"upload","theme-install.php?search=:query":"search","theme-install.php":"sort"},baseUrl:function(a){return"theme-install.php"+a},themePath:"?theme=",browsePath:"?browse=",searchPath:"?search=",search:function(b){a(".wp-filter-search").val(b)},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),b.RunInstaller={init:function(){this.view=new b.view.Installer({section:"featured",SearchView:b.view.InstallerSearch}),this.render()},render:function(){this.view.render(),this.routes(),Backbone.history.start({root:b.data.settings.adminUrl,pushState:!0,hashChange:!1})},routes:function(){var c=this,d={};b.router=new b.InstallerRouter,b.router.on("route:preview",function(a){d.theme=a,c.view.collection.query(d),c.view.collection.once("update",function(){c.view.view.theme.preview()})}),b.router.on("route:sort",function(a){a||(a="featured"),c.view.sort(a),c.view.trigger("theme:close")}),b.router.on("route:upload",function(){a("a.upload").trigger("click")}),b.router.on("route:search",function(){a(".wp-filter-search").focus().trigger("keyup")}),this.extraRoutes()},extraRoutes:function(){return!1}},a(document).ready(function(){b.isInstall?b.RunInstaller.init():b.Run.init(),a(".broken-themes .delete-theme").on("click",function(){return confirm(_wpThemeSettings.settings.confirmDelete)})})}(jQuery);var tb_position;jQuery(document).ready(function(a){tb_position=function(){var b=a("#TB_window"),c=a(window).width(),d=a(window).height(),e=c>1040?1040:c,f=0;a("#wpadminbar").length&&(f=parseInt(a("#wpadminbar").css("height"),10)),b.size()&&(b.width(e-50).height(d-45-f),a("#TB_iframeContent").width(e-50).height(d-75-f),b.css({"margin-left":"-"+parseInt((e-50)/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&b.css({top:20+f+"px","margin-top":"0"}))},a(window).resize(function(){tb_position()})});
\ No newline at end of file
+window.wp=window.wp||{},function(a){var b,c;b=wp.themes=wp.themes||{},b.data=_wpThemeSettings,c=b.data.l10n,b.isInstall=!!b.data.settings.isInstall,_.extend(b,{model:{},view:{},routes:{},router:{},template:wp.template}),b.Model=Backbone.Model.extend({initialize:function(){var a;_.indexOf(b.data.installedThemes,this.get("slug"))!==-1&&this.set({installed:!0}),this.set({id:this.get("slug")||this.get("id")}),this.has("sections")&&(a=this.get("sections").description,this.set({description:a}))}}),b.view.Appearance=wp.Backbone.View.extend({el:"#wpbody-content .wrap .theme-browser",window:a(window),page:0,initialize:function(a){_.bindAll(this,"scroller"),this.SearchView=a.SearchView?a.SearchView:b.view.Search,this.window.bind("scroll",_.throttle(this.scroller,300))},render:function(){this.view=new b.view.Themes({collection:this.collection,parent:this}),this.search(),this.view.render(),this.$el.empty().append(this.view.el).addClass("rendered")},searchContainer:a("#wpbody h1:first"),search:function(){var d,e=this;1!==b.data.themes.length&&(d=new this.SearchView({collection:e.collection,parent:this}),d.render(),this.searchContainer.append(a.parseHTML('<label class="screen-reader-text" for="wp-filter-search-input">'+c.search+"</label>")).append(d.el))},scroller:function(){var a,b,c=this;a=this.window.scrollTop()+c.window.height(),b=c.$el.offset().top+c.$el.outerHeight(!1)-c.window.height(),b=Math.round(.9*b),a>b&&this.trigger("theme:scroll")}}),b.Collection=Backbone.Collection.extend({model:b.Model,terms:"",doSearch:function(c){this.terms!==c&&(this.terms=c,this.terms.length>0&&this.search(this.terms),""===this.terms&&(this.reset(b.data.themes),a("body").removeClass("no-results")),this.trigger("themes:update"))},search:function(c){var d,e,f,g,h,i;this.reset(b.data.themes,{silent:!0}),c=c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),c=c.replace(/ /g,")(?=.*"),d=new RegExp("^(?=.*"+c+").+","i"),e=this.filter(function(a){return g=a.get("name").replace(/(<([^>]+)>)/gi,""),h=a.get("description").replace(/(<([^>]+)>)/gi,""),i=a.get("author").replace(/(<([^>]+)>)/gi,""),f=_.union([g,a.get("id"),h,i,a.get("tags")]),d.test(a.get("author"))&&c.length>2&&a.set("displayAuthor",!0),d.test(f)}),0===e.length?this.trigger("query:empty"):a("body").removeClass("no-results"),this.reset(e)},paginate:function(a){var b=this;return a=a||0,b=_(b.rest(20*a)),b=_(b.first(20))},count:!1,query:function(b){var c,d,e,f=this.queries,g=this;if(this.currentQuery.request=b,c=_.find(f,function(a){return _.isEqual(a.request,b)}),d=_.has(b,"page"),d||(this.currentQuery.page=1),c||d){if(d)return this.apiCall(b,d).done(function(a){g.add(a.themes),g.trigger("query:success"),g.loadingThemes=!1}).fail(function(){g.trigger("query:fail")});0===c.themes.length?g.trigger("query:empty"):a("body").removeClass("no-results"),_.isNumber(c.total)&&(this.count=c.total),this.reset(c.themes),c.total||(this.count=this.length),this.trigger("themes:update"),this.trigger("query:success",this.count)}else c=this.apiCall(b).done(function(a){a.themes&&(g.reset(a.themes),e=a.info.results,f.push({themes:a.themes,request:b,total:e})),g.trigger("themes:update"),g.trigger("query:success",e),a.themes&&0===a.themes.length&&g.trigger("query:empty")}).fail(function(){g.trigger("query:fail")})},queries:[],currentQuery:{page:1,request:{}},apiCall:function(b,c){return wp.ajax.send("query-themes",{data:{request:_.extend({per_page:100,fields:{description:!0,tested:!0,requires:!0,rating:!0,downloaded:!0,downloadLink:!0,last_updated:!0,homepage:!0,num_ratings:!0}},b)},beforeSend:function(){c||a("body").addClass("loading-content").removeClass("no-results")}})},loadingThemes:!1}),b.view.Theme=wp.Backbone.View.extend({className:"theme",state:"grid",html:b.template("theme"),events:{click:b.isInstall?"preview":"expand",keydown:b.isInstall?"preview":"expand",touchend:b.isInstall?"preview":"expand",keyup:"addFocus",touchmove:"preventExpand","click .theme-install":"installTheme","click .update-message":"updateTheme"},touchDrag:!1,initialize:function(){this.model.on("change",this.render,this)},render:function(){var a=this.model.toJSON();this.$el.html(this.html(a)).attr({tabindex:0,"aria-describedby":a.id+"-action "+a.id+"-name","data-slug":a.id}),this.activeTheme(),this.model.get("displayAuthor")&&this.$el.addClass("display-author")},activeTheme:function(){this.model.get("active")&&this.$el.addClass("active")},addFocus:function(){var b=a(":focus").hasClass("theme")?a(":focus"):a(":focus").parents(".theme");a(".theme.focus").removeClass("focus"),b.addClass("focus")},expand:function(c){var d=this;if(c=c||window.event,"keydown"!==c.type||13===c.which||32===c.which)return this.touchDrag===!0?this.touchDrag=!1:void(a(c.target).is(".theme-actions a")||a(c.target).is(".theme-actions a, .update-message, .button-link, .notice-dismiss")||(b.focusedTheme=this.$el,this.trigger("theme:expand",d.model.cid)))},preventExpand:function(){this.touchDrag=!0},preview:function(c){var d,e,f=this;return c=c||window.event,this.touchDrag===!0?this.touchDrag=!1:void(a(c.target).not(".install-theme-preview").parents(".theme-actions").length||"keydown"===c.type&&13!==c.which&&32!==c.which||"keydown"===c.type&&13!==c.which&&a(":focus").hasClass("button")||(c.preventDefault(),c=c||window.event,b.focusedTheme=this.$el,e=new b.view.Preview({model:this.model}),e.render(),this.setNavButtonsState(),1===this.model.collection.length?e.$el.addClass("no-navigation"):e.$el.removeClass("no-navigation"),a("div.wrap").append(e.el),this.listenTo(e,"theme:next",function(){return d=f.model,_.isUndefined(f.current)||(d=f.current),f.current=f.model.collection.at(f.model.collection.indexOf(d)+1),_.isUndefined(f.current)?(f.options.parent.parent.trigger("theme:end"),f.current=d):(e.model=f.current,e.render(),this.setNavButtonsState(),void a(".next-theme").focus())}).listenTo(e,"theme:previous",function(){d=f.model,0!==f.model.collection.indexOf(f.current)&&(_.isUndefined(f.current)||(d=f.current),f.current=f.model.collection.at(f.model.collection.indexOf(d)-1),_.isUndefined(f.current)||(e.model=f.current,e.render(),this.setNavButtonsState(),a(".previous-theme").focus()))}),this.listenTo(e,"preview:close",function(){f.current=f.model})))},setNavButtonsState:function(){var b=a(".theme-install-overlay"),c=_.isUndefined(this.current)?this.model:this.current;0===this.model.collection.indexOf(c)&&b.find(".previous-theme").addClass("disabled"),_.isUndefined(this.model.collection.at(this.model.collection.indexOf(c)+1))&&b.find(".next-theme").addClass("disabled")},installTheme:function(b){var c=this;b.preventDefault(),wp.updates.maybeRequestFilesystemCredentials(b),a(document).on("wp-theme-install-success",function(a,b){c.model.get("id")===b.slug&&c.model.set({installed:!0})}),wp.updates.installTheme({slug:a(b.target).data("slug")})},updateTheme:function(b){var c=this;b.preventDefault(),wp.updates.maybeRequestFilesystemCredentials(b),a(document).on("wp-theme-update-success",function(a,b){c.model.off("change",c.render,c),c.model.get("id")===b.slug&&c.model.set({hasUpdate:!1,version:b.newVersion}),c.model.on("change",c.render,c)}),wp.updates.updateTheme({slug:a(b.target).parents("div.theme").first().data("slug")})}}),b.view.Details=wp.Backbone.View.extend({className:"theme-overlay",events:{click:"collapse","click .delete-theme":"deleteTheme","click .left":"previousTheme","click .right":"nextTheme","click #update-theme":"updateTheme"},html:b.template("theme-single"),render:function(){var a=this.model.toJSON();this.$el.html(this.html(a)),this.activeTheme(),this.navigation(),this.screenshotCheck(this.$el),this.containFocus(this.$el)},activeTheme:function(){this.$el.toggleClass("active",this.model.get("active"))},containFocus:function(b){_.delay(function(){a(".theme-wrap a.button-primary:visible").focus()},100),b.on("keydown.wp-themes",function(a){var c=b.find(".theme-header button:not(.disabled)").first(),d=b.find(".theme-actions a:visible").last();9===a.which&&(c[0]===a.target&&a.shiftKey?(d.focus(),a.preventDefault()):d[0]!==a.target||a.shiftKey||(c.focus(),a.preventDefault()))})},collapse:function(c){var d,e=this;c=c||window.event,1!==b.data.themes.length&&(a(c.target).is(".theme-backdrop")||a(c.target).is(".close")||27===c.keyCode)&&(a("body").addClass("closing-overlay"),this.$el.fadeOut(130,function(){a("body").removeClass("closing-overlay"),e.closeOverlay(),d=document.body.scrollTop,b.router.navigate(b.router.baseUrl("")),document.body.scrollTop=d,b.focusedTheme&&b.focusedTheme.focus()}))},navigation:function(){this.model.cid===this.model.collection.at(0).cid&&this.$el.find(".left").addClass("disabled").prop("disabled",!0),this.model.cid===this.model.collection.at(this.model.collection.length-1).cid&&this.$el.find(".right").addClass("disabled").prop("disabled",!0)},closeOverlay:function(){a("body").removeClass("modal-open"),this.remove(),this.unbind(),this.trigger("theme:collapse")},updateTheme:function(b){var c=this;b.preventDefault(),wp.updates.maybeRequestFilesystemCredentials(b),a(document).on("wp-theme-update-success",function(a,b){c.model.get("id")===b.slug&&c.model.set({hasUpdate:!1,version:b.newVersion}),c.render()}),wp.updates.updateTheme({slug:a(b.target).data("slug")})},deleteTheme:function(c){var d=this,e=d.model.collection,f=b;c.preventDefault(),window.confirm(wp.themes.data.settings.confirmDelete)&&(wp.updates.maybeRequestFilesystemCredentials(c),a(document).one("wp-theme-delete-success",function(b,c){d.$el.find(".close").trigger("click"),a('[data-slug="'+c.slug+'"').css({backgroundColor:"#faafaa"}).fadeOut(350,function(){a(this).remove(),f.data.themes=_.without(f.data.themes,_.findWhere(f.data.themes,{id:c.slug})),a(".wp-filter-search").val(""),e.doSearch(""),e.remove(d.model),e.trigger("themes:update")})}),wp.updates.deleteTheme({slug:this.model.get("id")}))},nextTheme:function(){var a=this;return a.trigger("theme:next",a.model.cid),!1},previousTheme:function(){var a=this;return a.trigger("theme:previous",a.model.cid),!1},screenshotCheck:function(a){var b,c;b=a.find(".screenshot img"),c=new Image,c.src=b.attr("src"),c.width&&c.width<=300&&a.addClass("small-screenshot")}}),b.view.Preview=b.view.Details.extend({className:"wp-full-overlay expanded",el:".theme-install-overlay",events:{"click .close-full-overlay":"close","click .collapse-sidebar":"collapse","click .devices button":"previewDevice","click .previous-theme":"previousTheme","click .next-theme":"nextTheme",keyup:"keyEvent","click .theme-install":"installTheme"},html:b.template("theme-preview"),render:function(){var c,d=this,e=this.model.toJSON();this.$el.removeClass("iframe-ready").html(this.html(e)),c=this.$el.data("current-preview-device"),c&&d.tooglePreviewDeviceButtons(c),b.router.navigate(b.router.baseUrl(b.router.themePath+this.model.get("id")),{replace:!0}),this.$el.fadeIn(200,function(){a("body").addClass("theme-installer-active full-overlay-active"),a(".close-full-overlay").focus()}),this.$el.find("iframe").one("load",function(){d.iframeLoaded()})},iframeLoaded:function(){this.$el.addClass("iframe-ready")},close:function(){return this.$el.fadeOut(200,function(){a("body").removeClass("theme-installer-active full-overlay-active"),b.focusedTheme&&b.focusedTheme.focus()}).removeClass("iframe-ready"),b.router.navigate(b.router.baseUrl("")),this.trigger("preview:close"),this.undelegateEvents(),this.unbind(),!1},collapse:function(b){var d=a(b.currentTarget);return"true"===d.attr("aria-expanded")?d.attr({"aria-expanded":"false","aria-label":c.expandSidebar}):d.attr({"aria-expanded":"true","aria-label":c.collapseSidebar}),this.$el.toggleClass("collapsed").toggleClass("expanded"),!1},previewDevice:function(b){var c=a(b.currentTarget).data("device");this.$el.removeClass("preview-desktop preview-tablet preview-mobile").addClass("preview-"+c).data("current-preview-device",c),this.tooglePreviewDeviceButtons(c)},tooglePreviewDeviceButtons:function(b){var c=a(".wp-full-overlay-footer .devices");c.find("button").removeClass("active").attr("aria-pressed",!1),c.find("button.preview-"+b).addClass("active").attr("aria-pressed",!0)},keyEvent:function(a){27===a.keyCode&&(this.undelegateEvents(),this.close()),39===a.keyCode&&_.once(this.nextTheme()),37===a.keyCode&&this.previousTheme()},installTheme:function(b){var c=this,d=a(b.target);b.preventDefault(),d.hasClass("disabled")||(wp.updates.maybeRequestFilesystemCredentials(b),a(document).on("wp-theme-install-success",function(){c.model.set({installed:!0})}),wp.updates.installTheme({slug:d.data("slug")}))}}),b.view.Themes=wp.Backbone.View.extend({className:"themes wp-clearfix",$overlay:a("div.theme-overlay"),index:0,count:a(".wrap .theme-count"),liveThemeCount:0,initialize:function(b){var c=this;this.parent=b.parent,this.setView("grid"),c.currentTheme(),this.listenTo(c.collection,"themes:update",function(){c.parent.page=0,c.currentTheme(),c.render(this)}),this.listenTo(c.collection,"query:success",function(a){_.isNumber(a)?(c.count.text(a),c.announceSearchResults(a)):(c.count.text(c.collection.length),c.announceSearchResults(c.collection.length))}),this.listenTo(c.collection,"query:empty",function(){a("body").addClass("no-results")}),this.listenTo(this.parent,"theme:scroll",function(){c.renderThemes(c.parent.page)}),this.listenTo(this.parent,"theme:close",function(){c.overlay&&c.overlay.closeOverlay()}),a("body").on("keyup",function(b){c.overlay&&(a("#request-filesystem-credentials-dialog").is(":visible")||(39===b.keyCode&&c.overlay.nextTheme(),37===b.keyCode&&c.overlay.previousTheme(),27===b.keyCode&&c.overlay.collapse(b)))})},render:function(){this.$el.empty(),1===b.data.themes.length&&(this.singleTheme=new b.view.Details({model:this.collection.models[0]}),this.singleTheme.render(),this.$el.addClass("single-theme"),this.$el.append(this.singleTheme.el)),this.options.collection.size()>0&&this.renderThemes(this.parent.page),this.liveThemeCount=this.collection.count?this.collection.count:this.collection.length,this.count.text(this.liveThemeCount),b.isInstall||this.announceSearchResults(this.liveThemeCount)},renderThemes:function(d){var e=this;return e.instance=e.collection.paginate(d),0===e.instance.size()?void this.parent.trigger("theme:end"):(!b.isInstall&&d>=1&&a(".add-new-theme").remove(),e.instance.each(function(a){e.theme=new b.view.Theme({model:a,parent:e}),e.theme.render(),e.$el.append(e.theme.el),e.listenTo(e.theme,"theme:expand",e.expand,e)}),!b.isInstall&&b.data.settings.canInstall&&this.$el.append('<div class="theme add-new-theme"><a href="'+b.data.settings.installURI+'"><div class="theme-screenshot"><span></span></div><h2 class="theme-name">'+c.addNew+"</h2></a></div>"),void this.parent.page++)},currentTheme:function(){var a,b=this;a=b.collection.findWhere({active:!0}),a&&(b.collection.remove(a),b.collection.add(a,{at:0}))},setView:function(a){return a},expand:function(c){var d,e,f=this;this.model=f.collection.get(c),b.router.navigate(b.router.baseUrl(b.router.themePath+this.model.id)),this.setView("detail"),a("body").addClass("modal-open"),this.overlay=new b.view.Details({model:f.model}),this.overlay.render(),this.model.get("hasUpdate")&&(d=a('[data-slug="'+this.model.id+'"]'),e=a(this.overlay.el),d.find(".updating-message").length?(e.find(".notice-warning h3").remove(),e.find(".notice-warning").removeClass("notice-large").addClass("updating-message").find("p").text(wp.updates.l10n.updating)):d.find(".notice-error").length&&e.find(".notice-warning").remove()),this.$overlay.html(this.overlay.el),this.listenTo(this.overlay,"theme:next",function(){f.next([f.model.cid])}).listenTo(this.overlay,"theme:previous",function(){f.previous([f.model.cid])})},next:function(a){var b,c,d=this;b=d.collection.get(a[0]),c=d.collection.at(d.collection.indexOf(b)+1),void 0!==c&&(this.overlay.closeOverlay(),d.theme.trigger("theme:expand",c.cid))},previous:function(a){var b,c,d=this;b=d.collection.get(a[0]),c=d.collection.at(d.collection.indexOf(b)-1),void 0!==c&&(this.overlay.closeOverlay(),d.theme.trigger("theme:expand",c.cid))},announceSearchResults:function(a){0===a?wp.a11y.speak(c.noThemesFound):wp.a11y.speak(c.themesFound.replace("%d",a))}}),b.view.Search=wp.Backbone.View.extend({tagName:"input",className:"wp-filter-search",id:"wp-filter-search-input",searching:!1,attributes:{placeholder:c.searchPlaceholder,type:"search","aria-describedby":"live-search-desc"},events:{input:"search",keyup:"search",blur:"pushState"},initialize:function(a){this.parent=a.parent,this.listenTo(this.parent,"theme:close",function(){this.searching=!1})},search:function(a){"keyup"===a.type&&27===a.which&&(a.target.value=""),this.doSearch(a)},doSearch:_.debounce(function(a){var c={};this.collection.doSearch(a.target.value),this.searching&&13!==a.which?c.replace=!0:this.searching=!0,a.target.value?b.router.navigate(b.router.baseUrl(b.router.searchPath+a.target.value),c):b.router.navigate(b.router.baseUrl(""))},500),pushState:function(a){var c=b.router.baseUrl("");a.target.value&&(c=b.router.baseUrl(b.router.searchPath+a.target.value)),this.searching=!1,b.router.navigate(c)}}),b.Router=Backbone.Router.extend({routes:{"themes.php?theme=:slug":"theme","themes.php?search=:query":"search","themes.php?s=:query":"search","themes.php":"themes","":"themes"},baseUrl:function(a){return"themes.php"+a},themePath:"?theme=",searchPath:"?search=",search:function(b){a(".wp-filter-search").val(b)},themes:function(){a(".wp-filter-search").val("")},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),b.Run={init:function(){this.themes=new b.Collection(b.data.themes),this.view=new b.view.Appearance({collection:this.themes}),this.render()},render:function(){this.view.render(),this.routes(),Backbone.history.start({root:b.data.settings.adminUrl,pushState:!0,hashChange:!1})},routes:function(){var c=this;b.router=new b.Router,b.router.on("route:theme",function(a){c.view.view.expand(a)}),b.router.on("route:themes",function(){c.themes.doSearch(""),c.view.trigger("theme:close")}),b.router.on("route:search",function(){a(".wp-filter-search").trigger("keyup")}),this.extraRoutes()},extraRoutes:function(){return!1}},b.view.InstallerSearch=b.view.Search.extend({events:{input:"search",keyup:"search"},terms:"",search:function(a){("keyup"!==a.type||9!==a.which&&16!==a.which)&&(this.collection=this.options.parent.view.collection,"keyup"===a.type&&27===a.which&&(a.target.value=""),this.doSearch(a.target.value))},doSearch:_.debounce(function(c){var d={};this.terms!==c&&(this.terms=c,d.search=c,"author:"===c.substring(0,7)&&(d.search="",d.author=c.slice(7)),"tag:"===c.substring(0,4)&&(d.search="",d.tag=[c.slice(4)]),a(".filter-links li > a.current").removeClass("current"),a("body").removeClass("show-filters filters-applied show-favorites-form"),this.collection.query(d),b.router.navigate(b.router.baseUrl(b.router.searchPath+c),{replace:!0}))},500)}),b.view.Installer=b.view.Appearance.extend({el:"#wpbody-content .wrap",events:{"click .filter-links li > a":"onSort","click .theme-filter":"onFilter","click .drawer-toggle":"moreFilters","click .filter-drawer .apply-filters":"applyFilters",'click .filter-group [type="checkbox"]':"addFilter","click .filter-drawer .clear-filters":"clearFilters","click .filtered-by":"backToFilters","click .favorites-form-submit":"saveUsername","keyup #wporg-username-input":"saveUsername"},render:function(){var d=this;this.search(),this.uploader(),this.collection=new b.Collection,this.listenTo(this,"theme:end",function(){d.collection.loadingThemes||(d.collection.loadingThemes=!0,d.collection.currentQuery.page++,_.extend(d.collection.currentQuery.request,{page:d.collection.currentQuery.page}),d.collection.query(d.collection.currentQuery.request))}),this.listenTo(this.collection,"query:success",function(){a("body").removeClass("loading-content"),a(".theme-browser").find("div.error").remove()}),this.listenTo(this.collection,"query:fail",function(){a("body").removeClass("loading-content"),a(".theme-browser").find("div.error").remove(),a(".theme-browser").find("div.themes").before('<div class="error"><p>'+c.error+"</p></div>")}),this.view&&this.view.remove(),this.view=new b.view.Themes({collection:this.collection,parent:this}),this.page=0,this.$el.find(".themes").remove(),this.view.render(),this.$el.find(".theme-browser").append(this.view.el).addClass("rendered")},browse:function(a){this.collection.query({browse:a})},onSort:function(c){var d=a(c.target),e=d.data("sort");c.preventDefault(),a("body").removeClass("filters-applied show-filters"),d.hasClass(this.activeClass)||(this.sort(e),b.router.navigate(b.router.baseUrl(b.router.browsePath+e)))},sort:function(b){this.clearSearch(),a(".filter-links li > a, .theme-filter").removeClass(this.activeClass),a('[data-sort="'+b+'"]').addClass(this.activeClass),"favorites"===b?a("body").addClass("show-favorites-form"):a("body").removeClass("show-favorites-form"),this.browse(b)},onFilter:function(b){var c,d=a(b.target),e=d.data("filter");d.hasClass(this.activeClass)||(a(".filter-links li > a, .theme-section").removeClass(this.activeClass),d.addClass(this.activeClass),e&&(e=_.union([e,this.filtersChecked()]),c={tag:[e]},this.collection.query(c)))},addFilter:function(){this.filtersChecked()},applyFilters:function(b){var c,d=this.filtersChecked(),e={tag:d},f=a(".filtered-by .tags");b&&b.preventDefault(),a("body").addClass("filters-applied"),a(".filter-links li > a.current").removeClass("current"),f.empty(),_.each(d,function(b){c=a('label[for="filter-id-'+b+'"]').text(),f.append('<span class="tag">'+c+"</span>")}),this.collection.query(e)},saveUsername:function(b){var c=a("#wporg-username-input").val(),d=a("#wporg-username-nonce").val(),e={browse:"favorites",user:c},f=this;if(b&&b.preventDefault(),"keyup"!==b.type||13===b.which)return wp.ajax.send("save-wporg-username",{data:{_wpnonce:d,username:c},success:function(){f.collection.query(e)}})},filtersChecked:function(){var b=a(".filter-group").find(":checkbox"),c=[];return _.each(b.filter(":checked"),function(b){c.push(a(b).prop("value"))}),0===c.length?(a(".filter-drawer .apply-filters").find("span").text(""),a(".filter-drawer .clear-filters").hide(),a("body").removeClass("filters-applied"),!1):(a(".filter-drawer .apply-filters").find("span").text(c.length),a(".filter-drawer .clear-filters").css("display","inline-block"),c)},activeClass:"current",searchContainer:a(".wp-filter .search-form"),uploader:function(){var b=a(".upload-view-toggle"),c=a(document.body);b.on("click",function(){c.toggleClass("show-upload-view"),b.attr("aria-expanded",c.hasClass("show-upload-view"))})},moreFilters:function(c){return c.preventDefault(),a("body").hasClass("filters-applied")?this.backToFilters():a("body").hasClass("show-filters")&&this.filtersChecked()?this.addFilter():(this.clearSearch(),b.router.navigate(b.router.baseUrl("")),void a("body").toggleClass("show-filters"))},clearFilters:function(b){var c=a(".filter-group").find(":checkbox"),d=this;b.preventDefault(),_.each(c.filter(":checked"),function(b){return a(b).prop("checked",!1),d.filtersChecked()})},backToFilters:function(b){b&&b.preventDefault(),a("body").removeClass("filters-applied")},clearSearch:function(){a("#wp-filter-search-input").val("")}}),b.InstallerRouter=Backbone.Router.extend({routes:{"theme-install.php?theme=:slug":"preview","theme-install.php?browse=:sort":"sort","theme-install.php?search=:query":"search","theme-install.php":"sort"},baseUrl:function(a){return"theme-install.php"+a},themePath:"?theme=",browsePath:"?browse=",searchPath:"?search=",search:function(b){a(".wp-filter-search").val(b)},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),b.RunInstaller={init:function(){this.view=new b.view.Installer({section:"featured",SearchView:b.view.InstallerSearch}),this.render()},render:function(){this.view.render(),this.routes(),Backbone.history.start({root:b.data.settings.adminUrl,pushState:!0,hashChange:!1})},routes:function(){var c=this,d={};b.router=new b.InstallerRouter,b.router.on("route:preview",function(a){d.theme=a,c.view.collection.query(d),c.view.collection.once("update",function(){c.view.view.theme.preview()})}),b.router.on("route:sort",function(a){a||(a="featured"),c.view.sort(a),c.view.trigger("theme:close")}),b.router.on("route:search",function(){a(".wp-filter-search").focus().trigger("keyup")}),this.extraRoutes()},extraRoutes:function(){return!1}},a(document).ready(function(){b.isInstall?b.RunInstaller.init():b.Run.init(),a(".broken-themes .delete-theme").on("click",function(){return confirm(_wpThemeSettings.settings.confirmDelete)})})}(jQuery);var tb_position;jQuery(document).ready(function(a){tb_position=function(){var b=a("#TB_window"),c=a(window).width(),d=a(window).height(),e=1040<c?1040:c,f=0;a("#wpadminbar").length&&(f=parseInt(a("#wpadminbar").css("height"),10)),b.size()&&(b.width(e-50).height(d-45-f),a("#TB_iframeContent").width(e-50).height(d-75-f),b.css({"margin-left":"-"+parseInt((e-50)/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&b.css({top:20+f+"px","margin-top":"0"}))},a(window).resize(function(){tb_position()})});
\ No newline at end of file
index 35ae6c7d9b5b367fae315cc2ec4ec9c83abeea7b..239829fe3252294c2c0f8b7077d90966f836adf4 100644 (file)
@@ -1,7 +1,43 @@
-/* global tb_remove */
-window.wp = window.wp || {};
+/**
+ * Functions for ajaxified updates, deletions and installs inside the WordPress admin.
+ *
+ * @version 4.2.0
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+/* global pagenow */
+
+/**
+ * @param {jQuery}  $                                   jQuery object.
+ * @param {object}  wp                                  WP object.
+ * @param {object}  settings                            WP Updates settings.
+ * @param {string}  settings.ajax_nonce                 AJAX nonce.
+ * @param {object}  settings.l10n                       Translation strings.
+ * @param {object=} settings.plugins                    Base names of plugins in their different states.
+ * @param {Array}   settings.plugins.all                Base names of all plugins.
+ * @param {Array}   settings.plugins.active             Base names of active plugins.
+ * @param {Array}   settings.plugins.inactive           Base names of inactive plugins.
+ * @param {Array}   settings.plugins.upgrade            Base names of plugins with updates available.
+ * @param {Array}   settings.plugins.recently_activated Base names of recently activated plugins.
+ * @param {object=} settings.totals                     Plugin/theme status information or null.
+ * @param {number}  settings.totals.all                 Amount of all plugins or themes.
+ * @param {number}  settings.totals.upgrade             Amount of plugins or themes with updates available.
+ * @param {number}  settings.totals.disabled            Amount of disabled themes.
+ */
+(function( $, wp, settings ) {
+       var $document = $( document );
+
+       wp = wp || {};
 
-(function( $, wp, pagenow ) {
+       /**
+        * The WP Updates object.
+        *
+        * @since 4.2.0
+        *
+        * @type {object}
+        */
        wp.updates = {};
 
        /**
@@ -9,588 +45,2336 @@ window.wp = window.wp || {};
         *
         * @since 4.2.0
         *
-        * @var string
+        * @type {string}
         */
-       wp.updates.ajaxNonce = window._wpUpdatesSettings.ajax_nonce;
+       wp.updates.ajaxNonce = settings.ajax_nonce;
 
        /**
         * Localized strings.
         *
         * @since 4.2.0
         *
-        * @var object
+        * @type {object}
+        */
+       wp.updates.l10n = settings.l10n;
+
+       /**
+        * Current search term.
+        *
+        * @since 4.6.0
+        *
+        * @type {string}
         */
-       wp.updates.l10n = window._wpUpdatesSettings.l10n;
+       wp.updates.searchTerm = '';
 
        /**
         * Whether filesystem credentials need to be requested from the user.
         *
         * @since 4.2.0
         *
-        * @var bool
+        * @type {bool}
         */
-       wp.updates.shouldRequestFilesystemCredentials = null;
+       wp.updates.shouldRequestFilesystemCredentials = false;
 
        /**
         * Filesystem credentials to be packaged along with the request.
         *
         * @since 4.2.0
+        * @since 4.6.0 Added `available` property to indicate whether credentials have been provided.
         *
-        * @var object
+        * @type {object} filesystemCredentials                    Holds filesystem credentials.
+        * @type {object} filesystemCredentials.ftp                Holds FTP credentials.
+        * @type {string} filesystemCredentials.ftp.host           FTP host. Default empty string.
+        * @type {string} filesystemCredentials.ftp.username       FTP user name. Default empty string.
+        * @type {string} filesystemCredentials.ftp.password       FTP password. Default empty string.
+        * @type {string} filesystemCredentials.ftp.connectionType Type of FTP connection. 'ssh', 'ftp', or 'ftps'.
+        *                                                         Default empty string.
+        * @type {object} filesystemCredentials.ssh                Holds SSH credentials.
+        * @type {string} filesystemCredentials.ssh.publicKey      The public key. Default empty string.
+        * @type {string} filesystemCredentials.ssh.privateKey     The private key. Default empty string.
+        * @type {bool}   filesystemCredentials.available          Whether filesystem credentials have been provided.
+        *                                                         Default 'false'.
         */
        wp.updates.filesystemCredentials = {
-               ftp: {
-                       host: null,
-                       username: null,
-                       password: null,
-                       connectionType: null
+               ftp:       {
+                       host:           '',
+                       username:       '',
+                       password:       '',
+                       connectionType: ''
                },
-               ssh: {
-                       publicKey: null,
-                       privateKey: null
-               }
+               ssh:       {
+                       publicKey:  '',
+                       privateKey: ''
+               },
+               available: false
        };
 
        /**
-        * Flag if we're waiting for an update to complete.
+        * Whether we're waiting for an Ajax request to complete.
         *
         * @since 4.2.0
+        * @since 4.6.0 More accurately named `ajaxLocked`.
         *
-        * @var bool
+        * @type {bool}
         */
-       wp.updates.updateLock = false;
+       wp.updates.ajaxLocked = false;
 
        /**
-        * * Flag if we've done an update successfully.
+        * Admin notice template.
         *
-        * @since 4.2.0
+        * @since 4.6.0
         *
-        * @var bool
+        * @type {function} A function that lazily-compiles the template requested.
         */
-       wp.updates.updateDoneSuccessfully = false;
+       wp.updates.adminNotice = wp.template( 'wp-updates-admin-notice' );
 
        /**
+        * Update queue.
+        *
         * If the user tries to update a plugin while an update is
         * already happening, it can be placed in this queue to perform later.
         *
         * @since 4.2.0
+        * @since 4.6.0 More accurately named `queue`.
         *
-        * @var array
+        * @type {Array.object}
         */
-       wp.updates.updateQueue = [];
+       wp.updates.queue = [];
 
        /**
-        * Store a jQuery reference to return focus to when exiting the request credentials modal.
+        * Holds a jQuery reference to return focus to when exiting the request credentials modal.
         *
         * @since 4.2.0
         *
-        * @var jQuery object
+        * @type {jQuery}
+        */
+       wp.updates.$elToReturnFocusToFromCredentialsModal = undefined;
+
+       /**
+        * Adds or updates an admin notice.
+        *
+        * @since 4.6.0
+        *
+        * @param {object}  data
+        * @param {*=}      data.selector      Optional. Selector of an element to be replaced with the admin notice.
+        * @param {string=} data.id            Optional. Unique id that will be used as the notice's id attribute.
+        * @param {string=} data.className     Optional. Class names that will be used in the admin notice.
+        * @param {string=} data.message       Optional. The message displayed in the notice.
+        * @param {number=} data.successes     Optional. The amount of successful operations.
+        * @param {number=} data.errors        Optional. The amount of failed operations.
+        * @param {Array=}  data.errorMessages Optional. Error messages of failed operations.
+        *
+        */
+       wp.updates.addAdminNotice = function( data ) {
+               var $notice = $( data.selector ), $adminNotice;
+
+               delete data.selector;
+               $adminNotice = wp.updates.adminNotice( data );
+
+               // Check if this admin notice already exists.
+               if ( ! $notice.length ) {
+                       $notice = $( '#' + data.id );
+               }
+
+               if ( $notice.length ) {
+                       $notice.replaceWith( $adminNotice );
+               } else {
+                       $( '.wrap' ).find( '> h1' ).after( $adminNotice );
+               }
+
+               $document.trigger( 'wp-updates-notice-added' );
+       };
+
+       /**
+        * Handles Ajax requests to WordPress.
+        *
+        * @since 4.6.0
+        *
+        * @param {string} action The type of Ajax request ('update-plugin', 'install-theme', etc).
+        * @param {object} data   Data that needs to be passed to the ajax callback.
+        * @return {$.promise}    A jQuery promise that represents the request,
+        *                        decorated with an abort() method.
         */
-       wp.updates.$elToReturnFocusToFromCredentialsModal = null;
+       wp.updates.ajax = function( action, data ) {
+               var options = {};
+
+               if ( wp.updates.ajaxLocked ) {
+                       wp.updates.queue.push( {
+                               action: action,
+                               data:   data
+                       } );
+
+                       // Return a Deferred object so callbacks can always be registered.
+                       return $.Deferred();
+               }
+
+               wp.updates.ajaxLocked = true;
+
+               if ( data.success ) {
+                       options.success = data.success;
+                       delete data.success;
+               }
+
+               if ( data.error ) {
+                       options.error = data.error;
+                       delete data.error;
+               }
+
+               options.data = _.extend( data, {
+                       action:          action,
+                       _ajax_nonce:     wp.updates.ajaxNonce,
+                       username:        wp.updates.filesystemCredentials.ftp.username,
+                       password:        wp.updates.filesystemCredentials.ftp.password,
+                       hostname:        wp.updates.filesystemCredentials.ftp.hostname,
+                       connection_type: wp.updates.filesystemCredentials.ftp.connectionType,
+                       public_key:      wp.updates.filesystemCredentials.ssh.publicKey,
+                       private_key:     wp.updates.filesystemCredentials.ssh.privateKey
+               } );
+
+               return wp.ajax.send( options ).always( wp.updates.ajaxAlways );
+       };
+
+       /**
+        * Actions performed after every Ajax request.
+        *
+        * @since 4.6.0
+        *
+        * @param {object}  response
+        * @param {array=}  response.debug     Optional. Debug information.
+        * @param {string=} response.errorCode Optional. Error code for an error that occurred.
+        */
+       wp.updates.ajaxAlways = function( response ) {
+               if ( ! response.errorCode || 'unable_to_connect_to_filesystem' !== response.errorCode ) {
+                       wp.updates.ajaxLocked = false;
+                       wp.updates.queueChecker();
+               }
+
+               if ( 'undefined' !== typeof response.debug && window.console && window.console.log ) {
+                       _.map( response.debug, function( message ) {
+                               window.console.log( $( '<p />' ).html( message ).text() );
+                       } );
+               }
+       };
 
        /**
-        * Decrement update counts throughout the various menus.
+        * Decrements the update counts throughout the various menus.
+        *
+        * This includes the toolbar, the "Updates" menu item and the menu items
+        * for plugins and themes.
         *
         * @since 3.9.0
         *
-        * @param {string} upgradeType
+        * @param {string} type The type of item that was updated or deleted.
+        *                      Can be 'plugin', 'theme'.
         */
-       wp.updates.decrementCount = function( upgradeType ) {
-               var count,
-                       pluginCount,
-                       $adminBarUpdateCount = $( '#wp-admin-bar-updates .ab-label' ),
+       wp.updates.decrementCount = function( type ) {
+               var $adminBarUpdates             = $( '#wp-admin-bar-updates' ),
                        $dashboardNavMenuUpdateCount = $( 'a[href="update-core.php"] .update-plugins' ),
-                       $pluginsMenuItem = $( '#menu-plugins' );
+                       count                        = $adminBarUpdates.find( '.ab-label' ).text(),
+                       $menuItem, $itemCount, itemCount;
 
-
-               count = $adminBarUpdateCount.text();
                count = parseInt( count, 10 ) - 1;
+
                if ( count < 0 || isNaN( count ) ) {
                        return;
                }
-               $( '#wp-admin-bar-updates .ab-item' ).removeAttr( 'title' );
-               $adminBarUpdateCount.text( count );
 
+               $adminBarUpdates.find( '.ab-item' ).removeAttr( 'title' );
+               $adminBarUpdates.find( '.ab-label' ).text( count );
+
+               // Remove the update count from the toolbar if it's zero.
+               if ( ! count ) {
+                       $adminBarUpdates.find( '.ab-label' ).parents( 'li' ).remove();
+               }
 
-               $dashboardNavMenuUpdateCount.each( function( index, elem ) {
-                       elem.className = elem.className.replace( /count-\d+/, 'count-' + count );
+               // Update the "Updates" menu item.
+               $dashboardNavMenuUpdateCount.each( function( index, element ) {
+                       element.className = element.className.replace( /count-\d+/, 'count-' + count );
                } );
+
                $dashboardNavMenuUpdateCount.removeAttr( 'title' );
                $dashboardNavMenuUpdateCount.find( '.update-count' ).text( count );
 
-               if ( 'plugin' === upgradeType ) {
-                       pluginCount = $pluginsMenuItem.find( '.plugin-count' ).eq(0).text();
-                       pluginCount = parseInt( pluginCount, 10 ) - 1;
-                       if ( pluginCount < 0 || isNaN( pluginCount ) ) {
-                               return;
-                       }
-                       $pluginsMenuItem.find( '.plugin-count' ).text( pluginCount );
-                       $pluginsMenuItem.find( '.update-plugins' ).each( function( index, elem ) {
-                               elem.className = elem.className.replace( /count-\d+/, 'count-' + pluginCount );
-                       } );
+               if ( 'plugin' === type ) {
+                       $menuItem  = $( '#menu-plugins' );
+                       $itemCount = $menuItem.find( '.plugin-count' );
+               } else if ( 'theme' === type ) {
+                       $menuItem  = $( '#menu-appearance' );
+                       $itemCount = $menuItem.find( '.theme-count' );
+               }
 
-                       if (pluginCount > 0 ) {
-                               $( '.subsubsub .upgrade .count' ).text( '(' + pluginCount + ')' );
-                       } else {
-                               $( '.subsubsub .upgrade' ).remove();
-                       }
+               // Decrement the counter of the other menu items.
+               if ( $itemCount ) {
+                       itemCount = $itemCount.eq( 0 ).text();
+                       itemCount = parseInt( itemCount, 10 ) - 1;
+               }
+
+               if ( itemCount < 0 || isNaN( itemCount ) ) {
+                       return;
+               }
+
+               if ( itemCount > 0 ) {
+                       $( '.subsubsub .upgrade .count' ).text( '(' + itemCount + ')' );
+
+                       $itemCount.text( itemCount );
+                       $menuItem.find( '.update-plugins' ).each( function( index, element ) {
+                               element.className = element.className.replace( /count-\d+/, 'count-' + itemCount );
+                       } );
+               } else {
+                       $( '.subsubsub .upgrade' ).remove();
+                       $menuItem.find( '.update-plugins' ).remove();
                }
        };
 
        /**
-        * Send an Ajax request to the server to update a plugin.
+        * Sends an Ajax request to the server to update a plugin.
         *
         * @since 4.2.0
+        * @since 4.6.0 More accurately named `updatePlugin`.
         *
-        * @param {string} plugin
-        * @param {string} slug
+        * @param {object}               args         Arguments.
+        * @param {string}               args.plugin  Plugin basename.
+        * @param {string}               args.slug    Plugin slug.
+        * @param {updatePluginSuccess=} args.success Optional. Success callback. Default: wp.updates.updatePluginSuccess
+        * @param {updatePluginError=}   args.error   Optional. Error callback. Default: wp.updates.updatePluginError
+        * @return {$.promise} A jQuery promise that represents the request,
+        *                     decorated with an abort() method.
         */
-       wp.updates.updatePlugin = function( plugin, slug ) {
-               var $message, name,
-                       $card = $( '.plugin-card-' + slug );
+       wp.updates.updatePlugin = function( args ) {
+               var $updateRow, $card, $message, message;
+
+               args = _.extend( {
+                       success: wp.updates.updatePluginSuccess,
+                       error: wp.updates.updatePluginError
+               }, args );
 
                if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
-                       $message = $( '[data-plugin="' + plugin + '"]' ).next().find( '.update-message' );
-               } else if ( 'plugin-install' === pagenow ) {
-                       $message = $card.find( '.update-now' );
-                       name = $message.data( 'name' );
-                       $message.attr( 'aria-label', wp.updates.l10n.updatingLabel.replace( '%s', name ) );
+                       $updateRow = $( 'tr[data-plugin="' + args.plugin + '"]' );
+                       $message   = $updateRow.find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' );
+                       message    = wp.updates.l10n.updatingLabel.replace( '%s', $updateRow.find( '.plugin-title strong' ).text() );
+               } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
+                       $card    = $( '.plugin-card-' + args.slug );
+                       $message = $card.find( '.update-now' ).addClass( 'updating-message' );
+                       message  = wp.updates.l10n.updatingLabel.replace( '%s', $message.data( 'name' ) );
+
                        // Remove previous error messages, if any.
                        $card.removeClass( 'plugin-card-update-failed' ).find( '.notice.notice-error' ).remove();
                }
 
-               $message.addClass( 'updating-message' );
-               if ( $message.html() !== wp.updates.l10n.updating ){
+               if ( $message.html() !== wp.updates.l10n.updating ) {
                        $message.data( 'originaltext', $message.html() );
                }
 
-               $message.text( wp.updates.l10n.updating );
-               wp.a11y.speak( wp.updates.l10n.updatingMsg );
-
-               if ( wp.updates.updateLock ) {
-                       wp.updates.updateQueue.push( {
-                               type: 'update-plugin',
-                               data: {
-                                       plugin: plugin,
-                                       slug: slug
-                               }
-                       } );
-                       return;
-               }
-
-               wp.updates.updateLock = true;
+               $message
+                       .attr( 'aria-label', message )
+                       .text( wp.updates.l10n.updating );
 
-               var data = {
-                       _ajax_nonce:     wp.updates.ajaxNonce,
-                       plugin:          plugin,
-                       slug:            slug,
-                       username:        wp.updates.filesystemCredentials.ftp.username,
-                       password:        wp.updates.filesystemCredentials.ftp.password,
-                       hostname:        wp.updates.filesystemCredentials.ftp.hostname,
-                       connection_type: wp.updates.filesystemCredentials.ftp.connectionType,
-                       public_key:      wp.updates.filesystemCredentials.ssh.publicKey,
-                       private_key:     wp.updates.filesystemCredentials.ssh.privateKey
-               };
+               $document.trigger( 'wp-plugin-updating', args );
 
-               wp.ajax.post( 'update-plugin', data )
-                       .done( wp.updates.updateSuccess )
-                       .fail( wp.updates.updateError );
+               return wp.updates.ajax( 'update-plugin', args );
        };
 
        /**
-        * On a successful plugin update, update the UI with the result.
+        * Updates the UI appropriately after a successful plugin update.
         *
         * @since 4.2.0
+        * @since 4.6.0 More accurately named `updatePluginSuccess`.
         *
-        * @param {object} response
+        * @typedef {object} updatePluginSuccess
+        * @param {object} response            Response from the server.
+        * @param {string} response.slug       Slug of the plugin to be updated.
+        * @param {string} response.plugin     Basename of the plugin to be updated.
+        * @param {string} response.pluginName Name of the plugin to be updated.
+        * @param {string} response.oldVersion Old version of the plugin.
+        * @param {string} response.newVersion New version of the plugin.
         */
-       wp.updates.updateSuccess = function( response ) {
-               var $updateMessage, name, $pluginRow, newText;
+       wp.updates.updatePluginSuccess = function( response ) {
+               var $pluginRow, $updateMessage, newText;
+
                if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
-                       $pluginRow = $( '[data-plugin="' + response.plugin + '"]' ).first();
-                       $updateMessage = $pluginRow.next().find( '.update-message' );
-                       $pluginRow.addClass( 'updated' ).removeClass( 'update' );
+                       $pluginRow     = $( 'tr[data-plugin="' + response.plugin + '"]' )
+                               .removeClass( 'update' )
+                               .addClass( 'updated' );
+                       $updateMessage = $pluginRow.find( '.update-message' )
+                               .removeClass( 'updating-message notice-warning' )
+                               .addClass( 'updated-message notice-success' ).find( 'p' );
 
                        // Update the version number in the row.
-                       newText = $pluginRow.find('.plugin-version-author-uri').html().replace( response.oldVersion, response.newVersion );
-                       $pluginRow.find('.plugin-version-author-uri').html( newText );
-
-                       // Add updated class to update message parent tr
-                       $pluginRow.next().addClass( 'updated' );
-               } else if ( 'plugin-install' === pagenow ) {
-                       $updateMessage = $( '.plugin-card-' + response.slug ).find( '.update-now' );
-                       $updateMessage.addClass( 'button-disabled' );
-                       name = $updateMessage.data( 'name' );
-                       $updateMessage.attr( 'aria-label', wp.updates.l10n.updatedLabel.replace( '%s', name ) );
+                       newText = $pluginRow.find( '.plugin-version-author-uri' ).html().replace( response.oldVersion, response.newVersion );
+                       $pluginRow.find( '.plugin-version-author-uri' ).html( newText );
+               } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
+                       $updateMessage = $( '.plugin-card-' + response.slug ).find( '.update-now' )
+                               .removeClass( 'updating-message' )
+                               .addClass( 'button-disabled updated-message' );
                }
 
-               $updateMessage.removeClass( 'updating-message' ).addClass( 'updated-message' );
-               $updateMessage.text( wp.updates.l10n.updated );
-               wp.a11y.speak( wp.updates.l10n.updatedMsg );
-
-               wp.updates.decrementCount( 'plugin' );
-
-               wp.updates.updateDoneSuccessfully = true;
+               $updateMessage
+                       .attr( 'aria-label', wp.updates.l10n.updatedLabel.replace( '%s', response.pluginName ) )
+                       .text( wp.updates.l10n.updated );
 
-               /*
-                * The lock can be released since the update was successful,
-                * and any other updates can commence.
-                */
-               wp.updates.updateLock = false;
+               wp.a11y.speak( wp.updates.l10n.updatedMsg, 'polite' );
 
-               $(document).trigger( 'wp-plugin-update-success', response );
+               wp.updates.decrementCount( 'plugin' );
 
-               wp.updates.queueChecker();
+               $document.trigger( 'wp-plugin-update-success', response );
        };
 
-
        /**
-        * On a plugin update error, update the UI appropriately.
+        * Updates the UI appropriately after a failed plugin update.
         *
         * @since 4.2.0
+        * @since 4.6.0 More accurately named `updatePluginError`.
         *
-        * @param {object} response
+        * @typedef {object} updatePluginError
+        * @param {object}  response              Response from the server.
+        * @param {string}  response.slug         Slug of the plugin to be updated.
+        * @param {string}  response.plugin       Basename of the plugin to be updated.
+        * @param {string=} response.pluginName   Optional. Name of the plugin to be updated.
+        * @param {string}  response.errorCode    Error code for the error that occurred.
+        * @param {string}  response.errorMessage The error that occurred.
         */
-       wp.updates.updateError = function( response ) {
-               var $card = $( '.plugin-card-' + response.slug ),
-                       $message,
-                       $button,
-                       name,
-                       error_message;
+       wp.updates.updatePluginError = function( response ) {
+               var $card, $message, errorMessage;
 
-               wp.updates.updateDoneSuccessfully = false;
+               if ( ! wp.updates.isValidResponse( response, 'update' ) ) {
+                       return;
+               }
 
-               if ( response.errorCode && response.errorCode == 'unable_to_connect_to_filesystem' && wp.updates.shouldRequestFilesystemCredentials ) {
-                       wp.updates.credentialError( response, 'update-plugin' );
+               if ( wp.updates.maybeHandleCredentialError( response, 'update-plugin' ) ) {
                        return;
                }
 
-               error_message = wp.updates.l10n.updateFailed.replace( '%s', response.error );
+               errorMessage = wp.updates.l10n.updateFailed.replace( '%s', response.errorMessage );
 
                if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
-                       $message = $( '[data-plugin="' + response.plugin + '"]' ).next().find( '.update-message' );
-                       $message.html( error_message ).removeClass( 'updating-message' );
-               } else if ( 'plugin-install' === pagenow ) {
-                       $button = $card.find( '.update-now' );
-                       name = $button.data( 'name' );
+                       if ( response.plugin ) {
+                               $message = $( 'tr[data-plugin="' + response.plugin + '"]' ).find( '.update-message' );
+                       } else {
+                               $message = $( 'tr[data-slug="' + response.slug + '"]' ).find( '.update-message' );
+                       }
+                       $message.removeClass( 'updating-message notice-warning' ).addClass( 'notice-error' ).find( 'p' ).html( errorMessage );
 
-                       $card
+                       if ( response.pluginName ) {
+                               $message.find( 'p' )
+                                       .attr( 'aria-label', wp.updates.l10n.updateFailedLabel.replace( '%s', response.pluginName ) );
+                       } else {
+                               $message.find( 'p' ).removeAttr( 'aria-label' );
+                       }
+               } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
+                       $card = $( '.plugin-card-' + response.slug )
                                .addClass( 'plugin-card-update-failed' )
-                               .append( '<div class="notice notice-error is-dismissible"><p>' + error_message + '</p></div>' );
+                               .append( wp.updates.adminNotice( {
+                                       className: 'update-message notice-error notice-alt is-dismissible',
+                                       message:   errorMessage
+                               } ) );
 
-                       $button
-                               .attr( 'aria-label', wp.updates.l10n.updateFailedLabel.replace( '%s', name ) )
-                               .html( wp.updates.l10n.updateFailedShort ).removeClass( 'updating-message' );
+                       $card.find( '.update-now' )
+                               .text( wp.updates.l10n.updateFailedShort ).removeClass( 'updating-message' );
+
+                       if ( response.pluginName ) {
+                               $card.find( '.update-now' )
+                                       .attr( 'aria-label', wp.updates.l10n.updateFailedLabel.replace( '%s', response.pluginName ) );
+                       } else {
+                               $card.find( '.update-now' ).removeAttr( 'aria-label' );
+                       }
 
                        $card.on( 'click', '.notice.is-dismissible .notice-dismiss', function() {
+
                                // Use same delay as the total duration of the notice fadeTo + slideUp animation.
                                setTimeout( function() {
                                        $card
                                                .removeClass( 'plugin-card-update-failed' )
                                                .find( '.column-name a' ).focus();
+
+                                       $card.find( '.update-now' )
+                                               .attr( 'aria-label', false )
+                                               .text( wp.updates.l10n.updateNow );
                                }, 200 );
-                       });
+                       } );
                }
 
-               wp.a11y.speak( error_message, 'assertive' );
-
-               /*
-                * The lock can be released since this failure was
-                * after the credentials form.
-                */
-               wp.updates.updateLock = false;
-
-               $(document).trigger( 'wp-plugin-update-error', response );
+               wp.a11y.speak( errorMessage, 'assertive' );
 
-               wp.updates.queueChecker();
+               $document.trigger( 'wp-plugin-update-error', response );
        };
 
        /**
-        * Show an error message in the request for credentials form.
+        * Sends an Ajax request to the server to install a plugin.
         *
-        * @param {string} message
-        * @since 4.2.0
+        * @since 4.6.0
+        *
+        * @param {object}                args         Arguments.
+        * @param {string}                args.slug    Plugin identifier in the WordPress.org Plugin repository.
+        * @param {installPluginSuccess=} args.success Optional. Success callback. Default: wp.updates.installPluginSuccess
+        * @param {installPluginError=}   args.error   Optional. Error callback. Default: wp.updates.installPluginError
+        * @return {$.promise} A jQuery promise that represents the request,
+        *                     decorated with an abort() method.
         */
-       wp.updates.showErrorInCredentialsForm = function( message ) {
-               var $modal = $( '.notification-dialog' );
+       wp.updates.installPlugin = function( args ) {
+               var $card    = $( '.plugin-card-' + args.slug ),
+                       $message = $card.find( '.install-now' );
 
-               // Remove any existing error.
-               $modal.find( '.error' ).remove();
+               args = _.extend( {
+                       success: wp.updates.installPluginSuccess,
+                       error: wp.updates.installPluginError
+               }, args );
+
+               if ( 'import' === pagenow ) {
+                       $message = $( '[data-slug="' + args.slug + '"]' );
+               }
+
+               if ( $message.html() !== wp.updates.l10n.installing ) {
+                       $message.data( 'originaltext', $message.html() );
+               }
+
+               $message
+                       .addClass( 'updating-message' )
+                       .attr( 'aria-label', wp.updates.l10n.pluginInstallingLabel.replace( '%s', $message.data( 'name' ) ) )
+                       .text( wp.updates.l10n.installing );
 
-               $modal.find( 'h3' ).after( '<div class="error">' + message + '</div>' );
+               wp.a11y.speak( wp.updates.l10n.installingMsg, 'polite' );
+
+               // Remove previous error messages, if any.
+               $card.removeClass( 'plugin-card-install-failed' ).find( '.notice.notice-error' ).remove();
+
+               $document.trigger( 'wp-plugin-installing', args );
+
+               return wp.updates.ajax( 'install-plugin', args );
        };
 
        /**
-        * Events that need to happen when there is a credential error
+        * Updates the UI appropriately after a successful plugin install.
         *
-        * @since 4.2.0
+        * @since 4.6.0
+        *
+        * @typedef {object} installPluginSuccess
+        * @param {object} response             Response from the server.
+        * @param {string} response.slug        Slug of the installed plugin.
+        * @param {string} response.pluginName  Name of the installed plugin.
+        * @param {string} response.activateUrl URL to activate the just installed plugin.
         */
-       wp.updates.credentialError = function( response, type ) {
-               wp.updates.updateQueue.push( {
-                       'type': type,
-                       'data': {
-                               // Not cool that we're depending on response for this data.
-                               // This would feel more whole in a view all tied together.
-                               plugin: response.plugin,
-                               slug: response.slug
-                       }
-               } );
-               wp.updates.showErrorInCredentialsForm( response.error );
-               wp.updates.requestFilesystemCredentials();
+       wp.updates.installPluginSuccess = function( response ) {
+               var $message = $( '.plugin-card-' + response.slug ).find( '.install-now' );
+
+               $message
+                       .removeClass( 'updating-message' )
+                       .addClass( 'updated-message installed button-disabled' )
+                       .attr( 'aria-label', wp.updates.l10n.pluginInstalledLabel.replace( '%s', response.pluginName ) )
+                       .text( wp.updates.l10n.installed );
+
+               wp.a11y.speak( wp.updates.l10n.installedMsg, 'polite' );
+
+               $document.trigger( 'wp-plugin-install-success', response );
+
+               if ( response.activateUrl ) {
+                       setTimeout( function() {
+
+                               // Transform the 'Install' button into an 'Activate' button.
+                               $message.removeClass( 'install-now installed button-disabled updated-message' ).addClass( 'activate-now button-primary' )
+                                       .attr( 'href', response.activateUrl )
+                                       .attr( 'aria-label', wp.updates.l10n.activatePluginLabel.replace( '%s', response.pluginName ) )
+                                       .text( wp.updates.l10n.activatePlugin );
+                       }, 1000 );
+               }
        };
 
        /**
-        * If an update job has been placed in the queue, queueChecker pulls it out and runs it.
+        * Updates the UI appropriately after a failed plugin install.
         *
-        * @since 4.2.0
+        * @since 4.6.0
+        *
+        * @typedef {object} installPluginError
+        * @param {object}  response              Response from the server.
+        * @param {string}  response.slug         Slug of the plugin to be installed.
+        * @param {string=} response.pluginName   Optional. Name of the plugin to be installed.
+        * @param {string}  response.errorCode    Error code for the error that occurred.
+        * @param {string}  response.errorMessage The error that occurred.
         */
-       wp.updates.queueChecker = function() {
-               if ( wp.updates.updateLock || wp.updates.updateQueue.length <= 0 ) {
+       wp.updates.installPluginError = function( response ) {
+               var $card   = $( '.plugin-card-' + response.slug ),
+                       $button = $card.find( '.install-now' ),
+                       errorMessage;
+
+               if ( ! wp.updates.isValidResponse( response, 'install' ) ) {
                        return;
                }
 
-               var job = wp.updates.updateQueue.shift();
+               if ( wp.updates.maybeHandleCredentialError( response, 'install-plugin' ) ) {
+                       return;
+               }
 
-               wp.updates.updatePlugin( job.data.plugin, job.data.slug );
-       };
+               errorMessage = wp.updates.l10n.installFailed.replace( '%s', response.errorMessage );
 
+               $card
+                       .addClass( 'plugin-card-update-failed' )
+                       .append( '<div class="notice notice-error notice-alt is-dismissible"><p>' + errorMessage + '</p></div>' );
 
-       /**
-        * Request the users filesystem credentials if we don't have them already.
-        *
-        * @since 4.2.0
-        */
-       wp.updates.requestFilesystemCredentials = function( event ) {
-               if ( wp.updates.updateDoneSuccessfully === false ) {
-                       /*
-                        * For the plugin install screen, return the focus to the install button
-                        * after exiting the credentials request modal.
-                        */
-                       if ( 'plugin-install' === pagenow && event ) {
-                               wp.updates.$elToReturnFocusToFromCredentialsModal = $( event.target );
-                       }
+               $card.on( 'click', '.notice.is-dismissible .notice-dismiss', function() {
 
-                       wp.updates.updateLock = true;
+                       // Use same delay as the total duration of the notice fadeTo + slideUp animation.
+                       setTimeout( function() {
+                               $card
+                                       .removeClass( 'plugin-card-update-failed' )
+                                       .find( '.column-name a' ).focus();
+                       }, 200 );
+               } );
 
-                       wp.updates.requestForCredentialsModalOpen();
-               }
+               $button
+                       .removeClass( 'updating-message' ).addClass( 'button-disabled' )
+                       .attr( 'aria-label', wp.updates.l10n.pluginInstallFailedLabel.replace( '%s', $button.data( 'name' ) ) )
+                       .text( wp.updates.l10n.installFailedShort );
+
+               wp.a11y.speak( errorMessage, 'assertive' );
+
+               $document.trigger( 'wp-plugin-install-error', response );
        };
 
        /**
-        * Keydown handler for the request for credentials modal.
+        * Updates the UI appropriately after a successful importer install.
         *
-        * Close the modal when the escape key is pressed.
-        * Constrain keyboard navigation to inside the modal.
+        * @since 4.6.0
         *
-        * @since 4.2.0
+        * @typedef {object} installImporterSuccess
+        * @param {object} response             Response from the server.
+        * @param {string} response.slug        Slug of the installed plugin.
+        * @param {string} response.pluginName  Name of the installed plugin.
+        * @param {string} response.activateUrl URL to activate the just installed plugin.
         */
-       wp.updates.keydown = function( event ) {
-               if ( 27 === event.keyCode ) {
-                       wp.updates.requestForCredentialsModalCancel();
-               } else if ( 9 === event.keyCode ) {
-                       // #upgrade button must always be the last focusable element in the dialog.
-                       if ( event.target.id === 'upgrade' && ! event.shiftKey ) {
-                               $( '#hostname' ).focus();
-                               event.preventDefault();
-                       } else if ( event.target.id === 'hostname' && event.shiftKey ) {
-                               $( '#upgrade' ).focus();
-                               event.preventDefault();
-                       }
-               }
-       };
+       wp.updates.installImporterSuccess = function( response ) {
+               wp.updates.addAdminNotice( {
+                       id:        'install-success',
+                       className: 'notice-success is-dismissible',
+                       message:   wp.updates.l10n.importerInstalledMsg.replace( '%s', response.activateUrl + '&from=import' )
+               } );
 
-       /**
-        * Open the request for credentials modal.
-        *
-        * @since 4.2.0
-        */
-       wp.updates.requestForCredentialsModalOpen = function() {
-               var $modal = $( '#request-filesystem-credentials-dialog' );
-               $( 'body' ).addClass( 'modal-open' );
-               $modal.show();
+               $( '[data-slug="' + response.slug + '"]' )
+                       .removeClass( 'install-now updating-message' )
+                       .addClass( 'activate-now' )
+                       .attr({
+                               'href': response.activateUrl + '&from=import',
+                               'aria-label': wp.updates.l10n.activateImporterLabel.replace( '%s', response.pluginName )
+                       })
+                       .text( wp.updates.l10n.activateImporter );
 
-               $modal.find( 'input:enabled:first' ).focus();
-               $modal.keydown( wp.updates.keydown );
-       };
+               wp.a11y.speak( wp.updates.l10n.installedMsg, 'polite' );
 
-       /**
-        * Close the request for credentials modal.
-        *
-        * @since 4.2.0
-        */
-       wp.updates.requestForCredentialsModalClose = function() {
-               $( '#request-filesystem-credentials-dialog' ).hide();
-               $( 'body' ).removeClass( 'modal-open' );
-               wp.updates.$elToReturnFocusToFromCredentialsModal.focus();
+               $document.trigger( 'wp-importer-install-success', response );
        };
 
        /**
-        * The steps that need to happen when the modal is canceled out
+        * Updates the UI appropriately after a failed importer install.
         *
-        * @since 4.2.0
+        * @since 4.6.0
+        *
+        * @typedef {object} installImporterError
+        * @param {object}  response              Response from the server.
+        * @param {string}  response.slug         Slug of the plugin to be installed.
+        * @param {string=} response.pluginName   Optional. Name of the plugin to be installed.
+        * @param {string}  response.errorCode    Error code for the error that occurred.
+        * @param {string}  response.errorMessage The error that occurred.
         */
-       wp.updates.requestForCredentialsModalCancel = function() {
-               // no updateLock and no updateQueue means we already have cleared things up
-               var data, $message;
+       wp.updates.installImporterError = function( response ) {
+               var errorMessage = wp.updates.l10n.installFailed.replace( '%s', response.errorMessage ),
+                       $installLink = $( '[data-slug="' + response.slug + '"]' ),
+                       pluginName = $installLink.data( 'name' );
+
+               if ( ! wp.updates.isValidResponse( response, 'install' ) ) {
+                       return;
+               }
 
-               if( wp.updates.updateLock === false && wp.updates.updateQueue.length === 0 ){
+               if ( wp.updates.maybeHandleCredentialError( response, 'install-plugin' ) ) {
                        return;
                }
 
-               data = wp.updates.updateQueue[0].data;
+               wp.updates.addAdminNotice( {
+                       id:        response.errorCode,
+                       className: 'notice-error is-dismissible',
+                       message:   errorMessage
+               } );
 
-               // remove the lock, and clear the queue
-               wp.updates.updateLock = false;
-               wp.updates.updateQueue = [];
+               $installLink
+                       .removeClass( 'updating-message' )
+                       .text( wp.updates.l10n.installNow )
+                       .attr( 'aria-label', wp.updates.l10n.installNowLabel.replace( '%s', pluginName ) );
 
-               wp.updates.requestForCredentialsModalClose();
-               if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
-                       $message = $( '[data-plugin="' + data.plugin + '"]' ).next().find( '.update-message' );
-               } else if ( 'plugin-install' === pagenow ) {
-                       $message = $( '.plugin-card-' + data.slug ).find( '.update-now' );
-               }
+               wp.a11y.speak( errorMessage, 'assertive' );
 
-               $message.removeClass( 'updating-message' );
-               $message.html( $message.data( 'originaltext' ) );
-               wp.a11y.speak( wp.updates.l10n.updateCancel );
+               $document.trigger( 'wp-importer-install-error', response );
        };
+
        /**
-        * Potentially add an AYS to a user attempting to leave the page
+        * Sends an Ajax request to the server to delete a plugin.
         *
-        * If an update is on-going and a user attempts to leave the page,
-        * open an "Are you sure?" alert.
+        * @since 4.6.0
         *
-        * @since 4.2.0
+        * @param {object}               args         Arguments.
+        * @param {string}               args.plugin  Basename of the plugin to be deleted.
+        * @param {string}               args.slug    Slug of the plugin to be deleted.
+        * @param {deletePluginSuccess=} args.success Optional. Success callback. Default: wp.updates.deletePluginSuccess
+        * @param {deletePluginError=}   args.error   Optional. Error callback. Default: wp.updates.deletePluginError
+        * @return {$.promise} A jQuery promise that represents the request,
+        *                     decorated with an abort() method.
         */
-
-       wp.updates.beforeunload = function() {
-               if ( wp.updates.updateLock ) {
-                       return wp.updates.l10n.beforeunload;
+       wp.updates.deletePlugin = function( args ) {
+               var $link = $( '[data-plugin="' + args.plugin + '"]' ).find( '.row-actions a.delete' );
+
+               args = _.extend( {
+                       success: wp.updates.deletePluginSuccess,
+                       error: wp.updates.deletePluginError
+               }, args );
+
+               if ( $link.html() !== wp.updates.l10n.deleting ) {
+                       $link
+                               .data( 'originaltext', $link.html() )
+                               .text( wp.updates.l10n.deleting );
                }
-       };
 
+               wp.a11y.speak( wp.updates.l10n.deleting, 'polite' );
 
-       $( document ).ready( function() {
-               /*
-                * Check whether a user needs to submit filesystem credentials based on whether
-                * the form was output on the page server-side.
-                *
-                * @see {wp_print_request_filesystem_credentials_modal() in PHP}
-                */
-               wp.updates.shouldRequestFilesystemCredentials = ( $( '#request-filesystem-credentials-dialog' ).length <= 0 ) ? false : true;
+               $document.trigger( 'wp-plugin-deleting', args );
 
-               // File system credentials form submit noop-er / handler.
-               $( '#request-filesystem-credentials-dialog form' ).on( 'submit', function() {
-                       // Persist the credentials input by the user for the duration of the page load.
-                       wp.updates.filesystemCredentials.ftp.hostname = $('#hostname').val();
-                       wp.updates.filesystemCredentials.ftp.username = $('#username').val();
-                       wp.updates.filesystemCredentials.ftp.password = $('#password').val();
-                       wp.updates.filesystemCredentials.ftp.connectionType = $('input[name="connection_type"]:checked').val();
-                       wp.updates.filesystemCredentials.ssh.publicKey = $('#public_key').val();
-                       wp.updates.filesystemCredentials.ssh.privateKey = $('#private_key').val();
+               return wp.updates.ajax( 'delete-plugin', args );
+       };
 
-                       wp.updates.requestForCredentialsModalClose();
+       /**
+        * Updates the UI appropriately after a successful plugin deletion.
+        *
+        * @since 4.6.0
+        *
+        * @typedef {object} deletePluginSuccess
+        * @param {object} response            Response from the server.
+        * @param {string} response.slug       Slug of the plugin that was deleted.
+        * @param {string} response.plugin     Base name of the plugin that was deleted.
+        * @param {string} response.pluginName Name of the plugin that was deleted.
+        */
+       wp.updates.deletePluginSuccess = function( response ) {
+
+               // Removes the plugin and updates rows.
+               $( '[data-plugin="' + response.plugin + '"]' ).css( { backgroundColor: '#faafaa' } ).fadeOut( 350, function() {
+                       var $form            = $( '#bulk-action-form' ),
+                               $views           = $( '.subsubsub' ),
+                               $pluginRow       = $( this ),
+                               columnCount      = $form.find( 'thead th:not(.hidden), thead td' ).length,
+                               pluginDeletedRow = wp.template( 'item-deleted-row' ),
+                               /** @type {object} plugins Base names of plugins in their different states. */
+                               plugins          = settings.plugins;
+
+                       // Add a success message after deleting a plugin.
+                       if ( ! $pluginRow.hasClass( 'plugin-update-tr' ) ) {
+                               $pluginRow.after(
+                                       pluginDeletedRow( {
+                                               slug:    response.slug,
+                                               plugin:  response.plugin,
+                                               colspan: columnCount,
+                                               name:    response.pluginName
+                                       } )
+                               );
+                       }
 
-                       // Unlock and invoke the queue.
-                       wp.updates.updateLock = false;
-                       wp.updates.queueChecker();
+                       $pluginRow.remove();
 
-                       return false;
-               });
+                       // Remove plugin from update count.
+                       if ( -1 !== _.indexOf( plugins.upgrade, response.plugin ) ) {
+                               plugins.upgrade = _.without( plugins.upgrade, response.plugin );
+                               wp.updates.decrementCount( 'plugin' );
+                       }
 
-               // Close the request credentials modal when
-               $( '#request-filesystem-credentials-dialog [data-js-action="close"], .notification-dialog-background' ).on( 'click', function() {
-                       wp.updates.requestForCredentialsModalCancel();
-               });
+                       // Remove from views.
+                       if ( -1 !== _.indexOf( plugins.inactive, response.plugin ) ) {
+                               plugins.inactive = _.without( plugins.inactive, response.plugin );
+                               if ( plugins.inactive.length ) {
+                                       $views.find( '.inactive .count' ).text( '(' + plugins.inactive.length + ')' );
+                               } else {
+                                       $views.find( '.inactive' ).remove();
+                               }
+                       }
 
-               // Hide SSH fields when not selected
-               $( '#request-filesystem-credentials-dialog input[name="connection_type"]' ).on( 'change', function() {
-                       $( this ).parents( 'form' ).find( '#private_key, #public_key' ).parents( 'label' ).toggle( ( 'ssh' == $( this ).val() ) );
-               }).change();
+                       if ( -1 !== _.indexOf( plugins.active, response.plugin ) ) {
+                               plugins.active = _.without( plugins.active, response.plugin );
+                               if ( plugins.active.length ) {
+                                       $views.find( '.active .count' ).text( '(' + plugins.active.length + ')' );
+                               } else {
+                                       $views.find( '.active' ).remove();
+                               }
+                       }
 
-               // Click handler for plugin updates in List Table view.
-               $( '.plugin-update-tr' ).on( 'click', '.update-link', function( e ) {
-                       e.preventDefault();
-                       if ( wp.updates.shouldRequestFilesystemCredentials && ! wp.updates.updateLock ) {
-                               wp.updates.requestFilesystemCredentials( e );
+                       if ( -1 !== _.indexOf( plugins.recently_activated, response.plugin ) ) {
+                               plugins.recently_activated = _.without( plugins.recently_activated, response.plugin );
+                               if ( plugins.recently_activated.length ) {
+                                       $views.find( '.recently_activated .count' ).text( '(' + plugins.recently_activated.length + ')' );
+                               } else {
+                                       $views.find( '.recently_activated' ).remove();
+                               }
                        }
-                       var updateRow = $( e.target ).parents( '.plugin-update-tr' );
-                       // Return the user to the input box of the plugin's table row after closing the modal.
-                       wp.updates.$elToReturnFocusToFromCredentialsModal = updateRow.prev().find( '.check-column input' );
-                       wp.updates.updatePlugin( updateRow.data( 'plugin' ), updateRow.data( 'slug' ) );
-               } );
 
-               $( '.plugin-card' ).on( 'click', '.update-now', function( e ) {
-                       e.preventDefault();
-                       var $button = $( e.target );
+                       plugins.all = _.without( plugins.all, response.plugin );
 
-                       // Do nothing while updating and when the button is disabled.
-                       if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
-                               return;
-                       }
+                       if ( plugins.all.length ) {
+                               $views.find( '.all .count' ).text( '(' + plugins.all.length + ')' );
+                       } else {
+                               $form.find( '.tablenav' ).css( { visibility: 'hidden' } );
+                               $views.find( '.all' ).remove();
 
-                       if ( wp.updates.shouldRequestFilesystemCredentials && ! wp.updates.updateLock ) {
-                               wp.updates.requestFilesystemCredentials( e );
+                               if ( ! $form.find( 'tr.no-items' ).length ) {
+                                       $form.find( '#the-list' ).append( '<tr class="no-items"><td class="colspanchange" colspan="' + columnCount + '">' + wp.updates.l10n.noPlugins + '</td></tr>' );
+                               }
                        }
-
-                       wp.updates.updatePlugin( $button.data( 'plugin' ), $button.data( 'slug' ) );
                } );
 
-               $( '#plugin_update_from_iframe' ).on( 'click' , function( e ) {
-                       var target, job;
+               wp.a11y.speak( wp.updates.l10n.deleted, 'polite' );
 
-                       target = window.parent == window ? null : window.parent,
-                       $.support.postMessage = !! window.postMessage;
+               $document.trigger( 'wp-plugin-delete-success', response );
+       };
 
-                       if ( $.support.postMessage === false || target === null || window.parent.location.pathname.indexOf( 'update-core.php' ) !== -1 )
-                               return;
+       /**
+        * Updates the UI appropriately after a failed plugin deletion.
+        *
+        * @since 4.6.0
+        *
+        * @typedef {object} deletePluginError
+        * @param {object}  response              Response from the server.
+        * @param {string}  response.slug         Slug of the plugin to be deleted.
+        * @param {string}  response.plugin       Base name of the plugin to be deleted
+        * @param {string=} response.pluginName   Optional. Name of the plugin to be deleted.
+        * @param {string}  response.errorCode    Error code for the error that occurred.
+        * @param {string}  response.errorMessage The error that occurred.
+        */
+       wp.updates.deletePluginError = function( response ) {
+               var $plugin, $pluginUpdateRow,
+                       pluginUpdateRow  = wp.template( 'item-update-row' ),
+                       noticeContent    = wp.updates.adminNotice( {
+                               className: 'update-message notice-error notice-alt',
+                               message:   response.errorMessage
+                       } );
 
-                       e.preventDefault();
+               if ( response.plugin ) {
+                       $plugin          = $( 'tr.inactive[data-plugin="' + response.plugin + '"]' );
+                       $pluginUpdateRow = $plugin.siblings( '[data-plugin="' + response.plugin + '"]' );
+               } else {
+                       $plugin          = $( 'tr.inactive[data-slug="' + response.slug + '"]' );
+                       $pluginUpdateRow = $plugin.siblings( '[data-slug="' + response.slug + '"]' );
+               }
 
-                       job = {
-                               action: 'updatePlugin',
-                               type: 'update-plugin',
-                               data: {
-                                       plugin: $( this ).data( 'plugin' ),
-                                       slug: $( this ).data( 'slug' )
+               if ( ! wp.updates.isValidResponse( response, 'delete' ) ) {
+                       return;
+               }
+
+               if ( wp.updates.maybeHandleCredentialError( response, 'delete-plugin' ) ) {
+                       return;
+               }
+
+               // Add a plugin update row if it doesn't exist yet.
+               if ( ! $pluginUpdateRow.length ) {
+                       $plugin.addClass( 'update' ).after(
+                               pluginUpdateRow( {
+                                       slug:    response.slug,
+                                       plugin:  response.plugin || response.slug,
+                                       colspan: $( '#bulk-action-form' ).find( 'thead th:not(.hidden), thead td' ).length,
+                                       content: noticeContent
+                               } )
+                       );
+               } else {
+
+                       // Remove previous error messages, if any.
+                       $pluginUpdateRow.find( '.notice-error' ).remove();
+
+                       $pluginUpdateRow.find( '.plugin-update' ).append( noticeContent );
+               }
+
+               $document.trigger( 'wp-plugin-delete-error', response );
+       };
+
+       /**
+        * Sends an Ajax request to the server to update a theme.
+        *
+        * @since 4.6.0
+        *
+        * @param {object}              args         Arguments.
+        * @param {string}              args.slug    Theme stylesheet.
+        * @param {updateThemeSuccess=} args.success Optional. Success callback. Default: wp.updates.updateThemeSuccess
+        * @param {updateThemeError=}   args.error   Optional. Error callback. Default: wp.updates.updateThemeError
+        * @return {$.promise} A jQuery promise that represents the request,
+        *                     decorated with an abort() method.
+        */
+       wp.updates.updateTheme = function( args ) {
+               var $notice;
+
+               args = _.extend( {
+                       success: wp.updates.updateThemeSuccess,
+                       error: wp.updates.updateThemeError
+               }, args );
+
+               if ( 'themes-network' === pagenow ) {
+                       $notice = $( '[data-slug="' + args.slug + '"]' ).find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' );
+
+               } else {
+                       $notice = $( '#update-theme' ).closest( '.notice' ).removeClass( 'notice-large' );
+
+                       $notice.find( 'h3' ).remove();
+
+                       $notice = $notice.add( $( '[data-slug="' + args.slug + '"]' ).find( '.update-message' ) );
+                       $notice = $notice.addClass( 'updating-message' ).find( 'p' );
+               }
+
+               if ( $notice.html() !== wp.updates.l10n.updating ) {
+                       $notice.data( 'originaltext', $notice.html() );
+               }
+
+               wp.a11y.speak( wp.updates.l10n.updatingMsg, 'polite' );
+               $notice.text( wp.updates.l10n.updating );
+
+               $document.trigger( 'wp-theme-updating', args );
+
+               return wp.updates.ajax( 'update-theme', args );
+       };
+
+       /**
+        * Updates the UI appropriately after a successful theme update.
+        *
+        * @since 4.6.0
+        *
+        * @typedef {object} updateThemeSuccess
+        * @param {object} response
+        * @param {string} response.slug       Slug of the theme to be updated.
+        * @param {object} response.theme      Updated theme.
+        * @param {string} response.oldVersion Old version of the theme.
+        * @param {string} response.newVersion New version of the theme.
+        */
+       wp.updates.updateThemeSuccess = function( response ) {
+               var isModalOpen    = $( 'body.modal-open' ).length,
+                       $theme         = $( '[data-slug="' + response.slug + '"]' ),
+                       updatedMessage = {
+                               className: 'updated-message notice-success notice-alt',
+                               message:   wp.updates.l10n.updated
+                       },
+                       $notice, newText;
+
+               if ( 'themes-network' === pagenow ) {
+                       $notice = $theme.find( '.update-message' );
+
+                       // Update the version number in the row.
+                       newText = $theme.find( '.theme-version-author-uri' ).html().replace( response.oldVersion, response.newVersion );
+                       $theme.find( '.theme-version-author-uri' ).html( newText );
+               } else {
+                       $notice = $( '.theme-info .notice' ).add( $theme.find( '.update-message' ) );
+
+                       // Focus on Customize button after updating.
+                       if ( isModalOpen ) {
+                               $( '.load-customize:visible' ).focus();
+                       } else {
+                               $theme.find( '.load-customize' ).focus();
+                       }
+               }
+
+               wp.updates.addAdminNotice( _.extend( { selector: $notice }, updatedMessage ) );
+               wp.a11y.speak( wp.updates.l10n.updatedMsg, 'polite' );
+
+               wp.updates.decrementCount( 'theme' );
+
+               $document.trigger( 'wp-theme-update-success', response );
+
+               // Show updated message after modal re-rendered.
+               if ( isModalOpen ) {
+                       $( '.theme-info .theme-author' ).after( wp.updates.adminNotice( updatedMessage ) );
+               }
+       };
+
+       /**
+        * Updates the UI appropriately after a failed theme update.
+        *
+        * @since 4.6.0
+        *
+        * @typedef {object} updateThemeError
+        * @param {object} response              Response from the server.
+        * @param {string} response.slug         Slug of the theme to be updated.
+        * @param {string} response.errorCode    Error code for the error that occurred.
+        * @param {string} response.errorMessage The error that occurred.
+        */
+       wp.updates.updateThemeError = function( response ) {
+               var $theme       = $( '[data-slug="' + response.slug + '"]' ),
+                       errorMessage = wp.updates.l10n.updateFailed.replace( '%s', response.errorMessage ),
+                       $notice;
+
+               if ( ! wp.updates.isValidResponse( response, 'update' ) ) {
+                       return;
+               }
+
+               if ( wp.updates.maybeHandleCredentialError( response, 'update-theme' ) ) {
+                       return;
+               }
+
+               if ( 'themes-network' === pagenow ) {
+                       $notice = $theme.find( '.update-message ' );
+               } else {
+                       $notice = $( '.theme-info .notice' ).add( $theme.find( '.notice' ) );
+
+                       $( 'body.modal-open' ).length ? $( '.load-customize:visible' ).focus() : $theme.find( '.load-customize' ).focus();
+               }
+
+               wp.updates.addAdminNotice( {
+                       selector:  $notice,
+                       className: 'update-message notice-error notice-alt is-dismissible',
+                       message:   errorMessage
+               } );
+
+               wp.a11y.speak( errorMessage, 'polite' );
+
+               $document.trigger( 'wp-theme-update-error', response );
+       };
+
+       /**
+        * Sends an Ajax request to the server to install a theme.
+        *
+        * @since 4.6.0
+        *
+        * @param {object}               args
+        * @param {string}               args.slug    Theme stylesheet.
+        * @param {installThemeSuccess=} args.success Optional. Success callback. Default: wp.updates.installThemeSuccess
+        * @param {installThemeError=}   args.error   Optional. Error callback. Default: wp.updates.installThemeError
+        * @return {$.promise} A jQuery promise that represents the request,
+        *                     decorated with an abort() method.
+        */
+       wp.updates.installTheme = function( args ) {
+               var $message = $( '.theme-install[data-slug="' + args.slug + '"]' );
+
+               args = _.extend( {
+                       success: wp.updates.installThemeSuccess,
+                       error: wp.updates.installThemeError
+               }, args );
+
+               $message.addClass( 'updating-message' );
+               $message.parents( '.theme' ).addClass( 'focus' );
+               if ( $message.html() !== wp.updates.l10n.installing ) {
+                       $message.data( 'originaltext', $message.html() );
+               }
+
+               $message
+                       .text( wp.updates.l10n.installing )
+                       .attr( 'aria-label', wp.updates.l10n.themeInstallingLabel.replace( '%s', $message.data( 'name' ) ) );
+               wp.a11y.speak( wp.updates.l10n.installingMsg, 'polite' );
+
+               // Remove previous error messages, if any.
+               $( '.install-theme-info, [data-slug="' + args.slug + '"]' ).removeClass( 'theme-install-failed' ).find( '.notice.notice-error' ).remove();
+
+               $document.trigger( 'wp-theme-installing', args );
+
+               return wp.updates.ajax( 'install-theme', args );
+       };
+
+       /**
+        * Updates the UI appropriately after a successful theme install.
+        *
+        * @since 4.6.0
+        *
+        * @typedef {object} installThemeSuccess
+        * @param {object} response              Response from the server.
+        * @param {string} response.slug         Slug of the theme to be installed.
+        * @param {string} response.customizeUrl URL to the Customizer for the just installed theme.
+        * @param {string} response.activateUrl  URL to activate the just installed theme.
+        */
+       wp.updates.installThemeSuccess = function( response ) {
+               var $card = $( '.wp-full-overlay-header, [data-slug=' + response.slug + ']' ),
+                       $message;
+
+               $document.trigger( 'wp-theme-install-success', response );
+
+               $message = $card.find( '.button-primary' )
+                       .removeClass( 'updating-message' )
+                       .addClass( 'updated-message disabled' )
+                       .attr( 'aria-label', wp.updates.l10n.themeInstalledLabel.replace( '%s', response.themeName ) )
+                       .text( wp.updates.l10n.installed );
+
+               wp.a11y.speak( wp.updates.l10n.installedMsg, 'polite' );
+
+               setTimeout( function() {
+
+                       if ( response.activateUrl ) {
+
+                               // Transform the 'Install' button into an 'Activate' button.
+                               $message
+                                       .attr( 'href', response.activateUrl )
+                                       .removeClass( 'theme-install updated-message disabled' )
+                                       .addClass( 'activate' )
+                                       .attr( 'aria-label', wp.updates.l10n.activateThemeLabel.replace( '%s', response.themeName ) )
+                                       .text( wp.updates.l10n.activateTheme );
+                       }
+
+                       if ( response.customizeUrl ) {
+
+                               // Transform the 'Preview' button into a 'Live Preview' button.
+                               $message.siblings( '.preview' ).replaceWith( function () {
+                                       return $( '<a>' )
+                                               .attr( 'href', response.customizeUrl )
+                                               .addClass( 'button button-secondary load-customize' )
+                                               .text( wp.updates.l10n.livePreview );
+                               } );
+                       }
+               }, 1000 );
+       };
+
+       /**
+        * Updates the UI appropriately after a failed theme install.
+        *
+        * @since 4.6.0
+        *
+        * @typedef {object} installThemeError
+        * @param {object} response              Response from the server.
+        * @param {string} response.slug         Slug of the theme to be installed.
+        * @param {string} response.errorCode    Error code for the error that occurred.
+        * @param {string} response.errorMessage The error that occurred.
+        */
+       wp.updates.installThemeError = function( response ) {
+               var $card, $button,
+                       errorMessage = wp.updates.l10n.installFailed.replace( '%s', response.errorMessage ),
+                       $message     = wp.updates.adminNotice( {
+                               className: 'update-message notice-error notice-alt',
+                               message:   errorMessage
+                       } );
+
+               if ( ! wp.updates.isValidResponse( response, 'install' ) ) {
+                       return;
+               }
+
+               if ( wp.updates.maybeHandleCredentialError( response, 'install-theme' ) ) {
+                       return;
+               }
+
+               if ( $document.find( 'body' ).hasClass( 'full-overlay-active' ) ) {
+                       $button = $( '.theme-install[data-slug="' + response.slug + '"]' );
+                       $card   = $( '.install-theme-info' ).prepend( $message );
+               } else {
+                       $card   = $( '[data-slug="' + response.slug + '"]' ).removeClass( 'focus' ).addClass( 'theme-install-failed' ).append( $message );
+                       $button = $card.find( '.theme-install' );
+               }
+
+               $button
+                       .removeClass( 'updating-message' )
+                       .attr( 'aria-label', wp.updates.l10n.themeInstallFailedLabel.replace( '%s', $button.data( 'name' ) ) )
+                       .text( wp.updates.l10n.installFailedShort );
+
+               wp.a11y.speak( errorMessage, 'assertive' );
+
+               $document.trigger( 'wp-theme-install-error', response );
+       };
+
+       /**
+        * Sends an Ajax request to the server to install a theme.
+        *
+        * @since 4.6.0
+        *
+        * @param {object}              args
+        * @param {string}              args.slug    Theme stylesheet.
+        * @param {deleteThemeSuccess=} args.success Optional. Success callback. Default: wp.updates.deleteThemeSuccess
+        * @param {deleteThemeError=}   args.error   Optional. Error callback. Default: wp.updates.deleteThemeError
+        * @return {$.promise} A jQuery promise that represents the request,
+        *                     decorated with an abort() method.
+        */
+       wp.updates.deleteTheme = function( args ) {
+               var $button;
+
+               if ( 'themes' === pagenow ) {
+                       $button = $( '.theme-actions .delete-theme' );
+               } else if ( 'themes-network' === pagenow ) {
+                       $button = $( '[data-slug="' + args.slug + '"]' ).find( '.row-actions a.delete' );
+               }
+
+               args = _.extend( {
+                       success: wp.updates.deleteThemeSuccess,
+                       error: wp.updates.deleteThemeError
+               }, args );
+
+               if ( $button && $button.html() !== wp.updates.l10n.deleting ) {
+                       $button
+                               .data( 'originaltext', $button.html() )
+                               .text( wp.updates.l10n.deleting );
+               }
+
+               wp.a11y.speak( wp.updates.l10n.deleting, 'polite' );
+
+               // Remove previous error messages, if any.
+               $( '.theme-info .update-message' ).remove();
+
+               $document.trigger( 'wp-theme-deleting', args );
+
+               return wp.updates.ajax( 'delete-theme', args );
+       };
+
+       /**
+        * Updates the UI appropriately after a successful theme deletion.
+        *
+        * @since 4.6.0
+        *
+        * @typedef {object} deleteThemeSuccess
+        * @param {object} response      Response from the server.
+        * @param {string} response.slug Slug of the theme that was deleted.
+        */
+       wp.updates.deleteThemeSuccess = function( response ) {
+               var $themeRows = $( '[data-slug="' + response.slug + '"]' );
+
+               if ( 'themes-network' === pagenow ) {
+
+                       // Removes the theme and updates rows.
+                       $themeRows.css( { backgroundColor: '#faafaa' } ).fadeOut( 350, function() {
+                               var $views     = $( '.subsubsub' ),
+                                       $themeRow  = $( this ),
+                                       totals     = settings.totals,
+                                       deletedRow = wp.template( 'item-deleted-row' );
+
+                               if ( ! $themeRow.hasClass( 'plugin-update-tr' ) ) {
+                                       $themeRow.after(
+                                               deletedRow( {
+                                                       slug:    response.slug,
+                                                       colspan: $( '#bulk-action-form' ).find( 'thead th:not(.hidden), thead td' ).length,
+                                                       name:    $themeRow.find( '.theme-title strong' ).text()
+                                               } )
+                                       );
                                }
-                       };
 
-                       target.postMessage( JSON.stringify( job ), window.location.origin );
-               });
+                               $themeRow.remove();
 
-       } );
+                               // Remove theme from update count.
+                               if ( $themeRow.hasClass( 'update' ) ) {
+                                       totals.upgrade--;
+                                       wp.updates.decrementCount( 'theme' );
+                               }
+
+                               // Remove from views.
+                               if ( $themeRow.hasClass( 'inactive' ) ) {
+                                       totals.disabled--;
+                                       if ( totals.disabled ) {
+                                               $views.find( '.disabled .count' ).text( '(' + totals.disabled + ')' );
+                                       } else {
+                                               $views.find( '.disabled' ).remove();
+                                       }
+                               }
+
+                               // There is always at least one theme available.
+                               $views.find( '.all .count' ).text( '(' + --totals.all + ')' );
+                       } );
+               }
+
+               wp.a11y.speak( wp.updates.l10n.deleted, 'polite' );
+
+               $document.trigger( 'wp-theme-delete-success', response );
+       };
 
-       $( window ).on( 'message', function( e ) {
-               var event = e.originalEvent,
-                       message,
-                       loc = document.location,
-                       expectedOrigin = loc.protocol + '//' + loc.hostname;
+       /**
+        * Updates the UI appropriately after a failed theme deletion.
+        *
+        * @since 4.6.0
+        *
+        * @typedef {object} deleteThemeError
+        * @param {object} response              Response from the server.
+        * @param {string} response.slug         Slug of the theme to be deleted.
+        * @param {string} response.errorCode    Error code for the error that occurred.
+        * @param {string} response.errorMessage The error that occurred.
+        */
+       wp.updates.deleteThemeError = function( response ) {
+               var $themeRow    = $( 'tr.inactive[data-slug="' + response.slug + '"]' ),
+                       $button      = $( '.theme-actions .delete-theme' ),
+                       updateRow    = wp.template( 'item-update-row' ),
+                       $updateRow   = $themeRow.siblings( '#' + response.slug + '-update' ),
+                       errorMessage = wp.updates.l10n.deleteFailed.replace( '%s', response.errorMessage ),
+                       $message     = wp.updates.adminNotice( {
+                               className: 'update-message notice-error notice-alt',
+                               message:   errorMessage
+                       } );
 
-               if ( event.origin !== expectedOrigin ) {
+               if ( wp.updates.maybeHandleCredentialError( response, 'delete-theme' ) ) {
                        return;
                }
 
-               message = $.parseJSON( event.data );
+               if ( 'themes-network' === pagenow ) {
+                       if ( ! $updateRow.length ) {
+                               $themeRow.addClass( 'update' ).after(
+                                       updateRow( {
+                                               slug: response.slug,
+                                               colspan: $( '#bulk-action-form' ).find( 'thead th:not(.hidden), thead td' ).length,
+                                               content: $message
+                                       } )
+                               );
+                       } else {
+                               // Remove previous error messages, if any.
+                               $updateRow.find( '.notice-error' ).remove();
+                               $updateRow.find( '.plugin-update' ).append( $message );
+                       }
+               } else {
+                       $( '.theme-info .theme-description' ).before( $message );
+               }
+
+               $button.html( $button.data( 'originaltext' ) );
+
+               wp.a11y.speak( errorMessage, 'assertive' );
+
+               $document.trigger( 'wp-theme-delete-error', response );
+       };
+
+       /**
+        * Adds the appropriate callback based on the type of action and the current page.
+        *
+        * @since 4.6.0
+        * @private
+        *
+        * @param {object} data   AJAX payload.
+        * @param {string} action The type of request to perform.
+        * @return {object} The AJAX payload with the appropriate callbacks.
+        */
+       wp.updates._addCallbacks = function( data, action ) {
+               if ( 'import' === pagenow && 'install-plugin' === action ) {
+                       data.success = wp.updates.installImporterSuccess;
+                       data.error   = wp.updates.installImporterError;
+               }
+
+               return data;
+       };
+
+       /**
+        * Pulls available jobs from the queue and runs them.
+        *
+        * @since 4.2.0
+        * @since 4.6.0 Can handle multiple job types.
+        */
+       wp.updates.queueChecker = function() {
+               var job;
 
-               if ( typeof message.action === 'undefined' ) {
+               if ( wp.updates.ajaxLocked || ! wp.updates.queue.length ) {
                        return;
                }
 
-               switch (message.action){
-                       case 'decrementUpdateCount' :
-                               wp.updates.decrementCount( message.upgradeType );
+               job = wp.updates.queue.shift();
+
+               // Handle a queue job.
+               switch ( job.action ) {
+                       case 'install-plugin':
+                               wp.updates.installPlugin( job.data );
                                break;
-                       case 'updatePlugin' :
-                               tb_remove();
 
-                               wp.updates.updateQueue.push( message );
-                               wp.updates.queueChecker();
+                       case 'update-plugin':
+                               wp.updates.updatePlugin( job.data );
+                               break;
+
+                       case 'delete-plugin':
+                               wp.updates.deletePlugin( job.data );
+                               break;
+
+                       case 'install-theme':
+                               wp.updates.installTheme( job.data );
+                               break;
+
+                       case 'update-theme':
+                               wp.updates.updateTheme( job.data );
+                               break;
+
+                       case 'delete-theme':
+                               wp.updates.deleteTheme( job.data );
+                               break;
+
+                       default:
                                break;
                }
+       };
 
-       } );
+       /**
+        * Requests the users filesystem credentials if they aren't already known.
+        *
+        * @since 4.2.0
+        *
+        * @param {Event=} event Optional. Event interface.
+        */
+       wp.updates.requestFilesystemCredentials = function( event ) {
+               if ( false === wp.updates.filesystemCredentials.available ) {
+                       /*
+                        * After exiting the credentials request modal,
+                        * return the focus to the element triggering the request.
+                        */
+                       if ( event && ! wp.updates.$elToReturnFocusToFromCredentialsModal ) {
+                               wp.updates.$elToReturnFocusToFromCredentialsModal = $( event.target );
+                       }
+
+                       wp.updates.ajaxLocked = true;
+                       wp.updates.requestForCredentialsModalOpen();
+               }
+       };
+
+       /**
+        * Requests the users filesystem credentials if needed and there is no lock.
+        *
+        * @since 4.6.0
+        *
+        * @param {Event=} event Optional. Event interface.
+        */
+       wp.updates.maybeRequestFilesystemCredentials = function( event ) {
+               if ( wp.updates.shouldRequestFilesystemCredentials && ! wp.updates.ajaxLocked ) {
+                       wp.updates.requestFilesystemCredentials( event );
+               }
+       };
+
+       /**
+        * Keydown handler for the request for credentials modal.
+        *
+        * Closes the modal when the escape key is pressed and
+        * constrains keyboard navigation to inside the modal.
+        *
+        * @since 4.2.0
+        *
+        * @param {Event} event Event interface.
+        */
+       wp.updates.keydown = function( event ) {
+               if ( 27 === event.keyCode ) {
+                       wp.updates.requestForCredentialsModalCancel();
+               } else if ( 9 === event.keyCode ) {
+
+                       // #upgrade button must always be the last focus-able element in the dialog.
+                       if ( 'upgrade' === event.target.id && ! event.shiftKey ) {
+                               $( '#hostname' ).focus();
+
+                               event.preventDefault();
+                       } else if ( 'hostname' === event.target.id && event.shiftKey ) {
+                               $( '#upgrade' ).focus();
+
+                               event.preventDefault();
+                       }
+               }
+       };
+
+       /**
+        * Opens the request for credentials modal.
+        *
+        * @since 4.2.0
+        */
+       wp.updates.requestForCredentialsModalOpen = function() {
+               var $modal = $( '#request-filesystem-credentials-dialog' );
+
+               $( 'body' ).addClass( 'modal-open' );
+               $modal.show();
+               $modal.find( 'input:enabled:first' ).focus();
+               $modal.on( 'keydown', wp.updates.keydown );
+       };
+
+       /**
+        * Closes the request for credentials modal.
+        *
+        * @since 4.2.0
+        */
+       wp.updates.requestForCredentialsModalClose = function() {
+               $( '#request-filesystem-credentials-dialog' ).hide();
+               $( 'body' ).removeClass( 'modal-open' );
 
-       $( window ).on( 'beforeunload', wp.updates.beforeunload );
+               if ( wp.updates.$elToReturnFocusToFromCredentialsModal ) {
+                       wp.updates.$elToReturnFocusToFromCredentialsModal.focus();
+               }
+       };
 
-})( jQuery, window.wp, window.pagenow, window.ajaxurl );
+       /**
+        * Takes care of the steps that need to happen when the modal is canceled out.
+        *
+        * @since 4.2.0
+        * @since 4.6.0 Triggers an event for callbacks to listen to and add their actions.
+        */
+       wp.updates.requestForCredentialsModalCancel = function() {
+
+               // Not ajaxLocked and no queue means we already have cleared things up.
+               if ( ! wp.updates.ajaxLocked && ! wp.updates.queue.length ) {
+                       return;
+               }
+
+               _.each( wp.updates.queue, function( job ) {
+                       $document.trigger( 'credential-modal-cancel', job );
+               } );
+
+               // Remove the lock, and clear the queue.
+               wp.updates.ajaxLocked = false;
+               wp.updates.queue = [];
+
+               wp.updates.requestForCredentialsModalClose();
+       };
+
+       /**
+        * Displays an error message in the request for credentials form.
+        *
+        * @since 4.2.0
+        *
+        * @param {string} message Error message.
+        */
+       wp.updates.showErrorInCredentialsForm = function( message ) {
+               var $modal = $( '#request-filesystem-credentials-form' );
+
+               // Remove any existing error.
+               $modal.find( '.notice' ).remove();
+               $modal.find( '#request-filesystem-credentials-title' ).after( '<div class="notice notice-alt notice-error"><p>' + message + '</p></div>' );
+       };
+
+       /**
+        * Handles credential errors and runs events that need to happen in that case.
+        *
+        * @since 4.2.0
+        *
+        * @param {object} response Ajax response.
+        * @param {string} action   The type of request to perform.
+        */
+       wp.updates.credentialError = function( response, action ) {
+
+               // Restore callbacks.
+               response = wp.updates._addCallbacks( response, action );
+
+               wp.updates.queue.unshift( {
+                       action: action,
+
+                       /*
+                        * Not cool that we're depending on response for this data.
+                        * This would feel more whole in a view all tied together.
+                        */
+                       data: response
+               } );
+
+               wp.updates.filesystemCredentials.available = false;
+               wp.updates.showErrorInCredentialsForm( response.errorMessage );
+               wp.updates.requestFilesystemCredentials();
+       };
+
+       /**
+        * Handles credentials errors if it could not connect to the filesystem.
+        *
+        * @since 4.6.0
+        *
+        * @typedef {object} maybeHandleCredentialError
+        * @param {object} response              Response from the server.
+        * @param {string} response.errorCode    Error code for the error that occurred.
+        * @param {string} response.errorMessage The error that occurred.
+        * @param {string} action                The type of request to perform.
+        * @returns {boolean} Whether there is an error that needs to be handled or not.
+        */
+       wp.updates.maybeHandleCredentialError = function( response, action ) {
+               if ( wp.updates.shouldRequestFilesystemCredentials && response.errorCode && 'unable_to_connect_to_filesystem' === response.errorCode ) {
+                       wp.updates.credentialError( response, action );
+                       return true;
+               }
+
+               return false;
+       };
+
+       /**
+        * Validates an AJAX response to ensure it's a proper object.
+        *
+        * If the response deems to be invalid, an admin notice is being displayed.
+        *
+        * @param {(object|string)} response              Response from the server.
+        * @param {function=}       response.always       Optional. Callback for when the Deferred is resolved or rejected.
+        * @param {string=}         response.statusText   Optional. Status message corresponding to the status code.
+        * @param {string=}         response.responseText Optional. Request response as text.
+        * @param {string}          action                Type of action the response is referring to. Can be 'delete',
+        *                                                'update' or 'install'.
+        */
+       wp.updates.isValidResponse = function( response, action ) {
+               var error = wp.updates.l10n.unknownError,
+                   errorMessage;
+
+               // Make sure the response is a valid data object and not a Promise object.
+               if ( _.isObject( response ) && ! _.isFunction( response.always ) ) {
+                       return true;
+               }
+
+               if ( _.isString( response ) && '-1' === response ) {
+                       error = wp.updates.l10n.nonceError;
+               } else if ( _.isString( response ) ) {
+                       error = response;
+               } else if ( 'undefined' !== typeof response.readyState && 0 === response.readyState ) {
+                       error = wp.updates.l10n.connectionError;
+               } else if ( _.isString( response.responseText ) && '' !== response.responseText ) {
+                       error = response.responseText;
+               } else if ( _.isString( response.statusText ) ) {
+                       error = response.statusText;
+               }
+
+               switch ( action ) {
+                       case 'update':
+                               errorMessage = wp.updates.l10n.updateFailed;
+                               break;
+
+                       case 'install':
+                               errorMessage = wp.updates.l10n.installFailed;
+                               break;
+
+                       case 'delete':
+                               errorMessage = wp.updates.l10n.deleteFailed;
+                               break;
+               }
+
+               // Messages are escaped, remove HTML tags to make them more readable.
+               error = error.replace( /<[\/a-z][^<>]*>/gi, '' );
+               errorMessage = errorMessage.replace( '%s', error );
+
+               // Add admin notice.
+               wp.updates.addAdminNotice( {
+                       id:        'unknown_error',
+                       className: 'notice-error is-dismissible',
+                       message:   _.escape( errorMessage )
+               } );
+
+               // Remove the lock, and clear the queue.
+               wp.updates.ajaxLocked = false;
+               wp.updates.queue      = [];
+
+               // Change buttons of all running updates.
+               $( '.button.updating-message' )
+                       .removeClass( 'updating-message' )
+                       .removeAttr( 'aria-label' )
+                       .prop( 'disabled', true )
+                       .text( wp.updates.l10n.updateFailedShort );
+
+               $( '.updating-message:not(.button):not(.thickbox)' )
+                       .removeClass( 'updating-message notice-warning' )
+                       .addClass( 'notice-error' )
+                       .find( 'p' )
+                               .removeAttr( 'aria-label' )
+                               .text( errorMessage );
+
+               wp.a11y.speak( errorMessage, 'assertive' );
+
+               return false;
+       };
+
+       /**
+        * Potentially adds an AYS to a user attempting to leave the page.
+        *
+        * If an update is on-going and a user attempts to leave the page,
+        * opens an "Are you sure?" alert.
+        *
+        * @since 4.2.0
+        */
+       wp.updates.beforeunload = function() {
+               if ( wp.updates.ajaxLocked ) {
+                       return wp.updates.l10n.beforeunload;
+               }
+       };
+
+       $( function() {
+               var $pluginFilter        = $( '#plugin-filter' ),
+                       $bulkActionForm      = $( '#bulk-action-form' ),
+                       $filesystemModal     = $( '#request-filesystem-credentials-dialog' ),
+                       $pluginSearch        = $( '.plugins-php .wp-filter-search' ),
+                       $pluginInstallSearch = $( '.plugin-install-php .wp-filter-search' );
+
+               /*
+                * Whether a user needs to submit filesystem credentials.
+                *
+                * This is based on whether the form was output on the page server-side.
+                *
+                * @see {wp_print_request_filesystem_credentials_modal() in PHP}
+                */
+               wp.updates.shouldRequestFilesystemCredentials = $filesystemModal.length > 0;
+
+               /**
+                * File system credentials form submit noop-er / handler.
+                *
+                * @since 4.2.0
+                */
+               $filesystemModal.on( 'submit', 'form', function( event ) {
+                       event.preventDefault();
+
+                       // Persist the credentials input by the user for the duration of the page load.
+                       wp.updates.filesystemCredentials.ftp.hostname       = $( '#hostname' ).val();
+                       wp.updates.filesystemCredentials.ftp.username       = $( '#username' ).val();
+                       wp.updates.filesystemCredentials.ftp.password       = $( '#password' ).val();
+                       wp.updates.filesystemCredentials.ftp.connectionType = $( 'input[name="connection_type"]:checked' ).val();
+                       wp.updates.filesystemCredentials.ssh.publicKey      = $( '#public_key' ).val();
+                       wp.updates.filesystemCredentials.ssh.privateKey     = $( '#private_key' ).val();
+                       wp.updates.filesystemCredentials.available          = true;
+
+                       // Unlock and invoke the queue.
+                       wp.updates.ajaxLocked = false;
+                       wp.updates.queueChecker();
+
+                       wp.updates.requestForCredentialsModalClose();
+               } );
+
+               /**
+                * Closes the request credentials modal when clicking the 'Cancel' button or outside of the modal.
+                *
+                * @since 4.2.0
+                */
+               $filesystemModal.on( 'click', '[data-js-action="close"], .notification-dialog-background', wp.updates.requestForCredentialsModalCancel );
+
+               /**
+                * Hide SSH fields when not selected.
+                *
+                * @since 4.2.0
+                */
+               $filesystemModal.on( 'change', 'input[name="connection_type"]', function() {
+                       $( '#ssh-keys' ).toggleClass( 'hidden', ( 'ssh' !== $( this ).val() ) );
+               } ).change();
+
+               /**
+                * Handles events after the credential modal was closed.
+                *
+                * @since 4.6.0
+                *
+                * @param {Event}  event Event interface.
+                * @param {string} job   The install/update.delete request.
+                */
+               $document.on( 'credential-modal-cancel', function( event, job ) {
+                       var $updatingMessage = $( '.updating-message' ),
+                               $message, originalText;
+
+                       if ( 'import' === pagenow ) {
+                               $updatingMessage.removeClass( 'updating-message' );
+                       } else if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
+                               if ( 'update-plugin' === job.action ) {
+                                       $message = $( 'tr[data-plugin="' + job.data.plugin + '"]' ).find( '.update-message' );
+                               } else if ( 'delete-plugin' === job.action ) {
+                                       $message = $( '[data-plugin="' + job.data.plugin + '"]' ).find( '.row-actions a.delete' );
+                               }
+                       } else if ( 'themes' === pagenow || 'themes-network' === pagenow ) {
+                               if ( 'update-theme' === job.action ) {
+                                       $message = $( '[data-slug="' + job.data.slug + '"]' ).find( '.update-message' );
+                               } else if ( 'delete-theme' === job.action && 'themes-network' === pagenow ) {
+                                       $message = $( '[data-slug="' + job.data.slug + '"]' ).find( '.row-actions a.delete' );
+                               } else if ( 'delete-theme' === job.action && 'themes' === pagenow ) {
+                                       $message = $( '.theme-actions .delete-theme' );
+                               }
+                       } else {
+                               $message = $updatingMessage;
+                       }
+
+                       if ( $message && $message.hasClass( 'updating-message' ) ) {
+                               originalText = $message.data( 'originaltext' );
+
+                               if ( 'undefined' === typeof originalText ) {
+                                       originalText = $( '<p>' ).html( $message.find( 'p' ).data( 'originaltext' ) );
+                               }
+
+                               $message
+                                       .removeClass( 'updating-message' )
+                                       .html( originalText );
+
+                               if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
+                                       if ( 'update-plugin' === job.action ) {
+                                               $message.attr( 'aria-label', wp.updates.l10n.updateNowLabel.replace( '%s', $message.data( 'name' ) ) );
+                                       } else if ( 'install-plugin' === job.action ) {
+                                               $message.attr( 'aria-label', wp.updates.l10n.installNowLabel.replace( '%s', $message.data( 'name' ) ) );
+                                       }
+                               }
+                       }
+
+                       wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' );
+               } );
+
+               /**
+                * Click handler for plugin updates in List Table view.
+                *
+                * @since 4.2.0
+                *
+                * @param {Event} event Event interface.
+                */
+               $bulkActionForm.on( 'click', '[data-plugin] .update-link', function( event ) {
+                       var $message   = $( event.target ),
+                               $pluginRow = $message.parents( 'tr' );
+
+                       event.preventDefault();
+
+                       if ( $message.hasClass( 'updating-message' ) || $message.hasClass( 'button-disabled' ) ) {
+                               return;
+                       }
+
+                       wp.updates.maybeRequestFilesystemCredentials( event );
+
+                       // Return the user to the input box of the plugin's table row after closing the modal.
+                       wp.updates.$elToReturnFocusToFromCredentialsModal = $pluginRow.find( '.check-column input' );
+                       wp.updates.updatePlugin( {
+                               plugin: $pluginRow.data( 'plugin' ),
+                               slug:   $pluginRow.data( 'slug' )
+                       } );
+               } );
+
+               /**
+                * Click handler for plugin updates in plugin install view.
+                *
+                * @since 4.2.0
+                *
+                * @param {Event} event Event interface.
+                */
+               $pluginFilter.on( 'click', '.update-now', function( event ) {
+                       var $button = $( event.target );
+                       event.preventDefault();
+
+                       if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
+                               return;
+                       }
+
+                       wp.updates.maybeRequestFilesystemCredentials( event );
+
+                       wp.updates.updatePlugin( {
+                               plugin: $button.data( 'plugin' ),
+                               slug:   $button.data( 'slug' )
+                       } );
+               } );
+
+               /**
+                * Click handler for plugin installs in plugin install view.
+                *
+                * @since 4.6.0
+                *
+                * @param {Event} event Event interface.
+                */
+               $pluginFilter.on( 'click', '.install-now', function( event ) {
+                       var $button = $( event.target );
+                       event.preventDefault();
+
+                       if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
+                               return;
+                       }
+
+                       if ( wp.updates.shouldRequestFilesystemCredentials && ! wp.updates.ajaxLocked ) {
+                               wp.updates.requestFilesystemCredentials( event );
+
+                               $document.on( 'credential-modal-cancel', function() {
+                                       var $message = $( '.install-now.updating-message' );
+
+                                       $message
+                                               .removeClass( 'updating-message' )
+                                               .text( wp.updates.l10n.installNow );
+
+                                       wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' );
+                               } );
+                       }
+
+                       wp.updates.installPlugin( {
+                               slug: $button.data( 'slug' )
+                       } );
+               } );
+
+               /**
+                * Click handler for importer plugins installs in the Import screen.
+                *
+                * @since 4.6.0
+                *
+                * @param {Event} event Event interface.
+                */
+               $document.on( 'click', '.importer-item .install-now', function( event ) {
+                       var $button = $( event.target ),
+                               pluginName = $( this ).data( 'name' );
+
+                       event.preventDefault();
+
+                       if ( $button.hasClass( 'updating-message' ) ) {
+                               return;
+                       }
+
+                       if ( wp.updates.shouldRequestFilesystemCredentials && ! wp.updates.ajaxLocked ) {
+                               wp.updates.requestFilesystemCredentials( event );
+
+                               $document.on( 'credential-modal-cancel', function() {
+
+                                       $button
+                                               .removeClass( 'updating-message' )
+                                               .text( wp.updates.l10n.installNow )
+                                               .attr( 'aria-label', wp.updates.l10n.installNowLabel.replace( '%s', pluginName ) );
+
+                                       wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' );
+                               } );
+                       }
+
+                       wp.updates.installPlugin( {
+                               slug:    $button.data( 'slug' ),
+                               success: wp.updates.installImporterSuccess,
+                               error:   wp.updates.installImporterError
+                       } );
+               } );
+
+               /**
+                * Click handler for plugin deletions.
+                *
+                * @since 4.6.0
+                *
+                * @param {Event} event Event interface.
+                */
+               $bulkActionForm.on( 'click', '[data-plugin] a.delete', function( event ) {
+                       var $pluginRow = $( event.target ).parents( 'tr' );
+
+                       event.preventDefault();
+
+                       if ( ! window.confirm( wp.updates.l10n.aysDeleteUninstall.replace( '%s', $pluginRow.find( '.plugin-title strong' ).text() ) ) ) {
+                               return;
+                       }
+
+                       wp.updates.maybeRequestFilesystemCredentials( event );
+
+                       wp.updates.deletePlugin( {
+                               plugin: $pluginRow.data( 'plugin' ),
+                               slug:   $pluginRow.data( 'slug' )
+                       } );
+
+               } );
+
+               /**
+                * Click handler for theme updates.
+                *
+                * @since 4.6.0
+                *
+                * @param {Event} event Event interface.
+                */
+               $document.on( 'click', '.themes-php.network-admin .update-link', function( event ) {
+                       var $message  = $( event.target ),
+                               $themeRow = $message.parents( 'tr' );
+
+                       event.preventDefault();
+
+                       if ( $message.hasClass( 'updating-message' ) || $message.hasClass( 'button-disabled' ) ) {
+                               return;
+                       }
+
+                       wp.updates.maybeRequestFilesystemCredentials( event );
+
+                       // Return the user to the input box of the theme's table row after closing the modal.
+                       wp.updates.$elToReturnFocusToFromCredentialsModal = $themeRow.find( '.check-column input' );
+                       wp.updates.updateTheme( {
+                               slug: $themeRow.data( 'slug' )
+                       } );
+               } );
+
+               /**
+                * Click handler for theme deletions.
+                *
+                * @since 4.6.0
+                *
+                * @param {Event} event Event interface.
+                */
+               $document.on( 'click', '.themes-php.network-admin a.delete', function( event ) {
+                       var $themeRow = $( event.target ).parents( 'tr' );
+
+                       event.preventDefault();
+
+                       if ( ! window.confirm( wp.updates.l10n.aysDelete.replace( '%s', $themeRow.find( '.theme-title strong' ).text() ) ) ) {
+                               return;
+                       }
+
+                       wp.updates.maybeRequestFilesystemCredentials( event );
+
+                       wp.updates.deleteTheme( {
+                               slug: $themeRow.data( 'slug' )
+                       } );
+               } );
+
+               /**
+                * Bulk action handler for plugins and themes.
+                *
+                * Handles both deletions and updates.
+                *
+                * @since 4.6.0
+                *
+                * @param {Event} event Event interface.
+                */
+               $bulkActionForm.on( 'click', '[type="submit"]', function( event ) {
+                       var bulkAction    = $( event.target ).siblings( 'select' ).val(),
+                               itemsSelected = $bulkActionForm.find( 'input[name="checked[]"]:checked' ),
+                               success       = 0,
+                               error         = 0,
+                               errorMessages = [],
+                               type, action;
+
+                       // Determine which type of item we're dealing with.
+                       switch ( pagenow ) {
+                               case 'plugins':
+                               case 'plugins-network':
+                                       type = 'plugin';
+                                       break;
+
+                               case 'themes-network':
+                                       type = 'theme';
+                                       break;
+
+                               default:
+                                       return;
+                       }
+
+                       // Bail if there were no items selected.
+                       if ( ! itemsSelected.length ) {
+                               event.preventDefault();
+                               $( 'html, body' ).animate( { scrollTop: 0 } );
+
+                               return wp.updates.addAdminNotice( {
+                                       id:        'no-items-selected',
+                                       className: 'notice-error is-dismissible',
+                                       message:   wp.updates.l10n.noItemsSelected
+                               } );
+                       }
+
+                       // Determine the type of request we're dealing with.
+                       switch ( bulkAction ) {
+                               case 'update-selected':
+                                       action = bulkAction.replace( 'selected', type );
+                                       break;
+
+                               case 'delete-selected':
+                                       if ( ! window.confirm( 'plugin' === type ? wp.updates.l10n.aysBulkDelete : wp.updates.l10n.aysBulkDeleteThemes ) ) {
+                                               event.preventDefault();
+                                               return;
+                                       }
+
+                                       action = bulkAction.replace( 'selected', type );
+                                       break;
+
+                               default:
+                                       return;
+                       }
+
+                       wp.updates.maybeRequestFilesystemCredentials( event );
+
+                       event.preventDefault();
+
+                       // Un-check the bulk checkboxes.
+                       $bulkActionForm.find( '.manage-column [type="checkbox"]' ).prop( 'checked', false );
+
+                       $document.trigger( 'wp-' + type + '-bulk-' + bulkAction, itemsSelected );
+
+                       // Find all the checkboxes which have been checked.
+                       itemsSelected.each( function( index, element ) {
+                               var $checkbox = $( element ),
+                                       $itemRow = $checkbox.parents( 'tr' );
+
+                               // Only add update-able items to the update queue.
+                               if ( 'update-selected' === bulkAction && ( ! $itemRow.hasClass( 'update' ) || $itemRow.find( 'notice-error' ).length ) ) {
+
+                                       // Un-check the box.
+                                       $checkbox.prop( 'checked', false );
+                                       return;
+                               }
+
+                               // Add it to the queue.
+                               wp.updates.queue.push( {
+                                       action: action,
+                                       data:   {
+                                               plugin: $itemRow.data( 'plugin' ),
+                                               slug:   $itemRow.data( 'slug' )
+                                       }
+                               } );
+                       } );
+
+                       // Display bulk notification for updates of any kind.
+                       $document.on( 'wp-plugin-update-success wp-plugin-update-error wp-theme-update-success wp-theme-update-error', function( event, response ) {
+                               var $itemRow = $( '[data-slug="' + response.slug + '"]' ),
+                                       $bulkActionNotice, itemName;
+
+                               if ( 'wp-' + response.update + '-update-success' === event.type ) {
+                                       success++;
+                               } else {
+                                       itemName = response.pluginName ? response.pluginName : $itemRow.find( '.column-primary strong' ).text();
+
+                                       error++;
+                                       errorMessages.push( itemName + ': ' + response.errorMessage );
+                               }
+
+                               $itemRow.find( 'input[name="checked[]"]:checked' ).prop( 'checked', false );
+
+                               wp.updates.adminNotice = wp.template( 'wp-bulk-updates-admin-notice' );
+
+                               wp.updates.addAdminNotice( {
+                                       id:            'bulk-action-notice',
+                                       className:     'bulk-action-notice',
+                                       successes:     success,
+                                       errors:        error,
+                                       errorMessages: errorMessages,
+                                       type:          response.update
+                               } );
+
+                               $bulkActionNotice = $( '#bulk-action-notice' ).on( 'click', 'button', function() {
+                                       // $( this ) is the clicked button, no need to get it again.
+                                       $( this )
+                                               .toggleClass( 'bulk-action-errors-collapsed' )
+                                               .attr( 'aria-expanded', ! $( this ).hasClass( 'bulk-action-errors-collapsed' ) );
+                                       // Show the errors list.
+                                       $bulkActionNotice.find( '.bulk-action-errors' ).toggleClass( 'hidden' );
+                               } );
+
+                               if ( error > 0 && ! wp.updates.queue.length ) {
+                                       $( 'html, body' ).animate( { scrollTop: 0 } );
+                               }
+                       } );
+
+                       // Reset admin notice template after #bulk-action-notice was added.
+                       $document.on( 'wp-updates-notice-added', function() {
+                               wp.updates.adminNotice = wp.template( 'wp-updates-admin-notice' );
+                       } );
+
+                       // Check the queue, now that the event handlers have been added.
+                       wp.updates.queueChecker();
+               } );
+
+               if ( $pluginInstallSearch.length ) {
+                       $pluginInstallSearch.attr( 'aria-describedby', 'live-search-desc' );
+               }
+
+               /**
+                * Handles changes to the plugin search box on the new-plugin page,
+                * searching the repository dynamically.
+                *
+                * @since 4.6.0
+                */
+               $pluginInstallSearch.on( 'keyup input', _.debounce( function( event, eventtype ) {
+                       var $searchTab = $( '.plugin-install-search' ), data, searchLocation;
+
+                       data = {
+                               _ajax_nonce: wp.updates.ajaxNonce,
+                               s:           event.target.value,
+                               tab:         'search',
+                               type:        $( '#typeselector' ).val(),
+                               pagenow:     pagenow
+                       };
+                       searchLocation = location.href.split( '?' )[ 0 ] + '?' + $.param( _.omit( data, [ '_ajax_nonce', 'pagenow' ] ) );
+
+                       // Clear on escape.
+                       if ( 'keyup' === event.type && 27 === event.which ) {
+                               event.target.value = '';
+                       }
+
+                       if ( wp.updates.searchTerm === data.s && 'typechange' !== eventtype ) {
+                               return;
+                       } else {
+                               $pluginFilter.empty();
+                               wp.updates.searchTerm = data.s;
+                       }
+
+                       if ( window.history && window.history.replaceState ) {
+                               window.history.replaceState( null, '', searchLocation );
+                       }
+
+                       if ( ! $searchTab.length ) {
+                               $searchTab = $( '<li class="plugin-install-search" />' )
+                                       .append( $( '<a />', {
+                                               'class': 'current',
+                                               'href': searchLocation,
+                                               'text': wp.updates.l10n.searchResultsLabel
+                                       } ) );
+
+                               $( '.wp-filter .filter-links .current' )
+                                       .removeClass( 'current' )
+                                       .parents( '.filter-links' )
+                                       .prepend( $searchTab );
+
+                               $pluginFilter.prev( 'p' ).remove();
+                               $( '.plugins-popular-tags-wrapper' ).remove();
+                       }
+
+                       if ( 'undefined' !== typeof wp.updates.searchRequest ) {
+                               wp.updates.searchRequest.abort();
+                       }
+                       $( 'body' ).addClass( 'loading-content' );
+
+                       wp.updates.searchRequest = wp.ajax.post( 'search-install-plugins', data ).done( function( response ) {
+                               $( 'body' ).removeClass( 'loading-content' );
+                               $pluginFilter.append( response.items );
+                               delete wp.updates.searchRequest;
+
+                               if ( 0 === response.count ) {
+                                       wp.a11y.speak( wp.updates.l10n.noPluginsFound );
+                               } else {
+                                       wp.a11y.speak( wp.updates.l10n.pluginsFound.replace( '%d', response.count ) );
+                               }
+                       } );
+               }, 500 ) );
+
+               if ( $pluginSearch.length ) {
+                       $pluginSearch.attr( 'aria-describedby', 'live-search-desc' );
+               }
+
+               /**
+                * Handles changes to the plugin search box on the Installed Plugins screen,
+                * searching the plugin list dynamically.
+                *
+                * @since 4.6.0
+                */
+               $pluginSearch.on( 'keyup input', _.debounce( function( event ) {
+                       var data = {
+                               _ajax_nonce: wp.updates.ajaxNonce,
+                               s:           event.target.value,
+                               pagenow:     pagenow
+                       };
+
+                       // Clear on escape.
+                       if ( 'keyup' === event.type && 27 === event.which ) {
+                               event.target.value = '';
+                       }
+
+                       if ( wp.updates.searchTerm === data.s ) {
+                               return;
+                       } else {
+                               wp.updates.searchTerm = data.s;
+                       }
+
+                       if ( window.history && window.history.replaceState ) {
+                               window.history.replaceState( null, '', location.href.split( '?' )[ 0 ] + '?s=' + data.s );
+                       }
+
+                       if ( 'undefined' !== typeof wp.updates.searchRequest ) {
+                               wp.updates.searchRequest.abort();
+                       }
+
+                       $bulkActionForm.empty();
+                       $( 'body' ).addClass( 'loading-content' );
+
+                       wp.updates.searchRequest = wp.ajax.post( 'search-plugins', data ).done( function( response ) {
+
+                               // Can we just ditch this whole subtitle business?
+                               var $subTitle    = $( '<span />' ).addClass( 'subtitle' ).html( wp.updates.l10n.searchResults.replace( '%s', _.escape( data.s ) ) ),
+                                       $oldSubTitle = $( '.wrap .subtitle' );
+
+                               if ( ! data.s.length ) {
+                                       $oldSubTitle.remove();
+                               } else if ( $oldSubTitle.length ) {
+                                       $oldSubTitle.replaceWith( $subTitle );
+                               } else {
+                                       $( '.wrap h1' ).append( $subTitle );
+                               }
+
+                               $( 'body' ).removeClass( 'loading-content' );
+                               $bulkActionForm.append( response.items );
+                               delete wp.updates.searchRequest;
+
+                               if ( 0 === response.count ) {
+                                       wp.a11y.speak( wp.updates.l10n.noPluginsFound );
+                               } else {
+                                       wp.a11y.speak( wp.updates.l10n.pluginsFound.replace( '%d', response.count ) );
+                               }
+                       } );
+               }, 500 ) );
+
+               /**
+                * Trigger a search event when the search form gets submitted.
+                *
+                * @since 4.6.0
+                */
+               $document.on( 'submit', '.search-plugins', function( event ) {
+                       event.preventDefault();
+
+                       $( 'input.wp-filter-search' ).trigger( 'input' );
+               } );
+
+               /**
+                * Trigger a search event when the search type gets changed.
+                *
+                * @since 4.6.0
+                */
+               $( '#typeselector' ).on( 'change', function() {
+                       var $search = $( 'input[name="s"]' );
+
+                       if ( $search.val().length ) {
+                               $search.trigger( 'input', 'typechange' );
+                       }
+               } );
+
+               /**
+                * Click handler for updating a plugin from the details modal on `plugin-install.php`.
+                *
+                * @since 4.2.0
+                *
+                * @param {Event} event Event interface.
+                */
+               $( '#plugin_update_from_iframe' ).on( 'click', function( event ) {
+                       var target = window.parent === window ? null : window.parent,
+                               update;
+
+                       $.support.postMessage = !! window.postMessage;
+
+                       if ( false === $.support.postMessage || null === target || -1 !== window.parent.location.pathname.indexOf( 'update-core.php' ) ) {
+                               return;
+                       }
+
+                       event.preventDefault();
+
+                       update = {
+                               action: 'update-plugin',
+                               data:   {
+                                       plugin: $( this ).data( 'plugin' ),
+                                       slug:   $( this ).data( 'slug' )
+                               }
+                       };
+
+                       target.postMessage( JSON.stringify( update ), window.location.origin );
+               } );
+
+               /**
+                * Click handler for installing a plugin from the details modal on `plugin-install.php`.
+                *
+                * @since 4.6.0
+                *
+                * @param {Event} event Event interface.
+                */
+               $( '#plugin_install_from_iframe' ).on( 'click', function( event ) {
+                       var target = window.parent === window ? null : window.parent,
+                               install;
+
+                       $.support.postMessage = !! window.postMessage;
+
+                       if ( false === $.support.postMessage || null === target || -1 !== window.parent.location.pathname.indexOf( 'index.php' ) ) {
+                               return;
+                       }
+
+                       event.preventDefault();
+
+                       install = {
+                               action: 'install-plugin',
+                               data:   {
+                                       slug: $( this ).data( 'slug' )
+                               }
+                       };
+
+                       target.postMessage( JSON.stringify( install ), window.location.origin );
+               } );
+
+               /**
+                * Handles postMessage events.
+                *
+                * @since 4.2.0
+                * @since 4.6.0 Switched `update-plugin` action to use the queue.
+                *
+                * @param {Event} event Event interface.
+                */
+               $( window ).on( 'message', function( event ) {
+                       var originalEvent  = event.originalEvent,
+                               expectedOrigin = document.location.protocol + '//' + document.location.hostname,
+                               message;
+
+                       if ( originalEvent.origin !== expectedOrigin ) {
+                               return;
+                       }
+
+                       try {
+                               message = $.parseJSON( originalEvent.data );
+                       } catch ( e ) {
+                               return;
+                       }
+
+                       if ( 'undefined' === typeof message.action ) {
+                               return;
+                       }
+
+                       switch ( message.action ) {
+
+                               // Called from `wp-admin/includes/class-wp-upgrader-skins.php`.
+                               case 'decrementUpdateCount':
+                                       /** @property {string} message.upgradeType */
+                                       wp.updates.decrementCount( message.upgradeType );
+                                       break;
+
+                               case 'install-plugin':
+                               case 'update-plugin':
+                                       /* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
+                                       window.tb_remove();
+                                       /* jscs:enable */
+
+                                       message.data = wp.updates._addCallbacks( message.data, message.action );
+
+                                       wp.updates.queue.push( message );
+                                       wp.updates.queueChecker();
+                                       break;
+                       }
+               } );
+
+               /**
+                * Adds a callback to display a warning before leaving the page.
+                *
+                * @since 4.2.0
+                */
+               $( window ).on( 'beforeunload', wp.updates.beforeunload );
+       } );
+})( jQuery, window.wp, _.extend( window._wpUpdatesSettings, window._wpUpdatesItemCounts || {} ) );
index 1f23961f46a99fb7b4d7cba5b042e31c79799116..3dd4de5b8925637cf691c7ff72ef97c9875c908e 100644 (file)
@@ -1 +1,2 @@
-window.wp=window.wp||{},function(a,b,c){b.updates={},b.updates.ajaxNonce=window._wpUpdatesSettings.ajax_nonce,b.updates.l10n=window._wpUpdatesSettings.l10n,b.updates.shouldRequestFilesystemCredentials=null,b.updates.filesystemCredentials={ftp:{host:null,username:null,password:null,connectionType:null},ssh:{publicKey:null,privateKey:null}},b.updates.updateLock=!1,b.updates.updateDoneSuccessfully=!1,b.updates.updateQueue=[],b.updates.$elToReturnFocusToFromCredentialsModal=null,b.updates.decrementCount=function(b){var c,d,e=a("#wp-admin-bar-updates .ab-label"),f=a('a[href="update-core.php"] .update-plugins'),g=a("#menu-plugins");if(c=e.text(),c=parseInt(c,10)-1,!(0>c||isNaN(c))&&(a("#wp-admin-bar-updates .ab-item").removeAttr("title"),e.text(c),f.each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+c)}),f.removeAttr("title"),f.find(".update-count").text(c),"plugin"===b)){if(d=g.find(".plugin-count").eq(0).text(),d=parseInt(d,10)-1,0>d||isNaN(d))return;g.find(".plugin-count").text(d),g.find(".update-plugins").each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+d)}),d>0?a(".subsubsub .upgrade .count").text("("+d+")"):a(".subsubsub .upgrade").remove()}},b.updates.updatePlugin=function(d,e){var f,g,h=a(".plugin-card-"+e);if("plugins"===c||"plugins-network"===c?f=a('[data-plugin="'+d+'"]').next().find(".update-message"):"plugin-install"===c&&(f=h.find(".update-now"),g=f.data("name"),f.attr("aria-label",b.updates.l10n.updatingLabel.replace("%s",g)),h.removeClass("plugin-card-update-failed").find(".notice.notice-error").remove()),f.addClass("updating-message"),f.html()!==b.updates.l10n.updating&&f.data("originaltext",f.html()),f.text(b.updates.l10n.updating),b.a11y.speak(b.updates.l10n.updatingMsg),b.updates.updateLock)return void b.updates.updateQueue.push({type:"update-plugin",data:{plugin:d,slug:e}});b.updates.updateLock=!0;var i={_ajax_nonce:b.updates.ajaxNonce,plugin:d,slug:e,username:b.updates.filesystemCredentials.ftp.username,password:b.updates.filesystemCredentials.ftp.password,hostname:b.updates.filesystemCredentials.ftp.hostname,connection_type:b.updates.filesystemCredentials.ftp.connectionType,public_key:b.updates.filesystemCredentials.ssh.publicKey,private_key:b.updates.filesystemCredentials.ssh.privateKey};b.ajax.post("update-plugin",i).done(b.updates.updateSuccess).fail(b.updates.updateError)},b.updates.updateSuccess=function(d){var e,f,g,h;"plugins"===c||"plugins-network"===c?(g=a('[data-plugin="'+d.plugin+'"]').first(),e=g.next().find(".update-message"),g.addClass("updated").removeClass("update"),h=g.find(".plugin-version-author-uri").html().replace(d.oldVersion,d.newVersion),g.find(".plugin-version-author-uri").html(h),g.next().addClass("updated")):"plugin-install"===c&&(e=a(".plugin-card-"+d.slug).find(".update-now"),e.addClass("button-disabled"),f=e.data("name"),e.attr("aria-label",b.updates.l10n.updatedLabel.replace("%s",f))),e.removeClass("updating-message").addClass("updated-message"),e.text(b.updates.l10n.updated),b.a11y.speak(b.updates.l10n.updatedMsg),b.updates.decrementCount("plugin"),b.updates.updateDoneSuccessfully=!0,b.updates.updateLock=!1,a(document).trigger("wp-plugin-update-success",d),b.updates.queueChecker()},b.updates.updateError=function(d){var e,f,g,h,i=a(".plugin-card-"+d.slug);return b.updates.updateDoneSuccessfully=!1,d.errorCode&&"unable_to_connect_to_filesystem"==d.errorCode&&b.updates.shouldRequestFilesystemCredentials?void b.updates.credentialError(d,"update-plugin"):(h=b.updates.l10n.updateFailed.replace("%s",d.error),"plugins"===c||"plugins-network"===c?(e=a('[data-plugin="'+d.plugin+'"]').next().find(".update-message"),e.html(h).removeClass("updating-message")):"plugin-install"===c&&(f=i.find(".update-now"),g=f.data("name"),i.addClass("plugin-card-update-failed").append('<div class="notice notice-error is-dismissible"><p>'+h+"</p></div>"),f.attr("aria-label",b.updates.l10n.updateFailedLabel.replace("%s",g)).html(b.updates.l10n.updateFailedShort).removeClass("updating-message"),i.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){i.removeClass("plugin-card-update-failed").find(".column-name a").focus()},200)})),b.a11y.speak(h,"assertive"),b.updates.updateLock=!1,a(document).trigger("wp-plugin-update-error",d),void b.updates.queueChecker())},b.updates.showErrorInCredentialsForm=function(b){var c=a(".notification-dialog");c.find(".error").remove(),c.find("h3").after('<div class="error">'+b+"</div>")},b.updates.credentialError=function(a,c){b.updates.updateQueue.push({type:c,data:{plugin:a.plugin,slug:a.slug}}),b.updates.showErrorInCredentialsForm(a.error),b.updates.requestFilesystemCredentials()},b.updates.queueChecker=function(){if(!(b.updates.updateLock||b.updates.updateQueue.length<=0)){var a=b.updates.updateQueue.shift();b.updates.updatePlugin(a.data.plugin,a.data.slug)}},b.updates.requestFilesystemCredentials=function(d){b.updates.updateDoneSuccessfully===!1&&("plugin-install"===c&&d&&(b.updates.$elToReturnFocusToFromCredentialsModal=a(d.target)),b.updates.updateLock=!0,b.updates.requestForCredentialsModalOpen())},b.updates.keydown=function(c){27===c.keyCode?b.updates.requestForCredentialsModalCancel():9===c.keyCode&&("upgrade"!==c.target.id||c.shiftKey?"hostname"===c.target.id&&c.shiftKey&&(a("#upgrade").focus(),c.preventDefault()):(a("#hostname").focus(),c.preventDefault()))},b.updates.requestForCredentialsModalOpen=function(){var c=a("#request-filesystem-credentials-dialog");a("body").addClass("modal-open"),c.show(),c.find("input:enabled:first").focus(),c.keydown(b.updates.keydown)},b.updates.requestForCredentialsModalClose=function(){a("#request-filesystem-credentials-dialog").hide(),a("body").removeClass("modal-open"),b.updates.$elToReturnFocusToFromCredentialsModal.focus()},b.updates.requestForCredentialsModalCancel=function(){var d,e;(b.updates.updateLock!==!1||0!==b.updates.updateQueue.length)&&(d=b.updates.updateQueue[0].data,b.updates.updateLock=!1,b.updates.updateQueue=[],b.updates.requestForCredentialsModalClose(),"plugins"===c||"plugins-network"===c?e=a('[data-plugin="'+d.plugin+'"]').next().find(".update-message"):"plugin-install"===c&&(e=a(".plugin-card-"+d.slug).find(".update-now")),e.removeClass("updating-message"),e.html(e.data("originaltext")),b.a11y.speak(b.updates.l10n.updateCancel))},b.updates.beforeunload=function(){return b.updates.updateLock?b.updates.l10n.beforeunload:void 0},a(document).ready(function(){b.updates.shouldRequestFilesystemCredentials=a("#request-filesystem-credentials-dialog").length<=0?!1:!0,a("#request-filesystem-credentials-dialog form").on("submit",function(){return b.updates.filesystemCredentials.ftp.hostname=a("#hostname").val(),b.updates.filesystemCredentials.ftp.username=a("#username").val(),b.updates.filesystemCredentials.ftp.password=a("#password").val(),b.updates.filesystemCredentials.ftp.connectionType=a('input[name="connection_type"]:checked').val(),b.updates.filesystemCredentials.ssh.publicKey=a("#public_key").val(),b.updates.filesystemCredentials.ssh.privateKey=a("#private_key").val(),b.updates.requestForCredentialsModalClose(),b.updates.updateLock=!1,b.updates.queueChecker(),!1}),a('#request-filesystem-credentials-dialog [data-js-action="close"], .notification-dialog-background').on("click",function(){b.updates.requestForCredentialsModalCancel()}),a('#request-filesystem-credentials-dialog input[name="connection_type"]').on("change",function(){a(this).parents("form").find("#private_key, #public_key").parents("label").toggle("ssh"==a(this).val())}).change(),a(".plugin-update-tr").on("click",".update-link",function(c){c.preventDefault(),b.updates.shouldRequestFilesystemCredentials&&!b.updates.updateLock&&b.updates.requestFilesystemCredentials(c);var d=a(c.target).parents(".plugin-update-tr");b.updates.$elToReturnFocusToFromCredentialsModal=d.prev().find(".check-column input"),b.updates.updatePlugin(d.data("plugin"),d.data("slug"))}),a(".plugin-card").on("click",".update-now",function(c){c.preventDefault();var d=a(c.target);d.hasClass("updating-message")||d.hasClass("button-disabled")||(b.updates.shouldRequestFilesystemCredentials&&!b.updates.updateLock&&b.updates.requestFilesystemCredentials(c),b.updates.updatePlugin(d.data("plugin"),d.data("slug")))}),a("#plugin_update_from_iframe").on("click",function(b){var c,d;c=window.parent==window?null:window.parent,a.support.postMessage=!!window.postMessage,a.support.postMessage!==!1&&null!==c&&-1===window.parent.location.pathname.indexOf("update-core.php")&&(b.preventDefault(),d={action:"updatePlugin",type:"update-plugin",data:{plugin:a(this).data("plugin"),slug:a(this).data("slug")}},c.postMessage(JSON.stringify(d),window.location.origin))})}),a(window).on("message",function(c){var d,e=c.originalEvent,f=document.location,g=f.protocol+"//"+f.hostname;if(e.origin===g&&(d=a.parseJSON(e.data),"undefined"!=typeof d.action))switch(d.action){case"decrementUpdateCount":b.updates.decrementCount(d.upgradeType);break;case"updatePlugin":tb_remove(),b.updates.updateQueue.push(d),b.updates.queueChecker()}}),a(window).on("beforeunload",b.updates.beforeunload)}(jQuery,window.wp,window.pagenow,window.ajaxurl);
\ No newline at end of file
+!function(a,b,c){var d=a(document);b=b||{},b.updates={},b.updates.ajaxNonce=c.ajax_nonce,b.updates.l10n=c.l10n,b.updates.searchTerm="",b.updates.shouldRequestFilesystemCredentials=!1,b.updates.filesystemCredentials={ftp:{host:"",username:"",password:"",connectionType:""},ssh:{publicKey:"",privateKey:""},available:!1},b.updates.ajaxLocked=!1,b.updates.adminNotice=b.template("wp-updates-admin-notice"),b.updates.queue=[],b.updates.$elToReturnFocusToFromCredentialsModal=void 0,b.updates.addAdminNotice=function(c){var e,f=a(c.selector);delete c.selector,e=b.updates.adminNotice(c),f.length||(f=a("#"+c.id)),f.length?f.replaceWith(e):a(".wrap").find("> h1").after(e),d.trigger("wp-updates-notice-added")},b.updates.ajax=function(c,d){var e={};return b.updates.ajaxLocked?(b.updates.queue.push({action:c,data:d}),a.Deferred()):(b.updates.ajaxLocked=!0,d.success&&(e.success=d.success,delete d.success),d.error&&(e.error=d.error,delete d.error),e.data=_.extend(d,{action:c,_ajax_nonce:b.updates.ajaxNonce,username:b.updates.filesystemCredentials.ftp.username,password:b.updates.filesystemCredentials.ftp.password,hostname:b.updates.filesystemCredentials.ftp.hostname,connection_type:b.updates.filesystemCredentials.ftp.connectionType,public_key:b.updates.filesystemCredentials.ssh.publicKey,private_key:b.updates.filesystemCredentials.ssh.privateKey}),b.ajax.send(e).always(b.updates.ajaxAlways))},b.updates.ajaxAlways=function(c){c.errorCode&&"unable_to_connect_to_filesystem"===c.errorCode||(b.updates.ajaxLocked=!1,b.updates.queueChecker()),"undefined"!=typeof c.debug&&window.console&&window.console.log&&_.map(c.debug,function(b){window.console.log(a("<p />").html(b).text())})},b.updates.decrementCount=function(b){var c,d,e,f=a("#wp-admin-bar-updates"),g=a('a[href="update-core.php"] .update-plugins'),h=f.find(".ab-label").text();h=parseInt(h,10)-1,h<0||isNaN(h)||(f.find(".ab-item").removeAttr("title"),f.find(".ab-label").text(h),h||f.find(".ab-label").parents("li").remove(),g.each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+h)}),g.removeAttr("title"),g.find(".update-count").text(h),"plugin"===b?(c=a("#menu-plugins"),d=c.find(".plugin-count")):"theme"===b&&(c=a("#menu-appearance"),d=c.find(".theme-count")),d&&(e=d.eq(0).text(),e=parseInt(e,10)-1),e<0||isNaN(e)||(e>0?(a(".subsubsub .upgrade .count").text("("+e+")"),d.text(e),c.find(".update-plugins").each(function(a,b){b.className=b.className.replace(/count-\d+/,"count-"+e)})):(a(".subsubsub .upgrade").remove(),c.find(".update-plugins").remove())))},b.updates.updatePlugin=function(c){var e,f,g,h;return c=_.extend({success:b.updates.updatePluginSuccess,error:b.updates.updatePluginError},c),"plugins"===pagenow||"plugins-network"===pagenow?(e=a('tr[data-plugin="'+c.plugin+'"]'),g=e.find(".update-message").removeClass("notice-error").addClass("updating-message notice-warning").find("p"),h=b.updates.l10n.updatingLabel.replace("%s",e.find(".plugin-title strong").text())):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(f=a(".plugin-card-"+c.slug),g=f.find(".update-now").addClass("updating-message"),h=b.updates.l10n.updatingLabel.replace("%s",g.data("name")),f.removeClass("plugin-card-update-failed").find(".notice.notice-error").remove()),g.html()!==b.updates.l10n.updating&&g.data("originaltext",g.html()),g.attr("aria-label",h).text(b.updates.l10n.updating),d.trigger("wp-plugin-updating",c),b.updates.ajax("update-plugin",c)},b.updates.updatePluginSuccess=function(c){var e,f,g;"plugins"===pagenow||"plugins-network"===pagenow?(e=a('tr[data-plugin="'+c.plugin+'"]').removeClass("update").addClass("updated"),f=e.find(".update-message").removeClass("updating-message notice-warning").addClass("updated-message notice-success").find("p"),g=e.find(".plugin-version-author-uri").html().replace(c.oldVersion,c.newVersion),e.find(".plugin-version-author-uri").html(g)):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(f=a(".plugin-card-"+c.slug).find(".update-now").removeClass("updating-message").addClass("button-disabled updated-message")),f.attr("aria-label",b.updates.l10n.updatedLabel.replace("%s",c.pluginName)).text(b.updates.l10n.updated),b.a11y.speak(b.updates.l10n.updatedMsg,"polite"),b.updates.decrementCount("plugin"),d.trigger("wp-plugin-update-success",c)},b.updates.updatePluginError=function(c){var e,f,g;b.updates.isValidResponse(c,"update")&&(b.updates.maybeHandleCredentialError(c,"update-plugin")||(g=b.updates.l10n.updateFailed.replace("%s",c.errorMessage),"plugins"===pagenow||"plugins-network"===pagenow?(f=c.plugin?a('tr[data-plugin="'+c.plugin+'"]').find(".update-message"):a('tr[data-slug="'+c.slug+'"]').find(".update-message"),f.removeClass("updating-message notice-warning").addClass("notice-error").find("p").html(g),c.pluginName?f.find("p").attr("aria-label",b.updates.l10n.updateFailedLabel.replace("%s",c.pluginName)):f.find("p").removeAttr("aria-label")):"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||(e=a(".plugin-card-"+c.slug).addClass("plugin-card-update-failed").append(b.updates.adminNotice({className:"update-message notice-error notice-alt is-dismissible",message:g})),e.find(".update-now").text(b.updates.l10n.updateFailedShort).removeClass("updating-message"),c.pluginName?e.find(".update-now").attr("aria-label",b.updates.l10n.updateFailedLabel.replace("%s",c.pluginName)):e.find(".update-now").removeAttr("aria-label"),e.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){e.removeClass("plugin-card-update-failed").find(".column-name a").focus(),e.find(".update-now").attr("aria-label",!1).text(b.updates.l10n.updateNow)},200)})),b.a11y.speak(g,"assertive"),d.trigger("wp-plugin-update-error",c)))},b.updates.installPlugin=function(c){var e=a(".plugin-card-"+c.slug),f=e.find(".install-now");return c=_.extend({success:b.updates.installPluginSuccess,error:b.updates.installPluginError},c),"import"===pagenow&&(f=a('[data-slug="'+c.slug+'"]')),f.html()!==b.updates.l10n.installing&&f.data("originaltext",f.html()),f.addClass("updating-message").attr("aria-label",b.updates.l10n.pluginInstallingLabel.replace("%s",f.data("name"))).text(b.updates.l10n.installing),b.a11y.speak(b.updates.l10n.installingMsg,"polite"),e.removeClass("plugin-card-install-failed").find(".notice.notice-error").remove(),d.trigger("wp-plugin-installing",c),b.updates.ajax("install-plugin",c)},b.updates.installPluginSuccess=function(c){var e=a(".plugin-card-"+c.slug).find(".install-now");e.removeClass("updating-message").addClass("updated-message installed button-disabled").attr("aria-label",b.updates.l10n.pluginInstalledLabel.replace("%s",c.pluginName)).text(b.updates.l10n.installed),b.a11y.speak(b.updates.l10n.installedMsg,"polite"),d.trigger("wp-plugin-install-success",c),c.activateUrl&&setTimeout(function(){e.removeClass("install-now installed button-disabled updated-message").addClass("activate-now button-primary").attr("href",c.activateUrl).attr("aria-label",b.updates.l10n.activatePluginLabel.replace("%s",c.pluginName)).text(b.updates.l10n.activatePlugin)},1e3)},b.updates.installPluginError=function(c){var e,f=a(".plugin-card-"+c.slug),g=f.find(".install-now");b.updates.isValidResponse(c,"install")&&(b.updates.maybeHandleCredentialError(c,"install-plugin")||(e=b.updates.l10n.installFailed.replace("%s",c.errorMessage),f.addClass("plugin-card-update-failed").append('<div class="notice notice-error notice-alt is-dismissible"><p>'+e+"</p></div>"),f.on("click",".notice.is-dismissible .notice-dismiss",function(){setTimeout(function(){f.removeClass("plugin-card-update-failed").find(".column-name a").focus()},200)}),g.removeClass("updating-message").addClass("button-disabled").attr("aria-label",b.updates.l10n.pluginInstallFailedLabel.replace("%s",g.data("name"))).text(b.updates.l10n.installFailedShort),b.a11y.speak(e,"assertive"),d.trigger("wp-plugin-install-error",c)))},b.updates.installImporterSuccess=function(c){b.updates.addAdminNotice({id:"install-success",className:"notice-success is-dismissible",message:b.updates.l10n.importerInstalledMsg.replace("%s",c.activateUrl+"&from=import")}),a('[data-slug="'+c.slug+'"]').removeClass("install-now updating-message").addClass("activate-now").attr({href:c.activateUrl+"&from=import","aria-label":b.updates.l10n.activateImporterLabel.replace("%s",c.pluginName)}).text(b.updates.l10n.activateImporter),b.a11y.speak(b.updates.l10n.installedMsg,"polite"),d.trigger("wp-importer-install-success",c)},b.updates.installImporterError=function(c){var e=b.updates.l10n.installFailed.replace("%s",c.errorMessage),f=a('[data-slug="'+c.slug+'"]'),g=f.data("name");b.updates.isValidResponse(c,"install")&&(b.updates.maybeHandleCredentialError(c,"install-plugin")||(b.updates.addAdminNotice({id:c.errorCode,className:"notice-error is-dismissible",message:e}),f.removeClass("updating-message").text(b.updates.l10n.installNow).attr("aria-label",b.updates.l10n.installNowLabel.replace("%s",g)),b.a11y.speak(e,"assertive"),d.trigger("wp-importer-install-error",c)))},b.updates.deletePlugin=function(c){var e=a('[data-plugin="'+c.plugin+'"]').find(".row-actions a.delete");return c=_.extend({success:b.updates.deletePluginSuccess,error:b.updates.deletePluginError},c),e.html()!==b.updates.l10n.deleting&&e.data("originaltext",e.html()).text(b.updates.l10n.deleting),b.a11y.speak(b.updates.l10n.deleting,"polite"),d.trigger("wp-plugin-deleting",c),b.updates.ajax("delete-plugin",c)},b.updates.deletePluginSuccess=function(e){a('[data-plugin="'+e.plugin+'"]').css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var d=a("#bulk-action-form"),f=a(".subsubsub"),g=a(this),h=d.find("thead th:not(.hidden), thead td").length,i=b.template("item-deleted-row"),j=c.plugins;g.hasClass("plugin-update-tr")||g.after(i({slug:e.slug,plugin:e.plugin,colspan:h,name:e.pluginName})),g.remove(),-1!==_.indexOf(j.upgrade,e.plugin)&&(j.upgrade=_.without(j.upgrade,e.plugin),b.updates.decrementCount("plugin")),-1!==_.indexOf(j.inactive,e.plugin)&&(j.inactive=_.without(j.inactive,e.plugin),j.inactive.length?f.find(".inactive .count").text("("+j.inactive.length+")"):f.find(".inactive").remove()),-1!==_.indexOf(j.active,e.plugin)&&(j.active=_.without(j.active,e.plugin),j.active.length?f.find(".active .count").text("("+j.active.length+")"):f.find(".active").remove()),-1!==_.indexOf(j.recently_activated,e.plugin)&&(j.recently_activated=_.without(j.recently_activated,e.plugin),j.recently_activated.length?f.find(".recently_activated .count").text("("+j.recently_activated.length+")"):f.find(".recently_activated").remove()),j.all=_.without(j.all,e.plugin),j.all.length?f.find(".all .count").text("("+j.all.length+")"):(d.find(".tablenav").css({visibility:"hidden"}),f.find(".all").remove(),d.find("tr.no-items").length||d.find("#the-list").append('<tr class="no-items"><td class="colspanchange" colspan="'+h+'">'+b.updates.l10n.noPlugins+"</td></tr>"))}),b.a11y.speak(b.updates.l10n.deleted,"polite"),d.trigger("wp-plugin-delete-success",e)},b.updates.deletePluginError=function(c){var e,f,g=b.template("item-update-row"),h=b.updates.adminNotice({className:"update-message notice-error notice-alt",message:c.errorMessage});c.plugin?(e=a('tr.inactive[data-plugin="'+c.plugin+'"]'),f=e.siblings('[data-plugin="'+c.plugin+'"]')):(e=a('tr.inactive[data-slug="'+c.slug+'"]'),f=e.siblings('[data-slug="'+c.slug+'"]')),b.updates.isValidResponse(c,"delete")&&(b.updates.maybeHandleCredentialError(c,"delete-plugin")||(f.length?(f.find(".notice-error").remove(),f.find(".plugin-update").append(h)):e.addClass("update").after(g({slug:c.slug,plugin:c.plugin||c.slug,colspan:a("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:h})),d.trigger("wp-plugin-delete-error",c)))},b.updates.updateTheme=function(c){var e;return c=_.extend({success:b.updates.updateThemeSuccess,error:b.updates.updateThemeError},c),"themes-network"===pagenow?e=a('[data-slug="'+c.slug+'"]').find(".update-message").removeClass("notice-error").addClass("updating-message notice-warning").find("p"):(e=a("#update-theme").closest(".notice").removeClass("notice-large"),e.find("h3").remove(),e=e.add(a('[data-slug="'+c.slug+'"]').find(".update-message")),e=e.addClass("updating-message").find("p")),e.html()!==b.updates.l10n.updating&&e.data("originaltext",e.html()),b.a11y.speak(b.updates.l10n.updatingMsg,"polite"),e.text(b.updates.l10n.updating),d.trigger("wp-theme-updating",c),b.updates.ajax("update-theme",c)},b.updates.updateThemeSuccess=function(c){var e,f,g=a("body.modal-open").length,h=a('[data-slug="'+c.slug+'"]'),i={className:"updated-message notice-success notice-alt",message:b.updates.l10n.updated};"themes-network"===pagenow?(e=h.find(".update-message"),f=h.find(".theme-version-author-uri").html().replace(c.oldVersion,c.newVersion),h.find(".theme-version-author-uri").html(f)):(e=a(".theme-info .notice").add(h.find(".update-message")),g?a(".load-customize:visible").focus():h.find(".load-customize").focus()),b.updates.addAdminNotice(_.extend({selector:e},i)),b.a11y.speak(b.updates.l10n.updatedMsg,"polite"),b.updates.decrementCount("theme"),d.trigger("wp-theme-update-success",c),g&&a(".theme-info .theme-author").after(b.updates.adminNotice(i))},b.updates.updateThemeError=function(c){var e,f=a('[data-slug="'+c.slug+'"]'),g=b.updates.l10n.updateFailed.replace("%s",c.errorMessage);b.updates.isValidResponse(c,"update")&&(b.updates.maybeHandleCredentialError(c,"update-theme")||("themes-network"===pagenow?e=f.find(".update-message "):(e=a(".theme-info .notice").add(f.find(".notice")),a("body.modal-open").length?a(".load-customize:visible").focus():f.find(".load-customize").focus()),b.updates.addAdminNotice({selector:e,className:"update-message notice-error notice-alt is-dismissible",message:g}),b.a11y.speak(g,"polite"),d.trigger("wp-theme-update-error",c)))},b.updates.installTheme=function(c){var e=a('.theme-install[data-slug="'+c.slug+'"]');return c=_.extend({success:b.updates.installThemeSuccess,error:b.updates.installThemeError},c),e.addClass("updating-message"),e.parents(".theme").addClass("focus"),e.html()!==b.updates.l10n.installing&&e.data("originaltext",e.html()),e.text(b.updates.l10n.installing).attr("aria-label",b.updates.l10n.themeInstallingLabel.replace("%s",e.data("name"))),b.a11y.speak(b.updates.l10n.installingMsg,"polite"),a('.install-theme-info, [data-slug="'+c.slug+'"]').removeClass("theme-install-failed").find(".notice.notice-error").remove(),d.trigger("wp-theme-installing",c),b.updates.ajax("install-theme",c)},b.updates.installThemeSuccess=function(c){var e,f=a(".wp-full-overlay-header, [data-slug="+c.slug+"]");d.trigger("wp-theme-install-success",c),e=f.find(".button-primary").removeClass("updating-message").addClass("updated-message disabled").attr("aria-label",b.updates.l10n.themeInstalledLabel.replace("%s",c.themeName)).text(b.updates.l10n.installed),b.a11y.speak(b.updates.l10n.installedMsg,"polite"),setTimeout(function(){c.activateUrl&&e.attr("href",c.activateUrl).removeClass("theme-install updated-message disabled").addClass("activate").attr("aria-label",b.updates.l10n.activateThemeLabel.replace("%s",c.themeName)).text(b.updates.l10n.activateTheme),c.customizeUrl&&e.siblings(".preview").replaceWith(function(){return a("<a>").attr("href",c.customizeUrl).addClass("button button-secondary load-customize").text(b.updates.l10n.livePreview)})},1e3)},b.updates.installThemeError=function(c){var e,f,g=b.updates.l10n.installFailed.replace("%s",c.errorMessage),h=b.updates.adminNotice({className:"update-message notice-error notice-alt",message:g});b.updates.isValidResponse(c,"install")&&(b.updates.maybeHandleCredentialError(c,"install-theme")||(d.find("body").hasClass("full-overlay-active")?(f=a('.theme-install[data-slug="'+c.slug+'"]'),e=a(".install-theme-info").prepend(h)):(e=a('[data-slug="'+c.slug+'"]').removeClass("focus").addClass("theme-install-failed").append(h),f=e.find(".theme-install")),f.removeClass("updating-message").attr("aria-label",b.updates.l10n.themeInstallFailedLabel.replace("%s",f.data("name"))).text(b.updates.l10n.installFailedShort),b.a11y.speak(g,"assertive"),d.trigger("wp-theme-install-error",c)))},b.updates.deleteTheme=function(c){var e;return"themes"===pagenow?e=a(".theme-actions .delete-theme"):"themes-network"===pagenow&&(e=a('[data-slug="'+c.slug+'"]').find(".row-actions a.delete")),c=_.extend({success:b.updates.deleteThemeSuccess,error:b.updates.deleteThemeError},c),e&&e.html()!==b.updates.l10n.deleting&&e.data("originaltext",e.html()).text(b.updates.l10n.deleting),b.a11y.speak(b.updates.l10n.deleting,"polite"),a(".theme-info .update-message").remove(),d.trigger("wp-theme-deleting",c),b.updates.ajax("delete-theme",c)},b.updates.deleteThemeSuccess=function(e){var f=a('[data-slug="'+e.slug+'"]');"themes-network"===pagenow&&f.css({backgroundColor:"#faafaa"}).fadeOut(350,function(){var d=a(".subsubsub"),f=a(this),g=c.totals,h=b.template("item-deleted-row");f.hasClass("plugin-update-tr")||f.after(h({slug:e.slug,colspan:a("#bulk-action-form").find("thead th:not(.hidden), thead td").length,name:f.find(".theme-title strong").text()})),f.remove(),f.hasClass("update")&&(g.upgrade--,b.updates.decrementCount("theme")),f.hasClass("inactive")&&(g.disabled--,g.disabled?d.find(".disabled .count").text("("+g.disabled+")"):d.find(".disabled").remove()),d.find(".all .count").text("("+--g.all+")")}),b.a11y.speak(b.updates.l10n.deleted,"polite"),d.trigger("wp-theme-delete-success",e)},b.updates.deleteThemeError=function(c){var e=a('tr.inactive[data-slug="'+c.slug+'"]'),f=a(".theme-actions .delete-theme"),g=b.template("item-update-row"),h=e.siblings("#"+c.slug+"-update"),i=b.updates.l10n.deleteFailed.replace("%s",c.errorMessage),j=b.updates.adminNotice({className:"update-message notice-error notice-alt",message:i});b.updates.maybeHandleCredentialError(c,"delete-theme")||("themes-network"===pagenow?h.length?(h.find(".notice-error").remove(),h.find(".plugin-update").append(j)):e.addClass("update").after(g({slug:c.slug,colspan:a("#bulk-action-form").find("thead th:not(.hidden), thead td").length,content:j})):a(".theme-info .theme-description").before(j),f.html(f.data("originaltext")),b.a11y.speak(i,"assertive"),d.trigger("wp-theme-delete-error",c))},b.updates._addCallbacks=function(a,c){return"import"===pagenow&&"install-plugin"===c&&(a.success=b.updates.installImporterSuccess,a.error=b.updates.installImporterError),a},b.updates.queueChecker=function(){var a;if(!b.updates.ajaxLocked&&b.updates.queue.length)switch(a=b.updates.queue.shift(),a.action){case"install-plugin":b.updates.installPlugin(a.data);break;case"update-plugin":b.updates.updatePlugin(a.data);break;case"delete-plugin":b.updates.deletePlugin(a.data);break;case"install-theme":b.updates.installTheme(a.data);break;case"update-theme":b.updates.updateTheme(a.data);break;case"delete-theme":b.updates.deleteTheme(a.data)}},b.updates.requestFilesystemCredentials=function(c){!1===b.updates.filesystemCredentials.available&&(c&&!b.updates.$elToReturnFocusToFromCredentialsModal&&(b.updates.$elToReturnFocusToFromCredentialsModal=a(c.target)),b.updates.ajaxLocked=!0,b.updates.requestForCredentialsModalOpen())},b.updates.maybeRequestFilesystemCredentials=function(a){b.updates.shouldRequestFilesystemCredentials&&!b.updates.ajaxLocked&&b.updates.requestFilesystemCredentials(a)},b.updates.keydown=function(c){27===c.keyCode?b.updates.requestForCredentialsModalCancel():9===c.keyCode&&("upgrade"!==c.target.id||c.shiftKey?"hostname"===c.target.id&&c.shiftKey&&(a("#upgrade").focus(),c.preventDefault()):(a("#hostname").focus(),c.preventDefault()))},b.updates.requestForCredentialsModalOpen=function(){var c=a("#request-filesystem-credentials-dialog");a("body").addClass("modal-open"),c.show(),c.find("input:enabled:first").focus(),c.on("keydown",b.updates.keydown)},b.updates.requestForCredentialsModalClose=function(){a("#request-filesystem-credentials-dialog").hide(),a("body").removeClass("modal-open"),b.updates.$elToReturnFocusToFromCredentialsModal&&b.updates.$elToReturnFocusToFromCredentialsModal.focus()},b.updates.requestForCredentialsModalCancel=function(){(b.updates.ajaxLocked||b.updates.queue.length)&&(_.each(b.updates.queue,function(a){d.trigger("credential-modal-cancel",a)}),b.updates.ajaxLocked=!1,b.updates.queue=[],b.updates.requestForCredentialsModalClose())},b.updates.showErrorInCredentialsForm=function(b){var c=a("#request-filesystem-credentials-form");c.find(".notice").remove(),c.find("#request-filesystem-credentials-title").after('<div class="notice notice-alt notice-error"><p>'+b+"</p></div>")},b.updates.credentialError=function(a,c){a=b.updates._addCallbacks(a,c),b.updates.queue.unshift({action:c,data:a}),b.updates.filesystemCredentials.available=!1,b.updates.showErrorInCredentialsForm(a.errorMessage),b.updates.requestFilesystemCredentials()},b.updates.maybeHandleCredentialError=function(a,c){return!(!b.updates.shouldRequestFilesystemCredentials||!a.errorCode||"unable_to_connect_to_filesystem"!==a.errorCode)&&(b.updates.credentialError(a,c),!0)},b.updates.isValidResponse=function(c,d){var e,f=b.updates.l10n.unknownError;if(_.isObject(c)&&!_.isFunction(c.always))return!0;switch(_.isString(c)&&"-1"===c?f=b.updates.l10n.nonceError:_.isString(c)?f=c:"undefined"!=typeof c.readyState&&0===c.readyState?f=b.updates.l10n.connectionError:_.isString(c.responseText)&&""!==c.responseText?f=c.responseText:_.isString(c.statusText)&&(f=c.statusText),d){case"update":e=b.updates.l10n.updateFailed;break;case"install":e=b.updates.l10n.installFailed;break;case"delete":e=b.updates.l10n.deleteFailed}return f=f.replace(/<[\/a-z][^<>]*>/gi,""),e=e.replace("%s",f),b.updates.addAdminNotice({id:"unknown_error",className:"notice-error is-dismissible",message:_.escape(e)}),b.updates.ajaxLocked=!1,b.updates.queue=[],a(".button.updating-message").removeClass("updating-message").removeAttr("aria-label").prop("disabled",!0).text(b.updates.l10n.updateFailedShort),a(".updating-message:not(.button):not(.thickbox)").removeClass("updating-message notice-warning").addClass("notice-error").find("p").removeAttr("aria-label").text(e),b.a11y.speak(e,"assertive"),!1},b.updates.beforeunload=function(){if(b.updates.ajaxLocked)return b.updates.l10n.beforeunload},a(function(){var c=a("#plugin-filter"),e=a("#bulk-action-form"),f=a("#request-filesystem-credentials-dialog"),g=a(".plugins-php .wp-filter-search"),h=a(".plugin-install-php .wp-filter-search");b.updates.shouldRequestFilesystemCredentials=f.length>0,f.on("submit","form",function(c){c.preventDefault(),b.updates.filesystemCredentials.ftp.hostname=a("#hostname").val(),b.updates.filesystemCredentials.ftp.username=a("#username").val(),b.updates.filesystemCredentials.ftp.password=a("#password").val(),b.updates.filesystemCredentials.ftp.connectionType=a('input[name="connection_type"]:checked').val(),b.updates.filesystemCredentials.ssh.publicKey=a("#public_key").val(),b.updates.filesystemCredentials.ssh.privateKey=a("#private_key").val(),b.updates.filesystemCredentials.available=!0,b.updates.ajaxLocked=!1,b.updates.queueChecker(),b.updates.requestForCredentialsModalClose()}),f.on("click",'[data-js-action="close"], .notification-dialog-background',b.updates.requestForCredentialsModalCancel),f.on("change",'input[name="connection_type"]',function(){a("#ssh-keys").toggleClass("hidden","ssh"!==a(this).val())}).change(),d.on("credential-modal-cancel",function(c,d){var e,f,g=a(".updating-message");"import"===pagenow?g.removeClass("updating-message"):"plugins"===pagenow||"plugins-network"===pagenow?"update-plugin"===d.action?e=a('tr[data-plugin="'+d.data.plugin+'"]').find(".update-message"):"delete-plugin"===d.action&&(e=a('[data-plugin="'+d.data.plugin+'"]').find(".row-actions a.delete")):"themes"===pagenow||"themes-network"===pagenow?"update-theme"===d.action?e=a('[data-slug="'+d.data.slug+'"]').find(".update-message"):"delete-theme"===d.action&&"themes-network"===pagenow?e=a('[data-slug="'+d.data.slug+'"]').find(".row-actions a.delete"):"delete-theme"===d.action&&"themes"===pagenow&&(e=a(".theme-actions .delete-theme")):e=g,e&&e.hasClass("updating-message")&&(f=e.data("originaltext"),"undefined"==typeof f&&(f=a("<p>").html(e.find("p").data("originaltext"))),e.removeClass("updating-message").html(f),"plugin-install"!==pagenow&&"plugin-install-network"!==pagenow||("update-plugin"===d.action?e.attr("aria-label",b.updates.l10n.updateNowLabel.replace("%s",e.data("name"))):"install-plugin"===d.action&&e.attr("aria-label",b.updates.l10n.installNowLabel.replace("%s",e.data("name"))))),b.a11y.speak(b.updates.l10n.updateCancel,"polite")}),e.on("click","[data-plugin] .update-link",function(c){var d=a(c.target),e=d.parents("tr");c.preventDefault(),d.hasClass("updating-message")||d.hasClass("button-disabled")||(b.updates.maybeRequestFilesystemCredentials(c),b.updates.$elToReturnFocusToFromCredentialsModal=e.find(".check-column input"),b.updates.updatePlugin({plugin:e.data("plugin"),slug:e.data("slug")}))}),c.on("click",".update-now",function(c){var d=a(c.target);c.preventDefault(),d.hasClass("updating-message")||d.hasClass("button-disabled")||(b.updates.maybeRequestFilesystemCredentials(c),b.updates.updatePlugin({plugin:d.data("plugin"),slug:d.data("slug")}))}),c.on("click",".install-now",function(c){var e=a(c.target);c.preventDefault(),e.hasClass("updating-message")||e.hasClass("button-disabled")||(b.updates.shouldRequestFilesystemCredentials&&!b.updates.ajaxLocked&&(b.updates.requestFilesystemCredentials(c),d.on("credential-modal-cancel",function(){var c=a(".install-now.updating-message");c.removeClass("updating-message").text(b.updates.l10n.installNow),b.a11y.speak(b.updates.l10n.updateCancel,"polite")})),b.updates.installPlugin({slug:e.data("slug")}))}),d.on("click",".importer-item .install-now",function(c){var e=a(c.target),f=a(this).data("name");c.preventDefault(),e.hasClass("updating-message")||(b.updates.shouldRequestFilesystemCredentials&&!b.updates.ajaxLocked&&(b.updates.requestFilesystemCredentials(c),d.on("credential-modal-cancel",function(){e.removeClass("updating-message").text(b.updates.l10n.installNow).attr("aria-label",b.updates.l10n.installNowLabel.replace("%s",f)),b.a11y.speak(b.updates.l10n.updateCancel,"polite")})),b.updates.installPlugin({slug:e.data("slug"),success:b.updates.installImporterSuccess,error:b.updates.installImporterError}))}),e.on("click","[data-plugin] a.delete",function(c){var d=a(c.target).parents("tr");c.preventDefault(),window.confirm(b.updates.l10n.aysDeleteUninstall.replace("%s",d.find(".plugin-title strong").text()))&&(b.updates.maybeRequestFilesystemCredentials(c),b.updates.deletePlugin({plugin:d.data("plugin"),slug:d.data("slug")}))}),d.on("click",".themes-php.network-admin .update-link",function(c){var d=a(c.target),e=d.parents("tr");c.preventDefault(),d.hasClass("updating-message")||d.hasClass("button-disabled")||(b.updates.maybeRequestFilesystemCredentials(c),b.updates.$elToReturnFocusToFromCredentialsModal=e.find(".check-column input"),b.updates.updateTheme({slug:e.data("slug")}))}),d.on("click",".themes-php.network-admin a.delete",function(c){var d=a(c.target).parents("tr");c.preventDefault(),window.confirm(b.updates.l10n.aysDelete.replace("%s",d.find(".theme-title strong").text()))&&(b.updates.maybeRequestFilesystemCredentials(c),b.updates.deleteTheme({slug:d.data("slug")}))}),e.on("click",'[type="submit"]',function(c){var f,g,h=a(c.target).siblings("select").val(),i=e.find('input[name="checked[]"]:checked'),j=0,k=0,l=[];switch(pagenow){case"plugins":case"plugins-network":f="plugin";break;case"themes-network":f="theme";break;default:return}if(!i.length)return c.preventDefault(),a("html, body").animate({scrollTop:0}),b.updates.addAdminNotice({id:"no-items-selected",className:"notice-error is-dismissible",message:b.updates.l10n.noItemsSelected});switch(h){case"update-selected":g=h.replace("selected",f);break;case"delete-selected":if(!window.confirm("plugin"===f?b.updates.l10n.aysBulkDelete:b.updates.l10n.aysBulkDeleteThemes))return void c.preventDefault();g=h.replace("selected",f);break;default:return}b.updates.maybeRequestFilesystemCredentials(c),c.preventDefault(),e.find('.manage-column [type="checkbox"]').prop("checked",!1),d.trigger("wp-"+f+"-bulk-"+h,i),i.each(function(c,d){var e=a(d),f=e.parents("tr");return"update-selected"!==h||f.hasClass("update")&&!f.find("notice-error").length?void b.updates.queue.push({action:g,data:{plugin:f.data("plugin"),slug:f.data("slug")}}):void e.prop("checked",!1)}),d.on("wp-plugin-update-success wp-plugin-update-error wp-theme-update-success wp-theme-update-error",function(c,d){var e,f,g=a('[data-slug="'+d.slug+'"]');"wp-"+d.update+"-update-success"===c.type?j++:(f=d.pluginName?d.pluginName:g.find(".column-primary strong").text(),k++,l.push(f+": "+d.errorMessage)),g.find('input[name="checked[]"]:checked').prop("checked",!1),b.updates.adminNotice=b.template("wp-bulk-updates-admin-notice"),b.updates.addAdminNotice({id:"bulk-action-notice",className:"bulk-action-notice",successes:j,errors:k,errorMessages:l,type:d.update}),e=a("#bulk-action-notice").on("click","button",function(){a(this).toggleClass("bulk-action-errors-collapsed").attr("aria-expanded",!a(this).hasClass("bulk-action-errors-collapsed")),e.find(".bulk-action-errors").toggleClass("hidden")}),k>0&&!b.updates.queue.length&&a("html, body").animate({scrollTop:0})}),d.on("wp-updates-notice-added",function(){b.updates.adminNotice=b.template("wp-updates-admin-notice")}),b.updates.queueChecker()}),h.length&&h.attr("aria-describedby","live-search-desc"),h.on("keyup input",_.debounce(function(d,e){var f,g,h=a(".plugin-install-search");f={_ajax_nonce:b.updates.ajaxNonce,s:d.target.value,tab:"search",type:a("#typeselector").val(),pagenow:pagenow},g=location.href.split("?")[0]+"?"+a.param(_.omit(f,["_ajax_nonce","pagenow"])),"keyup"===d.type&&27===d.which&&(d.target.value=""),b.updates.searchTerm===f.s&&"typechange"!==e||(c.empty(),b.updates.searchTerm=f.s,window.history&&window.history.replaceState&&window.history.replaceState(null,"",g),h.length||(h=a('<li class="plugin-install-search" />').append(a("<a />",{"class":"current",href:g,text:b.updates.l10n.searchResultsLabel})),a(".wp-filter .filter-links .current").removeClass("current").parents(".filter-links").prepend(h),c.prev("p").remove(),a(".plugins-popular-tags-wrapper").remove()),"undefined"!=typeof b.updates.searchRequest&&b.updates.searchRequest.abort(),a("body").addClass("loading-content"),b.updates.searchRequest=b.ajax.post("search-install-plugins",f).done(function(d){a("body").removeClass("loading-content"),c.append(d.items),delete b.updates.searchRequest,0===d.count?b.a11y.speak(b.updates.l10n.noPluginsFound):b.a11y.speak(b.updates.l10n.pluginsFound.replace("%d",d.count))}))},500)),g.length&&g.attr("aria-describedby","live-search-desc"),g.on("keyup input",_.debounce(function(c){var d={_ajax_nonce:b.updates.ajaxNonce,s:c.target.value,pagenow:pagenow};"keyup"===c.type&&27===c.which&&(c.target.value=""),b.updates.searchTerm!==d.s&&(b.updates.searchTerm=d.s,window.history&&window.history.replaceState&&window.history.replaceState(null,"",location.href.split("?")[0]+"?s="+d.s),"undefined"!=typeof b.updates.searchRequest&&b.updates.searchRequest.abort(),e.empty(),a("body").addClass("loading-content"),b.updates.searchRequest=b.ajax.post("search-plugins",d).done(function(c){var f=a("<span />").addClass("subtitle").html(b.updates.l10n.searchResults.replace("%s",_.escape(d.s))),g=a(".wrap .subtitle");d.s.length?g.length?g.replaceWith(f):a(".wrap h1").append(f):g.remove(),a("body").removeClass("loading-content"),e.append(c.items),delete b.updates.searchRequest,0===c.count?b.a11y.speak(b.updates.l10n.noPluginsFound):b.a11y.speak(b.updates.l10n.pluginsFound.replace("%d",c.count))}))},500)),d.on("submit",".search-plugins",function(b){b.preventDefault(),a("input.wp-filter-search").trigger("input")}),a("#typeselector").on("change",function(){var b=a('input[name="s"]');b.val().length&&b.trigger("input","typechange")}),a("#plugin_update_from_iframe").on("click",function(b){
+var c,d=window.parent===window?null:window.parent;a.support.postMessage=!!window.postMessage,!1!==a.support.postMessage&&null!==d&&-1===window.parent.location.pathname.indexOf("update-core.php")&&(b.preventDefault(),c={action:"update-plugin",data:{plugin:a(this).data("plugin"),slug:a(this).data("slug")}},d.postMessage(JSON.stringify(c),window.location.origin))}),a("#plugin_install_from_iframe").on("click",function(b){var c,d=window.parent===window?null:window.parent;a.support.postMessage=!!window.postMessage,!1!==a.support.postMessage&&null!==d&&-1===window.parent.location.pathname.indexOf("index.php")&&(b.preventDefault(),c={action:"install-plugin",data:{slug:a(this).data("slug")}},d.postMessage(JSON.stringify(c),window.location.origin))}),a(window).on("message",function(c){var d,e=c.originalEvent,f=document.location.protocol+"//"+document.location.hostname;if(e.origin===f){try{d=a.parseJSON(e.data)}catch(g){return}if("undefined"!=typeof d.action)switch(d.action){case"decrementUpdateCount":b.updates.decrementCount(d.upgradeType);break;case"install-plugin":case"update-plugin":window.tb_remove(),d.data=b.updates._addCallbacks(d.data,d.action),b.updates.queue.push(d),b.updates.queueChecker()}}}),a(window).on("beforeunload",b.updates.beforeunload)})}(jQuery,window.wp,_.extend(window._wpUpdatesSettings,window._wpUpdatesItemCounts||{}));
\ No newline at end of file
index 5ec77bc867683bdfeb79b05be03e20448db95787..c5f5db36eaefe80d502642217b1baa4946f802b6 100644 (file)
        function generatePassword() {
                if ( typeof zxcvbn !== 'function' ) {
                        setTimeout( generatePassword, 50 );
-               } else {
+                       return;
+               } else if ( ! $pass1.val() ) {
+                       // zxcvbn loaded before user entered password.
                        $pass1.val( $pass1.data( 'pw' ) );
-                       $pass1.trigger( 'pwupdate' ).trigger( 'wp-check-valid-field' );
-                       if ( 1 !== parseInt( $toggleButton.data( 'start-masked' ), 10 ) ) {
-                               $pass1Wrap.addClass( 'show-password' );
-                       } else {
-                               $toggleButton.trigger( 'click' );
-                       }
+                       $pass1.trigger( 'pwupdate' );
+                       showOrHideWeakPasswordCheckbox();
+               }
+               else {
+                       // zxcvbn loaded after the user entered password, check strength.
+                       check_pass_strength();
+                       showOrHideWeakPasswordCheckbox();
                }
+
+               if ( 1 !== parseInt( $toggleButton.data( 'start-masked' ), 10 ) ) {
+                       $pass1Wrap.addClass( 'show-password' );
+               } else {
+                       $toggleButton.trigger( 'click' );
+               }
+
+               // Once zxcvbn loads, passwords strength is known.
+               $( '#pw-weak-text-label' ).html( userProfileL10n.warnWeak );
        }
 
        function bindPass1() {
-               var passStrength = $('#pass-strength-result')[0];
-
                currentPass = $pass1.val();
 
                $pass1Wrap = $pass1.parent();
                                $pass1Text.val( currentPass );
                        }
                        $pass1.add( $pass1Text ).removeClass( 'short bad good strong' );
-
-                       if ( passStrength.className ) {
-                               $pass1.add( $pass1Text ).addClass( passStrength.className );
-                               if ( 'short' === passStrength.className || 'bad' === passStrength.className ) {
-                                       if ( ! $weakCheckbox.prop( 'checked' ) ) {
-                                               $submitButtons.prop( 'disabled', true );
-                                       }
-                                       $weakRow.show();
-                               } else {
-                                       $submitButtons.prop( 'disabled', false );
-                                       $weakRow.hide();
-                               }
-                       }
+                       showOrHideWeakPasswordCheckbox();
                } );
        }
 
                strength = wp.passwordStrength.meter( pass1, wp.passwordStrength.userInputBlacklist(), pass1 );
 
                switch ( strength ) {
+                       case -1:
+                               $( '#pass-strength-result' ).addClass( 'bad' ).html( pwsL10n.unknown );
+                               break;
                        case 2:
                                $('#pass-strength-result').addClass('bad').html( pwsL10n.bad );
                                break;
                }
        }
 
+       function showOrHideWeakPasswordCheckbox() {
+               var passStrength = $('#pass-strength-result')[0];
+
+               if ( passStrength.className ) {
+                       $pass1.add( $pass1Text ).addClass( passStrength.className );
+                       if ( 'short' === passStrength.className || 'bad' === passStrength.className ) {
+                               if ( ! $weakCheckbox.prop( 'checked' ) ) {
+                                       $submitButtons.prop( 'disabled', true );
+                               }
+                               $weakRow.show();
+                       } else {
+                               $submitButtons.prop( 'disabled', false );
+                               $weakRow.hide();
+                       }
+               }
+       }
+
        $(document).ready( function() {
                var $colorpicker, $stylesheet, user_id, current_user_id,
                        select = $( '#display_name' );
index 8cad03f541b491e3f91b50ca332700d5e27c7812..cea8d6aa00d29ab7265202b2b1899ca47cc42d1f 100644 (file)
@@ -1 +1 @@
-!function(a){function b(){"function"!=typeof zxcvbn?setTimeout(b,50):(j.val(j.data("pw")),j.trigger("pwupdate").trigger("wp-check-valid-field"),1!==parseInt(p.data("start-masked"),10)?i.addClass("show-password"):p.trigger("click"))}function c(){var c=a("#pass-strength-result")[0];s=j.val(),i=j.parent(),k=a('<input type="text"/>').attr({id:"pass1-text",name:"pass1-text",autocomplete:"off"}).addClass(j[0].className).data("pw",j.data("pw")).val(j.val()).on(t,function(){k.val()!==s&&(m.val(k.val()),j.val(k.val()).trigger("pwupdate"),s=k.val())}),j.after(k),1===parseInt(j.data("reveal"),10)&&b(),j.on(t+" pwupdate",function(){j.val()!==s&&(s=j.val(),k.val()!==s&&k.val(s),j.add(k).removeClass("short bad good strong"),c.className&&(j.add(k).addClass(c.className),"short"===c.className||"bad"===c.className?(o.prop("checked")||q.prop("disabled",!0),n.show()):(q.prop("disabled",!1),n.hide())))})}function d(){p.data("toggle",0).attr({"aria-label":userProfileL10n.ariaHide}).find(".text").text(userProfileL10n.hide).end().find(".dashicons").removeClass("dashicons-visibility").addClass("dashicons-hidden"),k.focus(),l.attr("for","pass1-text")}function e(){p=h.find(".wp-hide-pw"),p.show().on("click",function(){1===parseInt(p.data("toggle"),10)?(i.addClass("show-password"),d(),_.isUndefined(k[0].setSelectionRange)||k[0].setSelectionRange(0,100)):(i.removeClass("show-password"),p.data("toggle",1).attr({"aria-label":userProfileL10n.ariaShow}).find(".text").text(userProfileL10n.show).end().find(".dashicons").removeClass("dashicons-hidden").addClass("dashicons-visibility"),j.focus(),l.attr("for","pass1"),_.isUndefined(j[0].setSelectionRange)||j[0].setSelectionRange(0,100))})}function f(){var f,g,p;h=a(".user-pass1-wrap"),l=h.find("th label").attr("for","pass1-text"),a(".user-pass2-wrap").hide(),r=a("#submit").on("click",function(){u=!1}),q=r.add(" #createusersub"),n=a(".pw-weak"),o=n.find(".pw-checkbox"),o.change(function(){q.prop("disabled",!o.prop("checked"))}),j=a("#pass1"),j.length&&c(),m=a("#pass2").on(t,function(){m.val().length>0&&(j.val(m.val()),m.val(""),s="",j.trigger("pwupdate"))}),j.is(":hidden")&&(j.prop("disabled",!0),m.prop("disabled",!0),k.prop("disabled",!0)),f=h.find(".wp-pwd"),g=h.find("button.wp-generate-pw"),e(),g.length&&f.hide(),g.show(),g.on("click",function(){u=!0,g.hide(),f.show(),j.attr("disabled",!1),m.attr("disabled",!1),k.attr("disabled",!1),0===k.val().length&&b(),_.defer(function(){k.focus(),_.isUndefined(k[0].setSelectionRange)||k[0].setSelectionRange(0,100)},0)}),p=h.find("button.wp-cancel-pw"),p.on("click",function(){u=!1,k.val(""),wp.ajax.post("generate-password").done(function(a){j.data("pw",a)}),g.show(),f.hide(),n.hide(0,function(){o.removeProp("checked")}),j.prop("disabled",!0),m.prop("disabled",!0),k.prop("disabled",!0),d(),j.val("").trigger("pwupdate"),q.prop("disabled",!1)}),h.closest("form").on("submit",function(){u=!1,j.prop("disabled",!1),m.prop("disabled",!1),m.val(j.val()),i.removeClass("show-password")})}function g(){var b,c=a("#pass1").val();if(a("#pass-strength-result").removeClass("short bad good strong"),!c)return void a("#pass-strength-result").html("&nbsp;");switch(b=wp.passwordStrength.meter(c,wp.passwordStrength.userInputBlacklist(),c)){case 2:a("#pass-strength-result").addClass("bad").html(pwsL10n.bad);break;case 3:a("#pass-strength-result").addClass("good").html(pwsL10n.good);break;case 4:a("#pass-strength-result").addClass("strong").html(pwsL10n.strong);break;case 5:a("#pass-strength-result").addClass("short").html(pwsL10n.mismatch);break;default:a("#pass-strength-result").addClass("short").html(pwsL10n["short"])}}var h,i,j,k,l,m,n,o,p,q,r,s,t,u=!1;t="oninput"in document.createElement("input")?"input":"keyup",a(document).ready(function(){var b,c,d,e,h=a("#display_name");a("#pass1").val("").on(t+" pwupdate",g),a("#pass-strength-result").show(),a(".color-palette").click(function(){a(this).siblings('input[name="admin_color"]').prop("checked",!0)}),h.length&&a("#first_name, #last_name, #nickname").bind("blur.user_profile",function(){var b=[],c={display_nickname:a("#nickname").val()||"",display_username:a("#user_login").val()||"",display_firstname:a("#first_name").val()||"",display_lastname:a("#last_name").val()||""};c.display_firstname&&c.display_lastname&&(c.display_firstlast=c.display_firstname+" "+c.display_lastname,c.display_lastfirst=c.display_lastname+" "+c.display_firstname),a.each(a("option",h),function(a,c){b.push(c.value)}),a.each(c,function(d,e){if(e){var f=e.replace(/<\/?[a-z][^>]*>/gi,"");c[d].length&&-1===a.inArray(f,b)&&(b.push(f),a("<option />",{text:f}).appendTo(h))}})}),b=a("#color-picker"),c=a("#colors-css"),d=a("input#user_id").val(),e=a('input[name="checkuser_id"]').val(),b.on("click.colorpicker",".color-option",function(){var b,f=a(this);if(!f.hasClass("selected")&&(f.siblings(".selected").removeClass("selected"),f.addClass("selected").find('input[type="radio"]').prop("checked",!0),d===e)){if(0===c.length&&(c=a('<link rel="stylesheet" />').appendTo("head")),c.attr("href",f.children(".css_url").val()),"undefined"!=typeof wp&&wp.svgPainter){try{b=a.parseJSON(f.children(".icon_colors").val())}catch(g){}b&&(wp.svgPainter.setColors(b),wp.svgPainter.paint())}a.post(ajaxurl,{action:"save-user-color-scheme",color_scheme:f.children('input[name="admin_color"]').val(),nonce:a("#color-nonce").val()}).done(function(b){b.success&&a("body").removeClass(b.data.previousScheme).addClass(b.data.currentScheme)})}}),f()}),a("#destroy-sessions").on("click",function(b){var c=a(this);wp.ajax.post("destroy-sessions",{nonce:a("#_wpnonce").val(),user_id:a("#user_id").val()}).done(function(a){c.prop("disabled",!0),c.siblings(".notice").remove(),c.before('<div class="notice notice-success inline"><p>'+a.message+"</p></div>")}).fail(function(a){c.siblings(".notice").remove(),c.before('<div class="notice notice-error inline"><p>'+a.message+"</p></div>")}),b.preventDefault()}),window.generatePassword=b,a(window).on("beforeunload",function(){return!0===u?userProfileL10n.warn:void 0})}(jQuery);
\ No newline at end of file
+!function(a){function b(){return"function"!=typeof zxcvbn?void setTimeout(b,50):(k.val()?(g(),h()):(k.val(k.data("pw")),k.trigger("pwupdate"),h()),1!==parseInt(q.data("start-masked"),10)?j.addClass("show-password"):q.trigger("click"),void a("#pw-weak-text-label").html(userProfileL10n.warnWeak))}function c(){t=k.val(),j=k.parent(),l=a('<input type="text"/>').attr({id:"pass1-text",name:"pass1-text",autocomplete:"off"}).addClass(k[0].className).data("pw",k.data("pw")).val(k.val()).on(u,function(){l.val()!==t&&(n.val(l.val()),k.val(l.val()).trigger("pwupdate"),t=l.val())}),k.after(l),1===parseInt(k.data("reveal"),10)&&b(),k.on(u+" pwupdate",function(){k.val()!==t&&(t=k.val(),l.val()!==t&&l.val(t),k.add(l).removeClass("short bad good strong"),h())})}function d(){q.data("toggle",0).attr({"aria-label":userProfileL10n.ariaHide}).find(".text").text(userProfileL10n.hide).end().find(".dashicons").removeClass("dashicons-visibility").addClass("dashicons-hidden"),l.focus(),m.attr("for","pass1-text")}function e(){q=i.find(".wp-hide-pw"),q.show().on("click",function(){1===parseInt(q.data("toggle"),10)?(j.addClass("show-password"),d(),_.isUndefined(l[0].setSelectionRange)||l[0].setSelectionRange(0,100)):(j.removeClass("show-password"),q.data("toggle",1).attr({"aria-label":userProfileL10n.ariaShow}).find(".text").text(userProfileL10n.show).end().find(".dashicons").removeClass("dashicons-hidden").addClass("dashicons-visibility"),k.focus(),m.attr("for","pass1"),_.isUndefined(k[0].setSelectionRange)||k[0].setSelectionRange(0,100))})}function f(){var f,g,h;i=a(".user-pass1-wrap"),m=i.find("th label").attr("for","pass1-text"),a(".user-pass2-wrap").hide(),s=a("#submit").on("click",function(){v=!1}),r=s.add(" #createusersub"),o=a(".pw-weak"),p=o.find(".pw-checkbox"),p.change(function(){r.prop("disabled",!p.prop("checked"))}),k=a("#pass1"),k.length&&c(),n=a("#pass2").on(u,function(){n.val().length>0&&(k.val(n.val()),n.val(""),t="",k.trigger("pwupdate"))}),k.is(":hidden")&&(k.prop("disabled",!0),n.prop("disabled",!0),l.prop("disabled",!0)),f=i.find(".wp-pwd"),g=i.find("button.wp-generate-pw"),e(),g.length&&f.hide(),g.show(),g.on("click",function(){v=!0,g.hide(),f.show(),k.attr("disabled",!1),n.attr("disabled",!1),l.attr("disabled",!1),0===l.val().length&&b(),_.defer(function(){l.focus(),_.isUndefined(l[0].setSelectionRange)||l[0].setSelectionRange(0,100)},0)}),h=i.find("button.wp-cancel-pw"),h.on("click",function(){v=!1,l.val(""),wp.ajax.post("generate-password").done(function(a){k.data("pw",a)}),g.show(),f.hide(),o.hide(0,function(){p.removeProp("checked")}),k.prop("disabled",!0),n.prop("disabled",!0),l.prop("disabled",!0),d(),k.val("").trigger("pwupdate"),r.prop("disabled",!1)}),i.closest("form").on("submit",function(){v=!1,k.prop("disabled",!1),n.prop("disabled",!1),n.val(k.val()),j.removeClass("show-password")})}function g(){var b,c=a("#pass1").val();if(a("#pass-strength-result").removeClass("short bad good strong"),!c)return void a("#pass-strength-result").html("&nbsp;");switch(b=wp.passwordStrength.meter(c,wp.passwordStrength.userInputBlacklist(),c)){case-1:a("#pass-strength-result").addClass("bad").html(pwsL10n.unknown);break;case 2:a("#pass-strength-result").addClass("bad").html(pwsL10n.bad);break;case 3:a("#pass-strength-result").addClass("good").html(pwsL10n.good);break;case 4:a("#pass-strength-result").addClass("strong").html(pwsL10n.strong);break;case 5:a("#pass-strength-result").addClass("short").html(pwsL10n.mismatch);break;default:a("#pass-strength-result").addClass("short").html(pwsL10n["short"])}}function h(){var b=a("#pass-strength-result")[0];b.className&&(k.add(l).addClass(b.className),"short"===b.className||"bad"===b.className?(p.prop("checked")||r.prop("disabled",!0),o.show()):(r.prop("disabled",!1),o.hide()))}var i,j,k,l,m,n,o,p,q,r,s,t,u,v=!1;u="oninput"in document.createElement("input")?"input":"keyup",a(document).ready(function(){var b,c,d,e,h=a("#display_name");a("#pass1").val("").on(u+" pwupdate",g),a("#pass-strength-result").show(),a(".color-palette").click(function(){a(this).siblings('input[name="admin_color"]').prop("checked",!0)}),h.length&&a("#first_name, #last_name, #nickname").bind("blur.user_profile",function(){var b=[],c={display_nickname:a("#nickname").val()||"",display_username:a("#user_login").val()||"",display_firstname:a("#first_name").val()||"",display_lastname:a("#last_name").val()||""};c.display_firstname&&c.display_lastname&&(c.display_firstlast=c.display_firstname+" "+c.display_lastname,c.display_lastfirst=c.display_lastname+" "+c.display_firstname),a.each(a("option",h),function(a,c){b.push(c.value)}),a.each(c,function(d,e){if(e){var f=e.replace(/<\/?[a-z][^>]*>/gi,"");c[d].length&&a.inArray(f,b)===-1&&(b.push(f),a("<option />",{text:f}).appendTo(h))}})}),b=a("#color-picker"),c=a("#colors-css"),d=a("input#user_id").val(),e=a('input[name="checkuser_id"]').val(),b.on("click.colorpicker",".color-option",function(){var b,f=a(this);if(!f.hasClass("selected")&&(f.siblings(".selected").removeClass("selected"),f.addClass("selected").find('input[type="radio"]').prop("checked",!0),d===e)){if(0===c.length&&(c=a('<link rel="stylesheet" />').appendTo("head")),c.attr("href",f.children(".css_url").val()),"undefined"!=typeof wp&&wp.svgPainter){try{b=a.parseJSON(f.children(".icon_colors").val())}catch(g){}b&&(wp.svgPainter.setColors(b),wp.svgPainter.paint())}a.post(ajaxurl,{action:"save-user-color-scheme",color_scheme:f.children('input[name="admin_color"]').val(),nonce:a("#color-nonce").val()}).done(function(b){b.success&&a("body").removeClass(b.data.previousScheme).addClass(b.data.currentScheme)})}}),f()}),a("#destroy-sessions").on("click",function(b){var c=a(this);wp.ajax.post("destroy-sessions",{nonce:a("#_wpnonce").val(),user_id:a("#user_id").val()}).done(function(a){c.prop("disabled",!0),c.siblings(".notice").remove(),c.before('<div class="notice notice-success inline"><p>'+a.message+"</p></div>")}).fail(function(a){c.siblings(".notice").remove(),c.before('<div class="notice notice-error inline"><p>'+a.message+"</p></div>")}),b.preventDefault()}),window.generatePassword=b,a(window).on("beforeunload",function(){if(!0===v)return userProfileL10n.warn})}(jQuery);
\ No newline at end of file
index c31c7eec993b7d44462775c5af22a8f3f8773bd0..df5d2e7c968962c9be86f3ccb80896e1dbda2c8f 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * Distraction-Free Writing (wp-fullscreen) backwards compatibility stub.
+ * Distraction-Free Writing (wp-fullscreen) backward compatibility stub.
  * Todo: remove at the end of 2016.
  *
  * Original was deprecated in 4.1, removed in 4.3.
index d15fb9315fbf8a306139514f385659cbcaeb1e1c..423c6680e5db2ab8c89e999e5527a8c262b52213 100644 (file)
@@ -10,7 +10,7 @@
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 if ( ! current_user_can('manage_links') )
-       wp_die(__('You do not have sufficient permissions to add links to this site.'));
+       wp_die(__('Sorry, you are not allowed to add links to this site.'));
 
 $title = __('Add New Link');
 $parent_file = 'link-manager.php';
index 4dc3015179ac788d8a8589061829cadad30eda6f..79abe65b77093e65b1007869a0a53b1fddafc715 100644 (file)
@@ -9,7 +9,7 @@
 /** Load WordPress Administration Bootstrap */
 require_once( dirname( __FILE__ ) . '/admin.php' );
 if ( ! current_user_can( 'manage_links' ) )
-       wp_die( __( 'You do not have sufficient permissions to edit the links for this site.' ) );
+       wp_die( __( 'Sorry, you are not allowed to edit the links for this site.' ) );
 
 $wp_list_table = _get_list_table('WP_Links_List_Table');
 
@@ -68,7 +68,7 @@ get_current_screen()->set_screen_reader_content( array(
 include_once( ABSPATH . 'wp-admin/admin-header.php' );
 
 if ( ! current_user_can('manage_links') )
-       wp_die(__("You do not have sufficient permissions to edit the links for this site."));
+       wp_die(__('Sorry, you are not allowed to edit the links for this site.'));
 
 ?>
 
index 802745fc2c4e28ebaa48c44e4c3b1b8aa4b1a2da..bcfe578fb0ee4ec68e0c56567ef94b9b811791ca 100644 (file)
@@ -3,7 +3,7 @@
  * Manage link administration actions.
  *
  * This page is accessed by the link management pages and handles the forms and
- * AJAX processes for link actions.
+ * Ajax processes for link actions.
  *
  * @package WordPress
  * @subpackage Administration
index 011ae3c890796ac310ed7c2c0a091e5a3905b0b2..d536c1925aa7bb3d2cef0f54f454588b330dbbe6 100644 (file)
@@ -8,7 +8,10 @@
 error_reporting(0);
 
 /** Set ABSPATH for execution */
-define( 'ABSPATH', dirname(dirname(__FILE__)) . '/' );
+if ( ! defined( 'ABSPATH' ) ) {
+       define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
+}
+
 define( 'WPINC', 'wp-includes' );
 
 $load = $_GET['load'];
index a461ae268d6898c3c90a1234f91b1a3d0dd9f179..de208814180c33b1e74045babafde4ab3f29a96e 100644 (file)
@@ -8,7 +8,10 @@
 error_reporting(0);
 
 /** Set ABSPATH for execution */
-define( 'ABSPATH', dirname(dirname(__FILE__)) . '/' );
+if ( ! defined( 'ABSPATH' ) ) {
+       define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
+}
+
 define( 'WPINC', 'wp-includes' );
 
 require( ABSPATH . 'wp-admin/includes/noop.php' );
index 7849ff9494f7ec481ec0f9ee7d169bd58d5113ff..aa7028878b6459712dc9923c3f50521fbc778ed9 100644 (file)
@@ -31,7 +31,13 @@ if ( ! defined( 'WP_ALLOW_REPAIR' ) ) {
 
        echo '<h1 class="screen-reader-text">' . __( 'Allow automatic database repair' ) . '</h1>';
 
-       echo '<p>' . __( 'To allow use of this page to automatically repair database problems, please add the following line to your <code>wp-config.php</code> file. Once this line is added to your config, reload this page.' ) . "</p><p><code>define('WP_ALLOW_REPAIR', true);</code></p>";
+       echo '<p>';
+       printf(
+               /* translators: %s: wp-config.php */
+               __( 'To allow use of this page to automatically repair database problems, please add the following line to your %s file. Once this line is added to your config, reload this page.' ),
+               '<code>wp-config.php</code>'
+       );
+       echo "</p><p><code>define('WP_ALLOW_REPAIR', true);</code></p>";
 
        $default_key     = 'put your unique phrase here';
        $missing_key     = false;
@@ -80,7 +86,7 @@ if ( ! defined( 'WP_ALLOW_REPAIR' ) ) {
        }
 
        /**
-        * Filter additional database tables to repair.
+        * Filters additional database tables to repair.
         *
         * @since 3.0.0
         *
index 9d26651e85546b9c6ae70e0aea7b26ee4e8846ca..86d8810a9c58117a63e608b2c7420654f3c972b4 100644 (file)
@@ -13,7 +13,7 @@
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 if (!current_user_can('upload_files'))
-       wp_die(__('You do not have permission to upload files.'));
+       wp_die(__('Sorry, you are not allowed to upload files.'));
 
 wp_enqueue_script('plupload-handlers');
 
index 0c9c5e2554fff0c82134de123b1f4ebb267a479a..5f87301e2b7dfb40584eb0053ad65a3368165dfa 100644 (file)
@@ -16,7 +16,7 @@ if ( ! isset( $_GET['inline'] ) )
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 if ( ! current_user_can( 'upload_files' ) ) {
-       wp_die( __( 'You do not have permission to upload files.' ), 403 );
+       wp_die( __( 'Sorry, you are not allowed to upload files.' ), 403 );
 }
 
 wp_enqueue_script('plupload-handlers');
@@ -43,7 +43,7 @@ if ( isset( $action ) && $action == 'edit' && !$ID ) {
 if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to edit this item.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
                403
        );
 }
@@ -53,7 +53,7 @@ if ( isset($_GET['type']) ) {
        $type = strval($_GET['type']);
 } else {
        /**
-        * Filter the default media upload type in the legacy (pre-3.5.0) media popup.
+        * Filters the default media upload type in the legacy (pre-3.5.0) media popup.
         *
         * @since 2.5.0
         *
@@ -68,7 +68,7 @@ if ( isset($_GET['tab']) ) {
        $tab = strval($_GET['tab']);
 } else {
        /**
-        * Filter the default tab in the legacy (pre-3.5.0) media popup.
+        * Filters the default tab in the legacy (pre-3.5.0) media popup.
         *
         * @since 2.5.0
         *
index 5f13d3ad163714ffbf58078293e2c29d90036881..88fa51ed483d332d644490a1a8f37ca7143da667 100644 (file)
@@ -20,7 +20,7 @@ case 'editattachment' :
        check_admin_referer('media-form');
 
        if ( !current_user_can('edit_post', $attachment_id) )
-               wp_die ( __('You are not allowed to edit this attachment.') );
+               wp_die ( __('Sorry, you are not allowed to edit this attachment.') );
 
        $errors = media_upload_form_handler();
 
@@ -54,7 +54,7 @@ case 'edit' :
        $att_id = (int) $_GET['attachment_id'];
 
        if ( !current_user_can('edit_post', $att_id) )
-               wp_die ( __('You are not allowed to edit this attachment.') );
+               wp_die ( __('Sorry, you are not allowed to edit this attachment.') );
 
        $att = get_post($att_id);
 
index 516ebd3c8d07f5ef8a035056ce57d14ecc17781e..df7744db56985453b9dad652d2f4a5779c247b98 100644 (file)
@@ -27,7 +27,7 @@ $self = preg_replace('|^.*/mu-plugins/|i', '', $self);
 global $menu, $submenu, $parent_file, $submenu_file;
 
 /**
- * Filter the parent file of an admin menu sub-menu item.
+ * Filters the parent file of an admin menu sub-menu item.
  *
  * Allows plugins to move sub-menu items around.
  *
@@ -38,7 +38,7 @@ global $menu, $submenu, $parent_file, $submenu_file;
 $parent_file = apply_filters( 'parent_file', $parent_file );
 
 /**
- * Filter the file of an admin menu sub-menu item.
+ * Filters the file of an admin menu sub-menu item.
  *
  * @since 4.4.0
  *
index f85ebd3ab6dd65ed777a04dd32b8cd3b74101044..6c0b38f723b1edfff79891bc098b176313e9a6b7 100644 (file)
@@ -265,7 +265,7 @@ $_wp_real_parent_file['page-new.php'] = 'edit.php?post_type=page';
 $_wp_real_parent_file['wpmu-admin.php'] = 'tools.php';
 $_wp_real_parent_file['ms-admin.php'] = 'tools.php';
 
-// ensure we're backwards compatible
+// Ensure backward compatibility.
 $compat = array(
        'index' => 'dashboard',
        'edit' => 'posts',
index 67f657b6d058947bcd27d52ef739b6865a811874..9424ae19702bac6b9e461def14b3e3e938f3d2db 100644 (file)
@@ -13,10 +13,10 @@ if ( !is_multisite() )
        wp_die( __( 'Multisite support is not enabled.' ) );
 
 if ( ! current_user_can( 'delete_site' ) )
-       wp_die(__( 'You do not have sufficient permissions to delete this site.'));
+       wp_die(__( 'Sorry, you are not allowed to delete this site.'));
 
 if ( isset( $_GET['h'] ) && $_GET['h'] != '' && get_option( 'delete_blog_hash' ) != false ) {
-       if ( get_option( 'delete_blog_hash' ) == $_GET['h'] ) {
+       if ( hash_equals( get_option( 'delete_blog_hash' ), $_GET['h'] ) ) {
                wpmu_delete_blog( $wpdb->blogid );
                wp_die( sprintf( __( 'Thank you for using %s, your site has been deleted. Happy trails to you until we meet again.' ), $current_site->site_name ) );
        } else {
@@ -60,7 +60,7 @@ Thanks for using the site,
 Webmaster
 ###SITE_NAME###" );
        /**
-        * Filter the email content sent when a site in a Multisite network is deleted.
+        * Filters the email content sent when a site in a Multisite network is deleted.
         *
         * @since 3.0.0
         *
index efefb44edc8f55b4e4b24da2ee34c23fbb626221..6ec3367c929644e0f67c3370eb45e9a2ed5195c4 100644 (file)
@@ -13,7 +13,7 @@ if ( !is_multisite() )
        wp_die( __( 'Multisite support is not enabled.' ) );
 
 if ( ! current_user_can('read') )
-       wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
+       wp_die( __( 'Sorry, you are not allowed to access this page.' ) );
 
 $action = isset( $_POST['action'] ) ? $_POST['action'] : 'splash';
 
@@ -109,7 +109,7 @@ else :
                echo "<li>";
                echo "<h3>{$user_blog->blogname}</h3>";
                /**
-                * Filter the row links displayed for each site on the My Sites screen.
+                * Filters the row links displayed for each site on the My Sites screen.
                 *
                 * @since MU
                 *
index 1acfde55de41079f845bbfee47fbf1b385f26c61..72de2a92c9ed6d3235151e7af9d495f66b1ec0b4 100644 (file)
@@ -22,7 +22,7 @@ if ( ! current_theme_supports( 'menus' ) && ! current_theme_supports( 'widgets'
 if ( ! current_user_can( 'edit_theme_options' ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to edit theme options on this site.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>',
                403
        );
 }
@@ -49,102 +49,6 @@ $num_locations = count( array_keys( $locations ) );
 // Allowed actions: add, update, delete
 $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'edit';
 
-/**
- * If a JSON blob of navigation menu data is in POST data, expand it and inject
- * it into `$_POST` to avoid PHP `max_input_vars` limitations. See #14134.
- *
- * @ignore
- * @since 4.5.3
- * @access private
- */
-function _wp_expand_nav_menu_post_data() {
-       if ( ! isset( $_POST['nav-menu-data'] ) ) {
-               return;
-       }
-
-       $data = json_decode( stripslashes( $_POST['nav-menu-data'] ) );
-
-       if ( ! is_null( $data ) && $data ) {
-               foreach ( $data as $post_input_data ) {
-                       // For input names that are arrays (e.g. `menu-item-db-id[3][4][5]`),
-                       // derive the array path keys via regex and set the value in $_POST.
-                       preg_match( '#([^\[]*)(\[(.+)\])?#', $post_input_data->name, $matches );
-
-                       $array_bits = array( $matches[1] );
-
-                       if ( isset( $matches[3] ) ) {
-                               $array_bits = array_merge( $array_bits, explode( '][', $matches[3] ) );
-                       }
-
-                       $new_post_data = array();
-
-                       // Build the new array value from leaf to trunk.
-                       for ( $i = count( $array_bits ) - 1; $i >= 0; $i -- ) {
-                               if ( $i == count( $array_bits ) - 1 ) {
-                                       $new_post_data[ $array_bits[ $i ] ] = wp_slash( $post_input_data->value );
-                               } else {
-                                       $new_post_data = array( $array_bits[ $i ] => $new_post_data );
-                               }
-                       }
-
-                       $_POST = array_replace_recursive( $_POST, $new_post_data );
-               }
-       }
-}
-
-if ( ! function_exists( 'array_replace_recursive' ) ) :
-       /**
-        * PHP-agnostic version of {@link array_replace_recursive()}.
-        *
-        * The array_replace_recursive() function is a PHP 5.3 function. WordPress
-        * currently supports down to PHP 5.2, so this method is a workaround
-        * for PHP 5.2.
-        *
-        * Note: array_replace_recursive() supports infinite arguments, but for our use-
-        * case, we only need to support two arguments.
-        *
-        * Subject to removal once WordPress makes PHP 5.3.0 the minimum requirement.
-        *
-        * @since 4.5.3
-        *
-        * @see http://php.net/manual/en/function.array-replace-recursive.php#109390
-        *
-        * @param  array $base         Array with keys needing to be replaced.
-        * @param  array $replacements Array with the replaced keys.
-        *
-        * @return array
-        */
-       function array_replace_recursive( $base = array(), $replacements = array() ) {
-               foreach ( array_slice( func_get_args(), 1 ) as $replacements ) {
-                       $bref_stack = array( &$base );
-                       $head_stack = array( $replacements );
-
-                       do {
-                               end( $bref_stack );
-
-                               $bref = &$bref_stack[ key( $bref_stack ) ];
-                               $head = array_pop( $head_stack );
-
-                               unset( $bref_stack[ key( $bref_stack ) ] );
-
-                               foreach ( array_keys( $head ) as $key ) {
-                                       if ( isset( $key, $bref ) &&
-                                            isset( $bref[ $key ] ) && is_array( $bref[ $key ] ) &&
-                                            isset( $head[ $key ] ) && is_array( $head[ $key ] )
-                                       ) {
-                                               $bref_stack[] = &$bref[ $key ];
-                                               $head_stack[] = $head[ $key ];
-                                       } else {
-                                               $bref[ $key ] = $head[ $key ];
-                                       }
-                               }
-                       } while ( count( $head_stack ) );
-               }
-
-               return $base;
-       }
-endif;
-
 /*
  * If a JSON blob of navigation menu data is found, expand it and inject it
  * into `$_POST` to avoid PHP `max_input_vars` limitations. See #14134.
@@ -681,7 +585,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
                                        array( 'autofocus' => $focus ),
                                        'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
                                ), admin_url( 'customize.php' ) ) ),
-                               __( 'Manage in Customizer' )
+                               __( 'Manage with Live Preview' )
                        );
                endif;
                ?>
@@ -789,7 +693,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
                                                        }
 
                                                        /**
-                                                        * Filter the number of locations listed per menu in the drop-down select.
+                                                        * Filters the number of locations listed per menu in the drop-down select.
                                                         *
                                                         * @since 3.6.0
                                                         *
index 38f344763f66daa64185a8cda2577f1ba31ae5f3..386bb33bbe463884f2cb178b820a119c5d6306ac 100644 (file)
@@ -16,7 +16,7 @@ define( 'WP_INSTALLING_NETWORK', true );
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 if ( ! is_super_admin() ) {
-       wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
+       wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
 }
 
 if ( is_multisite() ) {
index ad760f3e21a97a5df028c971db267762e735bc03..66b899984304c62000aaf761c77093240dec31d4 100644 (file)
@@ -18,7 +18,7 @@ if ( ! is_multisite() )
 $redirect_network_admin_request = 0 !== strcasecmp( $current_blog->domain, $current_site->domain ) || 0 !== strcasecmp( $current_blog->path, $current_site->path );
 
 /**
- * Filter whether to redirect the request to the Network Admin.
+ * Filters whether to redirect the request to the Network Admin.
  *
  * @since 3.2.0
  *
index 5c2bfe887dae73cd2d8349f3e43ee116a00faecc..796191f0183b9b30df2134eb8dcbb892fc37a5f5 100644 (file)
@@ -17,7 +17,7 @@ if ( !is_multisite() )
        wp_die( __( 'Multisite support is not enabled.' ) );
 
 if ( ! current_user_can( 'manage_network' ) )
-       wp_die( __( 'You do not have permission to access this page.' ), 403 );
+       wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
 $title = __( 'Dashboard' );
 $parent_file = 'index.php';
index 5e0fea86ace49f0333f5ae48af7203dc0ee767db..8b5f00269b3c0b8e537200e65ac32451c8aaa9a7 100644 (file)
@@ -24,7 +24,7 @@ $submenu['index.php'][15] = array( __( 'Upgrade Network' ), 'manage_network', 'u
 $menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );
 
 /* translators: Sites menu item */
-$menu[5] = array(__('Sites'), 'manage_sites', 'sites.php', '', 'menu-top menu-icon-site', 'menu-site', 'dashicons-admin-network');
+$menu[5] = array(__('Sites'), 'manage_sites', 'sites.php', '', 'menu-top menu-icon-site', 'menu-site', 'dashicons-admin-multisite');
 $submenu['sites.php'][5]  = array( __('All Sites'), 'manage_sites', 'sites.php' );
 $submenu['sites.php'][10]  = array( _x('Add New', 'site'), 'create_sites', 'site-new.php' );
 
@@ -59,4 +59,4 @@ unset($update_data);
 
 $menu[99] = array( '', 'exist', 'separator-last', '', 'wp-menu-separator' );
 
-require_once(ABSPATH . 'wp-admin/includes/menu.php');
\ No newline at end of file
+require_once(ABSPATH . 'wp-admin/includes/menu.php');
index bc111d14c0ff86471a9283638ea171669b332c99..bad65475e75d3d4394089ed6ef0256a7ec6f472e 100644 (file)
@@ -17,7 +17,7 @@ if ( ! is_multisite() )
        wp_die( __( 'Multisite support is not enabled.' ) );
 
 if ( ! current_user_can( 'manage_network_options' ) )
-       wp_die( __( 'You do not have permission to access this page.' ), 403 );
+       wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
 $title = __( 'Network Settings' );
 $parent_file = 'settings.php';
@@ -62,6 +62,7 @@ if ( $_POST ) {
                'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author',
                'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'global_terms_enabled',
                'illegal_names', 'limited_email_domains', 'banned_email_domains', 'WPLANG', 'admin_email',
+               'first_comment_email',
        );
 
        // Handle translation install.
@@ -93,7 +94,7 @@ if ( $_POST ) {
 include( ABSPATH . 'wp-admin/admin-header.php' );
 
 if ( isset( $_GET['updated'] ) ) {
-       ?><div id="message" class="updated notice is-dismissible"><p><?php _e( 'Options saved.' ) ?></p></div><?php
+       ?><div id="message" class="updated notice is-dismissible"><p><?php _e( 'Settings saved.' ) ?></p></div><?php
 }
 ?>
 
@@ -264,6 +265,15 @@ if ( isset( $_GET['updated'] ) ) {
                                        </p>
                                </td>
                        </tr>
+                       <tr>
+                               <th scope="row"><label for="first_comment_email"><?php _e( 'First Comment Email' ) ?></label></th>
+                               <td>
+                                       <input type="text" size="40" name="first_comment_email" id="first_comment_email" aria-describedby="first-comment-email-desc" value="<?php echo esc_attr( get_site_option( 'first_comment_email' ) ); ?>" />
+                                       <p class="description" id="first-comment-email-desc">
+                                               <?php _e( 'The email address of the first comment author on a new site.' ) ?>
+                                       </p>
+                               </td>
+                       </tr>
                        <tr>
                                <th scope="row"><label for="first_comment_url"><?php _e( 'First Comment URL' ) ?></label></th>
                                <td>
@@ -347,7 +357,7 @@ if ( isset( $_GET['updated'] ) ) {
                        <?php
                        $menu_perms = get_site_option( 'menu_items' );
                        /**
-                        * Filter available network-wide administration menu options.
+                        * Filters available network-wide administration menu options.
                         *
                         * Options returned to this filter are output as individual checkboxes that, when selected,
                         * enable site administrator access to the specified administration menu in certain contexts.
index b18d804438fd2291b90aa0df206ad7c4b2420c81..cb5ec6e249180969a229143377abb52b91b24227 100644 (file)
@@ -15,7 +15,7 @@ if ( ! is_multisite() ) {
 }
 
 if ( ! current_user_can( 'manage_sites' ) ) {
-       wp_die( __( 'You do not have sufficient permissions to edit this site.' ) );
+       wp_die( __( 'Sorry, you are not allowed to edit this site.' ) );
 }
 
 get_current_screen()->add_help_tab( array(
@@ -47,7 +47,7 @@ if ( ! $details ) {
 }
 
 if ( ! can_edit_network( $details->site_id ) ) {
-       wp_die( __( 'You do not have permission to access this page.' ), 403 );
+       wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 }
 
 $parsed_scheme = parse_url( $details->siteurl, PHP_URL_SCHEME );
@@ -143,21 +143,13 @@ require( ABSPATH . 'wp-admin/admin-header.php' );
 <div class="wrap">
 <h1 id="edit-site"><?php echo $title; ?></h1>
 <p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id, '/' ) ); ?>"><?php _e( 'Visit' ); ?></a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>"><?php _e( 'Dashboard' ); ?></a></p>
-<h2 class="nav-tab-wrapper nav-tab-small wp-clearfix">
-<?php
-$tabs = array(
-       'site-info'     => array( 'label' => __( 'Info' ),     'url' => 'site-info.php'     ),
-       'site-users'    => array( 'label' => __( 'Users' ),    'url' => 'site-users.php'    ),
-       'site-themes'   => array( 'label' => __( 'Themes' ),   'url' => 'site-themes.php'   ),
-       'site-settings' => array( 'label' => __( 'Settings' ), 'url' => 'site-settings.php' ),
-);
-foreach ( $tabs as $tab_id => $tab ) {
-       $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : '';
-       echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>';
-}
-?>
-</h2>
 <?php
+
+network_edit_site_nav( array(
+       'blog_id'  => $id,
+       'selected' => 'site-info'
+) );
+
 if ( ! empty( $messages ) ) {
        foreach ( $messages as $msg ) {
                echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
index 35d34e4ac699feafe60d17dea9205cc592f918b4..7882d0e378865ea81a258aa056003608d64ae127 100644 (file)
@@ -17,7 +17,7 @@ if ( ! is_multisite() )
        wp_die( __( 'Multisite support is not enabled.' ) );
 
 if ( ! current_user_can( 'manage_sites' ) )
-       wp_die( __( 'You do not have sufficient permissions to add sites to this network.' ) );
+       wp_die( __( 'Sorry, you are not allowed to add sites to this network.' ) );
 
 get_current_screen()->add_help_tab( array(
        'id'      => 'overview',
index b945ea74a6f48f8263d8258c64e161b1dbfeeb8d..550fae96a96a72604cdc06895dcfec84f880f05d 100644 (file)
@@ -14,7 +14,7 @@ if ( ! is_multisite() )
        wp_die( __( 'Multisite support is not enabled.' ) );
 
 if ( ! current_user_can( 'manage_sites' ) )
-       wp_die( __( 'You do not have sufficient permissions to edit this site.' ) );
+       wp_die( __( 'Sorry, you are not allowed to edit this site.' ) );
 
 get_current_screen()->add_help_tab( array(
        'id'      => 'overview',
@@ -44,7 +44,7 @@ if ( ! $details ) {
 }
 
 if ( !can_edit_network( $details->site_id ) )
-       wp_die( __( 'You do not have permission to access this page.' ), 403 );
+       wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
 $is_main_site = is_main_site( $id );
 
@@ -95,21 +95,14 @@ require( ABSPATH . 'wp-admin/admin-header.php' );
 <div class="wrap">
 <h1 id="edit-site"><?php echo $title; ?></h1>
 <p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id, '/' ) ); ?>"><?php _e( 'Visit' ); ?></a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>"><?php _e( 'Dashboard' ); ?></a></p>
-<h2 class="nav-tab-wrapper nav-tab-small wp-clearfix">
-<?php
-$tabs = array(
-       'site-info'     => array( 'label' => __( 'Info' ),     'url' => 'site-info.php'     ),
-       'site-users'    => array( 'label' => __( 'Users' ),    'url' => 'site-users.php'    ),
-       'site-themes'   => array( 'label' => __( 'Themes' ),   'url' => 'site-themes.php'   ),
-       'site-settings' => array( 'label' => __( 'Settings' ), 'url' => 'site-settings.php' ),
-);
-foreach ( $tabs as $tab_id => $tab ) {
-       $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : '';
-       echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>';
-}
-?>
-</h2>
+
 <?php
+
+network_edit_site_nav( array(
+       'blog_id'  => $id,
+       'selected' => 'site-settings'
+) );
+
 if ( ! empty( $messages ) ) {
        foreach ( $messages as $msg )
                echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
index d48e2ca8d2bb98f0f46f2d0f74d6af69660b5f63..f545f475625142c49e53e73bccfd8b04936463d2 100644 (file)
@@ -14,7 +14,7 @@ if ( ! is_multisite() )
        wp_die( __( 'Multisite support is not enabled.' ) );
 
 if ( ! current_user_can( 'manage_sites' ) )
-       wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) );
+       wp_die( __( 'Sorry, you are not allowed to manage themes for this site.' ) );
 
 get_current_screen()->add_help_tab( array(
        'id'      => 'overview',
@@ -67,7 +67,7 @@ if ( ! $details ) {
 }
 
 if ( !can_edit_network( $details->site_id ) )
-       wp_die( __( 'You do not have permission to access this page.' ), 403 );
+       wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
 $is_main_site = is_main_site( $id );
 
@@ -149,20 +149,12 @@ require( ABSPATH . 'wp-admin/admin-header.php' ); ?>
 <div class="wrap">
 <h1 id="edit-site"><?php echo $title; ?></h1>
 <p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id, '/' ) ); ?>"><?php _e( 'Visit' ); ?></a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>"><?php _e( 'Dashboard' ); ?></a></p>
-<h2 class="nav-tab-wrapper nav-tab-small wp-clearfix">
 <?php
-$tabs = array(
-       'site-info'     => array( 'label' => __( 'Info' ),     'url' => 'site-info.php'     ),
-       'site-users'    => array( 'label' => __( 'Users' ),    'url' => 'site-users.php'    ),
-       'site-themes'   => array( 'label' => __( 'Themes' ),   'url' => 'site-themes.php'   ),
-       'site-settings' => array( 'label' => __( 'Settings' ), 'url' => 'site-settings.php' ),
-);
-foreach ( $tabs as $tab_id => $tab ) {
-       $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : '';
-       echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>';
-}
-?>
-</h2><?php
+
+network_edit_site_nav( array(
+       'blog_id'  => $id,
+       'selected' => 'site-themes'
+) );
 
 if ( isset( $_GET['enabled'] ) ) {
        $enabled = absint( $_GET['enabled'] );
index 77122e82c21b27038d3aa4ef4050c5206b6cefcb..a3857b70d84fdc2f19ba645a06c76599773084b6 100644 (file)
@@ -14,7 +14,7 @@ if ( ! is_multisite() )
        wp_die( __( 'Multisite support is not enabled.' ) );
 
 if ( ! current_user_can('manage_sites') )
-       wp_die(__('You do not have sufficient permissions to edit this site.'));
+       wp_die(__('Sorry, you are not allowed to edit this site.'));
 
 $wp_list_table = _get_list_table('WP_Users_List_Table');
 $wp_list_table->prepare_items();
@@ -60,7 +60,7 @@ if ( ! $details ) {
 }
 
 if ( ! can_edit_network( $details->site_id ) )
-       wp_die( __( 'You do not have permission to access this page.' ), 403 );
+       wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
 $is_main_site = is_main_site( $id );
 
@@ -185,7 +185,7 @@ $parent_file = 'sites.php';
 $submenu_file = 'sites.php';
 
 /**
- * Filter whether to show the Add Existing User form on the Multisite Users screen.
+ * Filters whether to show the Add Existing User form on the Multisite Users screen.
  *
  * @since 3.1.0
  *
@@ -204,20 +204,12 @@ var current_site_id = <?php echo $id; ?>;
 <div class="wrap">
 <h1 id="edit-site"><?php echo $title; ?></h1>
 <p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id, '/' ) ); ?>"><?php _e( 'Visit' ); ?></a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>"><?php _e( 'Dashboard' ); ?></a></p>
-<h2 class="nav-tab-wrapper nav-tab-small wp-clearfix">
 <?php
-$tabs = array(
-       'site-info'     => array( 'label' => __( 'Info' ),     'url' => 'site-info.php'     ),
-       'site-users'    => array( 'label' => __( 'Users' ),    'url' => 'site-users.php'    ),
-       'site-themes'   => array( 'label' => __( 'Themes' ),   'url' => 'site-themes.php'   ),
-       'site-settings' => array( 'label' => __( 'Settings' ), 'url' => 'site-settings.php' ),
-);
-foreach ( $tabs as $tab_id => $tab ) {
-       $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : '';
-       echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>';
-}
-?>
-</h2><?php
+
+network_edit_site_nav( array(
+       'blog_id'  => $id,
+       'selected' => 'site-users'
+) );
 
 if ( isset($_GET['update']) ) :
        switch($_GET['update']) {
@@ -300,7 +292,7 @@ if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_us
 
 <?php
 /**
- * Filter whether to show the Add New User form on the Multisite Users screen.
+ * Filters whether to show the Add New User form on the Multisite Users screen.
  *
  * @since 3.1.0
  *
index e03fad1d8a8a690494cb661e42780113b7611b66..724c2cf52ffa0b0eeb5c6650c121864008b476f5 100644 (file)
@@ -14,7 +14,7 @@ if ( ! is_multisite() )
        wp_die( __( 'Multisite support is not enabled.' ) );
 
 if ( ! current_user_can( 'manage_sites' ) )
-       wp_die( __( 'You do not have permission to access this page.' ), 403 );
+       wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
 $wp_list_table = _get_list_table( 'WP_MS_Sites_List_Table' );
 $pagenum = $wp_list_table->get_pagenum();
@@ -91,7 +91,7 @@ if ( isset( $_GET['action'] ) ) {
                }
 
                if ( $current_site->blog_id == $id ) {
-                       wp_die( __( 'You are not allowed to change the current site.' ) );
+                       wp_die( __( 'Sorry, you are not allowed to change the current site.' ) );
                }
 
                $site_details = get_blog_details( $id );
@@ -126,7 +126,7 @@ if ( isset( $_GET['action'] ) ) {
 
                case 'deleteblog':
                        if ( ! current_user_can( 'delete_sites' ) )
-                               wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) );
+                               wp_die( __( 'Sorry, you are not allowed to access this page.' ), '', array( 'response' => 403 ) );
 
                        $updated_action = 'not_deleted';
                        if ( $id != '0' && $id != $current_site->blog_id && current_user_can( 'delete_site', $id ) ) {
@@ -144,7 +144,7 @@ if ( isset( $_GET['action'] ) ) {
                                                switch ( $doaction ) {
                                                        case 'delete':
                                                                if ( ! current_user_can( 'delete_site', $val ) )
-                                                                       wp_die( __( 'You are not allowed to delete the site.' ) );
+                                                                       wp_die( __( 'Sorry, you are not allowed to delete the site.' ) );
 
                                                                $updated_action = 'all_delete';
                                                                wpmu_delete_blog( $val, true );
@@ -157,7 +157,7 @@ if ( isset( $_GET['action'] ) ) {
                                                        break;
                                                }
                                        } else {
-                                               wp_die( __( 'You are not allowed to change the current site.' ) );
+                                               wp_die( __( 'Sorry, you are not allowed to change the current site.' ) );
                                        }
                                }
                        } else {
@@ -237,7 +237,7 @@ if ( isset( $_GET['updated'] ) ) {
                        $msg = __( 'Site deleted.' );
                break;
                case 'not_deleted':
-                       $msg = __( 'You do not have permission to delete that site.' );
+                       $msg = __( 'Sorry, you are not allowed to delete that site.' );
                break;
                case 'archiveblog':
                        $msg = __( 'Site archived.' );
@@ -259,7 +259,7 @@ if ( isset( $_GET['updated'] ) ) {
                break;
                default:
                        /**
-                        * Filter a specific, non-default site-updated message in the Network admin.
+                        * Filters a specific, non-default site-updated message in the Network admin.
                         *
                         * The dynamic portion of the hook name, `$_GET['updated']`, refers to the
                         * non-default site update action.
index fbc2aa033c64a726c37b12850f10460d617a56b6..171afc359da942bff2052b8765deefadbbad38d3 100644 (file)
@@ -14,7 +14,7 @@ if ( ! is_multisite() )
        wp_die( __( 'Multisite support is not enabled.' ) );
 
 if ( !current_user_can('manage_network_themes') )
-       wp_die( __( 'You do not have sufficient permissions to manage network themes.' ) );
+       wp_die( __( 'Sorry, you are not allowed to manage network themes.' ) );
 
 $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
 $pagenum = $wp_list_table->get_pagenum();
@@ -29,12 +29,10 @@ $_SERVER['REQUEST_URI'] = remove_query_arg( $temp_args, $_SERVER['REQUEST_URI']
 $referer = remove_query_arg( $temp_args, wp_get_referer() );
 
 if ( $action ) {
-       $allowed_themes = get_site_option( 'allowedthemes' );
        switch ( $action ) {
                case 'enable':
                        check_admin_referer('enable-theme_' . $_GET['theme']);
-                       $allowed_themes[ $_GET['theme'] ] = true;
-                       update_site_option( 'allowedthemes', $allowed_themes );
+                       WP_Theme::network_enable_theme( $_GET['theme'] );
                        if ( false === strpos( $referer, '/network/themes.php' ) )
                                wp_redirect( network_admin_url( 'themes.php?enabled=1' ) );
                        else
@@ -42,8 +40,7 @@ if ( $action ) {
                        exit;
                case 'disable':
                        check_admin_referer('disable-theme_' . $_GET['theme']);
-                       unset( $allowed_themes[ $_GET['theme'] ] );
-                       update_site_option( 'allowedthemes', $allowed_themes );
+                       WP_Theme::network_disable_theme( $_GET['theme'] );
                        wp_safe_redirect( add_query_arg( 'disabled', '1', $referer ) );
                        exit;
                case 'enable-selected':
@@ -53,9 +50,7 @@ if ( $action ) {
                                wp_safe_redirect( add_query_arg( 'error', 'none', $referer ) );
                                exit;
                        }
-                       foreach ( (array) $themes as $theme )
-                               $allowed_themes[ $theme ] = true;
-                       update_site_option( 'allowedthemes', $allowed_themes );
+                       WP_Theme::network_enable_theme( (array) $themes );
                        wp_safe_redirect( add_query_arg( 'enabled', count( $themes ), $referer ) );
                        exit;
                case 'disable-selected':
@@ -65,9 +60,7 @@ if ( $action ) {
                                wp_safe_redirect( add_query_arg( 'error', 'none', $referer ) );
                                exit;
                        }
-                       foreach ( (array) $themes as $theme )
-                               unset( $allowed_themes[ $theme ] );
-                       update_site_option( 'allowedthemes', $allowed_themes );
+                       WP_Theme::network_disable_theme( (array) $themes );
                        wp_safe_redirect( add_query_arg( 'disabled', count( $themes ), $referer ) );
                        exit;
                case 'update-selected' :
@@ -97,7 +90,7 @@ if ( $action ) {
                        exit;
                case 'delete-selected':
                        if ( ! current_user_can( 'delete_themes' ) ) {
-                               wp_die( __('You do not have sufficient permissions to delete themes for this site.') );
+                               wp_die( __('Sorry, you are not allowed to delete themes for this site.') );
                        }
 
                        check_admin_referer( 'bulk-themes' );
@@ -235,6 +228,7 @@ get_current_screen()->set_screen_reader_content( array(
 $title = __('Themes');
 $parent_file = 'themes.php';
 
+wp_enqueue_script( 'updates' );
 wp_enqueue_script( 'theme-preview' );
 
 require_once(ABSPATH . 'wp-admin/admin-header.php');
@@ -294,7 +288,7 @@ if ( 'broken' == $status )
        echo '<p class="clear">' . __( 'The following themes are installed but incomplete.' ) . '</p>';
 ?>
 
-<form method="post">
+<form id="bulk-action-form" method="post">
 <input type="hidden" name="theme_status" value="<?php echo esc_attr($status) ?>" />
 <input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" />
 
@@ -304,4 +298,8 @@ if ( 'broken' == $status )
 </div>
 
 <?php
+wp_print_request_filesystem_credentials_modal();
+wp_print_admin_notice_templates();
+wp_print_update_row_templates();
+
 include(ABSPATH . 'wp-admin/admin-footer.php');
index ab2183fd53994786c9f47491b1fab2248feb2928..199838cf57233b44c367ffd181aeae2e27cab23e 100644 (file)
@@ -36,7 +36,7 @@ get_current_screen()->set_help_sidebar(
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
 if ( ! current_user_can( 'manage_network' ) )
-       wp_die( __( 'You do not have permission to access this page.' ), 403 );
+       wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
 echo '<div class="wrap">';
 echo '<h1>' . __( 'Upgrade Network' ) . '</h1>';
@@ -69,7 +69,11 @@ switch ( $action ) {
 
                        echo "<li>$siteurl</li>";
 
-                       $response = wp_remote_get( $upgrade_url, array( 'timeout' => 120, 'httpversion' => '1.1' ) );
+                       $response = wp_remote_get( $upgrade_url, array(
+                               'timeout'     => 120,
+                               'httpversion' => '1.1',
+                               'sslverify'   => false,
+                       ) );
                        if ( is_wp_error( $response ) ) {
                                wp_die( sprintf(
                                        /* translators: 1: site url, 2: server error message */
index 8381e4d8a68f7af656c16b205d3aada6a260597d..fae3fcb0039f2ff93d88ac150b8032730013912c 100644 (file)
@@ -14,7 +14,7 @@ if ( ! is_multisite() )
        wp_die( __( 'Multisite support is not enabled.' ) );
 
 if ( ! current_user_can('create_users') )
-       wp_die(__('You do not have sufficient permissions to add users to this network.'));
+       wp_die(__('Sorry, you are not allowed to add users to this network.'));
 
 get_current_screen()->add_help_tab( array(
        'id'      => 'overview',
@@ -34,7 +34,7 @@ if ( isset($_REQUEST['action']) && 'add-user' == $_REQUEST['action'] ) {
        check_admin_referer( 'add-user', '_wpnonce_add-user' );
 
        if ( ! current_user_can( 'manage_network_users' ) )
-               wp_die( __( 'You do not have permission to access this page.' ), 403 );
+               wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
        if ( ! is_array( $_POST['user'] ) )
                wp_die( __( 'Cannot create an empty user.' ) );
index 4e56ca3339df377d9b7ae3eeeeaebc8b65466d62..cc3edc2ca34e29076ef9fc1819218ac6c0ea394a 100644 (file)
@@ -14,7 +14,7 @@ if ( ! is_multisite() )
        wp_die( __( 'Multisite support is not enabled.' ) );
 
 if ( ! current_user_can( 'manage_network_users' ) )
-       wp_die( __( 'You do not have permission to access this page.' ), 403 );
+       wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
 if ( isset( $_GET['action'] ) ) {
        /** This action is documented in wp-admin/network/edit.php */
@@ -23,7 +23,7 @@ if ( isset( $_GET['action'] ) ) {
        switch ( $_GET['action'] ) {
                case 'deleteuser':
                        if ( ! current_user_can( 'manage_network_users' ) )
-                               wp_die( __( 'You do not have permission to access this page.' ), 403 );
+                               wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
                        check_admin_referer( 'deleteuser' );
 
@@ -44,7 +44,7 @@ if ( isset( $_GET['action'] ) ) {
 
                case 'allusers':
                        if ( !current_user_can( 'manage_network_users' ) )
-                               wp_die( __( 'You do not have permission to access this page.' ), 403 );
+                               wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
                        if ( ( isset( $_POST['action']) || isset($_POST['action2'] ) ) && isset( $_POST['allusers'] ) ) {
                                check_admin_referer( 'bulk-users-network' );
@@ -57,7 +57,7 @@ if ( isset( $_GET['action'] ) ) {
                                                switch ( $doaction ) {
                                                        case 'delete':
                                                                if ( ! current_user_can( 'delete_users' ) )
-                                                                       wp_die( __( 'You do not have permission to access this page.' ), 403 );
+                                                                       wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
                                                                $title = __( 'Users' );
                                                                $parent_file = 'users.php';
                                                                require_once( ABSPATH . 'wp-admin/admin-header.php' );
@@ -106,7 +106,7 @@ if ( isset( $_GET['action'] ) ) {
                case 'dodelete':
                        check_admin_referer( 'ms-users-delete' );
                        if ( ! ( current_user_can( 'manage_network_users' ) && current_user_can( 'delete_users' ) ) )
-                               wp_die( __( 'You do not have permission to access this page.' ), 403 );
+                               wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
 
                        if ( ! empty( $_POST['blog'] ) && is_array( $_POST['blog'] ) ) {
                                foreach ( $_POST['blog'] as $id => $users ) {
@@ -161,7 +161,7 @@ get_current_screen()->add_help_tab( array(
                '<p>' . __('This table shows all users across the network and the sites to which they are assigned.') . '</p>' .
                '<p>' . __('Hover over any user on the list to make the edit links appear. The Edit link on the left will take you to their Edit User profile page; the Edit link on the right by any site name goes to an Edit Site screen for that site.') . '</p>' .
                '<p>' . __('You can also go to the user&#8217;s profile page by clicking on the individual username.') . '</p>' .
-               '<p>' . __('You can sort the table by clicking on any of the bold headings and switch between list and excerpt views by using the icons in the upper right.') . '</p>' .
+               '<p>' . __( 'You can sort the table by clicking on any of the table headings and switch between list and excerpt views by using the icons above the users list.' ) . '</p>' .
                '<p>' . __('The bulk action will permanently delete selected users, or mark/unmark those selected as spam. Spam users will have posts removed and will be unable to sign up again with the same email addresses.') . '</p>' .
                '<p>' . __('You can make an existing user an additional super admin by going to the Edit User profile page and checking the box to grant that privilege.') . '</p>'
 ) );
index 3d59195fd42a05c27bc8669fb1058ae688b27099..5b27e14a3cefbc68f8e3ff48a9b5c457e3d4fb62 100644 (file)
@@ -9,7 +9,7 @@
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 if ( ! current_user_can( 'manage_options' ) )
-       wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
+       wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
 
 $title = __('Discussion Settings');
 $parent_file = 'options-general.php';
@@ -78,7 +78,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
 <input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked('1', get_option('thread_comments')); ?> />
 <?php
 /**
- * Filter the maximum depth of threaded/nested comments.
+ * Filters the maximum depth of threaded/nested comments.
  *
  * @since 2.7.0.
  *
@@ -195,13 +195,13 @@ $show_avatars = get_option( 'show_avatars' );
 
 <?php
 $ratings = array(
-       /* translators: Content suitability rating: http://bit.ly/89QxZA */
+       /* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
        'G' => __('G &#8212; Suitable for all audiences'),
-       /* translators: Content suitability rating: http://bit.ly/89QxZA */
+       /* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
        'PG' => __('PG &#8212; Possibly offensive, usually for audiences 13 and above'),
-       /* translators: Content suitability rating: http://bit.ly/89QxZA */
+       /* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
        'R' => __('R &#8212; Intended for adult audiences above 17'),
-       /* translators: Content suitability rating: http://bit.ly/89QxZA */
+       /* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
        'X' => __('X &#8212; Even more mature than above')
 );
 foreach ($ratings as $key => $rating) :
@@ -229,7 +229,7 @@ $avatar_defaults = array(
        'retro' => __('Retro (Generated)')
 );
 /**
- * Filter the default avatars.
+ * Filters the default avatars.
  *
  * Avatars are stored in key/value pairs, where the key is option value,
  * and the name is the displayed avatar name.
@@ -240,7 +240,6 @@ $avatar_defaults = array(
  */
 $avatar_defaults = apply_filters( 'avatar_defaults', $avatar_defaults );
 $default = get_option( 'avatar_default', 'mystery' );
-$size = 32;
 $avatar_list = '';
 
 // Force avatars on to display these choices
@@ -249,12 +248,7 @@ add_filter( 'pre_option_show_avatars', '__return_true', 100 );
 foreach ( $avatar_defaults as $default_key => $default_name ) {
        $selected = ($default == $default_key) ? 'checked="checked" ' : '';
        $avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='" . esc_attr($default_key) . "' {$selected}/> ";
-
-       $avatar = get_avatar( $user_email, $size, $default_key );
-       $avatar = preg_replace( "/src='(.+?)'/", "src='\$1&amp;forcedefault=1'", $avatar );
-       $avatar = preg_replace( "/srcset='(.+?) 2x'/", "srcset='\$1&amp;forcedefault=1 2x'", $avatar );
-       $avatar_list .= $avatar;
-
+       $avatar_list .= get_avatar( $user_email, 32, $default_key, '', array( 'force_default' => true ) );
        $avatar_list .= ' ' . $default_name . '</label>';
        $avatar_list .= '<br />';
 }
@@ -262,7 +256,7 @@ foreach ( $avatar_defaults as $default_key => $default_name ) {
 remove_filter( 'pre_option_show_avatars', '__return_true', 100 );
 
 /**
- * Filter the HTML output of the default avatar list.
+ * Filters the HTML output of the default avatar list.
  *
  * @since 2.6.0
  *
index 9091d5e3eb797545e42670a3f56083ad278e53a1..426ebaae10343d8c0e98448afb0397a6140a3d32 100644 (file)
@@ -13,11 +13,11 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
 require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
 
 if ( ! current_user_can( 'manage_options' ) )
-       wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
+       wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
 
 $title = __('General Settings');
 $parent_file = 'options-general.php';
-/* translators: date and time format for exact current time, mainly about timezones, see http://php.net/date */
+/* translators: date and time format for exact current time, mainly about timezones, see https://secure.php.net/date */
 $timezone_format = _x('Y-m-d H:i:s', 'timezone date format');
 
 add_action('admin_head', 'options_general_add_js');
@@ -112,7 +112,7 @@ if ( $new_admin_email && $new_admin_email != get_option('admin_email') ) : ?>
        );
        printf(
                ' <a href="%1$s">%2$s</a>',
-               esc_url( admin_url( 'options.php?dismiss=new_admin_email' ) ),
+               esc_url( wp_nonce_url( admin_url( 'options.php?dismiss=new_admin_email' ), 'dismiss-' . get_current_blog_id() . '-new_admin_email' ) ),
                __( 'Cancel' )
        );
 ?></p>
@@ -231,7 +231,7 @@ if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists
        <fieldset><legend class="screen-reader-text"><span><?php _e('Date Format') ?></span></legend>
 <?php
        /**
-       * Filter the default date formats.
+       * Filters the default date formats.
        *
        * @since 2.7.0
        * @since 4.0.0 Added ISO date standard YYYY-MM-DD format.
@@ -268,7 +268,7 @@ if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists
        <fieldset><legend class="screen-reader-text"><span><?php _e('Time Format') ?></span></legend>
 <?php
        /**
-       * Filter the default time formats.
+       * Filters the default time formats.
        *
        * @since 2.7.0
        *
@@ -353,7 +353,7 @@ if ( ! empty( $languages ) || ! empty( $translations ) ) {
                                        </p>
                                        <?php
                                }
-                               _deprecated_argument( 'define()', '4.0', sprintf( __( 'The %s constant in your %s file is no longer needed.' ), 'WPLANG', 'wp-config.php' ) );
+                               _deprecated_argument( 'define()', '4.0.0', sprintf( __( 'The %s constant in your %s file is no longer needed.' ), 'WPLANG', 'wp-config.php' ) );
                        }
                        ?>
                </td>
index 1c706c87d7296cdc94df67f4d80ea307a263bf46..bee3ae7e67ab36adf573a76717d19620963d7ce7 100644 (file)
@@ -11,7 +11,7 @@
 wp_reset_vars( array( 'action' ) );
 
 if ( isset( $_GET['updated'] ) && isset( $_GET['page'] ) ) {
-       // For backwards compat with plugins that don't use the Settings API and just set updated=1 in the redirect
+       // For back-compat with plugins that don't use the Settings API and just set updated=1 in the redirect.
        add_settings_error('general', 'settings_updated', __('Settings saved.'), 'updated');
 }
 
index ec6287de15e94b9dbd7e91c9098287415b080c96..2f7e0abbda89840768ec5a9e0b4fa4e9a16fc6b9 100644 (file)
@@ -10,7 +10,7 @@
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 if ( ! current_user_can( 'manage_options' ) )
-       wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
+       wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
 
 $title = __('Media Settings');
 $parent_file = 'options-general.php';
index 6fab4d21439e89c3e2114a9cd9c7a5dc04202ac8..b6c52c517afd055aa8041810fdd31e85b671f5ee 100644 (file)
@@ -10,7 +10,7 @@
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 if ( ! current_user_can( 'manage_options' ) )
-       wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
+       wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
 
 $title = __('Permalink Settings');
 $parent_file = 'options-general.php';
@@ -66,6 +66,30 @@ if ( is_multisite() && ! is_subdomain_install() && is_main_site() && 0 === strpo
        $blog_prefix = '/blog';
 }
 
+$category_base       = get_option( 'category_base' );
+$tag_base            = get_option( 'tag_base' );
+$update_required     = false;
+
+if ( $iis7_permalinks ) {
+       if ( ( ! file_exists($home_path . 'web.config') && win_is_writable($home_path) ) || win_is_writable($home_path . 'web.config') )
+               $writable = true;
+       else
+               $writable = false;
+} elseif ( $is_nginx ) {
+       $writable = false;
+} else {
+       if ( ( ! file_exists( $home_path . '.htaccess' ) && is_writable( $home_path ) ) || is_writable( $home_path . '.htaccess' ) ) {
+               $writable = true;
+       } else {
+               $writable = false;
+               $existing_rules  = array_filter( extract_from_markers( $home_path . '.htaccess', 'WordPress' ) );
+               $new_rules       = array_filter( explode( "\n", $wp_rewrite->mod_rewrite_rules() ) );
+               $update_required = ( $new_rules !== $existing_rules );
+       }
+}
+
+$using_index_permalinks = $wp_rewrite->using_index_permalinks();
+
 if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) {
        check_admin_referer('update-permalink');
 
@@ -82,6 +106,9 @@ if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) {
                        else
                                $permalink_structure = $blog_prefix . $permalink_structure;
                }
+
+               $permalink_structure = sanitize_option( 'permalink_structure', $permalink_structure );
+
                $wp_rewrite->set_permalink_structure( $permalink_structure );
        }
 
@@ -99,68 +126,32 @@ if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) {
                $wp_rewrite->set_tag_base( $tag_base );
        }
 
-       wp_redirect( admin_url( 'options-permalink.php?settings-updated=true' ) );
-       exit;
-}
+       $message = __( 'Permalink structure updated.' );
 
-$category_base       = get_option( 'category_base' );
-$tag_base            = get_option( 'tag_base' );
-$update_required     = false;
+       if ( $iis7_permalinks ) {
+               if ( $permalink_structure && ! $using_index_permalinks && ! $writable ) {
+                       $message = __( 'You should update your web.config now.' );
+               } elseif ( $permalink_structure && ! $using_index_permalinks && $writable ) {
+                       $message = __( 'Permalink structure updated. Remove write access on web.config file now!' );
+               }
+       } elseif ( ! $is_nginx && $permalink_structure && ! $using_index_permalinks && ! $writable && $update_required ) {
+               $message = __( 'You should update your .htaccess now.' );
+       }
 
-if ( $iis7_permalinks ) {
-       if ( ( ! file_exists($home_path . 'web.config') && win_is_writable($home_path) ) || win_is_writable($home_path . 'web.config') )
-               $writable = true;
-       else
-               $writable = false;
-} elseif ( $is_nginx ) {
-       $writable = false;
-} else {
-       if ( ( ! file_exists( $home_path . '.htaccess' ) && is_writable( $home_path ) ) || is_writable( $home_path . '.htaccess' ) ) {
-               $writable = true;
-       } else {
-               $writable = false;
-               $existing_rules  = array_filter( extract_from_markers( $home_path . '.htaccess', 'WordPress' ) );
-               $new_rules       = array_filter( explode( "\n", $wp_rewrite->mod_rewrite_rules() ) );
-               $update_required = ( $new_rules !== $existing_rules );
+       if ( ! get_settings_errors() ) {
+               add_settings_error( 'general', 'settings_updated', $message, 'updated' );
        }
-}
 
-if ( $wp_rewrite->using_index_permalinks() )
-       $usingpi = true;
-else
-       $usingpi = false;
+       set_transient( 'settings_errors', get_settings_errors(), 30 );
+
+       wp_redirect( admin_url( 'options-permalink.php?settings-updated=true' ) );
+       exit;
+}
 
 flush_rewrite_rules();
 
 require( ABSPATH . 'wp-admin/admin-header.php' );
-
-if ( ! empty( $_GET['settings-updated'] ) ) : ?>
-<div id="message" class="updated notice is-dismissible"><p><?php
-if ( ! is_multisite() ) {
-       if ( $iis7_permalinks ) {
-               if ( $permalink_structure && ! $usingpi && ! $writable ) {
-                       _e('You should update your web.config now.');
-               } elseif ( $permalink_structure && ! $usingpi && $writable ) {
-                       _e('Permalink structure updated. Remove write access on web.config file now!');
-               } else {
-                       _e('Permalink structure updated.');
-               }
-       } elseif ( $is_nginx ) {
-               _e('Permalink structure updated.');
-       } else {
-               if ( $permalink_structure && ! $usingpi && ! $writable && $update_required ) {
-                       _e('You should update your .htaccess now.');
-               } else {
-                       _e('Permalink structure updated.');
-               }
-       }
-} else {
-       _e('Permalink structure updated.');
-}
 ?>
-</p></div>
-<?php endif; ?>
-
 <div class="wrap">
 <h1><?php echo esc_html( $title ); ?></h1>
 
@@ -242,7 +233,7 @@ printf( __( 'If you like, you may enter custom structures for your category and
   </form>
 <?php if ( !is_multisite() ) { ?>
 <?php if ( $iis7_permalinks ) :
-       if ( isset($_POST['submit']) && $permalink_structure && ! $usingpi && ! $writable ) :
+       if ( isset($_POST['submit']) && $permalink_structure && ! $using_index_permalinks && ! $writable ) :
                if ( file_exists($home_path . 'web.config') ) : ?>
 <p><?php _e('If your <code>web.config</code> file were <a href="https://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn&#8217;t so this is the url rewrite rule you should have in your <code>web.config</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all. Then insert this rule inside of the <code>/&lt;configuration&gt;/&lt;system.webServer&gt;/&lt;rewrite&gt;/&lt;rules&gt;</code> element in <code>web.config</code> file.') ?></p>
 <form action="options-permalink.php" method="post">
@@ -262,7 +253,7 @@ printf( __( 'If you like, you may enter custom structures for your category and
 <?php elseif ( $is_nginx ) : ?>
        <p><?php _e( '<a href="https://codex.wordpress.org/Nginx">Documentation on Nginx configuration</a>.' ); ?></p>
 <?php else:
-       if ( $permalink_structure && ! $usingpi && ! $writable && $update_required ) : ?>
+       if ( $permalink_structure && ! $using_index_permalinks && ! $writable && $update_required ) : ?>
 <p><?php _e('If your <code>.htaccess</code> file were <a href="https://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn&#8217;t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all.') ?></p>
 <form action="options-permalink.php" method="post">
 <?php wp_nonce_field('update-permalink') ?>
index d0bc190f78b12370eb85af0ddf0d8137af8a5e82..7ad94fbad4f2dc2a9d8137adaba1fedd809f501d 100644 (file)
@@ -10,7 +10,7 @@
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 if ( ! current_user_can( 'manage_options' ) )
-       wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
+       wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
 
 $title = __( 'Reading Settings' );
 $parent_file = 'options-general.php';
index 93b583bfd195e3bcf3191648e749ab1e73779ba5..6248ba9e15a645a4d2156a87e9e3d0444e11ac72 100644 (file)
@@ -10,7 +10,7 @@
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 if ( ! current_user_can( 'manage_options' ) )
-       wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
+       wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
 
 $title = __('Writing Settings');
 $parent_file = 'options-general.php';
@@ -114,7 +114,15 @@ do_settings_fields('writing', 'remote_publishing'); // A deprecated section.
 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) {
 ?>
 <h2 class="title"><?php _e( 'Post via email' ) ?></h2>
-<p><?php printf(__('To post to WordPress by email you must set up a secret email account with POP3 access. Any mail received at this address will be posted, so it&#8217;s a good idea to keep this address very secret. Here are three random strings you could use: <kbd>%s</kbd>, <kbd>%s</kbd>, <kbd>%s</kbd>.'), wp_generate_password(8, false), wp_generate_password(8, false), wp_generate_password(8, false)) ?></p>
+<p><?php
+printf(
+       /* translators: 1, 2, 3: examples of random email addresses */
+       __( 'To post to WordPress by email you must set up a secret email account with POP3 access. Any mail received at this address will be posted, so it&#8217;s a good idea to keep this address very secret. Here are three random strings you could use: %1$s, %2$s, %3$s.' ),
+       sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ),
+       sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ),
+       sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) )
+);
+?></p>
 
 <table class="form-table">
 <tr>
@@ -148,7 +156,7 @@ wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_email_categor
 
 <?php
 /**
- * Filter whether to enable the Update Services section in the Writing settings screen.
+ * Filters whether to enable the Update Services section in the Writing settings screen.
  *
  * @since 3.0.0
  *
index 6bad0fd61f7e8053cd9eba444c1c5d384b86eb89..f319d5208e79b185dd2657999ec4cb30ff7da0bb 100644 (file)
@@ -32,7 +32,7 @@ if ( empty($option_page) ) {
 } else {
 
        /**
-        * Filter the capability required when using the Settings API.
+        * Filters the capability required when using the Settings API.
         *
         * By default, the options groups for all registered settings require the manage_options capability.
         * This filter is required to change the capability required for a certain options page.
@@ -47,7 +47,7 @@ if ( empty($option_page) ) {
 if ( ! current_user_can( $capability ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to manage these items.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to manage these items.' ) . '</p>',
                403
        );
 }
@@ -57,7 +57,7 @@ if ( is_multisite() ) {
        if ( ! empty($_GET[ 'adminhash' ] ) ) {
                $new_admin_details = get_option( 'adminhash' );
                $redirect = 'options-general.php?updated=false';
-               if ( is_array( $new_admin_details ) && $new_admin_details[ 'hash' ] == $_GET[ 'adminhash' ] && !empty($new_admin_details[ 'newemail' ]) ) {
+               if ( is_array( $new_admin_details ) && hash_equals( $new_admin_details[ 'hash' ], $_GET[ 'adminhash' ] ) && !empty($new_admin_details[ 'newemail' ]) ) {
                        update_option( 'admin_email', $new_admin_details[ 'newemail' ] );
                        delete_option( 'adminhash' );
                        delete_option( 'new_admin_email' );
@@ -66,6 +66,7 @@ if ( is_multisite() ) {
                wp_redirect( admin_url( $redirect ) );
                exit;
        } elseif ( ! empty( $_GET['dismiss'] ) && 'new_admin_email' == $_GET['dismiss'] ) {
+               check_admin_referer( 'dismiss-' . get_current_blog_id() . '-new_admin_email' );
                delete_option( 'adminhash' );
                delete_option( 'new_admin_email' );
                wp_redirect( admin_url( 'options-general.php?updated=true' ) );
@@ -76,7 +77,7 @@ if ( is_multisite() ) {
 if ( is_multisite() && ! is_super_admin() && 'update' != $action ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to delete these items.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
                403
        );
 }
@@ -124,7 +125,7 @@ if ( !is_multisite() ) {
        $whitelist_options['general'][] = 'new_admin_email';
 
        /**
-        * Filter whether the post-by-email functionality is enabled.
+        * Filters whether the post-by-email functionality is enabled.
         *
         * @since 3.0.0
         *
@@ -135,7 +136,7 @@ if ( !is_multisite() ) {
 }
 
 /**
- * Filter the options white list.
+ * Filters the options white list.
  *
  * @since 2.7.0
  *
@@ -160,7 +161,7 @@ if ( 'update' == $action ) {
 
        if ( 'options' == $option_page ) {
                if ( is_multisite() && ! is_super_admin() )
-                       wp_die( __( 'You do not have sufficient permissions to modify unregistered settings for this site.' ) );
+                       wp_die( __( 'Sorry, you are not allowed to modify unregistered settings for this site.' ) );
                $options = explode( ',', wp_unslash( $_POST[ 'page_options' ] ) );
        } else {
                $options = $whitelist_options[ $option_page ];
@@ -195,7 +196,7 @@ if ( 'update' == $action ) {
        if ( $options ) {
                foreach ( $options as $option ) {
                        if ( $unregistered ) {
-                               _deprecated_argument( 'options.php', '2.7',
+                               _deprecated_argument( 'options.php', '2.7.0',
                                        sprintf(
                                                /* translators: %s: the option/setting */
                                                __( 'The %s setting is unregistered. Unregistered settings are deprecated. See https://codex.wordpress.org/Settings_API' ),
index 1558164096591b1cb6fce601b35e5308d5d91242..754c4265b261098a3dce404b25806b8199ab64dc 100644 (file)
@@ -15,7 +15,7 @@ if ( is_multisite() && ! is_network_admin() ) {
 }
 
 if ( !current_user_can('edit_plugins') )
-       wp_die( __('You do not have sufficient permissions to edit plugins for this site.') );
+       wp_die( __('Sorry, you are not allowed to edit plugins for this site.') );
 
 $title = __("Edit Plugins");
 $parent_file = 'plugins.php';
@@ -106,7 +106,7 @@ default:
        $editable_extensions = array('php', 'txt', 'text', 'js', 'css', 'html', 'htm', 'xml', 'inc', 'include');
 
        /**
-        * Filter file type extensions editable in the plugin editor.
+        * Filters file type extensions editable in the plugin editor.
         *
         * @since 2.8.0
         *
@@ -131,7 +131,7 @@ default:
        'title'         => __('Overview'),
        'content'       =>
                '<p>' . __('You can use the editor to make changes to any of your plugins&#8217; individual PHP files. Be aware that if you make changes, plugins updates will overwrite your customizations.') . '</p>' .
-               '<p>' . __('Choose a plugin to edit from the menu in the upper right and click the Select button. Click once on any file name to load it in the editor, and make your changes. Don&#8217;t forget to save your changes (Update File) when you&#8217;re finished.') . '</p>' .
+               '<p>' . __('Choose a plugin to edit from the dropdown menu and click the Select button. Click once on any file name to load it in the editor, and make your changes. Don&#8217;t forget to save your changes (Update File) when you&#8217;re finished.') . '</p>' .
                '<p>' . __('The Documentation menu below the editor lists the PHP functions recognized in the plugin file. Clicking Look Up takes you to a web page about that particular function.') . '</p>' .
                '<p id="newcontent-description">' . __( 'In the editing area the Tab key enters a tab character. To move below this area by pressing Tab, press the Esc key followed by the Tab key. In some cases the Esc key will need to be pressed twice before the Tab key will allow you to continue.' ) . '</p>' .
                '<p>' . __('If you want to make changes but don&#8217;t want them to be overwritten when the plugin is updated, you may be ready to think about writing your own plugin. For information on how to edit plugins, write your own from scratch, or just better understand their anatomy, check out the links below.') . '</p>' .
index c9f2b50fcba3b259f0d5ca49ddc35f202140379b..637424b507eb93c0a0e485f046d8eb4e962343d2 100644 (file)
@@ -15,7 +15,7 @@ if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'plugin-informat
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 if ( ! current_user_can('install_plugins') )
-       wp_die(__('You do not have sufficient permissions to install plugins on this site.'));
+       wp_die(__('Sorry, you are not allowed to install plugins on this site.'));
 
 if ( is_multisite() && ! is_network_admin() ) {
        wp_redirect( network_admin_url( 'plugin-install.php' ) );
@@ -66,20 +66,31 @@ wp_enqueue_script( 'updates' );
  */
 do_action( "install_plugins_pre_$tab" );
 
+/*
+ * Call the pre upload action on every non-upload plugin install screen
+ * because the form is always displayed on these screens.
+ */
+if ( 'upload' !== $tab ) {
+       /** This action is documented in wp-admin/plugin-install.php */
+       do_action( 'install_plugins_pre_upload' );
+}
+
 get_current_screen()->add_help_tab( array(
 'id'           => 'overview',
 'title'                => __('Overview'),
 'content'      =>
-       '<p>' . sprintf(__('Plugins hook into WordPress to extend its functionality with custom features. Plugins are developed independently from the core WordPress application by thousands of developers all over the world. All plugins in the official <a href="%s" target="_blank">WordPress.org Plugin Directory</a> are compatible with the license WordPress uses. You can find new plugins to install by searching or browsing the Directory right here in your own Plugins section.'), 'https://wordpress.org/plugins/') . '</p>'
+       '<p>' . sprintf( __('Plugins hook into WordPress to extend its functionality with custom features. Plugins are developed independently from the core WordPress application by thousands of developers all over the world. All plugins in the official <a href="%s" target="_blank">WordPress Plugin Directory</a> are compatible with the license WordPress uses.' ), 'https://wordpress.org/plugins/' ) . '</p>' .
+       '<p>' . __( 'You can find new plugins to install by searching or browsing the directory right here in your own Plugins section.' ) . ' <span id="live-search-desc" class="hide-if-no-js">' . __( 'The search results will be updated as you type.' ) . '</span></p>'
+
 ) );
 get_current_screen()->add_help_tab( array(
 'id'           => 'adding-plugins',
 'title'                => __('Adding Plugins'),
 'content'      =>
-       '<p>' . __('If you know what you&#8217;re looking for, Search is your best bet. The Search screen has options to search the WordPress.org Plugin Directory for a particular Term, Author, or Tag. You can also search the directory by selecting popular tags. Tags in larger type mean more plugins have been labeled with that tag.') . '</p>' .
-       '<p>' . __('If you just want to get an idea of what&#8217;s available, you can browse Featured and Popular plugins by using the links in the upper left of the screen. These sections rotate regularly.') . '</p>' .
-       '<p>' . __('You can also browse a user&#8217;s favorite plugins, by using the Favorites link in the upper left of the screen and entering their WordPress.org username.') . '</p>' .
-       '<p>' . __('If you want to install a plugin that you&#8217;ve downloaded elsewhere, click the Upload link in the upper left. You will be prompted to upload the .zip package, and once uploaded, you can activate the new plugin.') . '</p>'
+       '<p>' . __('If you know what you&#8217;re looking for, Search is your best bet. The Search screen has options to search the WordPress Plugin Directory for a particular Term, Author, or Tag. You can also search the directory by selecting popular tags. Tags in larger type mean more plugins have been labeled with that tag.') . '</p>' .
+       '<p>' . __( 'If you just want to get an idea of what&#8217;s available, you can browse Featured and Popular plugins by using the links above the plugins list. These sections rotate regularly.' ) . '</p>' .
+       '<p>' . __( 'You can also browse a user&#8217;s favorite plugins, by using the Favorites link above the plugins list and entering their WordPress.org username.' ) . '</p>' .
+       '<p>' . __( 'If you want to install a plugin that you&#8217;ve downloaded elsewhere, click the Upload Plugin button above the plugins list. You will be prompted to upload the .zip package, and once uploaded, you can activate the new plugin.' ) . '</p>'
 ) );
 
 get_current_screen()->set_help_sidebar(
@@ -99,24 +110,36 @@ get_current_screen()->set_screen_reader_content( array(
  */
 include(ABSPATH . 'wp-admin/admin-header.php');
 ?>
-<div class="wrap">
+<div class="wrap <?php echo esc_attr( "plugin-install-tab-$tab" ); ?>">
 <h1>
        <?php
        echo esc_html( $title );
        if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_plugins' ) ) {
-               if ( $tab === 'upload' ) {
-                       $href = self_admin_url( 'plugin-install.php' );
-                       $text = _x( 'Browse', 'plugins' );
-               } else {
-                       $href = self_admin_url( 'plugin-install.php?tab=upload' );
-                       $text = __( 'Upload Plugin' );
-               }
-               echo ' <a href="' . $href . '" class="upload page-title-action">' . $text . '</a>';
+               printf( ' <a href="%s" class="upload-view-toggle page-title-action"><span class="upload">%s</span><span class="browse">%s</span></a>',
+                       ( 'upload' === $tab ) ? self_admin_url( 'plugin-install.php' ) : self_admin_url( 'plugin-install.php?tab=upload' ),
+                       __( 'Upload Plugin' ),
+                       __( 'Browse Plugins' )
+               );
        }
        ?>
 </h1>
 
 <?php
+/*
+ * Output the upload plugin form on every non-upload plugin install screen, so it can be
+ * displayed via JavaScript rather then opening up the devoted upload plugin page.
+ */
+if ( $tab !== 'upload' ) {
+       ?>
+       <div class="upload-plugin-wrap">
+               <?php
+               /** This action is documented in wp-admin/plugin-install.php */
+               do_action( 'install_plugins_upload' );
+               ?>
+       </div>
+       <?php
+}
+
 if ( $tab !== 'upload' ) {
        $wp_list_table->views();
        echo '<br class="clear" />';
@@ -133,10 +156,13 @@ if ( $tab !== 'upload' ) {
  * @param int $paged The current page number of the plugins list table.
  */
 do_action( "install_plugins_$tab", $paged ); ?>
+
+       <span class="spinner"></span>
 </div>
 
 <?php
 wp_print_request_filesystem_credentials_modal();
+wp_print_admin_notice_templates();
 
 /**
  * WordPress Administration Template Footer.
index 4530831bc824c1bd38c370d9419e735f03ccdc9a..1d462381935d360336bf9bc84c7e90548b89a0fc 100644 (file)
@@ -10,7 +10,7 @@
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 if ( ! current_user_can('activate_plugins') )
-       wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) );
+       wp_die( __( 'Sorry, you are not allowed to manage plugins for this site.' ) );
 
 $wp_list_table = _get_list_table('WP_Plugins_List_Table');
 $pagenum = $wp_list_table->get_pagenum();
@@ -30,7 +30,7 @@ if ( $action ) {
        switch ( $action ) {
                case 'activate':
                        if ( ! current_user_can('activate_plugins') )
-                               wp_die(__('You do not have sufficient permissions to activate plugins for this site.'));
+                               wp_die(__('Sorry, you are not allowed to activate plugins for this site.'));
 
                        if ( is_multisite() && ! is_network_admin() && is_network_only_plugin( $plugin ) ) {
                                wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
@@ -69,7 +69,7 @@ if ( $action ) {
 
                case 'activate-selected':
                        if ( ! current_user_can('activate_plugins') )
-                               wp_die(__('You do not have sufficient permissions to activate plugins for this site.'));
+                               wp_die(__('Sorry, you are not allowed to activate plugins for this site.'));
 
                        check_admin_referer('bulk-plugins');
 
@@ -147,7 +147,7 @@ if ( $action ) {
 
                case 'error_scrape':
                        if ( ! current_user_can('activate_plugins') )
-                               wp_die(__('You do not have sufficient permissions to activate plugins for this site.'));
+                               wp_die(__('Sorry, you are not allowed to activate plugins for this site.'));
 
                        check_admin_referer('plugin-activation-error_' . $plugin);
 
@@ -168,7 +168,7 @@ if ( $action ) {
 
                case 'deactivate':
                        if ( ! current_user_can('activate_plugins') )
-                               wp_die(__('You do not have sufficient permissions to deactivate plugins for this site.'));
+                               wp_die(__('Sorry, you are not allowed to deactivate plugins for this site.'));
 
                        check_admin_referer('deactivate-plugin_' . $plugin);
 
@@ -193,7 +193,7 @@ if ( $action ) {
 
                case 'deactivate-selected':
                        if ( ! current_user_can('activate_plugins') )
-                               wp_die(__('You do not have sufficient permissions to deactivate plugins for this site.'));
+                               wp_die(__('Sorry, you are not allowed to deactivate plugins for this site.'));
 
                        check_admin_referer('bulk-plugins');
 
@@ -228,7 +228,7 @@ if ( $action ) {
 
                case 'delete-selected':
                        if ( ! current_user_can('delete_plugins') ) {
-                               wp_die(__('You do not have sufficient permissions to delete plugins for this site.'));
+                               wp_die(__('Sorry, you are not allowed to delete plugins for this site.'));
                        }
 
                        check_admin_referer('bulk-plugins');
@@ -371,12 +371,11 @@ get_current_screen()->add_help_tab( array(
 'title'                => __('Overview'),
 'content'      =>
        '<p>' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '</p>' .
+       '<p>' . __( 'The search for installed plugins will search for terms in their name, description, or author.' ) . ' <span id="live-search-desc" class="hide-if-no-js">' . __( 'The search results will be updated as you type.' ) . '</span></p>' .
        '<p>' . sprintf(
-               /* translators: 1: Plugin Browser/Installer URL, 2: WordPress Plugin Directory URL 3: local plugin directory */
-               __( 'You can find additional plugins for your site by using the <a href="%1$s">Plugin Browser/Installer</a> functionality or by browsing the <a href="%2$s" target="_blank">WordPress Plugin Directory</a> directly and installing new plugins manually. To manually install a plugin you generally just need to upload the plugin file into your %3$s directory. Once a plugin has been installed, you can activate it here.' ),
-               'plugin-install.php',
-               'https://wordpress.org/plugins/',
-               '<code>/wp-content/plugins</code>'
+               /* translators: %s: WordPress Plugin Directory URL */
+               __( 'If you would like to see more plugins to choose from, click on the &#8220;Add New&#8221; button and you will be able to browse or search for additional plugins from the <a href="%s" target="_blank">WordPress Plugin Directory</a>. Plugins in the WordPress Plugin Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they&#8217;re free!' ),
+               'https://wordpress.org/plugins/'
        ) . '</p>'
 ) );
 get_current_screen()->add_help_tab( array(
@@ -509,7 +508,7 @@ do_action( 'pre_current_active_plugins', $plugins['all'] );
 
 <?php $wp_list_table->views(); ?>
 
-<form method="get">
+<form class="search-form search-plugins" method="get">
 <?php $wp_list_table->search_box( __( 'Search Installed Plugins' ), 'plugin' ); ?>
 </form>
 
@@ -521,9 +520,12 @@ do_action( 'pre_current_active_plugins', $plugins['all'] );
 <?php $wp_list_table->display(); ?>
 </form>
 
+       <span class="spinner"></span>
 </div>
 
 <?php
 wp_print_request_filesystem_credentials_modal();
+wp_print_admin_notice_templates();
+wp_print_update_row_templates();
 
 include(ABSPATH . 'wp-admin/admin-footer.php');
index 0c84608ba296993826c9180bb601633635fc1993..ac80f1350fd407135703ea07ca81edeab6fa64cc 100644 (file)
@@ -21,7 +21,7 @@ if ( ! isset( $_GET['post_type'] ) ) {
 } elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) ) {
        $post_type = $_GET['post_type'];
 } else {
-       wp_die( __('Invalid post type') );
+       wp_die( __( 'Invalid post type.' ) );
 }
 $post_type_object = get_post_type_object( $post_type );
 
@@ -57,7 +57,7 @@ $editing = true;
 if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->create_posts ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to create posts as this user.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>',
                403
        );
 }
index 5333b5f306bb4c653dea9b31bb80e169dd65ad35..437d1bd997e1ed32281f4898133085177111909a 100644 (file)
@@ -110,11 +110,11 @@ case 'edit':
                wp_die( __( 'Unknown post type.' ) );
 
        if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) {
-               wp_die( __( 'You are not allowed to edit posts in this post type.' ) );
+               wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) );
        }
 
        if ( ! current_user_can( 'edit_post', $post_id ) )
-               wp_die( __( 'You are not allowed to edit this item.' ) );
+               wp_die( __( 'Sorry, you are not allowed to edit this item.' ) );
 
        if ( 'trash' == $post->post_status )
                wp_die( __( 'You can&#8217;t edit this item because it is in the Trash. Please restore it and try again.' ) );
@@ -211,7 +211,7 @@ case 'trash':
                wp_die( __( 'Unknown post type.' ) );
 
        if ( ! current_user_can( 'delete_post', $post_id ) )
-               wp_die( __( 'You are not allowed to move this item to the Trash.' ) );
+               wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) );
 
        if ( $user_id = wp_check_post_lock( $post_id ) ) {
                $user = get_userdata( $user_id );
@@ -234,7 +234,7 @@ case 'untrash':
                wp_die( __( 'Unknown post type.' ) );
 
        if ( ! current_user_can( 'delete_post', $post_id ) )
-               wp_die( __( 'You are not allowed to restore this item from the Trash.' ) );
+               wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) );
 
        if ( ! wp_untrash_post( $post_id ) )
                wp_die( __( 'Error in restoring from Trash.' ) );
@@ -252,7 +252,7 @@ case 'delete':
                wp_die( __( 'Unknown post type.' ) );
 
        if ( ! current_user_can( 'delete_post', $post_id ) )
-               wp_die( __( 'You are not allowed to delete this item.' ) );
+               wp_die( __( 'Sorry, you are not allowed to delete this item.' ) );
 
        if ( $post->post_type == 'attachment' ) {
                $force = ( ! MEDIA_TRASH );
@@ -275,6 +275,17 @@ case 'preview':
        exit();
 
 default:
+       /**
+        * Fires for a given custom post action request.
+        *
+        * The dynamic portion of the hook name, `$action`, refers to the custom post action.
+        *
+        * @since 4.6.0
+        *
+        * @param int $post_id Post ID sent with the request.
+        */
+       do_action( "post_action_{$action}", $post_id );
+
        wp_redirect( admin_url('edit.php') );
        exit();
 } // end switch
index 62da1d3ba79d4806ed20709faa897b4087fa8f19..e0a4c90166e993abbd0c46267e99bfd171d66005 100644 (file)
@@ -14,7 +14,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
 if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to create posts as this user.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>',
                403
        );
 }
index d63b26bbf953f9b2ad599a42c3df3e0ab582a8c4..547b3546fe935faf26680d56916d67db34b59587 100644 (file)
@@ -40,8 +40,8 @@ case 'restore' :
        if ( ! $post = get_post( $revision->post_parent ) )
                break;
 
-       // Revisions disabled (previously checked autosaves && ! wp_is_post_autosave( $revision ))
-       if ( ! wp_revisions_enabled( $post ) ) {
+       // Restore if revisions are enabled or this is an autosave.
+       if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) {
                $redirect = 'edit.php?post_type=' . $post->post_type;
                break;
        }
index befa6937edea073f9bcbddd9681a13bc7e605458..1ad40fcb6ae71bf629289d1dfab5b85cc7efd36f 100644 (file)
@@ -28,7 +28,9 @@ define('WP_SETUP_CONFIG', true);
  */
 error_reporting(0);
 
-define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
+if ( ! defined( 'ABSPATH' ) ) {
+       define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
+}
 
 require( ABSPATH . 'wp-settings.php' );
 
@@ -276,6 +278,12 @@ switch($step) {
        if ( ! empty( $wpdb->error ) )
                wp_die( $wpdb->error->get_error_message() . $tryagain_link );
 
+       $wpdb->query( "SELECT $prefix" );
+       if ( ! $wpdb->last_error ) {
+               // MySQL was able to parse the prefix as a value, which we don't want. Bail.
+               wp_die( __( '<strong>ERROR</strong>: "Table Prefix" is invalid.' ) );
+       }
+
        // Generate keys and salts using secure CSPRNG; fallback to API if enabled; further fallback to original wp_generate_password().
        try {
                $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_ []{}<>~`+=,.;:/?|';
index d5417321f6baa2759f9b7ac49c131a8541040bcc..dc3f1d5fef3f9c2b16aa77e4fba7d50258ddd45e 100644 (file)
@@ -20,7 +20,7 @@ if ( empty( $_REQUEST['tag_ID'] ) ) {
 }
 
 $tag_ID = absint( $_REQUEST['tag_ID'] );
-$tag    = get_term( $tag_ID, '', OBJECT, 'edit' );
+$tag    = get_term( $tag_ID, $taxnow, OBJECT, 'edit' );
 
 if ( ! $tag instanceof WP_Term ) {
        wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
@@ -35,7 +35,7 @@ if ( ! in_array( $taxonomy, get_taxonomies( array( 'show_ui' => true ) ) ) ||
 ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to manage this item.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to manage this item.' ) . '</p>',
                403
        );
 }
index 6fae2b7535c867bff80d5c7a860562900c10d836..9fb2c41e478dce268e0eefce0db5c74d660cd8ca 100644 (file)
@@ -15,7 +15,7 @@ if ( is_multisite() && ! is_network_admin() ) {
 }
 
 if ( !current_user_can('edit_themes') )
-       wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site.').'</p>');
+       wp_die('<p>'.__('Sorry, you are not allowed to edit templates for this site.').'</p>');
 
 $title = __("Edit Themes");
 $parent_file = 'themes.php';
@@ -25,7 +25,7 @@ get_current_screen()->add_help_tab( array(
 'title'                => __('Overview'),
 'content'      =>
        '<p>' . __('You can use the Theme Editor to edit the individual CSS and PHP files which make up your theme.') . '</p>
-       <p>' . __("Begin by choosing a theme to edit from the dropdown menu and clicking Select. A list then appears of the theme's template files. Clicking once on any file name causes the file to appear in the large Editor box.") . '</p>
+       <p>' . __( 'Begin by choosing a theme to edit from the dropdown menu and clicking the Select button. A list then appears of the theme&#8217;s template files. Clicking once on any file name causes the file to appear in the large Editor box.' ) . '</p>
        <p>' . __('For PHP files, you can use the Documentation dropdown to select from functions recognized in that file. Look Up takes you to a web page with reference material about that particular function.') . '</p>
        <p id="newcontent-description">' . __( 'In the editing area the Tab key enters a tab character. To move below this area by pressing Tab, press the Esc key followed by the Tab key. In some cases the Esc key will need to be pressed twice before the Tab key will allow you to continue.' ) . '</p>
        <p>' . __('After typing in your edits, click Update File.') . '</p>
@@ -66,7 +66,7 @@ $has_templates = false;
 $default_types = array( 'php', 'css' );
 
 /**
- * Filter the list of file types allowed for editing in the Theme editor.
+ * Filters the list of file types allowed for editing in the Theme editor.
  *
  * @since 4.4.0
  *
@@ -112,7 +112,7 @@ case 'update':
        $newcontent = wp_unslash( $_POST['newcontent'] );
        $location = 'theme-editor.php?file=' . urlencode( $relative_file ) . '&theme=' . urlencode( $stylesheet ) . '&scrollto=' . $scrollto;
        if ( is_writeable( $file ) ) {
-               // is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable
+               // is_writable() not always reliable, check return value. see comments @ https://secure.php.net/is_writable
                $f = fopen( $file, 'w+' );
                if ( $f !== false ) {
                        fwrite( $f, $newcontent );
@@ -229,7 +229,7 @@ if ( $allowed_files ) :
 
                        echo "\t<ul>\n";
                }
-               
+
                $file_description = get_file_description( $filename );
                if ( $filename !== basename( $absolute_filename ) || $file_description !== $filename ) {
                        $file_description .= '<br /><span class="nonessential">(' . $filename . ')</span>';
index 97f42ce32ac5d3c33b07e68aa6548034689c0732..6b38465531e909289f6f98075de913ea488cca15 100644 (file)
@@ -13,7 +13,7 @@ require( ABSPATH . 'wp-admin/includes/theme-install.php' );
 wp_reset_vars( array( 'tab' ) );
 
 if ( ! current_user_can('install_themes') )
-       wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
+       wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
 
 if ( is_multisite() && ! is_network_admin() ) {
        wp_redirect( network_admin_url( 'theme-install.php' ) );
@@ -58,6 +58,7 @@ wp_localize_script( 'theme', '_wpThemeSettings', array(
 ) );
 
 wp_enqueue_script( 'theme' );
+wp_enqueue_script( 'updates' );
 
 if ( $tab ) {
        /**
@@ -75,7 +76,7 @@ if ( $tab ) {
 $help_overview =
        '<p>' . sprintf(
                        /* translators: %s: Theme Directory URL */
-                       __( 'You can find additional themes for your site by using the Theme Browser/Installer on this screen, which will display themes from the <a href="%s" target="_blank">WordPress.org Theme Directory</a>. These themes are designed and developed by third parties, are available free of charge, and are compatible with the license WordPress uses.' ),
+                       __( 'You can find additional themes for your site by using the Theme Browser/Installer on this screen, which will display themes from the <a href="%s" target="_blank">WordPress Theme Directory</a>. These themes are designed and developed by third parties, are available free of charge, and are compatible with the license WordPress uses.' ),
                        __( 'https://wordpress.org/themes/' )
                ) . '</p>' .
        '<p>' . __( 'You can Search for themes by keyword, author, or tag, or can get more specific and search by criteria listed in the feature filter.' ) . ' <span id="live-search-desc">' . __( 'The search results will be updated as you type.' ) . '</span></p>' .
@@ -116,10 +117,9 @@ include(ABSPATH . 'wp-admin/admin-header.php');
        echo esc_html( $title );
 
        /**
-        * Filter the tabs shown on the Add Themes screen.
+        * Filters the tabs shown on the Add Themes screen.
         *
-        * This filter is for backwards compatibility only, for the suppression
-        * of the upload tab.
+        * This filter is for backward compatibility only, for the suppression of the upload tab.
         *
         * @since 2.8.0
         *
@@ -127,18 +127,20 @@ include(ABSPATH . 'wp-admin/admin-header.php');
         */
        $tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) );
        if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_themes' ) ) {
-               echo ' <a href="#" class="upload page-title-action">' . __( 'Upload Theme' ) . '</a>';
-               echo ' <a href="#" class="browse-themes page-title-action">' . _x( 'Browse', 'themes' ) . '</a>';
+               echo ' <button type="button" class="upload-view-toggle page-title-action hide-if-no-js" aria-expanded="false">' . __( 'Upload Theme' ) . '</button>';
        }
        ?></h1>
+       <div class="error hide-if-js">
+               <p><?php _e( 'The Theme Installer screen requires JavaScript.' ); ?></p>
+       </div>
 
        <div class="upload-theme">
        <?php install_themes_upload(); ?>
        </div>
 
-       <h2 class="screen-reader-text"><?php _e( 'Filter themes list' ); ?></h2>
+       <h2 class="screen-reader-text hide-if-no-js"><?php _e( 'Filter themes list' ); ?></h2>
 
-       <div class="wp-filter">
+       <div class="wp-filter hide-if-no-js">
                <div class="filter-count">
                        <span class="count theme-count"></span>
                </div>
@@ -202,7 +204,7 @@ include(ABSPATH . 'wp-admin/admin-header.php');
                        </div>
                </div>
        </div>
-       <h2 class="screen-reader-text"><?php _e( 'Themes list' ); ?></h2>
+       <h2 class="screen-reader-text hide-if-no-js"><?php _e( 'Themes list' ); ?></h2>
        <div class="theme-browser content-filterable"></div>
        <div class="theme-install-overlay wp-full-overlay expanded"></div>
 
@@ -236,68 +238,100 @@ if ( $tab ) {
                <div class="theme-screenshot blank"></div>
        <# } #>
        <span class="more-details"><?php _ex( 'Details &amp; Preview', 'theme' ); ?></span>
-       <div class="theme-author"><?php printf( __( 'By %s' ), '{{ data.author }}' ); ?></div>
+       <div class="theme-author">
+               <?php
+               /* translators: %s: Theme author name */
+               printf( __( 'By %s' ), '{{ data.author }}' );
+               ?>
+       </div>
        <h3 class="theme-name">{{ data.name }}</h3>
 
        <div class="theme-actions">
-               <a class="button button-primary" href="{{ data.install_url }}"><?php esc_html_e( 'Install' ); ?></a>
-               <a class="button button-secondary preview install-theme-preview" href="#"><?php esc_html_e( 'Preview' ); ?></a>
+               <# if ( data.installed ) { #>
+                       <?php
+                       /* translators: %s: Theme name */
+                       $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
+                       ?>
+                       <# if ( data.activate_url ) { #>
+                               <a class="button button-primary activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
+                       <# } #>
+                       <# if ( data.customize_url ) { #>
+                               <a class="button button-secondary load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
+                       <# } else { #>
+                               <button class="button-secondary preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
+                       <# } #>
+               <# } else { #>
+                       <?php
+                       /* translators: %s: Theme name */
+                       $aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' );
+                       ?>
+                       <a class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}" href="{{ data.install_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Install' ); ?></a>
+                       <button class="button-secondary preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
+               <# } #>
        </div>
 
        <# if ( data.installed ) { #>
-               <div class="theme-installed"><?php _ex( 'Already Installed', 'theme' ); ?></div>
+               <div class="notice notice-success notice-alt"><p><?php _ex( 'Installed', 'theme' ); ?></p></div>
        <# } #>
 </script>
 
 <script id="tmpl-theme-preview" type="text/template">
        <div class="wp-full-overlay-sidebar">
                <div class="wp-full-overlay-header">
-                       <a href="#" class="close-full-overlay"><span class="screen-reader-text"><?php _e( 'Close' ); ?></span></a>
-                       <a href="#" class="previous-theme"><span class="screen-reader-text"><?php _ex( 'Previous', 'Button label for a theme' ); ?></span></a>
-                       <a href="#" class="next-theme"><span class="screen-reader-text"><?php _ex( 'Next', 'Button label for a theme' ); ?></span></a>
-               <# if ( data.installed ) { #>
-                       <a href="#" class="button button-primary theme-install disabled"><?php _ex( 'Installed', 'theme' ); ?></a>
-               <# } else { #>
-                       <a href="{{ data.install_url }}" class="button button-primary theme-install"><?php _e( 'Install' ); ?></a>
-               <# } #>
+                       <button class="close-full-overlay"><span class="screen-reader-text"><?php _e( 'Close' ); ?></span></button>
+                       <button class="previous-theme"><span class="screen-reader-text"><?php _ex( 'Previous', 'Button label for a theme' ); ?></span></button>
+                       <button class="next-theme"><span class="screen-reader-text"><?php _ex( 'Next', 'Button label for a theme' ); ?></span></button>
+                       <# if ( data.installed ) { #>
+                               <a class="button button-primary activate" href="{{ data.activate_url }}"><?php _e( 'Activate' ); ?></a>
+                       <# } else { #>
+                               <a href="{{ data.install_url }}" class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}"><?php _e( 'Install' ); ?></a>
+                       <# } #>
                </div>
                <div class="wp-full-overlay-sidebar-content">
                        <div class="install-theme-info">
                                <h3 class="theme-name">{{ data.name }}</h3>
-                               <span class="theme-by"><?php printf( __( 'By %s' ), '{{ data.author }}' ); ?></span>
-
-                               <img class="theme-screenshot" src="{{ data.screenshot_url }}" alt="" />
-
-                               <div class="theme-details">
-                                       <# if ( data.rating ) { #>
-                                               <div class="theme-rating">
-                                                       {{{ data.stars }}}
-                                                       <span class="num-ratings" aria-hidden="true">({{ data.num_ratings }})</span>
+                                       <span class="theme-by">
+                                               <?php
+                                               /* translators: %s: Theme author name */
+                                               printf( __( 'By %s' ), '{{ data.author }}' );
+                                               ?>
+                                       </span>
+
+                                       <img class="theme-screenshot" src="{{ data.screenshot_url }}" alt="" />
+
+                                       <div class="theme-details">
+                                               <# if ( data.rating ) { #>
+                                                       <div class="theme-rating">
+                                                               {{{ data.stars }}}
+                                                               <span class="num-ratings">({{ data.num_ratings }})</span>
+                                                       </div>
+                                               <# } else { #>
+                                                       <span class="no-rating"><?php _e( 'This theme has not been rated yet.' ); ?></span>
+                                               <# } #>
+                                               <div class="theme-version">
+                                                       <?php
+                                                       /* translators: %s: Theme version */
+                                                       printf( __( 'Version: %s' ), '{{ data.version }}' );
+                                                       ?>
                                                </div>
-                                       <# } else { #>
-                                               <span class="no-rating"><?php _e( 'This theme has not been rated yet.' ); ?></span>
-                                       <# } #>
-                                       <div class="theme-version"><?php printf( __( 'Version: %s' ), '{{ data.version }}' ); ?></div>
-                                       <div class="theme-description">{{{ data.description }}}</div>
+                                               <div class="theme-description">{{{ data.description }}}</div>
+                                       </div>
                                </div>
                        </div>
-               </div>
-               <div class="wp-full-overlay-footer">
-                       <div class="devices">
-                               <button type="button" class="preview-desktop active" aria-pressed="true" data-device="desktop"><span class="screen-reader-text"><?php _e( 'Enter desktop preview mode' ); ?></span></button>
-                               <button type="button" class="preview-tablet" aria-pressed="false" data-device="tablet"><span class="screen-reader-text"><?php _e( 'Enter tablet preview mode' ); ?></span></button>
-                               <button type="button" class="preview-mobile" aria-pressed="false" data-device="mobile"><span class="screen-reader-text"><?php _e( 'Enter mobile preview mode' ); ?></span></button>
+                       <div class="wp-full-overlay-footer">
+                               <button type="button" class="collapse-sidebar button-secondary" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>">
+                                       <span class="collapse-sidebar-arrow"></span>
+                                       <span class="collapse-sidebar-label"><?php _e( 'Collapse' ); ?></span>
+                               </button>
                        </div>
-                       <button type="button" class="collapse-sidebar button-secondary" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>">
-                               <span class="collapse-sidebar-arrow"></span>
-                               <span class="collapse-sidebar-label"><?php _e( 'Collapse' ); ?></span>
-                       </button>
                </div>
-       </div>
-       <div class="wp-full-overlay-main">
-               <iframe src="{{ data.preview_url }}" title="<?php esc_attr_e( 'Preview' ); ?>" />
+               <div class="wp-full-overlay-main">
+               <iframe src="{{ data.preview_url }}" title="<?php esc_attr_e( 'Preview' ); ?>"></iframe>
        </div>
 </script>
 
 <?php
+wp_print_request_filesystem_credentials_modal();
+wp_print_admin_notice_templates();
+
 include(ABSPATH . 'wp-admin/admin-footer.php');
index 67769ee8d1dd6944917439c8c6630dd60d4e1ce7..c601cd555dc6732fcec4ceadf15fabd8ad7812dd 100644 (file)
@@ -12,7 +12,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
 if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to edit theme options on this site.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>',
                403
        );
 }
@@ -40,7 +40,7 @@ if ( current_user_can( 'switch_themes' ) && isset($_GET['action'] ) ) {
                if ( ! current_user_can( 'delete_themes' ) ) {
                        wp_die(
                                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-                               '<p>' . __( 'You are not allowed to delete this item.' ) . '</p>',
+                               '<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
                                403
                        );
                }
@@ -89,7 +89,7 @@ if ( current_user_can( 'install_themes' ) ) {
        if ( is_multisite() ) {
                $help_install = '<p>' . __('Installing themes on Multisite can only be done from the Network Admin section.') . '</p>';
        } else {
-               $help_install = '<p>' . sprintf( __('If you would like to see more themes to choose from, click on the &#8220;Add New&#8221; button and you will be able to browse or search for additional themes from the <a href="%s" target="_blank">WordPress.org Theme Directory</a>. Themes in the WordPress.org Theme Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they&#8217;re free!'), 'https://wordpress.org/themes/' ) . '</p>';
+               $help_install = '<p>' . sprintf( __('If you would like to see more themes to choose from, click on the &#8220;Add New&#8221; button and you will be able to browse or search for additional themes from the <a href="%s" target="_blank">WordPress Theme Directory</a>. Themes in the WordPress Theme Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they&#8217;re free!'), 'https://wordpress.org/themes/' ) . '</p>';
        }
 
        get_current_screen()->add_help_tab( array(
@@ -145,6 +145,7 @@ wp_localize_script( 'theme', '_wpThemeSettings', array(
 
 add_thickbox();
 wp_enqueue_script( 'theme' );
+wp_enqueue_script( 'updates' );
 wp_enqueue_script( 'customize-loader' );
 
 require_once( ABSPATH . 'wp-admin/admin-header.php' );
@@ -248,6 +249,13 @@ foreach ( $themes as $theme ) :
        <?php } else { ?>
                <div class="theme-screenshot blank"></div>
        <?php } ?>
+
+       <?php if ( $theme['hasUpdate'] ) : ?>
+               <div class="update-message notice inline notice-warning notice-alt">
+                       <p><?php _e( 'New version available. <button class="button-link" type="button">Update now</button>' ); ?></p>
+               </div>
+       <?php endif; ?>
+
        <span class="more-details" id="<?php echo $aria_action; ?>"><?php _e( 'Theme Details' ); ?></span>
        <div class="theme-author"><?php printf( __( 'By %s' ), $theme['author'] ); ?></div>
 
@@ -269,17 +277,17 @@ foreach ( $themes as $theme ) :
                        <a class="button button-primary customize load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Customize' ); ?></a>
                <?php } ?>
        <?php } else { ?>
-               <a class="button button-secondary activate" href="<?php echo $theme['actions']['activate']; ?>"><?php _e( 'Activate' ); ?></a>
+               <?php
+               /* translators: %s: Theme name */
+               $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
+               ?>
+               <a class="button button-secondary activate" href="<?php echo $theme['actions']['activate']; ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
                <?php if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?>
                        <a class="button button-primary load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Live Preview' ); ?></a>
                <?php } ?>
        <?php } ?>
 
        </div>
-
-       <?php if ( $theme['hasUpdate'] ) { ?>
-               <div class="theme-update"><?php _e( 'Update Available' ); ?></div>
-       <?php } ?>
 </div>
 <?php endforeach; ?>
        </div>
@@ -368,13 +376,23 @@ $can_install = current_user_can( 'install_themes' );
        <# } else { #>
                <div class="theme-screenshot blank"></div>
        <# } #>
+
+       <# if ( data.hasUpdate ) { #>
+               <div class="update-message notice inline notice-warning notice-alt"><p><?php _e( 'New version available. <button class="button-link" type="button">Update now</button>' ); ?></p></div>
+       <# } #>
+
        <span class="more-details" id="{{ data.id }}-action"><?php _e( 'Theme Details' ); ?></span>
-       <div class="theme-author"><?php printf( __( 'By %s' ), '{{{ data.author }}}' ); ?></div>
+       <div class="theme-author">
+               <?php
+               /* translators: %s: Theme author name */
+               printf( __( 'By %s' ), '{{{ data.author }}}' );
+               ?>
+       </div>
 
        <# if ( data.active ) { #>
                <h2 class="theme-name" id="{{ data.id }}-name">
                        <?php
-                       /* translators: %s: theme name */
+                       /* translators: %s: Theme name */
                        printf( __( '<span>Active:</span> %s' ), '{{{ data.name }}}' );
                        ?>
                </h2>
@@ -383,21 +401,19 @@ $can_install = current_user_can( 'install_themes' );
        <# } #>
 
        <div class="theme-actions">
-
-       <# if ( data.active ) { #>
-               <# if ( data.actions.customize ) { #>
-                       <a class="button button-primary customize load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Customize' ); ?></a>
+               <# if ( data.active ) { #>
+                       <# if ( data.actions.customize ) { #>
+                               <a class="button button-primary customize load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Customize' ); ?></a>
+                       <# } #>
+               <# } else { #>
+                       <?php
+                       /* translators: %s: Theme name */
+                       $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
+                       ?>
+                       <a class="button button-secondary activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>
+                       <a class="button button-primary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a>
                <# } #>
-       <# } else { #>
-               <a class="button button-secondary activate" href="{{{ data.actions.activate }}}"><?php _e( 'Activate' ); ?></a>
-               <a class="button button-primary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a>
-       <# } #>
-
        </div>
-
-       <# if ( data.hasUpdate ) { #>
-               <div class="theme-update"><?php _e( 'Update Available' ); ?></div>
-       <# } #>
 </script>
 
 <script id="tmpl-theme-single" type="text/template">
@@ -448,8 +464,12 @@ $can_install = current_user_can( 'install_themes' );
                                <?php echo implode( ' ', $current_theme_actions ); ?>
                        </div>
                        <div class="inactive-theme">
+                               <?php
+                               /* translators: %s: Theme name */
+                               $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
+                               ?>
                                <# if ( data.actions.activate ) { #>
-                                       <a href="{{{ data.actions.activate }}}" class="button button-secondary activate"><?php _e( 'Activate' ); ?></a>
+                                       <a href="{{{ data.actions.activate }}}" class="button button-secondary activate" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>
                                <# } #>
                                <a href="{{{ data.actions.customize }}}" class="button button-primary load-customize hide-if-no-customize"><?php _e( 'Live Preview' ); ?></a>
                        </div>
@@ -461,4 +481,9 @@ $can_install = current_user_can( 'install_themes' );
        </div>
 </script>
 
-<?php require( ABSPATH . 'wp-admin/admin-footer.php' );
+<?php
+wp_print_request_filesystem_credentials_modal();
+wp_print_admin_notice_templates();
+wp_print_update_row_templates();
+
+require( ABSPATH . 'wp-admin/admin-footer.php' );
index 38c30d4de6b57f7b6e1b0e46ed1aee0d3ba53bdb..404bb8ac8b10a5fbd5ca37222f88c9933a0d9864 100644 (file)
@@ -20,7 +20,7 @@ if ( is_multisite() && ! is_network_admin() ) {
 }
 
 if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_themes' ) && ! current_user_can( 'update_plugins' ) )
-       wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
+       wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
 
 /**
  *
@@ -623,7 +623,7 @@ if ( 'upgrade-core' == $action ) {
 } elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) {
 
        if ( ! current_user_can( 'update_core' ) )
-               wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
+               wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
 
        check_admin_referer('upgrade-core');
 
@@ -647,7 +647,7 @@ if ( 'upgrade-core' == $action ) {
 } elseif ( 'do-plugin-upgrade' == $action ) {
 
        if ( ! current_user_can( 'update_plugins' ) )
-               wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
+               wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
 
        check_admin_referer('upgrade-core');
 
@@ -675,7 +675,7 @@ if ( 'upgrade-core' == $action ) {
 } elseif ( 'do-theme-upgrade' == $action ) {
 
        if ( ! current_user_can( 'update_themes' ) )
-               wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
+               wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
 
        check_admin_referer('upgrade-core');
 
@@ -705,7 +705,7 @@ if ( 'upgrade-core' == $action ) {
 } elseif ( 'do-translation-upgrade' == $action ) {
 
        if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_plugins' ) && ! current_user_can( 'update_themes' ) )
-               wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
+               wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
 
        check_admin_referer( 'upgrade-translations' );
 
index fba26f885a32644b88bface862ba5ae5b2dd3d91..0ae248c8b7e50d12ce551335f422688f90686db4 100644 (file)
@@ -21,7 +21,7 @@ if ( isset($_GET['action']) ) {
 
        if ( 'update-selected' == $action ) {
                if ( ! current_user_can( 'update_plugins' ) )
-                       wp_die( __( 'You do not have sufficient permissions to update plugins for this site.' ) );
+                       wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) );
 
                check_admin_referer( 'bulk-update-plugins' );
 
@@ -47,7 +47,7 @@ if ( isset($_GET['action']) ) {
 
        } elseif ( 'upgrade-plugin' == $action ) {
                if ( ! current_user_can('update_plugins') )
-                       wp_die(__('You do not have sufficient permissions to update plugins for this site.'));
+                       wp_die(__('Sorry, you are not allowed to update plugins for this site.'));
 
                check_admin_referer('upgrade-plugin_' . $plugin);
 
@@ -68,7 +68,7 @@ if ( isset($_GET['action']) ) {
 
        } elseif ('activate-plugin' == $action ) {
                if ( ! current_user_can('update_plugins') )
-                       wp_die(__('You do not have sufficient permissions to update plugins for this site.'));
+                       wp_die(__('Sorry, you are not allowed to update plugins for this site.'));
 
                check_admin_referer('activate-plugin_' . $plugin);
                if ( ! isset($_GET['failure']) && ! isset($_GET['success']) ) {
@@ -93,7 +93,7 @@ if ( isset($_GET['action']) ) {
        } elseif ( 'install-plugin' == $action ) {
 
                if ( ! current_user_can('install_plugins') )
-                       wp_die( __( 'You do not have sufficient permissions to install plugins on this site.' ) );
+                       wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
 
                include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api..
 
@@ -141,7 +141,7 @@ if ( isset($_GET['action']) ) {
        } elseif ( 'upload-plugin' == $action ) {
 
                if ( ! current_user_can( 'upload_plugins' ) ) {
-                       wp_die( __( 'You do not have sufficient permissions to install plugins on this site.' ) );
+                       wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
                }
 
                check_admin_referer('plugin-upload');
@@ -169,7 +169,7 @@ if ( isset($_GET['action']) ) {
        } elseif ( 'upgrade-theme' == $action ) {
 
                if ( ! current_user_can('update_themes') )
-                       wp_die(__('You do not have sufficient permissions to update themes for this site.'));
+                       wp_die(__('Sorry, you are not allowed to update themes for this site.'));
 
                check_admin_referer('upgrade-theme_' . $theme);
 
@@ -190,7 +190,7 @@ if ( isset($_GET['action']) ) {
                include(ABSPATH . 'wp-admin/admin-footer.php');
        } elseif ( 'update-selected-themes' == $action ) {
                if ( ! current_user_can( 'update_themes' ) )
-                       wp_die( __( 'You do not have sufficient permissions to update themes for this site.' ) );
+                       wp_die( __( 'Sorry, you are not allowed to update themes for this site.' ) );
 
                check_admin_referer( 'bulk-update-themes' );
 
@@ -216,7 +216,7 @@ if ( isset($_GET['action']) ) {
        } elseif ( 'install-theme' == $action ) {
 
                if ( ! current_user_can('install_themes') )
-                       wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
+                       wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
 
                include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); //for themes_api..
 
@@ -246,7 +246,7 @@ if ( isset($_GET['action']) ) {
        } elseif ( 'upload-theme' == $action ) {
 
                if ( ! current_user_can( 'upload_themes' ) ) {
-                       wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
+                       wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
                }
 
                check_admin_referer('theme-upload');
index 7be637c8fdc8d5eddac4db85558a669c16ce497b..139759b99593cb14c273292b4bb517d8e35021d2 100644 (file)
@@ -8,5 +8,5 @@
  * @subpackage Administration
  */
 
-_deprecated_file( basename(__FILE__), '2.5', 'wp-admin/includes/upgrade.php' );
+_deprecated_file( basename(__FILE__), '2.5.0', 'wp-admin/includes/upgrade.php' );
 require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
index a71280f7e30d1a6a6337c98f442ab38b4b56b0ea..b9495ac059a256da1017e7cbbc85cbb0eb891f85 100644 (file)
@@ -10,7 +10,7 @@
 require_once( dirname( __FILE__ ) . '/admin.php' );
 
 if ( !current_user_can('upload_files') )
-       wp_die( __( 'You do not have permission to upload files.' ) );
+       wp_die( __( 'Sorry, you are not allowed to upload files.' ) );
 
 $mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid';
 $modes = array( 'grid', 'list' );
@@ -132,7 +132,7 @@ if ( $doaction ) {
                                break;
                        foreach ( (array) $post_ids as $post_id ) {
                                if ( !current_user_can( 'delete_post', $post_id ) )
-                                       wp_die( __( 'You are not allowed to move this item to the Trash.' ) );
+                                       wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) );
 
                                if ( !wp_trash_post( $post_id ) )
                                        wp_die( __( 'Error in moving to Trash.' ) );
@@ -144,7 +144,7 @@ if ( $doaction ) {
                                break;
                        foreach ( (array) $post_ids as $post_id ) {
                                if ( !current_user_can( 'delete_post', $post_id ) )
-                                       wp_die( __( 'You are not allowed to move this item out of the Trash.' ) );
+                                       wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) );
 
                                if ( !wp_untrash_post( $post_id ) )
                                        wp_die( __( 'Error in restoring from Trash.' ) );
@@ -156,7 +156,7 @@ if ( $doaction ) {
                                break;
                        foreach ( (array) $post_ids as $post_id_del ) {
                                if ( !current_user_can( 'delete_post', $post_id_del ) )
-                                       wp_die( __( 'You are not allowed to delete this item.' ) );
+                                       wp_die( __( 'Sorry, you are not allowed to delete this item.' ) );
 
                                if ( !wp_delete_attachment( $post_id_del ) )
                                        wp_die( __( 'Error in deleting.' ) );
index 04c19fb44066a3e5614f6c1f0cc20b46383402a7..aa6ed7f5ebde39d096f568dda6ccea21d55d71aa 100644 (file)
@@ -60,7 +60,7 @@ $wp_http_referer = remove_query_arg( array( 'update', 'delete_count', 'user_id'
 $user_can_edit = current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' );
 
 /**
- * Filter whether to allow administrators on Multisite to edit every user.
+ * Filters whether to allow administrators on Multisite to edit every user.
  *
  * Enabling the user editing form via this filter also hinges on the user holding
  * the 'manage_network_users' cap, and the logged-in user not matching the user
@@ -77,7 +77,7 @@ if ( is_multisite()
        && $user_id != $current_user->ID
        && ! apply_filters( 'enable_edit_any_user_configuration', true )
 ) {
-       wp_die( __( 'You do not have permission to edit this user.' ) );
+       wp_die( __( 'Sorry, you are not allowed to edit this user.' ) );
 }
 
 // Execute confirmed email change. See send_confirmation_on_profile_email().
@@ -110,7 +110,7 @@ case 'update':
 check_admin_referer('update-user_' . $user_id);
 
 if ( !current_user_can('edit_user', $user_id) )
-       wp_die(__('You do not have permission to edit this user.'));
+       wp_die(__('Sorry, you are not allowed to edit this user.'));
 
 if ( IS_PROFILE_PAGE ) {
        /**
@@ -163,7 +163,7 @@ default:
 $profileuser = get_user_to_edit($user_id);
 
 if ( !current_user_can('edit_user', $user_id) )
-       wp_die(__('You do not have permission to edit this user.'));
+       wp_die(__('Sorry, you are not allowed to edit this user.'));
 
 $sessions = WP_Session_Tokens::get_instance( $profileuser->ID );
 
@@ -426,7 +426,7 @@ if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_c
        <th><label for="<?php echo $name; ?>">
                <?php
                /**
-                * Filter a user contactmethod label.
+                * Filters a user contactmethod label.
                 *
                 * The dynamic portion of the filter hook, `$name`, refers to
                 * each of the keys in the contactmethods array.
@@ -470,7 +470,7 @@ if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_c
                        }
 
                        /**
-                        * Filter the user profile picture description displayed under the Gravatar.
+                        * Filters the user profile picture description displayed under the Gravatar.
                         *
                         * @since 4.4.0
                         *
@@ -484,7 +484,7 @@ if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_c
 
 <?php
 /**
- * Filter the display of the password fields.
+ * Filters the display of the password fields.
  *
  * @since 1.5.1
  * @since 2.8.0 Added the `$profileuser` parameter.
@@ -531,7 +531,7 @@ if ( $show_password_fields = apply_filters( 'show_password_fields', true, $profi
        <td>
                <label>
                        <input type="checkbox" name="pw_weak" class="pw-checkbox" />
-                       <?php _e( 'Confirm use of weak password' ); ?>
+                       <span id="pw-weak-text-label"><?php _e( 'Confirm use of potentially weak password' ); ?></span>
                </label>
        </td>
 </tr>
@@ -601,7 +601,7 @@ if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) : ?>
 
 <?php
 /**
- * Filter whether to display additional capabilities for the user.
+ * Filters whether to display additional capabilities for the user.
  *
  * The 'Additional Capabilities' section will only be enabled if
  * the number of the user's capabilities exceeds their number of
index 4239ed5fff0c64779299ad75c9ee3169f2f71e8c..42732434a1566dd2936ac74f2de7989d13cd2a41 100644 (file)
@@ -13,14 +13,14 @@ if ( is_multisite() ) {
        if ( ! current_user_can( 'create_users' ) && ! current_user_can( 'promote_users' ) ) {
                wp_die(
                        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-                       '<p>' . __( 'You do not have sufficient permissions to add users to this network.' ) . '</p>',
+                       '<p>' . __( 'Sorry, you are not allowed to add users to this network.' ) . '</p>',
                        403
                );
        }
 } elseif ( ! current_user_can( 'create_users' ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to create users.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to create users.' ) . '</p>',
                403
        );
 }
@@ -53,7 +53,7 @@ if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) {
        if ( ! current_user_can( 'promote_user', $user_details->ID ) ) {
                wp_die(
                        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-                       '<p>' . __( 'You do not have sufficient permissions to add users to this network.' ) . '</p>',
+                       '<p>' . __( 'Sorry, you are not allowed to add users to this network.' ) . '</p>',
                        403
                );
        }
@@ -107,7 +107,7 @@ Please click the following link to confirm the invite:
        if ( ! current_user_can( 'create_users' ) ) {
                wp_die(
                        '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-                       '<p>' . __( 'You are not allowed to create users.' ) . '</p>',
+                       '<p>' . __( 'Sorry, you are not allowed to create users.' ) . '</p>',
                        403
                );
        }
@@ -133,7 +133,7 @@ Please click the following link to confirm the invite:
                        $add_user_errors = $user_details[ 'errors' ];
                } else {
                        /**
-                        * Filter the user_login, also known as the username, before it is added to the site.
+                        * Filters the user_login, also known as the username, before it is added to the site.
                         *
                         * @since 2.0.3
                         *
@@ -148,7 +148,7 @@ Please click the following link to confirm the invite:
                        if ( isset( $_POST[ 'noconfirmation' ] ) && current_user_can( 'manage_network_users' ) ) {
                                $key = $wpdb->get_var( $wpdb->prepare( "SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s", $new_user_login, $new_user_email ) );
                                $new_user = wpmu_activate_signup( $key );
-                               if ( is_wp_error( $new_user ) ) {
+                               if ( is_wp_error( $new_user ) ) {
                                        $redirect = add_query_arg( array( 'update' => 'addnoconfirmation' ), 'user-new.php' );
                                } else {
                                        $redirect = add_query_arg( array( 'update' => 'addnoconfirmation', 'user_id' => $new_user['user_id'] ), 'user-new.php' );
@@ -175,8 +175,9 @@ if ( is_multisite() ) {
        $help .= '<p>' . __('Because this is a multisite installation, you may add accounts that already exist on the Network by specifying a username or email, and defining a role. For more options, such as specifying a password, you have to be a Network Administrator and use the hover link under an existing user&#8217;s name to Edit the user profile under Network Admin > All Users.') . '</p>' .
        '<p>' . __('New users will receive an email letting them know they&#8217;ve been added as a user for your site. This email will also contain their password. Check the box if you don&#8217;t want the user to receive a welcome email.') . '</p>';
 } else {
-       $help .= '<p>' . __('You must assign a password to the new user, which they can change after logging in. The username, however, cannot be changed.') . '</p>' .
-       '<p>' . __('New users will receive an email letting them know they&#8217;ve been added as a user for your site. By default, this email will also contain their password. Uncheck the box if you don&#8217;t want the password to be included in the welcome email.') . '</p>';
+       $help .= '<p>' . __('New users are automatically assigned a password, which they can change after logging in. You can view or edit the assigned password by clicking the Show Password button. The username cannot be changed once the user has been added.') . '</p>' .
+
+       '<p>' . __('By default, new users will receive an email letting them know they&#8217;ve been added as a user for your site. This email will also contain a password reset link. Uncheck the box if you don&#8217;t want to send the new user a welcome email.') . '</p>';
 }
 
 $help .= '<p>' . __('Remember to click the Add New User button at the bottom of this screen when you are finished.') . '</p>';
@@ -210,7 +211,7 @@ wp_enqueue_script('wp-ajax-response');
 wp_enqueue_script( 'user-profile' );
 
 /**
- * Filter whether to enable user auto-complete for non-super admins in Multisite.
+ * Filters whether to enable user auto-complete for non-super admins in Multisite.
  *
  * @since 3.4.0
  *
index 1445245805527841196bc00b180fff7ac384f13f..3d5063c0d75dec455242b1a81a01f08cb3d92e74 100644 (file)
@@ -18,7 +18,7 @@ if ( ! is_multisite() ) {
 
 $redirect_user_admin_request = ( ( $current_blog->domain != $current_site->domain ) || ( $current_blog->path != $current_site->path ) );
 /**
- * Filter whether to redirect the request to the User Admin in Multisite.
+ * Filters whether to redirect the request to the User Admin in Multisite.
  *
  * @since 3.2.0
  *
index 789f34c95c346da916340e9b2c6e7a559c093c94..194ced94d055225bcc59987010e7fc531f70d68e 100644 (file)
@@ -13,7 +13,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' );
 if ( ! current_user_can( 'list_users' ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to browse users.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to browse users.' ) . '</p>',
                403
        );
 }
@@ -39,7 +39,7 @@ get_current_screen()->add_help_tab( array(
        'content' => '<p>' . __('You can customize the display of this screen in a number of ways:') . '</p>' .
                                        '<ul>' .
                                        '<li>' . __('You can hide/display columns based on your needs and decide how many users to list per screen using the Screen Options tab.') . '</li>' .
-                                       '<li>' . __('You can filter the list of users by User Role using the text links in the upper left to show All, Administrator, Editor, Author, Contributor, or Subscriber. The default view is to show all users. Unused User Roles are not listed.') . '</li>' .
+                                       '<li>' . __( 'You can filter the list of users by User Role using the text links above the users list to show All, Administrator, Editor, Author, Contributor, or Subscriber. The default view is to show all users. Unused User Roles are not listed.' ) . '</li>' .
                                        '<li>' . __('You can view all posts made by a user by clicking on the number under the Posts column.') . '</li>' .
                                        '</ul>'
 ) );
index 91d611cd1d38277f28b68c3a56b765f5e28e86b6..a9876b891cef4d6dd6eb5a76440c8a1d9945c1e0 100644 (file)
@@ -15,7 +15,7 @@ require_once(ABSPATH . 'wp-admin/includes/widgets.php');
 if ( ! current_user_can( 'edit_theme_options' ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to edit theme options on this site.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>',
                403
        );
 }
@@ -357,7 +357,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
                                ),
                                admin_url( 'customize.php' )
                        ) ),
-                       __( 'Manage in Customizer' )
+                       __( 'Manage with Live Preview' )
                );
        }
 ?>
index 4fb249badb2d8526df5ed4fd318d11223d63a30c..4e9f1fcfb0e0e339de8e0697af790b4b0116ae8b 100644 (file)
@@ -42,7 +42,7 @@ do_action( 'set_comment_cookies', $comment, $user );
 $location = empty( $_POST['redirect_to'] ) ? get_comment_link( $comment ) : $_POST['redirect_to'] . '#comment-' . $comment->comment_ID;
 
 /**
- * Filter the location URI to send the commenter after posting.
+ * Filters the location URI to send the commenter after posting.
  *
  * @since 2.0.5
  *
index 50cce93413b007d1646e245a7517b81dae95e346..056a3613e681478d2ea187caf847095d0fd4c71d 100644 (file)
@@ -55,11 +55,11 @@ function twentyfifteen_setup() {
 
        /*
         * Make theme available for translation.
-        * Translations can be filed in the /languages/ directory.
+        * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfifteen
         * If you're building a theme based on twentyfifteen, use a find and replace
         * to change 'twentyfifteen' to the name of your theme in all the template files
         */
-       load_theme_textdomain( 'twentyfifteen', get_template_directory() . '/languages' );
+       load_theme_textdomain( 'twentyfifteen' );
 
        // Add default posts and comments RSS feed links to head.
        add_theme_support( 'automatic-feed-links' );
diff --git a/wp-content/themes/twentyfifteen/languages/twentyfifteen.pot b/wp-content/themes/twentyfifteen/languages/twentyfifteen.pot
deleted file mode 100644 (file)
index b01d427..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-# Copyright (C) 2016 the WordPress team
-# This file is distributed under the GNU General Public License v2 or later.
-msgid ""
-msgstr ""
-"Project-Id-Version: Twenty Fifteen 1.5\n"
-"Report-Msgid-Bugs-To: https://wordpress.org/support/theme/twentyfifteen\n"
-"POT-Creation-Date: 2016-04-05 09:48:39+00:00\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-
-#: 404.php:17
-msgid "Oops! That page can&rsquo;t be found."
-msgstr ""
-
-#: 404.php:21
-msgid "It looks like nothing was found at this location. Maybe try a search?"
-msgstr ""
-
-#: archive.php:49 index.php:46 search.php:38
-msgid "Previous page"
-msgstr ""
-
-#: archive.php:50 index.php:47 search.php:39
-msgid "Next page"
-msgstr ""
-
-#: archive.php:51 content-link.php:40 content-page.php:29 content.php:42
-#: image.php:63 index.php:48 search.php:40
-msgid "Page"
-msgstr ""
-
-#: author-bio.php:12
-msgid "Published by"
-msgstr ""
-
-#: author-bio.php:34
-msgid "View all posts by %s"
-msgstr ""
-
-#: comments.php:28
-msgctxt "comments title"
-msgid "One thought on &ldquo;%2$s&rdquo;"
-msgid_plural "%1$s thoughts on &ldquo;%2$s&rdquo;"
-msgstr[0] ""
-msgstr[1] ""
-
-#: comments.php:53
-msgid "Comments are closed."
-msgstr ""
-
-#. translators: %s: Name of current post
-#: content-link.php:31 content.php:33 inc/template-tags.php:238
-msgid "Continue reading %s"
-msgstr ""
-
-#: content-link.php:36 content-page.php:25 content.php:38 image.php:59
-msgid "Pages:"
-msgstr ""
-
-#: content-link.php:56 content-page.php:35 content-search.php:28
-#: content-search.php:33 content.php:57 image.php:71
-msgid "Edit"
-msgstr ""
-
-#: content-none.php:15
-msgid "Nothing Found"
-msgstr ""
-
-#: content-none.php:22
-msgid ""
-"Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
-msgstr ""
-
-#: content-none.php:26
-msgid ""
-"Sorry, but nothing matched your search terms. Please try again with some "
-"different keywords."
-msgstr ""
-
-#: content-none.php:31
-msgid ""
-"It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps "
-"searching can help."
-msgstr ""
-
-#. #-#-#-#-#  twentyfifteen.pot (Twenty Fifteen 1.5)  #-#-#-#-#
-#. Author URI of the plugin/theme
-#: footer.php:25
-msgid "https://wordpress.org/"
-msgstr ""
-
-#: footer.php:25
-msgid "Proudly powered by %s"
-msgstr ""
-
-#: functions.php:85
-msgid "Primary Menu"
-msgstr ""
-
-#: functions.php:86
-msgid "Social Links Menu"
-msgstr ""
-
-#: functions.php:147
-msgid "Widget Area"
-msgstr ""
-
-#: functions.php:149
-msgid "Add widgets here to appear in your sidebar."
-msgstr ""
-
-#. Translators: If there are characters in your language that are not supported
-#. by Noto Sans, translate this to 'off'. Do not translate into your own
-#. language.
-#: functions.php:175
-msgctxt "Noto Sans font: on or off"
-msgid "on"
-msgstr ""
-
-#. Translators: If there are characters in your language that are not supported
-#. by Noto Serif, translate this to 'off'. Do not translate into your own
-#. language.
-#: functions.php:183
-msgctxt "Noto Serif font: on or off"
-msgid "on"
-msgstr ""
-
-#. Translators: If there are characters in your language that are not supported
-#. by Inconsolata, translate this to 'off'. Do not translate into your own
-#. language.
-#: functions.php:191
-msgctxt "Inconsolata font: on or off"
-msgid "on"
-msgstr ""
-
-#. Translators: To add an additional character subset specific to your
-#. language, translate this to 'greek', 'cyrillic', 'devanagari' or
-#. 'vietnamese'. Do not translate into your own language.
-#: functions.php:199
-msgctxt "Add new subset (greek, cyrillic, devanagari, vietnamese)"
-msgid "no-subset"
-msgstr ""
-
-#: functions.php:269
-msgid "expand child menu"
-msgstr ""
-
-#: functions.php:270
-msgid "collapse child menu"
-msgstr ""
-
-#: header.php:26
-msgid "Skip to content"
-msgstr ""
-
-#: header.php:45
-msgid "Menu and widgets"
-msgstr ""
-
-#: image.php:24
-msgid "Previous Image"
-msgstr ""
-
-#: image.php:24
-msgid "Next Image"
-msgstr ""
-
-#: image.php:84
-msgctxt "Parent post link"
-msgid ""
-"<span class=\"meta-nav\">Published in</span><span class=\"post-title\">"
-"%title</span>"
-msgstr ""
-
-#: inc/back-compat.php:37 inc/back-compat.php:47 inc/back-compat.php:60
-msgid ""
-"Twenty Fifteen requires at least WordPress version 4.1. You are running "
-"version %s. Please upgrade and try again."
-msgstr ""
-
-#: inc/customizer.php:44
-msgid "Base Color Scheme"
-msgstr ""
-
-#: inc/customizer.php:59
-msgid "Header and Sidebar Text Color"
-msgstr ""
-
-#: inc/customizer.php:60 inc/customizer.php:76 inc/customizer.php:81
-msgid "Applied to the header on small screens and the sidebar on wide screens."
-msgstr ""
-
-#: inc/customizer.php:75
-msgid "Header and Sidebar Background Color"
-msgstr ""
-
-#: inc/customizer.php:150
-msgid "Default"
-msgstr ""
-
-#: inc/customizer.php:161
-msgid "Dark"
-msgstr ""
-
-#: inc/customizer.php:172
-msgid "Yellow"
-msgstr ""
-
-#: inc/customizer.php:183
-msgid "Pink"
-msgstr ""
-
-#: inc/customizer.php:194
-msgid "Purple"
-msgstr ""
-
-#: inc/customizer.php:205
-msgid "Blue"
-msgstr ""
-
-#: inc/template-tags.php:23
-msgid "Comment navigation"
-msgstr ""
-
-#: inc/template-tags.php:26
-msgid "Older Comments"
-msgstr ""
-
-#: inc/template-tags.php:30
-msgid "Newer Comments"
-msgstr ""
-
-#: inc/template-tags.php:49
-msgid "Featured"
-msgstr ""
-
-#: inc/template-tags.php:55
-msgctxt "Used before post format."
-msgid "Format"
-msgstr ""
-
-#: inc/template-tags.php:76
-msgctxt "Used before publish date."
-msgid "Posted on"
-msgstr ""
-
-#: inc/template-tags.php:85
-msgctxt "Used before post author name."
-msgid "Author"
-msgstr ""
-
-#: inc/template-tags.php:91 inc/template-tags.php:99
-msgctxt "Used between list items, there is a space after the comma."
-msgid ", "
-msgstr ""
-
-#: inc/template-tags.php:94
-msgctxt "Used before category names."
-msgid "Categories"
-msgstr ""
-
-#: inc/template-tags.php:102
-msgctxt "Used before tag names."
-msgid "Tags"
-msgstr ""
-
-#: inc/template-tags.php:113
-msgctxt "Used before full size attachment link."
-msgid "Full size"
-msgstr ""
-
-#. translators: %s: post title
-#: inc/template-tags.php:123
-msgid "Leave a comment<span class=\"screen-reader-text\"> on %s</span>"
-msgstr ""
-
-#: search.php:18
-msgid "Search Results for: %s"
-msgstr ""
-
-#: single.php:33
-msgid "Next"
-msgstr ""
-
-#: single.php:34
-msgid "Next post:"
-msgstr ""
-
-#: single.php:36
-msgid "Previous"
-msgstr ""
-
-#: single.php:37
-msgid "Previous post:"
-msgstr ""
-
-#. Theme Name of the plugin/theme
-msgid "Twenty Fifteen"
-msgstr ""
-
-#. Theme URI of the plugin/theme
-msgid "https://wordpress.org/themes/twentyfifteen/"
-msgstr ""
-
-#. Description of the plugin/theme
-msgid ""
-"Our 2015 default theme is clean, blog-focused, and designed for clarity. "
-"Twenty Fifteen's simple, straightforward typography is readable on a wide "
-"variety of screen sizes, and suitable for multiple languages. We designed it "
-"using a mobile-first approach, meaning your content takes center-stage, "
-"regardless of whether your visitors arrive by smartphone, tablet, laptop, or "
-"desktop computer."
-msgstr ""
-
-#. Author of the plugin/theme
-msgid "the WordPress team"
-msgstr ""
index 5403984dd050abbe8c4a103de618716a053b21e0..36ef940456d95f02000ef8b49eb2aace08c9b4e3 100644 (file)
@@ -1,11 +1,11 @@
 === Twenty Fifteen ===
 Contributors: the WordPress team
 Requires at least: WordPress 4.1
-Tested up to: WordPress 4.6-trunk
-Version: 1.5
+Tested up to: WordPress 4.7-trunk
+Version: 1.6
 License: GPLv2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
-Tags: black, blue, gray, pink, purple, white, yellow, dark, light, two-columns, left-sidebar, fixed-layout, responsive-layout, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
+Tags: blog, two-columns, left-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
 
 == Description ==
 Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer.
@@ -30,7 +30,7 @@ For more information about Twenty Fifteen please go to https://codex.wordpress.o
 
 == Copyright ==
 
-Twenty Fifteen WordPress Theme, Copyright 2014-2015 WordPress.org & Automattic.com
+Twenty Fifteen WordPress Theme, Copyright 2014-2016 WordPress.org & Automattic.com
 Twenty Fifteen is distributed under the terms of the GNU GPL
 
 This program is free software: you can redistribute it and/or modify
@@ -49,12 +49,17 @@ HTML5 Shiv v3.7.0, Copyright 2014 Alexander Farkas
 Licenses: MIT/GPL2
 Source: https://github.com/aFarkas/html5shiv
 
-Genericons icon font, Copyright 2013-2015 Automattic.com
+Genericons icon font, Copyright 2013-2016 Automattic.com
 License: GNU GPL, Version 2 (or later)
 Source: http://www.genericons.com
 
 == Changelog ==
 
+= 1.6 =
+* Released: August 15, 2016
+
+https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_1.6
+
 = 1.5 =
 * Released: April 12, 2016
 
index 6cae1e4642c3a8f30279796f4f1479ba0bb9b02f..56e46b688979db0d8b582942bf945f2581b8c01d 100644 (file)
@@ -4,10 +4,10 @@ Theme URI: https://wordpress.org/themes/twentyfifteen/
 Author: the WordPress team
 Author URI: https://wordpress.org/
 Description: Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer.
-Version: 1.5
+Version: 1.6
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
-Tags: black, blue, gray, pink, purple, white, yellow, dark, light, two-columns, left-sidebar, fixed-layout, responsive-layout, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
+Tags: blog, two-columns, left-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
 Text Domain: twentyfifteen
 
 This theme, like WordPress, is licensed under the GPL.
index 9b7cf0b6d8c9d3176c948d8cc8823cbad2436279..f85ef1ca6291e21847377ea6e2898da161d9d27b 100644 (file)
@@ -60,12 +60,12 @@ function twentyfourteen_setup() {
        /*
         * Make Twenty Fourteen available for translation.
         *
-        * Translations can be added to the /languages/ directory.
+        * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfourteen
         * If you're building a theme based on Twenty Fourteen, use a find and
         * replace to change 'twentyfourteen' to the name of your theme in all
         * template files.
         */
-       load_theme_textdomain( 'twentyfourteen', get_template_directory() . '/languages' );
+       load_theme_textdomain( 'twentyfourteen' );
 
        // This theme styles the visual editor to resemble the theme style.
        add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url(), 'genericons/genericons.css' ) );
@@ -319,9 +319,9 @@ function twentyfourteen_the_attached_image() {
 
        // If there is more than 1 attachment in a gallery...
        if ( count( $attachment_ids ) > 1 ) {
-               foreach ( $attachment_ids as $attachment_id ) {
+               foreach ( $attachment_ids as $idx => $attachment_id ) {
                        if ( $attachment_id == $post->ID ) {
-                               $next_id = current( $attachment_ids );
+                               $next_id = $attachment_ids[ ( $idx + 1 ) % count( $attachment_ids ) ];
                                break;
                        }
                }
diff --git a/wp-content/themes/twentyfourteen/languages/twentyfourteen.pot b/wp-content/themes/twentyfourteen/languages/twentyfourteen.pot
deleted file mode 100644 (file)
index d766ef4..0000000
+++ /dev/null
@@ -1,478 +0,0 @@
-# Copyright (C) 2016 the WordPress team
-# This file is distributed under the GNU General Public License v2 or later.
-msgid ""
-msgstr ""
-"Project-Id-Version: Twenty Fourteen 1.7\n"
-"Report-Msgid-Bugs-To: https://wordpress.org/support/theme/twentyfourteen\n"
-"POT-Creation-Date: 2016-04-05 09:48:39+00:00\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-
-#: 404.php:17
-msgid "Not Found"
-msgstr ""
-
-#: 404.php:21
-msgid "It looks like nothing was found at this location. Maybe try a search?"
-msgstr ""
-
-#: archive.php:31
-msgid "Daily Archives: %s"
-msgstr ""
-
-#: archive.php:34
-msgid "Monthly Archives: %s"
-msgstr ""
-
-#: archive.php:34
-msgctxt "monthly archives date format"
-msgid "F Y"
-msgstr ""
-
-#: archive.php:37
-msgid "Yearly Archives: %s"
-msgstr ""
-
-#: archive.php:37
-msgctxt "yearly archives date format"
-msgid "Y"
-msgstr ""
-
-#: archive.php:40 taxonomy-post_format.php:51
-msgid "Archives"
-msgstr ""
-
-#: author.php:31
-msgid "All posts by %s"
-msgstr ""
-
-#: category.php:20
-msgid "Category Archives: %s"
-msgstr ""
-
-#: comments.php:27
-msgid "One thought on &ldquo;%2$s&rdquo;"
-msgid_plural "%1$s thoughts on &ldquo;%2$s&rdquo;"
-msgstr[0] ""
-msgstr[1] ""
-
-#: comments.php:34 comments.php:52
-msgid "Comment navigation"
-msgstr ""
-
-#: comments.php:35 comments.php:53
-msgid "&larr; Older Comments"
-msgstr ""
-
-#: comments.php:36 comments.php:54
-msgid "Newer Comments &rarr;"
-msgstr ""
-
-#: comments.php:59
-msgid "Comments are closed."
-msgstr ""
-
-#: content-aside.php:17 content-audio.php:17 content-featured-post.php:28
-#: content-gallery.php:17 content-image.php:17 content-link.php:17
-#: content-quote.php:17 content-video.php:17 content.php:19
-msgctxt "Used between list items, there is a space after the comma."
-msgid ", "
-msgstr ""
-
-#: content-aside.php:37 content-audio.php:37 content-gallery.php:37
-#: content-image.php:37 content-link.php:37 content-quote.php:37
-#: content-video.php:37 content.php:38 inc/widgets.php:215
-msgid "Leave a comment"
-msgstr ""
-
-#: content-aside.php:37 content-audio.php:37 content-gallery.php:37
-#: content-image.php:37 content-link.php:37 content-quote.php:37
-#: content-video.php:37 content.php:38 inc/widgets.php:215
-msgid "1 Comment"
-msgstr ""
-
-#: content-aside.php:37 content-audio.php:37 content-gallery.php:37
-#: content-image.php:37 content-link.php:37 content-quote.php:37
-#: content-video.php:37 content.php:38 inc/widgets.php:215
-msgid "% Comments"
-msgstr ""
-
-#: content-aside.php:40 content-audio.php:40 content-gallery.php:40
-#: content-image.php:40 content-link.php:40 content-page.php:28
-#: content-quote.php:40 content-video.php:40 content.php:42 image.php:34
-#: page-templates/contributors.php:35
-msgid "Edit"
-msgstr ""
-
-#. translators: %s: Name of current post
-#: content-aside.php:48 content-audio.php:48 content-gallery.php:48
-#: content-image.php:48 content-link.php:48 content-quote.php:48
-#: content-video.php:48 content.php:56 inc/template-tags.php:222
-msgid "Continue reading %s <span class=\"meta-nav\">&rarr;</span>"
-msgstr ""
-
-#: content-aside.php:53 content-audio.php:53 content-gallery.php:53
-#: content-image.php:53 content-link.php:53 content-page.php:22
-#: content-quote.php:53 content-video.php:53 content.php:61 image.php:54
-msgid "Pages:"
-msgstr ""
-
-#: content-none.php:12
-msgid "Nothing Found"
-msgstr ""
-
-#: content-none.php:18
-msgid ""
-"Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
-msgstr ""
-
-#: content-none.php:22
-msgid ""
-"Sorry, but nothing matched your search terms. Please try again with some "
-"different keywords."
-msgstr ""
-
-#: content-none.php:27
-msgid ""
-"It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps "
-"searching can help."
-msgstr ""
-
-#. #-#-#-#-#  twentyfourteen.pot (Twenty Fourteen 1.7)  #-#-#-#-#
-#. Author URI of the plugin/theme
-#: footer.php:21
-msgid "https://wordpress.org/"
-msgstr ""
-
-#: footer.php:21
-msgid "Proudly powered by %s"
-msgstr ""
-
-#: functions.php:83
-msgid "Top primary menu"
-msgstr ""
-
-#: functions.php:84
-msgid "Secondary menu in left sidebar"
-msgstr ""
-
-#: functions.php:174
-msgid "Primary Sidebar"
-msgstr ""
-
-#: functions.php:176
-msgid "Main sidebar that appears on the left."
-msgstr ""
-
-#: functions.php:183
-msgid "Content Sidebar"
-msgstr ""
-
-#: functions.php:185
-msgid "Additional sidebar that appears on the right."
-msgstr ""
-
-#: functions.php:192
-msgid "Footer Widget Area"
-msgstr ""
-
-#: functions.php:194
-msgid "Appears in the footer section of the site."
-msgstr ""
-
-#. Translators: If there are characters in your language that are not supported
-#. by Lato, translate this to 'off'. Do not translate into your own language.
-#: functions.php:216
-msgctxt "Lato font: on or off"
-msgid "on"
-msgstr ""
-
-#: functions.php:261
-msgid "Previous"
-msgstr ""
-
-#: functions.php:262
-msgid "Next"
-msgstr ""
-
-#: functions.php:379
-msgid "%d Article"
-msgid_plural "%d Articles"
-msgstr[0] ""
-msgstr[1] ""
-
-#: functions.php:498
-msgid "Page %s"
-msgstr ""
-
-#: header.php:48
-msgid "Search"
-msgstr ""
-
-#: header.php:52
-msgid "Primary Menu"
-msgstr ""
-
-#: header.php:53
-msgid "Skip to content"
-msgstr ""
-
-#: image.php:65
-msgid "Previous Image"
-msgstr ""
-
-#: image.php:66
-msgid "Next Image"
-msgstr ""
-
-#: inc/back-compat.php:37 inc/back-compat.php:47 inc/back-compat.php:60
-msgid ""
-"Twenty Fourteen requires at least WordPress version 3.6. You are running "
-"version %s. Please upgrade and try again."
-msgstr ""
-
-#: inc/customizer.php:37
-msgid "Site Title Color"
-msgstr ""
-
-#: inc/customizer.php:40
-msgid "Display Site Title &amp; Tagline"
-msgstr ""
-
-#: inc/customizer.php:44 inc/customizer.php:45
-msgid "May only be visible on wide screens."
-msgstr ""
-
-#: inc/customizer.php:47 inc/customizer.php:48
-msgid "Background may only be visible on wide screens."
-msgstr ""
-
-#: inc/customizer.php:53 inc/featured-content.php:403
-msgid "Featured Content"
-msgstr ""
-
-#: inc/customizer.php:54 inc/featured-content.php:404
-msgid ""
-"Use a <a href=\"%1$s\">tag</a> to feature your posts. If no posts match the "
-"tag, <a href=\"%2$s\">sticky posts</a> will be displayed instead."
-msgstr ""
-
-#: inc/customizer.php:55 inc/customizer.php:145 inc/featured-content.php:405
-#: inc/featured-content.php:414 inc/featured-content.php:474
-msgctxt "featured content default tag slug"
-msgid "featured"
-msgstr ""
-
-#: inc/customizer.php:69
-msgid "Layout"
-msgstr ""
-
-#: inc/customizer.php:73
-msgid "Grid"
-msgstr ""
-
-#: inc/customizer.php:74
-msgid "Slider"
-msgstr ""
-
-#. #-#-#-#-#  twentyfourteen.pot (Twenty Fourteen 1.7)  #-#-#-#-#
-#. Theme Name of the plugin/theme
-#: inc/customizer.php:142
-msgid "Twenty Fourteen"
-msgstr ""
-
-#: inc/customizer.php:145
-msgid ""
-"The home page features your choice of up to 6 posts prominently displayed in "
-"a grid or slider, controlled by a <a href=\"%1$s\">tag</a>; you can change "
-"the tag and layout in <a href=\"%2$s\">Appearance &rarr; Customize</a>. If "
-"no posts match the tag, <a href=\"%3$s\">sticky posts</a> will be displayed "
-"instead."
-msgstr ""
-
-#: inc/customizer.php:146
-msgid ""
-"Enhance your site design by using <a href=\"%s\">Featured Images</a> for "
-"posts you&rsquo;d like to stand out (also known as post thumbnails). This "
-"allows you to associate an image with your post without inserting it. Twenty "
-"Fourteen uses featured images for posts and pages&mdash;above the "
-"title&mdash;and in the Featured Content area on the home page."
-msgstr ""
-
-#: inc/customizer.php:147
-msgid ""
-"For an in-depth tutorial, and more tips and tricks, visit the <a href=\"%s"
-"\">Twenty Fourteen documentation</a>."
-msgstr ""
-
-#: inc/featured-content.php:426
-msgid "Tag Name"
-msgstr ""
-
-#: inc/featured-content.php:431
-msgid "Don&rsquo;t display tag on front end."
-msgstr ""
-
-#: inc/template-tags.php:50
-msgid "&larr; Previous"
-msgstr ""
-
-#: inc/template-tags.php:51
-msgid "Next &rarr;"
-msgstr ""
-
-#: inc/template-tags.php:58
-msgid "Posts navigation"
-msgstr ""
-
-#: inc/template-tags.php:85
-msgid "Post navigation"
-msgstr ""
-
-#: inc/template-tags.php:89
-msgid "<span class=\"meta-nav\">Published In</span>%title"
-msgstr ""
-
-#: inc/template-tags.php:91
-msgid "<span class=\"meta-nav\">Previous Post</span>%title"
-msgstr ""
-
-#: inc/template-tags.php:92
-msgid "<span class=\"meta-nav\">Next Post</span>%title"
-msgstr ""
-
-#: inc/template-tags.php:109
-msgid "Sticky"
-msgstr ""
-
-#: inc/widgets.php:34
-msgid "Twenty Fourteen Ephemera"
-msgstr ""
-
-#: inc/widgets.php:36
-msgid ""
-"Use this widget to list your recent Aside, Quote, Video, Audio, Image, "
-"Gallery, and Link posts."
-msgstr ""
-
-#: inc/widgets.php:75 taxonomy-post_format.php:33
-msgid "Images"
-msgstr ""
-
-#: inc/widgets.php:76
-msgid "More images"
-msgstr ""
-
-#: inc/widgets.php:79 taxonomy-post_format.php:36
-msgid "Videos"
-msgstr ""
-
-#: inc/widgets.php:80
-msgid "More videos"
-msgstr ""
-
-#: inc/widgets.php:83 taxonomy-post_format.php:39
-msgid "Audio"
-msgstr ""
-
-#: inc/widgets.php:84
-msgid "More audio"
-msgstr ""
-
-#: inc/widgets.php:87 taxonomy-post_format.php:42
-msgid "Quotes"
-msgstr ""
-
-#: inc/widgets.php:88
-msgid "More quotes"
-msgstr ""
-
-#: inc/widgets.php:91 taxonomy-post_format.php:45
-msgid "Links"
-msgstr ""
-
-#: inc/widgets.php:92
-msgid "More links"
-msgstr ""
-
-#: inc/widgets.php:95 taxonomy-post_format.php:48
-msgid "Galleries"
-msgstr ""
-
-#: inc/widgets.php:96
-msgid "More galleries"
-msgstr ""
-
-#: inc/widgets.php:100 taxonomy-post_format.php:30
-msgid "Asides"
-msgstr ""
-
-#: inc/widgets.php:101
-msgid "More asides"
-msgstr ""
-
-#: inc/widgets.php:148 inc/widgets.php:193
-msgid "Continue reading <span class=\"meta-nav\">&rarr;</span>"
-msgstr ""
-
-#: inc/widgets.php:183
-msgid "This gallery contains <a href=\"%1$s\" rel=\"bookmark\">%2$s photo</a>."
-msgid_plural ""
-"This gallery contains <a href=\"%1$s\" rel=\"bookmark\">%2$s photos</a>."
-msgstr[0] ""
-msgstr[1] ""
-
-#. translators: used with More archives link
-#: inc/widgets.php:227
-msgid "%s <span class=\"meta-nav\">&rarr;</span>"
-msgstr ""
-
-#: inc/widgets.php:276
-msgid "Title:"
-msgstr ""
-
-#: inc/widgets.php:279
-msgid "Number of posts to show:"
-msgstr ""
-
-#: inc/widgets.php:282
-msgid "Post format to show:"
-msgstr ""
-
-#: search.php:18
-msgid "Search Results for: %s"
-msgstr ""
-
-#: tag.php:22
-msgid "Tag Archives: %s"
-msgstr ""
-
-#. Theme URI of the plugin/theme
-msgid "https://wordpress.org/themes/twentyfourteen/"
-msgstr ""
-
-#. Description of the plugin/theme
-msgid ""
-"In 2014, our default theme lets you create a responsive magazine website "
-"with a sleek, modern design. Feature your favorite homepage content in "
-"either a grid or a slider. Use the three widget areas to customize your "
-"website, and change your content's layout with a full-width page template "
-"and a contributor page to show off your authors. Creating a magazine website "
-"with WordPress has never been easier."
-msgstr ""
-
-#. Author of the plugin/theme
-msgid "the WordPress team"
-msgstr ""
-
-#. Template Name of the plugin/theme
-msgid "Contributor Page"
-msgstr ""
-
-#. Template Name of the plugin/theme
-msgid "Full Width Page"
-msgstr ""
index 5c35b83d9291d647199287e848246d55bae75219..0080a1e923d895c662f6e9658e32b3fa2c803f22 100644 (file)
@@ -1,11 +1,11 @@
 === Twenty Fourteen ===
 Contributors: the WordPress team
 Requires at least: WordPress 3.6
-Tested up to: WordPress 4.6-trunk
-Stable tag: 1.7
+Tested up to: WordPress 4.7-trunk
+Stable tag: 1.8
 License: GPLv2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
-Tags: black, green, white, light, dark, two-columns, three-columns, left-sidebar, right-sidebar, fixed-layout, responsive-layout, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready
+Tags: blog, news, two-columns, three-columns, left-sidebar, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready
 
 == Description ==
 In 2014, our default theme lets you create a responsive magazine website with a sleek, modern design. Feature your favorite homepage content in either a grid or a slider. Use the three widget areas to customize your website, and change your content's layout with a full-width page template and a contributor page to show off your authors. Creating a magazine website with WordPress has never been easier.
@@ -22,7 +22,7 @@ For more information about Twenty Fourteen please go to https://codex.wordpress.
 
 == Copyright ==
 
-Twenty Fourteen WordPress Theme, Copyright 2013-2015 WordPress.org & Automattic.com
+Twenty Fourteen WordPress Theme, Copyright 2013-2016 WordPress.org & Automattic.com
 Twenty Fourteen is Distributed under the terms of the GNU GPL
 
 This program is free software: you can redistribute it and/or modify
@@ -44,12 +44,17 @@ HTML5 Shiv v3.7.0, Copyright 2014 Alexander Farkas
 Licenses: MIT/GPL2
 Source: https://github.com/aFarkas/html5shiv
 
-Genericons icon font, Copyright 2013-2015 Automattic.com
+Genericons icon font, Copyright 2013-2016 Automattic.com
 License: GNU GPL, Version 2 (or later)
 Source: http://www.genericons.com
 
 == Changelog ==
 
+= 1.8 =
+* Released: August 15, 2016
+
+https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_1.8
+
 = 1.7 =
 * Released: April 12, 2016
 
index 0bdc66d92817de92db2e121916973bb90d11f848..4221371a9274df74b6409b716987800ae4271d95 100644 (file)
@@ -4,10 +4,10 @@ Theme URI: https://wordpress.org/themes/twentyfourteen/
 Author: the WordPress team
 Author URI: https://wordpress.org/
 Description: In 2014, our default theme lets you create a responsive magazine website with a sleek, modern design. Feature your favorite homepage content in either a grid or a slider. Use the three widget areas to customize your website, and change your content's layout with a full-width page template and a contributor page to show off your authors. Creating a magazine website with WordPress has never been easier.
-Version: 1.7
+Version: 1.8
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
-Tags: black, green, white, light, dark, two-columns, three-columns, left-sidebar, right-sidebar, fixed-layout, responsive-layout, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready
+Tags: blog, news, two-columns, three-columns, left-sidebar, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready
 Text Domain: twentyfourteen
 
 This theme, like WordPress, is licensed under the GPL.
index 7b99fa295707566ca39d4df1b57252898e4182af..305519586c8c96103d8cbf841ce89e7579ceafd3 100644 (file)
@@ -116,6 +116,7 @@ blockquote {
        font-style: italic;
        line-height: 1.4736842105;
        margin-bottom: 28px;
+       overflow: hidden;
        padding: 0 0 0 24px;
 }
 
index db5f877d583409c01e798694e888a457383970cc..3626af960665a6638fec77e51754dd1481182dc7 100644 (file)
@@ -47,11 +47,11 @@ if ( ! function_exists( 'twentysixteen_setup' ) ) :
 function twentysixteen_setup() {
        /*
         * Make theme available for translation.
-        * Translations can be filed in the /languages/ directory.
+        * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentysixteen
         * If you're building a theme based on Twenty Sixteen, use a find and replace
         * to change 'twentysixteen' to the name of your theme in all the template files
         */
-       load_theme_textdomain( 'twentysixteen', get_template_directory() . '/languages' );
+       load_theme_textdomain( 'twentysixteen' );
 
        // Add default posts and comments RSS feed links to head.
        add_theme_support( 'automatic-feed-links' );
@@ -253,32 +253,32 @@ function twentysixteen_scripts() {
        wp_enqueue_style( 'twentysixteen-style', get_stylesheet_uri() );
 
        // Load the Internet Explorer specific stylesheet.
-       wp_enqueue_style( 'twentysixteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentysixteen-style' ), '20160412' );
+       wp_enqueue_style( 'twentysixteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentysixteen-style' ), '20160816' );
        wp_style_add_data( 'twentysixteen-ie', 'conditional', 'lt IE 10' );
 
        // Load the Internet Explorer 8 specific stylesheet.
-       wp_enqueue_style( 'twentysixteen-ie8', get_template_directory_uri() . '/css/ie8.css', array( 'twentysixteen-style' ), '20160412' );
+       wp_enqueue_style( 'twentysixteen-ie8', get_template_directory_uri() . '/css/ie8.css', array( 'twentysixteen-style' ), '20160816' );
        wp_style_add_data( 'twentysixteen-ie8', 'conditional', 'lt IE 9' );
 
        // Load the Internet Explorer 7 specific stylesheet.
-       wp_enqueue_style( 'twentysixteen-ie7', get_template_directory_uri() . '/css/ie7.css', array( 'twentysixteen-style' ), '20160412' );
+       wp_enqueue_style( 'twentysixteen-ie7', get_template_directory_uri() . '/css/ie7.css', array( 'twentysixteen-style' ), '20160816' );
        wp_style_add_data( 'twentysixteen-ie7', 'conditional', 'lt IE 8' );
 
        // Load the html5 shiv.
        wp_enqueue_script( 'twentysixteen-html5', get_template_directory_uri() . '/js/html5.js', array(), '3.7.3' );
        wp_script_add_data( 'twentysixteen-html5', 'conditional', 'lt IE 9' );
 
-       wp_enqueue_script( 'twentysixteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20160412', true );
+       wp_enqueue_script( 'twentysixteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20160816', true );
 
        if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
                wp_enqueue_script( 'comment-reply' );
        }
 
        if ( is_singular() && wp_attachment_is_image() ) {
-               wp_enqueue_script( 'twentysixteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20160412' );
+               wp_enqueue_script( 'twentysixteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20160816' );
        }
 
-       wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160412', true );
+       wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160816', true );
 
        wp_localize_script( 'twentysixteen-script', 'screenReaderText', array(
                'expand'   => __( 'expand child menu', 'twentysixteen' ),
index 794752d381286a9b858d59e1dc3211feec75984d..62eb1b0b39c610482e52ebf64a5edd12bb498f24 100644 (file)
@@ -421,7 +421,7 @@ add_action( 'wp_enqueue_scripts', 'twentysixteen_color_scheme_css' );
  * @since Twenty Sixteen 1.0
  */
 function twentysixteen_customize_control_js() {
-       wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20160412', true );
+       wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20160816', true );
        wp_localize_script( 'color-scheme-control', 'colorScheme', twentysixteen_get_color_schemes() );
 }
 add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_control_js' );
@@ -432,7 +432,7 @@ add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_contr
  * @since Twenty Sixteen 1.0
  */
 function twentysixteen_customize_preview_js() {
-       wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20160412', true );
+       wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20160816', true );
 }
 add_action( 'customize_preview_init', 'twentysixteen_customize_preview_js' );
 
@@ -554,11 +554,18 @@ function twentysixteen_get_color_scheme_css( $colors ) {
                background-color: {$colors['link_color']};
        }
 
+       input[type="date"]:focus,
+       input[type="time"]:focus,
+       input[type="datetime-local"]:focus,
+       input[type="week"]:focus,
+       input[type="month"]:focus,
        input[type="text"]:focus,
        input[type="email"]:focus,
        input[type="url"]:focus,
        input[type="password"]:focus,
        input[type="search"]:focus,
+       input[type="tel"]:focus,
+       input[type="number"]:focus,
        textarea:focus,
        .tagcloud a:hover,
        .tagcloud a:focus,
@@ -685,11 +692,18 @@ function twentysixteen_get_color_scheme_css( $colors ) {
        table,
        th,
        td,
+       input[type="date"],
+       input[type="time"],
+       input[type="datetime-local"],
+       input[type="week"],
+       input[type="month"],
        input[type="text"],
        input[type="email"],
        input[type="url"],
        input[type="password"],
        input[type="search"],
+       input[type="tel"],
+       input[type="number"],
        textarea,
        .main-navigation li,
        .main-navigation .primary-menu,
@@ -918,11 +932,18 @@ function twentysixteen_link_color_css() {
                        background-color: %1$s;
                }
 
+               input[type="date"]:focus,
+               input[type="time"]:focus,
+               input[type="datetime-local"]:focus,
+               input[type="week"]:focus,
+               input[type="month"]:focus,
                input[type="text"]:focus,
                input[type="email"]:focus,
                input[type="url"]:focus,
                input[type="password"]:focus,
                input[type="search"]:focus,
+               input[type="tel"]:focus,
+               input[type="number"]:focus,
                textarea:focus,
                .tagcloud a:hover,
                .tagcloud a:focus,
@@ -1039,11 +1060,18 @@ function twentysixteen_main_text_color_css() {
                table,
                th,
                td,
+               input[type="date"],
+               input[type="time"],
+               input[type="datetime-local"],
+               input[type="week"],
+               input[type="month"],
                input[type="text"],
                input[type="email"],
                input[type="url"],
                input[type="password"],
                input[type="search"],
+               input[type="tel"],
+               input[type="number"],
                textarea,
                .main-navigation li,
                .main-navigation .primary-menu,
index 2a010ac771199cf925496d40950b829ba6b644bb..eb87203062ee408190abcadd2ce09090ccb383e0 100644 (file)
@@ -188,6 +188,7 @@ function twentysixteen_excerpt_more() {
 add_filter( 'excerpt_more', 'twentysixteen_excerpt_more' );
 endif;
 
+if ( ! function_exists( 'twentysixteen_categorized_blog' ) ) :
 /**
  * Determines whether blog/site has more than one category.
  *
@@ -220,6 +221,7 @@ function twentysixteen_categorized_blog() {
                return false;
        }
 }
+endif;
 
 /**
  * Flushes out the transients used in twentysixteen_categorized_blog().
diff --git a/wp-content/themes/twentysixteen/languages/twentysixteen.pot b/wp-content/themes/twentysixteen/languages/twentysixteen.pot
deleted file mode 100644 (file)
index 8d4beb1..0000000
+++ /dev/null
@@ -1,346 +0,0 @@
-# Copyright (C) 2015 the WordPress team
-# This file is distributed under the GNU General Public License v2 or later.
-msgid ""
-msgstr ""
-"Project-Id-Version: Twenty Sixteen 0.1.20150828\n"
-"Report-Msgid-Bugs-To: https://wordpress.org/support/theme/twentysixteen\n"
-"POT-Creation-Date: 2015-11-20 12:58:54+00:00\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-
-#: 404.php:17
-msgid "Oops! That page can&rsquo;t be found."
-msgstr ""
-
-#: 404.php:21
-msgid "It looks like nothing was found at this location. Maybe try a search?"
-msgstr ""
-
-#: archive.php:49 index.php:46 search.php:37
-msgid "Previous page"
-msgstr ""
-
-#: archive.php:50 index.php:47 search.php:38
-msgid "Next page"
-msgstr ""
-
-#: archive.php:51 image.php:60 index.php:48 search.php:39
-#: template-parts/content-page.php:27 template-parts/content-single.php:29
-#: template-parts/content.php:37
-msgid "Page"
-msgstr ""
-
-#. translators: %s: post title
-#: comments.php:31
-msgctxt "comments title"
-msgid "One thought on &ldquo;%s&rdquo;"
-msgstr ""
-
-#. translators: 1: number of comments, 2: post title
-#: comments.php:35
-msgctxt "comments title"
-msgid "%1$s thought on &ldquo;%2$s&rdquo;"
-msgid_plural "%1$s thoughts on &ldquo;%2$s&rdquo;"
-msgstr[0] ""
-msgstr[1] ""
-
-#: comments.php:69
-msgid "Comments are closed."
-msgstr ""
-
-#: footer.php:17
-msgid "Footer Primary Menu"
-msgstr ""
-
-#: footer.php:28
-msgid "Footer Social Links Menu"
-msgstr ""
-
-#. #-#-#-#-#  twentysixteen.pot (Twenty Sixteen 0.1.20150828)  #-#-#-#-#
-#. Author URI of the plugin/theme
-#: footer.php:51
-msgid "https://wordpress.org/"
-msgstr ""
-
-#: footer.php:51
-msgid "Proudly powered by %s"
-msgstr ""
-
-#: functions.php:77 header.php:49
-msgid "Primary Menu"
-msgstr ""
-
-#: functions.php:78 header.php:60
-msgid "Social Links Menu"
-msgstr ""
-
-#: functions.php:142
-msgid "Sidebar"
-msgstr ""
-
-#: functions.php:144
-msgid "Add widgets here to appear in your sidebar."
-msgstr ""
-
-#: functions.php:152
-msgid "Content Bottom 1"
-msgstr ""
-
-#: functions.php:154 functions.php:164
-msgid "Appears at the bottom of the content on posts and pages."
-msgstr ""
-
-#: functions.php:162
-msgid "Content Bottom 2"
-msgstr ""
-
-#. translators: If there are characters in your language that are not supported
-#. by Merriweather, translate this to 'off'. Do not translate into your own
-#. language.
-#: functions.php:189
-msgctxt "Merriweather font: on or off"
-msgid "on"
-msgstr ""
-
-#. translators: If there are characters in your language that are not supported
-#. by Montserrat, translate this to 'off'. Do not translate into your own
-#. language.
-#: functions.php:194
-msgctxt "Montserrat font: on or off"
-msgid "on"
-msgstr ""
-
-#. translators: If there are characters in your language that are not supported
-#. by Inconsolata, translate this to 'off'. Do not translate into your own
-#. language.
-#: functions.php:199
-msgctxt "Inconsolata font: on or off"
-msgid "on"
-msgstr ""
-
-#: functions.php:270
-msgid "expand child menu"
-msgstr ""
-
-#: functions.php:271
-msgid "collapse child menu"
-msgstr ""
-
-#: header.php:27
-msgid "Skip to content"
-msgstr ""
-
-#: header.php:45
-msgid "Menu"
-msgstr ""
-
-#: image.php:24
-msgid "Previous Image"
-msgstr ""
-
-#: image.php:25
-msgid "Next Image"
-msgstr ""
-
-#: image.php:56 template-parts/content-page.php:23
-#: template-parts/content-single.php:25 template-parts/content.php:33
-msgid "Pages:"
-msgstr ""
-
-#: image.php:73
-msgctxt "Used before full size attachment link."
-msgid "Full size"
-msgstr ""
-
-#. translators: %s: Name of current post
-#: image.php:84 template-parts/content-page.php:37
-#: template-parts/content-search.php:28 template-parts/content-search.php:43
-#: template-parts/content-single.php:45 template-parts/content.php:49
-msgid "Edit<span class=\"screen-reader-text\"> \"%s\"</span>"
-msgstr ""
-
-#: image.php:102 single.php:29
-msgctxt "Parent post link"
-msgid ""
-"<span class=\"meta-nav\">Published in</span><span class=\"post-title\">"
-"%title</span>"
-msgstr ""
-
-#: inc/back-compat.php:41 inc/back-compat.php:53 inc/back-compat.php:68
-msgid ""
-"Twenty Sixteen requires at least WordPress version 4.4. You are running "
-"version %s. Please upgrade and try again."
-msgstr ""
-
-#: inc/customizer.php:117
-msgid "Base Color Scheme"
-msgstr ""
-
-#: inc/customizer.php:132
-msgid "Page Background Color"
-msgstr ""
-
-#: inc/customizer.php:147
-msgid "Link Color"
-msgstr ""
-
-#: inc/customizer.php:159
-msgid "Main Text Color"
-msgstr ""
-
-#: inc/customizer.php:171
-msgid "Secondary Text Color"
-msgstr ""
-
-#: inc/customizer.php:216
-msgid "Default"
-msgstr ""
-
-#: inc/customizer.php:226
-msgid "Dark"
-msgstr ""
-
-#: inc/customizer.php:236
-msgid "Gray"
-msgstr ""
-
-#: inc/customizer.php:246
-msgid "Red"
-msgstr ""
-
-#: inc/customizer.php:256
-msgid "Yellow"
-msgstr ""
-
-#: inc/template-tags.php:25
-msgctxt "Used before post author name."
-msgid "Author"
-msgstr ""
-
-#: inc/template-tags.php:38
-msgctxt "Used before post format."
-msgid "Format"
-msgstr ""
-
-#: inc/template-tags.php:50
-msgid "Leave a comment<span class=\"screen-reader-text\"> on %s</span>"
-msgstr ""
-
-#: inc/template-tags.php:79
-msgctxt "Used before publish date."
-msgid "Posted on"
-msgstr ""
-
-#: inc/template-tags.php:95 inc/template-tags.php:103
-msgctxt "Used between list items, there is a space after the comma."
-msgid ", "
-msgstr ""
-
-#: inc/template-tags.php:98
-msgctxt "Used before category names."
-msgid "Categories"
-msgstr ""
-
-#: inc/template-tags.php:106
-msgctxt "Used before tag names."
-msgid "Tags"
-msgstr ""
-
-#. translators: %s: Name of current post
-#: inc/template-tags.php:184 template-parts/content.php:28
-msgid "Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>"
-msgstr ""
-
-#: search.php:18
-msgid "Search Results for: %s"
-msgstr ""
-
-#: searchform.php:13 searchform.php:14
-msgctxt "label"
-msgid "Search for:"
-msgstr ""
-
-#: searchform.php:14
-msgctxt "placeholder"
-msgid "Search &hellip;"
-msgstr ""
-
-#: searchform.php:16
-msgctxt "submit button"
-msgid "Search"
-msgstr ""
-
-#: single.php:34
-msgid "Next"
-msgstr ""
-
-#: single.php:35
-msgid "Next post:"
-msgstr ""
-
-#: single.php:37
-msgid "Previous"
-msgstr ""
-
-#: single.php:38
-msgid "Previous post:"
-msgstr ""
-
-#: template-parts/biography.php:28
-msgid "Author:"
-msgstr ""
-
-#: template-parts/biography.php:33
-msgid "View all posts by %s"
-msgstr ""
-
-#: template-parts/content-none.php:13
-msgid "Nothing Found"
-msgstr ""
-
-#: template-parts/content-none.php:19
-msgid ""
-"Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
-msgstr ""
-
-#: template-parts/content-none.php:23
-msgid ""
-"Sorry, but nothing matched your search terms. Please try again with some "
-"different keywords."
-msgstr ""
-
-#: template-parts/content-none.php:28
-msgid ""
-"It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps "
-"searching can help."
-msgstr ""
-
-#: template-parts/content.php:14
-msgid "Featured"
-msgstr ""
-
-#. Theme Name of the plugin/theme
-msgid "Twenty Sixteen"
-msgstr ""
-
-#. Theme URI of the plugin/theme
-msgid "https://wordpress.org/themes/twentysixteen/"
-msgstr ""
-
-#. Description of the plugin/theme
-msgid ""
-"Twenty Sixteen is a modernized take on an ever-popular WordPress layout — "
-"the horizontal masthead with an optional right sidebar that works perfectly "
-"for blogs and websites. It has custom color options with beautiful default "
-"color schemes, a harmonious fluid grid using a mobile-first approach, and "
-"impeccable polish in every detail. Twenty Sixteen will make your WordPress "
-"look beautiful everywhere."
-msgstr ""
-
-#. Author of the plugin/theme
-msgid "the WordPress team"
-msgstr ""
index 540964e2ab686b2900f8595188d6df0fed231132..d1c13119b52f11732dd3c3e523a9039c3837e223 100644 (file)
@@ -2,10 +2,10 @@
 Contributors: the WordPress team
 Requires at least: WordPress 4.4
 Tested up to: WordPress 4.5
-Version: 1.2
+Version: 1.3
 License: GPLv2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
-Tags: black, blue, gray, green, white, yellow, dark, light, one-column, two-columns, right-sidebar, fixed-layout, responsive-layout, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
+Tags: one-column, two-columns, right-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready, blog
 
 == Description ==
 Twenty Sixteen is a modernized take on an ever-popular WordPress layout — the horizontal masthead with an optional right sidebar that works perfectly for blogs and websites. It has custom color options with beautiful default color schemes, a harmonious fluid grid using a mobile-first approach, and impeccable polish in every detail. Twenty Sixteen will make your WordPress look beautiful everywhere.
@@ -54,6 +54,28 @@ Source: http://www.genericons.com
 
 Image used in screenshot.png: A photo by Austin Schmid (https://unsplash.com/schmidy/), licensed under Creative Commons Zero(http://creativecommons.org/publicdomain/zero/1.0/)
 
+== Changelog ==
+
+= 1.3 =
+* Released: August 16, 2016
+
+https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.3
+
+= 1.2 =
+* Released: April 12, 2016
+
+https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.2
+
+= 1.1 =
+* Released: January 6, 2016
+
+https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.1
+
+= 1.0 =
+* Released: December 8, 2015
+
+Initial release
+
 == Notes ==
 
 Only the default and dark color schemes are accessibility ready.
index f558c1468cc39c46effa97ea5d170ec0ca976f7d..7dcd14e16e9f9f9c746f499562238847729b1566 100644 (file)
@@ -4,10 +4,10 @@ Theme URI: https://wordpress.org/themes/twentysixteen/
 Author: the WordPress team
 Author URI: https://wordpress.org/
 Description: Twenty Sixteen is a modernized take on an ever-popular WordPress layout — the horizontal masthead with an optional right sidebar that works perfectly for blogs and websites. It has custom color options with beautiful default color schemes, a harmonious fluid grid using a mobile-first approach, and impeccable polish in every detail. Twenty Sixteen will make your WordPress look beautiful everywhere.
-Version: 1.2
+Version: 1.3
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
-Tags: black, blue, gray, red, white, yellow, dark, light, one-column, two-columns, right-sidebar, fixed-layout, responsive-layout, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
+Tags: one-column, two-columns, right-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready, blog
 Text Domain: twentysixteen
 
 This theme, like WordPress, is licensed under the GPL.
@@ -213,6 +213,16 @@ input[type="radio"] {
        padding: 0;
 }
 
+input[type="date"]::-webkit-inner-spin-button,
+input[type="date"]::-webkit-outer-spin-button,
+input[type="time"]::-webkit-inner-spin-button,
+input[type="time"]::-webkit-outer-spin-button,
+input[type="datetime-local"]::-webkit-inner-spin-button,
+input[type="datetime-local"]::-webkit-outer-spin-button,
+input[type="week"]::-webkit-inner-spin-button,
+input[type="week"]::-webkit-outer-spin-button,
+input[type="month"]::-webkit-inner-spin-button,
+input[type="month"]::-webkit-outer-spin-button,
 input[type="number"]::-webkit-inner-spin-button,
 input[type="number"]::-webkit-outer-spin-button {
        height: auto;
@@ -332,6 +342,7 @@ blockquote {
        font-style: italic;
        line-height: 1.4736842105;
        margin: 0 0 1.4736842105em;
+       overflow: hidden;
        padding: 0 0 0 1.263157895em;
 }
 
@@ -619,6 +630,11 @@ input[type="submit"]:focus {
        outline-offset: -4px;
 }
 
+input[type="date"],
+input[type="time"],
+input[type="datetime-local"],
+input[type="week"],
+input[type="month"],
 input[type="text"],
 input[type="email"],
 input[type="url"],
@@ -636,6 +652,11 @@ textarea {
        width: 100%;
 }
 
+input[type="date"]:focus,
+input[type="time"]:focus,
+input[type="datetime-local"]:focus,
+input[type="week"]:focus,
+input[type="month"]:focus,
 input[type="text"]:focus,
 input[type="email"]:focus,
 input[type="url"]:focus,
@@ -3193,6 +3214,11 @@ p > video {
                padding: 0.846153846em;
        }
 
+       .widget input[type="date"],
+       .widget input[type="time"],
+       .widget input[type="datetime-local"],
+       .widget input[type="week"],
+       .widget input[type="month"],
        .widget input[type="text"],
        .widget input[type="email"],
        .widget input[type="url"],
diff --git a/wp-includes/Requests/Auth.php b/wp-includes/Requests/Auth.php
new file mode 100644 (file)
index 0000000..bca4109
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Authentication provider interface
+ *
+ * @package Requests
+ * @subpackage Authentication
+ */
+
+/**
+ * Authentication provider interface
+ *
+ * Implement this interface to act as an authentication provider.
+ *
+ * Parameters should be passed via the constructor where possible, as this
+ * makes it much easier for users to use your provider.
+ *
+ * @see Requests_Hooks
+ * @package Requests
+ * @subpackage Authentication
+ */
+interface Requests_Auth {
+       /**
+        * Register hooks as needed
+        *
+        * This method is called in {@see Requests::request} when the user has set
+        * an instance as the 'auth' option. Use this callback to register all the
+        * hooks you'll need.
+        *
+        * @see Requests_Hooks::register
+        * @param Requests_Hooks $hooks Hook system
+        */
+       public function register(Requests_Hooks &$hooks);
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Auth/Basic.php b/wp-includes/Requests/Auth/Basic.php
new file mode 100644 (file)
index 0000000..a355cfd
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+/**
+ * Basic Authentication provider
+ *
+ * @package Requests
+ * @subpackage Authentication
+ */
+
+/**
+ * Basic Authentication provider
+ *
+ * Provides a handler for Basic HTTP authentication via the Authorization
+ * header.
+ *
+ * @package Requests
+ * @subpackage Authentication
+ */
+class Requests_Auth_Basic implements Requests_Auth {
+       /**
+        * Username
+        *
+        * @var string
+        */
+       public $user;
+
+       /**
+        * Password
+        *
+        * @var string
+        */
+       public $pass;
+
+       /**
+        * Constructor
+        *
+        * @throws Requests_Exception On incorrect number of arguments (`authbasicbadargs`)
+        * @param array|null $args Array of user and password. Must have exactly two elements
+        */
+       public function __construct($args = null) {
+               if (is_array($args)) {
+                       if (count($args) !== 2) {
+                               throw new Requests_Exception('Invalid number of arguments', 'authbasicbadargs');
+                       }
+
+                       list($this->user, $this->pass) = $args;
+               }
+       }
+
+       /**
+        * Register the necessary callbacks
+        *
+        * @see curl_before_send
+        * @see fsockopen_header
+        * @param Requests_Hooks $hooks Hook system
+        */
+       public function register(Requests_Hooks &$hooks) {
+               $hooks->register('curl.before_send', array(&$this, 'curl_before_send'));
+               $hooks->register('fsockopen.after_headers', array(&$this, 'fsockopen_header'));
+       }
+
+       /**
+        * Set cURL parameters before the data is sent
+        *
+        * @param resource $handle cURL resource
+        */
+       public function curl_before_send(&$handle) {
+               curl_setopt($handle, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
+               curl_setopt($handle, CURLOPT_USERPWD, $this->getAuthString());
+       }
+
+       /**
+        * Add extra headers to the request before sending
+        *
+        * @param string $out HTTP header string
+        */
+       public function fsockopen_header(&$out) {
+               $out .= sprintf("Authorization: Basic %s\r\n", base64_encode($this->getAuthString()));
+       }
+
+       /**
+        * Get the authentication string (user:pass)
+        *
+        * @return string
+        */
+       public function getAuthString() {
+               return $this->user . ':' . $this->pass;
+       }
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Cookie.php b/wp-includes/Requests/Cookie.php
new file mode 100644 (file)
index 0000000..00fbbc7
--- /dev/null
@@ -0,0 +1,500 @@
+<?php
+/**
+ * Cookie storage object
+ *
+ * @package Requests
+ * @subpackage Cookies
+ */
+
+/**
+ * Cookie storage object
+ *
+ * @package Requests
+ * @subpackage Cookies
+ */
+class Requests_Cookie {
+       /**
+        * Cookie name.
+        *
+        * @var string
+        */
+       public $name;
+
+       /**
+        * Cookie value.
+        *
+        * @var string
+        */
+       public $value;
+
+       /**
+        * Cookie attributes
+        *
+        * Valid keys are (currently) path, domain, expires, max-age, secure and
+        * httponly.
+        *
+        * @var Requests_Utility_CaseInsensitiveDictionary|array Array-like object
+        */
+       public $attributes = array();
+
+       /**
+        * Cookie flags
+        *
+        * Valid keys are (currently) creation, last-access, persistent and
+        * host-only.
+        *
+        * @var array
+        */
+       public $flags = array();
+
+       /**
+        * Reference time for relative calculations
+        *
+        * This is used in place of `time()` when calculating Max-Age expiration and
+        * checking time validity.
+        *
+        * @var int
+        */
+       public $reference_time = 0;
+
+       /**
+        * Create a new cookie object
+        *
+        * @param string $name
+        * @param string $value
+        * @param array|Requests_Utility_CaseInsensitiveDictionary $attributes Associative array of attribute data
+        */
+       public function __construct($name, $value, $attributes = array(), $flags = array(), $reference_time = null) {
+               $this->name = $name;
+               $this->value = $value;
+               $this->attributes = $attributes;
+               $default_flags = array(
+                       'creation' => time(),
+                       'last-access' => time(),
+                       'persistent' => false,
+                       'host-only' => true,
+               );
+               $this->flags = array_merge($default_flags, $flags);
+
+               $this->reference_time = time();
+               if ($reference_time !== null) {
+                       $this->reference_time = $reference_time;
+               }
+
+               $this->normalize();
+       }
+
+       /**
+        * Check if a cookie is expired.
+        *
+        * Checks the age against $this->reference_time to determine if the cookie
+        * is expired.
+        *
+        * @return boolean True if expired, false if time is valid.
+        */
+       public function is_expired() {
+               // RFC6265, s. 4.1.2.2:
+               // If a cookie has both the Max-Age and the Expires attribute, the Max-
+               // Age attribute has precedence and controls the expiration date of the
+               // cookie.
+               if (isset($this->attributes['max-age'])) {
+                       $max_age = $this->attributes['max-age'];
+                       return $max_age < $this->reference_time;
+               }
+
+               if (isset($this->attributes['expires'])) {
+                       $expires = $this->attributes['expires'];
+                       return $expires < $this->reference_time;
+               }
+
+               return false;
+       }
+
+       /**
+        * Check if a cookie is valid for a given URI
+        *
+        * @param Requests_IRI $uri URI to check
+        * @return boolean Whether the cookie is valid for the given URI
+        */
+       public function uri_matches(Requests_IRI $uri) {
+               if (!$this->domain_matches($uri->host)) {
+                       return false;
+               }
+
+               if (!$this->path_matches($uri->path)) {
+                       return false;
+               }
+
+               return empty($this->attributes['secure']) || $uri->scheme === 'https';
+       }
+
+       /**
+        * Check if a cookie is valid for a given domain
+        *
+        * @param string $string Domain to check
+        * @return boolean Whether the cookie is valid for the given domain
+        */
+       public function domain_matches($string) {
+               if (!isset($this->attributes['domain'])) {
+                       // Cookies created manually; cookies created by Requests will set
+                       // the domain to the requested domain
+                       return true;
+               }
+
+               $domain_string = $this->attributes['domain'];
+               if ($domain_string === $string) {
+                       // The domain string and the string are identical.
+                       return true;
+               }
+
+               // If the cookie is marked as host-only and we don't have an exact
+               // match, reject the cookie
+               if ($this->flags['host-only'] === true) {
+                       return false;
+               }
+
+               if (strlen($string) <= strlen($domain_string)) {
+                       // For obvious reasons, the string cannot be a suffix if the domain
+                       // is shorter than the domain string
+                       return false;
+               }
+
+               if (substr($string, -1 * strlen($domain_string)) !== $domain_string) {
+                       // The domain string should be a suffix of the string.
+                       return false;
+               }
+
+               $prefix = substr($string, 0, strlen($string) - strlen($domain_string));
+               if (substr($prefix, -1) !== '.') {
+                       // The last character of the string that is not included in the
+                       // domain string should be a %x2E (".") character.
+                       return false;
+               }
+
+               // The string should be a host name (i.e., not an IP address).
+               return !preg_match('#^(.+\.)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$#', $string);
+       }
+
+       /**
+        * Check if a cookie is valid for a given path
+        *
+        * From the path-match check in RFC 6265 section 5.1.4
+        *
+        * @param string $request_path Path to check
+        * @return boolean Whether the cookie is valid for the given path
+        */
+       public function path_matches($request_path) {
+               if (empty($request_path)) {
+                       // Normalize empty path to root
+                       $request_path = '/';
+               }
+
+               if (!isset($this->attributes['path'])) {
+                       // Cookies created manually; cookies created by Requests will set
+                       // the path to the requested path
+                       return true;
+               }
+
+               $cookie_path = $this->attributes['path'];
+
+               if ($cookie_path === $request_path) {
+                       // The cookie-path and the request-path are identical.
+                       return true;
+               }
+
+               if (strlen($request_path) > strlen($cookie_path) && substr($request_path, 0, strlen($cookie_path)) === $cookie_path) {
+                       if (substr($cookie_path, -1) === '/') {
+                               // The cookie-path is a prefix of the request-path, and the last
+                               // character of the cookie-path is %x2F ("/").
+                               return true;
+                       }
+
+                       if (substr($request_path, strlen($cookie_path), 1) === '/') {
+                               // The cookie-path is a prefix of the request-path, and the
+                               // first character of the request-path that is not included in
+                               // the cookie-path is a %x2F ("/") character.
+                               return true;
+                       }
+               }
+
+               return false;
+       }
+
+       /**
+        * Normalize cookie and attributes
+        *
+        * @return boolean Whether the cookie was successfully normalized
+        */
+       public function normalize() {
+               foreach ($this->attributes as $key => $value) {
+                       $orig_value = $value;
+                       $value = $this->normalize_attribute($key, $value);
+                       if ($value === null) {
+                               unset($this->attributes[$key]);
+                               continue;
+                       }
+
+                       if ($value !== $orig_value) {
+                               $this->attributes[$key] = $value;
+                       }
+               }
+
+               return true;
+       }
+
+       /**
+        * Parse an individual cookie attribute
+        *
+        * Handles parsing individual attributes from the cookie values.
+        *
+        * @param string $name Attribute name
+        * @param string|boolean $value Attribute value (string value, or true if empty/flag)
+        * @return mixed Value if available, or null if the attribute value is invalid (and should be skipped)
+        */
+       protected function normalize_attribute($name, $value) {
+               switch (strtolower($name)) {
+                       case 'expires':
+                               // Expiration parsing, as per RFC 6265 section 5.2.1
+                               if (is_int($value)) {
+                                       return $value;
+                               }
+
+                               $expiry_time = strtotime($value);
+                               if ($expiry_time === false) {
+                                       return null;
+                               }
+
+                               return $expiry_time;
+
+                       case 'max-age':
+                               // Expiration parsing, as per RFC 6265 section 5.2.2
+                               if (is_int($value)) {
+                                       return $value;
+                               }
+
+                               // Check that we have a valid age
+                               if (!preg_match('/^-?\d+$/', $value)) {
+                                       return null;
+                               }
+
+                               $delta_seconds = (int) $value;
+                               if ($delta_seconds <= 0) {
+                                       $expiry_time = 0;
+                               }
+                               else {
+                                       $expiry_time = $this->reference_time + $delta_seconds;
+                               }
+
+                               return $expiry_time;
+
+                       case 'domain':
+                               // Domain normalization, as per RFC 6265 section 5.2.3
+                               if ($value[0] === '.') {
+                                       $value = substr($value, 1);
+                               }
+
+                               return $value;
+
+                       default:
+                               return $value;
+               }
+       }
+
+       /**
+        * Format a cookie for a Cookie header
+        *
+        * This is used when sending cookies to a server.
+        *
+        * @return string Cookie formatted for Cookie header
+        */
+       public function format_for_header() {
+               return sprintf('%s=%s', $this->name, $this->value);
+       }
+
+       /**
+        * Format a cookie for a Cookie header
+        *
+        * @codeCoverageIgnore
+        * @deprecated Use {@see Requests_Cookie::format_for_header}
+        * @return string
+        */
+       public function formatForHeader() {
+               return $this->format_for_header();
+       }
+
+       /**
+        * Format a cookie for a Set-Cookie header
+        *
+        * This is used when sending cookies to clients. This isn't really
+        * applicable to client-side usage, but might be handy for debugging.
+        *
+        * @return string Cookie formatted for Set-Cookie header
+        */
+       public function format_for_set_cookie() {
+               $header_value = $this->format_for_header();
+               if (!empty($this->attributes)) {
+                       $parts = array();
+                       foreach ($this->attributes as $key => $value) {
+                               // Ignore non-associative attributes
+                               if (is_numeric($key)) {
+                                       $parts[] = $value;
+                               }
+                               else {
+                                       $parts[] = sprintf('%s=%s', $key, $value);
+                               }
+                       }
+
+                       $header_value .= '; ' . implode('; ', $parts);
+               }
+               return $header_value;
+       }
+
+       /**
+        * Format a cookie for a Set-Cookie header
+        *
+        * @codeCoverageIgnore
+        * @deprecated Use {@see Requests_Cookie::format_for_set_cookie}
+        * @return string
+        */
+       public function formatForSetCookie() {
+               return $this->format_for_set_cookie();
+       }
+
+       /**
+        * Get the cookie value
+        *
+        * Attributes and other data can be accessed via methods.
+        */
+       public function __toString() {
+               return $this->value;
+       }
+
+       /**
+        * Parse a cookie string into a cookie object
+        *
+        * Based on Mozilla's parsing code in Firefox and related projects, which
+        * is an intentional deviation from RFC 2109 and RFC 2616. RFC 6265
+        * specifies some of this handling, but not in a thorough manner.
+        *
+        * @param string Cookie header value (from a Set-Cookie header)
+        * @return Requests_Cookie Parsed cookie object
+        */
+       public static function parse($string, $name = '', $reference_time = null) {
+               $parts = explode(';', $string);
+               $kvparts = array_shift($parts);
+
+               if (!empty($name)) {
+                       $value = $string;
+               }
+               elseif (strpos($kvparts, '=') === false) {
+                       // Some sites might only have a value without the equals separator.
+                       // Deviate from RFC 6265 and pretend it was actually a blank name
+                       // (`=foo`)
+                       //
+                       // https://bugzilla.mozilla.org/show_bug.cgi?id=169091
+                       $name = '';
+                       $value = $kvparts;
+               }
+               else {
+                       list($name, $value) = explode('=', $kvparts, 2);
+               }
+               $name = trim($name);
+               $value = trim($value);
+
+               // Attribute key are handled case-insensitively
+               $attributes = new Requests_Utility_CaseInsensitiveDictionary();
+
+               if (!empty($parts)) {
+                       foreach ($parts as $part) {
+                               if (strpos($part, '=') === false) {
+                                       $part_key = $part;
+                                       $part_value = true;
+                               }
+                               else {
+                                       list($part_key, $part_value) = explode('=', $part, 2);
+                                       $part_value = trim($part_value);
+                               }
+
+                               $part_key = trim($part_key);
+                               $attributes[$part_key] = $part_value;
+                       }
+               }
+
+               return new Requests_Cookie($name, $value, $attributes, array(), $reference_time);
+       }
+
+       /**
+        * Parse all Set-Cookie headers from request headers
+        *
+        * @param Requests_Response_Headers $headers Headers to parse from
+        * @param Requests_IRI|null $origin URI for comparing cookie origins
+        * @param int|null $time Reference time for expiration calculation
+        * @return array
+        */
+       public static function parse_from_headers(Requests_Response_Headers $headers, Requests_IRI $origin = null, $time = null) {
+               $cookie_headers = $headers->getValues('Set-Cookie');
+               if (empty($cookie_headers)) {
+                       return array();
+               }
+
+               $cookies = array();
+               foreach ($cookie_headers as $header) {
+                       $parsed = self::parse($header, '', $time);
+
+                       // Default domain/path attributes
+                       if (empty($parsed->attributes['domain']) && !empty($origin)) {
+                               $parsed->attributes['domain'] = $origin->host;
+                               $parsed->flags['host-only'] = true;
+                       }
+                       else {
+                               $parsed->flags['host-only'] = false;
+                       }
+
+                       $path_is_valid = (!empty($parsed->attributes['path']) && $parsed->attributes['path'][0] === '/');
+                       if (!$path_is_valid && !empty($origin)) {
+                               $path = $origin->path;
+
+                               // Default path normalization as per RFC 6265 section 5.1.4
+                               if (substr($path, 0, 1) !== '/') {
+                                       // If the uri-path is empty or if the first character of
+                                       // the uri-path is not a %x2F ("/") character, output
+                                       // %x2F ("/") and skip the remaining steps.
+                                       $path = '/';
+                               }
+                               elseif (substr_count($path, '/') === 1) {
+                                       // If the uri-path contains no more than one %x2F ("/")
+                                       // character, output %x2F ("/") and skip the remaining
+                                       // step.
+                                       $path = '/';
+                               }
+                               else {
+                                       // Output the characters of the uri-path from the first
+                                       // character up to, but not including, the right-most
+                                       // %x2F ("/").
+                                       $path = substr($path, 0, strrpos($path, '/'));
+                               }
+                               $parsed->attributes['path'] = $path;
+                       }
+
+                       // Reject invalid cookie domains
+                       if (!empty($origin) && !$parsed->domain_matches($origin->host)) {
+                               continue;
+                       }
+
+                       $cookies[$parsed->name] = $parsed;
+               }
+
+               return $cookies;
+       }
+
+       /**
+        * Parse all Set-Cookie headers from request headers
+        *
+        * @codeCoverageIgnore
+        * @deprecated Use {@see Requests_Cookie::parse_from_headers}
+        * @return string
+        */
+       public static function parseFromHeaders(Requests_Response_Headers $headers) {
+               return self::parse_from_headers($headers);
+       }
+}
diff --git a/wp-includes/Requests/Cookie/Jar.php b/wp-includes/Requests/Cookie/Jar.php
new file mode 100644 (file)
index 0000000..69be0fb
--- /dev/null
@@ -0,0 +1,175 @@
+<?php
+/**
+ * Cookie holder object
+ *
+ * @package Requests
+ * @subpackage Cookies
+ */
+
+/**
+ * Cookie holder object
+ *
+ * @package Requests
+ * @subpackage Cookies
+ */
+class Requests_Cookie_Jar implements ArrayAccess, IteratorAggregate {
+       /**
+        * Actual item data
+        *
+        * @var array
+        */
+       protected $cookies = array();
+
+       /**
+        * Create a new jar
+        *
+        * @param array $cookies Existing cookie values
+        */
+       public function __construct($cookies = array()) {
+               $this->cookies = $cookies;
+       }
+
+       /**
+        * Normalise cookie data into a Requests_Cookie
+        *
+        * @param string|Requests_Cookie $cookie
+        * @return Requests_Cookie
+        */
+       public function normalize_cookie($cookie, $key = null) {
+               if ($cookie instanceof Requests_Cookie) {
+                       return $cookie;
+               }
+
+               return Requests_Cookie::parse($cookie, $key);
+       }
+
+       /**
+        * Normalise cookie data into a Requests_Cookie
+        *
+        * @codeCoverageIgnore
+        * @deprecated Use {@see Requests_Cookie_Jar::normalize_cookie}
+        * @return Requests_Cookie
+        */
+       public function normalizeCookie($cookie, $key = null) {
+               return $this->normalize_cookie($cookie, $key);
+       }
+
+       /**
+        * Check if the given item exists
+        *
+        * @param string $key Item key
+        * @return boolean Does the item exist?
+        */
+       public function offsetExists($key) {
+               return isset($this->cookies[$key]);
+       }
+
+       /**
+        * Get the value for the item
+        *
+        * @param string $key Item key
+        * @return string Item value
+        */
+       public function offsetGet($key) {
+               if (!isset($this->cookies[$key])) {
+                       return null;
+               }
+
+               return $this->cookies[$key];
+       }
+
+       /**
+        * Set the given item
+        *
+        * @throws Requests_Exception On attempting to use dictionary as list (`invalidset`)
+        *
+        * @param string $key Item name
+        * @param string $value Item value
+        */
+       public function offsetSet($key, $value) {
+               if ($key === null) {
+                       throw new Requests_Exception('Object is a dictionary, not a list', 'invalidset');
+               }
+
+               $this->cookies[$key] = $value;
+       }
+
+       /**
+        * Unset the given header
+        *
+        * @param string $key
+        */
+       public function offsetUnset($key) {
+               unset($this->cookies[$key]);
+       }
+
+       /**
+        * Get an iterator for the data
+        *
+        * @return ArrayIterator
+        */
+       public function getIterator() {
+               return new ArrayIterator($this->cookies);
+       }
+
+       /**
+        * Register the cookie handler with the request's hooking system
+        *
+        * @param Requests_Hooker $hooks Hooking system
+        */
+       public function register(Requests_Hooker $hooks) {
+               $hooks->register('requests.before_request', array($this, 'before_request'));
+               $hooks->register('requests.before_redirect_check', array($this, 'before_redirect_check'));
+       }
+
+       /**
+        * Add Cookie header to a request if we have any
+        *
+        * As per RFC 6265, cookies are separated by '; '
+        *
+        * @param string $url
+        * @param array $headers
+        * @param array $data
+        * @param string $type
+        * @param array $options
+        */
+       public function before_request($url, &$headers, &$data, &$type, &$options) {
+               if (!$url instanceof Requests_IRI) {
+                       $url = new Requests_IRI($url);
+               }
+
+               if (!empty($this->cookies)) {
+                       $cookies = array();
+                       foreach ($this->cookies as $key => $cookie) {
+                               $cookie = $this->normalize_cookie($cookie, $key);
+
+                               // Skip expired cookies
+                               if ($cookie->is_expired()) {
+                                       continue;
+                               }
+
+                               if ($cookie->domain_matches($url->host)) {
+                                       $cookies[] = $cookie->format_for_header();
+                               }
+                       }
+
+                       $headers['Cookie'] = implode('; ', $cookies);
+               }
+       }
+
+       /**
+        * Parse all cookies from a response and attach them to the response
+        *
+        * @var Requests_Response $response
+        */
+       public function before_redirect_check(Requests_Response &$return) {
+               $url = $return->url;
+               if (!$url instanceof Requests_IRI) {
+                       $url = new Requests_IRI($url);
+               }
+
+               $cookies = Requests_Cookie::parse_from_headers($return->headers, $url);
+               $this->cookies = array_merge($this->cookies, $cookies);
+               $return->cookies = $this;
+       }
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception.php b/wp-includes/Requests/Exception.php
new file mode 100644 (file)
index 0000000..37d4711
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Exception for HTTP requests
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for HTTP requests
+ *
+ * @package Requests
+ */
+class Requests_Exception extends Exception {
+       /**
+        * Type of exception
+        *
+        * @var string
+        */
+       protected $type;
+
+       /**
+        * Data associated with the exception
+        *
+        * @var mixed
+        */
+       protected $data;
+
+       /**
+        * Create a new exception
+        *
+        * @param string $message Exception message
+        * @param string $type Exception type
+        * @param mixed $data Associated data
+        * @param integer $code Exception numerical code, if applicable
+        */
+       public function __construct($message, $type, $data = null, $code = 0) {
+               parent::__construct($message, $code);
+
+               $this->type = $type;
+               $this->data = $data;
+       }
+
+       /**
+        * Like {@see getCode()}, but a string code.
+        *
+        * @codeCoverageIgnore
+        * @return string
+        */
+       public function getType() {
+               return $this->type;
+       }
+
+       /**
+        * Gives any relevant data
+        *
+        * @codeCoverageIgnore
+        * @return mixed
+        */
+       public function getData() {
+               return $this->data;
+       }
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP.php b/wp-includes/Requests/Exception/HTTP.php
new file mode 100644 (file)
index 0000000..9ac6a87
--- /dev/null
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Exception based on HTTP response
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception based on HTTP response
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP extends Requests_Exception {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 0;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Unknown';
+
+       /**
+        * Create a new exception
+        *
+        * There is no mechanism to pass in the status code, as this is set by the
+        * subclass used. Reason phrases can vary, however.
+        *
+        * @param string|null $reason Reason phrase
+        * @param mixed $data Associated data
+        */
+       public function __construct($reason = null, $data = null) {
+               if ($reason !== null) {
+                       $this->reason = $reason;
+               }
+
+               $message = sprintf('%d %s', $this->code, $this->reason);
+               parent::__construct($message, 'httpresponse', $data, $this->code);
+       }
+
+       /**
+        * Get the status message
+        */
+       public function getReason() {
+               return $this->reason;
+       }
+
+       /**
+        * Get the correct exception class for a given error code
+        *
+        * @param int|bool $code HTTP status code, or false if unavailable
+        * @return string Exception class name to use
+        */
+       public static function get_class($code) {
+               if (!$code) {
+                       return 'Requests_Exception_HTTP_Unknown';
+               }
+
+               $class = sprintf('Requests_Exception_HTTP_%d', $code);
+               if (class_exists($class)) {
+                       return $class;
+               }
+
+               return 'Requests_Exception_HTTP_Unknown';
+       }
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/304.php b/wp-includes/Requests/Exception/HTTP/304.php
new file mode 100644 (file)
index 0000000..6799033
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 304 Not Modified responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 304 Not Modified responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_304 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 304;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Not Modified';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/305.php b/wp-includes/Requests/Exception/HTTP/305.php
new file mode 100644 (file)
index 0000000..37d115a
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 305 Use Proxy responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 305 Use Proxy responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_305 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 305;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Use Proxy';
+}
diff --git a/wp-includes/Requests/Exception/HTTP/306.php b/wp-includes/Requests/Exception/HTTP/306.php
new file mode 100644 (file)
index 0000000..743a4ed
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 306 Switch Proxy responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 306 Switch Proxy responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_306 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 306;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Switch Proxy';
+}
diff --git a/wp-includes/Requests/Exception/HTTP/400.php b/wp-includes/Requests/Exception/HTTP/400.php
new file mode 100644 (file)
index 0000000..b3ad774
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 400 Bad Request responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 400 Bad Request responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_400 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 400;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Bad Request';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/401.php b/wp-includes/Requests/Exception/HTTP/401.php
new file mode 100644 (file)
index 0000000..2e1e3d0
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 401 Unauthorized responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 401 Unauthorized responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_401 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 401;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Unauthorized';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/402.php b/wp-includes/Requests/Exception/HTTP/402.php
new file mode 100644 (file)
index 0000000..1d965d2
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 402 Payment Required responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 402 Payment Required responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_402 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 402;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Payment Required';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/403.php b/wp-includes/Requests/Exception/HTTP/403.php
new file mode 100644 (file)
index 0000000..5ca3caf
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 403 Forbidden responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 403 Forbidden responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_403 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 403;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Forbidden';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/404.php b/wp-includes/Requests/Exception/HTTP/404.php
new file mode 100644 (file)
index 0000000..f08be2d
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 404 Not Found responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 404 Not Found responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_404 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 404;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Not Found';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/405.php b/wp-includes/Requests/Exception/HTTP/405.php
new file mode 100644 (file)
index 0000000..b8419e1
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 405 Method Not Allowed responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 405 Method Not Allowed responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_405 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 405;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Method Not Allowed';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/406.php b/wp-includes/Requests/Exception/HTTP/406.php
new file mode 100644 (file)
index 0000000..09d0622
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 406 Not Acceptable responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 406 Not Acceptable responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_406 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 406;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Not Acceptable';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/407.php b/wp-includes/Requests/Exception/HTTP/407.php
new file mode 100644 (file)
index 0000000..c21d1ec
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 407 Proxy Authentication Required responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 407 Proxy Authentication Required responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_407 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 407;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Proxy Authentication Required';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/408.php b/wp-includes/Requests/Exception/HTTP/408.php
new file mode 100644 (file)
index 0000000..0691863
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 408 Request Timeout responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 408 Request Timeout responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_408 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 408;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Request Timeout';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/409.php b/wp-includes/Requests/Exception/HTTP/409.php
new file mode 100644 (file)
index 0000000..5a3e0d1
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 409 Conflict responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 409 Conflict responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_409 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 409;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Conflict';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/410.php b/wp-includes/Requests/Exception/HTTP/410.php
new file mode 100644 (file)
index 0000000..8eb3daf
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 410 Gone responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 410 Gone responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_410 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 410;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Gone';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/411.php b/wp-includes/Requests/Exception/HTTP/411.php
new file mode 100644 (file)
index 0000000..cee6496
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 411 Length Required responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 411 Length Required responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_411 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 411;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Length Required';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/412.php b/wp-includes/Requests/Exception/HTTP/412.php
new file mode 100644 (file)
index 0000000..e377d79
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 412 Precondition Failed responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 412 Precondition Failed responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_412 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 412;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Precondition Failed';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/413.php b/wp-includes/Requests/Exception/HTTP/413.php
new file mode 100644 (file)
index 0000000..3b5fe27
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 413 Request Entity Too Large responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 413 Request Entity Too Large responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_413 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 413;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Request Entity Too Large';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/414.php b/wp-includes/Requests/Exception/HTTP/414.php
new file mode 100644 (file)
index 0000000..14d5a59
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 414 Request-URI Too Large responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 414 Request-URI Too Large responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_414 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 414;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Request-URI Too Large';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/415.php b/wp-includes/Requests/Exception/HTTP/415.php
new file mode 100644 (file)
index 0000000..32446c8
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 415 Unsupported Media Type responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 415 Unsupported Media Type responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_415 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 415;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Unsupported Media Type';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/416.php b/wp-includes/Requests/Exception/HTTP/416.php
new file mode 100644 (file)
index 0000000..8c5f833
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 416 Requested Range Not Satisfiable responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 416 Requested Range Not Satisfiable responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_416 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 416;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Requested Range Not Satisfiable';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/417.php b/wp-includes/Requests/Exception/HTTP/417.php
new file mode 100644 (file)
index 0000000..8807c71
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 417 Expectation Failed responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 417 Expectation Failed responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_417 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 417;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Expectation Failed';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/418.php b/wp-includes/Requests/Exception/HTTP/418.php
new file mode 100644 (file)
index 0000000..d6af806
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Exception for 418 I'm A Teapot responses
+ *
+ * @see https://tools.ietf.org/html/rfc2324
+ * @package Requests
+ */
+
+/**
+ * Exception for 418 I'm A Teapot responses
+ *
+ * @see https://tools.ietf.org/html/rfc2324
+ * @package Requests
+ */
+class Requests_Exception_HTTP_418 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 418;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = "I'm A Teapot";
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/428.php b/wp-includes/Requests/Exception/HTTP/428.php
new file mode 100644 (file)
index 0000000..469e954
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Exception for 428 Precondition Required responses
+ *
+ * @see https://tools.ietf.org/html/rfc6585
+ * @package Requests
+ */
+
+/**
+ * Exception for 428 Precondition Required responses
+ *
+ * @see https://tools.ietf.org/html/rfc6585
+ * @package Requests
+ */
+class Requests_Exception_HTTP_428 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 428;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Precondition Required';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/429.php b/wp-includes/Requests/Exception/HTTP/429.php
new file mode 100644 (file)
index 0000000..2a21fb3
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Exception for 429 Too Many Requests responses
+ *
+ * @see https://tools.ietf.org/html/draft-nottingham-http-new-status-04
+ * @package Requests
+ */
+
+/**
+ * Exception for 429 Too Many Requests responses
+ *
+ * @see https://tools.ietf.org/html/draft-nottingham-http-new-status-04
+ * @package Requests
+ */
+class Requests_Exception_HTTP_429 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 429;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Too Many Requests';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/431.php b/wp-includes/Requests/Exception/HTTP/431.php
new file mode 100644 (file)
index 0000000..ba1294e
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Exception for 431 Request Header Fields Too Large responses
+ *
+ * @see https://tools.ietf.org/html/rfc6585
+ * @package Requests
+ */
+
+/**
+ * Exception for 431 Request Header Fields Too Large responses
+ *
+ * @see https://tools.ietf.org/html/rfc6585
+ * @package Requests
+ */
+class Requests_Exception_HTTP_431 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 431;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Request Header Fields Too Large';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/500.php b/wp-includes/Requests/Exception/HTTP/500.php
new file mode 100644 (file)
index 0000000..5165e35
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 500 Internal Server Error responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 500 Internal Server Error responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_500 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 500;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Internal Server Error';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/501.php b/wp-includes/Requests/Exception/HTTP/501.php
new file mode 100644 (file)
index 0000000..3dd6946
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 501 Not Implemented responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 501 Not Implemented responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_501 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 501;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Not Implemented';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/502.php b/wp-includes/Requests/Exception/HTTP/502.php
new file mode 100644 (file)
index 0000000..50c72d4
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 502 Bad Gateway responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 502 Bad Gateway responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_502 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 502;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Bad Gateway';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/503.php b/wp-includes/Requests/Exception/HTTP/503.php
new file mode 100644 (file)
index 0000000..9304ecc
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 503 Service Unavailable responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 503 Service Unavailable responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_503 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 503;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Service Unavailable';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/504.php b/wp-includes/Requests/Exception/HTTP/504.php
new file mode 100644 (file)
index 0000000..f46696b
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 504 Gateway Timeout responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 504 Gateway Timeout responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_504 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 504;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Gateway Timeout';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/505.php b/wp-includes/Requests/Exception/HTTP/505.php
new file mode 100644 (file)
index 0000000..1f80294
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Exception for 505 HTTP Version Not Supported responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for 505 HTTP Version Not Supported responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_505 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 505;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'HTTP Version Not Supported';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/511.php b/wp-includes/Requests/Exception/HTTP/511.php
new file mode 100644 (file)
index 0000000..920d334
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Exception for 511 Network Authentication Required responses
+ *
+ * @see https://tools.ietf.org/html/rfc6585
+ * @package Requests
+ */
+
+/**
+ * Exception for 511 Network Authentication Required responses
+ *
+ * @see https://tools.ietf.org/html/rfc6585
+ * @package Requests
+ */
+class Requests_Exception_HTTP_511 extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer
+        */
+       protected $code = 511;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Network Authentication Required';
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/HTTP/Unknown.php b/wp-includes/Requests/Exception/HTTP/Unknown.php
new file mode 100644 (file)
index 0000000..c70f589
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+/**
+ * Exception for unknown status responses
+ *
+ * @package Requests
+ */
+
+/**
+ * Exception for unknown status responses
+ *
+ * @package Requests
+ */
+class Requests_Exception_HTTP_Unknown extends Requests_Exception_HTTP {
+       /**
+        * HTTP status code
+        *
+        * @var integer|bool Code if available, false if an error occurred
+        */
+       protected $code = 0;
+
+       /**
+        * Reason phrase
+        *
+        * @var string
+        */
+       protected $reason = 'Unknown';
+
+       /**
+        * Create a new exception
+        *
+        * If `$data` is an instance of {@see Requests_Response}, uses the status
+        * code from it. Otherwise, sets as 0
+        *
+        * @param string|null $reason Reason phrase
+        * @param mixed $data Associated data
+        */
+       public function __construct($reason = null, $data = null) {
+               if ($data instanceof Requests_Response) {
+                       $this->code = $data->status_code;
+               }
+
+               parent::__construct($reason, $data);
+       }
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Exception/Transport.php b/wp-includes/Requests/Exception/Transport.php
new file mode 100644 (file)
index 0000000..e60b488
--- /dev/null
@@ -0,0 +1,5 @@
+<?php
+
+class Requests_Exception_Transport extends Requests_Exception {
+
+}
diff --git a/wp-includes/Requests/Exception/Transport/cURL.php b/wp-includes/Requests/Exception/Transport/cURL.php
new file mode 100644 (file)
index 0000000..67d157b
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+
+class Requests_Exception_Transport_cURL extends Requests_Exception_Transport {
+
+       const EASY = 'cURLEasy';
+       const MULTI = 'cURLMulti';
+       const SHARE = 'cURLShare';
+
+       /**
+        * cURL error code
+        *
+        * @var integer
+        */
+       protected $code = -1;
+
+       /**
+        * Which type of cURL error
+        *
+        * EASY|MULTI|SHARE
+        *
+        * @var string
+        */
+       protected $type = 'Unknown';
+
+       /**
+        * Clear text error message
+        *
+        * @var string
+        */
+       protected $reason = 'Unknown';
+
+       public function __construct($message, $type, $data = null, $code = 0) {
+               if ($type !== null) {
+                       $this->type = $type;
+               }
+
+               if ($code !== null) {
+                       $this->code = $code;
+               }
+
+               if ($message !== null) {
+                       $this->reason = $message;
+               }
+
+               $message = sprintf('%d %s', $this->code, $this->reason);
+               parent::__construct($message, $this->type, $data, $this->code);
+       }
+
+       /**
+        * Get the error message
+        */
+       public function getReason() {
+               return $this->reason;
+       }
+
+}
diff --git a/wp-includes/Requests/Hooker.php b/wp-includes/Requests/Hooker.php
new file mode 100644 (file)
index 0000000..f667ae9
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Event dispatcher
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+
+/**
+ * Event dispatcher
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+interface Requests_Hooker {
+       /**
+        * Register a callback for a hook
+        *
+        * @param string $hook Hook name
+        * @param callback $callback Function/method to call on event
+        * @param int $priority Priority number. <0 is executed earlier, >0 is executed later
+        */
+       public function register($hook, $callback, $priority = 0);
+
+       /**
+        * Dispatch a message
+        *
+        * @param string $hook Hook name
+        * @param array $parameters Parameters to pass to callbacks
+        * @return boolean Successfulness
+        */
+       public function dispatch($hook, $parameters = array());
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Hooks.php b/wp-includes/Requests/Hooks.php
new file mode 100644 (file)
index 0000000..2e61c73
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/**
+ * Handles adding and dispatching events
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+
+/**
+ * Handles adding and dispatching events
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+class Requests_Hooks implements Requests_Hooker {
+       /**
+        * Registered callbacks for each hook
+        *
+        * @var array
+        */
+       protected $hooks = array();
+
+       /**
+        * Constructor
+        */
+       public function __construct() {
+               // pass
+       }
+
+       /**
+        * Register a callback for a hook
+        *
+        * @param string $hook Hook name
+        * @param callback $callback Function/method to call on event
+        * @param int $priority Priority number. <0 is executed earlier, >0 is executed later
+        */
+       public function register($hook, $callback, $priority = 0) {
+               if (!isset($this->hooks[$hook])) {
+                       $this->hooks[$hook] = array();
+               }
+               if (!isset($this->hooks[$hook][$priority])) {
+                       $this->hooks[$hook][$priority] = array();
+               }
+
+               $this->hooks[$hook][$priority][] = $callback;
+       }
+
+       /**
+        * Dispatch a message
+        *
+        * @param string $hook Hook name
+        * @param array $parameters Parameters to pass to callbacks
+        * @return boolean Successfulness
+        */
+       public function dispatch($hook, $parameters = array()) {
+               if (empty($this->hooks[$hook])) {
+                       return false;
+               }
+
+               foreach ($this->hooks[$hook] as $priority => $hooked) {
+                       foreach ($hooked as $callback) {
+                               call_user_func_array($callback, $parameters);
+                       }
+               }
+
+               return true;
+       }
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/IDNAEncoder.php b/wp-includes/Requests/IDNAEncoder.php
new file mode 100644 (file)
index 0000000..ebbe211
--- /dev/null
@@ -0,0 +1,388 @@
+<?php
+
+/**
+ * IDNA URL encoder
+ *
+ * Note: Not fully compliant, as nameprep does nothing yet.
+ *
+ * @package Requests
+ * @subpackage Utilities
+ * @see https://tools.ietf.org/html/rfc3490 IDNA specification
+ * @see https://tools.ietf.org/html/rfc3492 Punycode/Bootstrap specification
+ */
+class Requests_IDNAEncoder {
+       /**
+        * ACE prefix used for IDNA
+        *
+        * @see https://tools.ietf.org/html/rfc3490#section-5
+        * @var string
+        */
+       const ACE_PREFIX = 'xn--';
+
+       /**#@+
+        * Bootstrap constant for Punycode
+        *
+        * @see https://tools.ietf.org/html/rfc3492#section-5
+        * @var int
+        */
+       const BOOTSTRAP_BASE         = 36;
+       const BOOTSTRAP_TMIN         = 1;
+       const BOOTSTRAP_TMAX         = 26;
+       const BOOTSTRAP_SKEW         = 38;
+       const BOOTSTRAP_DAMP         = 700;
+       const BOOTSTRAP_INITIAL_BIAS = 72;
+       const BOOTSTRAP_INITIAL_N    = 128;
+       /**#@-*/
+
+       /**
+        * Encode a hostname using Punycode
+        *
+        * @param string $string Hostname
+        * @return string Punycode-encoded hostname
+        */
+       public static function encode($string) {
+               $parts = explode('.', $string);
+               foreach ($parts as &$part) {
+                       $part = self::to_ascii($part);
+               }
+               return implode('.', $parts);
+       }
+
+       /**
+        * Convert a UTF-8 string to an ASCII string using Punycode
+        *
+        * @throws Requests_Exception Provided string longer than 64 ASCII characters (`idna.provided_too_long`)
+        * @throws Requests_Exception Prepared string longer than 64 ASCII characters (`idna.prepared_too_long`)
+        * @throws Requests_Exception Provided string already begins with xn-- (`idna.provided_is_prefixed`)
+        * @throws Requests_Exception Encoded string longer than 64 ASCII characters (`idna.encoded_too_long`)
+        *
+        * @param string $string ASCII or UTF-8 string (max length 64 characters)
+        * @return string ASCII string
+        */
+       public static function to_ascii($string) {
+               // Step 1: Check if the string is already ASCII
+               if (self::is_ascii($string)) {
+                       // Skip to step 7
+                       if (strlen($string) < 64) {
+                               return $string;
+                       }
+
+                       throw new Requests_Exception('Provided string is too long', 'idna.provided_too_long', $string);
+               }
+
+               // Step 2: nameprep
+               $string = self::nameprep($string);
+
+               // Step 3: UseSTD3ASCIIRules is false, continue
+               // Step 4: Check if it's ASCII now
+               if (self::is_ascii($string)) {
+                       // Skip to step 7
+                       if (strlen($string) < 64) {
+                               return $string;
+                       }
+
+                       throw new Requests_Exception('Prepared string is too long', 'idna.prepared_too_long', $string);
+               }
+
+               // Step 5: Check ACE prefix
+               if (strpos($string, self::ACE_PREFIX) === 0) {
+                       throw new Requests_Exception('Provided string begins with ACE prefix', 'idna.provided_is_prefixed', $string);
+               }
+
+               // Step 6: Encode with Punycode
+               $string = self::punycode_encode($string);
+
+               // Step 7: Prepend ACE prefix
+               $string = self::ACE_PREFIX . $string;
+
+               // Step 8: Check size
+               if (strlen($string) < 64) {
+                       return $string;
+               }
+
+               throw new Requests_Exception('Encoded string is too long', 'idna.encoded_too_long', $string);
+       }
+
+       /**
+        * Check whether a given string contains only ASCII characters
+        *
+        * @internal (Testing found regex was the fastest implementation)
+        *
+        * @param string $string
+        * @return bool Is the string ASCII-only?
+        */
+       protected static function is_ascii($string) {
+               return (preg_match('/(?:[^\x00-\x7F])/', $string) !== 1);
+       }
+
+       /**
+        * Prepare a string for use as an IDNA name
+        *
+        * @todo Implement this based on RFC 3491 and the newer 5891
+        * @param string $string
+        * @return string Prepared string
+        */
+       protected static function nameprep($string) {
+               return $string;
+       }
+
+       /**
+        * Convert a UTF-8 string to a UCS-4 codepoint array
+        *
+        * Based on Requests_IRI::replace_invalid_with_pct_encoding()
+        *
+        * @throws Requests_Exception Invalid UTF-8 codepoint (`idna.invalidcodepoint`)
+        * @param string $input
+        * @return array Unicode code points
+        */
+       protected static function utf8_to_codepoints($input) {
+               $codepoints = array();
+
+               // Get number of bytes
+               $strlen = strlen($input);
+
+               for ($position = 0; $position < $strlen; $position++) {
+                       $value = ord($input[$position]);
+
+                       // One byte sequence:
+                       if ((~$value & 0x80) === 0x80) {
+                               $character = $value;
+                               $length = 1;
+                               $remaining = 0;
+                       }
+                       // Two byte sequence:
+                       elseif (($value & 0xE0) === 0xC0) {
+                               $character = ($value & 0x1F) << 6;
+                               $length = 2;
+                               $remaining = 1;
+                       }
+                       // Three byte sequence:
+                       elseif (($value & 0xF0) === 0xE0) {
+                               $character = ($value & 0x0F) << 12;
+                               $length = 3;
+                               $remaining = 2;
+                       }
+                       // Four byte sequence:
+                       elseif (($value & 0xF8) === 0xF0) {
+                               $character = ($value & 0x07) << 18;
+                               $length = 4;
+                               $remaining = 3;
+                       }
+                       // Invalid byte:
+                       else {
+                               throw new Requests_Exception('Invalid Unicode codepoint', 'idna.invalidcodepoint', $value);
+                       }
+
+                       if ($remaining > 0) {
+                               if ($position + $length > $strlen) {
+                                       throw new Requests_Exception('Invalid Unicode codepoint', 'idna.invalidcodepoint', $character);
+                               }
+                               for ($position++; $remaining > 0; $position++) {
+                                       $value = ord($input[$position]);
+
+                                       // If it is invalid, count the sequence as invalid and reprocess the current byte:
+                                       if (($value & 0xC0) !== 0x80) {
+                                               throw new Requests_Exception('Invalid Unicode codepoint', 'idna.invalidcodepoint', $character);
+                                       }
+
+                                       $character |= ($value & 0x3F) << (--$remaining * 6);
+                               }
+                               $position--;
+                       }
+
+                       if (
+                               // Non-shortest form sequences are invalid
+                                  $length > 1 && $character <= 0x7F
+                               || $length > 2 && $character <= 0x7FF
+                               || $length > 3 && $character <= 0xFFFF
+                               // Outside of range of ucschar codepoints
+                               // Noncharacters
+                               || ($character & 0xFFFE) === 0xFFFE
+                               || $character >= 0xFDD0 && $character <= 0xFDEF
+                               || (
+                                       // Everything else not in ucschar
+                                          $character > 0xD7FF && $character < 0xF900
+                                       || $character < 0x20
+                                       || $character > 0x7E && $character < 0xA0
+                                       || $character > 0xEFFFD
+                               )
+                       ) {
+                               throw new Requests_Exception('Invalid Unicode codepoint', 'idna.invalidcodepoint', $character);
+                       }
+
+                       $codepoints[] = $character;
+               }
+
+               return $codepoints;
+       }
+
+       /**
+        * RFC3492-compliant encoder
+        *
+        * @internal Pseudo-code from Section 6.3 is commented with "#" next to relevant code
+        * @throws Requests_Exception On character outside of the domain (never happens with Punycode) (`idna.character_outside_domain`)
+        *
+        * @param string $input UTF-8 encoded string to encode
+        * @return string Punycode-encoded string
+        */
+       public static function punycode_encode($input) {
+               $output = '';
+#              let n = initial_n
+               $n = self::BOOTSTRAP_INITIAL_N;
+#              let delta = 0
+               $delta = 0;
+#              let bias = initial_bias
+               $bias = self::BOOTSTRAP_INITIAL_BIAS;
+#              let h = b = the number of basic code points in the input
+               $h = $b = 0; // see loop
+#              copy them to the output in order
+               $codepoints = self::utf8_to_codepoints($input);
+               $extended = array();
+
+               foreach ($codepoints as $char) {
+                       if ($char < 128) {
+                               // Character is valid ASCII
+                               // TODO: this should also check if it's valid for a URL
+                               $output .= chr($char);
+                               $h++;
+                       }
+                       // Check if the character is non-ASCII, but below initial n
+                       // This never occurs for Punycode, so ignore in coverage
+                       // @codeCoverageIgnoreStart
+                       elseif ($char < $n) {
+                               throw new Requests_Exception('Invalid character', 'idna.character_outside_domain', $char);
+                       }
+                       // @codeCoverageIgnoreEnd
+                       else {
+                               $extended[$char] = true;
+                       }
+               }
+               $extended = array_keys($extended);
+               sort($extended);
+               $b = $h;
+#              [copy them] followed by a delimiter if b > 0
+               if (strlen($output) > 0) {
+                       $output .= '-';
+               }
+#              {if the input contains a non-basic code point < n then fail}
+#              while h < length(input) do begin
+               while ($h < count($codepoints)) {
+#                      let m = the minimum code point >= n in the input
+                       $m = array_shift($extended);
+                       //printf('next code point to insert is %s' . PHP_EOL, dechex($m));
+#                      let delta = delta + (m - n) * (h + 1), fail on overflow
+                       $delta += ($m - $n) * ($h + 1);
+#                      let n = m
+                       $n = $m;
+#                      for each code point c in the input (in order) do begin
+                       for ($num = 0; $num < count($codepoints); $num++) {
+                               $c = $codepoints[$num];
+#                              if c < n then increment delta, fail on overflow
+                               if ($c < $n) {
+                                       $delta++;
+                               }
+#                              if c == n then begin
+                               elseif ($c === $n) {
+#                                      let q = delta
+                                       $q = $delta;
+#                                      for k = base to infinity in steps of base do begin
+                                       for ($k = self::BOOTSTRAP_BASE; ; $k += self::BOOTSTRAP_BASE) {
+#                                              let t = tmin if k <= bias {+ tmin}, or
+#                                                              tmax if k >= bias + tmax, or k - bias otherwise
+                                               if ($k <= ($bias + self::BOOTSTRAP_TMIN)) {
+                                                       $t = self::BOOTSTRAP_TMIN;
+                                               }
+                                               elseif ($k >= ($bias + self::BOOTSTRAP_TMAX)) {
+                                                       $t = self::BOOTSTRAP_TMAX;
+                                               }
+                                               else {
+                                                       $t = $k - $bias;
+                                               }
+#                                              if q < t then break
+                                               if ($q < $t) {
+                                                       break;
+                                               }
+#                                              output the code point for digit t + ((q - t) mod (base - t))
+                                               $digit = $t + (($q - $t) % (self::BOOTSTRAP_BASE - $t));
+                                               $output .= self::digit_to_char($digit);
+#                                              let q = (q - t) div (base - t)
+                                               $q = floor(($q - $t) / (self::BOOTSTRAP_BASE - $t));
+#                                      end
+                                       }
+#                                      output the code point for digit q
+                                       $output .= self::digit_to_char($q);
+#                                      let bias = adapt(delta, h + 1, test h equals b?)
+                                       $bias = self::adapt($delta, $h + 1, $h === $b);
+#                                      let delta = 0
+                                       $delta = 0;
+#                                      increment h
+                                       $h++;
+#                              end
+                               }
+#                      end
+                       }
+#                      increment delta and n
+                       $delta++;
+                       $n++;
+#              end
+               }
+
+               return $output;
+       }
+
+       /**
+        * Convert a digit to its respective character
+        *
+        * @see https://tools.ietf.org/html/rfc3492#section-5
+        * @throws Requests_Exception On invalid digit (`idna.invalid_digit`)
+        *
+        * @param int $digit Digit in the range 0-35
+        * @return string Single character corresponding to digit
+        */
+       protected static function digit_to_char($digit) {
+               // @codeCoverageIgnoreStart
+               // As far as I know, this never happens, but still good to be sure.
+               if ($digit < 0 || $digit > 35) {
+                       throw new Requests_Exception(sprintf('Invalid digit %d', $digit), 'idna.invalid_digit', $digit);
+               }
+               // @codeCoverageIgnoreEnd
+               $digits = 'abcdefghijklmnopqrstuvwxyz0123456789';
+               return substr($digits, $digit, 1);
+       }
+
+       /**
+        * Adapt the bias
+        *
+        * @see https://tools.ietf.org/html/rfc3492#section-6.1
+        * @param int $delta
+        * @param int $numpoints
+        * @param bool $firsttime
+        * @return int New bias
+        */
+       protected static function adapt($delta, $numpoints, $firsttime) {
+#      function adapt(delta,numpoints,firsttime):
+#              if firsttime then let delta = delta div damp
+               if ($firsttime) {
+                       $delta = floor($delta / self::BOOTSTRAP_DAMP);
+               }
+#              else let delta = delta div 2
+               else {
+                       $delta = floor($delta / 2);
+               }
+#              let delta = delta + (delta div numpoints)
+               $delta += floor($delta / $numpoints);
+#              let k = 0
+               $k = 0;
+#              while delta > ((base - tmin) * tmax) div 2 do begin
+               $max = floor(((self::BOOTSTRAP_BASE - self::BOOTSTRAP_TMIN) * self::BOOTSTRAP_TMAX) / 2);
+               while ($delta > $max) {
+#                      let delta = delta div (base - tmin)
+                       $delta = floor($delta / (self::BOOTSTRAP_BASE - self::BOOTSTRAP_TMIN));
+#                      let k = k + base
+                       $k += self::BOOTSTRAP_BASE;
+#              end
+               }
+#              return k + (((base - tmin + 1) * delta) div (delta + skew))
+               return $k + floor(((self::BOOTSTRAP_BASE - self::BOOTSTRAP_TMIN + 1) * $delta) / ($delta + self::BOOTSTRAP_SKEW));
+       }
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/IPv6.php b/wp-includes/Requests/IPv6.php
new file mode 100644 (file)
index 0000000..204dbd7
--- /dev/null
@@ -0,0 +1,190 @@
+<?php
+/**
+ * Class to validate and to work with IPv6 addresses
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+
+/**
+ * Class to validate and to work with IPv6 addresses
+ *
+ * This was originally based on the PEAR class of the same name, but has been
+ * entirely rewritten.
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+class Requests_IPv6 {
+       /**
+        * Uncompresses an IPv6 address
+        *
+        * RFC 4291 allows you to compress consecutive zero pieces in an address to
+        * '::'. This method expects a valid IPv6 address and expands the '::' to
+        * the required number of zero pieces.
+        *
+        * Example:  FF01::101   ->  FF01:0:0:0:0:0:0:101
+        *           ::1         ->  0:0:0:0:0:0:0:1
+        *
+        * @author Alexander Merz <alexander.merz@web.de>
+        * @author elfrink at introweb dot nl
+        * @author Josh Peck <jmp at joshpeck dot org>
+        * @copyright 2003-2005 The PHP Group
+        * @license http://www.opensource.org/licenses/bsd-license.php
+        * @param string $ip An IPv6 address
+        * @return string The uncompressed IPv6 address
+        */
+       public static function uncompress($ip) {
+               if (substr_count($ip, '::') !== 1) {
+                       return $ip;
+               }
+
+               list($ip1, $ip2) = explode('::', $ip);
+               $c1 = ($ip1 === '') ? -1 : substr_count($ip1, ':');
+               $c2 = ($ip2 === '') ? -1 : substr_count($ip2, ':');
+
+               if (strpos($ip2, '.') !== false) {
+                       $c2++;
+               }
+               // ::
+               if ($c1 === -1 && $c2 === -1) {
+                       $ip = '0:0:0:0:0:0:0:0';
+               }
+               // ::xxx
+               else if ($c1 === -1) {
+                       $fill = str_repeat('0:', 7 - $c2);
+                       $ip = str_replace('::', $fill, $ip);
+               }
+               // xxx::
+               else if ($c2 === -1) {
+                       $fill = str_repeat(':0', 7 - $c1);
+                       $ip = str_replace('::', $fill, $ip);
+               }
+               // xxx::xxx
+               else {
+                       $fill = ':' . str_repeat('0:', 6 - $c2 - $c1);
+                       $ip = str_replace('::', $fill, $ip);
+               }
+               return $ip;
+       }
+
+       /**
+        * Compresses an IPv6 address
+        *
+        * RFC 4291 allows you to compress consecutive zero pieces in an address to
+        * '::'. This method expects a valid IPv6 address and compresses consecutive
+        * zero pieces to '::'.
+        *
+        * Example:  FF01:0:0:0:0:0:0:101   ->  FF01::101
+        *           0:0:0:0:0:0:0:1        ->  ::1
+        *
+        * @see uncompress()
+        * @param string $ip An IPv6 address
+        * @return string The compressed IPv6 address
+        */
+       public static function compress($ip) {
+               // Prepare the IP to be compressed
+               $ip = self::uncompress($ip);
+               $ip_parts = self::split_v6_v4($ip);
+
+               // Replace all leading zeros
+               $ip_parts[0] = preg_replace('/(^|:)0+([0-9])/', '\1\2', $ip_parts[0]);
+
+               // Find bunches of zeros
+               if (preg_match_all('/(?:^|:)(?:0(?::|$))+/', $ip_parts[0], $matches, PREG_OFFSET_CAPTURE)) {
+                       $max = 0;
+                       $pos = null;
+                       foreach ($matches[0] as $match) {
+                               if (strlen($match[0]) > $max) {
+                                       $max = strlen($match[0]);
+                                       $pos = $match[1];
+                               }
+                       }
+
+                       $ip_parts[0] = substr_replace($ip_parts[0], '::', $pos, $max);
+               }
+
+               if ($ip_parts[1] !== '') {
+                       return implode(':', $ip_parts);
+               }
+               else {
+                       return $ip_parts[0];
+               }
+       }
+
+       /**
+        * Splits an IPv6 address into the IPv6 and IPv4 representation parts
+        *
+        * RFC 4291 allows you to represent the last two parts of an IPv6 address
+        * using the standard IPv4 representation
+        *
+        * Example:  0:0:0:0:0:0:13.1.68.3
+        *           0:0:0:0:0:FFFF:129.144.52.38
+        *
+        * @param string $ip An IPv6 address
+        * @return string[] [0] contains the IPv6 represented part, and [1] the IPv4 represented part
+        */
+       protected static function split_v6_v4($ip) {
+               if (strpos($ip, '.') !== false) {
+                       $pos = strrpos($ip, ':');
+                       $ipv6_part = substr($ip, 0, $pos);
+                       $ipv4_part = substr($ip, $pos + 1);
+                       return array($ipv6_part, $ipv4_part);
+               }
+               else {
+                       return array($ip, '');
+               }
+       }
+
+       /**
+        * Checks an IPv6 address
+        *
+        * Checks if the given IP is a valid IPv6 address
+        *
+        * @param string $ip An IPv6 address
+        * @return bool true if $ip is a valid IPv6 address
+        */
+       public static function check_ipv6($ip) {
+               $ip = self::uncompress($ip);
+               list($ipv6, $ipv4) = self::split_v6_v4($ip);
+               $ipv6 = explode(':', $ipv6);
+               $ipv4 = explode('.', $ipv4);
+               if (count($ipv6) === 8 && count($ipv4) === 1 || count($ipv6) === 6 && count($ipv4) === 4) {
+                       foreach ($ipv6 as $ipv6_part) {
+                               // The section can't be empty
+                               if ($ipv6_part === '') {
+                                       return false;
+                               }
+
+                               // Nor can it be over four characters
+                               if (strlen($ipv6_part) > 4) {
+                                       return false;
+                               }
+
+                               // Remove leading zeros (this is safe because of the above)
+                               $ipv6_part = ltrim($ipv6_part, '0');
+                               if ($ipv6_part === '') {
+                                       $ipv6_part = '0';
+                               }
+
+                               // Check the value is valid
+                               $value = hexdec($ipv6_part);
+                               if (dechex($value) !== strtolower($ipv6_part) || $value < 0 || $value > 0xFFFF) {
+                                       return false;
+                               }
+                       }
+                       if (count($ipv4) === 4) {
+                               foreach ($ipv4 as $ipv4_part) {
+                                       $value = (int) $ipv4_part;
+                                       if ((string) $value !== $ipv4_part || $value < 0 || $value > 0xFF) {
+                                               return false;
+                                       }
+                               }
+                       }
+                       return true;
+               }
+               else {
+                       return false;
+               }
+       }
+}
diff --git a/wp-includes/Requests/IRI.php b/wp-includes/Requests/IRI.php
new file mode 100644 (file)
index 0000000..44a9517
--- /dev/null
@@ -0,0 +1,1087 @@
+<?php
+/**
+ * IRI parser/serialiser/normaliser
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+
+/**
+ * IRI parser/serialiser/normaliser
+ *
+ * Copyright (c) 2007-2010, Geoffrey Sneddon and Steve Minutillo.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright notice,
+ *       this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright notice,
+ *       this list of conditions and the following disclaimer in the documentation
+ *       and/or other materials provided with the distribution.
+ *
+ *  * Neither the name of the SimplePie Team nor the names of its contributors
+ *       may be used to endorse or promote products derived from this software
+ *       without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @package Requests
+ * @subpackage Utilities
+ * @author Geoffrey Sneddon
+ * @author Steve Minutillo
+ * @copyright 2007-2009 Geoffrey Sneddon and Steve Minutillo
+ * @license http://www.opensource.org/licenses/bsd-license.php
+ * @link http://hg.gsnedders.com/iri/
+ *
+ * @property string $iri IRI we're working with
+ * @property-read string $uri IRI in URI form, {@see to_uri}
+ * @property string $scheme Scheme part of the IRI
+ * @property string $authority Authority part, formatted for a URI (userinfo + host + port)
+ * @property string $iauthority Authority part of the IRI (userinfo + host + port)
+ * @property string $userinfo Userinfo part, formatted for a URI (after '://' and before '@')
+ * @property string $iuserinfo Userinfo part of the IRI (after '://' and before '@')
+ * @property string $host Host part, formatted for a URI
+ * @property string $ihost Host part of the IRI
+ * @property string $port Port part of the IRI (after ':')
+ * @property string $path Path part, formatted for a URI (after first '/')
+ * @property string $ipath Path part of the IRI (after first '/')
+ * @property string $query Query part, formatted for a URI (after '?')
+ * @property string $iquery Query part of the IRI (after '?')
+ * @property string $fragment Fragment, formatted for a URI (after '#')
+ * @property string $ifragment Fragment part of the IRI (after '#')
+ */
+class Requests_IRI {
+       /**
+        * Scheme
+        *
+        * @var string
+        */
+       protected $scheme = null;
+
+       /**
+        * User Information
+        *
+        * @var string
+        */
+       protected $iuserinfo = null;
+
+       /**
+        * ihost
+        *
+        * @var string
+        */
+       protected $ihost = null;
+
+       /**
+        * Port
+        *
+        * @var string
+        */
+       protected $port = null;
+
+       /**
+        * ipath
+        *
+        * @var string
+        */
+       protected $ipath = '';
+
+       /**
+        * iquery
+        *
+        * @var string
+        */
+       protected $iquery = null;
+
+       /**
+        * ifragment
+        *
+        * @var string
+        */
+       protected $ifragment = null;
+
+       /**
+        * Normalization database
+        *
+        * Each key is the scheme, each value is an array with each key as the IRI
+        * part and value as the default value for that part.
+        */
+       protected $normalization = array(
+               'acap' => array(
+                       'port' => 674
+               ),
+               'dict' => array(
+                       'port' => 2628
+               ),
+               'file' => array(
+                       'ihost' => 'localhost'
+               ),
+               'http' => array(
+                       'port' => 80,
+               ),
+               'https' => array(
+                       'port' => 443,
+               ),
+       );
+
+       /**
+        * Return the entire IRI when you try and read the object as a string
+        *
+        * @return string
+        */
+       public function __toString() {
+               return $this->get_iri();
+       }
+
+       /**
+        * Overload __set() to provide access via properties
+        *
+        * @param string $name Property name
+        * @param mixed $value Property value
+        */
+       public function __set($name, $value) {
+               if (method_exists($this, 'set_' . $name)) {
+                       call_user_func(array($this, 'set_' . $name), $value);
+               }
+               elseif (
+                          $name === 'iauthority'
+                       || $name === 'iuserinfo'
+                       || $name === 'ihost'
+                       || $name === 'ipath'
+                       || $name === 'iquery'
+                       || $name === 'ifragment'
+               ) {
+                       call_user_func(array($this, 'set_' . substr($name, 1)), $value);
+               }
+       }
+
+       /**
+        * Overload __get() to provide access via properties
+        *
+        * @param string $name Property name
+        * @return mixed
+        */
+       public function __get($name) {
+               // isset() returns false for null, we don't want to do that
+               // Also why we use array_key_exists below instead of isset()
+               $props = get_object_vars($this);
+
+               if (
+                       $name === 'iri' ||
+                       $name === 'uri' ||
+                       $name === 'iauthority' ||
+                       $name === 'authority'
+               ) {
+                       $method = 'get_' . $name;
+                       $return = $this->$method();
+               }
+               elseif (array_key_exists($name, $props)) {
+                       $return = $this->$name;
+               }
+               // host -> ihost
+               elseif (($prop = 'i' . $name) && array_key_exists($prop, $props)) {
+                       $name = $prop;
+                       $return = $this->$prop;
+               }
+               // ischeme -> scheme
+               elseif (($prop = substr($name, 1)) && array_key_exists($prop, $props)) {
+                       $name = $prop;
+                       $return = $this->$prop;
+               }
+               else {
+                       trigger_error('Undefined property: ' . get_class($this) . '::' . $name, E_USER_NOTICE);
+                       $return = null;
+               }
+
+               if ($return === null && isset($this->normalization[$this->scheme][$name])) {
+                       return $this->normalization[$this->scheme][$name];
+               }
+               else {
+                       return $return;
+               }
+       }
+
+       /**
+        * Overload __isset() to provide access via properties
+        *
+        * @param string $name Property name
+        * @return bool
+        */
+       public function __isset($name) {
+               return (method_exists($this, 'get_' . $name) || isset($this->$name));
+       }
+
+       /**
+        * Overload __unset() to provide access via properties
+        *
+        * @param string $name Property name
+        */
+       public function __unset($name) {
+               if (method_exists($this, 'set_' . $name)) {
+                       call_user_func(array($this, 'set_' . $name), '');
+               }
+       }
+
+       /**
+        * Create a new IRI object, from a specified string
+        *
+        * @param string|null $iri
+        */
+       public function __construct($iri = null) {
+               $this->set_iri($iri);
+       }
+
+       /**
+        * Create a new IRI object by resolving a relative IRI
+        *
+        * Returns false if $base is not absolute, otherwise an IRI.
+        *
+        * @param IRI|string $base (Absolute) Base IRI
+        * @param IRI|string $relative Relative IRI
+        * @return IRI|false
+        */
+       public static function absolutize($base, $relative) {
+               if (!($relative instanceof Requests_IRI)) {
+                       $relative = new Requests_IRI($relative);
+               }
+               if (!$relative->is_valid()) {
+                       return false;
+               }
+               elseif ($relative->scheme !== null) {
+                       return clone $relative;
+               }
+
+               if (!($base instanceof Requests_IRI)) {
+                       $base = new Requests_IRI($base);
+               }
+               if ($base->scheme === null || !$base->is_valid()) {
+                       return false;
+               }
+
+               if ($relative->get_iri() !== '') {
+                       if ($relative->iuserinfo !== null || $relative->ihost !== null || $relative->port !== null) {
+                               $target = clone $relative;
+                               $target->scheme = $base->scheme;
+                       }
+                       else {
+                               $target = new Requests_IRI;
+                               $target->scheme = $base->scheme;
+                               $target->iuserinfo = $base->iuserinfo;
+                               $target->ihost = $base->ihost;
+                               $target->port = $base->port;
+                               if ($relative->ipath !== '') {
+                                       if ($relative->ipath[0] === '/') {
+                                               $target->ipath = $relative->ipath;
+                                       }
+                                       elseif (($base->iuserinfo !== null || $base->ihost !== null || $base->port !== null) && $base->ipath === '') {
+                                               $target->ipath = '/' . $relative->ipath;
+                                       }
+                                       elseif (($last_segment = strrpos($base->ipath, '/')) !== false) {
+                                               $target->ipath = substr($base->ipath, 0, $last_segment + 1) . $relative->ipath;
+                                       }
+                                       else {
+                                               $target->ipath = $relative->ipath;
+                                       }
+                                       $target->ipath = $target->remove_dot_segments($target->ipath);
+                                       $target->iquery = $relative->iquery;
+                               }
+                               else {
+                                       $target->ipath = $base->ipath;
+                                       if ($relative->iquery !== null) {
+                                               $target->iquery = $relative->iquery;
+                                       }
+                                       elseif ($base->iquery !== null) {
+                                               $target->iquery = $base->iquery;
+                                       }
+                               }
+                               $target->ifragment = $relative->ifragment;
+                       }
+               }
+               else {
+                       $target = clone $base;
+                       $target->ifragment = null;
+               }
+               $target->scheme_normalization();
+               return $target;
+       }
+
+       /**
+        * Parse an IRI into scheme/authority/path/query/fragment segments
+        *
+        * @param string $iri
+        * @return array
+        */
+       protected function parse_iri($iri) {
+               $iri = trim($iri, "\x20\x09\x0A\x0C\x0D");
+               $has_match = preg_match('/^((?P<scheme>[^:\/?#]+):)?(\/\/(?P<authority>[^\/?#]*))?(?P<path>[^?#]*)(\?(?P<query>[^#]*))?(#(?P<fragment>.*))?$/', $iri, $match);
+               if (!$has_match) {
+                       throw new Requests_Exception('Cannot parse supplied IRI', 'iri.cannot_parse', $iri);
+               }
+
+               if ($match[1] === '') {
+                       $match['scheme'] = null;
+               }
+               if (!isset($match[3]) || $match[3] === '') {
+                       $match['authority'] = null;
+               }
+               if (!isset($match[5])) {
+                       $match['path'] = '';
+               }
+               if (!isset($match[6]) || $match[6] === '') {
+                       $match['query'] = null;
+               }
+               if (!isset($match[8]) || $match[8] === '') {
+                       $match['fragment'] = null;
+               }
+               return $match;
+       }
+
+       /**
+        * Remove dot segments from a path
+        *
+        * @param string $input
+        * @return string
+        */
+       protected function remove_dot_segments($input) {
+               $output = '';
+               while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..') {
+                       // A: If the input buffer begins with a prefix of "../" or "./",
+                       // then remove that prefix from the input buffer; otherwise,
+                       if (strpos($input, '../') === 0) {
+                               $input = substr($input, 3);
+                       }
+                       elseif (strpos($input, './') === 0) {
+                               $input = substr($input, 2);
+                       }
+                       // B: if the input buffer begins with a prefix of "/./" or "/.",
+                       // where "." is a complete path segment, then replace that prefix
+                       // with "/" in the input buffer; otherwise,
+                       elseif (strpos($input, '/./') === 0) {
+                               $input = substr($input, 2);
+                       }
+                       elseif ($input === '/.') {
+                               $input = '/';
+                       }
+                       // C: if the input buffer begins with a prefix of "/../" or "/..",
+                       // where ".." is a complete path segment, then replace that prefix
+                       // with "/" in the input buffer and remove the last segment and its
+                       // preceding "/" (if any) from the output buffer; otherwise,
+                       elseif (strpos($input, '/../') === 0) {
+                               $input = substr($input, 3);
+                               $output = substr_replace($output, '', strrpos($output, '/'));
+                       }
+                       elseif ($input === '/..') {
+                               $input = '/';
+                               $output = substr_replace($output, '', strrpos($output, '/'));
+                       }
+                       // D: if the input buffer consists only of "." or "..", then remove
+                       // that from the input buffer; otherwise,
+                       elseif ($input === '.' || $input === '..') {
+                               $input = '';
+                       }
+                       // E: move the first path segment in the input buffer to the end of
+                       // the output buffer, including the initial "/" character (if any)
+                       // and any subsequent characters up to, but not including, the next
+                       // "/" character or the end of the input buffer
+                       elseif (($pos = strpos($input, '/', 1)) !== false) {
+                               $output .= substr($input, 0, $pos);
+                               $input = substr_replace($input, '', 0, $pos);
+                       }
+                       else {
+                               $output .= $input;
+                               $input = '';
+                       }
+               }
+               return $output . $input;
+       }
+
+       /**
+        * Replace invalid character with percent encoding
+        *
+        * @param string $string Input string
+        * @param string $extra_chars Valid characters not in iunreserved or
+        *                            iprivate (this is ASCII-only)
+        * @param bool $iprivate Allow iprivate
+        * @return string
+        */
+       protected function replace_invalid_with_pct_encoding($string, $extra_chars, $iprivate = false) {
+               // Normalize as many pct-encoded sections as possible
+               $string = preg_replace_callback('/(?:%[A-Fa-f0-9]{2})+/', array(&$this, 'remove_iunreserved_percent_encoded'), $string);
+
+               // Replace invalid percent characters
+               $string = preg_replace('/%(?![A-Fa-f0-9]{2})/', '%25', $string);
+
+               // Add unreserved and % to $extra_chars (the latter is safe because all
+               // pct-encoded sections are now valid).
+               $extra_chars .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~%';
+
+               // Now replace any bytes that aren't allowed with their pct-encoded versions
+               $position = 0;
+               $strlen = strlen($string);
+               while (($position += strspn($string, $extra_chars, $position)) < $strlen) {
+                       $value = ord($string[$position]);
+
+                       // Start position
+                       $start = $position;
+
+                       // By default we are valid
+                       $valid = true;
+
+                       // No one byte sequences are valid due to the while.
+                       // Two byte sequence:
+                       if (($value & 0xE0) === 0xC0) {
+                               $character = ($value & 0x1F) << 6;
+                               $length = 2;
+                               $remaining = 1;
+                       }
+                       // Three byte sequence:
+                       elseif (($value & 0xF0) === 0xE0) {
+                               $character = ($value & 0x0F) << 12;
+                               $length = 3;
+                               $remaining = 2;
+                       }
+                       // Four byte sequence:
+                       elseif (($value & 0xF8) === 0xF0) {
+                               $character = ($value & 0x07) << 18;
+                               $length = 4;
+                               $remaining = 3;
+                       }
+                       // Invalid byte:
+                       else {
+                               $valid = false;
+                               $length = 1;
+                               $remaining = 0;
+                       }
+
+                       if ($remaining) {
+                               if ($position + $length <= $strlen) {
+                                       for ($position++; $remaining; $position++) {
+                                               $value = ord($string[$position]);
+
+                                               // Check that the byte is valid, then add it to the character:
+                                               if (($value & 0xC0) === 0x80) {
+                                                       $character |= ($value & 0x3F) << (--$remaining * 6);
+                                               }
+                                               // If it is invalid, count the sequence as invalid and reprocess the current byte:
+                                               else {
+                                                       $valid = false;
+                                                       $position--;
+                                                       break;
+                                               }
+                                       }
+                               }
+                               else {
+                                       $position = $strlen - 1;
+                                       $valid = false;
+                               }
+                       }
+
+                       // Percent encode anything invalid or not in ucschar
+                       if (
+                               // Invalid sequences
+                               !$valid
+                               // Non-shortest form sequences are invalid
+                               || $length > 1 && $character <= 0x7F
+                               || $length > 2 && $character <= 0x7FF
+                               || $length > 3 && $character <= 0xFFFF
+                               // Outside of range of ucschar codepoints
+                               // Noncharacters
+                               || ($character & 0xFFFE) === 0xFFFE
+                               || $character >= 0xFDD0 && $character <= 0xFDEF
+                               || (
+                                       // Everything else not in ucschar
+                                          $character > 0xD7FF && $character < 0xF900
+                                       || $character < 0xA0
+                                       || $character > 0xEFFFD
+                               )
+                               && (
+                                       // Everything not in iprivate, if it applies
+                                          !$iprivate
+                                       || $character < 0xE000
+                                       || $character > 0x10FFFD
+                               )
+                       ) {
+                               // If we were a character, pretend we weren't, but rather an error.
+                               if ($valid) {
+                                       $position--;
+                               }
+
+                               for ($j = $start; $j <= $position; $j++) {
+                                       $string = substr_replace($string, sprintf('%%%02X', ord($string[$j])), $j, 1);
+                                       $j += 2;
+                                       $position += 2;
+                                       $strlen += 2;
+                               }
+                       }
+               }
+
+               return $string;
+       }
+
+       /**
+        * Callback function for preg_replace_callback.
+        *
+        * Removes sequences of percent encoded bytes that represent UTF-8
+        * encoded characters in iunreserved
+        *
+        * @param array $match PCRE match
+        * @return string Replacement
+        */
+       protected function remove_iunreserved_percent_encoded($match) {
+               // As we just have valid percent encoded sequences we can just explode
+               // and ignore the first member of the returned array (an empty string).
+               $bytes = explode('%', $match[0]);
+
+               // Initialize the new string (this is what will be returned) and that
+               // there are no bytes remaining in the current sequence (unsurprising
+               // at the first byte!).
+               $string = '';
+               $remaining = 0;
+
+               // Loop over each and every byte, and set $value to its value
+               for ($i = 1, $len = count($bytes); $i < $len; $i++) {
+                       $value = hexdec($bytes[$i]);
+
+                       // If we're the first byte of sequence:
+                       if (!$remaining) {
+                               // Start position
+                               $start = $i;
+
+                               // By default we are valid
+                               $valid = true;
+
+                               // One byte sequence:
+                               if ($value <= 0x7F) {
+                                       $character = $value;
+                                       $length = 1;
+                               }
+                               // Two byte sequence:
+                               elseif (($value & 0xE0) === 0xC0) {
+                                       $character = ($value & 0x1F) << 6;
+                                       $length = 2;
+                                       $remaining = 1;
+                               }
+                               // Three byte sequence:
+                               elseif (($value & 0xF0) === 0xE0) {
+                                       $character = ($value & 0x0F) << 12;
+                                       $length = 3;
+                                       $remaining = 2;
+                               }
+                               // Four byte sequence:
+                               elseif (($value & 0xF8) === 0xF0) {
+                                       $character = ($value & 0x07) << 18;
+                                       $length = 4;
+                                       $remaining = 3;
+                               }
+                               // Invalid byte:
+                               else {
+                                       $valid = false;
+                                       $remaining = 0;
+                               }
+                       }
+                       // Continuation byte:
+                       else {
+                               // Check that the byte is valid, then add it to the character:
+                               if (($value & 0xC0) === 0x80) {
+                                       $remaining--;
+                                       $character |= ($value & 0x3F) << ($remaining * 6);
+                               }
+                               // If it is invalid, count the sequence as invalid and reprocess the current byte as the start of a sequence:
+                               else {
+                                       $valid = false;
+                                       $remaining = 0;
+                                       $i--;
+                               }
+                       }
+
+                       // If we've reached the end of the current byte sequence, append it to Unicode::$data
+                       if (!$remaining) {
+                               // Percent encode anything invalid or not in iunreserved
+                               if (
+                                       // Invalid sequences
+                                       !$valid
+                                       // Non-shortest form sequences are invalid
+                                       || $length > 1 && $character <= 0x7F
+                                       || $length > 2 && $character <= 0x7FF
+                                       || $length > 3 && $character <= 0xFFFF
+                                       // Outside of range of iunreserved codepoints
+                                       || $character < 0x2D
+                                       || $character > 0xEFFFD
+                                       // Noncharacters
+                                       || ($character & 0xFFFE) === 0xFFFE
+                                       || $character >= 0xFDD0 && $character <= 0xFDEF
+                                       // Everything else not in iunreserved (this is all BMP)
+                                       || $character === 0x2F
+                                       || $character > 0x39 && $character < 0x41
+                                       || $character > 0x5A && $character < 0x61
+                                       || $character > 0x7A && $character < 0x7E
+                                       || $character > 0x7E && $character < 0xA0
+                                       || $character > 0xD7FF && $character < 0xF900
+                               ) {
+                                       for ($j = $start; $j <= $i; $j++) {
+                                               $string .= '%' . strtoupper($bytes[$j]);
+                                       }
+                               }
+                               else {
+                                       for ($j = $start; $j <= $i; $j++) {
+                                               $string .= chr(hexdec($bytes[$j]));
+                                       }
+                               }
+                       }
+               }
+
+               // If we have any bytes left over they are invalid (i.e., we are
+               // mid-way through a multi-byte sequence)
+               if ($remaining) {
+                       for ($j = $start; $j < $len; $j++) {
+                               $string .= '%' . strtoupper($bytes[$j]);
+                       }
+               }
+
+               return $string;
+       }
+
+       protected function scheme_normalization() {
+               if (isset($this->normalization[$this->scheme]['iuserinfo']) && $this->iuserinfo === $this->normalization[$this->scheme]['iuserinfo']) {
+                       $this->iuserinfo = null;
+               }
+               if (isset($this->normalization[$this->scheme]['ihost']) && $this->ihost === $this->normalization[$this->scheme]['ihost']) {
+                       $this->ihost = null;
+               }
+               if (isset($this->normalization[$this->scheme]['port']) && $this->port === $this->normalization[$this->scheme]['port']) {
+                       $this->port = null;
+               }
+               if (isset($this->normalization[$this->scheme]['ipath']) && $this->ipath === $this->normalization[$this->scheme]['ipath']) {
+                       $this->ipath = '';
+               }
+               if (isset($this->ihost) && empty($this->ipath)) {
+                       $this->ipath = '/';
+               }
+               if (isset($this->normalization[$this->scheme]['iquery']) && $this->iquery === $this->normalization[$this->scheme]['iquery']) {
+                       $this->iquery = null;
+               }
+               if (isset($this->normalization[$this->scheme]['ifragment']) && $this->ifragment === $this->normalization[$this->scheme]['ifragment']) {
+                       $this->ifragment = null;
+               }
+       }
+
+       /**
+        * Check if the object represents a valid IRI. This needs to be done on each
+        * call as some things change depending on another part of the IRI.
+        *
+        * @return bool
+        */
+       public function is_valid() {
+               $isauthority = $this->iuserinfo !== null || $this->ihost !== null || $this->port !== null;
+               if ($this->ipath !== '' &&
+                       (
+                               $isauthority && (
+                                       $this->ipath[0] !== '/' ||
+                                       substr($this->ipath, 0, 2) === '//'
+                               ) ||
+                               (
+                                       $this->scheme === null &&
+                                       !$isauthority &&
+                                       strpos($this->ipath, ':') !== false &&
+                                       (strpos($this->ipath, '/') === false ? true : strpos($this->ipath, ':') < strpos($this->ipath, '/'))
+                               )
+                       )
+               ) {
+                       return false;
+               }
+
+               return true;
+       }
+
+       /**
+        * Set the entire IRI. Returns true on success, false on failure (if there
+        * are any invalid characters).
+        *
+        * @param string $iri
+        * @return bool
+        */
+       protected function set_iri($iri) {
+               static $cache;
+               if (!$cache) {
+                       $cache = array();
+               }
+
+               if ($iri === null) {
+                       return true;
+               }
+               if (isset($cache[$iri])) {
+                       list($this->scheme,
+                                $this->iuserinfo,
+                                $this->ihost,
+                                $this->port,
+                                $this->ipath,
+                                $this->iquery,
+                                $this->ifragment,
+                                $return) = $cache[$iri];
+                       return $return;
+               }
+
+               $parsed = $this->parse_iri((string) $iri);
+
+               $return = $this->set_scheme($parsed['scheme'])
+                       && $this->set_authority($parsed['authority'])
+                       && $this->set_path($parsed['path'])
+                       && $this->set_query($parsed['query'])
+                       && $this->set_fragment($parsed['fragment']);
+
+               $cache[$iri] = array($this->scheme,
+                                                        $this->iuserinfo,
+                                                        $this->ihost,
+                                                        $this->port,
+                                                        $this->ipath,
+                                                        $this->iquery,
+                                                        $this->ifragment,
+                                                        $return);
+               return $return;
+       }
+
+       /**
+        * Set the scheme. Returns true on success, false on failure (if there are
+        * any invalid characters).
+        *
+        * @param string $scheme
+        * @return bool
+        */
+       protected function set_scheme($scheme) {
+               if ($scheme === null) {
+                       $this->scheme = null;
+               }
+               elseif (!preg_match('/^[A-Za-z][0-9A-Za-z+\-.]*$/', $scheme)) {
+                       $this->scheme = null;
+                       return false;
+               }
+               else {
+                       $this->scheme = strtolower($scheme);
+               }
+               return true;
+       }
+
+       /**
+        * Set the authority. Returns true on success, false on failure (if there are
+        * any invalid characters).
+        *
+        * @param string $authority
+        * @return bool
+        */
+       protected function set_authority($authority) {
+               static $cache;
+               if (!$cache) {
+                       $cache = array();
+               }
+
+               if ($authority === null) {
+                       $this->iuserinfo = null;
+                       $this->ihost = null;
+                       $this->port = null;
+                       return true;
+               }
+               if (isset($cache[$authority])) {
+                       list($this->iuserinfo,
+                                $this->ihost,
+                                $this->port,
+                                $return) = $cache[$authority];
+
+                       return $return;
+               }
+
+               $remaining = $authority;
+               if (($iuserinfo_end = strrpos($remaining, '@')) !== false) {
+                       $iuserinfo = substr($remaining, 0, $iuserinfo_end);
+                       $remaining = substr($remaining, $iuserinfo_end + 1);
+               }
+               else {
+                       $iuserinfo = null;
+               }
+               if (($port_start = strpos($remaining, ':', strpos($remaining, ']'))) !== false) {
+                       $port = substr($remaining, $port_start + 1);
+                       if ($port === false || $port === '') {
+                               $port = null;
+                       }
+                       $remaining = substr($remaining, 0, $port_start);
+               }
+               else {
+                       $port = null;
+               }
+
+               $return = $this->set_userinfo($iuserinfo) &&
+                                 $this->set_host($remaining) &&
+                                 $this->set_port($port);
+
+               $cache[$authority] = array($this->iuserinfo,
+                                                                  $this->ihost,
+                                                                  $this->port,
+                                                                  $return);
+
+               return $return;
+       }
+
+       /**
+        * Set the iuserinfo.
+        *
+        * @param string $iuserinfo
+        * @return bool
+        */
+       protected function set_userinfo($iuserinfo) {
+               if ($iuserinfo === null) {
+                       $this->iuserinfo = null;
+               }
+               else {
+                       $this->iuserinfo = $this->replace_invalid_with_pct_encoding($iuserinfo, '!$&\'()*+,;=:');
+                       $this->scheme_normalization();
+               }
+
+               return true;
+       }
+
+       /**
+        * Set the ihost. Returns true on success, false on failure (if there are
+        * any invalid characters).
+        *
+        * @param string $ihost
+        * @return bool
+        */
+       protected function set_host($ihost) {
+               if ($ihost === null) {
+                       $this->ihost = null;
+                       return true;
+               }
+               if (substr($ihost, 0, 1) === '[' && substr($ihost, -1) === ']') {
+                       if (Requests_IPv6::check_ipv6(substr($ihost, 1, -1))) {
+                               $this->ihost = '[' . Requests_IPv6::compress(substr($ihost, 1, -1)) . ']';
+                       }
+                       else {
+                               $this->ihost = null;
+                               return false;
+                       }
+               }
+               else {
+                       $ihost = $this->replace_invalid_with_pct_encoding($ihost, '!$&\'()*+,;=');
+
+                       // Lowercase, but ignore pct-encoded sections (as they should
+                       // remain uppercase). This must be done after the previous step
+                       // as that can add unescaped characters.
+                       $position = 0;
+                       $strlen = strlen($ihost);
+                       while (($position += strcspn($ihost, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ%', $position)) < $strlen) {
+                               if ($ihost[$position] === '%') {
+                                       $position += 3;
+                               }
+                               else {
+                                       $ihost[$position] = strtolower($ihost[$position]);
+                                       $position++;
+                               }
+                       }
+
+                       $this->ihost = $ihost;
+               }
+
+               $this->scheme_normalization();
+
+               return true;
+       }
+
+       /**
+        * Set the port. Returns true on success, false on failure (if there are
+        * any invalid characters).
+        *
+        * @param string $port
+        * @return bool
+        */
+       protected function set_port($port) {
+               if ($port === null) {
+                       $this->port = null;
+                       return true;
+               }
+
+               if (strspn($port, '0123456789') === strlen($port)) {
+                       $this->port = (int) $port;
+                       $this->scheme_normalization();
+                       return true;
+               }
+
+               $this->port = null;
+               return false;
+       }
+
+       /**
+        * Set the ipath.
+        *
+        * @param string $ipath
+        * @return bool
+        */
+       protected function set_path($ipath) {
+               static $cache;
+               if (!$cache) {
+                       $cache = array();
+               }
+
+               $ipath = (string) $ipath;
+
+               if (isset($cache[$ipath])) {
+                       $this->ipath = $cache[$ipath][(int) ($this->scheme !== null)];
+               }
+               else {
+                       $valid = $this->replace_invalid_with_pct_encoding($ipath, '!$&\'()*+,;=@:/');
+                       $removed = $this->remove_dot_segments($valid);
+
+                       $cache[$ipath] = array($valid, $removed);
+                       $this->ipath = ($this->scheme !== null) ? $removed : $valid;
+               }
+               $this->scheme_normalization();
+               return true;
+       }
+
+       /**
+        * Set the iquery.
+        *
+        * @param string $iquery
+        * @return bool
+        */
+       protected function set_query($iquery) {
+               if ($iquery === null) {
+                       $this->iquery = null;
+               }
+               else {
+                       $this->iquery = $this->replace_invalid_with_pct_encoding($iquery, '!$&\'()*+,;=:@/?', true);
+                       $this->scheme_normalization();
+               }
+               return true;
+       }
+
+       /**
+        * Set the ifragment.
+        *
+        * @param string $ifragment
+        * @return bool
+        */
+       protected function set_fragment($ifragment) {
+               if ($ifragment === null) {
+                       $this->ifragment = null;
+               }
+               else {
+                       $this->ifragment = $this->replace_invalid_with_pct_encoding($ifragment, '!$&\'()*+,;=:@/?');
+                       $this->scheme_normalization();
+               }
+               return true;
+       }
+
+       /**
+        * Convert an IRI to a URI (or parts thereof)
+        *
+        * @param string|bool IRI to convert (or false from {@see get_iri})
+        * @return string|false URI if IRI is valid, false otherwise.
+        */
+       protected function to_uri($string) {
+               if (!is_string($string)) {
+                       return false;
+               }
+
+               static $non_ascii;
+               if (!$non_ascii) {
+                       $non_ascii = implode('', range("\x80", "\xFF"));
+               }
+
+               $position = 0;
+               $strlen = strlen($string);
+               while (($position += strcspn($string, $non_ascii, $position)) < $strlen) {
+                       $string = substr_replace($string, sprintf('%%%02X', ord($string[$position])), $position, 1);
+                       $position += 3;
+                       $strlen += 2;
+               }
+
+               return $string;
+       }
+
+       /**
+        * Get the complete IRI
+        *
+        * @return string
+        */
+       protected function get_iri() {
+               if (!$this->is_valid()) {
+                       return false;
+               }
+
+               $iri = '';
+               if ($this->scheme !== null) {
+                       $iri .= $this->scheme . ':';
+               }
+               if (($iauthority = $this->get_iauthority()) !== null) {
+                       $iri .= '//' . $iauthority;
+               }
+               $iri .= $this->ipath;
+               if ($this->iquery !== null) {
+                       $iri .= '?' . $this->iquery;
+               }
+               if ($this->ifragment !== null) {
+                       $iri .= '#' . $this->ifragment;
+               }
+
+               return $iri;
+       }
+
+       /**
+        * Get the complete URI
+        *
+        * @return string
+        */
+       protected function get_uri() {
+               return $this->to_uri($this->get_iri());
+       }
+
+       /**
+        * Get the complete iauthority
+        *
+        * @return string
+        */
+       protected function get_iauthority() {
+               if ($this->iuserinfo === null && $this->ihost === null && $this->port === null) {
+                       return null;
+               }
+
+               $iauthority = '';
+               if ($this->iuserinfo !== null) {
+                       $iauthority .= $this->iuserinfo . '@';
+               }
+               if ($this->ihost !== null) {
+                       $iauthority .= $this->ihost;
+               }
+               if ($this->port !== null) {
+                       $iauthority .= ':' . $this->port;
+               }
+               return $iauthority;
+       }
+
+       /**
+        * Get the complete authority
+        *
+        * @return string
+        */
+       protected function get_authority() {
+               $iauthority = $this->get_iauthority();
+               if (is_string($iauthority)) {
+                       return $this->to_uri($iauthority);
+               }
+               else {
+                       return $iauthority;
+               }
+       }
+}
diff --git a/wp-includes/Requests/Proxy.php b/wp-includes/Requests/Proxy.php
new file mode 100644 (file)
index 0000000..ac7c1d6
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Proxy connection interface
+ *
+ * @package Requests
+ * @subpackage Proxy
+ * @since 1.6
+ */
+
+/**
+ * Proxy connection interface
+ *
+ * Implement this interface to handle proxy settings and authentication
+ *
+ * Parameters should be passed via the constructor where possible, as this
+ * makes it much easier for users to use your provider.
+ *
+ * @see Requests_Hooks
+ * @package Requests
+ * @subpackage Proxy
+ * @since 1.6
+ */
+interface Requests_Proxy {
+       /**
+        * Register hooks as needed
+        *
+        * This method is called in {@see Requests::request} when the user has set
+        * an instance as the 'auth' option. Use this callback to register all the
+        * hooks you'll need.
+        *
+        * @see Requests_Hooks::register
+        * @param Requests_Hooks $hooks Hook system
+        */
+       public function register(Requests_Hooks &$hooks);
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Proxy/HTTP.php b/wp-includes/Requests/Proxy/HTTP.php
new file mode 100644 (file)
index 0000000..6b4aba8
--- /dev/null
@@ -0,0 +1,151 @@
+<?php
+/**
+ * HTTP Proxy connection interface
+ *
+ * @package Requests
+ * @subpackage Proxy
+ * @since 1.6
+ */
+
+/**
+ * HTTP Proxy connection interface
+ *
+ * Provides a handler for connection via an HTTP proxy
+ *
+ * @package Requests
+ * @subpackage Proxy
+ * @since 1.6
+ */
+class Requests_Proxy_HTTP implements Requests_Proxy {
+       /**
+        * Proxy host and port
+        *
+        * Notation: "host:port" (eg 127.0.0.1:8080 or someproxy.com:3128)
+        *
+        * @var string
+        */
+       public $proxy;
+
+       /**
+        * Username
+        *
+        * @var string
+        */
+       public $user;
+
+       /**
+        * Password
+        *
+        * @var string
+        */
+       public $pass;
+
+       /**
+        * Do we need to authenticate? (ie username & password have been provided)
+        *
+        * @var boolean
+        */
+       public $use_authentication;
+
+       /**
+        * Constructor
+        *
+        * @since 1.6
+        * @throws Requests_Exception On incorrect number of arguments (`authbasicbadargs`)
+        * @param array|null $args Array of user and password. Must have exactly two elements
+        */
+       public function __construct($args = null) {
+               if (is_string($args)) {
+                       $this->proxy = $args;
+               }
+               elseif (is_array($args)) {
+                       if (count($args) == 1) {
+                               list($this->proxy) = $args;
+                       }
+                       elseif (count($args) == 3) {
+                               list($this->proxy, $this->user, $this->pass) = $args;
+                               $this->use_authentication = true;
+                       }
+                       else {
+                               throw new Requests_Exception('Invalid number of arguments', 'proxyhttpbadargs');
+                       }
+               }
+       }
+
+       /**
+        * Register the necessary callbacks
+        *
+        * @since 1.6
+        * @see curl_before_send
+        * @see fsockopen_remote_socket
+        * @see fsockopen_remote_host_path
+        * @see fsockopen_header
+        * @param Requests_Hooks $hooks Hook system
+        */
+       public function register(Requests_Hooks &$hooks) {
+               $hooks->register('curl.before_send', array(&$this, 'curl_before_send'));
+
+               $hooks->register('fsockopen.remote_socket', array(&$this, 'fsockopen_remote_socket'));
+               $hooks->register('fsockopen.remote_host_path', array(&$this, 'fsockopen_remote_host_path'));
+               if ($this->use_authentication) {
+                       $hooks->register('fsockopen.after_headers', array(&$this, 'fsockopen_header'));
+               }
+       }
+
+       /**
+        * Set cURL parameters before the data is sent
+        *
+        * @since 1.6
+        * @param resource $handle cURL resource
+        */
+       public function curl_before_send(&$handle) {
+               curl_setopt($handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
+               curl_setopt($handle, CURLOPT_PROXY, $this->proxy);
+
+               if ($this->use_authentication) {
+                       curl_setopt($handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
+                       curl_setopt($handle, CURLOPT_PROXYUSERPWD, $this->get_auth_string());
+               }
+       }
+
+       /**
+        * Alter remote socket information before opening socket connection
+        *
+        * @since 1.6
+        * @param string $remote_socket Socket connection string
+        */
+       public function fsockopen_remote_socket(&$remote_socket) {
+               $remote_socket = $this->proxy;
+       }
+
+       /**
+        * Alter remote path before getting stream data
+        *
+        * @since 1.6
+        * @param string $path Path to send in HTTP request string ("GET ...")
+        * @param string $url Full URL we're requesting
+        */
+       public function fsockopen_remote_host_path(&$path, $url) {
+               $path = $url;
+       }
+
+       /**
+        * Add extra headers to the request before sending
+        *
+        * @since 1.6
+        * @param string $out HTTP header string
+        */
+       public function fsockopen_header(&$out) {
+               $out .= sprintf("Proxy-Authorization: Basic %s\r\n", base64_encode($this->get_auth_string()));
+       }
+
+       /**
+        * Get the authentication string (user:pass)
+        *
+        * @since 1.6
+        * @return string
+        */
+       public function get_auth_string() {
+               return $this->user . ':' . $this->pass;
+       }
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Response.php b/wp-includes/Requests/Response.php
new file mode 100644 (file)
index 0000000..3152fb6
--- /dev/null
@@ -0,0 +1,121 @@
+<?php
+/**
+ * HTTP response class
+ *
+ * Contains a response from Requests::request()
+ * @package Requests
+ */
+
+/**
+ * HTTP response class
+ *
+ * Contains a response from Requests::request()
+ * @package Requests
+ */
+class Requests_Response {
+       /**
+        * Constructor
+        */
+       public function __construct() {
+               $this->headers = new Requests_Response_Headers();
+               $this->cookies = new Requests_Cookie_Jar();
+       }
+
+       /**
+        * Response body
+        *
+        * @var string
+        */
+       public $body = '';
+
+       /**
+        * Raw HTTP data from the transport
+        *
+        * @var string
+        */
+       public $raw = '';
+
+       /**
+        * Headers, as an associative array
+        *
+        * @var Requests_Response_Headers Array-like object representing headers
+        */
+       public $headers = array();
+
+       /**
+        * Status code, false if non-blocking
+        *
+        * @var integer|boolean
+        */
+       public $status_code = false;
+
+       /**
+        * Protocol version, false if non-blocking
+        * @var float|boolean
+        */
+       public $protocol_version = false;
+
+       /**
+        * Whether the request succeeded or not
+        *
+        * @var boolean
+        */
+       public $success = false;
+
+       /**
+        * Number of redirects the request used
+        *
+        * @var integer
+        */
+       public $redirects = 0;
+
+       /**
+        * URL requested
+        *
+        * @var string
+        */
+       public $url = '';
+
+       /**
+        * Previous requests (from redirects)
+        *
+        * @var array Array of Requests_Response objects
+        */
+       public $history = array();
+
+       /**
+        * Cookies from the request
+        *
+        * @var Requests_Cookie_Jar Array-like object representing a cookie jar
+        */
+       public $cookies = array();
+
+       /**
+        * Is the response a redirect?
+        *
+        * @return boolean True if redirect (3xx status), false if not.
+        */
+       public function is_redirect() {
+               $code = $this->status_code;
+               return in_array($code, array(300, 301, 302, 303, 307)) || $code > 307 && $code < 400;
+       }
+
+       /**
+        * Throws an exception if the request was not successful
+        *
+        * @throws Requests_Exception If `$allow_redirects` is false, and code is 3xx (`response.no_redirects`)
+        * @throws Requests_Exception_HTTP On non-successful status code. Exception class corresponds to code (e.g. {@see Requests_Exception_HTTP_404})
+        * @param boolean $allow_redirects Set to false to throw on a 3xx as well
+        */
+       public function throw_for_status($allow_redirects = true) {
+               if ($this->is_redirect()) {
+                       if (!$allow_redirects) {
+                               throw new Requests_Exception('Redirection not allowed', 'response.no_redirects', $this);
+                       }
+               }
+               elseif (!$this->success) {
+                       $exception = Requests_Exception_HTTP::get_class($this->status_code);
+                       throw new $exception(null, $this);
+               }
+       }
+}
diff --git a/wp-includes/Requests/Response/Headers.php b/wp-includes/Requests/Response/Headers.php
new file mode 100644 (file)
index 0000000..cc6a208
--- /dev/null
@@ -0,0 +1,98 @@
+<?php
+/**
+ * Case-insensitive dictionary, suitable for HTTP headers
+ *
+ * @package Requests
+ */
+
+/**
+ * Case-insensitive dictionary, suitable for HTTP headers
+ *
+ * @package Requests
+ */
+class Requests_Response_Headers extends Requests_Utility_CaseInsensitiveDictionary {
+       /**
+        * Get the given header
+        *
+        * Unlike {@see self::getValues()}, this returns a string. If there are
+        * multiple values, it concatenates them with a comma as per RFC2616.
+        *
+        * Avoid using this where commas may be used unquoted in values, such as
+        * Set-Cookie headers.
+        *
+        * @param string $key
+        * @return string Header value
+        */
+       public function offsetGet($key) {
+               $key = strtolower($key);
+               if (!isset($this->data[$key])) {
+                       return null;
+               }
+
+               return $this->flatten($this->data[$key]);
+       }
+
+       /**
+        * Set the given item
+        *
+        * @throws Requests_Exception On attempting to use dictionary as list (`invalidset`)
+        *
+        * @param string $key Item name
+        * @param string $value Item value
+        */
+       public function offsetSet($key, $value) {
+               if ($key === null) {
+                       throw new Requests_Exception('Object is a dictionary, not a list', 'invalidset');
+               }
+
+               $key = strtolower($key);
+
+               if (!isset($this->data[$key])) {
+                       $this->data[$key] = array();
+               }
+
+               $this->data[$key][] = $value;
+       }
+
+       /**
+        * Get all values for a given header
+        *
+        * @param string $key
+        * @return array Header values
+        */
+       public function getValues($key) {
+               $key = strtolower($key);
+               if (!isset($this->data[$key])) {
+                       return null;
+               }
+
+               return $this->data[$key];
+       }
+
+       /**
+        * Flattens a value into a string
+        *
+        * Converts an array into a string by imploding values with a comma, as per
+        * RFC2616's rules for folding headers.
+        *
+        * @param string|array $value Value to flatten
+        * @return string Flattened value
+        */
+       public function flatten($value) {
+               if (is_array($value)) {
+                       $value = implode(',', $value);
+               }
+
+               return $value;
+       }
+
+       /**
+        * Get an iterator for the data
+        *
+        * Converts the internal
+        * @return ArrayIterator
+        */
+       public function getIterator() {
+               return new Requests_Utility_FilteredIterator($this->data, array($this, 'flatten'));
+       }
+}
diff --git a/wp-includes/Requests/SSL.php b/wp-includes/Requests/SSL.php
new file mode 100644 (file)
index 0000000..2b03768
--- /dev/null
@@ -0,0 +1,152 @@
+<?php
+/**
+ * SSL utilities for Requests
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+
+/**
+ * SSL utilities for Requests
+ *
+ * Collection of utilities for working with and verifying SSL certificates.
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+class Requests_SSL {
+       /**
+        * Verify the certificate against common name and subject alternative names
+        *
+        * Unfortunately, PHP doesn't check the certificate against the alternative
+        * names, leading things like 'https://www.github.com/' to be invalid.
+        * Instead
+        *
+        * @see https://tools.ietf.org/html/rfc2818#section-3.1 RFC2818, Section 3.1
+        *
+        * @throws Requests_Exception On not obtaining a match for the host (`fsockopen.ssl.no_match`)
+        * @param string $host Host name to verify against
+        * @param array $cert Certificate data from openssl_x509_parse()
+        * @return bool
+        */
+       public static function verify_certificate($host, $cert) {
+               // Calculate the valid wildcard match if the host is not an IP address
+               $parts = explode('.', $host);
+               if (ip2long($host) === false) {
+                       $parts[0] = '*';
+               }
+               $wildcard = implode('.', $parts);
+
+               $has_dns_alt = false;
+
+               // Check the subjectAltName
+               if (!empty($cert['extensions']) && !empty($cert['extensions']['subjectAltName'])) {
+                       $altnames = explode(',', $cert['extensions']['subjectAltName']);
+                       foreach ($altnames as $altname) {
+                               $altname = trim($altname);
+                               if (strpos($altname, 'DNS:') !== 0) {
+                                       continue;
+                               }
+
+                               $has_dns_alt = true;
+
+                               // Strip the 'DNS:' prefix and trim whitespace
+                               $altname = trim(substr($altname, 4));
+
+                               // Check for a match
+                               if (self::match_domain($host, $altname) === true) {
+                                       return true;
+                               }
+                       }
+               }
+
+               // Fall back to checking the common name if we didn't get any dNSName
+               // alt names, as per RFC2818
+               if (!$has_dns_alt && !empty($cert['subject']['CN'])) {
+                       // Check for a match
+                       if (self::match_domain($host, $cert['subject']['CN']) === true) {
+                               return true;
+                       }
+               }
+
+               return false;
+       }
+
+       /**
+        * Verify that a reference name is valid
+        *
+        * Verifies a dNSName for HTTPS usage, (almost) as per Firefox's rules:
+        * - Wildcards can only occur in a name with more than 3 components
+        * - Wildcards can only occur as the last character in the first
+        *   component
+        * - Wildcards may be preceded by additional characters
+        *
+        * We modify these rules to be a bit stricter and only allow the wildcard
+        * character to be the full first component; that is, with the exclusion of
+        * the third rule.
+        *
+        * @param string $reference Reference dNSName
+        * @return boolean Is the name valid?
+        */
+       public static function verify_reference_name($reference) {
+               $parts = explode('.', $reference);
+
+               // Check the first part of the name
+               $first = array_shift($parts);
+
+               if (strpos($first, '*') !== false) {
+                       // Check that the wildcard is the full part
+                       if ($first !== '*') {
+                               return false;
+                       }
+
+                       // Check that we have at least 3 components (including first)
+                       if (count($parts) < 2) {
+                               return false;
+                       }
+               }
+
+               // Check the remaining parts
+               foreach ($parts as $part) {
+                       if (strpos($part, '*') !== false) {
+                               return false;
+                       }
+               }
+
+               // Nothing found, verified!
+               return true;
+       }
+
+       /**
+        * Match a hostname against a dNSName reference
+        *
+        * @param string $host Requested host
+        * @param string $reference dNSName to match against
+        * @return boolean Does the domain match?
+        */
+       public static function match_domain($host, $reference) {
+               // Check if the reference is blacklisted first
+               if (self::verify_reference_name($reference) !== true) {
+                       return false;
+               }
+
+               // Check for a direct match
+               if ($host === $reference) {
+                       return true;
+               }
+
+               // Calculate the valid wildcard match if the host is not an IP address
+               // Also validates that the host has 3 parts or more, as per Firefox's
+               // ruleset.
+               if (ip2long($host) === false) {
+                       $parts = explode('.', $host);
+                       $parts[0] = '*';
+                       $wildcard = implode('.', $parts);
+                       if ($wildcard === $reference) {
+                               return true;
+                       }
+               }
+
+               return false;
+       }
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Session.php b/wp-includes/Requests/Session.php
new file mode 100644 (file)
index 0000000..af14bbe
--- /dev/null
@@ -0,0 +1,266 @@
+<?php
+/**
+ * Session handler for persistent requests and default parameters
+ *
+ * @package Requests
+ * @subpackage Session Handler
+ */
+
+/**
+ * Session handler for persistent requests and default parameters
+ *
+ * Allows various options to be set as default values, and merges both the
+ * options and URL properties together. A base URL can be set for all requests,
+ * with all subrequests resolved from this. Base options can be set (including
+ * a shared cookie jar), then overridden for individual requests.
+ *
+ * @package Requests
+ * @subpackage Session Handler
+ */
+class Requests_Session {
+       /**
+        * Base URL for requests
+        *
+        * URLs will be made absolute using this as the base
+        * @var string|null
+        */
+       public $url = null;
+
+       /**
+        * Base headers for requests
+        * @var array
+        */
+       public $headers = array();
+
+       /**
+        * Base data for requests
+        *
+        * If both the base data and the per-request data are arrays, the data will
+        * be merged before sending the request.
+        *
+        * @var array
+        */
+       public $data = array();
+
+       /**
+        * Base options for requests
+        *
+        * The base options are merged with the per-request data for each request.
+        * The only default option is a shared cookie jar between requests.
+        *
+        * Values here can also be set directly via properties on the Session
+        * object, e.g. `$session->useragent = 'X';`
+        *
+        * @var array
+        */
+       public $options = array();
+
+       /**
+        * Create a new session
+        *
+        * @param string|null $url Base URL for requests
+        * @param array $headers Default headers for requests
+        * @param array $data Default data for requests
+        * @param array $options Default options for requests
+        */
+       public function __construct($url = null, $headers = array(), $data = array(), $options = array()) {
+               $this->url = $url;
+               $this->headers = $headers;
+               $this->data = $data;
+               $this->options = $options;
+
+               if (empty($this->options['cookies'])) {
+                       $this->options['cookies'] = new Requests_Cookie_Jar();
+               }
+       }
+
+       /**
+        * Get a property's value
+        *
+        * @param string $key Property key
+        * @return mixed|null Property value, null if none found
+        */
+       public function __get($key) {
+               if (isset($this->options[$key])) {
+                       return $this->options[$key];
+               }
+
+               return null;
+       }
+
+       /**
+        * Set a property's value
+        *
+        * @param string $key Property key
+        * @param mixed $value Property value
+        */
+       public function __set($key, $value) {
+               $this->options[$key] = $value;
+       }
+
+       /**
+        * Remove a property's value
+        *
+        * @param string $key Property key
+        */
+       public function __isset($key) {
+               return isset($this->options[$key]);
+       }
+
+       /**
+        * Remove a property's value
+        *
+        * @param string $key Property key
+        */
+       public function __unset($key) {
+               if (isset($this->options[$key])) {
+                       unset($this->options[$key]);
+               }
+       }
+
+       /**#@+
+        * @see request()
+        * @param string $url
+        * @param array $headers
+        * @param array $options
+        * @return Requests_Response
+        */
+       /**
+        * Send a GET request
+        */
+       public function get($url, $headers = array(), $options = array()) {
+               return $this->request($url, $headers, null, Requests::GET, $options);
+       }
+
+       /**
+        * Send a HEAD request
+        */
+       public function head($url, $headers = array(), $options = array()) {
+               return $this->request($url, $headers, null, Requests::HEAD, $options);
+       }
+
+       /**
+        * Send a DELETE request
+        */
+       public function delete($url, $headers = array(), $options = array()) {
+               return $this->request($url, $headers, null, Requests::DELETE, $options);
+       }
+       /**#@-*/
+
+       /**#@+
+        * @see request()
+        * @param string $url
+        * @param array $headers
+        * @param array $data
+        * @param array $options
+        * @return Requests_Response
+        */
+       /**
+        * Send a POST request
+        */
+       public function post($url, $headers = array(), $data = array(), $options = array()) {
+               return $this->request($url, $headers, $data, Requests::POST, $options);
+       }
+
+       /**
+        * Send a PUT request
+        */
+       public function put($url, $headers = array(), $data = array(), $options = array()) {
+               return $this->request($url, $headers, $data, Requests::PUT, $options);
+       }
+
+       /**
+        * Send a PATCH request
+        *
+        * Note: Unlike {@see post} and {@see put}, `$headers` is required, as the
+        * specification recommends that should send an ETag
+        *
+        * @link https://tools.ietf.org/html/rfc5789
+        */
+       public function patch($url, $headers, $data = array(), $options = array()) {
+               return $this->request($url, $headers, $data, Requests::PATCH, $options);
+       }
+       /**#@-*/
+
+       /**
+        * Main interface for HTTP requests
+        *
+        * This method initiates a request and sends it via a transport before
+        * parsing.
+        *
+        * @see Requests::request()
+        *
+        * @throws Requests_Exception On invalid URLs (`nonhttp`)
+        *
+        * @param string $url URL to request
+        * @param array $headers Extra headers to send with the request
+        * @param array|null $data Data to send either as a query string for GET/HEAD requests, or in the body for POST requests
+        * @param string $type HTTP request type (use Requests constants)
+        * @param array $options Options for the request (see {@see Requests::request})
+        * @return Requests_Response
+        */
+       public function request($url, $headers = array(), $data = array(), $type = Requests::GET, $options = array()) {
+               $request = $this->merge_request(compact('url', 'headers', 'data', 'options'));
+
+               return Requests::request($request['url'], $request['headers'], $request['data'], $type, $request['options']);
+       }
+
+       /**
+        * Send multiple HTTP requests simultaneously
+        *
+        * @see Requests::request_multiple()
+        *
+        * @param array $requests Requests data (see {@see Requests::request_multiple})
+        * @param array $options Global and default options (see {@see Requests::request})
+        * @return array Responses (either Requests_Response or a Requests_Exception object)
+        */
+       public function request_multiple($requests, $options = array()) {
+               foreach ($requests as $key => $request) {
+                       $requests[$key] = $this->merge_request($request, false);
+               }
+
+               $options = array_merge($this->options, $options);
+
+               // Disallow forcing the type, as that's a per request setting
+               unset($options['type']);
+
+               return Requests::request_multiple($requests, $options);
+       }
+
+       /**
+        * Merge a request's data with the default data
+        *
+        * @param array $request Request data (same form as {@see request_multiple})
+        * @param boolean $merge_options Should we merge options as well?
+        * @return array Request data
+        */
+       protected function merge_request($request, $merge_options = true) {
+               if ($this->url !== null) {
+                       $request['url'] = Requests_IRI::absolutize($this->url, $request['url']);
+                       $request['url'] = $request['url']->uri;
+               }
+
+               if (empty($request['headers'])) {
+                       $request['headers'] = array();
+               }
+               $request['headers'] = array_merge($this->headers, $request['headers']);
+
+               if (empty($request['data'])) {
+                       if (is_array($this->data)) {
+                               $request['data'] = $this->data;
+                       }
+               }
+               elseif (is_array($request['data']) && is_array($this->data)) {
+                       $request['data'] = array_merge($this->data, $request['data']);
+               }
+
+               if ($merge_options !== false) {
+                       $request['options'] = array_merge($this->options, $request['options']);
+
+                       // Disallow forcing the type, as that's a per request setting
+                       unset($request['options']['type']);
+               }
+
+               return $request;
+       }
+}
diff --git a/wp-includes/Requests/Transport.php b/wp-includes/Requests/Transport.php
new file mode 100644 (file)
index 0000000..7e4a262
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Base HTTP transport
+ *
+ * @package Requests
+ * @subpackage Transport
+ */
+
+/**
+ * Base HTTP transport
+ *
+ * @package Requests
+ * @subpackage Transport
+ */
+interface Requests_Transport {
+       /**
+        * Perform a request
+        *
+        * @param string $url URL to request
+        * @param array $headers Associative array of request headers
+        * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
+        * @param array $options Request options, see {@see Requests::response()} for documentation
+        * @return string Raw HTTP result
+        */
+       public function request($url, $headers = array(), $data = array(), $options = array());
+
+       /**
+        * Send multiple requests simultaneously
+        *
+        * @param array $requests Request data (array of 'url', 'headers', 'data', 'options') as per {@see Requests_Transport::request}
+        * @param array $options Global options, see {@see Requests::response()} for documentation
+        * @return array Array of Requests_Response objects (may contain Requests_Exception or string responses as well)
+        */
+       public function request_multiple($requests, $options);
+
+       /**
+        * Self-test whether the transport can be used
+        * @return bool
+        */
+       public static function test();
+}
\ No newline at end of file
diff --git a/wp-includes/Requests/Transport/cURL.php b/wp-includes/Requests/Transport/cURL.php
new file mode 100644 (file)
index 0000000..453f73b
--- /dev/null
@@ -0,0 +1,541 @@
+<?php
+/**
+ * cURL HTTP transport
+ *
+ * @package Requests
+ * @subpackage Transport
+ */
+
+/**
+ * cURL HTTP transport
+ *
+ * @package Requests
+ * @subpackage Transport
+ */
+class Requests_Transport_cURL implements Requests_Transport {
+       const CURL_7_10_5 = 0x070A05;
+       const CURL_7_16_2 = 0x071002;
+
+       /**
+        * Raw HTTP data
+        *
+        * @var string
+        */
+       public $headers = '';
+
+       /**
+        * Raw body data
+        *
+        * @var string
+        */
+       public $response_data = '';
+
+       /**
+        * Information on the current request
+        *
+        * @var array cURL information array, see {@see https://secure.php.net/curl_getinfo}
+        */
+       public $info;
+
+       /**
+        * Version string
+        *
+        * @var long
+        */
+       public $version;
+
+       /**
+        * cURL handle
+        *
+        * @var resource
+        */
+       protected $handle;
+
+       /**
+        * Hook dispatcher instance
+        *
+        * @var Requests_Hooks
+        */
+       protected $hooks;
+
+       /**
+        * Have we finished the headers yet?
+        *
+        * @var boolean
+        */
+       protected $done_headers = false;
+
+       /**
+        * If streaming to a file, keep the file pointer
+        *
+        * @var resource
+        */
+       protected $stream_handle;
+
+       /**
+        * How many bytes are in the response body?
+        *
+        * @var int
+        */
+       protected $response_bytes;
+
+       /**
+        * What's the maximum number of bytes we should keep?
+        *
+        * @var int|bool Byte count, or false if no limit.
+        */
+       protected $response_byte_limit;
+
+       /**
+        * Constructor
+        */
+       public function __construct() {
+               $curl = curl_version();
+               $this->version = $curl['version_number'];
+               $this->handle = curl_init();
+
+               curl_setopt($this->handle, CURLOPT_HEADER, false);
+               curl_setopt($this->handle, CURLOPT_RETURNTRANSFER, 1);
+               if ($this->version >= self::CURL_7_10_5) {
+                       curl_setopt($this->handle, CURLOPT_ENCODING, '');
+               }
+               if (defined('CURLOPT_PROTOCOLS')) {
+                       curl_setopt($this->handle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
+               }
+               if (defined('CURLOPT_REDIR_PROTOCOLS')) {
+                       curl_setopt($this->handle, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
+               }
+       }
+
+       /**
+        * Destructor
+        */
+       public function __destruct() {
+               if (is_resource($this->handle)) {
+                       curl_close($this->handle);
+               }
+       }
+
+       /**
+        * Perform a request
+        *
+        * @throws Requests_Exception On a cURL error (`curlerror`)
+        *
+        * @param string $url URL to request
+        * @param array $headers Associative array of request headers
+        * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
+        * @param array $options Request options, see {@see Requests::response()} for documentation
+        * @return string Raw HTTP result
+        */
+       public function request($url, $headers = array(), $data = array(), $options = array()) {
+               $this->hooks = $options['hooks'];
+
+               $this->setup_handle($url, $headers, $data, $options);
+
+               $options['hooks']->dispatch('curl.before_send', array(&$this->handle));
+
+               if ($options['filename'] !== false) {
+                       $this->stream_handle = fopen($options['filename'], 'wb');
+               }
+
+               $this->response_data = '';
+               $this->response_bytes = 0;
+               $this->response_byte_limit = false;
+               if ($options['max_bytes'] !== false) {
+                       $this->response_byte_limit = $options['max_bytes'];
+               }
+
+               if (isset($options['verify'])) {
+                       if ($options['verify'] === false) {
+                               curl_setopt($this->handle, CURLOPT_SSL_VERIFYHOST, 0);
+                               curl_setopt($this->handle, CURLOPT_SSL_VERIFYPEER, 0);
+                       }
+                       elseif (is_string($options['verify'])) {
+                               curl_setopt($this->handle, CURLOPT_CAINFO, $options['verify']);
+                       }
+               }
+
+               if (isset($options['verifyname']) && $options['verifyname'] === false) {
+                       curl_setopt($this->handle, CURLOPT_SSL_VERIFYHOST, 0);
+               }
+
+               curl_exec($this->handle);
+               $response = $this->response_data;
+
+               $options['hooks']->dispatch('curl.after_send', array());
+
+               if (curl_errno($this->handle) === 23 || curl_errno($this->handle) === 61) {
+                       // Reset encoding and try again
+                       curl_setopt($this->handle, CURLOPT_ENCODING, 'none');
+
+                       $this->response_data = '';
+                       $this->response_bytes = 0;
+                       curl_exec($this->handle);
+                       $response = $this->response_data;
+               }
+
+               $this->process_response($response, $options);
+
+               // Need to remove the $this reference from the curl handle.
+               // Otherwise Requests_Transport_cURL wont be garbage collected and the curl_close() will never be called.
+               curl_setopt($this->handle, CURLOPT_HEADERFUNCTION, null);
+               curl_setopt($this->handle, CURLOPT_WRITEFUNCTION, null);
+
+               return $this->headers;
+       }
+
+       /**
+        * Send multiple requests simultaneously
+        *
+        * @param array $requests Request data
+        * @param array $options Global options
+        * @return array Array of Requests_Response objects (may contain Requests_Exception or string responses as well)
+        */
+       public function request_multiple($requests, $options) {
+               // If you're not requesting, we can't get any responses ¯\_(ツ)_/¯
+               if (empty($requests)) {
+                       return array();
+               }
+
+               $multihandle = curl_multi_init();
+               $subrequests = array();
+               $subhandles = array();
+
+               $class = get_class($this);
+               foreach ($requests as $id => $request) {
+                       $subrequests[$id] = new $class();
+                       $subhandles[$id] = $subrequests[$id]->get_subrequest_handle($request['url'], $request['headers'], $request['data'], $request['options']);
+                       $request['options']['hooks']->dispatch('curl.before_multi_add', array(&$subhandles[$id]));
+                       curl_multi_add_handle($multihandle, $subhandles[$id]);
+               }
+
+               $completed = 0;
+               $responses = array();
+
+               $request['options']['hooks']->dispatch('curl.before_multi_exec', array(&$multihandle));
+
+               do {
+                       $active = false;
+
+                       do {
+                               $status = curl_multi_exec($multihandle, $active);
+                       }
+                       while ($status === CURLM_CALL_MULTI_PERFORM);
+
+                       $to_process = array();
+
+                       // Read the information as needed
+                       while ($done = curl_multi_info_read($multihandle)) {
+                               $key = array_search($done['handle'], $subhandles, true);
+                               if (!isset($to_process[$key])) {
+                                       $to_process[$key] = $done;
+                               }
+                       }
+
+                       // Parse the finished requests before we start getting the new ones
+                       foreach ($to_process as $key => $done) {
+                               $options = $requests[$key]['options'];
+                               if (CURLE_OK !== $done['result']) {
+                                       //get error string for handle.
+                                       $reason = curl_error($done['handle']);
+                                       $exception = new Requests_Exception_Transport_cURL(
+                                                                       $reason,
+                                                                       Requests_Exception_Transport_cURL::EASY,
+                                                                       $done['handle'],
+                                                                       $done['result']
+                                                               );
+                                       $responses[$key] = $exception;
+                                       $options['hooks']->dispatch('transport.internal.parse_error', array(&$responses[$key], $requests[$key]));
+                               }
+                               else {
+                                       $responses[$key] = $subrequests[$key]->process_response($subrequests[$key]->response_data, $options);
+
+                                       $options['hooks']->dispatch('transport.internal.parse_response', array(&$responses[$key], $requests[$key]));
+                               }
+
+                               curl_multi_remove_handle($multihandle, $done['handle']);
+                               curl_close($done['handle']);
+
+                               if (!is_string($responses[$key])) {
+                                       $options['hooks']->dispatch('multiple.request.complete', array(&$responses[$key], $key));
+                               }
+                               $completed++;
+                       }
+               }
+               while ($active || $completed < count($subrequests));
+
+               $request['options']['hooks']->dispatch('curl.after_multi_exec', array(&$multihandle));
+
+               curl_multi_close($multihandle);
+
+               return $responses;
+       }
+
+       /**
+        * Get the cURL handle for use in a multi-request
+        *
+        * @param string $url URL to request
+        * @param array $headers Associative array of request headers
+        * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
+        * @param array $options Request options, see {@see Requests::response()} for documentation
+        * @return resource Subrequest's cURL handle
+        */
+       public function &get_subrequest_handle($url, $headers, $data, $options) {
+               $this->setup_handle($url, $headers, $data, $options);
+
+               if ($options['filename'] !== false) {
+                       $this->stream_handle = fopen($options['filename'], 'wb');
+               }
+
+               $this->response_data = '';
+               $this->response_bytes = 0;
+               $this->response_byte_limit = false;
+               if ($options['max_bytes'] !== false) {
+                       $this->response_byte_limit = $options['max_bytes'];
+               }
+               $this->hooks = $options['hooks'];
+
+               return $this->handle;
+       }
+
+       /**
+        * Setup the cURL handle for the given data
+        *
+        * @param string $url URL to request
+        * @param array $headers Associative array of request headers
+        * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
+        * @param array $options Request options, see {@see Requests::response()} for documentation
+        */
+       protected function setup_handle($url, $headers, $data, $options) {
+               $options['hooks']->dispatch('curl.before_request', array(&$this->handle));
+
+               // Force closing the connection for old versions of cURL (<7.22).
+               if ( ! isset( $headers['Connection'] ) ) {
+                       $headers['Connection'] = 'close';
+               }
+
+               $headers = Requests::flatten($headers);
+
+               if (!empty($data)) {
+                       $data_format = $options['data_format'];
+
+                       if ($data_format === 'query') {
+                               $url = self::format_get($url, $data);
+                               $data = '';
+                       }
+                       elseif (!is_string($data)) {
+                               $data = http_build_query($data, null, '&');
+                       }
+               }
+
+               switch ($options['type']) {
+                       case Requests::POST:
+                               curl_setopt($this->handle, CURLOPT_POST, true);
+                               curl_setopt($this->handle, CURLOPT_POSTFIELDS, $data);
+                               break;
+                       case Requests::HEAD:
+                               curl_setopt($this->handle, CURLOPT_CUSTOMREQUEST, $options['type']);
+                               curl_setopt($this->handle, CURLOPT_NOBODY, true);
+                               break;
+                       case Requests::TRACE:
+                               curl_setopt($this->handle, CURLOPT_CUSTOMREQUEST, $options['type']);
+                               break;
+                       case Requests::PATCH:
+                       case Requests::PUT:
+                       case Requests::DELETE:
+                       case Requests::OPTIONS:
+                       default:
+                               curl_setopt($this->handle, CURLOPT_CUSTOMREQUEST, $options['type']);
+                               if (!empty($data)) {
+                                       curl_setopt( $this->handle, CURLOPT_POSTFIELDS, $data );
+                               }
+               }
+
+               // cURL requires a minimum timeout of 1 second when using the system
+               // DNS resolver, as it uses `alarm()`, which is second resolution only.
+               // There's no way to detect which DNS resolver is being used from our
+               // end, so we need to round up regardless of the supplied timeout.
+               //
+               // https://github.com/curl/curl/blob/4f45240bc84a9aa648c8f7243be7b79e9f9323a5/lib/hostip.c#L606-L609
+               $timeout = max($options['timeout'], 1);
+
+               if (is_int($timeout) || $this->version < self::CURL_7_16_2) {
+                       curl_setopt($this->handle, CURLOPT_TIMEOUT, ceil($timeout));
+               }
+               else {
+                       curl_setopt($this->handle, CURLOPT_TIMEOUT_MS, round($timeout * 1000));
+               }
+
+               if (is_int($options['connect_timeout']) || $this->version < self::CURL_7_16_2) {
+                       curl_setopt($this->handle, CURLOPT_CONNECTTIMEOUT, ceil($options['connect_timeout']));
+               }
+               else {
+                       curl_setopt($this->handle, CURLOPT_CONNECTTIMEOUT_MS, round($options['connect_timeout'] * 1000));
+               }
+               curl_setopt($this->handle, CURLOPT_URL, $url);
+               curl_setopt($this->handle, CURLOPT_REFERER, $url);
+               curl_setopt($this->handle, CURLOPT_USERAGENT, $options['useragent']);
+               curl_setopt($this->handle, CURLOPT_HTTPHEADER, $headers);
+
+               if ($options['protocol_version'] === 1.1) {
+                       curl_setopt($this->handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
+               }
+               else {
+                       curl_setopt($this->handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
+               }
+
+               if (true === $options['blocking']) {
+                       curl_setopt($this->handle, CURLOPT_HEADERFUNCTION, array(&$this, 'stream_headers'));
+                       curl_setopt($this->handle, CURLOPT_WRITEFUNCTION, array(&$this, 'stream_body'));
+                       curl_setopt($this->handle, CURLOPT_BUFFERSIZE, Requests::BUFFER_SIZE);
+               }
+       }
+
+       /**
+        * Process a response
+        *
+        * @param string $response Response data from the body
+        * @param array $options Request options
+        * @return string HTTP response data including headers
+        */
+       public function process_response($response, $options) {
+               if ($options['blocking'] === false) {
+                       $fake_headers = '';
+                       $options['hooks']->dispatch('curl.after_request', array(&$fake_headers));
+                       return false;
+               }
+               if ($options['filename'] !== false) {
+                       fclose($this->stream_handle);
+                       $this->headers = trim($this->headers);
+               }
+               else {
+                       $this->headers .= $response;
+               }
+
+               if (curl_errno($this->handle)) {
+                       $error = sprintf(
+                               'cURL error %s: %s',
+                               curl_errno($this->handle),
+                               curl_error($this->handle)
+                       );
+                       throw new Requests_Exception($error, 'curlerror', $this->handle);
+               }
+               $this->info = curl_getinfo($this->handle);
+
+               $options['hooks']->dispatch('curl.after_request', array(&$this->headers, &$this->info));
+               return $this->headers;
+       }
+
+       /**
+        * Collect the headers as they are received
+        *
+        * @param resource $handle cURL resource
+        * @param string $headers Header string
+        * @return integer Length of provided header
+        */
+       public function stream_headers($handle, $headers) {
+               // Why do we do this? cURL will send both the final response and any
+               // interim responses, such as a 100 Continue. We don't need that.
+               // (We may want to keep this somewhere just in case)
+               if ($this->done_headers) {
+                       $this->headers = '';
+                       $this->done_headers = false;
+               }
+               $this->headers .= $headers;
+
+               if ($headers === "\r\n") {
+                       $this->done_headers = true;
+               }
+               return strlen($headers);
+       }
+
+       /**
+        * Collect data as it's received
+        *
+        * @since 1.6.1
+        *
+        * @param resource $handle cURL resource
+        * @param string $data Body data
+        * @return integer Length of provided data
+        */
+       protected function stream_body($handle, $data) {
+               $this->hooks->dispatch('request.progress', array($data, $this->response_bytes, $this->response_byte_limit));
+               $data_length = strlen($data);
+
+               // Are we limiting the response size?
+               if ($this->response_byte_limit) {
+                       if ($this->response_bytes === $this->response_byte_limit) {
+                               // Already at maximum, move on
+                               return $data_length;
+                       }
+
+                       if (($this->response_bytes + $data_length) > $this->response_byte_limit) {
+                               // Limit the length
+                               $limited_length = ($this->response_byte_limit - $this->response_bytes);
+                               $data = substr($data, 0, $limited_length);
+                       }
+               }
+
+               if ($this->stream_handle) {
+                       fwrite($this->stream_handle, $data);
+               }
+               else {
+                       $this->response_data .= $data;
+               }
+
+               $this->response_bytes += strlen($data);
+               return $data_length;
+       }
+
+       /**
+        * Format a URL given GET data
+        *
+        * @param string $url
+        * @param array|object $data Data to build query using, see {@see https://secure.php.net/http_build_query}
+        * @return string URL with data
+        */
+       protected static function format_get($url, $data) {
+               if (!empty($data)) {
+                       $url_parts = parse_url($url);
+                       if (empty($url_parts['query'])) {
+                               $query = $url_parts['query'] = '';
+                       }
+                       else {
+                               $query = $url_parts['query'];
+                       }
+
+                       $query .= '&' . http_build_query($data, null, '&');
+                       $query = trim($query, '&');
+
+                       if (empty($url_parts['query'])) {
+                               $url .= '?' . $query;
+                       }
+                       else {
+                               $url = str_replace($url_parts['query'], $query, $url);
+                       }
+               }
+               return $url;
+       }
+
+       /**
+        * Whether this transport is valid
+        *
+        * @codeCoverageIgnore
+        * @return boolean True if the transport is valid, false otherwise.
+        */
+       public static function test($capabilities = array()) {
+               if (!function_exists('curl_init') && !function_exists('curl_exec')) {
+                       return false;
+               }
+
+               // If needed, check that our installed curl version supports SSL
+               if (isset($capabilities['ssl']) && $capabilities['ssl']) {
+                       $curl_version = curl_version();
+                       if (!(CURL_VERSION_SSL & $curl_version['features'])) {
+                               return false;
+                       }
+               }
+
+               return true;
+       }
+}
diff --git a/wp-includes/Requests/Transport/fsockopen.php b/wp-includes/Requests/Transport/fsockopen.php
new file mode 100644 (file)
index 0000000..e9170f4
--- /dev/null
@@ -0,0 +1,441 @@
+<?php
+/**
+ * fsockopen HTTP transport
+ *
+ * @package Requests
+ * @subpackage Transport
+ */
+
+/**
+ * fsockopen HTTP transport
+ *
+ * @package Requests
+ * @subpackage Transport
+ */
+class Requests_Transport_fsockopen implements Requests_Transport {
+       /**
+        * Second to microsecond conversion
+        *
+        * @var integer
+        */
+       const SECOND_IN_MICROSECONDS = 1000000;
+
+       /**
+        * Raw HTTP data
+        *
+        * @var string
+        */
+       public $headers = '';
+
+       /**
+        * Stream metadata
+        *
+        * @var array Associative array of properties, see {@see https://secure.php.net/stream_get_meta_data}
+        */
+       public $info;
+
+       /**
+        * What's the maximum number of bytes we should keep?
+        *
+        * @var int|bool Byte count, or false if no limit.
+        */
+       protected $max_bytes = false;
+
+       protected $connect_error = '';
+
+       /**
+        * Perform a request
+        *
+        * @throws Requests_Exception On failure to connect to socket (`fsockopenerror`)
+        * @throws Requests_Exception On socket timeout (`timeout`)
+        *
+        * @param string $url URL to request
+        * @param array $headers Associative array of request headers
+        * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
+        * @param array $options Request options, see {@see Requests::response()} for documentation
+        * @return string Raw HTTP result
+        */
+       public function request($url, $headers = array(), $data = array(), $options = array()) {
+               $options['hooks']->dispatch('fsockopen.before_request');
+
+               $url_parts = parse_url($url);
+               if (empty($url_parts)) {
+                       throw new Requests_Exception('Invalid URL.', 'invalidurl', $url);
+               }
+               $host = $url_parts['host'];
+               $context = stream_context_create();
+               $verifyname = false;
+               $case_insensitive_headers = new Requests_Utility_CaseInsensitiveDictionary($headers);
+
+               // HTTPS support
+               if (isset($url_parts['scheme']) && strtolower($url_parts['scheme']) === 'https') {
+                       $remote_socket = 'ssl://' . $host;
+                       $url_parts['port'] = 443;
+
+                       $context_options = array(
+                               'verify_peer' => true,
+                               // 'CN_match' => $host,
+                               'capture_peer_cert' => true
+                       );
+                       $verifyname = true;
+
+                       // SNI, if enabled (OpenSSL >=0.9.8j)
+                       if (defined('OPENSSL_TLSEXT_SERVER_NAME') && OPENSSL_TLSEXT_SERVER_NAME) {
+                               $context_options['SNI_enabled'] = true;
+                               if (isset($options['verifyname']) && $options['verifyname'] === false) {
+                                       $context_options['SNI_enabled'] = false;
+                               }
+                       }
+
+                       if (isset($options['verify'])) {
+                               if ($options['verify'] === false) {
+                                       $context_options['verify_peer'] = false;
+                               }
+                               elseif (is_string($options['verify'])) {
+                                       $context_options['cafile'] = $options['verify'];
+                               }
+                       }
+
+                       if (isset($options['verifyname']) && $options['verifyname'] === false) {
+                               $verifyname = false;
+                       }
+
+                       stream_context_set_option($context, array('ssl' => $context_options));
+               }
+               else {
+                       $remote_socket = 'tcp://' . $host;
+               }
+
+               $this->max_bytes = $options['max_bytes'];
+
+               if (!isset($url_parts['port'])) {
+                       $url_parts['port'] = 80;
+               }
+               $remote_socket .= ':' . $url_parts['port'];
+
+               set_error_handler(array($this, 'connect_error_handler'), E_WARNING | E_NOTICE);
+
+               $options['hooks']->dispatch('fsockopen.remote_socket', array(&$remote_socket));
+
+               $socket = stream_socket_client($remote_socket, $errno, $errstr, ceil($options['connect_timeout']), STREAM_CLIENT_CONNECT, $context);
+
+               restore_error_handler();
+
+               if ($verifyname && !$this->verify_certificate_from_context($host, $context)) {
+                       throw new Requests_Exception('SSL certificate did not match the requested domain name', 'ssl.no_match');
+               }
+
+               if (!$socket) {
+                       if ($errno === 0) {
+                               // Connection issue
+                               throw new Requests_Exception(rtrim($this->connect_error), 'fsockopen.connect_error');
+                       }
+
+                       throw new Requests_Exception($errstr, 'fsockopenerror', null, $errno);
+               }
+
+               $data_format = $options['data_format'];
+
+               if ($data_format === 'query') {
+                       $path = self::format_get($url_parts, $data);
+                       $data = '';
+               }
+               else {
+                       $path = self::format_get($url_parts, array());
+               }
+
+               $options['hooks']->dispatch('fsockopen.remote_host_path', array(&$path, $url));
+
+               $request_body = '';
+               $out = sprintf("%s %s HTTP/%.1f\r\n", $options['type'], $path, $options['protocol_version']);
+
+               if ($options['type'] !== Requests::TRACE) {
+                       if (is_array($data)) {
+                               $request_body = http_build_query($data, null, '&');
+                       }
+                       else {
+                               $request_body = $data;
+                       }
+
+                       if (!empty($data)) {
+                               if (!isset($case_insensitive_headers['Content-Length'])) {
+                                       $headers['Content-Length'] = strlen($request_body);
+                               }
+
+                               if (!isset($case_insensitive_headers['Content-Type'])) {
+                                       $headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
+                               }
+                       }
+               }
+
+               if (!isset($case_insensitive_headers['Host'])) {
+                       $out .= sprintf('Host: %s', $url_parts['host']);
+
+                       if ($url_parts['port'] !== 80) {
+                               $out .= ':' . $url_parts['port'];
+                       }
+                       $out .= "\r\n";
+               }
+
+               if (!isset($case_insensitive_headers['User-Agent'])) {
+                       $out .= sprintf("User-Agent: %s\r\n", $options['useragent']);
+               }
+
+               $accept_encoding = $this->accept_encoding();
+               if (!isset($case_insensitive_headers['Accept-Encoding']) && !empty($accept_encoding)) {
+                       $out .= sprintf("Accept-Encoding: %s\r\n", $accept_encoding);
+               }
+
+               $headers = Requests::flatten($headers);
+
+               if (!empty($headers)) {
+                       $out .= implode($headers, "\r\n") . "\r\n";
+               }
+
+               $options['hooks']->dispatch('fsockopen.after_headers', array(&$out));
+
+               if (substr($out, -2) !== "\r\n") {
+                       $out .= "\r\n";
+               }
+
+               if (!isset($case_insensitive_headers['Connection'])) {
+                       $out .= "Connection: Close\r\n";
+               }
+
+               $out .= "\r\n" . $request_body;
+
+               $options['hooks']->dispatch('fsockopen.before_send', array(&$out));
+
+               fwrite($socket, $out);
+               $options['hooks']->dispatch('fsockopen.after_send', array($out));
+
+               if (!$options['blocking']) {
+                       fclose($socket);
+                       $fake_headers = '';
+                       $options['hooks']->dispatch('fsockopen.after_request', array(&$fake_headers));
+                       return '';
+               }
+
+               $timeout_sec = (int) floor($options['timeout']);
+               if ($timeout_sec == $options['timeout']) {
+                       $timeout_msec = 0;
+               }
+               else {
+                       $timeout_msec = self::SECOND_IN_MICROSECONDS * $options['timeout'] % self::SECOND_IN_MICROSECONDS;
+               }
+               stream_set_timeout($socket, $timeout_sec, $timeout_msec);
+
+               $response = $body = $headers = '';
+               $this->info = stream_get_meta_data($socket);
+               $size = 0;
+               $doingbody = false;
+               $download = false;
+               if ($options['filename']) {
+                       $download = fopen($options['filename'], 'wb');
+               }
+
+               while (!feof($socket)) {
+                       $this->info = stream_get_meta_data($socket);
+                       if ($this->info['timed_out']) {
+                               throw new Requests_Exception('fsocket timed out', 'timeout');
+                       }
+
+                       $block = fread($socket, Requests::BUFFER_SIZE);
+                       if (!$doingbody) {
+                               $response .= $block;
+                               if (strpos($response, "\r\n\r\n")) {
+                                       list($headers, $block) = explode("\r\n\r\n", $response, 2);
+                                       $doingbody = true;
+                               }
+                       }
+
+                       // Are we in body mode now?
+                       if ($doingbody) {
+                               $options['hooks']->dispatch('request.progress', array($block, $size, $this->max_bytes));
+                               $data_length = strlen($block);
+                               if ($this->max_bytes) {
+                                       // Have we already hit a limit?
+                                       if ($size === $this->max_bytes) {
+                                               continue;
+                                       }
+                                       if (($size + $data_length) > $this->max_bytes) {
+                                               // Limit the length
+                                               $limited_length = ($this->max_bytes - $size);
+                                               $block = substr($block, 0, $limited_length);
+                                       }
+                               }
+
+                               $size += strlen($block);
+                               if ($download) {
+                                       fwrite($download, $block);
+                               }
+                               else {
+                                       $body .= $block;
+                               }
+                       }
+               }
+               $this->headers = $headers;
+
+               if ($download) {
+                       fclose($download);
+               }
+               else {
+                       $this->headers .= "\r\n\r\n" . $body;
+               }
+               fclose($socket);
+
+               $options['hooks']->dispatch('fsockopen.after_request', array(&$this->headers, &$this->info));
+               return $this->headers;
+       }
+
+       /**
+        * Send multiple requests simultaneously
+        *
+        * @param array $requests Request data (array of 'url', 'headers', 'data', 'options') as per {@see Requests_Transport::request}
+        * @param array $options Global options, see {@see Requests::response()} for documentation
+        * @return array Array of Requests_Response objects (may contain Requests_Exception or string responses as well)
+        */
+       public function request_multiple($requests, $options) {
+               $responses = array();
+               $class = get_class($this);
+               foreach ($requests as $id => $request) {
+                       try {
+                               $handler = new $class();
+                               $responses[$id] = $handler->request($request['url'], $request['headers'], $request['data'], $request['options']);
+
+                               $request['options']['hooks']->dispatch('transport.internal.parse_response', array(&$responses[$id], $request));
+                       }
+                       catch (Requests_Exception $e) {
+                               $responses[$id] = $e;
+                       }
+
+                       if (!is_string($responses[$id])) {
+                               $request['options']['hooks']->dispatch('multiple.request.complete', array(&$responses[$id], $id));
+                       }
+               }
+
+               return $responses;
+       }
+
+       /**
+        * Retrieve the encodings we can accept
+        *
+        * @return string Accept-Encoding header value
+        */
+       protected static function accept_encoding() {
+               $type = array();
+               if (function_exists('gzinflate')) {
+                       $type[] = 'deflate;q=1.0';
+               }
+
+               if (function_exists('gzuncompress')) {
+                       $type[] = 'compress;q=0.5';
+               }
+
+               $type[] = 'gzip;q=0.5';
+
+               return implode(', ', $type);
+       }
+
+       /**
+        * Format a URL given GET data
+        *
+        * @param array $url_parts
+        * @param array|object $data Data to build query using, see {@see https://secure.php.net/http_build_query}
+        * @return string URL with data
+        */
+       protected static function format_get($url_parts, $data) {
+               if (!empty($data)) {
+                       if (empty($url_parts['query'])) {
+                               $url_parts['query'] = '';
+                       }
+
+                       $url_parts['query'] .= '&' . http_build_query($data, null, '&');
+                       $url_parts['query'] = trim($url_parts['query'], '&');
+               }
+               if (isset($url_parts['path'])) {
+                       if (isset($url_parts['query'])) {
+                               $get = $url_parts['path'] . '?' . $url_parts['query'];
+                       }
+                       else {
+                               $get = $url_parts['path'];
+                       }
+               }
+               else {
+                       $get = '/';
+               }
+               return $get;
+       }
+
+       /**
+        * Error handler for stream_socket_client()
+        *
+        * @param int $errno Error number (e.g. E_WARNING)
+        * @param string $errstr Error message
+        */
+       public function connect_error_handler($errno, $errstr) {
+               // Double-check we can handle it
+               if (($errno & E_WARNING) === 0 && ($errno & E_NOTICE) === 0) {
+                       // Return false to indicate the default error handler should engage
+                       return false;
+               }
+
+               $this->connect_error .= $errstr . "\n";
+               return true;
+       }
+
+       /**
+        * Verify the certificate against common name and subject alternative names
+        *
+        * Unfortunately, PHP doesn't check the certificate against the alternative
+        * names, leading things like 'https://www.github.com/' to be invalid.
+        * Instead
+        *
+        * @see https://tools.ietf.org/html/rfc2818#section-3.1 RFC2818, Section 3.1
+        *
+        * @throws Requests_Exception On failure to connect via TLS (`fsockopen.ssl.connect_error`)
+        * @throws Requests_Exception On not obtaining a match for the host (`fsockopen.ssl.no_match`)
+        * @param string $host Host name to verify against
+        * @param resource $context Stream context
+        * @return bool
+        */
+       public function verify_certificate_from_context($host, $context) {
+               $meta = stream_context_get_options($context);
+
+               // If we don't have SSL options, then we couldn't make the connection at
+               // all
+               if (empty($meta) || empty($meta['ssl']) || empty($meta['ssl']['peer_certificate'])) {
+                       throw new Requests_Exception(rtrim($this->connect_error), 'ssl.connect_error');
+               }
+
+               $cert = openssl_x509_parse($meta['ssl']['peer_certificate']);
+
+               return Requests_SSL::verify_certificate($host, $cert);
+       }
+
+       /**
+        * Whether this transport is valid
+        *
+        * @codeCoverageIgnore
+        * @return boolean True if the transport is valid, false otherwise.
+        */
+       public static function test($capabilities = array()) {
+               if (!function_exists('fsockopen')) {
+                       return false;
+               }
+
+               // If needed, check that streams support SSL
+               if (isset($capabilities['ssl']) && $capabilities['ssl']) {
+                       if (!extension_loaded('openssl') || !function_exists('openssl_x509_parse')) {
+                               return false;
+                       }
+
+                       // Currently broken, thanks to https://github.com/facebook/hhvm/issues/2156
+                       if (defined('HHVM_VERSION')) {
+                               return false;
+                       }
+               }
+
+               return true;
+       }
+}
diff --git a/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php b/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php
new file mode 100644 (file)
index 0000000..2c97893
--- /dev/null
@@ -0,0 +1,103 @@
+<?php
+/**
+ * Case-insensitive dictionary, suitable for HTTP headers
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+
+/**
+ * Case-insensitive dictionary, suitable for HTTP headers
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+class Requests_Utility_CaseInsensitiveDictionary implements ArrayAccess, IteratorAggregate {
+       /**
+        * Actual item data
+        *
+        * @var array
+        */
+       protected $data = array();
+
+       /**
+        * Creates a case insensitive dictionary.
+        *
+        * @param array $data Dictionary/map to convert to case-insensitive
+        */
+       public function __construct(array $data = array()) {
+               foreach ($data as $key => $value) {
+                       $this->offsetSet($key, $value);
+               }
+       }
+
+       /**
+        * Check if the given item exists
+        *
+        * @param string $key Item key
+        * @return boolean Does the item exist?
+        */
+       public function offsetExists($key) {
+               $key = strtolower($key);
+               return isset($this->data[$key]);
+       }
+
+       /**
+        * Get the value for the item
+        *
+        * @param string $key Item key
+        * @return string Item value
+        */
+       public function offsetGet($key) {
+               $key = strtolower($key);
+               if (!isset($this->data[$key])) {
+                       return null;
+               }
+
+               return $this->data[$key];
+       }
+
+       /**
+        * Set the given item
+        *
+        * @throws Requests_Exception On attempting to use dictionary as list (`invalidset`)
+        *
+        * @param string $key Item name
+        * @param string $value Item value
+        */
+       public function offsetSet($key, $value) {
+               if ($key === null) {
+                       throw new Requests_Exception('Object is a dictionary, not a list', 'invalidset');
+               }
+
+               $key = strtolower($key);
+               $this->data[$key] = $value;
+       }
+
+       /**
+        * Unset the given header
+        *
+        * @param string $key
+        */
+       public function offsetUnset($key) {
+               unset($this->data[strtolower($key)]);
+       }
+
+       /**
+        * Get an iterator for the data
+        *
+        * @return ArrayIterator
+        */
+       public function getIterator() {
+               return new ArrayIterator($this->data);
+       }
+
+       /**
+        * Get the headers as an array
+        *
+        * @return array Header data
+        */
+       public function getAll() {
+               return $this->data;
+       }
+}
diff --git a/wp-includes/Requests/Utility/FilteredIterator.php b/wp-includes/Requests/Utility/FilteredIterator.php
new file mode 100644 (file)
index 0000000..76a29e7
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Iterator for arrays requiring filtered values
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+
+/**
+ * Iterator for arrays requiring filtered values
+ *
+ * @package Requests
+ * @subpackage Utilities
+ */
+class Requests_Utility_FilteredIterator extends ArrayIterator {
+       /**
+        * Callback to run as a filter
+        *
+        * @var callable
+        */
+       protected $callback;
+
+       /**
+        * Create a new iterator
+        *
+        * @param array $data
+        * @param callable $callback Callback to be called on each value
+        */
+       public function __construct($data, $callback) {
+               parent::__construct($data);
+
+               $this->callback = $callback;
+       }
+
+       /**
+        * Get the current item's value after filtering
+        *
+        * @return string
+        */
+       public function current() {
+               $value = parent::current();
+               $value = call_user_func($this->callback, $value);
+               return $value;
+       }
+}
index c043aef81b2102edef94944be3b3c8ba98cc4d2f..b57dfaeb37247d405d86d48b77c29cced06df3a7 100644 (file)
@@ -11,7 +11,7 @@
  * Instantiate the admin bar object and set it up as a global for access elsewhere.
  *
  * UNHOOKING THIS FUNCTION WILL NOT PROPERLY REMOVE THE ADMIN BAR.
- * For that, use show_admin_bar(false) or the 'show_admin_bar' filter.
+ * For that, use show_admin_bar(false) or the {@see 'show_admin_bar'} filter.
  *
  * @since 3.1.0
  * @access private
@@ -32,7 +32,7 @@ function _wp_admin_bar_init() {
        /* Instantiate the admin bar */
 
        /**
-        * Filter the admin bar class to instantiate.
+        * Filters the admin bar class to instantiate.
         *
         * @since 3.1.0
         *
@@ -51,13 +51,15 @@ function _wp_admin_bar_init() {
 }
 
 /**
- * Render the admin bar to the page based on the $wp_admin_bar->menu member var.
- * This is called very late on the footer actions so that it will render after anything else being
- * added to the footer.
+ * Renders the admin bar to the page based on the $wp_admin_bar->menu member var.
  *
- * It includes the action "admin_bar_menu" which should be used to hook in and
- * add new menus to the admin bar. That way you can be sure that you are adding at most optimal point,
- * right before the admin bar is rendered. This also gives you access to the $post global, among others.
+ * This is called very late on the footer actions so that it will render after
+ * anything else being added to the footer.
+ *
+ * It includes the {@see 'admin_bar_menu'} action which should be used to hook in and
+ * add new menus to the admin bar. That way you can be sure that you are adding at most
+ * optimal point, right before the admin bar is rendered. This also gives you access to
+ * the `$post` global, among others.
  *
  * @since 3.1.0
  *
@@ -872,9 +874,10 @@ function _admin_bar_bump_cb() { ?>
 }
 
 /**
- * Set the display status of the admin bar.
+ * Sets the display status of the admin bar.
  *
- * This can be called immediately upon plugin load. It does not need to be called from a function hooked to the init action.
+ * This can be called immediately upon plugin load. It does not need to be called
+ * from a function hooked to the {@see 'init'} action.
  *
  * @since 3.1.0
  *
@@ -921,7 +924,7 @@ function is_admin_bar_showing() {
        }
 
        /**
-        * Filter whether to show the admin bar.
+        * Filters whether to show the admin bar.
         *
         * Returning false to this hook is the recommended way to hide the admin bar.
         * The user's display preference is used for logged in users.
index 271635fe45a8b13f7e4e67a93f8ee0bddd3d69dc..368015adb185953b8213d4c8d3058d8d0df1492c 100644 (file)
@@ -159,7 +159,7 @@ class AtomParser {
 
     function start_element($parser, $name, $attrs) {
 
-        $tag = array_pop(split(":", $name));
+        $tag = array_pop(explode(":", $name));
 
         switch($name) {
             case $this->NS . ':feed':
@@ -238,7 +238,7 @@ class AtomParser {
 
     function end_element($parser, $name) {
 
-        $tag = array_pop(split(":", $name));
+        $tag = array_pop(explode(":", $name));
 
         $ccount = count($this->in_content);
 
@@ -313,7 +313,7 @@ class AtomParser {
 
     function ns_to_prefix($qname, $attr=false) {
         # split 'http://www.w3.org/1999/xhtml:div' into ('http','//www.w3.org/1999/xhtml','div')
-        $components = split(":", $qname);
+        $components = explode(":", $qname);
 
         # grab the last one (e.g 'div')
         $name = array_pop($components);
index ba609ab27547b5b8d938474d9e2d2a71f22c7762..915805fcb9271a5f57adcbd60991259164e83580 100644 (file)
@@ -24,10 +24,10 @@ function get_the_author($deprecated = '') {
        global $authordata;
 
        if ( !empty( $deprecated ) )
-               _deprecated_argument( __FUNCTION__, '2.1' );
+               _deprecated_argument( __FUNCTION__, '2.1.0' );
 
        /**
-        * Filter the display name of the current post's author.
+        * Filters the display name of the current post's author.
         *
         * @since 2.9.0
         *
@@ -45,7 +45,7 @@ function get_the_author($deprecated = '') {
  * still use the old behavior will also pass the value from get_the_author().
  *
  * The normal, expected behavior of this function is to echo the author and not
- * return it. However, backwards compatibility has to be maintained.
+ * return it. However, backward compatibility has to be maintained.
  *
  * @since 0.71
  * @see get_the_author()
@@ -57,11 +57,11 @@ function get_the_author($deprecated = '') {
  */
 function the_author( $deprecated = '', $deprecated_echo = true ) {
        if ( ! empty( $deprecated ) ) {
-               _deprecated_argument( __FUNCTION__, '2.1' );
+               _deprecated_argument( __FUNCTION__, '2.1.0' );
        }
 
        if ( true !== $deprecated_echo ) {
-               _deprecated_argument( __FUNCTION__, '1.5',
+               _deprecated_argument( __FUNCTION__, '1.5.0',
                        /* translators: %s: get_the_author() */
                        sprintf( __( 'Use %s instead if you do not want the value echoed.' ),
                                '<code>get_the_author()</code>'
@@ -88,7 +88,7 @@ function get_the_modified_author() {
                $last_user = get_userdata($last_id);
 
                /**
-                * Filter the display name of the author who last edited the current post.
+                * Filters the display name of the author who last edited the current post.
                 *
                 * @since 2.8.0
                 *
@@ -137,7 +137,7 @@ function get_the_author_meta( $field = '', $user_id = false ) {
        $value = isset( $authordata->$field ) ? $authordata->$field : '';
 
        /**
-        * Filter the value of the requested user metadata.
+        * Filters the value of the requested user metadata.
         *
         * The filter name is dynamic and depends on the $field parameter of the function.
         *
@@ -258,7 +258,7 @@ function get_the_author_posts_link() {
        );
 
        /**
-        * Filter the link to the author page of the author of the current post.
+        * Filters the link to the author page of the author of the current post.
         *
         * @since 2.9.0
         *
@@ -277,7 +277,7 @@ function get_the_author_posts_link() {
  */
 function the_author_posts_link( $deprecated = '' ) {
        if ( ! empty( $deprecated ) ) {
-               _deprecated_argument( __FUNCTION__, '2.1' );
+               _deprecated_argument( __FUNCTION__, '2.1.0' );
        }
        echo get_the_author_posts_link();
 }
@@ -312,7 +312,7 @@ function get_author_posts_url( $author_id, $author_nicename = '' ) {
        }
 
        /**
-        * Filter the URL to the author's page.
+        * Filters the URL to the author's page.
         *
         * @since 2.1.0
         *
@@ -337,26 +337,26 @@ function get_author_posts_url( $author_id, $author_nicename = '' ) {
  * @param string|array $args {
  *     Optional. Array or string of default arguments.
  *
- *     @type string $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
- *                                 'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
- *                                 'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
- *     @type string $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
- *     @type int    $number        Maximum authors to return or display. Default empty (all authors).
- *     @type bool   $optioncount   Show the count in parenthesis next to the author's name. Default false.
- *     @type bool   $exclude_admin Whether to exclude the 'admin' account, if it exists. Default false.
- *     @type bool   $show_fullname Whether to show the author's full name. Default false.
- *     @type bool   $hide_empty    Whether to hide any authors with no posts. Default true.
- *     @type string $feed          If not empty, show a link to the author's feed and use this text as the alt
- *                                 parameter of the link. Default empty.
- *     @type string $feed_image    If not empty, show a link to the author's feed and use this image URL as
- *                                 clickable anchor. Default empty.
- *     @type string $feed_type     The feed type to link to, such as 'rss2'. Defaults to default feed type.
- *     @type bool   $echo          Whether to output the result or instead return it. Default true.
- *     @type string $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
- *                                 will be separated by commas.
- *     @type bool   $html          Whether to list the items in HTML form or plaintext. Default true.
- *     @type string $exclude       An array, comma-, or space-separated list of author IDs to exclude. Default empty.
- *     @type string $exclude       An array, comma-, or space-separated list of author IDs to include. Default empty.
+ *     @type string       $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
+ *                                       'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
+ *                                       'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
+ *     @type string       $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
+ *     @type int          $number        Maximum authors to return or display. Default empty (all authors).
+ *     @type bool         $optioncount   Show the count in parenthesis next to the author's name. Default false.
+ *     @type bool         $exclude_admin Whether to exclude the 'admin' account, if it exists. Default false.
+ *     @type bool         $show_fullname Whether to show the author's full name. Default false.
+ *     @type bool         $hide_empty    Whether to hide any authors with no posts. Default true.
+ *     @type string       $feed          If not empty, show a link to the author's feed and use this text as the alt
+ *                                       parameter of the link. Default empty.
+ *     @type string       $feed_image    If not empty, show a link to the author's feed and use this image URL as
+ *                                       clickable anchor. Default empty.
+ *     @type string       $feed_type     The feed type to link to, such as 'rss2'. Defaults to default feed type.
+ *     @type bool         $echo          Whether to output the result or instead return it. Default true.
+ *     @type string       $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
+ *                                       will be separated by commas.
+ *     @type bool         $html          Whether to list the items in HTML form or plaintext. Default true.
+ *     @type array|string $exclude       Array or comma/space-separated list of author IDs to exclude. Default empty.
+ *     @type array|string $include       Array or comma/space-separated list of author IDs to include. Default empty.
  * }
  * @return string|void The output, if echo is set to false.
  */
@@ -480,7 +480,7 @@ function is_multi_author() {
        }
 
        /**
-        * Filter whether the site has more than one author with published posts.
+        * Filters whether the site has more than one author with published posts.
         *
         * @since 3.2.0
         *
index 47bfb4a18175f3bf85234038afab17fb4943c06d..c6b7fd2b550e63220071d4555a5c1b49de789658 100644 (file)
@@ -248,7 +248,7 @@ function wp_list_bookmarks( $args = '' ) {
                                $r['category_before']
                        );
                        /**
-                        * Filter the bookmarks category name.
+                        * Filters the bookmarks category name.
                         *
                         * @since 2.2.0
                         *
@@ -289,7 +289,7 @@ function wp_list_bookmarks( $args = '' ) {
        }
 
        /**
-        * Filter the bookmarks list before it is echoed or returned.
+        * Filters the bookmarks list before it is echoed or returned.
         *
         * @since 2.5.0
         *
index 140f5fdc48bb66aa0131a56f183c91fdc06cc500..fc719d5898594c414569a0b37f8d8cf61e1fa922 100644 (file)
@@ -128,11 +128,12 @@ function get_bookmarks( $args = '' ) {
        $r = wp_parse_args( $args, $defaults );
 
        $key = md5( serialize( $r ) );
-       if ( $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ) ) {
+       $cache = false;
+       if ( 'rand' !== $r['orderby'] && $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ) ) {
                if ( is_array( $cache ) && isset( $cache[ $key ] ) ) {
                        $bookmarks = $cache[ $key ];
                        /**
-                        * Filter the returned list of bookmarks.
+                        * Filters the returned list of bookmarks.
                         *
                         * The first time the hook is evaluated in this file, it returns the cached
                         * bookmarks list. The second evaluation returns a cached bookmarks list if the
@@ -285,8 +286,10 @@ function get_bookmarks( $args = '' ) {
 
        $results = $wpdb->get_results( $query );
 
-       $cache[ $key ] = $results;
-       wp_cache_set( 'get_bookmarks', $cache, 'bookmark' );
+       if ( 'rand()' !== $orderby ) {
+               $cache[ $key ] = $results;
+               wp_cache_set( 'get_bookmarks', $cache, 'bookmark' );
+       }
 
        /** This filter is documented in wp-includes/bookmark.php */
        return apply_filters( 'get_bookmarks', $results, $r );
@@ -329,30 +332,30 @@ function sanitize_bookmark($bookmark, $context = 'display') {
 }
 
 /**
- * Sanitizes a bookmark field
+ * Sanitizes a bookmark field.
  *
  * Sanitizes the bookmark fields based on what the field name is. If the field
  * has a strict value set, then it will be tested for that, else a more generic
- * filtering is applied. After the more strict filter is applied, if the
- * $context is 'raw' then the value is immediately return.
+ * filtering is applied. After the more strict filter is applied, if the `$context`
+ * is 'raw' then the value is immediately return.
+ *
+ * Hooks exist for the more generic cases. With the 'edit' context, the {@see 'edit_$field'}
+ * filter will be called and passed the `$value` and `$bookmark_id` respectively.
  *
- * Hooks exist for the more generic cases. With the 'edit' context, the
- * 'edit_$field' filter will be called and passed the $value and $bookmark_id
- * respectively. With the 'db' context, the 'pre_$field' filter is called and
- * passed the value. The 'display' context is the final context and has the
- * $field has the filter name and is passed the $value, $bookmark_id, and
- * $context respectively.
+ * With the 'db' context, the {@see 'pre_$field'} filter is called and passed the value.
+ * The 'display' context is the final context and has the `$field` has the filter name
+ * and is passed the `$value`, `$bookmark_id`, and `$context`, respectively.
  *
  * @since 2.3.0
  *
- * @param string $field The bookmark field
- * @param mixed $value The bookmark field value
- * @param int $bookmark_id Bookmark ID
- * @param string $context How to filter the field value. Either 'raw', 'edit',
- *             'attribute', 'js', 'db', or 'display'
- * @return mixed The filtered value
+ * @param string $field       The bookmark field.
+ * @param mixed  $value       The bookmark field value.
+ * @param int    $bookmark_id Bookmark ID.
+ * @param string $context     How to filter the field value. Accepts 'raw', 'edit', 'attribute',
+ *                            'js', 'db', or 'display'
+ * @return mixed The filtered value.
  */
-function sanitize_bookmark_field($field, $value, $bookmark_id, $context) {
+function sanitize_bookmark_field( $field, $value, $bookmark_id, $context ) {
        switch ( $field ) {
        case 'link_id' : // ints
        case 'link_rating' :
index a1a6e6c70590d89d2bd1d6d4ecbb8c4e3364fbae..6c53eabb78ff7ebfbf422867cb8e59abeeee1386 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * Object Cache API
  *
- * @link https://codex.wordpress.org/Function_Reference/WP_Cache
+ * @link https://codex.wordpress.org/Class_Reference/WP_Object_Cache
  *
  * @package WordPress
  * @subpackage Cache
@@ -200,7 +200,7 @@ function wp_cache_set( $key, $data, $group = '', $expire = 0 ) {
 }
 
 /**
- * Switches the interal blog ID.
+ * Switches the internal blog ID.
  *
  * This changes the blog id used to create keys in blog specific groups.
  *
@@ -264,7 +264,7 @@ function wp_cache_add_non_persistent_groups( $groups ) {
  * @global WP_Object_Cache $wp_object_cache Object cache global instance.
  */
 function wp_cache_reset() {
-       _deprecated_function( __FUNCTION__, '3.5' );
+       _deprecated_function( __FUNCTION__, '3.5.0' );
 
        global $wp_object_cache;
 
@@ -344,7 +344,7 @@ class WP_Object_Cache {
        private $multisite;
 
        /**
-        * Makes private properties readable for backwards compatibility.
+        * Makes private properties readable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -357,7 +357,7 @@ class WP_Object_Cache {
        }
 
        /**
-        * Makes private properties settable for backwards compatibility.
+        * Makes private properties settable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -371,7 +371,7 @@ class WP_Object_Cache {
        }
 
        /**
-        * Makes private properties checkable for backwards compatibility.
+        * Makes private properties checkable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -384,7 +384,7 @@ class WP_Object_Cache {
        }
 
        /**
-        * Makes private properties un-settable for backwards compatibility.
+        * Makes private properties un-settable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -631,7 +631,7 @@ class WP_Object_Cache {
         * @see switch_to_blog()
         */
        public function reset() {
-               _deprecated_function( __FUNCTION__, '3.5', 'switch_to_blog()' );
+               _deprecated_function( __FUNCTION__, '3.5.0', 'switch_to_blog()' );
 
                // Clear out non-global caches since the blog ID has changed.
                foreach ( array_keys( $this->cache ) as $group ) {
@@ -697,7 +697,7 @@ class WP_Object_Cache {
        }
 
        /**
-        * Switches the interal blog ID.
+        * Switches the internal blog ID.
         *
         * This changes the blog ID used to create keys in blog specific groups.
         *
index 87afcce2f7a551f34768aca9d4518ab82719c18d..11c513d31ae9e0d7ec25e0d2daca585bc7b50867 100644 (file)
@@ -256,9 +256,9 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
                        }
                } elseif ( is_single() && strpos($wp_rewrite->permalink_structure, '%category%') !== false && $cat = get_query_var( 'category_name' ) ) {
                        $category = get_category_by_path( $cat );
-                       $post_terms = wp_get_object_terms($wp_query->get_queried_object_id(), 'category', array('fields' => 'tt_ids'));
-                       if ( (!$category || is_wp_error($category)) || ( !is_wp_error($post_terms) && !empty($post_terms) && !in_array($category->term_taxonomy_id, $post_terms) ) )
+                       if ( ( ! $category || is_wp_error( $category ) ) || ! has_term( $category->term_id, 'category', $wp_query->get_queried_object_id() ) ) {
                                $redirect_url = get_permalink($wp_query->get_queried_object_id());
+                       }
                }
 
                // Post Paging
@@ -477,6 +477,15 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
        // Hex encoded octets are case-insensitive.
        if ( false !== strpos($requested_url, '%') ) {
                if ( !function_exists('lowercase_octets') ) {
+                       /**
+                        * Converts the first hex-encoded octet match to lowercase.
+                        *
+                        * @since 3.1.0
+                        * @ignore
+                        *
+                        * @param array $matches Hex-encoded octet matches for the requested URL.
+                        * @return string Lowercased version of the first match.
+                        */
                        function lowercase_octets($matches) {
                                return strtolower( $matches[0] );
                        }
@@ -485,7 +494,7 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
        }
 
        /**
-        * Filter the canonical redirect URL.
+        * Filters the canonical redirect URL.
         *
         * Returning false to this filter will cancel the redirect.
         *
index 9ed3447e6c83a9aaeb4bdea4bddd81bc4911a2aa..eac359630bf2aa6108bd5233d4ce5a305c7d3b11 100644 (file)
@@ -243,16 +243,18 @@ function map_meta_cap( $cap, $user_id ) {
                        break;
                }
 
+               $post_type = get_post_type( $post );
+
                $caps = map_meta_cap( 'edit_post', $user_id, $post->ID );
 
                $meta_key = isset( $args[ 1 ] ) ? $args[ 1 ] : false;
 
-               if ( $meta_key && has_filter( "auth_post_meta_{$meta_key}" ) ) {
+               if ( $meta_key && ( has_filter( "auth_post_meta_{$meta_key}" ) || has_filter( "auth_post_{$post_type}_meta_{$meta_key}" ) ) ) {
                        /**
-                        * Filter whether the user is allowed to add post meta to a post.
+                        * Filters whether the user is allowed to add post meta to a post.
                         *
                         * The dynamic portion of the hook name, `$meta_key`, refers to the
-                        * meta key passed to {@see map_meta_cap()}.
+                        * meta key passed to map_meta_cap().
                         *
                         * @since 3.3.0
                         *
@@ -264,6 +266,24 @@ function map_meta_cap( $cap, $user_id ) {
                         * @param array  $caps     User capabilities.
                         */
                        $allowed = apply_filters( "auth_post_meta_{$meta_key}", false, $meta_key, $post->ID, $user_id, $cap, $caps );
+
+                       /**
+                        * Filters whether the user is allowed to add post meta to a post of a given type.
+                        *
+                        * The dynamic portions of the hook name, `$meta_key` and `$post_type`,
+                        * refer to the meta key passed to map_meta_cap() and the post type, respectively.
+                        *
+                        * @since 4.6.0
+                        *
+                        * @param bool   $allowed  Whether the user can add the post meta. Default false.
+                        * @param string $meta_key The meta key.
+                        * @param int    $post_id  Post ID.
+                        * @param int    $user_id  User ID.
+                        * @param string $cap      Capability name.
+                        * @param array  $caps     User capabilities.
+                        */
+                       $allowed = apply_filters( "auth_post_{$post_type}_meta_{$meta_key}", $allowed, $meta_key, $post->ID, $user_id, $cap, $caps );
+
                        if ( ! $allowed )
                                $caps[] = $cap;
                } elseif ( $meta_key && is_protected_meta( $meta_key, 'post' ) ) {
@@ -390,7 +410,7 @@ function map_meta_cap( $cap, $user_id ) {
        }
 
        /**
-        * Filter a user's capabilities depending on specific context and/or privilege.
+        * Filters a user's capabilities depending on specific context and/or privilege.
         *
         * @since 2.8.0
         *
@@ -619,3 +639,99 @@ function is_super_admin( $user_id = false ) {
 
        return false;
 }
+
+/**
+ * Grants Super Admin privileges.
+ *
+ * @since 3.0.0
+ *
+ * @global array $super_admins
+ *
+ * @param int $user_id ID of the user to be granted Super Admin privileges.
+ * @return bool True on success, false on failure. This can fail when the user is
+ *              already a super admin or when the `$super_admins` global is defined.
+ */
+function grant_super_admin( $user_id ) {
+       // If global super_admins override is defined, there is nothing to do here.
+       if ( isset( $GLOBALS['super_admins'] ) || ! is_multisite() ) {
+               return false;
+       }
+
+       /**
+        * Fires before the user is granted Super Admin privileges.
+        *
+        * @since 3.0.0
+        *
+        * @param int $user_id ID of the user that is about to be granted Super Admin privileges.
+        */
+       do_action( 'grant_super_admin', $user_id );
+
+       // Directly fetch site_admins instead of using get_super_admins()
+       $super_admins = get_site_option( 'site_admins', array( 'admin' ) );
+
+       $user = get_userdata( $user_id );
+       if ( $user && ! in_array( $user->user_login, $super_admins ) ) {
+               $super_admins[] = $user->user_login;
+               update_site_option( 'site_admins' , $super_admins );
+
+               /**
+                * Fires after the user is granted Super Admin privileges.
+                *
+                * @since 3.0.0
+                *
+                * @param int $user_id ID of the user that was granted Super Admin privileges.
+                */
+               do_action( 'granted_super_admin', $user_id );
+               return true;
+       }
+       return false;
+}
+
+/**
+ * Revokes Super Admin privileges.
+ *
+ * @since 3.0.0
+ *
+ * @global array $super_admins
+ *
+ * @param int $user_id ID of the user Super Admin privileges to be revoked from.
+ * @return bool True on success, false on failure. This can fail when the user's email
+ *              is the network admin email or when the `$super_admins` global is defined.
+ */
+function revoke_super_admin( $user_id ) {
+       // If global super_admins override is defined, there is nothing to do here.
+       if ( isset( $GLOBALS['super_admins'] ) || ! is_multisite() ) {
+               return false;
+       }
+
+       /**
+        * Fires before the user's Super Admin privileges are revoked.
+        *
+        * @since 3.0.0
+        *
+        * @param int $user_id ID of the user Super Admin privileges are being revoked from.
+        */
+       do_action( 'revoke_super_admin', $user_id );
+
+       // Directly fetch site_admins instead of using get_super_admins()
+       $super_admins = get_site_option( 'site_admins', array( 'admin' ) );
+
+       $user = get_userdata( $user_id );
+       if ( $user && 0 !== strcasecmp( $user->user_email, get_site_option( 'admin_email' ) ) ) {
+               if ( false !== ( $key = array_search( $user->user_login, $super_admins ) ) ) {
+                       unset( $super_admins[$key] );
+                       update_site_option( 'site_admins', $super_admins );
+
+                       /**
+                        * Fires after the user's Super Admin privileges are revoked.
+                        *
+                        * @since 3.0.0
+                        *
+                        * @param int $user_id ID of the user Super Admin privileges were revoked from.
+                        */
+                       do_action( 'revoked_super_admin', $user_id );
+                       return true;
+               }
+       }
+       return false;
+}
index 35d6c82ed02b849641f5c50f904da83484121b20..7063c2d4c91d3f6304e07bf98c04c07c879bb5a5 100644 (file)
@@ -74,7 +74,7 @@ function get_category_parents( $id, $link = false, $separator = '/', $nicename =
  * @since 0.71
  *
  * @param int $id Optional, default to current post ID. The post ID.
- * @return array Array of objects, one for each category assigned to the post.
+ * @return array Array of WP_Term objects, one for each category assigned to the post.
  */
 function get_the_category( $id = false ) {
        $categories = get_the_terms( $id, 'category' );
@@ -88,7 +88,7 @@ function get_the_category( $id = false ) {
        }
 
        /**
-        * Filter the array of categories to return for a post.
+        * Filters the array of categories to return for a post.
         *
         * @since 3.1.0
         * @since 4.4.0 Added `$id` parameter.
@@ -176,7 +176,7 @@ function get_the_category_list( $separator = '', $parents='', $post_id = false )
        }
 
        /**
-        * Filter the categories before building the category list.
+        * Filters the categories before building the category list.
         *
         * @since 4.4.0
         *
@@ -242,7 +242,7 @@ function get_the_category_list( $separator = '', $parents='', $post_id = false )
        }
 
        /**
-        * Filter the category or list of categories.
+        * Filters the category or list of categories.
         *
         * @since 1.2.0
         *
@@ -314,6 +314,7 @@ function category_description( $category = 0 ) {
  *
  * @since 2.1.0
  * @since 4.2.0 Introduced the `value_field` argument.
+ * @since 4.6.0 Introduced the `required` argument.
  *
  * @param string|array $args {
  *     Optional. Array or string of arguments to generate a categories drop-down element.
@@ -351,22 +352,34 @@ function category_description( $category = 0 ) {
  *     @type string|array $taxonomy          Name of the category or categories to retrieve. Default 'category'.
  *     @type bool         $hide_if_empty     True to skip generating markup if no categories are found.
  *                                           Default false (create select element even if no categories are found).
+ *     @type bool         $required          Whether the `<select>` element should have the HTML5 'required' attribute.
+ *                                           Default false.
  * }
  * @return string HTML content only if 'echo' argument is 0.
  */
 function wp_dropdown_categories( $args = '' ) {
        $defaults = array(
-               'show_option_all' => '', 'show_option_none' => '',
-               'orderby' => 'id', 'order' => 'ASC',
-               'show_count' => 0,
-               'hide_empty' => 1, 'child_of' => 0,
-               'exclude' => '', 'echo' => 1,
-               'selected' => 0, 'hierarchical' => 0,
-               'name' => 'cat', 'id' => '',
-               'class' => 'postform', 'depth' => 0,
-               'tab_index' => 0, 'taxonomy' => 'category',
-               'hide_if_empty' => false, 'option_none_value' => -1,
-               'value_field' => 'term_id',
+               'show_option_all'   => '',
+               'show_option_none'  => '',
+               'orderby'           => 'id',
+               'order'             => 'ASC',
+               'show_count'        => 0,
+               'hide_empty'        => 1,
+               'child_of'          => 0,
+               'exclude'           => '',
+               'echo'              => 1,
+               'selected'          => 0,
+               'hierarchical'      => 0,
+               'name'              => 'cat',
+               'id'                => '',
+               'class'             => 'postform',
+               'depth'             => 0,
+               'tab_index'         => 0,
+               'taxonomy'          => 'category',
+               'hide_if_empty'     => false,
+               'option_none_value' => -1,
+               'value_field'       => 'term_id',
+               'required'          => false,
        );
 
        $defaults['selected'] = ( is_category() ) ? get_query_var( 'cat' ) : 0;
@@ -374,7 +387,7 @@ function wp_dropdown_categories( $args = '' ) {
        // Back compat.
        if ( isset( $args['type'] ) && 'link' == $args['type'] ) {
                /* translators: 1: "type => link", 2: "taxonomy => link_category" alternative */
-               _deprecated_argument( __FUNCTION__, '3.0',
+               _deprecated_argument( __FUNCTION__, '3.0.0',
                        sprintf( __( '%1$s is deprecated. Use %2$s instead.' ),
                                '<code>type => link</code>',
                                '<code>taxonomy => link_category</code>'
@@ -405,16 +418,17 @@ function wp_dropdown_categories( $args = '' ) {
        $name = esc_attr( $r['name'] );
        $class = esc_attr( $r['class'] );
        $id = $r['id'] ? esc_attr( $r['id'] ) : $name;
+       $required = $r['required'] ? 'required' : '';
 
        if ( ! $r['hide_if_empty'] || ! empty( $categories ) ) {
-               $output = "<select name='$name' id='$id' class='$class' $tab_index_attribute>\n";
+               $output = "<select $required name='$name' id='$id' class='$class' $tab_index_attribute>\n";
        } else {
                $output = '';
        }
        if ( empty( $categories ) && ! $r['hide_if_empty'] && ! empty( $r['show_option_none'] ) ) {
 
                /**
-                * Filter a taxonomy drop-down display element.
+                * Filters a taxonomy drop-down display element.
                 *
                 * A variety of taxonomy drop-down display elements can be modified
                 * just prior to display via this filter. Filterable arguments include
@@ -461,7 +475,7 @@ function wp_dropdown_categories( $args = '' ) {
                $output .= "</select>\n";
        }
        /**
-        * Filter the taxonomy drop-down output.
+        * Filters the taxonomy drop-down output.
         *
         * @since 2.1.0
         *
@@ -486,41 +500,44 @@ function wp_dropdown_categories( $args = '' ) {
  * @param string|array $args {
  *     Array of optional arguments.
  *
- *     @type string       $show_option_all       Text to display for showing all categories. Default empty string.
- *     @type string       $show_option_none      Text to display for the 'no categories' option.
- *                                               Default 'No categories'.
- *     @type string       $orderby               The column to use for ordering categories. Default 'ID'.
- *     @type string       $order                 Which direction to order categories. Accepts 'ASC' or 'DESC'.
- *                                               Default 'ASC'.
- *     @type bool|int     $show_count            Whether to show how many posts are in the category. Default 0.
- *     @type bool|int     $hide_empty            Whether to hide categories that don't have any posts attached to them.
- *                                               Default 1.
- *     @type bool|int     $use_desc_for_title    Whether to use the category description as the title attribute.
- *                                               Default 1.
- *     @type string       $feed                  Text to use for the feed link. Default 'Feed for all posts filed
- *                                               under [cat name]'.
- *     @type string       $feed_type             Feed type. Used to build feed link. See {@link get_term_feed_link()}.
- *                                               Default empty string (default feed).
- *     @type string       $feed_image            URL of an image to use for the feed link. Default empty string.
- *     @type int          $child_of              Term ID to retrieve child terms of. See {@link get_terms()}. Default 0.
+ *     @type int          $child_of              Term ID to retrieve child terms of. See get_terms(). Default 0.
+ *     @type int|array    $current_category      ID of category, or array of IDs of categories, that should get the
+ *                                               'current-cat' class. Default 0.
+ *     @type int          $depth                 Category depth. Used for tab indentation. Default 0.
+ *     @type bool|int     $echo                  True to echo markup, false to return it. Default 1.
  *     @type array|string $exclude               Array or comma/space-separated string of term IDs to exclude.
  *                                               If `$hierarchical` is true, descendants of `$exclude` terms will also
- *                                               be excluded; see `$exclude_tree`. See {@link get_terms()}.
+ *                                               be excluded; see `$exclude_tree`. See get_terms().
  *                                               Default empty string.
  *     @type array|string $exclude_tree          Array or comma/space-separated string of term IDs to exclude, along
- *                                               with their descendants. See {@link get_terms()}. Default empty string.
- *     @type bool|int     $echo                  True to echo markup, false to return it. Default 1.
- *     @type int|array    $current_category      ID of category, or array of IDs of categories, that should get the
- *                                               'current-cat' class. Default 0.
- *     @type bool         $hierarchical          Whether to include terms that have non-empty descendants.
- *                                               See {@link get_terms()}. Default true.
- *     @type string       $title_li              Text to use for the list title `<li>` element. Pass an empty string
- *                                               to disable. Default 'Categories'.
+ *                                               with their descendants. See get_terms(). Default empty string.
+ *     @type string       $feed                  Text to use for the feed link. Default 'Feed for all posts filed
+ *                                               under [cat name]'.
+ *     @type string       $feed_image            URL of an image to use for the feed link. Default empty string.
+ *     @type string       $feed_type             Feed type. Used to build feed link. See get_term_feed_link().
+ *                                               Default empty string (default feed).
+ *     @type bool|int     $hide_empty            Whether to hide categories that don't have any posts attached to them.
+ *                                               Default 1.
  *     @type bool         $hide_title_if_empty   Whether to hide the `$title_li` element if there are no terms in
  *                                               the list. Default false (title will always be shown).
- *     @type int          $depth                 Category depth. Used for tab indentation. Default 0.
- *     @type string       $taxonomy              Taxonomy name. Default 'category'.
+ *     @type bool         $hierarchical          Whether to include terms that have non-empty descendants.
+ *                                               See get_terms(). Default true.
+ *     @type string       $order                 Which direction to order categories. Accepts 'ASC' or 'DESC'.
+ *                                               Default 'ASC'.
+ *     @type string       $orderby               The column to use for ordering categories. Default 'ID'.
  *     @type string       $separator             Separator between links. Default '<br />'.
+ *     @type bool|int     $show_count            Whether to show how many posts are in the category. Default 0.
+ *     @type string       $show_option_all       Text to display for showing all categories. Default empty string.
+ *     @type string       $show_option_none      Text to display for the 'no categories' option.
+ *                                               Default 'No categories'.
+ *     @type string       $style                 The style used to display the categories list. If 'list', categories
+ *                                               will be output as an unordered list. If left empty or another value,
+ *                                               categories will be output separated by `<br>` tags. Default 'list'.
+ *     @type string       $taxonomy              Taxonomy name. Default 'category'.
+ *     @type string       $title_li              Text to use for the list title `<li>` element. Pass an empty string
+ *                                               to disable. Default 'Categories'.
+ *     @type bool|int     $use_desc_for_title    Whether to use the category description as the title attribute.
+ *                                               Default 1.
  * }
  * @return false|string HTML content only if 'echo' argument is 0.
  */
@@ -650,7 +667,7 @@ function wp_list_categories( $args = '' ) {
                $output .= '</ul></li>';
 
        /**
-        * Filter the HTML output of a taxonomy list.
+        * Filters the HTML output of a taxonomy list.
         *
         * @since 2.1.0
         *
@@ -691,9 +708,8 @@ function wp_list_categories( $args = '' ) {
  * The 'post_type' argument is used only when 'link' is set to 'edit'. It determines the post_type
  * passed to edit.php for the popular tags edit links.
  *
- * The 'exclude' and 'include' arguments are used for the {@link get_tags()}
- * function. Only one should be used, because only one will be used and the
- * other ignored, if they are both set.
+ * The 'exclude' and 'include' arguments are used for the get_tags() function. Only one
+ * should be used, because only one will be used and the other ignored, if they are both set.
  *
  * @since 2.3.0
  *
@@ -729,7 +745,7 @@ function wp_tag_cloud( $args = '' ) {
        $return = wp_generate_tag_cloud( $tags, $args ); // Here's where those top tags get sorted according to $args
 
        /**
-        * Filter the tag cloud output.
+        * Filters the tag cloud output.
         *
         * @since 2.3.0
         *
@@ -757,35 +773,44 @@ function default_topic_count_scale( $count ) {
 /**
  * Generates a tag cloud (heatmap) from provided data.
  *
- * The text size is set by the 'smallest' and 'largest' arguments, which will
- * use the 'unit' argument value for the CSS text size unit. The 'format'
- * argument can be 'flat' (default), 'list', or 'array'. The flat value for the
- * 'format' argument will separate tags with spaces. The list value for the
- * 'format' argument will format the tags in a UL HTML list. The array value for
- * the 'format' argument will return in PHP array type format.
- *
- * The 'tag_cloud_sort' filter allows you to override the sorting.
- * Passed to the filter: $tags array and $args array, has to return the $tags array
- * after sorting it.
- *
- * The 'orderby' argument will accept 'name' or 'count' and defaults to 'name'.
- * The 'order' is the direction to sort, defaults to 'ASC' and can be 'DESC' or
- * 'RAND'.
- *
- * The 'number' argument is how many tags to return. By default, the limit will
- * be to return the entire tag cloud list.
- *
- * The 'topic_count_text' argument is a nooped plural from _n_noop() to generate the
- * text for the tooltip of the tag link.
- *
- * The 'topic_count_text_callback' argument is a function, which given the count
- * of the posts with that tag returns a text for the tooltip of the tag link.
- *
  * @todo Complete functionality.
  * @since 2.3.0
  *
  * @param array $tags List of tags.
- * @param string|array $args Optional, override default arguments.
+ * @param string|array $args {
+ *     Optional. Array of string of arguments for generating a tag cloud.
+ *
+ *     @type int      $smallest                   Smallest font size used to display tags. Paired
+ *                                                with the value of `$unit`, to determine CSS text
+ *                                                size unit. Default 8 (pt).
+ *     @type int      $largest                    Largest font size used to display tags. Paired
+ *                                                with the value of `$unit`, to determine CSS text
+ *                                                size unit. Default 22 (pt).
+ *     @type string   $unit                       CSS text size unit to use with the `$smallest`
+ *                                                and `$largest` values. Accepts any valid CSS text
+ *                                                size unit. Default 'pt'.
+ *     @type int      $number                     The number of tags to return. Accepts any
+ *                                                positive integer or zero to return all.
+ *                                                Default 0.
+ *     @type string   $format                     Format to display the tag cloud in. Accepts 'flat'
+ *                                                (tags separated with spaces), 'list' (tags displayed
+ *                                                in an unordered list), or 'array' (returns an array).
+ *                                                Default 'flat'.
+ *     @type string   $separator                  HTML or text to separate the tags. Default "\n" (newline).
+ *     @type string   $orderby                    Value to order tags by. Accepts 'name' or 'count'.
+ *                                                Default 'name'. The {@see 'tag_cloud_sort'} filter
+ *                                                can also affect how tags are sorted.
+ *     @type string   $order                      How to order the tags. Accepts 'ASC' (ascending),
+ *                                                'DESC' (descending), or 'RAND' (random). Default 'ASC'.
+ *     @type int|bool $filter                     Whether to enable filtering of the final output
+ *                                                via {@see 'wp_generate_tag_cloud'}. Default 1|true.
+ *     @type string   $topic_count_text           Nooped plural text from _n_noop() to supply to
+ *                                                tag tooltips. Default null.
+ *     @type callable $topic_count_text_callback  Callback used to generate nooped plural text for
+ *                                                tag tooltips based on the count. Default null.
+ *     @type callable $topic_count_scale_callback Callback used to determine the tag count scaling
+ *                                                value. Default default_topic_count_scale().
+ * }
  * @return string|array Tag cloud as a string or an array, depending on 'format' argument.
  */
 function wp_generate_tag_cloud( $tags, $args = '' ) {
@@ -824,7 +849,7 @@ function wp_generate_tag_cloud( $tags, $args = '' ) {
        }
 
        /**
-        * Filter how the items in a tag cloud are sorted.
+        * Filters how the items in a tag cloud are sorted.
         *
         * @since 2.8.0
         *
@@ -902,7 +927,7 @@ function wp_generate_tag_cloud( $tags, $args = '' ) {
        }
 
        /**
-        * Filter the data used to generate the tag cloud.
+        * Filters the data used to generate the tag cloud.
         *
         * @since 4.3.0
         *
@@ -934,7 +959,7 @@ function wp_generate_tag_cloud( $tags, $args = '' ) {
 
        if ( $args['filter'] ) {
                /**
-                * Filter the generated output of a tag cloud.
+                * Filters the generated output of a tag cloud.
                 *
                 * The filter is only evaluated if a true value is passed
                 * to the $filter argument in wp_generate_tag_cloud().
@@ -1067,7 +1092,7 @@ function get_tag_link( $tag ) {
 function get_the_tags( $id = 0 ) {
 
        /**
-        * Filter the array of tags for the given post.
+        * Filters the array of tags for the given post.
         *
         * @since 2.3.0
         *
@@ -1092,7 +1117,7 @@ function get_the_tags( $id = 0 ) {
 function get_the_tag_list( $before = '', $sep = '', $after = '', $id = 0 ) {
 
        /**
-        * Filter the tags list for a given post.
+        * Filters the tags list for a given post.
         *
         * @since 2.3.0
         *
@@ -1160,7 +1185,7 @@ function term_description( $term = 0, $taxonomy = 'post_tag' ) {
  *
  * @param int|object $post Post ID or object.
  * @param string $taxonomy Taxonomy name.
- * @return array|false|WP_Error Array of term objects on success, false if there are no terms
+ * @return array|false|WP_Error Array of WP_Term objects on success, false if there are no terms
  *                              or the post does not exist, WP_Error on failure.
  */
 function get_the_terms( $post, $taxonomy ) {
@@ -1171,20 +1196,13 @@ function get_the_terms( $post, $taxonomy ) {
        if ( false === $terms ) {
                $terms = wp_get_object_terms( $post->ID, $taxonomy );
                if ( ! is_wp_error( $terms ) ) {
-                       $to_cache = array();
-                       foreach ( $terms as $key => $term ) {
-                               $to_cache[ $key ] = $term->data;
-                       }
-                       wp_cache_add( $post->ID, $to_cache, $taxonomy . '_relationships' );
+                       $term_ids = wp_list_pluck( $terms, 'term_id' );
+                       wp_cache_add( $post->ID, $term_ids, $taxonomy . '_relationships' );
                }
        }
 
-       if ( ! is_wp_error( $terms ) ) {
-               $terms = array_map( 'get_term', $terms );
-       }
-
        /**
-        * Filter the list of terms attached to the given post.
+        * Filters the list of terms attached to the given post.
         *
         * @since 3.1.0
         *
@@ -1232,7 +1250,7 @@ function get_the_term_list( $id, $taxonomy, $before = '', $sep = '', $after = ''
        }
 
        /**
-        * Filter the term links for a given taxonomy.
+        * Filters the term links for a given taxonomy.
         *
         * The dynamic portion of the filter name, `$taxonomy`, refers
         * to the taxonomy slug.
@@ -1265,7 +1283,7 @@ function the_terms( $id, $taxonomy, $before = '', $sep = ', ', $after = '' ) {
                return false;
 
        /**
-        * Filter the list of terms to display.
+        * Filters the list of terms to display.
         *
         * @since 2.9.0
         *
index a89b41065f6c4ab64606dcb8af5a9bfadede6dd1..08d18c0a657b72f26217eb5e7d5d019bc237ea3f 100644 (file)
  * Retrieve list of category objects.
  *
  * If you change the type to 'link' in the arguments, then the link categories
- * will be returned instead. Also all categories will be updated to be backwards
+ * will be returned instead. Also all categories will be updated to be backward
  * compatible with pre-2.3 plugins and themes.
  *
  * @since 2.1.0
  * @see get_terms() Type of arguments that can be changed.
  *
  * @param string|array $args {
- *     Optional. Arguments to retrieve categories. See {@see get_terms()} for additional options.
+ *     Optional. Arguments to retrieve categories. See get_terms() for additional options.
  *
  *     @type string $taxonomy Taxonomy to retrieve terms for. In this case, default 'category'.
  * }
@@ -30,19 +30,19 @@ function get_categories( $args = '' ) {
        $taxonomy = $args['taxonomy'];
 
        /**
-        * Filter the taxonomy used to retrieve terms when calling {@see get_categories()}.
+        * Filters the taxonomy used to retrieve terms when calling get_categories().
         *
         * @since 2.7.0
         *
         * @param string $taxonomy Taxonomy to retrieve terms from.
-        * @param array  $args     An array of arguments. See {@see get_terms()}.
+        * @param array  $args     An array of arguments. See get_terms().
         */
        $taxonomy = apply_filters( 'get_categories_taxonomy', $taxonomy, $args );
 
        // Back compat
        if ( isset($args['type']) && 'link' == $args['type'] ) {
                /* translators: 1: "type => link", 2: "taxonomy => link_category" alternative */
-               _deprecated_argument( __FUNCTION__, '3.0',
+               _deprecated_argument( __FUNCTION__, '3.0.0',
                        sprintf( __( '%1$s is deprecated. Use %2$s instead.' ),
                                '<code>type => link</code>',
                                '<code>taxonomy => link_category</code>'
@@ -77,7 +77,7 @@ function get_categories( $args = '' ) {
  * If you look at get_term(), then both types will be passed through several
  * filters and finally sanitized based on the $filter parameter value.
  *
- * The category will converted to maintain backwards compatibility.
+ * The category will converted to maintain backward compatibility.
  *
  * @since 1.5.1
  *
@@ -271,7 +271,7 @@ function get_tags( $args = '' ) {
        }
 
        /**
-        * Filter the array of term objects returned for the 'post_tag' taxonomy.
+        * Filters the array of term objects returned for the 'post_tag' taxonomy.
         *
         * @since 2.3.0
         *
index 6031cc6a875bfed49eef9253051c5a84b6d2388c..2ae3a97f4fcb2cd91445fed4b9540d9b553705e6 100644 (file)
@@ -3,7 +3,7 @@
 ##
 ## Certificate data from Mozilla as of: Wed Sep 16 08:58:11 2015
 ## Includes a WordPress Modification - We include the 'legacy' 1024bit certificates
-## for backwards compatibility. See https://core.trac.wordpress.org/ticket/34935#comment:10
+## for backward compatibility. See https://core.trac.wordpress.org/ticket/34935#comment:10
 ##
 ## This is a bundle of X.509 certificates of public Certificate Authorities
 ## (CA). These were automatically extracted from Mozilla's root certificates
index 2fee046d41f27f44b4a2a965e0fbfc456cbcd0c9..a8e31983e880f24a0baf17d318d010ce07453086 100644 (file)
@@ -168,7 +168,7 @@ class IXR_Value {
     {
         $expected = 0;
         foreach ($array as $key => $value) {
-            if ((string)$key != (string)$expected) {
+            if ((string)$key !== (string)$expected) {
                 return true;
             }
             $expected++;
@@ -249,7 +249,7 @@ class IXR_Message
         $element_limit = 30000;
         if ( function_exists( 'apply_filters' ) ) {
             /**
-             * Filter the number of elements to parse in an XML-RPC response.
+             * Filters the number of elements to parse in an XML-RPC response.
              *
              * @since 4.0.0
              *
@@ -273,7 +273,7 @@ class IXR_Message
         $chunk_size = 262144;
 
         /**
-         * Filter the chunk size that can be used to parse an XML-RPC reponse message.
+         * Filters the chunk size that can be used to parse an XML-RPC reponse message.
          *
          * @since 4.4.0
          *
index f0ae19633dd6bfd0afcadfa9b052214cf1309e73..d525fe32e6e947db095e8c8b17a8e0ccd48100f1 100644 (file)
@@ -3,11 +3,19 @@
 if ( ! class_exists( 'SimplePie', false ) )
        require_once( ABSPATH . WPINC . '/class-simplepie.php' );
 
+/**
+ * Core class used to implement a feed cache.
+ *
+ * @since 2.8.0
+ *
+ * @see SimplePie_Cache
+ */
 class WP_Feed_Cache extends SimplePie_Cache {
+
        /**
-        * Create a new SimplePie_Cache object
+        * Creates a new SimplePie_Cache object.
         *
-        * @static
+        * @since 2.8.0
         * @access public
         *
         * @param string $location  URL location (scheme is used to determine handler).
@@ -20,14 +28,49 @@ class WP_Feed_Cache extends SimplePie_Cache {
        }
 }
 
+/**
+ * Core class used to implement feed cache transients.
+ *
+ * @since 2.8.0
+ */
 class WP_Feed_Cache_Transient {
+
+       /**
+        * Holds the transient name.
+        *
+        * @since 2.8.0
+        * @access public
+        * @var string
+        */
        public $name;
+
+       /**
+        * Holds the transient mod name.
+        *
+        * @since 2.8.0
+        * @access public
+        * @var string
+        */
        public $mod_name;
-       public $lifetime = 43200; //Default lifetime in cache of 12 hours
 
        /**
-        * Class instantiator.
-        * 
+        * Holds the cache duration in seconds.
+        *
+        * Defaults to 43200 seconds (12 hours).
+        *
+        * @since 2.8.0
+        * @access public
+        * @var int
+        */
+       public $lifetime = 43200;
+
+       /**
+        * Constructor.
+        *
+        * @since 2.8.0
+        * @since 3.2.0 Updated to use a PHP5 constructor.
+        * @access public
+        *
         * @param string $location  URL location (scheme is used to determine handler).
         * @param string $filename  Unique identifier for cache object.
         * @param string $extension 'spi' or 'spc'.
@@ -38,7 +81,7 @@ class WP_Feed_Cache_Transient {
 
                $lifetime = $this->lifetime;
                /**
-                * Filter the transient lifetime of the feed cache.
+                * Filters the transient lifetime of the feed cache.
                 *
                 * @since 2.8.0
                 *
@@ -49,6 +92,9 @@ class WP_Feed_Cache_Transient {
        }
 
        /**
+        * Sets the transient.
+        *
+        * @since 2.8.0
         * @access public
         *
         * @param SimplePie $data Data to save.
@@ -65,28 +111,48 @@ class WP_Feed_Cache_Transient {
        }
 
        /**
+        * Gets the transient.
+        *
+        * @since 2.8.0
         * @access public
+        *
+        * @return mixed Transient value.
         */
        public function load() {
                return get_transient($this->name);
        }
 
        /**
+        * Gets mod transient.
+        *
+        * @since 2.8.0
         * @access public
+        *
+        * @return mixed Transient value.
         */
        public function mtime() {
                return get_transient($this->mod_name);
        }
 
        /**
+        * Sets mod transient.
+        *
+        * @since 2.8.0
         * @access public
+        *
+        * @return bool False if value was not set and true if value was set.
         */
        public function touch() {
                return set_transient($this->mod_name, time(), $this->lifetime);
        }
 
        /**
+        * Deletes transients.
+        *
+        * @since 2.8.0
         * @access public
+        *
+        * @return true Always true.
         */
        public function unlink() {
                delete_transient($this->name);
@@ -95,8 +161,32 @@ class WP_Feed_Cache_Transient {
        }
 }
 
+/**
+ * Core class for fetching remote files and reading local files with SimplePie.
+ *
+ * @since 2.8.0
+ *
+ * @see SimplePie_File
+ */
 class WP_SimplePie_File extends SimplePie_File {
 
+       /**
+        * Constructor.
+        *
+        * @since 2.8.0
+        * @since 3.2.0 Updated to use a PHP5 constructor.
+        * @access public
+        *
+        * @param string       $url             Remote file URL.
+        * @param integer      $timeout         Optional. How long the connection should stay open in seconds.
+        *                                      Default 10.
+        * @param integer      $redirects       Optional. The number of allowed redirects. Default 5.
+        * @param string|array $headers         Optional. Array or string of headers to send with the request.
+        *                                      Default null.
+        * @param string       $useragent       Optional. User-agent value sent. Default null.
+        * @param boolean      $force_fsockopen Optional. Whether to force opening internet or unix domain socket
+        *                                      connection or not. Default false.
+        */
        public function __construct($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) {
                $this->url = $url;
                $this->timeout = $timeout;
@@ -136,15 +226,31 @@ class WP_SimplePie_File extends SimplePie_File {
 }
 
 /**
- * WordPress SimplePie Sanitization Class
+ * Core class used to implement SimpliePie feed sanitization.
  *
- * Extension of the SimplePie_Sanitize class to use KSES, because
- * we cannot universally count on DOMDocument being available
+ * Extends the SimplePie_Sanitize class to use KSES, because
+ * we cannot universally count on DOMDocument being available.
  *
- * @package WordPress
  * @since 3.5.0
+ *
+ * @see SimplePie_Sanitize
  */
 class WP_SimplePie_Sanitize_KSES extends SimplePie_Sanitize {
+
+       /**
+        * WordPress SimplePie sanitization using KSES.
+        *
+        * Sanitizes the incoming data, to ensure that it matches the type of data expected, using KSES.
+        *
+        * @since 3.5.0
+        * @access public
+        *
+        * @param mixed   $data The data that needs to be sanitized.
+        * @param integer $type The type of data that it's supposed to be.
+        * @param string  $base Optional. The `xml:base` value to use when converting relative
+        *                      URLs to absolute ones. Default empty.
+        * @return mixed Sanitized data.
+        */
        public function sanitize( $data, $type, $base = '' ) {
                $data = trim( $data );
                if ( $type & SIMPLEPIE_CONSTRUCT_MAYBE_HTML ) {
index 838fbe8140d8101047c9cd09c73d52ce4289dc72..d3a893787cb18847e7697e35edb0df756aa9f7b9 100644 (file)
@@ -7,6 +7,13 @@
  * @since 2.7.0
  */
 
+if ( ! class_exists( 'Requests' ) ) {
+       require( ABSPATH . WPINC . '/class-requests.php' );
+
+       Requests::register_autoloader();
+       Requests::set_certificate_path( ABSPATH . WPINC . '/certificates/ca-bundle.crt' );
+}
+
 /**
  * Core class used for managing HTTP transports and making HTTP requests.
  *
@@ -110,7 +117,7 @@ class WP_Http {
         *                                             Default '1.0'.
         *     @type string       $user-agent          User-agent value sent.
         *                                             Default WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ).
-        *     @type bool         $reject_unsafe_urls  Whether to pass URLs through {@see wp_http_validate_url()}.
+        *     @type bool         $reject_unsafe_urls  Whether to pass URLs through wp_http_validate_url().
         *                                             Default false.
         *     @type bool         $blocking            Whether the calling code requires the result of the request.
         *                                             If set to false, the request will be sent to the remote server,
@@ -146,7 +153,7 @@ class WP_Http {
                $defaults = array(
                        'method' => 'GET',
                        /**
-                        * Filter the timeout value for an HTTP request.
+                        * Filters the timeout value for an HTTP request.
                         *
                         * @since 2.7.0
                         *
@@ -155,7 +162,7 @@ class WP_Http {
                         */
                        'timeout' => apply_filters( 'http_request_timeout', 5 ),
                        /**
-                        * Filter the number of redirects allowed during an HTTP request.
+                        * Filters the number of redirects allowed during an HTTP request.
                         *
                         * @since 2.7.0
                         *
@@ -163,7 +170,7 @@ class WP_Http {
                         */
                        'redirection' => apply_filters( 'http_request_redirection_count', 5 ),
                        /**
-                        * Filter the version of the HTTP protocol used in a request.
+                        * Filters the version of the HTTP protocol used in a request.
                         *
                         * @since 2.7.0
                         *
@@ -172,7 +179,7 @@ class WP_Http {
                         */
                        'httpversion' => apply_filters( 'http_request_version', '1.0' ),
                        /**
-                        * Filter the user agent value sent with an HTTP request.
+                        * Filters the user agent value sent with an HTTP request.
                         *
                         * @since 2.7.0
                         *
@@ -180,7 +187,7 @@ class WP_Http {
                         */
                        'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) ),
                        /**
-                        * Filter whether to pass URLs through wp_http_validate_url() in an HTTP request.
+                        * Filters whether to pass URLs through wp_http_validate_url() in an HTTP request.
                         *
                         * @since 3.6.0
                         *
@@ -210,7 +217,7 @@ class WP_Http {
 
                $r = wp_parse_args( $args, $defaults );
                /**
-                * Filter the arguments used in an HTTP request.
+                * Filters the arguments used in an HTTP request.
                 *
                 * @since 2.7.0
                 *
@@ -224,7 +231,7 @@ class WP_Http {
                        $r['_redirection'] = $r['redirection'];
 
                /**
-                * Filter whether to preempt an HTTP request's return value.
+                * Filters whether to preempt an HTTP request's return value.
                 *
                 * Returning a non-false value from the filter will short-circuit the HTTP request and return
                 * early with that value. A filter should return either:
@@ -247,8 +254,9 @@ class WP_Http {
                        return $pre;
 
                if ( function_exists( 'wp_kses_bad_protocol' ) ) {
-                       if ( $r['reject_unsafe_urls'] )
+                       if ( $r['reject_unsafe_urls'] ) {
                                $url = wp_http_validate_url( $url );
+                       }
                        if ( $url ) {
                                $url = wp_kses_bad_protocol( $url, array( 'http', 'https', 'ssl' ) );
                        }
@@ -256,107 +264,204 @@ class WP_Http {
 
                $arrURL = @parse_url( $url );
 
-               if ( empty( $url ) || empty( $arrURL['scheme'] ) )
+               if ( empty( $url ) || empty( $arrURL['scheme'] ) ) {
                        return new WP_Error('http_request_failed', __('A valid URL was not provided.'));
+               }
 
-               if ( $this->block_request( $url ) )
+               if ( $this->block_request( $url ) ) {
                        return new WP_Error( 'http_request_failed', __( 'User has blocked requests through HTTP.' ) );
-
-               /*
-                * Determine if this is a https call and pass that on to the transport functions
-                * so that we can blacklist the transports that do not support ssl verification
-                */
-               $r['ssl'] = $arrURL['scheme'] == 'https' || $arrURL['scheme'] == 'ssl';
-
-               // Determine if this request is to OUR install of WordPress.
-               $homeURL = parse_url( get_bloginfo( 'url' ) );
-               $r['local'] = 'localhost' == $arrURL['host'] || ( isset( $homeURL['host'] ) && $homeURL['host'] == $arrURL['host'] );
-               unset( $homeURL );
-
-               /*
-                * If we are streaming to a file but no filename was given drop it in the WP temp dir
-                * and pick its name using the basename of the $url.
-                */
-               if ( $r['stream']  && empty( $r['filename'] ) ) {
-                       $r['filename'] = get_temp_dir() . wp_unique_filename( get_temp_dir(), basename( $url ) );
                }
 
-               /*
-                * Force some settings if we are streaming to a file and check for existence and perms
-                * of destination directory.
-                */
+               // If we are streaming to a file but no filename was given drop it in the WP temp dir
+               // and pick its name using the basename of the $url
                if ( $r['stream'] ) {
+                       if ( empty( $r['filename'] ) ) {
+                               $r['filename'] = get_temp_dir() . basename( $url );
+                       }
+
+                       // Force some settings if we are streaming to a file and check for existence and perms of destination directory
                        $r['blocking'] = true;
-                       if ( ! wp_is_writable( dirname( $r['filename'] ) ) )
+                       if ( ! wp_is_writable( dirname( $r['filename'] ) ) ) {
                                return new WP_Error( 'http_request_failed', __( 'Destination directory for file streaming does not exist or is not writable.' ) );
+                       }
                }
 
-               if ( is_null( $r['headers'] ) )
+               if ( is_null( $r['headers'] ) ) {
                        $r['headers'] = array();
+               }
 
+               // WP allows passing in headers as a string, weirdly.
                if ( ! is_array( $r['headers'] ) ) {
-                       $processedHeaders = self::processHeaders( $r['headers'], $url );
+                       $processedHeaders = WP_Http::processHeaders( $r['headers'] );
                        $r['headers'] = $processedHeaders['headers'];
                }
 
-               if ( isset( $r['headers']['User-Agent'] ) ) {
-                       $r['user-agent'] = $r['headers']['User-Agent'];
-                       unset( $r['headers']['User-Agent'] );
-               }
+               // Setup arguments
+               $headers = $r['headers'];
+               $data = $r['body'];
+               $type = $r['method'];
+               $options = array(
+                       'timeout' => $r['timeout'],
+                       'useragent' => $r['user-agent'],
+                       'blocking' => $r['blocking'],
+                       'hooks' => new Requests_Hooks(),
+               );
+
+               // Ensure redirects follow browser behaviour.
+               $options['hooks']->register( 'requests.before_redirect', array( get_class(), 'browser_redirect_compatibility' ) );
 
-               if ( isset( $r['headers']['user-agent'] ) ) {
-                       $r['user-agent'] = $r['headers']['user-agent'];
-                       unset( $r['headers']['user-agent'] );
+               if ( $r['stream'] ) {
+                       $options['filename'] = $r['filename'];
+               }
+               if ( empty( $r['redirection'] ) ) {
+                       $options['follow_redirects'] = false;
+               } else {
+                       $options['redirects'] = $r['redirection'];
                }
 
-               if ( '1.1' == $r['httpversion'] && !isset( $r['headers']['connection'] ) ) {
-                       $r['headers']['connection'] = 'close';
+               // Use byte limit, if we can
+               if ( isset( $r['limit_response_size'] ) ) {
+                       $options['max_bytes'] = $r['limit_response_size'];
                }
 
-               // Construct Cookie: header if any cookies are set.
-               self::buildCookieHeader( $r );
+               // If we've got cookies, use and convert them to Requests_Cookie.
+               if ( ! empty( $r['cookies'] ) ) {
+                       $options['cookies'] = WP_Http::normalize_cookies( $r['cookies'] );
+               }
 
-               // Avoid issues where mbstring.func_overload is enabled.
-               mbstring_binary_safe_encoding();
+               // SSL certificate handling
+               if ( ! $r['sslverify'] ) {
+                       $options['verify'] = false;
+               } else {
+                       $options['verify'] = $r['sslcertificates'];
+               }
 
-               if ( ! isset( $r['headers']['Accept-Encoding'] ) ) {
-                       if ( $encoding = WP_Http_Encoding::accept_encoding( $url, $r ) )
-                               $r['headers']['Accept-Encoding'] = $encoding;
+               // All non-GET/HEAD requests should put the arguments in the form body.
+               if ( 'HEAD' !== $type && 'GET' !== $type ) {
+                       $options['data_format'] = 'body';
                }
 
-               if ( ( ! is_null( $r['body'] ) && '' != $r['body'] ) || 'POST' == $r['method'] || 'PUT' == $r['method'] ) {
-                       if ( is_array( $r['body'] ) || is_object( $r['body'] ) ) {
-                               $r['body'] = http_build_query( $r['body'], null, '&' );
+               /**
+                * Filters whether SSL should be verified for non-local requests.
+                *
+                * @since 2.8.0
+                *
+                * @param bool $ssl_verify Whether to verify the SSL connection. Default true.
+                */
+               $options['verify'] = apply_filters( 'https_ssl_verify', $options['verify'] );
+
+               // Check for proxies.
+               $proxy = new WP_HTTP_Proxy();
+               if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) {
+                       $options['proxy'] = new Requests_Proxy_HTTP( $proxy->host() . ':' . $proxy->port() );
 
-                               if ( ! isset( $r['headers']['Content-Type'] ) )
-                                       $r['headers']['Content-Type'] = 'application/x-www-form-urlencoded; charset=' . get_option( 'blog_charset' );
+                       if ( $proxy->use_authentication() ) {
+                               $options['proxy']->use_authentication = true;
+                               $options['proxy']->user = $proxy->username();
+                               $options['proxy']->pass = $proxy->password();
                        }
+               }
+
+               try {
+                       $requests_response = Requests::request( $url, $headers, $data, $type, $options );
 
-                       if ( '' === $r['body'] )
-                               $r['body'] = null;
+                       // Convert the response into an array
+                       $http_response = new WP_HTTP_Requests_Response( $requests_response, $r['filename'] );
+                       $response = $http_response->to_array();
 
-                       if ( ! isset( $r['headers']['Content-Length'] ) && ! isset( $r['headers']['content-length'] ) )
-                               $r['headers']['Content-Length'] = strlen( $r['body'] );
+                       // Add the original object to the array.
+                       $response['http_response'] = $http_response;
+               }
+               catch ( Requests_Exception $e ) {
+                       $response = new WP_Error( 'http_request_failed', $e->getMessage() );
                }
 
-               $response = $this->_dispatch_request( $url, $r );
+               /**
+                * Fires after an HTTP API response is received and before the response is returned.
+                *
+                * @since 2.8.0
+                *
+                * @param array|WP_Error $response HTTP response or WP_Error object.
+                * @param string         $context  Context under which the hook is fired.
+                * @param string         $class    HTTP transport used.
+                * @param array          $args     HTTP request arguments.
+                * @param string         $url      The request URL.
+                */
+               do_action( 'http_api_debug', $response, 'response', 'Requests', $r, $url );
+               if ( is_wp_error( $response ) ) {
+                       return $response;
+               }
 
-               reset_mbstring_encoding();
+               if ( ! $r['blocking'] ) {
+                       return array(
+                               'headers' => array(),
+                               'body' => '',
+                               'response' => array(
+                                       'code' => false,
+                                       'message' => false,
+                               ),
+                               'cookies' => array(),
+                               'http_response' => null,
+                       );
+               }
 
-               if ( is_wp_error( $response ) )
-                       return $response;
+               /**
+                * Filters the HTTP API response immediately before the response is returned.
+                *
+                * @since 2.9.0
+                *
+                * @param array  $response HTTP response.
+                * @param array  $r        HTTP request arguments.
+                * @param string $url      The request URL.
+                */
+               return apply_filters( 'http_response', $response, $r, $url );
+       }
 
-               // Append cookies that were used in this request to the response
-               if ( ! empty( $r['cookies'] ) ) {
-                       $cookies_set = wp_list_pluck( $response['cookies'], 'name' );
-                       foreach ( $r['cookies'] as $cookie ) {
-                               if ( ! in_array( $cookie->name, $cookies_set ) && $cookie->test( $url ) ) {
-                                       $response['cookies'][] = $cookie;
-                               }
+       /**
+        * Normalizes cookies for using in Requests.
+        *
+        * @since 4.6.0
+        * @access public
+        * @static
+        *
+        * @param array $cookies List of cookies to send with the request.
+        * @return Requests_Cookie_Jar Cookie holder object.
+        */
+       public static function normalize_cookies( $cookies ) {
+               $cookie_jar = new Requests_Cookie_Jar();
+
+               foreach ( $cookies as $name => $value ) {
+                       if ( $value instanceof WP_Http_Cookie ) {
+                               $cookie_jar[ $value->name ] = new Requests_Cookie( $value->name, $value->value, $value->get_attributes() );
+                       } elseif ( is_string( $value ) ) {
+                               $cookie_jar[ $name ] = new Requests_Cookie( $name, $value );
                        }
                }
 
-               return $response;
+               return $cookie_jar;
+       }
+
+       /**
+        * Match redirect behaviour to browser handling.
+        *
+        * Changes 302 redirects from POST to GET to match browser handling. Per
+        * RFC 7231, user agents can deviate from the strict reading of the
+        * specification for compatibility purposes.
+        *
+        * @since 4.6.0
+        * @access public
+        * @static
+        *
+        * @param string            $location URL to redirect to.
+        * @param array             $headers  Headers for the redirect.
+        * @param array             $options  Redirect request options.
+        * @param Requests_Response $original Response object.
+        */
+       public static function browser_redirect_compatibility( $location, $headers, $data, &$options, $original ) {
+               // Browser compat
+               if ( $original->status_code === 302 ) {
+                       $options['type'] = Requests::GET;
+               }
        }
 
        /**
@@ -374,7 +479,7 @@ class WP_Http {
                $transports = array( 'curl', 'streams' );
 
                /**
-                * Filter which HTTP transports are available and in what order.
+                * Filters which HTTP transports are available and in what order.
                 *
                 * @since 3.7.0
                 *
@@ -432,24 +537,14 @@ class WP_Http {
 
                $response = $transports[$class]->request( $url, $args );
 
-               /**
-                * Fires after an HTTP API response is received and before the response is returned.
-                *
-                * @since 2.8.0
-                *
-                * @param array|WP_Error $response HTTP response or WP_Error object.
-                * @param string         $context  Context under which the hook is fired.
-                * @param string         $class    HTTP transport used.
-                * @param array          $args     HTTP request arguments.
-                * @param string         $url      The request URL.
-                */
+               /** This action is documented in wp-includes/class-http.php */
                do_action( 'http_api_debug', $response, 'response', $class, $args, $url );
 
                if ( is_wp_error( $response ) )
                        return $response;
 
                /**
-                * Filter the HTTP API response immediately before the response is returned.
+                * Filters the HTTP API response immediately before the response is returned.
                 *
                 * @since 2.9.0
                 *
@@ -643,7 +738,7 @@ class WP_Http {
         *
         * Based off the HTTP http_encoding_dechunk function.
         *
-        * @link http://tools.ietf.org/html/rfc2616#section-19.4.6 Process for chunked decoding.
+        * @link https://tools.ietf.org/html/rfc2616#section-19.4.6 Process for chunked decoding.
         *
         * @access public
         * @since 2.7.0
@@ -718,7 +813,7 @@ class WP_Http {
                // Don't block requests back to ourselves by default.
                if ( 'localhost' == $check['host'] || ( isset( $home['host'] ) && $home['host'] == $check['host'] ) ) {
                        /**
-                        * Filter whether to block local requests through the proxy.
+                        * Filters whether to block local requests through the proxy.
                         *
                         * @since 2.8.0
                         *
index 3e19f3ba508ab54b6a2ee3e5a49b5fd14689c9e6..9790d266f67b6532410ac24adcb16df80f3331a2 100644 (file)
@@ -38,7 +38,7 @@ class WP_oEmbed {
        public static $early_providers = array();
 
        /**
-        * A list of private/protected methods, used for backwards compatibility.
+        * A list of private/protected methods, used for backward compatibility.
         *
         * @since 4.2.0
         * @access private
@@ -115,7 +115,7 @@ class WP_oEmbed {
                self::$early_providers = array();
 
                /**
-                * Filter the list of whitelisted oEmbed providers.
+                * Filters the list of whitelisted oEmbed providers.
                 *
                 * Since WordPress 4.4, oEmbed discovery is enabled for all users and allows embedding of sanitized
                 * iframes. The providers in this list are whitelisted, meaning they are trusted and allowed to
@@ -192,7 +192,7 @@ class WP_oEmbed {
        }
 
        /**
-        * Exposes private/protected methods for backwards compatibility.
+        * Exposes private/protected methods for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -221,6 +221,7 @@ class WP_oEmbed {
         * @return false|string False on failure, otherwise the oEmbed provider URL.
         */
        public function get_provider( $url, $args = '' ) {
+               $args = wp_parse_args( $args );
 
                $provider = false;
 
@@ -315,6 +316,8 @@ class WP_oEmbed {
         * @return false|string False on failure, otherwise the UNSANITIZED (and potentially unsafe) HTML that should be used to embed.
         */
        public function get_html( $url, $args = '' ) {
+               $args = wp_parse_args( $args );
+
                /**
                 * Filters the oEmbed result before any HTTP requests are made.
                 *
@@ -343,7 +346,7 @@ class WP_oEmbed {
                }
 
                /**
-                * Filter the HTML returned by the oEmbed provider.
+                * Filters the HTML returned by the oEmbed provider.
                 *
                 * @since 2.9.0
                 *
@@ -370,7 +373,7 @@ class WP_oEmbed {
                );
 
                /**
-                * Filter oEmbed remote get arguments.
+                * Filters oEmbed remote get arguments.
                 *
                 * @since 4.0.0
                 *
@@ -386,7 +389,7 @@ class WP_oEmbed {
                if ( $html = wp_remote_retrieve_body( $request ) ) {
 
                        /**
-                        * Filter the link types that contain oEmbed provider URLs.
+                        * Filters the link types that contain oEmbed provider URLs.
                         *
                         * @since 2.9.0
                         *
@@ -457,7 +460,7 @@ class WP_oEmbed {
                $provider = add_query_arg( 'url', urlencode($url), $provider );
 
                /**
-                * Filter the oEmbed URL to be fetched.
+                * Filters the oEmbed URL to be fetched.
                 *
                 * @since 2.9.0
                 *
@@ -620,7 +623,7 @@ class WP_oEmbed {
                }
 
                /**
-                * Filter the returned oEmbed HTML.
+                * Filters the returned oEmbed HTML.
                 *
                 * Use this filter to add support for custom data types, or to filter the result.
                 *
diff --git a/wp-includes/class-requests.php b/wp-includes/class-requests.php
new file mode 100644 (file)
index 0000000..5a6257a
--- /dev/null
@@ -0,0 +1,978 @@
+<?php
+/**
+ * Requests for PHP
+ *
+ * Inspired by Requests for Python.
+ *
+ * Based on concepts from SimplePie_File, RequestCore and WP_Http.
+ *
+ * @package Requests
+ */
+
+/**
+ * Requests for PHP
+ *
+ * Inspired by Requests for Python.
+ *
+ * Based on concepts from SimplePie_File, RequestCore and WP_Http.
+ *
+ * @package Requests
+ */
+class Requests {
+       /**
+        * POST method
+        *
+        * @var string
+        */
+       const POST = 'POST';
+
+       /**
+        * PUT method
+        *
+        * @var string
+        */
+       const PUT = 'PUT';
+
+       /**
+        * GET method
+        *
+        * @var string
+        */
+       const GET = 'GET';
+
+       /**
+        * HEAD method
+        *
+        * @var string
+        */
+       const HEAD = 'HEAD';
+
+       /**
+        * DELETE method
+        *
+        * @var string
+        */
+       const DELETE = 'DELETE';
+
+       /**
+        * OPTIONS method
+        *
+        * @var string
+        */
+       const OPTIONS = 'OPTIONS';
+
+       /**
+        * TRACE method
+        *
+        * @var string
+        */
+       const TRACE = 'TRACE';
+
+       /**
+        * PATCH method
+        *
+        * @link https://tools.ietf.org/html/rfc5789
+        * @var string
+        */
+       const PATCH = 'PATCH';
+
+       /**
+        * Default size of buffer size to read streams
+        *
+        * @var integer
+        */
+       const BUFFER_SIZE = 1160;
+
+       /**
+        * Current version of Requests
+        *
+        * @var string
+        */
+       const VERSION = '1.7';
+
+       /**
+        * Registered transport classes
+        *
+        * @var array
+        */
+       protected static $transports = array();
+
+       /**
+        * Selected transport name
+        *
+        * Use {@see get_transport()} instead
+        *
+        * @var array
+        */
+       public static $transport = array();
+
+       /**
+        * Default certificate path.
+        *
+        * @see Requests::get_certificate_path()
+        * @see Requests::set_certificate_path()
+        *
+        * @var string
+        */
+       protected static $certificate_path;
+
+       /**
+        * This is a static class, do not instantiate it
+        *
+        * @codeCoverageIgnore
+        */
+       private function __construct() {}
+
+       /**
+        * Autoloader for Requests
+        *
+        * Register this with {@see register_autoloader()} if you'd like to avoid
+        * having to create your own.
+        *
+        * (You can also use `spl_autoload_register` directly if you'd prefer.)
+        *
+        * @codeCoverageIgnore
+        *
+        * @param string $class Class name to load
+        */
+       public static function autoloader($class) {
+               // Check that the class starts with "Requests"
+               if (strpos($class, 'Requests') !== 0) {
+                       return;
+               }
+
+               $file = str_replace('_', '/', $class);
+               if (file_exists(dirname(__FILE__) . '/' . $file . '.php')) {
+                       require_once(dirname(__FILE__) . '/' . $file . '.php');
+               }
+       }
+
+       /**
+        * Register the built-in autoloader
+        *
+        * @codeCoverageIgnore
+        */
+       public static function register_autoloader() {
+               spl_autoload_register(array('Requests', 'autoloader'));
+       }
+
+       /**
+        * Register a transport
+        *
+        * @param string $transport Transport class to add, must support the Requests_Transport interface
+        */
+       public static function add_transport($transport) {
+               if (empty(self::$transports)) {
+                       self::$transports = array(
+                               'Requests_Transport_cURL',
+                               'Requests_Transport_fsockopen',
+                       );
+               }
+
+               self::$transports = array_merge(self::$transports, array($transport));
+       }
+
+       /**
+        * Get a working transport
+        *
+        * @throws Requests_Exception If no valid transport is found (`notransport`)
+        * @return Requests_Transport
+        */
+       protected static function get_transport($capabilities = array()) {
+               // Caching code, don't bother testing coverage
+               // @codeCoverageIgnoreStart
+               // array of capabilities as a string to be used as an array key
+               ksort($capabilities);
+               $cap_string = serialize($capabilities);
+
+               // Don't search for a transport if it's already been done for these $capabilities
+               if (isset(self::$transport[$cap_string]) && self::$transport[$cap_string] !== null) {
+                       return new self::$transport[$cap_string]();
+               }
+               // @codeCoverageIgnoreEnd
+
+               if (empty(self::$transports)) {
+                       self::$transports = array(
+                               'Requests_Transport_cURL',
+                               'Requests_Transport_fsockopen',
+                       );
+               }
+
+               // Find us a working transport
+               foreach (self::$transports as $class) {
+                       if (!class_exists($class)) {
+                               continue;
+                       }
+
+                       $result = call_user_func(array($class, 'test'), $capabilities);
+                       if ($result) {
+                               self::$transport[$cap_string] = $class;
+                               break;
+                       }
+               }
+               if (self::$transport[$cap_string] === null) {
+                       throw new Requests_Exception('No working transports found', 'notransport', self::$transports);
+               }
+
+               return new self::$transport[$cap_string]();
+       }
+
+       /**#@+
+        * @see request()
+        * @param string $url
+        * @param array $headers
+        * @param array $options
+        * @return Requests_Response
+        */
+       /**
+        * Send a GET request
+        */
+       public static function get($url, $headers = array(), $options = array()) {
+               return self::request($url, $headers, null, self::GET, $options);
+       }
+
+       /**
+        * Send a HEAD request
+        */
+       public static function head($url, $headers = array(), $options = array()) {
+               return self::request($url, $headers, null, self::HEAD, $options);
+       }
+
+       /**
+        * Send a DELETE request
+        */
+       public static function delete($url, $headers = array(), $options = array()) {
+               return self::request($url, $headers, null, self::DELETE, $options);
+       }
+
+       /**
+        * Send a TRACE request
+        */
+       public static function trace($url, $headers = array(), $options = array()) {
+               return self::request($url, $headers, null, self::TRACE, $options);
+       }
+       /**#@-*/
+
+       /**#@+
+        * @see request()
+        * @param string $url
+        * @param array $headers
+        * @param array $data
+        * @param array $options
+        * @return Requests_Response
+        */
+       /**
+        * Send a POST request
+        */
+       public static function post($url, $headers = array(), $data = array(), $options = array()) {
+               return self::request($url, $headers, $data, self::POST, $options);
+       }
+       /**
+        * Send a PUT request
+        */
+       public static function put($url, $headers = array(), $data = array(), $options = array()) {
+               return self::request($url, $headers, $data, self::PUT, $options);
+       }
+
+       /**
+        * Send an OPTIONS request
+        */
+       public static function options($url, $headers = array(), $data = array(), $options = array()) {
+               return self::request($url, $headers, $data, self::OPTIONS, $options);
+       }
+
+       /**
+        * Send a PATCH request
+        *
+        * Note: Unlike {@see post} and {@see put}, `$headers` is required, as the
+        * specification recommends that should send an ETag
+        *
+        * @link https://tools.ietf.org/html/rfc5789
+        */
+       public static function patch($url, $headers, $data = array(), $options = array()) {
+               return self::request($url, $headers, $data, self::PATCH, $options);
+       }
+       /**#@-*/
+
+       /**
+        * Main interface for HTTP requests
+        *
+        * This method initiates a request and sends it via a transport before
+        * parsing.
+        *
+        * The `$options` parameter takes an associative array with the following
+        * options:
+        *
+        * - `timeout`: How long should we wait for a response?
+        *    Note: for cURL, a minimum of 1 second applies, as DNS resolution
+        *    operates at second-resolution only.
+        *    (float, seconds with a millisecond precision, default: 10, example: 0.01)
+        * - `connect_timeout`: How long should we wait while trying to connect?
+        *    (float, seconds with a millisecond precision, default: 10, example: 0.01)
+        * - `useragent`: Useragent to send to the server
+        *    (string, default: php-requests/$version)
+        * - `follow_redirects`: Should we follow 3xx redirects?
+        *    (boolean, default: true)
+        * - `redirects`: How many times should we redirect before erroring?
+        *    (integer, default: 10)
+        * - `blocking`: Should we block processing on this request?
+        *    (boolean, default: true)
+        * - `filename`: File to stream the body to instead.
+        *    (string|boolean, default: false)
+        * - `auth`: Authentication handler or array of user/password details to use
+        *    for Basic authentication
+        *    (Requests_Auth|array|boolean, default: false)
+        * - `proxy`: Proxy details to use for proxy by-passing and authentication
+        *    (Requests_Proxy|array|string|boolean, default: false)
+        * - `max_bytes`: Limit for the response body size.
+        *    (integer|boolean, default: false)
+        * - `idn`: Enable IDN parsing
+        *    (boolean, default: true)
+        * - `transport`: Custom transport. Either a class name, or a
+        *    transport object. Defaults to the first working transport from
+        *    {@see getTransport()}
+        *    (string|Requests_Transport, default: {@see getTransport()})
+        * - `hooks`: Hooks handler.
+        *    (Requests_Hooker, default: new Requests_Hooks())
+        * - `verify`: Should we verify SSL certificates? Allows passing in a custom
+        *    certificate file as a string. (Using true uses the system-wide root
+        *    certificate store instead, but this may have different behaviour
+        *    across transports.)
+        *    (string|boolean, default: library/Requests/Transport/cacert.pem)
+        * - `verifyname`: Should we verify the common name in the SSL certificate?
+        *    (boolean: default, true)
+        * - `data_format`: How should we send the `$data` parameter?
+        *    (string, one of 'query' or 'body', default: 'query' for
+        *    HEAD/GET/DELETE, 'body' for POST/PUT/OPTIONS/PATCH)
+        *
+        * @throws Requests_Exception On invalid URLs (`nonhttp`)
+        *
+        * @param string $url URL to request
+        * @param array $headers Extra headers to send with the request
+        * @param array|null $data Data to send either as a query string for GET/HEAD requests, or in the body for POST requests
+        * @param string $type HTTP request type (use Requests constants)
+        * @param array $options Options for the request (see description for more information)
+        * @return Requests_Response
+        */
+       public static function request($url, $headers = array(), $data = array(), $type = self::GET, $options = array()) {
+               if (empty($options['type'])) {
+                       $options['type'] = $type;
+               }
+               $options = array_merge(self::get_default_options(), $options);
+
+               self::set_defaults($url, $headers, $data, $type, $options);
+
+               $options['hooks']->dispatch('requests.before_request', array(&$url, &$headers, &$data, &$type, &$options));
+
+               if (!empty($options['transport'])) {
+                       $transport = $options['transport'];
+
+                       if (is_string($options['transport'])) {
+                               $transport = new $transport();
+                       }
+               }
+               else {
+                       $need_ssl = (0 === stripos($url, 'https://'));
+                       $capabilities = array('ssl' => $need_ssl);
+                       $transport = self::get_transport($capabilities);
+               }
+               $response = $transport->request($url, $headers, $data, $options);
+
+               $options['hooks']->dispatch('requests.before_parse', array(&$response, $url, $headers, $data, $type, $options));
+
+               return self::parse_response($response, $url, $headers, $data, $options);
+       }
+
+       /**
+        * Send multiple HTTP requests simultaneously
+        *
+        * The `$requests` parameter takes an associative or indexed array of
+        * request fields. The key of each request can be used to match up the
+        * request with the returned data, or with the request passed into your
+        * `multiple.request.complete` callback.
+        *
+        * The request fields value is an associative array with the following keys:
+        *
+        * - `url`: Request URL Same as the `$url` parameter to
+        *    {@see Requests::request}
+        *    (string, required)
+        * - `headers`: Associative array of header fields. Same as the `$headers`
+        *    parameter to {@see Requests::request}
+        *    (array, default: `array()`)
+        * - `data`: Associative array of data fields or a string. Same as the
+        *    `$data` parameter to {@see Requests::request}
+        *    (array|string, default: `array()`)
+        * - `type`: HTTP request type (use Requests constants). Same as the `$type`
+        *    parameter to {@see Requests::request}
+        *    (string, default: `Requests::GET`)
+        * - `cookies`: Associative array of cookie name to value, or cookie jar.
+        *    (array|Requests_Cookie_Jar)
+        *
+        * If the `$options` parameter is specified, individual requests will
+        * inherit options from it. This can be used to use a single hooking system,
+        * or set all the types to `Requests::POST`, for example.
+        *
+        * In addition, the `$options` parameter takes the following global options:
+        *
+        * - `complete`: A callback for when a request is complete. Takes two
+        *    parameters, a Requests_Response/Requests_Exception reference, and the
+        *    ID from the request array (Note: this can also be overridden on a
+        *    per-request basis, although that's a little silly)
+        *    (callback)
+        *
+        * @param array $requests Requests data (see description for more information)
+        * @param array $options Global and default options (see {@see Requests::request})
+        * @return array Responses (either Requests_Response or a Requests_Exception object)
+        */
+       public static function request_multiple($requests, $options = array()) {
+               $options = array_merge(self::get_default_options(true), $options);
+
+               if (!empty($options['hooks'])) {
+                       $options['hooks']->register('transport.internal.parse_response', array('Requests', 'parse_multiple'));
+                       if (!empty($options['complete'])) {
+                               $options['hooks']->register('multiple.request.complete', $options['complete']);
+                       }
+               }
+
+               foreach ($requests as $id => &$request) {
+                       if (!isset($request['headers'])) {
+                               $request['headers'] = array();
+                       }
+                       if (!isset($request['data'])) {
+                               $request['data'] = array();
+                       }
+                       if (!isset($request['type'])) {
+                               $request['type'] = self::GET;
+                       }
+                       if (!isset($request['options'])) {
+                               $request['options'] = $options;
+                               $request['options']['type'] = $request['type'];
+                       }
+                       else {
+                               if (empty($request['options']['type'])) {
+                                       $request['options']['type'] = $request['type'];
+                               }
+                               $request['options'] = array_merge($options, $request['options']);
+                       }
+
+                       self::set_defaults($request['url'], $request['headers'], $request['data'], $request['type'], $request['options']);
+
+                       // Ensure we only hook in once
+                       if ($request['options']['hooks'] !== $options['hooks']) {
+                               $request['options']['hooks']->register('transport.internal.parse_response', array('Requests', 'parse_multiple'));
+                               if (!empty($request['options']['complete'])) {
+                                       $request['options']['hooks']->register('multiple.request.complete', $request['options']['complete']);
+                               }
+                       }
+               }
+               unset($request);
+
+               if (!empty($options['transport'])) {
+                       $transport = $options['transport'];
+
+                       if (is_string($options['transport'])) {
+                               $transport = new $transport();
+                       }
+               }
+               else {
+                       $transport = self::get_transport();
+               }
+               $responses = $transport->request_multiple($requests, $options);
+
+               foreach ($responses as $id => &$response) {
+                       // If our hook got messed with somehow, ensure we end up with the
+                       // correct response
+                       if (is_string($response)) {
+                               $request = $requests[$id];
+                               self::parse_multiple($response, $request);
+                               $request['options']['hooks']->dispatch('multiple.request.complete', array(&$response, $id));
+                       }
+               }
+
+               return $responses;
+       }
+
+       /**
+        * Get the default options
+        *
+        * @see Requests::request() for values returned by this method
+        * @param boolean $multirequest Is this a multirequest?
+        * @return array Default option values
+        */
+       protected static function get_default_options($multirequest = false) {
+               $defaults = array(
+                       'timeout' => 10,
+                       'connect_timeout' => 10,
+                       'useragent' => 'php-requests/' . self::VERSION,
+                       'protocol_version' => 1.1,
+                       'redirected' => 0,
+                       'redirects' => 10,
+                       'follow_redirects' => true,
+                       'blocking' => true,
+                       'type' => self::GET,
+                       'filename' => false,
+                       'auth' => false,
+                       'proxy' => false,
+                       'cookies' => false,
+                       'max_bytes' => false,
+                       'idn' => true,
+                       'hooks' => null,
+                       'transport' => null,
+                       'verify' => Requests::get_certificate_path(),
+                       'verifyname' => true,
+               );
+               if ($multirequest !== false) {
+                       $defaults['complete'] = null;
+               }
+               return $defaults;
+       }
+
+       /**
+        * Get default certificate path.
+        *
+        * @return string Default certificate path.
+        */
+       public static function get_certificate_path() {
+               if ( ! empty( Requests::$certificate_path ) ) {
+                       return Requests::$certificate_path;
+               }
+
+               return dirname(__FILE__) . '/Requests/Transport/cacert.pem';
+       }
+
+       /**
+        * Set default certificate path.
+        *
+        * @param string $path Certificate path, pointing to a PEM file.
+        */
+       public static function set_certificate_path( $path ) {
+               Requests::$certificate_path = $path;
+       }
+
+       /**
+        * Set the default values
+        *
+        * @param string $url URL to request
+        * @param array $headers Extra headers to send with the request
+        * @param array|null $data Data to send either as a query string for GET/HEAD requests, or in the body for POST requests
+        * @param string $type HTTP request type
+        * @param array $options Options for the request
+        * @return array $options
+        */
+       protected static function set_defaults(&$url, &$headers, &$data, &$type, &$options) {
+               if (!preg_match('/^http(s)?:\/\//i', $url, $matches)) {
+                       throw new Requests_Exception('Only HTTP(S) requests are handled.', 'nonhttp', $url);
+               }
+
+               if (empty($options['hooks'])) {
+                       $options['hooks'] = new Requests_Hooks();
+               }
+
+               if (is_array($options['auth'])) {
+                       $options['auth'] = new Requests_Auth_Basic($options['auth']);
+               }
+               if ($options['auth'] !== false) {
+                       $options['auth']->register($options['hooks']);
+               }
+
+               if (is_string($options['proxy']) || is_array($options['proxy'])) {
+                       $options['proxy'] = new Requests_Proxy_HTTP($options['proxy']);
+               }
+               if ($options['proxy'] !== false) {
+                       $options['proxy']->register($options['hooks']);
+               }
+
+               if (is_array($options['cookies'])) {
+                       $options['cookies'] = new Requests_Cookie_Jar($options['cookies']);
+               }
+               elseif (empty($options['cookies'])) {
+                       $options['cookies'] = new Requests_Cookie_Jar();
+               }
+               if ($options['cookies'] !== false) {
+                       $options['cookies']->register($options['hooks']);
+               }
+
+               if ($options['idn'] !== false) {
+                       $iri = new Requests_IRI($url);
+                       $iri->host = Requests_IDNAEncoder::encode($iri->ihost);
+                       $url = $iri->uri;
+               }
+
+               // Massage the type to ensure we support it.
+               $type = strtoupper($type);
+
+               if (!isset($options['data_format'])) {
+                       if (in_array($type, array(self::HEAD, self::GET, self::DELETE))) {
+                               $options['data_format'] = 'query';
+                       }
+                       else {
+                               $options['data_format'] = 'body';
+                       }
+               }
+       }
+
+       /**
+        * HTTP response parser
+        *
+        * @throws Requests_Exception On missing head/body separator (`requests.no_crlf_separator`)
+        * @throws Requests_Exception On missing head/body separator (`noversion`)
+        * @throws Requests_Exception On missing head/body separator (`toomanyredirects`)
+        *
+        * @param string $headers Full response text including headers and body
+        * @param string $url Original request URL
+        * @param array $req_headers Original $headers array passed to {@link request()}, in case we need to follow redirects
+        * @param array $req_data Original $data array passed to {@link request()}, in case we need to follow redirects
+        * @param array $options Original $options array passed to {@link request()}, in case we need to follow redirects
+        * @return Requests_Response
+        */
+       protected static function parse_response($headers, $url, $req_headers, $req_data, $options) {
+               $return = new Requests_Response();
+               if (!$options['blocking']) {
+                       return $return;
+               }
+
+               $return->raw = $headers;
+               $return->url = $url;
+
+               if (!$options['filename']) {
+                       if (($pos = strpos($headers, "\r\n\r\n")) === false) {
+                               // Crap!
+                               throw new Requests_Exception('Missing header/body separator', 'requests.no_crlf_separator');
+                       }
+
+                       $headers = substr($return->raw, 0, $pos);
+                       $return->body = substr($return->raw, $pos + strlen("\n\r\n\r"));
+               }
+               else {
+                       $return->body = '';
+               }
+               // Pretend CRLF = LF for compatibility (RFC 2616, section 19.3)
+               $headers = str_replace("\r\n", "\n", $headers);
+               // Unfold headers (replace [CRLF] 1*( SP | HT ) with SP) as per RFC 2616 (section 2.2)
+               $headers = preg_replace('/\n[ \t]/', ' ', $headers);
+               $headers = explode("\n", $headers);
+               preg_match('#^HTTP/(1\.\d)[ \t]+(\d+)#i', array_shift($headers), $matches);
+               if (empty($matches)) {
+                       throw new Requests_Exception('Response could not be parsed', 'noversion', $headers);
+               }
+               $return->protocol_version = (float) $matches[1];
+               $return->status_code = (int) $matches[2];
+               if ($return->status_code >= 200 && $return->status_code < 300) {
+                       $return->success = true;
+               }
+
+               foreach ($headers as $header) {
+                       list($key, $value) = explode(':', $header, 2);
+                       $value = trim($value);
+                       preg_replace('#(\s+)#i', ' ', $value);
+                       $return->headers[$key] = $value;
+               }
+               if (isset($return->headers['transfer-encoding'])) {
+                       $return->body = self::decode_chunked($return->body);
+                       unset($return->headers['transfer-encoding']);
+               }
+               if (isset($return->headers['content-encoding'])) {
+                       $return->body = self::decompress($return->body);
+               }
+
+               //fsockopen and cURL compatibility
+               if (isset($return->headers['connection'])) {
+                       unset($return->headers['connection']);
+               }
+
+               $options['hooks']->dispatch('requests.before_redirect_check', array(&$return, $req_headers, $req_data, $options));
+
+               if ($return->is_redirect() && $options['follow_redirects'] === true) {
+                       if (isset($return->headers['location']) && $options['redirected'] < $options['redirects']) {
+                               if ($return->status_code === 303) {
+                                       $options['type'] = self::GET;
+                               }
+                               $options['redirected']++;
+                               $location = $return->headers['location'];
+                               if (strpos($location, 'http://') !== 0 && strpos($location, 'https://') !== 0) {
+                                       // relative redirect, for compatibility make it absolute
+                                       $location = Requests_IRI::absolutize($url, $location);
+                                       $location = $location->uri;
+                               }
+
+                               $hook_args = array(
+                                       &$location,
+                                       &$req_headers,
+                                       &$req_data,
+                                       &$options,
+                                       $return
+                               );
+                               $options['hooks']->dispatch('requests.before_redirect', $hook_args);
+                               $redirected = self::request($location, $req_headers, $req_data, $options['type'], $options);
+                               $redirected->history[] = $return;
+                               return $redirected;
+                       }
+                       elseif ($options['redirected'] >= $options['redirects']) {
+                               throw new Requests_Exception('Too many redirects', 'toomanyredirects', $return);
+                       }
+               }
+
+               $return->redirects = $options['redirected'];
+
+               $options['hooks']->dispatch('requests.after_request', array(&$return, $req_headers, $req_data, $options));
+               return $return;
+       }
+
+       /**
+        * Callback for `transport.internal.parse_response`
+        *
+        * Internal use only. Converts a raw HTTP response to a Requests_Response
+        * while still executing a multiple request.
+        *
+        * @param string $response Full response text including headers and body (will be overwritten with Response instance)
+        * @param array $request Request data as passed into {@see Requests::request_multiple()}
+        * @return null `$response` is either set to a Requests_Response instance, or a Requests_Exception object
+        */
+       public static function parse_multiple(&$response, $request) {
+               try {
+                       $url = $request['url'];
+                       $headers = $request['headers'];
+                       $data = $request['data'];
+                       $options = $request['options'];
+                       $response = self::parse_response($response, $url, $headers, $data, $options);
+               }
+               catch (Requests_Exception $e) {
+                       $response = $e;
+               }
+       }
+
+       /**
+        * Decoded a chunked body as per RFC 2616
+        *
+        * @see https://tools.ietf.org/html/rfc2616#section-3.6.1
+        * @param string $data Chunked body
+        * @return string Decoded body
+        */
+       protected static function decode_chunked($data) {
+               if (!preg_match('/^([0-9a-f]+)[^\r\n]*\r\n/i', trim($data))) {
+                       return $data;
+               }
+
+               $decoded = '';
+               $encoded = $data;
+
+               while (true) {
+                       $is_chunked = (bool) preg_match('/^([0-9a-f]+)[^\r\n]*\r\n/i', $encoded, $matches);
+                       if (!$is_chunked) {
+                               // Looks like it's not chunked after all
+                               return $data;
+                       }
+
+                       $length = hexdec(trim($matches[1]));
+                       if ($length === 0) {
+                               // Ignore trailer headers
+                               return $decoded;
+                       }
+
+                       $chunk_length = strlen($matches[0]);
+                       $decoded .= substr($encoded, $chunk_length, $length);
+                       $encoded = substr($encoded, $chunk_length + $length + 2);
+
+                       if (trim($encoded) === '0' || empty($encoded)) {
+                               return $decoded;
+                       }
+               }
+
+               // We'll never actually get down here
+               // @codeCoverageIgnoreStart
+       }
+       // @codeCoverageIgnoreEnd
+
+       /**
+        * Convert a key => value array to a 'key: value' array for headers
+        *
+        * @param array $array Dictionary of header values
+        * @return array List of headers
+        */
+       public static function flatten($array) {
+               $return = array();
+               foreach ($array as $key => $value) {
+                       $return[] = sprintf('%s: %s', $key, $value);
+               }
+               return $return;
+       }
+
+       /**
+        * Convert a key => value array to a 'key: value' array for headers
+        *
+        * @codeCoverageIgnore
+        * @deprecated Misspelling of {@see Requests::flatten}
+        * @param array $array Dictionary of header values
+        * @return array List of headers
+        */
+       public static function flattern($array) {
+               return self::flatten($array);
+       }
+
+       /**
+        * Decompress an encoded body
+        *
+        * Implements gzip, compress and deflate. Guesses which it is by attempting
+        * to decode.
+        *
+        * @param string $data Compressed data in one of the above formats
+        * @return string Decompressed string
+        */
+       public static function decompress($data) {
+               if (substr($data, 0, 2) !== "\x1f\x8b" && substr($data, 0, 2) !== "\x78\x9c") {
+                       // Not actually compressed. Probably cURL ruining this for us.
+                       return $data;
+               }
+
+               if (function_exists('gzdecode') && ($decoded = @gzdecode($data)) !== false) {
+                       return $decoded;
+               }
+               elseif (function_exists('gzinflate') && ($decoded = @gzinflate($data)) !== false) {
+                       return $decoded;
+               }
+               elseif (($decoded = self::compatible_gzinflate($data)) !== false) {
+                       return $decoded;
+               }
+               elseif (function_exists('gzuncompress') && ($decoded = @gzuncompress($data)) !== false) {
+                       return $decoded;
+               }
+
+               return $data;
+       }
+
+       /**
+        * Decompression of deflated string while staying compatible with the majority of servers.
+        *
+        * Certain Servers will return deflated data with headers which PHP's gzinflate()
+        * function cannot handle out of the box. The following function has been created from
+        * various snippets on the gzinflate() PHP documentation.
+        *
+        * Warning: Magic numbers within. Due to the potential different formats that the compressed
+        * data may be returned in, some "magic offsets" are needed to ensure proper decompression
+        * takes place. For a simple progmatic way to determine the magic offset in use, see:
+        * https://core.trac.wordpress.org/ticket/18273
+        *
+        * @since 2.8.1
+        * @link https://core.trac.wordpress.org/ticket/18273
+        * @link https://secure.php.net/manual/en/function.gzinflate.php#70875
+        * @link https://secure.php.net/manual/en/function.gzinflate.php#77336
+        *
+        * @param string $gzData String to decompress.
+        * @return string|bool False on failure.
+        */
+       public static function compatible_gzinflate($gzData) {
+               // Compressed data might contain a full zlib header, if so strip it for
+               // gzinflate()
+               if (substr($gzData, 0, 3) == "\x1f\x8b\x08") {
+                       $i = 10;
+                       $flg = ord(substr($gzData, 3, 1));
+                       if ($flg > 0) {
+                               if ($flg & 4) {
+                                       list($xlen) = unpack('v', substr($gzData, $i, 2));
+                                       $i = $i + 2 + $xlen;
+                               }
+                               if ($flg & 8) {
+                                       $i = strpos($gzData, "\0", $i) + 1;
+                               }
+                               if ($flg & 16) {
+                                       $i = strpos($gzData, "\0", $i) + 1;
+                               }
+                               if ($flg & 2) {
+                                       $i = $i + 2;
+                               }
+                       }
+                       $decompressed = self::compatible_gzinflate(substr($gzData, $i));
+                       if (false !== $decompressed) {
+                               return $decompressed;
+                       }
+               }
+
+               // If the data is Huffman Encoded, we must first strip the leading 2
+               // byte Huffman marker for gzinflate()
+               // The response is Huffman coded by many compressors such as
+               // java.util.zip.Deflater, Ruby’s Zlib::Deflate, and .NET's
+               // System.IO.Compression.DeflateStream.
+               //
+               // See https://decompres.blogspot.com/ for a quick explanation of this
+               // data type
+               $huffman_encoded = false;
+
+               // low nibble of first byte should be 0x08
+               list(, $first_nibble)    = unpack('h', $gzData);
+
+               // First 2 bytes should be divisible by 0x1F
+               list(, $first_two_bytes) = unpack('n', $gzData);
+
+               if (0x08 == $first_nibble && 0 == ($first_two_bytes % 0x1F)) {
+                       $huffman_encoded = true;
+               }
+
+               if ($huffman_encoded) {
+                       if (false !== ($decompressed = @gzinflate(substr($gzData, 2)))) {
+                               return $decompressed;
+                       }
+               }
+
+               if ("\x50\x4b\x03\x04" == substr($gzData, 0, 4)) {
+                       // ZIP file format header
+                       // Offset 6: 2 bytes, General-purpose field
+                       // Offset 26: 2 bytes, filename length
+                       // Offset 28: 2 bytes, optional field length
+                       // Offset 30: Filename field, followed by optional field, followed
+                       // immediately by data
+                       list(, $general_purpose_flag) = unpack('v', substr($gzData, 6, 2));
+
+                       // If the file has been compressed on the fly, 0x08 bit is set of
+                       // the general purpose field. We can use this to differentiate
+                       // between a compressed document, and a ZIP file
+                       $zip_compressed_on_the_fly = (0x08 == (0x08 & $general_purpose_flag));
+
+                       if (!$zip_compressed_on_the_fly) {
+                               // Don't attempt to decode a compressed zip file
+                               return $gzData;
+                       }
+
+                       // Determine the first byte of data, based on the above ZIP header
+                       // offsets:
+                       $first_file_start = array_sum(unpack('v2', substr($gzData, 26, 4)));
+                       if (false !== ($decompressed = @gzinflate(substr($gzData, 30 + $first_file_start)))) {
+                               return $decompressed;
+                       }
+                       return false;
+               }
+
+               // Finally fall back to straight gzinflate
+               if (false !== ($decompressed = @gzinflate($gzData))) {
+                       return $decompressed;
+               }
+
+               // Fallback for all above failing, not expected, but included for
+               // debugging and preventing regressions and to track stats
+               if (false !== ($decompressed = @gzinflate(substr($gzData, 2)))) {
+                       return $decompressed;
+               }
+
+               return false;
+       }
+
+       public static function match_domain($host, $reference) {
+               // Check for a direct match
+               if ($host === $reference) {
+                       return true;
+               }
+
+               // Calculate the valid wildcard match if the host is not an IP address
+               // Also validates that the host has 3 parts or more, as per Firefox's
+               // ruleset.
+               $parts = explode('.', $host);
+               if (ip2long($host) === false && count($parts) >= 3) {
+                       $parts[0] = '*';
+                       $wildcard = implode('.', $parts);
+                       if ($wildcard === $reference) {
+                               return true;
+                       }
+               }
+
+               return false;
+       }
+}
index 958ba463e9b3d76b00284ec770d89a6f489136d8..6110413767223dd0af87296b9bb4edeca229b567 100644 (file)
@@ -29,35 +29,10 @@ function wp_simplepie_autoload( $class ) {
        include( $file );
 }
 
-if ( function_exists( 'spl_autoload_register' ) ) {
-       /**
-        * We autoload classes we may not need.
-        *
-        * If SPL is disabled, we load all of SimplePie manually.
-        *
-        * Core.php is not loaded manually, because SimplePie_Core (a deprecated class)
-        * was never included in WordPress core.
-        */
-       spl_autoload_register( 'wp_simplepie_autoload' );
-} else {
-       require ABSPATH . WPINC . '/SimplePie/Cache/Base.php';
-       require ABSPATH . WPINC . '/SimplePie/Cache/DB.php';
-       require ABSPATH . WPINC . '/SimplePie/Cache/File.php';
-       require ABSPATH . WPINC . '/SimplePie/Cache/Memcache.php';
-       require ABSPATH . WPINC . '/SimplePie/Cache/MySQL.php';
-       require ABSPATH . WPINC . '/SimplePie/Caption.php';
-       require ABSPATH . WPINC . '/SimplePie/Category.php';
-       require ABSPATH . WPINC . '/SimplePie/Copyright.php';
-       require ABSPATH . WPINC . '/SimplePie/Credit.php';
-       require ABSPATH . WPINC . '/SimplePie/Decode/HTML/Entities.php';
-       require ABSPATH . WPINC . '/SimplePie/Enclosure.php';
-       require ABSPATH . WPINC . '/SimplePie/gzdecode.php';
-       require ABSPATH . WPINC . '/SimplePie/HTTP/Parser.php';
-       require ABSPATH . WPINC . '/SimplePie/Net/IPv6.php';
-       require ABSPATH . WPINC . '/SimplePie/Rating.php';
-       require ABSPATH . WPINC . '/SimplePie/Restriction.php';
-       require ABSPATH . WPINC . '/SimplePie/Source.php';
-}
+/**
+ * We autoload classes we may not need.
+ */
+spl_autoload_register( 'wp_simplepie_autoload' );
 
 /**
  * SimplePie
index 7b3940669fbf3c0650c328b7ffdc9f44c3de696d..f26eb0e25a4001d1b28c72369a3e87dacd6037a3 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Deprecated. Use WP_HTTP (http.php) instead.
  */
-_deprecated_file( basename( __FILE__ ), '3.0', WPINC . '/http.php' );
+_deprecated_file( basename( __FILE__ ), '3.0.0', WPINC . '/http.php' );
 
 if ( ! class_exists( 'Snoopy', false ) ) :
 /*************************************************
index bd17a14fefd97aaf2b61482dd248c0089a5d8770..01b7264fa879db1be94243c4fa670e5afccc0089 100644 (file)
@@ -111,7 +111,7 @@ class Walker_Category extends Walker {
                $link = '<a href="' . esc_url( get_term_link( $category ) ) . '" ';
                if ( $args['use_desc_for_title'] && ! empty( $category->description ) ) {
                        /**
-                        * Filter the category description for display.
+                        * Filters the category description for display.
                         *
                         * @since 1.2.0
                         *
@@ -189,7 +189,7 @@ class Walker_Category extends Walker {
                        }
 
                        /**
-                        * Filter the list of CSS classes to include with each category in the list.
+                        * Filters the list of CSS classes to include with each category in the list.
                         *
                         * @since 4.2.0
                         *
index 3065744e50727a03dbf6e3cb6a1a4f1727b858eb..72220aaf0cc72606d2b6bb52f53ce7704623e289 100644 (file)
@@ -287,7 +287,7 @@ class Walker_Comment extends Walker {
                        ?>
                </div>
 
-               <?php comment_text( get_comment_id(), array_merge( $args, array( 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
+               <?php comment_text( $comment, array_merge( $args, array( 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
 
                <?php
                comment_reply_link( array_merge( $args, array(
diff --git a/wp-includes/class-walker-nav-menu.php b/wp-includes/class-walker-nav-menu.php
new file mode 100644 (file)
index 0000000..43eaa91
--- /dev/null
@@ -0,0 +1,222 @@
+<?php
+/**
+ * Nav Menu API: Walker_Nav_Menu class
+ *
+ * @package WordPress
+ * @subpackage Nav_Menus
+ * @since 4.6.0
+ */
+
+/**
+ * Core class used to implement an HTML list of nav menu items.
+ *
+ * @since 3.0.0
+ *
+ * @see Walker
+ */
+class Walker_Nav_Menu extends Walker {
+       /**
+        * What the class handles.
+        *
+        * @since 3.0.0
+        * @access public
+        * @var string
+        *
+        * @see Walker::$tree_type
+        */
+       public $tree_type = array( 'post_type', 'taxonomy', 'custom' );
+
+       /**
+        * Database fields to use.
+        *
+        * @since 3.0.0
+        * @access public
+        * @todo Decouple this.
+        * @var array
+        *
+        * @see Walker::$db_fields
+        */
+       public $db_fields = array( 'parent' => 'menu_item_parent', 'id' => 'db_id' );
+
+       /**
+        * Starts the list before the elements are added.
+        *
+        * @since 3.0.0
+        *
+        * @see Walker::start_lvl()
+        *
+        * @param string $output Passed by reference. Used to append additional content.
+        * @param int    $depth  Depth of menu item. Used for padding.
+        * @param array  $args   An array of wp_nav_menu() arguments.
+        */
+       public function start_lvl( &$output, $depth = 0, $args = array() ) {
+               $indent = str_repeat("\t", $depth);
+               $output .= "\n$indent<ul class=\"sub-menu\">\n";
+       }
+
+       /**
+        * Ends the list of after the elements are added.
+        *
+        * @since 3.0.0
+        *
+        * @see Walker::end_lvl()
+        *
+        * @param string $output Passed by reference. Used to append additional content.
+        * @param int    $depth  Depth of menu item. Used for padding.
+        * @param array  $args   An array of wp_nav_menu() arguments.
+        */
+       public function end_lvl( &$output, $depth = 0, $args = array() ) {
+               $indent = str_repeat("\t", $depth);
+               $output .= "$indent</ul>\n";
+       }
+
+       /**
+        * Starts the element output.
+        *
+        * @since 3.0.0
+        * @since 4.4.0 The {@see 'nav_menu_item_args'} filter was added.
+        *
+        * @see Walker::start_el()
+        *
+        * @param string $output Passed by reference. Used to append additional content.
+        * @param object $item   Menu item data object.
+        * @param int    $depth  Depth of menu item. Used for padding.
+        * @param array  $args   An array of wp_nav_menu() arguments.
+        * @param int    $id     Current item ID.
+        */
+       public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
+               $indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
+
+               $classes = empty( $item->classes ) ? array() : (array) $item->classes;
+               $classes[] = 'menu-item-' . $item->ID;
+
+               /**
+                * Filters the arguments for a single nav menu item.
+                *
+                * @since 4.4.0
+                *
+                * @param array  $args  An array of arguments.
+                * @param object $item  Menu item data object.
+                * @param int    $depth Depth of menu item. Used for padding.
+                */
+               $args = apply_filters( 'nav_menu_item_args', $args, $item, $depth );
+
+               /**
+                * Filters the CSS class(es) applied to a menu item's list item element.
+                *
+                * @since 3.0.0
+                * @since 4.1.0 The `$depth` parameter was added.
+                *
+                * @param array  $classes The CSS classes that are applied to the menu item's `<li>` element.
+                * @param object $item    The current menu item.
+                * @param array  $args    An array of wp_nav_menu() arguments.
+                * @param int    $depth   Depth of menu item. Used for padding.
+                */
+               $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args, $depth ) );
+               $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
+
+               /**
+                * Filters the ID applied to a menu item's list item element.
+                *
+                * @since 3.0.1
+                * @since 4.1.0 The `$depth` parameter was added.
+                *
+                * @param string $menu_id The ID that is applied to the menu item's `<li>` element.
+                * @param object $item    The current menu item.
+                * @param array  $args    An array of wp_nav_menu() arguments.
+                * @param int    $depth   Depth of menu item. Used for padding.
+                */
+               $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args, $depth );
+               $id = $id ? ' id="' . esc_attr( $id ) . '"' : '';
+
+               $output .= $indent . '<li' . $id . $class_names .'>';
+
+               $atts = array();
+               $atts['title']  = ! empty( $item->attr_title ) ? $item->attr_title : '';
+               $atts['target'] = ! empty( $item->target )     ? $item->target     : '';
+               $atts['rel']    = ! empty( $item->xfn )        ? $item->xfn        : '';
+               $atts['href']   = ! empty( $item->url )        ? $item->url        : '';
+
+               /**
+                * Filters the HTML attributes applied to a menu item's anchor element.
+                *
+                * @since 3.6.0
+                * @since 4.1.0 The `$depth` parameter was added.
+                *
+                * @param array $atts {
+                *     The HTML attributes applied to the menu item's `<a>` element, empty strings are ignored.
+                *
+                *     @type string $title  Title attribute.
+                *     @type string $target Target attribute.
+                *     @type string $rel    The rel attribute.
+                *     @type string $href   The href attribute.
+                * }
+                * @param object $item  The current menu item.
+                * @param array  $args  An array of wp_nav_menu() arguments.
+                * @param int    $depth Depth of menu item. Used for padding.
+                */
+               $atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args, $depth );
+
+               $attributes = '';
+               foreach ( $atts as $attr => $value ) {
+                       if ( ! empty( $value ) ) {
+                               $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
+                               $attributes .= ' ' . $attr . '="' . $value . '"';
+                       }
+               }
+
+               /** This filter is documented in wp-includes/post-template.php */
+               $title = apply_filters( 'the_title', $item->title, $item->ID );
+
+               /**
+                * Filters a menu item's title.
+                *
+                * @since 4.4.0
+                *
+                * @param string $title The menu item's title.
+                * @param object $item  The current menu item.
+                * @param array  $args  An array of wp_nav_menu() arguments.
+                * @param int    $depth Depth of menu item. Used for padding.
+                */
+               $title = apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth );
+
+               $item_output = $args->before;
+               $item_output .= '<a'. $attributes .'>';
+               $item_output .= $args->link_before . $title . $args->link_after;
+               $item_output .= '</a>';
+               $item_output .= $args->after;
+
+               /**
+                * Filters a menu item's starting output.
+                *
+                * The menu item's starting output only includes `$args->before`, the opening `<a>`,
+                * the menu item's title, the closing `</a>`, and `$args->after`. Currently, there is
+                * no filter for modifying the opening and closing `<li>` for a menu item.
+                *
+                * @since 3.0.0
+                *
+                * @param string $item_output The menu item's starting HTML output.
+                * @param object $item        Menu item data object.
+                * @param int    $depth       Depth of menu item. Used for padding.
+                * @param array  $args        An array of wp_nav_menu() arguments.
+                */
+               $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
+       }
+
+       /**
+        * Ends the element output, if needed.
+        *
+        * @since 3.0.0
+        *
+        * @see Walker::end_el()
+        *
+        * @param string $output Passed by reference. Used to append additional content.
+        * @param object $item   Page data object. Not used.
+        * @param int    $depth  Depth of page. Not Used.
+        * @param array  $args   An array of wp_nav_menu() arguments.
+        */
+       public function end_el( &$output, $item, $depth = 0, $args = array() ) {
+               $output .= "</li>\n";
+       }
+
+} // Walker_Nav_Menu
index 4c350cfc55c393a8ce6a2b7c65ae3c442467f4cf..047098b25b37427ed60f33862099a3d1cc976a3a 100644 (file)
@@ -75,7 +75,7 @@ class Walker_PageDropdown extends Walker {
                }
 
                /**
-                * Filter the page title when creating an HTML drop-down list of pages.
+                * Filters the page title when creating an HTML drop-down list of pages.
                 *
                 * @since 3.1.0
                 *
index f4667c57b41f9514faa4f1a9e3c048804ecfef40..fd55ccee4dd7c3fd4c8683273836b124a8371023 100644 (file)
@@ -116,7 +116,7 @@ class Walker_Page extends Walker {
                }
 
                /**
-                * Filter the list of CSS classes to include with each page item in the list.
+                * Filters the list of CSS classes to include with each page item in the list.
                 *
                 * @since 2.8.0
                 *
index b89c6542dd6d5f52d5caaf130b6ea7a5e084c975..49986ac225f5326cae8fa4480d41c5b4eaade819 100644 (file)
@@ -27,7 +27,7 @@ class WP_Admin_Bar {
                                return is_ssl() ? 'https://' : 'http://';
 
                        case 'menu' :
-                               _deprecated_argument( 'WP_Admin_Bar', '3.3', 'Modify admin bar nodes with WP_Admin_Bar::get_node(), WP_Admin_Bar::add_node(), and WP_Admin_Bar::remove_node(), not the <code>menu</code> property.' );
+                               _deprecated_argument( 'WP_Admin_Bar', '3.3.0', 'Modify admin bar nodes with WP_Admin_Bar::get_node(), WP_Admin_Bar::add_node(), and WP_Admin_Bar::remove_node(), not the <code>menu</code> property.' );
                                return array(); // Sorry, folks.
                }
        }
@@ -127,7 +127,7 @@ class WP_Admin_Bar {
                        if ( empty( $args['title'] ) )
                                return;
 
-                       _doing_it_wrong( __METHOD__, __( 'The menu ID should not be empty.' ), '3.3' );
+                       _doing_it_wrong( __METHOD__, __( 'The menu ID should not be empty.' ), '3.3.0' );
                        // Deprecated: Generate an ID from the title.
                        $args['id'] = esc_attr( sanitize_title( trim( $args['title'] ) ) );
                }
@@ -477,8 +477,9 @@ class WP_Admin_Bar {
                $is_parent = ! empty( $node->children );
                $has_link  = ! empty( $node->href );
 
-               $tabindex = isset( $node->meta['tabindex'] ) ? (int) $node->meta['tabindex'] : '';
-               $aria_attributes = $tabindex ? 'tabindex="' . $tabindex . '"' : '';
+               // Allow only numeric values, then casted to integers, and allow a tabindex value of `0` for a11y.
+               $tabindex = ( isset( $node->meta['tabindex'] ) && is_numeric( $node->meta['tabindex'] ) ) ? (int) $node->meta['tabindex'] : '';
+               $aria_attributes = ( '' !== $tabindex ) ? ' tabindex="' . $tabindex . '"' : '';
 
                $menuclass = '';
 
@@ -497,7 +498,7 @@ class WP_Admin_Bar {
 
                <li id="<?php echo esc_attr( 'wp-admin-bar-' . $node->id ); ?>"<?php echo $menuclass; ?>><?php
                        if ( $has_link ):
-                               ?><a class="ab-item" <?php echo $aria_attributes; ?> href="<?php echo esc_url( $node->href ) ?>"<?php
+                               ?><a class="ab-item"<?php echo $aria_attributes; ?> href="<?php echo esc_url( $node->href ) ?>"<?php
                                        if ( ! empty( $node->meta['onclick'] ) ) :
                                                ?> onclick="<?php echo esc_js( $node->meta['onclick'] ); ?>"<?php
                                        endif;
@@ -518,7 +519,7 @@ class WP_Admin_Bar {
                                endif;
                                ?>><?php
                        else:
-                               ?><div class="ab-item ab-empty-item" <?php echo $aria_attributes;
+                               ?><div class="ab-item ab-empty-item"<?php echo $aria_attributes;
                                if ( ! empty( $node->meta['title'] ) ) :
                                        ?> title="<?php echo esc_attr( $node->meta['title'] ); ?>"<?php
                                endif;
@@ -559,7 +560,7 @@ class WP_Admin_Bar {
         * @param object $node
         */
        public function recursive_render( $id, $node ) {
-               _deprecated_function( __METHOD__, '3.3', 'WP_Admin_bar::render(), WP_Admin_Bar::_render_item()' );
+               _deprecated_function( __METHOD__, '3.3.0', 'WP_Admin_bar::render(), WP_Admin_Bar::_render_item()' );
                $this->_render_item( $node );
        }
 
index ee2901f971157a2223e11ebffe2ca9c37594eb4e..f02d24ee75cfbfa4b1be928f6b4b56cb18efa9a2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Send XML response back to AJAX request.
+ * Send XML response back to Ajax request.
  *
  * @package WordPress
  * @since 2.1.0
@@ -15,7 +15,7 @@ class WP_Ajax_Response {
        public $responses = array();
 
        /**
-        * Constructor - Passes args to {@link WP_Ajax_Response::add()}.
+        * Constructor - Passes args to WP_Ajax_Response::add().
         *
         * @since 2.1.0
         * @see WP_Ajax_Response::add()
index eae452f542c836cd9d8db653a96c0e46047ba2fe..0920ca229f5ae496a073de538042039a33d02820 100644 (file)
@@ -62,7 +62,7 @@ class WP_Comment_Query {
        /**
         * SQL WHERE clause.
         *
-        * Stored after the 'comments_clauses' filter is run on the compiled WHERE sub-clauses.
+        * Stored after the {@see 'comments_clauses'} filter is run on the compiled WHERE sub-clauses.
         *
         * @since 4.4.2
         * @access protected
@@ -125,7 +125,7 @@ class WP_Comment_Query {
        public $max_num_pages = 0;
 
        /**
-        * Make private/protected methods readable for backwards compatibility.
+        * Make private/protected methods readable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -151,6 +151,7 @@ class WP_Comment_Query {
         * @since 4.4.0 Order by `comment__in` was added. `$update_comment_meta_cache`, `$no_found_rows`,
         *              `$hierarchical`, and `$update_comment_post_cache` were added.
         * @since 4.5.0 Introduced the `$author_url` argument.
+        * @since 4.6.0 Introduced the `$cache_domain` argument.
         * @access public
         *
         * @param string|array $query {
@@ -250,6 +251,8 @@ class WP_Comment_Query {
         *                                                   The parameter is ignored (forced to `false`) when
         *                                                   `$fields` is 'ids' or 'counts'. Accepts 'threaded',
         *                                                   'flat', or false. Default: false.
+        *     @type string       $cache_domain              Unique cache key to be produced when this query is stored in
+        *                                                   an object cache. Default is 'core'.
         *     @type bool         $update_comment_meta_cache Whether to prime the metadata cache for found comments.
         *                                                   Default true.
         *     @type bool         $update_comment_post_cache Whether to prime the cache for comment posts.
@@ -299,6 +302,7 @@ class WP_Comment_Query {
                        'meta_query' => '',
                        'date_query' => null, // See WP_Date_Query
                        'hierarchical' => false,
+                       'cache_domain' => 'core',
                        'update_comment_meta_cache' => true,
                        'update_comment_post_cache' => false,
                );
@@ -311,7 +315,7 @@ class WP_Comment_Query {
        /**
         * Parse arguments passed to the comment query with default query parameters.
         *
-        * @since  4.2.0 Extracted from WP_Comment_Query::query().
+        * @since 4.2.0 Extracted from WP_Comment_Query::query().
         *
         * @access public
         *
@@ -323,6 +327,14 @@ class WP_Comment_Query {
                }
 
                $this->query_vars = wp_parse_args( $query, $this->query_var_defaults );
+
+               /**
+                * Fires after the comment query vars have been parsed.
+                *
+                * @since 4.2.0
+                *
+                * @param WP_Comment_Query &$this The WP_Comment_Query instance (passed by reference).
+                */
                do_action_ref_array( 'parse_comment_query', array( &$this ) );
        }
 
@@ -353,7 +365,7 @@ class WP_Comment_Query {
         *
         * @global wpdb $wpdb WordPress database abstraction object.
         *
-        * @return int|array The list of comments.
+        * @return int|array List of comments or number of found comments if `$count` argument is true.
         */
        public function get_comments() {
                global $wpdb;
@@ -386,12 +398,27 @@ class WP_Comment_Query {
                        $last_changed = microtime();
                        wp_cache_set( 'last_changed', $last_changed, 'comment' );
                }
-               $cache_key = "get_comment_ids:$key:$last_changed";
 
-               $comment_ids = wp_cache_get( $cache_key, 'comment' );
-               if ( false === $comment_ids ) {
+               $cache_key   = "get_comments:$key:$last_changed";
+               $cache_value = wp_cache_get( $cache_key, 'comment' );
+               if ( false === $cache_value ) {
                        $comment_ids = $this->get_comment_ids();
-                       wp_cache_add( $cache_key, $comment_ids, 'comment' );
+                       if ( $comment_ids ) {
+                               $this->set_found_comments();
+                       }
+
+                       $cache_value = array(
+                               'comment_ids'    => $comment_ids,
+                               'found_comments' => $this->found_comments,
+                       );
+                       wp_cache_add( $cache_key, $cache_value, 'comment' );
+               } else {
+                       $comment_ids          = $cache_value['comment_ids'];
+                       $this->found_comments = $cache_value['found_comments'];
+               }
+
+               if ( $this->found_comments && $this->query_vars['number'] ) {
+                       $this->max_num_pages = ceil( $this->found_comments / $this->query_vars['number'] );
                }
 
                // If querying for a count only, there's nothing more to do.
@@ -402,23 +429,6 @@ class WP_Comment_Query {
 
                $comment_ids = array_map( 'intval', $comment_ids );
 
-               $this->comment_count = count( $this->comments );
-
-               if ( $comment_ids && $this->query_vars['number'] && ! $this->query_vars['no_found_rows'] ) {
-                       /**
-                        * Filter the query used to retrieve found comment count.
-                        *
-                        * @since 4.4.0
-                        *
-                        * @param string           $found_comments_query SQL query. Default 'SELECT FOUND_ROWS()'.
-                        * @param WP_Comment_Query $comment_query        The `WP_Comment_Query` instance.
-                        */
-                       $found_comments_query = apply_filters( 'found_comments_query', 'SELECT FOUND_ROWS()', $this );
-                       $this->found_comments = (int) $wpdb->get_var( $found_comments_query );
-
-                       $this->max_num_pages = ceil( $this->found_comments / $this->query_vars['number'] );
-               }
-
                if ( 'ids' == $this->query_vars['fields'] ) {
                        $this->comments = $comment_ids;
                        return $this->comments;
@@ -445,7 +455,7 @@ class WP_Comment_Query {
                }
 
                /**
-                * Filter the comment query results.
+                * Filters the comment query results.
                 *
                 * @since 3.1.0
                 *
@@ -734,12 +744,13 @@ class WP_Comment_Query {
                        }
                }
 
-               if ( $this->query_vars['hierarchical'] && ! $this->query_vars['parent'] ) {
-                       $this->query_vars['parent'] = 0;
+               $parent = $this->query_vars['parent'];
+               if ( $this->query_vars['hierarchical'] && ! $parent ) {
+                       $parent = 0;
                }
 
-               if ( '' !== $this->query_vars['parent'] ) {
-                       $this->sql_clauses['where']['parent'] = $wpdb->prepare( 'comment_parent = %d', $this->query_vars['parent'] );
+               if ( '' !== $parent ) {
+                       $this->sql_clauses['where']['parent'] = $wpdb->prepare( 'comment_parent = %d', $parent );
                }
 
                if ( is_array( $this->query_vars['user_id'] ) ) {
@@ -833,17 +844,16 @@ class WP_Comment_Query {
                        }
                }
 
-               $date_query = $this->query_vars['date_query'];
-               if ( ! empty( $date_query ) && is_array( $date_query ) ) {
-                       $date_query_object = new WP_Date_Query( $date_query, 'comment_date' );
-                       $this->sql_clauses['where']['date_query'] = preg_replace( '/^\s*AND\s*/', '', $date_query_object->get_sql() );
+               if ( ! empty( $this->query_vars['date_query'] ) && is_array( $this->query_vars['date_query'] ) ) {
+                       $this->date_query = new WP_Date_Query( $this->query_vars['date_query'], 'comment_date' );
+                       $this->sql_clauses['where']['date_query'] = preg_replace( '/^\s*AND\s*/', '', $this->date_query->get_sql() );
                }
 
                $where = implode( ' AND ', $this->sql_clauses['where'] );
 
                $pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
                /**
-                * Filter the comment query clauses.
+                * Filters the comment query clauses.
                 *
                 * @since 3.1.0
                 *
@@ -894,6 +904,33 @@ class WP_Comment_Query {
                }
        }
 
+       /**
+        * Populates found_comments and max_num_pages properties for the current
+        * query if the limit clause was used.
+        *
+        * @since 4.6.0
+        * @access private
+        *
+        * @global wpdb $wpdb WordPress database abstraction object.
+        */
+       private function set_found_comments() {
+               global $wpdb;
+
+               if ( $this->query_vars['number'] && ! $this->query_vars['no_found_rows'] ) {
+                       /**
+                        * Filters the query used to retrieve found comment count.
+                        *
+                        * @since 4.4.0
+                        *
+                        * @param string           $found_comments_query SQL query. Default 'SELECT FOUND_ROWS()'.
+                        * @param WP_Comment_Query $comment_query        The `WP_Comment_Query` instance.
+                        */
+                       $found_comments_query = apply_filters( 'found_comments_query', 'SELECT FOUND_ROWS()', $this );
+
+                       $this->found_comments = (int) $wpdb->get_var( $found_comments_query );
+               }
+       }
+
        /**
         * Fetch descendants for located comments.
         *
@@ -934,20 +971,49 @@ class WP_Comment_Query {
                        }
                }
 
+               $key = md5( serialize( wp_array_slice_assoc( $this->query_vars, array_keys( $this->query_var_defaults ) ) ) );
+               $last_changed = wp_cache_get( 'last_changed', 'comment' );
+               if ( ! $last_changed ) {
+                       $last_changed = microtime();
+                       wp_cache_set( 'last_changed', $last_changed, 'comment' );
+               }
+
                // Fetch an entire level of the descendant tree at a time.
                $level = 0;
                do {
-                       $parent_ids = $levels[ $level ];
-                       if ( ! $parent_ids ) {
-                               break;
+                       // Parent-child relationships may be cached. Only query for those that are not.
+                       $child_ids = $uncached_parent_ids = array();
+                       $_parent_ids = $levels[ $level ];
+                       foreach ( $_parent_ids as $parent_id ) {
+                               $cache_key = "get_comment_child_ids:$parent_id:$key:$last_changed";
+                               $parent_child_ids = wp_cache_get( $cache_key, 'comment' );
+                               if ( false !== $parent_child_ids ) {
+                                       $child_ids = array_merge( $child_ids, $parent_child_ids );
+                               } else {
+                                       $uncached_parent_ids[] = $parent_id;
+                               }
                        }
 
-                       $where = 'WHERE ' . $_where . ' AND comment_parent IN (' . implode( ',', array_map( 'intval', $parent_ids ) ) . ')';
-                       $comment_ids = $wpdb->get_col( "{$this->sql_clauses['select']} {$this->sql_clauses['from']} {$where} {$this->sql_clauses['groupby']} ORDER BY comment_date_gmt ASC, comment_ID ASC" );
+                       if ( $uncached_parent_ids ) {
+                               $where = 'WHERE ' . $_where . ' AND comment_parent IN (' . implode( ',', array_map( 'intval', $uncached_parent_ids ) ) . ')';
+                               $level_comments = $wpdb->get_results( "SELECT $wpdb->comments.comment_ID, $wpdb->comments.comment_parent {$this->sql_clauses['from']} {$where} {$this->sql_clauses['groupby']} ORDER BY comment_date_gmt ASC, comment_ID ASC" );
+
+                               // Cache parent-child relationships.
+                               $parent_map = array_fill_keys( $uncached_parent_ids, array() );
+                               foreach ( $level_comments as $level_comment ) {
+                                       $parent_map[ $level_comment->comment_parent ][] = $level_comment->comment_ID;
+                                       $child_ids[] = $level_comment->comment_ID;
+                               }
+
+                               foreach ( $parent_map as $parent_id => $children ) {
+                                       $cache_key = "get_comment_child_ids:$parent_id:$key:$last_changed";
+                                       wp_cache_set( $cache_key, $children, 'comment' );
+                               }
+                       }
 
                        $level++;
-                       $levels[ $level ] = $comment_ids;
-               } while ( $comment_ids );
+                       $levels[ $level ] = $child_ids;
+               } while ( $child_ids );
 
                // Prime comment caches for non-top-level comments.
                $descendant_ids = array();
index 52a8a91ee64d59b058c47ba89d6196fd54d806bf..1920140ff0ccea917acbaf5e5b917a7ad87091ac 100644 (file)
@@ -175,7 +175,7 @@ class WP_Customize_Control {
         *                                                 attribute names are the keys and values are the values. Not
         *                                                 used for 'checkbox', 'radio', 'select', 'textarea', or
         *                                                 'dropdown-pages' control types. Default empty array.
-        *     @type array                $json            Deprecated. Use {@see WP_Customize_Control->json()} instead.
+        *     @type array                $json            Deprecated. Use WP_Customize_Control::json() instead.
         *     @type string               $type            Control type. Core controls include 'text', 'checkbox',
         *                                                 'textarea', 'radio', 'select', and 'dropdown-pages'. Additional
         *                                                 input types such as 'email', 'url', 'number', 'hidden', and
@@ -235,7 +235,7 @@ class WP_Customize_Control {
                $active = call_user_func( $this->active_callback, $this );
 
                /**
-                * Filter response of WP_Customize_Control::active().
+                * Filters response of WP_Customize_Control::active().
                 *
                 * @since 4.0.0
                 *
@@ -381,7 +381,7 @@ class WP_Customize_Control {
                 *
                 * @since 3.4.0
                 *
-                * @param WP_Customize_Control $this {@see WP_Customize_Control} instance.
+                * @param WP_Customize_Control $this WP_Customize_Control instance.
                 */
                do_action( 'customize_render_control_' . $this->id, $this );
 
@@ -444,12 +444,12 @@ class WP_Customize_Control {
        /**
         * Render the control's content.
         *
-        * Allows the content to be overriden without having to rewrite the wrapper in $this->render().
+        * Allows the content to be overriden without having to rewrite the wrapper in `$this::render()`.
         *
         * Supports basic input types `text`, `checkbox`, `textarea`, `radio`, `select` and `dropdown-pages`.
         * Additional input types such as `email`, `url`, `number`, `hidden` and `date` are supported implicitly.
         *
-        * Control content can alternately be rendered in JS. See {@see WP_Customize_Control::print_template()}.
+        * Control content can alternately be rendered in JS. See WP_Customize_Control::print_template().
         *
         * @since 3.4.0
         */
@@ -570,7 +570,7 @@ class WP_Customize_Control {
         * Render the control's JS template.
         *
         * This function is only run for control types that have been registered with
-        * {@see WP_Customize_Manager::register_control_type()}.
+        * WP_Customize_Manager::register_control_type().
         *
         * In the future, this will also print the template for the control's container
         * element and be override-able.
@@ -589,7 +589,7 @@ class WP_Customize_Control {
         * An Underscore (JS) template for this control's content (but not its container).
         *
         * Class variables for this control class are available in the `data` JS object;
-        * export custom variables by overriding {@see WP_Customize_Control::to_json()}.
+        * export custom variables by overriding WP_Customize_Control::to_json().
         *
         * @see WP_Customize_Control::print_template()
         *
index 74819516bd6aaadb2485a4ad1373295807a02dcc..09e48b290cc11ed7a33d51002abcf7054a78b0e0 100644 (file)
@@ -242,7 +242,7 @@ final class WP_Customize_Manager {
                require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-setting.php' );
 
                /**
-                * Filter the core Customizer components to load.
+                * Filters the core Customizer components to load.
                 *
                 * This allows Core components to be excluded from being instantiated by
                 * filtering them out of the array. Note that this filter generally runs
@@ -305,14 +305,14 @@ final class WP_Customize_Manager {
        }
 
        /**
-        * Return true if it's an AJAX request.
+        * Return true if it's an Ajax request.
         *
         * @since 3.4.0
         * @since 4.2.0 Added `$action` param.
         * @access public
         *
-        * @param string|null $action Whether the supplied AJAX action is being run.
-        * @return bool True if it's an AJAX request, false otherwise.
+        * @param string|null $action Whether the supplied Ajax action is being run.
+        * @return bool True if it's an Ajax request, false otherwise.
         */
        public function doing_ajax( $action = null ) {
                $doing_ajax = ( defined( 'DOING_AJAX' ) && DOING_AJAX );
@@ -333,11 +333,11 @@ final class WP_Customize_Manager {
 
        /**
         * Custom wp_die wrapper. Returns either the standard message for UI
-        * or the AJAX message.
+        * or the Ajax message.
         *
         * @since 3.4.0
         *
-        * @param mixed $ajax_message AJAX return
+        * @param mixed $ajax_message Ajax return
         * @param mixed $message UI message
         */
        protected function wp_die( $ajax_message, $message = null ) {
@@ -353,7 +353,7 @@ final class WP_Customize_Manager {
        }
 
        /**
-        * Return the AJAX wp_die() handler if it's a customized request.
+        * Return the Ajax wp_die() handler if it's a customized request.
         *
         * @since 3.4.0
         *
@@ -387,7 +387,7 @@ final class WP_Customize_Manager {
                show_admin_bar( false );
 
                if ( ! current_user_can( 'customize' ) ) {
-                       $this->wp_die( -1, __( 'You are not allowed to customize the appearance of this site.' ) );
+                       $this->wp_die( -1, __( 'Sorry, you are not allowed to customize this site.' ) );
                }
 
                $this->original_stylesheet = get_stylesheet();
@@ -401,7 +401,7 @@ final class WP_Customize_Manager {
                        // If the requested theme is not the active theme and the user doesn't have the
                        // switch_themes cap, bail.
                        if ( ! current_user_can( 'switch_themes' ) ) {
-                               $this->wp_die( -1, __( 'You are not allowed to edit theme options on this site.' ) );
+                               $this->wp_die( -1, __( 'Sorry, you are not allowed to edit theme options on this site.' ) );
                        }
 
                        // If the theme has errors while loading, bail.
@@ -424,7 +424,7 @@ final class WP_Customize_Manager {
         * @since 3.4.0
         */
        public function after_setup_theme() {
-               $doing_ajax_or_is_customized = ( $this->doing_ajax() || isset( $_SERVER['customized'] ) );
+               $doing_ajax_or_is_customized = ( $this->doing_ajax() || isset( $_POST['customized'] ) );
                if ( ! $doing_ajax_or_is_customized && ! validate_current_theme() ) {
                        wp_redirect( 'themes.php?broken=true' );
                        exit;
@@ -609,7 +609,7 @@ final class WP_Customize_Manager {
        }
 
        /**
-        * Prevents AJAX requests from following redirects when previewing a theme
+        * Prevents Ajax requests from following redirects when previewing a theme
         * by issuing a 200 response instead of a 30x.
         *
         * Instead, the JS will sniff out the location header.
@@ -651,22 +651,37 @@ final class WP_Customize_Manager {
        }
 
        /**
-        * Return the sanitized value for a given setting from the request's POST data.
+        * Returns the sanitized value for a given setting from the request's POST data.
         *
         * @since 3.4.0
-        * @since 4.1.1 Introduced 'default' parameter.
+        * @since 4.1.1 Introduced the `$default` parameter.
+        * @since 4.6.0 `$default` is now returned early when the setting post value is invalid.
+        * @access public
+        *
+        * @see WP_REST_Server::dispatch()
+        * @see WP_Rest_Request::sanitize_params()
+        * @see WP_Rest_Request::has_valid_params()
         *
-        * @param WP_Customize_Setting $setting A WP_Customize_Setting derived object
-        * @param mixed $default value returned $setting has no post value (added in 4.2.0).
-        * @return string|mixed $post_value Sanitized value or the $default provided
+        * @param WP_Customize_Setting $setting A WP_Customize_Setting derived object.
+        * @param mixed                $default Value returned $setting has no post value (added in 4.2.0)
+        *                                      or the post value is invalid (added in 4.6.0).
+        * @return string|mixed $post_value Sanitized value or the $default provided.
         */
        public function post_value( $setting, $default = null ) {
                $post_values = $this->unsanitized_post_values();
-               if ( array_key_exists( $setting->id, $post_values ) ) {
-                       return $setting->sanitize( $post_values[ $setting->id ] );
-               } else {
+               if ( ! array_key_exists( $setting->id, $post_values ) ) {
+                       return $default;
+               }
+               $value = $post_values[ $setting->id ];
+               $valid = $setting->validate( $value );
+               if ( is_wp_error( $valid ) ) {
                        return $default;
                }
+               $value = $setting->sanitize( $value );
+               if ( is_null( $value ) || is_wp_error( $value ) ) {
+                       return $default;
+               }
+               return $value;
        }
 
        /**
@@ -685,7 +700,7 @@ final class WP_Customize_Manager {
                /**
                 * Announce when a specific setting's unsanitized post value has been set.
                 *
-                * Fires when the {@see WP_Customize_Manager::set_post_value()} method is called.
+                * Fires when the WP_Customize_Manager::set_post_value() method is called.
                 *
                 * The dynamic portion of the hook name, `$setting_id`, refers to the setting ID.
                 *
@@ -699,7 +714,7 @@ final class WP_Customize_Manager {
                /**
                 * Announce when any setting's unsanitized post value has been set.
                 *
-                * Fires when the {@see WP_Customize_Manager::set_post_value()} method is called.
+                * Fires when the WP_Customize_Manager::set_post_value() method is called.
                 *
                 * This is useful for `WP_Customize_Setting` instances to watch
                 * in order to update a cached previewed value.
@@ -749,7 +764,7 @@ final class WP_Customize_Manager {
 
        /**
         * Prevent sending a 404 status when returning the response for the customize
-        * preview, since it causes the jQuery AJAX to fail. Send 200 instead.
+        * preview, since it causes the jQuery Ajax to fail. Send 200 instead.
         *
         * @since 4.0.0
         * @access public
@@ -813,6 +828,9 @@ final class WP_Customize_Manager {
         * @since 3.4.0
         */
        public function customize_preview_settings() {
+               $setting_validities = $this->validate_setting_values( $this->unsanitized_post_values() );
+               $exported_setting_validities = array_map( array( $this, 'prepare_setting_validity_for_js' ), $setting_validities );
+
                $settings = array(
                        'theme' => array(
                                'stylesheet' => $this->get_stylesheet(),
@@ -825,6 +843,7 @@ final class WP_Customize_Manager {
                        'activePanels' => array(),
                        'activeSections' => array(),
                        'activeControls' => array(),
+                       'settingValidities' => $exported_setting_validities,
                        'nonce' => $this->get_nonces(),
                        'l10n' => array(
                                'shiftClickToEdit' => __( 'Shift-click to edit this element.' ),
@@ -893,8 +912,8 @@ final class WP_Customize_Manager {
         *
         * @since 3.4.0
         *
-        * @param mixed $return Value passed through for wp_die_handler filter.
-        * @return mixed Value passed through for wp_die_handler filter.
+        * @param mixed $return Value passed through for {@see 'wp_die_handler'} filter.
+        * @return mixed Value passed through for {@see 'wp_die_handler'} filter.
         */
        public function remove_preview_signature( $return = null ) {
                remove_action( 'shutdown', array( $this, 'customize_preview_signature' ), 1000 );
@@ -958,7 +977,7 @@ final class WP_Customize_Manager {
        }
 
        /**
-        * Filter the current theme and return the name of the previewed theme.
+        * Filters the current theme and return the name of the previewed theme.
         *
         * @since 3.4.0
         *
@@ -969,6 +988,83 @@ final class WP_Customize_Manager {
                return $this->theme()->display('Name');
        }
 
+       /**
+        * Validates setting values.
+        *
+        * Sanitization is applied to the values before being passed for validation.
+        * Validation is skipped for unregistered settings or for values that are
+        * already null since they will be skipped anyway.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @see WP_REST_Request::has_valid_params()
+        * @see WP_Customize_Setting::validate()
+        *
+        * @param array $setting_values Mapping of setting IDs to values to sanitize and validate.
+        * @return array Mapping of setting IDs to return value of validate method calls, either `true` or `WP_Error`.
+        */
+       public function validate_setting_values( $setting_values ) {
+               $validities = array();
+               foreach ( $setting_values as $setting_id => $unsanitized_value ) {
+                       $setting = $this->get_setting( $setting_id );
+                       if ( ! $setting || is_null( $unsanitized_value ) ) {
+                               continue;
+                       }
+                       $validity = $setting->validate( $unsanitized_value );
+                       if ( ! is_wp_error( $validity ) ) {
+                               $value = $setting->sanitize( $unsanitized_value );
+                               if ( is_null( $value ) ) {
+                                       $validity = false;
+                               } elseif ( is_wp_error( $value ) ) {
+                                       $validity = $value;
+                               }
+                       }
+                       if ( false === $validity ) {
+                               $validity = new WP_Error( 'invalid_value', __( 'Invalid value.' ) );
+                       }
+                       $validities[ $setting_id ] = $validity;
+               }
+               return $validities;
+       }
+
+       /**
+        * Prepares setting validity for exporting to the client (JS).
+        *
+        * Converts `WP_Error` instance into array suitable for passing into the
+        * `wp.customize.Notification` JS model.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param true|WP_Error $validity Setting validity.
+        * @return true|array If `$validity` was a WP_Error, the error codes will be array-mapped
+        *                    to their respective `message` and `data` to pass into the
+        *                    `wp.customize.Notification` JS model.
+        */
+       public function prepare_setting_validity_for_js( $validity ) {
+               if ( is_wp_error( $validity ) ) {
+                       $notification = array();
+                       foreach ( $validity->errors as $error_code => $error_messages ) {
+                               $error_data = $validity->get_error_data( $error_code );
+                               if ( is_null( $error_data ) ) {
+                                       $error_data = array();
+                               }
+                               $error_data = array_merge(
+                                       $error_data,
+                                       array( 'from_server' => true )
+                               );
+                               $notification[ $error_code ] = array(
+                                       'message' => join( ' ', $error_messages ),
+                                       'data' => $error_data,
+                               );
+                       }
+                       return $notification;
+               } else {
+                       return true;
+               }
+       }
+
        /**
         * Switch the theme and trigger the save() method on each setting.
         *
@@ -984,6 +1080,34 @@ final class WP_Customize_Manager {
                        wp_send_json_error( 'invalid_nonce' );
                }
 
+               /**
+                * Fires before save validation happens.
+                *
+                * Plugins can add just-in-time {@see 'customize_validate_{$this->ID}'} filters
+                * at this point to catch any settings registered after `customize_register`.
+                * The dynamic portion of the hook name, `$this->ID` refers to the setting ID.
+                *
+                * @since 4.6.0
+                *
+                * @param WP_Customize_Manager $this WP_Customize_Manager instance.
+                */
+               do_action( 'customize_save_validation_before', $this );
+
+               // Validate settings.
+               $setting_validities = $this->validate_setting_values( $this->unsanitized_post_values() );
+               $invalid_setting_count = count( array_filter( $setting_validities, 'is_wp_error' ) );
+               $exported_setting_validities = array_map( array( $this, 'prepare_setting_validity_for_js' ), $setting_validities );
+               if ( $invalid_setting_count > 0 ) {
+                       $response = array(
+                               'setting_validities' => $exported_setting_validities,
+                               'message' => sprintf( _n( 'There is %s invalid setting.', 'There are %s invalid settings.', $invalid_setting_count ), number_format_i18n( $invalid_setting_count ) ),
+                       );
+
+                       /** This filter is documented in wp-includes/class-wp-customize-manager.php */
+                       $response = apply_filters( 'customize_save_response', $response, $this );
+                       wp_send_json_error( $response );
+               }
+
                // Do we have to switch themes?
                if ( ! $this->is_theme_active() ) {
                        // Temporarily stop previewing the theme to allow switch_themes()
@@ -1017,8 +1141,12 @@ final class WP_Customize_Manager {
                 */
                do_action( 'customize_save_after', $this );
 
+               $data = array(
+                       'setting_validities' => $exported_setting_validities,
+               );
+
                /**
-                * Filter response data for a successful customize_save AJAX request.
+                * Filters response data for a successful customize_save Ajax request.
                 *
                 * This filter does not apply if there was a nonce or authentication failure.
                 *
@@ -1028,7 +1156,7 @@ final class WP_Customize_Manager {
                 *                                   event on `wp.customize`.
                 * @param WP_Customize_Manager $this WP_Customize_Manager instance.
                 */
-               $response = apply_filters( 'customize_save_response', array(), $this );
+               $response = apply_filters( 'customize_save_response', $data, $this );
                wp_send_json_success( $response );
        }
 
@@ -1103,7 +1231,7 @@ final class WP_Customize_Manager {
                        $setting_class = 'WP_Customize_Setting';
 
                        /**
-                        * Filter a dynamic setting's constructor args.
+                        * Filters a dynamic setting's constructor args.
                         *
                         * For a dynamic setting to be registered, this filter must be employed
                         * to override the default false value with an array of args to pass to
@@ -1218,7 +1346,7 @@ final class WP_Customize_Manager {
                                '<a href="' . esc_url( 'https://developer.wordpress.org/reference/hooks/customize_loaded_components/' ) . '"><code>customize_loaded_components</code></a>'
                        );
 
-                       _doing_it_wrong( __METHOD__, $message, '4.5' );
+                       _doing_it_wrong( __METHOD__, $message, '4.5.0' );
                }
                unset( $this->panels[ $id ] );
        }
@@ -1384,7 +1512,7 @@ final class WP_Customize_Manager {
         * @access public
         *
         * @param string $control Name of a custom control which is a subclass of
-        *                        {@see WP_Customize_Control}.
+        *                        WP_Customize_Control.
         */
        public function register_control_type( $control ) {
                $this->registered_control_types[] = $control;
@@ -1403,6 +1531,15 @@ final class WP_Customize_Manager {
                        ) );
                        $control->print_template();
                }
+               ?>
+               <script type="text/html" id="tmpl-customize-control-notifications">
+                       <ul>
+                               <# _.each( data.notifications, function( notification ) { #>
+                                       <li class="notice notice-{{ notification.type || 'info' }} {{ data.altNotice ? 'notice-alt' : '' }}" data-code="{{ notification.code }}" data-type="{{ notification.type }}">{{ notification.message || notification.code }}</li>
+                               <# } ); #>
+                       </ul>
+               </script>
+               <?php
        }
 
        /**
@@ -1653,7 +1790,7 @@ final class WP_Customize_Manager {
                );
 
                /**
-                * Filter nonces for Customizer.
+                * Filters nonces for Customizer.
                 *
                 * @since 4.2.0
                 *
@@ -1691,7 +1828,7 @@ final class WP_Customize_Manager {
                }
 
                /**
-                * Filter the list of URLs allowed to be clicked and followed in the Customizer preview.
+                * Filters the list of URLs allowed to be clicked and followed in the Customizer preview.
                 *
                 * @since 3.4.0
                 *
@@ -1765,11 +1902,7 @@ final class WP_Customize_Manager {
                                        printf(
                                                "s[%s] = %s;\n",
                                                wp_json_encode( $setting->id ),
-                                               wp_json_encode( array(
-                                                       'value'     => $setting->js_value(),
-                                                       'transport' => $setting->transport,
-                                                       'dirty'     => $setting->dirty,
-                                               ) )
+                                               wp_json_encode( $setting->json() )
                                        );
                                }
                        }
@@ -1815,7 +1948,7 @@ final class WP_Customize_Manager {
                );
 
                /**
-                * Filter the available devices to allow previewing in the Customizer.
+                * Filters the available devices to allow previewing in the Customizer.
                 *
                 * @since 4.5.0
                 *
@@ -2238,64 +2371,3 @@ final class WP_Customize_Manager {
                return get_custom_logo();
        }
 }
-
-/**
- * Sanitizes a hex color.
- *
- * Returns either '', a 3 or 6 digit hex color (with #), or nothing.
- * For sanitizing values without a #, see sanitize_hex_color_no_hash().
- *
- * @since 3.4.0
- *
- * @param string $color
- * @return string|void
- */
-function sanitize_hex_color( $color ) {
-       if ( '' === $color )
-               return '';
-
-       // 3 or 6 hex digits, or the empty string.
-       if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) )
-               return $color;
-}
-
-/**
- * Sanitizes a hex color without a hash. Use sanitize_hex_color() when possible.
- *
- * Saving hex colors without a hash puts the burden of adding the hash on the
- * UI, which makes it difficult to use or upgrade to other color types such as
- * rgba, hsl, rgb, and html color names.
- *
- * Returns either '', a 3 or 6 digit hex color (without a #), or null.
- *
- * @since 3.4.0
- *
- * @param string $color
- * @return string|null
- */
-function sanitize_hex_color_no_hash( $color ) {
-       $color = ltrim( $color, '#' );
-
-       if ( '' === $color )
-               return '';
-
-       return sanitize_hex_color( '#' . $color ) ? $color : null;
-}
-
-/**
- * Ensures that any hex color is properly hashed.
- * Otherwise, returns value untouched.
- *
- * This method should only be necessary if using sanitize_hex_color_no_hash().
- *
- * @since 3.4.0
- *
- * @param string $color
- * @return string
- */
-function maybe_hash_hex_color( $color ) {
-       if ( $unhashed = sanitize_hex_color_no_hash( $color ) )
-               return '#' . $unhashed;
-
-       return $color;
-}
index 778456727c731c2b63b1332c82e850622ca51043..f9832a69b2f164c4713e7eaa54f0a40ec3a58666 100644 (file)
@@ -211,7 +211,7 @@ final class WP_Customize_Nav_Menus {
                }
 
                /**
-                * Filter the available menu items.
+                * Filters the available menu items.
                 *
                 * @since 4.3.0
                 *
@@ -335,7 +335,7 @@ final class WP_Customize_Nav_Menus {
                }
 
                /**
-                * Filter the available menu items during a search request.
+                * Filters the available menu items during a search request.
                 *
                 * @since 4.5.0
                 *
@@ -428,7 +428,7 @@ final class WP_Customize_Nav_Menus {
        }
 
        /**
-        * Filter a dynamic setting's constructor args.
+        * Filters a dynamic setting's constructor args.
         *
         * For a dynamic setting to be registered, this filter must be employed
         * to override the default false value with an array of args to pass to
@@ -496,6 +496,7 @@ final class WP_Customize_Nav_Menus {
                // Create a panel for Menus.
                $description = '<p>' . __( 'This panel is used for managing navigation menus for content you have already published on your site. You can create menus and add items for existing content such as pages, posts, categories, tags, formats, or custom links.' ) . '</p>';
                if ( current_theme_supports( 'widgets' ) ) {
+                       /* translators: URL to the widgets panel of the customizer */
                        $description .= '<p>' . sprintf( __( 'Menus can be displayed in locations defined by your theme or in <a href="%s">widget areas</a> by adding a &#8220;Custom Menu&#8221; widget.' ), "javascript:wp.customize.panel( 'widgets' ).focus();" ) . '</p>';
                } else {
                        $description .= '<p>' . __( 'Menus can be displayed in locations defined by your theme.' ) . '</p>';
@@ -512,11 +513,15 @@ final class WP_Customize_Nav_Menus {
                $locations     = get_registered_nav_menus();
                $num_locations = count( array_keys( $locations ) );
                if ( 1 == $num_locations ) {
-                       $description = '<p>' . __( 'Your theme supports one menu. Select which menu you would like to use.' );
+                       $description = '<p>' . __( 'Your theme supports one menu. Select which menu you would like to use.' ) . '</p>';
                } else {
-                       $description = '<p>' . sprintf( _n( 'Your theme supports %s menu. Select which menu appears in each location.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) );
+                       /* translators: %s: number of menu locations */
+                       $description = '<p>' . sprintf( _n( 'Your theme supports %s menu. Select which menu appears in each location.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ) . '</p>';
+               }
+               if ( current_theme_supports( 'widgets' ) ) {
+                       /* translators: URL to the widgets panel of the customizer */
+                       $description .= '<p>' . sprintf( __( 'You can also place menus in <a href="%s">widget areas</a> with the &#8220;Custom Menu&#8221; widget.' ), "javascript:wp.customize.panel( 'widgets' ).focus();" ) . '</p>';
                }
-               $description  .= '</p><p>' . __( 'You can also place menus in widget areas with the Custom Menu widget.' ) . '</p>';
 
                $this->manager->add_section( 'menu_locations', array(
                        'title'       => __( 'Menu Locations' ),
@@ -676,7 +681,7 @@ final class WP_Customize_Nav_Menus {
                }
 
                /**
-                * Filter the available menu item types.
+                * Filters the available menu item types.
                 *
                 * @since 4.3.0
                 *
@@ -761,8 +766,8 @@ final class WP_Customize_Nav_Menus {
                                        <input type="text" id="menu-items-search" placeholder="<?php esc_attr_e( 'Search menu items&hellip;' ) ?>" aria-describedby="menu-items-search-desc" />
                                        <p class="screen-reader-text" id="menu-items-search-desc"><?php _e( 'The search results will be updated as you type.' ); ?></p>
                                        <span class="spinner"></span>
-                                       <span class="clear-results"><span class="screen-reader-text"><?php _e( 'Clear Results' ); ?></span></span>
                                </div>
+                               <button type="button" class="clear-results"><span class="screen-reader-text"><?php _e( 'Clear Results' ); ?></span></button>
                                <ul class="accordion-section-content" data-type="search"></ul>
                        </div>
                        <div id="new-custom-menu-item" class="accordion-section">
@@ -831,7 +836,7 @@ final class WP_Customize_Nav_Menus {
        public $preview_nav_menu_instance_args = array();
 
        /**
-        * Filter arguments for dynamic nav_menu selective refresh partials.
+        * Filters arguments for dynamic nav_menu selective refresh partials.
         *
         * @since 4.5.0
         * @access public
index d5441f6310a47033a269fc72d58f43f3dd1d1b01..46e604a9a6d63545961acb5eb06be88566a1038f 100644 (file)
@@ -130,9 +130,9 @@ class WP_Customize_Panel {
         * @see WP_Customize_Section::active()
         *
         * @var callable Callback is called with one argument, the instance of
-        *               {@see WP_Customize_Section}, and returns bool to indicate
-        *               whether the section is active (such as it relates to the URL
-        *               currently being previewed).
+        *               WP_Customize_Section, and returns bool to indicate whether
+        *               the section is active (such as it relates to the URL currently
+        *               being previewed).
         */
        public $active_callback = '';
 
@@ -179,12 +179,12 @@ class WP_Customize_Panel {
                $active = call_user_func( $this->active_callback, $this );
 
                /**
-                * Filter response of WP_Customize_Panel::active().
+                * Filters response of WP_Customize_Panel::active().
                 *
                 * @since 4.1.0
                 *
-                * @param bool               $active  Whether the Customizer panel is active.
-                * @param WP_Customize_Panel $panel   {@see WP_Customize_Panel} instance.
+                * @param bool               $active Whether the Customizer panel is active.
+                * @param WP_Customize_Panel $panel  WP_Customize_Panel instance.
                 */
                $active = apply_filters( 'customize_panel_active', $active, $panel );
 
@@ -192,7 +192,7 @@ class WP_Customize_Panel {
        }
 
        /**
-        * Default callback used when invoking {@see WP_Customize_Panel::active()}.
+        * Default callback used when invoking WP_Customize_Panel::active().
         *
         * Subclasses can override this with their specific logic, or they may
         * provide an 'active_callback' argument to the constructor.
@@ -290,7 +290,7 @@ class WP_Customize_Panel {
        /**
         * Render the panel container, and then its contents (via `this->render_content()`) in a subclass.
         *
-        * Panel containers are now rendered in JS by default, see {@see WP_Customize_Panel::print_template()}.
+        * Panel containers are now rendered in JS by default, see WP_Customize_Panel::print_template().
         *
         * @since 4.0.0
         * @access protected
@@ -300,7 +300,7 @@ class WP_Customize_Panel {
        /**
         * Render the panel UI in a subclass.
         *
-        * Panel contents are now rendered in JS by default, see {@see WP_Customize_Panel::print_template()}.
+        * Panel contents are now rendered in JS by default, see WP_Customize_Panel::print_template().
         *
         * @since 4.1.0
         * @access protected
index 81f3ced7501d3d40593c9b4bd6be747f71b6981b..0a916f2f543c1faf54cde88ae8e01cdcc4d23e8c 100644 (file)
@@ -139,9 +139,9 @@ class WP_Customize_Section {
         * @see WP_Customize_Section::active()
         *
         * @var callable Callback is called with one argument, the instance of
-        *               {@see WP_Customize_Section}, and returns bool to indicate
-        *               whether the section is active (such as it relates to the URL
-        *               currently being previewed).
+        *               WP_Customize_Section, and returns bool to indicate whether
+        *               the section is active (such as it relates to the URL currently
+        *               being previewed).
         */
        public $active_callback = '';
 
@@ -188,12 +188,12 @@ class WP_Customize_Section {
                $active = call_user_func( $this->active_callback, $this );
 
                /**
-                * Filter response of {@see WP_Customize_Section::active()}.
+                * Filters response of WP_Customize_Section::active().
                 *
                 * @since 4.1.0
                 *
                 * @param bool                 $active  Whether the Customizer section is active.
-                * @param WP_Customize_Section $section {@see WP_Customize_Section} instance.
+                * @param WP_Customize_Section $section WP_Customize_Section instance.
                 */
                $active = apply_filters( 'customize_section_active', $active, $section );
 
@@ -201,7 +201,7 @@ class WP_Customize_Section {
        }
 
        /**
-        * Default callback used when invoking {@see WP_Customize_Section::active()}.
+        * Default callback used when invoking WP_Customize_Section::active().
         *
         * Subclasses can override this with their specific logic, or they may provide
         * an 'active_callback' argument to the constructor.
@@ -306,7 +306,7 @@ class WP_Customize_Section {
        /**
         * Render the section UI in a subclass.
         *
-        * Sections are now rendered in JS by default, see {@see WP_Customize_Section::print_template()}.
+        * Sections are now rendered in JS by default, see WP_Customize_Section::print_template().
         *
         * @since 3.4.0
         */
index d176d6aa2a603960d2fb593494724fa3ad39c16f..a0d04d383bcdd0d0b852e402c9b80bf95f2d536c 100644 (file)
@@ -59,6 +59,7 @@ class WP_Customize_Setting {
         *
         * @var callback
         */
+       public $validate_callback    = '';
        public $sanitize_callback    = '';
        public $sanitize_js_callback = '';
 
@@ -142,6 +143,9 @@ class WP_Customize_Setting {
                        $this->id .= '[' . implode( '][', $this->id_data['keys'] ) . ']';
                }
 
+               if ( $this->validate_callback ) {
+                       add_filter( "customize_validate_{$this->id}", $this->validate_callback, 10, 3 );
+               }
                if ( $this->sanitize_callback ) {
                        add_filter( "customize_sanitize_{$this->id}", $this->sanitize_callback, 10, 2 );
                }
@@ -338,26 +342,26 @@ class WP_Customize_Setting {
                        default :
 
                                /**
-                                * Fires when the {@see WP_Customize_Setting::preview()} method is called for settings
+                                * Fires when the WP_Customize_Setting::preview() method is called for settings
                                 * not handled as theme_mods or options.
                                 *
                                 * The dynamic portion of the hook name, `$this->id`, refers to the setting ID.
                                 *
                                 * @since 3.4.0
                                 *
-                                * @param WP_Customize_Setting $this {@see WP_Customize_Setting} instance.
+                                * @param WP_Customize_Setting $this WP_Customize_Setting instance.
                                 */
                                do_action( "customize_preview_{$this->id}", $this );
 
                                /**
-                                * Fires when the {@see WP_Customize_Setting::preview()} method is called for settings
+                                * Fires when the WP_Customize_Setting::preview() method is called for settings
                                 * not handled as theme_mods or options.
                                 *
                                 * The dynamic portion of the hook name, `$this->type`, refers to the setting type.
                                 *
                                 * @since 4.1.0
                                 *
-                                * @param WP_Customize_Setting $this {@see WP_Customize_Setting} instance.
+                                * @param WP_Customize_Setting $this WP_Customize_Setting instance.
                                 */
                                do_action( "customize_preview_{$this->type}", $this );
                }
@@ -460,18 +464,21 @@ class WP_Customize_Setting {
        }
 
        /**
-        * Check user capabilities and theme supports, and then save
+        * Checks user capabilities and theme supports, and then saves
         * the value of the setting.
         *
         * @since 3.4.0
         *
-        * @return false|void False if cap check fails or value isn't set.
+        * @access public
+        *
+        * @return false|void False if cap check fails or value isn't set or is invalid.
         */
        final public function save() {
                $value = $this->post_value();
 
-               if ( ! $this->check_capabilities() || ! isset( $value ) )
+               if ( ! $this->check_capabilities() || ! isset( $value ) ) {
                        return false;
+               }
 
                /**
                 * Fires when the WP_Customize_Setting::save() method is called.
@@ -481,9 +488,9 @@ class WP_Customize_Setting {
                 *
                 * @since 3.4.0
                 *
-                * @param WP_Customize_Setting $this {@see WP_Customize_Setting} instance.
+                * @param WP_Customize_Setting $this WP_Customize_Setting instance.
                 */
-               do_action( 'customize_save_' . $this->id_data[ 'base' ], $this );
+               do_action( 'customize_save_' . $this->id_data['base'], $this );
 
                $this->update( $value );
        }
@@ -494,7 +501,7 @@ class WP_Customize_Setting {
         * @since 3.4.0
         *
         * @param mixed $default A default value which is used as a fallback. Default is null.
-        * @return mixed The default value on failure, otherwise the sanitized value.
+        * @return mixed The default value on failure, otherwise the sanitized and validated value.
         */
        final public function post_value( $default = null ) {
                return $this->manager->post_value( $this, $default );
@@ -505,13 +512,13 @@ class WP_Customize_Setting {
         *
         * @since 3.4.0
         *
-        * @param string|array $value The value to sanitize.
-        * @return string|array|null Null if an input isn't valid, otherwise the sanitized value.
+        * @param string|array $value    The value to sanitize.
+        * @return string|array|null|WP_Error Sanitized value, or `null`/`WP_Error` if invalid.
         */
        public function sanitize( $value ) {
 
                /**
-                * Filter a Customize setting value in un-slashed form.
+                * Filters a Customize setting value in un-slashed form.
                 *
                 * @since 3.4.0
                 *
@@ -521,6 +528,48 @@ class WP_Customize_Setting {
                return apply_filters( "customize_sanitize_{$this->id}", $value, $this );
        }
 
+       /**
+        * Validates an input.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @see WP_REST_Request::has_valid_params()
+        *
+        * @param mixed $value Value to validate.
+        * @return true|WP_Error True if the input was validated, otherwise WP_Error.
+        */
+       public function validate( $value ) {
+               if ( is_wp_error( $value ) ) {
+                       return $value;
+               }
+               if ( is_null( $value ) ) {
+                       return new WP_Error( 'invalid_value', __( 'Invalid value.' ) );
+               }
+
+               $validity = new WP_Error();
+
+               /**
+                * Validates a Customize setting value.
+                *
+                * Plugins should amend the `$validity` object via its `WP_Error::add()` method.
+                *
+                * The dynamic portion of the hook name, `$this->ID`, refers to the setting ID.
+                *
+                * @since 4.6.0
+                *
+                * @param WP_Error             $validity Filtered from `true` to `WP_Error` when invalid.
+                * @param mixed                $value    Value of the setting.
+                * @param WP_Customize_Setting $this     WP_Customize_Setting instance.
+                */
+               $validity = apply_filters( "customize_validate_{$this->id}", $validity, $value, $this );
+
+               if ( is_wp_error( $validity ) && empty( $validity->errors ) ) {
+                       $validity = true;
+               }
+               return $validity;
+       }
+
        /**
         * Get the root value for a setting, especially for multidimensional ones.
         *
@@ -597,7 +646,7 @@ class WP_Customize_Setting {
                        }
                } else {
                        /**
-                        * Fires when the {@see WP_Customize_Setting::update()} method is called for settings
+                        * Fires when the WP_Customize_Setting::update() method is called for settings
                         * not handled as theme_mods or options.
                         *
                         * The dynamic portion of the hook name, `$this->type`, refers to the type of setting.
@@ -648,22 +697,29 @@ class WP_Customize_Setting {
                        $value = $this->get_root_value( $this->default );
 
                        /**
-                        * Filter a Customize setting value not handled as a theme_mod or option.
+                        * Filters a Customize setting value not handled as a theme_mod or option.
                         *
-                        * The dynamic portion of the hook name, `$this->id_date['base']`, refers to
-                        * the base slug of the setting name.
+                        * The dynamic portion of the hook name, `$id_base`, refers to
+                        * the base slug of the setting name, initialized from `$this->id_data['base']`.
                         *
                         * For settings handled as theme_mods or options, see those corresponding
                         * functions for available hooks.
                         *
                         * @since 3.4.0
+                        * @since 4.6.0 Added the `$this` setting instance as the second parameter.
                         *
-                        * @param mixed $default The setting default value. Default empty.
+                        * @param mixed                $default The setting default value. Default empty.
+                        * @param WP_Customize_Setting $this    The setting instance.
                         */
-                       $value = apply_filters( "customize_value_{$id_base}", $value );
-               } else if ( $this->is_multidimensional_aggregated ) {
+                       $value = apply_filters( "customize_value_{$id_base}", $value, $this );
+               } elseif ( $this->is_multidimensional_aggregated ) {
                        $root_value = self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['root_value'];
                        $value = $this->multidimensional_get( $root_value, $this->id_data['keys'], $this->default );
+
+                       // Ensure that the post value is used if the setting is previewed, since preview filters aren't applying on cached $root_value.
+                       if ( $this->is_previewed ) {
+                               $value = $this->post_value( $value );
+                       }
                } else {
                        $value = $this->get_root_value( $this->default );
                }
@@ -680,14 +736,14 @@ class WP_Customize_Setting {
        public function js_value() {
 
                /**
-                * Filter a Customize setting value for use in JavaScript.
+                * Filters a Customize setting value for use in JavaScript.
                 *
                 * The dynamic portion of the hook name, `$this->id`, refers to the setting ID.
                 *
                 * @since 3.4.0
                 *
                 * @param mixed                $value The setting value.
-                * @param WP_Customize_Setting $this  {@see WP_Customize_Setting} instance.
+                * @param WP_Customize_Setting $this  WP_Customize_Setting instance.
                 */
                $value = apply_filters( "customize_sanitize_js_{$this->id}", $this->value(), $this );
 
@@ -697,6 +753,23 @@ class WP_Customize_Setting {
                return $value;
        }
 
+       /**
+        * Retrieves the data to export to the client via JSON.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @return array Array of parameters passed to JavaScript.
+        */
+       public function json() {
+               return array(
+                       'value'     => $this->js_value(),
+                       'transport' => $this->transport,
+                       'dirty'     => $this->dirty,
+                       'type'      => $this->type,
+               );
+       }
+
        /**
         * Validate user capabilities whether the theme supports the setting.
         *
index e2b8bf5f66a89377a1941bf596340628fc7eead4..16549ff6922623ac435a13df2a4ed1dcf5646989 100644 (file)
@@ -349,7 +349,7 @@ final class WP_Customize_Widgets {
        /**
         * Ensures widgets are available for all types of previews.
         *
-        * When in preview, hook to 'customize_register' for settings after WordPress is loaded
+        * When in preview, hook to {@see 'customize_register'} for settings after WordPress is loaded
         * so that all filters have been initialized (e.g. Widget Visibility).
         *
         * @since 3.9.0
@@ -455,7 +455,7 @@ final class WP_Customize_Widgets {
                                        );
 
                                        /**
-                                        * Filter Customizer widget section arguments for a given sidebar.
+                                        * Filters Customizer widget section arguments for a given sidebar.
                                         *
                                         * @since 3.9.0
                                         *
@@ -556,7 +556,7 @@ final class WP_Customize_Widgets {
         * have widths of 400 and yet they still render fine in the Customizer panel.
         *
         * This method will return all Core widgets as being not wide, but this can be
-        * overridden with the is_wide_widget_in_customizer filter.
+        * overridden with the {@see 'is_wide_widget_in_customizer'} filter.
         *
         * @since 3.9.0
         * @access public
@@ -575,7 +575,7 @@ final class WP_Customize_Widgets {
                $is_wide          = ( $width > 250 && ! $is_core );
 
                /**
-                * Filter whether the given widget is considered "wide".
+                * Filters whether the given widget is considered "wide".
                 *
                 * @since 3.9.0
                 *
@@ -799,6 +799,9 @@ final class WP_Customize_Widgets {
         * @access public
         */
        public function print_footer_scripts() {
+               /** This action is documented in wp-admin/admin-footer.php */
+               do_action( 'admin_print_footer_scripts-widgets.php' );
+
                /** This action is documented in wp-admin/admin-footer.php */
                do_action( 'admin_print_footer_scripts' );
 
@@ -836,7 +839,7 @@ final class WP_Customize_Widgets {
                $args = array_merge( $args, $overrides );
 
                /**
-                * Filter the common arguments supplied when constructing a Customizer setting.
+                * Filters the common arguments supplied when constructing a Customizer setting.
                 *
                 * @since 3.9.0
                 *
@@ -1986,32 +1989,48 @@ final class WP_Customize_Widgets {
        }
 
        /**
+        * {@internal Missing Summary}
+        *
+        * See the {@see 'customize_dynamic_setting_args'} filter.
+        *
         * @since 3.9.0
-        * @deprecated 4.2.0 Deprecated in favor of customize_dynamic_setting_args filter.
+        * @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter.
         */
        public function setup_widget_addition_previews() {
                _deprecated_function( __METHOD__, '4.2.0' );
        }
 
        /**
+        * {@internal Missing Summary}
+        *
+        * See the {@see 'customize_dynamic_setting_args'} filter.
+        *
         * @since 3.9.0
-        * @deprecated 4.2.0 Deprecated in favor of customize_dynamic_setting_args filter.
+        * @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter.
         */
        public function prepreview_added_sidebars_widgets() {
                _deprecated_function( __METHOD__, '4.2.0' );
        }
 
        /**
+        * {@internal Missing Summary}
+        *
+        * See the {@see 'customize_dynamic_setting_args'} filter.
+        *
         * @since 3.9.0
-        * @deprecated 4.2.0 Deprecated in favor of customize_dynamic_setting_args filter.
+        * @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter.
         */
        public function prepreview_added_widget_instance() {
                _deprecated_function( __METHOD__, '4.2.0' );
        }
 
        /**
+        * {@internal Missing Summary}
+        *
+        * See the {@see 'customize_dynamic_setting_args'} filter.
+        *
         * @since 3.9.0
-        * @deprecated 4.2.0 Deprecated in favor of customize_dynamic_setting_args filter.
+        * @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter.
         */
        public function remove_prepreview_filters() {
                _deprecated_function( __METHOD__, '4.2.0' );
index bfbc547acf94ff7dc5e08a7bcc979a81b3c797e3..f0290b0f1bccb3183d8c9146ae4e8338282bba50 100644 (file)
@@ -54,7 +54,8 @@ final class _WP_Editors {
         *     @type string     $editor_class      Extra classes to add to the editor textarea element. Default empty.
         *     @type bool       $teeny             Whether to output the minimal editor config. Examples include
         *                                         Press This and the Comment editor. Default false.
-        *     @type bool       $dfw               Deprecated in 4.1. Since 4.3 used only to enqueue wp-fullscreen-stub.js for backwards compatibility.
+        *     @type bool       $dfw               Deprecated in 4.1. Since 4.3 used only to enqueue wp-fullscreen-stub.js
+        *                                         for backward compatibility.
         *     @type bool|array $tinymce           Whether to load TinyMCE. Can be used to pass settings directly to
         *                                         TinyMCE using an array. Default true.
         *     @type bool|array $quicktags         Whether to load Quicktags. Can be used to pass settings directly to
@@ -65,7 +66,7 @@ final class _WP_Editors {
        public static function parse_settings( $editor_id, $settings ) {
 
                /**
-                * Filter the wp_editor() settings.
+                * Filters the wp_editor() settings.
                 *
                 * @since 4.0.0
                 *
@@ -99,7 +100,7 @@ final class _WP_Editors {
                if ( self::$this_tinymce ) {
                        if ( false !== strpos( $editor_id, '[' ) ) {
                                self::$this_tinymce = false;
-                               _deprecated_argument( 'wp_editor()', '3.9', 'TinyMCE editor IDs cannot have brackets.' );
+                               _deprecated_argument( 'wp_editor()', '3.9.0', 'TinyMCE editor IDs cannot have brackets.' );
                        }
                }
 
@@ -240,7 +241,7 @@ final class _WP_Editors {
                }
 
                /**
-                * Filter the HTML markup output that displays the editor.
+                * Filters the HTML markup output that displays the editor.
                 *
                 * @since 2.1.0
                 *
@@ -257,7 +258,7 @@ final class _WP_Editors {
                }
 
                /**
-                * Filter the default editor content.
+                * Filters the default editor content.
                 *
                 * @since 2.1.0
                 *
@@ -332,7 +333,7 @@ final class _WP_Editors {
                        }
 
                        /**
-                        * Filter the Quicktags settings.
+                        * Filters the Quicktags settings.
                         *
                         * @since 3.3.0
                         *
@@ -361,7 +362,7 @@ final class _WP_Editors {
                                if ( $set['teeny'] ) {
 
                                        /**
-                                        * Filter the list of teenyMCE plugins.
+                                        * Filters the list of teenyMCE plugins.
                                         *
                                         * @since 2.7.0
                                         *
@@ -372,7 +373,7 @@ final class _WP_Editors {
                                } else {
 
                                        /**
-                                        * Filter the list of TinyMCE external plugins.
+                                        * Filters the list of TinyMCE external plugins.
                                         *
                                         * The filter takes an associative array of external plugins for
                                         * TinyMCE in the form 'plugin_name' => 'url'.
@@ -417,7 +418,7 @@ final class _WP_Editors {
                                        }
 
                                        /**
-                                        * Filter the list of default TinyMCE plugins.
+                                        * Filters the list of default TinyMCE plugins.
                                         *
                                         * The filter specifies which of the default plugins included
                                         * in WordPress should be added to the TinyMCE instance.
@@ -437,7 +438,7 @@ final class _WP_Editors {
                                        if ( ! empty( $mce_external_plugins ) ) {
 
                                                /**
-                                                * Filter the translations loaded for external TinyMCE 3.x plugins.
+                                                * Filters the translations loaded for external TinyMCE 3.x plugins.
                                                 *
                                                 * The filter takes an associative array ('plugin_name' => 'path')
                                                 * where 'path' is the include path to the file.
@@ -575,7 +576,7 @@ final class _WP_Editors {
                                }
 
                                /**
-                                * Filter the comma-delimited list of stylesheets to load in TinyMCE.
+                                * Filters the comma-delimited list of stylesheets to load in TinyMCE.
                                 *
                                 * @since 2.1.0
                                 *
@@ -590,7 +591,7 @@ final class _WP_Editors {
                        if ( $set['teeny'] ) {
 
                                /**
-                                * Filter the list of teenyMCE buttons (Text tab).
+                                * Filters the list of teenyMCE buttons (Text tab).
                                 *
                                 * @since 2.7.0
                                 *
@@ -613,7 +614,7 @@ final class _WP_Editors {
                                $mce_buttons[] = 'wp_adv';
 
                                /**
-                                * Filter the first-row list of TinyMCE buttons (Visual tab).
+                                * Filters the first-row list of TinyMCE buttons (Visual tab).
                                 *
                                 * @since 2.0.0
                                 *
@@ -629,7 +630,7 @@ final class _WP_Editors {
                                }
 
                                /**
-                                * Filter the second-row list of TinyMCE buttons (Visual tab).
+                                * Filters the second-row list of TinyMCE buttons (Visual tab).
                                 *
                                 * @since 2.0.0
                                 *
@@ -639,7 +640,7 @@ final class _WP_Editors {
                                $mce_buttons_2 = apply_filters( 'mce_buttons_2', $mce_buttons_2, $editor_id );
 
                                /**
-                                * Filter the third-row list of TinyMCE buttons (Visual tab).
+                                * Filters the third-row list of TinyMCE buttons (Visual tab).
                                 *
                                 * @since 2.0.0
                                 *
@@ -649,7 +650,7 @@ final class _WP_Editors {
                                $mce_buttons_3 = apply_filters( 'mce_buttons_3', array(), $editor_id );
 
                                /**
-                                * Filter the fourth-row list of TinyMCE buttons (Visual tab).
+                                * Filters the fourth-row list of TinyMCE buttons (Visual tab).
                                 *
                                 * @since 2.5.0
                                 *
@@ -710,7 +711,7 @@ final class _WP_Editors {
                        if ( $set['teeny'] ) {
 
                                /**
-                                * Filter the teenyMCE config before init.
+                                * Filters the teenyMCE config before init.
                                 *
                                 * @since 2.7.0
                                 *
@@ -721,7 +722,7 @@ final class _WP_Editors {
                        } else {
 
                                /**
-                                * Filter the TinyMCE config before init.
+                                * Filters the TinyMCE config before init.
                                 *
                                 * @since 2.5.0
                                 *
@@ -788,7 +789,8 @@ final class _WP_Editors {
 
                if ( self::$has_medialib ) {
                        add_thickbox();
-                       wp_enqueue_script('media-upload');
+                       wp_enqueue_script( 'media-upload' );
+                       wp_enqueue_script( 'wp-embed' );
                }
 
                /**
@@ -846,7 +848,7 @@ final class _WP_Editors {
                        'Clear formatting' => __( 'Clear formatting' ),
                        'Bold' => __( 'Bold' ),
                        'Italic' => __( 'Italic' ),
-                       'Code' => _x( 'Code', 'editor button' ),
+                       'Code' => __( 'Code' ),
                        'Source code' => __( 'Source code' ),
                        'Font Family' => __( 'Font Family' ),
                        'Font Sizes' => __( 'Font Sizes' ),
@@ -1021,7 +1023,8 @@ final class _WP_Editors {
                        /* translators: word count */
                        'Words: {0}' => sprintf( __( 'Words: %s' ), '{0}' ),
                        'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' => __( 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' ) . "\n\n" . __( 'If you&#8217;re looking to paste rich content from Microsoft Word, try turning this option off. The editor will clean up text pasted from Word automatically.' ),
-                       'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help' => __( 'Rich Text Area. Press Alt-Shift-H for help' ),
+                       'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help' => __( 'Rich Text Area. Press Alt-Shift-H for help.' ),
+                       'Rich Text Area. Press Control-Option-H for help.' => __( 'Rich Text Area. Press Control-Option-H for help.' ),
                        'You have unsaved changes are you sure you want to navigate away?' => __( 'The changes you made will be lost if you navigate away from this page.' ),
                        'Your browser doesn\'t support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.' => __( 'Your browser does not support direct access to the clipboard. Please use keyboard shortcuts or your browser&#8217;s edit menu instead.' ),
 
@@ -1062,6 +1065,7 @@ final class _WP_Editors {
                        'Ctrl + letter:' => __( 'Ctrl + letter:' ),
                        'Letter' => __( 'Letter' ),
                        'Action' => __( 'Action' ),
+                       'Warning: the link has been inserted but may have errors. Please test it.' => __( 'Warning: the link has been inserted but may have errors. Please test it.' ),
                        'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' =>
                                __( 'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' ),
                        'When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.' =>
@@ -1088,7 +1092,7 @@ final class _WP_Editors {
                }
 
                /**
-                * Filter translated strings prepared for TinyMCE.
+                * Filters translated strings prepared for TinyMCE.
                 *
                 * @since 3.9.0
                 *
@@ -1136,7 +1140,7 @@ final class _WP_Editors {
                global $wp_version, $tinymce_version, $concatenate_scripts, $compress_scripts;
 
                /**
-                * Filter "tiny_mce_version" is deprecated
+                * Filters "tiny_mce_version" is deprecated
                 *
                 * The tiny_mce_version filter is not needed since external plugins are loaded directly by TinyMCE.
                 * These plugins can be refreshed by appending query string to the URL passed to "mce_external_plugins" filter.
@@ -1282,8 +1286,9 @@ final class _WP_Editors {
                </script>
                <?php
 
-               if ( in_array( 'wplink', self::$plugins, true ) || in_array( 'link', self::$qt_buttons, true ) )
+               if ( in_array( 'wplink', self::$plugins, true ) || in_array( 'link', self::$qt_buttons, true ) ) {
                        self::wp_link_dialog();
+               }
 
                /**
                 * Fires after any core TinyMCE editor instances are created.
@@ -1301,7 +1306,7 @@ final class _WP_Editors {
         * @global int $content_width
         */
        public static function wp_fullscreen_html() {
-               _deprecated_function( __FUNCTION__, '4.3' );
+               _deprecated_function( __FUNCTION__, '4.3.0' );
        }
 
        /**
@@ -1334,7 +1339,7 @@ final class _WP_Editors {
                $query['offset'] = $args['pagenum'] > 1 ? $query['posts_per_page'] * ( $args['pagenum'] - 1 ) : 0;
 
                /**
-                * Filter the link query arguments.
+                * Filters the link query arguments.
                 *
                 * Allows modification of the link query arguments before querying.
                 *
@@ -1370,7 +1375,7 @@ final class _WP_Editors {
                }
 
                /**
-                * Filter the link query results.
+                * Filters the link query results.
                 *
                 * Allows modification of the returned link query results.
                 *
index 40eecfbba3003b41a8a3b87f6643a981e15b4fef..17a976f2e6f32662a19988a3a42c4819b434dbd4 100644 (file)
@@ -16,7 +16,12 @@ class WP_Embed {
 
        /**
         * When a URL cannot be embedded, return false instead of returning a link
-        * or the URL. Bypasses the 'embed_maybe_make_link' filter.
+        * or the URL.
+        *
+        * Bypasses the {@see 'embed_maybe_make_link'} filter.
+        *
+        * @access public
+        * @var bool
         */
        public $return_false_on_fail = false;
 
@@ -33,7 +38,7 @@ class WP_Embed {
                // Attempts to embed all URLs in a post
                add_filter( 'the_content', array( $this, 'autoembed' ), 8 );
 
-               // After a post is saved, cache oEmbed items via AJAX
+               // After a post is saved, cache oEmbed items via Ajax
                add_action( 'edit_form_advanced', array( $this, 'maybe_run_ajax_cache' ) );
                add_action( 'edit_page_form', array( $this, 'maybe_run_ajax_cache' ) );
        }
@@ -43,7 +48,7 @@ class WP_Embed {
         *
         * Since the [embed] shortcode needs to be run earlier than other shortcodes,
         * this function removes all existing shortcodes, registers the [embed] shortcode,
-        * calls {@link do_shortcode()}, and then re-registers the old shortcodes.
+        * calls do_shortcode(), and then re-registers the old shortcodes.
         *
         * @global array $shortcode_tags
         *
@@ -70,7 +75,7 @@ class WP_Embed {
 
        /**
         * If a post/page was saved, then output JavaScript to make
-        * an AJAX request that will call WP_Embed::cache_oembed().
+        * an Ajax request that will call WP_Embed::cache_oembed().
         */
        public function maybe_run_ajax_cache() {
                $post = get_post();
@@ -88,7 +93,10 @@ class WP_Embed {
        }
 
        /**
-        * Register an embed handler. Do not use this function directly, use {@link wp_embed_register_handler()} instead.
+        * Registers an embed handler.
+        *
+        * Do not use this function directly, use wp_embed_register_handler() instead.
+        *
         * This function should probably also only be used for sites that do not support oEmbed.
         *
         * @param string $id An internal ID/name for the handler. Needs to be unique.
@@ -104,7 +112,9 @@ class WP_Embed {
        }
 
        /**
-        * Unregister a previously registered embed handler. Do not use this function directly, use {@link wp_embed_unregister_handler()} instead.
+        * Unregisters a previously-registered embed handler.
+        *
+        * Do not use this function directly, use wp_embed_unregister_handler() instead.
         *
         * @param string $id The handler ID that should be removed.
         * @param int $priority Optional. The priority of the handler to be removed (default: 10).
@@ -114,10 +124,11 @@ class WP_Embed {
        }
 
        /**
-        * The {@link do_shortcode()} callback function.
+        * The do_shortcode() callback function.
         *
-        * Attempts to convert a URL into embed HTML. Starts by checking the URL against the regex of the registered embed handlers.
-        * If none of the regex matches and it's enabled, then the URL will be given to the {@link WP_oEmbed} class.
+        * Attempts to convert a URL into embed HTML. Starts by checking the URL against the regex of
+        * the registered embed handlers. If none of the regex matches and it's enabled, then the URL
+        * will be given to the WP_oEmbed class.
         *
         * @param array $attr {
         *     Shortcode attributes. Optional.
@@ -159,7 +170,7 @@ class WP_Embed {
                                if ( preg_match( $handler['regex'], $url, $matches ) && is_callable( $handler['callback'] ) ) {
                                        if ( false !== $return = call_user_func( $handler['callback'], $matches, $attr, $url, $rawattr ) )
                                                /**
-                                                * Filter the returned embed handler.
+                                                * Filters the returned embed handler.
                                                 *
                                                 * @since 2.9.0
                                                 *
@@ -187,7 +198,7 @@ class WP_Embed {
                        $cachekey_time = '_oembed_time_' . $key_suffix;
 
                        /**
-                        * Filter the oEmbed TTL value (time to live).
+                        * Filters the oEmbed TTL value (time to live).
                         *
                         * @since 4.0.0
                         *
@@ -214,7 +225,7 @@ class WP_Embed {
 
                                if ( ! empty( $cache ) ) {
                                        /**
-                                        * Filter the cached oEmbed HTML.
+                                        * Filters the cached oEmbed HTML.
                                         *
                                         * @since 2.9.0
                                         *
@@ -230,7 +241,7 @@ class WP_Embed {
                        }
 
                        /**
-                        * Filter whether to inspect the given URL for discoverable link tags.
+                        * Filters whether to inspect the given URL for discoverable link tags.
                         *
                         * @since 2.9.0
                         * @since 4.4.0 The default value changed to true.
@@ -289,7 +300,7 @@ class WP_Embed {
 
                $post_types = get_post_types( array( 'show_ui' => true ) );
                /**
-                * Filter the array of post types to cache oEmbed results for.
+                * Filters the array of post types to cache oEmbed results for.
                 *
                 * @since 2.9.0
                 *
@@ -312,9 +323,9 @@ class WP_Embed {
        }
 
        /**
-        * Passes any unlinked URLs that are on their own line to {@link WP_Embed::shortcode()} for potential embedding.
+        * Passes any unlinked URLs that are on their own line to WP_Embed::shortcode() for potential embedding.
         *
-        * @uses WP_Embed::autoembed_callback()
+        * @see WP_Embed::autoembed_callback()
         *
         * @param string $content The content to be searched.
         * @return string Potentially modified $content.
@@ -323,15 +334,19 @@ class WP_Embed {
                // Replace line breaks from all HTML elements with placeholders.
                $content = wp_replace_in_html_tags( $content, array( "\n" => '<!-- wp-line-break -->' ) );
 
-               // Find URLs that are on their own line.
-               $content = preg_replace_callback( '|^(\s*)(https?://[^\s"]+)(\s*)$|im', array( $this, 'autoembed_callback' ), $content );
+               if ( preg_match( '#(^|\s|>)https?://#i', $content ) ) {
+                       // Find URLs on their own line.
+                       $content = preg_replace_callback( '|^(\s*)(https?://[^\s<>"]+)(\s*)$|im', array( $this, 'autoembed_callback' ), $content );
+                       // Find URLs in their own paragraph.
+                       $content = preg_replace_callback( '|(<p(?: [^>]*)?>\s*)(https?://[^\s<>"]+)(\s*<\/p>)|i', array( $this, 'autoembed_callback' ), $content );
+               }
 
                // Put the line breaks back.
                return str_replace( '<!-- wp-line-break -->', "\n", $content );
        }
 
        /**
-        * Callback function for {@link WP_Embed::autoembed()}.
+        * Callback function for WP_Embed::autoembed().
         *
         * @param array $match A regex match array.
         * @return string The embed HTML on success, otherwise the original URL.
@@ -359,7 +374,7 @@ class WP_Embed {
                $output = ( $this->linkifunknown ) ? '<a href="' . esc_url($url) . '">' . esc_html($url) . '</a>' : $url;
 
                /**
-                * Filter the returned, maybe-linked embed URL.
+                * Filters the returned, maybe-linked embed URL.
                 *
                 * @since 2.9.0
                 *
index 0969b12e33aa7a1f2f213982cd5f9eac514a66bb..1010adb047e6ac4bf8770befbee5e957ad3033b4 100644 (file)
@@ -11,8 +11,8 @@
  * WordPress Error class.
  *
  * Container for checking for WordPress errors and error messages. Return
- * WP_Error and use {@link is_wp_error()} to check if this class is returned.
- * Many core WordPress functions pass this class in the event of an error and
+ * WP_Error and use is_wp_error() to check if this class is returned. Many
+ * core WordPress functions pass this class in the event of an error and
  * if not handled properly will result in code errors.
  *
  * @package WordPress
index 95148efd53b167b6956230c824d9722eb7822272..d2affc2cc1b49805d4b9c05f72a9d4a37fd356ba 100644 (file)
@@ -195,7 +195,7 @@ class WP_Http_Cookie {
                        return '';
 
                /**
-                * Filter the header-encoded cookie value.
+                * Filters the header-encoded cookie value.
                 *
                 * @since 3.4.0
                 *
@@ -216,4 +216,26 @@ class WP_Http_Cookie {
        public function getFullHeader() {
                return 'Cookie: ' . $this->getHeaderValue();
        }
+
+       /**
+        * Retrieves cookie attributes.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @return array {
+        *    List of attributes.
+        *
+        *    @type string $expires When the cookie expires.
+        *    @type string $path    Cookie URL path.
+        *    @type string $domain  Cookie domain.
+        * }
+        */
+       public function get_attributes() {
+               return array(
+                       'expires' => $this->expires,
+                       'path'    => $this->path,
+                       'domain'  => $this->domain,
+               );
+       }
 }
index a161677cccdaab497731ffb73d8d4ae243722ffe..790e93cffb54aab1c80bfdbf2c9b6bf49a192a40 100644 (file)
@@ -373,7 +373,7 @@ class WP_Http_Curl {
                }
 
                /**
-                * Filter whether cURL can be used as a transport for retrieving a URL.
+                * Filters whether cURL can be used as a transport for retrieving a URL.
                 *
                 * @since 2.7.0
                 *
index eee8469592fffeee262e21e1e9a9bb6315ddc129..81cfba850c07ff02734e7dec18e90697c9b89331 100644 (file)
@@ -88,8 +88,8 @@ class WP_Http_Encoding {
         *
         * @since 2.8.1
         * @link https://core.trac.wordpress.org/ticket/18273
-        * @link http://au2.php.net/manual/en/function.gzinflate.php#70875
-        * @link http://au2.php.net/manual/en/function.gzinflate.php#77336
+        * @link https://secure.php.net/manual/en/function.gzinflate.php#70875
+        * @link https://secure.php.net/manual/en/function.gzinflate.php#77336
         *
         * @static
         *
@@ -161,7 +161,7 @@ class WP_Http_Encoding {
                }
 
                /**
-                * Filter the allowed encoding types.
+                * Filters the allowed encoding types.
                 *
                 * @since 3.6.0
                 *
index 601ca143199523c273ee934a330e06508efbd1ab..e4ed55020fcd48ff67440de0972aae29fa5e75a1 100644 (file)
@@ -69,7 +69,7 @@ class WP_HTTP_IXR_Client extends IXR_Client {
                }
 
                /**
-                * Filter the headers collection to be sent to the XML-RPC server.
+                * Filters the headers collection to be sent to the XML-RPC server.
                 *
                 * @since 4.4.0
                 *
index af9d338be5e536024669e0395ee7ddbb1538dc14..7ae3d4e266265741d29a3aa62ab7c0dd1ea64934 100644 (file)
@@ -176,7 +176,7 @@ class WP_HTTP_Proxy {
                $home = parse_url( get_option('siteurl') );
 
                /**
-                * Filter whether to preempt sending the request through the proxy server.
+                * Filters whether to preempt sending the request through the proxy server.
                 *
                 * Returning false will bypass the proxy; returning true will send
                 * the request through the proxy. Returning null bypasses the filter.
diff --git a/wp-includes/class-wp-http-requests-response.php b/wp-includes/class-wp-http-requests-response.php
new file mode 100644 (file)
index 0000000..ab0a5cc
--- /dev/null
@@ -0,0 +1,208 @@
+<?php
+/**
+ * HTTP API: WP_HTTP_Requests_Response class
+ *
+ * @package WordPress
+ * @subpackage HTTP
+ * @since 4.6.0
+ */
+
+/**
+ * Core wrapper object for a Requests_Response for standardisation.
+ *
+ * @since 4.6.0
+ *
+ * @see WP_HTTP_Response
+ */
+class WP_HTTP_Requests_Response extends WP_HTTP_Response {
+       /**
+        * Requests Response object.
+        *
+        * @since 4.6.0
+        * @access protected
+        * @var Requests_Response
+        */
+       protected $response;
+
+       /**
+        * Filename the response was saved to.
+        *
+        * @since 4.6.0
+        * @access protected
+        * @var string|null
+        */
+       protected $filename;
+
+       /**
+        * Constructor.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param Requests_Response $response HTTP response.
+        * @param string            $filename Optional. File name. Default empty.
+        */
+       public function __construct( Requests_Response $response, $filename = '' ) {
+               $this->response = $response;
+               $this->filename = $filename;
+       }
+
+       /**
+        * Retrieves the response object for the request.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @return Requests_Response HTTP response.
+        */
+       public function get_response_object() {
+               return $this->response;
+       }
+
+       /**
+        * Retrieves headers associated with the response.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @return array Map of header name to header value.
+        */
+       public function get_headers() {
+               // Ensure headers remain case-insensitive
+               $converted = new Requests_Utility_CaseInsensitiveDictionary();
+
+               foreach ( $this->response->headers->getAll() as $key => $value ) {
+                       if ( count( $value ) === 1 ) {
+                               $converted[ $key ] = $value[0];
+                       }
+                       else {
+                               $converted[ $key ] = $value;
+                       }
+               }
+
+               return $converted;
+       }
+
+       /**
+        * Sets all header values.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param array $headers Map of header name to header value.
+        */
+       public function set_headers( $headers ) {
+               $this->response->headers = new Requests_Response_Headers( $headers );
+       }
+
+       /**
+        * Sets a single HTTP header.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string $key     Header name.
+        * @param string $value   Header value.
+        * @param bool   $replace Optional. Whether to replace an existing header of the same name.
+        *                        Default true.
+        */
+       public function header( $key, $value, $replace = true ) {
+               if ( $replace ) {
+                       unset( $this->response->headers[ $key ] );
+               }
+
+               $this->response->headers[ $key ] = $value;
+       }
+
+       /**
+        * Retrieves the HTTP return code for the response.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @return int The 3-digit HTTP status code.
+        */
+       public function get_status() {
+               return $this->response->status_code;
+       }
+
+       /**
+        * Sets the 3-digit HTTP status code.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param int $code HTTP status.
+        */
+       public function set_status( $code ) {
+               $this->response->status_code = absint( $code );
+       }
+
+       /**
+        * Retrieves the response data.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @return mixed Response data.
+        */
+       public function get_data() {
+               return $this->response->body;
+       }
+
+       /**
+        * Sets the response data.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param mixed $data Response data.
+        */
+       public function set_data( $data ) {
+               $this->response->body = $data;
+       }
+
+       /**
+        * Retrieves cookies from the response.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @return WP_HTTP_Cookie[] List of cookie objects.
+        */
+       public function get_cookies() {
+               $cookies = array();
+               foreach ( $this->response->cookies as $cookie ) {
+                       $cookies[] = new WP_Http_Cookie( array(
+                               'name'    => $cookie->name,
+                               'value'   => urldecode( $cookie->value ),
+                               'expires' => isset( $cookie->attributes['expires'] ) ? $cookie->attributes['expires'] : null,
+                               'path'    => isset( $cookie->attributes['path'] ) ? $cookie->attributes['path'] : null,
+                               'domain'  => isset( $cookie->attributes['domain'] ) ? $cookie->attributes['domain'] : null,
+                       ));
+               }
+
+               return $cookies;
+       }
+
+       /**
+        * Converts the object to a WP_Http response array.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @return array WP_Http response array, per WP_Http::request().
+        */
+       public function to_array() {
+               return array(
+                       'headers' => $this->get_headers(),
+                       'body' => $this->get_data(),
+                       'response' => array(
+                               'code'    => $this->get_status(),
+                               'message' => get_status_header_desc( $this->get_status() ),
+                       ),
+                       'cookies' => $this->get_cookies(),
+                       'filename' => $this->filename,
+               );
+       }
+}
index 80f30a4324e664798067efd9703ca5e4dddbf8e8..2f10c675989b57fb2410a798d8e972affbdbdd00 100644 (file)
@@ -89,7 +89,7 @@ class WP_Http_Streams {
                $ssl_verify = isset( $r['sslverify'] ) && $r['sslverify'];
                if ( $is_local ) {
                        /**
-                        * Filter whether SSL should be verified for local requests.
+                        * Filters whether SSL should be verified for local requests.
                         *
                         * @since 2.8.0
                         *
@@ -98,7 +98,7 @@ class WP_Http_Streams {
                        $ssl_verify = apply_filters( 'https_local_ssl_verify', $ssl_verify );
                } elseif ( ! $is_local ) {
                        /**
-                        * Filter whether SSL should be verified for non-local requests.
+                        * Filters whether SSL should be verified for non-local requests.
                         *
                         * @since 2.8.0
                         *
@@ -401,7 +401,7 @@ class WP_Http_Streams {
                }
 
                /**
-                * Filter whether streams can be used as a transport for retrieving a URL.
+                * Filters whether streams can be used as a transport for retrieving a URL.
                 *
                 * @since 2.7.0
                 *
@@ -415,7 +415,7 @@ class WP_Http_Streams {
 /**
  * Deprecated HTTP Transport method which used fsockopen.
  *
- * This class is not used, and is included for backwards compatibility only.
+ * This class is not used, and is included for backward compatibility only.
  * All code should make use of WP_Http directly through its API.
  *
  * @see WP_HTTP::request
@@ -424,5 +424,5 @@ class WP_Http_Streams {
  * @deprecated 3.7.0 Please use WP_HTTP::request() directly
  */
 class WP_HTTP_Fsockopen extends WP_HTTP_Streams {
-       // For backwards compatibility for users who are using the class directly.
+       // For backward compatibility for users who are using the class directly.
 }
index 2093c6b46269400a55683cb43d8dc3363adb44ab..d7823ebbcf79fae53d4425cbda2719b7147ccd66 100644 (file)
@@ -96,16 +96,8 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
                if ( ! is_file( $this->file ) && ! preg_match( '|^https?://|', $this->file ) )
                        return new WP_Error( 'error_loading_image', __('File doesn&#8217;t exist?'), $this->file );
 
-               /**
-                * Filter the memory limit allocated for image manipulation.
-                *
-                * @since 3.5.0
-                *
-                * @param int|string $limit Maximum memory limit to allocate for images. Default WP_MAX_MEMORY_LIMIT.
-                *                          Accepts an integer (bytes), or a shorthand string notation, such as '256M'.
-                */
-               // Set artificially high because GD uses uncompressed images in memory
-               @ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) );
+               // Set artificially high because GD uses uncompressed images in memory.
+               wp_raise_memory_limit( 'image' );
 
                $this->image = @imagecreatefromstring( file_get_contents( $this->file ) );
 
@@ -429,7 +421,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
                @ chmod( $filename, $perms );
 
                /**
-                * Filter the name of the saved image file.
+                * Filters the name of the saved image file.
                 *
                 * @since 2.6.0
                 *
index 74ba793be7a66f88cb2d78dca7bf8854521407fb..82b872d7321406b1921e910aee210fac717c6d39 100644 (file)
@@ -137,9 +137,11 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
                if ( ! is_file( $this->file ) && ! preg_match( '|^https?://|', $this->file ) )
                        return new WP_Error( 'error_loading_image', __('File doesn&#8217;t exist?'), $this->file );
 
-               /** This filter is documented in wp-includes/class-wp-image-editor-imagick.php */
-               // Even though Imagick uses less PHP memory than GD, set higher limit for users that have low PHP.ini limits
-               @ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) );
+               /*
+                * Even though Imagick uses less PHP memory than GD, set higher limit
+                * for users that have low PHP.ini limits.
+                */
+               wp_raise_memory_limit( 'image' );
 
                try {
                        $this->image = new Imagick( $this->file );
@@ -311,7 +313,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
                }
 
                /**
-                * Filter whether to strip metadata from images when they're resized.
+                * Filters whether to strip metadata from images when they're resized.
                 *
                 * This filter only applies when resizing using the Imagick editor since GD
                 * always strips profiles by default.
@@ -343,7 +345,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
                         * Use resizeImage() when it's available and a valid filter value is set.
                         * Otherwise, fall back to the scaleImage() method for resizing, which
                         * results in better image quality over resizeImage() with default filter
-                        * settings and retains backwards compatibility with pre 4.5 functionality.
+                        * settings and retains backward compatibility with pre 4.5 functionality.
                         */
                        if ( is_callable( array( $this->image, 'resizeImage' ) ) && $filter ) {
                                $this->image->setOption( 'filter:support', '2.0' );
index 5b6f4ac9a02d223021e2441eba77329f86758b13..c046823e9fc73652da7bd298f9b05f019723d622 100644 (file)
@@ -237,7 +237,7 @@ abstract class WP_Image_Editor {
        public function set_quality( $quality = null ) {
                if ( null === $quality ) {
                        /**
-                        * Filter the default image compression quality setting.
+                        * Filters the default image compression quality setting.
                         *
                         * Applies only during initial editor instantiation, or when set_quality() is run
                         * manually without the `$quality` argument.
@@ -253,7 +253,7 @@ abstract class WP_Image_Editor {
 
                        if ( 'image/jpeg' == $this->mime_type ) {
                                /**
-                                * Filter the JPEG compression quality for backward-compatibility.
+                                * Filters the JPEG compression quality for backward-compatibility.
                                 *
                                 * Applies only during initial editor instantiation, or when set_quality() is run
                                 * manually without the `$quality` argument.
@@ -276,7 +276,7 @@ abstract class WP_Image_Editor {
                        }
                }
 
-               // Allow 0, but squash to 1 due to identical images in GD, and for backwards compatibility.
+               // Allow 0, but squash to 1 due to identical images in GD, and for backward compatibility.
                if ( 0 === $quality ) {
                        $quality = 1;
                }
@@ -333,7 +333,7 @@ abstract class WP_Image_Editor {
                // If not, choose a default instead.
                if ( ! $this->supports_mime_type( $mime_type ) ) {
                        /**
-                        * Filter default mime type prior to getting the file extension.
+                        * Filters default mime type prior to getting the file extension.
                         *
                         * @see wp_get_mime_types()
                         *
diff --git a/wp-includes/class-wp-locale.php b/wp-includes/class-wp-locale.php
new file mode 100644 (file)
index 0000000..e8dcfc6
--- /dev/null
@@ -0,0 +1,397 @@
+<?php
+/**
+ * Locale API: WP_Locale class
+ *
+ * @package WordPress
+ * @subpackage i18n
+ * @since 4.6.0
+ */
+
+/**
+ * Core class used to store translated data for a locale.
+ *
+ * @since 2.1.0
+ * @since 4.6.0 Moved to its own file from wp-includes/locale.php.
+ */
+class WP_Locale {
+       /**
+        * Stores the translated strings for the full weekday names.
+        *
+        * @since 2.1.0
+        * @var array
+        */
+       public $weekday;
+
+       /**
+        * Stores the translated strings for the one character weekday names.
+        *
+        * There is a hack to make sure that Tuesday and Thursday, as well
+        * as Sunday and Saturday, don't conflict. See init() method for more.
+        *
+        * @see WP_Locale::init() for how to handle the hack.
+        *
+        * @since 2.1.0
+        * @var array
+        */
+       public $weekday_initial;
+
+       /**
+        * Stores the translated strings for the abbreviated weekday names.
+        *
+        * @since 2.1.0
+        * @var array
+        */
+       public $weekday_abbrev;
+
+       /**
+        * Stores the default start of the week.
+        *
+        * @since 4.4.0
+        * @var string
+        */
+       public $start_of_week;
+
+       /**
+        * Stores the translated strings for the full month names.
+        *
+        * @since 2.1.0
+        * @var array
+        */
+       public $month;
+
+       /**
+        * Stores the translated strings for the abbreviated month names.
+        *
+        * @since 2.1.0
+        * @var array
+        */
+       public $month_abbrev;
+
+       /**
+        * Stores the translated strings for 'am' and 'pm'.
+        *
+        * Also the capitalized versions.
+        *
+        * @since 2.1.0
+        * @var array
+        */
+       public $meridiem;
+
+       /**
+        * The text direction of the locale language.
+        *
+        * Default is left to right 'ltr'.
+        *
+        * @since 2.1.0
+        * @var string
+        */
+       public $text_direction = 'ltr';
+
+       /**
+        * The thousands separator and decimal point values used for localizing numbers.
+        *
+        * @since 2.3.0
+        * @access public
+        * @var array
+        */
+       public $number_format;
+
+       /**
+        * Constructor which calls helper methods to set up object variables.
+        *
+        * @since 2.1.0
+        */
+       public function __construct() {
+               $this->init();
+               $this->register_globals();
+       }
+
+       /**
+        * Sets up the translated strings and object properties.
+        *
+        * The method creates the translatable strings for various
+        * calendar elements. Which allows for specifying locale
+        * specific calendar names and text direction.
+        *
+        * @since 2.1.0
+        * @access private
+        *
+        * @global string $text_direction
+        * @global string $wp_version
+        */
+       public function init() {
+               // The Weekdays
+               $this->weekday[0] = /* translators: weekday */ __('Sunday');
+               $this->weekday[1] = /* translators: weekday */ __('Monday');
+               $this->weekday[2] = /* translators: weekday */ __('Tuesday');
+               $this->weekday[3] = /* translators: weekday */ __('Wednesday');
+               $this->weekday[4] = /* translators: weekday */ __('Thursday');
+               $this->weekday[5] = /* translators: weekday */ __('Friday');
+               $this->weekday[6] = /* translators: weekday */ __('Saturday');
+
+               // The first letter of each day.
+               $this->weekday_initial[ __( 'Sunday' ) ]    = /* translators: one-letter abbreviation of the weekday */ _x( 'S', 'Sunday initial' );
+               $this->weekday_initial[ __( 'Monday' ) ]    = /* translators: one-letter abbreviation of the weekday */ _x( 'M', 'Monday initial' );
+               $this->weekday_initial[ __( 'Tuesday' ) ]   = /* translators: one-letter abbreviation of the weekday */ _x( 'T', 'Tuesday initial' );
+               $this->weekday_initial[ __( 'Wednesday' ) ] = /* translators: one-letter abbreviation of the weekday */ _x( 'W', 'Wednesday initial' );
+               $this->weekday_initial[ __( 'Thursday' ) ]  = /* translators: one-letter abbreviation of the weekday */ _x( 'T', 'Thursday initial' );
+               $this->weekday_initial[ __( 'Friday' ) ]    = /* translators: one-letter abbreviation of the weekday */ _x( 'F', 'Friday initial' );
+               $this->weekday_initial[ __( 'Saturday' ) ]  = /* translators: one-letter abbreviation of the weekday */ _x( 'S', 'Saturday initial' );
+
+               // Abbreviations for each day.
+               $this->weekday_abbrev[__('Sunday')]    = /* translators: three-letter abbreviation of the weekday */ __('Sun');
+               $this->weekday_abbrev[__('Monday')]    = /* translators: three-letter abbreviation of the weekday */ __('Mon');
+               $this->weekday_abbrev[__('Tuesday')]   = /* translators: three-letter abbreviation of the weekday */ __('Tue');
+               $this->weekday_abbrev[__('Wednesday')] = /* translators: three-letter abbreviation of the weekday */ __('Wed');
+               $this->weekday_abbrev[__('Thursday')]  = /* translators: three-letter abbreviation of the weekday */ __('Thu');
+               $this->weekday_abbrev[__('Friday')]    = /* translators: three-letter abbreviation of the weekday */ __('Fri');
+               $this->weekday_abbrev[__('Saturday')]  = /* translators: three-letter abbreviation of the weekday */ __('Sat');
+
+               // The Months
+               $this->month['01'] = /* translators: month name */ __( 'January' );
+               $this->month['02'] = /* translators: month name */ __( 'February' );
+               $this->month['03'] = /* translators: month name */ __( 'March' );
+               $this->month['04'] = /* translators: month name */ __( 'April' );
+               $this->month['05'] = /* translators: month name */ __( 'May' );
+               $this->month['06'] = /* translators: month name */ __( 'June' );
+               $this->month['07'] = /* translators: month name */ __( 'July' );
+               $this->month['08'] = /* translators: month name */ __( 'August' );
+               $this->month['09'] = /* translators: month name */ __( 'September' );
+               $this->month['10'] = /* translators: month name */ __( 'October' );
+               $this->month['11'] = /* translators: month name */ __( 'November' );
+               $this->month['12'] = /* translators: month name */ __( 'December' );
+
+               // The Months, genitive
+               $this->month_genitive['01'] = /* translators: month name, genitive */ _x( 'January', 'genitive' );
+               $this->month_genitive['02'] = /* translators: month name, genitive */ _x( 'February', 'genitive' );
+               $this->month_genitive['03'] = /* translators: month name, genitive */ _x( 'March', 'genitive' );
+               $this->month_genitive['04'] = /* translators: month name, genitive */ _x( 'April', 'genitive' );
+               $this->month_genitive['05'] = /* translators: month name, genitive */ _x( 'May', 'genitive' );
+               $this->month_genitive['06'] = /* translators: month name, genitive */ _x( 'June', 'genitive' );
+               $this->month_genitive['07'] = /* translators: month name, genitive */ _x( 'July', 'genitive' );
+               $this->month_genitive['08'] = /* translators: month name, genitive */ _x( 'August', 'genitive' );
+               $this->month_genitive['09'] = /* translators: month name, genitive */ _x( 'September', 'genitive' );
+               $this->month_genitive['10'] = /* translators: month name, genitive */ _x( 'October', 'genitive' );
+               $this->month_genitive['11'] = /* translators: month name, genitive */ _x( 'November', 'genitive' );
+               $this->month_genitive['12'] = /* translators: month name, genitive */ _x( 'December', 'genitive' );
+
+               // Abbreviations for each month.
+               $this->month_abbrev[ __( 'January' ) ]   = /* translators: three-letter abbreviation of the month */ _x( 'Jan', 'January abbreviation' );
+               $this->month_abbrev[ __( 'February' ) ]  = /* translators: three-letter abbreviation of the month */ _x( 'Feb', 'February abbreviation' );
+               $this->month_abbrev[ __( 'March' ) ]     = /* translators: three-letter abbreviation of the month */ _x( 'Mar', 'March abbreviation' );
+               $this->month_abbrev[ __( 'April' ) ]     = /* translators: three-letter abbreviation of the month */ _x( 'Apr', 'April abbreviation' );
+               $this->month_abbrev[ __( 'May' ) ]       = /* translators: three-letter abbreviation of the month */ _x( 'May', 'May abbreviation' );
+               $this->month_abbrev[ __( 'June' ) ]      = /* translators: three-letter abbreviation of the month */ _x( 'Jun', 'June abbreviation' );
+               $this->month_abbrev[ __( 'July' ) ]      = /* translators: three-letter abbreviation of the month */ _x( 'Jul', 'July abbreviation' );
+               $this->month_abbrev[ __( 'August' ) ]    = /* translators: three-letter abbreviation of the month */ _x( 'Aug', 'August abbreviation' );
+               $this->month_abbrev[ __( 'September' ) ] = /* translators: three-letter abbreviation of the month */ _x( 'Sep', 'September abbreviation' );
+               $this->month_abbrev[ __( 'October' ) ]   = /* translators: three-letter abbreviation of the month */ _x( 'Oct', 'October abbreviation' );
+               $this->month_abbrev[ __( 'November' ) ]  = /* translators: three-letter abbreviation of the month */ _x( 'Nov', 'November abbreviation' );
+               $this->month_abbrev[ __( 'December' ) ]  = /* translators: three-letter abbreviation of the month */ _x( 'Dec', 'December abbreviation' );
+
+               // The Meridiems
+               $this->meridiem['am'] = __('am');
+               $this->meridiem['pm'] = __('pm');
+               $this->meridiem['AM'] = __('AM');
+               $this->meridiem['PM'] = __('PM');
+
+               // Numbers formatting
+               // See https://secure.php.net/number_format
+
+               /* translators: $thousands_sep argument for https://secure.php.net/number_format, default is , */
+               $thousands_sep = __( 'number_format_thousands_sep' );
+
+               if ( version_compare( PHP_VERSION, '5.4', '>=' ) ) {
+                       // Replace space with a non-breaking space to avoid wrapping.
+                       $thousands_sep = str_replace( ' ', '&nbsp;', $thousands_sep );
+               } else {
+                       // PHP < 5.4.0 does not support multiple bytes in thousands separator.
+                       $thousands_sep = str_replace( array( '&nbsp;', '&#160;' ), ' ', $thousands_sep );
+               }
+
+               $this->number_format['thousands_sep'] = ( 'number_format_thousands_sep' === $thousands_sep ) ? ',' : $thousands_sep;
+
+               /* translators: $dec_point argument for https://secure.php.net/number_format, default is . */
+               $decimal_point = __( 'number_format_decimal_point' );
+
+               $this->number_format['decimal_point'] = ( 'number_format_decimal_point' === $decimal_point ) ? '.' : $decimal_point;
+
+               // Set text direction.
+               if ( isset( $GLOBALS['text_direction'] ) )
+                       $this->text_direction = $GLOBALS['text_direction'];
+               /* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */
+               elseif ( 'rtl' == _x( 'ltr', 'text direction' ) )
+                       $this->text_direction = 'rtl';
+
+               if ( 'rtl' === $this->text_direction && strpos( $GLOBALS['wp_version'], '-src' ) ) {
+                       $this->text_direction = 'ltr';
+                       add_action( 'all_admin_notices', array( $this, 'rtl_src_admin_notice' ) );
+               }
+       }
+
+       /**
+        * Outputs an admin notice if the /build directory must be used for RTL.
+        *
+        * @since 3.8.0
+        * @access public
+        */
+       public function rtl_src_admin_notice() {
+               /* translators: %s: Name of the directory (build) */
+               echo '<div class="error"><p>' . sprintf( __( 'The %s directory of the develop repository must be used for RTL.' ), '<code>build</code>' ) . '</p></div>';
+       }
+
+       /**
+        * Retrieve the full translated weekday word.
+        *
+        * Week starts on translated Sunday and can be fetched
+        * by using 0 (zero). So the week starts with 0 (zero)
+        * and ends on Saturday with is fetched by using 6 (six).
+        *
+        * @since 2.1.0
+        * @access public
+        *
+        * @param int $weekday_number 0 for Sunday through 6 Saturday
+        * @return string Full translated weekday
+        */
+       public function get_weekday($weekday_number) {
+               return $this->weekday[$weekday_number];
+       }
+
+       /**
+        * Retrieve the translated weekday initial.
+        *
+        * The weekday initial is retrieved by the translated
+        * full weekday word. When translating the weekday initial
+        * pay attention to make sure that the starting letter does
+        * not conflict.
+        *
+        * @since 2.1.0
+        * @access public
+        *
+        * @param string $weekday_name
+        * @return string
+        */
+       public function get_weekday_initial($weekday_name) {
+               return $this->weekday_initial[$weekday_name];
+       }
+
+       /**
+        * Retrieve the translated weekday abbreviation.
+        *
+        * The weekday abbreviation is retrieved by the translated
+        * full weekday word.
+        *
+        * @since 2.1.0
+        * @access public
+        *
+        * @param string $weekday_name Full translated weekday word
+        * @return string Translated weekday abbreviation
+        */
+       public function get_weekday_abbrev($weekday_name) {
+               return $this->weekday_abbrev[$weekday_name];
+       }
+
+       /**
+        * Retrieve the full translated month by month number.
+        *
+        * The $month_number parameter has to be a string
+        * because it must have the '0' in front of any number
+        * that is less than 10. Starts from '01' and ends at
+        * '12'.
+        *
+        * You can use an integer instead and it will add the
+        * '0' before the numbers less than 10 for you.
+        *
+        * @since 2.1.0
+        * @access public
+        *
+        * @param string|int $month_number '01' through '12'
+        * @return string Translated full month name
+        */
+       public function get_month($month_number) {
+               return $this->month[zeroise($month_number, 2)];
+       }
+
+       /**
+        * Retrieve translated version of month abbreviation string.
+        *
+        * The $month_name parameter is expected to be the translated or
+        * translatable version of the month.
+        *
+        * @since 2.1.0
+        * @access public
+        *
+        * @param string $month_name Translated month to get abbreviated version
+        * @return string Translated abbreviated month
+        */
+       public function get_month_abbrev($month_name) {
+               return $this->month_abbrev[$month_name];
+       }
+
+       /**
+        * Retrieve translated version of meridiem string.
+        *
+        * The $meridiem parameter is expected to not be translated.
+        *
+        * @since 2.1.0
+        * @access public
+        *
+        * @param string $meridiem Either 'am', 'pm', 'AM', or 'PM'. Not translated version.
+        * @return string Translated version
+        */
+       public function get_meridiem($meridiem) {
+               return $this->meridiem[$meridiem];
+       }
+
+       /**
+        * Global variables are deprecated.
+        *
+        * For backward compatibility only.
+        *
+        * @deprecated For backward compatibility only.
+        * @access private
+        *
+        * @global array $weekday
+        * @global array $weekday_initial
+        * @global array $weekday_abbrev
+        * @global array $month
+        * @global array $month_abbrev
+        *
+        * @since 2.1.0
+        */
+       public function register_globals() {
+               $GLOBALS['weekday']         = $this->weekday;
+               $GLOBALS['weekday_initial'] = $this->weekday_initial;
+               $GLOBALS['weekday_abbrev']  = $this->weekday_abbrev;
+               $GLOBALS['month']           = $this->month;
+               $GLOBALS['month_abbrev']    = $this->month_abbrev;
+       }
+
+       /**
+        * Checks if current locale is RTL.
+        *
+        * @since 3.0.0
+        * @return bool Whether locale is RTL.
+        */
+       public function is_rtl() {
+               return 'rtl' == $this->text_direction;
+       }
+
+       /**
+        * Register date/time format strings for general POT.
+        *
+        * Private, unused method to add some date/time formats translated
+        * on wp-admin/options-general.php to the general POT that would
+        * otherwise be added to the admin POT.
+        *
+        * @since 3.6.0
+        */
+       public function _strings_for_pot() {
+               /* translators: localized date format, see https://secure.php.net/date */
+               __( 'F j, Y' );
+               /* translators: localized time format, see https://secure.php.net/date */
+               __( 'g:i a' );
+               /* translators: localized date and time format, see https://secure.php.net/date */
+               __( 'F j, Y g:i a' );
+       }
+}
index 5716b5f20f66a7cdbc57a43ecc001f04c0d4e21b..4019912019883967d6def5b40f8a27095444a3cd 100644 (file)
@@ -12,7 +12,8 @@
  *
  * Used for generating SQL clauses that filter a primary query according to metadata keys and values.
  *
- * `WP_Meta_Query` is a helper that allows primary query classes, such as {@see WP_Query} and {@see WP_User_Query},
+ * WP_Meta_Query is a helper that allows primary query classes, such as WP_Query and WP_User_Query,
+ *
  * to filter their results by object metadata, by generating `JOIN` and `WHERE` subclauses to be attached
  * to the primary SQL query string.
  *
@@ -24,7 +25,7 @@ class WP_Meta_Query {
        /**
         * Array of metadata queries.
         *
-        * See {@see WP_Meta_Query::__construct()} for information on meta query arguments.
+        * See WP_Meta_Query::__construct() for information on meta query arguments.
         *
         * @since 3.2.0
         * @access public
@@ -113,8 +114,8 @@ class WP_Meta_Query {
         * @access public
         *
         * @param array $meta_query {
-        *     Array of meta query clauses. When first-order clauses use strings as their array keys, they may be
-        *     referenced in the 'orderby' parameter of the parent query.
+        *     Array of meta query clauses. When first-order clauses or sub-clauses use strings as
+        *     their array keys, they may be referenced in the 'orderby' parameter of the parent query.
         *
         *     @type string $relation Optional. The MySQL keyword used to join
         *                            the clauses of the query. Accepts 'AND', or 'OR'. Default 'AND'.
@@ -326,6 +327,8 @@ class WP_Meta_Query {
                        return false;
                }
 
+               $this->table_aliases = array();
+
                $this->meta_table     = $meta_table;
                $this->meta_id_column = sanitize_key( $type . '_id' );
 
@@ -343,7 +346,7 @@ class WP_Meta_Query {
                }
 
                /**
-                * Filter the meta query's generated SQL.
+                * Filters the meta query's generated SQL.
                 *
                 * @since 3.1.0
                 *
@@ -360,8 +363,8 @@ class WP_Meta_Query {
        /**
         * Generate SQL clauses to be appended to a main query.
         *
-        * Called by the public {@see WP_Meta_Query::get_sql()}, this method
-        * is abstracted out to maintain parity with the other Query classes.
+        * Called by the public WP_Meta_Query::get_sql(), this method is abstracted
+        * out to maintain parity with the other Query classes.
         *
         * @since 4.1.0
         * @access protected
@@ -631,7 +634,11 @@ class WP_Meta_Query {
                        }
 
                        if ( $where ) {
-                               $sql_chunks['where'][] = "CAST($alias.meta_value AS {$meta_type}) {$meta_compare} {$where}";
+                               if ( 'CHAR' === $meta_type ) {
+                                       $sql_chunks['where'][] = "$alias.meta_value {$meta_compare} {$where}";
+                               } else {
+                                       $sql_chunks['where'][] = "CAST($alias.meta_value AS {$meta_type}) {$meta_compare} {$where}";
+                               }
                        }
                }
 
@@ -672,8 +679,8 @@ class WP_Meta_Query {
         * An existing alias is compatible if (a) it is a sibling of `$clause`
         * (ie, it's under the scope of the same relation), and (b) the combination
         * of operator and relation between the clauses allows for a shared table join.
-        * In the case of {@see WP_Meta_Query}, this only applies to 'IN' clauses that
-        * are connected by the relation 'OR'.
+        * In the case of WP_Meta_Query, this only applies to 'IN' clauses that are
+        * connected by the relation 'OR'.
         *
         * @since 4.1.0
         * @access protected
@@ -716,7 +723,7 @@ class WP_Meta_Query {
                }
 
                /**
-                * Filter the table alias identified as compatible with the current clause.
+                * Filters the table alias identified as compatible with the current clause.
                 *
                 * @since 4.1.0
                 *
index 2af4fea0a1b2e8647f3e08c6eecb5f5350a43c9b..beaf249f4e832236c5be06b27d495b2cac7e2fe7 100644 (file)
@@ -160,7 +160,7 @@ class WP_Metadata_Lazyloader {
         *
         * @since 4.5.0
         *
-        * @param mixed $check The `$check` param passed from the 'get_comment_metadata' hook.
+        * @param mixed $check The `$check` param passed from the {@see 'get_comment_metadata'} hook.
         * @return mixed The original value of `$check`, so as not to short-circuit `get_comment_metadata()`.
         */
        public function lazyload_comment_meta( $check ) {
diff --git a/wp-includes/class-wp-network-query.php b/wp-includes/class-wp-network-query.php
new file mode 100644 (file)
index 0000000..7f8954c
--- /dev/null
@@ -0,0 +1,565 @@
+<?php
+/**
+ * Network API: WP_Network_Query class
+ *
+ * @package WordPress
+ * @subpackage Multisite
+ * @since 4.6.0
+ */
+
+/**
+ * Core class used for querying networks.
+ *
+ * @since 4.6.0
+ *
+ * @see WP_Network_Query::__construct() for accepted arguments.
+ */
+class WP_Network_Query {
+
+       /**
+        * SQL for database query.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var string
+        */
+       public $request;
+
+       /**
+        * SQL query clauses.
+        *
+        * @since 4.6.0
+        * @access protected
+        * @var array
+        */
+       protected $sql_clauses = array(
+               'select'  => '',
+               'from'    => '',
+               'where'   => array(),
+               'groupby' => '',
+               'orderby' => '',
+               'limits'  => '',
+       );
+
+       /**
+        * Query vars set by the user.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var array
+        */
+       public $query_vars;
+
+       /**
+        * Default values for query vars.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var array
+        */
+       public $query_var_defaults;
+
+       /**
+        * List of networks located by the query.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var array
+        */
+       public $networks;
+
+       /**
+        * The amount of found networks for the current query.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var int
+        */
+       public $found_networks = 0;
+
+       /**
+        * The number of pages.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var int
+        */
+       public $max_num_pages = 0;
+
+       /**
+        * Constructor.
+        *
+        * Sets up the network query, based on the query vars passed.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string|array $query {
+        *     Optional. Array or query string of network query parameters. Default empty.
+        *
+        *     @type array        $network__in          Array of network IDs to include. Default empty.
+        *     @type array        $network__not_in      Array of network IDs to exclude. Default empty.
+        *     @type bool         $count                Whether to return a network count (true) or array of network objects.
+        *                                              Default false.
+        *     @type string       $fields               Network fields to return. Accepts 'ids' (returns an array of network IDs)
+        *                                              or empty (returns an array of complete network objects). Default empty.
+        *     @type int          $number               Maximum number of networks to retrieve. Default null (no limit).
+        *     @type int          $offset               Number of networks to offset the query. Used to build LIMIT clause.
+        *                                              Default 0.
+        *     @type bool         $no_found_rows        Whether to disable the `SQL_CALC_FOUND_ROWS` query. Default true.
+        *     @type string|array $orderby              Network status or array of statuses. Accepts 'id', 'domain', 'path',
+        *                                              'domain_length', 'path_length' and 'network__in'. Also accepts false,
+        *                                              an empty array, or 'none' to disable `ORDER BY` clause. Default 'id'.
+        *     @type string       $order                How to order retrieved networks. Accepts 'ASC', 'DESC'. Default 'ASC'.
+        *     @type string       $domain               Limit results to those affiliated with a given network ID.
+        *                                              Default current network ID.
+        *     @type array        $domain__in           Array of domains to include affiliated networks for. Default empty.
+        *     @type array        $domain__not_in       Array of domains to exclude affiliated networks for. Default empty.
+        *     @type string       $path                 Limit results to those affiliated with a given network ID.
+        *                                              Default current network ID.
+        *     @type array        $path__in             Array of paths to include affiliated networks for. Default empty.
+        *     @type array        $path__not_in         Array of paths to exclude affiliated networks for. Default empty.
+        *     @type string       $search               Search term(s) to retrieve matching networks for. Default empty.
+        *     @type bool         $update_network_cache Whether to prime the cache for found networks. Default true.
+        * }
+        */
+       public function __construct( $query = '' ) {
+               $this->query_var_defaults = array(
+                       'network__in'          => '',
+                       'network__not_in'      => '',
+                       'count'                => false,
+                       'fields'               => '',
+                       'number'               => '',
+                       'offset'               => '',
+                       'no_found_rows'        => true,
+                       'orderby'              => 'id',
+                       'order'                => 'ASC',
+                       'domain'               => '',
+                       'domain__in'           => '',
+                       'domain__not_in'       => '',
+                       'path'                 => '',
+                       'path__in'             => '',
+                       'path__not_in'         => '',
+                       'search'               => '',
+                       'update_network_cache' => true,
+               );
+
+               if ( ! empty( $query ) ) {
+                       $this->query( $query );
+               }
+       }
+
+       /**
+        * Parses arguments passed to the network query with default query parameters.
+        *
+        * @since 4.6.0
+        *
+        * @access public
+        *
+        * @param string|array $query WP_Network_Query arguments. See WP_Network_Query::__construct()
+        */
+       public function parse_query( $query = '' ) {
+               if ( empty( $query ) ) {
+                       $query = $this->query_vars;
+               }
+
+               $this->query_vars = wp_parse_args( $query, $this->query_var_defaults );
+
+               /**
+                * Fires after the network query vars have been parsed.
+                *
+                * @since 4.6.0
+                *
+                * @param WP_Network_Query &$this The WP_Network_Query instance (passed by reference).
+                */
+               do_action_ref_array( 'parse_network_query', array( &$this ) );
+       }
+
+       /**
+        * Sets up the WordPress query for retrieving networks.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string|array $query Array or URL query string of parameters.
+        * @return array|int List of networks, or number of networks when 'count' is passed as a query var.
+        */
+       public function query( $query ) {
+               $this->query_vars = wp_parse_args( $query );
+               return $this->get_networks();
+       }
+
+       /**
+        * Gets a list of networks matching the query vars.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @return int|array The list of networks.
+        */
+       public function get_networks() {
+               $this->parse_query();
+
+               /**
+                * Fires before networks are retrieved.
+                *
+                * @since 4.6.0
+                *
+                * @param WP_Network_Query &$this Current instance of WP_Network_Query, passed by reference.
+                */
+               do_action_ref_array( 'pre_get_networks', array( &$this ) );
+
+               // $args can include anything. Only use the args defined in the query_var_defaults to compute the key.
+               $key = md5( serialize( wp_array_slice_assoc( $this->query_vars, array_keys( $this->query_var_defaults ) ) ) );
+               $last_changed = wp_cache_get( 'last_changed', 'networks' );
+               if ( ! $last_changed ) {
+                       $last_changed = microtime();
+                       wp_cache_set( 'last_changed', $last_changed, 'networks' );
+               }
+
+               $cache_key = "get_network_ids:$key:$last_changed";
+               $cache_value = wp_cache_get( $cache_key, 'networks' );
+
+               if ( false === $cache_value ) {
+                       $network_ids = $this->get_network_ids();
+                       if ( $network_ids ) {
+                               $this->set_found_networks();
+                       }
+
+                       $cache_value = array(
+                               'network_ids' => $network_ids,
+                               'found_networks' => $this->found_networks,
+                       );
+                       wp_cache_add( $cache_key, $cache_value, 'networks' );
+               } else {
+                       $network_ids = $cache_value['network_ids'];
+                       $this->found_networks = $cache_value['found_networks'];
+               }
+
+               if ( $this->found_networks && $this->query_vars['number'] ) {
+                       $this->max_num_pages = ceil( $this->found_networks / $this->query_vars['number'] );
+               }
+
+               // If querying for a count only, there's nothing more to do.
+               if ( $this->query_vars['count'] ) {
+                       // $network_ids is actually a count in this case.
+                       return intval( $network_ids );
+               }
+
+               $network_ids = array_map( 'intval', $network_ids );
+
+               if ( 'ids' == $this->query_vars['fields'] ) {
+                       $this->networks = $network_ids;
+                       return $this->networks;
+               }
+
+               if ( $this->query_vars['update_network_cache'] ) {
+                       _prime_network_caches( $network_ids );
+               }
+
+               // Fetch full network objects from the primed cache.
+               $_networks = array();
+               foreach ( $network_ids as $network_id ) {
+                       if ( $_network = get_network( $network_id ) ) {
+                               $_networks[] = $_network;
+                       }
+               }
+
+               /**
+                * Filters the network query results.
+                *
+                * @since 4.6.0
+                *
+                * @param array            $results  An array of networks.
+                * @param WP_Network_Query &$this    Current instance of WP_Network_Query, passed by reference.
+                */
+               $_networks = apply_filters_ref_array( 'the_networks', array( $_networks, &$this ) );
+
+               // Convert to WP_Network instances
+               $this->networks = array_map( 'get_network', $_networks );
+
+               return $this->networks;
+       }
+
+       /**
+        * Used internally to get a list of network IDs matching the query vars.
+        *
+        * @since 4.6.0
+        * @access protected
+        *
+        * @return int|array A single count of network IDs if a count query. An array of network IDs if a full query.
+        */
+       protected function get_network_ids() {
+               global $wpdb;
+
+               $order = $this->parse_order( $this->query_vars['order'] );
+
+               // Disable ORDER BY with 'none', an empty array, or boolean false.
+               if ( in_array( $this->query_vars['orderby'], array( 'none', array(), false ), true ) ) {
+                       $orderby = '';
+               } elseif ( ! empty( $this->query_vars['orderby'] ) ) {
+                       $ordersby = is_array( $this->query_vars['orderby'] ) ?
+                               $this->query_vars['orderby'] :
+                               preg_split( '/[,\s]/', $this->query_vars['orderby'] );
+
+                       $orderby_array = array();
+                       foreach ( $ordersby as $_key => $_value ) {
+                               if ( ! $_value ) {
+                                       continue;
+                               }
+
+                               if ( is_int( $_key ) ) {
+                                       $_orderby = $_value;
+                                       $_order = $order;
+                               } else {
+                                       $_orderby = $_key;
+                                       $_order = $_value;
+                               }
+
+                               $parsed = $this->parse_orderby( $_orderby );
+
+                               if ( ! $parsed ) {
+                                       continue;
+                               }
+
+                               if ( 'network__in' === $_orderby ) {
+                                       $orderby_array[] = $parsed;
+                                       continue;
+                               }
+
+                               $orderby_array[] = $parsed . ' ' . $this->parse_order( $_order );
+                       }
+
+                       $orderby = implode( ', ', $orderby_array );
+               } else {
+                       $orderby = "$wpdb->site.id $order";
+               }
+
+               $number = absint( $this->query_vars['number'] );
+               $offset = absint( $this->query_vars['offset'] );
+
+               if ( ! empty( $number ) ) {
+                       if ( $offset ) {
+                               $limits = 'LIMIT ' . $offset . ',' . $number;
+                       } else {
+                               $limits = 'LIMIT ' . $number;
+                       }
+               }
+
+               if ( $this->query_vars['count'] ) {
+                       $fields = 'COUNT(*)';
+               } else {
+                       $fields = "$wpdb->site.id";
+               }
+
+               // Parse network IDs for an IN clause.
+               if ( ! empty( $this->query_vars['network__in'] ) ) {
+                       $this->sql_clauses['where']['network__in'] = "$wpdb->site.id IN ( " . implode( ',', wp_parse_id_list( $this->query_vars['network__in'] ) ) . ' )';
+               }
+
+               // Parse network IDs for a NOT IN clause.
+               if ( ! empty( $this->query_vars['network__not_in'] ) ) {
+                       $this->sql_clauses['where']['network__not_in'] = "$wpdb->site.id NOT IN ( " . implode( ',', wp_parse_id_list( $this->query_vars['network__not_in'] ) ) . ' )';
+               }
+
+               if ( ! empty( $this->query_vars['domain'] ) ) {
+                       $this->sql_clauses['where']['domain'] = $wpdb->prepare( "$wpdb->site.domain = %s", $this->query_vars['domain'] );
+               }
+
+               // Parse network domain for an IN clause.
+               if ( is_array( $this->query_vars['domain__in'] ) ) {
+                       $this->sql_clauses['where']['domain__in'] = "$wpdb->site.domain IN ( '" . implode( "', '", $wpdb->_escape( $this->query_vars['domain__in'] ) ) . "' )";
+               }
+
+               // Parse network domain for a NOT IN clause.
+               if ( is_array( $this->query_vars['domain__not_in'] ) ) {
+                       $this->sql_clauses['where']['domain__not_in'] = "$wpdb->site.domain NOT IN ( '" . implode( "', '", $wpdb->_escape( $this->query_vars['domain__not_in'] ) ) . "' )";
+               }
+
+               if ( ! empty( $this->query_vars['path'] ) ) {
+                       $this->sql_clauses['where']['path'] = $wpdb->prepare( "$wpdb->site.path = %s", $this->query_vars['path'] );
+               }
+
+               // Parse network path for an IN clause.
+               if ( is_array( $this->query_vars['path__in'] ) ) {
+                       $this->sql_clauses['where']['path__in'] = "$wpdb->site.path IN ( '" . implode( "', '", $wpdb->_escape( $this->query_vars['path__in'] ) ) . "' )";
+               }
+
+               // Parse network path for a NOT IN clause.
+               if ( is_array( $this->query_vars['path__not_in'] ) ) {
+                       $this->sql_clauses['where']['path__not_in'] = "$wpdb->site.path NOT IN ( '" . implode( "', '", $wpdb->_escape( $this->query_vars['path__not_in'] ) ) . "' )";
+               }
+
+               // Falsey search strings are ignored.
+               if ( strlen( $this->query_vars['search'] ) ) {
+                       $this->sql_clauses['where']['search'] = $this->get_search_sql(
+                               $this->query_vars['search'],
+                               array( "$wpdb->site.domain", "$wpdb->site.path" )
+                       );
+               }
+
+               $join = '';
+
+               $where = implode( ' AND ', $this->sql_clauses['where'] );
+
+               $pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
+
+               /**
+                * Filters the network query clauses.
+                *
+                * @since 4.6.0
+                *
+                * @param array            $pieces A compacted array of network query clauses.
+                * @param WP_Network_Query &$this  Current instance of WP_Network_Query, passed by reference.
+                */
+               $clauses = apply_filters_ref_array( 'networks_clauses', array( compact( $pieces ), &$this ) );
+
+               $fields = isset( $clauses['fields'] ) ? $clauses['fields'] : '';
+               $join = isset( $clauses['join'] ) ? $clauses['join'] : '';
+               $where = isset( $clauses['where'] ) ? $clauses['where'] : '';
+               $orderby = isset( $clauses['orderby'] ) ? $clauses['orderby'] : '';
+               $limits = isset( $clauses['limits'] ) ? $clauses['limits'] : '';
+               $groupby = isset( $clauses['groupby'] ) ? $clauses['groupby'] : '';
+
+               if ( $where ) {
+                       $where = 'WHERE ' . $where;
+               }
+
+               if ( $groupby ) {
+                       $groupby = 'GROUP BY ' . $groupby;
+               }
+
+               if ( $orderby ) {
+                       $orderby = "ORDER BY $orderby";
+               }
+
+               $found_rows = '';
+               if ( ! $this->query_vars['no_found_rows'] ) {
+                       $found_rows = 'SQL_CALC_FOUND_ROWS';
+               }
+
+               $this->sql_clauses['select']  = "SELECT $found_rows $fields";
+               $this->sql_clauses['from']    = "FROM $wpdb->site $join";
+               $this->sql_clauses['groupby'] = $groupby;
+               $this->sql_clauses['orderby'] = $orderby;
+               $this->sql_clauses['limits']  = $limits;
+
+               $this->request = "{$this->sql_clauses['select']} {$this->sql_clauses['from']} {$where} {$this->sql_clauses['groupby']} {$this->sql_clauses['orderby']} {$this->sql_clauses['limits']}";
+
+               if ( $this->query_vars['count'] ) {
+                       return intval( $wpdb->get_var( $this->request ) );
+               }
+
+               $network_ids = $wpdb->get_col( $this->request );
+
+               return array_map( 'intval', $network_ids );
+       }
+
+       /**
+        * Populates found_networks and max_num_pages properties for the current query
+        * if the limit clause was used.
+        *
+        * @since 4.6.0
+        * @access private
+        *
+        * @global wpdb $wpdb WordPress database abstraction object.
+        */
+       private function set_found_networks() {
+               global $wpdb;
+
+               if ( $this->query_vars['number'] && ! $this->query_vars['no_found_rows'] ) {
+                       /**
+                        * Filters the query used to retrieve found network count.
+                        *
+                        * @since 4.6.0
+                        *
+                        * @param string           $found_networks_query SQL query. Default 'SELECT FOUND_ROWS()'.
+                        * @param WP_Network_Query $network_query        The `WP_Network_Query` instance.
+                        */
+                       $found_networks_query = apply_filters( 'found_networks_query', 'SELECT FOUND_ROWS()', $this );
+
+                       $this->found_networks = (int) $wpdb->get_var( $found_networks_query );
+               }
+       }
+
+       /**
+        * Used internally to generate an SQL string for searching across multiple columns.
+        *
+        * @since 4.6.0
+        * @access protected
+        *
+        * @global wpdb  $wpdb WordPress database abstraction object.
+        *
+        * @param string $string  Search string.
+        * @param array  $columns Columns to search.
+        *
+        * @return string Search SQL.
+        */
+       protected function get_search_sql( $string, $columns ) {
+               global $wpdb;
+
+               $like = '%' . $wpdb->esc_like( $string ) . '%';
+
+               $searches = array();
+               foreach ( $columns as $column ) {
+                       $searches[] = $wpdb->prepare( "$column LIKE %s", $like );
+               }
+
+               return '(' . implode( ' OR ', $searches ) . ')';
+       }
+
+       /**
+        * Parses and sanitizes 'orderby' keys passed to the network query.
+        *
+        * @since 4.6.0
+        * @access protected
+        *
+        * @global wpdb $wpdb WordPress database abstraction object.
+        *
+        * @param string $orderby Alias for the field to order by.
+        * @return string|false Value to used in the ORDER clause. False otherwise.
+        */
+       protected function parse_orderby( $orderby ) {
+               global $wpdb;
+
+               $allowed_keys = array(
+                       'id',
+                       'domain',
+                       'path',
+               );
+
+               $parsed = false;
+               if ( $orderby == 'network__in' ) {
+                       $network__in = implode( ',', array_map( 'absint', $this->query_vars['network__in'] ) );
+                       $parsed = "FIELD( {$wpdb->site}.id, $network__in )";
+               } elseif ( $orderby == 'domain_length' || $orderby == 'path_length' ) {
+                       $field = substr( $orderby, 0, -7 );
+                       $parsed = "CHAR_LENGTH($wpdb->site.$field)";
+               } elseif ( in_array( $orderby, $allowed_keys ) ) {
+                       $parsed = "$wpdb->site.$orderby";
+               }
+
+               return $parsed;
+       }
+
+       /**
+        * Parses an 'order' query variable and cast it to 'ASC' or 'DESC' as necessary.
+        *
+        * @since 4.6.0
+        * @access protected
+        *
+        * @param string $order The 'order' query variable.
+        * @return string The sanitized 'order' query variable.
+        */
+       protected function parse_order( $order ) {
+               if ( ! is_string( $order ) || empty( $order ) ) {
+                       return 'ASC';
+               }
+
+               if ( 'ASC' === strtoupper( $order ) ) {
+                       return 'ASC';
+               } else {
+                       return 'DESC';
+               }
+       }
+}
index 529c73f3b7c660f7608bee3a1121c9813d3b72a6..5ab29c2c58306ed1e5f49146ca2b8317736dad7f 100644 (file)
  * ability to interact with any network of sites is required.
  *
  * @since 4.4.0
+ *
+ * @property int $id
+ * @property int $site_id
  */
 class WP_Network {
 
        /**
         * Network ID.
         *
-        * A numeric string, for compatibility reasons.
-        *
         * @since 4.4.0
-        * @access public
-        * @var string
+        * @since 4.6.0 Converted from public to private to explicitly enable more intuitive
+        *              access via magic methods. As part of the access change, the type was
+        *              also changed from `string` to `int`.
+        * @access private
+        * @var int
         */
-       public $id;
+       private $id;
 
        /**
         * Domain of the network.
@@ -58,10 +62,10 @@ class WP_Network {
         * A numeric string, for compatibility reasons.
         *
         * @since 4.4.0
-        * @access public
+        * @access private
         * @var string
         */
-       public $blog_id = 0;
+       private $blog_id = '0';
 
        /**
         * Domain used to set cookies for this network.
@@ -137,6 +141,77 @@ class WP_Network {
                $this->_set_cookie_domain();
        }
 
+       /**
+        * Getter.
+        *
+        * Allows current multisite naming conventions when getting properties.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string $key Property to get.
+        * @return mixed Value of the property. Null if not available.
+        */
+       public function __get( $key ) {
+               switch ( $key ) {
+                       case 'id';
+                               return (int) $this->id;
+                       case 'blog_id':
+                               return $this->blog_id;
+                       case 'site_id':
+                               return (int) $this->blog_id;
+               }
+
+               return null;
+       }
+
+       /**
+        * Isset-er.
+        *
+        * Allows current multisite naming conventions when checking for properties.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string $key Property to check if set.
+        * @return bool Whether the property is set.
+        */
+       public function __isset( $key ) {
+               switch ( $key ) {
+                       case 'id':
+                       case 'blog_id':
+                       case 'site_id':
+                               return true;
+               }
+
+               return false;
+       }
+
+       /**
+        * Setter.
+        *
+        * Allows current multisite naming conventions while setting properties.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string $key   Property to set.
+        * @param mixed  $value Value to assign to the property.
+        */
+       public function __set( $key, $value ) {
+               switch ( $key ) {
+                       case 'id':
+                               $this->id = (int) $value;
+                               break;
+                       case 'blog_id':
+                       case 'site_id':
+                               $this->blog_id = (string) $value;
+                               break;
+                       default:
+                               $this->$key = $value;
+               }
+       }
+
        /**
         * Set the site name assigned to the network if one has not been populated.
         *
@@ -230,7 +305,7 @@ class WP_Network {
                        $path_segments = array_filter( explode( '/', trim( $path, '/' ) ) );
 
                        /**
-                        * Filter the number of path segments to consider when searching for a site.
+                        * Filters the number of path segments to consider when searching for a site.
                         *
                         * @since 3.9.0
                         *
index dbb4e3e91b3be8ea5d56e73812cfdc778e18a8c2..13fed836e6ed7a844e94bc97e0333210a532e1e5 100644 (file)
@@ -20,10 +20,11 @@ final class WP_oEmbed_Controller {
         * Register the oEmbed REST API route.
         *
         * @since 4.4.0
+        * @access public
         */
        public function register_routes() {
                /**
-                * Filter the maxwidth oEmbed parameter.
+                * Filters the maxwidth oEmbed parameter.
                 *
                 * @since 4.4.0
                 *
@@ -59,6 +60,7 @@ final class WP_oEmbed_Controller {
         * Returns the JSON object for the post.
         *
         * @since 4.4.0
+        * @access public
         *
         * @param WP_REST_Request $request Full data about the request.
         * @return WP_Error|array oEmbed response data or WP_Error on failure.
@@ -67,7 +69,7 @@ final class WP_oEmbed_Controller {
                $post_id = url_to_postid( $request['url'] );
 
                /**
-                * Filter the determined post ID.
+                * Filters the determined post ID.
                 *
                 * @since 4.4.0
                 *
diff --git a/wp-includes/class-wp-post-type.php b/wp-includes/class-wp-post-type.php
new file mode 100644 (file)
index 0000000..c08ca5e
--- /dev/null
@@ -0,0 +1,686 @@
+<?php
+/**
+ * Post API: WP_Post_Type class
+ *
+ * @package WordPress
+ * @subpackage Post
+ * @since 4.6.0
+ */
+
+/**
+ * Core class used for interacting with post types.
+ *
+ * @since 4.6.0
+ *
+ * @see register_post_type()
+ */
+final class WP_Post_Type {
+       /**
+        * Post type key.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var string $name
+        */
+       public $name;
+
+       /**
+        * Name of the post type shown in the menu. Usually plural.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var string $label
+        */
+       public $label;
+
+       /**
+        * Labels object for this post type.
+        *
+        * If not set, post labels are inherited for non-hierarchical types
+        * and page labels for hierarchical ones.
+        *
+        * @see get_post_type_labels()
+        *
+        * @since 4.6.0
+        * @access public
+        * @var object $labels
+        */
+       public $labels;
+
+       /**
+        * A short descriptive summary of what the post type is.
+        *
+        * Default empty.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var string $description
+        */
+       public $description = '';
+
+       /**
+        * Whether a post type is intended for use publicly either via the admin interface or by front-end users.
+        *
+        * While the default settings of $exclude_from_search, $publicly_queryable, $show_ui, and $show_in_nav_menus
+        * are inherited from public, each does not rely on this relationship and controls a very specific intention.
+        *
+        * Default false.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var bool $public
+        */
+       public $public = false;
+
+       /**
+        * Whether the post type is hierarchical (e.g. page).
+        *
+        * Default false.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var bool $hierarchical
+        */
+       public $hierarchical = false;
+
+       /**
+        * Whether to exclude posts with this post type from front end search
+        * results.
+        *
+        * Default is the opposite value of $public.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var bool $exclude_from_search
+        */
+       public $exclude_from_search = null;
+
+       /**
+        * Whether queries can be performed on the front end for the post type as part of `parse_request()`.
+        *
+        * Endpoints would include:
+        * - `?post_type={post_type_key}`
+        * - `?{post_type_key}={single_post_slug}`
+        * - `?{post_type_query_var}={single_post_slug}`
+        *
+        * Default is the value of $public.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var bool $publicly_queryable
+        */
+       public $publicly_queryable = null;
+
+       /**
+        * Whether to generate and allow a UI for managing this post type in the admin.
+        *
+        * Default is the value of $public.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var bool $show_ui
+        */
+       public $show_ui = null;
+
+       /**
+        * Where to show the post type in the admin menu.
+        *
+        * To work, $show_ui must be true. If true, the post type is shown in its own top level menu. If false, no menu is
+        * shown. If a string of an existing top level menu (eg. 'tools.php' or 'edit.php?post_type=page'), the post type
+        * will be placed as a sub-menu of that.
+        *
+        * Default is the value of $show_ui.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var bool $show_in_menu
+        */
+       public $show_in_menu = null;
+
+       /**
+        * Makes this post type available for selection in navigation menus.
+        *
+        * Default is the value $public.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var bool $show_in_nav_menus
+        */
+       public $show_in_nav_menus = null;
+
+       /**
+        * Makes this post type available via the admin bar.
+        *
+        * Default is the value of $show_in_menu.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var bool $show_in_admin_bar
+        */
+       public $show_in_admin_bar = null;
+
+       /**
+        * The position in the menu order the post type should appear.
+        *
+        * To work, $show_in_menu must be true. Default null (at the bottom).
+        *
+        * @since 4.6.0
+        * @access public
+        * @var int $menu_position
+        */
+       public $menu_position = null;
+
+       /**
+        * The URL to the icon to be used for this menu.
+        *
+        * Pass a base64-encoded SVG using a data URI, which will be colored to match the color scheme.
+        * This should begin with 'data:image/svg+xml;base64,'. Pass the name of a Dashicons helper class
+        * to use a font icon, e.g. 'dashicons-chart-pie'. Pass 'none' to leave div.wp-menu-image empty
+        * so an icon can be added via CSS.
+        *
+        * Defaults to use the posts icon.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var string $menu_icon
+        */
+       public $menu_icon = null;
+
+       /**
+        * The string to use to build the read, edit, and delete capabilities.
+        *
+        * May be passed as an array to allow for alternative plurals when using
+        * this argument as a base to construct the capabilities, e.g.
+        * array( 'story', 'stories' ). Default 'post'.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var string $capability_type
+        */
+       public $capability_type = 'post';
+
+       /**
+        * Whether to use the internal default meta capability handling.
+        *
+        * Default false.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var bool $map_meta_cap
+        */
+       public $map_meta_cap = false;
+
+       /**
+        * Provide a callback function that sets up the meta boxes for the edit form.
+        *
+        * Do `remove_meta_box()` and `add_meta_box()` calls in the callback. Default null.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var string $register_meta_box_cb
+        */
+       public $register_meta_box_cb = null;
+
+       /**
+        * An array of taxonomy identifiers that will be registered for the post type.
+        *
+        * Taxonomies can be registered later with `register_taxonomy()` or `register_taxonomy_for_object_type()`.
+        *
+        * Default empty array.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var array $taxonomies
+        */
+       public $taxonomies = array();
+
+       /**
+        * Whether there should be post type archives, or if a string, the archive slug to use.
+        *
+        * Will generate the proper rewrite rules if $rewrite is enabled. Default false.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var bool|string $has_archive
+        */
+       public $has_archive = false;
+
+       /**
+        * Sets the query_var key for this post type.
+        *
+        * Defaults to $post_type key. If false, a post type cannot be loaded at `?{query_var}={post_slug}`.
+        * If specified as a string, the query `?{query_var_string}={post_slug}` will be valid.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var string|bool $query_var
+        */
+       public $query_var;
+
+       /**
+        * Whether to allow this post type to be exported.
+        *
+        * Default true.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var bool $can_export
+        */
+       public $can_export = true;
+
+       /**
+        * Whether to delete posts of this type when deleting a user.
+        *
+        * If true, posts of this type belonging to the user will be moved to trash when then user is deleted.
+        * If false, posts of this type belonging to the user will *not* be trashed or deleted.
+        * If not set (the default), posts are trashed if post_type_supports( 'author' ).
+        * Otherwise posts are not trashed or deleted. Default null.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var bool $delete_with_user
+        */
+       public $delete_with_user = null;
+
+       /**
+        * Whether this post type is a native or "built-in" post_type.
+        *
+        * Default false.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var bool $_builtin
+        */
+       public $_builtin = false;
+
+       /**
+        * URL segment to use for edit link of this post type.
+        *
+        * Default 'post.php?post=%d'.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var string $_edit_link
+        */
+       public $_edit_link = 'post.php?post=%d';
+
+       /**
+        * Post type capabilities.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var object $cap
+        */
+       public $cap;
+
+       /**
+        * Triggers the handling of rewrites for this post type.
+        *
+        * Defaults to true, using $post_type as slug.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var array|false $rewrite
+        */
+       public $rewrite;
+
+       /**
+        * The features supported by the post type.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var array|bool $supports
+        */
+       public $supports;
+
+       /**
+        * Constructor.
+        *
+        * Will populate object properties from the provided arguments and assign other
+        * default properties based on that information.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @see register_post_type()
+        *
+        * @param string       $post_type Post type key.
+        * @param array|string $args      Optional. Array or string of arguments for registering a post type.
+        *                                Default empty array.
+        */
+       public function __construct( $post_type, $args = array() ) {
+               $this->name = $post_type;
+
+               $this->set_props( $args );
+       }
+
+       /**
+        * Sets post type properties.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param array|string $args Array or string of arguments for registering a post type.
+        */
+       public function set_props( $args ) {
+               $args = wp_parse_args( $args );
+
+               /**
+                * Filter the arguments for registering a post type.
+                *
+                * @since 4.4.0
+                *
+                * @param array  $args      Array of arguments for registering a post type.
+                * @param string $post_type Post type key.
+                */
+               $args = apply_filters( 'register_post_type_args', $args, $this->name );
+
+               $has_edit_link = ! empty( $args['_edit_link'] );
+
+               // Args prefixed with an underscore are reserved for internal use.
+               $defaults = array(
+                       'labels'               => array(),
+                       'description'          => '',
+                       'public'               => false,
+                       'hierarchical'         => false,
+                       'exclude_from_search'  => null,
+                       'publicly_queryable'   => null,
+                       'show_ui'              => null,
+                       'show_in_menu'         => null,
+                       'show_in_nav_menus'    => null,
+                       'show_in_admin_bar'    => null,
+                       'menu_position'        => null,
+                       'menu_icon'            => null,
+                       'capability_type'      => 'post',
+                       'capabilities'         => array(),
+                       'map_meta_cap'         => null,
+                       'supports'             => array(),
+                       'register_meta_box_cb' => null,
+                       'taxonomies'           => array(),
+                       'has_archive'          => false,
+                       'rewrite'              => true,
+                       'query_var'            => true,
+                       'can_export'           => true,
+                       'delete_with_user'     => null,
+                       '_builtin'             => false,
+                       '_edit_link'           => 'post.php?post=%d',
+               );
+
+               $args = array_merge( $defaults, $args );
+
+               $args['name'] = $this->name;
+
+               // If not set, default to the setting for public.
+               if ( null === $args['publicly_queryable'] ) {
+                       $args['publicly_queryable'] = $args['public'];
+               }
+
+               // If not set, default to the setting for public.
+               if ( null === $args['show_ui'] ) {
+                       $args['show_ui'] = $args['public'];
+               }
+
+               // If not set, default to the setting for show_ui.
+               if ( null === $args['show_in_menu'] || ! $args['show_ui'] ) {
+                       $args['show_in_menu'] = $args['show_ui'];
+               }
+
+               // If not set, default to the whether the full UI is shown.
+               if ( null === $args['show_in_admin_bar'] ) {
+                       $args['show_in_admin_bar'] = (bool) $args['show_in_menu'];
+               }
+
+               // If not set, default to the setting for public.
+               if ( null === $args['show_in_nav_menus'] ) {
+                       $args['show_in_nav_menus'] = $args['public'];
+               }
+
+               // If not set, default to true if not public, false if public.
+               if ( null === $args['exclude_from_search'] ) {
+                       $args['exclude_from_search'] = ! $args['public'];
+               }
+
+               // Back compat with quirky handling in version 3.0. #14122.
+               if ( empty( $args['capabilities'] ) && null === $args['map_meta_cap'] && in_array( $args['capability_type'], array( 'post', 'page' ) ) ) {
+                       $args['map_meta_cap'] = true;
+               }
+
+               // If not set, default to false.
+               if ( null === $args['map_meta_cap'] ) {
+                       $args['map_meta_cap'] = false;
+               }
+
+               // If there's no specified edit link and no UI, remove the edit link.
+               if ( ! $args['show_ui'] && ! $has_edit_link ) {
+                       $args['_edit_link'] = '';
+               }
+
+               $this->cap = get_post_type_capabilities( (object) $args );
+               unset( $args['capabilities'] );
+
+               if ( is_array( $args['capability_type'] ) ) {
+                       $args['capability_type'] = $args['capability_type'][0];
+               }
+
+               if ( false !== $args['query_var'] ) {
+                       if ( true === $args['query_var'] ) {
+                               $args['query_var'] = $this->name;
+                       } else {
+                               $args['query_var'] = sanitize_title_with_dashes( $args['query_var'] );
+                       }
+               }
+
+               if ( false !== $args['rewrite'] && ( is_admin() || '' != get_option( 'permalink_structure' ) ) ) {
+                       if ( ! is_array( $args['rewrite'] ) ) {
+                               $args['rewrite'] = array();
+                       }
+                       if ( empty( $args['rewrite']['slug'] ) ) {
+                               $args['rewrite']['slug'] = $this->name;
+                       }
+                       if ( ! isset( $args['rewrite']['with_front'] ) ) {
+                               $args['rewrite']['with_front'] = true;
+                       }
+                       if ( ! isset( $args['rewrite']['pages'] ) ) {
+                               $args['rewrite']['pages'] = true;
+                       }
+                       if ( ! isset( $args['rewrite']['feeds'] ) || ! $args['has_archive'] ) {
+                               $args['rewrite']['feeds'] = (bool) $args['has_archive'];
+                       }
+                       if ( ! isset( $args['rewrite']['ep_mask'] ) ) {
+                               if ( isset( $args['permalink_epmask'] ) ) {
+                                       $args['rewrite']['ep_mask'] = $args['permalink_epmask'];
+                               } else {
+                                       $args['rewrite']['ep_mask'] = EP_PERMALINK;
+                               }
+                       }
+               }
+
+               foreach ( $args as $property_name => $property_value ) {
+                       $this->$property_name = $property_value;
+               }
+
+               $this->labels = get_post_type_labels( $this );
+               $this->label  = $this->labels->name;
+       }
+
+       /**
+        * Sets the features support for the post type.
+        *
+        * @since 4.6.0
+        * @access public
+        */
+       public function add_supports() {
+               if ( ! empty( $this->supports ) ) {
+                       add_post_type_support( $this->name, $this->supports );
+                       unset( $this->supports );
+               } elseif ( false !== $this->supports ) {
+                       // Add default features.
+                       add_post_type_support( $this->name, array( 'title', 'editor' ) );
+               }
+       }
+
+       /**
+        * Adds the necessary rewrite rules for the post type.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @global WP_Rewrite $wp_rewrite WordPress Rewrite Component.
+        * @global WP         $wp         Current WordPress environment instance.
+        */
+       public function add_rewrite_rules() {
+               global $wp_rewrite, $wp;
+
+               if ( false !== $this->query_var && $wp && is_post_type_viewable( $this ) ) {
+                       $wp->add_query_var( $this->query_var );
+               }
+
+               if ( false !== $this->rewrite && ( is_admin() || '' != get_option( 'permalink_structure' ) ) ) {
+                       if ( $this->hierarchical ) {
+                               add_rewrite_tag( "%$this->name%", '(.+?)', $this->query_var ? "{$this->query_var}=" : "post_type=$this->name&pagename=" );
+                       } else {
+                               add_rewrite_tag( "%$this->name%", '([^/]+)', $this->query_var ? "{$this->query_var}=" : "post_type=$this->name&name=" );
+                       }
+
+                       if ( $this->has_archive ) {
+                               $archive_slug = true === $this->has_archive ? $this->rewrite['slug'] : $this->has_archive;
+                               if ( $this->rewrite['with_front'] ) {
+                                       $archive_slug = substr( $wp_rewrite->front, 1 ) . $archive_slug;
+                               } else {
+                                       $archive_slug = $wp_rewrite->root . $archive_slug;
+                               }
+
+                               add_rewrite_rule( "{$archive_slug}/?$", "index.php?post_type=$this->name", 'top' );
+                               if ( $this->rewrite['feeds'] && $wp_rewrite->feeds ) {
+                                       $feeds = '(' . trim( implode( '|', $wp_rewrite->feeds ) ) . ')';
+                                       add_rewrite_rule( "{$archive_slug}/feed/$feeds/?$", "index.php?post_type=$this->name" . '&feed=$matches[1]', 'top' );
+                                       add_rewrite_rule( "{$archive_slug}/$feeds/?$", "index.php?post_type=$this->name" . '&feed=$matches[1]', 'top' );
+                               }
+                               if ( $this->rewrite['pages'] ) {
+                                       add_rewrite_rule( "{$archive_slug}/{$wp_rewrite->pagination_base}/([0-9]{1,})/?$", "index.php?post_type=$this->name" . '&paged=$matches[1]', 'top' );
+                               }
+                       }
+
+                       $permastruct_args         = $this->rewrite;
+                       $permastruct_args['feed'] = $permastruct_args['feeds'];
+                       add_permastruct( $this->name, "{$this->rewrite['slug']}/%$this->name%", $permastruct_args );
+               }
+       }
+
+       /**
+        * Registers the post type meta box if a custom callback was specified.
+        *
+        * @since 4.6.0
+        * @access public
+        */
+       public function register_meta_boxes() {
+               if ( $this->register_meta_box_cb ) {
+                       add_action( 'add_meta_boxes_' . $this->name, $this->register_meta_box_cb, 10, 1 );
+               }
+       }
+
+       /**
+        * Adds the future post hook action for the post type.
+        *
+        * @since 4.6.0
+        * @access public
+        */
+       public function add_hooks() {
+               add_action( 'future_' . $this->name, '_future_post_hook', 5, 2 );
+       }
+
+       /**
+        * Registers the taxonomies for the post type.
+        *
+        * @since 4.6.0
+        * @access public
+        */
+       public function register_taxonomies() {
+               foreach ( $this->taxonomies as $taxonomy ) {
+                       register_taxonomy_for_object_type( $taxonomy, $this->name );
+               }
+       }
+
+       /**
+        * Removes the features support for the post type.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @global array $_wp_post_type_features Post type features.
+        */
+       public function remove_supports() {
+               global $_wp_post_type_features;
+
+               unset( $_wp_post_type_features[ $this->name ] );
+       }
+
+       /**
+        * Removes any rewrite rules, permastructs, and rules for the post type.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @global WP_Rewrite $wp_rewrite          WordPress rewrite component.
+        * @global WP         $wp                  Current WordPress environment instance.
+        * @global array      $post_type_meta_caps Used to remove meta capabilities.
+        */
+       public function remove_rewrite_rules() {
+               global $wp, $wp_rewrite, $post_type_meta_caps;
+
+               // Remove query var.
+               if ( false !== $this->query_var ) {
+                       $wp->remove_query_var( $this->query_var );
+               }
+
+               // Remove any rewrite rules, permastructs, and rules.
+               if ( false !== $this->rewrite ) {
+                       remove_rewrite_tag( "%$this->name%" );
+                       remove_permastruct( $this->name );
+                       foreach ( $wp_rewrite->extra_rules_top as $regex => $query ) {
+                               if ( false !== strpos( $query, "index.php?post_type=$this->name" ) ) {
+                                       unset( $wp_rewrite->extra_rules_top[ $regex ] );
+                               }
+                       }
+               }
+
+               // Remove registered custom meta capabilities.
+               foreach ( $this->cap as $cap ) {
+                       unset( $post_type_meta_caps[ $cap ] );
+               }
+       }
+
+       /**
+        * Unregisters the post type meta box if a custom callback was specified.
+        *
+        * @since 4.6.0
+        * @access public
+        */
+       public function unregister_meta_boxes() {
+               if ( $this->register_meta_box_cb ) {
+                       remove_action( 'add_meta_boxes_' . $this->name, $this->register_meta_box_cb, 10 );
+               }
+       }
+
+       /**
+        * Removes the post type from all taxonomies.
+        *
+        * @since 4.6.0
+        * @access public
+        */
+       public function unregister_taxonomies() {
+               foreach ( get_object_taxonomies( $this->name ) as $taxonomy ) {
+                       unregister_taxonomy_for_object_type( $taxonomy, $this->name );
+               }
+       }
+
+       /**
+        * Removes the future post hook action for the post type.
+        *
+        * @since 4.6.0
+        * @access public
+        */
+       public function remove_hooks() {
+               remove_action( 'future_' . $this->name, '_future_post_hook', 5 );
+       }
+}
index 7c621fb001efdbb8c118adc1e91734afe1775ea2..2c5761566d2c3ac17985b5ea5d6242554ee44abc 100644 (file)
@@ -1252,13 +1252,13 @@ class WP_Rewrite {
        /**
         * Constructs rewrite matches and queries from permalink structure.
         *
-        * Runs the action 'generate_rewrite_rules' with the parameter that is an
+        * Runs the action {@see 'generate_rewrite_rules'} with the parameter that is an
         * reference to the current WP_Rewrite instance to further manipulate the
-        * permalink structures and rewrite rules. Runs the 'rewrite_rules_array'
+        * permalink structures and rewrite rules. Runs the {@see 'rewrite_rules_array'}
         * filter on the full rewrite rule array.
         *
         * There are two ways to manipulate the rewrite rules, one by hooking into
-        * the 'generate_rewrite_rules' action and gaining full control of the
+        * the {@see 'generate_rewrite_rules'} action and gaining full control of the
         * object or just manipulating the rewrite rule array before it is passed
         * from the function.
         *
@@ -1297,7 +1297,7 @@ class WP_Rewrite {
                $post_rewrite = $this->generate_rewrite_rules( $this->permalink_structure, EP_PERMALINK );
 
                /**
-                * Filter rewrite rules used for "post" archives.
+                * Filters rewrite rules used for "post" archives.
                 *
                 * @since 1.5.0
                 *
@@ -1309,7 +1309,7 @@ class WP_Rewrite {
                $date_rewrite = $this->generate_rewrite_rules($this->get_date_permastruct(), EP_DATE);
 
                /**
-                * Filter rewrite rules used for date archives.
+                * Filters rewrite rules used for date archives.
                 *
                 * Likely date archives would include /yyyy/, /yyyy/mm/, and /yyyy/mm/dd/.
                 *
@@ -1323,7 +1323,7 @@ class WP_Rewrite {
                $root_rewrite = $this->generate_rewrite_rules($this->root . '/', EP_ROOT);
 
                /**
-                * Filter rewrite rules used for root-level archives.
+                * Filters rewrite rules used for root-level archives.
                 *
                 * Likely root-level archives would include pagination rules for the homepage
                 * as well as site-wide post feeds (e.g. /feed/, and /feed/atom/).
@@ -1338,7 +1338,7 @@ class WP_Rewrite {
                $comments_rewrite = $this->generate_rewrite_rules($this->root . $this->comments_base, EP_COMMENTS, false, true, true, false);
 
                /**
-                * Filter rewrite rules used for comment feed archives.
+                * Filters rewrite rules used for comment feed archives.
                 *
                 * Likely comments feed archives include /comments/feed/, and /comments/feed/atom/.
                 *
@@ -1353,7 +1353,7 @@ class WP_Rewrite {
                $search_rewrite = $this->generate_rewrite_rules($search_structure, EP_SEARCH);
 
                /**
-                * Filter rewrite rules used for search archives.
+                * Filters rewrite rules used for search archives.
                 *
                 * Likely search-related archives include /search/search+query/ as well as
                 * pagination and feed paths for a search.
@@ -1368,7 +1368,7 @@ class WP_Rewrite {
                $author_rewrite = $this->generate_rewrite_rules($this->get_author_permastruct(), EP_AUTHORS);
 
                /**
-                * Filter rewrite rules used for author archives.
+                * Filters rewrite rules used for author archives.
                 *
                 * Likely author archives would include /author/author-name/, as well as
                 * pagination and feed paths for author archives.
@@ -1383,7 +1383,7 @@ class WP_Rewrite {
                $page_rewrite = $this->page_rewrite_rules();
 
                /**
-                * Filter rewrite rules used for "page" post type archives.
+                * Filters rewrite rules used for "page" post type archives.
                 *
                 * @since 1.5.0
                 *
@@ -1403,7 +1403,7 @@ class WP_Rewrite {
                        }
 
                        /**
-                        * Filter rewrite rules used for individual permastructs.
+                        * Filters rewrite rules used for individual permastructs.
                         *
                         * The dynamic portion of the hook name, `$permastructname`, refers
                         * to the name of the registered permastruct, e.g. 'post_tag' (tags),
@@ -1417,7 +1417,7 @@ class WP_Rewrite {
                        if ( 'post_tag' == $permastructname ) {
 
                                /**
-                                * Filter rewrite rules used specifically for Tags.
+                                * Filters rewrite rules used specifically for Tags.
                                 *
                                 * @since 2.3.0
                                 * @deprecated 3.1.0 Use 'post_tag_rewrite_rules' instead
@@ -1446,7 +1446,7 @@ class WP_Rewrite {
                do_action_ref_array( 'generate_rewrite_rules', array( &$this ) );
 
                /**
-                * Filter the full set of generated rewrite rules.
+                * Filters the full set of generated rewrite rules.
                 *
                 * @since 1.5.0
                 *
@@ -1550,7 +1550,7 @@ class WP_Rewrite {
                $rules .= "</IfModule>\n";
 
                /**
-                * Filter the list of rewrite rules formatted for output to an .htaccess file.
+                * Filters the list of rewrite rules formatted for output to an .htaccess file.
                 *
                 * @since 1.5.0
                 *
@@ -1559,7 +1559,7 @@ class WP_Rewrite {
                $rules = apply_filters( 'mod_rewrite_rules', $rules );
 
                /**
-                * Filter the list of rewrite rules formatted for output to an .htaccess file.
+                * Filters the list of rewrite rules formatted for output to an .htaccess file.
                 *
                 * @since 1.5.0
                 * @deprecated 1.5.0 Use the mod_rewrite_rules filter instead.
@@ -1612,7 +1612,7 @@ class WP_Rewrite {
                }
 
                /**
-                * Filter the list of rewrite rules formatted for output to a web.config.
+                * Filters the list of rewrite rules formatted for output to a web.config.
                 *
                 * @since 2.8.0
                 *
@@ -1743,7 +1743,7 @@ class WP_Rewrite {
         * }
         */
        public function add_permastruct( $name, $struct, $args = array() ) {
-               // Backwards compatibility for the old parameters: $with_front and $ep_mask.
+               // Back-compat for the old parameters: $with_front and $ep_mask.
                if ( ! is_array( $args ) )
                        $args = array( 'with_front' => $args );
                if ( func_num_args() == 4 )
@@ -1814,7 +1814,7 @@ class WP_Rewrite {
                $this->wp_rewrite_rules();
 
                /**
-                * Filter whether a "hard" rewrite rule flush should be performed when requested.
+                * Filters whether a "hard" rewrite rule flush should be performed when requested.
                 *
                 * A "hard" flush updates .htaccess (Apache) or web.config (IIS).
                 *
@@ -1872,7 +1872,7 @@ class WP_Rewrite {
         * between the current permalink structure and the parameter value. Calls
         * WP_Rewrite::init() after the option is updated.
         *
-        * Fires the 'permalink_structure_changed' action once the init call has
+        * Fires the {@see 'permalink_structure_changed'} action once the init call has
         * processed passing the old and new values
         *
         * @since 1.5.0
index 335d20da9db2decd0b09e3f23ceb493c78d41da0..6c9702de04864a0a672788271b3654cabe53ed1e 100644 (file)
@@ -63,12 +63,12 @@ class WP_Role {
        }
 
        /**
-        * Remove capability from role.
+        * Removes a capability from a role.
         *
-        * This is a container for {@link WP_Roles::remove_cap()} to remove the
-        * capability from the role. That is to say, that {@link
-        * WP_Roles::remove_cap()} implements the functionality, but it also makes
-        * sense to use this class, because you don't need to enter the role name.
+        * This is a container for WP_Roles::remove_cap() to remove the
+        * capability from the role. That is to say, that WP_Roles::remove_cap()
+        * implements the functionality, but it also makes sense to use this class,
+        * because you don't need to enter the role name.
         *
         * @since 2.0.0
         * @access public
@@ -96,7 +96,7 @@ class WP_Role {
         */
        public function has_cap( $cap ) {
                /**
-                * Filter which capabilities a role has.
+                * Filters which capabilities a role has.
                 *
                 * @since 2.0.0
                 *
index 94fc67261367a68479e35c03493e09ce25477d30..ff733e2206b3cb99bbd78e232e1249acbd0dfbec 100644 (file)
@@ -79,7 +79,7 @@ class WP_Roles {
        }
 
        /**
-        * Make private/protected methods readable for backwards compatibility.
+        * Make private/protected methods readable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
diff --git a/wp-includes/class-wp-site-query.php b/wp-includes/class-wp-site-query.php
new file mode 100644 (file)
index 0000000..cbffd66
--- /dev/null
@@ -0,0 +1,693 @@
+<?php
+/**
+ * Site API: WP_Site_Query class
+ *
+ * @package WordPress
+ * @subpackage Sites
+ * @since 4.6.0
+ */
+
+/**
+ * Core class used for querying sites.
+ *
+ * @since 4.6.0
+ *
+ * @see WP_Site_Query::__construct() for accepted arguments.
+ */
+class WP_Site_Query {
+
+       /**
+        * SQL for database query.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var string
+        */
+       public $request;
+
+       /**
+        * SQL query clauses.
+        *
+        * @since 4.6.0
+        * @access protected
+        * @var array
+        */
+       protected $sql_clauses = array(
+               'select'  => '',
+               'from'    => '',
+               'where'   => array(),
+               'groupby' => '',
+               'orderby' => '',
+               'limits'  => '',
+       );
+
+       /**
+        * Date query container.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var object WP_Date_Query
+        */
+       public $date_query = false;
+
+       /**
+        * Query vars set by the user.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var array
+        */
+       public $query_vars;
+
+       /**
+        * Default values for query vars.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var array
+        */
+       public $query_var_defaults;
+
+       /**
+        * List of sites located by the query.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var array
+        */
+       public $sites;
+
+       /**
+        * The amount of found sites for the current query.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var int
+        */
+       public $found_sites = 0;
+
+       /**
+        * The number of pages.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var int
+        */
+       public $max_num_pages = 0;
+
+       /**
+        * Sets up the site query, based on the query vars passed.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string|array $query {
+        *     Optional. Array or query string of site query parameters. Default empty.
+        *
+        *     @type array        $site__in          Array of site IDs to include. Default empty.
+        *     @type array        $site__not_in      Array of site IDs to exclude. Default empty.
+        *     @type bool         $count             Whether to return a site count (true) or array of site objects.
+        *                                           Default false.
+        *     @type array        $date_query        Date query clauses to limit sites by. See WP_Date_Query.
+        *                                           Default null.
+        *     @type string       $fields            Site fields to return. Accepts 'ids' (returns an array of site IDs)
+        *                                           or empty (returns an array of complete site objects). Default empty.
+        *     @type int          $ID                A site ID to only return that site. Default empty.
+        *     @type int          $number            Maximum number of sites to retrieve. Default null (no limit).
+        *     @type int          $offset            Number of sites to offset the query. Used to build LIMIT clause.
+        *                                           Default 0.
+        *     @type bool         $no_found_rows     Whether to disable the `SQL_CALC_FOUND_ROWS` query. Default true.
+        *     @type string|array $orderby           Site status or array of statuses. Accepts 'id', 'domain', 'path',
+        *                                           'network_id', 'last_updated', 'registered', 'domain_length',
+        *                                           'path_length', 'site__in' and 'network__in'. Also accepts false,
+        *                                           an empty array, or 'none' to disable `ORDER BY` clause.
+        *                                           Default 'id'.
+        *     @type string       $order             How to order retrieved sites. Accepts 'ASC', 'DESC'. Default 'ASC'.
+        *     @type int          $network_id        Limit results to those affiliated with a given network ID. If 0,
+        *                                           include all networks. Default 0.
+        *     @type array        $network__in       Array of network IDs to include affiliated sites for. Default empty.
+        *     @type array        $network__not_in   Array of network IDs to exclude affiliated sites for. Default empty.
+        *     @type string       $domain            Limit results to those affiliated with a given domain.
+        *                                           Default empty.
+        *     @type array        $domain__in        Array of domains to include affiliated sites for. Default empty.
+        *     @type array        $domain__not_in    Array of domains to exclude affiliated sites for. Default empty.
+        *     @type string       $path              Limit results to those affiliated with a given path.
+        *                                           Default empty.
+        *     @type array        $path__in          Array of paths to include affiliated sites for. Default empty.
+        *     @type array        $path__not_in      Array of paths to exclude affiliated sites for. Default empty.
+        *     @type int          $public            Limit results to public sites. Accepts '1' or '0'. Default empty.
+        *     @type int          $archived          Limit results to archived sites. Accepts '1' or '0'. Default empty.
+        *     @type int          $mature            Limit results to mature sites. Accepts '1' or '0'. Default empty.
+        *     @type int          $spam              Limit results to spam sites. Accepts '1' or '0'. Default empty.
+        *     @type int          $deleted           Limit results to deleted sites. Accepts '1' or '0'. Default empty.
+        *     @type string       $search            Search term(s) to retrieve matching sites for. Default empty.
+        *     @type array        $search_columns    Array of column names to be searched. Accepts 'domain' and 'path'.
+        *                                           Default empty array.
+        *     @type bool         $update_site_cache Whether to prime the cache for found sites. Default false.
+        * }
+        */
+       public function __construct( $query = '' ) {
+               $this->query_var_defaults = array(
+                       'fields'            => '',
+                       'ID'                => '',
+                       'site__in'          => '',
+                       'site__not_in'      => '',
+                       'number'            => 100,
+                       'offset'            => '',
+                       'no_found_rows'     => true,
+                       'orderby'           => 'id',
+                       'order'             => 'ASC',
+                       'network_id'        => 0,
+                       'network__in'       => '',
+                       'network__not_in'   => '',
+                       'domain'            => '',
+                       'domain__in'        => '',
+                       'domain__not_in'    => '',
+                       'path'              => '',
+                       'path__in'          => '',
+                       'path__not_in'      => '',
+                       'public'            => null,
+                       'archived'          => null,
+                       'mature'            => null,
+                       'spam'              => null,
+                       'deleted'           => null,
+                       'search'            => '',
+                       'search_columns'    => array(),
+                       'count'             => false,
+                       'date_query'        => null, // See WP_Date_Query
+                       'update_site_cache' => true,
+               );
+
+               if ( ! empty( $query ) ) {
+                       $this->query( $query );
+               }
+       }
+
+       /**
+        * Parses arguments passed to the site query with default query parameters.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @see WP_Site_Query::__construct()
+        *
+        * @param string|array $query Array or string of WP_Site_Query arguments. See WP_Site_Query::__construct().
+        */
+       public function parse_query( $query = '' ) {
+               if ( empty( $query ) ) {
+                       $query = $this->query_vars;
+               }
+
+               $this->query_vars = wp_parse_args( $query, $this->query_var_defaults );
+
+               /**
+                * Fires after the site query vars have been parsed.
+                *
+                * @since 4.6.0
+                *
+                * @param WP_Site_Query &$this The WP_Site_Query instance (passed by reference).
+                */
+               do_action_ref_array( 'parse_site_query', array( &$this ) );
+       }
+
+       /**
+        * Sets up the WordPress query for retrieving sites.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string|array $query Array or URL query string of parameters.
+        * @return array|int List of sites, or number of sites when 'count' is passed as a query var.
+        */
+       public function query( $query ) {
+               $this->query_vars = wp_parse_args( $query );
+
+               return $this->get_sites();
+       }
+
+       /**
+        * Retrieves a list of sites matching the query vars.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @return array|int List of sites, or number of sites when 'count' is passed as a query var.
+        */
+       public function get_sites() {
+               $this->parse_query();
+
+               /**
+                * Fires before sites are retrieved.
+                *
+                * @since 4.6.0
+                *
+                * @param WP_Site_Query &$this Current instance of WP_Site_Query, passed by reference.
+                */
+               do_action_ref_array( 'pre_get_sites', array( &$this ) );
+
+               // $args can include anything. Only use the args defined in the query_var_defaults to compute the key.
+               $key = md5( serialize( wp_array_slice_assoc( $this->query_vars, array_keys( $this->query_var_defaults ) ) ) );
+               $last_changed = wp_cache_get( 'last_changed', 'sites' );
+               if ( ! $last_changed ) {
+                       $last_changed = microtime();
+                       wp_cache_set( 'last_changed', $last_changed, 'sites' );
+               }
+
+               $cache_key = "get_sites:$key:$last_changed";
+               $cache_value = wp_cache_get( $cache_key, 'sites' );
+
+               if ( false === $cache_value ) {
+                       $site_ids = $this->get_site_ids();
+                       if ( $site_ids ) {
+                               $this->set_found_sites();
+                       }
+
+                       $cache_value = array(
+                               'site_ids' => $site_ids,
+                               'found_sites' => $this->found_sites,
+                       );
+                       wp_cache_add( $cache_key, $cache_value, 'sites' );
+               } else {
+                       $site_ids = $cache_value['site_ids'];
+                       $this->found_sites = $cache_value['found_sites'];
+               }
+
+               if ( $this->found_sites && $this->query_vars['number'] ) {
+                       $this->max_num_pages = ceil( $this->found_sites / $this->query_vars['number'] );
+               }
+
+               // If querying for a count only, there's nothing more to do.
+               if ( $this->query_vars['count'] ) {
+                       // $site_ids is actually a count in this case.
+                       return intval( $site_ids );
+               }
+
+               $site_ids = array_map( 'intval', $site_ids );
+
+               if ( 'ids' == $this->query_vars['fields'] ) {
+                       $this->sites = $site_ids;
+
+                       return $this->sites;
+               }
+
+               // Prime site network caches.
+               if ( $this->query_vars['update_site_cache'] ) {
+                       _prime_site_caches( $site_ids );
+               }
+
+               // Fetch full site objects from the primed cache.
+               $_sites = array();
+               foreach ( $site_ids as $site_id ) {
+                       if ( $_site = get_site( $site_id ) ) {
+                               $_sites[] = $_site;
+                       }
+               }
+
+               /**
+                * Filters the site query results.
+                *
+                * @since 4.6.0
+                *
+                * @param array         $results An array of sites.
+                * @param WP_Site_Query &$this   Current instance of WP_Site_Query, passed by reference.
+                */
+               $_sites = apply_filters_ref_array( 'the_sites', array( $_sites, &$this ) );
+
+               // Convert to WP_Site instances.
+               $this->sites = array_map( 'get_site', $_sites );
+
+               return $this->sites;
+       }
+
+       /**
+        * Used internally to get a list of site IDs matching the query vars.
+        *
+        * @since 4.6.0
+        * @access protected
+        *
+        * @global wpdb $wpdb WordPress database abstraction object.
+        *
+        * @return int|array A single count of site IDs if a count query. An array of site IDs if a full query.
+        */
+       protected function get_site_ids() {
+               global $wpdb;
+
+               $order = $this->parse_order( $this->query_vars['order'] );
+
+               // Disable ORDER BY with 'none', an empty array, or boolean false.
+               if ( in_array( $this->query_vars['orderby'], array( 'none', array(), false ), true ) ) {
+                       $orderby = '';
+               } elseif ( ! empty( $this->query_vars['orderby'] ) ) {
+                       $ordersby = is_array( $this->query_vars['orderby'] ) ?
+                               $this->query_vars['orderby'] :
+                               preg_split( '/[,\s]/', $this->query_vars['orderby'] );
+
+                       $orderby_array = array();
+                       foreach ( $ordersby as $_key => $_value ) {
+                               if ( ! $_value ) {
+                                       continue;
+                               }
+
+                               if ( is_int( $_key ) ) {
+                                       $_orderby = $_value;
+                                       $_order = $order;
+                               } else {
+                                       $_orderby = $_key;
+                                       $_order = $_value;
+                               }
+
+                               $parsed = $this->parse_orderby( $_orderby );
+
+                               if ( ! $parsed ) {
+                                       continue;
+                               }
+
+                               if ( 'site__in' === $_orderby || 'network__in' === $_orderby ) {
+                                       $orderby_array[] = $parsed;
+                                       continue;
+                               }
+
+                               $orderby_array[] = $parsed . ' ' . $this->parse_order( $_order );
+                       }
+
+                       $orderby = implode( ', ', $orderby_array );
+               } else {
+                       $orderby = "blog_id $order";
+               }
+
+               $number = absint( $this->query_vars['number'] );
+               $offset = absint( $this->query_vars['offset'] );
+
+               if ( ! empty( $number ) ) {
+                       if ( $offset ) {
+                               $limits = 'LIMIT ' . $offset . ',' . $number;
+                       } else {
+                               $limits = 'LIMIT ' . $number;
+                       }
+               }
+
+               if ( $this->query_vars['count'] ) {
+                       $fields = 'COUNT(*)';
+               } else {
+                       $fields = 'blog_id';
+               }
+
+               // Parse site IDs for an IN clause.
+               $site_id = absint( $this->query_vars['ID'] );
+               if ( ! empty( $site_id ) ) {
+                       $this->sql_clauses['where']['ID'] = $wpdb->prepare( 'blog_id = %d', $site_id );
+               }
+
+               // Parse site IDs for an IN clause.
+               if ( ! empty( $this->query_vars['site__in'] ) ) {
+                       $this->sql_clauses['where']['site__in'] = "blog_id IN ( " . implode( ',', wp_parse_id_list( $this->query_vars['site__in'] ) ) . ' )';
+               }
+
+               // Parse site IDs for a NOT IN clause.
+               if ( ! empty( $this->query_vars['site__not_in'] ) ) {
+                       $this->sql_clauses['where']['site__not_in'] = "blog_id NOT IN ( " . implode( ',', wp_parse_id_list( $this->query_vars['site__not_in'] ) ) . ' )';
+               }
+
+               $network_id = absint( $this->query_vars['network_id'] );
+
+               if ( ! empty( $network_id ) ) {
+                       $this->sql_clauses['where']['network_id'] = $wpdb->prepare( 'site_id = %d', $network_id );
+               }
+
+               // Parse site network IDs for an IN clause.
+               if ( ! empty( $this->query_vars['network__in'] ) ) {
+                       $this->sql_clauses['where']['network__in'] = 'site_id IN ( ' . implode( ',', wp_parse_id_list( $this->query_vars['network__in'] ) ) . ' )';
+               }
+
+               // Parse site network IDs for a NOT IN clause.
+               if ( ! empty( $this->query_vars['network__not_in'] ) ) {
+                       $this->sql_clauses['where']['network__not_in'] = 'site_id NOT IN ( ' . implode( ',', wp_parse_id_list( $this->query_vars['network__not_in'] ) ) . ' )';
+               }
+
+               if ( ! empty( $this->query_vars['domain'] ) ) {
+                       $this->sql_clauses['where']['domain'] = $wpdb->prepare( 'domain = %s', $this->query_vars['domain'] );
+               }
+
+               // Parse site domain for an IN clause.
+               if ( is_array( $this->query_vars['domain__in'] ) ) {
+                       $this->sql_clauses['where']['domain__in'] = "domain IN ( '" . implode( "', '", $wpdb->_escape( $this->query_vars['domain__in'] ) ) . "' )";
+               }
+
+               // Parse site domain for a NOT IN clause.
+               if ( is_array( $this->query_vars['domain__not_in'] ) ) {
+                       $this->sql_clauses['where']['domain__not_in'] = "domain NOT IN ( '" . implode( "', '", $wpdb->_escape( $this->query_vars['domain__not_in'] ) ) . "' )";
+               }
+
+               if ( ! empty( $this->query_vars['path'] ) ) {
+                       $this->sql_clauses['where']['path'] = $wpdb->prepare( 'path = %s', $this->query_vars['path'] );
+               }
+
+               // Parse site path for an IN clause.
+               if ( is_array( $this->query_vars['path__in'] ) ) {
+                       $this->sql_clauses['where']['path__in'] = "path IN ( '" . implode( "', '", $wpdb->_escape( $this->query_vars['path__in'] ) ) . "' )";
+               }
+
+               // Parse site path for a NOT IN clause.
+               if ( is_array( $this->query_vars['path__not_in'] ) ) {
+                       $this->sql_clauses['where']['path__not_in'] = "path NOT IN ( '" . implode( "', '", $wpdb->_escape( $this->query_vars['path__not_in'] ) ) . "' )";
+               }
+
+               if ( is_numeric( $this->query_vars['archived'] ) ) {
+                       $archived = absint( $this->query_vars['archived'] );
+                       $this->sql_clauses['where']['archived'] = $wpdb->prepare( "archived = %d ", $archived );
+               }
+
+               if ( is_numeric( $this->query_vars['mature'] ) ) {
+                       $mature = absint( $this->query_vars['mature'] );
+                       $this->sql_clauses['where']['mature'] = $wpdb->prepare( "mature = %d ", $mature );
+               }
+
+               if ( is_numeric( $this->query_vars['spam'] ) ) {
+                       $spam = absint( $this->query_vars['spam'] );
+                       $this->sql_clauses['where']['spam'] = $wpdb->prepare( "spam = %d ", $spam );
+               }
+
+               if ( is_numeric( $this->query_vars['deleted'] ) ) {
+                       $deleted = absint( $this->query_vars['deleted'] );
+                       $this->sql_clauses['where']['deleted'] = $wpdb->prepare( "deleted = %d ", $deleted );
+               }
+
+               if ( is_numeric( $this->query_vars['public'] ) ) {
+                       $public = absint( $this->query_vars['public'] );
+                       $this->sql_clauses['where']['public'] = $wpdb->prepare( "public = %d ", $public );
+               }
+
+               // Falsey search strings are ignored.
+               if ( strlen( $this->query_vars['search'] ) ) {
+                       $search_columns = array();
+
+                       if ( $this->query_vars['search_columns'] ) {
+                               $search_columns = array_intersect( $this->query_vars['search_columns'], array( 'domain', 'path' ) );
+                       }
+
+                       if ( ! $search_columns ) {
+                               $search_columns = array( 'domain', 'path' );
+                       }
+
+                       /**
+                        * Filters the columns to search in a WP_Site_Query search.
+                        *
+                        * The default columns include 'domain' and 'path.
+                        *
+                        * @since 4.6.0
+                        *
+                        * @param array         $search_columns Array of column names to be searched.
+                        * @param string        $search         Text being searched.
+                        * @param WP_Site_Query $this           The current WP_Site_Query instance.
+                        */
+                       $search_columns = apply_filters( 'site_search_columns', $search_columns, $this->query_vars['search'], $this );
+
+                       $this->sql_clauses['where']['search'] = $this->get_search_sql( $this->query_vars['search'], $search_columns );
+               }
+
+               $date_query = $this->query_vars['date_query'];
+               if ( ! empty( $date_query ) && is_array( $date_query ) ) {
+                       $this->date_query = new WP_Date_Query( $date_query, 'registered' );
+                       $this->sql_clauses['where']['date_query'] = preg_replace( '/^\s*AND\s*/', '', $this->date_query->get_sql() );
+               }
+
+               $where = implode( ' AND ', $this->sql_clauses['where'] );
+
+               $pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
+
+               /**
+                * Filters the site query clauses.
+                *
+                * @since 4.6.0
+                *
+                * @param array $pieces A compacted array of site query clauses.
+                * @param WP_Site_Query &$this Current instance of WP_Site_Query, passed by reference.
+                */
+               $clauses = apply_filters_ref_array( 'sites_clauses', array( compact( $pieces ), &$this ) );
+
+               $fields = isset( $clauses['fields'] ) ? $clauses['fields'] : '';
+               $join = isset( $clauses['join'] ) ? $clauses['join'] : '';
+               $where = isset( $clauses['where'] ) ? $clauses['where'] : '';
+               $orderby = isset( $clauses['orderby'] ) ? $clauses['orderby'] : '';
+               $limits = isset( $clauses['limits'] ) ? $clauses['limits'] : '';
+               $groupby = isset( $clauses['groupby'] ) ? $clauses['groupby'] : '';
+
+               if ( $where ) {
+                       $where = 'WHERE ' . $where;
+               }
+
+               if ( $groupby ) {
+                       $groupby = 'GROUP BY ' . $groupby;
+               }
+
+               if ( $orderby ) {
+                       $orderby = "ORDER BY $orderby";
+               }
+
+               $found_rows = '';
+               if ( ! $this->query_vars['no_found_rows'] ) {
+                       $found_rows = 'SQL_CALC_FOUND_ROWS';
+               }
+
+               $this->sql_clauses['select']  = "SELECT $found_rows $fields";
+               $this->sql_clauses['from']    = "FROM $wpdb->blogs $join";
+               $this->sql_clauses['groupby'] = $groupby;
+               $this->sql_clauses['orderby'] = $orderby;
+               $this->sql_clauses['limits']  = $limits;
+
+               $this->request = "{$this->sql_clauses['select']} {$this->sql_clauses['from']} {$where} {$this->sql_clauses['groupby']} {$this->sql_clauses['orderby']} {$this->sql_clauses['limits']}";
+
+               if ( $this->query_vars['count'] ) {
+                       return intval( $wpdb->get_var( $this->request ) );
+               }
+
+               $site_ids = $wpdb->get_col( $this->request );
+
+               return array_map( 'intval', $site_ids );
+       }
+
+       /**
+        * Populates found_sites and max_num_pages properties for the current query
+        * if the limit clause was used.
+        *
+        * @since 4.6.0
+        * @access private
+        *
+        * @global wpdb $wpdb WordPress database abstraction object.
+        */
+       private function set_found_sites() {
+               global $wpdb;
+
+               if ( $this->query_vars['number'] && ! $this->query_vars['no_found_rows'] ) {
+                       /**
+                        * Filters the query used to retrieve found site count.
+                        *
+                        * @since 4.6.0
+                        *
+                        * @param string        $found_sites_query SQL query. Default 'SELECT FOUND_ROWS()'.
+                        * @param WP_Site_Query $site_query        The `WP_Site_Query` instance.
+                        */
+                       $found_sites_query = apply_filters( 'found_sites_query', 'SELECT FOUND_ROWS()', $this );
+
+                       $this->found_sites = (int) $wpdb->get_var( $found_sites_query );
+               }
+       }
+
+       /**
+        * Used internally to generate an SQL string for searching across multiple columns.
+        *
+        * @since 4.6.0
+        * @access protected
+        *
+        * @global wpdb  $wpdb WordPress database abstraction object.
+        *
+        * @param string $string  Search string.
+        * @param array  $columns Columns to search.
+        * @return string Search SQL.
+        */
+       protected function get_search_sql( $string, $columns ) {
+               global $wpdb;
+
+               if ( false !== strpos( $string, '*' ) ) {
+                       $like = '%' . implode( '%', array_map( array( $wpdb, 'esc_like' ), explode( '*', $string ) ) ) . '%';
+               } else {
+                       $like = '%' . $wpdb->esc_like( $string ) . '%';
+               }
+
+               $searches = array();
+               foreach ( $columns as $column ) {
+                       $searches[] = $wpdb->prepare( "$column LIKE %s", $like );
+               }
+
+               return '(' . implode( ' OR ', $searches ) . ')';
+       }
+
+       /**
+        * Parses and sanitizes 'orderby' keys passed to the site query.
+        *
+        * @since 4.6.0
+        * @access protected
+        *
+        * @global wpdb $wpdb WordPress database abstraction object.
+        *
+        * @param string $orderby Alias for the field to order by.
+        * @return string|false Value to used in the ORDER clause. False otherwise.
+        */
+       protected function parse_orderby( $orderby ) {
+               global $wpdb;
+
+               $parsed = false;
+
+               switch ( $orderby ) {
+                       case 'site__in':
+                               $site__in = implode( ',', array_map( 'absint', $this->query_vars['site__in'] ) );
+                               $parsed = "FIELD( {$wpdb->blogs}.blog_id, $site__in )";
+                               break;
+                       case 'network__in':
+                               $network__in = implode( ',', array_map( 'absint', $this->query_vars['network__in'] ) );
+                               $parsed = "FIELD( {$wpdb->blogs}.site_id, $network__in )";
+                               break;
+                       case 'domain':
+                       case 'last_updated':
+                       case 'path':
+                       case 'registered':
+                               $parsed = $orderby;
+                               break;
+                       case 'network_id':
+                               $parsed = 'site_id';
+                               break;
+                       case 'domain_length':
+                               $parsed = 'CHAR_LENGTH(domain)';
+                               break;
+                       case 'path_length':
+                               $parsed = 'CHAR_LENGTH(path)';
+                               break;
+                       case 'id':
+                               $parsed = 'blog_id';
+                               break;
+               }
+
+               return $parsed;
+       }
+
+       /**
+        * Parses an 'order' query variable and cast it to 'ASC' or 'DESC' as necessary.
+        *
+        * @since 4.6.0
+        * @access protected
+        *
+        * @param string $order The 'order' query variable.
+        * @return string The sanitized 'order' query variable.
+        */
+       protected function parse_order( $order ) {
+               if ( ! is_string( $order ) || empty( $order ) ) {
+                       return 'ASC';
+               }
+
+               if ( 'ASC' === strtoupper( $order ) ) {
+                       return 'ASC';
+               } else {
+                       return 'DESC';
+               }
+       }
+}
index 5de6b9f2ca54ee26c4e30496a7862a37974a391c..a250c8d0496e4230ca6969f652e78997a40cac52 100644 (file)
@@ -14,6 +14,9 @@
  * setup the current site.
  *
  * @since 4.5.0
+ *
+ * @property int $id
+ * @property int $network_id
  */
 final class WP_Site {
 
@@ -198,4 +201,156 @@ final class WP_Site {
                        $this->$key = $value;
                }
        }
+
+       /**
+        * Converts an object to array.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @return array Object as array.
+        */
+       public function to_array() {
+               return get_object_vars( $this );
+       }
+
+       /**
+        * Getter.
+        *
+        * Allows current multisite naming conventions when getting properties.
+        * Allows access to extended site properties.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string $key Property to get.
+        * @return mixed Value of the property. Null if not available.
+        */
+       public function __get( $key ) {
+               switch ( $key ) {
+                       case 'id':
+                               return (int) $this->blog_id;
+                       case 'network_id':
+                               return (int) $this->site_id;
+                       case 'blogname':
+                       case 'siteurl':
+                       case 'post_count':
+                       case 'home':
+                               if ( ! did_action( 'ms_loaded' ) ) {
+                                       return null;
+                               }
+                               $details = $this->get_details();
+                               return $details->$key;
+               }
+
+               return null;
+       }
+
+       /**
+        * Isset-er.
+        *
+        * Allows current multisite naming conventions when checking for properties.
+        * Checks for extended site properties.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string $key Property to check if set.
+        * @return bool Whether the property is set.
+        */
+       public function __isset( $key ) {
+               switch ( $key ) {
+                       case 'id':
+                       case 'network_id':
+                               return true;
+                       case 'blogname':
+                       case 'siteurl':
+                       case 'post_count':
+                       case 'home':
+                               if ( ! did_action( 'ms_loaded' ) ) {
+                                       return false;
+                               }
+                               return true;
+               }
+
+               return false;
+       }
+
+       /**
+        * Setter.
+        *
+        * Allows current multisite naming conventions while setting properties.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string $key   Property to set.
+        * @param mixed  $value Value to assign to the property.
+        */
+       public function __set( $key, $value ) {
+               switch ( $key ) {
+                       case 'id':
+                               $this->blog_id = (string) $value;
+                               break;
+                       case 'network_id':
+                               $this->site_id = (string) $value;
+                               break;
+                       default:
+                               $this->$key = $value;
+               }
+       }
+
+       /**
+        * Retrieves the details for this site.
+        *
+        * This method is used internally to lazy-load the extended properties of a site.
+        *
+        * @since 4.6.0
+        * @access private
+        *
+        * @see WP_Site::__get()
+        *
+        * @return object A raw site object with all details included.
+        */
+       private function get_details() {
+               $details = wp_cache_get( $this->blog_id, 'site-details' );
+
+               if ( false === $details ) {
+
+                       switch_to_blog( $this->blog_id );
+                       // Create a raw copy of the object for backwards compatibility with the filter below.
+                       $details = new stdClass();
+                       foreach ( get_object_vars( $this ) as $key => $value ) {
+                               $details->$key = $value;
+                       }
+                       $details->blogname   = get_option( 'blogname' );
+                       $details->siteurl    = get_option( 'siteurl' );
+                       $details->post_count = get_option( 'post_count' );
+                       $details->home       = get_option( 'home' );
+                       restore_current_blog();
+
+                       $cache_details = true;
+                       foreach ( array( 'blogname', 'siteurl', 'post_count', 'home' ) as $field ) {
+                               if ( false === $details->$field ) {
+                                       $cache_details = false;
+                                       break;
+                               }
+                       }
+
+                       if ( $cache_details ) {
+                               wp_cache_set( $this->blog_id, $details, 'site-details' );
+                       }
+               }
+
+               /**
+                * Filters a site's extended properties.
+                *
+                * @since 4.6.0
+                *
+                * @param object $details The site details.
+                */
+               $details = apply_filters( 'site_details', $details );
+
+               return $details;
+       }
 }
index a842b2c3fec58b457081fc27e24cd740028a1032..9bff196f28e115c3c09c4f4ac4693284e3b738f2 100644 (file)
@@ -24,7 +24,7 @@ class WP_Tax_Query {
        /**
         * Array of taxonomy queries.
         *
-        * See {@see WP_Tax_Query::__construct()} for information on tax query arguments.
+        * See WP_Tax_Query::__construct() for information on tax query arguments.
         *
         * @since 3.1.0
         * @access public
@@ -440,7 +440,7 @@ class WP_Tax_Query {
                                // Store the alias with this clause, so later siblings can use it.
                                $clause['alias'] = $alias;
 
-                               $join .= " INNER JOIN $wpdb->term_relationships";
+                               $join .= " LEFT JOIN $wpdb->term_relationships";
                                $join .= $i ? " AS $alias" : '';
                                $join .= " ON ($this->primary_table.$this->primary_id_column = $alias.object_id)";
                        }
@@ -562,14 +562,14 @@ class WP_Tax_Query {
        private function clean_query( &$query ) {
                if ( empty( $query['taxonomy'] ) ) {
                        if ( 'term_taxonomy_id' !== $query['field'] ) {
-                               $query = new WP_Error( 'Invalid taxonomy' );
+                               $query = new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
                                return;
                        }
 
                        // so long as there are shared terms, include_children requires that a taxonomy is set
                        $query['include_children'] = false;
                } elseif ( ! taxonomy_exists( $query['taxonomy'] ) ) {
-                       $query = new WP_Error( 'Invalid taxonomy' );
+                       $query = new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
                        return;
                }
 
@@ -655,7 +655,7 @@ class WP_Tax_Query {
                }
 
                if ( 'AND' == $query['operator'] && count( $terms ) < count( $query['terms'] ) ) {
-                       $query = new WP_Error( 'Inexistent terms' );
+                       $query = new WP_Error( 'inexistent_terms', __( 'Inexistent terms.' ) );
                        return;
                }
 
diff --git a/wp-includes/class-wp-term-query.php b/wp-includes/class-wp-term-query.php
new file mode 100644 (file)
index 0000000..38977f4
--- /dev/null
@@ -0,0 +1,909 @@
+<?php
+
+/**
+ * Taxonomy API: WP_Term_Query class.
+ *
+ * @package WordPress
+ * @subpackage Taxonomy
+ * @since 4.6.0
+ */
+
+/**
+ * Class used for querying terms.
+ *
+ * @since 4.6.0
+ *
+ * @see WP_Term_Query::__construct() for accepted arguments.
+ */
+class WP_Term_Query {
+
+       /**
+        * SQL string used to perform database query.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var string
+        */
+       public $request;
+
+       /**
+        * Metadata query container.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var object WP_Meta_Query
+        */
+       public $meta_query = false;
+
+       /**
+        * Metadata query clauses.
+        *
+        * @since 4.6.0
+        * @access protected
+        * @var array
+        */
+       protected $meta_query_clauses;
+
+       /**
+        * SQL query clauses.
+        *
+        * @since 4.6.0
+        * @access protected
+        * @var array
+        */
+       protected $sql_clauses = array(
+               'select'  => '',
+               'from'    => '',
+               'where'   => array(),
+               'orderby' => '',
+               'limits'  => '',
+       );
+
+       /**
+        * Query vars set by the user.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var array
+        */
+       public $query_vars;
+
+       /**
+        * Default values for query vars.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var array
+        */
+       public $query_var_defaults;
+
+       /**
+        * List of terms located by the query.
+        *
+        * @since 4.6.0
+        * @access public
+        * @var array
+        */
+       public $terms;
+
+       /**
+        * Constructor.
+        *
+        * Sets up the term query, based on the query vars passed.
+        *
+        * @since 4.6.0
+        * @since 4.6.0 Introduced 'term_taxonomy_id' parameter.
+        * @access public
+        *
+        * @param string|array $query {
+        *     Optional. Array or query string of term query parameters. Default empty.
+        *
+        *     @type string|array $taxonomy               Taxonomy name, or array of taxonomies, to which results should
+        *                                                be limited.
+        *     @type string       $orderby                Field(s) to order terms by. Accepts term fields ('name',
+        *                                                'slug', 'term_group', 'term_id', 'id', 'description'),
+        *                                                'count' for term taxonomy count, 'include' to match the
+        *                                                'order' of the $include param, 'meta_value', 'meta_value_num',
+        *                                                the value of `$meta_key`, the array keys of `$meta_query`, or
+        *                                                'none' to omit the ORDER BY clause. Defaults to 'name'.
+        *     @type string       $order                  Whether to order terms in ascending or descending order.
+        *                                                Accepts 'ASC' (ascending) or 'DESC' (descending).
+        *                                                Default 'ASC'.
+        *     @type bool|int     $hide_empty             Whether to hide terms not assigned to any posts. Accepts
+        *                                                1|true or 0|false. Default 1|true.
+        *     @type array|string $include                Array or comma/space-separated string of term ids to include.
+        *                                                Default empty array.
+        *     @type array|string $exclude                Array or comma/space-separated string of term ids to exclude.
+        *                                                If $include is non-empty, $exclude is ignored.
+        *                                                Default empty array.
+        *     @type array|string $exclude_tree           Array or comma/space-separated string of term ids to exclude
+        *                                                along with all of their descendant terms. If $include is
+        *                                                non-empty, $exclude_tree is ignored. Default empty array.
+        *     @type int|string   $number                 Maximum number of terms to return. Accepts ''|0 (all) or any
+        *                                                positive number. Default ''|0 (all).
+        *     @type int          $offset                 The number by which to offset the terms query. Default empty.
+        *     @type string       $fields                 Term fields to query for. Accepts 'all' (returns an array of
+        *                                                complete term objects), 'ids' (returns an array of ids),
+        *                                                'id=>parent' (returns an associative array with ids as keys,
+        *                                                parent term IDs as values), 'names' (returns an array of term
+        *                                                names), 'count' (returns the number of matching terms),
+        *                                                'id=>name' (returns an associative array with ids as keys,
+        *                                                term names as values), or 'id=>slug' (returns an associative
+        *                                                array with ids as keys, term slugs as values). Default 'all'.
+        *     @type bool         $count                  Whether to return a term count (true) or array of term objects
+        *                                                (false). Will take precedence over `$fields` if true.
+        *                                                Default false.
+        *     @type string|array $name                   Optional. Name or array of names to return term(s) for.
+        *                                                Default empty.
+        *     @type string|array $slug                   Optional. Slug or array of slugs to return term(s) for.
+        *                                                Default empty.
+        *     @type int|array    $term_taxonomy_id       Optional. Term taxonomy ID, or array of term taxonomy IDs,
+        *                                                to match when querying terms.
+        *     @type bool         $hierarchical           Whether to include terms that have non-empty descendants (even
+        *                                                if $hide_empty is set to true). Default true.
+        *     @type string       $search                 Search criteria to match terms. Will be SQL-formatted with
+        *                                                wildcards before and after. Default empty.
+        *     @type string       $name__like             Retrieve terms with criteria by which a term is LIKE
+        *                                                `$name__like`. Default empty.
+        *     @type string       $description__like      Retrieve terms where the description is LIKE
+        *                                                `$description__like`. Default empty.
+        *     @type bool         $pad_counts             Whether to pad the quantity of a term's children in the
+        *                                                quantity of each term's "count" object variable.
+        *                                                Default false.
+        *     @type string       $get                    Whether to return terms regardless of ancestry or whether the
+        *                                                terms are empty. Accepts 'all' or empty (disabled).
+        *                                                Default empty.
+        *     @type int          $child_of               Term ID to retrieve child terms of. If multiple taxonomies
+        *                                                are passed, $child_of is ignored. Default 0.
+        *     @type int|string   $parent                 Parent term ID to retrieve direct-child terms of.
+        *                                                Default empty.
+        *     @type bool         $childless              True to limit results to terms that have no children.
+        *                                                This parameter has no effect on non-hierarchical taxonomies.
+        *                                                Default false.
+        *     @type string       $cache_domain           Unique cache key to be produced when this query is stored in
+        *                                                an object cache. Default is 'core'.
+        *     @type bool         $update_term_meta_cache Whether to prime meta caches for matched terms. Default true.
+        *     @type array        $meta_query             Optional. Meta query clauses to limit retrieved terms by.
+        *                                                See `WP_Meta_Query`. Default empty.
+        *     @type string       $meta_key               Limit terms to those matching a specific metadata key.
+        *                                                Can be used in conjunction with `$meta_value`.
+        *     @type string       $meta_value             Limit terms to those matching a specific metadata value.
+        *                                                Usually used in conjunction with `$meta_key`.
+        * }
+        */
+       public function __construct( $query = '' ) {
+               $this->query_var_defaults = array(
+                       'taxonomy'               => null,
+                       'orderby'                => 'name',
+                       'order'                  => 'ASC',
+                       'hide_empty'             => true,
+                       'include'                => array(),
+                       'exclude'                => array(),
+                       'exclude_tree'           => array(),
+                       'number'                 => '',
+                       'offset'                 => '',
+                       'fields'                 => 'all',
+                       'count'                  => false,
+                       'name'                   => '',
+                       'slug'                   => '',
+                       'term_taxonomy_id'       => '',
+                       'hierarchical'           => true,
+                       'search'                 => '',
+                       'name__like'             => '',
+                       'description__like'      => '',
+                       'pad_counts'             => false,
+                       'get'                    => '',
+                       'child_of'               => 0,
+                       'parent'                 => '',
+                       'childless'              => false,
+                       'cache_domain'           => 'core',
+                       'update_term_meta_cache' => true,
+                       'meta_query'             => '',
+               );
+
+               if ( ! empty( $query ) ) {
+                       $this->query( $query );
+               }
+       }
+
+       /**
+        * Parse arguments passed to the term query with default query parameters.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string|array $query WP_Term_Query arguments. See WP_Term_Query::__construct()
+        */
+       public function parse_query( $query = '' ) {
+               if ( empty( $query ) ) {
+                       $query = $this->query_vars;
+               }
+
+               $taxonomies = isset( $query['taxonomy'] ) ? (array) $query['taxonomy'] : null;
+
+               /**
+                * Filters the terms query default arguments.
+                *
+                * Use {@see 'get_terms_args'} to filter the passed arguments.
+                *
+                * @since 4.4.0
+                *
+                * @param array $defaults   An array of default get_terms() arguments.
+                * @param array $taxonomies An array of taxonomies.
+                */
+               $this->query_var_defaults = apply_filters( 'get_terms_defaults', $this->query_var_defaults, $taxonomies );
+
+               $query = wp_parse_args( $query, $this->query_var_defaults );
+
+               $query['number'] = absint( $query['number'] );
+               $query['offset'] = absint( $query['offset'] );
+
+               // 'parent' overrides 'child_of'.
+               if ( 0 < intval( $query['parent'] ) ) {
+                       $query['child_of'] = false;
+               }
+
+               if ( 'all' == $query['get'] ) {
+                       $query['childless'] = false;
+                       $query['child_of'] = 0;
+                       $query['hide_empty'] = 0;
+                       $query['hierarchical'] = false;
+                       $query['pad_counts'] = false;
+               }
+
+               $query['taxonomy'] = $taxonomies;
+
+               /**
+                * Filters the terms query arguments.
+                *
+                * @since 3.1.0
+                *
+                * @param array $args       An array of get_terms() arguments.
+                * @param array $taxonomies An array of taxonomies.
+                */
+               $this->query_vars = apply_filters( 'get_terms_args', $query, $taxonomies );
+
+               /**
+                * Fires after term query vars have been parsed.
+                *
+                * @since 4.6.0
+                *
+                * @param WP_Term_Query $this Current instance of WP_Term_Query.
+                */
+               do_action( 'parse_term_query', $this );
+       }
+
+       /**
+        * Sets up the query for retrieving terms.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string|array $query Array or URL query string of parameters.
+        * @return array|int List of terms, or number of terms when 'count' is passed as a query var.
+        */
+       public function query( $query ) {
+               $this->query_vars = wp_parse_args( $query );
+               return $this->get_terms();
+       }
+
+       /**
+        * Get terms, based on query_vars.
+        *
+        * @param 4.6.0
+        * @access public
+        *
+        * @global wpdb $wpdb WordPress database abstraction object.
+        *
+        * @return array
+        */
+       public function get_terms() {
+               global $wpdb;
+
+               $this->parse_query( $this->query_vars );
+               $args = $this->query_vars;
+
+               // Set up meta_query so it's available to 'pre_get_terms'.
+               $this->meta_query = new WP_Meta_Query();
+               $this->meta_query->parse_query_vars( $args );
+
+               /**
+                * Fires before terms are retrieved.
+                *
+                * @since 4.6.0
+                *
+                * @param WP_Term_Query $this Current instance of WP_Term_Query.
+                */
+               do_action( 'pre_get_terms', $this );
+
+               $taxonomies = $args['taxonomy'];
+
+               // Save queries by not crawling the tree in the case of multiple taxes or a flat tax.
+               $has_hierarchical_tax = false;
+               if ( $taxonomies ) {
+                       foreach ( $taxonomies as $_tax ) {
+                               if ( is_taxonomy_hierarchical( $_tax ) ) {
+                                       $has_hierarchical_tax = true;
+                               }
+                       }
+               }
+
+               if ( ! $has_hierarchical_tax ) {
+                       $args['hierarchical'] = false;
+                       $args['pad_counts'] = false;
+               }
+
+               // 'parent' overrides 'child_of'.
+               if ( 0 < intval( $args['parent'] ) ) {
+                       $args['child_of'] = false;
+               }
+
+               if ( 'all' == $args['get'] ) {
+                       $args['childless'] = false;
+                       $args['child_of'] = 0;
+                       $args['hide_empty'] = 0;
+                       $args['hierarchical'] = false;
+                       $args['pad_counts'] = false;
+               }
+
+               /**
+                * Filters the terms query arguments.
+                *
+                * @since 3.1.0
+                *
+                * @param array $args       An array of get_terms() arguments.
+                * @param array $taxonomies An array of taxonomies.
+                */
+               $args = apply_filters( 'get_terms_args', $args, $taxonomies );
+
+               // Avoid the query if the queried parent/child_of term has no descendants.
+               $child_of = $args['child_of'];
+               $parent   = $args['parent'];
+
+               if ( $child_of ) {
+                       $_parent = $child_of;
+               } elseif ( $parent ) {
+                       $_parent = $parent;
+               } else {
+                       $_parent = false;
+               }
+
+               if ( $_parent ) {
+                       $in_hierarchy = false;
+                       foreach ( $taxonomies as $_tax ) {
+                               $hierarchy = _get_term_hierarchy( $_tax );
+
+                               if ( isset( $hierarchy[ $_parent ] ) ) {
+                                       $in_hierarchy = true;
+                               }
+                       }
+
+                       if ( ! $in_hierarchy ) {
+                               return array();
+                       }
+               }
+
+               $orderby = $this->parse_orderby( $this->query_vars['orderby'] );
+               if ( $orderby ) {
+                       $orderby = "ORDER BY $orderby";
+               }
+
+               $order = $this->parse_order( $this->query_vars['order'] );
+
+               if ( $taxonomies ) {
+                       $this->sql_clauses['where']['taxonomy'] = "tt.taxonomy IN ('" . implode( "', '", array_map( 'esc_sql', $taxonomies ) ) . "')";
+               }
+
+               $exclude      = $args['exclude'];
+               $exclude_tree = $args['exclude_tree'];
+               $include      = $args['include'];
+
+               $inclusions = '';
+               if ( ! empty( $include ) ) {
+                       $exclude = '';
+                       $exclude_tree = '';
+                       $inclusions = implode( ',', wp_parse_id_list( $include ) );
+               }
+
+               if ( ! empty( $inclusions ) ) {
+                       $this->sql_clauses['where']['inclusions'] = 't.term_id IN ( ' . $inclusions . ' )';
+               }
+
+               $exclusions = array();
+               if ( ! empty( $exclude_tree ) ) {
+                       $exclude_tree = wp_parse_id_list( $exclude_tree );
+                       $excluded_children = $exclude_tree;
+                       foreach ( $exclude_tree as $extrunk ) {
+                               $excluded_children = array_merge(
+                                       $excluded_children,
+                                       (array) get_terms( $taxonomies[0], array(
+                                               'child_of' => intval( $extrunk ),
+                                               'fields' => 'ids',
+                                               'hide_empty' => 0
+                                       ) )
+                               );
+                       }
+                       $exclusions = array_merge( $excluded_children, $exclusions );
+               }
+
+               if ( ! empty( $exclude ) ) {
+                       $exclusions = array_merge( wp_parse_id_list( $exclude ), $exclusions );
+               }
+
+               // 'childless' terms are those without an entry in the flattened term hierarchy.
+               $childless = (bool) $args['childless'];
+               if ( $childless ) {
+                       foreach ( $taxonomies as $_tax ) {
+                               $term_hierarchy = _get_term_hierarchy( $_tax );
+                               $exclusions = array_merge( array_keys( $term_hierarchy ), $exclusions );
+                       }
+               }
+
+               if ( ! empty( $exclusions ) ) {
+                       $exclusions = 't.term_id NOT IN (' . implode( ',', array_map( 'intval', $exclusions ) ) . ')';
+               } else {
+                       $exclusions = '';
+               }
+
+               /**
+                * Filters the terms to exclude from the terms query.
+                *
+                * @since 2.3.0
+                *
+                * @param string $exclusions `NOT IN` clause of the terms query.
+                * @param array  $args       An array of terms query arguments.
+                * @param array  $taxonomies An array of taxonomies.
+                */
+               $exclusions = apply_filters( 'list_terms_exclusions', $exclusions, $args, $taxonomies );
+
+               if ( ! empty( $exclusions ) ) {
+                       // Must do string manipulation here for backward compatibility with filter.
+                       $this->sql_clauses['where']['exclusions'] = preg_replace( '/^\s*AND\s*/', '', $exclusions );
+               }
+
+               if ( ! empty( $args['name'] ) ) {
+                       $names = (array) $args['name'];
+                       foreach ( $names as &$_name ) {
+                               // `sanitize_term_field()` returns slashed data.
+                               $_name = stripslashes( sanitize_term_field( 'name', $_name, 0, reset( $taxonomies ), 'db' ) );
+                       }
+
+                       $this->sql_clauses['where']['name'] = "t.name IN ('" . implode( "', '", array_map( 'esc_sql', $names ) ) . "')";
+               }
+
+               if ( ! empty( $args['slug'] ) ) {
+                       if ( is_array( $args['slug'] ) ) {
+                               $slug = array_map( 'sanitize_title', $args['slug'] );
+                               $this->sql_clauses['where']['slug'] = "t.slug IN ('" . implode( "', '", $slug ) . "')";
+                       } else {
+                               $slug = sanitize_title( $args['slug'] );
+                               $this->sql_clauses['where']['slug'] = "t.slug = '$slug'";
+                       }
+               }
+
+               if ( ! empty( $args['term_taxonomy_id'] ) ) {
+                       if ( is_array( $args['term_taxonomy_id'] ) ) {
+                               $tt_ids = implode( ',', array_map( 'intval', $args['term_taxonomy_id'] ) );
+                               $this->sql_clauses['where']['term_taxonomy_id'] = "tt.term_taxonomy_id IN ({$tt_ids})";
+                       } else {
+                               $this->sql_clauses['where']['term_taxonomy_id'] = $wpdb->prepare( "tt.term_taxonomy_id = %d", $args['term_taxonomy_id'] );
+                       }
+               }
+
+               if ( ! empty( $args['name__like'] ) ) {
+                       $this->sql_clauses['where']['name__like'] = $wpdb->prepare( "t.name LIKE %s", '%' . $wpdb->esc_like( $args['name__like'] ) . '%' );
+               }
+
+               if ( ! empty( $args['description__like'] ) ) {
+                       $this->sql_clauses['where']['description__like'] = $wpdb->prepare( "tt.description LIKE %s", '%' . $wpdb->esc_like( $args['description__like'] ) . '%' );
+               }
+
+               if ( '' !== $parent ) {
+                       $parent = (int) $parent;
+                       $this->sql_clauses['where']['parent'] = "tt.parent = '$parent'";
+               }
+
+               $hierarchical = $args['hierarchical'];
+               if ( 'count' == $args['fields'] ) {
+                       $hierarchical = false;
+               }
+               if ( $args['hide_empty'] && !$hierarchical ) {
+                       $this->sql_clauses['where']['count'] = 'tt.count > 0';
+               }
+
+               $number = $args['number'];
+               $offset = $args['offset'];
+
+               // Don't limit the query results when we have to descend the family tree.
+               if ( $number && ! $hierarchical && ! $child_of && '' === $parent ) {
+                       if ( $offset ) {
+                               $limits = 'LIMIT ' . $offset . ',' . $number;
+                       } else {
+                               $limits = 'LIMIT ' . $number;
+                       }
+               } else {
+                       $limits = '';
+               }
+
+
+               if ( ! empty( $args['search'] ) ) {
+                       $this->sql_clauses['where']['search'] = $this->get_search_sql( $args['search'] );
+               }
+
+               // Meta query support.
+               $join = '';
+               $distinct = '';
+
+               // Reparse meta_query query_vars, in case they were modified in a 'pre_get_terms' callback.
+               $this->meta_query->parse_query_vars( $this->query_vars );
+               $mq_sql = $this->meta_query->get_sql( 'term', 't', 'term_id' );
+               $meta_clauses = $this->meta_query->get_clauses();
+
+               if ( ! empty( $meta_clauses ) ) {
+                       $join .= $mq_sql['join'];
+                       $this->sql_clauses['where']['meta_query'] = preg_replace( '/^\s*AND\s*/', '', $mq_sql['where'] );
+                       $distinct .= "DISTINCT";
+
+               }
+
+               $selects = array();
+               switch ( $args['fields'] ) {
+                       case 'all':
+                               $selects = array( 't.*', 'tt.*' );
+                               break;
+                       case 'ids':
+                       case 'id=>parent':
+                               $selects = array( 't.term_id', 'tt.parent', 'tt.count', 'tt.taxonomy' );
+                               break;
+                       case 'names':
+                               $selects = array( 't.term_id', 'tt.parent', 'tt.count', 't.name', 'tt.taxonomy' );
+                               break;
+                       case 'count':
+                               $orderby = '';
+                               $order = '';
+                               $selects = array( 'COUNT(*)' );
+                               break;
+                       case 'id=>name':
+                               $selects = array( 't.term_id', 't.name', 'tt.count', 'tt.taxonomy' );
+                               break;
+                       case 'id=>slug':
+                               $selects = array( 't.term_id', 't.slug', 'tt.count', 'tt.taxonomy' );
+                               break;
+               }
+
+               $_fields = $args['fields'];
+
+               /**
+                * Filters the fields to select in the terms query.
+                *
+                * Field lists modified using this filter will only modify the term fields returned
+                * by the function when the `$fields` parameter set to 'count' or 'all'. In all other
+                * cases, the term fields in the results array will be determined by the `$fields`
+                * parameter alone.
+                *
+                * Use of this filter can result in unpredictable behavior, and is not recommended.
+                *
+                * @since 2.8.0
+                *
+                * @param array $selects    An array of fields to select for the terms query.
+                * @param array $args       An array of term query arguments.
+                * @param array $taxonomies An array of taxonomies.
+                */
+               $fields = implode( ', ', apply_filters( 'get_terms_fields', $selects, $args, $taxonomies ) );
+
+               $join .= " INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id";
+
+               $where = implode( ' AND ', $this->sql_clauses['where'] );
+
+               $pieces = array( 'fields', 'join', 'where', 'distinct', 'orderby', 'order', 'limits' );
+
+               /**
+                * Filters the terms query SQL clauses.
+                *
+                * @since 3.1.0
+                *
+                * @param array $pieces     Terms query SQL clauses.
+                * @param array $taxonomies An array of taxonomies.
+                * @param array $args       An array of terms query arguments.
+                */
+               $clauses = apply_filters( 'terms_clauses', compact( $pieces ), $taxonomies, $args );
+
+               $fields = isset( $clauses[ 'fields' ] ) ? $clauses[ 'fields' ] : '';
+               $join = isset( $clauses[ 'join' ] ) ? $clauses[ 'join' ] : '';
+               $where = isset( $clauses[ 'where' ] ) ? $clauses[ 'where' ] : '';
+               $distinct = isset( $clauses[ 'distinct' ] ) ? $clauses[ 'distinct' ] : '';
+               $orderby = isset( $clauses[ 'orderby' ] ) ? $clauses[ 'orderby' ] : '';
+               $order = isset( $clauses[ 'order' ] ) ? $clauses[ 'order' ] : '';
+               $limits = isset( $clauses[ 'limits' ] ) ? $clauses[ 'limits' ] : '';
+
+               if ( $where ) {
+                       $where = "WHERE $where";
+               }
+
+               $this->sql_clauses['select']  = "SELECT $distinct $fields";
+               $this->sql_clauses['from']    = "FROM $wpdb->terms AS t $join";
+               $this->sql_clauses['orderby'] = $orderby ? "$orderby $order" : '';
+               $this->sql_clauses['limits']  = $limits;
+
+               $this->request = "{$this->sql_clauses['select']} {$this->sql_clauses['from']} {$where} {$this->sql_clauses['orderby']} {$this->sql_clauses['limits']}";
+
+               // $args can be anything. Only use the args defined in defaults to compute the key.
+               $key = md5( serialize( wp_array_slice_assoc( $args, array_keys( $this->query_var_defaults ) ) ) . serialize( $taxonomies ) . $this->request );
+               $last_changed = wp_cache_get( 'last_changed', 'terms' );
+               if ( ! $last_changed ) {
+                       $last_changed = microtime();
+                       wp_cache_set( 'last_changed', $last_changed, 'terms' );
+               }
+               $cache_key = "get_terms:$key:$last_changed";
+               $cache = wp_cache_get( $cache_key, 'terms' );
+               if ( false !== $cache ) {
+                       if ( 'all' === $_fields ) {
+                               $cache = array_map( 'get_term', $cache );
+                       }
+
+                       $this->terms = $cache;
+                       return $this->terms;
+               }
+
+               if ( 'count' == $_fields ) {
+                       return $wpdb->get_var( $this->request );
+               }
+
+               $terms = $wpdb->get_results( $this->request );
+               if ( 'all' == $_fields ) {
+                       update_term_cache( $terms );
+               }
+
+               // Prime termmeta cache.
+               if ( $args['update_term_meta_cache'] ) {
+                       $term_ids = wp_list_pluck( $terms, 'term_id' );
+                       update_termmeta_cache( $term_ids );
+               }
+
+               if ( empty( $terms ) ) {
+                       wp_cache_add( $cache_key, array(), 'terms', DAY_IN_SECONDS );
+                       return array();
+               }
+
+               if ( $child_of ) {
+                       foreach ( $taxonomies as $_tax ) {
+                               $children = _get_term_hierarchy( $_tax );
+                               if ( ! empty( $children ) ) {
+                                       $terms = _get_term_children( $child_of, $terms, $_tax );
+                               }
+                       }
+               }
+
+               // Update term counts to include children.
+               if ( $args['pad_counts'] && 'all' == $_fields ) {
+                       foreach ( $taxonomies as $_tax ) {
+                               _pad_term_counts( $terms, $_tax );
+                       }
+               }
+
+               // Make sure we show empty categories that have children.
+               if ( $hierarchical && $args['hide_empty'] && is_array( $terms ) ) {
+                       foreach ( $terms as $k => $term ) {
+                               if ( ! $term->count ) {
+                                       $children = get_term_children( $term->term_id, $term->taxonomy );
+                                       if ( is_array( $children ) ) {
+                                               foreach ( $children as $child_id ) {
+                                                       $child = get_term( $child_id, $term->taxonomy );
+                                                       if ( $child->count ) {
+                                                               continue 2;
+                                                       }
+                                               }
+                                       }
+
+                                       // It really is empty.
+                                       unset( $terms[ $k ] );
+                               }
+                       }
+               }
+
+               $_terms = array();
+               if ( 'id=>parent' == $_fields ) {
+                       foreach ( $terms as $term ) {
+                               $_terms[ $term->term_id ] = $term->parent;
+                       }
+               } elseif ( 'ids' == $_fields ) {
+                       foreach ( $terms as $term ) {
+                               $_terms[] = $term->term_id;
+                       }
+               } elseif ( 'names' == $_fields ) {
+                       foreach ( $terms as $term ) {
+                               $_terms[] = $term->name;
+                       }
+               } elseif ( 'id=>name' == $_fields ) {
+                       foreach ( $terms as $term ) {
+                               $_terms[ $term->term_id ] = $term->name;
+                       }
+               } elseif ( 'id=>slug' == $_fields ) {
+                       foreach ( $terms as $term ) {
+                               $_terms[ $term->term_id ] = $term->slug;
+                       }
+               }
+
+               if ( ! empty( $_terms ) ) {
+                       $terms = $_terms;
+               }
+
+               // Hierarchical queries are not limited, so 'offset' and 'number' must be handled now.
+               if ( $hierarchical && $number && is_array( $terms ) ) {
+                       if ( $offset >= count( $terms ) ) {
+                               $terms = array();
+                       } else {
+                               $terms = array_slice( $terms, $offset, $number, true );
+                       }
+               }
+
+               wp_cache_add( $cache_key, $terms, 'terms', DAY_IN_SECONDS );
+
+               if ( 'all' === $_fields ) {
+                       $terms = array_map( 'get_term', $terms );
+               }
+
+               $this->terms = $terms;
+               return $this->terms;
+       }
+
+       /**
+        * Parse and sanitize 'orderby' keys passed to the term query.
+        *
+        * @since 4.6.0
+        * @access protected
+        *
+        * @global wpdb $wpdb WordPress database abstraction object.
+        *
+        * @param string $orderby_raw Alias for the field to order by.
+        * @return string|false Value to used in the ORDER clause. False otherwise.
+        */
+       protected function parse_orderby( $orderby_raw ) {
+               $_orderby = strtolower( $orderby_raw );
+               $maybe_orderby_meta = false;
+               if ( 'count' == $_orderby ) {
+                       $orderby = 'tt.count';
+               } elseif ( 'name' == $_orderby ) {
+                       $orderby = 't.name';
+               } elseif ( 'slug' == $_orderby ) {
+                       $orderby = 't.slug';
+               } elseif ( 'include' == $_orderby && ! empty( $this->query_vars['include'] ) ) {
+                       $include = implode( ',', array_map( 'absint', $this->query_vars['include'] ) );
+                       $orderby = "FIELD( t.term_id, $include )";
+               } elseif ( 'term_group' == $_orderby ) {
+                       $orderby = 't.term_group';
+               } elseif ( 'description' == $_orderby ) {
+                       $orderby = 'tt.description';
+               } elseif ( 'none' == $_orderby ) {
+                       $orderby = '';
+               } elseif ( empty( $_orderby ) || 'id' == $_orderby || 'term_id' === $_orderby ) {
+                       $orderby = 't.term_id';
+               } else {
+                       $orderby = 't.name';
+
+                       // This may be a value of orderby related to meta.
+                       $maybe_orderby_meta = true;
+               }
+
+               /**
+                * Filters the ORDERBY clause of the terms query.
+                *
+                * @since 2.8.0
+                *
+                * @param string $orderby    `ORDERBY` clause of the terms query.
+                * @param array  $args       An array of terms query arguments.
+                * @param array  $taxonomies An array of taxonomies.
+                */
+               $orderby = apply_filters( 'get_terms_orderby', $orderby, $this->query_vars, $this->query_vars['taxonomy'] );
+
+               // Run after the 'get_terms_orderby' filter for backward compatibility.
+               if ( $maybe_orderby_meta ) {
+                       $maybe_orderby_meta = $this->parse_orderby_meta( $_orderby );
+                       if ( $maybe_orderby_meta ) {
+                               $orderby = $maybe_orderby_meta;
+                       }
+               }
+
+               return $orderby;
+       }
+
+       /**
+        * Generate the ORDER BY clause for an 'orderby' param that is potentially related to a meta query.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string $orderby_raw Raw 'orderby' value passed to WP_Term_Query.
+        * @return string
+        */
+       protected function parse_orderby_meta( $orderby_raw ) {
+               $orderby = '';
+
+               // Tell the meta query to generate its SQL, so we have access to table aliases.
+               $this->meta_query->get_sql( 'term', 't', 'term_id' );
+               $meta_clauses = $this->meta_query->get_clauses();
+               if ( ! $meta_clauses || ! $orderby_raw ) {
+                       return $orderby;
+               }
+
+               $allowed_keys = array();
+               $primary_meta_key = null;
+               $primary_meta_query = reset( $meta_clauses );
+               if ( ! empty( $primary_meta_query['key'] ) ) {
+                       $primary_meta_key = $primary_meta_query['key'];
+                       $allowed_keys[] = $primary_meta_key;
+               }
+               $allowed_keys[] = 'meta_value';
+               $allowed_keys[] = 'meta_value_num';
+               $allowed_keys   = array_merge( $allowed_keys, array_keys( $meta_clauses ) );
+
+               if ( ! in_array( $orderby_raw, $allowed_keys, true ) ) {
+                       return $orderby;
+               }
+
+               switch( $orderby_raw ) {
+                       case $primary_meta_key:
+                       case 'meta_value':
+                               if ( ! empty( $primary_meta_query['type'] ) ) {
+                                       $orderby = "CAST({$primary_meta_query['alias']}.meta_value AS {$primary_meta_query['cast']})";
+                               } else {
+                                       $orderby = "{$primary_meta_query['alias']}.meta_value";
+                               }
+                               break;
+
+                       case 'meta_value_num':
+                               $orderby = "{$primary_meta_query['alias']}.meta_value+0";
+                               break;
+
+                       default:
+                               if ( array_key_exists( $orderby_raw, $meta_clauses ) ) {
+                                       // $orderby corresponds to a meta_query clause.
+                                       $meta_clause = $meta_clauses[ $orderby_raw ];
+                                       $orderby = "CAST({$meta_clause['alias']}.meta_value AS {$meta_clause['cast']})";
+                               }
+                               break;
+               }
+
+               return $orderby;
+       }
+
+       /**
+        * Parse an 'order' query variable and cast it to ASC or DESC as necessary.
+        *
+        * @since 4.6.0
+        * @access protected
+        *
+        * @param string $order The 'order' query variable.
+        * @return string The sanitized 'order' query variable.
+        */
+       protected function parse_order( $order ) {
+               if ( ! is_string( $order ) || empty( $order ) ) {
+                       return 'DESC';
+               }
+
+               if ( 'ASC' === strtoupper( $order ) ) {
+                       return 'ASC';
+               } else {
+                       return 'DESC';
+               }
+       }
+
+       /**
+        * Used internally to generate a SQL string related to the 'search' parameter.
+        *
+        * @since 4.6.0
+        * @access protected
+        *
+        * @global wpdb $wpdb WordPress database abstraction object.
+        *
+        * @param string $string
+        * @return string
+        */
+       protected function get_search_sql( $string ) {
+               global $wpdb;
+
+               $like = '%' . $wpdb->esc_like( $string ) . '%';
+
+               return $wpdb->prepare( '((t.name LIKE %s) OR (t.slug LIKE %s))', $like, $like );
+       }
+}
index d53d5184942b864c6c47c25784bf9bc4f5e0ca02..3b4931a0412ab79d54b7cd7080c5a4d1d602eade 100644 (file)
@@ -176,7 +176,7 @@ final class WP_Term {
 
                        // Don't return terms from invalid taxonomies.
                        if ( ! taxonomy_exists( $_term->taxonomy ) ) {
-                               return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) );
+                               return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
                        }
 
                        $_term = sanitize_term( $_term, $_term->taxonomy, 'raw' );
index d98fb3149b0a5d2b6f825a887ba91e02289ce888..40af39df46575534b5d88bc37013f8c645ba8fcb 100644 (file)
@@ -170,7 +170,7 @@ final class WP_Theme implements ArrayAccess {
        /**
         * Flag for whether the themes cache bucket should be persistently cached.
         *
-        * Default is false. Can be set with the wp_cache_themes_persistently filter.
+        * Default is false. Can be set with the {@see 'wp_cache_themes_persistently'} filter.
         *
         * @static
         * @access private
@@ -437,7 +437,7 @@ final class WP_Theme implements ArrayAccess {
         * translated data. We are doing so now as it is safe to do. However, as
         * Name and Title could have been used as the key for get_themes(), both remain
         * untranslated for back compatibility. This means that ['Name'] is not ideal,
-        * and care should be taken to use $theme->display('Name') to get a properly
+        * and care should be taken to use `$theme::display( 'Name' )` to get a properly
         * translated header.
         *
         * @param mixed $offset
@@ -447,8 +447,10 @@ final class WP_Theme implements ArrayAccess {
                switch ( $offset ) {
                        case 'Name' :
                        case 'Title' :
-                               // See note above about using translated data. get() is not ideal.
-                               // It is only for backwards compatibility. Use display().
+                               /*
+                                * See note above about using translated data. get() is not ideal.
+                                * It is only for backward compatibility. Use display().
+                                */
                                return $this->get('Name');
                        case 'Author' :
                                return $this->display( 'Author');
@@ -769,15 +771,28 @@ final class WP_Theme implements ArrayAccess {
                                $this->name_translated = translate( $value, $this->get('TextDomain' ) );
                                return $this->name_translated;
                        case 'Tags' :
-                               if ( empty( $value ) || ! function_exists( 'get_theme_feature_list' ) )
+                               if ( empty( $value ) || ! function_exists( 'get_theme_feature_list' ) ) {
                                        return $value;
+                               }
 
                                static $tags_list;
                                if ( ! isset( $tags_list ) ) {
-                                       $tags_list = array();
+                                       $tags_list = array(
+                                               // As of 4.6, deprecated tags which are only used to provide translation for older themes.
+                                               'black' => __( 'Black' ), 'blue' => __( 'Blue' ), 'brown'  => __( 'Brown' ),
+                                               'gray' => __( 'Gray' ), 'green'  => __( 'Green' ), 'orange' => __( 'Orange' ),
+                                               'pink' => __( 'Pink' ), 'purple' => __( 'Purple' ), 'red' => __( 'Red' ),
+                                               'silver' => __( 'Silver' ), 'tan' => __( 'Tan' ), 'white' => __( 'White' ),
+                                               'yellow' => __( 'Yellow' ), 'dark' => __( 'Dark' ), 'light' => __( 'Light' ),
+                                               'fixed-layout' => __( 'Fixed Layout' ), 'fluid-layout' => __( 'Fluid Layout' ),
+                                               'responsive-layout' => __( 'Responsive Layout' ), 'blavatar' => __( 'Blavatar' ),
+                                               'photoblogging' => __( 'Photoblogging' ), 'seasonal' => __( 'Seasonal' ),
+                                       );
+
                                        $feature_list = get_theme_feature_list( false ); // No API
-                                       foreach ( $feature_list as $tags )
+                                       foreach ( $feature_list as $tags ) {
                                                $tags_list += $tags;
+                                       }
                                }
 
                                foreach ( $value as &$tag ) {
@@ -918,7 +933,7 @@ final class WP_Theme implements ArrayAccess {
         *
         * This is typically the absolute URL to wp-content/themes. This forms the basis
         * for all other URLs returned by WP_Theme, so we pass it to the public function
-        * get_theme_root_uri() and allow it to run the theme_root_uri filter.
+        * get_theme_root_uri() and allow it to run the {@see 'theme_root_uri'} filter.
         *
         * @since 3.4.0
         * @access public
@@ -1029,7 +1044,7 @@ final class WP_Theme implements ArrayAccess {
                        $page_templates += $this->parent()->get_page_templates( $post );
 
                /**
-                * Filter list of page templates for a theme.
+                * Filters list of page templates for a theme.
                 *
                 * @since 3.9.0
                 * @since 4.4.0 Converted to allow complete control over the `$page_templates` array.
@@ -1190,7 +1205,7 @@ final class WP_Theme implements ArrayAccess {
         */
        public static function get_allowed( $blog_id = null ) {
                /**
-                * Filter the array of themes allowed on the network.
+                * Filters the array of themes allowed on the network.
                 *
                 * Site is provided as context so that a list of network allowed themes can
                 * be filtered further.
@@ -1223,7 +1238,7 @@ final class WP_Theme implements ArrayAccess {
                }
 
                /**
-                * Filter the array of themes allowed on the network.
+                * Filters the array of themes allowed on the network.
                 *
                 * @since MU
                 *
@@ -1255,7 +1270,7 @@ final class WP_Theme implements ArrayAccess {
 
                if ( isset( $allowed_themes[ $blog_id ] ) ) {
                        /**
-                        * Filter the array of themes allowed on the site.
+                        * Filters the array of themes allowed on the site.
                         *
                         * @since 4.5.0
                         *
@@ -1315,6 +1330,60 @@ final class WP_Theme implements ArrayAccess {
                return (array) apply_filters( 'site_allowed_themes', $allowed_themes[ $blog_id ], $blog_id );
        }
 
+       /**
+        * Enables a theme for all sites on the current network.
+        *
+        * @since 4.6.0
+        * @access public
+        * @static
+        *
+        * @param string|array $stylesheets Stylesheet name or array of stylesheet names.
+        */
+       public static function network_enable_theme( $stylesheets ) {
+               if ( ! is_multisite() ) {
+                       return;
+               }
+
+               if ( ! is_array( $stylesheets ) ) {
+                       $stylesheets = array( $stylesheets );
+               }
+
+               $allowed_themes = get_site_option( 'allowedthemes' );
+               foreach ( $stylesheets as $stylesheet ) {
+                       $allowed_themes[ $stylesheet ] = true;
+               }
+
+               update_site_option( 'allowedthemes', $allowed_themes );
+       }
+
+       /**
+        * Disables a theme for all sites on the current network.
+        *
+        * @since 4.6.0
+        * @access public
+        * @static
+        *
+        * @param string|array $stylesheets Stylesheet name or array of stylesheet names.
+        */
+       public static function network_disable_theme( $stylesheets ) {
+               if ( ! is_multisite() ) {
+                       return;
+               }
+
+               if ( ! is_array( $stylesheets ) ) {
+                       $stylesheets = array( $stylesheets );
+               }
+
+               $allowed_themes = get_site_option( 'allowedthemes' );
+               foreach ( $stylesheets as $stylesheet ) {
+                       if ( isset( $allowed_themes[ $stylesheet ] ) ) {
+                               unset( $allowed_themes[ $stylesheet ] );
+                       }
+               }
+
+               update_site_option( 'allowedthemes', $allowed_themes );
+       }
+
        /**
         * Sorts themes by name.
         *
index 02cae108c85c5c4e5d0a02a73741d7bf089bfa6e..84cdcf6b294ce7ca1becf225c5aee88458a61569 100644 (file)
@@ -255,13 +255,6 @@ class WP_User_Query {
                        $blog_id = absint( $qv['blog_id'] );
                }
 
-               if ( isset( $qv['who'] ) && 'authors' == $qv['who'] && $blog_id ) {
-                       $qv['meta_key'] = $wpdb->get_blog_prefix( $blog_id ) . 'user_level';
-                       $qv['meta_value'] = 0;
-                       $qv['meta_compare'] = '!=';
-                       $qv['blog_id'] = $blog_id = 0; // Prevent extra meta query
-               }
-
                if ( $qv['has_published_posts'] && $blog_id ) {
                        if ( true === $qv['has_published_posts'] ) {
                                $post_types = get_post_types( array( 'public' => true ) );
@@ -281,6 +274,29 @@ class WP_User_Query {
                $this->meta_query = new WP_Meta_Query();
                $this->meta_query->parse_query_vars( $qv );
 
+               if ( isset( $qv['who'] ) && 'authors' == $qv['who'] && $blog_id ) {
+                       $who_query = array(
+                               'key' => $wpdb->get_blog_prefix( $blog_id ) . 'user_level',
+                               'value' => 0,
+                               'compare' => '!=',
+                       );
+
+                       // Prevent extra meta query.
+                       $qv['blog_id'] = $blog_id = 0;
+
+                       if ( empty( $this->meta_query->queries ) ) {
+                               $this->meta_query->queries = array( $who_query );
+                       } else {
+                               // Append the cap query to the original queries and reparse the query.
+                               $this->meta_query->queries = array(
+                                       'relation' => 'AND',
+                                       array( $this->meta_query->queries, $who_query ),
+                               );
+                       }
+
+                       $this->meta_query->parse_query_vars( $this->meta_query->queries );
+               }
+
                $roles = array();
                if ( isset( $qv['role'] ) ) {
                        if ( is_array( $qv['role'] ) ) {
@@ -464,7 +480,7 @@ class WP_User_Query {
                        }
 
                        /**
-                        * Filter the columns to search in a WP_User_Query search.
+                        * Filters the columns to search in a WP_User_Query search.
                         *
                         * The default columns depend on the search term, and include 'user_email',
                         * 'user_login', 'ID', 'user_url', 'display_name', and 'user_nicename'.
@@ -531,7 +547,7 @@ class WP_User_Query {
                }
 
                /**
-                * Filter SELECT FOUND_ROWS() query for the current WP_User_Query instance.
+                * Filters SELECT FOUND_ROWS() query for the current WP_User_Query instance.
                 *
                 * @since 3.2.0
                 *
@@ -720,7 +736,7 @@ class WP_User_Query {
        }
 
        /**
-        * Make private properties readable for backwards compatibility.
+        * Make private properties readable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -735,7 +751,7 @@ class WP_User_Query {
        }
 
        /**
-        * Make private properties settable for backwards compatibility.
+        * Make private properties settable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -751,7 +767,7 @@ class WP_User_Query {
        }
 
        /**
-        * Make private properties checkable for backwards compatibility.
+        * Make private properties checkable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -766,7 +782,7 @@ class WP_User_Query {
        }
 
        /**
-        * Make private properties un-settable for backwards compatibility.
+        * Make private properties un-settable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -780,7 +796,7 @@ class WP_User_Query {
        }
 
        /**
-        * Make private/protected methods readable for backwards compatibility.
+        * Make private/protected methods readable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
index 210919d6e4141d4f9e062670c218757c80e0ebb6..0f5ee105462caafa5af55d9ca6872df27951c5b6 100644 (file)
@@ -242,7 +242,7 @@ class WP_User {
        }
 
        /**
-        * Makes private/protected methods readable for backwards compatibility.
+        * Makes private/protected methods readable for backward compatibility.
         *
         * @since 4.3.0
         * @access public
@@ -269,7 +269,7 @@ class WP_User {
         */
        public function __isset( $key ) {
                if ( 'id' == $key ) {
-                       _deprecated_argument( 'WP_User->id', '2.1',
+                       _deprecated_argument( 'WP_User->id', '2.1.0',
                                sprintf(
                                        /* translators: %s: WP_User->ID */
                                        __( 'Use %s instead.' ),
@@ -299,7 +299,7 @@ class WP_User {
         */
        public function __get( $key ) {
                if ( 'id' == $key ) {
-                       _deprecated_argument( 'WP_User->id', '2.1',
+                       _deprecated_argument( 'WP_User->id', '2.1.0',
                                sprintf(
                                        /* translators: %s: WP_User->ID */
                                        __( 'Use %s instead.' ),
@@ -338,7 +338,7 @@ class WP_User {
         */
        public function __set( $key, $value ) {
                if ( 'id' == $key ) {
-                       _deprecated_argument( 'WP_User->id', '2.1',
+                       _deprecated_argument( 'WP_User->id', '2.1.0',
                                sprintf(
                                        /* translators: %s: WP_User->ID */
                                        __( 'Use %s instead.' ),
@@ -362,7 +362,7 @@ class WP_User {
         */
        public function __unset( $key ) {
                if ( 'id' == $key ) {
-                       _deprecated_argument( 'WP_User->id', '2.1',
+                       _deprecated_argument( 'WP_User->id', '2.1.0',
                                sprintf(
                                        /* translators: %s: WP_User->ID */
                                        __( 'Use %s instead.' ),
@@ -712,7 +712,7 @@ class WP_User {
         */
        public function has_cap( $cap ) {
                if ( is_numeric( $cap ) ) {
-                       _deprecated_argument( __FUNCTION__, '2.0', __('Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.') );
+                       _deprecated_argument( __FUNCTION__, '2.0.0', __('Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.') );
                        $cap = $this->translate_level_to_cap( $cap );
                }
 
index ee68a205e96aea9ee93b70ee0f21638ab75ef7fc..57bd90bfd32d7434e635532d76c91d2e89fde2ca 100644 (file)
@@ -139,7 +139,7 @@ class Walker {
                //display this element
                $this->has_children = ! empty( $children_elements[ $id ] );
                if ( isset( $args[0] ) && is_array( $args[0] ) ) {
-                       $args[0]['has_children'] = $this->has_children; // Backwards compatibility.
+                       $args[0]['has_children'] = $this->has_children; // Back-compat.
                }
 
                $cb_args = array_merge( array(&$output, $element, $depth), $args);
@@ -386,7 +386,7 @@ class Walker {
         *
         * @since 2.7.0
         * @access public
-        * 
+        *
         * @param array $elements Elements to list.
         * @return int Number of root elements.
         */
index 12b45532331c8e89b0463b4047a32f490992b4fd..061625816e3004151591cc57cfdf58f053811f64 100644 (file)
@@ -45,28 +45,84 @@ class WP_Widget_Factory {
                self::__construct();
        }
 
+       /**
+        * Memory for the number of times unique class instances have been hashed.
+        *
+        * This can be eliminated in favor of straight spl_object_hash() when 5.3
+        * is the minimum requirement for PHP.
+        *
+        * @since 4.6.0
+        * @access private
+        * @var array
+        *
+        * @see WP_Widget_Factory::hash_object()
+        */
+       private $hashed_class_counts = array();
+
+       /**
+        * Hashes an object, doing fallback of `spl_object_hash()` if not available.
+        *
+        * This can be eliminated in favor of straight spl_object_hash() when 5.3
+        * is the minimum requirement for PHP.
+        *
+        * @since 4.6.0
+        * @access private
+        *
+        * @param WP_Widget $widget Widget.
+        * @return string Object hash.
+        */
+       private function hash_object( $widget ) {
+               if ( function_exists( 'spl_object_hash' ) ) {
+                       return spl_object_hash( $widget );
+               } else {
+                       $class_name = get_class( $widget );
+                       $hash = $class_name;
+                       if ( ! isset( $widget->_wp_widget_factory_hash_id ) ) {
+                               if ( ! isset( $this->hashed_class_counts[ $class_name ] ) ) {
+                                       $this->hashed_class_counts[ $class_name ] = 0;
+                               }
+                               $this->hashed_class_counts[ $class_name ] += 1;
+                               $widget->_wp_widget_factory_hash_id = $this->hashed_class_counts[ $class_name ];
+                       }
+                       $hash .= ':' . $widget->_wp_widget_factory_hash_id;
+                       return $hash;
+               }
+       }
+
        /**
         * Registers a widget subclass.
         *
         * @since 2.8.0
+        * @since 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object
+        *              instead of simply a `WP_Widget` subclass name.
         * @access public
         *
-        * @param string $widget_class The name of a WP_Widget subclass.
+        * @param string|WP_Widget $widget Either the name of a `WP_Widget` subclass or an instance of a `WP_Widget` subclass.
         */
-       public function register( $widget_class ) {
-               $this->widgets[$widget_class] = new $widget_class();
+       public function register( $widget ) {
+               if ( $widget instanceof WP_Widget ) {
+                       $this->widgets[ $this->hash_object( $widget ) ] = $widget;
+               } else {
+                       $this->widgets[ $widget ] = new $widget();
+               }
        }
 
        /**
         * Un-registers a widget subclass.
         *
         * @since 2.8.0
+        * @since 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object
+        *              instead of simply a `WP_Widget` subclass name.
         * @access public
         *
-        * @param string $widget_class The name of a WP_Widget subclass.
+        * @param string|WP_Widget $widget Either the name of a `WP_Widget` subclass or an instance of a `WP_Widget` subclass.
         */
-       public function unregister( $widget_class ) {
-               unset( $this->widgets[ $widget_class ] );
+       public function unregister( $widget ) {
+               if ( $widget instanceof WP_Widget ) {
+                       unset( $this->widgets[ $this->hash_object( $widget ) ] );
+               } else {
+                       unset( $this->widgets[ $widget ] );
+               }
        }
 
        /**
index 9b9e4725b9f035d7a1e887f435436e331c00cdf3..44f3686ddc3ca20598a84e68c8001ac91601dd45 100644 (file)
@@ -10,8 +10,9 @@
 /**
  * Core base class extended to register widgets.
  *
- * This class must be extended for each widget and WP_Widget::widget(), WP_Widget::update()
- * and WP_Widget::form() need to be overridden.
+ * This class must be extended for each widget, and WP_Widget::widget() must be overriden.
+ *
+ * If adding widget options, WP_Widget::update() and WP_Widget::form() should also be overridden.
  *
  * @since 2.8.0
  * @since 4.4.0 Moved to its own file from wp-includes/widgets.php
@@ -168,7 +169,7 @@ class WP_Widget {
         * @access public
         *
         * @see __construct()
-        * 
+        *
         * @param string $id_base         Optional Base ID for the widget, lowercase and unique. If left empty,
         *                                a portion of the widget's class name will be used Has to be unique.
         * @param string $name            Name for the widget displayed on the configuration page.
@@ -352,7 +353,7 @@ class WP_Widget {
                        $instance = $instances[ $this->number ];
 
                        /**
-                        * Filter the settings for a particular widget instance.
+                        * Filters the settings for a particular widget instance.
                         *
                         * Returning false will effectively short-circuit display of the widget.
                         *
@@ -441,7 +442,7 @@ class WP_Widget {
                                }
 
                                /**
-                                * Filter a widget's settings before saving.
+                                * Filters a widget's settings before saving.
                                 *
                                 * Returning false will effectively short-circuit the widget's ability
                                 * to update settings.
@@ -497,7 +498,7 @@ class WP_Widget {
                }
 
                /**
-                * Filter the widget instance's settings before displaying the control form.
+                * Filters the widget instance's settings before displaying the control form.
                 *
                 * Returning false effectively short-circuits display of the control form.
                 *
index 531dd50c9ead4ed1898a78e071973a3b1209ec5c..be2d3edb7dfb9d76d6f9799ddac532b9e4f56ba5 100644 (file)
@@ -14,7 +14,7 @@
  * options, etc.
  *
  * As of WordPress 3.5.0, XML-RPC is enabled by default. It can be disabled
- * via the xmlrpc_enabled filter found in wp_xmlrpc_server::login().
+ * via the {@see 'xmlrpc_enabled'} filter found in wp_xmlrpc_server::login().
  *
  * @package WordPress
  * @subpackage Publishing
@@ -54,11 +54,11 @@ class wp_xmlrpc_server extends IXR_Server {
        protected $auth_failed = false;
 
        /**
-        * Register all of the XMLRPC methods that XMLRPC server understands.
+        * Registers all of the XMLRPC methods that XMLRPC server understands.
         *
         * Sets up server and method property. Passes XMLRPC
-        * methods through the 'xmlrpc_methods' filter to allow plugins to extend
-        * or replace XMLRPC methods.
+        * methods through the {@see 'xmlrpc_methods'} filter to allow plugins to extend
+        * or replace XML-RPC methods.
         *
         * @since 1.5.0
         */
@@ -159,7 +159,7 @@ class wp_xmlrpc_server extends IXR_Server {
                $this->initialise_blog_option_info();
 
                /**
-                * Filter the methods exposed by the XML-RPC server.
+                * Filters the methods exposed by the XML-RPC server.
                 *
                 * This filter can be used to add new methods, and remove built-in methods.
                 *
@@ -171,7 +171,7 @@ class wp_xmlrpc_server extends IXR_Server {
        }
 
        /**
-        * Make private/protected methods readable for backwards compatibility.
+        * Make private/protected methods readable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -247,7 +247,7 @@ class wp_xmlrpc_server extends IXR_Server {
                }
 
                /**
-                * Filter whether XML-RPC methods requiring authentication are enabled.
+                * Filters whether XML-RPC methods requiring authentication are enabled.
                 *
                 * Contrary to the way it's named, this filter does not control whether XML-RPC is *fully*
                 * enabled, rather, it only controls whether XML-RPC methods requiring authentication - such
@@ -288,7 +288,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        $this->auth_failed = true;
 
                        /**
-                        * Filter the XML-RPC user login error message.
+                        * Filters the XML-RPC user login error message.
                         *
                         * @since 3.5.0
                         *
@@ -562,7 +562,7 @@ class wp_xmlrpc_server extends IXR_Server {
                );
 
                /**
-                * Filter the XML-RPC blog options property.
+                * Filters the XML-RPC blog options property.
                 *
                 * @since 2.6.0
                 *
@@ -704,7 +704,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        $_taxonomy['object_type'] = array_unique( (array) $taxonomy->object_type );
 
                /**
-                * Filter XML-RPC-prepared data for the given taxonomy.
+                * Filters XML-RPC-prepared data for the given taxonomy.
                 *
                 * @since 3.4.0
                 *
@@ -738,7 +738,7 @@ class wp_xmlrpc_server extends IXR_Server {
                $_term['count'] = intval( $_term['count'] );
 
                /**
-                * Filter XML-RPC-prepared data for the given term.
+                * Filters XML-RPC-prepared data for the given term.
                 *
                 * @since 3.4.0
                 *
@@ -867,7 +867,7 @@ class wp_xmlrpc_server extends IXR_Server {
                }
 
                /**
-                * Filter XML-RPC-prepared date for the given post.
+                * Filters XML-RPC-prepared date for the given post.
                 *
                 * @since 3.4.0
                 *
@@ -881,10 +881,12 @@ class wp_xmlrpc_server extends IXR_Server {
        /**
         * Prepares post data for return in an XML-RPC object.
         *
+        * @since 3.4.0
+        * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object.
         * @access protected
         *
-        * @param object $post_type Post type object.
-        * @param array  $fields    The subset of post fields to return.
+        * @param WP_Post_Type $post_type Post type object.
+        * @param array        $fields    The subset of post fields to return.
         * @return array The prepared post type data.
         */
        protected function _prepare_post_type( $post_type, $fields ) {
@@ -918,12 +920,13 @@ class wp_xmlrpc_server extends IXR_Server {
                        $_post_type['taxonomies'] = get_object_taxonomies( $post_type->name, 'names' );
 
                /**
-                * Filter XML-RPC-prepared date for the given post type.
+                * Filters XML-RPC-prepared date for the given post type.
                 *
                 * @since 3.4.0
+                * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object.
                 *
-                * @param array  $_post_type An array of post type data.
-                * @param object $post_type  Post type object.
+                * @param array        $_post_type An array of post type data.
+                * @param WP_Post_Type $post_type  Post type object.
                 */
                return apply_filters( 'xmlrpc_prepare_post_type', $_post_type, $post_type );
        }
@@ -957,7 +960,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        $_media_item['thumbnail'] = $_media_item['link'];
 
                /**
-                * Filter XML-RPC-prepared data for the given media item.
+                * Filters XML-RPC-prepared data for the given media item.
                 *
                 * @since 3.4.0
                 *
@@ -1039,7 +1042,7 @@ class wp_xmlrpc_server extends IXR_Server {
                );
 
                /**
-                * Filter XML-RPC-prepared data for the given page.
+                * Filters XML-RPC-prepared data for the given page.
                 *
                 * @since 3.4.0
                 *
@@ -1088,7 +1091,7 @@ class wp_xmlrpc_server extends IXR_Server {
                );
 
                /**
-                * Filter XML-RPC-prepared data for the given comment.
+                * Filters XML-RPC-prepared data for the given comment.
                 *
                 * @since 3.4.0
                 *
@@ -1136,7 +1139,7 @@ class wp_xmlrpc_server extends IXR_Server {
                }
 
                /**
-                * Filter XML-RPC-prepared data for the given user.
+                * Filters XML-RPC-prepared data for the given user.
                 *
                 * @since 3.5.0
                 *
@@ -1152,7 +1155,7 @@ class wp_xmlrpc_server extends IXR_Server {
         *
         * @since 3.4.0
         *
-        * @link http://en.wikipedia.org/wiki/RSS_enclosure for information on RSS enclosures.
+        * @link https://en.wikipedia.org/wiki/RSS_enclosure for information on RSS enclosures.
         *
         * @param array  $args {
         *     Method arguments. Note: top-level arguments must be ordered as documented.
@@ -1299,7 +1302,7 @@ class wp_xmlrpc_server extends IXR_Server {
 
                $post_type = get_post_type_object( $post_data['post_type'] );
                if ( ! $post_type )
-                       return new IXR_Error( 403, __( 'Invalid post type' ) );
+                       return new IXR_Error( 403, __( 'Invalid post type.' ) );
 
                $update = ! empty( $post_data['ID'] );
 
@@ -1340,7 +1343,7 @@ class wp_xmlrpc_server extends IXR_Server {
                $post_data['post_author'] = absint( $post_data['post_author'] );
                if ( ! empty( $post_data['post_author'] ) && $post_data['post_author'] != $user->ID ) {
                        if ( ! current_user_can( $post_type->cap->edit_others_posts ) )
-                               return new IXR_Error( 401, __( 'You are not allowed to create posts as this user.' ) );
+                               return new IXR_Error( 401, __( 'Sorry, you are not allowed to create posts as this user.' ) );
 
                        $author = get_userdata( $post_data['post_author'] );
 
@@ -1423,7 +1426,7 @@ class wp_xmlrpc_server extends IXR_Server {
                                                $term = get_term_by( 'id', $term_id, $taxonomy );
 
                                                if ( ! $term )
-                                                       return new IXR_Error( 403, __( 'Invalid term ID' ) );
+                                                       return new IXR_Error( 403, __( 'Invalid term ID.' ) );
 
                                                $terms[$taxonomy][] = (int) $term_id;
                                        }
@@ -1506,7 +1509,7 @@ class wp_xmlrpc_server extends IXR_Server {
                $this->attach_uploads( $post_ID, $post_data['post_content'] );
 
                /**
-                * Filter post data array to be inserted via XML-RPC.
+                * Filters post data array to be inserted via XML-RPC.
                 *
                 * @since 3.4.0
                 *
@@ -1634,7 +1637,7 @@ class wp_xmlrpc_server extends IXR_Server {
                }
 
                if ( ! current_user_can( 'delete_post', $post_id ) ) {
-                       return new IXR_Error( 401, __( 'Sorry, you do not have the right to delete this post.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete this post.' ) );
                }
 
                $result = wp_delete_post( $post_id );
@@ -1709,7 +1712,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        $fields = $args[4];
                } else {
                        /**
-                        * Filter the list of post query fields used by the given XML-RPC method.
+                        * Filters the list of post query fields used by the given XML-RPC method.
                         *
                         * @since 3.4.0
                         *
@@ -1731,7 +1734,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
 
                if ( ! current_user_can( 'edit_post', $post_id ) )
-                       return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
 
                return $this->_prepare_post( $post, $fields );
        }
@@ -1792,7 +1795,7 @@ class wp_xmlrpc_server extends IXR_Server {
                }
 
                if ( ! current_user_can( $post_type->cap->edit_posts ) )
-                       return new IXR_Error( 401, __( 'You are not allowed to edit posts in this post type.' ));
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts in this post type.' ));
 
                $query['post_type'] = $post_type->name;
 
@@ -1870,12 +1873,12 @@ class wp_xmlrpc_server extends IXR_Server {
                do_action( 'xmlrpc_call', 'wp.newTerm' );
 
                if ( ! taxonomy_exists( $content_struct['taxonomy'] ) )
-                       return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
+                       return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
 
                $taxonomy = get_taxonomy( $content_struct['taxonomy'] );
 
                if ( ! current_user_can( $taxonomy->cap->manage_terms ) )
-                       return new IXR_Error( 401, __( 'You are not allowed to create terms in this taxonomy.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to create terms in this taxonomy.' ) );
 
                $taxonomy = (array) $taxonomy;
 
@@ -1957,12 +1960,12 @@ class wp_xmlrpc_server extends IXR_Server {
                do_action( 'xmlrpc_call', 'wp.editTerm' );
 
                if ( ! taxonomy_exists( $content_struct['taxonomy'] ) )
-                       return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
+                       return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
 
                $taxonomy = get_taxonomy( $content_struct['taxonomy'] );
 
                if ( ! current_user_can( $taxonomy->cap->edit_terms ) )
-                       return new IXR_Error( 401, __( 'You are not allowed to edit terms in this taxonomy.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit terms in this taxonomy.' ) );
 
                $taxonomy = (array) $taxonomy;
 
@@ -1975,7 +1978,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 500, $term->get_error_message() );
 
                if ( ! $term )
-                       return new IXR_Error( 404, __( 'Invalid term ID' ) );
+                       return new IXR_Error( 404, __( 'Invalid term ID.' ) );
 
                if ( isset( $content_struct['name'] ) ) {
                        $term_data['name'] = trim( $content_struct['name'] );
@@ -2053,12 +2056,12 @@ class wp_xmlrpc_server extends IXR_Server {
                do_action( 'xmlrpc_call', 'wp.deleteTerm' );
 
                if ( ! taxonomy_exists( $taxonomy ) )
-                       return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
+                       return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
 
                $taxonomy = get_taxonomy( $taxonomy );
 
                if ( ! current_user_can( $taxonomy->cap->delete_terms ) )
-                       return new IXR_Error( 401, __( 'You are not allowed to delete terms in this taxonomy.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete terms in this taxonomy.' ) );
 
                $term = get_term( $term_id, $taxonomy->name );
 
@@ -2066,7 +2069,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 500, $term->get_error_message() );
 
                if ( ! $term )
-                       return new IXR_Error( 404, __( 'Invalid term ID' ) );
+                       return new IXR_Error( 404, __( 'Invalid term ID.' ) );
 
                $result = wp_delete_term( $term_id, $taxonomy->name );
 
@@ -2124,12 +2127,12 @@ class wp_xmlrpc_server extends IXR_Server {
                do_action( 'xmlrpc_call', 'wp.getTerm' );
 
                if ( ! taxonomy_exists( $taxonomy ) )
-                       return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
+                       return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
 
                $taxonomy = get_taxonomy( $taxonomy );
 
                if ( ! current_user_can( $taxonomy->cap->assign_terms ) )
-                       return new IXR_Error( 401, __( 'You are not allowed to assign terms in this taxonomy.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign terms in this taxonomy.' ) );
 
                $term = get_term( $term_id , $taxonomy->name, ARRAY_A );
 
@@ -2137,7 +2140,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 500, $term->get_error_message() );
 
                if ( ! $term )
-                       return new IXR_Error( 404, __( 'Invalid term ID' ) );
+                       return new IXR_Error( 404, __( 'Invalid term ID.' ) );
 
                return $this->_prepare_term( $term );
        }
@@ -2182,12 +2185,12 @@ class wp_xmlrpc_server extends IXR_Server {
                do_action( 'xmlrpc_call', 'wp.getTerms' );
 
                if ( ! taxonomy_exists( $taxonomy ) )
-                       return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
+                       return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
 
                $taxonomy = get_taxonomy( $taxonomy );
 
                if ( ! current_user_can( $taxonomy->cap->assign_terms ) )
-                       return new IXR_Error( 401, __( 'You are not allowed to assign terms in this taxonomy.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign terms in this taxonomy.' ) );
 
                $query = array();
 
@@ -2260,7 +2263,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        $fields = $args[4];
                } else {
                        /**
-                        * Filter the taxonomy query fields used by the given XML-RPC method.
+                        * Filters the taxonomy query fields used by the given XML-RPC method.
                         *
                         * @since 3.4.0
                         *
@@ -2277,12 +2280,12 @@ class wp_xmlrpc_server extends IXR_Server {
                do_action( 'xmlrpc_call', 'wp.getTaxonomy' );
 
                if ( ! taxonomy_exists( $taxonomy ) )
-                       return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
+                       return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
 
                $taxonomy = get_taxonomy( $taxonomy );
 
                if ( ! current_user_can( $taxonomy->cap->assign_terms ) )
-                       return new IXR_Error( 401, __( 'You are not allowed to assign terms in this taxonomy.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign terms in this taxonomy.' ) );
 
                return $this->_prepare_taxonomy( $taxonomy, $fields );
        }
@@ -2395,7 +2398,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        $fields = $args[4];
                } else {
                        /**
-                        * Filter the default user query fields used by the given XML-RPC method.
+                        * Filters the default user query fields used by the given XML-RPC method.
                         *
                         * @since 3.5.0
                         *
@@ -2412,7 +2415,7 @@ class wp_xmlrpc_server extends IXR_Server {
                do_action( 'xmlrpc_call', 'wp.getUser' );
 
                if ( ! current_user_can( 'edit_user', $user_id ) )
-                       return new IXR_Error( 401, __( 'Sorry, you cannot edit users.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this user.' ) );
 
                $user_data = get_userdata( $user_id );
 
@@ -2470,7 +2473,7 @@ class wp_xmlrpc_server extends IXR_Server {
                do_action( 'xmlrpc_call', 'wp.getUsers' );
 
                if ( ! current_user_can( 'list_users' ) )
-                       return new IXR_Error( 401, __( 'You are not allowed to browse users.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to browse users.' ) );
 
                $query = array( 'fields' => 'all_with_meta' );
 
@@ -2543,7 +2546,7 @@ class wp_xmlrpc_server extends IXR_Server {
                do_action( 'xmlrpc_call', 'wp.getProfile' );
 
                if ( ! current_user_can( 'edit_user', $user->ID ) )
-                       return new IXR_Error( 401, __( 'Sorry, you cannot edit your profile.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit your profile.' ) );
 
                $user_data = get_userdata( $user->ID );
 
@@ -2589,7 +2592,7 @@ class wp_xmlrpc_server extends IXR_Server {
                do_action( 'xmlrpc_call', 'wp.editProfile' );
 
                if ( ! current_user_can( 'edit_user', $user->ID ) )
-                       return new IXR_Error( 401, __( 'Sorry, you cannot edit your profile.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit your profile.' ) );
 
                // holds data of the user
                $user_data = array();
@@ -2659,7 +2662,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
 
                if ( !current_user_can( 'edit_page', $page_id ) )
-                       return new IXR_Error( 401, __( 'Sorry, you cannot edit this page.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this page.' ) );
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'wp.getPage' );
@@ -2700,7 +2703,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return $this->error;
 
                if ( !current_user_can( 'edit_pages' ) )
-                       return new IXR_Error( 401, __( 'Sorry, you cannot edit pages.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit pages.' ) );
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'wp.getPages' );
@@ -2794,7 +2797,7 @@ class wp_xmlrpc_server extends IXR_Server {
 
                // Make sure the user can delete pages.
                if ( !current_user_can('delete_page', $page_id) )
-                       return new IXR_Error( 401, __( 'Sorry, you do not have the right to delete this page.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete this page.' ) );
 
                // Attempt to delete the page.
                $result = wp_delete_post($page_id);
@@ -2856,7 +2859,7 @@ class wp_xmlrpc_server extends IXR_Server {
 
                // Make sure the user is allowed to edit pages.
                if ( !current_user_can('edit_page', $page_id) )
-                       return new IXR_Error( 401, __( 'Sorry, you do not have the right to edit this page.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this page.' ) );
 
                // Mark this as content for a page.
                $content['post_type'] = 'page';
@@ -2902,7 +2905,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return $this->error;
 
                if ( !current_user_can( 'edit_pages' ) )
-                       return new IXR_Error( 401, __( 'Sorry, you cannot edit pages.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit pages.' ) );
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'wp.getPageList' );
@@ -2958,7 +2961,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return $this->error;
 
                if ( !current_user_can('edit_posts') )
-                       return new IXR_Error( 401, __( 'Sorry, you cannot edit posts on this site.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts.' ) );
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'wp.getAuthors' );
@@ -3053,7 +3056,7 @@ class wp_xmlrpc_server extends IXR_Server {
 
                // Make sure the user is allowed to add a category.
                if ( !current_user_can('manage_categories') )
-                       return new IXR_Error(401, __('Sorry, you do not have the right to add a category.'));
+                       return new IXR_Error(401, __('Sorry, you are not allowed to add a category.'));
 
                // If no slug was provided make it empty so that
                // WordPress will generate one.
@@ -3112,7 +3115,7 @@ class wp_xmlrpc_server extends IXR_Server {
         *     @type string $password
         *     @type int    $category_id
         * }
-        * @return bool|IXR_Error See {@link wp_delete_term()} for return info.
+        * @return bool|IXR_Error See wp_delete_term() for return info.
         */
        public function wp_deleteCategory( $args ) {
                $this->escape( $args );
@@ -3128,7 +3131,7 @@ class wp_xmlrpc_server extends IXR_Server {
                do_action( 'xmlrpc_call', 'wp.deleteCategory' );
 
                if ( !current_user_can('manage_categories') )
-                       return new IXR_Error( 401, __( 'Sorry, you do not have the right to delete a category.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete a category.' ) );
 
                $status = wp_delete_term( $category_id, 'category' );
 
@@ -3226,7 +3229,7 @@ class wp_xmlrpc_server extends IXR_Server {
                }
 
                if ( ! current_user_can( 'edit_comment', $comment_id ) ) {
-                       return new IXR_Error( 403, __( 'You are not allowed to moderate or edit this comment.' ) );
+                       return new IXR_Error( 403, __( 'Sorry, you are not allowed to moderate or edit this comment.' ) );
                }
 
                return $this->_prepare_comment( $comment );
@@ -3244,7 +3247,7 @@ class wp_xmlrpc_server extends IXR_Server {
         * - 'status' - Default is ''. Filter by status (e.g., 'approve', 'hold')
         * - 'post_id' - Default is ''. The post where the comment is posted. Empty string shows all comments.
         * - 'number' - Default is 10. Total number of media items to retrieve.
-        * - 'offset' - Default is 0. See {@link WP_Query::query()} for more.
+        * - 'offset' - Default is 0. See WP_Query::query() for more.
         *
         * @since 2.7.0
         *
@@ -3256,7 +3259,7 @@ class wp_xmlrpc_server extends IXR_Server {
         *     @type string $password
         *     @type array  $struct
         * }
-        * @return array|IXR_Error Contains a collection of comments. See {@link wp_xmlrpc_server::wp_getComment()} for a description of each item contents
+        * @return array|IXR_Error Contains a collection of comments. See wp_xmlrpc_server::wp_getComment() for a description of each item contents
         */
        public function wp_getComments( $args ) {
                $this->escape( $args );
@@ -3328,8 +3331,7 @@ class wp_xmlrpc_server extends IXR_Server {
         * Delete a comment.
         *
         * By default, the comment will be moved to the trash instead of deleted.
-        * See {@link wp_delete_comment()} for more information on
-        * this behavior.
+        * See wp_delete_comment() for more information on this behavior.
         *
         * @since 2.7.0
         *
@@ -3341,7 +3343,7 @@ class wp_xmlrpc_server extends IXR_Server {
         *     @type string $password
         *     @type int    $comment_ID
         * }
-        * @return bool|IXR_Error {@link wp_delete_comment()}
+        * @return bool|IXR_Error See wp_delete_comment().
         */
        public function wp_deleteComment( $args ) {
                $this->escape($args);
@@ -3359,7 +3361,7 @@ class wp_xmlrpc_server extends IXR_Server {
                }
 
                if ( !current_user_can( 'edit_comment', $comment_ID ) ) {
-                       return new IXR_Error( 403, __( 'You are not allowed to moderate or edit this comment.' ) );
+                       return new IXR_Error( 403, __( 'Sorry, you are not allowed to moderate or edit this comment.' ) );
                }
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
@@ -3426,7 +3428,7 @@ class wp_xmlrpc_server extends IXR_Server {
                }
 
                if ( ! current_user_can( 'edit_comment', $comment_ID ) ) {
-                       return new IXR_Error( 403, __( 'You are not allowed to moderate or edit this comment.' ) );
+                       return new IXR_Error( 403, __( 'Sorry, you are not allowed to moderate or edit this comment.' ) );
                }
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
@@ -3498,7 +3500,7 @@ class wp_xmlrpc_server extends IXR_Server {
         *     @type string|int $post
         *     @type array      $content_struct
         * }
-        * @return int|IXR_Error {@link wp_new_comment()}
+        * @return int|IXR_Error See wp_new_comment().
         */
        public function wp_newComment($args) {
                $this->escape($args);
@@ -3509,7 +3511,7 @@ class wp_xmlrpc_server extends IXR_Server {
                $content_struct = $args[4];
 
                /**
-                * Filter whether to allow anonymous comments over XML-RPC.
+                * Filters whether to allow anonymous comments over XML-RPC.
                 *
                 * @since 2.7.0
                 *
@@ -3630,7 +3632,7 @@ class wp_xmlrpc_server extends IXR_Server {
                }
 
                if ( ! current_user_can( 'publish_posts' ) ) {
-                       return new IXR_Error( 403, __( 'You are not allowed access to details about this site.' ) );
+                       return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
                }
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
@@ -3671,7 +3673,7 @@ class wp_xmlrpc_server extends IXR_Server {
                }
 
                if ( ! current_user_can( 'edit_post', $post_id ) ) {
-                       return new IXR_Error( 403, __( 'You are not allowed access to details of this post.' ) );
+                       return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details of this post.' ) );
                }
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
@@ -3711,7 +3713,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return $this->error;
 
                if ( !current_user_can( 'edit_posts' ) )
-                       return new IXR_Error( 403, __( 'You are not allowed access to details about this site.' ) );
+                       return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'wp.getPostStatusList' );
@@ -3743,7 +3745,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return $this->error;
 
                if ( !current_user_can( 'edit_pages' ) )
-                       return new IXR_Error( 403, __( 'You are not allowed access to details about this site.' ) );
+                       return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'wp.getPageStatusList' );
@@ -3775,7 +3777,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return $this->error;
 
                if ( !current_user_can( 'edit_pages' ) )
-                       return new IXR_Error( 403, __( 'You are not allowed access to details about this site.' ) );
+                       return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
 
                $templates = get_page_templates();
                $templates['Default'] = 'default';
@@ -3869,7 +3871,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return $this->error;
 
                if ( !current_user_can( 'manage_options' ) )
-                       return new IXR_Error( 403, __( 'You are not allowed to update options.' ) );
+                       return new IXR_Error( 403, __( 'Sorry, you are not allowed to update options.' ) );
 
                $option_names = array();
                foreach ( $options as $o_name => $o_value ) {
@@ -3921,7 +3923,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return $this->error;
 
                if ( !current_user_can( 'upload_files' ) )
-                       return new IXR_Error( 403, __( 'You do not have permission to upload files.' ) );
+                       return new IXR_Error( 403, __( 'Sorry, you are not allowed to upload files.' ) );
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'wp.getMediaItem' );
@@ -3969,7 +3971,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return $this->error;
 
                if ( !current_user_can( 'upload_files' ) )
-                       return new IXR_Error( 401, __( 'You do not have permission to upload files.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to upload files.' ) );
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'wp.getMediaLibrary' );
@@ -4013,7 +4015,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return $this->error;
 
                if ( !current_user_can( 'edit_posts' ) )
-                       return new IXR_Error( 403, __( 'You are not allowed access to details about this site.' ) );
+                       return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'wp.getPostFormats' );
@@ -4079,7 +4081,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        $fields = $args[4];
                } else {
                        /**
-                        * Filter the default query fields used by the given XML-RPC method.
+                        * Filters the default query fields used by the given XML-RPC method.
                         *
                         * @since 3.4.0
                         *
@@ -4096,7 +4098,7 @@ class wp_xmlrpc_server extends IXR_Server {
                do_action( 'xmlrpc_call', 'wp.getPostType' );
 
                if ( ! post_type_exists( $post_type_name ) )
-                       return new IXR_Error( 403, __( 'Invalid post type' ) );
+                       return new IXR_Error( 403, __( 'Invalid post type.' ) );
 
                $post_type = get_post_type_object( $post_type_name );
 
@@ -4197,7 +4199,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        $fields = $args[4];
                } else {
                        /**
-                        * Filter the default revision query fields used by the given XML-RPC method.
+                        * Filters the default revision query fields used by the given XML-RPC method.
                         *
                         * @since 3.5.0
                         *
@@ -4287,7 +4289,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
 
                if ( ! current_user_can( 'edit_post', $revision->post_parent ) )
-                       return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
 
                // Check if revisions are disabled.
                if ( ! wp_revisions_enabled( $post ) )
@@ -4299,7 +4301,7 @@ class wp_xmlrpc_server extends IXR_Server {
        }
 
        /* Blogger API functions.
-        * specs on http://plant.blogger.com/api and http://groups.yahoo.com/group/bloggerDev/
+        * specs on http://plant.blogger.com/api and https://groups.yahoo.com/group/bloggerDev/
         */
 
        /**
@@ -4410,7 +4412,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return $this->error;
 
                if ( !current_user_can( 'edit_posts' ) )
-                       return new IXR_Error( 401, __( 'Sorry, you do not have access to user data on this site.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to access user data on this site.' ) );
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'blogger.getUserInfo' );
@@ -4456,7 +4458,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
 
                if ( !current_user_can( 'edit_post', $post_ID ) )
-                       return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'blogger.getPost' );
@@ -4509,7 +4511,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return $this->error;
 
                if ( ! current_user_can( 'edit_posts' ) )
-                       return new IXR_Error( 401, __( 'Sorry, you cannot edit posts on this site.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts.' ) );
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'blogger.getRecentPosts' );
@@ -4683,10 +4685,10 @@ class wp_xmlrpc_server extends IXR_Server {
                $this->escape($actual_post);
 
                if ( ! current_user_can( 'edit_post', $post_ID ) ) {
-                       return new IXR_Error(401, __('Sorry, you do not have the right to edit this post.'));
+                       return new IXR_Error(401, __('Sorry, you are not allowed to edit this post.'));
                }
                if ( 'publish' == $actual_post['post_status'] && ! current_user_can( 'publish_posts' ) ) {
-                       return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this post.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish this post.' ) );
                }
 
                $postdata = array();
@@ -4753,7 +4755,7 @@ class wp_xmlrpc_server extends IXR_Server {
                }
 
                if ( ! current_user_can( 'delete_post', $post_ID ) ) {
-                       return new IXR_Error( 401, __( 'Sorry, you do not have the right to delete this post.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete this post.' ) );
                }
 
                $result = wp_delete_post( $post_ID );
@@ -4855,7 +4857,7 @@ class wp_xmlrpc_server extends IXR_Server {
                                $post_type = 'post';
                        } else {
                                // No other post_type values are allowed here
-                               return new IXR_Error( 401, __( 'Invalid post type' ) );
+                               return new IXR_Error( 401, __( 'Invalid post type.' ) );
                        }
                } else {
                        if ( $publish )
@@ -4906,14 +4908,14 @@ class wp_xmlrpc_server extends IXR_Server {
                        switch ( $post_type ) {
                                case "post":
                                        if ( !current_user_can( 'edit_others_posts' ) )
-                                               return new IXR_Error( 401, __( 'You are not allowed to create posts as this user.' ) );
+                                               return new IXR_Error( 401, __( 'Sorry, you are not allowed to create posts as this user.' ) );
                                        break;
                                case "page":
                                        if ( !current_user_can( 'edit_others_pages' ) )
-                                               return new IXR_Error( 401, __( 'You are not allowed to create pages as this user.' ) );
+                                               return new IXR_Error( 401, __( 'Sorry, you are not allowed to create pages as this user.' ) );
                                        break;
                                default:
-                                       return new IXR_Error( 401, __( 'Invalid post type' ) );
+                                       return new IXR_Error( 401, __( 'Invalid post type.' ) );
                        }
                        $author = get_userdata( $content_struct['wp_author_id'] );
                        if ( ! $author )
@@ -5187,11 +5189,11 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
 
                if ( ! current_user_can( 'edit_post', $post_ID ) )
-                       return new IXR_Error( 401, __( 'Sorry, you do not have the right to edit this post.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
 
                // Use wp.editPost to edit post types other than post and page.
                if ( ! in_array( $postdata[ 'post_type' ], array( 'post', 'page' ) ) )
-                       return new IXR_Error( 401, __( 'Invalid post type' ) );
+                       return new IXR_Error( 401, __( 'Invalid post type.' ) );
 
                // Thwart attempt to change the post type.
                if ( ! empty( $content_struct[ 'post_type' ] ) && ( $content_struct['post_type'] != $postdata[ 'post_type' ] ) )
@@ -5246,16 +5248,16 @@ class wp_xmlrpc_server extends IXR_Server {
                                switch ( $post_type ) {
                                        case 'post':
                                                if ( ! current_user_can( 'edit_others_posts' ) ) {
-                                                       return new IXR_Error( 401, __( 'You are not allowed to change the post author as this user.' ) );
+                                                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to change the post author as this user.' ) );
                                                }
                                                break;
                                        case 'page':
                                                if ( ! current_user_can( 'edit_others_pages' ) ) {
-                                                       return new IXR_Error( 401, __( 'You are not allowed to change the page author as this user.' ) );
+                                                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to change the page author as this user.' ) );
                                                }
                                                break;
                                        default:
-                                               return new IXR_Error( 401, __( 'Invalid post type' ) );
+                                               return new IXR_Error( 401, __( 'Invalid post type.' ) );
                                }
                                $post_author = $content_struct['wp_author_id'];
                        }
@@ -5358,9 +5360,9 @@ class wp_xmlrpc_server extends IXR_Server {
 
                if ( 'publish' == $post_status || 'private' == $post_status ) {
                        if ( 'page' == $post_type && ! current_user_can( 'publish_pages' ) ) {
-                               return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this page.' ) );
+                               return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish this page.' ) );
                        } elseif ( ! current_user_can( 'publish_posts' ) ) {
-                               return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this post.' ) );
+                               return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish this post.' ) );
                        }
                }
 
@@ -5484,7 +5486,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
 
                if ( !current_user_can( 'edit_post', $post_ID ) )
-                       return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'metaWeblog.getPost' );
@@ -5614,7 +5616,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return $this->error;
 
                if ( ! current_user_can( 'edit_posts' ) )
-                       return new IXR_Error( 401, __( 'Sorry, you cannot edit posts on this site.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts.' ) );
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'metaWeblog.getRecentPosts' );
@@ -5791,7 +5793,7 @@ class wp_xmlrpc_server extends IXR_Server {
                do_action( 'xmlrpc_call', 'metaWeblog.newMediaObject' );
 
                if ( !current_user_can('upload_files') ) {
-                       $this->error = new IXR_Error( 401, __( 'You do not have permission to upload files.' ) );
+                       $this->error = new IXR_Error( 401, __( 'Sorry, you are not allowed to upload files.' ) );
                        return $this->error;
                }
 
@@ -5801,7 +5803,7 @@ class wp_xmlrpc_server extends IXR_Server {
                }
 
                /**
-                * Filter whether to preempt the XML-RPC media upload.
+                * Filters whether to preempt the XML-RPC media upload.
                 *
                 * Passing a truthy value will effectively short-circuit the media upload,
                 * returning that value as a 500 error instead.
@@ -5825,7 +5827,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        $post_id = (int) $data['post_id'];
 
                        if ( ! current_user_can( 'edit_post', $post_id ) )
-                               return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
+                               return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
                }
                $attachment = array(
                        'post_title' => $name,
@@ -5996,7 +5998,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
 
                if ( !current_user_can( 'edit_post', $post_ID ) )
-                       return new IXR_Error( 401, __( 'Sorry, you can not edit this post.' ) );
+                       return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
 
                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                do_action( 'xmlrpc_call', 'mt.getPostCategories' );
@@ -6050,7 +6052,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
 
                if ( !current_user_can('edit_post', $post_ID) )
-                       return new IXR_Error(401, __('Sorry, you cannot edit this post.'));
+                       return new IXR_Error(401, __('Sorry, you are not allowed to edit this post.'));
 
                $catids = array();
                foreach ( $categories as $cat ) {
@@ -6086,7 +6088,7 @@ class wp_xmlrpc_server extends IXR_Server {
                do_action( 'xmlrpc_call', 'mt.supportedTextFilters' );
 
                /**
-                * Filter the MoveableType text filters list for XML-RPC.
+                * Filters the MoveableType text filters list for XML-RPC.
                 *
                 * @since 2.2.0
                 *
@@ -6169,7 +6171,7 @@ class wp_xmlrpc_server extends IXR_Server {
                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
 
                if ( !current_user_can('publish_posts') || !current_user_can('edit_post', $post_ID) )
-                       return new IXR_Error(401, __('Sorry, you cannot publish this post.'));
+                       return new IXR_Error(401, __('Sorry, you are not allowed to publish this post.'));
 
                $postdata['post_status'] = 'publish';
 
@@ -6214,7 +6216,7 @@ class wp_xmlrpc_server extends IXR_Server {
                $pagelinkedto = str_replace( '&', '&amp;', $pagelinkedto );
 
                /**
-                * Filter the pingback source URI.
+                * Filters the pingback source URI.
                 *
                 * @since 3.6.0
                 *
@@ -6311,7 +6313,7 @@ class wp_xmlrpc_server extends IXR_Server {
                }
 
                /**
-                * Filter the pingback remote source.
+                * Filters the pingback remote source.
                 *
                 * @since 2.5.0
                 *
@@ -6457,7 +6459,7 @@ class wp_xmlrpc_server extends IXR_Server {
         */
        protected function pingback_error( $code, $message ) {
                /**
-                * Filter the XML-RPC pingback error return.
+                * Filters the XML-RPC pingback error return.
                 *
                 * @since 3.5.1
                 *
index 1217f1c370d499fc1d4ca1ac59faf3cebda4ca3c..4a9718364e14629da724d00c7d376723f80cbf40 100644 (file)
@@ -56,7 +56,7 @@ class WP {
        public $query_string;
 
        /**
-        * Permalink or requested URI.
+        * The request path, e.g. 2015/05/06.
         *
         * @since 2.0.0
         * @access public
@@ -146,7 +146,7 @@ class WP {
                global $wp_rewrite;
 
                /**
-                * Filter whether to parse the request.
+                * Filters whether to parse the request.
                 *
                 * @since 3.5.0
                 *
@@ -202,18 +202,19 @@ class WP {
                        // The requested permalink is in $pathinfo for path info requests and
                        //  $req_uri for other requests.
                        if ( ! empty($pathinfo) && !preg_match('|^.*' . $wp_rewrite->index . '$|', $pathinfo) ) {
-                               $request = $pathinfo;
+                               $requested_path = $pathinfo;
                        } else {
                                // If the request uri is the index, blank it out so that we don't try to match it against a rule.
                                if ( $req_uri == $wp_rewrite->index )
                                        $req_uri = '';
-                               $request = $req_uri;
+                               $requested_path = $req_uri;
                        }
+                       $requested_file = $req_uri;
 
-                       $this->request = $request;
+                       $this->request = $requested_path;
 
                        // Look for matches.
-                       $request_match = $request;
+                       $request_match = $requested_path;
                        if ( empty( $request_match ) ) {
                                // An empty request could only match against ^$ regex
                                if ( isset( $rewrite['$'] ) ) {
@@ -223,9 +224,9 @@ class WP {
                                }
                        } else {
                                foreach ( (array) $rewrite as $match => $query ) {
-                                       // If the requesting file is the anchor of the match, prepend it to the path info.
-                                       if ( ! empty($req_uri) && strpos($match, $req_uri) === 0 && $req_uri != $request )
-                                               $request_match = $req_uri . '/' . $request;
+                                       // If the requested file is the anchor of the match, prepend it to the path info.
+                                       if ( ! empty($requested_file) && strpos($match, $requested_file) === 0 && $requested_file != $requested_path )
+                                               $request_match = $requested_file . '/' . $requested_path;
 
                                        if ( preg_match("#^$match#", $request_match, $matches) ||
                                                preg_match("#^$match#", urldecode($request_match), $matches) ) {
@@ -269,7 +270,7 @@ class WP {
                        }
 
                        // If req_uri is empty or if it is a request for ourself, unset error.
-                       if ( empty($request) || $req_uri == $self || strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false ) {
+                       if ( empty($requested_path) || $requested_file == $self || strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false ) {
                                unset( $error, $_GET['error'] );
 
                                if ( isset($perma_query_vars) && strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false )
@@ -280,7 +281,7 @@ class WP {
                }
 
                /**
-                * Filter the query variables whitelist before processing.
+                * Filters the query variables whitelist before processing.
                 *
                 * Allows (publicly allowed) query vars to be added, removed, or changed prior
                 * to executing the query. Needed to allow custom rewrite rules using your own arguments
@@ -367,7 +368,7 @@ class WP {
                        $this->query_vars['error'] = $error;
 
                /**
-                * Filter the array of parsed query variables.
+                * Filters the array of parsed query variables.
                 *
                 * @since 2.1.0
                 *
@@ -462,7 +463,7 @@ class WP {
                }
 
                /**
-                * Filter the HTTP headers before they're sent to the browser.
+                * Filters the HTTP headers before they're sent to the browser.
                 *
                 * @since 2.8.0
                 *
@@ -512,8 +513,8 @@ class WP {
        /**
         * Sets the query string property based off of the query variable property.
         *
-        * The 'query_string' filter is deprecated, but still works. Plugins should
-        * use the 'request' filter instead.
+        * The {@see 'query_string'} filter is deprecated, but still works. Plugins should
+        * use the {@see 'request'} filter instead.
         *
         * @since 2.0.0
         * @access public
@@ -531,7 +532,7 @@ class WP {
 
                if ( has_filter( 'query_string' ) ) {  // Don't bother filtering and parsing if no plugins are hooked in.
                        /**
-                        * Filter the query string before parsing.
+                        * Filters the query string before parsing.
                         *
                         * @since 1.5.0
                         * @deprecated 2.1.0 Use 'query_vars' or 'request' filters instead.
@@ -630,7 +631,7 @@ class WP {
                global $wp_query;
 
                /**
-                * Filter whether to short-circuit default header status handling.
+                * Filters whether to short-circuit default header status handling.
                 *
                 * Returning a non-false value from the filter will short-circuit the handling
                 * and return early.
@@ -710,14 +711,14 @@ class WP {
        /**
         * Sets up all of the variables required by the WordPress environment.
         *
-        * The action 'wp' has one parameter that references the WP object. It
+        * The action {@see 'wp'} has one parameter that references the WP object. It
         * allows for accessing the properties and methods to further manipulate the
         * object.
         *
         * @since 2.0.0
         * @access public
         *
-        * @param string|array $query_args Passed to {@link parse_request()}
+        * @param string|array $query_args Passed to parse_request().
         */
        public function main($query_args = '') {
                $this->init();
index 144bfce220439e9ef0d6ff586c135a12bce769d1..81634ece416f8ce79d1082aa1ed55d3254b07129 100644 (file)
@@ -197,7 +197,7 @@ class WP_Scripts extends WP_Dependencies {
         * @return bool|string|void Void if no data exists, extra scripts if `$echo` is true, true otherwise.
         */
        public function print_scripts_l10n( $handle, $echo = true ) {
-               _deprecated_function( __FUNCTION__, '3.3', 'print_extra_script()' );
+               _deprecated_function( __FUNCTION__, '3.3.0', 'print_extra_script()' );
                return $this->print_extra_script( $handle, $echo );
        }
 
@@ -286,7 +286,7 @@ class WP_Scripts extends WP_Dependencies {
 
                if ( $this->do_concat ) {
                        /**
-                        * Filter the script loader source.
+                        * Filters the script loader source.
                         *
                         * @since 2.2.0
                         *
@@ -345,7 +345,7 @@ class WP_Scripts extends WP_Dependencies {
                $tag = "{$cond_before}{$before_handle}<script type='text/javascript' src='$src'></script>\n{$after_handle}{$cond_after}";
 
                /**
-                * Filter the HTML script tag of an enqueued script.
+                * Filters the HTML script tag of an enqueued script.
                 *
                 * @since 4.1.0
                 *
@@ -502,7 +502,7 @@ class WP_Scripts extends WP_Dependencies {
                $r = parent::all_deps( $handles, $recursion, $group );
                if ( ! $recursion ) {
                        /**
-                        * Filter the list of script dependencies left to print.
+                        * Filters the list of script dependencies left to print.
                         *
                         * @since 2.3.0
                         *
index a175058baa13757bd09c6fd3700cd4ec4e5bc98f..0b6c011d105a8f88ab5103b3489715e92c864a63 100644 (file)
@@ -189,7 +189,7 @@ class WP_Styles extends WP_Dependencies {
                $title = isset($obj->extra['title']) ? "title='" . esc_attr( $obj->extra['title'] ) . "'" : '';
 
                /**
-                * Filter the HTML link tag of an enqueued style.
+                * Filters the HTML link tag of an enqueued style.
                 *
                 * @since 2.6.0
                 * @since 4.3.0 Introduced the `$href` parameter.
@@ -313,7 +313,7 @@ class WP_Styles extends WP_Dependencies {
                $r = parent::all_deps( $handles, $recursion, $group );
                if ( ! $recursion ) {
                        /**
-                        * Filter the array of enqueued styles before processing for output.
+                        * Filters the array of enqueued styles before processing for output.
                         *
                         * @since 2.6.0
                         *
@@ -344,7 +344,7 @@ class WP_Styles extends WP_Dependencies {
                        $src = add_query_arg('ver', $ver, $src);
 
                /**
-                * Filter an enqueued style's fully-qualified URL.
+                * Filters an enqueued style's fully-qualified URL.
                 *
                 * @since 2.6.0
                 *
index 29b102a207118b33d562f27387efa3edbc278b38..42ebd41e3c079770417a85e9fbf3f37d8ed43180 100644 (file)
@@ -34,7 +34,7 @@ function get_comment_author( $comment_ID = 0 ) {
        }
 
        /**
-        * Filter the returned comment author name.
+        * Filters the returned comment author name.
         *
         * @since 1.5.0
         * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
@@ -60,7 +60,7 @@ function comment_author( $comment_ID = 0 ) {
        $author  = get_comment_author( $comment );
 
        /**
-        * Filter the comment author's name for display.
+        * Filters the comment author's name for display.
         *
         * @since 1.2.0
         * @since 4.1.0 The `$comment_ID` parameter was added.
@@ -85,7 +85,7 @@ function get_comment_author_email( $comment_ID = 0 ) {
        $comment = get_comment( $comment_ID );
 
        /**
-        * Filter the comment author's returned email address.
+        * Filters the comment author's returned email address.
         *
         * @since 1.5.0
         * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
@@ -117,7 +117,7 @@ function comment_author_email( $comment_ID = 0 ) {
        $author_email = get_comment_author_email( $comment );
 
        /**
-        * Filter the comment author's email for display.
+        * Filters the comment author's email for display.
         *
         * @since 1.2.0
         * @since 4.1.0 The `$comment_ID` parameter was added.
@@ -138,15 +138,18 @@ function comment_author_email( $comment_ID = 0 ) {
  * address and use it for their own means good and bad.
  *
  * @since 0.71
+ * @since 4.6.0 Added the `$comment` parameter.
  *
- * @param string $linktext Optional. Text to display instead of the comment author's email address.
- *                         Default empty.
- * @param string $before   Optional. Text or HTML to display before the email link. Default empty.
- * @param string $after    Optional. Text or HTML to display after the email link. Default empty.
+ * @param string         $linktext Optional. Text to display instead of the comment author's email address.
+ *                                 Default empty.
+ * @param string         $before   Optional. Text or HTML to display before the email link. Default empty.
+ * @param string         $after    Optional. Text or HTML to display after the email link. Default empty.
+ * @param int|WP_Comment $comment  Optional. Comment ID or WP_Comment object. Default is the current comment.
  */
-function comment_author_email_link( $linktext = '', $before = '', $after = '' ) {
-       if ( $link = get_comment_author_email_link( $linktext, $before, $after ) )
+function comment_author_email_link( $linktext = '', $before = '', $after = '', $comment = null ) {
+       if ( $link = get_comment_author_email_link( $linktext, $before, $after, $comment ) ) {
                echo $link;
+       }
 }
 
 /**
@@ -159,17 +162,21 @@ function comment_author_email_link( $linktext = '', $before = '', $after = '' )
  * address and use it for their own means good and bad.
  *
  * @since 2.7.0
+ * @since 4.6.0 Added the `$comment` parameter.
  *
- * @param string $linktext Optional. Text to display instead of the comment author's email address.
- *                         Default empty.
- * @param string $before   Optional. Text or HTML to display before the email link. Default empty.
- * @param string $after    Optional. Text or HTML to display after the email link. Default empty.
- * @return string
+ * @param string         $linktext Optional. Text to display instead of the comment author's email address.
+ *                                 Default empty.
+ * @param string         $before   Optional. Text or HTML to display before the email link. Default empty.
+ * @param string         $after    Optional. Text or HTML to display after the email link. Default empty.
+ * @param int|WP_Comment $comment  Optional. Comment ID or WP_Comment object. Default is the current comment.
+ * @return string HTML markup for the comment author email link. By default, the email address is obfuscated
+ *                via the {@see 'comment_email'} filter with antispambot().
  */
-function get_comment_author_email_link( $linktext = '', $before = '', $after = '' ) {
-       $comment = get_comment();
+function get_comment_author_email_link( $linktext = '', $before = '', $after = '', $comment = null ) {
+       $comment = get_comment( $comment );
+
        /**
-        * Filter the comment author's email for display.
+        * Filters the comment author's email for display.
         *
         * Care should be taken to protect the email address and assure that email
         * harvesters do not capture your commenter's email address.
@@ -181,6 +188,7 @@ function get_comment_author_email_link( $linktext = '', $before = '', $after = '
         * @param WP_Comment $comment              The comment object.
         */
        $email = apply_filters( 'comment_email', $comment->comment_author_email, $comment );
+
        if ((!empty($email)) && ($email != '@')) {
        $display = ($linktext != '') ? $linktext : $email;
                $return  = $before;
@@ -216,7 +224,7 @@ function get_comment_author_link( $comment_ID = 0 ) {
                $return = "<a href='$url' rel='external nofollow' class='url'>$author</a>";
 
        /**
-        * Filter the comment author's link for display.
+        * Filters the comment author's link for display.
         *
         * @since 1.5.0
         * @since 4.1.0 The `$author` and `$comment_ID` parameters were added.
@@ -256,7 +264,7 @@ function get_comment_author_IP( $comment_ID = 0 ) {
        $comment = get_comment( $comment_ID );
 
        /**
-        * Filter the comment author's returned IP address.
+        * Filters the comment author's returned IP address.
         *
         * @since 1.5.0
         * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
@@ -293,11 +301,16 @@ function comment_author_IP( $comment_ID = 0 ) {
  */
 function get_comment_author_url( $comment_ID = 0 ) {
        $comment = get_comment( $comment_ID );
-       $url = ('http://' == $comment->comment_author_url) ? '' : $comment->comment_author_url;
-       $url = esc_url( $url, array('http', 'https') );
+       $url = '';
+       $id = 0;
+       if ( ! empty( $comment ) ) {
+               $author_url = ( 'http://' == $comment->comment_author_url ) ? '' : $comment->comment_author_url;
+               $url = esc_url( $author_url, array( 'http', 'https' ) );
+               $id = $comment->ID;
+       }
 
        /**
-        * Filter the comment author's URL.
+        * Filters the comment author's URL.
         *
         * @since 1.5.0
         * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
@@ -306,7 +319,7 @@ function get_comment_author_url( $comment_ID = 0 ) {
         * @param int        $comment_ID The comment ID.
         * @param WP_Comment $comment    The comment object.
         */
-       return apply_filters( 'get_comment_author_url', $url, $comment->comment_ID, $comment );
+       return apply_filters( 'get_comment_author_url', $url, $id, $comment );
 }
 
 /**
@@ -323,7 +336,7 @@ function comment_author_url( $comment_ID = 0 ) {
        $author_url = get_comment_author_url( $comment );
 
        /**
-        * Filter the comment author's URL for display.
+        * Filters the comment author's URL for display.
         *
         * @since 1.2.0
         * @since 4.1.0 The `$comment_ID` parameter was added.
@@ -345,17 +358,20 @@ function comment_author_url( $comment_ID = 0 ) {
  * in the order of $before, link, and finally $after.
  *
  * @since 1.5.0
+ * @since 4.6.0 Added the `$comment` parameter.
  *
- * @param string $linktext Optional. The text to display instead of the comment
- *                         author's email address. Default empty.
- * @param string $before   Optional. The text or HTML to display before the email link.
- *                         Default empty.
- * @param string $after    Optional. The text or HTML to display after the email link.
- *                         Default empty.
+ * @param string         $linktext Optional. The text to display instead of the comment
+ *                                 author's email address. Default empty.
+ * @param string         $before   Optional. The text or HTML to display before the email link.
+ *                                 Default empty.
+ * @param string         $after    Optional. The text or HTML to display after the email link.
+ *                                 Default empty.
+ * @param int|WP_Comment $comment  Optional. Comment ID or WP_Comment object.
+ *                                 Default is the current comment.
  * @return string The HTML link between the $before and $after parameters.
  */
-function get_comment_author_url_link( $linktext = '', $before = '', $after = '' ) {
-       $url = get_comment_author_url();
+function get_comment_author_url_link( $linktext = '', $before = '', $after = '', $comment = 0 ) {
+       $url = get_comment_author_url( $comment );
        $display = ($linktext != '') ? $linktext : $url;
        $display = str_replace( 'http://www.', '', $display );
        $display = str_replace( 'http://', '', $display );
@@ -367,7 +383,7 @@ function get_comment_author_url_link( $linktext = '', $before = '', $after = ''
        $return = "$before<a href='$url' rel='external'>$display</a>$after";
 
        /**
-        * Filter the comment author's returned URL link.
+        * Filters the comment author's returned URL link.
         *
         * @since 1.5.0
         *
@@ -380,16 +396,19 @@ function get_comment_author_url_link( $linktext = '', $before = '', $after = ''
  * Displays the HTML link of the url of the author of the current comment.
  *
  * @since 0.71
+ * @since 4.6.0 Added the `$comment` parameter.
  *
- * @param string $linktext Optional. Text to display instead of the comment author's
- *                         email address. Default empty.
- * @param string $before   Optional. Text or HTML to display before the email link.
- *                         Default empty.
- * @param string $after    Optional. Text or HTML to display after the email link.
- *                         Default empty.
+ * @param string         $linktext Optional. Text to display instead of the comment author's
+ *                                 email address. Default empty.
+ * @param string         $before   Optional. Text or HTML to display before the email link.
+ *                                 Default empty.
+ * @param string         $after    Optional. Text or HTML to display after the email link.
+ *                                 Default empty.
+ * @param int|WP_Comment $comment  Optional. Comment ID or WP_Comment object.
+ *                                 Default is the current comment.
  */
-function comment_author_url_link( $linktext = '', $before = '', $after = '' ) {
-       echo get_comment_author_url_link( $linktext, $before, $after );
+function comment_author_url_link( $linktext = '', $before = '', $after = '', $comment = 0 ) {
+       echo get_comment_author_url_link( $linktext, $before, $after, $comment );
 }
 
 /**
@@ -493,7 +512,7 @@ function get_comment_class( $class = '', $comment_id = null, $post_id = null ) {
        $classes = array_map('esc_attr', $classes);
 
        /**
-        * Filter the returned CSS classes for the current comment.
+        * Filters the returned CSS classes for the current comment.
         *
         * @since 2.7.0
         *
@@ -524,7 +543,7 @@ function get_comment_date( $d = '', $comment_ID = 0 ) {
        else
                $date = mysql2date($d, $comment->comment_date);
        /**
-        * Filter the returned comment date.
+        * Filters the returned comment date.
         *
         * @since 1.5.0
         *
@@ -569,7 +588,7 @@ function get_comment_excerpt( $comment_ID = 0 ) {
        $words = explode( ' ', $comment_text );
 
        /**
-        * Filter the amount of words used in the comment excerpt.
+        * Filters the amount of words used in the comment excerpt.
         *
         * @since 4.4.0
         *
@@ -587,7 +606,7 @@ function get_comment_excerpt( $comment_ID = 0 ) {
                $excerpt .= '&hellip;';
        }
        /**
-        * Filter the retrieved comment excerpt.
+        * Filters the retrieved comment excerpt.
         *
         * @since 1.5.0
         * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
@@ -613,7 +632,7 @@ function comment_excerpt( $comment_ID = 0 ) {
        $comment_excerpt = get_comment_excerpt( $comment );
 
        /**
-        * Filter the comment excerpt for display.
+        * Filters the comment excerpt for display.
         *
         * @since 1.2.0
         * @since 4.1.0 The `$comment_ID` parameter was added.
@@ -635,7 +654,7 @@ function get_comment_ID() {
        $comment = get_comment();
 
        /**
-        * Filter the returned comment ID.
+        * Filters the returned comment ID.
         *
         * @since 1.5.0
         * @since 4.1.0 The `$comment_ID` parameter was added.
@@ -670,12 +689,13 @@ function comment_ID() {
  * @param array               $args {
  *     An array of optional arguments to override the defaults.
  *
- *     @type string     $type      Passed to {@see get_page_of_comment()}.
+ *     @type string     $type      Passed to get_page_of_comment().
  *     @type int        $page      Current page of comments, for calculating comment pagination.
  *     @type int        $per_page  Per-page value for comment pagination.
- *     @type int        $max_depth Passed to {@see get_page_of_comment()}.
- *     @type int|string $cpage     Value to use for the comment's "comment-page" or "cpage" value. If provided, this
- *                                 value overrides any value calculated from `$page` and `$per_page`.
+ *     @type int        $max_depth Passed to get_page_of_comment().
+ *     @type int|string $cpage     Value to use for the comment's "comment-page" or "cpage" value.
+ *                                 If provided, this value overrides any value calculated from `$page`
+ *                                 and `$per_page`.
  * }
  * @return string The permalink to the given comment.
  */
@@ -684,7 +704,7 @@ function get_comment_link( $comment = null, $args = array() ) {
 
        $comment = get_comment($comment);
 
-       // Backwards compat
+       // Back-compat.
        if ( ! is_array( $args ) ) {
                $args = array( 'page' => $args );
        }
@@ -755,7 +775,7 @@ function get_comment_link( $comment = null, $args = array() ) {
        $link = $link . '#comment-' . $comment->comment_ID;
 
        /**
-        * Filter the returned single comment permalink.
+        * Filters the returned single comment permalink.
         *
         * @since 2.8.0
         * @since 4.4.0 Added the `$cpage` parameter.
@@ -783,7 +803,7 @@ function get_comments_link( $post_id = 0 ) {
        $comments_link = get_permalink( $post_id ) . $hash;
 
        /**
-        * Filter the returned post comments permalink.
+        * Filters the returned post comments permalink.
         *
         * @since 3.6.0
         *
@@ -805,7 +825,7 @@ function comments_link( $deprecated = '', $deprecated_2 = '' ) {
        if ( !empty( $deprecated ) )
                _deprecated_argument( __FUNCTION__, '0.72' );
        if ( !empty( $deprecated_2 ) )
-               _deprecated_argument( __FUNCTION__, '1.3' );
+               _deprecated_argument( __FUNCTION__, '1.3.0' );
        echo esc_url( get_comments_link() );
 }
 
@@ -828,7 +848,7 @@ function get_comments_number( $post_id = 0 ) {
        }
 
        /**
-        * Filter the returned comment count for a post.
+        * Filters the returned comment count for a post.
         *
         * @since 1.5.0
         *
@@ -850,7 +870,7 @@ function get_comments_number( $post_id = 0 ) {
  */
 function comments_number( $zero = false, $one = false, $more = false, $deprecated = '' ) {
        if ( ! empty( $deprecated ) ) {
-               _deprecated_argument( __FUNCTION__, '1.3' );
+               _deprecated_argument( __FUNCTION__, '1.3.0' );
        }
        echo get_comments_number_text( $zero, $one, $more );
 }
@@ -873,6 +893,27 @@ function get_comments_number_text( $zero = false, $one = false, $more = false )
                        $output = sprintf( _n( '%s Comment', '%s Comments', $number ), number_format_i18n( $number ) );
                } else {
                        // % Comments
+                       /* translators: If comment number in your language requires declension,
+                        * translate this to 'on'. Do not translate into your own language.
+                        */
+                       if ( 'on' === _x( 'off', 'Comment number declension: on or off' ) ) {
+                               $text = preg_replace( '#<span class="screen-reader-text">.+?</span>#', '', $more );
+                               $text = preg_replace( '/&.+?;/', '', $text ); // Kill entities
+                               $text = trim( strip_tags( $text ), '% ' );
+
+                               // Replace '% Comments' with a proper plural form
+                               if ( $text && ! preg_match( '/[0-9]+/', $text ) && false !== strpos( $more, '%' ) ) {
+                                       /* translators: %s: number of comments */
+                                       $new_text = _n( '%s Comment', '%s Comments', $number );
+                                       $new_text = trim( sprintf( $new_text, '' ) );
+
+                                       $more = str_replace( $text, $new_text, $more );
+                                       if ( false === strpos( $more, '%' ) ) {
+                                               $more = '% ' . $more;
+                                       }
+                               }
+                       }
+
                        $output = str_replace( '%', number_format_i18n( $number ), $more );
                }
        } elseif ( $number == 0 ) {
@@ -881,7 +922,7 @@ function get_comments_number_text( $zero = false, $one = false, $more = false )
                $output = ( false === $one ) ? __( '1 Comment' ) : $one;
        }
        /**
-        * Filter the comments count for display.
+        * Filters the comments count for display.
         *
         * @since 1.5.0
         *
@@ -911,7 +952,7 @@ function get_comment_text( $comment_ID = 0, $args = array() ) {
        $comment = get_comment( $comment_ID );
 
        /**
-        * Filter the text of a comment.
+        * Filters the text of a comment.
         *
         * @since 1.5.0
         *
@@ -941,7 +982,7 @@ function comment_text( $comment_ID = 0, $args = array() ) {
 
        $comment_text = get_comment_text( $comment, $args );
        /**
-        * Filter the text of a comment to be displayed.
+        * Filters the text of a comment to be displayed.
         *
         * @since 1.2.0
         *
@@ -975,7 +1016,7 @@ function get_comment_time( $d = '', $gmt = false, $translate = true ) {
                $date = mysql2date($d, $comment_date, $translate);
 
        /**
-        * Filter the returned comment time.
+        * Filters the returned comment time.
         *
         * @since 1.5.0
         *
@@ -1015,7 +1056,7 @@ function get_comment_type( $comment_ID = 0 ) {
                $comment->comment_type = 'comment';
 
        /**
-        * Filter the returned comment type.
+        * Filters the returned comment type.
         *
         * @since 1.5.0
         * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
@@ -1071,7 +1112,7 @@ function get_trackback_url() {
                $tb_url = get_option('siteurl') . '/wp-trackback.php?p=' . get_the_ID();
 
        /**
-        * Filter the returned trackback URL.
+        * Filters the returned trackback URL.
         *
         * @since 2.2.0
         *
@@ -1091,7 +1132,7 @@ function get_trackback_url() {
  */
 function trackback_url( $deprecated_echo = true ) {
        if ( true !== $deprecated_echo ) {
-               _deprecated_argument( __FUNCTION__, '2.5',
+               _deprecated_argument( __FUNCTION__, '2.5.0',
                        /* translators: %s: get_trackback_url() */
                        sprintf( __( 'Use %s instead if you do not want the value echoed.' ),
                                '<code>get_trackback_url()</code>'
@@ -1117,7 +1158,7 @@ function trackback_url( $deprecated_echo = true ) {
  */
 function trackback_rdf( $deprecated = '' ) {
        if ( ! empty( $deprecated ) ) {
-               _deprecated_argument( __FUNCTION__, '2.5' );
+               _deprecated_argument( __FUNCTION__, '2.5.0' );
        }
 
        if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && false !== stripos( $_SERVER['HTTP_USER_AGENT'], 'W3C_Validator' ) ) {
@@ -1153,7 +1194,7 @@ function comments_open( $post_id = null ) {
        $open = ( 'open' == $_post->comment_status );
 
        /**
-        * Filter whether the current post is open for comments.
+        * Filters whether the current post is open for comments.
         *
         * @since 2.5.0
         *
@@ -1178,7 +1219,7 @@ function pings_open( $post_id = null ) {
        $open = ( 'open' == $_post->ping_status );
 
        /**
-        * Filter whether the current post is open for pings.
+        * Filters whether the current post is open for pings.
         *
         * @since 2.5.0
         *
@@ -1219,10 +1260,10 @@ function wp_comment_form_unfiltered_html_nonce() {
  * the post does not have comments.
  *
  * Uses the WordPress database object to query for the comments. The comments
- * are passed through the 'comments_array' filter hook with the list of comments
+ * are passed through the {@see 'comments_array'} filter hook with the list of comments
  * and the post ID respectively.
  *
- * The $file path is passed through a filter hook called, 'comments_template'
+ * The `$file` path is passed through a filter hook called {@see 'comments_template'},
  * which includes the TEMPLATEPATH and $file combined. Tries the $filtered path
  * first and if it fails it will require the default comment template from the
  * default theme. If either does not exist, then the WordPress process will be
@@ -1386,7 +1427,7 @@ function comments_template( $file = '/comments.php', $separate_comments = false
        }
 
        /**
-        * Filter the comments array.
+        * Filters the comments array.
         *
         * @since 2.1.0
         *
@@ -1417,7 +1458,7 @@ function comments_template( $file = '/comments.php', $separate_comments = false
 
        $theme_template = STYLESHEETPATH . $file;
        /**
-        * Filter the path to the theme template file used for the comments template.
+        * Filters the path to the theme template file used for the comments template.
         *
         * @since 1.5.1
         *
@@ -1486,7 +1527,7 @@ function comments_popup_link( $zero = false, $one = false, $more = false, $css_c
        if ( 0 == $number ) {
                $respond_link = get_permalink() . '#respond';
                /**
-                * Filter the respond link when a post has no comments.
+                * Filters the respond link when a post has no comments.
                 *
                 * @since 4.4.0
                 *
@@ -1505,7 +1546,7 @@ function comments_popup_link( $zero = false, $one = false, $more = false, $css_c
 
        $attributes = '';
        /**
-        * Filter the comments link attributes for display.
+        * Filters the comments link attributes for display.
         *
         * @since 2.5.0
         *
@@ -1576,7 +1617,7 @@ function get_comment_reply_link( $args = array(), $comment = null, $post = null
        }
 
        /**
-        * Filter the comment reply link arguments.
+        * Filters the comment reply link arguments.
         *
         * @since 4.1.0
         *
@@ -1606,7 +1647,7 @@ function get_comment_reply_link( $args = array(), $comment = null, $post = null
        }
 
        /**
-        * Filter the comment reply link.
+        * Filters the comment reply link.
         *
         * @since 2.7.0
         *
@@ -1695,7 +1736,7 @@ function get_post_reply_link($args = array(), $post = null) {
        $formatted_link = $args['before'] . $link . $args['after'];
 
        /**
-        * Filter the formatted post comments link HTML.
+        * Filters the formatted post comments link HTML.
         *
         * @since 2.7.0
         *
@@ -1739,7 +1780,7 @@ function get_cancel_comment_reply_link( $text = '' ) {
        $formatted_link = '<a rel="nofollow" id="cancel-comment-reply-link" href="' . $link . '"' . $style . '>' . $text . '</a>';
 
        /**
-        * Filter the cancel comment reply link HTML.
+        * Filters the cancel comment reply link HTML.
         *
         * @since 2.7.0
         *
@@ -1778,7 +1819,7 @@ function get_comment_id_fields( $id = 0 ) {
        $result .= "<input type='hidden' name='comment_parent' id='comment_parent' value='$replytoid' />\n";
 
        /**
-        * Filter the returned comment id fields.
+        * Filters the returned comment id fields.
         *
         * @since 3.0.0
         *
@@ -1904,7 +1945,7 @@ function wp_list_comments( $args = array(), $comments = null ) {
        $r = wp_parse_args( $args, $defaults );
 
        /**
-        * Filter the arguments used in retrieving the comment list.
+        * Filters the arguments used in retrieving the comment list.
         *
         * @since 4.0.0
         *
@@ -1940,13 +1981,23 @@ function wp_list_comments( $args = array(), $comments = null ) {
 
                        $current_per_page = get_query_var( 'comments_per_page' );
                        if ( $r['page'] != $current_cpage || $r['per_page'] != $current_per_page ) {
-
-                               $comments = get_comments( array(
+                               $comment_args = array(
                                        'post_id' => get_the_ID(),
                                        'orderby' => 'comment_date_gmt',
                                        'order' => 'ASC',
-                                       'status' => 'all',
-                               ) );
+                                       'status' => 'approve',
+                               );
+
+                               if ( is_user_logged_in() ) {
+                                       $comment_args['include_unapproved'] = get_current_user_id();
+                               } else {
+                                       $commenter = wp_get_current_commenter();
+                                       if ( $commenter['comment_author_email'] ) {
+                                               $comment_args['include_unapproved'] = $commenter['comment_author_email'];
+                                       }
+                               }
+
+                               $comments = get_comments( $comment_args );
 
                                if ( 'all' != $r['type'] ) {
                                        $comments_by_type = separate_comments( $comments );
@@ -2049,13 +2100,13 @@ function wp_list_comments( $args = array(), $comments = null ) {
 }
 
 /**
- * Output a complete commenting form for use within a template.
+ * Outputs a complete commenting form for use within a template.
  *
  * Most strings and form fields may be controlled through the $args array passed
- * into the function, while you may also choose to use the comment_form_default_fields
+ * into the function, while you may also choose to use the {@see 'comment_form_default_fields'}
  * filter to modify the array of default fields if you'd just like to add a new
  * one or remove a single field. All fields are also individually passed through
- * a filter of the form comment_form_field_$name where $name is the key used
+ * a filter of the {@see 'comment_form_field_$name'} where $name is the key used
  * in the array of fields.
  *
  * @since 3.0.0
@@ -2065,12 +2116,13 @@ function wp_list_comments( $args = array(), $comments = null ) {
  *              'cancel_reply_before', and 'cancel_reply_after' arguments.
  * @since 4.5.0 The 'author', 'email', and 'url' form fields are limited to 245, 100,
  *              and 200 characters, respectively.
+ * @since 4.6.0 Introduced the 'action' argument.
  *
  * @param array       $args {
  *     Optional. Default arguments and form fields to override.
  *
  *     @type array $fields {
- *         Default comment fields, filterable by default via the 'comment_form_default_fields' hook.
+ *         Default comment fields, filterable by default via the {@see 'comment_form_default_fields'} hook.
  *
  *         @type string $author Comment author field HTML.
  *         @type string $email  Comment author email field HTML.
@@ -2083,6 +2135,7 @@ function wp_list_comments( $args = array(), $comments = null ) {
  *                                        if the user is not logged in.
  *                                        Default 'Your email address will not be published.'.
  *     @type string $comment_notes_after  HTML element for a message displayed after the textarea field.
+ *     @type string $action               The comment form element action attribute. Default '/wp-comments-post.php'.
  *     @type string $id_form              The comment form element id attribute. Default 'commentform'.
  *     @type string $id_submit            The comment submit element id attribute. Default 'submit'.
  *     @type string $class_form           The comment form element class attribute. Default 'comment-form'.
@@ -2136,7 +2189,7 @@ function comment_form( $args = array(), $post_id = null ) {
        $required_text = sprintf( ' ' . __('Required fields are marked %s'), '<span class="required">*</span>' );
 
        /**
-        * Filter the default comment form fields.
+        * Filters the default comment form fields.
         *
         * @since 3.0.0
         *
@@ -2164,6 +2217,7 @@ function comment_form( $args = array(), $post_id = null ) {
                                          ) . '</p>',
                'comment_notes_before' => '<p class="comment-notes"><span id="email-notes">' . __( 'Your email address will not be published.' ) . '</span>'. ( $req ? $required_text : '' ) . '</p>',
                'comment_notes_after'  => '',
+               'action'               => site_url( '/wp-comments-post.php' ),
                'id_form'              => 'commentform',
                'id_submit'            => 'submit',
                'class_form'           => 'comment-form',
@@ -2183,9 +2237,9 @@ function comment_form( $args = array(), $post_id = null ) {
        );
 
        /**
-        * Filter the comment form default arguments.
+        * Filters the comment form default arguments.
         *
-        * Use 'comment_form_default_fields' to filter the comment fields.
+        * Use {@see 'comment_form_default_fields'} to filter the comment fields.
         *
         * @since 3.0.0
         *
@@ -2228,7 +2282,7 @@ function comment_form( $args = array(), $post_id = null ) {
                                 */
                                do_action( 'comment_form_must_log_in_after' );
                        else : ?>
-                               <form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>" class="<?php echo esc_attr( $args['class_form'] ); ?>"<?php echo $html5 ? ' novalidate' : ''; ?>>
+                               <form action="<?php echo esc_url( $args['action'] ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>" class="<?php echo esc_attr( $args['class_form'] ); ?>"<?php echo $html5 ? ' novalidate' : ''; ?>>
                                        <?php
                                        /**
                                         * Fires at the top of the comment form, inside the form tag.
@@ -2239,7 +2293,7 @@ function comment_form( $args = array(), $post_id = null ) {
 
                                        if ( is_user_logged_in() ) :
                                                /**
-                                                * Filter the 'logged in' message for the comment form for display.
+                                                * Filters the 'logged in' message for the comment form for display.
                                                 *
                                                 * @since 3.0.0
                                                 *
@@ -2273,7 +2327,7 @@ function comment_form( $args = array(), $post_id = null ) {
                                        $comment_fields = array( 'comment' => $args['comment_field'] ) + (array) $args['fields'];
 
                                        /**
-                                        * Filter the comment form fields, including the textarea.
+                                        * Filters the comment form fields, including the textarea.
                                         *
                                         * @since 4.4.0
                                         *
@@ -2293,7 +2347,7 @@ function comment_form( $args = array(), $post_id = null ) {
                                                if ( 'comment' === $name ) {
 
                                                        /**
-                                                        * Filter the content of the comment textarea field for display.
+                                                        * Filters the content of the comment textarea field for display.
                                                         *
                                                         * @since 3.0.0
                                                         *
@@ -2315,7 +2369,7 @@ function comment_form( $args = array(), $post_id = null ) {
                                                        }
 
                                                        /**
-                                                        * Filter a comment form field for display.
+                                                        * Filters a comment form field for display.
                                                         *
                                                         * The dynamic portion of the filter hook, `$name`, refers to the name
                                                         * of the comment form field. Such as 'author', 'email', or 'url'.
@@ -2346,7 +2400,7 @@ function comment_form( $args = array(), $post_id = null ) {
                                        );
 
                                        /**
-                                        * Filter the submit button for the comment form to display.
+                                        * Filters the submit button for the comment form to display.
                                         *
                                         * @since 4.2.0
                                         *
@@ -2362,7 +2416,7 @@ function comment_form( $args = array(), $post_id = null ) {
                                        );
 
                                        /**
-                                        * Filter the submit field for the comment form to display.
+                                        * Filters the submit field for the comment form to display.
                                         *
                                         * The submit field includes the submit button, hidden fields for the
                                         * comment form, and any wrapper markup.
index 92354d6f17c0e99ed4a5f8abec5fcb8358aed4fb..dad3f7639aa0069d58b8b3bc6f2ac8aff733deb2 100644 (file)
@@ -51,11 +51,11 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $
                $num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
 
                /**
-                * Filter the maximum number of links allowed in a comment.
+                * Filters the number of links found in a comment.
                 *
                 * @since 3.0.0
                 *
-                * @param int    $num_links The number of links allowed.
+                * @param int    $num_links The number of links found.
                 * @param string $url       Comment author's URL. Included in allowed links total.
                 */
                $num_links = apply_filters( 'comment_max_links_url', $num_links, $url );
@@ -128,11 +128,10 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $
  * Retrieve the approved comments for post $post_id.
  *
  * @since 2.0.0
- * @since 4.1.0 Refactored to leverage {@see WP_Comment_Query} over a direct query.
+ * @since 4.1.0 Refactored to leverage WP_Comment_Query over a direct query.
  *
  * @param  int   $post_id The ID of the post.
- * @param  array $args    Optional. See {@see WP_Comment_Query::query()} for information
- *                        on accepted arguments.
+ * @param  array $args    Optional. See WP_Comment_Query::query() for information on accepted arguments.
  * @return int|array $comments The approved comments, or number of comments if `$count`
  *                             argument is true.
  */
@@ -210,7 +209,7 @@ function get_comment( &$comment = null, $output = OBJECT ) {
  *
  * @since 2.7.0
  *
- * @param string|array $args Optional. Array or string of arguments. See {@see WP_Comment_Query::parse_query()}
+ * @param string|array $args Optional. Array or string of arguments. See WP_Comment_Query::parse_query()
  *                           for information on accepted arguments. Default empty.
  * @return int|array List of comments or number of found comments if `$count` argument is true.
  */
@@ -271,7 +270,7 @@ function get_default_comment_status( $post_type = 'post', $comment_type = 'comme
        }
 
        /**
-        * Filter the default comment status for the given post type.
+        * Filters the default comment status for the given post type.
         *
         * @since 4.3.0
         *
@@ -324,9 +323,8 @@ function get_lastcommentmodified($timezone = 'server') {
 /**
  * The amount of comments in a post or total comments.
  *
- * A lot like {@link wp_count_comments()}, in that they both return comment
- * stats (albeit with different types). The {@link wp_count_comments()} actual
- * caches, but this function does not.
+ * A lot like wp_count_comments(), in that they both return comment stats (albeit with different types).
+ * The wp_count_comments() actually caches, but this function does not.
  *
  * @since 2.0.0
  *
@@ -506,7 +504,7 @@ function wp_set_comment_cookies($comment, $user) {
                return;
 
        /**
-        * Filter the lifetime of the comment cookie in seconds.
+        * Filters the lifetime of the comment cookie in seconds.
         *
         * @since 2.8.0
         *
@@ -530,7 +528,7 @@ function wp_set_comment_cookies($comment, $user) {
 function sanitize_comment_cookies() {
        if ( isset( $_COOKIE['comment_author_' . COOKIEHASH] ) ) {
                /**
-                * Filter the comment author's name cookie before it is set.
+                * Filters the comment author's name cookie before it is set.
                 *
                 * When this filter hook is evaluated in wp_filter_comment(),
                 * the comment author's name string is passed.
@@ -547,7 +545,7 @@ function sanitize_comment_cookies() {
 
        if ( isset( $_COOKIE['comment_author_email_' . COOKIEHASH] ) ) {
                /**
-                * Filter the comment author's email cookie before it is set.
+                * Filters the comment author's email cookie before it is set.
                 *
                 * When this filter hook is evaluated in wp_filter_comment(),
                 * the comment author's email string is passed.
@@ -564,7 +562,7 @@ function sanitize_comment_cookies() {
 
        if ( isset( $_COOKIE['comment_author_url_' . COOKIEHASH] ) ) {
                /**
-                * Filter the comment author's URL cookie before it is set.
+                * Filters the comment author's URL cookie before it is set.
                 *
                 * When this filter hook is evaluated in wp_filter_comment(),
                 * the comment author's URL string is passed.
@@ -602,7 +600,7 @@ function wp_allow_comment( $commentdata ) {
        );
        if ( $commentdata['comment_author_email'] ) {
                $dupe .= $wpdb->prepare(
-                       "OR comment_author_email = %s ",
+                       "AND comment_author_email = %s ",
                        wp_unslash( $commentdata['comment_author_email'] )
                );
        }
@@ -698,7 +696,7 @@ function wp_allow_comment( $commentdata ) {
        }
 
        /**
-        * Filter a comment's approval status before it is set.
+        * Filters a comment's approval status before it is set.
         *
         * @since 2.1.0
         *
@@ -750,7 +748,7 @@ function check_comment_flood_db( $ip, $email, $date ) {
                $time_lastcomment = mysql2date('U', $lasttime, false);
                $time_newcomment  = mysql2date('U', $date, false);
                /**
-                * Filter the comment flood status.
+                * Filters the comment flood status.
                 *
                 * @since 2.1.0
                 *
@@ -1057,6 +1055,10 @@ function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_age
        $mod_keys = trim( get_option('blacklist_keys') );
        if ( '' == $mod_keys )
                return false; // If moderation keys are empty
+
+       // Ensure HTML tags are not being used to bypass the blacklist.
+       $comment_without_html = wp_strip_all_tags( $comment );
+
        $words = explode("\n", $mod_keys );
 
        foreach ( (array) $words as $word ) {
@@ -1075,6 +1077,7 @@ function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_age
                        || preg_match($pattern, $email)
                        || preg_match($pattern, $url)
                        || preg_match($pattern, $comment)
+                       || preg_match($pattern, $comment_without_html)
                        || preg_match($pattern, $user_ip)
                        || preg_match($pattern, $user_agent)
                 )
@@ -1103,7 +1106,7 @@ function wp_count_comments( $post_id = 0 ) {
        $post_id = (int) $post_id;
 
        /**
-        * Filter the comments count for a given post.
+        * Filters the comments count for a given post.
         *
         * @since 2.7.0
         *
@@ -1411,14 +1414,12 @@ function wp_get_comment_status($comment_id) {
  *
  * Calls hooks for comment status transitions. If the new comment status is not the same
  * as the previous comment status, then two hooks will be ran, the first is
- * 'transition_comment_status' with new status, old status, and comment data. The
- * next action called is 'comment_OLDSTATUS_to_NEWSTATUS' the NEWSTATUS is the
- * $new_status parameter and the OLDSTATUS is $old_status parameter; it has the
+ * {@see 'transition_comment_status'} with new status, old status, and comment data. The
+ * next action called is {@see comment_$old_status_to_$new_status'}. It has the
  * comment data.
  *
  * The final action will run whether or not the comment statuses are the same. The
- * action is named 'comment_NEWSTATUS_COMMENTTYPE', NEWSTATUS is from the $new_status
- * parameter and COMMENTTYPE is comment_type comment data.
+ * action is named {@see 'comment_$new_status_$comment->comment_type'}.
  *
  * @since 2.7.0
  *
@@ -1510,7 +1511,7 @@ function wp_get_current_commenter() {
                $comment_author_url = $_COOKIE['comment_author_url_'.COOKIEHASH];
 
        /**
-        * Filter the current commenter's name, email, and URL.
+        * Filters the current commenter's name, email, and URL.
         *
         * @since 3.1.0
         *
@@ -1592,6 +1593,9 @@ function wp_insert_comment( $commentdata ) {
        if ( $comment_approved == 1 ) {
                wp_update_comment_count( $comment_post_ID );
        }
+
+       clean_comment_cache( $id );
+
        $comment = get_comment( $id );
 
        // If metadata is provided, store it.
@@ -1611,8 +1615,6 @@ function wp_insert_comment( $commentdata ) {
         */
        do_action( 'wp_insert_comment', $id, $comment );
 
-       wp_cache_set( 'last_changed', microtime(), 'comment' );
-
        return $id;
 }
 
@@ -1631,7 +1633,7 @@ function wp_insert_comment( $commentdata ) {
 function wp_filter_comment($commentdata) {
        if ( isset( $commentdata['user_ID'] ) ) {
                /**
-                * Filter the comment author's user id before it is set.
+                * Filters the comment author's user id before it is set.
                 *
                 * The first time this filter is evaluated, 'user_ID' is checked
                 * (for back-compat), followed by the standard 'user_id' value.
@@ -1647,7 +1649,7 @@ function wp_filter_comment($commentdata) {
        }
 
        /**
-        * Filter the comment author's browser user agent before it is set.
+        * Filters the comment author's browser user agent before it is set.
         *
         * @since 1.5.0
         *
@@ -1657,7 +1659,7 @@ function wp_filter_comment($commentdata) {
        /** This filter is documented in wp-includes/comment.php */
        $commentdata['comment_author'] = apply_filters( 'pre_comment_author_name', $commentdata['comment_author'] );
        /**
-        * Filter the comment content before it is set.
+        * Filters the comment content before it is set.
         *
         * @since 1.5.0
         *
@@ -1665,7 +1667,7 @@ function wp_filter_comment($commentdata) {
         */
        $commentdata['comment_content'] = apply_filters( 'pre_comment_content', $commentdata['comment_content'] );
        /**
-        * Filter the comment author's IP before it is set.
+        * Filters the comment author's IP before it is set.
         *
         * @since 1.5.0
         *
@@ -1702,12 +1704,13 @@ function wp_throttle_comment_flood($block, $time_lastcomment, $time_newcomment)
  * Adds a new comment to the database.
  *
  * Filters new comment to ensure that the fields are sanitized and valid before
- * inserting comment into database. Calls 'comment_post' action with comment ID
- * and whether comment is approved by WordPress. Also has 'preprocess_comment'
+ * inserting comment into database. Calls {@see 'comment_post'} action with comment ID
+ * and whether comment is approved by WordPress. Also has {@see 'preprocess_comment'}
  * filter for processing the comment data before the function handles it.
  *
- * We use REMOTE_ADDR here directly. If you are behind a proxy, you should ensure
+ * We use `REMOTE_ADDR` here directly. If you are behind a proxy, you should ensure
  * that it is properly set, such as in wp-config.php, for your environment.
+ *
  * See {@link https://core.trac.wordpress.org/ticket/9235}
  *
  * @since 1.5.0
@@ -1747,7 +1750,7 @@ function wp_new_comment( $commentdata ) {
        $prefiltered_user_id = ( isset( $commentdata['user_id'] ) ) ? (int) $commentdata['user_id'] : 0;
 
        /**
-        * Filter a comment's data before it is sanitized and inserted into the database.
+        * Filters a comment's data before it is sanitized and inserted into the database.
         *
         * @since 1.5.0
         *
@@ -1864,7 +1867,7 @@ function wp_new_comment_notify_postauthor( $comment_ID ) {
        $maybe_notify = get_option( 'comments_notify' );
 
        /**
-        * Filter whether to send the post author new comment notification emails,
+        * Filters whether to send the post author new comment notification emails,
         * overriding the site setting.
         *
         * @since 4.4.0
@@ -1893,7 +1896,7 @@ function wp_new_comment_notify_postauthor( $comment_ID ) {
 /**
  * Sets the status of a comment.
  *
- * The 'wp_set_comment_status' action is called after the comment is handled.
+ * The {@see 'wp_set_comment_status'} action is called after the comment is handled.
  * If the comment status is not in the list, then false is returned.
  *
  * @since 1.0.0
@@ -2000,7 +2003,7 @@ function wp_update_comment($commentarr) {
        $data = wp_unslash( $commentarr );
 
        /**
-        * Filter the comment content before it is updated in the database.
+        * Filters the comment content before it is updated in the database.
         *
         * @since 1.5.0
         *
@@ -2032,10 +2035,12 @@ function wp_update_comment($commentarr) {
         * The hook also fires immediately before comment status transition hooks are fired.
         *
         * @since 1.2.0
+        * @since 4.6.0 Added the `$data` parameter.
         *
-        * @param int $comment_ID The comment ID.
+        * @param int   $comment_ID The comment ID.
+        * @param array $data       Comment data.
         */
-       do_action( 'edit_comment', $comment_ID );
+       do_action( 'edit_comment', $comment_ID, $data );
        $comment = get_comment($comment_ID);
        wp_transition_comment_status($comment->comment_approved, $old_status, $comment);
        return $rval;
@@ -2195,7 +2200,7 @@ function wp_update_comment_count_now($post_id) {
  */
 function discover_pingback_server_uri( $url, $deprecated = '' ) {
        if ( !empty( $deprecated ) )
-               _deprecated_argument( __FUNCTION__, '2.7' );
+               _deprecated_argument( __FUNCTION__, '2.7.0' );
 
        $pingback_str_dquote = 'rel="pingback"';
        $pingback_str_squote = 'rel=\'pingback\'';
@@ -2421,7 +2426,7 @@ function pingback($content, $post_ID) {
                        $client = new WP_HTTP_IXR_Client($pingback_server_url);
                        $client->timeout = 3;
                        /**
-                        * Filter the user agent sent when pinging-back a URL.
+                        * Filters the user agent sent when pinging-back a URL.
                         *
                         * @since 2.9.0
                         *
@@ -2543,7 +2548,7 @@ function pingback_ping_source_uri( $source_uri ) {
  * which reports that the pingback is already registered.
  *
  * @since 3.5.1
- * @link http://www.hixie.ch/specs/pingback/pingback#TOC3
+ * @link https://www.hixie.ch/specs/pingback/pingback#TOC3
  *
  * @param IXR_Error $ixr_error
  * @return IXR_Error
@@ -2651,7 +2656,7 @@ function _close_comments_for_old_posts( $posts, $query ) {
                return $posts;
 
        /**
-        * Filter the list of post types to automatically close comments for.
+        * Filters the list of post types to automatically close comments for.
         *
         * @since 3.2.0
         *
index cfb0f70aa8c4311c27524d44cc59d9c2a08679b7..696e2b8ea968153fe58ac04c261055994570a5a9 100644 (file)
@@ -421,7 +421,7 @@ if ( ! interface_exists( 'JsonSerializable' ) ) {
         *
         * Compatibility shim for PHP <5.4
         *
-        * @link http://php.net/jsonserializable
+        * @link https://secure.php.net/jsonserializable
         *
         * @since 4.4.0
         */
@@ -434,3 +434,147 @@ if ( ! interface_exists( 'JsonSerializable' ) ) {
 if ( ! function_exists( 'random_int' ) ) {
        require ABSPATH . WPINC . '/random_compat/random.php';
 }
+
+if ( ! function_exists( 'array_replace_recursive' ) ) :
+       /**
+        * PHP-agnostic version of {@link array_replace_recursive()}.
+        *
+        * The array_replace_recursive() function is a PHP 5.3 function. WordPress
+        * currently supports down to PHP 5.2, so this method is a workaround
+        * for PHP 5.2.
+        *
+        * Note: array_replace_recursive() supports infinite arguments, but for our use-
+        * case, we only need to support two arguments.
+        *
+        * Subject to removal once WordPress makes PHP 5.3.0 the minimum requirement.
+        *
+        * @since 4.5.3
+        *
+        * @see http://php.net/manual/en/function.array-replace-recursive.php#109390
+        *
+        * @param  array $base         Array with keys needing to be replaced.
+        * @param  array $replacements Array with the replaced keys.
+        *
+        * @return array
+        */
+       function array_replace_recursive( $base = array(), $replacements = array() ) {
+               foreach ( array_slice( func_get_args(), 1 ) as $replacements ) {
+                       $bref_stack = array( &$base );
+                       $head_stack = array( $replacements );
+
+                       do {
+                               end( $bref_stack );
+
+                               $bref = &$bref_stack[ key( $bref_stack ) ];
+                               $head = array_pop( $head_stack );
+
+                               unset( $bref_stack[ key( $bref_stack ) ] );
+
+                               foreach ( array_keys( $head ) as $key ) {
+                                       if ( isset( $key, $bref ) &&
+                                            isset( $bref[ $key ] ) && is_array( $bref[ $key ] ) &&
+                                            isset( $head[ $key ] ) && is_array( $head[ $key ] )
+                                       ) {
+                                               $bref_stack[] = &$bref[ $key ];
+                                               $head_stack[] = $head[ $key ];
+                                       } else {
+                                               $bref[ $key ] = $head[ $key ];
+                                       }
+                               }
+                       } while ( count( $head_stack ) );
+               }
+
+               return $base;
+       }
+endif;
+
+// SPL can be disabled on PHP 5.2
+if ( ! function_exists( 'spl_autoload_register' ) ):
+       $_wp_spl_autoloaders = array();
+
+       /**
+        * Autoloader compatibility callback.
+        *
+        * @since 4.6.0
+        *
+        * @param string $classname Class to attempt autoloading.
+        */
+       function __autoload( $classname ) {
+               global $_wp_spl_autoloaders;
+               foreach ( $_wp_spl_autoloaders as $autoloader ) {
+                       if ( ! is_callable( $autoloader ) ) {
+                               // Avoid the extra warning if the autoloader isn't callable.
+                               continue;
+                       }
+
+                       call_user_func( $autoloader, $classname );
+
+                       // If it has been autoloaded, stop processing.
+                       if ( class_exists( $classname, false ) ) {
+                               return;
+                       }
+               }
+       }
+
+       /**
+        * Registers a function to be autoloaded.
+        *
+        * @since 4.6.0
+        *
+        * @param callable $autoload_function The function to register.
+        * @param bool     $throw             Optional. Whether the function should throw an exception
+        *                                    if the function isn't callable. Default true.
+        * @param bool     $prepend           Whether the function should be prepended to the stack.
+        *                                    Default false.
+        */
+       function spl_autoload_register( $autoload_function, $throw = true, $prepend = false ) {
+               if ( $throw && ! is_callable( $autoload_function ) ) {
+                       // String not translated to match PHP core.
+                       throw new Exception( 'Function not callable' );
+               }
+
+               global $_wp_spl_autoloaders;
+
+               // Don't allow multiple registration.
+               if ( in_array( $autoload_function, $_wp_spl_autoloaders ) ) {
+                       return;
+               }
+
+               if ( $prepend ) {
+                       array_unshift( $_wp_spl_autoloaders, $autoload_function );
+               } else {
+                       $_wp_spl_autoloaders[] = $autoload_function;
+               }
+       }
+
+       /**
+        * Unregisters an autoloader function.
+        *
+        * @since 4.6.0
+        *
+        * @param callable $function The function to unregister.
+        * @return bool True if the function was unregistered, false if it could not be.
+        */
+       function spl_autoload_unregister( $function ) {
+               global $_wp_spl_autoloaders;
+               foreach ( $_wp_spl_autoloaders as &$autoloader ) {
+                       if ( $autoloader === $function ) {
+                               unset( $autoloader );
+                               return true;
+                       }
+               }
+
+               return false;
+       }
+
+       /**
+        * Retrieves the registered autoloader functions.
+        *
+        * @since 4.6.0
+        *
+        * @return array List of autoloader functions.
+        */
+       function spl_autoload_functions() {
+               return $GLOBALS['_wp_spl_autoloaders'];
+       }
+endif;
index 493e0ec3cdaa6c7b16b6236e53bbc988e63ae1b5..a4d160f70c75f5c4846221144207f08b7cae6a9e 100644 (file)
  * a time which you specify. The action will fire off when someone visits your
  * WordPress site, if the schedule time has passed.
  *
+ * Note that scheduling an event to occur within 10 minutes of an existing event
+ * with the same action hook will be ignored, unless you pass unique `$args` values
+ * for each scheduled event.
+ *
  * @since 2.1.0
  * @link https://codex.wordpress.org/Function_Reference/wp_schedule_single_event
  *
@@ -35,7 +39,7 @@ function wp_schedule_single_event( $timestamp, $hook, $args = array()) {
        $crons = _get_cron_array();
        $event = (object) array( 'hook' => $hook, 'timestamp' => $timestamp, 'schedule' => false, 'args' => $args );
        /**
-        * Filter a single event before it is scheduled.
+        * Filters a single event before it is scheduled.
         *
         * @since 3.1.0
         *
@@ -62,7 +66,7 @@ function wp_schedule_single_event( $timestamp, $hook, $args = array()) {
  * visits your WordPress site, if the scheduled time has passed.
  *
  * Valid values for the recurrence are hourly, daily and twicedaily. These can
- * be extended using the cron_schedules filter in wp_get_schedules().
+ * be extended using the {@see 'cron_schedules'} filter in wp_get_schedules().
  *
  * Use wp_next_scheduled() to prevent duplicates
  *
@@ -191,7 +195,7 @@ function wp_clear_scheduled_hook( $hook, $args = array() ) {
        // Backward compatibility
        // Previously this function took the arguments as discrete vars rather than an array like the rest of the API
        if ( !is_array($args) ) {
-               _deprecated_argument( __FUNCTION__, '3.0', __('This argument has changed to an array to match the behavior of the other cron functions.') );
+               _deprecated_argument( __FUNCTION__, '3.0.0', __('This argument has changed to an array to match the behavior of the other cron functions.') );
                $args = array_slice( func_get_args(), 1 );
        }
 
@@ -295,7 +299,7 @@ function spawn_cron( $gmt_time = 0 ) {
        set_transient( 'doing_cron', $doing_wp_cron );
 
        /**
-        * Filter the cron request arguments.
+        * Filters the cron request arguments.
         *
         * @since 3.5.0
         * @since 4.5.0 The `$doing_wp_cron` parameter was added.
@@ -363,7 +367,7 @@ function wp_cron() {
  * Retrieve supported and filtered Cron recurrences.
  *
  * The supported recurrences are 'hourly' and 'daily'. A plugin may add more by
- * hooking into the 'cron_schedules' filter. The filter accepts an array of
+ * hooking into the {@see 'cron_schedules'} filter. The filter accepts an array of
  * arrays. The outer array has a key that is the name of the schedule or for
  * example 'weekly'. The value is an array with two keys, one is 'interval' and
  * the other is 'display'.
@@ -396,7 +400,7 @@ function wp_get_schedules() {
                'daily'      => array( 'interval' => DAY_IN_SECONDS,       'display' => __( 'Once Daily' ) ),
        );
        /**
-        * Filter the non-default cron schedules.
+        * Filters the non-default cron schedules.
         *
         * @since 2.1.0
         *
@@ -457,7 +461,7 @@ function _get_cron_array()  {
  * @since 2.1.0
  * @access private
  *
- * @param array $cron Cron info array from {@link _get_cron_array()}.
+ * @param array $cron Cron info array from _get_cron_array().
  */
 function _set_cron_array($cron) {
        $cron['version'] = 2;
@@ -472,7 +476,7 @@ function _set_cron_array($cron) {
  * @since 2.1.0
  * @access private
  *
- * @param array $cron Cron info array from {@link _get_cron_array()}.
+ * @param array $cron Cron info array from _get_cron_array().
  * @return array An upgraded Cron info array.
  */
 function _upgrade_cron_array($cron) {
index 014caf7ef03086e0659ca05aee8090225bc7f820..c02e1efc6ae54ef54b8386a51412c0a7d1ca2563 100644 (file)
@@ -7,7 +7,10 @@
        text-shadow: none;
        text-transform: none;
        letter-spacing: normal;
-       font: normal 13px/32px "Open Sans", sans-serif;
+       font-size: 13px;
+       font-weight: 400;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+       line-height: 32px;
        -webkit-border-radius: 0;
        border-radius: 0;
        -webkit-box-sizing: content-box;
@@ -79,7 +82,10 @@ html:lang(he-il) .rtl #wpadminbar *  {
 #wpadminbar {
        direction: rtl;
        color: #ccc;
-       font: normal 13px/32px "Open Sans", sans-serif;
+       font-size: 13px;
+       font-weight: 400;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+       line-height: 32px;
        height: 32px;
        position: fixed;
        top: 0;
@@ -176,7 +182,7 @@ html:lang(he-il) .rtl #wpadminbar *  {
 }
 
 #wpadminbar .quicklinks .menupop ul li a strong {
-       font-weight: bold;
+       font-weight: 600;
 }
 
 #wpadminbar .quicklinks .menupop ul li .ab-item,
@@ -280,6 +286,8 @@ html:lang(he-il) .rtl #wpadminbar *  {
 #wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover > a,
 #wpadminbar .quicklinks .menupop.hover ul li a:hover,
 #wpadminbar .quicklinks .menupop.hover ul li a:focus,
+#wpadminbar .quicklinks .menupop.hover ul li div[tabindex]:hover,
+#wpadminbar .quicklinks .menupop.hover ul li div[tabindex]:focus,
 #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover,
 #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,
 #wpadminbar li:hover .ab-icon:before,
@@ -360,7 +368,7 @@ html:lang(he-il) .rtl #wpadminbar *  {
        display: inline;
        padding: 2px 5px;
        font-size: 10px;
-       font-weight: bold;
+       font-weight: 600;
        -webkit-border-radius: 10px;
        border-radius: 10px;
 }
@@ -527,7 +535,7 @@ html:lang(he-il) .rtl #wpadminbar *  {
 
 #wpadminbar #wp-admin-bar-my-sites > .ab-item:before,
 #wpadminbar #wp-admin-bar-site-name > .ab-item:before {
-       content: "\f112";
+       content: "\f541";
        top: 2px;
 }
 
@@ -618,7 +626,9 @@ html:lang(he-il) .rtl #wpadminbar *  {
 #wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input {
        position: relative;
        z-index: 30;
-       font: 13px/24px "Open Sans", sans-serif;
+       font-size: 13px;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+       line-height: 24px;
        height: 24px;
        width: 24px;
        max-width: none;
@@ -712,7 +722,7 @@ html:lang(he-il) .rtl #wpadminbar *  {
        width: auto;
        display: block;
        font-size: 14px;
-       font-weight: bold;
+       font-weight: 600;
        padding: 15px 23px 14px;
        background: #f1f1f1;
        color: #0073aa;
@@ -798,7 +808,10 @@ html:lang(he-il) .rtl #wpadminbar *  {
        }
 
        #wpadminbar * {
-               font: normal 14px/32px "Open Sans", sans-serif;
+               font-size: 14px;
+               font-weight: 400;
+               font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+               line-height: 32px;
        }
 
        #wpadminbar .quicklinks > ul > li > a,
index bc497b1b731085cdb603afaf7b6541adb27f35f6..03cc3079ccc5041582b949eef02f6c745dd9b72a 100644 (file)
@@ -1 +1 @@
-#wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-shadow:none;text-transform:none;letter-spacing:normal;font:400 13px/32px "Open Sans",sans-serif;-webkit-border-radius:0;border-radius:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-transition:none;transition:none;-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto}.rtl #wpadminbar *{font-family:Tahoma,sans-serif}html:lang(he-il) .rtl #wpadminbar *{font-family:Arial,sans-serif}#wpadminbar .ab-empty-item{cursor:default;outline:0}#wpadminbar .ab-empty-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#eee}#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wpadminbar ul li:after,#wpadminbar ul li:before{content:normal}#wpadminbar a,#wpadminbar a img,#wpadminbar a img:hover,#wpadminbar a:hover{outline:0;border:none;text-decoration:none;background:0 0}#wpadminbar a:active,#wpadminbar a:focus,#wpadminbar div,#wpadminbar input[type=text],#wpadminbar input[type=password],#wpadminbar input[type=number],#wpadminbar input[type=search],#wpadminbar input[type=email],#wpadminbar input[type=url],#wpadminbar select,#wpadminbar textarea{-webkit-box-shadow:none;box-shadow:none;outline:0}#wpadminbar{direction:rtl;color:#ccc;font:400 13px/32px "Open Sans",sans-serif;height:32px;position:fixed;top:0;right:0;width:100%;min-width:600px;z-index:99999;background:#23282d}#wpadminbar .ab-sub-wrapper,#wpadminbar ul,#wpadminbar ul li{background:0 0;clear:none;list-style:none;margin:0;padding:0;position:relative;text-indent:0;z-index:99999}#wpadminbar ul#wp-admin-bar-root-default>li{margin-left:0}#wpadminbar .quicklinks ul{text-align:right}#wpadminbar li{float:right}#wpadminbar .quicklinks .ab-top-secondary>li{float:left}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks a,#wpadminbar .shortlink-input{height:32px;display:block;padding:0 10px;margin:0}#wpadminbar .quicklinks>ul>li>a{padding:0 7px 0 8px}#wpadminbar .menupop .ab-sub-wrapper,#wpadminbar .shortlink-input{margin:0;padding:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);background:#32373c;display:none;position:absolute;float:none}#wpadminbar .selected .shortlink-input,#wpadminbar li.hover>.ab-sub-wrapper,#wpadminbar.nojs li:hover>.ab-sub-wrapper{display:block}#wpadminbar.ie7 .menupop .ab-sub-wrapper,#wpadminbar.ie7 .shortlink-input{top:32px;right:0}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{min-width:100%}#wpadminbar .ab-top-secondary .menupop .ab-sub-wrapper{left:0;right:auto}#wpadminbar .ab-submenu{padding:6px 0}#wpadminbar .quicklinks .menupop ul li{float:none}#wpadminbar .quicklinks .menupop ul li a strong{font-weight:700}#wpadminbar .quicklinks .menupop ul li .ab-item,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li .ab-item,#wpadminbar .shortlink-input,#wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item{line-height:26px;height:26px;white-space:nowrap;min-width:140px}#wpadminbar .shortlink-input{width:200px}#wpadminbar .menupop li.hover>.ab-sub-wrapper,#wpadminbar .menupop li:hover>.ab-sub-wrapper{margin-right:100%;margin-top:-32px}#wpadminbar .ab-top-secondary .menupop li.hover>.ab-sub-wrapper,#wpadminbar .ab-top-secondary .menupop li:hover>.ab-sub-wrapper{margin-right:0;right:inherit;left:100%}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{background:#32373c;color:#00b9eb}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label{color:#00b9eb}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{position:relative;float:right;font:400 20px/1 dashicons;speak:none;padding:4px 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-image:none!important;margin-left:6px}#wpadminbar #adminbarsearch:before,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:before{color:#a0a5aa;color:rgba(240,245,250,.6);position:relative;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#wpadminbar .ab-label{display:inline-block;height:32px}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#b4b9be;color:rgba(240,245,250,.7)}#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar li #adminbarsearch.adminbar-focused:before,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#00b9eb}#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#b4b9be}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#00b9eb}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before,#wpadminbar .menupop .menupop>.ab-item:before{position:absolute;font:400 17px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar .menupop .menupop>.ab-item{display:block;padding-left:2em}#wpadminbar .menupop .menupop>.ab-item:before{top:1px;left:4px;content:"\f141";color:inherit}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item{padding-right:2em;padding-left:1em}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before{top:1px;right:6px;content:"\f139"}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary{display:block;position:relative;left:auto;margin:0;-webkit-box-shadow:none;box-shadow:none}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#464b50}#wpadminbar .quicklinks .menupop .ab-sub-secondary>li .ab-item:focus a,#wpadminbar .quicklinks .menupop .ab-sub-secondary>li>a:hover{color:#00b9eb}#wpadminbar .quicklinks a span#ab-updates{background:#eee;color:#32373c;display:inline;padding:2px 5px;font-size:10px;font-weight:700;-webkit-border-radius:10px;border-radius:10px}#wpadminbar .quicklinks a:hover span#ab-updates{background:#fff;color:#000}#wpadminbar .ab-top-secondary{float:left}#wpadminbar ul li:last-child,#wpadminbar ul li:last-child .ab-item{-webkit-box-shadow:none;box-shadow:none}#wp-admin-bar-my-account>ul{min-width:198px}#wp-admin-bar-my-account>.ab-item:before{content:"\f110";top:2px;float:left;margin-right:6px;margin-left:0}#wp-admin-bar-my-account.with-avatar>.ab-item:before{display:none;content:none}#wp-admin-bar-my-account.with-avatar>ul{min-width:270px}#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar .ab-item{white-space:nowrap}#wpadminbar #wp-admin-bar-user-actions>li{margin-right:16px;margin-left:16px}#wpadminbar #wp-admin-bar-user-actions.ab-submenu{padding:6px 0 12px}#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions>li{margin-right:88px}#wpadminbar #wp-admin-bar-user-info{margin-top:6px;margin-bottom:15px;height:auto;background:0 0}#wp-admin-bar-user-info .avatar{position:absolute;right:-72px;top:4px;width:64px;height:64px}#wpadminbar #wp-admin-bar-user-info a{background:0 0;height:auto}#wpadminbar #wp-admin-bar-user-info span{background:0 0;padding:0;height:18px}#wpadminbar #wp-admin-bar-user-info .display-name,#wpadminbar #wp-admin-bar-user-info .username{display:block}#wpadminbar #wp-admin-bar-user-info .username{color:#a0a5aa;font-size:11px}#wpadminbar #wp-admin-bar-my-account.with-avatar>.ab-empty-item img,#wpadminbar #wp-admin-bar-my-account.with-avatar>a img{width:auto;height:16px;padding:0;border:1px solid #82878c;background:#eee;line-height:24px;vertical-align:middle;margin:-4px 6px 0 0;float:none;display:inline}#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar>.ab-empty-item img,#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar>a img{width:auto}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon{width:15px;height:20px;margin-left:0;padding:6px 0 5px}#wpadminbar #wp-admin-bar-wp-logo>.ab-item{padding:0 7px}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before{content:"\f120";top:2px}#wpadminbar .quicklinks li .blavatar{float:right;font:400 16px/1 dashicons!important;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#eee}#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar{color:#00b9eb}#wpadminbar .quicklinks li .blavatar:before{content:"\f120";height:16px;width:16px;display:inline-block;margin:6px -2px 0 8px}#wpadminbar #wp-admin-bar-appearance{margin-top:-12px}#wpadminbar #wp-admin-bar-my-sites>.ab-item:before,#wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:"\f112";top:2px}#wpadminbar #wp-admin-bar-customize>.ab-item:before{content:"\f540";top:2px}#wpadminbar #wp-admin-bar-edit>.ab-item:before{content:"\f464";top:2px}#wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:"\f226"}.wp-admin #wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:"\f102"}#wpadminbar #wp-admin-bar-comments .ab-icon{margin-left:6px}#wpadminbar #wp-admin-bar-comments .ab-icon:before{content:"\f101";top:3px}#wpadminbar #wp-admin-bar-comments .count-0{opacity:.5}#wpadminbar #wp-admin-bar-new-content .ab-icon:before{content:"\f132";top:4px}#wpadminbar #wp-admin-bar-updates .ab-icon:before{content:"\f463";top:2px}#wpadminbar.ie8 #wp-admin-bar-search{display:block;min-width:32px}#wpadminbar #wp-admin-bar-search .ab-item{padding:0;background:0 0}#wpadminbar #adminbarsearch{position:relative;height:32px;padding:0 2px;z-index:1}#wpadminbar #adminbarsearch:before{position:absolute;top:6px;right:5px;z-index:20;font:400 20px/1 dashicons!important;content:"\f179";speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{position:relative;z-index:30;font:13px/24px "Open Sans",sans-serif;height:24px;width:24px;max-width:none;padding:0 24px 0 3px;margin:0;color:#ccc;background-color:rgba(255,255,255,0);border:none;outline:0;cursor:pointer;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transition-property:width,background;transition-property:width,background;-webkit-transition-timing-function:ease;transition-timing-function:ease}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{z-index:10;color:#000;width:200px;background-color:rgba(255,255,255,.9);cursor:text;border:0}#wpadminbar.ie7>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{margin-top:3px;width:120px}#wpadminbar.ie8>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBR‌​AA7) 100% 0}#wpadminbar.ie8 #adminbarsearch.adminbar-focused:before{content:"\f179 "}#wpadminbar.ie8>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{background:#fff;z-index:-1}#wpadminbar #adminbarsearch .adminbar-button,.customize-support #wpadminbar .hide-if-customize,.customize-support .hide-if-customize,.customize-support .wp-core-ui .hide-if-customize,.customize-support.wp-core-ui .hide-if-customize,.no-customize-support #wpadminbar .hide-if-no-customize,.no-customize-support .hide-if-no-customize,.no-customize-support .wp-core-ui .hide-if-no-customize,.no-customize-support.wp-core-ui .hide-if-no-customize{display:none}#wpadminbar .screen-reader-text,#wpadminbar .screen-reader-text span{position:absolute;right:-1000em;top:-1000em;height:1px;width:1px;overflow:hidden}#wpadminbar .screen-reader-shortcut{position:absolute;top:-1000em}#wpadminbar .screen-reader-shortcut:focus{right:6px;top:7px;height:auto;width:auto;display:block;font-size:14px;font-weight:700;padding:15px 23px 14px;background:#f1f1f1;color:#0073aa;z-index:100000;line-height:normal;text-decoration:none;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,.6);box-shadow:0 0 2px 2px rgba(0,0,0,.6)}* html #wpadminbar{overflow:hidden;position:absolute}* html #wpadminbar .quicklinks ul li a{float:right}* html #wpadminbar .menupop a span{background-image:none}.no-font-face #wpadminbar ul.ab-top-menu>li>a.ab-item{display:block;width:45px;text-align:center;overflow:hidden;margin:0 3px}.no-font-face #wpadminbar #wp-admin-bar-edit>.ab-item,.no-font-face #wpadminbar #wp-admin-bar-my-sites>.ab-item,.no-font-face #wpadminbar #wp-admin-bar-site-name>.ab-item{text-indent:0}.no-font-face #wpadminbar #wp-admin-bar-wp-logo>.ab-item,.no-font-face #wpadminbar .ab-icon,.no-font-face #wpadminbar .ab-icon:before,.no-font-face #wpadminbar a.ab-item:before{display:none!important}.no-font-face #wpadminbar ul.ab-top-menu>li>a>span.ab-label{display:inline}.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon{display:inline!important}.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon:before{content:"Menu";font:14px/45px sans-serif!important;display:inline-block!important;color:#fff}.no-font-face #wpadminbar #wp-admin-bar-site-name a.ab-item{color:#fff}@media screen and (max-width:782px){#wpadminbar ul#wp-admin-bar-root-default>li,.network-admin #wpadminbar ul#wp-admin-bar-top-secondary>li#wp-admin-bar-my-account{margin-left:0}html #wpadminbar{height:46px;min-width:300px}#wpadminbar *{font:400 14px/32px "Open Sans",sans-serif}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks>ul>li>a{padding:0;height:46px;line-height:46px;width:auto}#wpadminbar .ab-icon{font:40px/1 dashicons!important;margin:0;padding:0;width:52px;height:46px;text-align:center}#wpadminbar .ab-icon:before{text-align:center}#wpadminbar .ab-submenu{padding:0}#wpadminbar #wp-admin-bar-my-account a.ab-item,#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{text-overflow:clip}#wpadminbar .ab-label{display:none}#wpadminbar .menupop li.hover>.ab-sub-wrapper,#wpadminbar .menupop li:hover>.ab-sub-wrapper{margin-top:-46px}#wpadminbar #wp-admin-bar-comments .ab-icon,#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions>li{margin:0}#wpadminbar .ab-top-menu .menupop .ab-sub-wrapper .menupop>.ab-item{padding-left:30px}#wpadminbar .menupop .menupop>.ab-item:before{top:10px;left:6px}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper .ab-item{font-size:16px;padding:8px 16px}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper a:empty{display:none}#wpadminbar #wp-admin-bar-wp-logo>.ab-item{padding:0}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon{padding:0;width:52px;height:46px;text-align:center;vertical-align:top}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before{font:28px/1 dashicons!important;top:-3px}#wpadminbar .ab-icon,#wpadminbar .ab-item:before{padding:0}#wpadminbar #wp-admin-bar-customize>.ab-item,#wpadminbar #wp-admin-bar-edit>.ab-item,#wpadminbar #wp-admin-bar-my-account>.ab-item,#wpadminbar #wp-admin-bar-my-sites>.ab-item,#wpadminbar #wp-admin-bar-site-name>.ab-item{text-indent:100%;white-space:nowrap;overflow:hidden;width:52px;padding:0;color:#a0a5aa;position:relative}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{padding:0;margin-left:0}#wpadminbar #wp-admin-bar-customize>.ab-item:before,#wpadminbar #wp-admin-bar-edit>.ab-item:before,#wpadminbar #wp-admin-bar-my-account>.ab-item:before,#wpadminbar #wp-admin-bar-my-sites>.ab-item:before,#wpadminbar #wp-admin-bar-site-name>.ab-item:before{display:block;text-indent:0;font:400 32px/1 dashicons;speak:none;top:7px;width:52px;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar #wp-admin-bar-appearance{margin-top:0}#wpadminbar .quicklinks li .blavatar:before{display:none}#wpadminbar #wp-admin-bar-search{display:none}#wpadminbar #wp-admin-bar-new-content .ab-icon:before{top:0;line-height:53px;height:46px!important;text-align:center;width:52px;display:block}#wpadminbar #wp-admin-bar-updates{text-align:center}#wpadminbar #wp-admin-bar-updates .ab-icon:before{top:3px}#wpadminbar #wp-admin-bar-comments .ab-icon:before{display:block;font-size:34px;height:46px;line-height:47px;top:0}#wp-toolbar>ul>li,#wpadminbar #wp-admin-bar-user-actions.ab-submenu img.avatar{display:none}#wpadminbar #wp-admin-bar-my-account>a{position:relative;white-space:nowrap;text-indent:150%;width:28px;padding:0 10px;overflow:hidden}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{position:absolute;top:13px;left:10px;width:26px;height:26px}#wpadminbar #wp-admin-bar-user-actions.ab-submenu{padding:0}#wpadminbar #wp-admin-bar-user-info .display-name{height:auto;font-size:16px;line-height:24px;color:#eee}#wpadminbar #wp-admin-bar-user-info a{padding-top:4px}#wpadminbar #wp-admin-bar-user-info .username{line-height:.8!important;margin-bottom:-2px}#wpadminbar li#wp-admin-bar-comments,#wpadminbar li#wp-admin-bar-customize,#wpadminbar li#wp-admin-bar-edit,#wpadminbar li#wp-admin-bar-menu-toggle,#wpadminbar li#wp-admin-bar-my-account,#wpadminbar li#wp-admin-bar-my-sites,#wpadminbar li#wp-admin-bar-new-content,#wpadminbar li#wp-admin-bar-site-name,#wpadminbar li#wp-admin-bar-updates,#wpadminbar li#wp-admin-bar-wp-logo{display:block}#wpadminbar li.hover ul li,#wpadminbar li:hover ul li,#wpadminbar li:hover ul li:hover ul li{display:list-item}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}#wpadminbar #wp-admin-bar-comments,#wpadminbar #wp-admin-bar-edit,#wpadminbar #wp-admin-bar-my-account,#wpadminbar #wp-admin-bar-my-sites,#wpadminbar #wp-admin-bar-new-content,#wpadminbar #wp-admin-bar-site-name,#wpadminbar #wp-admin-bar-updates,#wpadminbar #wp-admin-bar-wp-logo,#wpadminbar .ab-top-menu,#wpadminbar .ab-top-secondary{position:static}#wpadminbar #wp-admin-bar-my-account{float:left}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before{top:10px;right:0}}@media screen and (max-width:600px){#wpadminbar{position:absolute}#wp-responsive-overlay{position:fixed;top:0;right:0;width:100%;height:100%;z-index:400}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{width:100%;right:0}#wpadminbar .menupop .menupop>.ab-item:before{display:none}#wpadminbar #wp-admin-bar-wp-logo.menupop .ab-sub-wrapper{margin-right:0}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper{margin:0;width:100%;top:auto;right:auto;position:static;-webkit-box-shadow:none;box-shadow:none}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper .ab-item{font-size:16px;padding:6px 30px 19px 15px}#wpadminbar li:hover ul li ul li{display:list-item}#wpadminbar li#wp-admin-bar-updates,#wpadminbar li#wp-admin-bar-wp-logo{display:none}}@media screen and (max-width:400px){#wpadminbar li#wp-admin-bar-comments{display:none}}
\ No newline at end of file
+#wpadminbar,#wpadminbar *{font-size:13px;font-weight:400;line-height:32px}#wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-shadow:none;text-transform:none;letter-spacing:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;-webkit-border-radius:0;border-radius:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-transition:none;transition:none;-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto}.rtl #wpadminbar *{font-family:Tahoma,sans-serif}html:lang(he-il) .rtl #wpadminbar *{font-family:Arial,sans-serif}#wpadminbar .ab-empty-item{cursor:default;outline:0}#wpadminbar .ab-empty-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#eee}#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wpadminbar ul li:after,#wpadminbar ul li:before{content:normal}#wpadminbar a,#wpadminbar a img,#wpadminbar a img:hover,#wpadminbar a:hover{outline:0;border:none;text-decoration:none;background:0 0}#wpadminbar a:active,#wpadminbar a:focus,#wpadminbar div,#wpadminbar input[type=text],#wpadminbar input[type=password],#wpadminbar input[type=number],#wpadminbar input[type=search],#wpadminbar input[type=email],#wpadminbar input[type=url],#wpadminbar select,#wpadminbar textarea{-webkit-box-shadow:none;box-shadow:none;outline:0}#wpadminbar{direction:rtl;color:#ccc;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;height:32px;position:fixed;top:0;right:0;width:100%;min-width:600px;z-index:99999;background:#23282d}#wpadminbar .ab-sub-wrapper,#wpadminbar ul,#wpadminbar ul li{background:0 0;clear:none;list-style:none;margin:0;padding:0;position:relative;text-indent:0;z-index:99999}#wpadminbar ul#wp-admin-bar-root-default>li{margin-left:0}#wpadminbar .quicklinks ul{text-align:right}#wpadminbar li{float:right}#wpadminbar .quicklinks .ab-top-secondary>li{float:left}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks a,#wpadminbar .shortlink-input{height:32px;display:block;padding:0 10px;margin:0}#wpadminbar .quicklinks>ul>li>a{padding:0 7px 0 8px}#wpadminbar .menupop .ab-sub-wrapper,#wpadminbar .shortlink-input{margin:0;padding:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);background:#32373c;display:none;position:absolute;float:none}#wpadminbar .selected .shortlink-input,#wpadminbar li.hover>.ab-sub-wrapper,#wpadminbar.nojs li:hover>.ab-sub-wrapper{display:block}#wpadminbar.ie7 .menupop .ab-sub-wrapper,#wpadminbar.ie7 .shortlink-input{top:32px;right:0}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{min-width:100%}#wpadminbar .ab-top-secondary .menupop .ab-sub-wrapper{left:0;right:auto}#wpadminbar .ab-submenu{padding:6px 0}#wpadminbar .quicklinks .menupop ul li{float:none}#wpadminbar .quicklinks .menupop ul li a strong{font-weight:600}#wpadminbar .quicklinks .menupop ul li .ab-item,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li .ab-item,#wpadminbar .shortlink-input,#wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item{line-height:26px;height:26px;white-space:nowrap;min-width:140px}#wpadminbar .shortlink-input{width:200px}#wpadminbar .menupop li.hover>.ab-sub-wrapper,#wpadminbar .menupop li:hover>.ab-sub-wrapper{margin-right:100%;margin-top:-32px}#wpadminbar .ab-top-secondary .menupop li.hover>.ab-sub-wrapper,#wpadminbar .ab-top-secondary .menupop li:hover>.ab-sub-wrapper{margin-right:0;right:inherit;left:100%}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{background:#32373c;color:#00b9eb}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label{color:#00b9eb}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{position:relative;float:right;font:400 20px/1 dashicons;speak:none;padding:4px 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-image:none!important;margin-left:6px}#wpadminbar #adminbarsearch:before,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:before{color:#a0a5aa;color:rgba(240,245,250,.6);position:relative;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#wpadminbar .ab-label{display:inline-block;height:32px}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#b4b9be;color:rgba(240,245,250,.7)}#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks .menupop.hover ul li div[tabindex]:focus,#wpadminbar .quicklinks .menupop.hover ul li div[tabindex]:hover,#wpadminbar li #adminbarsearch.adminbar-focused:before,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#00b9eb}#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#b4b9be}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#00b9eb}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before,#wpadminbar .menupop .menupop>.ab-item:before{position:absolute;font:400 17px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar .menupop .menupop>.ab-item{display:block;padding-left:2em}#wpadminbar .menupop .menupop>.ab-item:before{top:1px;left:4px;content:"\f141";color:inherit}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item{padding-right:2em;padding-left:1em}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before{top:1px;right:6px;content:"\f139"}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary{display:block;position:relative;left:auto;margin:0;-webkit-box-shadow:none;box-shadow:none}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#464b50}#wpadminbar .quicklinks .menupop .ab-sub-secondary>li .ab-item:focus a,#wpadminbar .quicklinks .menupop .ab-sub-secondary>li>a:hover{color:#00b9eb}#wpadminbar .quicklinks a span#ab-updates{background:#eee;color:#32373c;display:inline;padding:2px 5px;font-size:10px;font-weight:600;-webkit-border-radius:10px;border-radius:10px}#wpadminbar .quicklinks a:hover span#ab-updates{background:#fff;color:#000}#wpadminbar .ab-top-secondary{float:left}#wpadminbar ul li:last-child,#wpadminbar ul li:last-child .ab-item{-webkit-box-shadow:none;box-shadow:none}#wp-admin-bar-my-account>ul{min-width:198px}#wp-admin-bar-my-account>.ab-item:before{content:"\f110";top:2px;float:left;margin-right:6px;margin-left:0}#wp-admin-bar-my-account.with-avatar>.ab-item:before{display:none;content:none}#wp-admin-bar-my-account.with-avatar>ul{min-width:270px}#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar .ab-item{white-space:nowrap}#wpadminbar #wp-admin-bar-user-actions>li{margin-right:16px;margin-left:16px}#wpadminbar #wp-admin-bar-user-actions.ab-submenu{padding:6px 0 12px}#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions>li{margin-right:88px}#wpadminbar #wp-admin-bar-user-info{margin-top:6px;margin-bottom:15px;height:auto;background:0 0}#wp-admin-bar-user-info .avatar{position:absolute;right:-72px;top:4px;width:64px;height:64px}#wpadminbar #wp-admin-bar-user-info a{background:0 0;height:auto}#wpadminbar #wp-admin-bar-user-info span{background:0 0;padding:0;height:18px}#wpadminbar #wp-admin-bar-user-info .display-name,#wpadminbar #wp-admin-bar-user-info .username{display:block}#wpadminbar #wp-admin-bar-user-info .username{color:#a0a5aa;font-size:11px}#wpadminbar #wp-admin-bar-my-account.with-avatar>.ab-empty-item img,#wpadminbar #wp-admin-bar-my-account.with-avatar>a img{width:auto;height:16px;padding:0;border:1px solid #82878c;background:#eee;line-height:24px;vertical-align:middle;margin:-4px 6px 0 0;float:none;display:inline}#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar>.ab-empty-item img,#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar>a img{width:auto}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon{width:15px;height:20px;margin-left:0;padding:6px 0 5px}#wpadminbar #wp-admin-bar-wp-logo>.ab-item{padding:0 7px}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before{content:"\f120";top:2px}#wpadminbar .quicklinks li .blavatar{float:right;font:400 16px/1 dashicons!important;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#eee}#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar{color:#00b9eb}#wpadminbar .quicklinks li .blavatar:before{content:"\f120";height:16px;width:16px;display:inline-block;margin:6px -2px 0 8px}#wpadminbar #wp-admin-bar-appearance{margin-top:-12px}#wpadminbar #wp-admin-bar-my-sites>.ab-item:before,#wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:"\f541";top:2px}#wpadminbar #wp-admin-bar-customize>.ab-item:before{content:"\f540";top:2px}#wpadminbar #wp-admin-bar-edit>.ab-item:before{content:"\f464";top:2px}#wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:"\f226"}.wp-admin #wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:"\f102"}#wpadminbar #wp-admin-bar-comments .ab-icon{margin-left:6px}#wpadminbar #wp-admin-bar-comments .ab-icon:before{content:"\f101";top:3px}#wpadminbar #wp-admin-bar-comments .count-0{opacity:.5}#wpadminbar #wp-admin-bar-new-content .ab-icon:before{content:"\f132";top:4px}#wpadminbar #wp-admin-bar-updates .ab-icon:before{content:"\f463";top:2px}#wpadminbar.ie8 #wp-admin-bar-search{display:block;min-width:32px}#wpadminbar #wp-admin-bar-search .ab-item{padding:0;background:0 0}#wpadminbar #adminbarsearch{position:relative;height:32px;padding:0 2px;z-index:1}#wpadminbar #adminbarsearch:before{position:absolute;top:6px;right:5px;z-index:20;font:400 20px/1 dashicons!important;content:"\f179";speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{position:relative;z-index:30;font-size:13px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;line-height:24px;height:24px;width:24px;max-width:none;padding:0 24px 0 3px;margin:0;color:#ccc;background-color:rgba(255,255,255,0);border:none;outline:0;cursor:pointer;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transition-property:width,background;transition-property:width,background;-webkit-transition-timing-function:ease;transition-timing-function:ease}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{z-index:10;color:#000;width:200px;background-color:rgba(255,255,255,.9);cursor:text;border:0}#wpadminbar.ie7>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{margin-top:3px;width:120px}#wpadminbar.ie8>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBR‌​AA7) 100% 0}#wpadminbar.ie8 #adminbarsearch.adminbar-focused:before{content:"\f179 "}#wpadminbar.ie8>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{background:#fff;z-index:-1}#wpadminbar #adminbarsearch .adminbar-button,.customize-support #wpadminbar .hide-if-customize,.customize-support .hide-if-customize,.customize-support .wp-core-ui .hide-if-customize,.customize-support.wp-core-ui .hide-if-customize,.no-customize-support #wpadminbar .hide-if-no-customize,.no-customize-support .hide-if-no-customize,.no-customize-support .wp-core-ui .hide-if-no-customize,.no-customize-support.wp-core-ui .hide-if-no-customize{display:none}#wpadminbar .screen-reader-text,#wpadminbar .screen-reader-text span{position:absolute;right:-1000em;top:-1000em;height:1px;width:1px;overflow:hidden}#wpadminbar .screen-reader-shortcut{position:absolute;top:-1000em}#wpadminbar .screen-reader-shortcut:focus{right:6px;top:7px;height:auto;width:auto;display:block;font-size:14px;font-weight:600;padding:15px 23px 14px;background:#f1f1f1;color:#0073aa;z-index:100000;line-height:normal;text-decoration:none;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,.6);box-shadow:0 0 2px 2px rgba(0,0,0,.6)}* html #wpadminbar{overflow:hidden;position:absolute}* html #wpadminbar .quicklinks ul li a{float:right}* html #wpadminbar .menupop a span{background-image:none}.no-font-face #wpadminbar ul.ab-top-menu>li>a.ab-item{display:block;width:45px;text-align:center;overflow:hidden;margin:0 3px}.no-font-face #wpadminbar #wp-admin-bar-edit>.ab-item,.no-font-face #wpadminbar #wp-admin-bar-my-sites>.ab-item,.no-font-face #wpadminbar #wp-admin-bar-site-name>.ab-item{text-indent:0}.no-font-face #wpadminbar #wp-admin-bar-wp-logo>.ab-item,.no-font-face #wpadminbar .ab-icon,.no-font-face #wpadminbar .ab-icon:before,.no-font-face #wpadminbar a.ab-item:before{display:none!important}.no-font-face #wpadminbar ul.ab-top-menu>li>a>span.ab-label{display:inline}.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon{display:inline!important}.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon:before{content:"Menu";font:14px/45px sans-serif!important;display:inline-block!important;color:#fff}.no-font-face #wpadminbar #wp-admin-bar-site-name a.ab-item{color:#fff}@media screen and (max-width:782px){#wpadminbar ul#wp-admin-bar-root-default>li,.network-admin #wpadminbar ul#wp-admin-bar-top-secondary>li#wp-admin-bar-my-account{margin-left:0}html #wpadminbar{height:46px;min-width:300px}#wpadminbar *{font-size:14px;font-weight:400;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;line-height:32px}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks>ul>li>a{padding:0;height:46px;line-height:46px;width:auto}#wpadminbar .ab-icon{font:40px/1 dashicons!important;margin:0;padding:0;width:52px;height:46px;text-align:center}#wpadminbar .ab-icon:before{text-align:center}#wpadminbar .ab-submenu{padding:0}#wpadminbar #wp-admin-bar-my-account a.ab-item,#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{text-overflow:clip}#wpadminbar .ab-label{display:none}#wpadminbar .menupop li.hover>.ab-sub-wrapper,#wpadminbar .menupop li:hover>.ab-sub-wrapper{margin-top:-46px}#wpadminbar #wp-admin-bar-comments .ab-icon,#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions>li{margin:0}#wpadminbar .ab-top-menu .menupop .ab-sub-wrapper .menupop>.ab-item{padding-left:30px}#wpadminbar .menupop .menupop>.ab-item:before{top:10px;left:6px}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper .ab-item{font-size:16px;padding:8px 16px}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper a:empty{display:none}#wpadminbar #wp-admin-bar-wp-logo>.ab-item{padding:0}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon{padding:0;width:52px;height:46px;text-align:center;vertical-align:top}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before{font:28px/1 dashicons!important;top:-3px}#wpadminbar .ab-icon,#wpadminbar .ab-item:before{padding:0}#wpadminbar #wp-admin-bar-customize>.ab-item,#wpadminbar #wp-admin-bar-edit>.ab-item,#wpadminbar #wp-admin-bar-my-account>.ab-item,#wpadminbar #wp-admin-bar-my-sites>.ab-item,#wpadminbar #wp-admin-bar-site-name>.ab-item{text-indent:100%;white-space:nowrap;overflow:hidden;width:52px;padding:0;color:#a0a5aa;position:relative}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{padding:0;margin-left:0}#wpadminbar #wp-admin-bar-customize>.ab-item:before,#wpadminbar #wp-admin-bar-edit>.ab-item:before,#wpadminbar #wp-admin-bar-my-account>.ab-item:before,#wpadminbar #wp-admin-bar-my-sites>.ab-item:before,#wpadminbar #wp-admin-bar-site-name>.ab-item:before{display:block;text-indent:0;font:400 32px/1 dashicons;speak:none;top:7px;width:52px;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar #wp-admin-bar-appearance{margin-top:0}#wpadminbar .quicklinks li .blavatar:before{display:none}#wpadminbar #wp-admin-bar-search{display:none}#wpadminbar #wp-admin-bar-new-content .ab-icon:before{top:0;line-height:53px;height:46px!important;text-align:center;width:52px;display:block}#wpadminbar #wp-admin-bar-updates{text-align:center}#wpadminbar #wp-admin-bar-updates .ab-icon:before{top:3px}#wpadminbar #wp-admin-bar-comments .ab-icon:before{display:block;font-size:34px;height:46px;line-height:47px;top:0}#wp-toolbar>ul>li,#wpadminbar #wp-admin-bar-user-actions.ab-submenu img.avatar{display:none}#wpadminbar #wp-admin-bar-my-account>a{position:relative;white-space:nowrap;text-indent:150%;width:28px;padding:0 10px;overflow:hidden}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{position:absolute;top:13px;left:10px;width:26px;height:26px}#wpadminbar #wp-admin-bar-user-actions.ab-submenu{padding:0}#wpadminbar #wp-admin-bar-user-info .display-name{height:auto;font-size:16px;line-height:24px;color:#eee}#wpadminbar #wp-admin-bar-user-info a{padding-top:4px}#wpadminbar #wp-admin-bar-user-info .username{line-height:.8!important;margin-bottom:-2px}#wpadminbar li#wp-admin-bar-comments,#wpadminbar li#wp-admin-bar-customize,#wpadminbar li#wp-admin-bar-edit,#wpadminbar li#wp-admin-bar-menu-toggle,#wpadminbar li#wp-admin-bar-my-account,#wpadminbar li#wp-admin-bar-my-sites,#wpadminbar li#wp-admin-bar-new-content,#wpadminbar li#wp-admin-bar-site-name,#wpadminbar li#wp-admin-bar-updates,#wpadminbar li#wp-admin-bar-wp-logo{display:block}#wpadminbar li.hover ul li,#wpadminbar li:hover ul li,#wpadminbar li:hover ul li:hover ul li{display:list-item}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}#wpadminbar #wp-admin-bar-comments,#wpadminbar #wp-admin-bar-edit,#wpadminbar #wp-admin-bar-my-account,#wpadminbar #wp-admin-bar-my-sites,#wpadminbar #wp-admin-bar-new-content,#wpadminbar #wp-admin-bar-site-name,#wpadminbar #wp-admin-bar-updates,#wpadminbar #wp-admin-bar-wp-logo,#wpadminbar .ab-top-menu,#wpadminbar .ab-top-secondary{position:static}#wpadminbar #wp-admin-bar-my-account{float:left}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before{top:10px;right:0}}@media screen and (max-width:600px){#wpadminbar{position:absolute}#wp-responsive-overlay{position:fixed;top:0;right:0;width:100%;height:100%;z-index:400}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{width:100%;right:0}#wpadminbar .menupop .menupop>.ab-item:before{display:none}#wpadminbar #wp-admin-bar-wp-logo.menupop .ab-sub-wrapper{margin-right:0}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper{margin:0;width:100%;top:auto;right:auto;position:static;-webkit-box-shadow:none;box-shadow:none}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper .ab-item{font-size:16px;padding:6px 30px 19px 15px}#wpadminbar li:hover ul li ul li{display:list-item}#wpadminbar li#wp-admin-bar-updates,#wpadminbar li#wp-admin-bar-wp-logo{display:none}}@media screen and (max-width:400px){#wpadminbar li#wp-admin-bar-comments{display:none}}
\ No newline at end of file
index 9371a940435ccaacb4eb8b6696e499193ff28393..573ff8d8a6a2caf8df9734dcc5b4b5f450eef31f 100644 (file)
@@ -7,7 +7,10 @@
        text-shadow: none;
        text-transform: none;
        letter-spacing: normal;
-       font: normal 13px/32px "Open Sans", sans-serif;
+       font-size: 13px;
+       font-weight: 400;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+       line-height: 32px;
        -webkit-border-radius: 0;
        border-radius: 0;
        -webkit-box-sizing: content-box;
@@ -79,7 +82,10 @@ html:lang(he-il) .rtl #wpadminbar *  {
 #wpadminbar {
        direction: ltr;
        color: #ccc;
-       font: normal 13px/32px "Open Sans", sans-serif;
+       font-size: 13px;
+       font-weight: 400;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+       line-height: 32px;
        height: 32px;
        position: fixed;
        top: 0;
@@ -176,7 +182,7 @@ html:lang(he-il) .rtl #wpadminbar *  {
 }
 
 #wpadminbar .quicklinks .menupop ul li a strong {
-       font-weight: bold;
+       font-weight: 600;
 }
 
 #wpadminbar .quicklinks .menupop ul li .ab-item,
@@ -280,6 +286,8 @@ html:lang(he-il) .rtl #wpadminbar *  {
 #wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover > a,
 #wpadminbar .quicklinks .menupop.hover ul li a:hover,
 #wpadminbar .quicklinks .menupop.hover ul li a:focus,
+#wpadminbar .quicklinks .menupop.hover ul li div[tabindex]:hover,
+#wpadminbar .quicklinks .menupop.hover ul li div[tabindex]:focus,
 #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover,
 #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,
 #wpadminbar li:hover .ab-icon:before,
@@ -360,7 +368,7 @@ html:lang(he-il) .rtl #wpadminbar *  {
        display: inline;
        padding: 2px 5px;
        font-size: 10px;
-       font-weight: bold;
+       font-weight: 600;
        -webkit-border-radius: 10px;
        border-radius: 10px;
 }
@@ -527,7 +535,7 @@ html:lang(he-il) .rtl #wpadminbar *  {
 
 #wpadminbar #wp-admin-bar-my-sites > .ab-item:before,
 #wpadminbar #wp-admin-bar-site-name > .ab-item:before {
-       content: "\f112";
+       content: "\f541";
        top: 2px;
 }
 
@@ -618,7 +626,9 @@ html:lang(he-il) .rtl #wpadminbar *  {
 #wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input {
        position: relative;
        z-index: 30;
-       font: 13px/24px "Open Sans", sans-serif;
+       font-size: 13px;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+       line-height: 24px;
        height: 24px;
        width: 24px;
        max-width: none;
@@ -712,7 +722,7 @@ html:lang(he-il) .rtl #wpadminbar *  {
        width: auto;
        display: block;
        font-size: 14px;
-       font-weight: bold;
+       font-weight: 600;
        padding: 15px 23px 14px;
        background: #f1f1f1;
        color: #0073aa;
@@ -798,7 +808,10 @@ html:lang(he-il) .rtl #wpadminbar *  {
        }
 
        #wpadminbar * {
-               font: normal 14px/32px "Open Sans", sans-serif;
+               font-size: 14px;
+               font-weight: 400;
+               font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+               line-height: 32px;
        }
 
        #wpadminbar .quicklinks > ul > li > a,
index 695c17004727561128e1bc32423b7dc098d0c52b..abb1b4d8483ba26e0c1cf8fde45526301b31267e 100644 (file)
@@ -1 +1 @@
-#wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-shadow:none;text-transform:none;letter-spacing:normal;font:400 13px/32px "Open Sans",sans-serif;-webkit-border-radius:0;border-radius:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-transition:none;transition:none;-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto}.rtl #wpadminbar *{font-family:Tahoma,sans-serif}html:lang(he-il) .rtl #wpadminbar *{font-family:Arial,sans-serif}#wpadminbar .ab-empty-item{cursor:default;outline:0}#wpadminbar .ab-empty-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#eee}#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wpadminbar ul li:after,#wpadminbar ul li:before{content:normal}#wpadminbar a,#wpadminbar a img,#wpadminbar a img:hover,#wpadminbar a:hover{outline:0;border:none;text-decoration:none;background:0 0}#wpadminbar a:active,#wpadminbar a:focus,#wpadminbar div,#wpadminbar input[type=text],#wpadminbar input[type=password],#wpadminbar input[type=number],#wpadminbar input[type=search],#wpadminbar input[type=email],#wpadminbar input[type=url],#wpadminbar select,#wpadminbar textarea{-webkit-box-shadow:none;box-shadow:none;outline:0}#wpadminbar{direction:ltr;color:#ccc;font:400 13px/32px "Open Sans",sans-serif;height:32px;position:fixed;top:0;left:0;width:100%;min-width:600px;z-index:99999;background:#23282d}#wpadminbar .ab-sub-wrapper,#wpadminbar ul,#wpadminbar ul li{background:0 0;clear:none;list-style:none;margin:0;padding:0;position:relative;text-indent:0;z-index:99999}#wpadminbar ul#wp-admin-bar-root-default>li{margin-right:0}#wpadminbar .quicklinks ul{text-align:left}#wpadminbar li{float:left}#wpadminbar .quicklinks .ab-top-secondary>li{float:right}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks a,#wpadminbar .shortlink-input{height:32px;display:block;padding:0 10px;margin:0}#wpadminbar .quicklinks>ul>li>a{padding:0 8px 0 7px}#wpadminbar .menupop .ab-sub-wrapper,#wpadminbar .shortlink-input{margin:0;padding:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);background:#32373c;display:none;position:absolute;float:none}#wpadminbar .selected .shortlink-input,#wpadminbar li.hover>.ab-sub-wrapper,#wpadminbar.nojs li:hover>.ab-sub-wrapper{display:block}#wpadminbar.ie7 .menupop .ab-sub-wrapper,#wpadminbar.ie7 .shortlink-input{top:32px;left:0}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{min-width:100%}#wpadminbar .ab-top-secondary .menupop .ab-sub-wrapper{right:0;left:auto}#wpadminbar .ab-submenu{padding:6px 0}#wpadminbar .quicklinks .menupop ul li{float:none}#wpadminbar .quicklinks .menupop ul li a strong{font-weight:700}#wpadminbar .quicklinks .menupop ul li .ab-item,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li .ab-item,#wpadminbar .shortlink-input,#wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item{line-height:26px;height:26px;white-space:nowrap;min-width:140px}#wpadminbar .shortlink-input{width:200px}#wpadminbar .menupop li.hover>.ab-sub-wrapper,#wpadminbar .menupop li:hover>.ab-sub-wrapper{margin-left:100%;margin-top:-32px}#wpadminbar .ab-top-secondary .menupop li.hover>.ab-sub-wrapper,#wpadminbar .ab-top-secondary .menupop li:hover>.ab-sub-wrapper{margin-left:0;left:inherit;right:100%}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{background:#32373c;color:#00b9eb}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label{color:#00b9eb}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{position:relative;float:left;font:400 20px/1 dashicons;speak:none;padding:4px 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-image:none!important;margin-right:6px}#wpadminbar #adminbarsearch:before,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:before{color:#a0a5aa;color:rgba(240,245,250,.6);position:relative;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#wpadminbar .ab-label{display:inline-block;height:32px}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#b4b9be;color:rgba(240,245,250,.7)}#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar li #adminbarsearch.adminbar-focused:before,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#00b9eb}#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#b4b9be}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#00b9eb}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before,#wpadminbar .menupop .menupop>.ab-item:before{position:absolute;font:400 17px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar .menupop .menupop>.ab-item{display:block;padding-right:2em}#wpadminbar .menupop .menupop>.ab-item:before{top:1px;right:4px;content:"\f139";color:inherit}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item{padding-left:2em;padding-right:1em}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before{top:1px;left:6px;content:"\f141"}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary{display:block;position:relative;right:auto;margin:0;-webkit-box-shadow:none;box-shadow:none}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#464b50}#wpadminbar .quicklinks .menupop .ab-sub-secondary>li .ab-item:focus a,#wpadminbar .quicklinks .menupop .ab-sub-secondary>li>a:hover{color:#00b9eb}#wpadminbar .quicklinks a span#ab-updates{background:#eee;color:#32373c;display:inline;padding:2px 5px;font-size:10px;font-weight:700;-webkit-border-radius:10px;border-radius:10px}#wpadminbar .quicklinks a:hover span#ab-updates{background:#fff;color:#000}#wpadminbar .ab-top-secondary{float:right}#wpadminbar ul li:last-child,#wpadminbar ul li:last-child .ab-item{-webkit-box-shadow:none;box-shadow:none}#wp-admin-bar-my-account>ul{min-width:198px}#wp-admin-bar-my-account>.ab-item:before{content:"\f110";top:2px;float:right;margin-left:6px;margin-right:0}#wp-admin-bar-my-account.with-avatar>.ab-item:before{display:none;content:none}#wp-admin-bar-my-account.with-avatar>ul{min-width:270px}#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar .ab-item{white-space:nowrap}#wpadminbar #wp-admin-bar-user-actions>li{margin-left:16px;margin-right:16px}#wpadminbar #wp-admin-bar-user-actions.ab-submenu{padding:6px 0 12px}#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions>li{margin-left:88px}#wpadminbar #wp-admin-bar-user-info{margin-top:6px;margin-bottom:15px;height:auto;background:0 0}#wp-admin-bar-user-info .avatar{position:absolute;left:-72px;top:4px;width:64px;height:64px}#wpadminbar #wp-admin-bar-user-info a{background:0 0;height:auto}#wpadminbar #wp-admin-bar-user-info span{background:0 0;padding:0;height:18px}#wpadminbar #wp-admin-bar-user-info .display-name,#wpadminbar #wp-admin-bar-user-info .username{display:block}#wpadminbar #wp-admin-bar-user-info .username{color:#a0a5aa;font-size:11px}#wpadminbar #wp-admin-bar-my-account.with-avatar>.ab-empty-item img,#wpadminbar #wp-admin-bar-my-account.with-avatar>a img{width:auto;height:16px;padding:0;border:1px solid #82878c;background:#eee;line-height:24px;vertical-align:middle;margin:-4px 0 0 6px;float:none;display:inline}#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar>.ab-empty-item img,#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar>a img{width:auto}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon{width:15px;height:20px;margin-right:0;padding:6px 0 5px}#wpadminbar #wp-admin-bar-wp-logo>.ab-item{padding:0 7px}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before{content:"\f120";top:2px}#wpadminbar .quicklinks li .blavatar{float:left;font:400 16px/1 dashicons!important;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#eee}#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar{color:#00b9eb}#wpadminbar .quicklinks li .blavatar:before{content:"\f120";height:16px;width:16px;display:inline-block;margin:6px 8px 0 -2px}#wpadminbar #wp-admin-bar-appearance{margin-top:-12px}#wpadminbar #wp-admin-bar-my-sites>.ab-item:before,#wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:"\f112";top:2px}#wpadminbar #wp-admin-bar-customize>.ab-item:before{content:"\f540";top:2px}#wpadminbar #wp-admin-bar-edit>.ab-item:before{content:"\f464";top:2px}#wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:"\f226"}.wp-admin #wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:"\f102"}#wpadminbar #wp-admin-bar-comments .ab-icon{margin-right:6px}#wpadminbar #wp-admin-bar-comments .ab-icon:before{content:"\f101";top:3px}#wpadminbar #wp-admin-bar-comments .count-0{opacity:.5}#wpadminbar #wp-admin-bar-new-content .ab-icon:before{content:"\f132";top:4px}#wpadminbar #wp-admin-bar-updates .ab-icon:before{content:"\f463";top:2px}#wpadminbar.ie8 #wp-admin-bar-search{display:block;min-width:32px}#wpadminbar #wp-admin-bar-search .ab-item{padding:0;background:0 0}#wpadminbar #adminbarsearch{position:relative;height:32px;padding:0 2px;z-index:1}#wpadminbar #adminbarsearch:before{position:absolute;top:6px;left:5px;z-index:20;font:400 20px/1 dashicons!important;content:"\f179";speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{position:relative;z-index:30;font:13px/24px "Open Sans",sans-serif;height:24px;width:24px;max-width:none;padding:0 3px 0 24px;margin:0;color:#ccc;background-color:rgba(255,255,255,0);border:none;outline:0;cursor:pointer;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transition-property:width,background;transition-property:width,background;-webkit-transition-timing-function:ease;transition-timing-function:ease}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{z-index:10;color:#000;width:200px;background-color:rgba(255,255,255,.9);cursor:text;border:0}#wpadminbar.ie7>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{margin-top:3px;width:120px}#wpadminbar.ie8>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBR‌​AA7)}#wpadminbar.ie8 #adminbarsearch.adminbar-focused:before{content:"\f179 "}#wpadminbar.ie8>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{background:#fff;z-index:-1}#wpadminbar #adminbarsearch .adminbar-button,.customize-support #wpadminbar .hide-if-customize,.customize-support .hide-if-customize,.customize-support .wp-core-ui .hide-if-customize,.customize-support.wp-core-ui .hide-if-customize,.no-customize-support #wpadminbar .hide-if-no-customize,.no-customize-support .hide-if-no-customize,.no-customize-support .wp-core-ui .hide-if-no-customize,.no-customize-support.wp-core-ui .hide-if-no-customize{display:none}#wpadminbar .screen-reader-text,#wpadminbar .screen-reader-text span{position:absolute;left:-1000em;top:-1000em;height:1px;width:1px;overflow:hidden}#wpadminbar .screen-reader-shortcut{position:absolute;top:-1000em}#wpadminbar .screen-reader-shortcut:focus{left:6px;top:7px;height:auto;width:auto;display:block;font-size:14px;font-weight:700;padding:15px 23px 14px;background:#f1f1f1;color:#0073aa;z-index:100000;line-height:normal;text-decoration:none;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,.6);box-shadow:0 0 2px 2px rgba(0,0,0,.6)}* html #wpadminbar{overflow:hidden;position:absolute}* html #wpadminbar .quicklinks ul li a{float:left}* html #wpadminbar .menupop a span{background-image:none}.no-font-face #wpadminbar ul.ab-top-menu>li>a.ab-item{display:block;width:45px;text-align:center;overflow:hidden;margin:0 3px}.no-font-face #wpadminbar #wp-admin-bar-edit>.ab-item,.no-font-face #wpadminbar #wp-admin-bar-my-sites>.ab-item,.no-font-face #wpadminbar #wp-admin-bar-site-name>.ab-item{text-indent:0}.no-font-face #wpadminbar #wp-admin-bar-wp-logo>.ab-item,.no-font-face #wpadminbar .ab-icon,.no-font-face #wpadminbar .ab-icon:before,.no-font-face #wpadminbar a.ab-item:before{display:none!important}.no-font-face #wpadminbar ul.ab-top-menu>li>a>span.ab-label{display:inline}.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon{display:inline!important}.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon:before{content:"Menu";font:14px/45px sans-serif!important;display:inline-block!important;color:#fff}.no-font-face #wpadminbar #wp-admin-bar-site-name a.ab-item{color:#fff}@media screen and (max-width:782px){#wpadminbar ul#wp-admin-bar-root-default>li,.network-admin #wpadminbar ul#wp-admin-bar-top-secondary>li#wp-admin-bar-my-account{margin-right:0}html #wpadminbar{height:46px;min-width:300px}#wpadminbar *{font:400 14px/32px "Open Sans",sans-serif}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks>ul>li>a{padding:0;height:46px;line-height:46px;width:auto}#wpadminbar .ab-icon{font:40px/1 dashicons!important;margin:0;padding:0;width:52px;height:46px;text-align:center}#wpadminbar .ab-icon:before{text-align:center}#wpadminbar .ab-submenu{padding:0}#wpadminbar #wp-admin-bar-my-account a.ab-item,#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{text-overflow:clip}#wpadminbar .ab-label{display:none}#wpadminbar .menupop li.hover>.ab-sub-wrapper,#wpadminbar .menupop li:hover>.ab-sub-wrapper{margin-top:-46px}#wpadminbar #wp-admin-bar-comments .ab-icon,#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions>li{margin:0}#wpadminbar .ab-top-menu .menupop .ab-sub-wrapper .menupop>.ab-item{padding-right:30px}#wpadminbar .menupop .menupop>.ab-item:before{top:10px;right:6px}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper .ab-item{font-size:16px;padding:8px 16px}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper a:empty{display:none}#wpadminbar #wp-admin-bar-wp-logo>.ab-item{padding:0}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon{padding:0;width:52px;height:46px;text-align:center;vertical-align:top}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before{font:28px/1 dashicons!important;top:-3px}#wpadminbar .ab-icon,#wpadminbar .ab-item:before{padding:0}#wpadminbar #wp-admin-bar-customize>.ab-item,#wpadminbar #wp-admin-bar-edit>.ab-item,#wpadminbar #wp-admin-bar-my-account>.ab-item,#wpadminbar #wp-admin-bar-my-sites>.ab-item,#wpadminbar #wp-admin-bar-site-name>.ab-item{text-indent:100%;white-space:nowrap;overflow:hidden;width:52px;padding:0;color:#a0a5aa;position:relative}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{padding:0;margin-right:0}#wpadminbar #wp-admin-bar-customize>.ab-item:before,#wpadminbar #wp-admin-bar-edit>.ab-item:before,#wpadminbar #wp-admin-bar-my-account>.ab-item:before,#wpadminbar #wp-admin-bar-my-sites>.ab-item:before,#wpadminbar #wp-admin-bar-site-name>.ab-item:before{display:block;text-indent:0;font:400 32px/1 dashicons;speak:none;top:7px;width:52px;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar #wp-admin-bar-appearance{margin-top:0}#wpadminbar .quicklinks li .blavatar:before{display:none}#wpadminbar #wp-admin-bar-search{display:none}#wpadminbar #wp-admin-bar-new-content .ab-icon:before{top:0;line-height:53px;height:46px!important;text-align:center;width:52px;display:block}#wpadminbar #wp-admin-bar-updates{text-align:center}#wpadminbar #wp-admin-bar-updates .ab-icon:before{top:3px}#wpadminbar #wp-admin-bar-comments .ab-icon:before{display:block;font-size:34px;height:46px;line-height:47px;top:0}#wp-toolbar>ul>li,#wpadminbar #wp-admin-bar-user-actions.ab-submenu img.avatar{display:none}#wpadminbar #wp-admin-bar-my-account>a{position:relative;white-space:nowrap;text-indent:150%;width:28px;padding:0 10px;overflow:hidden}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{position:absolute;top:13px;right:10px;width:26px;height:26px}#wpadminbar #wp-admin-bar-user-actions.ab-submenu{padding:0}#wpadminbar #wp-admin-bar-user-info .display-name{height:auto;font-size:16px;line-height:24px;color:#eee}#wpadminbar #wp-admin-bar-user-info a{padding-top:4px}#wpadminbar #wp-admin-bar-user-info .username{line-height:.8!important;margin-bottom:-2px}#wpadminbar li#wp-admin-bar-comments,#wpadminbar li#wp-admin-bar-customize,#wpadminbar li#wp-admin-bar-edit,#wpadminbar li#wp-admin-bar-menu-toggle,#wpadminbar li#wp-admin-bar-my-account,#wpadminbar li#wp-admin-bar-my-sites,#wpadminbar li#wp-admin-bar-new-content,#wpadminbar li#wp-admin-bar-site-name,#wpadminbar li#wp-admin-bar-updates,#wpadminbar li#wp-admin-bar-wp-logo{display:block}#wpadminbar li.hover ul li,#wpadminbar li:hover ul li,#wpadminbar li:hover ul li:hover ul li{display:list-item}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}#wpadminbar #wp-admin-bar-comments,#wpadminbar #wp-admin-bar-edit,#wpadminbar #wp-admin-bar-my-account,#wpadminbar #wp-admin-bar-my-sites,#wpadminbar #wp-admin-bar-new-content,#wpadminbar #wp-admin-bar-site-name,#wpadminbar #wp-admin-bar-updates,#wpadminbar #wp-admin-bar-wp-logo,#wpadminbar .ab-top-menu,#wpadminbar .ab-top-secondary{position:static}#wpadminbar #wp-admin-bar-my-account{float:right}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before{top:10px;left:0}}@media screen and (max-width:600px){#wpadminbar{position:absolute}#wp-responsive-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:400}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{width:100%;left:0}#wpadminbar .menupop .menupop>.ab-item:before{display:none}#wpadminbar #wp-admin-bar-wp-logo.menupop .ab-sub-wrapper{margin-left:0}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper{margin:0;width:100%;top:auto;left:auto;position:static;-webkit-box-shadow:none;box-shadow:none}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper .ab-item{font-size:16px;padding:6px 15px 19px 30px}#wpadminbar li:hover ul li ul li{display:list-item}#wpadminbar li#wp-admin-bar-updates,#wpadminbar li#wp-admin-bar-wp-logo{display:none}}@media screen and (max-width:400px){#wpadminbar li#wp-admin-bar-comments{display:none}}
\ No newline at end of file
+#wpadminbar,#wpadminbar *{font-size:13px;font-weight:400;line-height:32px}#wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-shadow:none;text-transform:none;letter-spacing:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;-webkit-border-radius:0;border-radius:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-transition:none;transition:none;-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto}.rtl #wpadminbar *{font-family:Tahoma,sans-serif}html:lang(he-il) .rtl #wpadminbar *{font-family:Arial,sans-serif}#wpadminbar .ab-empty-item{cursor:default;outline:0}#wpadminbar .ab-empty-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,#wpadminbar>#wp-toolbar span.noticon{color:#eee}#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wpadminbar ul li:after,#wpadminbar ul li:before{content:normal}#wpadminbar a,#wpadminbar a img,#wpadminbar a img:hover,#wpadminbar a:hover{outline:0;border:none;text-decoration:none;background:0 0}#wpadminbar a:active,#wpadminbar a:focus,#wpadminbar div,#wpadminbar input[type=text],#wpadminbar input[type=password],#wpadminbar input[type=number],#wpadminbar input[type=search],#wpadminbar input[type=email],#wpadminbar input[type=url],#wpadminbar select,#wpadminbar textarea{-webkit-box-shadow:none;box-shadow:none;outline:0}#wpadminbar{direction:ltr;color:#ccc;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;height:32px;position:fixed;top:0;left:0;width:100%;min-width:600px;z-index:99999;background:#23282d}#wpadminbar .ab-sub-wrapper,#wpadminbar ul,#wpadminbar ul li{background:0 0;clear:none;list-style:none;margin:0;padding:0;position:relative;text-indent:0;z-index:99999}#wpadminbar ul#wp-admin-bar-root-default>li{margin-right:0}#wpadminbar .quicklinks ul{text-align:left}#wpadminbar li{float:left}#wpadminbar .quicklinks .ab-top-secondary>li{float:right}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks a,#wpadminbar .shortlink-input{height:32px;display:block;padding:0 10px;margin:0}#wpadminbar .quicklinks>ul>li>a{padding:0 8px 0 7px}#wpadminbar .menupop .ab-sub-wrapper,#wpadminbar .shortlink-input{margin:0;padding:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);background:#32373c;display:none;position:absolute;float:none}#wpadminbar .selected .shortlink-input,#wpadminbar li.hover>.ab-sub-wrapper,#wpadminbar.nojs li:hover>.ab-sub-wrapper{display:block}#wpadminbar.ie7 .menupop .ab-sub-wrapper,#wpadminbar.ie7 .shortlink-input{top:32px;left:0}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{min-width:100%}#wpadminbar .ab-top-secondary .menupop .ab-sub-wrapper{right:0;left:auto}#wpadminbar .ab-submenu{padding:6px 0}#wpadminbar .quicklinks .menupop ul li{float:none}#wpadminbar .quicklinks .menupop ul li a strong{font-weight:600}#wpadminbar .quicklinks .menupop ul li .ab-item,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li .ab-item,#wpadminbar .shortlink-input,#wpadminbar.nojs .quicklinks .menupop:hover ul li .ab-item{line-height:26px;height:26px;white-space:nowrap;min-width:140px}#wpadminbar .shortlink-input{width:200px}#wpadminbar .menupop li.hover>.ab-sub-wrapper,#wpadminbar .menupop li:hover>.ab-sub-wrapper{margin-left:100%;margin-top:-32px}#wpadminbar .ab-top-secondary .menupop li.hover>.ab-sub-wrapper,#wpadminbar .ab-top-secondary .menupop li:hover>.ab-sub-wrapper{margin-left:0;left:inherit;right:100%}#wpadminbar .ab-top-menu>li.hover>.ab-item,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item,#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus{background:#32373c;color:#00b9eb}#wpadminbar:not(.mobile)>#wp-toolbar a:focus span.ab-label,#wpadminbar:not(.mobile)>#wp-toolbar li:hover span.ab-label,#wpadminbar>#wp-toolbar li.hover span.ab-label{color:#00b9eb}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{position:relative;float:left;font:400 20px/1 dashicons;speak:none;padding:4px 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-image:none!important;margin-right:6px}#wpadminbar #adminbarsearch:before,#wpadminbar .ab-icon:before,#wpadminbar .ab-item:before{color:#a0a5aa;color:rgba(240,245,250,.6);position:relative;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#wpadminbar .ab-label{display:inline-block;height:32px}#wpadminbar .ab-submenu .ab-item,#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a{color:#b4b9be;color:rgba(240,245,250,.7)}#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a,#wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar .quicklinks .menupop.hover ul li div[tabindex]:focus,#wpadminbar .quicklinks .menupop.hover ul li div[tabindex]:hover,#wpadminbar li #adminbarsearch.adminbar-focused:before,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover{color:#00b9eb}#wpadminbar.mobile .quicklinks .ab-icon:before,#wpadminbar.mobile .quicklinks .ab-item:before{color:#b4b9be}#wpadminbar.mobile .quicklinks .hover .ab-icon:before,#wpadminbar.mobile .quicklinks .hover .ab-item:before{color:#00b9eb}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before,#wpadminbar .menupop .menupop>.ab-item:before{position:absolute;font:400 17px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar .menupop .menupop>.ab-item{display:block;padding-right:2em}#wpadminbar .menupop .menupop>.ab-item:before{top:1px;right:4px;content:"\f139";color:inherit}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item{padding-left:2em;padding-right:1em}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before{top:1px;left:6px;content:"\f141"}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary{display:block;position:relative;right:auto;margin:0;-webkit-box-shadow:none;box-shadow:none}#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu{background:#464b50}#wpadminbar .quicklinks .menupop .ab-sub-secondary>li .ab-item:focus a,#wpadminbar .quicklinks .menupop .ab-sub-secondary>li>a:hover{color:#00b9eb}#wpadminbar .quicklinks a span#ab-updates{background:#eee;color:#32373c;display:inline;padding:2px 5px;font-size:10px;font-weight:600;-webkit-border-radius:10px;border-radius:10px}#wpadminbar .quicklinks a:hover span#ab-updates{background:#fff;color:#000}#wpadminbar .ab-top-secondary{float:right}#wpadminbar ul li:last-child,#wpadminbar ul li:last-child .ab-item{-webkit-box-shadow:none;box-shadow:none}#wp-admin-bar-my-account>ul{min-width:198px}#wp-admin-bar-my-account>.ab-item:before{content:"\f110";top:2px;float:right;margin-left:6px;margin-right:0}#wp-admin-bar-my-account.with-avatar>.ab-item:before{display:none;content:none}#wp-admin-bar-my-account.with-avatar>ul{min-width:270px}#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar .ab-item{white-space:nowrap}#wpadminbar #wp-admin-bar-user-actions>li{margin-left:16px;margin-right:16px}#wpadminbar #wp-admin-bar-user-actions.ab-submenu{padding:6px 0 12px}#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions>li{margin-left:88px}#wpadminbar #wp-admin-bar-user-info{margin-top:6px;margin-bottom:15px;height:auto;background:0 0}#wp-admin-bar-user-info .avatar{position:absolute;left:-72px;top:4px;width:64px;height:64px}#wpadminbar #wp-admin-bar-user-info a{background:0 0;height:auto}#wpadminbar #wp-admin-bar-user-info span{background:0 0;padding:0;height:18px}#wpadminbar #wp-admin-bar-user-info .display-name,#wpadminbar #wp-admin-bar-user-info .username{display:block}#wpadminbar #wp-admin-bar-user-info .username{color:#a0a5aa;font-size:11px}#wpadminbar #wp-admin-bar-my-account.with-avatar>.ab-empty-item img,#wpadminbar #wp-admin-bar-my-account.with-avatar>a img{width:auto;height:16px;padding:0;border:1px solid #82878c;background:#eee;line-height:24px;vertical-align:middle;margin:-4px 0 0 6px;float:none;display:inline}#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar>.ab-empty-item img,#wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar>a img{width:auto}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon{width:15px;height:20px;margin-right:0;padding:6px 0 5px}#wpadminbar #wp-admin-bar-wp-logo>.ab-item{padding:0 7px}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before{content:"\f120";top:2px}#wpadminbar .quicklinks li .blavatar{float:left;font:400 16px/1 dashicons!important;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#eee}#wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover>a .blavatar,#wpadminbar .quicklinks li a:focus .blavatar,#wpadminbar .quicklinks li a:hover .blavatar{color:#00b9eb}#wpadminbar .quicklinks li .blavatar:before{content:"\f120";height:16px;width:16px;display:inline-block;margin:6px 8px 0 -2px}#wpadminbar #wp-admin-bar-appearance{margin-top:-12px}#wpadminbar #wp-admin-bar-my-sites>.ab-item:before,#wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:"\f541";top:2px}#wpadminbar #wp-admin-bar-customize>.ab-item:before{content:"\f540";top:2px}#wpadminbar #wp-admin-bar-edit>.ab-item:before{content:"\f464";top:2px}#wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:"\f226"}.wp-admin #wpadminbar #wp-admin-bar-site-name>.ab-item:before{content:"\f102"}#wpadminbar #wp-admin-bar-comments .ab-icon{margin-right:6px}#wpadminbar #wp-admin-bar-comments .ab-icon:before{content:"\f101";top:3px}#wpadminbar #wp-admin-bar-comments .count-0{opacity:.5}#wpadminbar #wp-admin-bar-new-content .ab-icon:before{content:"\f132";top:4px}#wpadminbar #wp-admin-bar-updates .ab-icon:before{content:"\f463";top:2px}#wpadminbar.ie8 #wp-admin-bar-search{display:block;min-width:32px}#wpadminbar #wp-admin-bar-search .ab-item{padding:0;background:0 0}#wpadminbar #adminbarsearch{position:relative;height:32px;padding:0 2px;z-index:1}#wpadminbar #adminbarsearch:before{position:absolute;top:6px;left:5px;z-index:20;font:400 20px/1 dashicons!important;content:"\f179";speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{position:relative;z-index:30;font-size:13px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;line-height:24px;height:24px;width:24px;max-width:none;padding:0 3px 0 24px;margin:0;color:#ccc;background-color:rgba(255,255,255,0);border:none;outline:0;cursor:pointer;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transition-property:width,background;transition-property:width,background;-webkit-transition-timing-function:ease;transition-timing-function:ease}#wpadminbar>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{z-index:10;color:#000;width:200px;background-color:rgba(255,255,255,.9);cursor:text;border:0}#wpadminbar.ie7>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{margin-top:3px;width:120px}#wpadminbar.ie8>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBR‌​AA7)}#wpadminbar.ie8 #adminbarsearch.adminbar-focused:before{content:"\f179 "}#wpadminbar.ie8>#wp-toolbar>#wp-admin-bar-top-secondary>#wp-admin-bar-search #adminbarsearch input.adminbar-input:focus{background:#fff;z-index:-1}#wpadminbar #adminbarsearch .adminbar-button,.customize-support #wpadminbar .hide-if-customize,.customize-support .hide-if-customize,.customize-support .wp-core-ui .hide-if-customize,.customize-support.wp-core-ui .hide-if-customize,.no-customize-support #wpadminbar .hide-if-no-customize,.no-customize-support .hide-if-no-customize,.no-customize-support .wp-core-ui .hide-if-no-customize,.no-customize-support.wp-core-ui .hide-if-no-customize{display:none}#wpadminbar .screen-reader-text,#wpadminbar .screen-reader-text span{position:absolute;left:-1000em;top:-1000em;height:1px;width:1px;overflow:hidden}#wpadminbar .screen-reader-shortcut{position:absolute;top:-1000em}#wpadminbar .screen-reader-shortcut:focus{left:6px;top:7px;height:auto;width:auto;display:block;font-size:14px;font-weight:600;padding:15px 23px 14px;background:#f1f1f1;color:#0073aa;z-index:100000;line-height:normal;text-decoration:none;-webkit-box-shadow:0 0 2px 2px rgba(0,0,0,.6);box-shadow:0 0 2px 2px rgba(0,0,0,.6)}* html #wpadminbar{overflow:hidden;position:absolute}* html #wpadminbar .quicklinks ul li a{float:left}* html #wpadminbar .menupop a span{background-image:none}.no-font-face #wpadminbar ul.ab-top-menu>li>a.ab-item{display:block;width:45px;text-align:center;overflow:hidden;margin:0 3px}.no-font-face #wpadminbar #wp-admin-bar-edit>.ab-item,.no-font-face #wpadminbar #wp-admin-bar-my-sites>.ab-item,.no-font-face #wpadminbar #wp-admin-bar-site-name>.ab-item{text-indent:0}.no-font-face #wpadminbar #wp-admin-bar-wp-logo>.ab-item,.no-font-face #wpadminbar .ab-icon,.no-font-face #wpadminbar .ab-icon:before,.no-font-face #wpadminbar a.ab-item:before{display:none!important}.no-font-face #wpadminbar ul.ab-top-menu>li>a>span.ab-label{display:inline}.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon{display:inline!important}.no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon:before{content:"Menu";font:14px/45px sans-serif!important;display:inline-block!important;color:#fff}.no-font-face #wpadminbar #wp-admin-bar-site-name a.ab-item{color:#fff}@media screen and (max-width:782px){#wpadminbar ul#wp-admin-bar-root-default>li,.network-admin #wpadminbar ul#wp-admin-bar-top-secondary>li#wp-admin-bar-my-account{margin-right:0}html #wpadminbar{height:46px;min-width:300px}#wpadminbar *{font-size:14px;font-weight:400;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;line-height:32px}#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .quicklinks>ul>li>a{padding:0;height:46px;line-height:46px;width:auto}#wpadminbar .ab-icon{font:40px/1 dashicons!important;margin:0;padding:0;width:52px;height:46px;text-align:center}#wpadminbar .ab-icon:before{text-align:center}#wpadminbar .ab-submenu{padding:0}#wpadminbar #wp-admin-bar-my-account a.ab-item,#wpadminbar #wp-admin-bar-my-sites a.ab-item,#wpadminbar #wp-admin-bar-site-name a.ab-item{text-overflow:clip}#wpadminbar .ab-label{display:none}#wpadminbar .menupop li.hover>.ab-sub-wrapper,#wpadminbar .menupop li:hover>.ab-sub-wrapper{margin-top:-46px}#wpadminbar #wp-admin-bar-comments .ab-icon,#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions>li{margin:0}#wpadminbar .ab-top-menu .menupop .ab-sub-wrapper .menupop>.ab-item{padding-right:30px}#wpadminbar .menupop .menupop>.ab-item:before{top:10px;right:6px}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper .ab-item{font-size:16px;padding:8px 16px}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper a:empty{display:none}#wpadminbar #wp-admin-bar-wp-logo>.ab-item{padding:0}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon{padding:0;width:52px;height:46px;text-align:center;vertical-align:top}#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before{font:28px/1 dashicons!important;top:-3px}#wpadminbar .ab-icon,#wpadminbar .ab-item:before{padding:0}#wpadminbar #wp-admin-bar-customize>.ab-item,#wpadminbar #wp-admin-bar-edit>.ab-item,#wpadminbar #wp-admin-bar-my-account>.ab-item,#wpadminbar #wp-admin-bar-my-sites>.ab-item,#wpadminbar #wp-admin-bar-site-name>.ab-item{text-indent:100%;white-space:nowrap;overflow:hidden;width:52px;padding:0;color:#a0a5aa;position:relative}#wpadminbar .ab-icon,#wpadminbar .ab-item:before,#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon{padding:0;margin-right:0}#wpadminbar #wp-admin-bar-customize>.ab-item:before,#wpadminbar #wp-admin-bar-edit>.ab-item:before,#wpadminbar #wp-admin-bar-my-account>.ab-item:before,#wpadminbar #wp-admin-bar-my-sites>.ab-item:before,#wpadminbar #wp-admin-bar-site-name>.ab-item:before{display:block;text-indent:0;font:400 32px/1 dashicons;speak:none;top:7px;width:52px;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar #wp-admin-bar-appearance{margin-top:0}#wpadminbar .quicklinks li .blavatar:before{display:none}#wpadminbar #wp-admin-bar-search{display:none}#wpadminbar #wp-admin-bar-new-content .ab-icon:before{top:0;line-height:53px;height:46px!important;text-align:center;width:52px;display:block}#wpadminbar #wp-admin-bar-updates{text-align:center}#wpadminbar #wp-admin-bar-updates .ab-icon:before{top:3px}#wpadminbar #wp-admin-bar-comments .ab-icon:before{display:block;font-size:34px;height:46px;line-height:47px;top:0}#wp-toolbar>ul>li,#wpadminbar #wp-admin-bar-user-actions.ab-submenu img.avatar{display:none}#wpadminbar #wp-admin-bar-my-account>a{position:relative;white-space:nowrap;text-indent:150%;width:28px;padding:0 10px;overflow:hidden}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{position:absolute;top:13px;right:10px;width:26px;height:26px}#wpadminbar #wp-admin-bar-user-actions.ab-submenu{padding:0}#wpadminbar #wp-admin-bar-user-info .display-name{height:auto;font-size:16px;line-height:24px;color:#eee}#wpadminbar #wp-admin-bar-user-info a{padding-top:4px}#wpadminbar #wp-admin-bar-user-info .username{line-height:.8!important;margin-bottom:-2px}#wpadminbar li#wp-admin-bar-comments,#wpadminbar li#wp-admin-bar-customize,#wpadminbar li#wp-admin-bar-edit,#wpadminbar li#wp-admin-bar-menu-toggle,#wpadminbar li#wp-admin-bar-my-account,#wpadminbar li#wp-admin-bar-my-sites,#wpadminbar li#wp-admin-bar-new-content,#wpadminbar li#wp-admin-bar-site-name,#wpadminbar li#wp-admin-bar-updates,#wpadminbar li#wp-admin-bar-wp-logo{display:block}#wpadminbar li.hover ul li,#wpadminbar li:hover ul li,#wpadminbar li:hover ul li:hover ul li{display:list-item}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}#wpadminbar #wp-admin-bar-comments,#wpadminbar #wp-admin-bar-edit,#wpadminbar #wp-admin-bar-my-account,#wpadminbar #wp-admin-bar-my-sites,#wpadminbar #wp-admin-bar-new-content,#wpadminbar #wp-admin-bar-site-name,#wpadminbar #wp-admin-bar-updates,#wpadminbar #wp-admin-bar-wp-logo,#wpadminbar .ab-top-menu,#wpadminbar .ab-top-secondary{position:static}#wpadminbar #wp-admin-bar-my-account{float:right}#wpadminbar .ab-top-secondary .menupop .menupop>.ab-item:before{top:10px;left:0}}@media screen and (max-width:600px){#wpadminbar{position:absolute}#wp-responsive-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:400}#wpadminbar .ab-top-menu>.menupop>.ab-sub-wrapper{width:100%;left:0}#wpadminbar .menupop .menupop>.ab-item:before{display:none}#wpadminbar #wp-admin-bar-wp-logo.menupop .ab-sub-wrapper{margin-left:0}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper{margin:0;width:100%;top:auto;left:auto;position:static;-webkit-box-shadow:none;box-shadow:none}#wpadminbar .ab-top-menu>.menupop li>.ab-sub-wrapper .ab-item{font-size:16px;padding:6px 15px 19px 30px}#wpadminbar li:hover ul li ul li{display:list-item}#wpadminbar li#wp-admin-bar-updates,#wpadminbar li#wp-admin-bar-wp-logo{display:none}}@media screen and (max-width:400px){#wpadminbar li#wp-admin-bar-comments{display:none}}
\ No newline at end of file
index 05843d53cdce874919b0ddbc73141a36c47de79d..0b6bff793411b4a9c3e786277ebeab44b76dc4c3 100644 (file)
@@ -8,7 +8,7 @@ buttons in the following files are updated.
 
 WordPress-style Buttons
 =======================
-Create a button by adding the `.button` class to an element. For backwards
+Create a button by adding the `.button` class to an element. For backward
 compatibility, we support several other classes (such as `.button-secondary`),
 but these will *not* work with the stackable classes described below.
 
index 17bf3a769cd8808c85ec76722812c25a3484a8ab..6ea9964eb2fbb304b5b50b644f0472e3a149ac4c 100644 (file)
@@ -8,7 +8,7 @@ buttons in the following files are updated.
 
 WordPress-style Buttons
 =======================
-Create a button by adding the `.button` class to an element. For backwards
+Create a button by adding the `.button` class to an element. For backward
 compatibility, we support several other classes (such as `.button-secondary`),
 but these will *not* work with the stackable classes described below.
 
index 1851868db66839443e001d496860cffa58515aaa..54563741facd2820b984e793e7d54a9fdfafc191 100644 (file)
@@ -140,7 +140,7 @@ div.mce-tab:focus {
        margin: 8px 0;
        white-space: normal;
        font-size: 14px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .mce-window .wp-editor-help table {
@@ -180,14 +180,14 @@ div.mce-tab:focus {
 }
 
 .mce-window .wp-editor-help th {
-       font-weight: bold;
+       font-weight: 600;
        padding-bottom: 0;
 }
 
 .mce-window .wp-editor-help kbd {
        font-family: monospace;
        padding: 2px 7px 3px;
-       font-weight: bold;
+       font-weight: 600;
        margin: 0;
        background: #eaeaea;
        background: rgba(0,0,0,0.08);
@@ -838,7 +838,7 @@ div.mce-menu .mce-menu-item-sep,
 .mce-notification button.mce-close {
        left: 6px;
        top: 3px;
-       font-weight: normal;
+       font-weight: 400;
        color: #555d66;
 }
 
@@ -1109,7 +1109,8 @@ i.mce-i-wp_code:before {
        background: #ebebeb;
        color: #666;
        cursor: pointer;
-       font: 13px/19px "Open Sans", sans-serif;
+       font-size: 13px;
+       line-height: 19px;
        height: 20px;
        margin: 5px 5px 0 0;
        padding: 3px 8px 4px;
@@ -1241,7 +1242,7 @@ i.mce-i-wp_code:before {
 }
 
 .quicktags-toolbar input[value="b"] {
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw,
@@ -1600,7 +1601,7 @@ i.mce-i-wp_code:before {
 }
 
 #wp-link li.selected .item-title {
-       font-weight: bold;
+       font-weight: 600;
 }
 
 #wp-link li:last-child {
@@ -1756,6 +1757,10 @@ div.wp-link-preview a {
        cursor: pointer;
 }
 
+div.wp-link-preview a.wplink-url-error {
+       color: #dc3232;
+}
+
 div.wp-link-input {
        float: right;
        margin: 2px;
index 01ed0954f335490bf4bb0b790b90eb91670b707e..629f1eb5cdde9c028365a3399ef8553698a7137e 100644 (file)
@@ -1 +1 @@
-#wp-link-wrap,.mce-window{-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3)}.mce-container,.mce-container *,.mce-widget,.mce-widget *{color:inherit;font-family:inherit}#mce-modal-block,#mce-modal-block.mce-fade{opacity:.7;filter:alpha(opacity=70);-webkit-transition:none;transition:none}.mce-window{-webkit-border-radius:0;border-radius:0;box-shadow:0 3px 6px rgba(0,0,0,.3);-webkit-font-smoothing:subpixel-antialiased;-webkit-transition:none;transition:none}.mce-window .mce-container-body.mce-abs-layout{overflow:visible}.mce-window .mce-window-head{background:#fcfcfc;border-bottom:1px solid #ddd;padding:0;min-height:36px}.mce-window .mce-window-head .mce-title{color:#444;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 16px 0 36px}.mce-window .mce-window-head .mce-close,.mce-window-head .mce-close .mce-i-remove{color:transparent;top:0;left:0;width:36px;height:36px;padding:0;line-height:36px;text-align:center}.mce-window-head .mce-close .mce-i-remove:before{font:400 20px/36px dashicons;text-align:center;color:#666;width:36px;height:36px;display:block}.mce-window-head .mce-close:focus .mce-i-remove:before,.mce-window-head .mce-close:hover .mce-i-remove:before{color:#00a0d2}.mce-window-head .mce-close:focus .mce-i-remove,div.mce-tab:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.mce-window .mce-window-head .mce-dragh{width:-webkit-calc(100% - 36px);width:calc(100% - 36px)}.mce-window .mce-foot{border-top:1px solid #ddd}#wp-link .query-results,.mce-checkbox i.mce-i-checkbox,.mce-textbox{border:1px solid #ddd;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);-webkit-transition:.05s all ease-in-out;transition:.05s all ease-in-out}#wp-link .query-results:focus,.mce-checkbox:focus i.mce-i-checkbox,.mce-textbox.mce-focus,.mce-textbox:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.mce-window .mce-wp-help{height:360px;width:460px;overflow:auto}.mce-window .mce-wp-help *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mce-window .mce-wp-help>.mce-container-body{width:auto!important}.mce-window .wp-editor-help{padding:10px 20px 0 10px}.mce-window .wp-editor-help h2,.mce-window .wp-editor-help p{margin:8px 0;white-space:normal;font-size:14px;font-weight:400}.mce-window .wp-editor-help table{width:100%;margin-bottom:20px}.mce-window .wp-editor-help table.wp-help-single{margin:0 8px 20px}.mce-window .wp-editor-help table.fixed{table-layout:fixed}.mce-window .wp-editor-help table.fixed td:nth-child(odd),.mce-window .wp-editor-help table.fixed th:nth-child(odd){width:12%}.mce-window .wp-editor-help table.fixed td:nth-child(even),.mce-window .wp-editor-help table.fixed th:nth-child(even){width:38%}.mce-window .wp-editor-help table.fixed th:nth-child(odd){padding:5px 0 0}.mce-window .wp-editor-help td,.mce-window .wp-editor-help th{font-size:13px;padding:5px;vertical-align:middle;word-wrap:break-word;white-space:normal}.mce-window .wp-editor-help th{font-weight:700;padding-bottom:0}.mce-window .wp-editor-help kbd{font-family:monospace;padding:2px 7px 3px;font-weight:700;margin:0;background:#eaeaea;background:rgba(0,0,0,.08)}.mce-window .wp-help-th-center td:nth-child(odd),.mce-window .wp-help-th-center th:nth-child(odd){text-align:center}.mce-floatpanel.mce-popover,.mce-menu{border-color:rgba(0,0,0,.15);-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.mce-floatpanel.mce-popover.mce-bottom,.mce-menu{margin-top:2px}.mce-floatpanel .mce-arrow{display:none}.mce-menu .mce-container-body{min-width:160px}.mce-menu-item{border:none;margin-bottom:2px}.mce-menu-has-icons i.mce-ico{line-height:20px}div.mce-panel{border:0;background:#fff}.mce-panel.mce-menu{border:1px solid #ddd}div.mce-tab{line-height:13px}div.mce-toolbar-grp{border-bottom:1px solid #ddd;background:#f5f5f5;padding:0;position:relative}div.mce-inline-toolbar-grp{border:1px solid #a0a5aa;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.15);box-shadow:0 1px 3px rgba(0,0,0,.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:8px;position:absolute;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;max-width:98%;z-index:100100}div.mce-inline-toolbar-grp>div.mce-stack-layout{padding:1px}div.mce-inline-toolbar-grp.mce-arrow-up{margin-bottom:0;margin-top:8px}div.mce-inline-toolbar-grp:after,div.mce-inline-toolbar-grp:before{position:absolute;right:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.quicktags-toolbar,.wp-editor-tools,.wp-editor-wrap,.wp-switch-editor{position:relative}div.mce-inline-toolbar-grp.mce-arrow-up:before{top:-9px;border-bottom-color:#a0a5aa;border-width:0 9px 9px;margin-right:-9px}div.mce-inline-toolbar-grp.mce-arrow-down:before{bottom:-9px;border-top-color:#a0a5aa;border-width:9px 9px 0;margin-right:-9px}div.mce-inline-toolbar-grp.mce-arrow-up:after{top:-8px;border-bottom-color:#f5f5f5;border-width:0 8px 8px;margin-right:-8px}div.mce-inline-toolbar-grp.mce-arrow-down:after{bottom:-8px;border-top-color:#f5f5f5;border-width:8px 8px 0;margin-right:-8px}div.mce-inline-toolbar-grp.mce-arrow-left:after,div.mce-inline-toolbar-grp.mce-arrow-left:before{margin:0}div.mce-inline-toolbar-grp.mce-arrow-left:before{right:20px}div.mce-inline-toolbar-grp.mce-arrow-left:after{right:21px}div.mce-inline-toolbar-grp.mce-arrow-right:after,div.mce-inline-toolbar-grp.mce-arrow-right:before{right:auto;margin:0}div.mce-inline-toolbar-grp.mce-arrow-right:before{left:20px}div.mce-inline-toolbar-grp.mce-arrow-right:after{left:21px}div.mce-inline-toolbar-grp.mce-arrow-full{left:0}div.mce-inline-toolbar-grp.mce-arrow-full>div{width:100%;overflow-x:auto}div.mce-toolbar-grp>div{padding:3px}.has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first{padding-left:32px}.mce-toolbar .mce-btn-group{margin:0}div.mce-statusbar{border-top:1px solid #e5e5e5}div.mce-path{padding:2px 10px;margin:0}.mce-path,.mce-path .mce-divider,.mce-path-item{font-size:12px}.mce-toolbar .mce-btn,.qt-dfw{border-color:transparent;background:0 0;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;cursor:pointer}.mce-toolbar .mce-btn-group .mce-btn,.qt-dfw{border:1px solid transparent;margin:2px;-webkit-border-radius:2px;border-radius:2px}.mce-toolbar .mce-btn-group .mce-btn:focus,.mce-toolbar .mce-btn-group .mce-btn:hover,.qt-dfw:focus,.qt-dfw:hover{background:#fafafa;border-color:#555d66;color:#23282d;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);outline:0}.mce-toolbar .mce-btn-group .mce-btn.mce-active,.mce-toolbar .mce-btn-group .mce-btn:active,.qt-dfw.active{background:#ebebeb;border-color:#555d66;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3)}.mce-toolbar .mce-btn-group .mce-btn.mce-active:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover{border-color:#23282d}.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:hover{color:#a0a5aa;background:0 0;border-color:#ddd;text-shadow:0 1px 0 #fff;-webkit-box-shadow:none;box-shadow:none}.mce-menu .mce-menu-item-preview.mce-active .mce-text,.mce-toolbar .mce-btn-group .mce-btn.mce-primary .mce-ico{color:#fff}.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus{border-color:#555d66}.mce-toolbar .mce-btn-group .mce-first,.mce-toolbar .mce-btn-group .mce-last{border-color:transparent}.mce-toolbar .mce-btn button,.qt-dfw{padding:2px 3px;line-height:normal}.mce-toolbar .mce-listbox button{font-size:13px;line-height:20px;padding-right:6px;padding-left:20px}.mce-toolbar .mce-btn i{text-shadow:none}.mce-toolbar .mce-btn-group>div{white-space:normal}.mce-toolbar .mce-colorbutton .mce-open{border-left:0}.mce-toolbar .mce-colorbutton .mce-preview{margin:0;padding:0;top:auto;bottom:2px;right:3px;height:3px;width:20px;background:#555d66}.mce-toolbar .mce-btn-group .mce-btn.mce-primary{min-width:0;background:#0085ba;border-color:#0073aa #006799 #006799;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-decoration:none;text-shadow:none}.mce-toolbar .mce-btn-group .mce-btn.mce-primary button{padding:2px 3px 1px}.mce-toolbar .mce-btn-group .mce-btn.mce-primary:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-primary:hover{background:#008ec2;border-color:#006799;color:#fff}.mce-toolbar .mce-btn-group .mce-btn.mce-primary:focus{-webkit-box-shadow:0 0 1px 1px #33b3db;box-shadow:0 0 1px 1px #33b3db}.mce-toolbar .mce-btn-group .mce-btn.mce-primary:active{background:#0073aa;border-color:#006799;-webkit-box-shadow:inset 0 2px 0 #006799;box-shadow:inset 0 2px 0 #006799}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox{-webkit-border-radius:0;border-radius:0;direction:rtl;background:#fff;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2);box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2)}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:hover{border-color:#b4b9be}.mce-panel .mce-btn i.mce-caret{border-top:6px solid #555d66;margin-right:2px;margin-left:2px}.mce-listbox i.mce-caret{left:4px}.mce-panel .mce-btn:focus i.mce-caret,.mce-panel .mce-btn:hover i.mce-caret{border-top-color:#23282d}.mce-panel .mce-active i.mce-caret{border-top:0;border-bottom:6px solid #23282d;margin-top:7px}.mce-listbox.mce-active i.mce-caret{margin-top:-3px}.mce-toolbar .mce-splitbtn:hover .mce-open{border-left-color:transparent}.mce-toolbar .mce-splitbtn .mce-open.mce-active{background:0 0;outline:0}.mce-menu .mce-menu-item-normal.mce-active,.mce-menu .mce-menu-item-preview.mce-active,.mce-menu .mce-menu-item.mce-selected,.mce-menu .mce-menu-item:focus,.mce-menu .mce-menu-item:hover{background:#0073aa}.mce-menu .mce-menu-item-preview.mce-active{border-right:none}.mce-menu .mce-menu-item.mce-disabled{cursor:default}.mce-menu .mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menubar{border-color:#e5e5e5;background:#fff;border-width:0 0 1px}.mce-menubar .mce-menubtn{margin:2px}.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus,.mce-menubar .mce-menubtn:hover{border-color:transparent;background:0 0}.mce-menubar .mce-menubtn:focus{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.mce-menu-item-sep:hover,div.mce-menu .mce-menu-item-sep{border-bottom:1px solid #ddd;height:0;margin:5px 0}.mce-menubtn span{margin-left:0;padding-right:3px}.mce-menu-has-icons i.mce-ico:before{margin-right:-2px}.mce-primary button,.mce-primary button i{text-align:center;color:#fff;text-shadow:none;padding:0;line-height:26px}.mce-window .mce-btn{color:#555;background:#f7f7f7;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0;cursor:pointer;border:1px solid #ccc;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-shadow:0 1px 0 #ccc;box-shadow:0 1px 0 #ccc}.mce-window .mce-btn::-moz-focus-inner{border-width:0;border-style:none;padding:0}.mce-window .mce-btn:focus,.mce-window .mce-btn:hover{background:#fafafa;border-color:#999;color:#23282d}.mce-window .mce-btn:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 3px rgba(0,115,170,.8);box-shadow:0 0 3px rgba(0,115,170,.8)}.mce-window .mce-btn:active{background:#eee;border-color:#999;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);-webkit-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.mce-window .mce-btn.mce-disabled{color:#a0a5aa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default;-webkit-transform:none!important;-ms-transform:none!important;transform:none!important}.mce-window .mce-btn.mce-primary{background:#0085ba;border-color:#0073aa #006799 #006799;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-decoration:none;text-shadow:0 -1px 1px #006799,-1px 0 1px #006799,0 1px 1px #006799,1px 0 1px #006799}.mce-window .mce-btn.mce-primary:focus,.mce-window .mce-btn.mce-primary:hover{background:#008ec2;border-color:#006799;color:#fff}.mce-window .mce-btn.mce-primary:focus{-webkit-box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db;box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db}.mce-window .mce-btn.mce-primary:active{background:#0073aa;border-color:#006799;-webkit-box-shadow:inset 0 2px 0 #006799;box-shadow:inset 0 2px 0 #006799;vertical-align:top}.mce-window .mce-btn.mce-primary.mce-disabled{color:#66c6e4!important;background:#008ec2!important;border-color:#007cb2!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important;cursor:default}.mce-toolbar .mce-ico,.qt-dfw{text-shadow:none;text-align:center}.mce-menubtn.mce-fixed-width button{overflow-x:hidden;text-overflow:ellipsis;width:110px}.mce-charmap{margin:3px}.mce-charmap td{padding:0;border-color:#ddd;cursor:pointer}.mce-charmap td:hover{background:#f3f3f3}.mce-charmap td div{width:18px;height:22px;line-height:22px}.mce-toolbar .mce-btn .mce-open,.qt-dfw{line-height:20px}.mce-tooltip{margin-top:2px}.mce-tooltip-inner{-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);color:#fff;font-size:12px}.mce-ico{font-family:tinymce,Arial}.mce-btn-small .mce-ico{font-family:tinymce-small,Arial}.mce-toolbar .mce-ico{color:#555d66;line-height:20px;width:20px;height:20px;margin:0;padding:0}.qt-dfw{color:#555d66;width:28px;height:26px}.mce-toolbar .mce-btn.mce-active .mce-open,.mce-toolbar .mce-btn:focus .mce-open,.mce-toolbar .mce-btn:hover .mce-open{border-right-color:#23282d}.mce-notification button.mce-close{left:6px;top:3px;font-weight:400;color:#555d66}.mce-notification button.mce-close:focus,.mce-notification button.mce-close:hover{color:#000}i.mce-i-aligncenter,i.mce-i-alignjustify,i.mce-i-alignleft,i.mce-i-alignright,i.mce-i-backcolor,i.mce-i-blockquote,i.mce-i-bold,i.mce-i-bullist,i.mce-i-charmap,i.mce-i-dashicon,i.mce-i-dfw,i.mce-i-forecolor,i.mce-i-fullscreen,i.mce-i-help,i.mce-i-hr,i.mce-i-indent,i.mce-i-italic,i.mce-i-link,i.mce-i-ltr,i.mce-i-numlist,i.mce-i-outdent,i.mce-i-pastetext,i.mce-i-pasteword,i.mce-i-redo,i.mce-i-remove,i.mce-i-removeformat,i.mce-i-spellchecker,i.mce-i-strikethrough,i.mce-i-underline,i.mce-i-undo,i.mce-i-unlink,i.mce-i-wp-media-library,i.mce-i-wp_adv,i.mce-i-wp_code,i.mce-i-wp_fullscreen,i.mce-i-wp_help,i.mce-i-wp_more,i.mce-i-wp_page{font:400 20px/1 dashicons;padding:0 0 0 2px;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-right:-2px}.qt-dfw{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i.mce-i-bold:before{content:"\f200"}i.mce-i-italic:before{content:"\f201"}i.mce-i-bullist:before{content:"\f203"}i.mce-i-numlist:before{content:"\f204"}i.mce-i-blockquote:before{content:"\f205"}i.mce-i-alignleft:before{content:"\f206"}i.mce-i-aligncenter:before{content:"\f207"}i.mce-i-alignright:before{content:"\f208"}i.mce-i-link:before{content:"\f103"}i.mce-i-unlink:before{content:"\f225"}i.mce-i-wp_more:before{content:"\f209"}i.mce-i-strikethrough:before{content:"\f224"}i.mce-i-spellchecker:before{content:"\f210"}.qt-dfw:before,i.mce-i-dfw:before,i.mce-i-fullscreen:before,i.mce-i-wp_fullscreen:before{content:"\f211"}i.mce-i-wp_adv:before{content:"\f212"}i.mce-i-underline:before{content:"\f213"}i.mce-i-alignjustify:before{content:"\f214"}i.mce-i-backcolor:before,i.mce-i-forecolor:before{content:"\f215"}i.mce-i-pastetext:before{content:"\f217"}i.mce-i-removeformat:before{content:"\f218"}i.mce-i-charmap:before{content:"\f220"}i.mce-i-outdent:before{content:"\f221"}i.mce-i-indent:before{content:"\f222"}i.mce-i-undo:before{content:"\f171"}i.mce-i-redo:before{content:"\f172"}i.mce-i-help:before,i.mce-i-wp_help:before{content:"\f223"}i.mce-i-wp-media-library:before{content:"\f104"}i.mce-i-ltr:before{content:"\f320"}i.mce-i-wp_page:before{content:"\f105"}i.mce-i-hr:before{content:"\f460"}i.mce-i-remove:before{content:"\f158"}i.mce-i-wp_code:before{content:"\f475"}.rtl i.mce-i-outdent:before{content:"\f222"}.rtl i.mce-i-indent:before{content:"\f221"}.wp-editor-tools{z-index:1}.wp-editor-tools:after{clear:both;content:"";display:table}.wp-editor-container{clear:both}.wp-editor-area{font-family:Consolas,Monaco,monospace;font-size:13px;padding:10px;margin:1px 0 0;line-height:150%;border:0;outline:0;display:block;resize:vertical;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.rtl .wp-editor-area{font-family:Tahoma,Monaco,monospace}.locale-he-il .wp-editor-area{font-family:Arial,Monaco,monospace}.wp-editor-container textarea.wp-editor-area{width:100%;margin:0;-webkit-box-shadow:none;box-shadow:none}.wp-editor-tabs{float:left}.wp-switch-editor{float:right;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;top:1px;background:#ebebeb;color:#666;cursor:pointer;font:13px/19px "Open Sans",sans-serif;height:20px;margin:5px 5px 0 0;padding:3px 8px 4px;border:1px solid #e5e5e5}.wp-switch-editor:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);outline:0;color:#23282d}.html-active .switch-html:focus,.tmce-active .switch-tmce:focus,.wp-switch-editor:active{-webkit-box-shadow:none;box-shadow:none}.wp-switch-editor:active{background-color:#f5f5f5;-webkit-box-shadow:none;box-shadow:none}.js .tmce-active .wp-editor-area{color:#fff}.tmce-active .quicktags-toolbar{display:none}.html-active .switch-html,.tmce-active .switch-tmce{background:#f5f5f5;color:#555;border-bottom-color:#f5f5f5}.wp-media-buttons{float:right}.wp-media-buttons .button{margin-left:5px;margin-bottom:4px;padding-right:7px;padding-left:7px}.wp-media-buttons .button:active{position:relative;top:1px;margin-top:-1px;margin-bottom:1px}.wp-media-buttons .insert-media{padding-right:5px}.wp-media-buttons a{text-decoration:none;color:#444;font-size:12px}.wp-media-buttons img{padding:0 4px;vertical-align:middle}.wp-media-buttons span.wp-media-buttons-icon{display:inline-block;width:18px;height:18px;vertical-align:text-top;margin:0 2px}.wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}.wp-media-buttons .add_media span.wp-media-buttons-icon:before{font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f104"}.quicktags-toolbar{padding:3px;border-bottom:1px solid #ddd;background:#f5f5f5;min-height:30px}.has-dfw .quicktags-toolbar{padding-left:35px}.wp-core-ui .quicktags-toolbar input.button.button-small{margin:2px}.quicktags-toolbar input[value=link]{text-decoration:underline}.quicktags-toolbar input[value=del]{text-decoration:line-through}.quicktags-toolbar input[value="i"]{font-style:italic}.quicktags-toolbar input[value="b"]{font-weight:700}.mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw,.qt-dfw{position:absolute;top:0;left:0;margin:5px 0 0 5px}.qt-fullscreen{position:static;margin:2px}@media screen and (max-width:782px){.mce-toolbar .mce-btn button,.qt-dfw{padding:6px 7px}.mce-toolbar .mce-btn-group .mce-btn.mce-primary button{padding:6px 7px 5px}.mce-toolbar .mce-btn-group .mce-btn{margin:1px}.qt-dfw{width:36px;height:34px}.mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw{margin:4px 0 0 4px}.mce-toolbar .mce-colorbutton .mce-preview{right:8px;bottom:6px}.mce-window .mce-btn{padding:2px 0}.has-dfw .quicktags-toolbar,.has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first{padding-left:40px}}@media screen and (min-width:782px){.wp-core-ui .quicktags-toolbar input.button.button-small{font-size:12px;height:26px;line-height:24px}}#wp_editbtns,#wp_gallerybtns{padding:2px;position:absolute;display:none;z-index:100020}#wp_delgallery,#wp_delimgbtn,#wp_editgallery,#wp_editimgbtn{border-color:#999;background-color:#eee;margin:2px;padding:2px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px}#wp_delgallery:hover,#wp_delimgbtn:hover,#wp_editgallery:hover,#wp_editimgbtn:hover{border-color:#555;background-color:#ccc}#wp-link-wrap{display:none;background-color:#fff;box-shadow:0 3px 6px rgba(0,0,0,.3);width:500px;overflow:hidden;margin-right:-250px;position:fixed;top:50%;right:50%;z-index:100105;-webkit-transition:height .2s,margin-top .2s;transition:height .2s,margin-top .2s;height:500px;margin-top:-250px}#wp-link-backdrop{display:none;position:fixed;top:0;right:0;left:0;bottom:0;min-height:360px;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:100100}#wp-link{position:relative;height:100%}#wp-link-wrap .wp-link-text-field{display:none}#wp-link-wrap.has-text-field .wp-link-text-field{display:block}#link-modal-title{background:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 16px 0 36px}#wp-link-close{color:#666;padding:0;position:absolute;top:0;left:0;width:36px;height:36px;text-align:center;background:0 0;border:none;cursor:pointer}#wp-link-close:before{font:400 20px/36px dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:36px;height:36px;content:"\f158"}#wp-link-close:focus,#wp-link-close:hover{color:#00a0d2}#wp-link-close:focus{outline:0;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#wp-link-wrap #link-selector{-webkit-overflow-scrolling:touch;padding:0 16px;position:absolute;top:37px;right:0;left:0;bottom:44px}#wp-link ol,#wp-link ul{list-style:none;margin:0;padding:0}#wp-link input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wp-link #link-options{padding:8px 0 12px}#wp-link p.howto{margin:3px 0}#wp-link p.howto a{text-decoration:none;color:inherit}#wp-link label input[type=text]{margin-top:5px;width:70%}#wp-link #link-options label span,#wp-link #search-panel label span.search-label{display:inline-block;width:80px;text-align:left;padding-left:5px;max-width:24%;vertical-align:middle;word-wrap:break-word}#wp-link .link-search-field{float:right;width:250px;max-width:70%}#wp-link .link-search-wrapper{margin:5px 0 9px;display:block;overflow:hidden}#wp-link .link-search-wrapper span{float:right;margin-top:4px}#wp-link .link-search-wrapper .spinner{margin-top:5px}#wp-link .link-target{padding:3px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wp-link .link-target label{max-width:70%}#wp-link .query-results{border:1px solid #dfdfdf;margin:0 0 12px;background:#fff;overflow:auto;position:absolute;right:16px;left:16px;bottom:0;top:166px}.has-text-field #wp-link .query-results{top:200px}#wp-link li{clear:both;margin-bottom:0;border-bottom:1px solid #f1f1f1;color:#32373c;padding:4px 10px 4px 6px;cursor:pointer;position:relative}#wp-link .query-notice,#wp-link li.unselectable{border-bottom:1px solid #dfdfdf}#wp-link .query-notice{padding:0;background-color:#f7fcfe;color:#000}#wp-link .query-notice .query-notice-default,#wp-link .query-notice .query-notice-hint{display:block;padding:6px;border-right:4px solid #00a0d2}#wp-link .unselectable.no-matches-found{padding:0;border-bottom:1px solid #dfdfdf;background-color:#fef7f1}#wp-link .no-matches-found .item-title{display:block;padding:6px;border-right:4px solid #d54e21}#wp-link .query-results em{font-style:normal}#wp-link li:hover{background:#eaf2fa;color:#151515}#wp-link li.unselectable:hover{background:#fff;cursor:auto;color:#32373c}#wp-link li.selected{background:#ddd;color:#32373c}#wp-link li.selected .item-title{font-weight:700}#wp-link li:last-child{border:none}#wp-link .item-title{display:inline-block;width:80%;width:-webkit-calc(100% - 68px);width:calc(100% - 68px);word-wrap:break-word}#wp-link .item-info{text-transform:uppercase;color:#666;font-size:11px;position:absolute;left:5px;top:5px}#wp-link .river-waiting{display:none;padding:10px 0}#wp-link .submitbox{padding:8px 16px;background:#fcfcfc;border-top:1px solid #ddd;position:absolute;bottom:0;right:0;left:0}#wp-link-cancel{line-height:25px;float:right}#wp-link-update{line-height:23px;float:left}#wp-link-submit{float:left}@media screen and (max-width:782px){#wp-link-wrap{margin-top:-140px}#wp-link-wrap .query-results{top:195px}#wp-link-wrap.has-text-field .query-results{top:235px}#link-selector{padding:0 16px 60px}#wp-link-wrap #link-selector{bottom:52px}#wp-link-cancel{line-height:32px}#wp-link .link-target{padding-top:10px}#wp-link .submitbox .button{margin-bottom:0}}@media screen and (max-width:520px){#wp-link-wrap{width:auto;margin-right:0;right:10px;left:10px;max-width:500px}}@media screen and (max-height:520px){#wp-link-wrap{-webkit-transition:none;transition:none;height:auto;margin-top:0;top:10px;bottom:10px}#link-selector{overflow:auto}#search-panel .query-results{position:static}}@media screen and (max-height:290px){#wp-link-wrap{height:auto;margin-top:0;top:10px;bottom:10px}#link-selector{overflow:auto;height:-webkit-calc(100% - 92px);height:calc(100% - 92px);padding-bottom:2px}#search-panel .query-results{position:static}}div.wp-link-preview{float:right;margin:5px;max-width:694px;overflow:hidden;text-overflow:ellipsis}div.wp-link-preview a{color:#0073aa;text-decoration:underline;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;cursor:pointer}div.wp-link-input{float:right;margin:2px;max-width:694px}div.wp-link-input input{width:300px;padding:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mce-toolbar div.wp-link-input~.mce-btn,.mce-toolbar div.wp-link-preview~.mce-btn{margin:2px 1px}.mce-inline-toolbar-grp .mce-btn-group .mce-btn:last-child{margin-left:2px}.ui-autocomplete.wplink-autocomplete{z-index:100110;max-height:200px;overflow-y:auto;padding:0;margin:0;list-style:none;position:absolute;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete.wplink-autocomplete li{margin-bottom:0;padding:4px 10px;clear:both;white-space:normal;text-align:right}.ui-autocomplete.wplink-autocomplete li .wp-editor-float-right{float:left}.ui-autocomplete.wplink-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}@media screen and (max-width:782px){div.wp-link-input,div.wp-link-preview{max-width:70%;max-width:-webkit-calc(100% - 86px);max-width:calc(100% - 86px)}div.wp-link-preview{margin:8px 5px 8px 0}div.wp-link-input{width:300px}div.wp-link-input input{width:100%;font-size:16px;padding:5px}}.mce-fullscreen{z-index:100010}.rtl .quicktags-toolbar input,.rtl .wp-switch-editor{font-family:Tahoma,sans-serif}.mce-rtl .mce-flow-layout .mce-flow-layout-item>div{direction:rtl}.mce-rtl .mce-listbox i.mce-caret{left:6px}html:lang(he-il) .rtl .quicktags-toolbar input,html:lang(he-il) .rtl .wp-switch-editor{font-family:Arial,sans-serif}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}}
\ No newline at end of file
+#wp-link-wrap,.mce-window{-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3)}.mce-container,.mce-container *,.mce-widget,.mce-widget *{color:inherit;font-family:inherit}#mce-modal-block,#mce-modal-block.mce-fade{opacity:.7;filter:alpha(opacity=70);-webkit-transition:none;transition:none}.mce-window{-webkit-border-radius:0;border-radius:0;box-shadow:0 3px 6px rgba(0,0,0,.3);-webkit-font-smoothing:subpixel-antialiased;-webkit-transition:none;transition:none}.mce-window .mce-container-body.mce-abs-layout{overflow:visible}.mce-window .mce-window-head{background:#fcfcfc;border-bottom:1px solid #ddd;padding:0;min-height:36px}.mce-window .mce-window-head .mce-title{color:#444;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 16px 0 36px}.mce-window .mce-window-head .mce-close,.mce-window-head .mce-close .mce-i-remove{color:transparent;top:0;left:0;width:36px;height:36px;padding:0;line-height:36px;text-align:center}.mce-window-head .mce-close .mce-i-remove:before{font:400 20px/36px dashicons;text-align:center;color:#666;width:36px;height:36px;display:block}.mce-window-head .mce-close:focus .mce-i-remove:before,.mce-window-head .mce-close:hover .mce-i-remove:before{color:#00a0d2}.mce-window-head .mce-close:focus .mce-i-remove,div.mce-tab:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.mce-window .mce-window-head .mce-dragh{width:-webkit-calc(100% - 36px);width:calc(100% - 36px)}.mce-window .mce-foot{border-top:1px solid #ddd}#wp-link .query-results,.mce-checkbox i.mce-i-checkbox,.mce-textbox{border:1px solid #ddd;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);-webkit-transition:.05s all ease-in-out;transition:.05s all ease-in-out}#wp-link .query-results:focus,.mce-checkbox:focus i.mce-i-checkbox,.mce-textbox.mce-focus,.mce-textbox:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.mce-window .mce-wp-help{height:360px;width:460px;overflow:auto}.mce-window .mce-wp-help *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mce-window .mce-wp-help>.mce-container-body{width:auto!important}.mce-window .wp-editor-help{padding:10px 20px 0 10px}.mce-window .wp-editor-help h2,.mce-window .wp-editor-help p{margin:8px 0;white-space:normal;font-size:14px;font-weight:400}.mce-window .wp-editor-help table{width:100%;margin-bottom:20px}.mce-window .wp-editor-help table.wp-help-single{margin:0 8px 20px}.mce-window .wp-editor-help table.fixed{table-layout:fixed}.mce-window .wp-editor-help table.fixed td:nth-child(odd),.mce-window .wp-editor-help table.fixed th:nth-child(odd){width:12%}.mce-window .wp-editor-help table.fixed td:nth-child(even),.mce-window .wp-editor-help table.fixed th:nth-child(even){width:38%}.mce-window .wp-editor-help table.fixed th:nth-child(odd){padding:5px 0 0}.mce-window .wp-editor-help td,.mce-window .wp-editor-help th{font-size:13px;padding:5px;vertical-align:middle;word-wrap:break-word;white-space:normal}.mce-window .wp-editor-help th{font-weight:600;padding-bottom:0}.mce-window .wp-editor-help kbd{font-family:monospace;padding:2px 7px 3px;font-weight:600;margin:0;background:#eaeaea;background:rgba(0,0,0,.08)}.mce-window .wp-help-th-center td:nth-child(odd),.mce-window .wp-help-th-center th:nth-child(odd){text-align:center}.mce-floatpanel.mce-popover,.mce-menu{border-color:rgba(0,0,0,.15);-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.mce-floatpanel.mce-popover.mce-bottom,.mce-menu{margin-top:2px}.mce-floatpanel .mce-arrow{display:none}.mce-menu .mce-container-body{min-width:160px}.mce-menu-item{border:none;margin-bottom:2px}.mce-menu-has-icons i.mce-ico{line-height:20px}div.mce-panel{border:0;background:#fff}.mce-panel.mce-menu{border:1px solid #ddd}div.mce-tab{line-height:13px}div.mce-toolbar-grp{border-bottom:1px solid #ddd;background:#f5f5f5;padding:0;position:relative}div.mce-inline-toolbar-grp{border:1px solid #a0a5aa;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.15);box-shadow:0 1px 3px rgba(0,0,0,.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:8px;position:absolute;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;max-width:98%;z-index:100100}div.mce-inline-toolbar-grp>div.mce-stack-layout{padding:1px}div.mce-inline-toolbar-grp.mce-arrow-up{margin-bottom:0;margin-top:8px}div.mce-inline-toolbar-grp:after,div.mce-inline-toolbar-grp:before{position:absolute;right:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.quicktags-toolbar,.wp-editor-tools,.wp-editor-wrap,.wp-switch-editor{position:relative}div.mce-inline-toolbar-grp.mce-arrow-up:before{top:-9px;border-bottom-color:#a0a5aa;border-width:0 9px 9px;margin-right:-9px}div.mce-inline-toolbar-grp.mce-arrow-down:before{bottom:-9px;border-top-color:#a0a5aa;border-width:9px 9px 0;margin-right:-9px}div.mce-inline-toolbar-grp.mce-arrow-up:after{top:-8px;border-bottom-color:#f5f5f5;border-width:0 8px 8px;margin-right:-8px}div.mce-inline-toolbar-grp.mce-arrow-down:after{bottom:-8px;border-top-color:#f5f5f5;border-width:8px 8px 0;margin-right:-8px}div.mce-inline-toolbar-grp.mce-arrow-left:after,div.mce-inline-toolbar-grp.mce-arrow-left:before{margin:0}div.mce-inline-toolbar-grp.mce-arrow-left:before{right:20px}div.mce-inline-toolbar-grp.mce-arrow-left:after{right:21px}div.mce-inline-toolbar-grp.mce-arrow-right:after,div.mce-inline-toolbar-grp.mce-arrow-right:before{right:auto;margin:0}div.mce-inline-toolbar-grp.mce-arrow-right:before{left:20px}div.mce-inline-toolbar-grp.mce-arrow-right:after{left:21px}div.mce-inline-toolbar-grp.mce-arrow-full{left:0}div.mce-inline-toolbar-grp.mce-arrow-full>div{width:100%;overflow-x:auto}div.mce-toolbar-grp>div{padding:3px}.has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first{padding-left:32px}.mce-toolbar .mce-btn-group{margin:0}div.mce-statusbar{border-top:1px solid #e5e5e5}div.mce-path{padding:2px 10px;margin:0}.mce-path,.mce-path .mce-divider,.mce-path-item{font-size:12px}.mce-toolbar .mce-btn,.qt-dfw{border-color:transparent;background:0 0;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;cursor:pointer}.mce-toolbar .mce-btn-group .mce-btn,.qt-dfw{border:1px solid transparent;margin:2px;-webkit-border-radius:2px;border-radius:2px}.mce-toolbar .mce-btn-group .mce-btn:focus,.mce-toolbar .mce-btn-group .mce-btn:hover,.qt-dfw:focus,.qt-dfw:hover{background:#fafafa;border-color:#555d66;color:#23282d;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);outline:0}.mce-toolbar .mce-btn-group .mce-btn.mce-active,.mce-toolbar .mce-btn-group .mce-btn:active,.qt-dfw.active{background:#ebebeb;border-color:#555d66;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3)}.mce-toolbar .mce-btn-group .mce-btn.mce-active:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover{border-color:#23282d}.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:hover{color:#a0a5aa;background:0 0;border-color:#ddd;text-shadow:0 1px 0 #fff;-webkit-box-shadow:none;box-shadow:none}.mce-menu .mce-menu-item-preview.mce-active .mce-text,.mce-toolbar .mce-btn-group .mce-btn.mce-primary .mce-ico{color:#fff}.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus{border-color:#555d66}.mce-toolbar .mce-btn-group .mce-first,.mce-toolbar .mce-btn-group .mce-last{border-color:transparent}.mce-toolbar .mce-btn button,.qt-dfw{padding:2px 3px;line-height:normal}.mce-toolbar .mce-listbox button{font-size:13px;line-height:20px;padding-right:6px;padding-left:20px}.mce-toolbar .mce-btn i{text-shadow:none}.mce-toolbar .mce-btn-group>div{white-space:normal}.mce-toolbar .mce-colorbutton .mce-open{border-left:0}.mce-toolbar .mce-colorbutton .mce-preview{margin:0;padding:0;top:auto;bottom:2px;right:3px;height:3px;width:20px;background:#555d66}.mce-toolbar .mce-btn-group .mce-btn.mce-primary{min-width:0;background:#0085ba;border-color:#0073aa #006799 #006799;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-decoration:none;text-shadow:none}.mce-toolbar .mce-btn-group .mce-btn.mce-primary button{padding:2px 3px 1px}.mce-toolbar .mce-btn-group .mce-btn.mce-primary:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-primary:hover{background:#008ec2;border-color:#006799;color:#fff}.mce-toolbar .mce-btn-group .mce-btn.mce-primary:focus{-webkit-box-shadow:0 0 1px 1px #33b3db;box-shadow:0 0 1px 1px #33b3db}.mce-toolbar .mce-btn-group .mce-btn.mce-primary:active{background:#0073aa;border-color:#006799;-webkit-box-shadow:inset 0 2px 0 #006799;box-shadow:inset 0 2px 0 #006799}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox{-webkit-border-radius:0;border-radius:0;direction:rtl;background:#fff;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2);box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2)}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:hover{border-color:#b4b9be}.mce-panel .mce-btn i.mce-caret{border-top:6px solid #555d66;margin-right:2px;margin-left:2px}.mce-listbox i.mce-caret{left:4px}.mce-panel .mce-btn:focus i.mce-caret,.mce-panel .mce-btn:hover i.mce-caret{border-top-color:#23282d}.mce-panel .mce-active i.mce-caret{border-top:0;border-bottom:6px solid #23282d;margin-top:7px}.mce-listbox.mce-active i.mce-caret{margin-top:-3px}.mce-toolbar .mce-splitbtn:hover .mce-open{border-left-color:transparent}.mce-toolbar .mce-splitbtn .mce-open.mce-active{background:0 0;outline:0}.mce-menu .mce-menu-item-normal.mce-active,.mce-menu .mce-menu-item-preview.mce-active,.mce-menu .mce-menu-item.mce-selected,.mce-menu .mce-menu-item:focus,.mce-menu .mce-menu-item:hover{background:#0073aa}.mce-menu .mce-menu-item-preview.mce-active{border-right:none}.mce-menu .mce-menu-item.mce-disabled{cursor:default}.mce-menu .mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menubar{border-color:#e5e5e5;background:#fff;border-width:0 0 1px}.mce-menubar .mce-menubtn{margin:2px}.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus,.mce-menubar .mce-menubtn:hover{border-color:transparent;background:0 0}.mce-menubar .mce-menubtn:focus{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.mce-menu-item-sep:hover,div.mce-menu .mce-menu-item-sep{border-bottom:1px solid #ddd;height:0;margin:5px 0}.mce-menubtn span{margin-left:0;padding-right:3px}.mce-menu-has-icons i.mce-ico:before{margin-right:-2px}.mce-primary button,.mce-primary button i{text-align:center;color:#fff;text-shadow:none;padding:0;line-height:26px}.mce-window .mce-btn{color:#555;background:#f7f7f7;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0;cursor:pointer;border:1px solid #ccc;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-shadow:0 1px 0 #ccc;box-shadow:0 1px 0 #ccc}.mce-window .mce-btn::-moz-focus-inner{border-width:0;border-style:none;padding:0}.mce-window .mce-btn:focus,.mce-window .mce-btn:hover{background:#fafafa;border-color:#999;color:#23282d}.mce-window .mce-btn:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 3px rgba(0,115,170,.8);box-shadow:0 0 3px rgba(0,115,170,.8)}.mce-window .mce-btn:active{background:#eee;border-color:#999;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);-webkit-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.mce-window .mce-btn.mce-disabled{color:#a0a5aa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default;-webkit-transform:none!important;-ms-transform:none!important;transform:none!important}.mce-window .mce-btn.mce-primary{background:#0085ba;border-color:#0073aa #006799 #006799;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-decoration:none;text-shadow:0 -1px 1px #006799,-1px 0 1px #006799,0 1px 1px #006799,1px 0 1px #006799}.mce-window .mce-btn.mce-primary:focus,.mce-window .mce-btn.mce-primary:hover{background:#008ec2;border-color:#006799;color:#fff}.mce-window .mce-btn.mce-primary:focus{-webkit-box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db;box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db}.mce-window .mce-btn.mce-primary:active{background:#0073aa;border-color:#006799;-webkit-box-shadow:inset 0 2px 0 #006799;box-shadow:inset 0 2px 0 #006799;vertical-align:top}.mce-window .mce-btn.mce-primary.mce-disabled{color:#66c6e4!important;background:#008ec2!important;border-color:#007cb2!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important;cursor:default}.mce-toolbar .mce-ico,.qt-dfw{text-shadow:none;text-align:center}.mce-menubtn.mce-fixed-width button{overflow-x:hidden;text-overflow:ellipsis;width:110px}.mce-charmap{margin:3px}.mce-charmap td{padding:0;border-color:#ddd;cursor:pointer}.mce-charmap td:hover{background:#f3f3f3}.mce-charmap td div{width:18px;height:22px;line-height:22px}.mce-toolbar .mce-btn .mce-open,.qt-dfw{line-height:20px}.mce-tooltip{margin-top:2px}.mce-tooltip-inner{-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);color:#fff;font-size:12px}.mce-ico{font-family:tinymce,Arial}.mce-btn-small .mce-ico{font-family:tinymce-small,Arial}.mce-toolbar .mce-ico{color:#555d66;line-height:20px;width:20px;height:20px;margin:0;padding:0}.qt-dfw{color:#555d66;width:28px;height:26px}.mce-toolbar .mce-btn.mce-active .mce-open,.mce-toolbar .mce-btn:focus .mce-open,.mce-toolbar .mce-btn:hover .mce-open{border-right-color:#23282d}.mce-notification button.mce-close{left:6px;top:3px;font-weight:400;color:#555d66}.mce-notification button.mce-close:focus,.mce-notification button.mce-close:hover{color:#000}i.mce-i-aligncenter,i.mce-i-alignjustify,i.mce-i-alignleft,i.mce-i-alignright,i.mce-i-backcolor,i.mce-i-blockquote,i.mce-i-bold,i.mce-i-bullist,i.mce-i-charmap,i.mce-i-dashicon,i.mce-i-dfw,i.mce-i-forecolor,i.mce-i-fullscreen,i.mce-i-help,i.mce-i-hr,i.mce-i-indent,i.mce-i-italic,i.mce-i-link,i.mce-i-ltr,i.mce-i-numlist,i.mce-i-outdent,i.mce-i-pastetext,i.mce-i-pasteword,i.mce-i-redo,i.mce-i-remove,i.mce-i-removeformat,i.mce-i-spellchecker,i.mce-i-strikethrough,i.mce-i-underline,i.mce-i-undo,i.mce-i-unlink,i.mce-i-wp-media-library,i.mce-i-wp_adv,i.mce-i-wp_code,i.mce-i-wp_fullscreen,i.mce-i-wp_help,i.mce-i-wp_more,i.mce-i-wp_page{font:400 20px/1 dashicons;padding:0 0 0 2px;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-right:-2px}.qt-dfw{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i.mce-i-bold:before{content:"\f200"}i.mce-i-italic:before{content:"\f201"}i.mce-i-bullist:before{content:"\f203"}i.mce-i-numlist:before{content:"\f204"}i.mce-i-blockquote:before{content:"\f205"}i.mce-i-alignleft:before{content:"\f206"}i.mce-i-aligncenter:before{content:"\f207"}i.mce-i-alignright:before{content:"\f208"}i.mce-i-link:before{content:"\f103"}i.mce-i-unlink:before{content:"\f225"}i.mce-i-wp_more:before{content:"\f209"}i.mce-i-strikethrough:before{content:"\f224"}i.mce-i-spellchecker:before{content:"\f210"}.qt-dfw:before,i.mce-i-dfw:before,i.mce-i-fullscreen:before,i.mce-i-wp_fullscreen:before{content:"\f211"}i.mce-i-wp_adv:before{content:"\f212"}i.mce-i-underline:before{content:"\f213"}i.mce-i-alignjustify:before{content:"\f214"}i.mce-i-backcolor:before,i.mce-i-forecolor:before{content:"\f215"}i.mce-i-pastetext:before{content:"\f217"}i.mce-i-removeformat:before{content:"\f218"}i.mce-i-charmap:before{content:"\f220"}i.mce-i-outdent:before{content:"\f221"}i.mce-i-indent:before{content:"\f222"}i.mce-i-undo:before{content:"\f171"}i.mce-i-redo:before{content:"\f172"}i.mce-i-help:before,i.mce-i-wp_help:before{content:"\f223"}i.mce-i-wp-media-library:before{content:"\f104"}i.mce-i-ltr:before{content:"\f320"}i.mce-i-wp_page:before{content:"\f105"}i.mce-i-hr:before{content:"\f460"}i.mce-i-remove:before{content:"\f158"}i.mce-i-wp_code:before{content:"\f475"}.rtl i.mce-i-outdent:before{content:"\f222"}.rtl i.mce-i-indent:before{content:"\f221"}.wp-editor-tools{z-index:1}.wp-editor-tools:after{clear:both;content:"";display:table}.wp-editor-container{clear:both}.wp-editor-area{font-family:Consolas,Monaco,monospace;font-size:13px;padding:10px;margin:1px 0 0;line-height:150%;border:0;outline:0;display:block;resize:vertical;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.rtl .wp-editor-area{font-family:Tahoma,Monaco,monospace}.locale-he-il .wp-editor-area{font-family:Arial,Monaco,monospace}.wp-editor-container textarea.wp-editor-area{width:100%;margin:0;-webkit-box-shadow:none;box-shadow:none}.wp-editor-tabs{float:left}.wp-switch-editor{float:right;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;top:1px;background:#ebebeb;color:#666;cursor:pointer;font-size:13px;line-height:19px;height:20px;margin:5px 5px 0 0;padding:3px 8px 4px;border:1px solid #e5e5e5}.wp-switch-editor:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);outline:0;color:#23282d}.html-active .switch-html:focus,.tmce-active .switch-tmce:focus,.wp-switch-editor:active{-webkit-box-shadow:none;box-shadow:none}.wp-switch-editor:active{background-color:#f5f5f5;-webkit-box-shadow:none;box-shadow:none}.js .tmce-active .wp-editor-area{color:#fff}.tmce-active .quicktags-toolbar{display:none}.html-active .switch-html,.tmce-active .switch-tmce{background:#f5f5f5;color:#555;border-bottom-color:#f5f5f5}.wp-media-buttons{float:right}.wp-media-buttons .button{margin-left:5px;margin-bottom:4px;padding-right:7px;padding-left:7px}.wp-media-buttons .button:active{position:relative;top:1px;margin-top:-1px;margin-bottom:1px}.wp-media-buttons .insert-media{padding-right:5px}.wp-media-buttons a{text-decoration:none;color:#444;font-size:12px}.wp-media-buttons img{padding:0 4px;vertical-align:middle}.wp-media-buttons span.wp-media-buttons-icon{display:inline-block;width:18px;height:18px;vertical-align:text-top;margin:0 2px}.wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}.wp-media-buttons .add_media span.wp-media-buttons-icon:before{font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f104"}.quicktags-toolbar{padding:3px;border-bottom:1px solid #ddd;background:#f5f5f5;min-height:30px}.has-dfw .quicktags-toolbar{padding-left:35px}.wp-core-ui .quicktags-toolbar input.button.button-small{margin:2px}.quicktags-toolbar input[value=link]{text-decoration:underline}.quicktags-toolbar input[value=del]{text-decoration:line-through}.quicktags-toolbar input[value="i"]{font-style:italic}.quicktags-toolbar input[value="b"]{font-weight:600}.mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw,.qt-dfw{position:absolute;top:0;left:0;margin:5px 0 0 5px}.qt-fullscreen{position:static;margin:2px}@media screen and (max-width:782px){.mce-toolbar .mce-btn button,.qt-dfw{padding:6px 7px}.mce-toolbar .mce-btn-group .mce-btn.mce-primary button{padding:6px 7px 5px}.mce-toolbar .mce-btn-group .mce-btn{margin:1px}.qt-dfw{width:36px;height:34px}.mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw{margin:4px 0 0 4px}.mce-toolbar .mce-colorbutton .mce-preview{right:8px;bottom:6px}.mce-window .mce-btn{padding:2px 0}.has-dfw .quicktags-toolbar,.has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first{padding-left:40px}}@media screen and (min-width:782px){.wp-core-ui .quicktags-toolbar input.button.button-small{font-size:12px;height:26px;line-height:24px}}#wp_editbtns,#wp_gallerybtns{padding:2px;position:absolute;display:none;z-index:100020}#wp_delgallery,#wp_delimgbtn,#wp_editgallery,#wp_editimgbtn{border-color:#999;background-color:#eee;margin:2px;padding:2px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px}#wp_delgallery:hover,#wp_delimgbtn:hover,#wp_editgallery:hover,#wp_editimgbtn:hover{border-color:#555;background-color:#ccc}#wp-link-wrap{display:none;background-color:#fff;box-shadow:0 3px 6px rgba(0,0,0,.3);width:500px;overflow:hidden;margin-right:-250px;position:fixed;top:50%;right:50%;z-index:100105;-webkit-transition:height .2s,margin-top .2s;transition:height .2s,margin-top .2s;height:500px;margin-top:-250px}#wp-link-backdrop{display:none;position:fixed;top:0;right:0;left:0;bottom:0;min-height:360px;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:100100}#wp-link{position:relative;height:100%}#wp-link-wrap .wp-link-text-field{display:none}#wp-link-wrap.has-text-field .wp-link-text-field{display:block}#link-modal-title{background:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 16px 0 36px}#wp-link-close{color:#666;padding:0;position:absolute;top:0;left:0;width:36px;height:36px;text-align:center;background:0 0;border:none;cursor:pointer}#wp-link-close:before{font:400 20px/36px dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:36px;height:36px;content:"\f158"}#wp-link-close:focus,#wp-link-close:hover{color:#00a0d2}#wp-link-close:focus{outline:0;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#wp-link-wrap #link-selector{-webkit-overflow-scrolling:touch;padding:0 16px;position:absolute;top:37px;right:0;left:0;bottom:44px}#wp-link ol,#wp-link ul{list-style:none;margin:0;padding:0}#wp-link input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wp-link #link-options{padding:8px 0 12px}#wp-link p.howto{margin:3px 0}#wp-link p.howto a{text-decoration:none;color:inherit}#wp-link label input[type=text]{margin-top:5px;width:70%}#wp-link #link-options label span,#wp-link #search-panel label span.search-label{display:inline-block;width:80px;text-align:left;padding-left:5px;max-width:24%;vertical-align:middle;word-wrap:break-word}#wp-link .link-search-field{float:right;width:250px;max-width:70%}#wp-link .link-search-wrapper{margin:5px 0 9px;display:block;overflow:hidden}#wp-link .link-search-wrapper span{float:right;margin-top:4px}#wp-link .link-search-wrapper .spinner{margin-top:5px}#wp-link .link-target{padding:3px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wp-link .link-target label{max-width:70%}#wp-link .query-results{border:1px solid #dfdfdf;margin:0 0 12px;background:#fff;overflow:auto;position:absolute;right:16px;left:16px;bottom:0;top:166px}.has-text-field #wp-link .query-results{top:200px}#wp-link li{clear:both;margin-bottom:0;border-bottom:1px solid #f1f1f1;color:#32373c;padding:4px 10px 4px 6px;cursor:pointer;position:relative}#wp-link .query-notice,#wp-link li.unselectable{border-bottom:1px solid #dfdfdf}#wp-link .query-notice{padding:0;background-color:#f7fcfe;color:#000}#wp-link .query-notice .query-notice-default,#wp-link .query-notice .query-notice-hint{display:block;padding:6px;border-right:4px solid #00a0d2}#wp-link .unselectable.no-matches-found{padding:0;border-bottom:1px solid #dfdfdf;background-color:#fef7f1}#wp-link .no-matches-found .item-title{display:block;padding:6px;border-right:4px solid #d54e21}#wp-link .query-results em{font-style:normal}#wp-link li:hover{background:#eaf2fa;color:#151515}#wp-link li.unselectable:hover{background:#fff;cursor:auto;color:#32373c}#wp-link li.selected{background:#ddd;color:#32373c}#wp-link li.selected .item-title{font-weight:600}#wp-link li:last-child{border:none}#wp-link .item-title{display:inline-block;width:80%;width:-webkit-calc(100% - 68px);width:calc(100% - 68px);word-wrap:break-word}#wp-link .item-info{text-transform:uppercase;color:#666;font-size:11px;position:absolute;left:5px;top:5px}#wp-link .river-waiting{display:none;padding:10px 0}#wp-link .submitbox{padding:8px 16px;background:#fcfcfc;border-top:1px solid #ddd;position:absolute;bottom:0;right:0;left:0}#wp-link-cancel{line-height:25px;float:right}#wp-link-update{line-height:23px;float:left}#wp-link-submit{float:left}@media screen and (max-width:782px){#wp-link-wrap{margin-top:-140px}#wp-link-wrap .query-results{top:195px}#wp-link-wrap.has-text-field .query-results{top:235px}#link-selector{padding:0 16px 60px}#wp-link-wrap #link-selector{bottom:52px}#wp-link-cancel{line-height:32px}#wp-link .link-target{padding-top:10px}#wp-link .submitbox .button{margin-bottom:0}}@media screen and (max-width:520px){#wp-link-wrap{width:auto;margin-right:0;right:10px;left:10px;max-width:500px}}@media screen and (max-height:520px){#wp-link-wrap{-webkit-transition:none;transition:none;height:auto;margin-top:0;top:10px;bottom:10px}#link-selector{overflow:auto}#search-panel .query-results{position:static}}@media screen and (max-height:290px){#wp-link-wrap{height:auto;margin-top:0;top:10px;bottom:10px}#link-selector{overflow:auto;height:-webkit-calc(100% - 92px);height:calc(100% - 92px);padding-bottom:2px}#search-panel .query-results{position:static}}div.wp-link-preview{float:right;margin:5px;max-width:694px;overflow:hidden;text-overflow:ellipsis}div.wp-link-preview a{color:#0073aa;text-decoration:underline;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;cursor:pointer}div.wp-link-preview a.wplink-url-error{color:#dc3232}div.wp-link-input{float:right;margin:2px;max-width:694px}div.wp-link-input input{width:300px;padding:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mce-toolbar div.wp-link-input~.mce-btn,.mce-toolbar div.wp-link-preview~.mce-btn{margin:2px 1px}.mce-inline-toolbar-grp .mce-btn-group .mce-btn:last-child{margin-left:2px}.ui-autocomplete.wplink-autocomplete{z-index:100110;max-height:200px;overflow-y:auto;padding:0;margin:0;list-style:none;position:absolute;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete.wplink-autocomplete li{margin-bottom:0;padding:4px 10px;clear:both;white-space:normal;text-align:right}.ui-autocomplete.wplink-autocomplete li .wp-editor-float-right{float:left}.ui-autocomplete.wplink-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}@media screen and (max-width:782px){div.wp-link-input,div.wp-link-preview{max-width:70%;max-width:-webkit-calc(100% - 86px);max-width:calc(100% - 86px)}div.wp-link-preview{margin:8px 5px 8px 0}div.wp-link-input{width:300px}div.wp-link-input input{width:100%;font-size:16px;padding:5px}}.mce-fullscreen{z-index:100010}.rtl .quicktags-toolbar input,.rtl .wp-switch-editor{font-family:Tahoma,sans-serif}.mce-rtl .mce-flow-layout .mce-flow-layout-item>div{direction:rtl}.mce-rtl .mce-listbox i.mce-caret{left:6px}html:lang(he-il) .rtl .quicktags-toolbar input,html:lang(he-il) .rtl .wp-switch-editor{font-family:Arial,sans-serif}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}}
\ No newline at end of file
index c2a036bb5817d418f4c973b3a54577e0423af2dc..a2645495464822492842bed5b4318edc80096873 100644 (file)
@@ -140,7 +140,7 @@ div.mce-tab:focus {
        margin: 8px 0;
        white-space: normal;
        font-size: 14px;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .mce-window .wp-editor-help table {
@@ -180,14 +180,14 @@ div.mce-tab:focus {
 }
 
 .mce-window .wp-editor-help th {
-       font-weight: bold;
+       font-weight: 600;
        padding-bottom: 0;
 }
 
 .mce-window .wp-editor-help kbd {
        font-family: monospace;
        padding: 2px 7px 3px;
-       font-weight: bold;
+       font-weight: 600;
        margin: 0;
        background: #eaeaea;
        background: rgba(0,0,0,0.08);
@@ -838,7 +838,7 @@ div.mce-menu .mce-menu-item-sep,
 .mce-notification button.mce-close {
        right: 6px;
        top: 3px;
-       font-weight: normal;
+       font-weight: 400;
        color: #555d66;
 }
 
@@ -1109,7 +1109,8 @@ i.mce-i-wp_code:before {
        background: #ebebeb;
        color: #666;
        cursor: pointer;
-       font: 13px/19px "Open Sans", sans-serif;
+       font-size: 13px;
+       line-height: 19px;
        height: 20px;
        margin: 5px 0 0 5px;
        padding: 3px 8px 4px;
@@ -1241,7 +1242,7 @@ i.mce-i-wp_code:before {
 }
 
 .quicktags-toolbar input[value="b"] {
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw,
@@ -1600,7 +1601,7 @@ i.mce-i-wp_code:before {
 }
 
 #wp-link li.selected .item-title {
-       font-weight: bold;
+       font-weight: 600;
 }
 
 #wp-link li:last-child {
@@ -1756,6 +1757,10 @@ div.wp-link-preview a {
        cursor: pointer;
 }
 
+div.wp-link-preview a.wplink-url-error {
+       color: #dc3232;
+}
+
 div.wp-link-input {
        float: left;
        margin: 2px;
index c9eb43f72a951f3f01bba654f924120bce9a37bc..96d7875bbf49bc37d9d8c5accdf8d0f0abdc7113 100644 (file)
@@ -1 +1 @@
-#wp-link-wrap,.mce-window{-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3)}.mce-container,.mce-container *,.mce-widget,.mce-widget *{color:inherit;font-family:inherit}#mce-modal-block,#mce-modal-block.mce-fade{opacity:.7;filter:alpha(opacity=70);-webkit-transition:none;transition:none}.mce-window{-webkit-border-radius:0;border-radius:0;box-shadow:0 3px 6px rgba(0,0,0,.3);-webkit-font-smoothing:subpixel-antialiased;-webkit-transition:none;transition:none}.mce-window .mce-container-body.mce-abs-layout{overflow:visible}.mce-window .mce-window-head{background:#fcfcfc;border-bottom:1px solid #ddd;padding:0;min-height:36px}.mce-window .mce-window-head .mce-title{color:#444;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 36px 0 16px}.mce-window .mce-window-head .mce-close,.mce-window-head .mce-close .mce-i-remove{color:transparent;top:0;right:0;width:36px;height:36px;padding:0;line-height:36px;text-align:center}.mce-window-head .mce-close .mce-i-remove:before{font:400 20px/36px dashicons;text-align:center;color:#666;width:36px;height:36px;display:block}.mce-window-head .mce-close:focus .mce-i-remove:before,.mce-window-head .mce-close:hover .mce-i-remove:before{color:#00a0d2}.mce-window-head .mce-close:focus .mce-i-remove,div.mce-tab:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.mce-window .mce-window-head .mce-dragh{width:-webkit-calc(100% - 36px);width:calc(100% - 36px)}.mce-window .mce-foot{border-top:1px solid #ddd}#wp-link .query-results,.mce-checkbox i.mce-i-checkbox,.mce-textbox{border:1px solid #ddd;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);-webkit-transition:.05s all ease-in-out;transition:.05s all ease-in-out}#wp-link .query-results:focus,.mce-checkbox:focus i.mce-i-checkbox,.mce-textbox.mce-focus,.mce-textbox:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.mce-window .mce-wp-help{height:360px;width:460px;overflow:auto}.mce-window .mce-wp-help *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mce-window .mce-wp-help>.mce-container-body{width:auto!important}.mce-window .wp-editor-help{padding:10px 10px 0 20px}.mce-window .wp-editor-help h2,.mce-window .wp-editor-help p{margin:8px 0;white-space:normal;font-size:14px;font-weight:400}.mce-window .wp-editor-help table{width:100%;margin-bottom:20px}.mce-window .wp-editor-help table.wp-help-single{margin:0 8px 20px}.mce-window .wp-editor-help table.fixed{table-layout:fixed}.mce-window .wp-editor-help table.fixed td:nth-child(odd),.mce-window .wp-editor-help table.fixed th:nth-child(odd){width:12%}.mce-window .wp-editor-help table.fixed td:nth-child(even),.mce-window .wp-editor-help table.fixed th:nth-child(even){width:38%}.mce-window .wp-editor-help table.fixed th:nth-child(odd){padding:5px 0 0}.mce-window .wp-editor-help td,.mce-window .wp-editor-help th{font-size:13px;padding:5px;vertical-align:middle;word-wrap:break-word;white-space:normal}.mce-window .wp-editor-help th{font-weight:700;padding-bottom:0}.mce-window .wp-editor-help kbd{font-family:monospace;padding:2px 7px 3px;font-weight:700;margin:0;background:#eaeaea;background:rgba(0,0,0,.08)}.mce-window .wp-help-th-center td:nth-child(odd),.mce-window .wp-help-th-center th:nth-child(odd){text-align:center}.mce-floatpanel.mce-popover,.mce-menu{border-color:rgba(0,0,0,.15);-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.mce-floatpanel.mce-popover.mce-bottom,.mce-menu{margin-top:2px}.mce-floatpanel .mce-arrow{display:none}.mce-menu .mce-container-body{min-width:160px}.mce-menu-item{border:none;margin-bottom:2px}.mce-menu-has-icons i.mce-ico{line-height:20px}div.mce-panel{border:0;background:#fff}.mce-panel.mce-menu{border:1px solid #ddd}div.mce-tab{line-height:13px}div.mce-toolbar-grp{border-bottom:1px solid #ddd;background:#f5f5f5;padding:0;position:relative}div.mce-inline-toolbar-grp{border:1px solid #a0a5aa;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.15);box-shadow:0 1px 3px rgba(0,0,0,.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:8px;position:absolute;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;max-width:98%;z-index:100100}div.mce-inline-toolbar-grp>div.mce-stack-layout{padding:1px}div.mce-inline-toolbar-grp.mce-arrow-up{margin-bottom:0;margin-top:8px}div.mce-inline-toolbar-grp:after,div.mce-inline-toolbar-grp:before{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.quicktags-toolbar,.wp-editor-tools,.wp-editor-wrap,.wp-switch-editor{position:relative}div.mce-inline-toolbar-grp.mce-arrow-up:before{top:-9px;border-bottom-color:#a0a5aa;border-width:0 9px 9px;margin-left:-9px}div.mce-inline-toolbar-grp.mce-arrow-down:before{bottom:-9px;border-top-color:#a0a5aa;border-width:9px 9px 0;margin-left:-9px}div.mce-inline-toolbar-grp.mce-arrow-up:after{top:-8px;border-bottom-color:#f5f5f5;border-width:0 8px 8px;margin-left:-8px}div.mce-inline-toolbar-grp.mce-arrow-down:after{bottom:-8px;border-top-color:#f5f5f5;border-width:8px 8px 0;margin-left:-8px}div.mce-inline-toolbar-grp.mce-arrow-left:after,div.mce-inline-toolbar-grp.mce-arrow-left:before{margin:0}div.mce-inline-toolbar-grp.mce-arrow-left:before{left:20px}div.mce-inline-toolbar-grp.mce-arrow-left:after{left:21px}div.mce-inline-toolbar-grp.mce-arrow-right:after,div.mce-inline-toolbar-grp.mce-arrow-right:before{left:auto;margin:0}div.mce-inline-toolbar-grp.mce-arrow-right:before{right:20px}div.mce-inline-toolbar-grp.mce-arrow-right:after{right:21px}div.mce-inline-toolbar-grp.mce-arrow-full{right:0}div.mce-inline-toolbar-grp.mce-arrow-full>div{width:100%;overflow-x:auto}div.mce-toolbar-grp>div{padding:3px}.has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first{padding-right:32px}.mce-toolbar .mce-btn-group{margin:0}div.mce-statusbar{border-top:1px solid #e5e5e5}div.mce-path{padding:2px 10px;margin:0}.mce-path,.mce-path .mce-divider,.mce-path-item{font-size:12px}.mce-toolbar .mce-btn,.qt-dfw{border-color:transparent;background:0 0;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;cursor:pointer}.mce-toolbar .mce-btn-group .mce-btn,.qt-dfw{border:1px solid transparent;margin:2px;-webkit-border-radius:2px;border-radius:2px}.mce-toolbar .mce-btn-group .mce-btn:focus,.mce-toolbar .mce-btn-group .mce-btn:hover,.qt-dfw:focus,.qt-dfw:hover{background:#fafafa;border-color:#555d66;color:#23282d;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);outline:0}.mce-toolbar .mce-btn-group .mce-btn.mce-active,.mce-toolbar .mce-btn-group .mce-btn:active,.qt-dfw.active{background:#ebebeb;border-color:#555d66;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3)}.mce-toolbar .mce-btn-group .mce-btn.mce-active:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover{border-color:#23282d}.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:hover{color:#a0a5aa;background:0 0;border-color:#ddd;text-shadow:0 1px 0 #fff;-webkit-box-shadow:none;box-shadow:none}.mce-menu .mce-menu-item-preview.mce-active .mce-text,.mce-toolbar .mce-btn-group .mce-btn.mce-primary .mce-ico{color:#fff}.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus{border-color:#555d66}.mce-toolbar .mce-btn-group .mce-first,.mce-toolbar .mce-btn-group .mce-last{border-color:transparent}.mce-toolbar .mce-btn button,.qt-dfw{padding:2px 3px;line-height:normal}.mce-toolbar .mce-listbox button{font-size:13px;line-height:20px;padding-left:6px;padding-right:20px}.mce-toolbar .mce-btn i{text-shadow:none}.mce-toolbar .mce-btn-group>div{white-space:normal}.mce-toolbar .mce-colorbutton .mce-open{border-right:0}.mce-toolbar .mce-colorbutton .mce-preview{margin:0;padding:0;top:auto;bottom:2px;left:3px;height:3px;width:20px;background:#555d66}.mce-toolbar .mce-btn-group .mce-btn.mce-primary{min-width:0;background:#0085ba;border-color:#0073aa #006799 #006799;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-decoration:none;text-shadow:none}.mce-toolbar .mce-btn-group .mce-btn.mce-primary button{padding:2px 3px 1px}.mce-toolbar .mce-btn-group .mce-btn.mce-primary:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-primary:hover{background:#008ec2;border-color:#006799;color:#fff}.mce-toolbar .mce-btn-group .mce-btn.mce-primary:focus{-webkit-box-shadow:0 0 1px 1px #33b3db;box-shadow:0 0 1px 1px #33b3db}.mce-toolbar .mce-btn-group .mce-btn.mce-primary:active{background:#0073aa;border-color:#006799;-webkit-box-shadow:inset 0 2px 0 #006799;box-shadow:inset 0 2px 0 #006799}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox{-webkit-border-radius:0;border-radius:0;direction:ltr;background:#fff;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2);box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2)}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:hover{border-color:#b4b9be}.mce-panel .mce-btn i.mce-caret{border-top:6px solid #555d66;margin-left:2px;margin-right:2px}.mce-listbox i.mce-caret{right:4px}.mce-panel .mce-btn:focus i.mce-caret,.mce-panel .mce-btn:hover i.mce-caret{border-top-color:#23282d}.mce-panel .mce-active i.mce-caret{border-top:0;border-bottom:6px solid #23282d;margin-top:7px}.mce-listbox.mce-active i.mce-caret{margin-top:-3px}.mce-toolbar .mce-splitbtn:hover .mce-open{border-right-color:transparent}.mce-toolbar .mce-splitbtn .mce-open.mce-active{background:0 0;outline:0}.mce-menu .mce-menu-item-normal.mce-active,.mce-menu .mce-menu-item-preview.mce-active,.mce-menu .mce-menu-item.mce-selected,.mce-menu .mce-menu-item:focus,.mce-menu .mce-menu-item:hover{background:#0073aa}.mce-menu .mce-menu-item-preview.mce-active{border-left:none}.mce-menu .mce-menu-item.mce-disabled{cursor:default}.mce-menu .mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menubar{border-color:#e5e5e5;background:#fff;border-width:0 0 1px}.mce-menubar .mce-menubtn{margin:2px}.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus,.mce-menubar .mce-menubtn:hover{border-color:transparent;background:0 0}.mce-menubar .mce-menubtn:focus{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.mce-menu-item-sep:hover,div.mce-menu .mce-menu-item-sep{border-bottom:1px solid #ddd;height:0;margin:5px 0}.mce-menubtn span{margin-right:0;padding-left:3px}.mce-menu-has-icons i.mce-ico:before{margin-left:-2px}.mce-primary button,.mce-primary button i{text-align:center;color:#fff;text-shadow:none;padding:0;line-height:26px}.mce-window .mce-btn{color:#555;background:#f7f7f7;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0;cursor:pointer;border:1px solid #ccc;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-shadow:0 1px 0 #ccc;box-shadow:0 1px 0 #ccc}.mce-window .mce-btn::-moz-focus-inner{border-width:0;border-style:none;padding:0}.mce-window .mce-btn:focus,.mce-window .mce-btn:hover{background:#fafafa;border-color:#999;color:#23282d}.mce-window .mce-btn:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 3px rgba(0,115,170,.8);box-shadow:0 0 3px rgba(0,115,170,.8)}.mce-window .mce-btn:active{background:#eee;border-color:#999;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);-webkit-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.mce-window .mce-btn.mce-disabled{color:#a0a5aa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default;-webkit-transform:none!important;-ms-transform:none!important;transform:none!important}.mce-window .mce-btn.mce-primary{background:#0085ba;border-color:#0073aa #006799 #006799;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-decoration:none;text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799}.mce-window .mce-btn.mce-primary:focus,.mce-window .mce-btn.mce-primary:hover{background:#008ec2;border-color:#006799;color:#fff}.mce-window .mce-btn.mce-primary:focus{-webkit-box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db;box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db}.mce-window .mce-btn.mce-primary:active{background:#0073aa;border-color:#006799;-webkit-box-shadow:inset 0 2px 0 #006799;box-shadow:inset 0 2px 0 #006799;vertical-align:top}.mce-window .mce-btn.mce-primary.mce-disabled{color:#66c6e4!important;background:#008ec2!important;border-color:#007cb2!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important;cursor:default}.mce-toolbar .mce-ico,.qt-dfw{text-shadow:none;text-align:center}.mce-menubtn.mce-fixed-width button{overflow-x:hidden;text-overflow:ellipsis;width:110px}.mce-charmap{margin:3px}.mce-charmap td{padding:0;border-color:#ddd;cursor:pointer}.mce-charmap td:hover{background:#f3f3f3}.mce-charmap td div{width:18px;height:22px;line-height:22px}.mce-toolbar .mce-btn .mce-open,.qt-dfw{line-height:20px}.mce-tooltip{margin-top:2px}.mce-tooltip-inner{-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);color:#fff;font-size:12px}.mce-ico{font-family:tinymce,Arial}.mce-btn-small .mce-ico{font-family:tinymce-small,Arial}.mce-toolbar .mce-ico{color:#555d66;line-height:20px;width:20px;height:20px;margin:0;padding:0}.qt-dfw{color:#555d66;width:28px;height:26px}.mce-toolbar .mce-btn.mce-active .mce-open,.mce-toolbar .mce-btn:focus .mce-open,.mce-toolbar .mce-btn:hover .mce-open{border-left-color:#23282d}.mce-notification button.mce-close{right:6px;top:3px;font-weight:400;color:#555d66}.mce-notification button.mce-close:focus,.mce-notification button.mce-close:hover{color:#000}i.mce-i-aligncenter,i.mce-i-alignjustify,i.mce-i-alignleft,i.mce-i-alignright,i.mce-i-backcolor,i.mce-i-blockquote,i.mce-i-bold,i.mce-i-bullist,i.mce-i-charmap,i.mce-i-dashicon,i.mce-i-dfw,i.mce-i-forecolor,i.mce-i-fullscreen,i.mce-i-help,i.mce-i-hr,i.mce-i-indent,i.mce-i-italic,i.mce-i-link,i.mce-i-ltr,i.mce-i-numlist,i.mce-i-outdent,i.mce-i-pastetext,i.mce-i-pasteword,i.mce-i-redo,i.mce-i-remove,i.mce-i-removeformat,i.mce-i-spellchecker,i.mce-i-strikethrough,i.mce-i-underline,i.mce-i-undo,i.mce-i-unlink,i.mce-i-wp-media-library,i.mce-i-wp_adv,i.mce-i-wp_code,i.mce-i-wp_fullscreen,i.mce-i-wp_help,i.mce-i-wp_more,i.mce-i-wp_page{font:400 20px/1 dashicons;padding:0 2px 0 0;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:-2px}.qt-dfw{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i.mce-i-bold:before{content:"\f200"}i.mce-i-italic:before{content:"\f201"}i.mce-i-bullist:before{content:"\f203"}i.mce-i-numlist:before{content:"\f204"}i.mce-i-blockquote:before{content:"\f205"}i.mce-i-alignleft:before{content:"\f206"}i.mce-i-aligncenter:before{content:"\f207"}i.mce-i-alignright:before{content:"\f208"}i.mce-i-link:before{content:"\f103"}i.mce-i-unlink:before{content:"\f225"}i.mce-i-wp_more:before{content:"\f209"}i.mce-i-strikethrough:before{content:"\f224"}i.mce-i-spellchecker:before{content:"\f210"}.qt-dfw:before,i.mce-i-dfw:before,i.mce-i-fullscreen:before,i.mce-i-wp_fullscreen:before{content:"\f211"}i.mce-i-wp_adv:before{content:"\f212"}i.mce-i-underline:before{content:"\f213"}i.mce-i-alignjustify:before{content:"\f214"}i.mce-i-backcolor:before,i.mce-i-forecolor:before{content:"\f215"}i.mce-i-pastetext:before{content:"\f217"}i.mce-i-removeformat:before{content:"\f218"}i.mce-i-charmap:before{content:"\f220"}i.mce-i-outdent:before{content:"\f221"}i.mce-i-indent:before{content:"\f222"}i.mce-i-undo:before{content:"\f171"}i.mce-i-redo:before{content:"\f172"}i.mce-i-help:before,i.mce-i-wp_help:before{content:"\f223"}i.mce-i-wp-media-library:before{content:"\f104"}i.mce-i-ltr:before{content:"\f320"}i.mce-i-wp_page:before{content:"\f105"}i.mce-i-hr:before{content:"\f460"}i.mce-i-remove:before{content:"\f158"}i.mce-i-wp_code:before{content:"\f475"}.rtl i.mce-i-outdent:before{content:"\f222"}.rtl i.mce-i-indent:before{content:"\f221"}.wp-editor-tools{z-index:1}.wp-editor-tools:after{clear:both;content:"";display:table}.wp-editor-container{clear:both}.wp-editor-area{font-family:Consolas,Monaco,monospace;font-size:13px;padding:10px;margin:1px 0 0;line-height:150%;border:0;outline:0;display:block;resize:vertical;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.rtl .wp-editor-area{font-family:Tahoma,Monaco,monospace}.locale-he-il .wp-editor-area{font-family:Arial,Monaco,monospace}.wp-editor-container textarea.wp-editor-area{width:100%;margin:0;-webkit-box-shadow:none;box-shadow:none}.wp-editor-tabs{float:right}.wp-switch-editor{float:left;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;top:1px;background:#ebebeb;color:#666;cursor:pointer;font:13px/19px "Open Sans",sans-serif;height:20px;margin:5px 0 0 5px;padding:3px 8px 4px;border:1px solid #e5e5e5}.wp-switch-editor:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);outline:0;color:#23282d}.html-active .switch-html:focus,.tmce-active .switch-tmce:focus,.wp-switch-editor:active{-webkit-box-shadow:none;box-shadow:none}.wp-switch-editor:active{background-color:#f5f5f5;-webkit-box-shadow:none;box-shadow:none}.js .tmce-active .wp-editor-area{color:#fff}.tmce-active .quicktags-toolbar{display:none}.html-active .switch-html,.tmce-active .switch-tmce{background:#f5f5f5;color:#555;border-bottom-color:#f5f5f5}.wp-media-buttons{float:left}.wp-media-buttons .button{margin-right:5px;margin-bottom:4px;padding-left:7px;padding-right:7px}.wp-media-buttons .button:active{position:relative;top:1px;margin-top:-1px;margin-bottom:1px}.wp-media-buttons .insert-media{padding-left:5px}.wp-media-buttons a{text-decoration:none;color:#444;font-size:12px}.wp-media-buttons img{padding:0 4px;vertical-align:middle}.wp-media-buttons span.wp-media-buttons-icon{display:inline-block;width:18px;height:18px;vertical-align:text-top;margin:0 2px}.wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}.wp-media-buttons .add_media span.wp-media-buttons-icon:before{font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f104"}.quicktags-toolbar{padding:3px;border-bottom:1px solid #ddd;background:#f5f5f5;min-height:30px}.has-dfw .quicktags-toolbar{padding-right:35px}.wp-core-ui .quicktags-toolbar input.button.button-small{margin:2px}.quicktags-toolbar input[value=link]{text-decoration:underline}.quicktags-toolbar input[value=del]{text-decoration:line-through}.quicktags-toolbar input[value="i"]{font-style:italic}.quicktags-toolbar input[value="b"]{font-weight:700}.mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw,.qt-dfw{position:absolute;top:0;right:0;margin:5px 5px 0 0}.qt-fullscreen{position:static;margin:2px}@media screen and (max-width:782px){.mce-toolbar .mce-btn button,.qt-dfw{padding:6px 7px}.mce-toolbar .mce-btn-group .mce-btn.mce-primary button{padding:6px 7px 5px}.mce-toolbar .mce-btn-group .mce-btn{margin:1px}.qt-dfw{width:36px;height:34px}.mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw{margin:4px 4px 0 0}.mce-toolbar .mce-colorbutton .mce-preview{left:8px;bottom:6px}.mce-window .mce-btn{padding:2px 0}.has-dfw .quicktags-toolbar,.has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first{padding-right:40px}}@media screen and (min-width:782px){.wp-core-ui .quicktags-toolbar input.button.button-small{font-size:12px;height:26px;line-height:24px}}#wp_editbtns,#wp_gallerybtns{padding:2px;position:absolute;display:none;z-index:100020}#wp_delgallery,#wp_delimgbtn,#wp_editgallery,#wp_editimgbtn{border-color:#999;background-color:#eee;margin:2px;padding:2px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px}#wp_delgallery:hover,#wp_delimgbtn:hover,#wp_editgallery:hover,#wp_editimgbtn:hover{border-color:#555;background-color:#ccc}#wp-link-wrap{display:none;background-color:#fff;box-shadow:0 3px 6px rgba(0,0,0,.3);width:500px;overflow:hidden;margin-left:-250px;position:fixed;top:50%;left:50%;z-index:100105;-webkit-transition:height .2s,margin-top .2s;transition:height .2s,margin-top .2s;height:500px;margin-top:-250px}#wp-link-backdrop{display:none;position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:100100}#wp-link{position:relative;height:100%}#wp-link-wrap .wp-link-text-field{display:none}#wp-link-wrap.has-text-field .wp-link-text-field{display:block}#link-modal-title{background:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 36px 0 16px}#wp-link-close{color:#666;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center;background:0 0;border:none;cursor:pointer}#wp-link-close:before{font:400 20px/36px dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:36px;height:36px;content:"\f158"}#wp-link-close:focus,#wp-link-close:hover{color:#00a0d2}#wp-link-close:focus{outline:0;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#wp-link-wrap #link-selector{-webkit-overflow-scrolling:touch;padding:0 16px;position:absolute;top:37px;left:0;right:0;bottom:44px}#wp-link ol,#wp-link ul{list-style:none;margin:0;padding:0}#wp-link input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wp-link #link-options{padding:8px 0 12px}#wp-link p.howto{margin:3px 0}#wp-link p.howto a{text-decoration:none;color:inherit}#wp-link label input[type=text]{margin-top:5px;width:70%}#wp-link #link-options label span,#wp-link #search-panel label span.search-label{display:inline-block;width:80px;text-align:right;padding-right:5px;max-width:24%;vertical-align:middle;word-wrap:break-word}#wp-link .link-search-field{float:left;width:250px;max-width:70%}#wp-link .link-search-wrapper{margin:5px 0 9px;display:block;overflow:hidden}#wp-link .link-search-wrapper span{float:left;margin-top:4px}#wp-link .link-search-wrapper .spinner{margin-top:5px}#wp-link .link-target{padding:3px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wp-link .link-target label{max-width:70%}#wp-link .query-results{border:1px solid #dfdfdf;margin:0 0 12px;background:#fff;overflow:auto;position:absolute;left:16px;right:16px;bottom:0;top:166px}.has-text-field #wp-link .query-results{top:200px}#wp-link li{clear:both;margin-bottom:0;border-bottom:1px solid #f1f1f1;color:#32373c;padding:4px 6px 4px 10px;cursor:pointer;position:relative}#wp-link .query-notice,#wp-link li.unselectable{border-bottom:1px solid #dfdfdf}#wp-link .query-notice{padding:0;background-color:#f7fcfe;color:#000}#wp-link .query-notice .query-notice-default,#wp-link .query-notice .query-notice-hint{display:block;padding:6px;border-left:4px solid #00a0d2}#wp-link .unselectable.no-matches-found{padding:0;border-bottom:1px solid #dfdfdf;background-color:#fef7f1}#wp-link .no-matches-found .item-title{display:block;padding:6px;border-left:4px solid #d54e21}#wp-link .query-results em{font-style:normal}#wp-link li:hover{background:#eaf2fa;color:#151515}#wp-link li.unselectable:hover{background:#fff;cursor:auto;color:#32373c}#wp-link li.selected{background:#ddd;color:#32373c}#wp-link li.selected .item-title{font-weight:700}#wp-link li:last-child{border:none}#wp-link .item-title{display:inline-block;width:80%;width:-webkit-calc(100% - 68px);width:calc(100% - 68px);word-wrap:break-word}#wp-link .item-info{text-transform:uppercase;color:#666;font-size:11px;position:absolute;right:5px;top:5px}#wp-link .river-waiting{display:none;padding:10px 0}#wp-link .submitbox{padding:8px 16px;background:#fcfcfc;border-top:1px solid #ddd;position:absolute;bottom:0;left:0;right:0}#wp-link-cancel{line-height:25px;float:left}#wp-link-update{line-height:23px;float:right}#wp-link-submit{float:right}@media screen and (max-width:782px){#wp-link-wrap{margin-top:-140px}#wp-link-wrap .query-results{top:195px}#wp-link-wrap.has-text-field .query-results{top:235px}#link-selector{padding:0 16px 60px}#wp-link-wrap #link-selector{bottom:52px}#wp-link-cancel{line-height:32px}#wp-link .link-target{padding-top:10px}#wp-link .submitbox .button{margin-bottom:0}}@media screen and (max-width:520px){#wp-link-wrap{width:auto;margin-left:0;left:10px;right:10px;max-width:500px}}@media screen and (max-height:520px){#wp-link-wrap{-webkit-transition:none;transition:none;height:auto;margin-top:0;top:10px;bottom:10px}#link-selector{overflow:auto}#search-panel .query-results{position:static}}@media screen and (max-height:290px){#wp-link-wrap{height:auto;margin-top:0;top:10px;bottom:10px}#link-selector{overflow:auto;height:-webkit-calc(100% - 92px);height:calc(100% - 92px);padding-bottom:2px}#search-panel .query-results{position:static}}div.wp-link-preview{float:left;margin:5px;max-width:694px;overflow:hidden;text-overflow:ellipsis}div.wp-link-preview a{color:#0073aa;text-decoration:underline;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;cursor:pointer}div.wp-link-input{float:left;margin:2px;max-width:694px}div.wp-link-input input{width:300px;padding:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mce-toolbar div.wp-link-input~.mce-btn,.mce-toolbar div.wp-link-preview~.mce-btn{margin:2px 1px}.mce-inline-toolbar-grp .mce-btn-group .mce-btn:last-child{margin-right:2px}.ui-autocomplete.wplink-autocomplete{z-index:100110;max-height:200px;overflow-y:auto;padding:0;margin:0;list-style:none;position:absolute;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete.wplink-autocomplete li{margin-bottom:0;padding:4px 10px;clear:both;white-space:normal;text-align:left}.ui-autocomplete.wplink-autocomplete li .wp-editor-float-right{float:right}.ui-autocomplete.wplink-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}@media screen and (max-width:782px){div.wp-link-input,div.wp-link-preview{max-width:70%;max-width:-webkit-calc(100% - 86px);max-width:calc(100% - 86px)}div.wp-link-preview{margin:8px 0 8px 5px}div.wp-link-input{width:300px}div.wp-link-input input{width:100%;font-size:16px;padding:5px}}.mce-fullscreen{z-index:100010}.rtl .quicktags-toolbar input,.rtl .wp-switch-editor{font-family:Tahoma,sans-serif}.mce-rtl .mce-flow-layout .mce-flow-layout-item>div{direction:rtl}.mce-rtl .mce-listbox i.mce-caret{left:6px}html:lang(he-il) .rtl .quicktags-toolbar input,html:lang(he-il) .rtl .wp-switch-editor{font-family:Arial,sans-serif}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}}
\ No newline at end of file
+#wp-link-wrap,.mce-window{-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3)}.mce-container,.mce-container *,.mce-widget,.mce-widget *{color:inherit;font-family:inherit}#mce-modal-block,#mce-modal-block.mce-fade{opacity:.7;filter:alpha(opacity=70);-webkit-transition:none;transition:none}.mce-window{-webkit-border-radius:0;border-radius:0;box-shadow:0 3px 6px rgba(0,0,0,.3);-webkit-font-smoothing:subpixel-antialiased;-webkit-transition:none;transition:none}.mce-window .mce-container-body.mce-abs-layout{overflow:visible}.mce-window .mce-window-head{background:#fcfcfc;border-bottom:1px solid #ddd;padding:0;min-height:36px}.mce-window .mce-window-head .mce-title{color:#444;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 36px 0 16px}.mce-window .mce-window-head .mce-close,.mce-window-head .mce-close .mce-i-remove{color:transparent;top:0;right:0;width:36px;height:36px;padding:0;line-height:36px;text-align:center}.mce-window-head .mce-close .mce-i-remove:before{font:400 20px/36px dashicons;text-align:center;color:#666;width:36px;height:36px;display:block}.mce-window-head .mce-close:focus .mce-i-remove:before,.mce-window-head .mce-close:hover .mce-i-remove:before{color:#00a0d2}.mce-window-head .mce-close:focus .mce-i-remove,div.mce-tab:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.mce-window .mce-window-head .mce-dragh{width:-webkit-calc(100% - 36px);width:calc(100% - 36px)}.mce-window .mce-foot{border-top:1px solid #ddd}#wp-link .query-results,.mce-checkbox i.mce-i-checkbox,.mce-textbox{border:1px solid #ddd;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);-webkit-transition:.05s all ease-in-out;transition:.05s all ease-in-out}#wp-link .query-results:focus,.mce-checkbox:focus i.mce-i-checkbox,.mce-textbox.mce-focus,.mce-textbox:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.mce-window .mce-wp-help{height:360px;width:460px;overflow:auto}.mce-window .mce-wp-help *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mce-window .mce-wp-help>.mce-container-body{width:auto!important}.mce-window .wp-editor-help{padding:10px 10px 0 20px}.mce-window .wp-editor-help h2,.mce-window .wp-editor-help p{margin:8px 0;white-space:normal;font-size:14px;font-weight:400}.mce-window .wp-editor-help table{width:100%;margin-bottom:20px}.mce-window .wp-editor-help table.wp-help-single{margin:0 8px 20px}.mce-window .wp-editor-help table.fixed{table-layout:fixed}.mce-window .wp-editor-help table.fixed td:nth-child(odd),.mce-window .wp-editor-help table.fixed th:nth-child(odd){width:12%}.mce-window .wp-editor-help table.fixed td:nth-child(even),.mce-window .wp-editor-help table.fixed th:nth-child(even){width:38%}.mce-window .wp-editor-help table.fixed th:nth-child(odd){padding:5px 0 0}.mce-window .wp-editor-help td,.mce-window .wp-editor-help th{font-size:13px;padding:5px;vertical-align:middle;word-wrap:break-word;white-space:normal}.mce-window .wp-editor-help th{font-weight:600;padding-bottom:0}.mce-window .wp-editor-help kbd{font-family:monospace;padding:2px 7px 3px;font-weight:600;margin:0;background:#eaeaea;background:rgba(0,0,0,.08)}.mce-window .wp-help-th-center td:nth-child(odd),.mce-window .wp-help-th-center th:nth-child(odd){text-align:center}.mce-floatpanel.mce-popover,.mce-menu{border-color:rgba(0,0,0,.15);-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.mce-floatpanel.mce-popover.mce-bottom,.mce-menu{margin-top:2px}.mce-floatpanel .mce-arrow{display:none}.mce-menu .mce-container-body{min-width:160px}.mce-menu-item{border:none;margin-bottom:2px}.mce-menu-has-icons i.mce-ico{line-height:20px}div.mce-panel{border:0;background:#fff}.mce-panel.mce-menu{border:1px solid #ddd}div.mce-tab{line-height:13px}div.mce-toolbar-grp{border-bottom:1px solid #ddd;background:#f5f5f5;padding:0;position:relative}div.mce-inline-toolbar-grp{border:1px solid #a0a5aa;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.15);box-shadow:0 1px 3px rgba(0,0,0,.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:8px;position:absolute;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;max-width:98%;z-index:100100}div.mce-inline-toolbar-grp>div.mce-stack-layout{padding:1px}div.mce-inline-toolbar-grp.mce-arrow-up{margin-bottom:0;margin-top:8px}div.mce-inline-toolbar-grp:after,div.mce-inline-toolbar-grp:before{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.quicktags-toolbar,.wp-editor-tools,.wp-editor-wrap,.wp-switch-editor{position:relative}div.mce-inline-toolbar-grp.mce-arrow-up:before{top:-9px;border-bottom-color:#a0a5aa;border-width:0 9px 9px;margin-left:-9px}div.mce-inline-toolbar-grp.mce-arrow-down:before{bottom:-9px;border-top-color:#a0a5aa;border-width:9px 9px 0;margin-left:-9px}div.mce-inline-toolbar-grp.mce-arrow-up:after{top:-8px;border-bottom-color:#f5f5f5;border-width:0 8px 8px;margin-left:-8px}div.mce-inline-toolbar-grp.mce-arrow-down:after{bottom:-8px;border-top-color:#f5f5f5;border-width:8px 8px 0;margin-left:-8px}div.mce-inline-toolbar-grp.mce-arrow-left:after,div.mce-inline-toolbar-grp.mce-arrow-left:before{margin:0}div.mce-inline-toolbar-grp.mce-arrow-left:before{left:20px}div.mce-inline-toolbar-grp.mce-arrow-left:after{left:21px}div.mce-inline-toolbar-grp.mce-arrow-right:after,div.mce-inline-toolbar-grp.mce-arrow-right:before{left:auto;margin:0}div.mce-inline-toolbar-grp.mce-arrow-right:before{right:20px}div.mce-inline-toolbar-grp.mce-arrow-right:after{right:21px}div.mce-inline-toolbar-grp.mce-arrow-full{right:0}div.mce-inline-toolbar-grp.mce-arrow-full>div{width:100%;overflow-x:auto}div.mce-toolbar-grp>div{padding:3px}.has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first{padding-right:32px}.mce-toolbar .mce-btn-group{margin:0}div.mce-statusbar{border-top:1px solid #e5e5e5}div.mce-path{padding:2px 10px;margin:0}.mce-path,.mce-path .mce-divider,.mce-path-item{font-size:12px}.mce-toolbar .mce-btn,.qt-dfw{border-color:transparent;background:0 0;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;cursor:pointer}.mce-toolbar .mce-btn-group .mce-btn,.qt-dfw{border:1px solid transparent;margin:2px;-webkit-border-radius:2px;border-radius:2px}.mce-toolbar .mce-btn-group .mce-btn:focus,.mce-toolbar .mce-btn-group .mce-btn:hover,.qt-dfw:focus,.qt-dfw:hover{background:#fafafa;border-color:#555d66;color:#23282d;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);outline:0}.mce-toolbar .mce-btn-group .mce-btn.mce-active,.mce-toolbar .mce-btn-group .mce-btn:active,.qt-dfw.active{background:#ebebeb;border-color:#555d66;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.3)}.mce-toolbar .mce-btn-group .mce-btn.mce-active:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-active:hover{border-color:#23282d}.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:hover{color:#a0a5aa;background:0 0;border-color:#ddd;text-shadow:0 1px 0 #fff;-webkit-box-shadow:none;box-shadow:none}.mce-menu .mce-menu-item-preview.mce-active .mce-text,.mce-toolbar .mce-btn-group .mce-btn.mce-primary .mce-ico{color:#fff}.mce-toolbar .mce-btn-group .mce-btn.mce-disabled:focus{border-color:#555d66}.mce-toolbar .mce-btn-group .mce-first,.mce-toolbar .mce-btn-group .mce-last{border-color:transparent}.mce-toolbar .mce-btn button,.qt-dfw{padding:2px 3px;line-height:normal}.mce-toolbar .mce-listbox button{font-size:13px;line-height:20px;padding-left:6px;padding-right:20px}.mce-toolbar .mce-btn i{text-shadow:none}.mce-toolbar .mce-btn-group>div{white-space:normal}.mce-toolbar .mce-colorbutton .mce-open{border-right:0}.mce-toolbar .mce-colorbutton .mce-preview{margin:0;padding:0;top:auto;bottom:2px;left:3px;height:3px;width:20px;background:#555d66}.mce-toolbar .mce-btn-group .mce-btn.mce-primary{min-width:0;background:#0085ba;border-color:#0073aa #006799 #006799;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-decoration:none;text-shadow:none}.mce-toolbar .mce-btn-group .mce-btn.mce-primary button{padding:2px 3px 1px}.mce-toolbar .mce-btn-group .mce-btn.mce-primary:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-primary:hover{background:#008ec2;border-color:#006799;color:#fff}.mce-toolbar .mce-btn-group .mce-btn.mce-primary:focus{-webkit-box-shadow:0 0 1px 1px #33b3db;box-shadow:0 0 1px 1px #33b3db}.mce-toolbar .mce-btn-group .mce-btn.mce-primary:active{background:#0073aa;border-color:#006799;-webkit-box-shadow:inset 0 2px 0 #006799;box-shadow:inset 0 2px 0 #006799}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox{-webkit-border-radius:0;border-radius:0;direction:ltr;background:#fff;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2);box-shadow:inset 0 1px 1px -1px rgba(0,0,0,.2)}.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:focus,.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:hover{border-color:#b4b9be}.mce-panel .mce-btn i.mce-caret{border-top:6px solid #555d66;margin-left:2px;margin-right:2px}.mce-listbox i.mce-caret{right:4px}.mce-panel .mce-btn:focus i.mce-caret,.mce-panel .mce-btn:hover i.mce-caret{border-top-color:#23282d}.mce-panel .mce-active i.mce-caret{border-top:0;border-bottom:6px solid #23282d;margin-top:7px}.mce-listbox.mce-active i.mce-caret{margin-top:-3px}.mce-toolbar .mce-splitbtn:hover .mce-open{border-right-color:transparent}.mce-toolbar .mce-splitbtn .mce-open.mce-active{background:0 0;outline:0}.mce-menu .mce-menu-item-normal.mce-active,.mce-menu .mce-menu-item-preview.mce-active,.mce-menu .mce-menu-item.mce-selected,.mce-menu .mce-menu-item:focus,.mce-menu .mce-menu-item:hover{background:#0073aa}.mce-menu .mce-menu-item-preview.mce-active{border-left:none}.mce-menu .mce-menu-item.mce-disabled{cursor:default}.mce-menu .mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menubar{border-color:#e5e5e5;background:#fff;border-width:0 0 1px}.mce-menubar .mce-menubtn{margin:2px}.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus,.mce-menubar .mce-menubtn:hover{border-color:transparent;background:0 0}.mce-menubar .mce-menubtn:focus{color:#124964;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.mce-menu-item-sep:hover,div.mce-menu .mce-menu-item-sep{border-bottom:1px solid #ddd;height:0;margin:5px 0}.mce-menubtn span{margin-right:0;padding-left:3px}.mce-menu-has-icons i.mce-ico:before{margin-left:-2px}.mce-primary button,.mce-primary button i{text-align:center;color:#fff;text-shadow:none;padding:0;line-height:26px}.mce-window .mce-btn{color:#555;background:#f7f7f7;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0;cursor:pointer;border:1px solid #ccc;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-shadow:0 1px 0 #ccc;box-shadow:0 1px 0 #ccc}.mce-window .mce-btn::-moz-focus-inner{border-width:0;border-style:none;padding:0}.mce-window .mce-btn:focus,.mce-window .mce-btn:hover{background:#fafafa;border-color:#999;color:#23282d}.mce-window .mce-btn:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 3px rgba(0,115,170,.8);box-shadow:0 0 3px rgba(0,115,170,.8)}.mce-window .mce-btn:active{background:#eee;border-color:#999;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);-webkit-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.mce-window .mce-btn.mce-disabled{color:#a0a5aa!important;border-color:#ddd!important;background:#f7f7f7!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 1px 0 #fff!important;cursor:default;-webkit-transform:none!important;-ms-transform:none!important;transform:none!important}.mce-window .mce-btn.mce-primary{background:#0085ba;border-color:#0073aa #006799 #006799;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-decoration:none;text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799}.mce-window .mce-btn.mce-primary:focus,.mce-window .mce-btn.mce-primary:hover{background:#008ec2;border-color:#006799;color:#fff}.mce-window .mce-btn.mce-primary:focus{-webkit-box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db;box-shadow:0 1px 0 #0073aa,0 0 2px 1px #33b3db}.mce-window .mce-btn.mce-primary:active{background:#0073aa;border-color:#006799;-webkit-box-shadow:inset 0 2px 0 #006799;box-shadow:inset 0 2px 0 #006799;vertical-align:top}.mce-window .mce-btn.mce-primary.mce-disabled{color:#66c6e4!important;background:#008ec2!important;border-color:#007cb2!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important;cursor:default}.mce-toolbar .mce-ico,.qt-dfw{text-shadow:none;text-align:center}.mce-menubtn.mce-fixed-width button{overflow-x:hidden;text-overflow:ellipsis;width:110px}.mce-charmap{margin:3px}.mce-charmap td{padding:0;border-color:#ddd;cursor:pointer}.mce-charmap td:hover{background:#f3f3f3}.mce-charmap td div{width:18px;height:22px;line-height:22px}.mce-toolbar .mce-btn .mce-open,.qt-dfw{line-height:20px}.mce-tooltip{margin-top:2px}.mce-tooltip-inner{-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2);color:#fff;font-size:12px}.mce-ico{font-family:tinymce,Arial}.mce-btn-small .mce-ico{font-family:tinymce-small,Arial}.mce-toolbar .mce-ico{color:#555d66;line-height:20px;width:20px;height:20px;margin:0;padding:0}.qt-dfw{color:#555d66;width:28px;height:26px}.mce-toolbar .mce-btn.mce-active .mce-open,.mce-toolbar .mce-btn:focus .mce-open,.mce-toolbar .mce-btn:hover .mce-open{border-left-color:#23282d}.mce-notification button.mce-close{right:6px;top:3px;font-weight:400;color:#555d66}.mce-notification button.mce-close:focus,.mce-notification button.mce-close:hover{color:#000}i.mce-i-aligncenter,i.mce-i-alignjustify,i.mce-i-alignleft,i.mce-i-alignright,i.mce-i-backcolor,i.mce-i-blockquote,i.mce-i-bold,i.mce-i-bullist,i.mce-i-charmap,i.mce-i-dashicon,i.mce-i-dfw,i.mce-i-forecolor,i.mce-i-fullscreen,i.mce-i-help,i.mce-i-hr,i.mce-i-indent,i.mce-i-italic,i.mce-i-link,i.mce-i-ltr,i.mce-i-numlist,i.mce-i-outdent,i.mce-i-pastetext,i.mce-i-pasteword,i.mce-i-redo,i.mce-i-remove,i.mce-i-removeformat,i.mce-i-spellchecker,i.mce-i-strikethrough,i.mce-i-underline,i.mce-i-undo,i.mce-i-unlink,i.mce-i-wp-media-library,i.mce-i-wp_adv,i.mce-i-wp_code,i.mce-i-wp_fullscreen,i.mce-i-wp_help,i.mce-i-wp_more,i.mce-i-wp_page{font:400 20px/1 dashicons;padding:0 2px 0 0;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:-2px}.qt-dfw{font:400 20px/1 dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i.mce-i-bold:before{content:"\f200"}i.mce-i-italic:before{content:"\f201"}i.mce-i-bullist:before{content:"\f203"}i.mce-i-numlist:before{content:"\f204"}i.mce-i-blockquote:before{content:"\f205"}i.mce-i-alignleft:before{content:"\f206"}i.mce-i-aligncenter:before{content:"\f207"}i.mce-i-alignright:before{content:"\f208"}i.mce-i-link:before{content:"\f103"}i.mce-i-unlink:before{content:"\f225"}i.mce-i-wp_more:before{content:"\f209"}i.mce-i-strikethrough:before{content:"\f224"}i.mce-i-spellchecker:before{content:"\f210"}.qt-dfw:before,i.mce-i-dfw:before,i.mce-i-fullscreen:before,i.mce-i-wp_fullscreen:before{content:"\f211"}i.mce-i-wp_adv:before{content:"\f212"}i.mce-i-underline:before{content:"\f213"}i.mce-i-alignjustify:before{content:"\f214"}i.mce-i-backcolor:before,i.mce-i-forecolor:before{content:"\f215"}i.mce-i-pastetext:before{content:"\f217"}i.mce-i-removeformat:before{content:"\f218"}i.mce-i-charmap:before{content:"\f220"}i.mce-i-outdent:before{content:"\f221"}i.mce-i-indent:before{content:"\f222"}i.mce-i-undo:before{content:"\f171"}i.mce-i-redo:before{content:"\f172"}i.mce-i-help:before,i.mce-i-wp_help:before{content:"\f223"}i.mce-i-wp-media-library:before{content:"\f104"}i.mce-i-ltr:before{content:"\f320"}i.mce-i-wp_page:before{content:"\f105"}i.mce-i-hr:before{content:"\f460"}i.mce-i-remove:before{content:"\f158"}i.mce-i-wp_code:before{content:"\f475"}.rtl i.mce-i-outdent:before{content:"\f222"}.rtl i.mce-i-indent:before{content:"\f221"}.wp-editor-tools{z-index:1}.wp-editor-tools:after{clear:both;content:"";display:table}.wp-editor-container{clear:both}.wp-editor-area{font-family:Consolas,Monaco,monospace;font-size:13px;padding:10px;margin:1px 0 0;line-height:150%;border:0;outline:0;display:block;resize:vertical;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.rtl .wp-editor-area{font-family:Tahoma,Monaco,monospace}.locale-he-il .wp-editor-area{font-family:Arial,Monaco,monospace}.wp-editor-container textarea.wp-editor-area{width:100%;margin:0;-webkit-box-shadow:none;box-shadow:none}.wp-editor-tabs{float:right}.wp-switch-editor{float:left;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;top:1px;background:#ebebeb;color:#666;cursor:pointer;font-size:13px;line-height:19px;height:20px;margin:5px 0 0 5px;padding:3px 8px 4px;border:1px solid #e5e5e5}.wp-switch-editor:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);outline:0;color:#23282d}.html-active .switch-html:focus,.tmce-active .switch-tmce:focus,.wp-switch-editor:active{-webkit-box-shadow:none;box-shadow:none}.wp-switch-editor:active{background-color:#f5f5f5;-webkit-box-shadow:none;box-shadow:none}.js .tmce-active .wp-editor-area{color:#fff}.tmce-active .quicktags-toolbar{display:none}.html-active .switch-html,.tmce-active .switch-tmce{background:#f5f5f5;color:#555;border-bottom-color:#f5f5f5}.wp-media-buttons{float:left}.wp-media-buttons .button{margin-right:5px;margin-bottom:4px;padding-left:7px;padding-right:7px}.wp-media-buttons .button:active{position:relative;top:1px;margin-top:-1px;margin-bottom:1px}.wp-media-buttons .insert-media{padding-left:5px}.wp-media-buttons a{text-decoration:none;color:#444;font-size:12px}.wp-media-buttons img{padding:0 4px;vertical-align:middle}.wp-media-buttons span.wp-media-buttons-icon{display:inline-block;width:18px;height:18px;vertical-align:text-top;margin:0 2px}.wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}.wp-media-buttons .add_media span.wp-media-buttons-icon:before{font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f104"}.quicktags-toolbar{padding:3px;border-bottom:1px solid #ddd;background:#f5f5f5;min-height:30px}.has-dfw .quicktags-toolbar{padding-right:35px}.wp-core-ui .quicktags-toolbar input.button.button-small{margin:2px}.quicktags-toolbar input[value=link]{text-decoration:underline}.quicktags-toolbar input[value=del]{text-decoration:line-through}.quicktags-toolbar input[value="i"]{font-style:italic}.quicktags-toolbar input[value="b"]{font-weight:600}.mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw,.qt-dfw{position:absolute;top:0;right:0;margin:5px 5px 0 0}.qt-fullscreen{position:static;margin:2px}@media screen and (max-width:782px){.mce-toolbar .mce-btn button,.qt-dfw{padding:6px 7px}.mce-toolbar .mce-btn-group .mce-btn.mce-primary button{padding:6px 7px 5px}.mce-toolbar .mce-btn-group .mce-btn{margin:1px}.qt-dfw{width:36px;height:34px}.mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw{margin:4px 4px 0 0}.mce-toolbar .mce-colorbutton .mce-preview{left:8px;bottom:6px}.mce-window .mce-btn{padding:2px 0}.has-dfw .quicktags-toolbar,.has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first{padding-right:40px}}@media screen and (min-width:782px){.wp-core-ui .quicktags-toolbar input.button.button-small{font-size:12px;height:26px;line-height:24px}}#wp_editbtns,#wp_gallerybtns{padding:2px;position:absolute;display:none;z-index:100020}#wp_delgallery,#wp_delimgbtn,#wp_editgallery,#wp_editimgbtn{border-color:#999;background-color:#eee;margin:2px;padding:2px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px}#wp_delgallery:hover,#wp_delimgbtn:hover,#wp_editgallery:hover,#wp_editimgbtn:hover{border-color:#555;background-color:#ccc}#wp-link-wrap{display:none;background-color:#fff;box-shadow:0 3px 6px rgba(0,0,0,.3);width:500px;overflow:hidden;margin-left:-250px;position:fixed;top:50%;left:50%;z-index:100105;-webkit-transition:height .2s,margin-top .2s;transition:height .2s,margin-top .2s;height:500px;margin-top:-250px}#wp-link-backdrop{display:none;position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:100100}#wp-link{position:relative;height:100%}#wp-link-wrap .wp-link-text-field{display:none}#wp-link-wrap.has-text-field .wp-link-text-field{display:block}#link-modal-title{background:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 36px 0 16px}#wp-link-close{color:#666;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center;background:0 0;border:none;cursor:pointer}#wp-link-close:before{font:400 20px/36px dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:36px;height:36px;content:"\f158"}#wp-link-close:focus,#wp-link-close:hover{color:#00a0d2}#wp-link-close:focus{outline:0;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}#wp-link-wrap #link-selector{-webkit-overflow-scrolling:touch;padding:0 16px;position:absolute;top:37px;left:0;right:0;bottom:44px}#wp-link ol,#wp-link ul{list-style:none;margin:0;padding:0}#wp-link input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wp-link #link-options{padding:8px 0 12px}#wp-link p.howto{margin:3px 0}#wp-link p.howto a{text-decoration:none;color:inherit}#wp-link label input[type=text]{margin-top:5px;width:70%}#wp-link #link-options label span,#wp-link #search-panel label span.search-label{display:inline-block;width:80px;text-align:right;padding-right:5px;max-width:24%;vertical-align:middle;word-wrap:break-word}#wp-link .link-search-field{float:left;width:250px;max-width:70%}#wp-link .link-search-wrapper{margin:5px 0 9px;display:block;overflow:hidden}#wp-link .link-search-wrapper span{float:left;margin-top:4px}#wp-link .link-search-wrapper .spinner{margin-top:5px}#wp-link .link-target{padding:3px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#wp-link .link-target label{max-width:70%}#wp-link .query-results{border:1px solid #dfdfdf;margin:0 0 12px;background:#fff;overflow:auto;position:absolute;left:16px;right:16px;bottom:0;top:166px}.has-text-field #wp-link .query-results{top:200px}#wp-link li{clear:both;margin-bottom:0;border-bottom:1px solid #f1f1f1;color:#32373c;padding:4px 6px 4px 10px;cursor:pointer;position:relative}#wp-link .query-notice,#wp-link li.unselectable{border-bottom:1px solid #dfdfdf}#wp-link .query-notice{padding:0;background-color:#f7fcfe;color:#000}#wp-link .query-notice .query-notice-default,#wp-link .query-notice .query-notice-hint{display:block;padding:6px;border-left:4px solid #00a0d2}#wp-link .unselectable.no-matches-found{padding:0;border-bottom:1px solid #dfdfdf;background-color:#fef7f1}#wp-link .no-matches-found .item-title{display:block;padding:6px;border-left:4px solid #d54e21}#wp-link .query-results em{font-style:normal}#wp-link li:hover{background:#eaf2fa;color:#151515}#wp-link li.unselectable:hover{background:#fff;cursor:auto;color:#32373c}#wp-link li.selected{background:#ddd;color:#32373c}#wp-link li.selected .item-title{font-weight:600}#wp-link li:last-child{border:none}#wp-link .item-title{display:inline-block;width:80%;width:-webkit-calc(100% - 68px);width:calc(100% - 68px);word-wrap:break-word}#wp-link .item-info{text-transform:uppercase;color:#666;font-size:11px;position:absolute;right:5px;top:5px}#wp-link .river-waiting{display:none;padding:10px 0}#wp-link .submitbox{padding:8px 16px;background:#fcfcfc;border-top:1px solid #ddd;position:absolute;bottom:0;left:0;right:0}#wp-link-cancel{line-height:25px;float:left}#wp-link-update{line-height:23px;float:right}#wp-link-submit{float:right}@media screen and (max-width:782px){#wp-link-wrap{margin-top:-140px}#wp-link-wrap .query-results{top:195px}#wp-link-wrap.has-text-field .query-results{top:235px}#link-selector{padding:0 16px 60px}#wp-link-wrap #link-selector{bottom:52px}#wp-link-cancel{line-height:32px}#wp-link .link-target{padding-top:10px}#wp-link .submitbox .button{margin-bottom:0}}@media screen and (max-width:520px){#wp-link-wrap{width:auto;margin-left:0;left:10px;right:10px;max-width:500px}}@media screen and (max-height:520px){#wp-link-wrap{-webkit-transition:none;transition:none;height:auto;margin-top:0;top:10px;bottom:10px}#link-selector{overflow:auto}#search-panel .query-results{position:static}}@media screen and (max-height:290px){#wp-link-wrap{height:auto;margin-top:0;top:10px;bottom:10px}#link-selector{overflow:auto;height:-webkit-calc(100% - 92px);height:calc(100% - 92px);padding-bottom:2px}#search-panel .query-results{position:static}}div.wp-link-preview{float:left;margin:5px;max-width:694px;overflow:hidden;text-overflow:ellipsis}div.wp-link-preview a{color:#0073aa;text-decoration:underline;-webkit-transition-property:border,background,color;transition-property:border,background,color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;cursor:pointer}div.wp-link-preview a.wplink-url-error{color:#dc3232}div.wp-link-input{float:left;margin:2px;max-width:694px}div.wp-link-input input{width:300px;padding:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mce-toolbar div.wp-link-input~.mce-btn,.mce-toolbar div.wp-link-preview~.mce-btn{margin:2px 1px}.mce-inline-toolbar-grp .mce-btn-group .mce-btn:last-child{margin-right:2px}.ui-autocomplete.wplink-autocomplete{z-index:100110;max-height:200px;overflow-y:auto;padding:0;margin:0;list-style:none;position:absolute;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,.8);box-shadow:0 1px 2px rgba(30,140,190,.8);background-color:#fff}.ui-autocomplete.wplink-autocomplete li{margin-bottom:0;padding:4px 10px;clear:both;white-space:normal;text-align:left}.ui-autocomplete.wplink-autocomplete li .wp-editor-float-right{float:right}.ui-autocomplete.wplink-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}@media screen and (max-width:782px){div.wp-link-input,div.wp-link-preview{max-width:70%;max-width:-webkit-calc(100% - 86px);max-width:calc(100% - 86px)}div.wp-link-preview{margin:8px 0 8px 5px}div.wp-link-input{width:300px}div.wp-link-input input{width:100%;font-size:16px;padding:5px}}.mce-fullscreen{z-index:100010}.rtl .quicktags-toolbar input,.rtl .wp-switch-editor{font-family:Tahoma,sans-serif}.mce-rtl .mce-flow-layout .mce-flow-layout-item>div{direction:rtl}.mce-rtl .mce-listbox i.mce-caret{left:6px}html:lang(he-il) .rtl .quicktags-toolbar input,html:lang(he-il) .rtl .wp-switch-editor{font-family:Arial,sans-serif}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}}
\ No newline at end of file
index 6ff281f3e0c77b7b66c40cd933c12845c5ab0569..36802fd953fe27f6411ca80209e1788d6dea2505 100644 (file)
@@ -17,7 +17,7 @@
 
 .media-modal,
 .media-frame {
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        font-size: 12px;
        -webkit-overflow-scrolling: touch;
 }
@@ -80,7 +80,7 @@
 .media-frame input[type="url"],
 .media-frame textarea,
 .media-frame select {
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        font-size: 12px;
        border-width: 1px;
        border-style: solid;
 .media-sidebar h2,
 .image-details h2 {
        position: relative;
-       font-weight: bold;
+       font-weight: 600;
        text-transform: uppercase;
        font-size: 12px;
        color: #666;
        min-height: 22px;
        padding-top: 8px;
        line-height: 16px;
-       font-weight: normal;
+       font-weight: 400;
        color: #666;
 }
 
 .media-menu .active,
 .media-menu .active:hover {
        color: #23282d;
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .media-menu .separator {
        padding: 4px;
        font-size: 13px;
        color: #444;
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        -webkit-appearance: none;
 }
 
        max-height: 100%;
        word-wrap: break-word;
        text-align: center;
-       font-weight: bold;
+       font-weight: 600;
        background: rgba( 255, 255, 255, 0.8 );
        -webkit-box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 );
        box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 );
 }
 
 .upload-errors .upload-error-filename {
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .upload-errors .upload-error-message {
 .uploader-inline .has-upload-message .upload-instructions {
        font-size: 14px;
        color: #444;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .uploader-inline .drop-instructions {
        padding-top: 12px;
        font-size: 14px;
        line-height: 20px;
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .media-selection .button-link {
 }
 
 .attachment-info .filename {
-       font-weight: bold;
+       font-weight: 600;
        color: #444;
        word-wrap: break-word;
 }
        transform: translateY( -50% );
        font-size: 3em;
        line-height: 1.3;
-       font-weight: bold;
+       font-weight: 600;
        color: #fff;
        padding: 0;
        margin: 0;
index cda07c4651488f0ad09454e5b3d3c07e523dabf8..c40d170407c90815f95dac92dd67cdc2cb9b64a9 100644 (file)
@@ -1,8 +1,8 @@
-.media-menu,.media-router{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.media-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.media-modal input,.media-modal select,.media-modal textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.media-frame,.media-modal{font-family:"Open Sans",sans-serif;font-size:12px;-webkit-overflow-scrolling:touch}.media-modal label,.media-modal legend{font-size:13px}.media-frame input,.media-frame textarea{padding:6px 8px}.media-frame select,.wp-admin .media-frame select{line-height:28px;margin-top:3px}.media-frame a{border-bottom:none;color:#0073aa}.media-frame a:active,.media-frame a:hover{color:#00a0d2}.media-frame a:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);outline:0;color:#124964}.media-frame a.button{color:#32373c}.media-frame a.button:hover{color:#23282d}.media-frame a.button-primary,.media-frame a.button-primary:hover{color:#fff}.media-frame input[type=text],.media-frame input[type=password],.media-frame input[type=number],.media-frame input[type=search],.media-frame input[type=email],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-family:"Open Sans",sans-serif;font-size:12px;border-width:1px;border-style:solid;border-color:#ddd}.media-frame input[type=text]:focus,.media-frame input[type=password]:focus,.media-frame input[type=number]:focus,.media-frame input[type=search]:focus,.media-frame input[type=email]:focus,.media-frame input[type=url]:focus,.media-frame select:focus,.media-frame textarea:focus{border-color:#5b9dd9}.media-frame select{height:24px;padding:2px}.media-frame input:disabled,.media-frame input[readonly],.media-frame textarea:disabled,.media-frame textarea[readonly]{background-color:#eee}.media-frame input[type=search]{-webkit-appearance:textfield}.media-frame ::-webkit-input-placeholder{color:#72777c}.media-frame ::-moz-placeholder{color:#72777c;opacity:1}.media-frame :-ms-input-placeholder{color:#72777c}.media-frame .hidden{display:none}/*!
+.media-menu,.media-router{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.media-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.media-modal input,.media-modal select,.media-modal textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.media-frame,.media-modal{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:12px;-webkit-overflow-scrolling:touch}.media-modal label,.media-modal legend{font-size:13px}.media-frame input,.media-frame textarea{padding:6px 8px}.media-frame select,.wp-admin .media-frame select{line-height:28px;margin-top:3px}.media-frame a{border-bottom:none;color:#0073aa}.media-frame a:active,.media-frame a:hover{color:#00a0d2}.media-frame a:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);outline:0;color:#124964}.media-frame a.button{color:#32373c}.media-frame a.button:hover{color:#23282d}.media-frame a.button-primary,.media-frame a.button-primary:hover{color:#fff}.media-frame input[type=text],.media-frame input[type=password],.media-frame input[type=number],.media-frame input[type=search],.media-frame input[type=email],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:12px;border-width:1px;border-style:solid;border-color:#ddd}.media-frame input[type=text]:focus,.media-frame input[type=password]:focus,.media-frame input[type=number]:focus,.media-frame input[type=search]:focus,.media-frame input[type=email]:focus,.media-frame input[type=url]:focus,.media-frame select:focus,.media-frame textarea:focus{border-color:#5b9dd9}.media-frame select{height:24px;padding:2px}.media-frame input:disabled,.media-frame input[readonly],.media-frame textarea:disabled,.media-frame textarea[readonly]{background-color:#eee}.media-frame input[type=search]{-webkit-appearance:textfield}.media-frame ::-webkit-input-placeholder{color:#72777c}.media-frame ::-moz-placeholder{color:#72777c;opacity:1}.media-frame :-ms-input-placeholder{color:#72777c}.media-frame .hidden{display:none}/*!
  * jQuery UI Draggable/Sortable 1.11.4
  * http://jqueryui.com
  *
  * Copyright jQuery Foundation and other contributors
  * Released under the MIT license.
  * http://jquery.org/license
- */.ui-draggable-handle,.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.media-modal{position:fixed;top:30px;right:30px;left:30px;bottom:30px;z-index:160000}.wp-customizer .media-modal{z-index:560000}.media-modal-backdrop{position:fixed;top:0;right:0;left:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.wp-customizer .media-modal-backdrop{z-index:559900}.media-modal-close{position:absolute;top:0;left:0;width:50px;height:50px;padding:0;z-index:1000;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.media-modal-close:active{-webkit-box-shadow:none;box-shadow:none;outline:0}.media-modal-close span.media-modal-icon{background-image:none}.media-modal-close .media-modal-icon:before{content:"\f158";font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666}.media-modal-close:hover .media-modal-icon:before{color:#00a0d2}.media-modal-content{position:absolute;top:0;right:0;left:0;bottom:0;overflow:auto;min-height:300px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background:#fcfcfc;-webkit-font-smoothing:subpixel-antialiased}.media-modal-content .media-frame select.attachment-filters{margin-top:11px;margin-left:2%;width:42%;width:-webkit-calc(48% - 12px);width:calc(48% - 12px)}.media-modal-content .attachments-browser .media-toolbar-secondary{width:66%}.media-modal-content .media-toolbar-primary.search-form{width:33%}.media-modal-content .media-toolbar-primary .media-button{float:left}.media-modal-content .attachments-browser .search{width:100%}.wp-core-ui .media-modal-icon{background-image:url(../images/uploader-icons.png);background-repeat:no-repeat}.media-menu,.media-sidebar{top:0;bottom:0;background:#f3f3f3;left:0}.media-toolbar{position:absolute;top:0;right:0;left:0;z-index:100;height:60px;padding:0 16px;border:0 solid #ddd;overflow:hidden}.media-toolbar-primary{float:left;height:100%}.media-toolbar-secondary{float:right;height:100%}.media-toolbar-primary>.media-button,.media-toolbar-primary>.media-button-group{margin-right:10px;float:right;margin-top:15px}.media-toolbar-secondary>.media-button,.media-toolbar-secondary>.media-button-group{margin-left:10px;margin-top:15px}.media-sidebar{position:absolute;width:267px;padding:0 16px 24px;z-index:75;border-right:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch}.hide-toolbar .media-sidebar{bottom:0}.media-sidebar .sidebar-title{font-size:20px;margin:0;padding:12px 10px 10px;line-height:28px}.media-sidebar .sidebar-content{padding:0 10px;margin-bottom:130px}.media-sidebar .search{display:block;width:100%}.image-details h2,.image-details h3,.media-sidebar h2,.media-sidebar h3{position:relative;font-weight:700;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}.attachment-details .setting,.media-sidebar .setting{display:block;float:right;width:100%;margin:1px 0}.attachment-details .setting label,.media-sidebar .setting label{display:block}.attachment-details .setting .link-to-custom,.media-sidebar .setting .link-to-custom{margin:3px 2px 0}.attachment-details .setting span,.media-sidebar .setting span{min-width:30%;margin-left:4%;font-size:12px;text-align:left;word-wrap:break-word}.media-sidebar .setting .name{max-width:80px}.attachment-details .setting select,.media-sidebar .setting select{max-width:65%}.attachment-details .field input[type=checkbox],.attachment-details .field input[type=radio],.attachment-details .setting input[type=checkbox],.attachment-details .setting input[type=radio],.media-sidebar .field input[type=checkbox],.media-sidebar .field input[type=radio],.media-sidebar .setting input[type=checkbox],.media-sidebar .setting input[type=radio]{float:none;margin:8px 3px 0;padding:0}.attachment-details .setting span,.compat-item label span,.media-sidebar .setting span{float:right;min-height:22px;padding-top:8px;line-height:16px;font-weight:400;color:#666}.media-menu>a,.media-router>a{line-height:18px;font-size:14px;text-decoration:none}.compat-item label span{text-align:left}.attachment-details .setting .value,.attachment-details .setting input[type=tel],.attachment-details .setting input[type=text],.attachment-details .setting input[type=password],.attachment-details .setting input[type=number],.attachment-details .setting input[type=search],.attachment-details .setting input[type=email],.attachment-details .setting input[type=url],.attachment-details .setting textarea,.media-sidebar .setting .value,.media-sidebar .setting input[type=tel],.media-sidebar .setting input[type=text],.media-sidebar .setting input[type=password],.media-sidebar .setting input[type=number],.media-sidebar .setting input[type=search],.media-sidebar .setting input[type=email],.media-sidebar .setting input[type=url],.media-sidebar .setting textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px;width:65%;float:left}.attachment-details .setting .value,.media-sidebar .setting .value{margin:0 1px;text-align:right}.attachment-details .setting textarea,.compat-item .field textarea,.media-sidebar .setting textarea{height:62px;resize:vertical}.attachment-details select,.media-sidebar select{margin-top:3px}.compat-item{float:right;width:100%;overflow:hidden}.compat-item table{width:100%;table-layout:fixed;border-spacing:0;border:0}.compat-item tr{padding:2px 0;display:block;overflow:hidden}.compat-item .field,.compat-item .label{display:block;margin:0;padding:0}.compat-item .label{min-width:30%;margin-left:4%;float:right;text-align:left}.compat-item .label span{display:block;width:100%}.compat-item .field{float:left;width:65%;margin:1px}.compat-item .field input[type=tel],.compat-item .field input[type=text],.compat-item .field input[type=password],.compat-item .field input[type=number],.compat-item .field input[type=search],.compat-item .field input[type=email],.compat-item .field input[type=url],.compat-item .field textarea{width:100%;margin:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.sidebar-for-errors .attachment-details,.sidebar-for-errors .compat-item,.sidebar-for-errors .media-sidebar .media-progress-bar,.sidebar-for-errors .upload-details{display:none!important}.media-menu{position:absolute;right:0;margin:0;padding:10px 0;border-left-width:1px;border-left-style:solid;border-left-color:#ccc;user-select:none}.media-menu>a{display:block;position:relative;padding:8px 20px;margin:0;color:#0073aa}.media-frame-title .dashicons,.media-frame.hide-router .media-frame-router{display:none}.media-menu>a:hover{color:#0073aa;background:rgba(0,0,0,.04)}.media-menu>a:active{outline:0}.media-menu .active,.media-menu .active:hover{color:#23282d;font-weight:700}.media-menu .separator{height:0;margin:12px 20px;padding:0;border-top:1px solid #ddd}.media-router{position:relative;padding:0 6px;margin:0;clear:both;user-select:none}.media-router a{-webkit-transition:none;transition:none}.media-router>a{position:relative;float:right;padding:8px 10px 9px;margin:0;height:18px}.media-frame,.media-frame-menu{position:absolute;right:0;bottom:0;top:0}.media-router>a:last-child{border-left:0}.media-router>a:active{outline:0}.media-router .active,.media-router .active:hover{color:#32373c}.media-router .active,.media-router>a.active:last-child{margin:-1px -1px 0;background:#fff;border:1px solid #ddd;border-bottom:none}.media-router .active:after{display:none}.media-frame{overflow:hidden;left:0}.media-frame-menu{width:200px;z-index:150}.media-frame-router,.media-frame-title{z-index:200;right:200px;position:absolute;left:0}.media-frame-title{top:0;height:50px}.media-frame-router{top:50px;height:36px}.media-frame-content{position:absolute;top:84px;right:200px;left:0;bottom:61px;height:auto;width:auto;margin:0;overflow:auto;background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.media-frame-toolbar{position:absolute;right:200px;left:0;bottom:0;height:60px;z-index:100}.media-frame.hide-menu .media-frame-content,.media-frame.hide-menu .media-frame-router,.media-frame.hide-menu .media-frame-title,.media-frame.hide-menu .media-frame-toolbar{right:0}.media-frame.hide-menu .media-frame-menu{right:-200px}.media-frame.hide-toolbar .media-frame-content{bottom:0}.media-frame.hide-toolbar .media-frame-toolbar{bottom:-61px}.media-frame.hide-router .media-frame-content{top:50px}.media-frame.hide-router .media-frame-title{border-bottom:1px solid #ddd;-webkit-box-shadow:0 4px 4px -4px rgba(0,0,0,.1);box-shadow:0 4px 4px -4px rgba(0,0,0,.1)}.media-frame-title h1{padding:0 16px;font-size:22px;line-height:50px;margin:0}.media-frame-title .suggested-dimensions{font-size:14px;float:left;margin-left:20px}.media-frame-content .crop-content{height:100%}.wp-customizer:not(.mobile) .media-frame-content .crop-content.site-icon{margin-left:300px}.media-frame-content .crop-content .crop-image{display:block;margin:auto;max-width:100%;max-height:100%}.media-frame-content .crop-content .upload-errors{position:absolute;width:300px;top:50%;right:50%;margin-right:-150px;margin-left:-150px;z-index:600000}.media-frame .media-iframe{overflow:hidden}.media-frame .media-iframe,.media-frame .media-iframe iframe{height:100%;width:100%;border:0}.media-frame select.attachment-filters{margin-top:11px;margin-left:2%;max-width:42%;max-width:-webkit-calc(48% - 12px);max-width:calc(48% - 12px)}.media-toolbar-primary .search,.wp-core-ui .attachment .portrait img{max-width:100%}.media-frame select.attachment-filters:last-of-type{margin-left:0}.media-frame .search{margin-top:11px;padding:4px;font-size:13px;color:#444;font-family:"Open Sans",sans-serif;-webkit-appearance:none}.wp-core-ui .attachments{margin:0;-webkit-overflow-scrolling:touch}.wp-core-ui .attachment{position:relative;float:right;padding:8px;margin:0;color:#444;cursor:pointer;list-style:none;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:25%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-core-ui .attachment.details:focus,.wp-core-ui .attachment:focus,.wp-core-ui .selected.attachment:focus{-webkit-box-shadow:inset 0 0 2px 3px #fff,inset 0 0 0 7px #5b9dd9;box-shadow:inset 0 0 2px 3px #fff,inset 0 0 0 7px #5b9dd9;outline:0}.wp-core-ui .selected.attachment{-webkit-box-shadow:inset 0 0 0 5px #fff,inset 0 0 0 7px #ccc;box-shadow:inset 0 0 0 5px #fff,inset 0 0 0 7px #ccc}.wp-core-ui .attachment.details{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #0073aa;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #0073aa}.wp-core-ui .attachment-preview{position:relative;-webkit-box-shadow:inset 0 0 15px rgba(0,0,0,.1),inset 0 0 0 1px rgba(0,0,0,.05);box-shadow:inset 0 0 15px rgba(0,0,0,.1),inset 0 0 0 1px rgba(0,0,0,.05);background:#eee;cursor:pointer}.wp-core-ui .attachment-preview:before{content:"";display:block;padding-top:100%}.wp-core-ui .attachment .icon{margin:0 auto;overflow:hidden}.wp-core-ui .attachment .thumbnail{overflow:hidden;position:absolute;top:0;left:0;bottom:0;right:0;opacity:1;-webkit-transition:opacity .1s;transition:opacity .1s}.wp-core-ui .attachment .landscape img{max-height:100%}.wp-core-ui .attachment .thumbnail:after{content:"";display:block;position:absolute;top:0;right:0;left:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);overflow:hidden}.wp-core-ui .attachment .thumbnail img{top:0;right:0}.wp-core-ui .attachment .thumbnail .centered{position:absolute;top:0;right:0;width:100%;height:100%;-webkit-transform:translate(-50%,50%);-ms-transform:translate(-50%,50%);transform:translate(-50%,50%)}.wp-core-ui .attachment .thumbnail .centered img{-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%)}.wp-core-ui .attachments-browser .attachment .thumbnail .centered img.icon{-webkit-transform:translate(50%,-70%);-ms-transform:translate(50%,-70%);transform:translate(50%,-70%)}.ie8 .wp-core-ui .attachment img.icon{top:20%;position:relative}.wp-core-ui .attachment .filename{position:absolute;right:0;left:0;bottom:0;overflow:hidden;max-height:100%;word-wrap:break-word;text-align:center;font-weight:700;background:rgba(255,255,255,.8);-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}.wp-core-ui .attachment .filename div{padding:5px 10px}.wp-core-ui .attachment .thumbnail img{position:absolute}.wp-core-ui .attachment-close{display:block;position:absolute;top:5px;left:5px;height:22px;width:22px;padding:0;background-color:#fff;background-position:-96px 4px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.3);box-shadow:0 0 0 1px rgba(0,0,0,.3)}.wp-core-ui .attachment-close:focus,.wp-core-ui .attachment-close:hover{background-position:-36px 4px}.wp-core-ui .attachment .check{display:none;height:24px;width:24px;padding:0;position:absolute;z-index:10;top:0;left:0;outline:0;background:#eee;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px rgba(0,0,0,.15);box-shadow:0 0 0 1px #fff,0 0 0 2px rgba(0,0,0,.15)}.wp-core-ui .attachment .check .media-modal-icon{display:block;background-position:-1px 0;height:15px;width:15px;margin:5px}.wp-core-ui .attachment .check:hover .media-modal-icon{background-position:-40px 0}.wp-core-ui .attachment.selected .check{display:block}.wp-core-ui .attachment.details .check,.wp-core-ui .attachment.selected .check:focus,.wp-core-ui .media-frame.mode-grid .attachment.selected .check{background-color:#0073aa;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #0073aa;box-shadow:0 0 0 1px #fff,0 0 0 2px #0073aa}.wp-core-ui .attachment.details .check .media-modal-icon,.wp-core-ui .media-frame.mode-grid .attachment.selected .check .media-modal-icon{background-position:-21px 0}.wp-core-ui .attachment.details .check:hover .media-modal-icon,.wp-core-ui .attachment.selected .check:focus .media-modal-icon,.wp-core-ui .media-frame.mode-grid .attachment.selected .check:hover .media-modal-icon{background-position:-60px 0}.wp-core-ui .media-frame .attachment .describe{position:relative;display:block;width:100%;margin:0;padding:8px;font-size:12px;-webkit-border-radius:0;border-radius:0}.media-frame .attachments-browser{position:relative;width:100%;height:100%;overflow:hidden}.attachments-browser .media-toolbar{left:300px;height:50px}.attachments-browser.hide-sidebar .media-toolbar{left:0}.attachments-browser .media-toolbar-primary>.media-button,.attachments-browser .media-toolbar-primary>.media-button-group,.attachments-browser .media-toolbar-secondary>.media-button,.attachments-browser .media-toolbar-secondary>.media-button-group{margin:11px 0}.attachments-browser .attachments{padding:2px 8px 8px}.attachments-browser .attachments,.attachments-browser .uploader-inline{position:absolute;top:50px;right:0;left:300px;bottom:0;overflow:auto;outline:0}.attachments-browser .uploader-inline.hidden{display:none}.attachments-browser .media-toolbar-primary{max-width:33%}.attachments-browser .media-toolbar-secondary{max-width:66%}.uploader-inline .close{background-color:transparent;border:0;cursor:pointer;height:48px;position:absolute;left:0;text-align:center;top:0;width:50px;z-index:1}.uploader-inline .close:before{font:400 30px/50px dashicons!important;color:#72777c;display:inline-block;content:"\f335";font-weight:300}.attachments-browser.hide-sidebar .attachments,.attachments-browser.hide-sidebar .uploader-inline{left:0;margin-left:0}.attachments-browser .instructions{display:inline-block;margin-top:16px;line-height:18px;font-size:13px;color:#666;margin-left:.5em}.attachments-browser .no-media{padding:2em 2em 0 0}.media-progress-bar{position:relative;height:10px;width:70%;margin:10px auto;-webkit-border-radius:10px;border-radius:10px;background:#ddd;background:rgba(0,0,0,.1)}.media-progress-bar div{height:10px;min-width:20px;width:0;background:#0073aa;-webkit-border-radius:10px;border-radius:10px;-webkit-transition:width .3s;transition:width .3s}.media-uploader-status .media-progress-bar{display:none;width:100%}.uploading.media-uploader-status .media-progress-bar{display:block}.attachment-preview .media-progress-bar{position:absolute;top:50%;right:15%;width:70%;margin:-5px 0 0}.media-uploader-status{position:relative;margin:0 auto;padding-bottom:10px;max-width:400px}.uploader-inline .media-uploader-status h2,.uploader-inline .media-uploader-status h3{display:none}.media-uploader-status .upload-details{display:none;font-size:12px;color:#666}.uploading.media-uploader-status .upload-details{display:block}.media-uploader-status .upload-detail-separator{padding:0 4px}.media-uploader-status .upload-count{color:#444}.media-uploader-status .upload-dismiss-errors,.media-uploader-status .upload-errors{display:none}.errors.media-uploader-status .upload-dismiss-errors,.errors.media-uploader-status .upload-errors{display:block}.media-uploader-status .upload-dismiss-errors{text-decoration:none}.media-sidebar .media-uploader-status .upload-dismiss-errors{position:absolute;top:0;left:0}.upload-errors .upload-error{padding:12px;margin-bottom:12px;background:#fff;border-right:4px solid #dc3232;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.uploader-inline .upload-errors .upload-error{background-color:#fbeaea;-webkit-box-shadow:none;box-shadow:none}.upload-errors .upload-error-filename{font-weight:700}.upload-errors .upload-error-message{display:block;padding-top:8px;word-wrap:break-word}.uploader-window{position:fixed;top:0;right:0;left:0;bottom:0;background:rgba(0,86,132,.9);z-index:250000;display:none;text-align:center;opacity:0;-webkit-transition:opacity 250ms;transition:opacity 250ms}.uploader-window-content{position:absolute;top:10px;right:10px;left:10px;bottom:10px;border:1px dashed #fff}.uploader-window h1,.uploader-window h3{margin:-.5em 0 0;position:absolute;top:50%;right:0;left:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);font-size:40px;color:#fff;padding:0}.uploader-window .media-progress-bar{margin-top:20px;max-width:300px;background:0 0;border-color:#fff;display:none}.uploader-window .media-progress-bar div{background:#fff}.uploading .uploader-window .media-progress-bar{display:block}.media-frame .uploader-inline{margin-bottom:20px;padding:0;text-align:center}.uploader-inline-content{position:absolute;top:30%;right:0;left:0}.uploader-inline-content .upload-ui{margin:2em 0}.uploader-inline-content .post-upload-ui{margin-bottom:2em}.uploader-inline .has-upload-message .upload-ui{margin:0 0 4em}.uploader-inline h2,.uploader-inline h3{font-size:20px;line-height:28px;font-weight:400;margin:0}.uploader-inline .has-upload-message .upload-instructions{font-size:14px;color:#444;font-weight:400}.uploader-inline .drop-instructions{display:none}.supports-drag-drop .uploader-inline .drop-instructions{display:block}.uploader-inline p{font-size:12px;margin:.5em 0}.uploader-inline .media-progress-bar{display:none}.uploading.uploader-inline .media-progress-bar{display:block}.uploader-inline .browser{display:inline-block!important}.media-selection{position:absolute;top:0;right:0;left:350px;height:60px;padding:0 16px 0 0;overflow:hidden;white-space:nowrap}.media-selection .selection-info{display:inline-block;font-size:12px;height:60px;margin-left:10px;vertical-align:top}.media-selection.editing,.media-selection.empty,.media-selection.one .edit-selection{display:none}.media-selection .count{display:block;padding-top:12px;font-size:14px;line-height:20px;font-weight:700}.media-selection .attachments,.media-selection .selection-view{display:inline-block;vertical-align:top}.media-selection .button-link{float:right;padding:1px 8px;margin:1px -8px 1px 8px;line-height:16px;border-left:1px solid #ddd;color:#0073aa}.media-selection .button-link:focus,.media-selection .button-link:hover{color:#00a0d2}.media-selection .button-link:last-child{border-left:0;margin-left:0}.selection-info .clear-selection{color:#bc0b0b}.selection-info .clear-selection:focus,.selection-info .clear-selection:hover{color:red}.media-selection .attachments{height:48px;margin:6px;padding:0;overflow:hidden}.media-selection .attachment{width:40px;padding:0;margin:4px}.media-selection .attachment .thumbnail{top:0;left:0;bottom:0;right:0}.media-selection .attachment .icon{width:50%}.media-selection .attachment-preview{-webkit-box-shadow:none;box-shadow:none;background:0 0}.wp-core-ui .media-selection .attachment.details:focus,.wp-core-ui .media-selection .attachment:focus,.wp-core-ui .media-selection .selected.attachment:focus{-webkit-box-shadow:0 0 0 1px #fff,0 0 2px 3px #5b9dd9;box-shadow:0 0 0 1px #fff,0 0 2px 3px #5b9dd9}.wp-core-ui .media-selection .selected.attachment{-webkit-box-shadow:none;box-shadow:none}.wp-core-ui .media-selection .attachment.details{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #0073aa;box-shadow:0 0 0 1px #fff,0 0 0 3px #0073aa}.media-selection:after{content:"";display:block;position:absolute;top:0;left:0;bottom:0;width:25px;background-image:-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,1)),to(rgba(255,255,255,0)));background-image:-webkit-linear-gradient(left,rgba(255,255,255,1),rgba(255,255,255,0));background-image:linear-gradient(to right,rgba(255,255,255,1),rgba(255,255,255,0))}.media-selection .attachment .filename{display:none}.media-frame .spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;float:left;display:inline-block;visibility:hidden;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:0;vertical-align:middle}.attachment-details.save-waiting .settings-save-status .spinner,.media-frame .embed-loading .embed-url .spinner,.media-frame .spinner.is-active{visibility:visible}.media-toolbar .spinner{margin-top:14px}.attachment-details{position:relative;overflow:auto}.attachment-details .settings-save-status{float:left;text-transform:none;z-index:10}.attachment-details .settings-save-status .spinner{margin-right:5px}.attachment-details .settings-save-status .saved{float:left;display:none}.attachment-details.save-complete .settings-save-status .saved{display:block}.attachment-info{overflow:hidden;min-height:60px;margin-bottom:16px;line-height:18px;color:#666;border-bottom:1px solid #ddd;padding-bottom:11px}.attachment-info .filename{font-weight:700;color:#444;word-wrap:break-word}.attachment-info .thumbnail{position:relative;float:right;max-width:120px;max-height:120px;margin-top:5px;margin-left:10px;margin-bottom:5px}.uploading .attachment-info .thumbnail{width:120px;height:80px;-webkit-box-shadow:inset 0 0 15px rgba(0,0,0,.1);box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.uploading .attachment-info .media-progress-bar{margin-top:35px}.attachment-info .thumbnail-image:after{content:"";display:block;position:absolute;top:0;right:0;left:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);overflow:hidden}.attachment-info .thumbnail img{display:block;max-width:120px;max-height:120px;margin:0 auto}.attachment-info .details{float:right;font-size:12px;max-width:100%}.attachment-info .delete-attachment,.attachment-info .edit-attachment,.attachment-info .trash-attachment,.attachment-info .untrash-attachment{display:block;text-decoration:none;white-space:nowrap}.attachment-details.needs-refresh .attachment-info .edit-attachment{display:none}.attachment-info .edit-attachment{display:block}.media-modal .delete-attachment,.media-modal .trash-attachment,.media-modal .untrash-attachment{display:inline;padding:0;color:#bc0b0b}.media-modal .delete-attachment:focus,.media-modal .delete-attachment:hover,.media-modal .trash-attachment:focus,.media-modal .trash-attachment:hover,.media-modal .untrash-attachment:focus,.media-modal .untrash-attachment:hover{color:red}.attachment-display-settings{width:100%;float:right;overflow:hidden}.attachment-display-settings h4{margin:1.4em 0 .4em}.collection-settings{overflow:hidden}.collection-settings .setting input[type=checkbox]{float:right;margin-left:8px}.collection-settings .setting span{min-width:inherit}.media-modal .imgedit-wrap{position:static}.media-modal .imgedit-wrap .imgedit-panel-content{padding:16px;position:absolute;top:0;left:282px;bottom:0;right:0;overflow:auto}.media-modal .imgedit-wrap .imgedit-settings{background:#f3f3f3;border-right:1px solid #ddd;padding:20px 16px 16px;position:absolute;top:0;left:0;bottom:0;width:250px;overflow:auto}.media-modal .imgedit-group{background:0 0;border:none;border-bottom:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;margin:0 0 16px;padding:0 0 16px;position:relative}.media-modal .imgedit-group:last-of-type{border:none;margin:0;padding:0}.media-modal .imgedit-group-top{margin:0}.media-modal .imgedit-group-top h2,.media-modal .imgedit-group-top h2 .button-link,.media-modal .imgedit-group-top h3{display:inline-block;text-transform:uppercase;font-size:12px;color:#666;margin:3px 0 0}.embed-url,.imgedit-thumbnail-preview-caption{display:block}.media-modal .imgedit-group-top h2 .button-link,.media-modal .imgedit-group-top h2 a,.media-modal .imgedit-group-top h3 a{text-decoration:none;color:#666}.wp-core-ui.media-modal .image-editor .imgedit-help-toggle,.wp-core-ui.media-modal .image-editor .imgedit-help-toggle:active,.wp-core-ui.media-modal .image-editor .imgedit-help-toggle:hover{border:1px solid transparent;margin:0;padding:0;background:0 0;color:#0074a2;font-size:20px;line-height:1;cursor:pointer;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-box-shadow:none;box-shadow:none}.wp-core-ui.media-modal .image-editor .imgedit-help-toggle:focus{color:#0074a2;border-color:#5b9dd9;outline:0;-webkit-box-shadow:0 0 3px rgba(0,115,170,.8);box-shadow:0 0 3px rgba(0,115,170,.8)}.wp-core-ui.media-modal .imgedit-group-top .dashicons-arrow-down.imgedit-help-toggle{margin-top:-3px}.wp-core-ui.media-modal .image-editor h3 .imgedit-help-toggle{margin-top:-2px}.media-modal .imgedit-help-toggled span.dashicons:before{content:"\f142"}.media-modal .imgedit-thumbnail-preview{margin:10px 0 0 8px}.media-modal .imgedit-wrap div.updated{margin:0 0 16px}.embed-url{position:relative;padding:16px;margin:0;z-index:250;background:#fff;font-size:18px}.media-frame .embed-url input{font-size:18px;padding:12px 14px;width:100%;min-width:200px;-webkit-box-shadow:inset -2px 2px 4px -2px rgba(0,0,0,.1);box-shadow:inset -2px 2px 4px -2px rgba(0,0,0,.1)}.media-frame .embed-url .spinner{position:absolute;top:32px;left:26px}.embed-link-settings,.embed-media-settings{position:absolute;top:70px;right:0;left:0;bottom:0;padding:16px 16px 32px;overflow:auto}.media-embed .embed-link-settings{overflow:visible}.embed-preview embed,.embed-preview iframe,.embed-preview img,.mejs-container video{max-width:100%;vertical-align:middle}.embed-preview a{display:inline-block}.embed-preview img{display:block;height:auto}.mejs-container:focus{outline:#5b9dd9 solid 1px;-webkit-box-shadow:0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 2px 1px rgba(30,140,190,.8)}.image-details .media-modal{right:140px;left:140px}.image-details .media-frame-content,.image-details .media-frame-router,.image-details .media-frame-title{right:0}.image-details .embed-media-settings{top:0;overflow:visible;padding:0}.image-details .embed-media-settings,.image-details .embed-media-settings div{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.image-details .column-settings{background:#f3f3f3;border-left:1px solid #ddd;min-height:100%;width:55%;position:absolute;top:0;right:0}.image-details .column-settings h2,.image-details .column-settings h3{margin:20px;padding-top:20px;border-top:1px solid #ddd;color:#23282d}.image-details .column-image{width:45%;position:absolute;right:55%;top:0}.image-details .image{margin:20px}.image-details .image img{max-width:100%;max-height:500px}.image-details .advanced-toggle{padding:0;color:#666;text-transform:uppercase}.image-details .advanced-toggle:after{font:400 20px/1 dashicons;speak:none;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f140";display:inline-block;margin-top:-2px}.image-details .advanced-visible .advanced-toggle:after{content:"\f142"}.image-details .embed-media-settings .size{margin-bottom:4px}.image-details .custom-size span{display:block}.image-details .custom-size label{display:block;float:right}.image-details .custom-size span small{color:#555d66;font-size:inherit}.image-details .custom-size input{width:5em}.image-details .custom-size .sep{float:right;margin:26px 6px 0}.image-details .custom-size:after{content:"";display:table;clear:both}.media-embed .thumbnail{max-width:100%;max-height:200px;position:relative;float:right}.media-embed .thumbnail img{max-height:200px;display:block}.media-embed .thumbnail:after{content:"";display:block;position:absolute;top:0;right:0;left:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);overflow:hidden}.media-embed .setting{width:100%;margin:10px 0;float:right;display:block;clear:both}.image-details .embed-media-settings .setting{float:none;width:auto}.image-details .actions{margin:10px 0}.image-details .hidden{display:none}.media-embed .setting input[type=text],.media-embed .setting textarea{display:block;width:100%;max-width:400px;margin:1px 0}.image-details .embed-media-settings .setting input[type=text],.image-details .embed-media-settings .setting textarea{max-width:inherit;width:70%}.image-details .embed-media-settings .custom-size,.image-details .embed-media-settings .link-target,.image-details .embed-media-settings .setting input.link-to-custom{margin-right:27%;width:70%}.image-details .embed-media-settings .link-target{margin-top:24px}.media-embed .setting input.hidden,.media-embed .setting textarea.hidden{display:none}.media-embed .setting span{display:block;width:200px;font-size:13px;line-height:24px;color:#666}.image-details .embed-media-settings .setting span{float:right;width:25%;text-align:left;margin:8px 1% 0;line-height:1.1}.media-embed .setting .button-group{margin:2px 0}.media-embed-sidebar{position:absolute;top:0;right:440px}.advanced-section,.link-settings{margin-top:10px}.wp-editor-wrap .uploader-editor{background:rgba(150,150,150,.9);position:absolute;top:0;right:0;width:100%;height:100%;z-index:99998;display:none;text-align:center}.wp-editor-wrap .uploader-editor-content{border:1px dashed #fff;position:absolute;top:10px;right:10px;left:10px;bottom:10px}.wp-editor-wrap .uploader-editor .uploader-editor-title{position:absolute;top:50%;right:0;left:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);font-size:3em;line-height:1.3;font-weight:700;color:#fff;padding:0;margin:0;display:none}.wp-editor-wrap .uploader-editor.droppable{background:rgba(0,86,132,.9)}.wp-editor-wrap .uploader-editor.droppable .uploader-editor-title{display:block}.ie7 .media-frame .attachments-browser{position:static}.ie7 .media-frame .embed-url input{margin-top:4px;width:90%}.ie7 .compat-item{width:99%}.ie7 .attachment-display-settings{width:auto}.ie7 .attachment-preview,.ie7 .attachment-preview .thumbnail{width:120px;height:120px}.ie7 .media-frame .attachment .describe{width:102px}.ie7 .media-sidebar .setting select{max-width:55%}.ie7 .media-sidebar .setting input[type=tel],.ie7 .media-sidebar .setting input[type=text],.ie7 .media-sidebar .setting input[type=password],.ie7 .media-sidebar .setting input[type=number],.ie7 .media-sidebar .setting input[type=search],.ie7 .media-sidebar .setting input[type=email],.ie7 .media-sidebar .setting input[type=url],.ie7 .media-sidebar .setting textarea{width:55%}.ie7 .media-sidebar .setting .link-to-custom{float:right}.rtl .media-frame,.rtl .media-frame .search,.rtl .media-frame input[type=tel],.rtl .media-frame input[type=text],.rtl .media-frame input[type=password],.rtl .media-frame input[type=number],.rtl .media-frame input[type=search],.rtl .media-frame input[type=email],.rtl .media-frame input[type=url],.rtl .media-frame select,.rtl .media-frame textarea,.rtl .media-modal{font-family:Tahoma,sans-serif}:lang(he-il) .rtl .media-frame,:lang(he-il) .rtl .media-frame .search,:lang(he-il) .rtl .media-frame input[type=text],:lang(he-il) .rtl .media-frame input[type=password],:lang(he-il) .rtl .media-frame input[type=number],:lang(he-il) .rtl .media-frame input[type=search],:lang(he-il) .rtl .media-frame input[type=email],:lang(he-il) .rtl .media-frame input[type=url],:lang(he-il) .rtl .media-frame select,:lang(he-il) .rtl .media-frame textarea,:lang(he-il) .rtl .media-modal{font-family:Arial,sans-serif}@media only screen and (max-width:900px){.media-frame:not(.hide-menu) .media-frame-content,.media-frame:not(.hide-menu) .media-frame-router,.media-frame:not(.hide-menu) .media-frame-title,.media-frame:not(.hide-menu) .media-frame-toolbar{right:0}.media-frame:not(.hide-menu) .media-frame-menu{position:static;width:0}.media-frame:not(.hide-menu) .media-menu{width:auto;max-width:80%;overflow:auto;z-index:2000;top:50px;right:-300px;left:auto;bottom:auto;padding:5px 0;border:1px solid #ccc}.media-frame:not(.hide-menu) .media-menu.visible{right:0}.media-frame:not(.hide-menu) .media-menu>a{padding:12px 16px;font-size:16px}.media-frame:not(.hide-menu) .media-menu>a.active{display:none}.media-frame:not(.hide-menu) .media-menu .separator{margin:5px 10px}.media-frame:not(.hide-menu) .media-frame-title{right:0}.media-frame:not(.hide-menu) .media-frame-title .dashicons{display:inline-block;line-height:50px}.media-frame:not(.hide-menu) .media-frame-title h1{color:#0073aa;line-height:3;font-size:18px;float:right;cursor:pointer}.media-sidebar{width:230px}.attachments-browser .attachments,.attachments-browser .media-toolbar,.attachments-browser .uploader-inline{left:262px}.attachment-details .setting,.media-sidebar .setting{margin:6px 0}.attachment-details .setting input,.attachment-details .setting span,.attachment-details .setting textarea,.compat-item label span,.media-sidebar .setting input,.media-sidebar .setting span,.media-sidebar .setting textarea{float:none}.attachment-details .setting span,.compat-item label span,.media-sidebar .setting span{text-align:inherit;min-height:16px;margin:0;padding:8px 2px 0}.attachment-details .setting .value,.media-sidebar .setting .value{float:none;width:auto}.attachment-details .setting input[type=tel],.attachment-details .setting input[type=text],.attachment-details .setting input[type=password],.attachment-details .setting input[type=number],.attachment-details .setting input[type=search],.attachment-details .setting input[type=email],.attachment-details .setting input[type=url],.attachment-details .setting select,.attachment-details .setting textarea,.media-sidebar .setting input[type=tel],.media-sidebar .setting input[type=text],.media-sidebar .setting input[type=password],.media-sidebar .setting input[type=number],.media-sidebar .setting input[type=search],.media-sidebar .setting input[type=email],.media-sidebar .setting input[type=url],.media-sidebar .setting select,.media-sidebar .setting textarea{float:none;width:98%;max-width:none;height:auto}.attachment-details .setting select.columns,.media-sidebar .setting select.columns{width:auto}.media-frame .search,.media-frame input,.media-frame textarea{padding:3px 6px}.image-details .column-image{width:30%;right:70%}.image-details .column-settings{width:70%}.image-details .media-modal{right:30px;left:30px}.image-details .embed-media-settings .setting{margin:20px}.image-details .embed-media-settings .setting span{float:none;text-align:right;width:100%;margin-bottom:4px}.image-details .embed-media-settings .setting input.link-to-custom,.image-details .embed-media-settings .setting input[type=text],.image-details .embed-media-settings .setting textarea{width:100%;margin-right:0}.image-details .embed-media-settings .custom-size{margin-right:20px}.collection-settings .setting input[type=checkbox]{margin-top:0}.media-selection{min-width:120px}.media-selection:after{background:0 0}.media-selection .attachments{display:none}.media-modal .attachments-browser .media-toolbar .search{max-width:100%;height:auto;float:left}.media-modal .attachments-browser .media-toolbar .attachment-filters{height:auto}.media-modal .attachments-browser .media-toolbar .spinner{margin:14px 2px 0}.media-frame input[type=text],.media-frame input[type=password],.media-frame input[type=number],.media-frame input[type=search],.media-frame input[type=email],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-size:16px}}@media only screen and (max-width:640px),screen and (max-height:400px){.image-details .media-modal,.media-modal{position:fixed;top:0;right:0;left:0;bottom:0}.media-modal-backdrop{position:fixed}.media-sidebar{z-index:1900;max-width:70%;bottom:120%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding-bottom:0}.media-sidebar.visible{bottom:0}.attachments-browser .attachments,.attachments-browser .media-toolbar,.attachments-browser .uploader-inline{left:0}.image-details .media-frame-title{display:block;top:0;font-size:14px}.image-details .column-image,.image-details .column-settings{width:100%;position:relative;right:0}.image-details .column-settings{padding:4px 0}.media-frame-content .media-toolbar .instructions{display:none}}@media screen and (max-height:400px){.media-menu{padding:0}.media-frame-router{top:44px}.media-frame-content{top:78px}.attachments-browser .attachments{top:40px}.embed-link-settings{overflow:visible}}@media only screen and (max-width:480px){.media-modal-close{top:-5px}.media-modal .media-frame-title{height:40px}.wp-core-ui.wp-customizer .media-button{margin-top:13px}.media-frame:not(.hide-menu) .media-frame-title h1,.media-modal .media-frame-title h1{font-size:18px;line-height:40px}.media-frame:not(.hide-menu) .media-frame-title .dashicons{line-height:40px}.media-frame-router,.media-frame:not(.hide-menu) .media-menu{top:40px}.media-frame-content{top:74px}.media-frame.hide-router .media-frame-content{top:40px}}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.wp-core-ui .media-modal-icon{background-image:url(../images/uploader-icons-2x.png);-webkit-background-size:134px 15px;background-size:134px 15px}.media-frame .spinner{background-image:url(../images/spinner-2x.gif)}}.media-frame-content[data-columns="1"] .attachment{width:100%}.media-frame-content[data-columns="2"] .attachment{width:50%}.media-frame-content[data-columns="3"] .attachment{width:33.33%}.media-frame-content[data-columns="4"] .attachment{width:25%}.media-frame-content[data-columns="5"] .attachment{width:20%}.media-frame-content[data-columns="6"] .attachment{width:16.66%}.media-frame-content[data-columns="7"] .attachment{width:14.28%}.media-frame-content[data-columns="8"] .attachment{width:12.5%}.media-frame-content[data-columns="9"] .attachment{width:11.11%}.media-frame-content[data-columns="10"] .attachment{width:10%}.media-frame-content[data-columns="11"] .attachment{width:9.09%}.media-frame-content[data-columns="12"] .attachment{width:8.33%}
\ No newline at end of file
+ */.ui-draggable-handle,.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.media-modal{position:fixed;top:30px;right:30px;left:30px;bottom:30px;z-index:160000}.wp-customizer .media-modal{z-index:560000}.media-modal-backdrop{position:fixed;top:0;right:0;left:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.wp-customizer .media-modal-backdrop{z-index:559900}.media-modal-close{position:absolute;top:0;left:0;width:50px;height:50px;padding:0;z-index:1000;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.media-modal-close:active{-webkit-box-shadow:none;box-shadow:none;outline:0}.media-modal-close span.media-modal-icon{background-image:none}.media-modal-close .media-modal-icon:before{content:"\f158";font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666}.media-modal-close:hover .media-modal-icon:before{color:#00a0d2}.media-modal-content{position:absolute;top:0;right:0;left:0;bottom:0;overflow:auto;min-height:300px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background:#fcfcfc;-webkit-font-smoothing:subpixel-antialiased}.media-modal-content .media-frame select.attachment-filters{margin-top:11px;margin-left:2%;width:42%;width:-webkit-calc(48% - 12px);width:calc(48% - 12px)}.media-modal-content .attachments-browser .media-toolbar-secondary{width:66%}.media-modal-content .media-toolbar-primary.search-form{width:33%}.media-modal-content .media-toolbar-primary .media-button{float:left}.media-modal-content .attachments-browser .search{width:100%}.wp-core-ui .media-modal-icon{background-image:url(../images/uploader-icons.png);background-repeat:no-repeat}.media-menu,.media-sidebar{top:0;bottom:0;background:#f3f3f3;left:0}.media-toolbar{position:absolute;top:0;right:0;left:0;z-index:100;height:60px;padding:0 16px;border:0 solid #ddd;overflow:hidden}.media-toolbar-primary{float:left;height:100%}.media-toolbar-secondary{float:right;height:100%}.media-toolbar-primary>.media-button,.media-toolbar-primary>.media-button-group{margin-right:10px;float:right;margin-top:15px}.media-toolbar-secondary>.media-button,.media-toolbar-secondary>.media-button-group{margin-left:10px;margin-top:15px}.media-sidebar{position:absolute;width:267px;padding:0 16px 24px;z-index:75;border-right:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch}.hide-toolbar .media-sidebar{bottom:0}.media-sidebar .sidebar-title{font-size:20px;margin:0;padding:12px 10px 10px;line-height:28px}.media-sidebar .sidebar-content{padding:0 10px;margin-bottom:130px}.media-sidebar .search{display:block;width:100%}.image-details h2,.image-details h3,.media-sidebar h2,.media-sidebar h3{position:relative;font-weight:600;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}.attachment-details .setting,.media-sidebar .setting{display:block;float:right;width:100%;margin:1px 0}.attachment-details .setting label,.media-sidebar .setting label{display:block}.attachment-details .setting .link-to-custom,.media-sidebar .setting .link-to-custom{margin:3px 2px 0}.attachment-details .setting span,.media-sidebar .setting span{min-width:30%;margin-left:4%;font-size:12px;text-align:left;word-wrap:break-word}.media-sidebar .setting .name{max-width:80px}.attachment-details .setting select,.media-sidebar .setting select{max-width:65%}.attachment-details .field input[type=radio],.attachment-details .field input[type=checkbox],.attachment-details .setting input[type=radio],.attachment-details .setting input[type=checkbox],.media-sidebar .field input[type=radio],.media-sidebar .field input[type=checkbox],.media-sidebar .setting input[type=radio],.media-sidebar .setting input[type=checkbox]{float:none;margin:8px 3px 0;padding:0}.attachment-details .setting span,.compat-item label span,.media-sidebar .setting span{float:right;min-height:22px;padding-top:8px;line-height:16px;font-weight:400;color:#666}.media-menu>a,.media-router>a{line-height:18px;font-size:14px;text-decoration:none}.compat-item label span{text-align:left}.attachment-details .setting .value,.attachment-details .setting input[type=tel],.attachment-details .setting input[type=text],.attachment-details .setting input[type=password],.attachment-details .setting input[type=number],.attachment-details .setting input[type=search],.attachment-details .setting input[type=email],.attachment-details .setting input[type=url],.attachment-details .setting textarea,.media-sidebar .setting .value,.media-sidebar .setting input[type=tel],.media-sidebar .setting input[type=text],.media-sidebar .setting input[type=password],.media-sidebar .setting input[type=number],.media-sidebar .setting input[type=search],.media-sidebar .setting input[type=email],.media-sidebar .setting input[type=url],.media-sidebar .setting textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px;width:65%;float:left}.attachment-details .setting .value,.media-sidebar .setting .value{margin:0 1px;text-align:right}.attachment-details .setting textarea,.compat-item .field textarea,.media-sidebar .setting textarea{height:62px;resize:vertical}.attachment-details select,.media-sidebar select{margin-top:3px}.compat-item{float:right;width:100%;overflow:hidden}.compat-item table{width:100%;table-layout:fixed;border-spacing:0;border:0}.compat-item tr{padding:2px 0;display:block;overflow:hidden}.compat-item .field,.compat-item .label{display:block;margin:0;padding:0}.compat-item .label{min-width:30%;margin-left:4%;float:right;text-align:left}.compat-item .label span{display:block;width:100%}.compat-item .field{float:left;width:65%;margin:1px}.compat-item .field input[type=tel],.compat-item .field input[type=text],.compat-item .field input[type=password],.compat-item .field input[type=number],.compat-item .field input[type=search],.compat-item .field input[type=email],.compat-item .field input[type=url],.compat-item .field textarea{width:100%;margin:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.sidebar-for-errors .attachment-details,.sidebar-for-errors .compat-item,.sidebar-for-errors .media-sidebar .media-progress-bar,.sidebar-for-errors .upload-details{display:none!important}.media-menu{position:absolute;right:0;margin:0;padding:10px 0;border-left-width:1px;border-left-style:solid;border-left-color:#ccc;user-select:none}.media-menu>a{display:block;position:relative;padding:8px 20px;margin:0;color:#0073aa}.media-frame-title .dashicons,.media-frame.hide-router .media-frame-router{display:none}.media-menu>a:hover{color:#0073aa;background:rgba(0,0,0,.04)}.media-menu>a:active{outline:0}.media-menu .active,.media-menu .active:hover{color:#23282d;font-weight:600}.media-menu .separator{height:0;margin:12px 20px;padding:0;border-top:1px solid #ddd}.media-router{position:relative;padding:0 6px;margin:0;clear:both;user-select:none}.media-router a{-webkit-transition:none;transition:none}.media-router>a{position:relative;float:right;padding:8px 10px 9px;margin:0;height:18px}.media-frame,.media-frame-menu{position:absolute;right:0;bottom:0;top:0}.media-router>a:last-child{border-left:0}.media-router>a:active{outline:0}.media-router .active,.media-router .active:hover{color:#32373c}.media-router .active,.media-router>a.active:last-child{margin:-1px -1px 0;background:#fff;border:1px solid #ddd;border-bottom:none}.media-router .active:after{display:none}.media-frame{overflow:hidden;left:0}.media-frame-menu{width:200px;z-index:150}.media-frame-router,.media-frame-title{z-index:200;right:200px;position:absolute;left:0}.media-frame-title{top:0;height:50px}.media-frame-router{top:50px;height:36px}.media-frame-content{position:absolute;top:84px;right:200px;left:0;bottom:61px;height:auto;width:auto;margin:0;overflow:auto;background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.media-frame-toolbar{position:absolute;right:200px;left:0;bottom:0;height:60px;z-index:100}.media-frame.hide-menu .media-frame-content,.media-frame.hide-menu .media-frame-router,.media-frame.hide-menu .media-frame-title,.media-frame.hide-menu .media-frame-toolbar{right:0}.media-frame.hide-menu .media-frame-menu{right:-200px}.media-frame.hide-toolbar .media-frame-content{bottom:0}.media-frame.hide-toolbar .media-frame-toolbar{bottom:-61px}.media-frame.hide-router .media-frame-content{top:50px}.media-frame.hide-router .media-frame-title{border-bottom:1px solid #ddd;-webkit-box-shadow:0 4px 4px -4px rgba(0,0,0,.1);box-shadow:0 4px 4px -4px rgba(0,0,0,.1)}.media-frame-title h1{padding:0 16px;font-size:22px;line-height:50px;margin:0}.media-frame-title .suggested-dimensions{font-size:14px;float:left;margin-left:20px}.media-frame-content .crop-content{height:100%}.wp-customizer:not(.mobile) .media-frame-content .crop-content.site-icon{margin-left:300px}.media-frame-content .crop-content .crop-image{display:block;margin:auto;max-width:100%;max-height:100%}.media-frame-content .crop-content .upload-errors{position:absolute;width:300px;top:50%;right:50%;margin-right:-150px;margin-left:-150px;z-index:600000}.media-frame .media-iframe{overflow:hidden}.media-frame .media-iframe,.media-frame .media-iframe iframe{height:100%;width:100%;border:0}.media-frame select.attachment-filters{margin-top:11px;margin-left:2%;max-width:42%;max-width:-webkit-calc(48% - 12px);max-width:calc(48% - 12px)}.media-toolbar-primary .search,.wp-core-ui .attachment .portrait img{max-width:100%}.media-frame select.attachment-filters:last-of-type{margin-left:0}.media-frame .search{margin-top:11px;padding:4px;font-size:13px;color:#444;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;-webkit-appearance:none}.wp-core-ui .attachments{margin:0;-webkit-overflow-scrolling:touch}.wp-core-ui .attachment{position:relative;float:right;padding:8px;margin:0;color:#444;cursor:pointer;list-style:none;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:25%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-core-ui .attachment.details:focus,.wp-core-ui .attachment:focus,.wp-core-ui .selected.attachment:focus{-webkit-box-shadow:inset 0 0 2px 3px #fff,inset 0 0 0 7px #5b9dd9;box-shadow:inset 0 0 2px 3px #fff,inset 0 0 0 7px #5b9dd9;outline:0}.wp-core-ui .selected.attachment{-webkit-box-shadow:inset 0 0 0 5px #fff,inset 0 0 0 7px #ccc;box-shadow:inset 0 0 0 5px #fff,inset 0 0 0 7px #ccc}.wp-core-ui .attachment.details{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #0073aa;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #0073aa}.wp-core-ui .attachment-preview{position:relative;-webkit-box-shadow:inset 0 0 15px rgba(0,0,0,.1),inset 0 0 0 1px rgba(0,0,0,.05);box-shadow:inset 0 0 15px rgba(0,0,0,.1),inset 0 0 0 1px rgba(0,0,0,.05);background:#eee;cursor:pointer}.wp-core-ui .attachment-preview:before{content:"";display:block;padding-top:100%}.wp-core-ui .attachment .icon{margin:0 auto;overflow:hidden}.wp-core-ui .attachment .thumbnail{overflow:hidden;position:absolute;top:0;left:0;bottom:0;right:0;opacity:1;-webkit-transition:opacity .1s;transition:opacity .1s}.wp-core-ui .attachment .landscape img{max-height:100%}.wp-core-ui .attachment .thumbnail:after{content:"";display:block;position:absolute;top:0;right:0;left:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);overflow:hidden}.wp-core-ui .attachment .thumbnail img{top:0;right:0}.wp-core-ui .attachment .thumbnail .centered{position:absolute;top:0;right:0;width:100%;height:100%;-webkit-transform:translate(-50%,50%);-ms-transform:translate(-50%,50%);transform:translate(-50%,50%)}.wp-core-ui .attachment .thumbnail .centered img{-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%)}.wp-core-ui .attachments-browser .attachment .thumbnail .centered img.icon{-webkit-transform:translate(50%,-70%);-ms-transform:translate(50%,-70%);transform:translate(50%,-70%)}.ie8 .wp-core-ui .attachment img.icon{top:20%;position:relative}.wp-core-ui .attachment .filename{position:absolute;right:0;left:0;bottom:0;overflow:hidden;max-height:100%;word-wrap:break-word;text-align:center;font-weight:600;background:rgba(255,255,255,.8);-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}.wp-core-ui .attachment .filename div{padding:5px 10px}.wp-core-ui .attachment .thumbnail img{position:absolute}.wp-core-ui .attachment-close{display:block;position:absolute;top:5px;left:5px;height:22px;width:22px;padding:0;background-color:#fff;background-position:-96px 4px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.3);box-shadow:0 0 0 1px rgba(0,0,0,.3)}.wp-core-ui .attachment-close:focus,.wp-core-ui .attachment-close:hover{background-position:-36px 4px}.wp-core-ui .attachment .check{display:none;height:24px;width:24px;padding:0;position:absolute;z-index:10;top:0;left:0;outline:0;background:#eee;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px rgba(0,0,0,.15);box-shadow:0 0 0 1px #fff,0 0 0 2px rgba(0,0,0,.15)}.wp-core-ui .attachment .check .media-modal-icon{display:block;background-position:-1px 0;height:15px;width:15px;margin:5px}.wp-core-ui .attachment .check:hover .media-modal-icon{background-position:-40px 0}.wp-core-ui .attachment.selected .check{display:block}.wp-core-ui .attachment.details .check,.wp-core-ui .attachment.selected .check:focus,.wp-core-ui .media-frame.mode-grid .attachment.selected .check{background-color:#0073aa;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #0073aa;box-shadow:0 0 0 1px #fff,0 0 0 2px #0073aa}.wp-core-ui .attachment.details .check .media-modal-icon,.wp-core-ui .media-frame.mode-grid .attachment.selected .check .media-modal-icon{background-position:-21px 0}.wp-core-ui .attachment.details .check:hover .media-modal-icon,.wp-core-ui .attachment.selected .check:focus .media-modal-icon,.wp-core-ui .media-frame.mode-grid .attachment.selected .check:hover .media-modal-icon{background-position:-60px 0}.wp-core-ui .media-frame .attachment .describe{position:relative;display:block;width:100%;margin:0;padding:8px;font-size:12px;-webkit-border-radius:0;border-radius:0}.media-frame .attachments-browser{position:relative;width:100%;height:100%;overflow:hidden}.attachments-browser .media-toolbar{left:300px;height:50px}.attachments-browser.hide-sidebar .media-toolbar{left:0}.attachments-browser .media-toolbar-primary>.media-button,.attachments-browser .media-toolbar-primary>.media-button-group,.attachments-browser .media-toolbar-secondary>.media-button,.attachments-browser .media-toolbar-secondary>.media-button-group{margin:11px 0}.attachments-browser .attachments{padding:2px 8px 8px}.attachments-browser .attachments,.attachments-browser .uploader-inline{position:absolute;top:50px;right:0;left:300px;bottom:0;overflow:auto;outline:0}.attachments-browser .uploader-inline.hidden{display:none}.attachments-browser .media-toolbar-primary{max-width:33%}.attachments-browser .media-toolbar-secondary{max-width:66%}.uploader-inline .close{background-color:transparent;border:0;cursor:pointer;height:48px;position:absolute;left:0;text-align:center;top:0;width:50px;z-index:1}.uploader-inline .close:before{font:400 30px/50px dashicons!important;color:#72777c;display:inline-block;content:"\f335";font-weight:300}.attachments-browser.hide-sidebar .attachments,.attachments-browser.hide-sidebar .uploader-inline{left:0;margin-left:0}.attachments-browser .instructions{display:inline-block;margin-top:16px;line-height:18px;font-size:13px;color:#666;margin-left:.5em}.attachments-browser .no-media{padding:2em 2em 0 0}.media-progress-bar{position:relative;height:10px;width:70%;margin:10px auto;-webkit-border-radius:10px;border-radius:10px;background:#ddd;background:rgba(0,0,0,.1)}.media-progress-bar div{height:10px;min-width:20px;width:0;background:#0073aa;-webkit-border-radius:10px;border-radius:10px;-webkit-transition:width .3s;transition:width .3s}.media-uploader-status .media-progress-bar{display:none;width:100%}.uploading.media-uploader-status .media-progress-bar{display:block}.attachment-preview .media-progress-bar{position:absolute;top:50%;right:15%;width:70%;margin:-5px 0 0}.media-uploader-status{position:relative;margin:0 auto;padding-bottom:10px;max-width:400px}.uploader-inline .media-uploader-status h2,.uploader-inline .media-uploader-status h3{display:none}.media-uploader-status .upload-details{display:none;font-size:12px;color:#666}.uploading.media-uploader-status .upload-details{display:block}.media-uploader-status .upload-detail-separator{padding:0 4px}.media-uploader-status .upload-count{color:#444}.media-uploader-status .upload-dismiss-errors,.media-uploader-status .upload-errors{display:none}.errors.media-uploader-status .upload-dismiss-errors,.errors.media-uploader-status .upload-errors{display:block}.media-uploader-status .upload-dismiss-errors{text-decoration:none}.media-sidebar .media-uploader-status .upload-dismiss-errors{position:absolute;top:0;left:0}.upload-errors .upload-error{padding:12px;margin-bottom:12px;background:#fff;border-right:4px solid #dc3232;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.uploader-inline .upload-errors .upload-error{background-color:#fbeaea;-webkit-box-shadow:none;box-shadow:none}.upload-errors .upload-error-filename{font-weight:600}.upload-errors .upload-error-message{display:block;padding-top:8px;word-wrap:break-word}.uploader-window{position:fixed;top:0;right:0;left:0;bottom:0;background:rgba(0,86,132,.9);z-index:250000;display:none;text-align:center;opacity:0;-webkit-transition:opacity 250ms;transition:opacity 250ms}.uploader-window-content{position:absolute;top:10px;right:10px;left:10px;bottom:10px;border:1px dashed #fff}.uploader-window h1,.uploader-window h3{margin:-.5em 0 0;position:absolute;top:50%;right:0;left:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);font-size:40px;color:#fff;padding:0}.uploader-window .media-progress-bar{margin-top:20px;max-width:300px;background:0 0;border-color:#fff;display:none}.uploader-window .media-progress-bar div{background:#fff}.uploading .uploader-window .media-progress-bar{display:block}.media-frame .uploader-inline{margin-bottom:20px;padding:0;text-align:center}.uploader-inline-content{position:absolute;top:30%;right:0;left:0}.uploader-inline-content .upload-ui{margin:2em 0}.uploader-inline-content .post-upload-ui{margin-bottom:2em}.uploader-inline .has-upload-message .upload-ui{margin:0 0 4em}.uploader-inline h2,.uploader-inline h3{font-size:20px;line-height:28px;font-weight:400;margin:0}.uploader-inline .has-upload-message .upload-instructions{font-size:14px;color:#444;font-weight:400}.uploader-inline .drop-instructions{display:none}.supports-drag-drop .uploader-inline .drop-instructions{display:block}.uploader-inline p{font-size:12px;margin:.5em 0}.uploader-inline .media-progress-bar{display:none}.uploading.uploader-inline .media-progress-bar{display:block}.uploader-inline .browser{display:inline-block!important}.media-selection{position:absolute;top:0;right:0;left:350px;height:60px;padding:0 16px 0 0;overflow:hidden;white-space:nowrap}.media-selection .selection-info{display:inline-block;font-size:12px;height:60px;margin-left:10px;vertical-align:top}.media-selection.editing,.media-selection.empty,.media-selection.one .edit-selection{display:none}.media-selection .count{display:block;padding-top:12px;font-size:14px;line-height:20px;font-weight:600}.media-selection .attachments,.media-selection .selection-view{display:inline-block;vertical-align:top}.media-selection .button-link{float:right;padding:1px 8px;margin:1px -8px 1px 8px;line-height:16px;border-left:1px solid #ddd;color:#0073aa}.media-selection .button-link:focus,.media-selection .button-link:hover{color:#00a0d2}.media-selection .button-link:last-child{border-left:0;margin-left:0}.selection-info .clear-selection{color:#bc0b0b}.selection-info .clear-selection:focus,.selection-info .clear-selection:hover{color:red}.media-selection .attachments{height:48px;margin:6px;padding:0;overflow:hidden}.media-selection .attachment{width:40px;padding:0;margin:4px}.media-selection .attachment .thumbnail{top:0;left:0;bottom:0;right:0}.media-selection .attachment .icon{width:50%}.media-selection .attachment-preview{-webkit-box-shadow:none;box-shadow:none;background:0 0}.wp-core-ui .media-selection .attachment.details:focus,.wp-core-ui .media-selection .attachment:focus,.wp-core-ui .media-selection .selected.attachment:focus{-webkit-box-shadow:0 0 0 1px #fff,0 0 2px 3px #5b9dd9;box-shadow:0 0 0 1px #fff,0 0 2px 3px #5b9dd9}.wp-core-ui .media-selection .selected.attachment{-webkit-box-shadow:none;box-shadow:none}.wp-core-ui .media-selection .attachment.details{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #0073aa;box-shadow:0 0 0 1px #fff,0 0 0 3px #0073aa}.media-selection:after{content:"";display:block;position:absolute;top:0;left:0;bottom:0;width:25px;background-image:-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,1)),to(rgba(255,255,255,0)));background-image:-webkit-linear-gradient(left,rgba(255,255,255,1),rgba(255,255,255,0));background-image:linear-gradient(to right,rgba(255,255,255,1),rgba(255,255,255,0))}.media-selection .attachment .filename{display:none}.media-frame .spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;float:left;display:inline-block;visibility:hidden;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:0;vertical-align:middle}.attachment-details.save-waiting .settings-save-status .spinner,.media-frame .embed-loading .embed-url .spinner,.media-frame .spinner.is-active{visibility:visible}.media-toolbar .spinner{margin-top:14px}.attachment-details{position:relative;overflow:auto}.attachment-details .settings-save-status{float:left;text-transform:none;z-index:10}.attachment-details .settings-save-status .spinner{margin-right:5px}.attachment-details .settings-save-status .saved{float:left;display:none}.attachment-details.save-complete .settings-save-status .saved{display:block}.attachment-info{overflow:hidden;min-height:60px;margin-bottom:16px;line-height:18px;color:#666;border-bottom:1px solid #ddd;padding-bottom:11px}.attachment-info .filename{font-weight:600;color:#444;word-wrap:break-word}.attachment-info .thumbnail{position:relative;float:right;max-width:120px;max-height:120px;margin-top:5px;margin-left:10px;margin-bottom:5px}.uploading .attachment-info .thumbnail{width:120px;height:80px;-webkit-box-shadow:inset 0 0 15px rgba(0,0,0,.1);box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.uploading .attachment-info .media-progress-bar{margin-top:35px}.attachment-info .thumbnail-image:after{content:"";display:block;position:absolute;top:0;right:0;left:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);overflow:hidden}.attachment-info .thumbnail img{display:block;max-width:120px;max-height:120px;margin:0 auto}.attachment-info .details{float:right;font-size:12px;max-width:100%}.attachment-info .delete-attachment,.attachment-info .edit-attachment,.attachment-info .trash-attachment,.attachment-info .untrash-attachment{display:block;text-decoration:none;white-space:nowrap}.attachment-details.needs-refresh .attachment-info .edit-attachment{display:none}.attachment-info .edit-attachment{display:block}.media-modal .delete-attachment,.media-modal .trash-attachment,.media-modal .untrash-attachment{display:inline;padding:0;color:#bc0b0b}.media-modal .delete-attachment:focus,.media-modal .delete-attachment:hover,.media-modal .trash-attachment:focus,.media-modal .trash-attachment:hover,.media-modal .untrash-attachment:focus,.media-modal .untrash-attachment:hover{color:red}.attachment-display-settings{width:100%;float:right;overflow:hidden}.attachment-display-settings h4{margin:1.4em 0 .4em}.collection-settings{overflow:hidden}.collection-settings .setting input[type=checkbox]{float:right;margin-left:8px}.collection-settings .setting span{min-width:inherit}.media-modal .imgedit-wrap{position:static}.media-modal .imgedit-wrap .imgedit-panel-content{padding:16px;position:absolute;top:0;left:282px;bottom:0;right:0;overflow:auto}.media-modal .imgedit-wrap .imgedit-settings{background:#f3f3f3;border-right:1px solid #ddd;padding:20px 16px 16px;position:absolute;top:0;left:0;bottom:0;width:250px;overflow:auto}.media-modal .imgedit-group{background:0 0;border:none;border-bottom:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;margin:0 0 16px;padding:0 0 16px;position:relative}.media-modal .imgedit-group:last-of-type{border:none;margin:0;padding:0}.media-modal .imgedit-group-top{margin:0}.media-modal .imgedit-group-top h2,.media-modal .imgedit-group-top h2 .button-link,.media-modal .imgedit-group-top h3{display:inline-block;text-transform:uppercase;font-size:12px;color:#666;margin:3px 0 0}.embed-url,.imgedit-thumbnail-preview-caption{display:block}.media-modal .imgedit-group-top h2 .button-link,.media-modal .imgedit-group-top h2 a,.media-modal .imgedit-group-top h3 a{text-decoration:none;color:#666}.wp-core-ui.media-modal .image-editor .imgedit-help-toggle,.wp-core-ui.media-modal .image-editor .imgedit-help-toggle:active,.wp-core-ui.media-modal .image-editor .imgedit-help-toggle:hover{border:1px solid transparent;margin:0;padding:0;background:0 0;color:#0074a2;font-size:20px;line-height:1;cursor:pointer;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-box-shadow:none;box-shadow:none}.wp-core-ui.media-modal .image-editor .imgedit-help-toggle:focus{color:#0074a2;border-color:#5b9dd9;outline:0;-webkit-box-shadow:0 0 3px rgba(0,115,170,.8);box-shadow:0 0 3px rgba(0,115,170,.8)}.wp-core-ui.media-modal .imgedit-group-top .dashicons-arrow-down.imgedit-help-toggle{margin-top:-3px}.wp-core-ui.media-modal .image-editor h3 .imgedit-help-toggle{margin-top:-2px}.media-modal .imgedit-help-toggled span.dashicons:before{content:"\f142"}.media-modal .imgedit-thumbnail-preview{margin:10px 0 0 8px}.media-modal .imgedit-wrap div.updated{margin:0 0 16px}.embed-url{position:relative;padding:16px;margin:0;z-index:250;background:#fff;font-size:18px}.media-frame .embed-url input{font-size:18px;padding:12px 14px;width:100%;min-width:200px;-webkit-box-shadow:inset -2px 2px 4px -2px rgba(0,0,0,.1);box-shadow:inset -2px 2px 4px -2px rgba(0,0,0,.1)}.media-frame .embed-url .spinner{position:absolute;top:32px;left:26px}.embed-link-settings,.embed-media-settings{position:absolute;top:70px;right:0;left:0;bottom:0;padding:16px 16px 32px;overflow:auto}.media-embed .embed-link-settings{overflow:visible}.embed-preview embed,.embed-preview iframe,.embed-preview img,.mejs-container video{max-width:100%;vertical-align:middle}.embed-preview a{display:inline-block}.embed-preview img{display:block;height:auto}.mejs-container:focus{outline:#5b9dd9 solid 1px;-webkit-box-shadow:0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 2px 1px rgba(30,140,190,.8)}.image-details .media-modal{right:140px;left:140px}.image-details .media-frame-content,.image-details .media-frame-router,.image-details .media-frame-title{right:0}.image-details .embed-media-settings{top:0;overflow:visible;padding:0}.image-details .embed-media-settings,.image-details .embed-media-settings div{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.image-details .column-settings{background:#f3f3f3;border-left:1px solid #ddd;min-height:100%;width:55%;position:absolute;top:0;right:0}.image-details .column-settings h2,.image-details .column-settings h3{margin:20px;padding-top:20px;border-top:1px solid #ddd;color:#23282d}.image-details .column-image{width:45%;position:absolute;right:55%;top:0}.image-details .image{margin:20px}.image-details .image img{max-width:100%;max-height:500px}.image-details .advanced-toggle{padding:0;color:#666;text-transform:uppercase}.image-details .advanced-toggle:after{font:400 20px/1 dashicons;speak:none;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f140";display:inline-block;margin-top:-2px}.image-details .advanced-visible .advanced-toggle:after{content:"\f142"}.image-details .embed-media-settings .size{margin-bottom:4px}.image-details .custom-size span{display:block}.image-details .custom-size label{display:block;float:right}.image-details .custom-size span small{color:#555d66;font-size:inherit}.image-details .custom-size input{width:5em}.image-details .custom-size .sep{float:right;margin:26px 6px 0}.image-details .custom-size:after{content:"";display:table;clear:both}.media-embed .thumbnail{max-width:100%;max-height:200px;position:relative;float:right}.media-embed .thumbnail img{max-height:200px;display:block}.media-embed .thumbnail:after{content:"";display:block;position:absolute;top:0;right:0;left:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);overflow:hidden}.media-embed .setting{width:100%;margin:10px 0;float:right;display:block;clear:both}.image-details .embed-media-settings .setting{float:none;width:auto}.image-details .actions{margin:10px 0}.image-details .hidden{display:none}.media-embed .setting input[type=text],.media-embed .setting textarea{display:block;width:100%;max-width:400px;margin:1px 0}.image-details .embed-media-settings .setting input[type=text],.image-details .embed-media-settings .setting textarea{max-width:inherit;width:70%}.image-details .embed-media-settings .custom-size,.image-details .embed-media-settings .link-target,.image-details .embed-media-settings .setting input.link-to-custom{margin-right:27%;width:70%}.image-details .embed-media-settings .link-target{margin-top:24px}.media-embed .setting input.hidden,.media-embed .setting textarea.hidden{display:none}.media-embed .setting span{display:block;width:200px;font-size:13px;line-height:24px;color:#666}.image-details .embed-media-settings .setting span{float:right;width:25%;text-align:left;margin:8px 1% 0;line-height:1.1}.media-embed .setting .button-group{margin:2px 0}.media-embed-sidebar{position:absolute;top:0;right:440px}.advanced-section,.link-settings{margin-top:10px}.wp-editor-wrap .uploader-editor{background:rgba(150,150,150,.9);position:absolute;top:0;right:0;width:100%;height:100%;z-index:99998;display:none;text-align:center}.wp-editor-wrap .uploader-editor-content{border:1px dashed #fff;position:absolute;top:10px;right:10px;left:10px;bottom:10px}.wp-editor-wrap .uploader-editor .uploader-editor-title{position:absolute;top:50%;right:0;left:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);font-size:3em;line-height:1.3;font-weight:600;color:#fff;padding:0;margin:0;display:none}.wp-editor-wrap .uploader-editor.droppable{background:rgba(0,86,132,.9)}.wp-editor-wrap .uploader-editor.droppable .uploader-editor-title{display:block}.ie7 .media-frame .attachments-browser{position:static}.ie7 .media-frame .embed-url input{margin-top:4px;width:90%}.ie7 .compat-item{width:99%}.ie7 .attachment-display-settings{width:auto}.ie7 .attachment-preview,.ie7 .attachment-preview .thumbnail{width:120px;height:120px}.ie7 .media-frame .attachment .describe{width:102px}.ie7 .media-sidebar .setting select{max-width:55%}.ie7 .media-sidebar .setting input[type=tel],.ie7 .media-sidebar .setting input[type=text],.ie7 .media-sidebar .setting input[type=password],.ie7 .media-sidebar .setting input[type=number],.ie7 .media-sidebar .setting input[type=search],.ie7 .media-sidebar .setting input[type=email],.ie7 .media-sidebar .setting input[type=url],.ie7 .media-sidebar .setting textarea{width:55%}.ie7 .media-sidebar .setting .link-to-custom{float:right}.rtl .media-frame,.rtl .media-frame .search,.rtl .media-frame input[type=tel],.rtl .media-frame input[type=text],.rtl .media-frame input[type=password],.rtl .media-frame input[type=number],.rtl .media-frame input[type=search],.rtl .media-frame input[type=email],.rtl .media-frame input[type=url],.rtl .media-frame select,.rtl .media-frame textarea,.rtl .media-modal{font-family:Tahoma,sans-serif}:lang(he-il) .rtl .media-frame,:lang(he-il) .rtl .media-frame .search,:lang(he-il) .rtl .media-frame input[type=text],:lang(he-il) .rtl .media-frame input[type=password],:lang(he-il) .rtl .media-frame input[type=number],:lang(he-il) .rtl .media-frame input[type=search],:lang(he-il) .rtl .media-frame input[type=email],:lang(he-il) .rtl .media-frame input[type=url],:lang(he-il) .rtl .media-frame select,:lang(he-il) .rtl .media-frame textarea,:lang(he-il) .rtl .media-modal{font-family:Arial,sans-serif}@media only screen and (max-width:900px){.media-frame:not(.hide-menu) .media-frame-content,.media-frame:not(.hide-menu) .media-frame-router,.media-frame:not(.hide-menu) .media-frame-title,.media-frame:not(.hide-menu) .media-frame-toolbar{right:0}.media-frame:not(.hide-menu) .media-frame-menu{position:static;width:0}.media-frame:not(.hide-menu) .media-menu{width:auto;max-width:80%;overflow:auto;z-index:2000;top:50px;right:-300px;left:auto;bottom:auto;padding:5px 0;border:1px solid #ccc}.media-frame:not(.hide-menu) .media-menu.visible{right:0}.media-frame:not(.hide-menu) .media-menu>a{padding:12px 16px;font-size:16px}.media-frame:not(.hide-menu) .media-menu>a.active{display:none}.media-frame:not(.hide-menu) .media-menu .separator{margin:5px 10px}.media-frame:not(.hide-menu) .media-frame-title{right:0}.media-frame:not(.hide-menu) .media-frame-title .dashicons{display:inline-block;line-height:50px}.media-frame:not(.hide-menu) .media-frame-title h1{color:#0073aa;line-height:3;font-size:18px;float:right;cursor:pointer}.media-sidebar{width:230px}.attachments-browser .attachments,.attachments-browser .media-toolbar,.attachments-browser .uploader-inline{left:262px}.attachment-details .setting,.media-sidebar .setting{margin:6px 0}.attachment-details .setting input,.attachment-details .setting span,.attachment-details .setting textarea,.compat-item label span,.media-sidebar .setting input,.media-sidebar .setting span,.media-sidebar .setting textarea{float:none}.attachment-details .setting span,.compat-item label span,.media-sidebar .setting span{text-align:inherit;min-height:16px;margin:0;padding:8px 2px 0}.attachment-details .setting .value,.media-sidebar .setting .value{float:none;width:auto}.attachment-details .setting input[type=tel],.attachment-details .setting input[type=text],.attachment-details .setting input[type=password],.attachment-details .setting input[type=number],.attachment-details .setting input[type=search],.attachment-details .setting input[type=email],.attachment-details .setting input[type=url],.attachment-details .setting select,.attachment-details .setting textarea,.media-sidebar .setting input[type=tel],.media-sidebar .setting input[type=text],.media-sidebar .setting input[type=password],.media-sidebar .setting input[type=number],.media-sidebar .setting input[type=search],.media-sidebar .setting input[type=email],.media-sidebar .setting input[type=url],.media-sidebar .setting select,.media-sidebar .setting textarea{float:none;width:98%;max-width:none;height:auto}.attachment-details .setting select.columns,.media-sidebar .setting select.columns{width:auto}.media-frame .search,.media-frame input,.media-frame textarea{padding:3px 6px}.image-details .column-image{width:30%;right:70%}.image-details .column-settings{width:70%}.image-details .media-modal{right:30px;left:30px}.image-details .embed-media-settings .setting{margin:20px}.image-details .embed-media-settings .setting span{float:none;text-align:right;width:100%;margin-bottom:4px}.image-details .embed-media-settings .setting input.link-to-custom,.image-details .embed-media-settings .setting input[type=text],.image-details .embed-media-settings .setting textarea{width:100%;margin-right:0}.image-details .embed-media-settings .custom-size{margin-right:20px}.collection-settings .setting input[type=checkbox]{margin-top:0}.media-selection{min-width:120px}.media-selection:after{background:0 0}.media-selection .attachments{display:none}.media-modal .attachments-browser .media-toolbar .search{max-width:100%;height:auto;float:left}.media-modal .attachments-browser .media-toolbar .attachment-filters{height:auto}.media-modal .attachments-browser .media-toolbar .spinner{margin:14px 2px 0}.media-frame input[type=text],.media-frame input[type=password],.media-frame input[type=number],.media-frame input[type=search],.media-frame input[type=email],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-size:16px}}@media only screen and (max-width:640px),screen and (max-height:400px){.image-details .media-modal,.media-modal{position:fixed;top:0;right:0;left:0;bottom:0}.media-modal-backdrop{position:fixed}.media-sidebar{z-index:1900;max-width:70%;bottom:120%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding-bottom:0}.media-sidebar.visible{bottom:0}.attachments-browser .attachments,.attachments-browser .media-toolbar,.attachments-browser .uploader-inline{left:0}.image-details .media-frame-title{display:block;top:0;font-size:14px}.image-details .column-image,.image-details .column-settings{width:100%;position:relative;right:0}.image-details .column-settings{padding:4px 0}.media-frame-content .media-toolbar .instructions{display:none}}@media screen and (max-height:400px){.media-menu{padding:0}.media-frame-router{top:44px}.media-frame-content{top:78px}.attachments-browser .attachments{top:40px}.embed-link-settings{overflow:visible}}@media only screen and (max-width:480px){.media-modal-close{top:-5px}.media-modal .media-frame-title{height:40px}.wp-core-ui.wp-customizer .media-button{margin-top:13px}.media-frame:not(.hide-menu) .media-frame-title h1,.media-modal .media-frame-title h1{font-size:18px;line-height:40px}.media-frame:not(.hide-menu) .media-frame-title .dashicons{line-height:40px}.media-frame-router,.media-frame:not(.hide-menu) .media-menu{top:40px}.media-frame-content{top:74px}.media-frame.hide-router .media-frame-content{top:40px}}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.wp-core-ui .media-modal-icon{background-image:url(../images/uploader-icons-2x.png);-webkit-background-size:134px 15px;background-size:134px 15px}.media-frame .spinner{background-image:url(../images/spinner-2x.gif)}}.media-frame-content[data-columns="1"] .attachment{width:100%}.media-frame-content[data-columns="2"] .attachment{width:50%}.media-frame-content[data-columns="3"] .attachment{width:33.33%}.media-frame-content[data-columns="4"] .attachment{width:25%}.media-frame-content[data-columns="5"] .attachment{width:20%}.media-frame-content[data-columns="6"] .attachment{width:16.66%}.media-frame-content[data-columns="7"] .attachment{width:14.28%}.media-frame-content[data-columns="8"] .attachment{width:12.5%}.media-frame-content[data-columns="9"] .attachment{width:11.11%}.media-frame-content[data-columns="10"] .attachment{width:10%}.media-frame-content[data-columns="11"] .attachment{width:9.09%}.media-frame-content[data-columns="12"] .attachment{width:8.33%}
\ No newline at end of file
index 7f69a0edbda785d43803f56a68e69f0ff77fe100..b5d0953eb24fccbd928530bb69ab8913aafbc9b5 100644 (file)
@@ -17,7 +17,7 @@
 
 .media-modal,
 .media-frame {
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        font-size: 12px;
        -webkit-overflow-scrolling: touch;
 }
@@ -80,7 +80,7 @@
 .media-frame input[type="url"],
 .media-frame textarea,
 .media-frame select {
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        font-size: 12px;
        border-width: 1px;
        border-style: solid;
 .media-sidebar h2,
 .image-details h2 {
        position: relative;
-       font-weight: bold;
+       font-weight: 600;
        text-transform: uppercase;
        font-size: 12px;
        color: #666;
        min-height: 22px;
        padding-top: 8px;
        line-height: 16px;
-       font-weight: normal;
+       font-weight: 400;
        color: #666;
 }
 
 .media-menu .active,
 .media-menu .active:hover {
        color: #23282d;
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .media-menu .separator {
        padding: 4px;
        font-size: 13px;
        color: #444;
-       font-family: "Open Sans", sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        -webkit-appearance: none;
 }
 
        max-height: 100%;
        word-wrap: break-word;
        text-align: center;
-       font-weight: bold;
+       font-weight: 600;
        background: rgba( 255, 255, 255, 0.8 );
        -webkit-box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 );
        box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 );
 }
 
 .upload-errors .upload-error-filename {
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .upload-errors .upload-error-message {
 .uploader-inline .has-upload-message .upload-instructions {
        font-size: 14px;
        color: #444;
-       font-weight: normal;
+       font-weight: 400;
 }
 
 .uploader-inline .drop-instructions {
        padding-top: 12px;
        font-size: 14px;
        line-height: 20px;
-       font-weight: bold;
+       font-weight: 600;
 }
 
 .media-selection .button-link {
 }
 
 .attachment-info .filename {
-       font-weight: bold;
+       font-weight: 600;
        color: #444;
        word-wrap: break-word;
 }
        transform: translateY( -50% );
        font-size: 3em;
        line-height: 1.3;
-       font-weight: bold;
+       font-weight: 600;
        color: #fff;
        padding: 0;
        margin: 0;
index 3ebc7720ea1fa5d02eeebc00bf1635047d5ecd1f..a4b018fae3430c469df538bdecb19e4f364599a1 100644 (file)
@@ -1,8 +1,8 @@
-.media-menu,.media-router{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.media-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.media-modal input,.media-modal select,.media-modal textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.media-frame,.media-modal{font-family:"Open Sans",sans-serif;font-size:12px;-webkit-overflow-scrolling:touch}.media-modal label,.media-modal legend{font-size:13px}.media-frame input,.media-frame textarea{padding:6px 8px}.media-frame select,.wp-admin .media-frame select{line-height:28px;margin-top:3px}.media-frame a{border-bottom:none;color:#0073aa}.media-frame a:active,.media-frame a:hover{color:#00a0d2}.media-frame a:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);outline:0;color:#124964}.media-frame a.button{color:#32373c}.media-frame a.button:hover{color:#23282d}.media-frame a.button-primary,.media-frame a.button-primary:hover{color:#fff}.media-frame input[type=text],.media-frame input[type=password],.media-frame input[type=number],.media-frame input[type=search],.media-frame input[type=email],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-family:"Open Sans",sans-serif;font-size:12px;border-width:1px;border-style:solid;border-color:#ddd}.media-frame input[type=text]:focus,.media-frame input[type=password]:focus,.media-frame input[type=number]:focus,.media-frame input[type=search]:focus,.media-frame input[type=email]:focus,.media-frame input[type=url]:focus,.media-frame select:focus,.media-frame textarea:focus{border-color:#5b9dd9}.media-frame select{height:24px;padding:2px}.media-frame input:disabled,.media-frame input[readonly],.media-frame textarea:disabled,.media-frame textarea[readonly]{background-color:#eee}.media-frame input[type=search]{-webkit-appearance:textfield}.media-frame ::-webkit-input-placeholder{color:#72777c}.media-frame ::-moz-placeholder{color:#72777c;opacity:1}.media-frame :-ms-input-placeholder{color:#72777c}.media-frame .hidden{display:none}/*!
+.media-menu,.media-router{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.media-modal *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.media-modal input,.media-modal select,.media-modal textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.media-frame,.media-modal{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:12px;-webkit-overflow-scrolling:touch}.media-modal label,.media-modal legend{font-size:13px}.media-frame input,.media-frame textarea{padding:6px 8px}.media-frame select,.wp-admin .media-frame select{line-height:28px;margin-top:3px}.media-frame a{border-bottom:none;color:#0073aa}.media-frame a:active,.media-frame a:hover{color:#00a0d2}.media-frame a:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);outline:0;color:#124964}.media-frame a.button{color:#32373c}.media-frame a.button:hover{color:#23282d}.media-frame a.button-primary,.media-frame a.button-primary:hover{color:#fff}.media-frame input[type=text],.media-frame input[type=password],.media-frame input[type=number],.media-frame input[type=search],.media-frame input[type=email],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:12px;border-width:1px;border-style:solid;border-color:#ddd}.media-frame input[type=text]:focus,.media-frame input[type=password]:focus,.media-frame input[type=number]:focus,.media-frame input[type=search]:focus,.media-frame input[type=email]:focus,.media-frame input[type=url]:focus,.media-frame select:focus,.media-frame textarea:focus{border-color:#5b9dd9}.media-frame select{height:24px;padding:2px}.media-frame input:disabled,.media-frame input[readonly],.media-frame textarea:disabled,.media-frame textarea[readonly]{background-color:#eee}.media-frame input[type=search]{-webkit-appearance:textfield}.media-frame ::-webkit-input-placeholder{color:#72777c}.media-frame ::-moz-placeholder{color:#72777c;opacity:1}.media-frame :-ms-input-placeholder{color:#72777c}.media-frame .hidden{display:none}/*!
  * jQuery UI Draggable/Sortable 1.11.4
  * http://jqueryui.com
  *
  * Copyright jQuery Foundation and other contributors
  * Released under the MIT license.
  * http://jquery.org/license
- */.ui-draggable-handle,.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.media-modal{position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:160000}.wp-customizer .media-modal{z-index:560000}.media-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.wp-customizer .media-modal-backdrop{z-index:559900}.media-modal-close{position:absolute;top:0;right:0;width:50px;height:50px;padding:0;z-index:1000;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.media-modal-close:active{-webkit-box-shadow:none;box-shadow:none;outline:0}.media-modal-close span.media-modal-icon{background-image:none}.media-modal-close .media-modal-icon:before{content:"\f158";font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666}.media-modal-close:hover .media-modal-icon:before{color:#00a0d2}.media-modal-content{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;min-height:300px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background:#fcfcfc;-webkit-font-smoothing:subpixel-antialiased}.media-modal-content .media-frame select.attachment-filters{margin-top:11px;margin-right:2%;width:42%;width:-webkit-calc(48% - 12px);width:calc(48% - 12px)}.media-modal-content .attachments-browser .media-toolbar-secondary{width:66%}.media-modal-content .media-toolbar-primary.search-form{width:33%}.media-modal-content .media-toolbar-primary .media-button{float:right}.media-modal-content .attachments-browser .search{width:100%}.wp-core-ui .media-modal-icon{background-image:url(../images/uploader-icons.png);background-repeat:no-repeat}.media-menu,.media-sidebar{top:0;bottom:0;background:#f3f3f3;right:0}.media-toolbar{position:absolute;top:0;left:0;right:0;z-index:100;height:60px;padding:0 16px;border:0 solid #ddd;overflow:hidden}.media-toolbar-primary{float:right;height:100%}.media-toolbar-secondary{float:left;height:100%}.media-toolbar-primary>.media-button,.media-toolbar-primary>.media-button-group{margin-left:10px;float:left;margin-top:15px}.media-toolbar-secondary>.media-button,.media-toolbar-secondary>.media-button-group{margin-right:10px;margin-top:15px}.media-sidebar{position:absolute;width:267px;padding:0 16px 24px;z-index:75;border-left:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch}.hide-toolbar .media-sidebar{bottom:0}.media-sidebar .sidebar-title{font-size:20px;margin:0;padding:12px 10px 10px;line-height:28px}.media-sidebar .sidebar-content{padding:0 10px;margin-bottom:130px}.media-sidebar .search{display:block;width:100%}.image-details h2,.image-details h3,.media-sidebar h2,.media-sidebar h3{position:relative;font-weight:700;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}.attachment-details .setting,.media-sidebar .setting{display:block;float:left;width:100%;margin:1px 0}.attachment-details .setting label,.media-sidebar .setting label{display:block}.attachment-details .setting .link-to-custom,.media-sidebar .setting .link-to-custom{margin:3px 2px 0}.attachment-details .setting span,.media-sidebar .setting span{min-width:30%;margin-right:4%;font-size:12px;text-align:right;word-wrap:break-word}.media-sidebar .setting .name{max-width:80px}.attachment-details .setting select,.media-sidebar .setting select{max-width:65%}.attachment-details .field input[type=checkbox],.attachment-details .field input[type=radio],.attachment-details .setting input[type=checkbox],.attachment-details .setting input[type=radio],.media-sidebar .field input[type=checkbox],.media-sidebar .field input[type=radio],.media-sidebar .setting input[type=checkbox],.media-sidebar .setting input[type=radio]{float:none;margin:8px 3px 0;padding:0}.attachment-details .setting span,.compat-item label span,.media-sidebar .setting span{float:left;min-height:22px;padding-top:8px;line-height:16px;font-weight:400;color:#666}.media-menu>a,.media-router>a{line-height:18px;font-size:14px;text-decoration:none}.compat-item label span{text-align:right}.attachment-details .setting .value,.attachment-details .setting input[type=tel],.attachment-details .setting input[type=text],.attachment-details .setting input[type=password],.attachment-details .setting input[type=number],.attachment-details .setting input[type=search],.attachment-details .setting input[type=email],.attachment-details .setting input[type=url],.attachment-details .setting textarea,.media-sidebar .setting .value,.media-sidebar .setting input[type=tel],.media-sidebar .setting input[type=text],.media-sidebar .setting input[type=password],.media-sidebar .setting input[type=number],.media-sidebar .setting input[type=search],.media-sidebar .setting input[type=email],.media-sidebar .setting input[type=url],.media-sidebar .setting textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px;width:65%;float:right}.attachment-details .setting .value,.media-sidebar .setting .value{margin:0 1px;text-align:left}.attachment-details .setting textarea,.compat-item .field textarea,.media-sidebar .setting textarea{height:62px;resize:vertical}.attachment-details select,.media-sidebar select{margin-top:3px}.compat-item{float:left;width:100%;overflow:hidden}.compat-item table{width:100%;table-layout:fixed;border-spacing:0;border:0}.compat-item tr{padding:2px 0;display:block;overflow:hidden}.compat-item .field,.compat-item .label{display:block;margin:0;padding:0}.compat-item .label{min-width:30%;margin-right:4%;float:left;text-align:right}.compat-item .label span{display:block;width:100%}.compat-item .field{float:right;width:65%;margin:1px}.compat-item .field input[type=tel],.compat-item .field input[type=text],.compat-item .field input[type=password],.compat-item .field input[type=number],.compat-item .field input[type=search],.compat-item .field input[type=email],.compat-item .field input[type=url],.compat-item .field textarea{width:100%;margin:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.sidebar-for-errors .attachment-details,.sidebar-for-errors .compat-item,.sidebar-for-errors .media-sidebar .media-progress-bar,.sidebar-for-errors .upload-details{display:none!important}.media-menu{position:absolute;left:0;margin:0;padding:10px 0;border-right-width:1px;border-right-style:solid;border-right-color:#ccc;user-select:none}.media-menu>a{display:block;position:relative;padding:8px 20px;margin:0;color:#0073aa}.media-frame-title .dashicons,.media-frame.hide-router .media-frame-router{display:none}.media-menu>a:hover{color:#0073aa;background:rgba(0,0,0,.04)}.media-menu>a:active{outline:0}.media-menu .active,.media-menu .active:hover{color:#23282d;font-weight:700}.media-menu .separator{height:0;margin:12px 20px;padding:0;border-top:1px solid #ddd}.media-router{position:relative;padding:0 6px;margin:0;clear:both;user-select:none}.media-router a{-webkit-transition:none;transition:none}.media-router>a{position:relative;float:left;padding:8px 10px 9px;margin:0;height:18px}.media-frame,.media-frame-menu{position:absolute;left:0;bottom:0;top:0}.media-router>a:last-child{border-right:0}.media-router>a:active{outline:0}.media-router .active,.media-router .active:hover{color:#32373c}.media-router .active,.media-router>a.active:last-child{margin:-1px -1px 0;background:#fff;border:1px solid #ddd;border-bottom:none}.media-router .active:after{display:none}.media-frame{overflow:hidden;right:0}.media-frame-menu{width:200px;z-index:150}.media-frame-router,.media-frame-title{z-index:200;left:200px;position:absolute;right:0}.media-frame-title{top:0;height:50px}.media-frame-router{top:50px;height:36px}.media-frame-content{position:absolute;top:84px;left:200px;right:0;bottom:61px;height:auto;width:auto;margin:0;overflow:auto;background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.media-frame-toolbar{position:absolute;left:200px;right:0;bottom:0;height:60px;z-index:100}.media-frame.hide-menu .media-frame-content,.media-frame.hide-menu .media-frame-router,.media-frame.hide-menu .media-frame-title,.media-frame.hide-menu .media-frame-toolbar{left:0}.media-frame.hide-menu .media-frame-menu{left:-200px}.media-frame.hide-toolbar .media-frame-content{bottom:0}.media-frame.hide-toolbar .media-frame-toolbar{bottom:-61px}.media-frame.hide-router .media-frame-content{top:50px}.media-frame.hide-router .media-frame-title{border-bottom:1px solid #ddd;-webkit-box-shadow:0 4px 4px -4px rgba(0,0,0,.1);box-shadow:0 4px 4px -4px rgba(0,0,0,.1)}.media-frame-title h1{padding:0 16px;font-size:22px;line-height:50px;margin:0}.media-frame-title .suggested-dimensions{font-size:14px;float:right;margin-right:20px}.media-frame-content .crop-content{height:100%}.wp-customizer:not(.mobile) .media-frame-content .crop-content.site-icon{margin-right:300px}.media-frame-content .crop-content .crop-image{display:block;margin:auto;max-width:100%;max-height:100%}.media-frame-content .crop-content .upload-errors{position:absolute;width:300px;top:50%;left:50%;margin-left:-150px;margin-right:-150px;z-index:600000}.media-frame .media-iframe{overflow:hidden}.media-frame .media-iframe,.media-frame .media-iframe iframe{height:100%;width:100%;border:0}.media-frame select.attachment-filters{margin-top:11px;margin-right:2%;max-width:42%;max-width:-webkit-calc(48% - 12px);max-width:calc(48% - 12px)}.media-toolbar-primary .search,.wp-core-ui .attachment .portrait img{max-width:100%}.media-frame select.attachment-filters:last-of-type{margin-right:0}.media-frame .search{margin-top:11px;padding:4px;font-size:13px;color:#444;font-family:"Open Sans",sans-serif;-webkit-appearance:none}.wp-core-ui .attachments{margin:0;-webkit-overflow-scrolling:touch}.wp-core-ui .attachment{position:relative;float:left;padding:8px;margin:0;color:#444;cursor:pointer;list-style:none;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:25%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-core-ui .attachment.details:focus,.wp-core-ui .attachment:focus,.wp-core-ui .selected.attachment:focus{-webkit-box-shadow:inset 0 0 2px 3px #fff,inset 0 0 0 7px #5b9dd9;box-shadow:inset 0 0 2px 3px #fff,inset 0 0 0 7px #5b9dd9;outline:0}.wp-core-ui .selected.attachment{-webkit-box-shadow:inset 0 0 0 5px #fff,inset 0 0 0 7px #ccc;box-shadow:inset 0 0 0 5px #fff,inset 0 0 0 7px #ccc}.wp-core-ui .attachment.details{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #0073aa;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #0073aa}.wp-core-ui .attachment-preview{position:relative;-webkit-box-shadow:inset 0 0 15px rgba(0,0,0,.1),inset 0 0 0 1px rgba(0,0,0,.05);box-shadow:inset 0 0 15px rgba(0,0,0,.1),inset 0 0 0 1px rgba(0,0,0,.05);background:#eee;cursor:pointer}.wp-core-ui .attachment-preview:before{content:"";display:block;padding-top:100%}.wp-core-ui .attachment .icon{margin:0 auto;overflow:hidden}.wp-core-ui .attachment .thumbnail{overflow:hidden;position:absolute;top:0;right:0;bottom:0;left:0;opacity:1;-webkit-transition:opacity .1s;transition:opacity .1s}.wp-core-ui .attachment .landscape img{max-height:100%}.wp-core-ui .attachment .thumbnail:after{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);overflow:hidden}.wp-core-ui .attachment .thumbnail img{top:0;left:0}.wp-core-ui .attachment .thumbnail .centered{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-transform:translate(50%,50%);-ms-transform:translate(50%,50%);transform:translate(50%,50%)}.wp-core-ui .attachment .thumbnail .centered img{-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.wp-core-ui .attachments-browser .attachment .thumbnail .centered img.icon{-webkit-transform:translate(-50%,-70%);-ms-transform:translate(-50%,-70%);transform:translate(-50%,-70%)}.ie8 .wp-core-ui .attachment img.icon{top:20%;position:relative}.wp-core-ui .attachment .filename{position:absolute;left:0;right:0;bottom:0;overflow:hidden;max-height:100%;word-wrap:break-word;text-align:center;font-weight:700;background:rgba(255,255,255,.8);-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}.wp-core-ui .attachment .filename div{padding:5px 10px}.wp-core-ui .attachment .thumbnail img{position:absolute}.wp-core-ui .attachment-close{display:block;position:absolute;top:5px;right:5px;height:22px;width:22px;padding:0;background-color:#fff;background-position:-96px 4px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.3);box-shadow:0 0 0 1px rgba(0,0,0,.3)}.wp-core-ui .attachment-close:focus,.wp-core-ui .attachment-close:hover{background-position:-36px 4px}.wp-core-ui .attachment .check{display:none;height:24px;width:24px;padding:0;position:absolute;z-index:10;top:0;right:0;outline:0;background:#eee;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px rgba(0,0,0,.15);box-shadow:0 0 0 1px #fff,0 0 0 2px rgba(0,0,0,.15)}.wp-core-ui .attachment .check .media-modal-icon{display:block;background-position:-1px 0;height:15px;width:15px;margin:5px}.wp-core-ui .attachment .check:hover .media-modal-icon{background-position:-40px 0}.wp-core-ui .attachment.selected .check{display:block}.wp-core-ui .attachment.details .check,.wp-core-ui .attachment.selected .check:focus,.wp-core-ui .media-frame.mode-grid .attachment.selected .check{background-color:#0073aa;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #0073aa;box-shadow:0 0 0 1px #fff,0 0 0 2px #0073aa}.wp-core-ui .attachment.details .check .media-modal-icon,.wp-core-ui .media-frame.mode-grid .attachment.selected .check .media-modal-icon{background-position:-21px 0}.wp-core-ui .attachment.details .check:hover .media-modal-icon,.wp-core-ui .attachment.selected .check:focus .media-modal-icon,.wp-core-ui .media-frame.mode-grid .attachment.selected .check:hover .media-modal-icon{background-position:-60px 0}.wp-core-ui .media-frame .attachment .describe{position:relative;display:block;width:100%;margin:0;padding:8px;font-size:12px;-webkit-border-radius:0;border-radius:0}.media-frame .attachments-browser{position:relative;width:100%;height:100%;overflow:hidden}.attachments-browser .media-toolbar{right:300px;height:50px}.attachments-browser.hide-sidebar .media-toolbar{right:0}.attachments-browser .media-toolbar-primary>.media-button,.attachments-browser .media-toolbar-primary>.media-button-group,.attachments-browser .media-toolbar-secondary>.media-button,.attachments-browser .media-toolbar-secondary>.media-button-group{margin:11px 0}.attachments-browser .attachments{padding:2px 8px 8px}.attachments-browser .attachments,.attachments-browser .uploader-inline{position:absolute;top:50px;left:0;right:300px;bottom:0;overflow:auto;outline:0}.attachments-browser .uploader-inline.hidden{display:none}.attachments-browser .media-toolbar-primary{max-width:33%}.attachments-browser .media-toolbar-secondary{max-width:66%}.uploader-inline .close{background-color:transparent;border:0;cursor:pointer;height:48px;position:absolute;right:0;text-align:center;top:0;width:50px;z-index:1}.uploader-inline .close:before{font:400 30px/50px dashicons!important;color:#72777c;display:inline-block;content:"\f335";font-weight:300}.attachments-browser.hide-sidebar .attachments,.attachments-browser.hide-sidebar .uploader-inline{right:0;margin-right:0}.attachments-browser .instructions{display:inline-block;margin-top:16px;line-height:18px;font-size:13px;color:#666;margin-right:.5em}.attachments-browser .no-media{padding:2em 0 0 2em}.media-progress-bar{position:relative;height:10px;width:70%;margin:10px auto;-webkit-border-radius:10px;border-radius:10px;background:#ddd;background:rgba(0,0,0,.1)}.media-progress-bar div{height:10px;min-width:20px;width:0;background:#0073aa;-webkit-border-radius:10px;border-radius:10px;-webkit-transition:width .3s;transition:width .3s}.media-uploader-status .media-progress-bar{display:none;width:100%}.uploading.media-uploader-status .media-progress-bar{display:block}.attachment-preview .media-progress-bar{position:absolute;top:50%;left:15%;width:70%;margin:-5px 0 0}.media-uploader-status{position:relative;margin:0 auto;padding-bottom:10px;max-width:400px}.uploader-inline .media-uploader-status h2,.uploader-inline .media-uploader-status h3{display:none}.media-uploader-status .upload-details{display:none;font-size:12px;color:#666}.uploading.media-uploader-status .upload-details{display:block}.media-uploader-status .upload-detail-separator{padding:0 4px}.media-uploader-status .upload-count{color:#444}.media-uploader-status .upload-dismiss-errors,.media-uploader-status .upload-errors{display:none}.errors.media-uploader-status .upload-dismiss-errors,.errors.media-uploader-status .upload-errors{display:block}.media-uploader-status .upload-dismiss-errors{text-decoration:none}.media-sidebar .media-uploader-status .upload-dismiss-errors{position:absolute;top:0;right:0}.upload-errors .upload-error{padding:12px;margin-bottom:12px;background:#fff;border-left:4px solid #dc3232;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.uploader-inline .upload-errors .upload-error{background-color:#fbeaea;-webkit-box-shadow:none;box-shadow:none}.upload-errors .upload-error-filename{font-weight:700}.upload-errors .upload-error-message{display:block;padding-top:8px;word-wrap:break-word}.uploader-window{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,86,132,.9);z-index:250000;display:none;text-align:center;opacity:0;-webkit-transition:opacity 250ms;transition:opacity 250ms}.uploader-window-content{position:absolute;top:10px;left:10px;right:10px;bottom:10px;border:1px dashed #fff}.uploader-window h1,.uploader-window h3{margin:-.5em 0 0;position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);font-size:40px;color:#fff;padding:0}.uploader-window .media-progress-bar{margin-top:20px;max-width:300px;background:0 0;border-color:#fff;display:none}.uploader-window .media-progress-bar div{background:#fff}.uploading .uploader-window .media-progress-bar{display:block}.media-frame .uploader-inline{margin-bottom:20px;padding:0;text-align:center}.uploader-inline-content{position:absolute;top:30%;left:0;right:0}.uploader-inline-content .upload-ui{margin:2em 0}.uploader-inline-content .post-upload-ui{margin-bottom:2em}.uploader-inline .has-upload-message .upload-ui{margin:0 0 4em}.uploader-inline h2,.uploader-inline h3{font-size:20px;line-height:28px;font-weight:400;margin:0}.uploader-inline .has-upload-message .upload-instructions{font-size:14px;color:#444;font-weight:400}.uploader-inline .drop-instructions{display:none}.supports-drag-drop .uploader-inline .drop-instructions{display:block}.uploader-inline p{font-size:12px;margin:.5em 0}.uploader-inline .media-progress-bar{display:none}.uploading.uploader-inline .media-progress-bar{display:block}.uploader-inline .browser{display:inline-block!important}.media-selection{position:absolute;top:0;left:0;right:350px;height:60px;padding:0 0 0 16px;overflow:hidden;white-space:nowrap}.media-selection .selection-info{display:inline-block;font-size:12px;height:60px;margin-right:10px;vertical-align:top}.media-selection.editing,.media-selection.empty,.media-selection.one .edit-selection{display:none}.media-selection .count{display:block;padding-top:12px;font-size:14px;line-height:20px;font-weight:700}.media-selection .attachments,.media-selection .selection-view{display:inline-block;vertical-align:top}.media-selection .button-link{float:left;padding:1px 8px;margin:1px 8px 1px -8px;line-height:16px;border-right:1px solid #ddd;color:#0073aa}.media-selection .button-link:focus,.media-selection .button-link:hover{color:#00a0d2}.media-selection .button-link:last-child{border-right:0;margin-right:0}.selection-info .clear-selection{color:#bc0b0b}.selection-info .clear-selection:focus,.selection-info .clear-selection:hover{color:red}.media-selection .attachments{height:48px;margin:6px;padding:0;overflow:hidden}.media-selection .attachment{width:40px;padding:0;margin:4px}.media-selection .attachment .thumbnail{top:0;right:0;bottom:0;left:0}.media-selection .attachment .icon{width:50%}.media-selection .attachment-preview{-webkit-box-shadow:none;box-shadow:none;background:0 0}.wp-core-ui .media-selection .attachment.details:focus,.wp-core-ui .media-selection .attachment:focus,.wp-core-ui .media-selection .selected.attachment:focus{-webkit-box-shadow:0 0 0 1px #fff,0 0 2px 3px #5b9dd9;box-shadow:0 0 0 1px #fff,0 0 2px 3px #5b9dd9}.wp-core-ui .media-selection .selected.attachment{-webkit-box-shadow:none;box-shadow:none}.wp-core-ui .media-selection .attachment.details{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #0073aa;box-shadow:0 0 0 1px #fff,0 0 0 3px #0073aa}.media-selection:after{content:"";display:block;position:absolute;top:0;right:0;bottom:0;width:25px;background-image:-webkit-gradient(linear,right top,left top,from(rgba(255,255,255,1)),to(rgba(255,255,255,0)));background-image:-webkit-linear-gradient(right,rgba(255,255,255,1),rgba(255,255,255,0));background-image:linear-gradient(to left,rgba(255,255,255,1),rgba(255,255,255,0))}.media-selection .attachment .filename{display:none}.media-frame .spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;float:right;display:inline-block;visibility:hidden;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:0;vertical-align:middle}.attachment-details.save-waiting .settings-save-status .spinner,.media-frame .embed-loading .embed-url .spinner,.media-frame .spinner.is-active{visibility:visible}.media-toolbar .spinner{margin-top:14px}.attachment-details{position:relative;overflow:auto}.attachment-details .settings-save-status{float:right;text-transform:none;z-index:10}.attachment-details .settings-save-status .spinner{margin-left:5px}.attachment-details .settings-save-status .saved{float:right;display:none}.attachment-details.save-complete .settings-save-status .saved{display:block}.attachment-info{overflow:hidden;min-height:60px;margin-bottom:16px;line-height:18px;color:#666;border-bottom:1px solid #ddd;padding-bottom:11px}.attachment-info .filename{font-weight:700;color:#444;word-wrap:break-word}.attachment-info .thumbnail{position:relative;float:left;max-width:120px;max-height:120px;margin-top:5px;margin-right:10px;margin-bottom:5px}.uploading .attachment-info .thumbnail{width:120px;height:80px;-webkit-box-shadow:inset 0 0 15px rgba(0,0,0,.1);box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.uploading .attachment-info .media-progress-bar{margin-top:35px}.attachment-info .thumbnail-image:after{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);overflow:hidden}.attachment-info .thumbnail img{display:block;max-width:120px;max-height:120px;margin:0 auto}.attachment-info .details{float:left;font-size:12px;max-width:100%}.attachment-info .delete-attachment,.attachment-info .edit-attachment,.attachment-info .trash-attachment,.attachment-info .untrash-attachment{display:block;text-decoration:none;white-space:nowrap}.attachment-details.needs-refresh .attachment-info .edit-attachment{display:none}.attachment-info .edit-attachment{display:block}.media-modal .delete-attachment,.media-modal .trash-attachment,.media-modal .untrash-attachment{display:inline;padding:0;color:#bc0b0b}.media-modal .delete-attachment:focus,.media-modal .delete-attachment:hover,.media-modal .trash-attachment:focus,.media-modal .trash-attachment:hover,.media-modal .untrash-attachment:focus,.media-modal .untrash-attachment:hover{color:red}.attachment-display-settings{width:100%;float:left;overflow:hidden}.attachment-display-settings h4{margin:1.4em 0 .4em}.collection-settings{overflow:hidden}.collection-settings .setting input[type=checkbox]{float:left;margin-right:8px}.collection-settings .setting span{min-width:inherit}.media-modal .imgedit-wrap{position:static}.media-modal .imgedit-wrap .imgedit-panel-content{padding:16px;position:absolute;top:0;right:282px;bottom:0;left:0;overflow:auto}.media-modal .imgedit-wrap .imgedit-settings{background:#f3f3f3;border-left:1px solid #ddd;padding:20px 16px 16px;position:absolute;top:0;right:0;bottom:0;width:250px;overflow:auto}.media-modal .imgedit-group{background:0 0;border:none;border-bottom:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;margin:0 0 16px;padding:0 0 16px;position:relative}.media-modal .imgedit-group:last-of-type{border:none;margin:0;padding:0}.media-modal .imgedit-group-top{margin:0}.media-modal .imgedit-group-top h2,.media-modal .imgedit-group-top h2 .button-link,.media-modal .imgedit-group-top h3{display:inline-block;text-transform:uppercase;font-size:12px;color:#666;margin:3px 0 0}.embed-url,.imgedit-thumbnail-preview-caption{display:block}.media-modal .imgedit-group-top h2 .button-link,.media-modal .imgedit-group-top h2 a,.media-modal .imgedit-group-top h3 a{text-decoration:none;color:#666}.wp-core-ui.media-modal .image-editor .imgedit-help-toggle,.wp-core-ui.media-modal .image-editor .imgedit-help-toggle:active,.wp-core-ui.media-modal .image-editor .imgedit-help-toggle:hover{border:1px solid transparent;margin:0;padding:0;background:0 0;color:#0074a2;font-size:20px;line-height:1;cursor:pointer;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-box-shadow:none;box-shadow:none}.wp-core-ui.media-modal .image-editor .imgedit-help-toggle:focus{color:#0074a2;border-color:#5b9dd9;outline:0;-webkit-box-shadow:0 0 3px rgba(0,115,170,.8);box-shadow:0 0 3px rgba(0,115,170,.8)}.wp-core-ui.media-modal .imgedit-group-top .dashicons-arrow-down.imgedit-help-toggle{margin-top:-3px}.wp-core-ui.media-modal .image-editor h3 .imgedit-help-toggle{margin-top:-2px}.media-modal .imgedit-help-toggled span.dashicons:before{content:"\f142"}.media-modal .imgedit-thumbnail-preview{margin:10px 8px 0 0}.media-modal .imgedit-wrap div.updated{margin:0 0 16px}.embed-url{position:relative;padding:16px;margin:0;z-index:250;background:#fff;font-size:18px}.media-frame .embed-url input{font-size:18px;padding:12px 14px;width:100%;min-width:200px;-webkit-box-shadow:inset 2px 2px 4px -2px rgba(0,0,0,.1);box-shadow:inset 2px 2px 4px -2px rgba(0,0,0,.1)}.media-frame .embed-url .spinner{position:absolute;top:32px;right:26px}.embed-link-settings,.embed-media-settings{position:absolute;top:70px;left:0;right:0;bottom:0;padding:16px 16px 32px;overflow:auto}.media-embed .embed-link-settings{overflow:visible}.embed-preview embed,.embed-preview iframe,.embed-preview img,.mejs-container video{max-width:100%;vertical-align:middle}.embed-preview a{display:inline-block}.embed-preview img{display:block;height:auto}.mejs-container:focus{outline:#5b9dd9 solid 1px;-webkit-box-shadow:0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 2px 1px rgba(30,140,190,.8)}.image-details .media-modal{left:140px;right:140px}.image-details .media-frame-content,.image-details .media-frame-router,.image-details .media-frame-title{left:0}.image-details .embed-media-settings{top:0;overflow:visible;padding:0}.image-details .embed-media-settings,.image-details .embed-media-settings div{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.image-details .column-settings{background:#f3f3f3;border-right:1px solid #ddd;min-height:100%;width:55%;position:absolute;top:0;left:0}.image-details .column-settings h2,.image-details .column-settings h3{margin:20px;padding-top:20px;border-top:1px solid #ddd;color:#23282d}.image-details .column-image{width:45%;position:absolute;left:55%;top:0}.image-details .image{margin:20px}.image-details .image img{max-width:100%;max-height:500px}.image-details .advanced-toggle{padding:0;color:#666;text-transform:uppercase}.image-details .advanced-toggle:after{font:400 20px/1 dashicons;speak:none;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f140";display:inline-block;margin-top:-2px}.image-details .advanced-visible .advanced-toggle:after{content:"\f142"}.image-details .embed-media-settings .size{margin-bottom:4px}.image-details .custom-size span{display:block}.image-details .custom-size label{display:block;float:left}.image-details .custom-size span small{color:#555d66;font-size:inherit}.image-details .custom-size input{width:5em}.image-details .custom-size .sep{float:left;margin:26px 6px 0}.image-details .custom-size:after{content:"";display:table;clear:both}.media-embed .thumbnail{max-width:100%;max-height:200px;position:relative;float:left}.media-embed .thumbnail img{max-height:200px;display:block}.media-embed .thumbnail:after{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);overflow:hidden}.media-embed .setting{width:100%;margin:10px 0;float:left;display:block;clear:both}.image-details .embed-media-settings .setting{float:none;width:auto}.image-details .actions{margin:10px 0}.image-details .hidden{display:none}.media-embed .setting input[type=text],.media-embed .setting textarea{display:block;width:100%;max-width:400px;margin:1px 0}.image-details .embed-media-settings .setting input[type=text],.image-details .embed-media-settings .setting textarea{max-width:inherit;width:70%}.image-details .embed-media-settings .custom-size,.image-details .embed-media-settings .link-target,.image-details .embed-media-settings .setting input.link-to-custom{margin-left:27%;width:70%}.image-details .embed-media-settings .link-target{margin-top:24px}.media-embed .setting input.hidden,.media-embed .setting textarea.hidden{display:none}.media-embed .setting span{display:block;width:200px;font-size:13px;line-height:24px;color:#666}.image-details .embed-media-settings .setting span{float:left;width:25%;text-align:right;margin:8px 1% 0;line-height:1.1}.media-embed .setting .button-group{margin:2px 0}.media-embed-sidebar{position:absolute;top:0;left:440px}.advanced-section,.link-settings{margin-top:10px}.wp-editor-wrap .uploader-editor{background:rgba(150,150,150,.9);position:absolute;top:0;left:0;width:100%;height:100%;z-index:99998;display:none;text-align:center}.wp-editor-wrap .uploader-editor-content{border:1px dashed #fff;position:absolute;top:10px;left:10px;right:10px;bottom:10px}.wp-editor-wrap .uploader-editor .uploader-editor-title{position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);font-size:3em;line-height:1.3;font-weight:700;color:#fff;padding:0;margin:0;display:none}.wp-editor-wrap .uploader-editor.droppable{background:rgba(0,86,132,.9)}.wp-editor-wrap .uploader-editor.droppable .uploader-editor-title{display:block}.ie7 .media-frame .attachments-browser{position:static}.ie7 .media-frame .embed-url input{margin-top:4px;width:90%}.ie7 .compat-item{width:99%}.ie7 .attachment-display-settings{width:auto}.ie7 .attachment-preview,.ie7 .attachment-preview .thumbnail{width:120px;height:120px}.ie7 .media-frame .attachment .describe{width:102px}.ie7 .media-sidebar .setting select{max-width:55%}.ie7 .media-sidebar .setting input[type=tel],.ie7 .media-sidebar .setting input[type=text],.ie7 .media-sidebar .setting input[type=password],.ie7 .media-sidebar .setting input[type=number],.ie7 .media-sidebar .setting input[type=search],.ie7 .media-sidebar .setting input[type=email],.ie7 .media-sidebar .setting input[type=url],.ie7 .media-sidebar .setting textarea{width:55%}.ie7 .media-sidebar .setting .link-to-custom{float:left}.rtl .media-frame,.rtl .media-frame .search,.rtl .media-frame input[type=tel],.rtl .media-frame input[type=text],.rtl .media-frame input[type=password],.rtl .media-frame input[type=number],.rtl .media-frame input[type=search],.rtl .media-frame input[type=email],.rtl .media-frame input[type=url],.rtl .media-frame select,.rtl .media-frame textarea,.rtl .media-modal{font-family:Tahoma,sans-serif}:lang(he-il) .rtl .media-frame,:lang(he-il) .rtl .media-frame .search,:lang(he-il) .rtl .media-frame input[type=text],:lang(he-il) .rtl .media-frame input[type=password],:lang(he-il) .rtl .media-frame input[type=number],:lang(he-il) .rtl .media-frame input[type=search],:lang(he-il) .rtl .media-frame input[type=email],:lang(he-il) .rtl .media-frame input[type=url],:lang(he-il) .rtl .media-frame select,:lang(he-il) .rtl .media-frame textarea,:lang(he-il) .rtl .media-modal{font-family:Arial,sans-serif}@media only screen and (max-width:900px){.media-frame:not(.hide-menu) .media-frame-content,.media-frame:not(.hide-menu) .media-frame-router,.media-frame:not(.hide-menu) .media-frame-title,.media-frame:not(.hide-menu) .media-frame-toolbar{left:0}.media-frame:not(.hide-menu) .media-frame-menu{position:static;width:0}.media-frame:not(.hide-menu) .media-menu{width:auto;max-width:80%;overflow:auto;z-index:2000;top:50px;left:-300px;right:auto;bottom:auto;padding:5px 0;border:1px solid #ccc}.media-frame:not(.hide-menu) .media-menu.visible{left:0}.media-frame:not(.hide-menu) .media-menu>a{padding:12px 16px;font-size:16px}.media-frame:not(.hide-menu) .media-menu>a.active{display:none}.media-frame:not(.hide-menu) .media-menu .separator{margin:5px 10px}.media-frame:not(.hide-menu) .media-frame-title{left:0}.media-frame:not(.hide-menu) .media-frame-title .dashicons{display:inline-block;line-height:50px}.media-frame:not(.hide-menu) .media-frame-title h1{color:#0073aa;line-height:3;font-size:18px;float:left;cursor:pointer}.media-sidebar{width:230px}.attachments-browser .attachments,.attachments-browser .media-toolbar,.attachments-browser .uploader-inline{right:262px}.attachment-details .setting,.media-sidebar .setting{margin:6px 0}.attachment-details .setting input,.attachment-details .setting span,.attachment-details .setting textarea,.compat-item label span,.media-sidebar .setting input,.media-sidebar .setting span,.media-sidebar .setting textarea{float:none}.attachment-details .setting span,.compat-item label span,.media-sidebar .setting span{text-align:inherit;min-height:16px;margin:0;padding:8px 2px 0}.attachment-details .setting .value,.media-sidebar .setting .value{float:none;width:auto}.attachment-details .setting input[type=tel],.attachment-details .setting input[type=text],.attachment-details .setting input[type=password],.attachment-details .setting input[type=number],.attachment-details .setting input[type=search],.attachment-details .setting input[type=email],.attachment-details .setting input[type=url],.attachment-details .setting select,.attachment-details .setting textarea,.media-sidebar .setting input[type=tel],.media-sidebar .setting input[type=text],.media-sidebar .setting input[type=password],.media-sidebar .setting input[type=number],.media-sidebar .setting input[type=search],.media-sidebar .setting input[type=email],.media-sidebar .setting input[type=url],.media-sidebar .setting select,.media-sidebar .setting textarea{float:none;width:98%;max-width:none;height:auto}.attachment-details .setting select.columns,.media-sidebar .setting select.columns{width:auto}.media-frame .search,.media-frame input,.media-frame textarea{padding:3px 6px}.image-details .column-image{width:30%;left:70%}.image-details .column-settings{width:70%}.image-details .media-modal{left:30px;right:30px}.image-details .embed-media-settings .setting{margin:20px}.image-details .embed-media-settings .setting span{float:none;text-align:left;width:100%;margin-bottom:4px}.image-details .embed-media-settings .setting input.link-to-custom,.image-details .embed-media-settings .setting input[type=text],.image-details .embed-media-settings .setting textarea{width:100%;margin-left:0}.image-details .embed-media-settings .custom-size{margin-left:20px}.collection-settings .setting input[type=checkbox]{margin-top:0}.media-selection{min-width:120px}.media-selection:after{background:0 0}.media-selection .attachments{display:none}.media-modal .attachments-browser .media-toolbar .search{max-width:100%;height:auto;float:right}.media-modal .attachments-browser .media-toolbar .attachment-filters{height:auto}.media-modal .attachments-browser .media-toolbar .spinner{margin:14px 2px 0}.media-frame input[type=text],.media-frame input[type=password],.media-frame input[type=number],.media-frame input[type=search],.media-frame input[type=email],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-size:16px}}@media only screen and (max-width:640px),screen and (max-height:400px){.image-details .media-modal,.media-modal{position:fixed;top:0;left:0;right:0;bottom:0}.media-modal-backdrop{position:fixed}.media-sidebar{z-index:1900;max-width:70%;bottom:120%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding-bottom:0}.media-sidebar.visible{bottom:0}.attachments-browser .attachments,.attachments-browser .media-toolbar,.attachments-browser .uploader-inline{right:0}.image-details .media-frame-title{display:block;top:0;font-size:14px}.image-details .column-image,.image-details .column-settings{width:100%;position:relative;left:0}.image-details .column-settings{padding:4px 0}.media-frame-content .media-toolbar .instructions{display:none}}@media screen and (max-height:400px){.media-menu{padding:0}.media-frame-router{top:44px}.media-frame-content{top:78px}.attachments-browser .attachments{top:40px}.embed-link-settings{overflow:visible}}@media only screen and (max-width:480px){.media-modal-close{top:-5px}.media-modal .media-frame-title{height:40px}.wp-core-ui.wp-customizer .media-button{margin-top:13px}.media-frame:not(.hide-menu) .media-frame-title h1,.media-modal .media-frame-title h1{font-size:18px;line-height:40px}.media-frame:not(.hide-menu) .media-frame-title .dashicons{line-height:40px}.media-frame-router,.media-frame:not(.hide-menu) .media-menu{top:40px}.media-frame-content{top:74px}.media-frame.hide-router .media-frame-content{top:40px}}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.wp-core-ui .media-modal-icon{background-image:url(../images/uploader-icons-2x.png);-webkit-background-size:134px 15px;background-size:134px 15px}.media-frame .spinner{background-image:url(../images/spinner-2x.gif)}}.media-frame-content[data-columns="1"] .attachment{width:100%}.media-frame-content[data-columns="2"] .attachment{width:50%}.media-frame-content[data-columns="3"] .attachment{width:33.33%}.media-frame-content[data-columns="4"] .attachment{width:25%}.media-frame-content[data-columns="5"] .attachment{width:20%}.media-frame-content[data-columns="6"] .attachment{width:16.66%}.media-frame-content[data-columns="7"] .attachment{width:14.28%}.media-frame-content[data-columns="8"] .attachment{width:12.5%}.media-frame-content[data-columns="9"] .attachment{width:11.11%}.media-frame-content[data-columns="10"] .attachment{width:10%}.media-frame-content[data-columns="11"] .attachment{width:9.09%}.media-frame-content[data-columns="12"] .attachment{width:8.33%}
\ No newline at end of file
+ */.ui-draggable-handle,.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.media-modal{position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:160000}.wp-customizer .media-modal{z-index:560000}.media-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.wp-customizer .media-modal-backdrop{z-index:559900}.media-modal-close{position:absolute;top:0;right:0;width:50px;height:50px;padding:0;z-index:1000;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.media-modal-close:active{-webkit-box-shadow:none;box-shadow:none;outline:0}.media-modal-close span.media-modal-icon{background-image:none}.media-modal-close .media-modal-icon:before{content:"\f158";font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666}.media-modal-close:hover .media-modal-icon:before{color:#00a0d2}.media-modal-content{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;min-height:300px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background:#fcfcfc;-webkit-font-smoothing:subpixel-antialiased}.media-modal-content .media-frame select.attachment-filters{margin-top:11px;margin-right:2%;width:42%;width:-webkit-calc(48% - 12px);width:calc(48% - 12px)}.media-modal-content .attachments-browser .media-toolbar-secondary{width:66%}.media-modal-content .media-toolbar-primary.search-form{width:33%}.media-modal-content .media-toolbar-primary .media-button{float:right}.media-modal-content .attachments-browser .search{width:100%}.wp-core-ui .media-modal-icon{background-image:url(../images/uploader-icons.png);background-repeat:no-repeat}.media-menu,.media-sidebar{top:0;bottom:0;background:#f3f3f3;right:0}.media-toolbar{position:absolute;top:0;left:0;right:0;z-index:100;height:60px;padding:0 16px;border:0 solid #ddd;overflow:hidden}.media-toolbar-primary{float:right;height:100%}.media-toolbar-secondary{float:left;height:100%}.media-toolbar-primary>.media-button,.media-toolbar-primary>.media-button-group{margin-left:10px;float:left;margin-top:15px}.media-toolbar-secondary>.media-button,.media-toolbar-secondary>.media-button-group{margin-right:10px;margin-top:15px}.media-sidebar{position:absolute;width:267px;padding:0 16px 24px;z-index:75;border-left:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch}.hide-toolbar .media-sidebar{bottom:0}.media-sidebar .sidebar-title{font-size:20px;margin:0;padding:12px 10px 10px;line-height:28px}.media-sidebar .sidebar-content{padding:0 10px;margin-bottom:130px}.media-sidebar .search{display:block;width:100%}.image-details h2,.image-details h3,.media-sidebar h2,.media-sidebar h3{position:relative;font-weight:600;text-transform:uppercase;font-size:12px;color:#666;margin:24px 0 8px}.attachment-details .setting,.media-sidebar .setting{display:block;float:left;width:100%;margin:1px 0}.attachment-details .setting label,.media-sidebar .setting label{display:block}.attachment-details .setting .link-to-custom,.media-sidebar .setting .link-to-custom{margin:3px 2px 0}.attachment-details .setting span,.media-sidebar .setting span{min-width:30%;margin-right:4%;font-size:12px;text-align:right;word-wrap:break-word}.media-sidebar .setting .name{max-width:80px}.attachment-details .setting select,.media-sidebar .setting select{max-width:65%}.attachment-details .field input[type=radio],.attachment-details .field input[type=checkbox],.attachment-details .setting input[type=radio],.attachment-details .setting input[type=checkbox],.media-sidebar .field input[type=radio],.media-sidebar .field input[type=checkbox],.media-sidebar .setting input[type=radio],.media-sidebar .setting input[type=checkbox]{float:none;margin:8px 3px 0;padding:0}.attachment-details .setting span,.compat-item label span,.media-sidebar .setting span{float:left;min-height:22px;padding-top:8px;line-height:16px;font-weight:400;color:#666}.media-menu>a,.media-router>a{line-height:18px;font-size:14px;text-decoration:none}.compat-item label span{text-align:right}.attachment-details .setting .value,.attachment-details .setting input[type=tel],.attachment-details .setting input[type=text],.attachment-details .setting input[type=password],.attachment-details .setting input[type=number],.attachment-details .setting input[type=search],.attachment-details .setting input[type=email],.attachment-details .setting input[type=url],.attachment-details .setting textarea,.media-sidebar .setting .value,.media-sidebar .setting input[type=tel],.media-sidebar .setting input[type=text],.media-sidebar .setting input[type=password],.media-sidebar .setting input[type=number],.media-sidebar .setting input[type=search],.media-sidebar .setting input[type=email],.media-sidebar .setting input[type=url],.media-sidebar .setting textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px;width:65%;float:right}.attachment-details .setting .value,.media-sidebar .setting .value{margin:0 1px;text-align:left}.attachment-details .setting textarea,.compat-item .field textarea,.media-sidebar .setting textarea{height:62px;resize:vertical}.attachment-details select,.media-sidebar select{margin-top:3px}.compat-item{float:left;width:100%;overflow:hidden}.compat-item table{width:100%;table-layout:fixed;border-spacing:0;border:0}.compat-item tr{padding:2px 0;display:block;overflow:hidden}.compat-item .field,.compat-item .label{display:block;margin:0;padding:0}.compat-item .label{min-width:30%;margin-right:4%;float:left;text-align:right}.compat-item .label span{display:block;width:100%}.compat-item .field{float:right;width:65%;margin:1px}.compat-item .field input[type=tel],.compat-item .field input[type=text],.compat-item .field input[type=password],.compat-item .field input[type=number],.compat-item .field input[type=search],.compat-item .field input[type=email],.compat-item .field input[type=url],.compat-item .field textarea{width:100%;margin:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.sidebar-for-errors .attachment-details,.sidebar-for-errors .compat-item,.sidebar-for-errors .media-sidebar .media-progress-bar,.sidebar-for-errors .upload-details{display:none!important}.media-menu{position:absolute;left:0;margin:0;padding:10px 0;border-right-width:1px;border-right-style:solid;border-right-color:#ccc;user-select:none}.media-menu>a{display:block;position:relative;padding:8px 20px;margin:0;color:#0073aa}.media-frame-title .dashicons,.media-frame.hide-router .media-frame-router{display:none}.media-menu>a:hover{color:#0073aa;background:rgba(0,0,0,.04)}.media-menu>a:active{outline:0}.media-menu .active,.media-menu .active:hover{color:#23282d;font-weight:600}.media-menu .separator{height:0;margin:12px 20px;padding:0;border-top:1px solid #ddd}.media-router{position:relative;padding:0 6px;margin:0;clear:both;user-select:none}.media-router a{-webkit-transition:none;transition:none}.media-router>a{position:relative;float:left;padding:8px 10px 9px;margin:0;height:18px}.media-frame,.media-frame-menu{position:absolute;left:0;bottom:0;top:0}.media-router>a:last-child{border-right:0}.media-router>a:active{outline:0}.media-router .active,.media-router .active:hover{color:#32373c}.media-router .active,.media-router>a.active:last-child{margin:-1px -1px 0;background:#fff;border:1px solid #ddd;border-bottom:none}.media-router .active:after{display:none}.media-frame{overflow:hidden;right:0}.media-frame-menu{width:200px;z-index:150}.media-frame-router,.media-frame-title{z-index:200;left:200px;position:absolute;right:0}.media-frame-title{top:0;height:50px}.media-frame-router{top:50px;height:36px}.media-frame-content{position:absolute;top:84px;left:200px;right:0;bottom:61px;height:auto;width:auto;margin:0;overflow:auto;background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.media-frame-toolbar{position:absolute;left:200px;right:0;bottom:0;height:60px;z-index:100}.media-frame.hide-menu .media-frame-content,.media-frame.hide-menu .media-frame-router,.media-frame.hide-menu .media-frame-title,.media-frame.hide-menu .media-frame-toolbar{left:0}.media-frame.hide-menu .media-frame-menu{left:-200px}.media-frame.hide-toolbar .media-frame-content{bottom:0}.media-frame.hide-toolbar .media-frame-toolbar{bottom:-61px}.media-frame.hide-router .media-frame-content{top:50px}.media-frame.hide-router .media-frame-title{border-bottom:1px solid #ddd;-webkit-box-shadow:0 4px 4px -4px rgba(0,0,0,.1);box-shadow:0 4px 4px -4px rgba(0,0,0,.1)}.media-frame-title h1{padding:0 16px;font-size:22px;line-height:50px;margin:0}.media-frame-title .suggested-dimensions{font-size:14px;float:right;margin-right:20px}.media-frame-content .crop-content{height:100%}.wp-customizer:not(.mobile) .media-frame-content .crop-content.site-icon{margin-right:300px}.media-frame-content .crop-content .crop-image{display:block;margin:auto;max-width:100%;max-height:100%}.media-frame-content .crop-content .upload-errors{position:absolute;width:300px;top:50%;left:50%;margin-left:-150px;margin-right:-150px;z-index:600000}.media-frame .media-iframe{overflow:hidden}.media-frame .media-iframe,.media-frame .media-iframe iframe{height:100%;width:100%;border:0}.media-frame select.attachment-filters{margin-top:11px;margin-right:2%;max-width:42%;max-width:-webkit-calc(48% - 12px);max-width:calc(48% - 12px)}.media-toolbar-primary .search,.wp-core-ui .attachment .portrait img{max-width:100%}.media-frame select.attachment-filters:last-of-type{margin-right:0}.media-frame .search{margin-top:11px;padding:4px;font-size:13px;color:#444;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;-webkit-appearance:none}.wp-core-ui .attachments{margin:0;-webkit-overflow-scrolling:touch}.wp-core-ui .attachment{position:relative;float:left;padding:8px;margin:0;color:#444;cursor:pointer;list-style:none;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:25%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-core-ui .attachment.details:focus,.wp-core-ui .attachment:focus,.wp-core-ui .selected.attachment:focus{-webkit-box-shadow:inset 0 0 2px 3px #fff,inset 0 0 0 7px #5b9dd9;box-shadow:inset 0 0 2px 3px #fff,inset 0 0 0 7px #5b9dd9;outline:0}.wp-core-ui .selected.attachment{-webkit-box-shadow:inset 0 0 0 5px #fff,inset 0 0 0 7px #ccc;box-shadow:inset 0 0 0 5px #fff,inset 0 0 0 7px #ccc}.wp-core-ui .attachment.details{-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #0073aa;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #0073aa}.wp-core-ui .attachment-preview{position:relative;-webkit-box-shadow:inset 0 0 15px rgba(0,0,0,.1),inset 0 0 0 1px rgba(0,0,0,.05);box-shadow:inset 0 0 15px rgba(0,0,0,.1),inset 0 0 0 1px rgba(0,0,0,.05);background:#eee;cursor:pointer}.wp-core-ui .attachment-preview:before{content:"";display:block;padding-top:100%}.wp-core-ui .attachment .icon{margin:0 auto;overflow:hidden}.wp-core-ui .attachment .thumbnail{overflow:hidden;position:absolute;top:0;right:0;bottom:0;left:0;opacity:1;-webkit-transition:opacity .1s;transition:opacity .1s}.wp-core-ui .attachment .landscape img{max-height:100%}.wp-core-ui .attachment .thumbnail:after{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);overflow:hidden}.wp-core-ui .attachment .thumbnail img{top:0;left:0}.wp-core-ui .attachment .thumbnail .centered{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-transform:translate(50%,50%);-ms-transform:translate(50%,50%);transform:translate(50%,50%)}.wp-core-ui .attachment .thumbnail .centered img{-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.wp-core-ui .attachments-browser .attachment .thumbnail .centered img.icon{-webkit-transform:translate(-50%,-70%);-ms-transform:translate(-50%,-70%);transform:translate(-50%,-70%)}.ie8 .wp-core-ui .attachment img.icon{top:20%;position:relative}.wp-core-ui .attachment .filename{position:absolute;left:0;right:0;bottom:0;overflow:hidden;max-height:100%;word-wrap:break-word;text-align:center;font-weight:600;background:rgba(255,255,255,.8);-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}.wp-core-ui .attachment .filename div{padding:5px 10px}.wp-core-ui .attachment .thumbnail img{position:absolute}.wp-core-ui .attachment-close{display:block;position:absolute;top:5px;right:5px;height:22px;width:22px;padding:0;background-color:#fff;background-position:-96px 4px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.3);box-shadow:0 0 0 1px rgba(0,0,0,.3)}.wp-core-ui .attachment-close:focus,.wp-core-ui .attachment-close:hover{background-position:-36px 4px}.wp-core-ui .attachment .check{display:none;height:24px;width:24px;padding:0;position:absolute;z-index:10;top:0;right:0;outline:0;background:#eee;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px rgba(0,0,0,.15);box-shadow:0 0 0 1px #fff,0 0 0 2px rgba(0,0,0,.15)}.wp-core-ui .attachment .check .media-modal-icon{display:block;background-position:-1px 0;height:15px;width:15px;margin:5px}.wp-core-ui .attachment .check:hover .media-modal-icon{background-position:-40px 0}.wp-core-ui .attachment.selected .check{display:block}.wp-core-ui .attachment.details .check,.wp-core-ui .attachment.selected .check:focus,.wp-core-ui .media-frame.mode-grid .attachment.selected .check{background-color:#0073aa;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #0073aa;box-shadow:0 0 0 1px #fff,0 0 0 2px #0073aa}.wp-core-ui .attachment.details .check .media-modal-icon,.wp-core-ui .media-frame.mode-grid .attachment.selected .check .media-modal-icon{background-position:-21px 0}.wp-core-ui .attachment.details .check:hover .media-modal-icon,.wp-core-ui .attachment.selected .check:focus .media-modal-icon,.wp-core-ui .media-frame.mode-grid .attachment.selected .check:hover .media-modal-icon{background-position:-60px 0}.wp-core-ui .media-frame .attachment .describe{position:relative;display:block;width:100%;margin:0;padding:8px;font-size:12px;-webkit-border-radius:0;border-radius:0}.media-frame .attachments-browser{position:relative;width:100%;height:100%;overflow:hidden}.attachments-browser .media-toolbar{right:300px;height:50px}.attachments-browser.hide-sidebar .media-toolbar{right:0}.attachments-browser .media-toolbar-primary>.media-button,.attachments-browser .media-toolbar-primary>.media-button-group,.attachments-browser .media-toolbar-secondary>.media-button,.attachments-browser .media-toolbar-secondary>.media-button-group{margin:11px 0}.attachments-browser .attachments{padding:2px 8px 8px}.attachments-browser .attachments,.attachments-browser .uploader-inline{position:absolute;top:50px;left:0;right:300px;bottom:0;overflow:auto;outline:0}.attachments-browser .uploader-inline.hidden{display:none}.attachments-browser .media-toolbar-primary{max-width:33%}.attachments-browser .media-toolbar-secondary{max-width:66%}.uploader-inline .close{background-color:transparent;border:0;cursor:pointer;height:48px;position:absolute;right:0;text-align:center;top:0;width:50px;z-index:1}.uploader-inline .close:before{font:400 30px/50px dashicons!important;color:#72777c;display:inline-block;content:"\f335";font-weight:300}.attachments-browser.hide-sidebar .attachments,.attachments-browser.hide-sidebar .uploader-inline{right:0;margin-right:0}.attachments-browser .instructions{display:inline-block;margin-top:16px;line-height:18px;font-size:13px;color:#666;margin-right:.5em}.attachments-browser .no-media{padding:2em 0 0 2em}.media-progress-bar{position:relative;height:10px;width:70%;margin:10px auto;-webkit-border-radius:10px;border-radius:10px;background:#ddd;background:rgba(0,0,0,.1)}.media-progress-bar div{height:10px;min-width:20px;width:0;background:#0073aa;-webkit-border-radius:10px;border-radius:10px;-webkit-transition:width .3s;transition:width .3s}.media-uploader-status .media-progress-bar{display:none;width:100%}.uploading.media-uploader-status .media-progress-bar{display:block}.attachment-preview .media-progress-bar{position:absolute;top:50%;left:15%;width:70%;margin:-5px 0 0}.media-uploader-status{position:relative;margin:0 auto;padding-bottom:10px;max-width:400px}.uploader-inline .media-uploader-status h2,.uploader-inline .media-uploader-status h3{display:none}.media-uploader-status .upload-details{display:none;font-size:12px;color:#666}.uploading.media-uploader-status .upload-details{display:block}.media-uploader-status .upload-detail-separator{padding:0 4px}.media-uploader-status .upload-count{color:#444}.media-uploader-status .upload-dismiss-errors,.media-uploader-status .upload-errors{display:none}.errors.media-uploader-status .upload-dismiss-errors,.errors.media-uploader-status .upload-errors{display:block}.media-uploader-status .upload-dismiss-errors{text-decoration:none}.media-sidebar .media-uploader-status .upload-dismiss-errors{position:absolute;top:0;right:0}.upload-errors .upload-error{padding:12px;margin-bottom:12px;background:#fff;border-left:4px solid #dc3232;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}.uploader-inline .upload-errors .upload-error{background-color:#fbeaea;-webkit-box-shadow:none;box-shadow:none}.upload-errors .upload-error-filename{font-weight:600}.upload-errors .upload-error-message{display:block;padding-top:8px;word-wrap:break-word}.uploader-window{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,86,132,.9);z-index:250000;display:none;text-align:center;opacity:0;-webkit-transition:opacity 250ms;transition:opacity 250ms}.uploader-window-content{position:absolute;top:10px;left:10px;right:10px;bottom:10px;border:1px dashed #fff}.uploader-window h1,.uploader-window h3{margin:-.5em 0 0;position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);font-size:40px;color:#fff;padding:0}.uploader-window .media-progress-bar{margin-top:20px;max-width:300px;background:0 0;border-color:#fff;display:none}.uploader-window .media-progress-bar div{background:#fff}.uploading .uploader-window .media-progress-bar{display:block}.media-frame .uploader-inline{margin-bottom:20px;padding:0;text-align:center}.uploader-inline-content{position:absolute;top:30%;left:0;right:0}.uploader-inline-content .upload-ui{margin:2em 0}.uploader-inline-content .post-upload-ui{margin-bottom:2em}.uploader-inline .has-upload-message .upload-ui{margin:0 0 4em}.uploader-inline h2,.uploader-inline h3{font-size:20px;line-height:28px;font-weight:400;margin:0}.uploader-inline .has-upload-message .upload-instructions{font-size:14px;color:#444;font-weight:400}.uploader-inline .drop-instructions{display:none}.supports-drag-drop .uploader-inline .drop-instructions{display:block}.uploader-inline p{font-size:12px;margin:.5em 0}.uploader-inline .media-progress-bar{display:none}.uploading.uploader-inline .media-progress-bar{display:block}.uploader-inline .browser{display:inline-block!important}.media-selection{position:absolute;top:0;left:0;right:350px;height:60px;padding:0 0 0 16px;overflow:hidden;white-space:nowrap}.media-selection .selection-info{display:inline-block;font-size:12px;height:60px;margin-right:10px;vertical-align:top}.media-selection.editing,.media-selection.empty,.media-selection.one .edit-selection{display:none}.media-selection .count{display:block;padding-top:12px;font-size:14px;line-height:20px;font-weight:600}.media-selection .attachments,.media-selection .selection-view{display:inline-block;vertical-align:top}.media-selection .button-link{float:left;padding:1px 8px;margin:1px 8px 1px -8px;line-height:16px;border-right:1px solid #ddd;color:#0073aa}.media-selection .button-link:focus,.media-selection .button-link:hover{color:#00a0d2}.media-selection .button-link:last-child{border-right:0;margin-right:0}.selection-info .clear-selection{color:#bc0b0b}.selection-info .clear-selection:focus,.selection-info .clear-selection:hover{color:red}.media-selection .attachments{height:48px;margin:6px;padding:0;overflow:hidden}.media-selection .attachment{width:40px;padding:0;margin:4px}.media-selection .attachment .thumbnail{top:0;right:0;bottom:0;left:0}.media-selection .attachment .icon{width:50%}.media-selection .attachment-preview{-webkit-box-shadow:none;box-shadow:none;background:0 0}.wp-core-ui .media-selection .attachment.details:focus,.wp-core-ui .media-selection .attachment:focus,.wp-core-ui .media-selection .selected.attachment:focus{-webkit-box-shadow:0 0 0 1px #fff,0 0 2px 3px #5b9dd9;box-shadow:0 0 0 1px #fff,0 0 2px 3px #5b9dd9}.wp-core-ui .media-selection .selected.attachment{-webkit-box-shadow:none;box-shadow:none}.wp-core-ui .media-selection .attachment.details{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 3px #0073aa;box-shadow:0 0 0 1px #fff,0 0 0 3px #0073aa}.media-selection:after{content:"";display:block;position:absolute;top:0;right:0;bottom:0;width:25px;background-image:-webkit-gradient(linear,right top,left top,from(rgba(255,255,255,1)),to(rgba(255,255,255,0)));background-image:-webkit-linear-gradient(right,rgba(255,255,255,1),rgba(255,255,255,0));background-image:linear-gradient(to left,rgba(255,255,255,1),rgba(255,255,255,0))}.media-selection .attachment .filename{display:none}.media-frame .spinner{background:url(../images/spinner.gif) no-repeat;-webkit-background-size:20px 20px;background-size:20px 20px;float:right;display:inline-block;visibility:hidden;opacity:.7;filter:alpha(opacity=70);width:20px;height:20px;margin:0;vertical-align:middle}.attachment-details.save-waiting .settings-save-status .spinner,.media-frame .embed-loading .embed-url .spinner,.media-frame .spinner.is-active{visibility:visible}.media-toolbar .spinner{margin-top:14px}.attachment-details{position:relative;overflow:auto}.attachment-details .settings-save-status{float:right;text-transform:none;z-index:10}.attachment-details .settings-save-status .spinner{margin-left:5px}.attachment-details .settings-save-status .saved{float:right;display:none}.attachment-details.save-complete .settings-save-status .saved{display:block}.attachment-info{overflow:hidden;min-height:60px;margin-bottom:16px;line-height:18px;color:#666;border-bottom:1px solid #ddd;padding-bottom:11px}.attachment-info .filename{font-weight:600;color:#444;word-wrap:break-word}.attachment-info .thumbnail{position:relative;float:left;max-width:120px;max-height:120px;margin-top:5px;margin-right:10px;margin-bottom:5px}.uploading .attachment-info .thumbnail{width:120px;height:80px;-webkit-box-shadow:inset 0 0 15px rgba(0,0,0,.1);box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.uploading .attachment-info .media-progress-bar{margin-top:35px}.attachment-info .thumbnail-image:after{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);overflow:hidden}.attachment-info .thumbnail img{display:block;max-width:120px;max-height:120px;margin:0 auto}.attachment-info .details{float:left;font-size:12px;max-width:100%}.attachment-info .delete-attachment,.attachment-info .edit-attachment,.attachment-info .trash-attachment,.attachment-info .untrash-attachment{display:block;text-decoration:none;white-space:nowrap}.attachment-details.needs-refresh .attachment-info .edit-attachment{display:none}.attachment-info .edit-attachment{display:block}.media-modal .delete-attachment,.media-modal .trash-attachment,.media-modal .untrash-attachment{display:inline;padding:0;color:#bc0b0b}.media-modal .delete-attachment:focus,.media-modal .delete-attachment:hover,.media-modal .trash-attachment:focus,.media-modal .trash-attachment:hover,.media-modal .untrash-attachment:focus,.media-modal .untrash-attachment:hover{color:red}.attachment-display-settings{width:100%;float:left;overflow:hidden}.attachment-display-settings h4{margin:1.4em 0 .4em}.collection-settings{overflow:hidden}.collection-settings .setting input[type=checkbox]{float:left;margin-right:8px}.collection-settings .setting span{min-width:inherit}.media-modal .imgedit-wrap{position:static}.media-modal .imgedit-wrap .imgedit-panel-content{padding:16px;position:absolute;top:0;right:282px;bottom:0;left:0;overflow:auto}.media-modal .imgedit-wrap .imgedit-settings{background:#f3f3f3;border-left:1px solid #ddd;padding:20px 16px 16px;position:absolute;top:0;right:0;bottom:0;width:250px;overflow:auto}.media-modal .imgedit-group{background:0 0;border:none;border-bottom:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;margin:0 0 16px;padding:0 0 16px;position:relative}.media-modal .imgedit-group:last-of-type{border:none;margin:0;padding:0}.media-modal .imgedit-group-top{margin:0}.media-modal .imgedit-group-top h2,.media-modal .imgedit-group-top h2 .button-link,.media-modal .imgedit-group-top h3{display:inline-block;text-transform:uppercase;font-size:12px;color:#666;margin:3px 0 0}.embed-url,.imgedit-thumbnail-preview-caption{display:block}.media-modal .imgedit-group-top h2 .button-link,.media-modal .imgedit-group-top h2 a,.media-modal .imgedit-group-top h3 a{text-decoration:none;color:#666}.wp-core-ui.media-modal .image-editor .imgedit-help-toggle,.wp-core-ui.media-modal .image-editor .imgedit-help-toggle:active,.wp-core-ui.media-modal .image-editor .imgedit-help-toggle:hover{border:1px solid transparent;margin:0;padding:0;background:0 0;color:#0074a2;font-size:20px;line-height:1;cursor:pointer;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-box-shadow:none;box-shadow:none}.wp-core-ui.media-modal .image-editor .imgedit-help-toggle:focus{color:#0074a2;border-color:#5b9dd9;outline:0;-webkit-box-shadow:0 0 3px rgba(0,115,170,.8);box-shadow:0 0 3px rgba(0,115,170,.8)}.wp-core-ui.media-modal .imgedit-group-top .dashicons-arrow-down.imgedit-help-toggle{margin-top:-3px}.wp-core-ui.media-modal .image-editor h3 .imgedit-help-toggle{margin-top:-2px}.media-modal .imgedit-help-toggled span.dashicons:before{content:"\f142"}.media-modal .imgedit-thumbnail-preview{margin:10px 8px 0 0}.media-modal .imgedit-wrap div.updated{margin:0 0 16px}.embed-url{position:relative;padding:16px;margin:0;z-index:250;background:#fff;font-size:18px}.media-frame .embed-url input{font-size:18px;padding:12px 14px;width:100%;min-width:200px;-webkit-box-shadow:inset 2px 2px 4px -2px rgba(0,0,0,.1);box-shadow:inset 2px 2px 4px -2px rgba(0,0,0,.1)}.media-frame .embed-url .spinner{position:absolute;top:32px;right:26px}.embed-link-settings,.embed-media-settings{position:absolute;top:70px;left:0;right:0;bottom:0;padding:16px 16px 32px;overflow:auto}.media-embed .embed-link-settings{overflow:visible}.embed-preview embed,.embed-preview iframe,.embed-preview img,.mejs-container video{max-width:100%;vertical-align:middle}.embed-preview a{display:inline-block}.embed-preview img{display:block;height:auto}.mejs-container:focus{outline:#5b9dd9 solid 1px;-webkit-box-shadow:0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 2px 1px rgba(30,140,190,.8)}.image-details .media-modal{left:140px;right:140px}.image-details .media-frame-content,.image-details .media-frame-router,.image-details .media-frame-title{left:0}.image-details .embed-media-settings{top:0;overflow:visible;padding:0}.image-details .embed-media-settings,.image-details .embed-media-settings div{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.image-details .column-settings{background:#f3f3f3;border-right:1px solid #ddd;min-height:100%;width:55%;position:absolute;top:0;left:0}.image-details .column-settings h2,.image-details .column-settings h3{margin:20px;padding-top:20px;border-top:1px solid #ddd;color:#23282d}.image-details .column-image{width:45%;position:absolute;left:55%;top:0}.image-details .image{margin:20px}.image-details .image img{max-width:100%;max-height:500px}.image-details .advanced-toggle{padding:0;color:#666;text-transform:uppercase}.image-details .advanced-toggle:after{font:400 20px/1 dashicons;speak:none;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f140";display:inline-block;margin-top:-2px}.image-details .advanced-visible .advanced-toggle:after{content:"\f142"}.image-details .embed-media-settings .size{margin-bottom:4px}.image-details .custom-size span{display:block}.image-details .custom-size label{display:block;float:left}.image-details .custom-size span small{color:#555d66;font-size:inherit}.image-details .custom-size input{width:5em}.image-details .custom-size .sep{float:left;margin:26px 6px 0}.image-details .custom-size:after{content:"";display:table;clear:both}.media-embed .thumbnail{max-width:100%;max-height:200px;position:relative;float:left}.media-embed .thumbnail img{max-height:200px;display:block}.media-embed .thumbnail:after{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);overflow:hidden}.media-embed .setting{width:100%;margin:10px 0;float:left;display:block;clear:both}.image-details .embed-media-settings .setting{float:none;width:auto}.image-details .actions{margin:10px 0}.image-details .hidden{display:none}.media-embed .setting input[type=text],.media-embed .setting textarea{display:block;width:100%;max-width:400px;margin:1px 0}.image-details .embed-media-settings .setting input[type=text],.image-details .embed-media-settings .setting textarea{max-width:inherit;width:70%}.image-details .embed-media-settings .custom-size,.image-details .embed-media-settings .link-target,.image-details .embed-media-settings .setting input.link-to-custom{margin-left:27%;width:70%}.image-details .embed-media-settings .link-target{margin-top:24px}.media-embed .setting input.hidden,.media-embed .setting textarea.hidden{display:none}.media-embed .setting span{display:block;width:200px;font-size:13px;line-height:24px;color:#666}.image-details .embed-media-settings .setting span{float:left;width:25%;text-align:right;margin:8px 1% 0;line-height:1.1}.media-embed .setting .button-group{margin:2px 0}.media-embed-sidebar{position:absolute;top:0;left:440px}.advanced-section,.link-settings{margin-top:10px}.wp-editor-wrap .uploader-editor{background:rgba(150,150,150,.9);position:absolute;top:0;left:0;width:100%;height:100%;z-index:99998;display:none;text-align:center}.wp-editor-wrap .uploader-editor-content{border:1px dashed #fff;position:absolute;top:10px;left:10px;right:10px;bottom:10px}.wp-editor-wrap .uploader-editor .uploader-editor-title{position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);font-size:3em;line-height:1.3;font-weight:600;color:#fff;padding:0;margin:0;display:none}.wp-editor-wrap .uploader-editor.droppable{background:rgba(0,86,132,.9)}.wp-editor-wrap .uploader-editor.droppable .uploader-editor-title{display:block}.ie7 .media-frame .attachments-browser{position:static}.ie7 .media-frame .embed-url input{margin-top:4px;width:90%}.ie7 .compat-item{width:99%}.ie7 .attachment-display-settings{width:auto}.ie7 .attachment-preview,.ie7 .attachment-preview .thumbnail{width:120px;height:120px}.ie7 .media-frame .attachment .describe{width:102px}.ie7 .media-sidebar .setting select{max-width:55%}.ie7 .media-sidebar .setting input[type=tel],.ie7 .media-sidebar .setting input[type=text],.ie7 .media-sidebar .setting input[type=password],.ie7 .media-sidebar .setting input[type=number],.ie7 .media-sidebar .setting input[type=search],.ie7 .media-sidebar .setting input[type=email],.ie7 .media-sidebar .setting input[type=url],.ie7 .media-sidebar .setting textarea{width:55%}.ie7 .media-sidebar .setting .link-to-custom{float:left}.rtl .media-frame,.rtl .media-frame .search,.rtl .media-frame input[type=tel],.rtl .media-frame input[type=text],.rtl .media-frame input[type=password],.rtl .media-frame input[type=number],.rtl .media-frame input[type=search],.rtl .media-frame input[type=email],.rtl .media-frame input[type=url],.rtl .media-frame select,.rtl .media-frame textarea,.rtl .media-modal{font-family:Tahoma,sans-serif}:lang(he-il) .rtl .media-frame,:lang(he-il) .rtl .media-frame .search,:lang(he-il) .rtl .media-frame input[type=text],:lang(he-il) .rtl .media-frame input[type=password],:lang(he-il) .rtl .media-frame input[type=number],:lang(he-il) .rtl .media-frame input[type=search],:lang(he-il) .rtl .media-frame input[type=email],:lang(he-il) .rtl .media-frame input[type=url],:lang(he-il) .rtl .media-frame select,:lang(he-il) .rtl .media-frame textarea,:lang(he-il) .rtl .media-modal{font-family:Arial,sans-serif}@media only screen and (max-width:900px){.media-frame:not(.hide-menu) .media-frame-content,.media-frame:not(.hide-menu) .media-frame-router,.media-frame:not(.hide-menu) .media-frame-title,.media-frame:not(.hide-menu) .media-frame-toolbar{left:0}.media-frame:not(.hide-menu) .media-frame-menu{position:static;width:0}.media-frame:not(.hide-menu) .media-menu{width:auto;max-width:80%;overflow:auto;z-index:2000;top:50px;left:-300px;right:auto;bottom:auto;padding:5px 0;border:1px solid #ccc}.media-frame:not(.hide-menu) .media-menu.visible{left:0}.media-frame:not(.hide-menu) .media-menu>a{padding:12px 16px;font-size:16px}.media-frame:not(.hide-menu) .media-menu>a.active{display:none}.media-frame:not(.hide-menu) .media-menu .separator{margin:5px 10px}.media-frame:not(.hide-menu) .media-frame-title{left:0}.media-frame:not(.hide-menu) .media-frame-title .dashicons{display:inline-block;line-height:50px}.media-frame:not(.hide-menu) .media-frame-title h1{color:#0073aa;line-height:3;font-size:18px;float:left;cursor:pointer}.media-sidebar{width:230px}.attachments-browser .attachments,.attachments-browser .media-toolbar,.attachments-browser .uploader-inline{right:262px}.attachment-details .setting,.media-sidebar .setting{margin:6px 0}.attachment-details .setting input,.attachment-details .setting span,.attachment-details .setting textarea,.compat-item label span,.media-sidebar .setting input,.media-sidebar .setting span,.media-sidebar .setting textarea{float:none}.attachment-details .setting span,.compat-item label span,.media-sidebar .setting span{text-align:inherit;min-height:16px;margin:0;padding:8px 2px 0}.attachment-details .setting .value,.media-sidebar .setting .value{float:none;width:auto}.attachment-details .setting input[type=tel],.attachment-details .setting input[type=text],.attachment-details .setting input[type=password],.attachment-details .setting input[type=number],.attachment-details .setting input[type=search],.attachment-details .setting input[type=email],.attachment-details .setting input[type=url],.attachment-details .setting select,.attachment-details .setting textarea,.media-sidebar .setting input[type=tel],.media-sidebar .setting input[type=text],.media-sidebar .setting input[type=password],.media-sidebar .setting input[type=number],.media-sidebar .setting input[type=search],.media-sidebar .setting input[type=email],.media-sidebar .setting input[type=url],.media-sidebar .setting select,.media-sidebar .setting textarea{float:none;width:98%;max-width:none;height:auto}.attachment-details .setting select.columns,.media-sidebar .setting select.columns{width:auto}.media-frame .search,.media-frame input,.media-frame textarea{padding:3px 6px}.image-details .column-image{width:30%;left:70%}.image-details .column-settings{width:70%}.image-details .media-modal{left:30px;right:30px}.image-details .embed-media-settings .setting{margin:20px}.image-details .embed-media-settings .setting span{float:none;text-align:left;width:100%;margin-bottom:4px}.image-details .embed-media-settings .setting input.link-to-custom,.image-details .embed-media-settings .setting input[type=text],.image-details .embed-media-settings .setting textarea{width:100%;margin-left:0}.image-details .embed-media-settings .custom-size{margin-left:20px}.collection-settings .setting input[type=checkbox]{margin-top:0}.media-selection{min-width:120px}.media-selection:after{background:0 0}.media-selection .attachments{display:none}.media-modal .attachments-browser .media-toolbar .search{max-width:100%;height:auto;float:right}.media-modal .attachments-browser .media-toolbar .attachment-filters{height:auto}.media-modal .attachments-browser .media-toolbar .spinner{margin:14px 2px 0}.media-frame input[type=text],.media-frame input[type=password],.media-frame input[type=number],.media-frame input[type=search],.media-frame input[type=email],.media-frame input[type=url],.media-frame select,.media-frame textarea{font-size:16px}}@media only screen and (max-width:640px),screen and (max-height:400px){.image-details .media-modal,.media-modal{position:fixed;top:0;left:0;right:0;bottom:0}.media-modal-backdrop{position:fixed}.media-sidebar{z-index:1900;max-width:70%;bottom:120%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding-bottom:0}.media-sidebar.visible{bottom:0}.attachments-browser .attachments,.attachments-browser .media-toolbar,.attachments-browser .uploader-inline{right:0}.image-details .media-frame-title{display:block;top:0;font-size:14px}.image-details .column-image,.image-details .column-settings{width:100%;position:relative;left:0}.image-details .column-settings{padding:4px 0}.media-frame-content .media-toolbar .instructions{display:none}}@media screen and (max-height:400px){.media-menu{padding:0}.media-frame-router{top:44px}.media-frame-content{top:78px}.attachments-browser .attachments{top:40px}.embed-link-settings{overflow:visible}}@media only screen and (max-width:480px){.media-modal-close{top:-5px}.media-modal .media-frame-title{height:40px}.wp-core-ui.wp-customizer .media-button{margin-top:13px}.media-frame:not(.hide-menu) .media-frame-title h1,.media-modal .media-frame-title h1{font-size:18px;line-height:40px}.media-frame:not(.hide-menu) .media-frame-title .dashicons{line-height:40px}.media-frame-router,.media-frame:not(.hide-menu) .media-menu{top:40px}.media-frame-content{top:74px}.media-frame.hide-router .media-frame-content{top:40px}}@media print,(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.wp-core-ui .media-modal-icon{background-image:url(../images/uploader-icons-2x.png);-webkit-background-size:134px 15px;background-size:134px 15px}.media-frame .spinner{background-image:url(../images/spinner-2x.gif)}}.media-frame-content[data-columns="1"] .attachment{width:100%}.media-frame-content[data-columns="2"] .attachment{width:50%}.media-frame-content[data-columns="3"] .attachment{width:33.33%}.media-frame-content[data-columns="4"] .attachment{width:25%}.media-frame-content[data-columns="5"] .attachment{width:20%}.media-frame-content[data-columns="6"] .attachment{width:16.66%}.media-frame-content[data-columns="7"] .attachment{width:14.28%}.media-frame-content[data-columns="8"] .attachment{width:12.5%}.media-frame-content[data-columns="9"] .attachment{width:11.11%}.media-frame-content[data-columns="10"] .attachment{width:10%}.media-frame-content[data-columns="11"] .attachment{width:9.09%}.media-frame-content[data-columns="12"] .attachment{width:8.33%}
\ No newline at end of file
index d91bdb65f210445e7ee5b5fad7802704317b0631..10ff56ef561eb13025af950ef32924ce05216f26 100644 (file)
@@ -59,7 +59,10 @@ body {
 
 .wp-embed {
        padding: 25px;
-       font: 400 14px/1.5 'Open Sans', sans-serif;
+       font-size: 14px;
+       font-weight: 400;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+       line-height: 1.5;
        color: #82878c;
        background: white;
        border: 1px solid #e5e5e5;
@@ -101,7 +104,7 @@ body {
 
 p.wp-embed-heading {
        margin: 0 0 15px;
-       font-weight: bold;
+       font-weight: 600;
        font-size: 22px;
        line-height: 1.3;
 }
@@ -133,7 +136,7 @@ p.wp-embed-heading {
 }
 
 .wp-embed-site-title {
-       font-weight: bold;
+       font-weight: 600;
        line-height: 25px;
 }
 
@@ -307,7 +310,10 @@ p.wp-embed-share-description {
        height: 28px;
        margin: 0 0 10px 0;
        padding: 0 5px;
-       font: 400 14px/1.5 'Open Sans', sans-serif;
+       font-size: 14px;
+       font-weight: 400;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+       line-height: 1.5;
        resize: none;
        cursor: text;
 }
index 262b4720d1daaf023d892050151e15515520ea58..955837584b475152ccaf4ca6b8072b27a5ddb710 100644 (file)
@@ -1 +1 @@
-body,html{padding:0;margin:0}body{font-family:sans-serif}.screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px}.dashicons{display:inline-block;width:20px;height:20px;background-color:transparent;background-repeat:no-repeat;-webkit-background-size:20px 20px;background-size:20px;background-position:center;-webkit-transition:background .1s ease-in;transition:background .1s ease-in;position:relative;top:5px}.dashicons-no{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M15.55%2013.7l-2.19%202.06-3.42-3.65-3.64%203.43-2.06-2.18%203.64-3.43-3.42-3.64%202.18-2.06%203.43%203.64%203.64-3.42%202.05%202.18-3.64%203.43z%27%20fill%3D%27%23fff%27%2F%3E%3C%2Fsvg%3E")}.dashicons-admin-comments{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E")}.wp-embed-comments a:hover .dashicons-admin-comments{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E")}.dashicons-share{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E");display:none}.js .dashicons-share{display:inline-block}.wp-embed-share-dialog-open:hover .dashicons-share{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E")}.wp-embed{padding:25px;font:400 14px/1.5 'Open Sans',sans-serif;color:#82878c;background:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05);overflow:auto;zoom:1}.wp-embed a{color:#82878c;text-decoration:none}.wp-embed a:hover{text-decoration:underline}.wp-embed-featured-image{margin-bottom:20px}.wp-embed-featured-image img{width:100%;height:auto;border:none}.wp-embed-featured-image.square{float:left;max-width:160px;margin-right:20px}.wp-embed p{margin:0}p.wp-embed-heading{margin:0 0 15px;font-weight:700;font-size:22px;line-height:1.3}.wp-embed-heading a{color:#32373c}.wp-embed .wp-embed-more{color:#b4b9be}.wp-embed-footer{display:table;width:100%;margin-top:30px}.wp-embed-site-icon{position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);height:25px;width:25px;border:0}.wp-embed-site-title{font-weight:700;line-height:25px}.wp-embed-site-title a{position:relative;display:inline-block;padding-left:35px}.wp-embed-meta,.wp-embed-site-title{display:table-cell}.wp-embed-meta{text-align:right;white-space:nowrap;vertical-align:middle}.wp-embed-comments,.wp-embed-share{display:inline}.wp-embed-comments a,.wp-embed-share-tab-button{display:inline-block}.wp-embed-meta a:hover{text-decoration:none;color:#0073aa}.wp-embed-comments a{line-height:25px}.wp-embed-comments+.wp-embed-share{margin-left:10px}.wp-embed-share-dialog{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#222;background-color:rgba(10,10,10,.9);color:#fff;opacity:1;-webkit-transition:opacity .25s ease-in-out;transition:opacity .25s ease-in-out}.wp-embed-share-dialog.hidden{opacity:0;visibility:hidden}.wp-embed-share-dialog-close,.wp-embed-share-dialog-open{margin:-8px 0 0;padding:0;background:0 0;border:none;cursor:pointer;outline:0}.wp-embed-share-dialog-close .dashicons,.wp-embed-share-dialog-open .dashicons{padding:4px}.wp-embed-share-dialog-open .dashicons{top:8px}.wp-embed-share-dialog-close:focus .dashicons,.wp-embed-share-dialog-open:focus .dashicons{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);-webkit-border-radius:100%;border-radius:100%}.wp-embed-share-dialog-close{position:absolute;top:20px;right:20px;font-size:22px}.wp-embed-share-dialog-close:hover{text-decoration:none}.wp-embed-share-dialog-close .dashicons{height:24px;width:24px;-webkit-background-size:24px 24px;background-size:24px}.wp-embed-share-dialog-content{height:100%;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;overflow:hidden}.wp-embed-share-dialog-text{margin-top:25px;padding:20px}.wp-embed-share-tabs{margin:0 0 20px;padding:0;list-style:none}.wp-embed-share-tab-button button{margin:0;padding:0;border:none;background:0 0;font-size:16px;line-height:1.3;color:#aaa;cursor:pointer;-webkit-transition:color .1s ease-in;transition:color .1s ease-in}.wp-embed-share-tab-button [aria-selected=true],.wp-embed-share-tab-button button:hover{color:#fff}.wp-embed-share-tab-button+.wp-embed-share-tab-button{margin:0 0 0 10px;padding:0 0 0 11px;border-left:1px solid #aaa}.wp-embed-share-tab[aria-hidden=true]{display:none}p.wp-embed-share-description{margin:0;font-size:14px;line-height:1;font-style:italic;color:#aaa}.wp-embed-share-input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;border:none;height:28px;margin:0 0 10px;padding:0 5px;font:400 14px/1.5 'Open Sans',sans-serif;resize:none;cursor:text}textarea.wp-embed-share-input{height:72px}html[dir=rtl] .wp-embed-featured-image.square{float:right;margin-right:0;margin-left:20px}html[dir=rtl] .wp-embed-site-title a{padding-left:0;padding-right:35px}html[dir=rtl] .wp-embed-site-icon{margin-right:0;margin-left:10px;left:auto;right:0}html[dir=rtl] .wp-embed-meta{text-align:left}html[dir=rtl] .wp-embed-share{margin-left:0;margin-right:10px}html[dir=rtl] .wp-embed-share-dialog-close{right:auto;left:20px}html[dir=rtl] .wp-embed-share-tab-button+.wp-embed-share-tab-button{margin:0 10px 0 0;padding:0 11px 0 0;border-left:none;border-right:1px solid #aaa}
\ No newline at end of file
+body,html{padding:0;margin:0}body{font-family:sans-serif}.wp-embed,.wp-embed-share-input{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px}.dashicons{display:inline-block;width:20px;height:20px;background-color:transparent;background-repeat:no-repeat;-webkit-background-size:20px 20px;background-size:20px;background-position:center;-webkit-transition:background .1s ease-in;transition:background .1s ease-in;position:relative;top:5px}.dashicons-no{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M15.55%2013.7l-2.19%202.06-3.42-3.65-3.64%203.43-2.06-2.18%203.64-3.43-3.42-3.64%202.18-2.06%203.43%203.64%203.64-3.42%202.05%202.18-3.64%203.43z%27%20fill%3D%27%23fff%27%2F%3E%3C%2Fsvg%3E")}.dashicons-admin-comments{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E")}.wp-embed-comments a:hover .dashicons-admin-comments{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E")}.dashicons-share{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E");display:none}.js .dashicons-share{display:inline-block}.wp-embed-share-dialog-open:hover .dashicons-share{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E")}.wp-embed{padding:25px;font-size:14px;font-weight:400;line-height:1.5;color:#82878c;background:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05);overflow:auto;zoom:1}.wp-embed a{color:#82878c;text-decoration:none}.wp-embed a:hover{text-decoration:underline}.wp-embed-featured-image{margin-bottom:20px}.wp-embed-featured-image img{width:100%;height:auto;border:none}.wp-embed-featured-image.square{float:left;max-width:160px;margin-right:20px}.wp-embed p{margin:0}p.wp-embed-heading{margin:0 0 15px;font-weight:600;font-size:22px;line-height:1.3}.wp-embed-heading a{color:#32373c}.wp-embed .wp-embed-more{color:#b4b9be}.wp-embed-footer{display:table;width:100%;margin-top:30px}.wp-embed-site-icon{position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);height:25px;width:25px;border:0}.wp-embed-site-title{font-weight:600;line-height:25px}.wp-embed-site-title a{position:relative;display:inline-block;padding-left:35px}.wp-embed-meta,.wp-embed-site-title{display:table-cell}.wp-embed-meta{text-align:right;white-space:nowrap;vertical-align:middle}.wp-embed-comments,.wp-embed-share{display:inline}.wp-embed-comments a,.wp-embed-share-tab-button{display:inline-block}.wp-embed-meta a:hover{text-decoration:none;color:#0073aa}.wp-embed-comments a{line-height:25px}.wp-embed-comments+.wp-embed-share{margin-left:10px}.wp-embed-share-dialog{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#222;background-color:rgba(10,10,10,.9);color:#fff;opacity:1;-webkit-transition:opacity .25s ease-in-out;transition:opacity .25s ease-in-out}.wp-embed-share-dialog.hidden{opacity:0;visibility:hidden}.wp-embed-share-dialog-close,.wp-embed-share-dialog-open{margin:-8px 0 0;padding:0;background:0 0;border:none;cursor:pointer;outline:0}.wp-embed-share-dialog-close .dashicons,.wp-embed-share-dialog-open .dashicons{padding:4px}.wp-embed-share-dialog-open .dashicons{top:8px}.wp-embed-share-dialog-close:focus .dashicons,.wp-embed-share-dialog-open:focus .dashicons{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);-webkit-border-radius:100%;border-radius:100%}.wp-embed-share-dialog-close{position:absolute;top:20px;right:20px;font-size:22px}.wp-embed-share-dialog-close:hover{text-decoration:none}.wp-embed-share-dialog-close .dashicons{height:24px;width:24px;-webkit-background-size:24px 24px;background-size:24px}.wp-embed-share-dialog-content{height:100%;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;overflow:hidden}.wp-embed-share-dialog-text{margin-top:25px;padding:20px}.wp-embed-share-tabs{margin:0 0 20px;padding:0;list-style:none}.wp-embed-share-tab-button button{margin:0;padding:0;border:none;background:0 0;font-size:16px;line-height:1.3;color:#aaa;cursor:pointer;-webkit-transition:color .1s ease-in;transition:color .1s ease-in}.wp-embed-share-tab-button [aria-selected=true],.wp-embed-share-tab-button button:hover{color:#fff}.wp-embed-share-tab-button+.wp-embed-share-tab-button{margin:0 0 0 10px;padding:0 0 0 11px;border-left:1px solid #aaa}.wp-embed-share-tab[aria-hidden=true]{display:none}p.wp-embed-share-description{margin:0;font-size:14px;line-height:1;font-style:italic;color:#aaa}.wp-embed-share-input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;border:none;height:28px;margin:0 0 10px;padding:0 5px;font-size:14px;font-weight:400;line-height:1.5;resize:none;cursor:text}textarea.wp-embed-share-input{height:72px}html[dir=rtl] .wp-embed-featured-image.square{float:right;margin-right:0;margin-left:20px}html[dir=rtl] .wp-embed-site-title a{padding-left:0;padding-right:35px}html[dir=rtl] .wp-embed-site-icon{margin-right:0;margin-left:10px;left:auto;right:0}html[dir=rtl] .wp-embed-meta{text-align:left}html[dir=rtl] .wp-embed-share{margin-left:0;margin-right:10px}html[dir=rtl] .wp-embed-share-dialog-close{right:auto;left:20px}html[dir=rtl] .wp-embed-share-tab-button+.wp-embed-share-tab-button{margin:0 10px 0 0;padding:0 11px 0 0;border-left:none;border-right:1px solid #aaa}
\ No newline at end of file
index 8bbb572b8f0079e63e56417be4587cfd513ce2df..9852de6ddc42fc414d6ac0393c3b9876eba81995 100644 (file)
@@ -121,15 +121,12 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
                                <# if (data.random) { #>
 
                        <div class="placeholder">
-                               <div class="inner">
-                                       <span><span class="dashicons dashicons-randomize dice"></span>
-                                       <# if ( data.type === 'uploaded' ) { #>
-                                               <?php _e( 'Randomizing uploaded headers' ); ?>
-                                       <# } else if ( data.type === 'default' ) { #>
-                                               <?php _e( 'Randomizing suggested headers' ); ?>
-                                       <# } #>
-                                       </span>
-                               </div>
+                               <span class="dashicons dashicons-randomize dice"></span>
+                               <# if ( data.type === 'uploaded' ) { #>
+                                       <?php _e( 'Randomizing uploaded headers' ); ?>
+                               <# } else if ( data.type === 'default' ) { #>
+                                       <?php _e( 'Randomizing suggested headers' ); ?>
+                               <# } #>
                        </div>
 
                                <# } else { #>
@@ -140,11 +137,7 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
                        <# } else { #>
 
                        <div class="placeholder">
-                               <div class="inner">
-                                       <span>
-                                               <?php _e( 'No image set' ); ?>
-                                       </span>
-                               </div>
+                               <?php _e( 'No image set' ); ?>
                        </div>
 
                        <# } #>
index 4793b255bd5558c15a995b16ccca9842b0fa60d6..f3ec32b41dfe7c1c5ecd6904eb8d863179e76664 100644 (file)
@@ -154,72 +154,62 @@ class WP_Customize_Media_Control extends WP_Customize_Control {
                </label>
 
                <# if ( data.attachment && data.attachment.id ) { #>
-                       <div class="current">
-                               <div class="container">
-                                       <div class="attachment-media-view attachment-media-view-{{ data.attachment.type }} {{ data.attachment.orientation }}">
-                                               <div class="thumbnail thumbnail-{{ data.attachment.type }}">
-                                                       <# if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.medium ) { #>
-                                                               <img class="attachment-thumb" src="{{ data.attachment.sizes.medium.url }}" draggable="false" alt="" />
-                                                       <# } else if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.full ) { #>
-                                                               <img class="attachment-thumb" src="{{ data.attachment.sizes.full.url }}" draggable="false" alt="" />
-                                                       <# } else if ( 'audio' === data.attachment.type ) { #>
-                                                               <# if ( data.attachment.image && data.attachment.image.src && data.attachment.image.src !== data.attachment.icon ) { #>
-                                                                       <img src="{{ data.attachment.image.src }}" class="thumbnail" draggable="false" alt="" />
-                                                               <# } else { #>
-                                                                       <img src="{{ data.attachment.icon }}" class="attachment-thumb type-icon" draggable="false" alt="" />
-                                                               <# } #>
-                                                               <p class="attachment-meta attachment-meta-title">&#8220;{{ data.attachment.title }}&#8221;</p>
-                                                               <# if ( data.attachment.album || data.attachment.meta.album ) { #>
-                                                               <p class="attachment-meta"><em>{{ data.attachment.album || data.attachment.meta.album }}</em></p>
-                                                               <# } #>
-                                                               <# if ( data.attachment.artist || data.attachment.meta.artist ) { #>
-                                                               <p class="attachment-meta">{{ data.attachment.artist || data.attachment.meta.artist }}</p>
-                                                               <# } #>
-                                                               <audio style="visibility: hidden" controls class="wp-audio-shortcode" width="100%" preload="none">
-                                                                       <source type="{{ data.attachment.mime }}" src="{{ data.attachment.url }}"/>
-                                                               </audio>
-                                                       <# } else if ( 'video' === data.attachment.type ) { #>
-                                                               <div class="wp-media-wrapper wp-video">
-                                                                       <video controls="controls" class="wp-video-shortcode" preload="metadata"
-                                                                               <# if ( data.attachment.image && data.attachment.image.src !== data.attachment.icon ) { #>poster="{{ data.attachment.image.src }}"<# } #>>
-                                                                               <source type="{{ data.attachment.mime }}" src="{{ data.attachment.url }}"/>
-                                                                       </video>
-                                                               </div>
-                                                       <# } else { #>
-                                                               <img class="attachment-thumb type-icon icon" src="{{ data.attachment.icon }}" draggable="false" alt="" />
-                                                               <p class="attachment-title">{{ data.attachment.title }}</p>
-                                                       <# } #>
+                       <div class="attachment-media-view attachment-media-view-{{ data.attachment.type }} {{ data.attachment.orientation }}">
+                               <div class="thumbnail thumbnail-{{ data.attachment.type }}">
+                                       <# if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.medium ) { #>
+                                               <img class="attachment-thumb" src="{{ data.attachment.sizes.medium.url }}" draggable="false" alt="" />
+                                       <# } else if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.full ) { #>
+                                               <img class="attachment-thumb" src="{{ data.attachment.sizes.full.url }}" draggable="false" alt="" />
+                                       <# } else if ( 'audio' === data.attachment.type ) { #>
+                                               <# if ( data.attachment.image && data.attachment.image.src && data.attachment.image.src !== data.attachment.icon ) { #>
+                                                       <img src="{{ data.attachment.image.src }}" class="thumbnail" draggable="false" alt="" />
+                                               <# } else { #>
+                                                       <img src="{{ data.attachment.icon }}" class="attachment-thumb type-icon" draggable="false" alt="" />
+                                               <# } #>
+                                               <p class="attachment-meta attachment-meta-title">&#8220;{{ data.attachment.title }}&#8221;</p>
+                                               <# if ( data.attachment.album || data.attachment.meta.album ) { #>
+                                               <p class="attachment-meta"><em>{{ data.attachment.album || data.attachment.meta.album }}</em></p>
+                                               <# } #>
+                                               <# if ( data.attachment.artist || data.attachment.meta.artist ) { #>
+                                               <p class="attachment-meta">{{ data.attachment.artist || data.attachment.meta.artist }}</p>
+                                               <# } #>
+                                               <audio style="visibility: hidden" controls class="wp-audio-shortcode" width="100%" preload="none">
+                                                       <source type="{{ data.attachment.mime }}" src="{{ data.attachment.url }}"/>
+                                               </audio>
+                                       <# } else if ( 'video' === data.attachment.type ) { #>
+                                               <div class="wp-media-wrapper wp-video">
+                                                       <video controls="controls" class="wp-video-shortcode" preload="metadata"
+                                                               <# if ( data.attachment.image && data.attachment.image.src !== data.attachment.icon ) { #>poster="{{ data.attachment.image.src }}"<# } #>>
+                                                               <source type="{{ data.attachment.mime }}" src="{{ data.attachment.url }}"/>
+                                                       </video>
                                                </div>
-                                       </div>
+                                       <# } else { #>
+                                               <img class="attachment-thumb type-icon icon" src="{{ data.attachment.icon }}" draggable="false" alt="" />
+                                               <p class="attachment-title">{{ data.attachment.title }}</p>
+                                       <# } #>
+                               </div>
+                               <div class="actions">
+                                       <# if ( data.canUpload ) { #>
+                                       <button type="button" class="button remove-button">{{ data.button_labels.remove }}</button>
+                                       <button type="button" class="button upload-button control-focus" id="{{ data.settings['default'] }}-button">{{ data.button_labels.change }}</button>
+                                       <div style="clear:both"></div>
+                                       <# } #>
                                </div>
-                       </div>
-                       <div class="actions">
-                               <# if ( data.canUpload ) { #>
-                               <button type="button" class="button remove-button">{{ data.button_labels.remove }}</button>
-                               <button type="button" class="button upload-button control-focus" id="{{ data.settings['default'] }}-button">{{ data.button_labels.change }}</button>
-                               <div style="clear:both"></div>
-                               <# } #>
                        </div>
                <# } else { #>
-                       <div class="current">
-                               <div class="container">
-                                       <div class="placeholder">
-                                               <div class="inner">
-                                                       <span>
-                                                               {{ data.button_labels.placeholder }}
-                                                       </span>
-                                               </div>
-                                       </div>
+                       <div class="attachment-media-view">
+                               <div class="placeholder">
+                                               {{ data.button_labels.placeholder }}
+                               </div>
+                               <div class="actions">
+                                       <# if ( data.defaultAttachment ) { #>
+                                               <button type="button" class="button default-button">{{ data.button_labels['default'] }}</button>
+                                       <# } #>
+                                       <# if ( data.canUpload ) { #>
+                                       <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button">{{ data.button_labels.select }}</button>
+                                       <# } #>
+                                       <div style="clear:both"></div>
                                </div>
-                       </div>
-                       <div class="actions">
-                               <# if ( data.defaultAttachment ) { #>
-                                       <button type="button" class="button default-button">{{ data.button_labels['default'] }}</button>
-                               <# } #>
-                               <# if ( data.canUpload ) { #>
-                               <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button">{{ data.button_labels.select }}</button>
-                               <# } #>
-                               <div style="clear:both"></div>
                        </div>
                <# } #>
                <?php
index c7e58cde67c94b890ea78dbaaf7982569ebaf19d..4236723599c02682d0dbe3b630ce5edaa05b36ed 100644 (file)
@@ -41,7 +41,7 @@ class WP_Customize_Nav_Menu_Auto_Add_Control extends WP_Customize_Control {
         */
        protected function content_template() {
                ?>
-               <span class="customize-control-title"><?php _e( 'Menu options' ); ?></span>
+               <span class="customize-control-title"><?php _e( 'Menu Options' ); ?></span>
                <label>
                        <input type="checkbox" class="auto_add" />
                        <?php _e( 'Automatically add new top-level pages to this menu' ); ?>
index f1384430d5fc6a4fed247fada1f32177f8c18605..7dfd187218eff961e912e82c65fb2b77a807ba88 100644 (file)
@@ -64,7 +64,7 @@ class WP_Customize_Nav_Menu_Control extends WP_Customize_Control {
                <?php if ( current_theme_supports( 'menus' ) ) : ?>
                <ul class="menu-settings">
                        <li class="customize-control">
-                               <span class="customize-control-title"><?php _e( 'Menu locations' ); ?></span>
+                               <span class="customize-control-title"><?php _e( 'Menu Locations' ); ?></span>
                        </li>
 
                        <?php foreach ( get_registered_nav_menus() as $location => $description ) : ?>
index 0bbee67e2fcb937c915d5824cf440f436f98e3ab..c71ab09754def899deaf72901bb29f5c60c0e5de 100644 (file)
@@ -132,6 +132,8 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
        /**
         * Status for calling the update method, used in customize_save_response filter.
         *
+        * See {@see 'customize_save_response'}.
+        *
         * When status is inserted, the placeholder post ID is stored in $previous_post_id.
         * When status is error, the error is stored in $update_error.
         *
@@ -404,7 +406,7 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
        }
 
        /**
-        * Filter the wp_get_nav_menu_items() result to supply the previewed menu items.
+        * Filters the wp_get_nav_menu_items() result to supply the previewed menu items.
         *
         * @since 4.3.0
         * @access public
@@ -570,6 +572,9 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
                /** This filter is documented in wp-includes/nav-menu.php */
                $post->description = apply_filters( 'nav_menu_description', wp_trim_words( $post->description, 200 ) );
 
+               /** This filter is documented in wp-includes/nav-menu.php */
+               $post = apply_filters( 'wp_setup_nav_menu_item', $post );
+
                return $post;
        }
 
@@ -655,11 +660,11 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
        }
 
        /**
-        * Create/update the nav_menu_item post for this setting.
+        * Creates/updates the nav_menu_item post for this setting.
         *
         * Any created menu items will have their assigned post IDs exported to the client
-        * via the customize_save_response filter. Likewise, any errors will be exported
-        * to the client via the customize_save_response() filter.
+        * via the {@see 'customize_save_response'} filter. Likewise, any errors will be
+        * exported to the client via the customize_save_response() filter.
         *
         * To delete a menu, the client can send false as the value.
         *
index 80ba741383b6465473b2e9bffcaff79bf525c34f..68cd7bffc0c0db9e8f08bce8736e1e472fab825d 100644 (file)
@@ -77,6 +77,7 @@ class WP_Customize_Nav_Menu_Location_Control extends WP_Customize_Control {
                                ?>
                        </select>
                </label>
+               <button type="button" class="button-link edit-menu<?php if ( ! $this->value() ) { echo ' hidden'; } ?>" aria-label="<?php esc_attr_e( 'Edit selected menu' ); ?>"><?php _e( 'Edit Menu' ); ?></button>
                <?php
        }
 }
index fb5eb768911e47ab1b193620b58da7ff0f93e0d5..5518b34705dedc4d4e67a9361e4f9995a31af70d 100644 (file)
@@ -36,7 +36,7 @@ class WP_Customize_Nav_Menu_Section extends WP_Customize_Section {
         */
        public function json() {
                $exported = parent::json();
-               $exported['menu_id'] = intval( preg_replace( '/^nav_menu\[(\d+)\]/', '$1', $this->id ) );
+               $exported['menu_id'] = intval( preg_replace( '/^nav_menu\[(-?\d+)\]/', '$1', $this->id ) );
 
                return $exported;
        }
index 8d6436c68cabdbe8827db06f90baf4ca243603f9..0275c79a0113786d868580b761cb3eb1a4797991 100644 (file)
@@ -74,7 +74,7 @@ class WP_Customize_Nav_Menu_Setting extends WP_Customize_Setting {
        /**
         * Previous (placeholder) term ID used before creating a new menu.
         *
-        * This value will be exported to JS via the customize_save_response filter
+        * This value will be exported to JS via the {@see 'customize_save_response'} filter
         * so that JavaScript can update the settings to refer to the newly-assigned
         * term ID. This value is always negative to indicate it does not refer to
         * a real term.
@@ -100,8 +100,10 @@ class WP_Customize_Nav_Menu_Setting extends WP_Customize_Setting {
        /**
         * Status for calling the update method, used in customize_save_response filter.
         *
-        * When status is inserted, the placeholder term ID is stored in $previous_term_id.
-        * When status is error, the error is stored in $update_error.
+        * See {@see 'customize_save_response'}.
+        *
+        * When status is inserted, the placeholder term ID is stored in `$previous_term_id`.
+        * When status is error, the error is stored in `$update_error`.
         *
         * @since 4.3.0
         * @access public
@@ -235,7 +237,7 @@ class WP_Customize_Nav_Menu_Setting extends WP_Customize_Setting {
        }
 
        /**
-        * Filter the wp_get_nav_menus() result to ensure the inserted menu object is included, and the deleted one is removed.
+        * Filters the wp_get_nav_menus() result to ensure the inserted menu object is included, and the deleted one is removed.
         *
         * @since 4.3.0
         * @access public
@@ -324,7 +326,7 @@ class WP_Customize_Nav_Menu_Setting extends WP_Customize_Setting {
        }
 
        /**
-        * Filter the wp_get_nav_menu_object() result to supply the previewed menu object.
+        * Filters the wp_get_nav_menu_object() result to supply the previewed menu object.
         *
         * Requesting a nav_menu object by anything but ID is not supported.
         *
@@ -375,7 +377,7 @@ class WP_Customize_Nav_Menu_Setting extends WP_Customize_Setting {
        }
 
        /**
-        * Filter the nav_menu_options option to include this menu's auto_add preference.
+        * Filters the nav_menu_options option to include this menu's auto_add preference.
         *
         * @since 4.3.0
         * @access public
@@ -447,6 +449,8 @@ class WP_Customize_Nav_Menu_Setting extends WP_Customize_Setting {
        /**
         * Storage for data to be sent back to client in customize_save_response filter.
         *
+        * See {@see 'customize_save_response'}.
+        *
         * @access protected
         * @since 4.3.0
         * @var array
@@ -459,7 +463,7 @@ class WP_Customize_Nav_Menu_Setting extends WP_Customize_Setting {
         * Create/update the nav_menu term for this setting.
         *
         * Any created menus will have their assigned term IDs exported to the client
-        * via the customize_save_response filter. Likewise, any errors will be exported
+        * via the {@see 'customize_save_response'} filter. Likewise, any errors will be exported
         * to the client via the customize_save_response() filter.
         *
         * To delete a menu, the client can send false as the value.
index f90f0f988b3908ead0bb823b4685aec6ef0dc230..245d32a27bc4bf95067c10aadcdc29eebb075085 100644 (file)
@@ -402,6 +402,10 @@ final class WP_Customize_Selective_Refresh {
                        $response['errors'] = $this->triggered_errors;
                }
 
+               $setting_validities = $this->manager->validate_setting_values( $this->manager->unsanitized_post_values() );
+               $exported_setting_validities = array_map( array( $this->manager, 'prepare_setting_validity_for_js' ), $setting_validities );
+               $response['setting_validities'] = $exported_setting_validities;
+
                /**
                 * Filters the response from rendering the partials.
                 *
index 69dea75ed02b41326419c314cfde960da3f79dfd..58fea537575ac81a9937095f12db7fb7d059a40f 100644 (file)
@@ -60,49 +60,43 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control
                </label>
 
                <# if ( data.attachment && data.attachment.id ) { #>
-               <# if ( data.attachment.sizes ) { #>
-               <div class="current">
-                       <div class="container">
-                               <div class="site-icon-preview">
-                                       <div class="favicon-preview">
-                                               <img src="<?php echo esc_url( admin_url( 'images/browser.png' ) ); ?>" class="browser-preview" width="182" alt="<?php esc_attr_e( 'Browser interface preview' ); ?>" />
+                       <div class="attachment-media-view">
+                               <# if ( data.attachment.sizes ) { #>
+                                       <div class="site-icon-preview">
+                                               <div class="favicon-preview">
+                                                       <img src="<?php echo esc_url( admin_url( 'images/' . ( is_rtl() ? 'browser-rtl.png' : 'browser.png' ) ) ); ?>" class="browser-preview" width="182" alt="" />
 
-                                               <div class="favicon">
-                                                       <img id="preview-favicon" src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
+                                                       <div class="favicon">
+                                                               <img src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
+                                                       </div>
+                                                       <span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
                                                </div>
-                                               <span class="browser-title"><?php bloginfo( 'name' ); ?></span>
+                                               <img class="app-icon-preview" src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
                                        </div>
-                                       <img class="app-icon-preview" src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
+                               <# } #>
+                               <div class="actions">
+                                       <# if ( data.canUpload ) { #>
+                                               <button type="button" class="button remove-button"><?php echo $this->button_labels['remove']; ?></button>
+                                               <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['change']; ?></button>
+                                               <div style="clear:both"></div>
+                                       <# } #>
                                </div>
                        </div>
-               </div>
-               <# } #>
-               <div class="actions">
-                       <# if ( data.canUpload ) { #>
-                               <button type="button" class="button remove-button"><?php echo $this->button_labels['remove']; ?></button>
-                               <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['change']; ?></button>
-                               <div style="clear:both"></div>
-                       <# } #>
-               </div>
                <# } else { #>
-               <div class="current">
-                       <div class="container">
+                       <div class="attachment-media-view">
                                <div class="placeholder">
-                                       <div class="inner">
-                                               <span><?php echo $this->button_labels['placeholder']; ?></span>
-                                       </div>
+                                       <?php echo $this->button_labels['placeholder']; ?>
+                               </div>
+                               <div class="actions">
+                                       <# if ( data.defaultAttachment ) { #>
+                                               <button type="button" class="button default-button"><?php echo $this->button_labels['default']; ?></button>
+                                       <# } #>
+                                       <# if ( data.canUpload ) { #>
+                                               <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['select']; ?></button>
+                                       <# } #>
+                                       <div style="clear:both"></div>
                                </div>
                        </div>
-               </div>
-               <div class="actions">
-                       <# if ( data.defaultAttachment ) { #>
-                               <button type="button" class="button default-button"><?php echo $this->button_labels['default']; ?></button>
-                       <# } #>
-                       <# if ( data.canUpload ) { #>
-                               <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['select']; ?></button>
-                       <# } #>
-                       <div style="clear:both"></div>
-               </div>
                <# } #>
                <?php
        }
index ace3e41bdf6f2a50136233726bd39bda328719f9..d1f85f8c0d7f8183628f19ceeea929059c0b94a1 100644 (file)
@@ -2,13 +2,13 @@
 /**
  * Class for generating SQL clauses that filter a primary query according to date.
  *
- * `WP_Date_Query` is a helper that allows primary query classes, such as {@see WP_Query},
- * to filter their results by date columns, by generating `WHERE` subclauses to be attached
- * to the primary SQL query string.
+ * WP_Date_Query is a helper that allows primary query classes, such as WP_Query, to filter
+ * their results by date columns, by generating `WHERE` subclauses to be attached to the
+ * primary SQL query string.
  *
  * Attempting to filter by an invalid date value (eg month=13) will generate SQL that will
  * return no results. In these cases, a _doing_it_wrong() error notice is also thrown.
- * See {@link WP_Date_Query::validate_date_values()}.
+ * See WP_Date_Query::validate_date_values().
  *
  * @link https://codex.wordpress.org/Function_Reference/WP_Query Codex page.
  *
@@ -18,7 +18,7 @@ class WP_Date_Query {
        /**
         * Array of date queries.
         *
-        * See {@see WP_Date_Query::__construct()} for information on date query arguments.
+        * See WP_Date_Query::__construct() for information on date query arguments.
         *
         * @since 3.7.0
         * @access public
@@ -491,13 +491,13 @@ class WP_Date_Query {
                $valid_columns = array(
                        'post_date', 'post_date_gmt', 'post_modified',
                        'post_modified_gmt', 'comment_date', 'comment_date_gmt',
-                       'user_registered',
+                       'user_registered', 'registered', 'last_updated',
                );
 
                // Attempt to detect a table prefix.
                if ( false === strpos( $column, '.' ) ) {
                        /**
-                        * Filter the list of valid date query columns.
+                        * Filters the list of valid date query columns.
                         *
                         * @since 3.7.0
                         * @since 4.1.0 Added 'user_registered' to the default recognized columns.
@@ -525,6 +525,10 @@ class WP_Date_Query {
                                $wpdb->users => array(
                                        'user_registered',
                                ),
+                               $wpdb->blogs => array(
+                                       'registered',
+                                       'last_updated',
+                               ),
                        );
 
                        // If it's a known column name, add the appropriate table prefix.
@@ -555,7 +559,7 @@ class WP_Date_Query {
                $where = $sql['where'];
 
                /**
-                * Filter the date query WHERE clause.
+                * Filters the date query WHERE clause.
                 *
                 * @since 3.7.0
                 *
@@ -568,8 +572,8 @@ class WP_Date_Query {
        /**
         * Generate SQL clauses to be appended to a main query.
         *
-        * Called by the public {@see WP_Date_Query::get_sql()}, this method
-        * is abstracted out to maintain parity with the other Query classes.
+        * Called by the public WP_Date_Query::get_sql(), this method is abstracted
+        * out to maintain parity with the other Query classes.
         *
         * @since 4.1.0
         * @access protected
index c9092bd2cc2ba4caba4b7fc61692b76697646572..2aa3430ec5b64d5e0127ea51c532fe6d2d486466 100644 (file)
 function wp_initial_constants() {
        global $blog_id;
 
-       // set memory limits
-       if ( !defined('WP_MEMORY_LIMIT') ) {
-               if ( is_multisite() ) {
-                       define('WP_MEMORY_LIMIT', '64M');
+       /**#@+
+        * Constants for expressing human-readable data sizes in their respective number of bytes.
+        *
+        * @since 4.4.0
+        */
+       define( 'KB_IN_BYTES', 1024 );
+       define( 'MB_IN_BYTES', 1024 * KB_IN_BYTES );
+       define( 'GB_IN_BYTES', 1024 * MB_IN_BYTES );
+       define( 'TB_IN_BYTES', 1024 * GB_IN_BYTES );
+       /**#@-*/
+
+       $current_limit     = @ini_get( 'memory_limit' );
+       $current_limit_int = wp_convert_hr_to_bytes( $current_limit );
+
+       // Define memory limits.
+       if ( ! defined( 'WP_MEMORY_LIMIT' ) ) {
+               if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
+                       define( 'WP_MEMORY_LIMIT', $current_limit );
+               } elseif ( is_multisite() ) {
+                       define( 'WP_MEMORY_LIMIT', '64M' );
                } else {
-                       define('WP_MEMORY_LIMIT', '40M');
+                       define( 'WP_MEMORY_LIMIT', '40M' );
                }
        }
 
        if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
-               define( 'WP_MAX_MEMORY_LIMIT', '256M' );
+               if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
+                       define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
+               } elseif ( -1 === $current_limit_int || $current_limit_int > 268435456 /* = 256M */ ) {
+                       define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
+               } else {
+                       define( 'WP_MAX_MEMORY_LIMIT', '256M' );
+               }
+       }
+
+       // Set memory limits.
+       $wp_limit_int = wp_convert_hr_to_bytes( WP_MEMORY_LIMIT );
+       if ( -1 !== $current_limit_int && ( -1 === $wp_limit_int || $wp_limit_int > $current_limit_int ) ) {
+               @ini_set( 'memory_limit', WP_MEMORY_LIMIT );
        }
 
        if ( ! isset($blog_id) )
                $blog_id = 1;
 
-       // set memory limits.
-       if ( function_exists( 'memory_get_usage' ) ) {
-               $current_limit = @ini_get( 'memory_limit' );
-               $current_limit_int = intval( $current_limit );
-               if ( false !== strpos( $current_limit, 'G' ) )
-                       $current_limit_int *= 1024;
-               $wp_limit_int = intval( WP_MEMORY_LIMIT );
-               if ( false !== strpos( WP_MEMORY_LIMIT, 'G' ) )
-                       $wp_limit_int *= 1024;
-
-               if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || $current_limit_int < $wp_limit_int ) )
-                       @ini_set( 'memory_limit', WP_MEMORY_LIMIT );
-       }
-
        if ( !defined('WP_CONTENT_DIR') )
                define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down
 
@@ -98,7 +112,7 @@ function wp_initial_constants() {
         * For example, MONTH_IN_SECONDS wrongly assumes every month has 30 days and
         * YEAR_IN_SECONDS does not take leap years into account.
         *
-        * If you need more accuracy please consider using the DateTime class (http://php.net/manual/class.datetime.php).
+        * If you need more accuracy please consider using the DateTime class (https://secure.php.net/manual/en/class.datetime.php).
         *
         * @since 3.5.0
         * @since 4.4.0 Introduced `MONTH_IN_SECONDS`.
@@ -110,17 +124,6 @@ function wp_initial_constants() {
        define( 'MONTH_IN_SECONDS',  30 * DAY_IN_SECONDS    );
        define( 'YEAR_IN_SECONDS',  365 * DAY_IN_SECONDS    );
        /**#@-*/
-
-       /**#@+
-        * Constants for expressing human-readable data sizes in their respective number of bytes.
-        *
-        * @since 4.4.0
-        */
-       define( 'KB_IN_BYTES', 1024 );
-       define( 'MB_IN_BYTES', 1024 * KB_IN_BYTES );
-       define( 'GB_IN_BYTES', 1024 * MB_IN_BYTES );
-       define( 'TB_IN_BYTES', 1024 * GB_IN_BYTES );
-       /**#@-*/
 }
 
 /**
index 99cd98257806407898382a44135ef99d3905fe5e..3402e48ef2c1a9cc8638e2b00b1d29308849d153 100644 (file)
@@ -85,6 +85,9 @@ foreach ( array( 'pre_post_type', 'pre_post_status', 'pre_post_comment_status',
 add_filter( 'pre_post_mime_type', 'sanitize_mime_type' );
 add_filter( 'post_mime_type', 'sanitize_mime_type' );
 
+// Meta
+add_filter( 'register_meta_args', '_wp_register_meta_args_whitelist', 10, 2 );
+
 // Places to balance tags on input
 foreach ( array( 'content_save_pre', 'excerpt_save_pre', 'comment_save_pre', 'pre_comment_content' ) as $filter ) {
        add_filter( $filter, 'convert_invalid_entities' );
@@ -130,7 +133,7 @@ add_filter( 'the_title', 'convert_chars' );
 add_filter( 'the_title', 'trim'          );
 
 add_filter( 'the_content', 'wptexturize'                       );
-add_filter( 'the_content', 'convert_smilies'                   );
+add_filter( 'the_content', 'convert_smilies',               20 );
 add_filter( 'the_content', 'wpautop'                           );
 add_filter( 'the_content', 'shortcode_unautop'                 );
 add_filter( 'the_content', 'prepend_attachment'                );
@@ -143,6 +146,10 @@ add_filter( 'the_excerpt',     'wpautop'          );
 add_filter( 'the_excerpt',     'shortcode_unautop');
 add_filter( 'get_the_excerpt', 'wp_trim_excerpt'  );
 
+add_filter( 'the_post_thumbnail_caption', 'wptexturize'     );
+add_filter( 'the_post_thumbnail_caption', 'convert_smilies' );
+add_filter( 'the_post_thumbnail_caption', 'convert_chars'   );
+
 add_filter( 'comment_text', 'wptexturize'            );
 add_filter( 'comment_text', 'convert_chars'          );
 add_filter( 'comment_text', 'make_clickable',      9 );
@@ -206,7 +213,7 @@ add_filter( 'pingback_ping_source_uri', 'pingback_ping_source_uri'            );
 add_filter( 'xmlrpc_pingback_error',    'xmlrpc_pingback_error'               );
 add_filter( 'title_save_pre',           'trim'                                );
 
-add_filter( 'http_request_host_is_external', 'allowed_http_request_hosts', 10, 2 );
+add_filter( 'http_request_host_is_external',    'allowed_http_request_hosts', 10, 2 );
 
 // REST API filters.
 add_action( 'xmlrpc_rsd_apis',            'rest_output_rsd' );
@@ -222,6 +229,7 @@ add_filter( 'rest_authentication_errors', 'rest_cookie_check_errors', 100 );
 // Actions
 add_action( 'wp_head',             '_wp_render_title_tag',            1     );
 add_action( 'wp_head',             'wp_enqueue_scripts',              1     );
+add_action( 'wp_head',             'wp_resource_hints',               2     );
 add_action( 'wp_head',             'feed_links',                      2     );
 add_action( 'wp_head',             'feed_links_extra',                3     );
 add_action( 'wp_head',             'rsd_link'                               );
@@ -248,6 +256,7 @@ if ( isset( $_GET['replytocom'] ) )
     add_action( 'wp_head', 'wp_no_robots' );
 
 // Login actions
+add_filter( 'login_head',          'wp_resource_hints',             8     );
 add_action( 'login_head',          'wp_print_head_scripts',         9     );
 add_action( 'login_head',          'print_admin_styles',            9     );
 add_action( 'login_head',          'wp_site_icon',                  99    );
@@ -404,8 +413,11 @@ add_action( 'set_current_user', 'kses_init' );
 
 // Script Loader
 add_action( 'wp_default_scripts', 'wp_default_scripts' );
+add_action( 'wp_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 );
+add_action( 'admin_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 );
 add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
 add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );
+add_filter( 'customize_controls_print_styles', 'wp_resource_hints', 1 );
 
 add_action( 'wp_default_styles', 'wp_default_styles' );
 add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 );
@@ -458,7 +470,7 @@ add_action( 'embed_head',             'wp_print_head_scripts',          20    );
 add_action( 'embed_head',             'wp_print_styles',                20    );
 add_action( 'embed_head',             'wp_no_robots'                          );
 add_action( 'embed_head',             'rel_canonical'                         );
-add_action( 'embed_head',             'locale_stylesheet'                     );
+add_action( 'embed_head',             'locale_stylesheet',              30    );
 
 add_action( 'embed_content_meta',     'print_embed_comments_button'           );
 add_action( 'embed_content_meta',     'print_embed_sharing_button'            );
index f79761ba26237bb5447133fa68b7e67c4be0e5c8..0d30113b28f8cbc81db94c8082c123550b4e045c 100644 (file)
@@ -61,7 +61,7 @@ function get_postdata($postid) {
 function start_wp() {
        global $wp_query;
 
-       _deprecated_function( __FUNCTION__, '1.5', __('new WordPress Loop') );
+       _deprecated_function( __FUNCTION__, '1.5.0', __('new WordPress Loop') );
 
        // Since the old style loop is being used, advance the query iterator here.
        $wp_query->next_post();
@@ -134,7 +134,7 @@ function the_category_head( $before = '', $after = '' ) {
  */
 function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
 
-       _deprecated_function( __FUNCTION__, '2.0', 'previous_post_link()' );
+       _deprecated_function( __FUNCTION__, '2.0.0', 'previous_post_link()' );
 
        if ( empty($in_same_cat) || 'no' == $in_same_cat )
                $in_same_cat = false;
@@ -169,7 +169,7 @@ function previous_post($format='%', $previous='previous post: ', $title='yes', $
  * @param string $excluded_categories
  */
 function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
-       _deprecated_function( __FUNCTION__, '2.0', 'next_post_link()' );
+       _deprecated_function( __FUNCTION__, '2.0.0', 'next_post_link()' );
 
        if ( empty($in_same_cat) || 'no' == $in_same_cat )
                $in_same_cat = false;
@@ -202,7 +202,7 @@ function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat=
  * @return bool
  */
 function user_can_create_post($user_id, $blog_id = 1, $category_id = 'None') {
-       _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
+       _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
 
        $author_data = get_userdata($user_id);
        return ($author_data->user_level > 1);
@@ -221,7 +221,7 @@ function user_can_create_post($user_id, $blog_id = 1, $category_id = 'None') {
  * @return bool
  */
 function user_can_create_draft($user_id, $blog_id = 1, $category_id = 'None') {
-       _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
+       _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
 
        $author_data = get_userdata($user_id);
        return ($author_data->user_level >= 1);
@@ -240,7 +240,7 @@ function user_can_create_draft($user_id, $blog_id = 1, $category_id = 'None') {
  * @return bool
  */
 function user_can_edit_post($user_id, $post_id, $blog_id = 1) {
-       _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
+       _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
 
        $author_data = get_userdata($user_id);
        $post = get_post($post_id);
@@ -268,7 +268,7 @@ function user_can_edit_post($user_id, $post_id, $blog_id = 1) {
  * @return bool
  */
 function user_can_delete_post($user_id, $post_id, $blog_id = 1) {
-       _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
+       _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
 
        // right now if one can edit, one can delete
        return user_can_edit_post($user_id, $post_id, $blog_id);
@@ -287,7 +287,7 @@ function user_can_delete_post($user_id, $post_id, $blog_id = 1) {
  * @return bool
  */
 function user_can_set_post_date($user_id, $blog_id = 1, $category_id = 'None') {
-       _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
+       _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
 
        $author_data = get_userdata($user_id);
        return (($author_data->user_level > 4) && user_can_create_post($user_id, $blog_id, $category_id));
@@ -306,7 +306,7 @@ function user_can_set_post_date($user_id, $blog_id = 1, $category_id = 'None') {
  * @return bool returns true if $user_id can edit $post_id's date
  */
 function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) {
-       _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
+       _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
 
        $author_data = get_userdata($user_id);
        return (($author_data->user_level > 4) && user_can_edit_post($user_id, $post_id, $blog_id));
@@ -325,7 +325,7 @@ function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) {
  * @return bool returns true if $user_id can edit $post_id's comments
  */
 function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) {
-       _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
+       _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
 
        // right now if one can edit a post, one can edit comments made on it
        return user_can_edit_post($user_id, $post_id, $blog_id);
@@ -344,7 +344,7 @@ function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) {
  * @return bool returns true if $user_id can delete $post_id's comments
  */
 function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) {
-       _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
+       _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
 
        // right now if one can edit comments, one can delete comments
        return user_can_edit_post_comments($user_id, $post_id, $blog_id);
@@ -362,7 +362,7 @@ function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) {
  * @return bool
  */
 function user_can_edit_user($user_id, $other_user) {
-       _deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
+       _deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
 
        $user  = get_userdata($user_id);
        $other = get_userdata($other_user);
@@ -395,7 +395,7 @@ function user_can_edit_user($user_id, $other_user) {
 function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id',
                                                 $show_description = true, $show_rating = false,
                                                 $limit = -1, $show_updated = 0) {
-       _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
 
        $cat_id = -1;
        $cat = get_term_by('name', $cat_name, 'link_category');
@@ -417,7 +417,7 @@ function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />',
  * @return string|null
  */
 function wp_get_linksbyname($category, $args = '') {
-       _deprecated_function(__FUNCTION__, '2.1', 'wp_list_bookmarks()');
+       _deprecated_function(__FUNCTION__, '2.1.0', 'wp_list_bookmarks()');
 
        $defaults = array(
                'after' => '<br />',
@@ -455,7 +455,7 @@ function wp_get_linksbyname($category, $args = '') {
  * @return array
  */
 function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit = -1) {
-       _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
 
        $cat_id = -1;
        $cat = get_term_by('name', $cat_name, 'link_category');
@@ -506,7 +506,7 @@ function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit
  * @return array
  */
 function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) {
-       _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
 
        $links = get_bookmarks( array( 'category' => $category, 'orderby' => $orderby, 'limit' => $limit ) ) ;
 
@@ -539,7 +539,7 @@ function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) {
  */
 function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ",
                                                                        $show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
-       _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
 
        get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
 }
@@ -566,7 +566,7 @@ function get_linksbyname_withrating($cat_name = "noname", $before = '', $after =
  */
 function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true,
                                                          $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
-       _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
 
        get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
 }
@@ -581,7 +581,7 @@ function get_links_withrating($category = -1, $before = '', $after = '<br />', $
  * @return int Only returns 0.
  */
 function get_autotoggle($id = 0) {
-       _deprecated_function( __FUNCTION__, '2.1' );
+       _deprecated_function( __FUNCTION__, '2.1.0' );
        return 0;
 }
 
@@ -615,7 +615,7 @@ function get_autotoggle($id = 0) {
 function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0,
                                   $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,
                                   $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) {
-       _deprecated_function( __FUNCTION__, '2.1', 'wp_list_categories()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_categories()' );
 
        $query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children',
                'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical');
@@ -633,7 +633,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
  * @return false|null|string
  */
 function wp_list_cats($args = '') {
-       _deprecated_function( __FUNCTION__, '2.1', 'wp_list_categories()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_categories()' );
 
        $r = wp_parse_args( $args );
 
@@ -677,7 +677,7 @@ function wp_list_cats($args = '') {
 function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
                $show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,
                $selected = 0, $exclude = 0) {
-       _deprecated_function( __FUNCTION__, '2.1', 'wp_dropdown_categories()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'wp_dropdown_categories()' );
 
        $show_option_all = '';
        if ( $optionall )
@@ -709,7 +709,7 @@ function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = '
  * @return null|string
  */
 function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {
-       _deprecated_function( __FUNCTION__, '2.1', 'wp_list_authors()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_authors()' );
 
        $args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image');
        return wp_list_authors($args);
@@ -727,7 +727,7 @@ function list_authors($optioncount = false, $exclude_admin = true, $show_fullnam
  * @return array
  */
 function wp_get_post_cats($blogid = '1', $post_ID = 0) {
-       _deprecated_function( __FUNCTION__, '2.1', 'wp_get_post_categories()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'wp_get_post_categories()' );
        return wp_get_post_categories($post_ID);
 }
 
@@ -745,7 +745,7 @@ function wp_get_post_cats($blogid = '1', $post_ID = 0) {
  * @return bool|mixed
  */
 function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) {
-       _deprecated_function( __FUNCTION__, '2.1', 'wp_set_post_categories()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'wp_set_post_categories()' );
        return wp_set_post_categories($post_ID, $post_categories);
 }
 
@@ -765,7 +765,7 @@ function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array(
  * @return string|null
  */
 function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
-       _deprecated_function( __FUNCTION__, '2.1', 'wp_get_archives()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'wp_get_archives()' );
        $args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count');
        return wp_get_archives($args);
 }
@@ -783,7 +783,7 @@ function get_archives($type='', $limit='', $format='html', $before = '', $after
  * @return string|null
  */
 function get_author_link($echo, $author_id, $author_nicename = '') {
-       _deprecated_function( __FUNCTION__, '2.1', 'get_author_posts_url()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'get_author_posts_url()' );
 
        $link = get_author_posts_url($author_id, $author_nicename);
 
@@ -810,7 +810,7 @@ function get_author_link($echo, $author_id, $author_nicename = '') {
  */
 function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page',
                                        $pagelink='%', $more_file='') {
-       _deprecated_function( __FUNCTION__, '2.1', 'wp_link_pages()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'wp_link_pages()' );
 
        $args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file');
        return wp_link_pages($args);
@@ -827,7 +827,7 @@ function link_pages($before='<br />', $after='<br />', $next_or_number='number',
  * @return string
  */
 function get_settings($option) {
-       _deprecated_function( __FUNCTION__, '2.1', 'get_option()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'get_option()' );
 
        return get_option($option);
 }
@@ -840,7 +840,7 @@ function get_settings($option) {
  * @see the_permalink()
  */
 function permalink_link() {
-       _deprecated_function( __FUNCTION__, '1.2', 'the_permalink()' );
+       _deprecated_function( __FUNCTION__, '1.2.0', 'the_permalink()' );
        the_permalink();
 }
 
@@ -854,7 +854,7 @@ function permalink_link() {
  * @param string $deprecated
  */
 function permalink_single_rss($deprecated = '') {
-       _deprecated_function( __FUNCTION__, '2.3', 'the_permalink_rss()' );
+       _deprecated_function( __FUNCTION__, '2.3.0', 'the_permalink_rss()' );
        the_permalink_rss();
 }
 
@@ -869,7 +869,7 @@ function permalink_single_rss($deprecated = '') {
  * @return null|string
  */
 function wp_get_links($args = '') {
-       _deprecated_function( __FUNCTION__, '2.1', 'wp_list_bookmarks()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_bookmarks()' );
 
        if ( strpos( $args, '=' ) === false ) {
                $cat_id = $args;
@@ -923,7 +923,7 @@ function wp_get_links($args = '') {
  */
 function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
                        $show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) {
-       _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
 
        $order = 'ASC';
        if ( substr($orderby, 0, 1) == '_' ) {
@@ -1015,7 +1015,7 @@ function get_links($category = -1, $before = '', $after = '<br />', $between = '
  * @param string $order Sort link categories by 'name' or 'id'
  */
 function get_links_list($order = 'name') {
-       _deprecated_function( __FUNCTION__, '2.1', 'wp_list_bookmarks()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_bookmarks()' );
 
        $order = strtolower($order);
 
@@ -1060,7 +1060,7 @@ function get_links_list($order = 'name') {
  * @param bool $count the number of links in the db
  */
 function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) {
-       _deprecated_function( __FUNCTION__, '2.1' );
+       _deprecated_function( __FUNCTION__, '2.1.0' );
 }
 
 /**
@@ -1074,7 +1074,7 @@ function links_popup_script($text = 'Links', $width=400, $height=400, $file='lin
  * @return mixed Value of the 'link_rating' field, false otherwise.
  */
 function get_linkrating( $link ) {
-       _deprecated_function( __FUNCTION__, '2.1', 'sanitize_bookmark_field()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'sanitize_bookmark_field()' );
        return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display');
 }
 
@@ -1089,7 +1089,7 @@ function get_linkrating( $link ) {
  * @return string
  */
 function get_linkcatname($id = 0) {
-       _deprecated_function( __FUNCTION__, '2.1', 'get_category()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'get_category()' );
 
        $id = (int) $id;
 
@@ -1117,7 +1117,7 @@ function get_linkcatname($id = 0) {
  * @param string $link_text
  */
 function comments_rss_link($link_text = 'Comments RSS') {
-       _deprecated_function( __FUNCTION__, '2.5', 'post_comments_feed_link()' );
+       _deprecated_function( __FUNCTION__, '2.5.0', 'post_comments_feed_link()' );
        post_comments_feed_link($link_text);
 }
 
@@ -1133,7 +1133,7 @@ function comments_rss_link($link_text = 'Comments RSS') {
  * @return string
  */
 function get_category_rss_link($echo = false, $cat_ID = 1) {
-       _deprecated_function( __FUNCTION__, '2.5', 'get_category_feed_link()' );
+       _deprecated_function( __FUNCTION__, '2.5.0', 'get_category_feed_link()' );
 
        $link = get_category_feed_link($cat_ID, 'rss2');
 
@@ -1154,7 +1154,7 @@ function get_category_rss_link($echo = false, $cat_ID = 1) {
  * @return string
  */
 function get_author_rss_link($echo = false, $author_id = 1) {
-       _deprecated_function( __FUNCTION__, '2.5', 'get_author_feed_link()' );
+       _deprecated_function( __FUNCTION__, '2.5.0', 'get_author_feed_link()' );
 
        $link = get_author_feed_link($author_id);
        if ( $echo )
@@ -1172,7 +1172,7 @@ function get_author_rss_link($echo = false, $author_id = 1) {
  * @return string
  */
 function comments_rss() {
-       _deprecated_function( __FUNCTION__, '2.2', 'get_post_comments_feed_link()' );
+       _deprecated_function( __FUNCTION__, '2.2.0', 'get_post_comments_feed_link()' );
        return esc_url( get_post_comments_feed_link() );
 }
 
@@ -1189,7 +1189,7 @@ function comments_rss() {
  * @return int The new user's ID.
  */
 function create_user($username, $password, $email) {
-       _deprecated_function( __FUNCTION__, '2.0', 'wp_create_user()' );
+       _deprecated_function( __FUNCTION__, '2.0.0', 'wp_create_user()' );
        return wp_create_user($username, $password, $email);
 }
 
@@ -1199,7 +1199,7 @@ function create_user($username, $password, $email) {
  * @deprecated 2.5.0
  */
 function gzip_compression() {
-       _deprecated_function( __FUNCTION__, '2.5' );
+       _deprecated_function( __FUNCTION__, '2.5.0' );
        return false;
 }
 
@@ -1216,7 +1216,7 @@ function gzip_compression() {
  * @return array The comment data
  */
 function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) {
-       _deprecated_function( __FUNCTION__, '2.7', 'get_comment()' );
+       _deprecated_function( __FUNCTION__, '2.7.0', 'get_comment()' );
        return get_comment($comment_ID, ARRAY_A);
 }
 
@@ -1231,7 +1231,7 @@ function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = fals
  * @return string category name
  */
 function get_catname( $cat_ID ) {
-       _deprecated_function( __FUNCTION__, '2.8', 'get_cat_name()' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'get_cat_name()' );
        return get_cat_name( $cat_ID );
 }
 
@@ -1249,7 +1249,7 @@ function get_catname( $cat_ID ) {
  * @return string
  */
 function get_category_children( $id, $before = '/', $after = '', $visited = array() ) {
-       _deprecated_function( __FUNCTION__, '2.8', 'get_term_children()' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'get_term_children()' );
        if ( 0 == $id )
                return '';
 
@@ -1284,7 +1284,7 @@ function get_category_children( $id, $before = '/', $after = '', $visited = arra
  * @return object List of all of the category IDs.
  */
 function get_all_category_ids() {
-       _deprecated_function( __FUNCTION__, '4.0', 'get_terms()' );
+       _deprecated_function( __FUNCTION__, '4.0.0', 'get_terms()' );
 
        if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) {
                $cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') );
@@ -1304,7 +1304,7 @@ function get_all_category_ids() {
  * @return string The author's description.
  */
 function get_the_author_description() {
-       _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'description\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'description\')' );
        return get_the_author_meta('description');
 }
 
@@ -1316,7 +1316,7 @@ function get_the_author_description() {
  * @see the_author_meta()
  */
 function the_author_description() {
-       _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'description\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'description\')' );
        the_author_meta('description');
 }
 
@@ -1330,7 +1330,7 @@ function the_author_description() {
  * @return string The author's login name (username).
  */
 function get_the_author_login() {
-       _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'login\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'login\')' );
        return get_the_author_meta('login');
 }
 
@@ -1342,7 +1342,7 @@ function get_the_author_login() {
  * @see the_author_meta()
  */
 function the_author_login() {
-       _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'login\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'login\')' );
        the_author_meta('login');
 }
 
@@ -1356,7 +1356,7 @@ function the_author_login() {
  * @return string The author's first name.
  */
 function get_the_author_firstname() {
-       _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'first_name\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'first_name\')' );
        return get_the_author_meta('first_name');
 }
 
@@ -1368,7 +1368,7 @@ function get_the_author_firstname() {
  * @see the_author_meta()
  */
 function the_author_firstname() {
-       _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'first_name\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'first_name\')' );
        the_author_meta('first_name');
 }
 
@@ -1382,7 +1382,7 @@ function the_author_firstname() {
  * @return string The author's last name.
  */
 function get_the_author_lastname() {
-       _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'last_name\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'last_name\')' );
        return get_the_author_meta('last_name');
 }
 
@@ -1394,7 +1394,7 @@ function get_the_author_lastname() {
  * @see the_author_meta()
  */
 function the_author_lastname() {
-       _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'last_name\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'last_name\')' );
        the_author_meta('last_name');
 }
 
@@ -1408,7 +1408,7 @@ function the_author_lastname() {
  * @return string The author's nickname.
  */
 function get_the_author_nickname() {
-       _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'nickname\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'nickname\')' );
        return get_the_author_meta('nickname');
 }
 
@@ -1420,7 +1420,7 @@ function get_the_author_nickname() {
  * @see the_author_meta()
  */
 function the_author_nickname() {
-       _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'nickname\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'nickname\')' );
        the_author_meta('nickname');
 }
 
@@ -1434,7 +1434,7 @@ function the_author_nickname() {
  * @return string The author's username.
  */
 function get_the_author_email() {
-       _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'email\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'email\')' );
        return get_the_author_meta('email');
 }
 
@@ -1446,7 +1446,7 @@ function get_the_author_email() {
  * @see the_author_meta()
  */
 function the_author_email() {
-       _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'email\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'email\')' );
        the_author_meta('email');
 }
 
@@ -1460,7 +1460,7 @@ function the_author_email() {
  * @return string The author's ICQ number.
  */
 function get_the_author_icq() {
-       _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'icq\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'icq\')' );
        return get_the_author_meta('icq');
 }
 
@@ -1472,7 +1472,7 @@ function get_the_author_icq() {
  * @see the_author_meta()
  */
 function the_author_icq() {
-       _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'icq\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'icq\')' );
        the_author_meta('icq');
 }
 
@@ -1486,7 +1486,7 @@ function the_author_icq() {
  * @return string The author's Yahoo! IM name.
  */
 function get_the_author_yim() {
-       _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'yim\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'yim\')' );
        return get_the_author_meta('yim');
 }
 
@@ -1498,7 +1498,7 @@ function get_the_author_yim() {
  * @see the_author_meta()
  */
 function the_author_yim() {
-       _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'yim\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'yim\')' );
        the_author_meta('yim');
 }
 
@@ -1512,7 +1512,7 @@ function the_author_yim() {
  * @return string The author's MSN address.
  */
 function get_the_author_msn() {
-       _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'msn\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'msn\')' );
        return get_the_author_meta('msn');
 }
 
@@ -1524,7 +1524,7 @@ function get_the_author_msn() {
  * @see the_author_meta()
  */
 function the_author_msn() {
-       _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'msn\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'msn\')' );
        the_author_meta('msn');
 }
 
@@ -1538,7 +1538,7 @@ function the_author_msn() {
  * @return string The author's AIM address.
  */
 function get_the_author_aim() {
-       _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'aim\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'aim\')' );
        return get_the_author_meta('aim');
 }
 
@@ -1550,7 +1550,7 @@ function get_the_author_aim() {
  * @see the_author_meta()
  */
 function the_author_aim() {
-       _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'aim\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'aim\')' );
        the_author_meta('aim');
 }
 
@@ -1565,7 +1565,7 @@ function the_author_aim() {
  * @return string The author's display name.
  */
 function get_author_name( $auth_id = false ) {
-       _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'display_name\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'display_name\')' );
        return get_the_author_meta('display_name', $auth_id);
 }
 
@@ -1579,7 +1579,7 @@ function get_author_name( $auth_id = false ) {
  * @return string The URL to the author's page.
  */
 function get_the_author_url() {
-       _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'url\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'url\')' );
        return get_the_author_meta('url');
 }
 
@@ -1591,7 +1591,7 @@ function get_the_author_url() {
  * @see the_author_meta()
  */
 function the_author_url() {
-       _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'url\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'url\')' );
        the_author_meta('url');
 }
 
@@ -1605,7 +1605,7 @@ function the_author_url() {
  * @return string|int The author's ID.
  */
 function get_the_author_ID() {
-       _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'ID\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'ID\')' );
        return get_the_author_meta('ID');
 }
 
@@ -1617,7 +1617,7 @@ function get_the_author_ID() {
  * @see the_author_meta()
  */
 function the_author_ID() {
-       _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'ID\')' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'ID\')' );
        the_author_meta('ID');
 }
 
@@ -1650,7 +1650,7 @@ function the_author_ID() {
  * @param int $encode_html Optional. How to encode the content.
  */
 function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) {
-       _deprecated_function( __FUNCTION__, '2.9', 'the_content_feed' );
+       _deprecated_function( __FUNCTION__, '2.9.0', 'the_content_feed' );
        $content = get_the_content($more_link_text, $stripteaser);
        $content = apply_filters('the_content_rss', $content);
        if ( $cut && !$encode_html )
@@ -1696,7 +1696,7 @@ function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file
  * @return string HTML stripped out of content with links at the bottom.
  */
 function make_url_footnote( $content ) {
-       _deprecated_function( __FUNCTION__, '2.9', '' );
+       _deprecated_function( __FUNCTION__, '2.9.0', '' );
        preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches );
        $links_summary = "\n";
        for ( $i = 0, $c = count( $matches[0] ); $i < $c; $i++ ) {
@@ -1735,7 +1735,7 @@ function make_url_footnote( $content ) {
  * @return string Translated context string without pipe
  */
 function _c( $text, $domain = 'default' ) {
-       _deprecated_function( __FUNCTION__, '2.9', '_x()' );
+       _deprecated_function( __FUNCTION__, '2.9.0', '_x()' );
        return before_last_bar( translate( $text, $domain ) );
 }
 
@@ -1752,7 +1752,7 @@ function _c( $text, $domain = 'default' ) {
  * @return string Translated text
  */
 function translate_with_context( $text, $domain = 'default' ) {
-       _deprecated_function( __FUNCTION__, '2.9', '_x()' );
+       _deprecated_function( __FUNCTION__, '2.9.0', '_x()' );
        return before_last_bar( translate( $text, $domain ) );
 }
 
@@ -1773,7 +1773,7 @@ function translate_with_context( $text, $domain = 'default' ) {
  * @return string The translated singular or plural form.
  */
 function _nc( $single, $plural, $number, $domain = 'default' ) {
-       _deprecated_function( __FUNCTION__, '2.9', '_nx()' );
+       _deprecated_function( __FUNCTION__, '2.9.0', '_nx()' );
        return before_last_bar( _n( $single, $plural, $number, $domain ) );
 }
 
@@ -1785,7 +1785,7 @@ function _nc( $single, $plural, $number, $domain = 'default' ) {
  * @see _n()
  */
 function __ngettext() {
-       _deprecated_function( __FUNCTION__, '2.8', '_n()' );
+       _deprecated_function( __FUNCTION__, '2.8.0', '_n()' );
        $args = func_get_args();
        return call_user_func_array('_n', $args);
 }
@@ -1798,7 +1798,7 @@ function __ngettext() {
  * @see _n_noop()
  */
 function __ngettext_noop() {
-       _deprecated_function( __FUNCTION__, '2.8', '_n_noop()' );
+       _deprecated_function( __FUNCTION__, '2.8.0', '_n_noop()' );
        $args = func_get_args();
        return call_user_func_array('_n_noop', $args);
 
@@ -1814,7 +1814,7 @@ function __ngettext_noop() {
  * @return array List of all options.
  */
 function get_alloptions() {
-       _deprecated_function( __FUNCTION__, '3.0', 'wp_load_alloptions()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'wp_load_alloptions()' );
        return wp_load_alloptions();
 }
 
@@ -1832,7 +1832,7 @@ function get_alloptions() {
  * @return string
  */
 function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false, $permalink = false) {
-       _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_link()' );
+       _deprecated_function( __FUNCTION__, '2.5.0', 'wp_get_attachment_link()' );
        $id = (int) $id;
        $_post = get_post($id);
 
@@ -1860,7 +1860,7 @@ function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false,
  * @return array Icon URL and full path to file, respectively.
  */
 function get_attachment_icon_src( $id = 0, $fullsize = false ) {
-       _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image_src()' );
+       _deprecated_function( __FUNCTION__, '2.5.0', 'wp_get_attachment_image_src()' );
        $id = (int) $id;
        if ( !$post = get_post($id) )
                return false;
@@ -1902,7 +1902,7 @@ function get_attachment_icon_src( $id = 0, $fullsize = false ) {
  * @return false|string HTML content.
  */
 function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) {
-       _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' );
+       _deprecated_function( __FUNCTION__, '2.5.0', 'wp_get_attachment_image()' );
        $id = (int) $id;
        if ( !$post = get_post($id) )
                return false;
@@ -1958,7 +1958,7 @@ function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) {
  * @return false|string
  */
 function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) {
-       _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' );
+       _deprecated_function( __FUNCTION__, '2.5.0', 'wp_get_attachment_image()' );
        $id = (int) $id;
        if ( !$post = get_post($id) )
                return false;
@@ -1986,7 +1986,7 @@ function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false)
  * @return object|array Bookmark object or array, depending on the type specified by `$output`.
  */
 function get_link( $bookmark_id, $output = OBJECT, $filter = 'raw' ) {
-       _deprecated_function( __FUNCTION__, '2.1', 'get_bookmark()' );
+       _deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmark()' );
        return get_bookmark($bookmark_id, $output, $filter);
 }
 
@@ -2002,7 +2002,7 @@ function get_link( $bookmark_id, $output = OBJECT, $filter = 'raw' ) {
  * @return string The cleaned URL.
  */
 function sanitize_url( $url, $protocols = null ) {
-       _deprecated_function( __FUNCTION__, '2.8', 'esc_url_raw()' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'esc_url_raw()' );
        return esc_url_raw( $url, $protocols );
 }
 
@@ -2020,20 +2020,20 @@ function sanitize_url( $url, $protocols = null ) {
  * @param string $url The URL to be cleaned.
  * @param array $protocols Optional. An array of acceptable protocols.
  * @param string $context Optional. How the URL will be used. Default is 'display'.
- * @return string The cleaned $url after the 'clean_url' filter is applied.
+ * @return string The cleaned $url after the {@see 'clean_url'} filter is applied.
  */
 function clean_url( $url, $protocols = null, $context = 'display' ) {
        if ( $context == 'db' )
-               _deprecated_function( 'clean_url( $context = \'db\' )', '3.0', 'esc_url_raw()' );
+               _deprecated_function( 'clean_url( $context = \'db\' )', '3.0.0', 'esc_url_raw()' );
        else
-               _deprecated_function( __FUNCTION__, '3.0', 'esc_url()' );
+               _deprecated_function( __FUNCTION__, '3.0.0', 'esc_url()' );
        return esc_url( $url, $protocols, $context );
 }
 
 /**
  * Escape single quotes, specialchar double quotes, and fix line endings.
  *
- * The filter 'js_escape' is also applied by esc_js()
+ * The filter {@see 'js_escape'} is also applied by esc_js().
  *
  * @since 2.0.4
  * @deprecated 2.8.0 Use esc_js()
@@ -2043,7 +2043,7 @@ function clean_url( $url, $protocols = null, $context = 'display' ) {
  * @return string Escaped text.
  */
 function js_escape( $text ) {
-       _deprecated_function( __FUNCTION__, '2.8', 'esc_js()' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'esc_js()' );
        return esc_js( $text );
 }
 
@@ -2060,8 +2060,8 @@ function js_escape( $text ) {
  * @return string Escaped `$string`.
  */
 function wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
-       _deprecated_function( __FUNCTION__, '2.8', 'esc_html()' );
-       if ( func_num_args() > 1 ) { // Maintain backwards compat for people passing additional args
+       _deprecated_function( __FUNCTION__, '2.8.0', 'esc_html()' );
+       if ( func_num_args() > 1 ) { // Maintain back-compat for people passing additional arguments.
                $args = func_get_args();
                return call_user_func_array( '_wp_specialchars', $args );
        } else {
@@ -2080,19 +2080,19 @@ function wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false
  * @return string
  */
 function attribute_escape( $text ) {
-       _deprecated_function( __FUNCTION__, '2.8', 'esc_attr()' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'esc_attr()' );
        return esc_attr( $text );
 }
 
 /**
- * Register widget for sidebar with backwards compatibility.
+ * Register widget for sidebar with backward compatibility.
  *
  * Allows $name to be an array that accepts either three elements to grab the
  * first element and the third for the name or just uses the first element of
  * the array for the name.
  *
- * Passes to {@link wp_register_sidebar_widget()} after argument list and
- * backwards compatibility is complete.
+ * Passes to wp_register_sidebar_widget() after argument list and backward
+ * compatibility is complete.
  *
  * @since 2.2.0
  * @deprecated 2.8.0 Use wp_register_sidebar_widget()
@@ -2104,7 +2104,7 @@ function attribute_escape( $text ) {
  * @param mixed      $params ,...     Widget parameters.
  */
 function register_sidebar_widget($name, $output_callback, $classname = '') {
-       _deprecated_function( __FUNCTION__, '2.8', 'wp_register_sidebar_widget()' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'wp_register_sidebar_widget()' );
        // Compat
        if ( is_array($name) ) {
                if ( count($name) == 3 )
@@ -2126,7 +2126,7 @@ function register_sidebar_widget($name, $output_callback, $classname = '') {
 }
 
 /**
- * Alias of {@link wp_unregister_sidebar_widget()}.
+ * Serves as an alias of wp_unregister_sidebar_widget().
  *
  * @since 2.2.0
  * @deprecated 2.8.0 Use wp_unregister_sidebar_widget()
@@ -2135,7 +2135,7 @@ function register_sidebar_widget($name, $output_callback, $classname = '') {
  * @param int|string $id Widget ID.
  */
 function unregister_sidebar_widget($id) {
-       _deprecated_function( __FUNCTION__, '2.8', 'wp_unregister_sidebar_widget()' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'wp_unregister_sidebar_widget()' );
        return wp_unregister_sidebar_widget($id);
 }
 
@@ -2159,7 +2159,7 @@ function unregister_sidebar_widget($id) {
  * @param int $height Widget height.
  */
 function register_widget_control($name, $control_callback, $width = '', $height = '') {
-       _deprecated_function( __FUNCTION__, '2.8', 'wp_register_widget_control()' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'wp_register_widget_control()' );
        // Compat
        if ( is_array($name) ) {
                if ( count($name) == 3 )
@@ -2192,7 +2192,7 @@ function register_widget_control($name, $control_callback, $width = '', $height
  * @param int|string $id Widget ID.
  */
 function unregister_widget_control($id) {
-       _deprecated_function( __FUNCTION__, '2.8', 'wp_unregister_widget_control()' );
+       _deprecated_function( __FUNCTION__, '2.8.0', 'wp_unregister_widget_control()' );
        return wp_unregister_widget_control($id);
 }
 
@@ -2209,7 +2209,7 @@ function unregister_widget_control($id) {
  * @return bool True deletion completed and false if user_id is not a number.
  */
 function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'delete_user_meta()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'delete_user_meta()' );
        global $wpdb;
        if ( !is_numeric( $user_id ) )
                return false;
@@ -2255,7 +2255,7 @@ function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) {
  * @return mixed
  */
 function get_usermeta( $user_id, $meta_key = '' ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'get_user_meta()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'get_user_meta()' );
        global $wpdb;
        $user_id = (int) $user_id;
 
@@ -2308,7 +2308,7 @@ function get_usermeta( $user_id, $meta_key = '' ) {
  * @return bool True on successful update, false on failure.
  */
 function update_usermeta( $user_id, $meta_key, $meta_value ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'update_user_meta()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'update_user_meta()' );
        global $wpdb;
        if ( !is_numeric( $user_id ) )
                return false;
@@ -2363,7 +2363,7 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) {
  * @return array List of users that are part of that site ID
  */
 function get_users_of_blog( $id = '' ) {
-       _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
+       _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
 
        global $wpdb, $blog_id;
        if ( empty($id) )
@@ -2383,7 +2383,7 @@ function get_users_of_blog( $id = '' ) {
  * @param bool $add Optional, default is true. Add or remove links. Defaults to true.
  */
 function automatic_feed_links( $add = true ) {
-       _deprecated_function( __FUNCTION__, '3.0', "add_theme_support( 'automatic-feed-links' )" );
+       _deprecated_function( __FUNCTION__, '3.0.0', "add_theme_support( 'automatic-feed-links' )" );
 
        if ( $add )
                add_theme_support( 'automatic-feed-links' );
@@ -2403,7 +2403,7 @@ function automatic_feed_links( $add = true ) {
  * @return string The author's field from the current author's DB object.
  */
 function get_profile( $field, $user = false ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'get_the_author_meta()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'get_the_author_meta()' );
        if ( $user ) {
                $user = get_user_by( 'login', $user );
                $user = $user->ID;
@@ -2422,7 +2422,7 @@ function get_profile( $field, $user = false ) {
  * @return int Number of posts the given user has written.
  */
 function get_usernumposts( $userid ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'count_user_posts()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'count_user_posts()' );
        return count_user_posts( $userid );
 }
 
@@ -2455,7 +2455,7 @@ function funky_javascript_callback($matches) {
  * @return string Fixed text.
  */
 function funky_javascript_fix($text) {
-       _deprecated_function( __FUNCTION__, '3.0' );
+       _deprecated_function( __FUNCTION__, '3.0.0' );
        // Fixes for browsers' JavaScript bugs.
        global $is_macIE, $is_winIE;
 
@@ -2478,7 +2478,7 @@ function funky_javascript_fix($text) {
  * @return bool Whether the taxonomy exists.
  */
 function is_taxonomy( $taxonomy ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'taxonomy_exists()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'taxonomy_exists()' );
        return taxonomy_exists( $taxonomy );
 }
 
@@ -2495,7 +2495,7 @@ function is_taxonomy( $taxonomy ) {
  * @return mixed Get the term id or Term Object, if exists.
  */
 function is_term( $term, $taxonomy = '', $parent = 0 ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'term_exists()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'term_exists()' );
        return term_exists( $term, $taxonomy, $parent );
 }
 
@@ -2512,7 +2512,7 @@ function is_term( $term, $taxonomy = '', $parent = 0 ) {
  * @return bool
  */
 function is_plugin_page() {
-       _deprecated_function( __FUNCTION__, '3.1'  );
+       _deprecated_function( __FUNCTION__, '3.1.0'  );
 
        global $plugin_page;
 
@@ -2535,7 +2535,7 @@ function is_plugin_page() {
  * @return bool Always return True
  */
 function update_category_cache() {
-       _deprecated_function( __FUNCTION__, '3.1'  );
+       _deprecated_function( __FUNCTION__, '3.1.0'  );
 
        return true;
 }
@@ -2549,7 +2549,7 @@ function update_category_cache() {
  * @return bool
  */
 function wp_timezone_supported() {
-       _deprecated_function( __FUNCTION__, '3.2' );
+       _deprecated_function( __FUNCTION__, '3.2.0' );
 
        return true;
 }
@@ -2569,7 +2569,7 @@ function wp_timezone_supported() {
  * @param bool   $extended      Optional. Unused.
  */
 function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) {
-       _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
+       _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
 
        wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) );
 }
@@ -2584,7 +2584,7 @@ function the_editor($content, $id = 'content', $prev_id = 'title', $media_button
  * @return array of arrays. The array is indexed by user_id, containing $metavalues object arrays.
  */
 function get_user_metavalues($ids) {
-       _deprecated_function( __FUNCTION__, '3.3' );
+       _deprecated_function( __FUNCTION__, '3.3.0' );
 
        $objects = array();
 
@@ -2618,7 +2618,7 @@ function get_user_metavalues($ids) {
  * @return object|array The now sanitized User Object or Array (will be the same type as $user)
  */
 function sanitize_user_object($user, $context = 'display') {
-       _deprecated_function( __FUNCTION__, '3.3' );
+       _deprecated_function( __FUNCTION__, '3.3.0' );
 
        if ( is_object($user) ) {
                if ( !isset($user->ID) )
@@ -2657,7 +2657,7 @@ function sanitize_user_object($user, $context = 'display') {
  * @return string
  */
 function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) {
-       _deprecated_function( __FUNCTION__, '3.3' );
+       _deprecated_function( __FUNCTION__, '3.3.0' );
 
        $posts = get_boundary_post($in_same_cat, $excluded_categories, $start);
        // If there is no post stop.
@@ -2695,7 +2695,7 @@ function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $ex
  * @param string $excluded_categories Optional. Excluded categories IDs.
  */
 function start_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') {
-       _deprecated_function( __FUNCTION__, '3.3' );
+       _deprecated_function( __FUNCTION__, '3.3.0' );
 
        echo get_boundary_post_rel_link($title, $in_same_cat, $excluded_categories, true);
 }
@@ -2709,7 +2709,7 @@ function start_post_rel_link($title = '%title', $in_same_cat = false, $excluded_
  * @return string
  */
 function get_index_rel_link() {
-       _deprecated_function( __FUNCTION__, '3.3' );
+       _deprecated_function( __FUNCTION__, '3.3.0' );
 
        $link = "<link rel='index' title='" . esc_attr( get_bloginfo( 'name', 'display' ) ) . "' href='" . esc_url( user_trailingslashit( get_bloginfo( 'url', 'display' ) ) ) . "' />\n";
        return apply_filters( "index_rel_link", $link );
@@ -2722,7 +2722,7 @@ function get_index_rel_link() {
  * @deprecated 3.3.0
  */
 function index_rel_link() {
-       _deprecated_function( __FUNCTION__, '3.3' );
+       _deprecated_function( __FUNCTION__, '3.3.0' );
 
        echo get_index_rel_link();
 }
@@ -2737,7 +2737,7 @@ function index_rel_link() {
  * @return string
  */
 function get_parent_post_rel_link( $title = '%title' ) {
-       _deprecated_function( __FUNCTION__, '3.3' );
+       _deprecated_function( __FUNCTION__, '3.3.0' );
 
        if ( ! empty( $GLOBALS['post'] ) && ! empty( $GLOBALS['post']->post_parent ) )
                $post = get_post($GLOBALS['post']->post_parent);
@@ -2767,7 +2767,7 @@ function get_parent_post_rel_link( $title = '%title' ) {
  * @param string $title Optional. Link title format. Default '%title'.
  */
 function parent_post_rel_link( $title = '%title' ) {
-       _deprecated_function( __FUNCTION__, '3.3' );
+       _deprecated_function( __FUNCTION__, '3.3.0' );
 
        echo get_parent_post_rel_link($title);
 }
@@ -2781,7 +2781,7 @@ function parent_post_rel_link( $title = '%title' ) {
  * @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance.
  */
 function wp_admin_bar_dashboard_view_site_menu( $wp_admin_bar ) {
-       _deprecated_function( __FUNCTION__, '3.3' );
+       _deprecated_function( __FUNCTION__, '3.3.0' );
 
        $user_id = get_current_user_id();
 
@@ -2806,7 +2806,7 @@ function wp_admin_bar_dashboard_view_site_menu( $wp_admin_bar ) {
  * @return bool True if the current users belong to $blog_id, false if not.
  */
 function is_blog_user( $blog_id = 0 ) {
-       _deprecated_function( __FUNCTION__, '3.3', 'is_user_member_of_blog()' );
+       _deprecated_function( __FUNCTION__, '3.3.0', 'is_user_member_of_blog()' );
 
        return is_user_member_of_blog( get_current_user_id(), $blog_id );
 }
@@ -2818,7 +2818,7 @@ function is_blog_user( $blog_id = 0 ) {
  * @deprecated 3.4.0 Use error_log()
  * @see error_log()
  *
- * @link http://www.php.net/manual/en/function.error-log.php
+ * @link https://secure.php.net/manual/en/function.error-log.php
  *
  * @param string $filename File name.
  * @param string $mode     Type of access you required to the stream.
@@ -2836,7 +2836,7 @@ function debug_fopen( $filename, $mode ) {
  * @deprecated 3.4.0 Use error_log()
  * @see error_log()
  *
- * @link http://www.php.net/manual/en/function.error-log.php
+ * @link https://secure.php.net/manual/en/function.error-log.php
  *
  * @param mixed  $fp     Unused.
  * @param string $string Message to log.
@@ -2854,7 +2854,7 @@ function debug_fwrite( $fp, $string ) {
  * @deprecated 3.4.0 Use error_log()
  * @see error_log()
  *
- * @link http://www.php.net/manual/en/function.error-log.php
+ * @link https://secure.php.net/manual/en/function.error-log.php
  *
  * @param mixed $fp Unused.
  */
@@ -2876,7 +2876,7 @@ function debug_fclose( $fp ) {
  * @return array Theme list with theme data.
  */
 function get_themes() {
-       _deprecated_function( __FUNCTION__, '3.4', 'wp_get_themes()' );
+       _deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_themes()' );
 
        global $wp_themes;
        if ( isset( $wp_themes ) )
@@ -2907,7 +2907,7 @@ function get_themes() {
  * @return array|null Null, if theme name does not exist. Theme data, if exists.
  */
 function get_theme( $theme ) {
-       _deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme( $stylesheet )' );
+       _deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme( $stylesheet )' );
 
        $themes = get_themes();
        if ( is_array( $themes ) && array_key_exists( $theme, $themes ) )
@@ -2925,7 +2925,7 @@ function get_theme( $theme ) {
  * @return string
  */
 function get_current_theme() {
-       _deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme()' );
+       _deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' );
 
        if ( $theme = get_option( 'current_theme' ) )
                return $theme;
@@ -2946,7 +2946,7 @@ function get_current_theme() {
  * @return string The pre block without paragraph/line-break conversion.
  */
 function clean_pre($matches) {
-       _deprecated_function( __FUNCTION__, '3.4' );
+       _deprecated_function( __FUNCTION__, '3.4.0' );
 
        if ( is_array($matches) )
                $text = $matches[1] . $matches[2] . "</pre>";
@@ -2968,12 +2968,12 @@ function clean_pre($matches) {
  * @deprecated 3.4.0 Use add_theme_support()
  * @see add_theme_support()
  *
- * @param callable $wp_head_callback Call on 'wp_head' action.
+ * @param callable $wp_head_callback Call on the {@see 'wp_head'} action.
  * @param callable $admin_head_callback Call on custom header administration screen.
  * @param callable $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional.
  */
 function add_custom_image_header( $wp_head_callback, $admin_head_callback, $admin_preview_callback = '' ) {
-       _deprecated_function( __FUNCTION__, '3.4', 'add_theme_support( \'custom-header\', $args )' );
+       _deprecated_function( __FUNCTION__, '3.4.0', 'add_theme_support( \'custom-header\', $args )' );
        $args = array(
                'wp-head-callback'    => $wp_head_callback,
                'admin-head-callback' => $admin_head_callback,
@@ -2993,7 +2993,7 @@ function add_custom_image_header( $wp_head_callback, $admin_head_callback, $admi
  * @return null|bool Whether support was removed.
  */
 function remove_custom_image_header() {
-       _deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support( \'custom-header\' )' );
+       _deprecated_function( __FUNCTION__, '3.4.0', 'remove_theme_support( \'custom-header\' )' );
        return remove_theme_support( 'custom-header' );
 }
 
@@ -3004,12 +3004,12 @@ function remove_custom_image_header() {
  * @deprecated 3.4.0 Use add_theme_support()
  * @see add_theme_support()
  *
- * @param callable $wp_head_callback Call on 'wp_head' action.
+ * @param callable $wp_head_callback Call on the {@see 'wp_head'} action.
  * @param callable $admin_head_callback Call on custom background administration screen.
  * @param callable $admin_preview_callback Output a custom background image div on the custom background administration screen. Optional.
  */
 function add_custom_background( $wp_head_callback = '', $admin_head_callback = '', $admin_preview_callback = '' ) {
-       _deprecated_function( __FUNCTION__, '3.4', 'add_theme_support( \'custom-background\', $args )' );
+       _deprecated_function( __FUNCTION__, '3.4.0', 'add_theme_support( \'custom-background\', $args )' );
        $args = array();
        if ( $wp_head_callback )
                $args['wp-head-callback'] = $wp_head_callback;
@@ -3030,7 +3030,7 @@ function add_custom_background( $wp_head_callback = '', $admin_head_callback = '
  * @return null|bool Whether support was removed.
  */
 function remove_custom_background() {
-       _deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support( \'custom-background\' )' );
+       _deprecated_function( __FUNCTION__, '3.4.0', 'remove_theme_support( \'custom-background\' )' );
        return remove_theme_support( 'custom-background' );
 }
 
@@ -3045,7 +3045,7 @@ function remove_custom_background() {
  * @return array Theme data.
  */
 function get_theme_data( $theme_file ) {
-       _deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme()' );
+       _deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' );
        $theme = new WP_Theme( basename( dirname( $theme_file ) ), dirname( dirname( $theme_file ) ) );
 
        $theme_data = array(
@@ -3082,7 +3082,7 @@ function get_theme_data( $theme_file ) {
  * @param array $pages list of page objects
  */
 function update_page_cache( &$pages ) {
-       _deprecated_function( __FUNCTION__, '3.4', 'update_post_cache()' );
+       _deprecated_function( __FUNCTION__, '3.4.0', 'update_post_cache()' );
 
        update_post_cache( $pages );
 }
@@ -3100,7 +3100,7 @@ function update_page_cache( &$pages ) {
  * @param int $id Page ID to clean
  */
 function clean_page_cache( $id ) {
-       _deprecated_function( __FUNCTION__, '3.4', 'clean_post_cache()' );
+       _deprecated_function( __FUNCTION__, '3.4.0', 'clean_post_cache()' );
 
        clean_post_cache( $id );
 }
@@ -3132,7 +3132,7 @@ function wp_explain_nonce( $action ) {
  * @param int $post_id An optional post ID.
  */
 function sticky_class( $post_id = null ) {
-       _deprecated_function( __FUNCTION__, '3.5', 'post_class()' );
+       _deprecated_function( __FUNCTION__, '3.5.0', 'post_class()' );
        if ( is_sticky( $post_id ) )
                echo ' sticky';
 }
@@ -3150,7 +3150,7 @@ function sticky_class( $post_id = null ) {
  * @param WP_Post &$post Post object, passed by reference (unused).
  */
 function _get_post_ancestors( &$post ) {
-       _deprecated_function( __FUNCTION__, '3.5' );
+       _deprecated_function( __FUNCTION__, '3.5.0' );
 }
 
 /**
@@ -3164,7 +3164,7 @@ function _get_post_ancestors( &$post ) {
  * @return resource The resulting image resource on success, Error string on failure.
  */
 function wp_load_image( $file ) {
-       _deprecated_function( __FUNCTION__, '3.5', 'wp_get_image_editor()' );
+       _deprecated_function( __FUNCTION__, '3.5.0', 'wp_get_image_editor()' );
 
        if ( is_numeric( $file ) )
                $file = get_attached_file( $file );
@@ -3175,8 +3175,9 @@ function wp_load_image( $file ) {
        if ( ! function_exists('imagecreatefromstring') )
                return __('The GD image library is not installed.');
 
-       // Set artificially high because GD uses uncompressed images in memory
-       @ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) );
+       // Set artificially high because GD uses uncompressed images in memory.
+       wp_raise_memory_limit( 'image' );
+
        $image = imagecreatefromstring( file_get_contents( $file ) );
 
        if ( !is_resource( $image ) )
@@ -3210,7 +3211,7 @@ function wp_load_image( $file ) {
  * @return mixed WP_Error on failure. String with new destination path.
  */
 function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $dest_path = null, $jpeg_quality = 90 ) {
-       _deprecated_function( __FUNCTION__, '3.5', 'wp_get_image_editor()' );
+       _deprecated_function( __FUNCTION__, '3.5.0', 'wp_get_image_editor()' );
 
        $editor = wp_get_image_editor( $file );
        if ( is_wp_error( $editor ) )
@@ -3245,7 +3246,7 @@ function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $de
  * @return WP_Post|null Post object or array holding post contents and information
  */
 function wp_get_single_post( $postid = 0, $mode = OBJECT ) {
-       _deprecated_function( __FUNCTION__, '3.5', 'get_post()' );
+       _deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' );
        return get_post( $postid, $mode );
 }
 
@@ -3261,7 +3262,7 @@ function wp_get_single_post( $postid = 0, $mode = OBJECT ) {
  * @return bool False if does not authenticate, true if username and password authenticates.
  */
 function user_pass_ok($user_login, $user_pass) {
-       _deprecated_function( __FUNCTION__, '3.5', 'wp_authenticate()' );
+       _deprecated_function( __FUNCTION__, '3.5.0', 'wp_authenticate()' );
        $user = wp_authenticate( $user_login, $user_pass );
        if ( is_wp_error( $user ) )
                return false;
@@ -3288,7 +3289,7 @@ function _save_post_hook() {}
  * @return bool
  */
 function gd_edit_image_support($mime_type) {
-       _deprecated_function( __FUNCTION__, '3.5', 'wp_image_editor_supports()' );
+       _deprecated_function( __FUNCTION__, '3.5.0', 'wp_image_editor_supports()' );
 
        if ( function_exists('imagetypes') ) {
                switch( $mime_type ) {
@@ -3323,9 +3324,9 @@ function gd_edit_image_support($mime_type) {
  * @return string A shorthand byte value.
  */
 function wp_convert_bytes_to_hr( $bytes ) {
-       _deprecated_function( __FUNCTION__, '3.6', 'size_format()' );
+       _deprecated_function( __FUNCTION__, '3.6.0', 'size_format()' );
 
-       $units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB', 4 => 'TB' );
+       $units = array( 0 => 'B', 1 => 'KB', 2 => 'MB', 3 => 'GB', 4 => 'TB' );
        $log   = log( $bytes, KB_IN_BYTES );
        $power = (int) $log;
        $size  = pow( KB_IN_BYTES, $log - $power );
@@ -3351,7 +3352,7 @@ function wp_convert_bytes_to_hr( $bytes ) {
  * @return string Trimmed search terms.
  */
 function _search_terms_tidy( $t ) {
-       _deprecated_function( __FUNCTION__, '3.7' );
+       _deprecated_function( __FUNCTION__, '3.7.0' );
        return trim( $t, "\"'\n\r " );
 }
 
@@ -3368,7 +3369,7 @@ function _search_terms_tidy( $t ) {
  */
 function rich_edit_exists() {
        global $wp_rich_edit_exists;
-       _deprecated_function( __FUNCTION__, '3.9' );
+       _deprecated_function( __FUNCTION__, '3.9.0' );
 
        if ( ! isset( $wp_rich_edit_exists ) )
                $wp_rich_edit_exists = file_exists( ABSPATH . WPINC . '/js/tinymce/tinymce.js' );
@@ -3402,7 +3403,7 @@ function default_topic_count_text( $count ) {
  * @return string The very same text.
  */
 function format_to_post( $content ) {
-       _deprecated_function( __FUNCTION__, '3.9' );
+       _deprecated_function( __FUNCTION__, '3.9.0' );
        return $content;
 }
 
@@ -3417,7 +3418,7 @@ function format_to_post( $content ) {
  * @return string text, safe for inclusion in LIKE query.
  */
 function like_escape($text) {
-       _deprecated_function( __FUNCTION__, '4.0', 'wpdb::esc_like()' );
+       _deprecated_function( __FUNCTION__, '4.0.0', 'wpdb::esc_like()' );
        return str_replace( array( "%", "_" ), array( "\\%", "\\_" ), $text );
 }
 
@@ -3434,7 +3435,7 @@ function like_escape($text) {
  * @return bool Whether SSL access is available.
  */
 function url_is_accessable_via_ssl( $url ) {
-       _deprecated_function( __FUNCTION__, '4.0' );
+       _deprecated_function( __FUNCTION__, '4.0.0' );
 
        $response = wp_remote_get( set_url_scheme( $url, 'https' ) );
 
@@ -3458,7 +3459,7 @@ function url_is_accessable_via_ssl( $url ) {
  * @deprecated 4.3.0
  */
 function preview_theme() {
-       _deprecated_function( __FUNCTION__, '4.3' );
+       _deprecated_function( __FUNCTION__, '4.3.0' );
 }
 
 /**
@@ -3471,7 +3472,7 @@ function preview_theme() {
  * @return string
  */
 function _preview_theme_template_filter() {
-       _deprecated_function( __FUNCTION__, '4.3' );
+       _deprecated_function( __FUNCTION__, '4.3.0' );
        return '';
 }
 
@@ -3485,7 +3486,7 @@ function _preview_theme_template_filter() {
  * @return string
  */
 function _preview_theme_stylesheet_filter() {
-       _deprecated_function( __FUNCTION__, '4.3' );
+       _deprecated_function( __FUNCTION__, '4.3.0' );
        return '';
 }
 
@@ -3500,7 +3501,7 @@ function _preview_theme_stylesheet_filter() {
  * @return string
  */
 function preview_theme_ob_filter( $content ) {
-       _deprecated_function( __FUNCTION__, '4.3' );
+       _deprecated_function( __FUNCTION__, '4.3.0' );
        return $content;
 }
 
@@ -3517,14 +3518,14 @@ function preview_theme_ob_filter( $content ) {
  * @return string
  */
 function preview_theme_ob_filter_callback( $matches ) {
-       _deprecated_function( __FUNCTION__, '4.3' );
+       _deprecated_function( __FUNCTION__, '4.3.0' );
        return '';
 }
 
 /**
  * Formats text for the rich text editor.
  *
- * The filter 'richedit_pre' is applied here. If $text is empty the filter will
+ * The {@see 'richedit_pre'} filter is applied here. If $text is empty the filter will
  * be applied to an empty string.
  *
  * @since 2.0.0
@@ -3534,11 +3535,11 @@ function preview_theme_ob_filter_callback( $matches ) {
  * @return string The formatted text after filter is applied.
  */
 function wp_richedit_pre($text) {
-       _deprecated_function( __FUNCTION__, '4.3', 'format_for_editor()' );
+       _deprecated_function( __FUNCTION__, '4.3.0', 'format_for_editor()' );
 
        if ( empty( $text ) ) {
                /**
-                * Filter text returned for the rich text editor.
+                * Filters text returned for the rich text editor.
                 *
                 * This filter is first evaluated, and the value returned, if an empty string
                 * is passed to wp_richedit_pre(). If an empty string is passed, it results
@@ -3567,7 +3568,7 @@ function wp_richedit_pre($text) {
  * Formats text for the HTML editor.
  *
  * Unless $output is empty it will pass through htmlspecialchars before the
- * 'htmledit_pre' filter is applied.
+ * {@see 'htmledit_pre'} filter is applied.
  *
  * @since 2.5.0
  * @deprecated 4.3.0 Use format_for_editor()
@@ -3577,13 +3578,13 @@ function wp_richedit_pre($text) {
  * @return string Formatted text after filter applied.
  */
 function wp_htmledit_pre($output) {
-       _deprecated_function( __FUNCTION__, '4.3', 'format_for_editor()' );
+       _deprecated_function( __FUNCTION__, '4.3.0', 'format_for_editor()' );
 
        if ( !empty($output) )
                $output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // convert only < > &
 
        /**
-        * Filter the text before it is formatted for the HTML editor.
+        * Filters the text before it is formatted for the HTML editor.
         *
         * @since 2.5.0
         * @deprecated 4.3.0
@@ -3604,7 +3605,7 @@ function wp_htmledit_pre($output) {
  * @return string|false
  */
 function post_permalink( $post_id = 0 ) {
-       _deprecated_function( __FUNCTION__, '4.4', 'get_permalink()' );
+       _deprecated_function( __FUNCTION__, '4.4.0', 'get_permalink()' );
 
        return get_permalink( $post_id );
 }
@@ -3626,7 +3627,7 @@ function post_permalink( $post_id = 0 ) {
  * @return bool|string False on failure and string of headers if HEAD request.
  */
 function wp_get_http( $url, $file_path = false, $red = 1 ) {
-       _deprecated_function( __FUNCTION__, '4.4', 'WP_Http' );
+       _deprecated_function( __FUNCTION__, '4.4.0', 'WP_Http' );
 
        @set_time_limit( 60 );
 
@@ -3680,7 +3681,7 @@ function wp_get_http( $url, $file_path = false, $red = 1 ) {
  * @return bool True if forced, false if not forced.
  */
 function force_ssl_login( $force = null ) {
-       _deprecated_function( __FUNCTION__, '4.4', 'force_ssl_admin()' );
+       _deprecated_function( __FUNCTION__, '4.4.0', 'force_ssl_admin()' );
        return force_ssl_admin( $force );
 }
 
@@ -3693,7 +3694,7 @@ function force_ssl_login( $force = null ) {
  * @return string Full path to comments popup template file.
  */
 function get_comments_popup_template() {
-       _deprecated_function( __FUNCTION__, '4.5' );
+       _deprecated_function( __FUNCTION__, '4.5.0' );
 
        return '';
 }
@@ -3707,7 +3708,7 @@ function get_comments_popup_template() {
  * @return bool
  */
 function is_comments_popup() {
-       _deprecated_function( __FUNCTION__, '4.5' );
+       _deprecated_function( __FUNCTION__, '4.5.0' );
 
        return false;
 }
@@ -3719,7 +3720,7 @@ function is_comments_popup() {
  * @deprecated 4.5.0
  */
 function comments_popup_script() {
-       _deprecated_function( __FUNCTION__, '4.5' );
+       _deprecated_function( __FUNCTION__, '4.5.0' );
 }
 
 /**
@@ -3732,25 +3733,24 @@ function comments_popup_script() {
  * @return string Content that has filtered links.
  */
 function popuplinks( $text ) {
-       _deprecated_function( __FUNCTION__, '4.5' );
+       _deprecated_function( __FUNCTION__, '4.5.0' );
        $text = preg_replace('/<a (.+?)>/i', "<a $1 target='_blank' rel='external'>", $text);
        return $text;
 }
 
 /**
- * Returns the base URL of the uploads directory.
- * Note: this function will be removed in 4.6.
+ * The Google Video embed handler callback.
  *
- * @ignore
- * @since 4.4.0
- * @access private
- * @deprecated 4.5.0 Use wp_get_upload_dir()
- * @see wp_get_upload_dir()
+ * Deprecated function that previously assisted in turning Google Video URLs
+ * into embeds but that service has since been shut down.
+ *
+ * @since 2.9.0
+ * @deprecated 4.6.0
  *
- * @return string The base URL.
+ * @return string An empty string.
  */
-function _wp_upload_dir_baseurl() {
-       _deprecated_function( __FUNCTION__, '4.5', 'wp_get_upload_dir()' );
-       $upload_dir = wp_get_upload_dir();
-       return $upload_dir['baseurl'];
+function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) {
+       _deprecated_function( __FUNCTION__, '4.6.0' );
+
+       return '';
 }
index 312c45c6f242219b190040b5485d9b7e3a0b2173..fb209915847b4b4ff8e2b80fad5dd5f299796077 100644 (file)
@@ -8,6 +8,6 @@
  * @deprecated 4.5.0 Moved to wp-includes/theme-compat/embed.php
  */
 
-_deprecated_file( basename( __FILE__ ), '4.5', 'wp-includes/theme-compat/embed.php' );
+_deprecated_file( basename( __FILE__ ), '4.5.0', 'wp-includes/theme-compat/embed.php' );
 
 include( ABSPATH . WPINC . '/theme-compat/embed.php' );
index 8861fd5a222adabd37a3618ba840be43ba583e30..1287c4e5fa1428aa7b526f18862de47def4e1352 100644 (file)
@@ -50,7 +50,7 @@ function wp_embed_unregister_handler( $id, $priority = 10 ) {
  *
  * The default height is 1.5 times the width, or 1000px, whichever is smaller.
  *
- * The 'embed_defaults' filter can be used to adjust either of these values.
+ * The {@see 'embed_defaults'} filter can be used to adjust either of these values.
  *
  * @since 2.9.0
  *
@@ -70,7 +70,7 @@ function wp_embed_defaults( $url = '' ) {
        $height = min( ceil( $width * 1.5 ), 1000 );
 
        /**
-        * Filter the default array of embed dimensions.
+        * Filters the default array of embed dimensions.
         *
         * @since 2.9.0
         *
@@ -161,7 +161,7 @@ function wp_oembed_remove_provider( $format ) {
  */
 function wp_maybe_load_embeds() {
        /**
-        * Filter whether to load the default embed handlers.
+        * Filters whether to load the default embed handlers.
         *
         * Returning a falsey value will prevent loading the default embed handlers.
         *
@@ -175,10 +175,8 @@ function wp_maybe_load_embeds() {
 
        wp_embed_register_handler( 'youtube_embed_url', '#https?://(www.)?youtube\.com/(?:v|embed)/([^/]+)#i', 'wp_embed_handler_youtube' );
 
-       wp_embed_register_handler( 'googlevideo', '#http://video\.google\.([A-Za-z.]{2,5})/videoplay\?docid=([\d-]+)(.*?)#i', 'wp_embed_handler_googlevideo' );
-
        /**
-        * Filter the audio embed handler callback.
+        * Filters the audio embed handler callback.
         *
         * @since 3.6.0
         *
@@ -187,7 +185,7 @@ function wp_maybe_load_embeds() {
        wp_embed_register_handler( 'audio', '#^https?://.+?\.(' . join( '|', wp_get_audio_extensions() ) . ')$#i', apply_filters( 'wp_audio_embed_handler', 'wp_embed_handler_audio' ), 9999 );
 
        /**
-        * Filter the video embed handler callback.
+        * Filters the video embed handler callback.
         *
         * @since 3.6.0
         *
@@ -196,43 +194,6 @@ function wp_maybe_load_embeds() {
        wp_embed_register_handler( 'video', '#^https?://.+?\.(' . join( '|', wp_get_video_extensions() ) . ')$#i', apply_filters( 'wp_video_embed_handler', 'wp_embed_handler_video' ), 9999 );
 }
 
-/**
- * The Google Video embed handler callback.
- *
- * Google Video does not support oEmbed.
- *
- * @see WP_Embed::register_handler()
- * @see WP_Embed::shortcode()
- *
- * @param array  $matches The RegEx matches from the provided regex when calling wp_embed_register_handler().
- * @param array  $attr    Embed attributes.
- * @param string $url     The original URL that was matched by the regex.
- * @param array  $rawattr The original unmodified attributes.
- * @return string The embed HTML.
- */
-function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) {
-       // If the user supplied a fixed width AND height, use it
-       if ( !empty($rawattr['width']) && !empty($rawattr['height']) ) {
-               $width  = (int) $rawattr['width'];
-               $height = (int) $rawattr['height'];
-       } else {
-               list( $width, $height ) = wp_expand_dimensions( 425, 344, $attr['width'], $attr['height'] );
-       }
-
-       /**
-        * Filter the Google Video embed output.
-        *
-        * @since 2.9.0
-        *
-        * @param string $html    Google Video HTML embed markup.
-        * @param array  $matches The RegEx matches from the provided regex.
-        * @param array  $attr    An array of embed attributes.
-        * @param string $url     The original URL that was matched by the regex.
-        * @param array  $rawattr The original unmodified attributes.
-        */
-       return apply_filters( 'embed_googlevideo', '<embed type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docid=' . esc_attr($matches[2]) . '&amp;hl=en&amp;fs=true" style="width:' . esc_attr($width) . 'px;height:' . esc_attr($height) . 'px" allowFullScreen="true" allowScriptAccess="always" />', $matches, $attr, $url, $rawattr );
-}
-
 /**
  * YouTube iframe embed handler callback.
  *
@@ -254,7 +215,7 @@ function wp_embed_handler_youtube( $matches, $attr, $url, $rawattr ) {
        $embed = $wp_embed->autoembed( "https://youtube.com/watch?v={$matches[2]}" );
 
        /**
-        * Filter the YoutTube embed output.
+        * Filters the YoutTube embed output.
         *
         * @since 4.0.0
         *
@@ -283,7 +244,7 @@ function wp_embed_handler_audio( $matches, $attr, $url, $rawattr ) {
        $audio = sprintf( '[audio src="%s" /]', esc_url( $url ) );
 
        /**
-        * Filter the audio embed output.
+        * Filters the audio embed output.
         *
         * @since 3.6.0
         *
@@ -315,7 +276,7 @@ function wp_embed_handler_video( $matches, $attr, $url, $rawattr ) {
        $video = sprintf( '[video %s src="%s" /]', $dimensions, esc_url( $url ) );
 
        /**
-        * Filter the video embed output.
+        * Filters the video embed output.
         *
         * @since 3.6.0
         *
@@ -354,7 +315,7 @@ function wp_oembed_add_discovery_links() {
        }
 
        /**
-        * Filter the oEmbed discovery links HTML.
+        * Filters the oEmbed discovery links HTML.
         *
         * @since 4.4.0
         *
@@ -395,7 +356,7 @@ function get_post_embed_url( $post = null ) {
        }
 
        /**
-        * Filter the URL to embed a specific post.
+        * Filters the URL to embed a specific post.
         *
         * @since 4.4.0
         *
@@ -431,7 +392,7 @@ function get_oembed_endpoint_url( $permalink = '', $format = 'json' ) {
        }
 
        /**
-        * Filter the oEmbed endpoint URL.
+        * Filters the oEmbed endpoint URL.
         *
         * @since 4.4.0
         *
@@ -479,7 +440,7 @@ function get_post_embed_html( $width, $height, $post = null ) {
                 * and edit wp-embed.js directly.
                 */
                $output .=<<<JS
-               !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c<i.length;c++)if(d=i[c],!d.getAttribute("data-secret")){if(f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f),g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}else;}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll('iframe[data-secret="'+d.secret+'"]'),k=b.querySelectorAll('blockquote[data-secret="'+d.secret+'"]');for(e=0;e<k.length;e++)k[e].style.display="none";for(e=0;e<j.length;e++)if(f=j[e],c.source===f.contentWindow){if(f.removeAttribute("style"),"height"===d.message){if(g=parseInt(d.value,10),g>1e3)g=1e3;else if(200>~~g)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);
+               !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c<i.length;c++)if(d=i[c],!d.getAttribute("data-secret")){if(f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f),g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}else;}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll('iframe[data-secret="'+d.secret+'"]'),k=b.querySelectorAll('blockquote[data-secret="'+d.secret+'"]');for(e=0;e<k.length;e++)k[e].style.display="none";for(e=0;e<j.length;e++)if(f=j[e],c.source===f.contentWindow){if(f.removeAttribute("style"),"height"===d.message){if(g=parseInt(d.value,10),g>1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);
 JS;
        }
        $output .= "\n//--><!]]>";
@@ -501,7 +462,7 @@ JS;
        );
 
        /**
-        * Filter the embed HTML output for a given post.
+        * Filters the embed HTML output for a given post.
         *
         * @since 4.4.0
         *
@@ -523,7 +484,8 @@ JS;
  * @return array|false Response data on success, false if post doesn't exist.
  */
 function get_oembed_response_data( $post, $width ) {
-       $post = get_post( $post );
+       $post  = get_post( $post );
+       $width = absint( $width );
 
        if ( ! $post ) {
                return false;
@@ -534,7 +496,7 @@ function get_oembed_response_data( $post, $width ) {
        }
 
        /**
-        * Filter the allowed minimum and maximum widths for the oEmbed response.
+        * Filters the allowed minimum and maximum widths for the oEmbed response.
         *
         * @since 4.4.0
         *
@@ -571,7 +533,7 @@ function get_oembed_response_data( $post, $width ) {
        }
 
        /**
-        * Filter the oEmbed response data.
+        * Filters the oEmbed response data.
         *
         * @since 4.4.0
         *
@@ -839,7 +801,7 @@ function the_excerpt_embed() {
        $output = get_the_excerpt();
 
        /**
-        * Filter the post excerpt for the embed template.
+        * Filters the post excerpt for the embed template.
         *
         * @since 4.4.0
         *
@@ -877,7 +839,6 @@ function wp_embed_excerpt_attachment( $content ) {
  * @since 4.4.0
  */
 function enqueue_embed_scripts() {
-       wp_enqueue_style( 'open-sans' );
        wp_enqueue_style( 'wp-embed-template-ie' );
 
        /**
@@ -911,7 +872,7 @@ function print_embed_styles() {
                         * and edit wp-embed-template.css directly.
                         */
                        ?>
-                       body,html{padding:0;margin:0}body{font-family:sans-serif}.screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px}.dashicons{display:inline-block;width:20px;height:20px;background-color:transparent;background-repeat:no-repeat;-webkit-background-size:20px 20px;background-size:20px;background-position:center;-webkit-transition:background .1s ease-in;transition:background .1s ease-in;position:relative;top:5px}.dashicons-no{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M15.55%2013.7l-2.19%202.06-3.42-3.65-3.64%203.43-2.06-2.18%203.64-3.43-3.42-3.64%202.18-2.06%203.43%203.64%203.64-3.42%202.05%202.18-3.64%203.43z%27%20fill%3D%27%23fff%27%2F%3E%3C%2Fsvg%3E")}.dashicons-admin-comments{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E")}.wp-embed-comments a:hover .dashicons-admin-comments{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E")}.dashicons-share{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E");display:none}.js .dashicons-share{display:inline-block}.wp-embed-share-dialog-open:hover .dashicons-share{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E")}.wp-embed{padding:25px;font:400 14px/1.5 'Open Sans',sans-serif;color:#82878c;background:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05);overflow:auto;zoom:1}.wp-embed a{color:#82878c;text-decoration:none}.wp-embed a:hover{text-decoration:underline}.wp-embed-featured-image{margin-bottom:20px}.wp-embed-featured-image img{width:100%;height:auto;border:none}.wp-embed-featured-image.square{float:left;max-width:160px;margin-right:20px}.wp-embed p{margin:0}p.wp-embed-heading{margin:0 0 15px;font-weight:700;font-size:22px;line-height:1.3}.wp-embed-heading a{color:#32373c}.wp-embed .wp-embed-more{color:#b4b9be}.wp-embed-footer{display:table;width:100%;margin-top:30px}.wp-embed-site-icon{position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);height:25px;width:25px;border:0}.wp-embed-site-title{font-weight:700;line-height:25px}.wp-embed-site-title a{position:relative;display:inline-block;padding-left:35px}.wp-embed-meta,.wp-embed-site-title{display:table-cell}.wp-embed-meta{text-align:right;white-space:nowrap;vertical-align:middle}.wp-embed-comments,.wp-embed-share{display:inline}.wp-embed-comments a,.wp-embed-share-tab-button{display:inline-block}.wp-embed-meta a:hover{text-decoration:none;color:#0073aa}.wp-embed-comments a{line-height:25px}.wp-embed-comments+.wp-embed-share{margin-left:10px}.wp-embed-share-dialog{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#222;background-color:rgba(10,10,10,.9);color:#fff;opacity:1;-webkit-transition:opacity .25s ease-in-out;transition:opacity .25s ease-in-out}.wp-embed-share-dialog.hidden{opacity:0;visibility:hidden}.wp-embed-share-dialog-close,.wp-embed-share-dialog-open{margin:-8px 0 0;padding:0;background:0 0;border:none;cursor:pointer;outline:0}.wp-embed-share-dialog-close .dashicons,.wp-embed-share-dialog-open .dashicons{padding:4px}.wp-embed-share-dialog-open .dashicons{top:8px}.wp-embed-share-dialog-close:focus .dashicons,.wp-embed-share-dialog-open:focus .dashicons{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);-webkit-border-radius:100%;border-radius:100%}.wp-embed-share-dialog-close{position:absolute;top:20px;right:20px;font-size:22px}.wp-embed-share-dialog-close:hover{text-decoration:none}.wp-embed-share-dialog-close .dashicons{height:24px;width:24px;-webkit-background-size:24px 24px;background-size:24px}.wp-embed-share-dialog-content{height:100%;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;overflow:hidden}.wp-embed-share-dialog-text{margin-top:25px;padding:20px}.wp-embed-share-tabs{margin:0 0 20px;padding:0;list-style:none}.wp-embed-share-tab-button button{margin:0;padding:0;border:none;background:0 0;font-size:16px;line-height:1.3;color:#aaa;cursor:pointer;-webkit-transition:color .1s ease-in;transition:color .1s ease-in}.wp-embed-share-tab-button [aria-selected=true],.wp-embed-share-tab-button button:hover{color:#fff}.wp-embed-share-tab-button+.wp-embed-share-tab-button{margin:0 0 0 10px;padding:0 0 0 11px;border-left:1px solid #aaa}.wp-embed-share-tab[aria-hidden=true]{display:none}p.wp-embed-share-description{margin:0;font-size:14px;line-height:1;font-style:italic;color:#aaa}.wp-embed-share-input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;border:none;height:28px;margin:0 0 10px;padding:0 5px;font:400 14px/1.5 'Open Sans',sans-serif;resize:none;cursor:text}textarea.wp-embed-share-input{height:72px}html[dir=rtl] .wp-embed-featured-image.square{float:right;margin-right:0;margin-left:20px}html[dir=rtl] .wp-embed-site-title a{padding-left:0;padding-right:35px}html[dir=rtl] .wp-embed-site-icon{margin-right:0;margin-left:10px;left:auto;right:0}html[dir=rtl] .wp-embed-meta{text-align:left}html[dir=rtl] .wp-embed-share{margin-left:0;margin-right:10px}html[dir=rtl] .wp-embed-share-dialog-close{right:auto;left:20px}html[dir=rtl] .wp-embed-share-tab-button+.wp-embed-share-tab-button{margin:0 10px 0 0;padding:0 11px 0 0;border-left:none;border-right:1px solid #aaa}
+                       body,html{padding:0;margin:0}body{font-family:sans-serif}.wp-embed,.wp-embed-share-input{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px}.dashicons{display:inline-block;width:20px;height:20px;background-color:transparent;background-repeat:no-repeat;-webkit-background-size:20px 20px;background-size:20px;background-position:center;-webkit-transition:background .1s ease-in;transition:background .1s ease-in;position:relative;top:5px}.dashicons-no{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M15.55%2013.7l-2.19%202.06-3.42-3.65-3.64%203.43-2.06-2.18%203.64-3.43-3.42-3.64%202.18-2.06%203.43%203.64%203.64-3.42%202.05%202.18-3.64%203.43z%27%20fill%3D%27%23fff%27%2F%3E%3C%2Fsvg%3E")}.dashicons-admin-comments{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E")}.wp-embed-comments a:hover .dashicons-admin-comments{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E")}.dashicons-share{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E");display:none}.js .dashicons-share{display:inline-block}.wp-embed-share-dialog-open:hover .dashicons-share{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E")}.wp-embed{padding:25px;font-size:14px;font-weight:400;line-height:1.5;color:#82878c;background:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05);overflow:auto;zoom:1}.wp-embed a{color:#82878c;text-decoration:none}.wp-embed a:hover{text-decoration:underline}.wp-embed-featured-image{margin-bottom:20px}.wp-embed-featured-image img{width:100%;height:auto;border:none}.wp-embed-featured-image.square{float:left;max-width:160px;margin-right:20px}.wp-embed p{margin:0}p.wp-embed-heading{margin:0 0 15px;font-weight:600;font-size:22px;line-height:1.3}.wp-embed-heading a{color:#32373c}.wp-embed .wp-embed-more{color:#b4b9be}.wp-embed-footer{display:table;width:100%;margin-top:30px}.wp-embed-site-icon{position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);height:25px;width:25px;border:0}.wp-embed-site-title{font-weight:600;line-height:25px}.wp-embed-site-title a{position:relative;display:inline-block;padding-left:35px}.wp-embed-meta,.wp-embed-site-title{display:table-cell}.wp-embed-meta{text-align:right;white-space:nowrap;vertical-align:middle}.wp-embed-comments,.wp-embed-share{display:inline}.wp-embed-comments a,.wp-embed-share-tab-button{display:inline-block}.wp-embed-meta a:hover{text-decoration:none;color:#0073aa}.wp-embed-comments a{line-height:25px}.wp-embed-comments+.wp-embed-share{margin-left:10px}.wp-embed-share-dialog{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#222;background-color:rgba(10,10,10,.9);color:#fff;opacity:1;-webkit-transition:opacity .25s ease-in-out;transition:opacity .25s ease-in-out}.wp-embed-share-dialog.hidden{opacity:0;visibility:hidden}.wp-embed-share-dialog-close,.wp-embed-share-dialog-open{margin:-8px 0 0;padding:0;background:0 0;border:none;cursor:pointer;outline:0}.wp-embed-share-dialog-close .dashicons,.wp-embed-share-dialog-open .dashicons{padding:4px}.wp-embed-share-dialog-open .dashicons{top:8px}.wp-embed-share-dialog-close:focus .dashicons,.wp-embed-share-dialog-open:focus .dashicons{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);-webkit-border-radius:100%;border-radius:100%}.wp-embed-share-dialog-close{position:absolute;top:20px;right:20px;font-size:22px}.wp-embed-share-dialog-close:hover{text-decoration:none}.wp-embed-share-dialog-close .dashicons{height:24px;width:24px;-webkit-background-size:24px 24px;background-size:24px}.wp-embed-share-dialog-content{height:100%;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;overflow:hidden}.wp-embed-share-dialog-text{margin-top:25px;padding:20px}.wp-embed-share-tabs{margin:0 0 20px;padding:0;list-style:none}.wp-embed-share-tab-button button{margin:0;padding:0;border:none;background:0 0;font-size:16px;line-height:1.3;color:#aaa;cursor:pointer;-webkit-transition:color .1s ease-in;transition:color .1s ease-in}.wp-embed-share-tab-button [aria-selected=true],.wp-embed-share-tab-button button:hover{color:#fff}.wp-embed-share-tab-button+.wp-embed-share-tab-button{margin:0 0 0 10px;padding:0 0 0 11px;border-left:1px solid #aaa}.wp-embed-share-tab[aria-hidden=true]{display:none}p.wp-embed-share-description{margin:0;font-size:14px;line-height:1;font-style:italic;color:#aaa}.wp-embed-share-input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;border:none;height:28px;margin:0 0 10px;padding:0 5px;font-size:14px;font-weight:400;line-height:1.5;resize:none;cursor:text}textarea.wp-embed-share-input{height:72px}html[dir=rtl] .wp-embed-featured-image.square{float:right;margin-right:0;margin-left:20px}html[dir=rtl] .wp-embed-site-title a{padding-left:0;padding-right:35px}html[dir=rtl] .wp-embed-site-icon{margin-right:0;margin-left:10px;left:auto;right:0}html[dir=rtl] .wp-embed-meta{text-align:left}html[dir=rtl] .wp-embed-share{margin-left:0;margin-right:10px}html[dir=rtl] .wp-embed-share-dialog-close{right:auto;left:20px}html[dir=rtl] .wp-embed-share-tab-button+.wp-embed-share-tab-button{margin:0 10px 0 0;padding:0 11px 0 0;border-left:none;border-right:1px solid #aaa}
                        <?php
                }
        ?>
@@ -942,7 +903,7 @@ function print_embed_scripts() {
                         * and edit wp-embed-template.js directly.
                         */
                        ?>
-                       !function(a,b){"use strict";function c(b,c){a.parent.postMessage({message:b,value:c,secret:g},"*")}function d(){function d(){l.className=l.className.replace("hidden",""),b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]').focus()}function e(){l.className+=" hidden",b.querySelector(".wp-embed-share-dialog-open").focus()}function f(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');c.setAttribute("aria-selected","false"),b.querySelector("#"+c.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),a.target.setAttribute("aria-selected","true"),b.querySelector("#"+a.target.getAttribute("aria-controls")).setAttribute("aria-hidden","false")}function g(a){var c,d,e=a.target,f=e.parentElement.previousElementSibling,g=e.parentElement.nextElementSibling;if(37===a.keyCode)c=f;else{if(39!==a.keyCode)return!1;c=g}"rtl"===b.documentElement.getAttribute("dir")&&(c=c===f?g:f),c&&(d=c.firstElementChild,e.setAttribute("tabindex","-1"),e.setAttribute("aria-selected",!1),b.querySelector("#"+e.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),d.setAttribute("tabindex","0"),d.setAttribute("aria-selected","true"),d.focus(),b.querySelector("#"+d.getAttribute("aria-controls")).setAttribute("aria-hidden","false"))}function h(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');n!==a.target||a.shiftKey?c===a.target&&a.shiftKey&&(n.focus(),a.preventDefault()):(c.focus(),a.preventDefault())}function i(a){var b,d=a.target;b=d.hasAttribute("href")?d.getAttribute("href"):d.parentElement.getAttribute("href"),b&&(c("link",b),a.preventDefault())}if(!k){k=!0;var j,l=b.querySelector(".wp-embed-share-dialog"),m=b.querySelector(".wp-embed-share-dialog-open"),n=b.querySelector(".wp-embed-share-dialog-close"),o=b.querySelectorAll(".wp-embed-share-input"),p=b.querySelectorAll(".wp-embed-share-tab-button button");if(o)for(j=0;j<o.length;j++)o[j].addEventListener("click",function(a){a.target.select()});if(m&&m.addEventListener("click",function(){d()}),n&&n.addEventListener("click",function(){e()}),p)for(j=0;j<p.length;j++)p[j].addEventListener("click",f),p[j].addEventListener("keydown",g);b.addEventListener("keydown",function(a){27===a.keyCode&&-1===l.className.indexOf("hidden")?e():9===a.keyCode&&h(a)},!1),a.self!==a.top&&(c("height",Math.ceil(b.body.getBoundingClientRect().height)),b.addEventListener("click",i))}}function e(){a.self!==a.top&&(clearTimeout(i),i=setTimeout(function(){c("height",Math.ceil(b.body.getBoundingClientRect().height))},100))}function f(){a.self===a.top||g||(g=a.location.hash.replace(/.*secret=([\d\w]{10}).*/,"$1"),clearTimeout(h),h=setTimeout(function(){f()},100))}var g,h,i,j=b.querySelector&&a.addEventListener,k=!1;j&&(f(),b.documentElement.className=b.documentElement.className.replace(/\bno-js\b/,"")+" js",b.addEventListener("DOMContentLoaded",d,!1),a.addEventListener("load",d,!1),a.addEventListener("resize",e,!1))}(window,document);
+                       !function(a,b){"use strict";function c(b,c){a.parent.postMessage({message:b,value:c,secret:g},"*")}function d(){function d(){l.className=l.className.replace("hidden",""),b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]').focus()}function e(){l.className+=" hidden",b.querySelector(".wp-embed-share-dialog-open").focus()}function f(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');c.setAttribute("aria-selected","false"),b.querySelector("#"+c.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),a.target.setAttribute("aria-selected","true"),b.querySelector("#"+a.target.getAttribute("aria-controls")).setAttribute("aria-hidden","false")}function g(a){var c,d,e=a.target,f=e.parentElement.previousElementSibling,g=e.parentElement.nextElementSibling;if(37===a.keyCode)c=f;else{if(39!==a.keyCode)return!1;c=g}"rtl"===b.documentElement.getAttribute("dir")&&(c=c===f?g:f),c&&(d=c.firstElementChild,e.setAttribute("tabindex","-1"),e.setAttribute("aria-selected",!1),b.querySelector("#"+e.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),d.setAttribute("tabindex","0"),d.setAttribute("aria-selected","true"),d.focus(),b.querySelector("#"+d.getAttribute("aria-controls")).setAttribute("aria-hidden","false"))}function h(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');n!==a.target||a.shiftKey?c===a.target&&a.shiftKey&&(n.focus(),a.preventDefault()):(c.focus(),a.preventDefault())}function i(a){var b,d=a.target;b=d.hasAttribute("href")?d.getAttribute("href"):d.parentElement.getAttribute("href"),b&&(c("link",b),a.preventDefault())}if(!k){k=!0;var j,l=b.querySelector(".wp-embed-share-dialog"),m=b.querySelector(".wp-embed-share-dialog-open"),n=b.querySelector(".wp-embed-share-dialog-close"),o=b.querySelectorAll(".wp-embed-share-input"),p=b.querySelectorAll(".wp-embed-share-tab-button button"),q=b.querySelector(".wp-embed-featured-image img");if(o)for(j=0;j<o.length;j++)o[j].addEventListener("click",function(a){a.target.select()});if(m&&m.addEventListener("click",function(){d()}),n&&n.addEventListener("click",function(){e()}),p)for(j=0;j<p.length;j++)p[j].addEventListener("click",f),p[j].addEventListener("keydown",g);b.addEventListener("keydown",function(a){27===a.keyCode&&-1===l.className.indexOf("hidden")?e():9===a.keyCode&&h(a)},!1),a.self!==a.top&&(c("height",Math.ceil(b.body.getBoundingClientRect().height)),q&&q.addEventListener("load",function(){c("height",Math.ceil(b.body.getBoundingClientRect().height))}),b.addEventListener("click",i))}}function e(){a.self!==a.top&&(clearTimeout(i),i=setTimeout(function(){c("height",Math.ceil(b.body.getBoundingClientRect().height))},100))}function f(){a.self===a.top||g||(g=a.location.hash.replace(/.*secret=([\d\w]{10}).*/,"$1"),clearTimeout(h),h=setTimeout(function(){f()},100))}var g,h,i,j=b.querySelector&&a.addEventListener,k=!1;j&&(f(),b.documentElement.className=b.documentElement.className.replace(/\bno-js\b/,"")+" js",b.addEventListener("DOMContentLoaded",d,!1),a.addEventListener("load",d,!1),a.addEventListener("resize",e,!1))}(window,document);
                        <?php
                }
        ?>
@@ -1071,7 +1032,7 @@ function the_embed_site_title() {
        $site_title = '<div class="wp-embed-site-title">' . $site_title . '</div>';
 
        /**
-        * Filter the site title HTML in the embed footer.
+        * Filters the site title HTML in the embed footer.
         *
         * @since 4.4.0
         *
index 9b59478a5f01220cef7c4be4853241bceb89f7ce..e5c70891640a039435de1af44a3f55370d5742a2 100644 (file)
@@ -91,7 +91,7 @@ if ( have_comments() ) : while ( have_comments() ) : the_comment();
 <?php else : // post pass ?>
                <content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php comment_text(); ?>]]></content>
 <?php endif; // post pass
-       // Return comment threading information (http://www.ietf.org/rfc/rfc4685.txt)
+       // Return comment threading information (https://www.ietf.org/rfc/rfc4685.txt)
        if ( $comment->comment_parent == 0 ) : // This comment is top level ?>
                <thr:in-reply-to ref="<?php the_guid(); ?>" href="<?php the_permalink_rss() ?>" type="<?php bloginfo_rss('html_type'); ?>" />
 <?php else : // This comment is in reply to another comment
index 42ff4ea9913e6fdfecd5ca9f42c1c95bdec8c5cf..b5f3d781b2acad8785229d6d695aa91058d072bd 100644 (file)
@@ -48,7 +48,7 @@ do_action( 'rss_tag_pre', 'rss2' );
                $duration = 'hourly';
 
                /**
-                * Filter how often to update the RSS feed.
+                * Filters how often to update the RSS feed.
                 *
                 * @since 2.1.0
                 *
@@ -61,7 +61,7 @@ do_action( 'rss_tag_pre', 'rss2' );
                $frequency = '1';
 
                /**
-                * Filter the RSS update frequency.
+                * Filters the RSS update frequency.
                 *
                 * @since 2.1.0
                 *
index 7b1f30c78a4928a3ad29f0a39bf055f10f5e60b4..f673e91d8bc52bc08f1ae14d62e8298886f555b5 100644 (file)
@@ -7,6 +7,7 @@
  *
  * @package WordPress
  * @subpackage Feed
+ * @since 2.1.0
  */
 
 /**
@@ -25,7 +26,7 @@
 function get_bloginfo_rss($show = '') {
        $info = strip_tags(get_bloginfo($show));
        /**
-        * Filter the bloginfo for use in RSS feeds.
+        * Filters the bloginfo for use in RSS feeds.
         *
         * @since 2.2.0
         *
@@ -52,7 +53,7 @@ function get_bloginfo_rss($show = '') {
  */
 function bloginfo_rss($show = '') {
        /**
-        * Filter the bloginfo for display in RSS feeds.
+        * Filters the bloginfo for display in RSS feeds.
         *
         * @since 2.1.0
         *
@@ -68,7 +69,7 @@ function bloginfo_rss($show = '') {
  * Retrieve the default feed.
  *
  * The default feed is 'rss2', unless a plugin changes it through the
- * 'default_feed' filter.
+ * {@see 'default_feed'} filter.
  *
  * @since 2.5.0
  *
@@ -76,7 +77,7 @@ function bloginfo_rss($show = '') {
  */
 function get_default_feed() {
        /**
-        * Filter the default feed type.
+        * Filters the default feed type.
         *
         * @since 2.5.0
         *
@@ -103,7 +104,7 @@ function get_wp_title_rss( $deprecated = '&#8211;' ) {
        }
 
        /**
-        * Filter the blog title for use as the feed title.
+        * Filters the blog title for use as the feed title.
         *
         * @since 2.2.0
         * @since 4.4.0 The `$sep` parameter was deprecated and renamed to `$deprecated`.
@@ -129,7 +130,7 @@ function wp_title_rss( $deprecated = '&#8211;' ) {
        }
 
        /**
-        * Filter the blog title for display of the feed title.
+        * Filters the blog title for display of the feed title.
         *
         * @since 2.2.0
         * @since 4.4.0 The `$sep` parameter was deprecated and renamed to `$deprecated`.
@@ -153,7 +154,7 @@ function get_the_title_rss() {
        $title = get_the_title();
 
        /**
-        * Filter the post title for use in a feed.
+        * Filters the post title for use in a feed.
         *
         * @since 1.2.0
         *
@@ -189,7 +190,7 @@ function get_the_content_feed($feed_type = null) {
        $content = apply_filters( 'the_content', get_the_content() );
        $content = str_replace(']]>', ']]&gt;', $content);
        /**
-        * Filter the post content for use in feeds.
+        * Filters the post content for use in feeds.
         *
         * @since 2.9.0
         *
@@ -219,7 +220,7 @@ function the_content_feed($feed_type = null) {
 function the_excerpt_rss() {
        $output = get_the_excerpt();
        /**
-        * Filter the post excerpt for a feed.
+        * Filters the post excerpt for a feed.
         *
         * @since 1.2.0
         *
@@ -235,7 +236,7 @@ function the_excerpt_rss() {
  */
 function the_permalink_rss() {
        /**
-        * Filter the permalink to the post for use in feeds.
+        * Filters the permalink to the post for use in feeds.
         *
         * @since 2.3.0
         *
@@ -252,7 +253,7 @@ function the_permalink_rss() {
  */
 function comments_link_feed() {
        /**
-        * Filter the comments permalink for the current post.
+        * Filters the comments permalink for the current post.
         *
         * @since 3.6.0
         *
@@ -300,7 +301,7 @@ function get_comment_guid($comment_id = null) {
  */
 function comment_link( $comment = null ) {
        /**
-        * Filter the current comment's permalink.
+        * Filters the current comment's permalink.
         *
         * @since 3.6.0
         *
@@ -320,7 +321,7 @@ function comment_link( $comment = null ) {
  */
 function get_comment_author_rss() {
        /**
-        * Filter the current comment author for use in a feed.
+        * Filters the current comment author for use in a feed.
         *
         * @since 1.5.0
         *
@@ -348,7 +349,7 @@ function comment_author_rss() {
 function comment_text_rss() {
        $comment_text = get_comment_text();
        /**
-        * Filter the current comment content for use in a feed.
+        * Filters the current comment content for use in a feed.
         *
         * @since 1.5.0
         *
@@ -402,7 +403,7 @@ function get_the_category_rss($type = null) {
        }
 
        /**
-        * Filter all of the post categories for display in a feed.
+        * Filters all of the post categories for display in a feed.
         *
         * @since 1.2.0
         *
@@ -469,7 +470,7 @@ function rss_enclosure() {
                                $type = $t[0];
 
                                /**
-                                * Filter the RSS enclosure HTML link tag for the current post.
+                                * Filters the RSS enclosure HTML link tag for the current post.
                                 *
                                 * @since 2.2.0
                                 *
@@ -503,7 +504,7 @@ function atom_enclosure() {
                        foreach ( (array) $val as $enc ) {
                                $enclosure = explode("\n", $enc);
                                /**
-                                * Filter the atom enclosure HTML link tag for the current post.
+                                * Filters the atom enclosure HTML link tag for the current post.
                                 *
                                 * @since 2.2.0
                                 *
@@ -606,7 +607,7 @@ function rss2_site_icon() {
 function self_link() {
        $host = @parse_url(home_url());
        /**
-        * Filter the current feed URL.
+        * Filters the current feed URL.
         *
         * @since 3.6.0
         *
@@ -640,7 +641,7 @@ function feed_content_type( $type = '' ) {
        $content_type = ( !empty($types[$type]) ) ? $types[$type] : 'application/octet-stream';
 
        /**
-        * Filter the content type for a specific feed type.
+        * Filters the content type for a specific feed type.
         *
         * @since 2.8.0
         *
index 9f4597d1779453e80a0fe67ad308188819d7e0bd..2701c1a1a9080cb34d2d0f9559bde21d2e34add7 100644 (file)
@@ -20,7 +20,7 @@
  *
  * Code within certain html blocks are skipped.
  *
- * Do not use this function before the 'init' action hook; everything will break.
+ * Do not use this function before the {@see 'init'} action hook; everything will break.
  *
  * @since 0.71
  *
@@ -66,7 +66,7 @@ function wptexturize( $text, $reset = false ) {
        // Set up static variables. Run once only.
        if ( $reset || ! isset( $static_characters ) ) {
                /**
-                * Filter whether to skip running wptexturize().
+                * Filters whether to skip running wptexturize().
                 *
                 * Passing false to the filter will effectively short-circuit wptexturize().
                 * returning the original text passed to the function instead.
@@ -195,7 +195,7 @@ function wptexturize( $text, $reset = false ) {
 
        // Must do this every time in case plugins use these filters in a context sensitive manner
        /**
-        * Filter the list of HTML elements not to texturize.
+        * Filters the list of HTML elements not to texturize.
         *
         * @since 2.8.0
         *
@@ -203,7 +203,7 @@ function wptexturize( $text, $reset = false ) {
         */
        $no_texturize_tags = apply_filters( 'no_texturize_tags', $default_no_texturize_tags );
        /**
-        * Filter the list of shortcodes not to texturize.
+        * Filters the list of shortcodes not to texturize.
         *
         * @since 2.8.0
         *
@@ -934,7 +934,7 @@ function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = fals
 
        $string = @htmlspecialchars( $string, $quote_style, $charset, $double_encode );
 
-       // Backwards compatibility
+       // Back-compat.
        if ( 'single' === $_quote_style )
                $string = str_replace( "'", '&#039;', $string );
 
@@ -1124,7 +1124,374 @@ function utf8_uri_encode( $utf8_string, $length = 0 ) {
  *
  * If there are no accent characters, then the string given is just returned.
  *
+ * **Accent characters converted:**
+ *
+ * Currency signs:
+ *
+ * |   Code   | Glyph | Replacement |     Description     |
+ * | -------- | ----- | ----------- | ------------------- |
+ * | U+00A3   | £     | (empty)     | British Pound sign  |
+ * | U+20AC   | €     | E           | Euro sign           |
+ *
+ * Decompositions for Latin-1 Supplement:
+ *
+ * |  Code   | Glyph | Replacement |               Description              |
+ * | ------- | ----- | ----------- | -------------------------------------- |
+ * | U+00AA  | ª     | a           | Feminine ordinal indicator             |
+ * | U+00BA  | º     | o           | Masculine ordinal indicator            |
+ * | U+00C0  | À     | A           | Latin capital letter A with grave      |
+ * | U+00C1  | Á     | A           | Latin capital letter A with acute      |
+ * | U+00C2  | Â     | A           | Latin capital letter A with circumflex |
+ * | U+00C3  | Ã     | A           | Latin capital letter A with tilde      |
+ * | U+00C4  | Ä     | A           | Latin capital letter A with diaeresis  |
+ * | U+00C5  | Å     | A           | Latin capital letter A with ring above |
+ * | U+00C6  | Æ     | AE          | Latin capital letter AE                |
+ * | U+00C7  | Ç     | C           | Latin capital letter C with cedilla    |
+ * | U+00C8  | È     | E           | Latin capital letter E with grave      |
+ * | U+00C9  | É     | E           | Latin capital letter E with acute      |
+ * | U+00CA  | Ê     | E           | Latin capital letter E with circumflex |
+ * | U+00CB  | Ë     | E           | Latin capital letter E with diaeresis  |
+ * | U+00CC  | Ì     | I           | Latin capital letter I with grave      |
+ * | U+00CD  | Í     | I           | Latin capital letter I with acute      |
+ * | U+00CE  | Î     | I           | Latin capital letter I with circumflex |
+ * | U+00CF  | Ï     | I           | Latin capital letter I with diaeresis  |
+ * | U+00D0  | Ð     | D           | Latin capital letter Eth               |
+ * | U+00D1  | Ñ     | N           | Latin capital letter N with tilde      |
+ * | U+00D2  | Ò     | O           | Latin capital letter O with grave      |
+ * | U+00D3  | Ó     | O           | Latin capital letter O with acute      |
+ * | U+00D4  | Ô     | O           | Latin capital letter O with circumflex |
+ * | U+00D5  | Õ     | O           | Latin capital letter O with tilde      |
+ * | U+00D6  | Ö     | O           | Latin capital letter O with diaeresis  |
+ * | U+00D8  | Ø     | O           | Latin capital letter O with stroke     |
+ * | U+00D9  | Ù     | U           | Latin capital letter U with grave      |
+ * | U+00DA  | Ú     | U           | Latin capital letter U with acute      |
+ * | U+00DB  | Û     | U           | Latin capital letter U with circumflex |
+ * | U+00DC  | Ü     | U           | Latin capital letter U with diaeresis  |
+ * | U+00DD  | Ý     | Y           | Latin capital letter Y with acute      |
+ * | U+00DE  | Þ     | TH          | Latin capital letter Thorn             |
+ * | U+00DF  | ß     | s           | Latin small letter sharp s             |
+ * | U+00E0  | à     | a           | Latin small letter a with grave        |
+ * | U+00E1  | á     | a           | Latin small letter a with acute        |
+ * | U+00E2  | â     | a           | Latin small letter a with circumflex   |
+ * | U+00E3  | ã     | a           | Latin small letter a with tilde        |
+ * | U+00E4  | ä     | a           | Latin small letter a with diaeresis    |
+ * | U+00E5  | å     | a           | Latin small letter a with ring above   |
+ * | U+00E6  | æ     | ae          | Latin small letter ae                  |
+ * | U+00E7  | ç     | c           | Latin small letter c with cedilla      |
+ * | U+00E8  | è     | e           | Latin small letter e with grave        |
+ * | U+00E9  | é     | e           | Latin small letter e with acute        |
+ * | U+00EA  | ê     | e           | Latin small letter e with circumflex   |
+ * | U+00EB  | ë     | e           | Latin small letter e with diaeresis    |
+ * | U+00EC  | ì     | i           | Latin small letter i with grave        |
+ * | U+00ED  | í     | i           | Latin small letter i with acute        |
+ * | U+00EE  | î     | i           | Latin small letter i with circumflex   |
+ * | U+00EF  | ï     | i           | Latin small letter i with diaeresis    |
+ * | U+00F0  | ð     | d           | Latin small letter Eth                 |
+ * | U+00F1  | ñ     | n           | Latin small letter n with tilde        |
+ * | U+00F2  | ò     | o           | Latin small letter o with grave        |
+ * | U+00F3  | ó     | o           | Latin small letter o with acute        |
+ * | U+00F4  | ô     | o           | Latin small letter o with circumflex   |
+ * | U+00F5  | õ     | o           | Latin small letter o with tilde        |
+ * | U+00F6  | ö     | o           | Latin small letter o with diaeresis    |
+ * | U+00F8  | ø     | o           | Latin small letter o with stroke       |
+ * | U+00F9  | ù     | u           | Latin small letter u with grave        |
+ * | U+00FA  | ú     | u           | Latin small letter u with acute        |
+ * | U+00FB  | û     | u           | Latin small letter u with circumflex   |
+ * | U+00FC  | ü     | u           | Latin small letter u with diaeresis    |
+ * | U+00FD  | ý     | y           | Latin small letter y with acute        |
+ * | U+00FE  | þ     | th          | Latin small letter Thorn               |
+ * | U+00FF  | ÿ     | y           | Latin small letter y with diaeresis    |
+ *
+ * Decompositions for Latin Extended-A:
+ *
+ * |  Code   | Glyph | Replacement |                    Description                    |
+ * | ------- | ----- | ----------- | ------------------------------------------------- |
+ * | U+0100  | Ā     | A           | Latin capital letter A with macron                |
+ * | U+0101  | ā     | a           | Latin small letter a with macron                  |
+ * | U+0102  | Ă     | A           | Latin capital letter A with breve                 |
+ * | U+0103  | ă     | a           | Latin small letter a with breve                   |
+ * | U+0104  | Ą     | A           | Latin capital letter A with ogonek                |
+ * | U+0105  | ą     | a           | Latin small letter a with ogonek                  |
+ * | U+01006 | Ć     | C           | Latin capital letter C with acute                 |
+ * | U+0107  | ć     | c           | Latin small letter c with acute                   |
+ * | U+0108  | Ĉ     | C           | Latin capital letter C with circumflex            |
+ * | U+0109  | ĉ     | c           | Latin small letter c with circumflex              |
+ * | U+010A  | Ċ     | C           | Latin capital letter C with dot above             |
+ * | U+010B  | ċ     | c           | Latin small letter c with dot above               |
+ * | U+010C  | Č     | C           | Latin capital letter C with caron                 |
+ * | U+010D  | č     | c           | Latin small letter c with caron                   |
+ * | U+010E  | Ď     | D           | Latin capital letter D with caron                 |
+ * | U+010F  | ď     | d           | Latin small letter d with caron                   |
+ * | U+0110  | Đ     | D           | Latin capital letter D with stroke                |
+ * | U+0111  | đ     | d           | Latin small letter d with stroke                  |
+ * | U+0112  | Ē     | E           | Latin capital letter E with macron                |
+ * | U+0113  | ē     | e           | Latin small letter e with macron                  |
+ * | U+0114  | Ĕ     | E           | Latin capital letter E with breve                 |
+ * | U+0115  | ĕ     | e           | Latin small letter e with breve                   |
+ * | U+0116  | Ė     | E           | Latin capital letter E with dot above             |
+ * | U+0117  | ė     | e           | Latin small letter e with dot above               |
+ * | U+0118  | Ę     | E           | Latin capital letter E with ogonek                |
+ * | U+0119  | ę     | e           | Latin small letter e with ogonek                  |
+ * | U+011A  | Ě     | E           | Latin capital letter E with caron                 |
+ * | U+011B  | ě     | e           | Latin small letter e with caron                   |
+ * | U+011C  | Ĝ     | G           | Latin capital letter G with circumflex            |
+ * | U+011D  | ĝ     | g           | Latin small letter g with circumflex              |
+ * | U+011E  | Ğ     | G           | Latin capital letter G with breve                 |
+ * | U+011F  | ğ     | g           | Latin small letter g with breve                   |
+ * | U+0120  | Ġ     | G           | Latin capital letter G with dot above             |
+ * | U+0121  | ġ     | g           | Latin small letter g with dot above               |
+ * | U+0122  | Ģ     | G           | Latin capital letter G with cedilla               |
+ * | U+0123  | ģ     | g           | Latin small letter g with cedilla                 |
+ * | U+0124  | Ĥ     | H           | Latin capital letter H with circumflex            |
+ * | U+0125  | ĥ     | h           | Latin small letter h with circumflex              |
+ * | U+0126  | Ħ     | H           | Latin capital letter H with stroke                |
+ * | U+0127  | ħ     | h           | Latin small letter h with stroke                  |
+ * | U+0128  | Ĩ     | I           | Latin capital letter I with tilde                 |
+ * | U+0129  | ĩ     | i           | Latin small letter i with tilde                   |
+ * | U+012A  | Ī     | I           | Latin capital letter I with macron                |
+ * | U+012B  | ī     | i           | Latin small letter i with macron                  |
+ * | U+012C  | Ĭ     | I           | Latin capital letter I with breve                 |
+ * | U+012D  | ĭ     | i           | Latin small letter i with breve                   |
+ * | U+012E  | Į     | I           | Latin capital letter I with ogonek                |
+ * | U+012F  | į     | i           | Latin small letter i with ogonek                  |
+ * | U+0130  | İ     | I           | Latin capital letter I with dot above             |
+ * | U+0131  | ı     | i           | Latin small letter dotless i                      |
+ * | U+0132  | IJ     | IJ          | Latin capital ligature IJ                         |
+ * | U+0133  | ij     | ij          | Latin small ligature ij                           |
+ * | U+0134  | Ĵ     | J           | Latin capital letter J with circumflex            |
+ * | U+0135  | ĵ     | j           | Latin small letter j with circumflex              |
+ * | U+0136  | Ķ     | K           | Latin capital letter K with cedilla               |
+ * | U+0137  | ķ     | k           | Latin small letter k with cedilla                 |
+ * | U+0138  | ĸ     | k           | Latin small letter Kra                            |
+ * | U+0139  | Ĺ     | L           | Latin capital letter L with acute                 |
+ * | U+013A  | ĺ     | l           | Latin small letter l with acute                   |
+ * | U+013B  | Ļ     | L           | Latin capital letter L with cedilla               |
+ * | U+013C  | ļ     | l           | Latin small letter l with cedilla                 |
+ * | U+013D  | Ľ     | L           | Latin capital letter L with caron                 |
+ * | U+013E  | ľ     | l           | Latin small letter l with caron                   |
+ * | U+013F  | Ŀ     | L           | Latin capital letter L with middle dot            |
+ * | U+0140  | ŀ     | l           | Latin small letter l with middle dot              |
+ * | U+0141  | Ł     | L           | Latin capital letter L with stroke                |
+ * | U+0142  | ł     | l           | Latin small letter l with stroke                  |
+ * | U+0143  | Ń     | N           | Latin capital letter N with acute                 |
+ * | U+0144  | ń     | n           | Latin small letter N with acute                   |
+ * | U+0145  | Ņ     | N           | Latin capital letter N with cedilla               |
+ * | U+0146  | ņ     | n           | Latin small letter n with cedilla                 |
+ * | U+0147  | Ň     | N           | Latin capital letter N with caron                 |
+ * | U+0148  | ň     | n           | Latin small letter n with caron                   |
+ * | U+0149  | ʼn     | N           | Latin small letter n preceded by apostrophe       |
+ * | U+014A  | Ŋ     | n           | Latin capital letter Eng                          |
+ * | U+014B  | ŋ     | N           | Latin small letter Eng                            |
+ * | U+014C  | Ō     | O           | Latin capital letter O with macron                |
+ * | U+014D  | ō     | o           | Latin small letter o with macron                  |
+ * | U+014E  | Ŏ     | O           | Latin capital letter O with breve                 |
+ * | U+014F  | ŏ     | o           | Latin small letter o with breve                   |
+ * | U+0150  | Ő     | O           | Latin capital letter O with double acute          |
+ * | U+0151  | ő     | o           | Latin small letter o with double acute            |
+ * | U+0152  | Œ     | OE          | Latin capital ligature OE                         |
+ * | U+0153  | œ     | oe          | Latin small ligature oe                           |
+ * | U+0154  | Ŕ     | R           | Latin capital letter R with acute                 |
+ * | U+0155  | ŕ     | r           | Latin small letter r with acute                   |
+ * | U+0156  | Ŗ     | R           | Latin capital letter R with cedilla               |
+ * | U+0157  | ŗ     | r           | Latin small letter r with cedilla                 |
+ * | U+0158  | Ř     | R           | Latin capital letter R with caron                 |
+ * | U+0159  | ř     | r           | Latin small letter r with caron                   |
+ * | U+015A  | Ś     | S           | Latin capital letter S with acute                 |
+ * | U+015B  | ś     | s           | Latin small letter s with acute                   |
+ * | U+015C  | Ŝ     | S           | Latin capital letter S with circumflex            |
+ * | U+015D  | ŝ     | s           | Latin small letter s with circumflex              |
+ * | U+015E  | Ş     | S           | Latin capital letter S with cedilla               |
+ * | U+015F  | ş     | s           | Latin small letter s with cedilla                 |
+ * | U+0160  | Š     | S           | Latin capital letter S with caron                 |
+ * | U+0161  | š     | s           | Latin small letter s with caron                   |
+ * | U+0162  | Ţ     | T           | Latin capital letter T with cedilla               |
+ * | U+0163  | ţ     | t           | Latin small letter t with cedilla                 |
+ * | U+0164  | Ť     | T           | Latin capital letter T with caron                 |
+ * | U+0165  | ť     | t           | Latin small letter t with caron                   |
+ * | U+0166  | Ŧ     | T           | Latin capital letter T with stroke                |
+ * | U+0167  | ŧ     | t           | Latin small letter t with stroke                  |
+ * | U+0168  | Ũ     | U           | Latin capital letter U with tilde                 |
+ * | U+0169  | ũ     | u           | Latin small letter u with tilde                   |
+ * | U+016A  | Ū     | U           | Latin capital letter U with macron                |
+ * | U+016B  | ū     | u           | Latin small letter u with macron                  |
+ * | U+016C  | Ŭ     | U           | Latin capital letter U with breve                 |
+ * | U+016D  | ŭ     | u           | Latin small letter u with breve                   |
+ * | U+016E  | Ů     | U           | Latin capital letter U with ring above            |
+ * | U+016F  | ů     | u           | Latin small letter u with ring above              |
+ * | U+0170  | Ű     | U           | Latin capital letter U with double acute          |
+ * | U+0171  | ű     | u           | Latin small letter u with double acute            |
+ * | U+0172  | Ų     | U           | Latin capital letter U with ogonek                |
+ * | U+0173  | ų     | u           | Latin small letter u with ogonek                  |
+ * | U+0174  | Ŵ     | W           | Latin capital letter W with circumflex            |
+ * | U+0175  | ŵ     | w           | Latin small letter w with circumflex              |
+ * | U+0176  | Ŷ     | Y           | Latin capital letter Y with circumflex            |
+ * | U+0177  | ŷ     | y           | Latin small letter y with circumflex              |
+ * | U+0178  | Ÿ     | Y           | Latin capital letter Y with diaeresis             |
+ * | U+0179  | Ź     | Z           | Latin capital letter Z with acute                 |
+ * | U+017A  | ź     | z           | Latin small letter z with acute                   |
+ * | U+017B  | Ż     | Z           | Latin capital letter Z with dot above             |
+ * | U+017C  | ż     | z           | Latin small letter z with dot above               |
+ * | U+017D  | Ž     | Z           | Latin capital letter Z with caron                 |
+ * | U+017E  | ž     | z           | Latin small letter z with caron                   |
+ * | U+017F  | ſ     | s           | Latin small letter long s                         |
+ * | U+01A0  | Ơ     | O           | Latin capital letter O with horn                  |
+ * | U+01A1  | ơ     | o           | Latin small letter o with horn                    |
+ * | U+01AF  | Ư     | U           | Latin capital letter U with horn                  |
+ * | U+01B0  | ư     | u           | Latin small letter u with horn                    |
+ * | U+01CD  | Ǎ     | A           | Latin capital letter A with caron                 |
+ * | U+01CE  | ǎ     | a           | Latin small letter a with caron                   |
+ * | U+01CF  | Ǐ     | I           | Latin capital letter I with caron                 |
+ * | U+01D0  | ǐ     | i           | Latin small letter i with caron                   |
+ * | U+01D1  | Ǒ     | O           | Latin capital letter O with caron                 |
+ * | U+01D2  | ǒ     | o           | Latin small letter o with caron                   |
+ * | U+01D3  | Ǔ     | U           | Latin capital letter U with caron                 |
+ * | U+01D4  | ǔ     | u           | Latin small letter u with caron                   |
+ * | U+01D5  | Ǖ     | U           | Latin capital letter U with diaeresis and macron  |
+ * | U+01D6  | ǖ     | u           | Latin small letter u with diaeresis and macron    |
+ * | U+01D7  | Ǘ     | U           | Latin capital letter U with diaeresis and acute   |
+ * | U+01D8  | ǘ     | u           | Latin small letter u with diaeresis and acute     |
+ * | U+01D9  | Ǚ     | U           | Latin capital letter U with diaeresis and caron   |
+ * | U+01DA  | ǚ     | u           | Latin small letter u with diaeresis and caron     |
+ * | U+01DB  | Ǜ     | U           | Latin capital letter U with diaeresis and grave   |
+ * | U+01DC  | ǜ     | u           | Latin small letter u with diaeresis and grave     |
+ *
+ * Decompositions for Latin Extended-B:
+ *
+ * |   Code   | Glyph | Replacement |                Description                |
+ * | -------- | ----- | ----------- | ----------------------------------------- |
+ * | U+0218   | Ș     | S           | Latin capital letter S with comma below   |
+ * | U+0219   | ș     | s           | Latin small letter s with comma below     |
+ * | U+021A   | Ț     | T           | Latin capital letter T with comma below   |
+ * | U+021B   | ț     | t           | Latin small letter t with comma below     |
+ *
+ * Vowels with diacritic (Chinese, Hanyu Pinyin):
+ *
+ * |   Code   | Glyph | Replacement |                      Description                      |
+ * | -------- | ----- | ----------- | ----------------------------------------------------- |
+ * | U+0251   | ɑ     | a           | Latin small letter alpha                              |
+ * | U+1EA0   | Ạ     | A           | Latin capital letter A with dot below                 |
+ * | U+1EA1   | ạ     | a           | Latin small letter a with dot below                   |
+ * | U+1EA2   | Ả     | A           | Latin capital letter A with hook above                |
+ * | U+1EA3   | ả     | a           | Latin small letter a with hook above                  |
+ * | U+1EA4   | Ấ     | A           | Latin capital letter A with circumflex and acute      |
+ * | U+1EA5   | ấ     | a           | Latin small letter a with circumflex and acute        |
+ * | U+1EA6   | Ầ     | A           | Latin capital letter A with circumflex and grave      |
+ * | U+1EA7   | ầ     | a           | Latin small letter a with circumflex and grave        |
+ * | U+1EA8   | Ẩ     | A           | Latin capital letter A with circumflex and hook above |
+ * | U+1EA9   | ẩ     | a           | Latin small letter a with circumflex and hook above   |
+ * | U+1EAA   | Ẫ     | A           | Latin capital letter A with circumflex and tilde      |
+ * | U+1EAB   | ẫ     | a           | Latin small letter a with circumflex and tilde        |
+ * | U+1EA6   | Ậ     | A           | Latin capital letter A with circumflex and dot below  |
+ * | U+1EAD   | ậ     | a           | Latin small letter a with circumflex and dot below    |
+ * | U+1EAE   | Ắ     | A           | Latin capital letter A with breve and acute           |
+ * | U+1EAF   | ắ     | a           | Latin small letter a with breve and acute             |
+ * | U+1EB0   | Ằ     | A           | Latin capital letter A with breve and grave           |
+ * | U+1EB1   | ằ     | a           | Latin small letter a with breve and grave             |
+ * | U+1EB2   | Ẳ     | A           | Latin capital letter A with breve and hook above      |
+ * | U+1EB3   | ẳ     | a           | Latin small letter a with breve and hook above        |
+ * | U+1EB4   | Ẵ     | A           | Latin capital letter A with breve and tilde           |
+ * | U+1EB5   | ẵ     | a           | Latin small letter a with breve and tilde             |
+ * | U+1EB6   | Ặ     | A           | Latin capital letter A with breve and dot below       |
+ * | U+1EB7   | ặ     | a           | Latin small letter a with breve and dot below         |
+ * | U+1EB8   | Ẹ     | E           | Latin capital letter E with dot below                 |
+ * | U+1EB9   | ẹ     | e           | Latin small letter e with dot below                   |
+ * | U+1EBA   | Ẻ     | E           | Latin capital letter E with hook above                |
+ * | U+1EBB   | ẻ     | e           | Latin small letter e with hook above                  |
+ * | U+1EBC   | Ẽ     | E           | Latin capital letter E with tilde                     |
+ * | U+1EBD   | ẽ     | e           | Latin small letter e with tilde                       |
+ * | U+1EBE   | Ế     | E           | Latin capital letter E with circumflex and acute      |
+ * | U+1EBF   | ế     | e           | Latin small letter e with circumflex and acute        |
+ * | U+1EC0   | Ề     | E           | Latin capital letter E with circumflex and grave      |
+ * | U+1EC1   | ề     | e           | Latin small letter e with circumflex and grave        |
+ * | U+1EC2   | Ể     | E           | Latin capital letter E with circumflex and hook above |
+ * | U+1EC3   | ể     | e           | Latin small letter e with circumflex and hook above   |
+ * | U+1EC4   | Ễ     | E           | Latin capital letter E with circumflex and tilde      |
+ * | U+1EC5   | ễ     | e           | Latin small letter e with circumflex and tilde        |
+ * | U+1EC6   | Ệ     | E           | Latin capital letter E with circumflex and dot below  |
+ * | U+1EC7   | ệ     | e           | Latin small letter e with circumflex and dot below    |
+ * | U+1EC8   | Ỉ     | I           | Latin capital letter I with hook above                |
+ * | U+1EC9   | ỉ     | i           | Latin small letter i with hook above                  |
+ * | U+1ECA   | Ị     | I           | Latin capital letter I with dot below                 |
+ * | U+1ECB   | ị     | i           | Latin small letter i with dot below                   |
+ * | U+1ECC   | Ọ     | O           | Latin capital letter O with dot below                 |
+ * | U+1ECD   | ọ     | o           | Latin small letter o with dot below                   |
+ * | U+1ECE   | Ỏ     | O           | Latin capital letter O with hook above                |
+ * | U+1ECF   | ỏ     | o           | Latin small letter o with hook above                  |
+ * | U+1ED0   | Ố     | O           | Latin capital letter O with circumflex and acute      |
+ * | U+1ED1   | ố     | o           | Latin small letter o with circumflex and acute        |
+ * | U+1ED2   | Ồ     | O           | Latin capital letter O with circumflex and grave      |
+ * | U+1ED3   | ồ     | o           | Latin small letter o with circumflex and grave        |
+ * | U+1ED4   | Ổ     | O           | Latin capital letter O with circumflex and hook above |
+ * | U+1ED5   | ổ     | o           | Latin small letter o with circumflex and hook above   |
+ * | U+1ED6   | Ỗ     | O           | Latin capital letter O with circumflex and tilde      |
+ * | U+1ED7   | ỗ     | o           | Latin small letter o with circumflex and tilde        |
+ * | U+1ED8   | Ộ     | O           | Latin capital letter O with circumflex and dot below  |
+ * | U+1ED9   | ộ     | o           | Latin small letter o with circumflex and dot below    |
+ * | U+1EDA   | Ớ     | O           | Latin capital letter O with horn and acute            |
+ * | U+1EDB   | ớ     | o           | Latin small letter o with horn and acute              |
+ * | U+1EDC   | Ờ     | O           | Latin capital letter O with horn and grave            |
+ * | U+1EDD   | ờ     | o           | Latin small letter o with horn and grave              |
+ * | U+1EDE   | Ở     | O           | Latin capital letter O with horn and hook above       |
+ * | U+1EDF   | ở     | o           | Latin small letter o with horn and hook above         |
+ * | U+1EE0   | Ỡ     | O           | Latin capital letter O with horn and tilde            |
+ * | U+1EE1   | ỡ     | o           | Latin small letter o with horn and tilde              |
+ * | U+1EE2   | Ợ     | O           | Latin capital letter O with horn and dot below        |
+ * | U+1EE3   | ợ     | o           | Latin small letter o with horn and dot below          |
+ * | U+1EE4   | Ụ     | U           | Latin capital letter U with dot below                 |
+ * | U+1EE5   | ụ     | u           | Latin small letter u with dot below                   |
+ * | U+1EE6   | Ủ     | U           | Latin capital letter U with hook above                |
+ * | U+1EE7   | ủ     | u           | Latin small letter u with hook above                  |
+ * | U+1EE8   | Ứ     | U           | Latin capital letter U with horn and acute            |
+ * | U+1EE9   | ứ     | u           | Latin small letter u with horn and acute              |
+ * | U+1EEA   | Ừ     | U           | Latin capital letter U with horn and grave            |
+ * | U+1EEB   | ừ     | u           | Latin small letter u with horn and grave              |
+ * | U+1EEC   | Ử     | U           | Latin capital letter U with horn and hook above       |
+ * | U+1EED   | ử     | u           | Latin small letter u with horn and hook above         |
+ * | U+1EEE   | Ữ     | U           | Latin capital letter U with horn and tilde            |
+ * | U+1EEF   | ữ     | u           | Latin small letter u with horn and tilde              |
+ * | U+1EF0   | Ự     | U           | Latin capital letter U with horn and dot below        |
+ * | U+1EF1   | ự     | u           | Latin small letter u with horn and dot below          |
+ * | U+1EF2   | Ỳ     | Y           | Latin capital letter Y with grave                     |
+ * | U+1EF3   | ỳ     | y           | Latin small letter y with grave                       |
+ * | U+1EF4   | Ỵ     | Y           | Latin capital letter Y with dot below                 |
+ * | U+1EF5   | ỵ     | y           | Latin small letter y with dot below                   |
+ * | U+1EF6   | Ỷ     | Y           | Latin capital letter Y with hook above                |
+ * | U+1EF7   | ỷ     | y           | Latin small letter y with hook above                  |
+ * | U+1EF8   | Ỹ     | Y           | Latin capital letter Y with tilde                     |
+ * | U+1EF9   | ỹ     | y           | Latin small letter y with tilde                       |
+ *
+ * German (`de_DE`), German formal (`de_DE_formal`), German (Switzerland) formal (`de_CH`),
+ * and German (Switzerland) informal (`de_CH_informal`) locales:
+ *
+ * |   Code   | Glyph | Replacement |               Description               |
+ * | -------- | ----- | ----------- | --------------------------------------- |
+ * | U+00C4   | Ä     | Ae          | Latin capital letter A with diaeresis   |
+ * | U+00E4   | ä     | ae          | Latin small letter a with diaeresis     |
+ * | U+00D6   | Ö     | Oe          | Latin capital letter O with diaeresis   |
+ * | U+00F6   | ö     | oe          | Latin small letter o with diaeresis     |
+ * | U+00DC   | Ü     | Ue          | Latin capital letter U with diaeresis   |
+ * | U+00FC   | ü     | ue          | Latin small letter u with diaeresis     |
+ * | U+00DF   | ß     | ss          | Latin small letter sharp s              |
+ *
+ * Danish (`da_DK`) locale:
+ *
+ * |   Code   | Glyph | Replacement |               Description               |
+ * | -------- | ----- | ----------- | --------------------------------------- |
+ * | U+00C6   | Æ     | Ae          | Latin capital letter AE                 |
+ * | U+00E6   | æ     | ae          | Latin small letter ae                   |
+ * | U+00D8   | Ø     | Oe          | Latin capital letter O with stroke      |
+ * | U+00F8   | ø     | oe          | Latin small letter o with stroke        |
+ * | U+00C5   | Å     | Aa          | Latin capital letter A with ring above  |
+ * | U+00E5   | å     | aa          | Latin small letter a with ring above    |
+ *
+ * Catalan (`ca`) locale:
+ *
+ * |   Code   | Glyph | Replacement |               Description               |
+ * | -------- | ----- | ----------- | --------------------------------------- |
+ * | U+00B7   | l·l   | ll          | Flown dot (between two Ls)              |
+ *
  * @since 1.2.1
+ * @since 4.6.0 Added locale support for `de_CH`, `de_CH_informal`, and `ca`.
  *
  * @param string $string Text that might have accent characters
  * @return string Filtered string with replaced "nice" characters.
@@ -1313,7 +1680,7 @@ function remove_accents( $string ) {
                // Used for locale-specific rules
                $locale = get_locale();
 
-               if ( 'de_DE' == $locale || 'de_DE_formal' == $locale ) {
+               if ( 'de_DE' == $locale || 'de_DE_formal' == $locale || 'de_CH' == $locale || 'de_CH_informal' == $locale ) {
                        $chars[ chr(195).chr(132) ] = 'Ae';
                        $chars[ chr(195).chr(164) ] = 'ae';
                        $chars[ chr(195).chr(150) ] = 'Oe';
@@ -1328,6 +1695,8 @@ function remove_accents( $string ) {
                        $chars[ chr(195).chr(184) ] = 'oe';
                        $chars[ chr(195).chr(133) ] = 'Aa';
                        $chars[ chr(195).chr(165) ] = 'aa';
+               } elseif ( 'ca' === $locale ) {
+                       $chars[ chr(108).chr(194).chr(183).chr(108) ] = 'll';
                }
 
                $string = strtr($string, $chars);
@@ -1376,7 +1745,7 @@ function sanitize_file_name( $filename ) {
        $filename_raw = $filename;
        $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", "%", "+", chr(0));
        /**
-        * Filter the list of characters to remove from a filename.
+        * Filters the list of characters to remove from a filename.
         *
         * @since 2.8.0
         *
@@ -1404,7 +1773,7 @@ function sanitize_file_name( $filename ) {
        // Return if only one extension
        if ( count( $parts ) <= 2 ) {
                /**
-                * Filter a sanitized filename string.
+                * Filters a sanitized filename string.
                 *
                 * @since 2.8.0
                 *
@@ -1450,7 +1819,7 @@ function sanitize_file_name( $filename ) {
  * Removes tags, octets, entities, and if strict is enabled, will only keep
  * alphanumeric, _, space, ., -, @. After sanitizing, it passes the username,
  * raw username (the username in the parameter), and the value of $strict as
- * parameters for the 'sanitize_user' filter.
+ * parameters for the {@see 'sanitize_user'} filter.
  *
  * @since 2.0.0
  *
@@ -1475,7 +1844,7 @@ function sanitize_user( $username, $strict = false ) {
        $username = preg_replace( '|\s+|', ' ', $username );
 
        /**
-        * Filter a sanitized username string.
+        * Filters a sanitized username string.
         *
         * @since 2.0.1
         *
@@ -1502,7 +1871,7 @@ function sanitize_key( $key ) {
        $key = preg_replace( '/[^a-z0-9_\-]/', '', $key );
 
        /**
-        * Filter a sanitized key string.
+        * Filters a sanitized key string.
         *
         * @since 3.0.0
         *
@@ -1533,7 +1902,7 @@ function sanitize_title( $title, $fallback_title = '', $context = 'save' ) {
                $title = remove_accents($title);
 
        /**
-        * Filter a sanitized title string.
+        * Filters a sanitized title string.
         *
         * @since 1.2.0
         *
@@ -1678,7 +2047,7 @@ function sanitize_html_class( $class, $fallback = '' ) {
                return sanitize_html_class( $fallback );
        }
        /**
-        * Filter a sanitized HTML class string.
+        * Filters a sanitized HTML class string.
         *
         * @since 2.8.0
         *
@@ -1913,8 +2282,8 @@ function force_balance_tags( $text ) {
  * Acts on text which is about to be edited.
  *
  * The $content is run through esc_textarea(), which uses htmlspecialchars()
- * to convert special characters to HTML entities. If $richedit is set to true,
- * it is simply a holder for the 'format_to_edit' filter.
+ * to convert special characters to HTML entities. If `$richedit` is set to true,
+ * it is simply a holder for the {@see 'format_to_edit'} filter.
  *
  * @since 0.71
  * @since 4.4.0 The `$richedit` parameter was renamed to `$rich_text` for clarity.
@@ -1927,7 +2296,7 @@ function force_balance_tags( $text ) {
  */
 function format_to_edit( $content, $rich_text = false ) {
        /**
-        * Filter the text to be formatted for editing.
+        * Filters the text to be formatted for editing.
         *
         * @since 1.2.0
         *
@@ -2011,7 +2380,7 @@ function untrailingslashit( $string ) {
  * Adds slashes to escape strings.
  *
  * Slashes will first be removed if magic_quotes_gpc is set, see {@link
- * http://www.php.net/magic_quotes} for more details.
+ * https://secure.php.net/magic_quotes} for more details.
  *
  * @since 0.71
  *
@@ -2113,8 +2482,7 @@ function antispambot( $email_address, $hex_encoding = 0 ) {
 /**
  * Callback to convert URI match to HTML A element.
  *
- * This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link
- * make_clickable()}.
+ * This function was backported from 2.5.0 to 2.3.2. Regex callback for make_clickable().
  *
  * @since 2.3.2
  * @access private
@@ -2150,8 +2518,7 @@ function _make_url_clickable_cb( $matches ) {
 /**
  * Callback to convert URL match to HTML A element.
  *
- * This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link
- * make_clickable()}.
+ * This function was backported from 2.5.0 to 2.3.2. Regex callback for make_clickable().
  *
  * @since 2.3.2
  * @access private
@@ -2180,8 +2547,7 @@ function _make_web_ftp_clickable_cb( $matches ) {
 /**
  * Callback to convert email address match to HTML A element.
  *
- * This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link
- * make_clickable()}.
+ * This function was backported from 2.5.0 to 2.3.2. Regex callback for make_clickable().
  *
  * @since 2.3.2
  * @access private
@@ -2376,7 +2742,8 @@ function wp_rel_nofollow_callback( $matches ) {
 /**
  * Convert one smiley code to the icon graphic file equivalent.
  *
- * Callback handler for {@link convert_smilies()}.
+ * Callback handler for convert_smilies().
+ *
  * Looks up one smiley code in the $wpsmiliestrans global array and returns an
  * `<img>` string for that smiley.
  *
@@ -2406,7 +2773,7 @@ function translate_smiley( $matches ) {
        }
 
        /**
-        * Filter the Smiley image URL before it's used in the image element.
+        * Filters the Smiley image URL before it's used in the image element.
         *
         * @since 2.9.0
         *
@@ -2484,12 +2851,12 @@ function convert_smilies( $text ) {
  */
 function is_email( $email, $deprecated = false ) {
        if ( ! empty( $deprecated ) )
-               _deprecated_argument( __FUNCTION__, '3.0' );
+               _deprecated_argument( __FUNCTION__, '3.0.0' );
 
        // Test for the minimum length the email can be
        if ( strlen( $email ) < 3 ) {
                /**
-                * Filter whether an email address is valid.
+                * Filters whether an email address is valid.
                 *
                 * This filter is evaluated under several different contexts, such as 'email_too_short',
                 * 'email_no_at', 'local_invalid_chars', 'domain_period_sequence', 'domain_period_limits',
@@ -2687,7 +3054,7 @@ function iso8601_timezone_to_offset( $timezone ) {
  *
  * @since 1.5.0
  *
- * @param string $date_string Date and time in ISO 8601 format {@link http://en.wikipedia.org/wiki/ISO_8601}.
+ * @param string $date_string Date and time in ISO 8601 format {@link https://en.wikipedia.org/wiki/ISO_8601}.
  * @param string $timezone    Optional. If set to GMT returns the time minus gmt_offset. Default is 'user'.
  * @return string The date and time in MySQL DateTime format - Y-m-d H:i:s.
  */
@@ -2726,7 +3093,7 @@ function sanitize_email( $email ) {
        // Test for the minimum length the email can be
        if ( strlen( $email ) < 3 ) {
                /**
-                * Filter a sanitized email address.
+                * Filters a sanitized email address.
                 *
                 * This filter is evaluated under several contexts, including 'email_too_short',
                 * 'email_no_at', 'local_invalid_chars', 'domain_period_sequence', 'domain_period_limits',
@@ -2869,7 +3236,7 @@ function human_time_diff( $from, $to = '' ) {
        }
 
        /**
-        * Filter the human readable difference between two timestamps.
+        * Filters the human readable difference between two timestamps.
         *
         * @since 4.0.0
         *
@@ -2888,8 +3255,8 @@ function human_time_diff( $from, $to = '' ) {
  * that, then the string ' [&hellip;]' will be appended to the excerpt. If the string
  * is less than 55 words, then the content will be returned as is.
  *
- * The 55 word limit can be modified by plugins/themes using the excerpt_length filter
- * The ' [&hellip;]' string can be modified by plugins/themes using the excerpt_more filter
+ * The 55 word limit can be modified by plugins/themes using the {@see 'excerpt_length'} filter
+ * The ' [&hellip;]' string can be modified by plugins/themes using the {@see 'excerpt_more'} filter
  *
  * @since 1.5.0
  *
@@ -2908,7 +3275,7 @@ function wp_trim_excerpt( $text = '' ) {
                $text = str_replace(']]>', ']]&gt;', $text);
 
                /**
-                * Filter the number of words in an excerpt.
+                * Filters the number of words in an excerpt.
                 *
                 * @since 2.7.0
                 *
@@ -2916,7 +3283,7 @@ function wp_trim_excerpt( $text = '' ) {
                 */
                $excerpt_length = apply_filters( 'excerpt_length', 55 );
                /**
-                * Filter the string in the "more" link displayed after a trimmed excerpt.
+                * Filters the string in the "more" link displayed after a trimmed excerpt.
                 *
                 * @since 2.9.0
                 *
@@ -2926,7 +3293,7 @@ function wp_trim_excerpt( $text = '' ) {
                $text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
        }
        /**
-        * Filter the trimmed excerpt string.
+        * Filters the trimmed excerpt string.
         *
         * @since 2.8.0
         *
@@ -2982,7 +3349,7 @@ function wp_trim_words( $text, $num_words = 55, $more = null ) {
        }
 
        /**
-        * Filter the text content after words have been trimmed.
+        * Filters the text content after words have been trimmed.
         *
         * @since 3.3.0
         *
@@ -3005,7 +3372,7 @@ function wp_trim_words( $text, $num_words = 55, $more = null ) {
 function ent2ncr( $text ) {
 
        /**
-        * Filter text before named entities are converted into numbered entities.
+        * Filters text before named entities are converted into numbered entities.
         *
         * A non-null string must be returned for the filter to be evaluated.
         *
@@ -3304,7 +3671,7 @@ function format_for_editor( $text, $default_editor = null ) {
        }
 
        /**
-        * Filter the text after it is formatted for the editor.
+        * Filters the text after it is formatted for the editor.
         *
         * @since 4.3.0
         *
@@ -3364,7 +3731,7 @@ function esc_sql( $data ) {
  * Checks and cleans a URL.
  *
  * A number of characters are removed from the URL. If the URL is for displaying
- * (the default behaviour) ampersands are also replaced. The 'clean_url' filter
+ * (the default behaviour) ampersands are also replaced. The {@see 'clean_url'} filter
  * is applied to the returned cleaned URL.
  *
  * @since 2.8.0
@@ -3373,7 +3740,7 @@ function esc_sql( $data ) {
  * @param array  $protocols Optional. An array of acceptable protocols.
  *                                 Defaults to return value of wp_allowed_protocols()
  * @param string $_context  Private. Use esc_url_raw() for database usage.
- * @return string The cleaned $url after the 'clean_url' filter is applied.
+ * @return string The cleaned $url after the {@see 'clean_url'} filter is applied.
  */
 function esc_url( $url, $protocols = null, $_context = 'display' ) {
        $original_url = $url;
@@ -3457,7 +3824,7 @@ function esc_url( $url, $protocols = null, $_context = 'display' ) {
        }
 
        /**
-        * Filter a string cleaned and escaped for output as a URL.
+        * Filters a string cleaned and escaped for output as a URL.
         *
         * @since 2.3.0
         *
@@ -3484,7 +3851,7 @@ function esc_url_raw( $url, $protocols = null ) {
 /**
  * Convert entities, while preserving already-encoded entities.
  *
- * @link http://www.php.net/htmlentities Borrowed from the PHP Manual user notes.
+ * @link https://secure.php.net/htmlentities Borrowed from the PHP Manual user notes.
  *
  * @since 1.2.2
  *
@@ -3502,7 +3869,7 @@ function htmlentities2( $myHTML ) {
  *
  * Escapes text strings for echoing in JS. It is intended to be used for inline JS
  * (in a tag attribute, for example onclick="..."). Note that the strings have to
- * be in single quotes. The filter 'js_escape' is also applied here.
+ * be in single quotes. The {@see 'js_escape'} filter is also applied here.
  *
  * @since 2.8.0
  *
@@ -3516,7 +3883,7 @@ function esc_js( $text ) {
        $safe_text = str_replace( "\r", '', $safe_text );
        $safe_text = str_replace( "\n", '\\n', addslashes( $safe_text ) );
        /**
-        * Filter a string cleaned and escaped for output in JavaScript.
+        * Filters a string cleaned and escaped for output in JavaScript.
         *
         * Text passed to esc_js() is stripped of invalid or special characters,
         * and properly slashed for output.
@@ -3541,7 +3908,7 @@ function esc_html( $text ) {
        $safe_text = wp_check_invalid_utf8( $text );
        $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );
        /**
-        * Filter a string cleaned and escaped for output in HTML.
+        * Filters a string cleaned and escaped for output in HTML.
         *
         * Text passed to esc_html() is stripped of invalid or special characters
         * before output.
@@ -3566,7 +3933,7 @@ function esc_attr( $text ) {
        $safe_text = wp_check_invalid_utf8( $text );
        $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );
        /**
-        * Filter a string cleaned and escaped for output in an HTML attribute.
+        * Filters a string cleaned and escaped for output in an HTML attribute.
         *
         * Text passed to esc_attr() is stripped of invalid or special characters
         * before output.
@@ -3590,7 +3957,7 @@ function esc_attr( $text ) {
 function esc_textarea( $text ) {
        $safe_text = htmlspecialchars( $text, ENT_QUOTES, get_option( 'blog_charset' ) );
        /**
-        * Filter a string cleaned and escaped for output in a textarea element.
+        * Filters a string cleaned and escaped for output in a textarea element.
         *
         * @since 3.1.0
         *
@@ -3611,7 +3978,7 @@ function esc_textarea( $text ) {
 function tag_escape( $tag_name ) {
        $safe_tag = strtolower( preg_replace('/[^a-zA-Z0-9_:]/', '', $tag_name) );
        /**
-        * Filter a string cleaned and escaped for output as an HTML tag.
+        * Filters a string cleaned and escaped for output as an HTML tag.
         *
         * @since 2.8.0
         *
@@ -3715,6 +4082,10 @@ function sanitize_option( $option, $value ) {
                case 'blogdescription':
                case 'blogname':
                        $value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
+                       if ( $value !== $original_value ) {
+                               $value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', wp_encode_emoji( $original_value ) );
+                       }
+
                        if ( is_wp_error( $value ) ) {
                                $error = $value->get_error_message();
                        } else {
@@ -3850,6 +4221,14 @@ function sanitize_option( $option, $value ) {
                                $value = esc_url_raw( $value );
                                $value = str_replace( 'http://', '', $value );
                        }
+
+                       if ( 'permalink_structure' === $option && '' !== $value && ! preg_match( '/%[^\/%]+%/', $value ) ) {
+                               $error = sprintf(
+                                       /* translators: %s: Codex URL */
+                                       __( 'A structure tag is required when using custom permalinks. <a href="%s">Learn more</a>' ),
+                                       __( 'https://codex.wordpress.org/Using_Permalinks#Choosing_your_permalink_structure' )
+                               );
+                       }
                        break;
 
                case 'default_role' :
@@ -3879,7 +4258,7 @@ function sanitize_option( $option, $value ) {
        }
 
        /**
-        * Filter an option value following sanitization.
+        * Filters an option value following sanitization.
         *
         * @since 2.3.0
         * @since 4.3.0 Added the `$original_value` parameter.
@@ -3922,8 +4301,8 @@ function map_deep( $value, $callback ) {
 /**
  * Parses a string into variables to be stored in an array.
  *
- * Uses {@link http://www.php.net/parse_str parse_str()} and stripslashes if
- * {@link http://www.php.net/magic_quotes magic_quotes_gpc} is on.
+ * Uses {@link https://secure.php.net/parse_str parse_str()} and stripslashes if
+ * {@link https://secure.php.net/magic_quotes magic_quotes_gpc} is on.
  *
  * @since 2.2.1
  *
@@ -3935,7 +4314,7 @@ function wp_parse_str( $string, &$array ) {
        if ( get_magic_quotes_gpc() )
                $array = stripslashes_deep( $array );
        /**
-        * Filter the array of variables derived from a parsed string.
+        * Filters the array of variables derived from a parsed string.
         *
         * @since 2.3.0
         *
@@ -3976,7 +4355,7 @@ function wp_pre_kses_less_than_callback( $matches ) {
  * WordPress implementation of PHP sprintf() with filters.
  *
  * @since 2.5.0
- * @link http://www.php.net/sprintf
+ * @link https://secure.php.net/sprintf
  *
  * @param string $pattern   The string which formatted args are inserted.
  * @param mixed  $args ,... Arguments to be formatted into the $pattern string.
@@ -4020,7 +4399,7 @@ function wp_sprintf( $pattern ) {
                        }
 
                        /**
-                        * Filter a fragment from the pattern passed to wp_sprintf().
+                        * Filters a fragment from the pattern passed to wp_sprintf().
                         *
                         * If the fragment is unchanged, then sprintf() will be run on the fragment.
                         *
@@ -4066,7 +4445,7 @@ function wp_sprintf_l( $pattern, $args ) {
                return '';
 
        /**
-        * Filter the translated delimiters used by wp_sprintf_l().
+        * Filters the translated delimiters used by wp_sprintf_l().
         * Placeholders (%s) are included to assist translators and then
         * removed before the array of strings reaches the filter.
         *
@@ -4253,18 +4632,21 @@ function wp_strip_all_tags($string, $remove_breaks = false) {
 }
 
 /**
- * Sanitize a string from user input or from the db
+ * Sanitizes a string from user input or from the database.
  *
- * check for invalid UTF-8,
- * Convert single < characters to entity,
- * strip all tags,
- * remove line breaks, tabs and extra white space,
- * strip octets.
+ * - Checks for invalid UTF-8,
+ * - Converts single `<` characters to entities
+ * - Strips all tags
+ * - Removes line breaks, tabs, and extra whitespace
+ * - Strips octets
  *
  * @since 2.9.0
  *
- * @param string $str
- * @return string
+ * @see wp_check_invalid_utf8()
+ * @see wp_strip_all_tags()
+ *
+ * @param string $str String to sanitize.
+ * @return string Sanitized string.
  */
 function sanitize_text_field( $str ) {
        $filtered = wp_check_invalid_utf8( $str );
@@ -4289,7 +4671,7 @@ function sanitize_text_field( $str ) {
        }
 
        /**
-        * Filter a sanitized text field string.
+        * Filters a sanitized text field string.
         *
         * @since 2.9.0
         *
@@ -4351,7 +4733,7 @@ function capital_P_dangit( $text ) {
 function sanitize_mime_type( $mime_type ) {
        $sani_mime_type = preg_replace( '/[^-+*.a-zA-Z0-9\/]/', '', $mime_type );
        /**
-        * Filter a mime type following sanitization.
+        * Filters a mime type following sanitization.
         *
         * @since 3.1.3
         *
@@ -4378,7 +4760,7 @@ function sanitize_trackback_urls( $to_ping ) {
        $urls_to_ping = array_map( 'esc_url_raw', $urls_to_ping );
        $urls_to_ping = implode( "\n", $urls_to_ping );
        /**
-        * Filter a list of trackback URLs following sanitization.
+        * Filters a list of trackback URLs following sanitization.
         *
         * The string returned here consists of a space or carriage return-delimited list
         * of trackback URLs.
@@ -4471,7 +4853,7 @@ function wp_spaces_regexp() {
 
        if ( empty( $spaces ) ) {
                /**
-                * Filter the regexp for common whitespace characters.
+                * Filters the regexp for common whitespace characters.
                 *
                 * This string is substituted for the \s sequence as needed in regular
                 * expressions. For websites not written in English, different characters
@@ -4522,12 +4904,12 @@ img.emoji {
 }
 
 /**
+ * Print the inline Emoji detection script if it is not already printed.
  *
- * @global string $wp_version
+ * @since 4.2.0
  * @staticvar bool $printed
  */
 function print_emoji_detection_script() {
-       global $wp_version;
        static $printed = false;
 
        if ( $printed ) {
@@ -4536,24 +4918,57 @@ function print_emoji_detection_script() {
 
        $printed = true;
 
+       _print_emoji_detection_script();
+}
+
+/**
+ * Prints inline Emoji dection script
+ *
+ * @ignore
+ * @since 4.6.0
+ * @access private
+ *
+ * @global string $wp_version WordPress version string.
+ */
+function _print_emoji_detection_script() {
+       global $wp_version;
+
        $settings = array(
                /**
-                * Filter the URL where emoji images are hosted.
+                * Filters the URL where emoji png images are hosted.
                 *
                 * @since 4.2.0
                 *
-                * @param string The emoji base URL.
+                * @param string The emoji base URL for png images.
                 */
-               'baseUrl' => apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/72x72/' ),
+               'baseUrl' => apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/2/72x72/' ),
 
                /**
-                * Filter the extension of the emoji files.
+                * Filters the extension of the emoji png files.
                 *
                 * @since 4.2.0
                 *
-                * @param string The emoji extension. Default .png.
+                * @param string The emoji extension for png files. Default .png.
                 */
                'ext' => apply_filters( 'emoji_ext', '.png' ),
+
+               /**
+                * Filters the URL where emoji SVG images are hosted.
+                *
+                * @since 4.6.0
+                *
+                * @param string The emoji base URL for svg images.
+                */
+               'svgUrl' => apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2/svg/' ),
+
+               /**
+                * Filters the extension of the emoji SVG files.
+                *
+                * @since 4.6.0
+                *
+                * @param string The emoji extension for svg files. Default .svg.
+                */
+               'svgExt' => apply_filters( 'emoji_svg_ext', '.svg' ),
        );
 
        $version = 'ver=' . $wp_version;
@@ -4591,7 +5006,7 @@ function print_emoji_detection_script() {
                ?>
                <script type="text/javascript">
                        window._wpemojiSettings = <?php echo wp_json_encode( $settings ); ?>;
-                       !function(a,b,c){function d(a){var c,d,e,f=b.createElement("canvas"),g=f.getContext&&f.getContext("2d"),h=String.fromCharCode;if(!g||!g.fillText)return!1;switch(g.textBaseline="top",g.font="600 32px Arial",a){case"flag":return g.fillText(h(55356,56806,55356,56826),0,0),f.toDataURL().length>3e3;case"diversity":return g.fillText(h(55356,57221),0,0),c=g.getImageData(16,16,1,1).data,d=c[0]+","+c[1]+","+c[2]+","+c[3],g.fillText(h(55356,57221,55356,57343),0,0),c=g.getImageData(16,16,1,1).data,e=c[0]+","+c[1]+","+c[2]+","+c[3],d!==e;case"simple":return g.fillText(h(55357,56835),0,0),0!==g.getImageData(16,16,1,1).data[0];case"unicode8":return g.fillText(h(55356,57135),0,0),0!==g.getImageData(16,16,1,1).data[0]}return!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i;for(i=Array("simple","flag","unicode8","diversity"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
+                       !function(a,b,c){function d(a){var c,d,e,f,g,h=b.createElement("canvas"),i=h.getContext&&h.getContext("2d"),j=String.fromCharCode;if(!i||!i.fillText)return!1;switch(i.textBaseline="top",i.font="600 32px Arial",a){case"flag":return i.fillText(j(55356,56806,55356,56826),0,0),!(h.toDataURL().length<3e3)&&(i.clearRect(0,0,h.width,h.height),i.fillText(j(55356,57331,65039,8205,55356,57096),0,0),c=h.toDataURL(),i.clearRect(0,0,h.width,h.height),i.fillText(j(55356,57331,55356,57096),0,0),d=h.toDataURL(),c!==d);case"diversity":return i.fillText(j(55356,57221),0,0),e=i.getImageData(16,16,1,1).data,f=e[0]+","+e[1]+","+e[2]+","+e[3],i.fillText(j(55356,57221,55356,57343),0,0),e=i.getImageData(16,16,1,1).data,g=e[0]+","+e[1]+","+e[2]+","+e[3],f!==g;case"simple":return i.fillText(j(55357,56835),0,0),0!==i.getImageData(16,16,1,1).data[0];case"unicode8":return i.fillText(j(55356,57135),0,0),0!==i.getImageData(16,16,1,1).data[0];case"unicode9":return i.fillText(j(55358,56631),0,0),0!==i.getImageData(16,16,1,1).data[0]}return!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i;for(i=Array("simple","flag","unicode8","diversity","unicode9"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
                </script>
                <?php
        }
@@ -4656,7 +5071,7 @@ function wp_staticize_emoji( $text ) {
        $text = wp_encode_emoji( $text );
 
        /** This filter is documented in wp-includes/formatting.php */
-       $cdn_url = apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/72x72/' );
+       $cdn_url = apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/2/72x72/' );
 
        /** This filter is documented in wp-includes/formatting.php */
        $ext = apply_filters( 'emoji_ext', '.png' );
@@ -4812,3 +5227,68 @@ function url_shorten( $url, $length = 35 ) {
        }
        return $short_url;
 }
+
+/**
+ * Sanitizes a hex color.
+ *
+ * Returns either '', a 3 or 6 digit hex color (with #), or nothing.
+ * For sanitizing values without a #, see sanitize_hex_color_no_hash().
+ *
+ * @since 3.4.0
+ *
+ * @param string $color
+ * @return string|void
+ */
+function sanitize_hex_color( $color ) {
+       if ( '' === $color ) {
+               return '';
+       }
+
+       // 3 or 6 hex digits, or the empty string.
+       if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) {
+               return $color;
+       }
+}
+
+/**
+ * Sanitizes a hex color without a hash. Use sanitize_hex_color() when possible.
+ *
+ * Saving hex colors without a hash puts the burden of adding the hash on the
+ * UI, which makes it difficult to use or upgrade to other color types such as
+ * rgba, hsl, rgb, and html color names.
+ *
+ * Returns either '', a 3 or 6 digit hex color (without a #), or null.
+ *
+ * @since 3.4.0
+ *
+ * @param string $color
+ * @return string|null
+ */
+function sanitize_hex_color_no_hash( $color ) {
+       $color = ltrim( $color, '#' );
+
+       if ( '' === $color ) {
+               return '';
+       }
+
+       return sanitize_hex_color( '#' . $color ) ? $color : null;
+}
+
+/**
+ * Ensures that any hex color is properly hashed.
+ * Otherwise, returns value untouched.
+ *
+ * This method should only be necessary if using sanitize_hex_color_no_hash().
+ *
+ * @since 3.4.0
+ *
+ * @param string $color
+ * @return string
+ */
+function maybe_hash_hex_color( $color ) {
+       if ( $unhashed = sanitize_hex_color_no_hash( $color ) ) {
+               return '#' . $unhashed;
+       }
+
+       return $color;
+}
index a3afddcec473ec0cf20a8b935dbb478810992684..204211bade57cf3fc0efe57de2b78a7edc412e69 100644 (file)
@@ -145,7 +145,7 @@ function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) {
        $j = @$datefunc( $dateformatstring, $i );
 
        /**
-        * Filter the date formatted based on the locale.
+        * Filters the date formatted based on the locale.
         *
         * @since 2.8.0
         *
@@ -182,14 +182,19 @@ function wp_maybe_decline_date( $date ) {
         */
        if ( 'on' === _x( 'off', 'decline months names: on or off' ) ) {
                // Match a format like 'j F Y' or 'j. F'
-               if ( @preg_match( '#^\d{1,2}\.? \w+#u', $date ) ) {
-                       $months = $wp_locale->month;
+               if ( @preg_match( '#^\d{1,2}\.? [^\d ]+#u', $date ) ) {
+                       $months          = $wp_locale->month;
+                       $months_genitive = $wp_locale->month_genitive;
 
                        foreach ( $months as $key => $month ) {
-                               $months[ $key ] = '#' . $month . '#';
+                               $months[ $key ] = '# ' . $month . '( |$)#u';
                        }
 
-                       $date = preg_replace( $months, $wp_locale->month_genitive, $date );
+                       foreach ( $months_genitive as $key => $month ) {
+                               $months_genitive[ $key ] = ' ' . $month . '$1';
+                       }
+
+                       $date = preg_replace( $months, $months_genitive, $date );
                }
        }
 
@@ -225,7 +230,7 @@ function number_format_i18n( $number, $decimals = 0 ) {
        }
 
        /**
-        * Filter the number formatted based on the locale.
+        * Filters the number formatted based on the locale.
         *
         * @since  2.8.0
         *
@@ -237,7 +242,7 @@ function number_format_i18n( $number, $decimals = 0 ) {
 /**
  * Convert number of bytes largest unit bytes will fit into.
  *
- * It is easier to read 1 kB than 1024 bytes and 1 MB than 1048576 bytes. Converts
+ * It is easier to read 1 KB than 1024 bytes and 1 MB than 1048576 bytes. Converts
  * number of bytes to human readable number by taking the number of that unit
  * that the bytes will go into it. Supports TB value.
  *
@@ -259,10 +264,14 @@ function size_format( $bytes, $decimals = 0 ) {
                'TB' => TB_IN_BYTES,
                'GB' => GB_IN_BYTES,
                'MB' => MB_IN_BYTES,
-               'kB' => KB_IN_BYTES,
+               'KB' => KB_IN_BYTES,
                'B'  => 1,
        );
 
+       if ( 0 === $bytes ) {
+               return number_format_i18n( 0, $decimals ) . ' B';
+       }
+
        foreach ( $quant as $unit => $mag ) {
                if ( doubleval( $bytes ) >= $mag ) {
                        return number_format_i18n( $bytes / $mag, $decimals ) . ' ' . $unit;
@@ -583,7 +592,7 @@ function do_enclose( $content, $post_ID ) {
        }
 
        /**
-        * Filter the list of enclosure links before querying the database.
+        * Filters the list of enclosure links before querying the database.
         *
         * Allows for the addition and/or removal of potential enclosures to save
         * to postmeta before checking the database for existing enclosures.
@@ -637,7 +646,7 @@ function do_enclose( $content, $post_ID ) {
  */
 function wp_get_http_headers( $url, $deprecated = false ) {
        if ( !empty( $deprecated ) )
-               _deprecated_argument( __FUNCTION__, '2.7' );
+               _deprecated_argument( __FUNCTION__, '2.7.0' );
 
        $response = wp_safe_remote_head( $url );
 
@@ -675,7 +684,7 @@ function is_new_day() {
  * @since 2.3.0
  *
  * @see _http_build_query() Used to build the query
- * @link http://us2.php.net/manual/en/function.http-build-query.php for more on what
+ * @link https://secure.php.net/manual/en/function.http-build-query.php for more on what
  *              http_build_query() does.
  *
  * @param array $data URL-encode key/value pairs.
@@ -691,7 +700,7 @@ function build_query( $data ) {
  * @since 3.2.0
  * @access private
  *
- * @see http://us1.php.net/manual/en/function.http-build-query.php
+ * @see https://secure.php.net/manual/en/function.http-build-query.php
  *
  * @param array|object  $data       An array or object of data. Converted to array.
  * @param string        $prefix     Optional. Numeric index. If set, start parameter numbering with it.
@@ -865,6 +874,8 @@ function wp_removable_query_args() {
                'disabled',
                'enabled',
                'error',
+               'hotkeys_highlight_first',
+               'hotkeys_highlight_last',
                'locked',
                'message',
                'same',
@@ -881,7 +892,7 @@ function wp_removable_query_args() {
        );
 
        /**
-        * Filter the list of query variables to remove.
+        * Filters the list of query variables to remove.
         *
         * @since 4.2.0
         *
@@ -1069,7 +1080,7 @@ function status_header( $code, $description = '' ) {
        if ( function_exists( 'apply_filters' ) )
 
                /**
-                * Filter an HTTP status header.
+                * Filters an HTTP status header.
                 *
                 * @since 2.2.0
                 *
@@ -1097,12 +1108,11 @@ function wp_get_nocache_headers() {
        $headers = array(
                'Expires' => 'Wed, 11 Jan 1984 05:00:00 GMT',
                'Cache-Control' => 'no-cache, must-revalidate, max-age=0',
-               'Pragma' => 'no-cache',
        );
 
        if ( function_exists('apply_filters') ) {
                /**
-                * Filter the cache-controlling headers.
+                * Filters the cache-controlling headers.
                 *
                 * @since 2.8.0
                 *
@@ -1113,7 +1123,6 @@ function wp_get_nocache_headers() {
                 *
                 *     @type string $Expires       Expires header.
                 *     @type string $Cache-Control Cache-Control header.
-                *     @type string $Pragma        Pragma header.
                 * }
                 */
                $headers = (array) apply_filters( 'nocache_headers', $headers );
@@ -1323,7 +1332,7 @@ function do_robots() {
        }
 
        /**
-        * Filter the robots.txt output.
+        * Filters the robots.txt output.
         *
         * @since 3.0.0
         *
@@ -1536,7 +1545,7 @@ function wp_get_referer() {
 /**
  * Retrieves unvalidated referer from '_wp_http_referer' or HTTP referer.
  *
- * Do not use for redirects, use {@see wp_get_referer()} instead.
+ * Do not use for redirects, use wp_get_referer() instead.
  *
  * @since 4.5.0
  *
@@ -1777,8 +1786,8 @@ function wp_is_writable( $path ) {
  *
  * @since 2.8.0
  *
- * @see http://bugs.php.net/bug.php?id=27609
- * @see http://bugs.php.net/bug.php?id=30931
+ * @see https://bugs.php.net/bug.php?id=27609
+ * @see https://bugs.php.net/bug.php?id=30931
  *
  * @param string $path Windows path to check for write-ability.
  * @return bool Whether the path is writable.
@@ -1849,7 +1858,8 @@ function wp_get_upload_dir() {
  * @uses _wp_upload_dir()
  *
  * @param string $time Optional. Time formatted in 'yyyy/mm'. Default null.
- * @param bool   $create_dir Optional. Whether to check and create the uploads directory. Default true (backwards compatible).
+ * @param bool   $create_dir Optional. Whether to check and create the uploads directory.
+ *                           Default true for backward compatibility.
  * @param bool   $refresh_cache Optional. Whether to refresh the cache. Default false.
  * @return array See above for description.
  */
@@ -1863,7 +1873,7 @@ function wp_upload_dir( $time = null, $create_dir = true, $refresh_cache = false
        }
 
        /**
-        * Filter the uploads directory data.
+        * Filters the uploads directory data.
         *
         * @since 2.0.0
         *
@@ -2055,7 +2065,7 @@ function wp_unique_filename( $dir, $filename, $unique_filename_callback = null )
                        }
 
                        /**
-                        * Filter the result when generating a unique file name.
+                        * Filters the result when generating a unique file name.
                         *
                         * @since 4.5.0
                         *
@@ -2105,7 +2115,7 @@ function wp_unique_filename( $dir, $filename, $unique_filename_callback = null )
  */
 function wp_upload_bits( $name, $deprecated, $bits, $time = null ) {
        if ( !empty( $deprecated ) )
-               _deprecated_argument( __FUNCTION__, '2.0' );
+               _deprecated_argument( __FUNCTION__, '2.0.0' );
 
        if ( empty( $name ) )
                return array( 'error' => __( 'Empty filename' ) );
@@ -2120,7 +2130,7 @@ function wp_upload_bits( $name, $deprecated, $bits, $time = null ) {
                return $upload;
 
        /**
-        * Filter whether to treat the upload bits as an error.
+        * Filters whether to treat the upload bits as an error.
         *
         * Passing a non-array to the filter will effectively short-circuit preparing
         * the upload bits, returning that value instead.
@@ -2181,28 +2191,7 @@ function wp_upload_bits( $name, $deprecated, $bits, $time = null ) {
 function wp_ext2type( $ext ) {
        $ext = strtolower( $ext );
 
-       /**
-        * Filter file type based on the extension name.
-        *
-        * @since 2.5.0
-        *
-        * @see wp_ext2type()
-        *
-        * @param array $ext2type Multi-dimensional array with extensions for a default set
-        *                        of file types.
-        */
-       $ext2type = apply_filters( 'ext2type', array(
-               'image'       => array( 'jpg', 'jpeg', 'jpe',  'gif',  'png',  'bmp',   'tif',  'tiff', 'ico' ),
-               'audio'       => array( 'aac', 'ac3',  'aif',  'aiff', 'm3a',  'm4a',   'm4b',  'mka',  'mp1',  'mp2',  'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ),
-               'video'       => array( '3g2',  '3gp', '3gpp', 'asf', 'avi',  'divx', 'dv',   'flv',  'm4v',   'mkv',  'mov',  'mp4',  'mpeg', 'mpg', 'mpv', 'ogm', 'ogv', 'qt',  'rm', 'vob', 'wmv' ),
-               'document'    => array( 'doc', 'docx', 'docm', 'dotm', 'odt',  'pages', 'pdf',  'xps',  'oxps', 'rtf',  'wp', 'wpd', 'psd', 'xcf' ),
-               'spreadsheet' => array( 'numbers',     'ods',  'xls',  'xlsx', 'xlsm',  'xlsb' ),
-               'interactive' => array( 'swf', 'key',  'ppt',  'pptx', 'pptm', 'pps',   'ppsx', 'ppsm', 'sldx', 'sldm', 'odp' ),
-               'text'        => array( 'asc', 'csv',  'tsv',  'txt' ),
-               'archive'     => array( 'bz2', 'cab',  'dmg',  'gz',   'rar',  'sea',   'sit',  'sqx',  'tar',  'tgz',  'zip', '7z' ),
-               'code'        => array( 'css', 'htm',  'html', 'php',  'js' ),
-       ) );
-
+       $ext2type = wp_get_ext_types();
        foreach ( $ext2type as $type => $exts )
                if ( in_array( $ext, $exts ) )
                        return $type;
@@ -2278,7 +2267,7 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
                // If getimagesize() knows what kind of image it really is and if the real MIME doesn't match the claimed MIME
                if ( !empty($imgstats['mime']) && $imgstats['mime'] != $type ) {
                        /**
-                        * Filter the list mapping image mime types to their respective extensions.
+                        * Filters the list mapping image mime types to their respective extensions.
                         *
                         * @since 3.0.0
                         *
@@ -2311,7 +2300,7 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
        }
 
        /**
-        * Filter the "real" file type of the given file.
+        * Filters the "real" file type of the given file.
         *
         * @since 3.0.0
         *
@@ -2335,10 +2324,10 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
  */
 function wp_get_mime_types() {
        /**
-        * Filter the list of mime types and file extensions.
+        * Filters the list of mime types and file extensions.
         *
         * This filter should be used to add, not remove, mime types. To remove
-        * mime types, use the 'upload_mimes' filter.
+        * mime types, use the {@see 'upload_mimes'} filter.
         *
         * @since 3.5.0
         *
@@ -2447,6 +2436,39 @@ function wp_get_mime_types() {
        'pages' => 'application/vnd.apple.pages',
        ) );
 }
+
+/**
+ * Retrieves the list of common file extensions and their types.
+ *
+ * @since 4.6.0
+ *
+ * @return array Array of file extensions types keyed by the type of file.
+ */
+function wp_get_ext_types() {
+
+       /**
+        * Filters file type based on the extension name.
+        *
+        * @since 2.5.0
+        *
+        * @see wp_ext2type()
+        *
+        * @param array $ext2type Multi-dimensional array with extensions for a default set
+        *                        of file types.
+        */
+       return apply_filters( 'ext2type', array(
+               'image'       => array( 'jpg', 'jpeg', 'jpe',  'gif',  'png',  'bmp',   'tif',  'tiff', 'ico' ),
+               'audio'       => array( 'aac', 'ac3',  'aif',  'aiff', 'm3a',  'm4a',   'm4b',  'mka',  'mp1',  'mp2',  'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ),
+               'video'       => array( '3g2',  '3gp', '3gpp', 'asf', 'avi',  'divx', 'dv',   'flv',  'm4v',   'mkv',  'mov',  'mp4',  'mpeg', 'mpg', 'mpv', 'ogm', 'ogv', 'qt',  'rm', 'vob', 'wmv' ),
+               'document'    => array( 'doc', 'docx', 'docm', 'dotm', 'odt',  'pages', 'pdf',  'xps',  'oxps', 'rtf',  'wp', 'wpd', 'psd', 'xcf' ),
+               'spreadsheet' => array( 'numbers',     'ods',  'xls',  'xlsx', 'xlsm',  'xlsb' ),
+               'interactive' => array( 'swf', 'key',  'ppt',  'pptx', 'pptm', 'pps',   'ppsx', 'ppsm', 'sldx', 'sldm', 'odp' ),
+               'text'        => array( 'asc', 'csv',  'tsv',  'txt' ),
+               'archive'     => array( 'bz2', 'cab',  'dmg',  'gz',   'rar',  'sea',   'sit',  'sqx',  'tar',  'tgz',  'zip', '7z' ),
+               'code'        => array( 'css', 'htm',  'html', 'php',  'js' ),
+       ) );
+}
+
 /**
  * Retrieve list of allowed mime types and file extensions.
  *
@@ -2467,7 +2489,7 @@ function get_allowed_mime_types( $user = null ) {
                unset( $t['htm|html'] );
 
        /**
-        * Filter list of allowed mime types and file extensions.
+        * Filters list of allowed mime types and file extensions.
         *
         * @since 2.0.0
         *
@@ -2519,7 +2541,7 @@ function wp_nonce_ays( $action ) {
  * @since 4.1.0 The `$title` and `$args` parameters were changed to optionally accept
  *              an integer to be used as the response code.
  *
- * @param string|WP_Error  $message Optional. Error message. If this is a {@see WP_Error} object,
+ * @param string|WP_Error  $message Optional. Error message. If this is a WP_Error object,
  *                                  the error's messages are used. Default empty.
  * @param string|int       $title   Optional. Error title. If `$message` is a `WP_Error` object,
  *                                  error data with the key 'title' may be used to specify the title.
@@ -2533,7 +2555,7 @@ function wp_nonce_ays( $action ) {
  *     @type bool   $back_link      Whether to include a link to go back. Default false.
  *     @type string $text_direction The text direction. This is only useful internally, when WordPress
  *                                  is still loading and the site's locale is not set up yet. Accepts 'rtl'.
- *                                  Default is the value of {@see is_rtl()}.
+ *                                  Default is the value of is_rtl().
  * }
  */
 function wp_die( $message = '', $title = '', $args = array() ) {
@@ -2547,7 +2569,7 @@ function wp_die( $message = '', $title = '', $args = array() ) {
 
        if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
                /**
-                * Filter callback for killing WordPress execution for AJAX requests.
+                * Filters the callback for killing WordPress execution for Ajax requests.
                 *
                 * @since 3.4.0
                 *
@@ -2556,7 +2578,7 @@ function wp_die( $message = '', $title = '', $args = array() ) {
                $function = apply_filters( 'wp_die_ajax_handler', '_ajax_wp_die_handler' );
        } elseif ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) {
                /**
-                * Filter callback for killing WordPress execution for XML-RPC requests.
+                * Filters the callback for killing WordPress execution for XML-RPC requests.
                 *
                 * @since 3.4.0
                 *
@@ -2565,7 +2587,7 @@ function wp_die( $message = '', $title = '', $args = array() ) {
                $function = apply_filters( 'wp_die_xmlrpc_handler', '_xmlrpc_wp_die_handler' );
        } else {
                /**
-                * Filter callback for killing WordPress execution for all non-AJAX, non-XML-RPC requests.
+                * Filters the callback for killing WordPress execution for all non-Ajax, non-XML-RPC requests.
                 *
                 * @since 3.0.0
                 *
@@ -2578,10 +2600,10 @@ function wp_die( $message = '', $title = '', $args = array() ) {
 }
 
 /**
- * Kill WordPress execution and display HTML message with error message.
+ * Kills WordPress execution and display HTML message with error message.
  *
  * This is the default handler for wp_die if you want a custom one for your
- * site then you can overload using the wp_die_handler filter in wp_die
+ * site then you can overload using the {@see 'wp_die_handler'} filter in wp_die().
  *
  * @since 3.0.0
  * @access private
@@ -2646,6 +2668,11 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) {
 <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width">
+       <?php
+       if ( function_exists( 'wp_no_robots' ) ) {
+               wp_no_robots();
+       }
+       ?>
        <title><?php echo $title ?></title>
        <style type="text/css">
                html {
@@ -2654,7 +2681,7 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) {
                body {
                        background: #fff;
                        color: #444;
-                       font-family: "Open Sans", sans-serif;
+                       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
                        margin: 2em auto;
                        padding: 1em 2em;
                        max-width: 700px;
@@ -2665,7 +2692,7 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) {
                        border-bottom: 1px solid #dadada;
                        clear: both;
                        color: #666;
-                       font: 24px "Open Sans", sans-serif;
+                       font-size: 24px;
                        margin: 30px 0 0 0;
                        padding: 0;
                        padding-bottom: 7px;
@@ -2858,7 +2885,7 @@ function wp_json_encode( $data, $options = 0, $depth = 512 ) {
        }
 
        // Prepare the data for JSON serialization.
-       $data = _wp_json_prepare_data( $data );
+       $args[0] = _wp_json_prepare_data( $data );
 
        $json = @call_user_func_array( 'json_encode', $args );
 
@@ -3059,14 +3086,13 @@ function wp_send_json_success( $data = null ) {
 /**
  * Send a JSON response back to an Ajax request, indicating failure.
  *
- * If the `$data` parameter is a {@see WP_Error} object, the errors
+ * If the `$data` parameter is a WP_Error object, the errors
  * within the object are processed and output as an array of error
  * codes and corresponding messages. All other types are output
  * without further processing.
  *
  * @since 3.5.0
- * @since 4.1.0 The `$data` parameter is now processed if a {@see WP_Error}
- *              object is passed in.
+ * @since 4.1.0 The `$data` parameter is now processed if a WP_Error object is passed in.
  *
  * @param mixed $data Data to encode as JSON, then print and die.
  */
@@ -3091,6 +3117,28 @@ function wp_send_json_error( $data = null ) {
        wp_send_json( $response );
 }
 
+/**
+ * Checks that a JSONP callback is a valid JavaScript callback.
+ *
+ * Only allows alphanumeric characters and the dot character in callback
+ * function names. This helps to mitigate XSS attacks caused by directly
+ * outputting user input.
+ *
+ * @since 4.6.0
+ *
+ * @param string $callback Supplied JSONP callback function.
+ * @return bool True if valid callback, otherwise false.
+ */
+function wp_check_jsonp_callback( $callback ) {
+       if ( ! is_string( $callback ) ) {
+               return false;
+       }
+
+       $jsonp_callback = preg_replace( '/[^\w\.]/', '', $callback, -1, $illegal_char_count );
+
+       return 0 === $illegal_char_count;
+}
+
 /**
  * Retrieve the WordPress home page URL.
  *
@@ -3211,7 +3259,7 @@ function smilies_init() {
                   ':idea:' => "\xf0\x9f\x92\xa1",
                   ':oops:' => "\xf0\x9f\x98\xb3",
                   ':razz:' => "\xf0\x9f\x98\x9b",
-                  ':roll:' => 'rolleyes.png',
+                  ':roll:' => "\xf0\x9f\x99\x84",
                   ':wink:' => "\xf0\x9f\x98\x89",
                    ':cry:' => "\xf0\x9f\x98\xa5",
                    ':eek:' => "\xf0\x9f\x98\xae",
@@ -3500,7 +3548,7 @@ function wp_list_pluck( $list, $field, $index_key = null ) {
  */
 function wp_maybe_load_widgets() {
        /**
-        * Filter whether to load the Widgets library.
+        * Filters whether to load the Widgets library.
         *
         * Passing a falsey value to the filter will effectively short-circuit
         * the Widgets library from loading.
@@ -3617,11 +3665,11 @@ function absint( $maybeint ) {
 /**
  * Mark a function as deprecated and inform when it has been used.
  *
- * There is a hook deprecated_function_run that will be called that can be used
+ * There is a {@see 'hook deprecated_function_run'} that will be called that can be used
  * to get the backtrace up to what file and function called the deprecated
  * function.
  *
- * The current behavior is to trigger a user error if WP_DEBUG is true.
+ * The current behavior is to trigger a user error if `WP_DEBUG` is true.
  *
  * This function is to be used in every function that is deprecated.
  *
@@ -3646,7 +3694,7 @@ function _deprecated_function( $function, $version, $replacement = null ) {
        do_action( 'deprecated_function_run', $function, $replacement, $version );
 
        /**
-        * Filter whether to trigger an error for deprecated functions.
+        * Filters whether to trigger an error for deprecated functions.
         *
         * @since 2.5.0
         *
@@ -3702,7 +3750,7 @@ function _deprecated_constructor( $class, $version, $parent_class = '' ) {
        do_action( 'deprecated_constructor_run', $class, $version, $parent_class );
 
        /**
-        * Filter whether to trigger an error for deprecated functions.
+        * Filters whether to trigger an error for deprecated functions.
         *
         * `WP_DEBUG` must be true in addition to the filter evaluating to true.
         *
@@ -3737,11 +3785,11 @@ function _deprecated_constructor( $class, $version, $parent_class = '' ) {
 /**
  * Mark a file as deprecated and inform when it has been used.
  *
- * There is a hook deprecated_file_included that will be called that can be used
+ * There is a hook {@see 'deprecated_file_included'} that will be called that can be used
  * to get the backtrace up to what file and function included the deprecated
  * file.
  *
- * The current behavior is to trigger a user error if WP_DEBUG is true.
+ * The current behavior is to trigger a user error if `WP_DEBUG` is true.
  *
  * This function is to be used in every file that is deprecated.
  *
@@ -3769,7 +3817,7 @@ function _deprecated_file( $file, $version, $replacement = null, $message = '' )
        do_action( 'deprecated_file_included', $file, $replacement, $version, $message );
 
        /**
-        * Filter whether to trigger an error for deprecated files.
+        * Filters whether to trigger an error for deprecated files.
         *
         * @since 2.5.0
         *
@@ -3799,7 +3847,7 @@ function _deprecated_file( $file, $version, $replacement = null, $message = '' )
  * For example:
  *
  *     if ( ! empty( $deprecated ) ) {
- *         _deprecated_argument( __FUNCTION__, '3.0' );
+ *         _deprecated_argument( __FUNCTION__, '3.0.0' );
  *     }
  *
  *
@@ -3830,7 +3878,7 @@ function _deprecated_argument( $function, $version, $message = null ) {
        do_action( 'deprecated_argument_run', $function, $message, $version );
 
        /**
-        * Filter whether to trigger an error for deprecated arguments.
+        * Filters whether to trigger an error for deprecated arguments.
         *
         * @since 3.0.0
         *
@@ -3851,14 +3899,64 @@ function _deprecated_argument( $function, $version, $message = null ) {
        }
 }
 
+/**
+ * Marks a deprecated action or filter hook as deprecated and throws a notice.
+ *
+ * Use the {@see 'deprecated_hook_run'} action to get the backtrace describing where
+ * the deprecated hook was called.
+ *
+ * Default behavior is to trigger a user error if `WP_DEBUG` is true.
+ *
+ * This function is called by the do_action_deprecated() and apply_filters_deprecated()
+ * functions, and so generally does not need to be called directly.
+ *
+ * @since 4.6.0
+ * @access private
+ *
+ * @param string $hook        The hook that was used.
+ * @param string $version     The version of WordPress that deprecated the hook.
+ * @param string $replacement Optional. The hook that should have been used.
+ * @param string $message     Optional. A message regarding the change.
+ */
+function _deprecated_hook( $hook, $version, $replacement = null, $message = null ) {
+       /**
+        * Fires when a deprecated hook is called.
+        *
+        * @since 4.6.0
+        *
+        * @param string $hook        The hook that was called.
+        * @param string $replacement The hook that should be used as a replacement.
+        * @param string $version     The version of WordPress that deprecated the argument used.
+        * @param string $message     A message regarding the change.
+        */
+       do_action( 'deprecated_hook_run', $hook, $replacement, $version, $message );
+
+       /**
+        * Filters whether to trigger deprecated hook errors.
+        *
+        * @since 4.6.0
+        *
+        * @param bool $trigger Whether to trigger deprecated hook errors. Requires
+        *                      `WP_DEBUG` to be defined true.
+        */
+       if ( WP_DEBUG && apply_filters( 'deprecated_hook_trigger_error', true ) ) {
+               $message = empty( $message ) ? '' : ' ' . $message;
+               if ( ! is_null( $replacement ) ) {
+                       trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), $hook, $version, $replacement ) . $message );
+               } else {
+                       trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $hook, $version ) . $message );
+               }
+       }
+}
+
 /**
  * Mark something as being incorrectly called.
  *
- * There is a hook doing_it_wrong_run that will be called that can be used
+ * There is a hook {@see 'doing_it_wrong_run'} that will be called that can be used
  * to get the backtrace up to what file and function called the deprecated
  * function.
  *
- * The current behavior is to trigger a user error if WP_DEBUG is true.
+ * The current behavior is to trigger a user error if `WP_DEBUG` is true.
  *
  * @since 3.1.0
  * @access private
@@ -3881,7 +3979,7 @@ function _doing_it_wrong( $function, $message, $version ) {
        do_action( 'doing_it_wrong_run', $function, $message, $version );
 
        /**
-        * Filter whether to trigger an error for _doing_it_wrong() calls.
+        * Filters whether to trigger an error for _doing_it_wrong() calls.
         *
         * @since 3.1.0
         *
@@ -3976,7 +4074,7 @@ function iis7_supports_permalinks() {
        }
 
        /**
-        * Filter whether IIS 7+ supports pretty permalinks.
+        * Filters whether IIS 7+ supports pretty permalinks.
         *
         * @since 2.8.0
         *
@@ -4015,25 +4113,6 @@ function validate_file( $file, $allowed_files = '' ) {
        return 0;
 }
 
-/**
- * Determine if SSL is used.
- *
- * @since 2.6.0
- *
- * @return bool True if SSL, false if not used.
- */
-function is_ssl() {
-       if ( isset($_SERVER['HTTPS']) ) {
-               if ( 'on' == strtolower($_SERVER['HTTPS']) )
-                       return true;
-               if ( '1' == $_SERVER['HTTPS'] )
-                       return true;
-       } elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
-               return true;
-       }
-       return false;
-}
-
 /**
  * Whether to force SSL used for the Administration Screens.
  *
@@ -4161,7 +4240,6 @@ function wp_suspend_cache_invalidation( $suspend = true ) {
  * @global object $current_site
  *
  * @param int $site_id Optional. Site ID to test. Defaults to current site.
- *                     Defaults to current site.
  * @return bool True if $site_id is the main site of the network, or if not
  *              running Multisite.
  */
@@ -4218,9 +4296,11 @@ function get_main_network_id() {
                return 1;
        }
 
+       $current_site = get_current_site();
+
        if ( defined( 'PRIMARY_NETWORK_ID' ) ) {
                $main_network_id = PRIMARY_NETWORK_ID;
-       } elseif ( 1 === (int) get_current_site()->id ) {
+       } elseif ( isset( $current_site->id ) && 1 === (int) $current_site->id ) {
                // If the current network has an ID of 1, assume it is the main network.
                $main_network_id = 1;
        } else {
@@ -4233,7 +4313,7 @@ function get_main_network_id() {
        }
 
        /**
-        * Filter the main network ID.
+        * Filters the main network ID.
         *
         * @since 4.3.0
         *
@@ -4259,7 +4339,7 @@ function global_terms_enabled() {
        if ( is_null( $global_terms ) ) {
 
                /**
-                * Filter whether global terms are enabled.
+                * Filters whether global terms are enabled.
                 *
                 * Passing a non-null value to the filter will effectively short-circuit the function,
                 * returning the value of the 'global_terms_enabled' site option instead.
@@ -4559,7 +4639,7 @@ function wp_scheduled_delete() {
  *
  * @param string $file            Path to the file.
  * @param array  $default_headers List of headers, in the format array('HeaderKey' => 'Header Name').
- * @param string $context         Optional. If specified adds filter hook "extra_{$context}_headers".
+ * @param string $context         Optional. If specified adds filter hook {@see 'extra_$context_headers'}.
  *                                Default empty.
  * @return array Array of file headers in `HeaderKey => Header Value` format.
  */
@@ -4577,7 +4657,7 @@ function get_file_data( $file, $default_headers, $context = '' ) {
        $file_data = str_replace( "\r", "\n", $file_data );
 
        /**
-        * Filter extra file headers by context.
+        * Filters extra file headers by context.
         *
         * The dynamic portion of the hook name, `$context`, refers to
         * the context where extra headers might be loaded.
@@ -4692,8 +4772,8 @@ function __return_empty_string() {
  *
  * @since 3.0.0
  *
- * @see http://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx
- * @see http://src.chromium.org/viewvc/chrome?view=rev&revision=6985
+ * @see https://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx
+ * @see https://src.chromium.org/viewvc/chrome?view=rev&revision=6985
  */
 function send_nosniff_header() {
        @header( 'X-Content-Type-Options: nosniff' );
@@ -4826,7 +4906,7 @@ function wp_allowed_protocols() {
                $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal' );
 
                /**
-                * Filter the list of protocols allowed in HTML attributes.
+                * Filters the list of protocols allowed in HTML attributes.
                 *
                 * @since 3.0.0
                 *
@@ -4963,7 +5043,7 @@ function wp_is_stream( $path ) {
  */
 function wp_checkdate( $month, $day, $year, $source_date ) {
        /**
-        * Filter whether the given date is valid for the Gregorian calendar.
+        * Filters whether the given date is valid for the Gregorian calendar.
         *
         * @since 3.5.0
         *
@@ -4979,7 +5059,7 @@ function wp_checkdate( $month, $day, $year, $source_date ) {
  * Can be disabled with remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' );
  *
  * This is disabled for certain screens where a login screen could cause an
- * inconvenient interruption. A filter called wp_auth_check_load can be used
+ * inconvenient interruption. A filter called {@see 'wp_auth_check_load'} can be used
  * for fine-grained control.
  *
  * @since 3.6.0
@@ -4996,7 +5076,7 @@ function wp_auth_check_load() {
        $show = ! in_array( $screen->id, $hidden );
 
        /**
-        * Filter whether to load the authentication check.
+        * Filters whether to load the authentication check.
         *
         * Passing a falsey value to the filter will effectively short-circuit
         * loading the authentication check.
@@ -5026,7 +5106,7 @@ function wp_auth_check_html() {
        $same_domain = ( strpos( $login_url, $current_domain ) === 0 );
 
        /**
-        * Filter whether the authentication check originated at the same domain.
+        * Filters whether the authentication check originated at the same domain.
         *
         * @since 3.6.0
         *
@@ -5213,7 +5293,7 @@ function wp_validate_boolean( $var ) {
  */
 function wp_delete_file( $file ) {
        /**
-        * Filter the path of the file to delete.
+        * Filters the path of the file to delete.
         *
         * @since 2.1.0
         *
@@ -5276,3 +5356,110 @@ function mysql_to_rfc3339( $date_string ) {
        // Strip timezone information
        return preg_replace( '/(?:Z|[+-]\d{2}(?::\d{2})?)$/', '', $formatted );
 }
+
+/**
+ * Attempts to raise the PHP memory limit for memory intensive processes.
+ *
+ * Only allows raising the existing limit and prevents lowering it.
+ *
+ * @since 4.6.0
+ *
+ * @param string $context Optional. Context in which the function is called. Accepts either 'admin',
+ *                        'image', or an arbitrary other context. If an arbitrary context is passed,
+ *                        the similarly arbitrary {@see '{$context}_memory_limit'} filter will be
+ *                        invoked. Default 'admin'.
+ * @return bool|int|string The limit that was set or false on failure.
+ */
+function wp_raise_memory_limit( $context = 'admin' ) {
+       // Exit early if the limit cannot be changed.
+       if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
+               return false;
+       }
+
+       $current_limit     = @ini_get( 'memory_limit' );
+       $current_limit_int = wp_convert_hr_to_bytes( $current_limit );
+
+       if ( -1 === $current_limit_int ) {
+               return false;
+       }
+
+       $wp_max_limit     = WP_MAX_MEMORY_LIMIT;
+       $wp_max_limit_int = wp_convert_hr_to_bytes( $wp_max_limit );
+       $filtered_limit   = $wp_max_limit;
+
+       switch ( $context ) {
+               case 'admin':
+                       /**
+                        * Filters the maximum memory limit available for administration screens.
+                        *
+                        * This only applies to administrators, who may require more memory for tasks
+                        * like updates. Memory limits when processing images (uploaded or edited by
+                        * users of any role) are handled separately.
+                        *
+                        * The `WP_MAX_MEMORY_LIMIT` constant specifically defines the maximum memory
+                        * limit available when in the administration back end. The default is 256M
+                        * (256 megabytes of memory) or the original `memory_limit` php.ini value if
+                        * this is higher.
+                        *
+                        * @since 3.0.0
+                        * @since 4.6.0 The default now takes the original `memory_limit` into account.
+                        *
+                        * @param int|string $filtered_limit The maximum WordPress memory limit. Accepts an integer
+                        *                                   (bytes), or a shorthand string notation, such as '256M'.
+                        */
+                       $filtered_limit = apply_filters( 'admin_memory_limit', $filtered_limit );
+                       break;
+
+               case 'image':
+                       /**
+                        * Filters the memory limit allocated for image manipulation.
+                        *
+                        * @since 3.5.0
+                        * @since 4.6.0 The default now takes the original `memory_limit` into account.
+                        *
+                        * @param int|string $filtered_limit Maximum memory limit to allocate for images.
+                        *                                   Default `WP_MAX_MEMORY_LIMIT` or the original
+                        *                                   php.ini `memory_limit`, whichever is higher.
+                        *                                   Accepts an integer (bytes), or a shorthand string
+                        *                                   notation, such as '256M'.
+                        */
+                       $filtered_limit = apply_filters( 'image_memory_limit', $filtered_limit );
+                       break;
+
+               default:
+                       /**
+                        * Filters the memory limit allocated for arbitrary contexts.
+                        *
+                        * The dynamic portion of the hook name, `$context`, refers to an arbitrary
+                        * context passed on calling the function. This allows for plugins to define
+                        * their own contexts for raising the memory limit.
+                        *
+                        * @since 4.6.0
+                        *
+                        * @param int|string $filtered_limit Maximum memory limit to allocate for images.
+                        *                                   Default '256M' or the original php.ini `memory_limit`,
+                        *                                   whichever is higher. Accepts an integer (bytes), or a
+                        *                                   shorthand string notation, such as '256M'.
+                        */
+                       $filtered_limit = apply_filters( "{$context}_memory_limit", $filtered_limit );
+                       break;
+       }
+
+       $filtered_limit_int = wp_convert_hr_to_bytes( $filtered_limit );
+
+       if ( -1 === $filtered_limit_int || ( $filtered_limit_int > $wp_max_limit_int && $filtered_limit_int > $current_limit_int ) ) {
+               if ( false !== @ini_set( 'memory_limit', $filtered_limit ) ) {
+                       return $filtered_limit;
+               } else {
+                       return false;
+               }
+       } elseif ( -1 === $wp_max_limit_int || $wp_max_limit_int > $current_limit_int ) {
+               if ( false !== @ini_set( 'memory_limit', $wp_max_limit ) ) {
+                       return $wp_max_limit;
+               } else {
+                       return false;
+               }
+       }
+
+       return false;
+}
index 197368c7c64d2d878e1817ea72e0f119c9a469e4..767d995d673af6c9e8191488cb517704c9a5807d 100644 (file)
@@ -43,15 +43,15 @@ function _wp_scripts_maybe_doing_it_wrong( $function ) {
                '<code>wp_enqueue_scripts</code>',
                '<code>admin_enqueue_scripts</code>',
                '<code>login_enqueue_scripts</code>'
-       ), '3.3' );
+       ), '3.3.0' );
 }
 
 /**
- * Print scripts in document head that are in the $handles queue.
+ * Prints scripts in document head that are in the $handles queue.
  *
- * Called by admin-header.php and wp_head hook. Since it is called by wp_head on every page load,
+ * Called by admin-header.php and {@see 'wp_head'} hook. Since it is called by wp_head on every page load,
  * the function does not instantiate the WP_Scripts object unless script names are explicitly passed.
- * Makes use of already-instantiated $wp_scripts global if present. Use provided wp_print_scripts
+ * Makes use of already-instantiated $wp_scripts global if present. Use provided {@see 'wp_print_scripts'}
  * hook to register/enqueue new scripts.
  *
  * @see WP_Scripts::do_items()
@@ -107,7 +107,12 @@ function wp_add_inline_script( $handle, $data, $position = 'after' ) {
        _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
 
        if ( false !== stripos( $data, '</script>' ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Do not pass script tags to wp_add_inline_script().' ), '4.5.0' );
+               _doing_it_wrong( __FUNCTION__, sprintf(
+                       /* translators: 1: <script>, 2: wp_add_inline_script() */
+                       __( 'Do not pass %1$s tags to %2$s.' ),
+                       '<code>&lt;script&gt;</code>',
+                       '<code>wp_add_inline_script()</code>'
+               ), '4.5.0' );
                $data = trim( preg_replace( '#<script[^>]*>(.*)</script>#is', '$1', $data ) );
        }
 
@@ -221,7 +226,7 @@ function wp_deregister_script( $handle ) {
                if ( in_array( $handle, $no ) ) {
                        $message = sprintf( __( 'Do not deregister the %1$s script in the administration area. To target the front-end theme, use the %2$s hook.' ),
                                "<code>$handle</code>", '<code>wp_enqueue_scripts</code>' );
-                       _doing_it_wrong( __FUNCTION__, $message, '3.6' );
+                       _doing_it_wrong( __FUNCTION__, $message, '3.6.0' );
                        return;
                }
        }
index 3c9d64939d9943bf8619dae13f1f98a7fb586c30..5312f8233098bd40937970a97f04cf06944ad35b 100644 (file)
@@ -84,7 +84,12 @@ function wp_add_inline_style( $handle, $data ) {
        _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
 
        if ( false !== stripos( $data, '</style>' ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Do not pass style tags to wp_add_inline_style().' ), '3.7' );
+               _doing_it_wrong( __FUNCTION__, sprintf(
+                       /* translators: 1: <style>, 2: wp_add_inline_style() */
+                       __( 'Do not pass %1$s tags to %2$s.' ),
+                       '<code>&lt;style&gt;</code>',
+                       '<code>wp_add_inline_style()</code>'
+               ), '3.7.0' );
                $data = trim( preg_replace( '#<style[^>]*>(.*)</style>#is', '$1', $data ) );
        }
 
@@ -95,7 +100,7 @@ function wp_add_inline_style( $handle, $data ) {
  * Register a CSS stylesheet.
  *
  * @see WP_Dependencies::add()
- * @link http://www.w3.org/TR/CSS2/media.html#media-types List of CSS media types.
+ * @link https://www.w3.org/TR/CSS2/media.html#media-types List of CSS media types.
  *
  * @since 2.6.0
  * @since 4.3.0 A return value was added.
@@ -140,7 +145,7 @@ function wp_deregister_style( $handle ) {
  *
  * @see WP_Dependencies::add()
  * @see WP_Dependencies::enqueue()
- * @link http://www.w3.org/TR/CSS2/media.html#media-types List of CSS media types.
+ * @link https://www.w3.org/TR/CSS2/media.html#media-types List of CSS media types.
  *
  * @since 2.6.0
  *
index aaff39ef208be779132f9169c88b8d25c2ef040c..12ffd4a91e08888c1b3c4e51c10765efece8d38d 100644 (file)
@@ -174,13 +174,13 @@ function get_template_part( $slug, $name = null ) {
  * the parent, then load it. If it doesn't exist, then the default search form
  * will be displayed. The default search form is HTML, which will be displayed.
  * There is a filter applied to the search form HTML in order to edit or replace
- * it. The filter is 'get_search_form'.
+ * it. The filter is {@see 'get_search_form'}.
  *
  * This function is primarily used by themes which want to hardcode the search
  * form into the sidebar and also by the search widget in WordPress.
  *
  * There is also an action that is called whenever the function is run called,
- * 'pre_get_search_form'. This can be useful for outputting JavaScript that the
+ * {@see 'pre_get_search_form'}. This can be useful for outputting JavaScript that the
  * search relies on or various formatting that applies to the beginning of the
  * search. To give a few examples of what it can be used for.
  *
@@ -203,7 +203,7 @@ function get_search_form( $echo = true ) {
        $format = current_theme_supports( 'html5', 'search-form' ) ? 'html5' : 'xhtml';
 
        /**
-        * Filter the HTML format of the search form.
+        * Filters the HTML format of the search form.
         *
         * @since 3.6.0
         *
@@ -238,7 +238,7 @@ function get_search_form( $echo = true ) {
        }
 
        /**
-        * Filter the HTML output of the search form.
+        * Filters the HTML output of the search form.
         *
         * @since 2.7.0
         *
@@ -275,7 +275,7 @@ function wp_loginout($redirect = '', $echo = true) {
 
        if ( $echo ) {
                /**
-                * Filter the HTML output for the Log In/Log Out link.
+                * Filters the HTML output for the Log In/Log Out link.
                 *
                 * @since 1.5.0
                 *
@@ -289,14 +289,14 @@ function wp_loginout($redirect = '', $echo = true) {
 }
 
 /**
- * Returns the Log Out URL.
+ * Retrieves the logout URL.
  *
  * Returns the URL that allows the user to log out of the site.
  *
  * @since 2.7.0
  *
  * @param string $redirect Path to redirect to on logout.
- * @return string A log out URL.
+ * @return string The logout URL. Note: HTML-encoded via esc_html() in wp_nonce_url().
  */
 function wp_logout_url($redirect = '') {
        $args = array( 'action' => 'logout' );
@@ -308,24 +308,25 @@ function wp_logout_url($redirect = '') {
        $logout_url = wp_nonce_url( $logout_url, 'log-out' );
 
        /**
-        * Filter the logout URL.
+        * Filters the logout URL.
         *
         * @since 2.8.0
         *
-        * @param string $logout_url The Log Out URL.
+        * @param string $logout_url The HTML-encoded logout URL.
         * @param string $redirect   Path to redirect to on logout.
         */
        return apply_filters( 'logout_url', $logout_url, $redirect );
 }
 
 /**
- * Returns the URL that allows the user to log in to the site.
+ * Retrieves the login URL.
  *
  * @since 2.7.0
  *
- * @param string $redirect     Path to redirect to on login.
- * @param bool   $force_reauth Whether to force reauthorization, even if a cookie is present. Default is false.
- * @return string A log in URL.
+ * @param string $redirect     Path to redirect to on log in.
+ * @param bool   $force_reauth Whether to force reauthorization, even if a cookie is present.
+ *                             Default false.
+ * @return string The login URL. Not HTML-encoded.
  */
 function wp_login_url($redirect = '', $force_reauth = false) {
        $login_url = site_url('wp-login.php', 'login');
@@ -337,12 +338,12 @@ function wp_login_url($redirect = '', $force_reauth = false) {
                $login_url = add_query_arg('reauth', '1', $login_url);
 
        /**
-        * Filter the login URL.
+        * Filters the login URL.
         *
         * @since 2.8.0
         * @since 4.2.0 The `$force_reauth` parameter was added.
         *
-        * @param string $login_url    The login URL.
+        * @param string $login_url    The login URL. Not HTML-encoded.
         * @param string $redirect     The path to redirect to on login, if supplied.
         * @param bool   $force_reauth Whether to force reauthorization, even if a cookie is present.
         */
@@ -358,7 +359,7 @@ function wp_login_url($redirect = '', $force_reauth = false) {
  */
 function wp_registration_url() {
        /**
-        * Filter the user registration URL.
+        * Filters the user registration URL.
         *
         * @since 3.6.0
         *
@@ -419,7 +420,7 @@ function wp_login_form( $args = array() ) {
        );
 
        /**
-        * Filter the default login form output arguments.
+        * Filters the default login form output arguments.
         *
         * @since 3.0.0
         *
@@ -430,7 +431,7 @@ function wp_login_form( $args = array() ) {
        $args = wp_parse_args( $args, apply_filters( 'login_form_defaults', $defaults ) );
 
        /**
-        * Filter content to display at the top of the login form.
+        * Filters content to display at the top of the login form.
         *
         * The filter evaluates just following the opening form tag element.
         *
@@ -442,7 +443,7 @@ function wp_login_form( $args = array() ) {
        $login_form_top = apply_filters( 'login_form_top', '', $args );
 
        /**
-        * Filter content to display in the middle of the login form.
+        * Filters content to display in the middle of the login form.
         *
         * The filter evaluates just following the location where the 'login-password'
         * field is displayed.
@@ -455,7 +456,7 @@ function wp_login_form( $args = array() ) {
        $login_form_middle = apply_filters( 'login_form_middle', '', $args );
 
        /**
-        * Filter content to display at the bottom of the login form.
+        * Filters content to display at the bottom of the login form.
         *
         * The filter evaluates just preceding the closing form tag element.
         *
@@ -509,7 +510,7 @@ function wp_lostpassword_url( $redirect = '' ) {
        $lostpassword_url = add_query_arg( $args, network_site_url('wp-login.php', 'login') );
 
        /**
-        * Filter the Lost Password URL.
+        * Filters the Lost Password URL.
         *
         * @since 2.8.0
         *
@@ -545,7 +546,7 @@ function wp_register( $before = '<li>', $after = '</li>', $echo = true ) {
        }
 
        /**
-        * Filter the HTML link to the Registration or Admin page.
+        * Filters the HTML link to the Registration or Admin page.
         *
         * Users are sent to the admin page if logged-in, or the registration page
         * if enabled and logged-out.
@@ -566,7 +567,7 @@ function wp_register( $before = '<li>', $after = '</li>', $echo = true ) {
 /**
  * Theme container function for the 'wp_meta' action.
  *
- * The 'wp_meta' action can have several purposes, depending on how you use it,
+ * The {@see 'wp_meta'} action can have several purposes, depending on how you use it,
  * but one purpose might have been to allow for theme switching.
  *
  * @since 1.5.0
@@ -646,7 +647,7 @@ function get_bloginfo( $show = '', $filter = 'raw' ) {
        switch( $show ) {
                case 'home' : // DEPRECATED
                case 'siteurl' : // DEPRECATED
-                       _deprecated_argument( __FUNCTION__, '2.2', sprintf(
+                       _deprecated_argument( __FUNCTION__, '2.2.0', sprintf(
                                /* translators: 1: 'siteurl'/'home' argument, 2: bloginfo() function name, 3: 'url' argument */
                                __( 'The %1$s option is deprecated for the family of %2$s functions. Use the %3$s option instead.' ),
                                '<code>' . $show . '</code>',
@@ -719,7 +720,7 @@ function get_bloginfo( $show = '', $filter = 'raw' ) {
                        }
                        break;
                case 'text_direction':
-                       _deprecated_argument( __FUNCTION__, '2.2', sprintf(
+                       _deprecated_argument( __FUNCTION__, '2.2.0', sprintf(
                                /* translators: 1: 'text_direction' argument, 2: bloginfo() function name, 3: is_rtl() function name */
                                __( 'The %1$s option is deprecated for the family of %2$s functions. Use the %3$s function instead.' ),
                                '<code>' . $show . '</code>',
@@ -747,7 +748,7 @@ function get_bloginfo( $show = '', $filter = 'raw' ) {
        if ( 'display' == $filter ) {
                if ( $url ) {
                        /**
-                        * Filter the URL returned by get_bloginfo().
+                        * Filters the URL returned by get_bloginfo().
                         *
                         * @since 2.0.5
                         *
@@ -757,7 +758,7 @@ function get_bloginfo( $show = '', $filter = 'raw' ) {
                        $output = apply_filters( 'bloginfo_url', $output, $show );
                } else {
                        /**
-                        * Filter the site information returned by get_bloginfo().
+                        * Filters the site information returned by get_bloginfo().
                         *
                         * @since 0.71
                         *
@@ -802,7 +803,7 @@ function get_site_icon_url( $size = 512, $url = '', $blog_id = 0 ) {
        }
 
        /**
-        * Filter the site icon URL.
+        * Filters the site icon URL.
         *
         * @site 4.4.0
         *
@@ -900,13 +901,15 @@ function get_custom_logo( $blog_id = 0 ) {
        }
 
        /**
-        * Filter the custom logo output.
+        * Filters the custom logo output.
         *
         * @since 4.5.0
+        * @since 4.6.0 Added the `$blog_id` parameter.
         *
-        * @param string $html Custom logo HTML output.
+        * @param string $html    Custom logo HTML output.
+        * @param int    $blog_id ID of the blog to get the custom logo for.
         */
-       return apply_filters( 'get_custom_logo', $html );
+       return apply_filters( 'get_custom_logo', $html, $blog_id );
 }
 
 /**
@@ -933,7 +936,7 @@ function the_custom_logo( $blog_id = 0 ) {
 function wp_get_document_title() {
 
        /**
-        * Filter the document title before it is generated.
+        * Filters the document title before it is generated.
         *
         * Passing a non-empty value will short-circuit wp_get_document_title(),
         * returning that value instead.
@@ -1013,7 +1016,7 @@ function wp_get_document_title() {
        }
 
        /**
-        * Filter the separator for the document title.
+        * Filters the separator for the document title.
         *
         * @since 4.4.0
         *
@@ -1022,7 +1025,7 @@ function wp_get_document_title() {
        $sep = apply_filters( 'document_title_separator', '-' );
 
        /**
-        * Filter the parts of the document title.
+        * Filters the parts of the document title.
         *
         * @since 4.4.0
         *
@@ -1071,10 +1074,10 @@ function _wp_render_title_tag() {
  * important, which is the page that the user is looking at.
  *
  * There are also SEO benefits to having the blog title after or to the 'right'
- * or the page title. However, it is mostly common sense to have the blog title
+ * of the page title. However, it is mostly common sense to have the blog title
  * to the right with most browsers supporting tabs. You can achieve this by
  * using the seplocation parameter and setting the value to 'right'. This change
- * was introduced around 2.5.0, in case backwards compatibility of themes is
+ * was introduced around 2.5.0, in case backward compatibility of themes is
  * important.
  *
  * @since 1.0.0
@@ -1179,7 +1182,7 @@ function wp_title( $sep = '&raquo;', $display = true, $seplocation = '' ) {
        }
 
        /**
-        * Filter the parts of the page title.
+        * Filters the parts of the page title.
         *
         * @since 4.0.0
         *
@@ -1196,7 +1199,7 @@ function wp_title( $sep = '&raquo;', $display = true, $seplocation = '' ) {
        }
 
        /**
-        * Filter the text of the page title.
+        * Filters the text of the page title.
         *
         * @since 2.0.0
         *
@@ -1237,7 +1240,7 @@ function single_post_title( $prefix = '', $display = true ) {
                return;
 
        /**
-        * Filter the page title for a single post.
+        * Filters the page title for a single post.
         *
         * @since 0.71
         *
@@ -1274,7 +1277,7 @@ function post_type_archive_title( $prefix = '', $display = true ) {
        $post_type_obj = get_post_type_object( $post_type );
 
        /**
-        * Filter the post type archive title.
+        * Filters the post type archive title.
         *
         * @since 3.1.0
         *
@@ -1344,7 +1347,7 @@ function single_term_title( $prefix = '', $display = true ) {
 
        if ( is_category() ) {
                /**
-                * Filter the category archive page title.
+                * Filters the category archive page title.
                 *
                 * @since 2.0.10
                 *
@@ -1353,7 +1356,7 @@ function single_term_title( $prefix = '', $display = true ) {
                $term_name = apply_filters( 'single_cat_title', $term->name );
        } elseif ( is_tag() ) {
                /**
-                * Filter the tag archive page title.
+                * Filters the tag archive page title.
                 *
                 * @since 2.3.0
                 *
@@ -1362,7 +1365,7 @@ function single_term_title( $prefix = '', $display = true ) {
                $term_name = apply_filters( 'single_tag_title', $term->name );
        } elseif ( is_tax() ) {
                /**
-                * Filter the custom taxonomy archive page title.
+                * Filters the custom taxonomy archive page title.
                 *
                 * @since 3.1.0
                 *
@@ -1492,7 +1495,7 @@ function get_the_archive_title() {
        }
 
        /**
-        * Filter the archive title.
+        * Filters the archive title.
         *
         * @since 4.1.0
         *
@@ -1527,7 +1530,7 @@ function the_archive_description( $before = '', $after = '' ) {
  */
 function get_the_archive_description() {
        /**
-        * Filter the archive description.
+        * Filters the archive description.
         *
         * @since 4.1.0
         *
@@ -1585,7 +1588,7 @@ function get_archives_link($url, $text, $format = 'html', $before = '', $after =
                $link_html = "\t$before<a href='$url'>$text</a>$after\n";
 
        /**
-        * Filter the archive link content.
+        * Filters the archive link content.
         *
         * @since 2.6.0
         * @since 4.5.0 Added the `$url`, `$text`, `$format`, `$before`, and `$after` parameters.
@@ -1674,7 +1677,7 @@ function wp_get_archives( $args = '' ) {
        $sql_where = $wpdb->prepare( "WHERE post_type = %s AND post_status = 'publish'", $r['post_type'] );
 
        /**
-        * Filter the SQL WHERE clause for retrieving archives.
+        * Filters the SQL WHERE clause for retrieving archives.
         *
         * @since 2.2.0
         *
@@ -1684,7 +1687,7 @@ function wp_get_archives( $args = '' ) {
        $where = apply_filters( 'getarchives_where', $sql_where, $r );
 
        /**
-        * Filter the SQL JOIN clause for retrieving archives.
+        * Filters the SQL JOIN clause for retrieving archives.
         *
         * @since 2.2.0
         *
@@ -1790,7 +1793,7 @@ function wp_get_archives( $args = '' ) {
                                        $arc_week       = get_weekstartend( $result->yyyymmdd, get_option( 'start_of_week' ) );
                                        $arc_week_start = date_i18n( get_option( 'date_format' ), $arc_week['start'] );
                                        $arc_week_end   = date_i18n( get_option( 'date_format' ), $arc_week['end'] );
-                                       $url            = sprintf( '%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d', home_url(), '', '?', '=', $arc_year, '&amp;', '=', $result->week );
+                                       $url            = add_query_arg( array( 'm' => $arc_year, 'w' => $result->week, ), home_url( '/' ) );
                                        if ( 'post' !== $r['post_type'] ) {
                                                $url = add_query_arg( 'post_type', $r['post_type'], $url );
                                        }
@@ -2065,7 +2068,7 @@ function get_calendar( $initial = true, $echo = true ) {
 
        if ( $echo ) {
                /**
-                * Filter the HTML calendar output.
+                * Filters the HTML calendar output.
                 *
                 * @since 3.0.0
                 *
@@ -2157,7 +2160,7 @@ function the_date( $d = '', $before = '', $after = '', $echo = true ) {
                $previousday = $currentday;
 
                /**
-                * Filter the date a post was published for display.
+                * Filters the date a post was published for display.
                 *
                 * @since 0.71
                 *
@@ -2180,7 +2183,7 @@ function the_date( $d = '', $before = '', $after = '', $echo = true ) {
  * Retrieve the date on which the post was written.
  *
  * Unlike the_date() this function will always return the date.
- * Modify output with 'get_the_date' filter.
+ * Modify output with the {@see 'get_the_date'} filter.
  *
  * @since 3.0.0
  *
@@ -2202,7 +2205,7 @@ function get_the_date( $d = '', $post = null ) {
        }
 
        /**
-        * Filter the date a post was published.
+        * Filters the date a post was published.
         *
         * @since 3.0.0
         *
@@ -2229,7 +2232,7 @@ function the_modified_date( $d = '', $before = '', $after = '', $echo = true ) {
        $the_modified_date = $before . get_the_modified_date($d) . $after;
 
        /**
-        * Filter the date a post was last modified for display.
+        * Filters the date a post was last modified for display.
         *
         * @since 2.1.0
         *
@@ -2252,26 +2255,36 @@ function the_modified_date( $d = '', $before = '', $after = '', $echo = true ) {
  * Retrieve the date on which the post was last modified.
  *
  * @since 2.1.0
+ * @since 4.6.0 Added the `$post` parameter.
  *
- * @param string $d Optional. PHP date format. Defaults to the "date_format" option
- * @return string
+ * @param string      $d    Optional. PHP date format defaults to the date_format option if not specified.
+ * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.
+ * @return false|string Date the current post was modified. False on failure.
  */
-function get_the_modified_date($d = '') {
-       if ( '' == $d )
-               $the_time = get_post_modified_time(get_option('date_format'), null, null, true);
-       else
-               $the_time = get_post_modified_time($d, null, null, true);
+function get_the_modified_date( $d = '', $post = null ) {
+       $post = get_post( $post );
+
+       if ( ! $post ) {
+               // For backward compatibility, failures go through the filter below.
+               $the_time = false;
+       } elseif ( empty( $d ) ) {
+               $the_time = get_post_modified_time( get_option( 'date_format' ), false, $post, true );
+       } else {
+               $the_time = get_post_modified_time( $d, false, $post, true );
+       }
 
        /**
-        * Filter the date a post was last modified.
+        * Filters the date a post was last modified.
         *
         * @since 2.1.0
+        * @since 4.6.0 Added the `$post` parameter.
         *
-        * @param string $the_time The formatted date.
-        * @param string $d        PHP date format. Defaults to value specified in
-        *                         'date_format' option.
+        * @param string  $the_time The formatted date.
+        * @param string  $d        PHP date format. Defaults to value specified in
+        *                          'date_format' option.
+        * @param WP_Post $post     WP_Post object.
         */
-       return apply_filters( 'get_the_modified_date', $the_time, $d );
+       return apply_filters( 'get_the_modified_date', $the_time, $d, $post );
 }
 
 /**
@@ -2283,7 +2296,7 @@ function get_the_modified_date($d = '') {
  */
 function the_time( $d = '' ) {
        /**
-        * Filter the time a post was written for display.
+        * Filters the time a post was written for display.
         *
         * @since 0.71
         *
@@ -2303,7 +2316,7 @@ function the_time( $d = '' ) {
  *                          was written. Either 'G', 'U', or php date format defaults
  *                          to the value specified in the time_format option. Default empty.
  * @param int|WP_Post $post WP_Post object or ID. Default is global $post object.
- * @return false|string Formatted date string or Unix timestamp. False on failure.
+ * @return string|int|false Formatted date string or Unix timestamp if `$id` is 'U' or 'G'. False on failure.
  */
 function get_the_time( $d = '', $post = null ) {
        $post = get_post($post);
@@ -2318,7 +2331,7 @@ function get_the_time( $d = '', $post = null ) {
                $the_time = get_post_time($d, false, $post, true);
 
        /**
-        * Filter the time a post was written.
+        * Filters the time a post was written.
         *
         * @since 1.5.0
         *
@@ -2341,7 +2354,7 @@ function get_the_time( $d = '', $post = null ) {
  * @param bool        $gmt       Optional. Whether to retrieve the GMT time. Default false.
  * @param int|WP_Post $post      WP_Post object or ID. Default is global $post object.
  * @param bool        $translate Whether to translate the time string. Default false.
- * @return false|string|int Formatted date string or Unix timestamp. False on failure.
+ * @return string|int|false Formatted date string or Unix timestamp if `$id` is 'U' or 'G'. False on failure.
  */
 function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
        $post = get_post($post);
@@ -2358,7 +2371,7 @@ function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false
        $time = mysql2date($d, $time, $translate);
 
        /**
-        * Filter the localized time a post was written.
+        * Filters the localized time a post was written.
         *
         * @since 2.6.0
         *
@@ -2379,7 +2392,7 @@ function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false
  */
 function the_modified_time($d = '') {
        /**
-        * Filter the localized time a post was last modified, for display.
+        * Filters the localized time a post was last modified, for display.
         *
         * @since 2.0.0
         *
@@ -2395,27 +2408,39 @@ function the_modified_time($d = '') {
  * Retrieve the time at which the post was last modified.
  *
  * @since 2.0.0
+ * @since 4.6.0 Added the `$post` parameter.
  *
- * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
- * @return string
+ * @param string      $d     Optional. Format to use for retrieving the time the post
+ *                           was modified. Either 'G', 'U', or php date format defaults
+ *                           to the value specified in the time_format option. Default empty.
+ * @param int|WP_Post $post  Optional. Post ID or WP_Post object. Default current post.
+ * @return false|string Formatted date string or Unix timestamp. False on failure.
  */
-function get_the_modified_time($d = '') {
-       if ( '' == $d )
-               $the_time = get_post_modified_time(get_option('time_format'), null, null, true);
-       else
-               $the_time = get_post_modified_time($d, null, null, true);
+function get_the_modified_time( $d = '', $post = null ) {
+       $post = get_post( $post );
+
+       if ( ! $post ) {
+               // For backward compatibility, failures go through the filter below.
+               $the_time = false;
+       } elseif ( empty( $d ) ) {
+               $the_time = get_post_modified_time( get_option( 'time_format' ), false, $post, true );
+       } else {
+               $the_time = get_post_modified_time( $d, false, $post, true );
+       }
 
        /**
-        * Filter the localized time a post was last modified.
+        * Filters the localized time a post was last modified.
         *
         * @since 2.0.0
+        * @since 4.6.0 Added the `$post` parameter.
         *
         * @param string $the_time The formatted time.
         * @param string $d        Format to use for retrieving the time the post was
         *                         written. Accepts 'G', 'U', or php date format. Defaults
         *                         to value specified in 'time_format' option.
+        * @param WP_Post $post    WP_Post object.
         */
-       return apply_filters( 'get_the_modified_time', $the_time, $d );
+       return apply_filters( 'get_the_modified_time', $the_time, $d, $post );
 }
 
 /**
@@ -2428,7 +2453,7 @@ function get_the_modified_time($d = '') {
  * @param bool        $gmt       Optional. Whether to retrieve the GMT time. Default false.
  * @param int|WP_Post $post      WP_Post object or ID. Default is global $post object.
  * @param bool        $translate Whether to translate the time string. Default false.
- * @return false|string Formatted date string or Unix timestamp. False on failure.
+ * @return string|int|false Formatted date string or Unix timestamp if `$id` is 'U' or 'G'. False on failure.
  */
 function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
        $post = get_post($post);
@@ -2444,7 +2469,7 @@ function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translat
        $time = mysql2date($d, $time, $translate);
 
        /**
-        * Filter the localized time a post was last modified.
+        * Filters the localized time a post was last modified.
         *
         * @since 2.8.0
         *
@@ -2467,7 +2492,7 @@ function the_weekday() {
        $the_weekday = $wp_locale->get_weekday( mysql2date( 'w', get_post()->post_date, false ) );
 
        /**
-        * Filter the weekday on which the post was written, for display.
+        * Filters the weekday on which the post was written, for display.
         *
         * @since 0.71
         *
@@ -2502,7 +2527,7 @@ function the_weekday_date($before='',$after='') {
        }
 
        /**
-        * Filter the localized date on which the post was written, for display.
+        * Filters the localized date on which the post was written, for display.
         *
         * @since 0.71
         *
@@ -2515,13 +2540,15 @@ function the_weekday_date($before='',$after='') {
 }
 
 /**
- * Fire the wp_head action
+ * Fire the wp_head action.
+ *
+ * See {@see 'wp_head'}.
  *
  * @since 1.2.0
  */
 function wp_head() {
        /**
-        * Print scripts or data in the head tag on the front end.
+        * Prints scripts or data in the head tag on the front end.
         *
         * @since 1.5.0
         */
@@ -2529,13 +2556,15 @@ function wp_head() {
 }
 
 /**
- * Fire the wp_footer action
+ * Fire the wp_footer action.
+ *
+ * See {@see 'wp_footer'}.
  *
  * @since 1.5.1
  */
 function wp_footer() {
        /**
-        * Print scripts or data before the closing body tag on the front end.
+        * Prints scripts or data before the closing body tag on the front end.
         *
         * @since 1.5.1
         */
@@ -2565,7 +2594,7 @@ function feed_links( $args = array() ) {
        $args = wp_parse_args( $args, $defaults );
 
        /**
-        * Filter whether to display the posts feed link.
+        * Filters whether to display the posts feed link.
         *
         * @since 4.4.0
         *
@@ -2576,7 +2605,7 @@ function feed_links( $args = array() ) {
        }
 
        /**
-        * Filter whether to display the comments feed link.
+        * Filters whether to display the comments feed link.
         *
         * @since 4.4.0
         *
@@ -2683,7 +2712,7 @@ function rsd_link() {
 /**
  * Display the link to the Windows Live Writer manifest file.
  *
- * @link http://msdn.microsoft.com/en-us/library/bb463265.aspx
+ * @link https://msdn.microsoft.com/en-us/library/bb463265.aspx
  * @since 2.3.1
  */
 function wlwmanifest_link() {
@@ -2692,11 +2721,15 @@ function wlwmanifest_link() {
 }
 
 /**
- * Display a noindex meta tag if required by the blog configuration.
+ * Displays a noindex meta tag if required by the blog configuration.
  *
  * If a blog is marked as not being public then the noindex meta tag will be
- * output to tell web robots not to index the page content. Add this to the wp_head action.
- * Typical usage is as a wp_head callback. add_action( 'wp_head', 'noindex' );
+ * output to tell web robots not to index the page content. Add this to the
+ * {@see 'wp_head'} action.
+ *
+ * Typical usage is as a {@see 'wp_head'} callback:
+ *
+ *     add_action( 'wp_head', 'noindex' );
  *
  * @see wp_no_robots
  *
@@ -2725,7 +2758,7 @@ function wp_no_robots() {
  *
  * @since 4.3.0
  *
- * @link http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#rel-icon HTML5 specification link icon.
+ * @link https://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#rel-icon HTML5 specification link icon.
  */
 function wp_site_icon() {
        if ( ! has_site_icon() && ! is_customize_preview() ) {
@@ -2740,7 +2773,7 @@ function wp_site_icon() {
        );
 
        /**
-        * Filter the site icon meta tags, so Plugins can add their own.
+        * Filters the site icon meta tags, so Plugins can add their own.
         *
         * @since 4.3.0
         *
@@ -2754,6 +2787,110 @@ function wp_site_icon() {
        }
 }
 
+/**
+ * Prints resource hints to browsers for pre-fetching, pre-rendering
+ * and pre-connecting to web sites.
+ *
+ * Gives hints to browsers to prefetch specific pages or render them
+ * in the background, to perform DNS lookups or to begin the connection
+ * handshake (DNS, TCP, TLS) in the background.
+ *
+ * These performance improving indicators work by using `<link rel"…">`.
+ *
+ * @since 4.6.0
+ */
+function wp_resource_hints() {
+       $hints = array(
+               'dns-prefetch' => wp_dependencies_unique_hosts(),
+               'preconnect'   => array(),
+               'prefetch'     => array(),
+               'prerender'    => array(),
+       );
+
+       /*
+        * Add DNS prefetch for the Emoji CDN.
+        * The path is removed in the foreach loop below.
+        */
+       /** This filter is documented in wp-includes/formatting.php */
+       $hints['dns-prefetch'][] = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2/svg/' );
+
+       foreach ( $hints as $relation_type => $urls ) {
+               /**
+                * Filters domains and URLs for resource hints of relation type.
+                *
+                * @since 4.6.0
+                *
+                * @param array  $urls          URLs to print for resource hints.
+                * @param string $relation_type The relation type the URLs are printed for, e.g. 'preconnect' or 'prerender'.
+                */
+               $urls = apply_filters( 'wp_resource_hints', $urls, $relation_type );
+
+               foreach ( $urls as $key => $url ) {
+                       $url = esc_url( $url, array( 'http', 'https' ) );
+                       if ( ! $url ) {
+                               unset( $urls[ $key ] );
+                               continue;
+                       }
+
+                       if ( in_array( $relation_type, array( 'preconnect', 'dns-prefetch' ) ) ) {
+                               $parsed = wp_parse_url( $url );
+                               if ( empty( $parsed['host'] ) ) {
+                                       unset( $urls[ $key ] );
+                                       continue;
+                               }
+
+                               if ( 'preconnect' === $relation_type && ! empty( $parsed['scheme'] ) ) {
+                                       $url = $parsed['scheme'] . '://' . $parsed['host'];
+                               } else {
+                                       // Use protocol-relative URLs for dns-prefetch or if scheme is missing.
+                                       $url = '//' . $parsed['host'];
+                               }
+                       }
+
+                       $urls[ $key ] = $url;
+               }
+
+               $urls = array_unique( $urls );
+
+               foreach ( $urls as $url ) {
+                       printf( "<link rel='%s' href='%s'>\n", $relation_type, $url );
+               }
+       }
+}
+
+/**
+ * Retrieves a list of unique hosts of all enqueued scripts and styles.
+ *
+ * @since 4.6.0
+ *
+ * @return array A list of unique hosts of enqueued scripts and styles.
+ */
+function wp_dependencies_unique_hosts() {
+       global $wp_scripts, $wp_styles;
+
+       $unique_hosts = array();
+
+       foreach ( array( $wp_scripts, $wp_styles ) as $dependencies ) {
+               if ( $dependencies instanceof WP_Dependencies && ! empty( $dependencies->queue ) ) {
+                       foreach ( $dependencies->queue as $handle ) {
+                               if ( ! isset( $dependencies->registered[ $handle ] ) ) {
+                                       continue;
+                               }
+
+                               /* @var _WP_Dependency $dependency */
+                               $dependency = $dependencies->registered[ $handle ];
+                               $parsed     = wp_parse_url( $dependency->src );
+
+                               if ( ! empty( $parsed['host'] ) && ! in_array( $parsed['host'], $unique_hosts ) && $parsed['host'] !== $_SERVER['SERVER_NAME'] ) {
+                                       $unique_hosts[] = $parsed['host'];
+                               }
+                       }
+               }
+       }
+
+       return $unique_hosts;
+}
+
 /**
  * Whether the user should have a WYSIWIG editor.
  *
@@ -2787,7 +2924,7 @@ function user_can_richedit() {
        }
 
        /**
-        * Filter whether the user can access the rich (Visual) editor.
+        * Filters whether the user can access the rich (Visual) editor.
         *
         * @since 2.1.0
         *
@@ -2814,7 +2951,7 @@ function wp_default_editor() {
        }
 
        /**
-        * Filter which editor should be displayed by default.
+        * Filters which editor should be displayed by default.
         *
         * @since 2.5.0
         *
@@ -2830,7 +2967,7 @@ function wp_default_editor() {
  * _WP_Editors should not be used directly. See https://core.trac.wordpress.org/ticket/17144.
  *
  * NOTE: Once initialized the TinyMCE editor cannot be safely moved in the DOM. For that reason
- * running wp_editor() inside of a metabox is not a good idea unless only Quicktags is used.
+ * running wp_editor() inside of a meta box is not a good idea unless only Quicktags is used.
  * On the post edit screen several actions can be used to include additional editors
  * containing TinyMCE: 'edit_page_form', 'edit_form_advanced' and 'dbx_post_sidebar'.
  * See https://core.trac.wordpress.org/ticket/19173 for more information.
@@ -2850,10 +2987,10 @@ function wp_editor( $content, $editor_id, $settings = array() ) {
 }
 
 /**
- * Retrieve the contents of the search WordPress query variable.
+ * Retrieves the contents of the search WordPress query variable.
  *
- * The search query string is passed through {@link esc_attr()}
- * to ensure that it is safe for placing in an html attribute.
+ * The search query string is passed through esc_attr() to ensure that it is safe
+ * for placing in an html attribute.
  *
  * @since 2.3.0
  *
@@ -2863,7 +3000,7 @@ function wp_editor( $content, $editor_id, $settings = array() ) {
  */
 function get_search_query( $escaped = true ) {
        /**
-        * Filter the contents of the search query variable.
+        * Filters the contents of the search query variable.
         *
         * @since 2.3.0
         *
@@ -2877,16 +3014,16 @@ function get_search_query( $escaped = true ) {
 }
 
 /**
- * Display the contents of the search query variable.
+ * Displays the contents of the search query variable.
  *
- * The search query string is passed through {@link esc_attr()}
- * to ensure that it is safe for placing in an html attribute.
+ * The search query string is passed through esc_attr() to ensure that it is safe
+ * for placing in an html attribute.
  *
  * @since 2.1.0
  */
 function the_search_query() {
        /**
-        * Filter the contents of the search query variable for display.
+        * Filters the contents of the search query variable for display.
         *
         * @since 2.3.0
         *
@@ -2922,7 +3059,7 @@ function get_language_attributes( $doctype = 'html' ) {
        $output = implode(' ', $attributes);
 
        /**
-        * Filter the language attributes for display in the html tag.
+        * Filters the language attributes for display in the html tag.
         *
         * @since 2.5.0
         * @since 4.3.0 Added the `$doctype` parameter.
@@ -2986,7 +3123,7 @@ function language_attributes( $doctype = 'html' ) {
  * numbers to either side of current page, but not including current page.
  *
  * It is possible to add query vars to the link by using the 'add_args' argument
- * and see {@link add_query_arg()} for more information.
+ * and see add_query_arg() for more information.
  *
  * The 'before_page_number' and 'after_page_number' arguments allow users to
  * augment the links themselves. Typically this might be to add context to the
@@ -3110,7 +3247,7 @@ function paginate_links( $args = '' ) {
                $link .= $args['add_fragment'];
 
                /**
-                * Filter the paginated links for the given archive pages.
+                * Filters the paginated links for the given archive pages.
                 *
                 * @since 3.0.0
                 *
@@ -3272,9 +3409,9 @@ function register_admin_color_schemes() {
 }
 
 /**
- * Display the URL of a WordPress admin CSS file.
+ * Displays the URL of a WordPress admin CSS file.
  *
- * @see WP_Styles::_css_href and its style_loader_src filter.
+ * @see WP_Styles::_css_href and its {@see 'style_loader_src'} filter.
  *
  * @since 2.3.0
  *
@@ -3290,7 +3427,7 @@ function wp_admin_css_uri( $file = 'wp-admin' ) {
        $_file = add_query_arg( 'version', get_bloginfo( 'version' ),  $_file );
 
        /**
-        * Filter the URI of a WordPress admin CSS file.
+        * Filters the URI of a WordPress admin CSS file.
         *
         * @since 2.3.0
         *
@@ -3304,8 +3441,8 @@ function wp_admin_css_uri( $file = 'wp-admin' ) {
  * Enqueues or directly prints a stylesheet link to the specified CSS file.
  *
  * "Intelligently" decides to enqueue or to print the CSS file. If the
- * 'wp_print_styles' action has *not* yet been called, the CSS file will be
- * enqueued. If the wp_print_styles action *has* been called, the CSS link will
+ * {@see 'wp_print_styles'} action has *not* yet been called, the CSS file will be
+ * enqueued. If the {@see 'wp_print_styles'} action has been called, the CSS link will
  * be printed. Printing may be forced by passing true as the $force_echo
  * (second) parameter.
  *
@@ -3333,7 +3470,7 @@ function wp_admin_css( $file = 'wp-admin', $force_echo = false ) {
        }
 
        /**
-        * Filter the stylesheet link to the specified CSS file.
+        * Filters the stylesheet link to the specified CSS file.
         *
         * If the site is set to display right-to-left, the RTL stylesheet link
         * will be used instead.
@@ -3369,13 +3506,15 @@ function add_thickbox() {
 }
 
 /**
- * Display the XHTML generator that is generated on the wp_head hook.
+ * Displays the XHTML generator that is generated on the wp_head hook.
+ *
+ * See {@see 'wp_head'}.
  *
  * @since 2.5.0
  */
 function wp_generator() {
        /**
-        * Filter the output of the XHTML generator tag.
+        * Filters the output of the XHTML generator tag.
         *
         * @since 2.5.0
         *
@@ -3388,7 +3527,7 @@ function wp_generator() {
  * Display the generator XML or Comment for RSS, ATOM, etc.
  *
  * Returns the correct generator type for the requested output format. Allows
- * for a plugin to filter generators overall the the_generator filter.
+ * for a plugin to filter generators overall the {@see 'the_generator'} filter.
  *
  * @since 2.5.0
  *
@@ -3396,7 +3535,7 @@ function wp_generator() {
  */
 function the_generator( $type ) {
        /**
-        * Filter the output of the XHTML generator tag for display.
+        * Filters the output of the XHTML generator tag for display.
         *
         * @since 2.5.0
         *
@@ -3412,7 +3551,7 @@ function the_generator( $type ) {
  *
  * Returns the correct generator type for the requested output format. Allows
  * for a plugin to filter generators on an individual basis using the
- * 'get_the_generator_{$type}' filter.
+ * {@see 'get_the_generator_$type'} filter.
  *
  * @since 2.5.0
  *
@@ -3471,13 +3610,13 @@ function get_the_generator( $type = '' ) {
        }
 
        /**
-        * Filter the HTML for the retrieved generator type.
+        * Filters the HTML for the retrieved generator type.
         *
         * The dynamic portion of the hook name, `$type`, refers to the generator type.
         *
         * @since 2.5.0
         *
-        * @param string $gen  The HTML markup output to {@see wp_head()}.
+        * @param string $gen  The HTML markup output to wp_head().
         * @param string $type The type of generator. Accepts 'html', 'xhtml', 'atom',
         *                     'rss2', 'rdf', 'comment', 'export'.
         */
index dc750371ac8ce7ee3ff275c02e7604e09091c8d6..130eae3c37ccbd8b167afd021683cf3e14e37d58 100644 (file)
@@ -213,8 +213,9 @@ function wp_remote_head($url, $args = array()) {
  * @return array The headers of the response. Empty array if incorrect parameter given.
  */
 function wp_remote_retrieve_headers( $response ) {
-       if ( is_wp_error($response) || ! isset($response['headers']) || ! is_array($response['headers']))
+       if ( is_wp_error( $response ) || ! isset( $response['headers'] ) ) {
                return array();
+       }
 
        return $response['headers'];
 }
@@ -229,11 +230,13 @@ function wp_remote_retrieve_headers( $response ) {
  * @return string The header value. Empty string on if incorrect parameter given, or if the header doesn't exist.
  */
 function wp_remote_retrieve_header( $response, $header ) {
-       if ( is_wp_error($response) || ! isset($response['headers']) || ! is_array($response['headers']))
+       if ( is_wp_error( $response ) || ! isset( $response['headers'] ) ) {
                return '';
+       }
 
-       if ( array_key_exists($header, $response['headers']) )
+       if ( isset( $response['headers'][ $header ] ) ) {
                return $response['headers'][$header];
+       }
 
        return '';
 }
@@ -578,7 +581,7 @@ function wp_http_validate_url( $url ) {
 /**
  * Whitelists allowed redirect hosts for safe HTTP requests as well.
  *
- * Attached to the http_request_host_is_external filter.
+ * Attached to the {@see 'http_request_host_is_external'} filter.
  *
  * @since 3.6.0
  *
@@ -595,7 +598,7 @@ function allowed_http_request_hosts( $is_external, $host ) {
 /**
  * Whitelists any domain in a multisite installation for safe HTTP requests.
  *
- * Attached to the http_request_host_is_external filter.
+ * Attached to the {@see 'http_request_host_is_external'} filter.
  *
  * @since 3.6.0
  *
index 94179555c6611093abdce17f380ad74cb0cb6c06..b6ef4c1d7d33520b134ec640e2e0b183b8800748 100644 (file)
@@ -1 +1 @@
-"undefined"!=typeof jQuery?("undefined"==typeof jQuery.fn.hoverIntent&&!function(a){a.fn.hoverIntent=function(b,c,d){var e={interval:100,sensitivity:6,timeout:0};e="object"==typeof b?a.extend(e,b):a.isFunction(c)?a.extend(e,{over:b,out:c,selector:d}):a.extend(e,{over:b,out:b,selector:c});var f,g,h,i,j=function(a){f=a.pageX,g=a.pageY},k=function(b,c){return c.hoverIntent_t=clearTimeout(c.hoverIntent_t),Math.sqrt((h-f)*(h-f)+(i-g)*(i-g))<e.sensitivity?(a(c).off("mousemove.hoverIntent",j),c.hoverIntent_s=!0,e.over.apply(c,[b])):(h=f,i=g,void(c.hoverIntent_t=setTimeout(function(){k(b,c)},e.interval)))},l=function(a,b){return b.hoverIntent_t=clearTimeout(b.hoverIntent_t),b.hoverIntent_s=!1,e.out.apply(b,[a])},m=function(b){var c=a.extend({},b),d=this;d.hoverIntent_t&&(d.hoverIntent_t=clearTimeout(d.hoverIntent_t)),"mouseenter"===b.type?(h=c.pageX,i=c.pageY,a(d).on("mousemove.hoverIntent",j),d.hoverIntent_s||(d.hoverIntent_t=setTimeout(function(){k(c,d)},e.interval))):(a(d).off("mousemove.hoverIntent",j),d.hoverIntent_s&&(d.hoverIntent_t=setTimeout(function(){l(c,d)},e.timeout)))};return this.on({"mouseenter.hoverIntent":m,"mouseleave.hoverIntent":m},e.selector)}}(jQuery),jQuery(document).ready(function(a){var b,c,d,e=a("#wpadminbar"),f=!1;b=function(b,c){var d=a(c),e=d.attr("tabindex");e&&d.attr("tabindex","0").attr("tabindex",e)},c=function(b){e.find("li.menupop").on("click.wp-mobile-hover",function(c){var d=a(this);d.parent().is("#wp-admin-bar-root-default")&&!d.hasClass("hover")?(c.preventDefault(),e.find("li.menupop.hover").removeClass("hover"),d.addClass("hover")):d.hasClass("hover")?a(c.target).closest("div").hasClass("ab-sub-wrapper")||(c.stopPropagation(),c.preventDefault(),d.removeClass("hover")):(c.stopPropagation(),c.preventDefault(),d.addClass("hover")),b&&(a("li.menupop").off("click.wp-mobile-hover"),f=!1)})},d=function(){var b=/Mobile\/.+Safari/.test(navigator.userAgent)?"touchstart":"click";a(document.body).on(b+".wp-mobile-hover",function(b){a(b.target).closest("#wpadminbar").length||e.find("li.menupop.hover").removeClass("hover")})},e.removeClass("nojq").removeClass("nojs"),"ontouchstart"in window?(e.on("touchstart",function(){c(!0),f=!0}),d()):/IEMobile\/[1-9]/.test(navigator.userAgent)&&(c(),d()),e.find("li.menupop").hoverIntent({over:function(){f||a(this).addClass("hover")},out:function(){f||a(this).removeClass("hover")},timeout:180,sensitivity:7,interval:100}),window.location.hash&&window.scrollBy(0,-32),a("#wp-admin-bar-get-shortlink").click(function(b){b.preventDefault(),a(this).addClass("selected").children(".shortlink-input").blur(function(){a(this).parents("#wp-admin-bar-get-shortlink").removeClass("selected")}).focus().select()}),a("#wpadminbar li.menupop > .ab-item").bind("keydown.adminbar",function(c){if(13==c.which){var d=a(c.target),e=d.closest(".ab-sub-wrapper"),f=d.parent().hasClass("hover");c.stopPropagation(),c.preventDefault(),e.length||(e=a("#wpadminbar .quicklinks")),e.find(".menupop").removeClass("hover"),f||d.parent().toggleClass("hover"),d.siblings(".ab-sub-wrapper").find(".ab-item").each(b)}}).each(b),a("#wpadminbar .ab-item").bind("keydown.adminbar",function(c){if(27==c.which){var d=a(c.target);c.stopPropagation(),c.preventDefault(),d.closest(".hover").removeClass("hover").children(".ab-item").focus(),d.siblings(".ab-sub-wrapper").find(".ab-item").each(b)}}),e.click(function(b){("wpadminbar"==b.target.id||"wp-admin-bar-top-secondary"==b.target.id)&&(e.find("li.menupop.hover").removeClass("hover"),a("html, body").animate({scrollTop:0},"fast"),b.preventDefault())}),a(".screen-reader-shortcut").keydown(function(b){var c,d;13==b.which&&(c=a(this).attr("href"),d=navigator.userAgent.toLowerCase(),-1!=d.indexOf("applewebkit")&&c&&"#"==c.charAt(0)&&setTimeout(function(){a(c).focus()},100))}),a("#adminbar-search").on({focus:function(){a("#adminbarsearch").addClass("adminbar-focused")},blur:function(){a("#adminbarsearch").removeClass("adminbar-focused")}}),"sessionStorage"in window&&a("#wp-admin-bar-logout a").click(function(){try{for(var a in sessionStorage)-1!=a.indexOf("wp-autosave-")&&sessionStorage.removeItem(a)}catch(b){}}),navigator.userAgent&&-1===document.body.className.indexOf("no-font-face")&&/Android (1.0|1.1|1.5|1.6|2.0|2.1)|Nokia|Opera Mini|w(eb)?OSBrowser|webOS|UCWEB|Windows Phone OS 7|XBLWP7|ZuneWP7|MSIE 7/.test(navigator.userAgent)&&(document.body.className+=" no-font-face")})):!function(a,b){var c,d=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,function(){return c.call(a,window.event)})},e=new RegExp("\\bhover\\b","g"),f=[],g=new RegExp("\\bselected\\b","g"),h=function(a){for(var b=f.length;b--;)if(f[b]&&a==f[b][1])return f[b][0];return!1},i=function(b){for(var d,i,j,k,l,m,n=[],o=0;b&&b!=c&&b!=a;)"LI"==b.nodeName.toUpperCase()&&(n[n.length]=b,i=h(b),i&&clearTimeout(i),b.className=b.className?b.className.replace(e,"")+" hover":"hover",k=b),b=b.parentNode;if(k&&k.parentNode&&(l=k.parentNode,l&&"UL"==l.nodeName.toUpperCase()))for(d=l.childNodes.length;d--;)m=l.childNodes[d],m!=k&&(m.className=m.className?m.className.replace(g,""):"");for(d=f.length;d--;){for(j=!1,o=n.length;o--;)n[o]==f[d][1]&&(j=!0);j||(f[d][1].className=f[d][1].className?f[d][1].className.replace(e,""):"")}},j=function(b){for(;b&&b!=c&&b!=a;)"LI"==b.nodeName.toUpperCase()&&!function(a){var b=setTimeout(function(){a.className=a.className?a.className.replace(e,""):""},500);f[f.length]=[b,a]}(b),b=b.parentNode},k=function(b){for(var d,e,f,h=b.target||b.srcElement;;){if(!h||h==a||h==c)return;if(h.id&&"wp-admin-bar-get-shortlink"==h.id)break;h=h.parentNode}for(b.preventDefault&&b.preventDefault(),b.returnValue=!1,-1==h.className.indexOf("selected")&&(h.className+=" selected"),d=0,e=h.childNodes.length;e>d;d++)if(f=h.childNodes[d],f.className&&-1!=f.className.indexOf("shortlink-input")){f.focus(),f.select(),f.onblur=function(){h.className=h.className?h.className.replace(g,""):""};break}return!1},l=function(a){var b,c,d,e,f,g;if(!("wpadminbar"!=a.id&&"wp-admin-bar-top-secondary"!=a.id||(b=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,1>b)))for(g=b>800?130:100,c=Math.min(12,Math.round(b/g)),d=b>800?Math.round(b/30):Math.round(b/20),e=[],f=0;b;)b-=d,0>b&&(b=0),e.push(b),setTimeout(function(){window.scrollTo(0,e.shift())},f*c),f++};d(b,"load",function(){c=a.getElementById("wpadminbar"),a.body&&c&&(a.body.appendChild(c),c.className&&(c.className=c.className.replace(/nojs/,"")),d(c,"mouseover",function(a){i(a.target||a.srcElement)}),d(c,"mouseout",function(a){j(a.target||a.srcElement)}),d(c,"click",k),d(c,"click",function(a){l(a.target||a.srcElement)}),d(document.getElementById("wp-admin-bar-logout"),"click",function(){if("sessionStorage"in window)try{for(var a in sessionStorage)-1!=a.indexOf("wp-autosave-")&&sessionStorage.removeItem(a)}catch(b){}})),b.location.hash&&b.scrollBy(0,-32),navigator.userAgent&&-1===document.body.className.indexOf("no-font-face")&&/Android (1.0|1.1|1.5|1.6|2.0|2.1)|Nokia|Opera Mini|w(eb)?OSBrowser|webOS|UCWEB|Windows Phone OS 7|XBLWP7|ZuneWP7|MSIE 7/.test(navigator.userAgent)&&(document.body.className+=" no-font-face")})}(document,window);
\ No newline at end of file
+"undefined"!=typeof jQuery?("undefined"==typeof jQuery.fn.hoverIntent&&!function(a){a.fn.hoverIntent=function(b,c,d){var e={interval:100,sensitivity:6,timeout:0};e="object"==typeof b?a.extend(e,b):a.isFunction(c)?a.extend(e,{over:b,out:c,selector:d}):a.extend(e,{over:b,out:b,selector:c});var f,g,h,i,j=function(a){f=a.pageX,g=a.pageY},k=function(b,c){return c.hoverIntent_t=clearTimeout(c.hoverIntent_t),Math.sqrt((h-f)*(h-f)+(i-g)*(i-g))<e.sensitivity?(a(c).off("mousemove.hoverIntent",j),c.hoverIntent_s=!0,e.over.apply(c,[b])):(h=f,i=g,void(c.hoverIntent_t=setTimeout(function(){k(b,c)},e.interval)))},l=function(a,b){return b.hoverIntent_t=clearTimeout(b.hoverIntent_t),b.hoverIntent_s=!1,e.out.apply(b,[a])},m=function(b){var c=a.extend({},b),d=this;d.hoverIntent_t&&(d.hoverIntent_t=clearTimeout(d.hoverIntent_t)),"mouseenter"===b.type?(h=c.pageX,i=c.pageY,a(d).on("mousemove.hoverIntent",j),d.hoverIntent_s||(d.hoverIntent_t=setTimeout(function(){k(c,d)},e.interval))):(a(d).off("mousemove.hoverIntent",j),d.hoverIntent_s&&(d.hoverIntent_t=setTimeout(function(){l(c,d)},e.timeout)))};return this.on({"mouseenter.hoverIntent":m,"mouseleave.hoverIntent":m},e.selector)}}(jQuery),jQuery(document).ready(function(a){var b,c,d,e=a("#wpadminbar"),f=!1;b=function(b,c){var d=a(c),e=d.attr("tabindex");e&&d.attr("tabindex","0").attr("tabindex",e)},c=function(b){e.find("li.menupop").on("click.wp-mobile-hover",function(c){var d=a(this);d.parent().is("#wp-admin-bar-root-default")&&!d.hasClass("hover")?(c.preventDefault(),e.find("li.menupop.hover").removeClass("hover"),d.addClass("hover")):d.hasClass("hover")?a(c.target).closest("div").hasClass("ab-sub-wrapper")||(c.stopPropagation(),c.preventDefault(),d.removeClass("hover")):(c.stopPropagation(),c.preventDefault(),d.addClass("hover")),b&&(a("li.menupop").off("click.wp-mobile-hover"),f=!1)})},d=function(){var b=/Mobile\/.+Safari/.test(navigator.userAgent)?"touchstart":"click";a(document.body).on(b+".wp-mobile-hover",function(b){a(b.target).closest("#wpadminbar").length||e.find("li.menupop.hover").removeClass("hover")})},e.removeClass("nojq").removeClass("nojs"),"ontouchstart"in window?(e.on("touchstart",function(){c(!0),f=!0}),d()):/IEMobile\/[1-9]/.test(navigator.userAgent)&&(c(),d()),e.find("li.menupop").hoverIntent({over:function(){f||a(this).addClass("hover")},out:function(){f||a(this).removeClass("hover")},timeout:180,sensitivity:7,interval:100}),window.location.hash&&window.scrollBy(0,-32),a("#wp-admin-bar-get-shortlink").click(function(b){b.preventDefault(),a(this).addClass("selected").children(".shortlink-input").blur(function(){a(this).parents("#wp-admin-bar-get-shortlink").removeClass("selected")}).focus().select()}),a("#wpadminbar li.menupop > .ab-item").bind("keydown.adminbar",function(c){if(13==c.which){var d=a(c.target),e=d.closest(".ab-sub-wrapper"),f=d.parent().hasClass("hover");c.stopPropagation(),c.preventDefault(),e.length||(e=a("#wpadminbar .quicklinks")),e.find(".menupop").removeClass("hover"),f||d.parent().toggleClass("hover"),d.siblings(".ab-sub-wrapper").find(".ab-item").each(b)}}).each(b),a("#wpadminbar .ab-item").bind("keydown.adminbar",function(c){if(27==c.which){var d=a(c.target);c.stopPropagation(),c.preventDefault(),d.closest(".hover").removeClass("hover").children(".ab-item").focus(),d.siblings(".ab-sub-wrapper").find(".ab-item").each(b)}}),e.click(function(b){"wpadminbar"!=b.target.id&&"wp-admin-bar-top-secondary"!=b.target.id||(e.find("li.menupop.hover").removeClass("hover"),a("html, body").animate({scrollTop:0},"fast"),b.preventDefault())}),a(".screen-reader-shortcut").keydown(function(b){var c,d;13==b.which&&(c=a(this).attr("href"),d=navigator.userAgent.toLowerCase(),d.indexOf("applewebkit")!=-1&&c&&"#"==c.charAt(0)&&setTimeout(function(){a(c).focus()},100))}),a("#adminbar-search").on({focus:function(){a("#adminbarsearch").addClass("adminbar-focused")},blur:function(){a("#adminbarsearch").removeClass("adminbar-focused")}}),"sessionStorage"in window&&a("#wp-admin-bar-logout a").click(function(){try{for(var a in sessionStorage)a.indexOf("wp-autosave-")!=-1&&sessionStorage.removeItem(a)}catch(b){}}),navigator.userAgent&&document.body.className.indexOf("no-font-face")===-1&&/Android (1.0|1.1|1.5|1.6|2.0|2.1)|Nokia|Opera Mini|w(eb)?OSBrowser|webOS|UCWEB|Windows Phone OS 7|XBLWP7|ZuneWP7|MSIE 7/.test(navigator.userAgent)&&(document.body.className+=" no-font-face")})):!function(a,b){var c,d=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,function(){return c.call(a,window.event)})},e=new RegExp("\\bhover\\b","g"),f=[],g=new RegExp("\\bselected\\b","g"),h=function(a){for(var b=f.length;b--;)if(f[b]&&a==f[b][1])return f[b][0];return!1},i=function(b){for(var d,i,j,k,l,m,n=[],o=0;b&&b!=c&&b!=a;)"LI"==b.nodeName.toUpperCase()&&(n[n.length]=b,i=h(b),i&&clearTimeout(i),b.className=b.className?b.className.replace(e,"")+" hover":"hover",k=b),b=b.parentNode;if(k&&k.parentNode&&(l=k.parentNode,l&&"UL"==l.nodeName.toUpperCase()))for(d=l.childNodes.length;d--;)m=l.childNodes[d],m!=k&&(m.className=m.className?m.className.replace(g,""):"");for(d=f.length;d--;){for(j=!1,o=n.length;o--;)n[o]==f[d][1]&&(j=!0);j||(f[d][1].className=f[d][1].className?f[d][1].className.replace(e,""):"")}},j=function(b){for(;b&&b!=c&&b!=a;)"LI"==b.nodeName.toUpperCase()&&!function(a){var b=setTimeout(function(){a.className=a.className?a.className.replace(e,""):""},500);f[f.length]=[b,a]}(b),b=b.parentNode},k=function(b){for(var d,e,f,h=b.target||b.srcElement;;){if(!h||h==a||h==c)return;if(h.id&&"wp-admin-bar-get-shortlink"==h.id)break;h=h.parentNode}for(b.preventDefault&&b.preventDefault(),b.returnValue=!1,-1==h.className.indexOf("selected")&&(h.className+=" selected"),d=0,e=h.childNodes.length;d<e;d++)if(f=h.childNodes[d],f.className&&-1!=f.className.indexOf("shortlink-input")){f.focus(),f.select(),f.onblur=function(){h.className=h.className?h.className.replace(g,""):""};break}return!1},l=function(a){var b,c,d,e,f,g;if(!("wpadminbar"!=a.id&&"wp-admin-bar-top-secondary"!=a.id||(b=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,b<1)))for(g=b>800?130:100,c=Math.min(12,Math.round(b/g)),d=b>800?Math.round(b/30):Math.round(b/20),e=[],f=0;b;)b-=d,b<0&&(b=0),e.push(b),setTimeout(function(){window.scrollTo(0,e.shift())},f*c),f++};d(b,"load",function(){c=a.getElementById("wpadminbar"),a.body&&c&&(a.body.appendChild(c),c.className&&(c.className=c.className.replace(/nojs/,"")),d(c,"mouseover",function(a){i(a.target||a.srcElement)}),d(c,"mouseout",function(a){j(a.target||a.srcElement)}),d(c,"click",k),d(c,"click",function(a){l(a.target||a.srcElement)}),d(document.getElementById("wp-admin-bar-logout"),"click",function(){if("sessionStorage"in window)try{for(var a in sessionStorage)a.indexOf("wp-autosave-")!=-1&&sessionStorage.removeItem(a)}catch(b){}})),b.location.hash&&b.scrollBy(0,-32),navigator.userAgent&&document.body.className.indexOf("no-font-face")===-1&&/Android (1.0|1.1|1.5|1.6|2.0|2.1)|Nokia|Opera Mini|w(eb)?OSBrowser|webOS|UCWEB|Windows Phone OS 7|XBLWP7|ZuneWP7|MSIE 7/.test(navigator.userAgent)&&(document.body.className+=" no-font-face")})}(document,window);
\ No newline at end of file
index 85d5f841931ff610f7bfcdfcdf87dc923e10c234..b5a8c6c0e66f7a8fa7ff25a350b23aaa3f82df49 100644 (file)
@@ -7,8 +7,8 @@ window.autosave = function() {
 ( function( $, window ) {
        function autosave() {
                var initialCompareString,
-               lastTriggerSave = 0,
-               $document = $(document);
+                       lastTriggerSave = 0,
+                       $document = $(document);
 
                /**
                 * Returns the data saved in both local and remote autosave
@@ -19,11 +19,11 @@ window.autosave = function() {
                        var post_name, parent_id, data,
                                time = ( new Date() ).getTime(),
                                cats = [],
-                               editor = typeof tinymce !== 'undefined' && tinymce.get('content');
+                               editor = getEditor();
 
                        // Don't run editor.save() more often than every 3 sec.
                        // It is resource intensive and might slow down typing in long posts on slow devices.
-                       if ( editor && ! editor.isHidden() && time - 3000 > lastTriggerSave ) {
+                       if ( editor && editor.isDirty() && ! editor.isHidden() && time - 3000 > lastTriggerSave ) {
                                editor.save();
                                lastTriggerSave = time;
                        }
@@ -88,9 +88,13 @@ window.autosave = function() {
                        $document.trigger( 'autosave-enable-buttons' );
                }
 
+               function getEditor() {
+                       return typeof tinymce !== 'undefined' && tinymce.get('content');
+               }
+
                // Autosave in localStorage
                function autosaveLocal() {
-                       var restorePostData, undoPostData, blog_id, post_id, hasStorage, intervalTimer,
+                       var blog_id, post_id, hasStorage, intervalTimer,
                                lastCompareString,
                                isSuspended = false;
 
@@ -266,7 +270,7 @@ window.autosave = function() {
                                intervalTimer = window.setInterval( save, 15000 );
 
                                $( 'form#post' ).on( 'submit.autosave-local', function() {
-                                       var editor = typeof tinymce !== 'undefined' && tinymce.get('content'),
+                                       var editor = getEditor(),
                                                post_id = $('#post_ID').val() || 0;
 
                                        if ( editor && ! editor.isHidden() ) {
@@ -310,7 +314,8 @@ window.autosave = function() {
                        function checkPost() {
                                var content, post_title, excerpt, $notice,
                                        postData = getSavedPostData(),
-                                       cookie = wpCookies.get( 'wp-saving-post' );
+                                       cookie = wpCookies.get( 'wp-saving-post' ),
+                                       $newerAutosaveNotice = $( '#has-newer-autosave' ).parent( '.notice' );
 
                                if ( cookie === post_id + '-saved' ) {
                                        wpCookies.remove( 'wp-saving-post' );
@@ -323,11 +328,6 @@ window.autosave = function() {
                                        return;
                                }
 
-                               // There is a newer autosave. Don't show two "restore" notices at the same time.
-                               if ( $( '#has-newer-autosave' ).length ) {
-                                       return;
-                               }
-
                                content = $( '#content' ).val() || '';
                                post_title = $( '#title' ).val() || '';
                                excerpt = $( '#excerpt' ).val() || '';
@@ -338,34 +338,25 @@ window.autosave = function() {
                                        return;
                                }
 
-                               restorePostData = postData;
-                               undoPostData = {
-                                       content: content,
-                                       post_title: post_title,
-                                       excerpt: excerpt
-                               };
-
                                $notice = $( '#local-storage-notice' )
                                        .insertAfter( $( '.wrap h1, .wrap h2' ).first() )
-                                       .addClass( 'notice-warning' )
-                                       .show();
-
-                               $notice.on( 'click.autosave-local', function( event ) {
-                                       var $target = $( event.target );
-
-                                       if ( $target.hasClass( 'restore-backup' ) ) {
-                                               restorePost( restorePostData );
-                                               $target.parent().hide();
-                                               $(this).find( 'p.undo-restore' ).show();
-                                               $notice.removeClass( 'notice-warning' ).addClass( 'notice-success' );
-                                       } else if ( $target.hasClass( 'undo-restore-backup' ) ) {
-                                               restorePost( undoPostData );
-                                               $target.parent().hide();
-                                               $(this).find( 'p.local-restore' ).show();
-                                               $notice.removeClass( 'notice-success' ).addClass( 'notice-warning' );
-                                       }
+                                       .addClass( 'notice-warning' );
 
-                                       event.preventDefault();
+                               if ( $newerAutosaveNotice.length ) {
+                                       // If there is a "server" autosave notice, hide it.
+                                       // The data in the session storage is either the same or newer.
+                                       $newerAutosaveNotice.slideUp( 150, function() {
+                                               $notice.slideDown( 150 );
+                                       });
+                               } else {
+                                       $notice.slideDown( 200 );
+                               }
+
+                               $notice.find( '.restore-backup' ).on( 'click.autosave-local', function() {
+                                       restorePost( postData );
+                                       $notice.fadeTo( 250, 0, function() {
+                                               $notice.slideUp( 150 );
+                                       });
                                });
                        }
 
@@ -382,16 +373,25 @@ window.autosave = function() {
                                        }
 
                                        $( '#excerpt' ).val( postData.excerpt || '' );
-                                       editor = typeof tinymce !== 'undefined' && tinymce.get('content');
+                                       editor = getEditor();
 
                                        if ( editor && ! editor.isHidden() && typeof switchEditors !== 'undefined' ) {
+                                               if ( editor.settings.wpautop && postData.content ) {
+                                                       postData.content = switchEditors.wpautop( postData.content );
+                                               }
+
                                                // Make sure there's an undo level in the editor
-                                               editor.undoManager.add();
-                                               editor.setContent( postData.content ? switchEditors.wpautop( postData.content ) : '' );
+                                               editor.undoManager.transact( function() {
+                                                       editor.setContent( postData.content || '' );
+                                                       editor.nodeChanged();
+                                               });
                                        } else {
                                                // Make sure the Text editor is selected
                                                $( '#content-html' ).click();
-                                               $( '#content' ).val( postData.content );
+                                               $( '#content' ).focus();
+                                               // Using document.execCommand() will let the user undo.
+                                               document.execCommand( 'selectAll' );
+                                               document.execCommand( 'insertText', false, postData.content || '' );
                                        }
 
                                        return true;
index 30e2ff7a4e6bdc344fab01fa3399711695b8b76e..f4a01657e1dc9b114c8c9e3742b62d5138b75883 100644 (file)
@@ -1 +1 @@
-window.autosave=function(){return!0},function(a,b){function c(){function c(b){var c,d,e,f=(new Date).getTime(),g=[],h="undefined"!=typeof tinymce&&tinymce.get("content");return h&&!h.isHidden()&&f-3e3>j&&(h.save(),j=f),e={post_id:a("#post_ID").val()||0,post_type:a("#post_type").val()||"",post_author:a("#post_author").val()||"",post_title:a("#title").val()||"",content:a("#content").val()||"",excerpt:a("#excerpt").val()||""},"local"===b?e:(a('input[id^="in-category-"]:checked').each(function(){g.push(this.value)}),e.catslist=g.join(","),(c=a("#post_name").val())&&(e.post_name=c),(d=a("#parent_id").val())&&(e.parent_id=d),a("#comment_status").prop("checked")&&(e.comment_status="open"),a("#ping_status").prop("checked")&&(e.ping_status="open"),"1"===a("#auto_draft").val()&&(e.auto_draft="1"),e)}function d(b){return"object"==typeof b?(b.post_title||"")+"::"+(b.content||"")+"::"+(b.excerpt||""):(a("#title").val()||"")+"::"+(a("#content").val()||"")+"::"+(a("#excerpt").val()||"")}function e(){k.trigger("autosave-disable-buttons"),setTimeout(f,5e3)}function f(){k.trigger("autosave-enable-buttons")}function g(){function e(){var a=Math.random().toString(),c=!1;try{b.sessionStorage.setItem("wp-test",a),c=b.sessionStorage.getItem("wp-test")===a,b.sessionStorage.removeItem("wp-test")}catch(d){}return w=c,c}function f(){var a=!1;return w&&u&&(a=sessionStorage.getItem("wp-autosave-"+u),a=a?JSON.parse(a):{}),a}function g(a){var b;return w&&u?(b="wp-autosave-"+u,sessionStorage.setItem(b,JSON.stringify(a)),null!==sessionStorage.getItem(b)):!1}function h(){var a=f();return a&&v?a["post_"+v]||!1:!1}function j(a){var b=f();if(!b||!v)return!1;if(a)b["post_"+v]=a;else{if(!b.hasOwnProperty("post_"+v))return!1;delete b["post_"+v]}return g(b)}function l(){z=!0}function m(){z=!1}function n(b){var e,f,g=!1;return z||!w?!1:(b?(e=h()||{},a.extend(e,b)):e=c("local"),f=d(e),"undefined"==typeof y&&(y=i),f===y?!1:(e.save_time=(new Date).getTime(),e.status=a("#post_status").val()||"",g=j(e),g&&(y=f),g))}function o(){v=a("#post_ID").val()||0,a("#wp-content-wrap").hasClass("tmce-active")?k.on("tinymce-editor-init.autosave",function(){b.setTimeout(function(){q()},1500)}):q(),x=b.setInterval(n,15e3),a("form#post").on("submit.autosave-local",function(){var c="undefined"!=typeof tinymce&&tinymce.get("content"),d=a("#post_ID").val()||0;c&&!c.isHidden()?c.on("submit",function(){n({post_title:a("#title").val()||"",content:a("#content").val()||"",excerpt:a("#excerpt").val()||""})}):n({post_title:a("#title").val()||"",content:a("#content").val()||"",excerpt:a("#excerpt").val()||""});var e="https:"===b.location.protocol;wpCookies.set("wp-saving-post",d+"-check",86400,!1,!1,e)})}function p(a,b){function c(a){return a.toString().replace(/[\x20\t\r\n\f]+/g,"")}return c(a||"")===c(b||"")}function q(){var b,c,d,e,f=h(),g=wpCookies.get("wp-saving-post");return g===v+"-saved"?(wpCookies.remove("wp-saving-post"),void j(!1)):void(f&&(a("#has-newer-autosave").length||(b=a("#content").val()||"",c=a("#title").val()||"",d=a("#excerpt").val()||"",p(b,f.content)&&p(c,f.post_title)&&p(d,f.excerpt)||(s=f,t={content:b,post_title:c,excerpt:d},e=a("#local-storage-notice").insertAfter(a(".wrap h1, .wrap h2").first()).addClass("notice-warning").show(),e.on("click.autosave-local",function(b){var c=a(b.target);c.hasClass("restore-backup")?(r(s),c.parent().hide(),a(this).find("p.undo-restore").show(),e.removeClass("notice-warning").addClass("notice-success")):c.hasClass("undo-restore-backup")&&(r(t),c.parent().hide(),a(this).find("p.local-restore").show(),e.removeClass("notice-success").addClass("notice-warning")),b.preventDefault()})))))}function r(b){var c;return b?(y=d(b),a("#title").val()!==b.post_title&&a("#title").focus().val(b.post_title||""),a("#excerpt").val(b.excerpt||""),c="undefined"!=typeof tinymce&&tinymce.get("content"),c&&!c.isHidden()&&"undefined"!=typeof switchEditors?(c.undoManager.add(),c.setContent(b.content?switchEditors.wpautop(b.content):"")):(a("#content-html").click(),a("#content").val(b.content)),!0):!1}var s,t,u,v,w,x,y,z=!1;return u="undefined"!=typeof b.autosaveL10n&&b.autosaveL10n.blog_id,e()&&u&&(a("#content").length||a("#excerpt").length)&&k.ready(o),{hasStorage:w,getSavedPostData:h,save:n,suspend:l,resume:m}}function h(){function g(){q=!0,b.clearTimeout(r),r=b.setTimeout(function(){q=!1},1e4)}function h(){v=!0}function j(){v=!1}function l(b){p(),q=!1,t=s,s="",k.trigger("after-autosave",[b]),f(),b.success&&a("#auto_draft").val("")}function m(){u=0,wp.heartbeat.connectNow()}function n(){return d()!==i}function o(){var f,h;return v||q||!b.autosave()?!1:(new Date).getTime()<u?!1:(f=c(),h=d(f),"undefined"==typeof t&&(t=i),h===t?!1:(s=h,g(),e(),k.trigger("wpcountwords",[f.content]).trigger("before-autosave",[f]),f._wpnonce=a("#_wpnonce").val()||"",f))}function p(){u=(new Date).getTime()+1e3*autosaveL10n.autosaveInterval||6e4}var q,r,s,t,u=0,v=!1;return k.on("heartbeat-send.autosave",function(a,b){var c=o();c&&(b.wp_autosave=c)}).on("heartbeat-tick.autosave",function(a,b){b.wp_autosave&&l(b.wp_autosave)}).on("heartbeat-connection-lost.autosave",function(b,c,d){if("timeout"===c||603===d){var f=a("#lost-connection-notice");wp.autosave.local.hasStorage||f.find(".hide-if-no-sessionstorage").hide(),f.show(),e()}}).on("heartbeat-connection-restored.autosave",function(){a("#lost-connection-notice").hide(),f()}).ready(function(){p()}),{tempBlockSave:g,triggerSave:m,postChanged:n,suspend:h,resume:j}}var i,j=0,k=a(document);return k.on("tinymce-editor-init.autosave",function(a,c){"content"===c.id&&b.setTimeout(function(){c.save(),i=d()},1e3)}).ready(function(){i=d()}),{getPostData:c,getCompareString:d,disableButtons:e,enableButtons:f,local:g(),server:h()}}b.wp=b.wp||{},b.wp.autosave=c()}(jQuery,window);
\ No newline at end of file
+window.autosave=function(){return!0},function(a,b){function c(){function c(b){var c,d,e,f=(new Date).getTime(),h=[],i=g();return i&&i.isDirty()&&!i.isHidden()&&f-3e3>k&&(i.save(),k=f),e={post_id:a("#post_ID").val()||0,post_type:a("#post_type").val()||"",post_author:a("#post_author").val()||"",post_title:a("#title").val()||"",content:a("#content").val()||"",excerpt:a("#excerpt").val()||""},"local"===b?e:(a('input[id^="in-category-"]:checked').each(function(){h.push(this.value)}),e.catslist=h.join(","),(c=a("#post_name").val())&&(e.post_name=c),(d=a("#parent_id").val())&&(e.parent_id=d),a("#comment_status").prop("checked")&&(e.comment_status="open"),a("#ping_status").prop("checked")&&(e.ping_status="open"),"1"===a("#auto_draft").val()&&(e.auto_draft="1"),e)}function d(b){return"object"==typeof b?(b.post_title||"")+"::"+(b.content||"")+"::"+(b.excerpt||""):(a("#title").val()||"")+"::"+(a("#content").val()||"")+"::"+(a("#excerpt").val()||"")}function e(){l.trigger("autosave-disable-buttons"),setTimeout(f,5e3)}function f(){l.trigger("autosave-enable-buttons")}function g(){return"undefined"!=typeof tinymce&&tinymce.get("content")}function h(){function e(){var a=Math.random().toString(),c=!1;try{b.sessionStorage.setItem("wp-test",a),c=b.sessionStorage.getItem("wp-test")===a,b.sessionStorage.removeItem("wp-test")}catch(d){}return v=c,c}function f(){var a=!1;return v&&t&&(a=sessionStorage.getItem("wp-autosave-"+t),a=a?JSON.parse(a):{}),a}function h(a){var b;return!(!v||!t)&&(b="wp-autosave-"+t,sessionStorage.setItem(b,JSON.stringify(a)),null!==sessionStorage.getItem(b))}function i(){var a=f();return!(!a||!u)&&(a["post_"+u]||!1)}function k(a){var b=f();if(!b||!u)return!1;if(a)b["post_"+u]=a;else{if(!b.hasOwnProperty("post_"+u))return!1;delete b["post_"+u]}return h(b)}function m(){y=!0}function n(){y=!1}function o(b){var e,f,g=!1;return!(y||!v)&&(b?(e=i()||{},a.extend(e,b)):e=c("local"),f=d(e),"undefined"==typeof x&&(x=j),f!==x&&(e.save_time=(new Date).getTime(),e.status=a("#post_status").val()||"",g=k(e),g&&(x=f),g))}function p(){u=a("#post_ID").val()||0,a("#wp-content-wrap").hasClass("tmce-active")?l.on("tinymce-editor-init.autosave",function(){b.setTimeout(function(){r()},1500)}):r(),w=b.setInterval(o,15e3),a("form#post").on("submit.autosave-local",function(){var c=g(),d=a("#post_ID").val()||0;c&&!c.isHidden()?c.on("submit",function(){o({post_title:a("#title").val()||"",content:a("#content").val()||"",excerpt:a("#excerpt").val()||""})}):o({post_title:a("#title").val()||"",content:a("#content").val()||"",excerpt:a("#excerpt").val()||""});var e="https:"===b.location.protocol;wpCookies.set("wp-saving-post",d+"-check",86400,!1,!1,e)})}function q(a,b){function c(a){return a.toString().replace(/[\x20\t\r\n\f]+/g,"")}return c(a||"")===c(b||"")}function r(){var b,c,d,e,f=i(),g=wpCookies.get("wp-saving-post"),h=a("#has-newer-autosave").parent(".notice");return g===u+"-saved"?(wpCookies.remove("wp-saving-post"),void k(!1)):void(f&&(b=a("#content").val()||"",c=a("#title").val()||"",d=a("#excerpt").val()||"",q(b,f.content)&&q(c,f.post_title)&&q(d,f.excerpt)||(e=a("#local-storage-notice").insertAfter(a(".wrap h1, .wrap h2").first()).addClass("notice-warning"),h.length?h.slideUp(150,function(){e.slideDown(150)}):e.slideDown(200),e.find(".restore-backup").on("click.autosave-local",function(){s(f),e.fadeTo(250,0,function(){e.slideUp(150)})}))))}function s(b){var c;return!!b&&(x=d(b),a("#title").val()!==b.post_title&&a("#title").focus().val(b.post_title||""),a("#excerpt").val(b.excerpt||""),c=g(),c&&!c.isHidden()&&"undefined"!=typeof switchEditors?(c.settings.wpautop&&b.content&&(b.content=switchEditors.wpautop(b.content)),c.undoManager.transact(function(){c.setContent(b.content||""),c.nodeChanged()})):(a("#content-html").click(),a("#content").focus(),document.execCommand("selectAll"),document.execCommand("insertText",!1,b.content||"")),!0)}var t,u,v,w,x,y=!1;return t="undefined"!=typeof b.autosaveL10n&&b.autosaveL10n.blog_id,e()&&t&&(a("#content").length||a("#excerpt").length)&&l.ready(p),{hasStorage:v,getSavedPostData:i,save:o,suspend:m,resume:n}}function i(){function g(){q=!0,b.clearTimeout(r),r=b.setTimeout(function(){q=!1},1e4)}function h(){v=!0}function i(){v=!1}function k(b){p(),q=!1,t=s,s="",l.trigger("after-autosave",[b]),f(),b.success&&a("#auto_draft").val("")}function m(){u=0,wp.heartbeat.connectNow()}function n(){return d()!==j}function o(){var f,h;return!(v||q||!b.autosave())&&(!((new Date).getTime()<u)&&(f=c(),h=d(f),"undefined"==typeof t&&(t=j),h!==t&&(s=h,g(),e(),l.trigger("wpcountwords",[f.content]).trigger("before-autosave",[f]),f._wpnonce=a("#_wpnonce").val()||"",f)))}function p(){u=(new Date).getTime()+1e3*autosaveL10n.autosaveInterval||6e4}var q,r,s,t,u=0,v=!1;return l.on("heartbeat-send.autosave",function(a,b){var c=o();c&&(b.wp_autosave=c)}).on("heartbeat-tick.autosave",function(a,b){b.wp_autosave&&k(b.wp_autosave)}).on("heartbeat-connection-lost.autosave",function(b,c,d){if("timeout"===c||603===d){var f=a("#lost-connection-notice");wp.autosave.local.hasStorage||f.find(".hide-if-no-sessionstorage").hide(),f.show(),e()}}).on("heartbeat-connection-restored.autosave",function(){a("#lost-connection-notice").hide(),f()}).ready(function(){p()}),{tempBlockSave:g,triggerSave:m,postChanged:n,suspend:h,resume:i}}var j,k=0,l=a(document);return l.on("tinymce-editor-init.autosave",function(a,c){"content"===c.id&&b.setTimeout(function(){c.save(),j=d()},1e3)}).ready(function(){j=d()}),{getPostData:c,getCompareString:d,disableButtons:e,enableButtons:f,local:h(),server:i()}}b.wp=b.wp||{},b.wp.autosave=c()}(jQuery,window);
\ No newline at end of file
index a4b3975d39be24e455b7f59b759a5f234fbd9e89..19b8c90691f842eb844414c03dd3abfcc91a438e 100644 (file)
@@ -1 +1 @@
-(function(t){var e=typeof self=="object"&&self.self==self&&self||typeof global=="object"&&global.global==global&&global;if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,n){e.Backbone=t(e,n,i,r)})}else if(typeof exports!=="undefined"){var i=require("underscore"),r;try{r=require("jquery")}catch(n){}t(e,exports,i,r)}else{e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}})(function(t,e,i,r){var n=t.Backbone;var s=Array.prototype.slice;e.VERSION="1.2.3";e.$=r;e.noConflict=function(){t.Backbone=n;return this};e.emulateHTTP=false;e.emulateJSON=false;var a=function(t,e,r){switch(t){case 1:return function(){return i[e](this[r])};case 2:return function(t){return i[e](this[r],t)};case 3:return function(t,n){return i[e](this[r],h(t,this),n)};case 4:return function(t,n,s){return i[e](this[r],h(t,this),n,s)};default:return function(){var t=s.call(arguments);t.unshift(this[r]);return i[e].apply(i,t)}}};var o=function(t,e,r){i.each(e,function(e,n){if(i[n])t.prototype[n]=a(e,n,r)})};var h=function(t,e){if(i.isFunction(t))return t;if(i.isObject(t)&&!e._isModel(t))return u(t);if(i.isString(t))return function(e){return e.get(t)};return t};var u=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}};var l=e.Events={};var c=/\s+/;var f=function(t,e,r,n,s){var a=0,o;if(r&&typeof r==="object"){if(n!==void 0&&"context"in s&&s.context===void 0)s.context=n;for(o=i.keys(r);a<o.length;a++){e=f(t,e,o[a],r[o[a]],s)}}else if(r&&c.test(r)){for(o=r.split(c);a<o.length;a++){e=t(e,o[a],n,s)}}else{e=t(e,r,n,s)}return e};l.on=function(t,e,i){return d(this,t,e,i)};var d=function(t,e,i,r,n){t._events=f(v,t._events||{},e,i,{context:r,ctx:t,listening:n});if(n){var s=t._listeners||(t._listeners={});s[n.id]=n}return t};l.listenTo=function(t,e,r){if(!t)return this;var n=t._listenId||(t._listenId=i.uniqueId("l"));var s=this._listeningTo||(this._listeningTo={});var a=s[n];if(!a){var o=this._listenId||(this._listenId=i.uniqueId("l"));a=s[n]={obj:t,objId:n,id:o,listeningTo:s,count:0}}d(t,e,r,this,a);return this};var v=function(t,e,i,r){if(i){var n=t[e]||(t[e]=[]);var s=r.context,a=r.ctx,o=r.listening;if(o)o.count++;n.push({callback:i,context:s,ctx:s||a,listening:o})}return t};l.off=function(t,e,i){if(!this._events)return this;this._events=f(g,this._events,t,e,{context:i,listeners:this._listeners});return this};l.stopListening=function(t,e,r){var n=this._listeningTo;if(!n)return this;var s=t?[t._listenId]:i.keys(n);for(var a=0;a<s.length;a++){var o=n[s[a]];if(!o)break;o.obj.off(e,r,this)}if(i.isEmpty(n))this._listeningTo=void 0;return this};var g=function(t,e,r,n){if(!t)return;var s=0,a;var o=n.context,h=n.listeners;if(!e&&!r&&!o){var u=i.keys(h);for(;s<u.length;s++){a=h[u[s]];delete h[a.id];delete a.listeningTo[a.objId]}return}var l=e?[e]:i.keys(t);for(;s<l.length;s++){e=l[s];var c=t[e];if(!c)break;var f=[];for(var d=0;d<c.length;d++){var v=c[d];if(r&&r!==v.callback&&r!==v.callback._callback||o&&o!==v.context){f.push(v)}else{a=v.listening;if(a&&--a.count===0){delete h[a.id];delete a.listeningTo[a.objId]}}}if(f.length){t[e]=f}else{delete t[e]}}if(i.size(t))return t};l.once=function(t,e,r){var n=f(p,{},t,e,i.bind(this.off,this));return this.on(n,void 0,r)};l.listenToOnce=function(t,e,r){var n=f(p,{},e,r,i.bind(this.stopListening,this,t));return this.listenTo(t,n)};var p=function(t,e,r,n){if(r){var s=t[e]=i.once(function(){n(e,s);r.apply(this,arguments)});s._callback=r}return t};l.trigger=function(t){if(!this._events)return this;var e=Math.max(0,arguments.length-1);var i=Array(e);for(var r=0;r<e;r++)i[r]=arguments[r+1];f(m,this._events,t,void 0,i);return this};var m=function(t,e,i,r){if(t){var n=t[e];var s=t.all;if(n&&s)s=s.slice();if(n)_(n,r);if(s)_(s,[e].concat(r))}return t};var _=function(t,e){var i,r=-1,n=t.length,s=e[0],a=e[1],o=e[2];switch(e.length){case 0:while(++r<n)(i=t[r]).callback.call(i.ctx);return;case 1:while(++r<n)(i=t[r]).callback.call(i.ctx,s);return;case 2:while(++r<n)(i=t[r]).callback.call(i.ctx,s,a);return;case 3:while(++r<n)(i=t[r]).callback.call(i.ctx,s,a,o);return;default:while(++r<n)(i=t[r]).callback.apply(i.ctx,e);return}};l.bind=l.on;l.unbind=l.off;i.extend(e,l);var y=e.Model=function(t,e){var r=t||{};e||(e={});this.cid=i.uniqueId(this.cidPrefix);this.attributes={};if(e.collection)this.collection=e.collection;if(e.parse)r=this.parse(r,e)||{};r=i.defaults({},r,i.result(this,"defaults"));this.set(r,e);this.changed={};this.initialize.apply(this,arguments)};i.extend(y.prototype,l,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return this.get(t)!=null},matches:function(t){return!!i.iteratee(t,this)(this.attributes)},set:function(t,e,r){if(t==null)return this;var n;if(typeof t==="object"){n=t;r=e}else{(n={})[t]=e}r||(r={});if(!this._validate(n,r))return false;var s=r.unset;var a=r.silent;var o=[];var h=this._changing;this._changing=true;if(!h){this._previousAttributes=i.clone(this.attributes);this.changed={}}var u=this.attributes;var l=this.changed;var c=this._previousAttributes;for(var f in n){e=n[f];if(!i.isEqual(u[f],e))o.push(f);if(!i.isEqual(c[f],e)){l[f]=e}else{delete l[f]}s?delete u[f]:u[f]=e}this.id=this.get(this.idAttribute);if(!a){if(o.length)this._pending=r;for(var d=0;d<o.length;d++){this.trigger("change:"+o[d],this,u[o[d]],r)}}if(h)return this;if(!a){while(this._pending){r=this._pending;this._pending=false;this.trigger("change",this,r)}}this._pending=false;this._changing=false;return this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:true}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,i.extend({},t,{unset:true}))},hasChanged:function(t){if(t==null)return!i.isEmpty(this.changed);return i.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?i.clone(this.changed):false;var e=this._changing?this._previousAttributes:this.attributes;var r={};for(var n in t){var s=t[n];if(i.isEqual(e[n],s))continue;r[n]=s}return i.size(r)?r:false},previous:function(t){if(t==null||!this._previousAttributes)return null;return this._previousAttributes[t]},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=i.extend({parse:true},t);var e=this;var r=t.success;t.success=function(i){var n=t.parse?e.parse(i,t):i;if(!e.set(n,t))return false;if(r)r.call(t.context,e,i,t);e.trigger("sync",e,i,t)};z(this,t);return this.sync("read",this,t)},save:function(t,e,r){var n;if(t==null||typeof t==="object"){n=t;r=e}else{(n={})[t]=e}r=i.extend({validate:true,parse:true},r);var s=r.wait;if(n&&!s){if(!this.set(n,r))return false}else{if(!this._validate(n,r))return false}var a=this;var o=r.success;var h=this.attributes;r.success=function(t){a.attributes=h;var e=r.parse?a.parse(t,r):t;if(s)e=i.extend({},n,e);if(e&&!a.set(e,r))return false;if(o)o.call(r.context,a,t,r);a.trigger("sync",a,t,r)};z(this,r);if(n&&s)this.attributes=i.extend({},h,n);var u=this.isNew()?"create":r.patch?"patch":"update";if(u==="patch"&&!r.attrs)r.attrs=n;var l=this.sync(u,this,r);this.attributes=h;return l},destroy:function(t){t=t?i.clone(t):{};var e=this;var r=t.success;var n=t.wait;var s=function(){e.stopListening();e.trigger("destroy",e,e.collection,t)};t.success=function(i){if(n)s();if(r)r.call(t.context,e,i,t);if(!e.isNew())e.trigger("sync",e,i,t)};var a=false;if(this.isNew()){i.defer(t.success)}else{z(this,t);a=this.sync("delete",this,t)}if(!n)s();return a},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||F();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.defaults({validate:true},t))},_validate:function(t,e){if(!e.validate||!this.validate)return true;t=i.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;if(!r)return true;this.trigger("invalid",this,r,i.extend(e,{validationError:r}));return false}});var b={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};o(y,b,"attributes");var x=e.Collection=function(t,e){e||(e={});if(e.model)this.model=e.model;if(e.comparator!==void 0)this.comparator=e.comparator;this._reset();this.initialize.apply(this,arguments);if(t)this.reset(t,i.extend({silent:true},e))};var w={add:true,remove:true,merge:true};var E={add:true,remove:false};var k=function(t,e,i){i=Math.min(Math.max(i,0),t.length);var r=Array(t.length-i);var n=e.length;for(var s=0;s<r.length;s++)r[s]=t[s+i];for(s=0;s<n;s++)t[s+i]=e[s];for(s=0;s<r.length;s++)t[s+n+i]=r[s]};i.extend(x.prototype,l,{model:y,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:false},e,E))},remove:function(t,e){e=i.extend({},e);var r=!i.isArray(t);t=r?[t]:i.clone(t);var n=this._removeModels(t,e);if(!e.silent&&n)this.trigger("update",this,e);return r?n[0]:n},set:function(t,e){if(t==null)return;e=i.defaults({},e,w);if(e.parse&&!this._isModel(t))t=this.parse(t,e);var r=!i.isArray(t);t=r?[t]:t.slice();var n=e.at;if(n!=null)n=+n;if(n<0)n+=this.length+1;var s=[];var a=[];var o=[];var h={};var u=e.add;var l=e.merge;var c=e.remove;var f=false;var d=this.comparator&&n==null&&e.sort!==false;var v=i.isString(this.comparator)?this.comparator:null;var g;for(var p=0;p<t.length;p++){g=t[p];var m=this.get(g);if(m){if(l&&g!==m){var _=this._isModel(g)?g.attributes:g;if(e.parse)_=m.parse(_,e);m.set(_,e);if(d&&!f)f=m.hasChanged(v)}if(!h[m.cid]){h[m.cid]=true;s.push(m)}t[p]=m}else if(u){g=t[p]=this._prepareModel(g,e);if(g){a.push(g);this._addReference(g,e);h[g.cid]=true;s.push(g)}}}if(c){for(p=0;p<this.length;p++){g=this.models[p];if(!h[g.cid])o.push(g)}if(o.length)this._removeModels(o,e)}var y=false;var b=!d&&u&&c;if(s.length&&b){y=this.length!=s.length||i.some(this.models,function(t,e){return t!==s[e]});this.models.length=0;k(this.models,s,0);this.length=this.models.length}else if(a.length){if(d)f=true;k(this.models,a,n==null?this.length:n);this.length=this.models.length}if(f)this.sort({silent:true});if(!e.silent){for(p=0;p<a.length;p++){if(n!=null)e.index=n+p;g=a[p];g.trigger("add",g,this,e)}if(f||y)this.trigger("sort",this,e);if(a.length||o.length)this.trigger("update",this,e)}return r?t[0]:t},reset:function(t,e){e=e?i.clone(e):{};for(var r=0;r<this.models.length;r++){this._removeReference(this.models[r],e)}e.previousModels=this.models;this._reset();t=this.add(t,i.extend({silent:true},e));if(!e.silent)this.trigger("reset",this,e);return t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return s.apply(this.models,arguments)},get:function(t){if(t==null)return void 0;var e=this.modelId(this._isModel(t)?t.attributes:t);return this._byId[t]||this._byId[e]||this._byId[t.cid]},at:function(t){if(t<0)t+=this.length;return this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,true)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var r=e.length;if(i.isFunction(e))e=i.bind(e,this);if(r===1||i.isString(e)){this.models=this.sortBy(e)}else{this.models.sort(e)}if(!t.silent)this.trigger("sort",this,t);return this},pluck:function(t){return i.invoke(this.models,"get",t)},fetch:function(t){t=i.extend({parse:true},t);var e=t.success;var r=this;t.success=function(i){var n=t.reset?"reset":"set";r[n](i,t);if(e)e.call(t.context,r,i,t);r.trigger("sync",r,i,t)};z(this,t);return this.sync("read",this,t)},create:function(t,e){e=e?i.clone(e):{};var r=e.wait;t=this._prepareModel(t,e);if(!t)return false;if(!r)this.add(t,e);var n=this;var s=e.success;e.success=function(t,e,i){if(r)n.add(t,i);if(s)s.call(i.context,t,e,i)};t.save(null,e);return t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0;this.models=[];this._byId={}},_prepareModel:function(t,e){if(this._isModel(t)){if(!t.collection)t.collection=this;return t}e=e?i.clone(e):{};e.collection=this;var r=new this.model(t,e);if(!r.validationError)return r;this.trigger("invalid",this,r.validationError,e);return false},_removeModels:function(t,e){var i=[];for(var r=0;r<t.length;r++){var n=this.get(t[r]);if(!n)continue;var s=this.indexOf(n);this.models.splice(s,1);this.length--;if(!e.silent){e.index=s;n.trigger("remove",n,this,e)}i.push(n);this._removeReference(n,e)}return i.length?i:false},_isModel:function(t){return t instanceof y},_addReference:function(t,e){this._byId[t.cid]=t;var i=this.modelId(t.attributes);if(i!=null)this._byId[i]=t;t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var i=this.modelId(t.attributes);if(i!=null)delete this._byId[i];if(this===t.collection)delete t.collection;t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,r){if((t==="add"||t==="remove")&&i!==this)return;if(t==="destroy")this.remove(e,r);if(t==="change"){var n=this.modelId(e.previousAttributes());var s=this.modelId(e.attributes);if(n!==s){if(n!=null)delete this._byId[n];if(s!=null)this._byId[s]=e}}this.trigger.apply(this,arguments)}});var S={forEach:3,each:3,map:3,collect:3,reduce:4,foldl:4,inject:4,reduceRight:4,foldr:4,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3};o(x,S,"models");var I=e.View=function(t){this.cid=i.uniqueId("view");i.extend(this,i.pick(t,P));this._ensureElement();this.initialize.apply(this,arguments)};var T=/^(\S+)\s*(.*)$/;var P=["model","collection","el","id","attributes","className","tagName","events"];i.extend(I.prototype,l,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){this._removeElement();this.stopListening();return this},_removeElement:function(){this.$el.remove()},setElement:function(t){this.undelegateEvents();this._setElement(t);this.delegateEvents();return this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t);this.el=this.$el[0]},delegateEvents:function(t){t||(t=i.result(this,"events"));if(!t)return this;this.undelegateEvents();for(var e in t){var r=t[e];if(!i.isFunction(r))r=this[r];if(!r)continue;var n=e.match(T);this.delegate(n[1],n[2],i.bind(r,this))}return this},delegate:function(t,e,i){this.$el.on(t+".delegateEvents"+this.cid,e,i);return this},undelegateEvents:function(){if(this.$el)this.$el.off(".delegateEvents"+this.cid);return this},undelegate:function(t,e,i){this.$el.off(t+".delegateEvents"+this.cid,e,i);return this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(!this.el){var t=i.extend({},i.result(this,"attributes"));if(this.id)t.id=i.result(this,"id");if(this.className)t["class"]=i.result(this,"className");this.setElement(this._createElement(i.result(this,"tagName")));this._setAttributes(t)}else{this.setElement(i.result(this,"el"))}},_setAttributes:function(t){this.$el.attr(t)}});e.sync=function(t,r,n){var s=H[t];i.defaults(n||(n={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:s,dataType:"json"};if(!n.url){a.url=i.result(r,"url")||F()}if(n.data==null&&r&&(t==="create"||t==="update"||t==="patch")){a.contentType="application/json";a.data=JSON.stringify(n.attrs||r.toJSON(n))}if(n.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(n.emulateHTTP&&(s==="PUT"||s==="DELETE"||s==="PATCH")){a.type="POST";if(n.emulateJSON)a.data._method=s;var o=n.beforeSend;n.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",s);if(o)return o.apply(this,arguments)}}if(a.type!=="GET"&&!n.emulateJSON){a.processData=false}var h=n.error;n.error=function(t,e,i){n.textStatus=e;n.errorThrown=i;if(h)h.call(n.context,t,e,i)};var u=n.xhr=e.ajax(i.extend(a,n));r.trigger("request",r,u,n);return u};var H={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var A=/\((.*?)\)/g;var C=/(\(\?)?:\w+/g;var R=/\*\w+/g;var j=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,l,{initialize:function(){},route:function(t,r,n){if(!i.isRegExp(t))t=this._routeToRegExp(t);if(i.isFunction(r)){n=r;r=""}if(!n)n=this[r];var s=this;e.history.route(t,function(i){var a=s._extractParameters(t,i);if(s.execute(n,a,r)!==false){s.trigger.apply(s,["route:"+r].concat(a));s.trigger("route",r,a);e.history.trigger("route",s,r,a)}});return this},execute:function(t,e,i){if(t)t.apply(this,e)},navigate:function(t,i){e.history.navigate(t,i);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=i.result(this,"routes");var t,e=i.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(j,"\\$&").replace(A,"(?:$1)?").replace(C,function(t,e){return e?t:"([^/?]+)"}).replace(R,"([^?]*?)");return new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t,e){if(e===r.length-1)return t||null;return t?decodeURIComponent(t):null})}});var M=e.History=function(){this.handlers=[];this.checkUrl=i.bind(this.checkUrl,this);if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var N=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var U=/#.*$/;M.started=false;i.extend(M.prototype,l,{interval:50,atRoot:function(){var t=this.location.pathname.replace(/[^\/]$/,"$&/");return t===this.root&&!this.getSearch()},matchRoot:function(){var t=this.decodeFragment(this.location.pathname);var e=t.slice(0,this.root.length-1)+"/";return e===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return t.charAt(0)==="/"?t.slice(1):t},getFragment:function(t){if(t==null){if(this._usePushState||!this._wantsHashChange){t=this.getPath()}else{t=this.getHash()}}return t.replace(N,"")},start:function(t){if(M.started)throw new Error("Backbone.history has already been started");M.started=true;this.options=i.extend({root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._hasHashChange="onhashchange"in window&&(document.documentMode===void 0||document.documentMode>7);this._useHashChange=this._wantsHashChange&&this._hasHashChange;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.history&&this.history.pushState);this._usePushState=this._wantsPushState&&this._hasPushState;this.fragment=this.getFragment();this.root=("/"+this.root+"/").replace(O,"/");if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";this.location.replace(e+"#"+this.getPath());return true}else if(this._hasPushState&&this.atRoot()){this.navigate(this.getHash(),{replace:true})}}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe");this.iframe.src="javascript:0";this.iframe.style.display="none";this.iframe.tabIndex=-1;var r=document.body;var n=r.insertBefore(this.iframe,r.firstChild).contentWindow;n.document.open();n.document.close();n.location.hash="#"+this.fragment}var s=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState){s("popstate",this.checkUrl,false)}else if(this._useHashChange&&!this.iframe){s("hashchange",this.checkUrl,false)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}if(!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};if(this._usePushState){t("popstate",this.checkUrl,false)}else if(this._useHashChange&&!this.iframe){t("hashchange",this.checkUrl,false)}if(this.iframe){document.body.removeChild(this.iframe);this.iframe=null}if(this._checkUrlInterval)clearInterval(this._checkUrlInterval);M.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.getHash(this.iframe.contentWindow)}if(e===this.fragment)return false;if(this.iframe)this.navigate(e);this.loadUrl()},loadUrl:function(t){if(!this.matchRoot())return false;t=this.fragment=this.getFragment(t);return i.some(this.handlers,function(e){if(e.route.test(t)){e.callback(t);return true}})},navigate:function(t,e){if(!M.started)return false;if(!e||e===true)e={trigger:!!e};t=this.getFragment(t||"");var i=this.root;if(t===""||t.charAt(0)==="?"){i=i.slice(0,-1)||"/"}var r=i+t;t=this.decodeFragment(t.replace(U,""));if(this.fragment===t)return;this.fragment=t;if(this._usePushState){this.history[e.replace?"replaceState":"pushState"]({},document.title,r)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var n=this.iframe.contentWindow;if(!e.replace){n.document.open();n.document.close()}this._updateHash(n.location,t,e.replace)}}else{return this.location.assign(r)}if(e.trigger)return this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else{t.hash="#"+e}}});e.history=new M;var q=function(t,e){var r=this;var n;if(t&&i.has(t,"constructor")){n=t.constructor}else{n=function(){return r.apply(this,arguments)}}i.extend(n,r,e);var s=function(){this.constructor=n};s.prototype=r.prototype;n.prototype=new s;if(t)i.extend(n.prototype,t);n.__super__=r.prototype;return n};y.extend=x.extend=$.extend=I.extend=M.extend=q;var F=function(){throw new Error('A "url" property or function must be specified')};var z=function(t,e){var i=e.error;e.error=function(r){if(i)i.call(e.context,t,r,e);t.trigger("error",t,r,e)}};return e});
+(function(t){var e=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global;if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,n){e.Backbone=t(e,n,i,r)})}else if(typeof exports!=="undefined"){var i=require("underscore"),r;try{r=require("jquery")}catch(n){}t(e,exports,i,r)}else{e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}})(function(t,e,i,r){var n=t.Backbone;var s=Array.prototype.slice;e.VERSION="1.3.3";e.$=r;e.noConflict=function(){t.Backbone=n;return this};e.emulateHTTP=false;e.emulateJSON=false;var a=function(t,e,r){switch(t){case 1:return function(){return i[e](this[r])};case 2:return function(t){return i[e](this[r],t)};case 3:return function(t,n){return i[e](this[r],o(t,this),n)};case 4:return function(t,n,s){return i[e](this[r],o(t,this),n,s)};default:return function(){var t=s.call(arguments);t.unshift(this[r]);return i[e].apply(i,t)}}};var h=function(t,e,r){i.each(e,function(e,n){if(i[n])t.prototype[n]=a(e,n,r)})};var o=function(t,e){if(i.isFunction(t))return t;if(i.isObject(t)&&!e._isModel(t))return l(t);if(i.isString(t))return function(e){return e.get(t)};return t};var l=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}};var u=e.Events={};var c=/\s+/;var f=function(t,e,r,n,s){var a=0,h;if(r&&typeof r==="object"){if(n!==void 0&&"context"in s&&s.context===void 0)s.context=n;for(h=i.keys(r);a<h.length;a++){e=f(t,e,h[a],r[h[a]],s)}}else if(r&&c.test(r)){for(h=r.split(c);a<h.length;a++){e=t(e,h[a],n,s)}}else{e=t(e,r,n,s)}return e};u.on=function(t,e,i){return d(this,t,e,i)};var d=function(t,e,i,r,n){t._events=f(v,t._events||{},e,i,{context:r,ctx:t,listening:n});if(n){var s=t._listeners||(t._listeners={});s[n.id]=n}return t};u.listenTo=function(t,e,r){if(!t)return this;var n=t._listenId||(t._listenId=i.uniqueId("l"));var s=this._listeningTo||(this._listeningTo={});var a=s[n];if(!a){var h=this._listenId||(this._listenId=i.uniqueId("l"));a=s[n]={obj:t,objId:n,id:h,listeningTo:s,count:0}}d(t,e,r,this,a);return this};var v=function(t,e,i,r){if(i){var n=t[e]||(t[e]=[]);var s=r.context,a=r.ctx,h=r.listening;if(h)h.count++;n.push({callback:i,context:s,ctx:s||a,listening:h})}return t};u.off=function(t,e,i){if(!this._events)return this;this._events=f(g,this._events,t,e,{context:i,listeners:this._listeners});return this};u.stopListening=function(t,e,r){var n=this._listeningTo;if(!n)return this;var s=t?[t._listenId]:i.keys(n);for(var a=0;a<s.length;a++){var h=n[s[a]];if(!h)break;h.obj.off(e,r,this)}return this};var g=function(t,e,r,n){if(!t)return;var s=0,a;var h=n.context,o=n.listeners;if(!e&&!r&&!h){var l=i.keys(o);for(;s<l.length;s++){a=o[l[s]];delete o[a.id];delete a.listeningTo[a.objId]}return}var u=e?[e]:i.keys(t);for(;s<u.length;s++){e=u[s];var c=t[e];if(!c)break;var f=[];for(var d=0;d<c.length;d++){var v=c[d];if(r&&r!==v.callback&&r!==v.callback._callback||h&&h!==v.context){f.push(v)}else{a=v.listening;if(a&&--a.count===0){delete o[a.id];delete a.listeningTo[a.objId]}}}if(f.length){t[e]=f}else{delete t[e]}}return t};u.once=function(t,e,r){var n=f(p,{},t,e,i.bind(this.off,this));if(typeof t==="string"&&r==null)e=void 0;return this.on(n,e,r)};u.listenToOnce=function(t,e,r){var n=f(p,{},e,r,i.bind(this.stopListening,this,t));return this.listenTo(t,n)};var p=function(t,e,r,n){if(r){var s=t[e]=i.once(function(){n(e,s);r.apply(this,arguments)});s._callback=r}return t};u.trigger=function(t){if(!this._events)return this;var e=Math.max(0,arguments.length-1);var i=Array(e);for(var r=0;r<e;r++)i[r]=arguments[r+1];f(m,this._events,t,void 0,i);return this};var m=function(t,e,i,r){if(t){var n=t[e];var s=t.all;if(n&&s)s=s.slice();if(n)_(n,r);if(s)_(s,[e].concat(r))}return t};var _=function(t,e){var i,r=-1,n=t.length,s=e[0],a=e[1],h=e[2];switch(e.length){case 0:while(++r<n)(i=t[r]).callback.call(i.ctx);return;case 1:while(++r<n)(i=t[r]).callback.call(i.ctx,s);return;case 2:while(++r<n)(i=t[r]).callback.call(i.ctx,s,a);return;case 3:while(++r<n)(i=t[r]).callback.call(i.ctx,s,a,h);return;default:while(++r<n)(i=t[r]).callback.apply(i.ctx,e);return}};u.bind=u.on;u.unbind=u.off;i.extend(e,u);var y=e.Model=function(t,e){var r=t||{};e||(e={});this.cid=i.uniqueId(this.cidPrefix);this.attributes={};if(e.collection)this.collection=e.collection;if(e.parse)r=this.parse(r,e)||{};var n=i.result(this,"defaults");r=i.defaults(i.extend({},n,r),n);this.set(r,e);this.changed={};this.initialize.apply(this,arguments)};i.extend(y.prototype,u,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return this.get(t)!=null},matches:function(t){return!!i.iteratee(t,this)(this.attributes)},set:function(t,e,r){if(t==null)return this;var n;if(typeof t==="object"){n=t;r=e}else{(n={})[t]=e}r||(r={});if(!this._validate(n,r))return false;var s=r.unset;var a=r.silent;var h=[];var o=this._changing;this._changing=true;if(!o){this._previousAttributes=i.clone(this.attributes);this.changed={}}var l=this.attributes;var u=this.changed;var c=this._previousAttributes;for(var f in n){e=n[f];if(!i.isEqual(l[f],e))h.push(f);if(!i.isEqual(c[f],e)){u[f]=e}else{delete u[f]}s?delete l[f]:l[f]=e}if(this.idAttribute in n)this.id=this.get(this.idAttribute);if(!a){if(h.length)this._pending=r;for(var d=0;d<h.length;d++){this.trigger("change:"+h[d],this,l[h[d]],r)}}if(o)return this;if(!a){while(this._pending){r=this._pending;this._pending=false;this.trigger("change",this,r)}}this._pending=false;this._changing=false;return this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:true}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,i.extend({},t,{unset:true}))},hasChanged:function(t){if(t==null)return!i.isEmpty(this.changed);return i.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?i.clone(this.changed):false;var e=this._changing?this._previousAttributes:this.attributes;var r={};for(var n in t){var s=t[n];if(i.isEqual(e[n],s))continue;r[n]=s}return i.size(r)?r:false},previous:function(t){if(t==null||!this._previousAttributes)return null;return this._previousAttributes[t]},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=i.extend({parse:true},t);var e=this;var r=t.success;t.success=function(i){var n=t.parse?e.parse(i,t):i;if(!e.set(n,t))return false;if(r)r.call(t.context,e,i,t);e.trigger("sync",e,i,t)};B(this,t);return this.sync("read",this,t)},save:function(t,e,r){var n;if(t==null||typeof t==="object"){n=t;r=e}else{(n={})[t]=e}r=i.extend({validate:true,parse:true},r);var s=r.wait;if(n&&!s){if(!this.set(n,r))return false}else if(!this._validate(n,r)){return false}var a=this;var h=r.success;var o=this.attributes;r.success=function(t){a.attributes=o;var e=r.parse?a.parse(t,r):t;if(s)e=i.extend({},n,e);if(e&&!a.set(e,r))return false;if(h)h.call(r.context,a,t,r);a.trigger("sync",a,t,r)};B(this,r);if(n&&s)this.attributes=i.extend({},o,n);var l=this.isNew()?"create":r.patch?"patch":"update";if(l==="patch"&&!r.attrs)r.attrs=n;var u=this.sync(l,this,r);this.attributes=o;return u},destroy:function(t){t=t?i.clone(t):{};var e=this;var r=t.success;var n=t.wait;var s=function(){e.stopListening();e.trigger("destroy",e,e.collection,t)};t.success=function(i){if(n)s();if(r)r.call(t.context,e,i,t);if(!e.isNew())e.trigger("sync",e,i,t)};var a=false;if(this.isNew()){i.defer(t.success)}else{B(this,t);a=this.sync("delete",this,t)}if(!n)s();return a},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||F();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend({},t,{validate:true}))},_validate:function(t,e){if(!e.validate||!this.validate)return true;t=i.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;if(!r)return true;this.trigger("invalid",this,r,i.extend(e,{validationError:r}));return false}});var b={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};h(y,b,"attributes");var x=e.Collection=function(t,e){e||(e={});if(e.model)this.model=e.model;if(e.comparator!==void 0)this.comparator=e.comparator;this._reset();this.initialize.apply(this,arguments);if(t)this.reset(t,i.extend({silent:true},e))};var w={add:true,remove:true,merge:true};var E={add:true,remove:false};var I=function(t,e,i){i=Math.min(Math.max(i,0),t.length);var r=Array(t.length-i);var n=e.length;var s;for(s=0;s<r.length;s++)r[s]=t[s+i];for(s=0;s<n;s++)t[s+i]=e[s];for(s=0;s<r.length;s++)t[s+n+i]=r[s]};i.extend(x.prototype,u,{model:y,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:false},e,E))},remove:function(t,e){e=i.extend({},e);var r=!i.isArray(t);t=r?[t]:t.slice();var n=this._removeModels(t,e);if(!e.silent&&n.length){e.changes={added:[],merged:[],removed:n};this.trigger("update",this,e)}return r?n[0]:n},set:function(t,e){if(t==null)return;e=i.extend({},w,e);if(e.parse&&!this._isModel(t)){t=this.parse(t,e)||[]}var r=!i.isArray(t);t=r?[t]:t.slice();var n=e.at;if(n!=null)n=+n;if(n>this.length)n=this.length;if(n<0)n+=this.length+1;var s=[];var a=[];var h=[];var o=[];var l={};var u=e.add;var c=e.merge;var f=e.remove;var d=false;var v=this.comparator&&n==null&&e.sort!==false;var g=i.isString(this.comparator)?this.comparator:null;var p,m;for(m=0;m<t.length;m++){p=t[m];var _=this.get(p);if(_){if(c&&p!==_){var y=this._isModel(p)?p.attributes:p;if(e.parse)y=_.parse(y,e);_.set(y,e);h.push(_);if(v&&!d)d=_.hasChanged(g)}if(!l[_.cid]){l[_.cid]=true;s.push(_)}t[m]=_}else if(u){p=t[m]=this._prepareModel(p,e);if(p){a.push(p);this._addReference(p,e);l[p.cid]=true;s.push(p)}}}if(f){for(m=0;m<this.length;m++){p=this.models[m];if(!l[p.cid])o.push(p)}if(o.length)this._removeModels(o,e)}var b=false;var x=!v&&u&&f;if(s.length&&x){b=this.length!==s.length||i.some(this.models,function(t,e){return t!==s[e]});this.models.length=0;I(this.models,s,0);this.length=this.models.length}else if(a.length){if(v)d=true;I(this.models,a,n==null?this.length:n);this.length=this.models.length}if(d)this.sort({silent:true});if(!e.silent){for(m=0;m<a.length;m++){if(n!=null)e.index=n+m;p=a[m];p.trigger("add",p,this,e)}if(d||b)this.trigger("sort",this,e);if(a.length||o.length||h.length){e.changes={added:a,removed:o,merged:h};this.trigger("update",this,e)}}return r?t[0]:t},reset:function(t,e){e=e?i.clone(e):{};for(var r=0;r<this.models.length;r++){this._removeReference(this.models[r],e)}e.previousModels=this.models;this._reset();t=this.add(t,i.extend({silent:true},e));if(!e.silent)this.trigger("reset",this,e);return t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return s.apply(this.models,arguments)},get:function(t){if(t==null)return void 0;return this._byId[t]||this._byId[this.modelId(t.attributes||t)]||t.cid&&this._byId[t.cid]},has:function(t){return this.get(t)!=null},at:function(t){if(t<0)t+=this.length;return this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,true)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var r=e.length;if(i.isFunction(e))e=i.bind(e,this);if(r===1||i.isString(e)){this.models=this.sortBy(e)}else{this.models.sort(e)}if(!t.silent)this.trigger("sort",this,t);return this},pluck:function(t){return this.map(t+"")},fetch:function(t){t=i.extend({parse:true},t);var e=t.success;var r=this;t.success=function(i){var n=t.reset?"reset":"set";r[n](i,t);if(e)e.call(t.context,r,i,t);r.trigger("sync",r,i,t)};B(this,t);return this.sync("read",this,t)},create:function(t,e){e=e?i.clone(e):{};var r=e.wait;t=this._prepareModel(t,e);if(!t)return false;if(!r)this.add(t,e);var n=this;var s=e.success;e.success=function(t,e,i){if(r)n.add(t,i);if(s)s.call(i.context,t,e,i)};t.save(null,e);return t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0;this.models=[];this._byId={}},_prepareModel:function(t,e){if(this._isModel(t)){if(!t.collection)t.collection=this;return t}e=e?i.clone(e):{};e.collection=this;var r=new this.model(t,e);if(!r.validationError)return r;this.trigger("invalid",this,r.validationError,e);return false},_removeModels:function(t,e){var i=[];for(var r=0;r<t.length;r++){var n=this.get(t[r]);if(!n)continue;var s=this.indexOf(n);this.models.splice(s,1);this.length--;delete this._byId[n.cid];var a=this.modelId(n.attributes);if(a!=null)delete this._byId[a];if(!e.silent){e.index=s;n.trigger("remove",n,this,e)}i.push(n);this._removeReference(n,e)}return i},_isModel:function(t){return t instanceof y},_addReference:function(t,e){this._byId[t.cid]=t;var i=this.modelId(t.attributes);if(i!=null)this._byId[i]=t;t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var i=this.modelId(t.attributes);if(i!=null)delete this._byId[i];if(this===t.collection)delete t.collection;t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,r){if(e){if((t==="add"||t==="remove")&&i!==this)return;if(t==="destroy")this.remove(e,r);if(t==="change"){var n=this.modelId(e.previousAttributes());var s=this.modelId(e.attributes);if(n!==s){if(n!=null)delete this._byId[n];if(s!=null)this._byId[s]=e}}}this.trigger.apply(this,arguments)}});var S={forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3};h(x,S,"models");var k=e.View=function(t){this.cid=i.uniqueId("view");i.extend(this,i.pick(t,P));this._ensureElement();this.initialize.apply(this,arguments)};var T=/^(\S+)\s*(.*)$/;var P=["model","collection","el","id","attributes","className","tagName","events"];i.extend(k.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){this._removeElement();this.stopListening();return this},_removeElement:function(){this.$el.remove()},setElement:function(t){this.undelegateEvents();this._setElement(t);this.delegateEvents();return this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t);this.el=this.$el[0]},delegateEvents:function(t){t||(t=i.result(this,"events"));if(!t)return this;this.undelegateEvents();for(var e in t){var r=t[e];if(!i.isFunction(r))r=this[r];if(!r)continue;var n=e.match(T);this.delegate(n[1],n[2],i.bind(r,this))}return this},delegate:function(t,e,i){this.$el.on(t+".delegateEvents"+this.cid,e,i);return this},undelegateEvents:function(){if(this.$el)this.$el.off(".delegateEvents"+this.cid);return this},undelegate:function(t,e,i){this.$el.off(t+".delegateEvents"+this.cid,e,i);return this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(!this.el){var t=i.extend({},i.result(this,"attributes"));if(this.id)t.id=i.result(this,"id");if(this.className)t["class"]=i.result(this,"className");this.setElement(this._createElement(i.result(this,"tagName")));this._setAttributes(t)}else{this.setElement(i.result(this,"el"))}},_setAttributes:function(t){this.$el.attr(t)}});e.sync=function(t,r,n){var s=H[t];i.defaults(n||(n={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:s,dataType:"json"};if(!n.url){a.url=i.result(r,"url")||F()}if(n.data==null&&r&&(t==="create"||t==="update"||t==="patch")){a.contentType="application/json";a.data=JSON.stringify(n.attrs||r.toJSON(n))}if(n.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(n.emulateHTTP&&(s==="PUT"||s==="DELETE"||s==="PATCH")){a.type="POST";if(n.emulateJSON)a.data._method=s;var h=n.beforeSend;n.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",s);if(h)return h.apply(this,arguments)}}if(a.type!=="GET"&&!n.emulateJSON){a.processData=false}var o=n.error;n.error=function(t,e,i){n.textStatus=e;n.errorThrown=i;if(o)o.call(n.context,t,e,i)};var l=n.xhr=e.ajax(i.extend(a,n));r.trigger("request",r,l,n);return l};var H={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var A=/\((.*?)\)/g;var C=/(\(\?)?:\w+/g;var R=/\*\w+/g;var j=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,u,{initialize:function(){},route:function(t,r,n){if(!i.isRegExp(t))t=this._routeToRegExp(t);if(i.isFunction(r)){n=r;r=""}if(!n)n=this[r];var s=this;e.history.route(t,function(i){var a=s._extractParameters(t,i);if(s.execute(n,a,r)!==false){s.trigger.apply(s,["route:"+r].concat(a));s.trigger("route",r,a);e.history.trigger("route",s,r,a)}});return this},execute:function(t,e,i){if(t)t.apply(this,e)},navigate:function(t,i){e.history.navigate(t,i);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=i.result(this,"routes");var t,e=i.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(j,"\\$&").replace(A,"(?:$1)?").replace(C,function(t,e){return e?t:"([^/?]+)"}).replace(R,"([^?]*?)");return new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t,e){if(e===r.length-1)return t||null;return t?decodeURIComponent(t):null})}});var N=e.History=function(){this.handlers=[];this.checkUrl=i.bind(this.checkUrl,this);if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var M=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var U=/#.*$/;N.started=false;i.extend(N.prototype,u,{interval:50,atRoot:function(){var t=this.location.pathname.replace(/[^\/]$/,"$&/");return t===this.root&&!this.getSearch()},matchRoot:function(){var t=this.decodeFragment(this.location.pathname);var e=t.slice(0,this.root.length-1)+"/";return e===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return t.charAt(0)==="/"?t.slice(1):t},getFragment:function(t){if(t==null){if(this._usePushState||!this._wantsHashChange){t=this.getPath()}else{t=this.getHash()}}return t.replace(M,"")},start:function(t){if(N.started)throw new Error("Backbone.history has already been started");N.started=true;this.options=i.extend({root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._hasHashChange="onhashchange"in window&&(document.documentMode===void 0||document.documentMode>7);this._useHashChange=this._wantsHashChange&&this._hasHashChange;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.history&&this.history.pushState);this._usePushState=this._wantsPushState&&this._hasPushState;this.fragment=this.getFragment();this.root=("/"+this.root+"/").replace(O,"/");if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";this.location.replace(e+"#"+this.getPath());return true}else if(this._hasPushState&&this.atRoot()){this.navigate(this.getHash(),{replace:true})}}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe");this.iframe.src="javascript:0";this.iframe.style.display="none";this.iframe.tabIndex=-1;var r=document.body;var n=r.insertBefore(this.iframe,r.firstChild).contentWindow;n.document.open();n.document.close();n.location.hash="#"+this.fragment}var s=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState){s("popstate",this.checkUrl,false)}else if(this._useHashChange&&!this.iframe){s("hashchange",this.checkUrl,false)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}if(!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};if(this._usePushState){t("popstate",this.checkUrl,false)}else if(this._useHashChange&&!this.iframe){t("hashchange",this.checkUrl,false)}if(this.iframe){document.body.removeChild(this.iframe);this.iframe=null}if(this._checkUrlInterval)clearInterval(this._checkUrlInterval);N.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.getHash(this.iframe.contentWindow)}if(e===this.fragment)return false;if(this.iframe)this.navigate(e);this.loadUrl()},loadUrl:function(t){if(!this.matchRoot())return false;t=this.fragment=this.getFragment(t);return i.some(this.handlers,function(e){if(e.route.test(t)){e.callback(t);return true}})},navigate:function(t,e){if(!N.started)return false;if(!e||e===true)e={trigger:!!e};t=this.getFragment(t||"");var i=this.root;if(t===""||t.charAt(0)==="?"){i=i.slice(0,-1)||"/"}var r=i+t;t=this.decodeFragment(t.replace(U,""));if(this.fragment===t)return;this.fragment=t;if(this._usePushState){this.history[e.replace?"replaceState":"pushState"]({},document.title,r)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var n=this.iframe.contentWindow;if(!e.replace){n.document.open();n.document.close()}this._updateHash(n.location,t,e.replace)}}else{return this.location.assign(r)}if(e.trigger)return this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else{t.hash="#"+e}}});e.history=new N;var q=function(t,e){var r=this;var n;if(t&&i.has(t,"constructor")){n=t.constructor}else{n=function(){return r.apply(this,arguments)}}i.extend(n,r,e);n.prototype=i.create(r.prototype,t);n.prototype.constructor=n;n.__super__=r.prototype;return n};y.extend=x.extend=$.extend=k.extend=N.extend=q;var F=function(){throw new Error('A "url" property or function must be specified')};var B=function(t,e){var i=e.error;e.error=function(r){if(i)i.call(e.context,t,r,e);t.trigger("error",t,r,e)}};return e});
index eef66c61263fcb8a3ded31a97fb89b29dd03bc25..4b3b5c0862a244e0a23fc2e7cf7e2193435a717c 100644 (file)
@@ -1 +1 @@
-function getAnchorPosition(a){var b=new Object,c=0,d=0,e=!1,f=!1,g=!1;if(document.getElementById?e=!0:document.all?f=!0:document.layers&&(g=!0),e&&document.all)c=AnchorPosition_getPageOffsetLeft(document.all[a]),d=AnchorPosition_getPageOffsetTop(document.all[a]);else if(e){var h=document.getElementById(a);c=AnchorPosition_getPageOffsetLeft(h),d=AnchorPosition_getPageOffsetTop(h)}else if(f)c=AnchorPosition_getPageOffsetLeft(document.all[a]),d=AnchorPosition_getPageOffsetTop(document.all[a]);else{if(!g)return b.x=0,b.y=0,b;for(var i=0,j=0;j<document.anchors.length;j++)if(document.anchors[j].name==a){i=1;break}if(0==i)return b.x=0,b.y=0,b;c=document.anchors[j].x,d=document.anchors[j].y}return b.x=c,b.y=d,b}function getAnchorWindowPosition(a){var b=getAnchorPosition(a),c=0,d=0;return document.getElementById?isNaN(window.screenX)?(c=b.x-document.body.scrollLeft+window.screenLeft,d=b.y-document.body.scrollTop+window.screenTop):(c=b.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset,d=b.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset):document.all?(c=b.x-document.body.scrollLeft+window.screenLeft,d=b.y-document.body.scrollTop+window.screenTop):document.layers&&(c=b.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset,d=b.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset),b.x=c,b.y=d,b}function AnchorPosition_getPageOffsetLeft(a){for(var b=a.offsetLeft;null!=(a=a.offsetParent);)b+=a.offsetLeft;return b}function AnchorPosition_getWindowOffsetLeft(a){return AnchorPosition_getPageOffsetLeft(a)-document.body.scrollLeft}function AnchorPosition_getPageOffsetTop(a){for(var b=a.offsetTop;null!=(a=a.offsetParent);)b+=a.offsetTop;return b}function AnchorPosition_getWindowOffsetTop(a){return AnchorPosition_getPageOffsetTop(a)-document.body.scrollTop}function PopupWindow_getXYPosition(a){var b;b="WINDOW"==this.type?getAnchorWindowPosition(a):getAnchorPosition(a),this.x=b.x,this.y=b.y}function PopupWindow_setSize(a,b){this.width=a,this.height=b}function PopupWindow_populate(a){this.contents=a,this.populated=!1}function PopupWindow_setUrl(a){this.url=a}function PopupWindow_setWindowProperties(a){this.windowProperties=a}function PopupWindow_refresh(){if(null!=this.divName){if(this.use_gebi)document.getElementById(this.divName).innerHTML=this.contents;else if(this.use_css)document.all[this.divName].innerHTML=this.contents;else if(this.use_layers){var a=document.layers[this.divName];a.document.open(),a.document.writeln(this.contents),a.document.close()}}else null==this.popupWindow||this.popupWindow.closed||(""!=this.url?this.popupWindow.location.href=this.url:(this.popupWindow.document.open(),this.popupWindow.document.writeln(this.contents),this.popupWindow.document.close()),this.popupWindow.focus())}function PopupWindow_showPopup(a){if(this.getXYPosition(a),this.x+=this.offsetX,this.y+=this.offsetY,this.populated||""==this.contents||(this.populated=!0,this.refresh()),null!=this.divName)this.use_gebi?(document.getElementById(this.divName).style.left=this.x+"px",document.getElementById(this.divName).style.top=this.y,document.getElementById(this.divName).style.visibility="visible"):this.use_css?(document.all[this.divName].style.left=this.x,document.all[this.divName].style.top=this.y,document.all[this.divName].style.visibility="visible"):this.use_layers&&(document.layers[this.divName].left=this.x,document.layers[this.divName].top=this.y,document.layers[this.divName].visibility="visible");else{if(null==this.popupWindow||this.popupWindow.closed){this.x<0&&(this.x=0),this.y<0&&(this.y=0),screen&&screen.availHeight&&this.y+this.height>screen.availHeight&&(this.y=screen.availHeight-this.height),screen&&screen.availWidth&&this.x+this.width>screen.availWidth&&(this.x=screen.availWidth-this.width);var b=window.opera||document.layers&&!navigator.mimeTypes["*"]||"KDE"==navigator.vendor||document.childNodes&&!document.all&&!navigator.taintEnabled;this.popupWindow=window.open(b?"":"about:blank","window_"+a,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y)}this.refresh()}}function PopupWindow_hidePopup(){null!=this.divName?this.use_gebi?document.getElementById(this.divName).style.visibility="hidden":this.use_css?document.all[this.divName].style.visibility="hidden":this.use_layers&&(document.layers[this.divName].visibility="hidden"):this.popupWindow&&!this.popupWindow.closed&&(this.popupWindow.close(),this.popupWindow=null)}function PopupWindow_isClicked(a){if(null!=this.divName){if(this.use_layers){var b=a.pageX,c=a.pageY,d=document.layers[this.divName];return b>d.left&&b<d.left+d.clip.width&&c>d.top&&c<d.top+d.clip.height?!0:!1}if(document.all){for(var d=window.event.srcElement;null!=d.parentElement;){if(d.id==this.divName)return!0;d=d.parentElement}return!1}if(this.use_gebi&&a){for(var d=a.originalTarget;null!=d.parentNode;){if(d.id==this.divName)return!0;d=d.parentNode}return!1}return!1}return!1}function PopupWindow_hideIfNotClicked(a){this.autoHideEnabled&&!this.isClicked(a)&&this.hidePopup()}function PopupWindow_autoHide(){this.autoHideEnabled=!0}function PopupWindow_hidePopupWindows(a){for(var b=0;b<popupWindowObjects.length;b++)if(null!=popupWindowObjects[b]){var c=popupWindowObjects[b];c.hideIfNotClicked(a)}}function PopupWindow_attachListener(){document.layers&&document.captureEvents(Event.MOUSEUP),window.popupWindowOldEventListener=document.onmouseup,null!=window.popupWindowOldEventListener?document.onmouseup=new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();"):document.onmouseup=PopupWindow_hidePopupWindows}function PopupWindow(){window.popupWindowIndex||(window.popupWindowIndex=0),window.popupWindowObjects||(window.popupWindowObjects=new Array),window.listenerAttached||(window.listenerAttached=!0,PopupWindow_attachListener()),this.index=popupWindowIndex++,popupWindowObjects[this.index]=this,this.divName=null,this.popupWindow=null,this.width=0,this.height=0,this.populated=!1,this.visible=!1,this.autoHideEnabled=!1,this.contents="",this.url="",this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no",arguments.length>0?(this.type="DIV",this.divName=arguments[0]):this.type="WINDOW",this.use_gebi=!1,this.use_css=!1,this.use_layers=!1,document.getElementById?this.use_gebi=!0:document.all?this.use_css=!0:document.layers?this.use_layers=!0:this.type="WINDOW",this.offsetX=0,this.offsetY=0,this.getXYPosition=PopupWindow_getXYPosition,this.populate=PopupWindow_populate,this.setUrl=PopupWindow_setUrl,this.setWindowProperties=PopupWindow_setWindowProperties,this.refresh=PopupWindow_refresh,this.showPopup=PopupWindow_showPopup,this.hidePopup=PopupWindow_hidePopup,this.setSize=PopupWindow_setSize,this.isClicked=PopupWindow_isClicked,this.autoHide=PopupWindow_autoHide,this.hideIfNotClicked=PopupWindow_hideIfNotClicked}function ColorPicker_writeDiv(){document.writeln('<DIV ID="colorPickerDiv" STYLE="position:absolute;visibility:hidden;"> </DIV>')}function ColorPicker_show(a){this.showPopup(a)}function ColorPicker_pickColor(a,b){b.hidePopup(),pickColor(a)}function pickColor(a){return null==ColorPicker_targetInput?void alert("Target Input is null, which means you either didn't use the 'select' function or you have no defined your own 'pickColor' function to handle the picked color!"):void(ColorPicker_targetInput.value=a)}function ColorPicker_select(a,b){return"text"!=a.type&&"hidden"!=a.type&&"textarea"!=a.type?(alert("colorpicker.select: Input object passed is not a valid form input object"),void(window.ColorPicker_targetInput=null)):(window.ColorPicker_targetInput=a,void this.show(b))}function ColorPicker_highlightColor(a){var b=arguments.length>1?arguments[1]:window.document,c=b.getElementById("colorPickerSelectedColor");c.style.backgroundColor=a,c=b.getElementById("colorPickerSelectedColorValue"),c.innerHTML=a}function ColorPicker(){var a=!1;if(0==arguments.length)var b="colorPickerDiv";else if("window"==arguments[0]){var b="";a=!0}else var b=arguments[0];if(""!=b)var c=new PopupWindow(b);else{var c=new PopupWindow;c.setSize(225,250)}c.currentValue="#FFFFFF",c.writeDiv=ColorPicker_writeDiv,c.highlightColor=ColorPicker_highlightColor,c.show=ColorPicker_show,c.select=ColorPicker_select;var d=new Array("#4180B6","#69AEE7","#000000","#000033","#000066","#000099","#0000CC","#0000FF","#330000","#330033","#330066","#330099","#3300CC","#3300FF","#660000","#660033","#660066","#660099","#6600CC","#6600FF","#990000","#990033","#990066","#990099","#9900CC","#9900FF","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#7FFFFF","#7FFFFF","#7FF7F7","#7FEFEF","#7FE7E7","#7FDFDF","#7FD7D7","#7FCFCF","#7FC7C7","#7FBFBF","#7FB7B7","#7FAFAF","#7FA7A7","#7F9F9F","#7F9797","#7F8F8F","#7F8787","#7F7F7F","#7F7777","#7F6F6F","#7F6767","#7F5F5F","#7F5757","#7F4F4F","#7F4747","#7F3F3F","#7F3737","#7F2F2F","#7F2727","#7F1F1F","#7F1717","#7F0F0F","#7F0707","#7F0000","#4180B6","#69AEE7","#003300","#003333","#003366","#003399","#0033CC","#0033FF","#333300","#333333","#333366","#333399","#3333CC","#3333FF","#663300","#663333","#663366","#663399","#6633CC","#6633FF","#993300","#993333","#993366","#993399","#9933CC","#9933FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF7FFF","#FF7FFF","#F77FF7","#EF7FEF","#E77FE7","#DF7FDF","#D77FD7","#CF7FCF","#C77FC7","#BF7FBF","#B77FB7","#AF7FAF","#A77FA7","#9F7F9F","#977F97","#8F7F8F","#877F87","#7F7F7F","#777F77","#6F7F6F","#677F67","#5F7F5F","#577F57","#4F7F4F","#477F47","#3F7F3F","#377F37","#2F7F2F","#277F27","#1F7F1F","#177F17","#0F7F0F","#077F07","#007F00","#4180B6","#69AEE7","#006600","#006633","#006666","#006699","#0066CC","#0066FF","#336600","#336633","#336666","#336699","#3366CC","#3366FF","#666600","#666633","#666666","#666699","#6666CC","#6666FF","#996600","#996633","#996666","#996699","#9966CC","#9966FF","#CC6600","#CC6633","#CC6666","#CC6699","#CC66CC","#CC66FF","#FF6600","#FF6633","#FF6666","#FF6699","#FF66CC","#FF66FF","#FFFF7F","#FFFF7F","#F7F77F","#EFEF7F","#E7E77F","#DFDF7F","#D7D77F","#CFCF7F","#C7C77F","#BFBF7F","#B7B77F","#AFAF7F","#A7A77F","#9F9F7F","#97977F","#8F8F7F","#87877F","#7F7F7F","#77777F","#6F6F7F","#67677F","#5F5F7F","#57577F","#4F4F7F","#47477F","#3F3F7F","#37377F","#2F2F7F","#27277F","#1F1F7F","#17177F","#0F0F7F","#07077F","#00007F","#4180B6","#69AEE7","#009900","#009933","#009966","#009999","#0099CC","#0099FF","#339900","#339933","#339966","#339999","#3399CC","#3399FF","#669900","#669933","#669966","#669999","#6699CC","#6699FF","#999900","#999933","#999966","#999999","#9999CC","#9999FF","#CC9900","#CC9933","#CC9966","#CC9999","#CC99CC","#CC99FF","#FF9900","#FF9933","#FF9966","#FF9999","#FF99CC","#FF99FF","#3FFFFF","#3FFFFF","#3FF7F7","#3FEFEF","#3FE7E7","#3FDFDF","#3FD7D7","#3FCFCF","#3FC7C7","#3FBFBF","#3FB7B7","#3FAFAF","#3FA7A7","#3F9F9F","#3F9797","#3F8F8F","#3F8787","#3F7F7F","#3F7777","#3F6F6F","#3F6767","#3F5F5F","#3F5757","#3F4F4F","#3F4747","#3F3F3F","#3F3737","#3F2F2F","#3F2727","#3F1F1F","#3F1717","#3F0F0F","#3F0707","#3F0000","#4180B6","#69AEE7","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#66CC00","#66CC33","#66CC66","#66CC99","#66CCCC","#66CCFF","#99CC00","#99CC33","#99CC66","#99CC99","#99CCCC","#99CCFF","#CCCC00","#CCCC33","#CCCC66","#CCCC99","#CCCCCC","#CCCCFF","#FFCC00","#FFCC33","#FFCC66","#FFCC99","#FFCCCC","#FFCCFF","#FF3FFF","#FF3FFF","#F73FF7","#EF3FEF","#E73FE7","#DF3FDF","#D73FD7","#CF3FCF","#C73FC7","#BF3FBF","#B73FB7","#AF3FAF","#A73FA7","#9F3F9F","#973F97","#8F3F8F","#873F87","#7F3F7F","#773F77","#6F3F6F","#673F67","#5F3F5F","#573F57","#4F3F4F","#473F47","#3F3F3F","#373F37","#2F3F2F","#273F27","#1F3F1F","#173F17","#0F3F0F","#073F07","#003F00","#4180B6","#69AEE7","#00FF00","#00FF33","#00FF66","#00FF99","#00FFCC","#00FFFF","#33FF00","#33FF33","#33FF66","#33FF99","#33FFCC","#33FFFF","#66FF00","#66FF33","#66FF66","#66FF99","#66FFCC","#66FFFF","#99FF00","#99FF33","#99FF66","#99FF99","#99FFCC","#99FFFF","#CCFF00","#CCFF33","#CCFF66","#CCFF99","#CCFFCC","#CCFFFF","#FFFF00","#FFFF33","#FFFF66","#FFFF99","#FFFFCC","#FFFFFF","#FFFF3F","#FFFF3F","#F7F73F","#EFEF3F","#E7E73F","#DFDF3F","#D7D73F","#CFCF3F","#C7C73F","#BFBF3F","#B7B73F","#AFAF3F","#A7A73F","#9F9F3F","#97973F","#8F8F3F","#87873F","#7F7F3F","#77773F","#6F6F3F","#67673F","#5F5F3F","#57573F","#4F4F3F","#47473F","#3F3F3F","#37373F","#2F2F3F","#27273F","#1F1F3F","#17173F","#0F0F3F","#07073F","#00003F","#4180B6","#69AEE7","#FFFFFF","#FFEEEE","#FFDDDD","#FFCCCC","#FFBBBB","#FFAAAA","#FF9999","#FF8888","#FF7777","#FF6666","#FF5555","#FF4444","#FF3333","#FF2222","#FF1111","#FF0000","#FF0000","#FF0000","#FF0000","#EE0000","#DD0000","#CC0000","#BB0000","#AA0000","#990000","#880000","#770000","#660000","#550000","#440000","#330000","#220000","#110000","#000000","#000000","#000000","#000000","#001111","#002222","#003333","#004444","#005555","#006666","#007777","#008888","#009999","#00AAAA","#00BBBB","#00CCCC","#00DDDD","#00EEEE","#00FFFF","#00FFFF","#00FFFF","#00FFFF","#11FFFF","#22FFFF","#33FFFF","#44FFFF","#55FFFF","#66FFFF","#77FFFF","#88FFFF","#99FFFF","#AAFFFF","#BBFFFF","#CCFFFF","#DDFFFF","#EEFFFF","#FFFFFF","#4180B6","#69AEE7","#FFFFFF","#EEFFEE","#DDFFDD","#CCFFCC","#BBFFBB","#AAFFAA","#99FF99","#88FF88","#77FF77","#66FF66","#55FF55","#44FF44","#33FF33","#22FF22","#11FF11","#00FF00","#00FF00","#00FF00","#00FF00","#00EE00","#00DD00","#00CC00","#00BB00","#00AA00","#009900","#008800","#007700","#006600","#005500","#004400","#003300","#002200","#001100","#000000","#000000","#000000","#000000","#110011","#220022","#330033","#440044","#550055","#660066","#770077","#880088","#990099","#AA00AA","#BB00BB","#CC00CC","#DD00DD","#EE00EE","#FF00FF","#FF00FF","#FF00FF","#FF00FF","#FF11FF","#FF22FF","#FF33FF","#FF44FF","#FF55FF","#FF66FF","#FF77FF","#FF88FF","#FF99FF","#FFAAFF","#FFBBFF","#FFCCFF","#FFDDFF","#FFEEFF","#FFFFFF","#4180B6","#69AEE7","#FFFFFF","#EEEEFF","#DDDDFF","#CCCCFF","#BBBBFF","#AAAAFF","#9999FF","#8888FF","#7777FF","#6666FF","#5555FF","#4444FF","#3333FF","#2222FF","#1111FF","#0000FF","#0000FF","#0000FF","#0000FF","#0000EE","#0000DD","#0000CC","#0000BB","#0000AA","#000099","#000088","#000077","#000066","#000055","#000044","#000033","#000022","#000011","#000000","#000000","#000000","#000000","#111100","#222200","#333300","#444400","#555500","#666600","#777700","#888800","#999900","#AAAA00","#BBBB00","#CCCC00","#DDDD00","#EEEE00","#FFFF00","#FFFF00","#FFFF00","#FFFF00","#FFFF11","#FFFF22","#FFFF33","#FFFF44","#FFFF55","#FFFF66","#FFFF77","#FFFF88","#FFFF99","#FFFFAA","#FFFFBB","#FFFFCC","#FFFFDD","#FFFFEE","#FFFFFF","#4180B6","#69AEE7","#FFFFFF","#FFFFFF","#FBFBFB","#F7F7F7","#F3F3F3","#EFEFEF","#EBEBEB","#E7E7E7","#E3E3E3","#DFDFDF","#DBDBDB","#D7D7D7","#D3D3D3","#CFCFCF","#CBCBCB","#C7C7C7","#C3C3C3","#BFBFBF","#BBBBBB","#B7B7B7","#B3B3B3","#AFAFAF","#ABABAB","#A7A7A7","#A3A3A3","#9F9F9F","#9B9B9B","#979797","#939393","#8F8F8F","#8B8B8B","#878787","#838383","#7F7F7F","#7B7B7B","#777777","#737373","#6F6F6F","#6B6B6B","#676767","#636363","#5F5F5F","#5B5B5B","#575757","#535353","#4F4F4F","#4B4B4B","#474747","#434343","#3F3F3F","#3B3B3B","#373737","#333333","#2F2F2F","#2B2B2B","#272727","#232323","#1F1F1F","#1B1B1B","#171717","#131313","#0F0F0F","#0B0B0B","#070707","#030303","#000000","#000000","#000000","#000000","#000000"),e=d.length,f=72,g="",h=a?"window.opener.":"";a&&(g+="<html><head><title>Select Color</title></head>",g+="<body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0><span style='text-align: center;'>"),g+="<table style='border: none;' cellspacing=0 cellpadding=0>";for(var i=document.getElementById||document.all?!0:!1,j=0;e>j;j++){if(j%f==0&&(g+="<tr>"),i)var k='onMouseOver="'+h+"ColorPicker_highlightColor('"+d[j]+"',window.document)\"";else k="";g+='<td style="background-color: '+d[j]+';"><a href="javascript:void()" onclick="'+h+"ColorPicker_pickColor('"+d[j]+"',"+h+"window.popupWindowObjects["+c.index+']);return false;" '+k+">&nbsp;</a></td>",(j+1>=e||(j+1)%f==0)&&(g+="</tr>")}if(document.getElementById){var l=Math.floor(f/2),m=f=l;g+="<tr><td colspan='"+l+"' style='background-color: #FFF;' ID='colorPickerSelectedColor'>&nbsp;</td><td colspan='"+m+"' style='text-align: center;' id='colorPickerSelectedColorValue'>#FFFFFF</td></tr>"}return g+="</table>",a&&(g+="</span></body></html>"),c.populate(g+"\n"),c.offsetY=25,c.autoHide(),c}ColorPicker_targetInput=null;
\ No newline at end of file
+function getAnchorPosition(a){var b=new Object,c=0,d=0,e=!1,f=!1,g=!1;if(document.getElementById?e=!0:document.all?f=!0:document.layers&&(g=!0),e&&document.all)c=AnchorPosition_getPageOffsetLeft(document.all[a]),d=AnchorPosition_getPageOffsetTop(document.all[a]);else if(e){var h=document.getElementById(a);c=AnchorPosition_getPageOffsetLeft(h),d=AnchorPosition_getPageOffsetTop(h)}else if(f)c=AnchorPosition_getPageOffsetLeft(document.all[a]),d=AnchorPosition_getPageOffsetTop(document.all[a]);else{if(!g)return b.x=0,b.y=0,b;for(var i=0,j=0;j<document.anchors.length;j++)if(document.anchors[j].name==a){i=1;break}if(0==i)return b.x=0,b.y=0,b;c=document.anchors[j].x,d=document.anchors[j].y}return b.x=c,b.y=d,b}function getAnchorWindowPosition(a){var b=getAnchorPosition(a),c=0,d=0;return document.getElementById?isNaN(window.screenX)?(c=b.x-document.body.scrollLeft+window.screenLeft,d=b.y-document.body.scrollTop+window.screenTop):(c=b.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset,d=b.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset):document.all?(c=b.x-document.body.scrollLeft+window.screenLeft,d=b.y-document.body.scrollTop+window.screenTop):document.layers&&(c=b.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset,d=b.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset),b.x=c,b.y=d,b}function AnchorPosition_getPageOffsetLeft(a){for(var b=a.offsetLeft;null!=(a=a.offsetParent);)b+=a.offsetLeft;return b}function AnchorPosition_getWindowOffsetLeft(a){return AnchorPosition_getPageOffsetLeft(a)-document.body.scrollLeft}function AnchorPosition_getPageOffsetTop(a){for(var b=a.offsetTop;null!=(a=a.offsetParent);)b+=a.offsetTop;return b}function AnchorPosition_getWindowOffsetTop(a){return AnchorPosition_getPageOffsetTop(a)-document.body.scrollTop}function PopupWindow_getXYPosition(a){var b;b="WINDOW"==this.type?getAnchorWindowPosition(a):getAnchorPosition(a),this.x=b.x,this.y=b.y}function PopupWindow_setSize(a,b){this.width=a,this.height=b}function PopupWindow_populate(a){this.contents=a,this.populated=!1}function PopupWindow_setUrl(a){this.url=a}function PopupWindow_setWindowProperties(a){this.windowProperties=a}function PopupWindow_refresh(){if(null!=this.divName){if(this.use_gebi)document.getElementById(this.divName).innerHTML=this.contents;else if(this.use_css)document.all[this.divName].innerHTML=this.contents;else if(this.use_layers){var a=document.layers[this.divName];a.document.open(),a.document.writeln(this.contents),a.document.close()}}else null==this.popupWindow||this.popupWindow.closed||(""!=this.url?this.popupWindow.location.href=this.url:(this.popupWindow.document.open(),this.popupWindow.document.writeln(this.contents),this.popupWindow.document.close()),this.popupWindow.focus())}function PopupWindow_showPopup(a){if(this.getXYPosition(a),this.x+=this.offsetX,this.y+=this.offsetY,this.populated||""==this.contents||(this.populated=!0,this.refresh()),null!=this.divName)this.use_gebi?(document.getElementById(this.divName).style.left=this.x+"px",document.getElementById(this.divName).style.top=this.y,document.getElementById(this.divName).style.visibility="visible"):this.use_css?(document.all[this.divName].style.left=this.x,document.all[this.divName].style.top=this.y,document.all[this.divName].style.visibility="visible"):this.use_layers&&(document.layers[this.divName].left=this.x,document.layers[this.divName].top=this.y,document.layers[this.divName].visibility="visible");else{if(null==this.popupWindow||this.popupWindow.closed){this.x<0&&(this.x=0),this.y<0&&(this.y=0),screen&&screen.availHeight&&this.y+this.height>screen.availHeight&&(this.y=screen.availHeight-this.height),screen&&screen.availWidth&&this.x+this.width>screen.availWidth&&(this.x=screen.availWidth-this.width);var b=window.opera||document.layers&&!navigator.mimeTypes["*"]||"KDE"==navigator.vendor||document.childNodes&&!document.all&&!navigator.taintEnabled;this.popupWindow=window.open(b?"":"about:blank","window_"+a,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y)}this.refresh()}}function PopupWindow_hidePopup(){null!=this.divName?this.use_gebi?document.getElementById(this.divName).style.visibility="hidden":this.use_css?document.all[this.divName].style.visibility="hidden":this.use_layers&&(document.layers[this.divName].visibility="hidden"):this.popupWindow&&!this.popupWindow.closed&&(this.popupWindow.close(),this.popupWindow=null)}function PopupWindow_isClicked(a){if(null!=this.divName){if(this.use_layers){var b=a.pageX,c=a.pageY,d=document.layers[this.divName];return b>d.left&&b<d.left+d.clip.width&&c>d.top&&c<d.top+d.clip.height}if(document.all){for(var d=window.event.srcElement;null!=d.parentElement;){if(d.id==this.divName)return!0;d=d.parentElement}return!1}if(this.use_gebi&&a){for(var d=a.originalTarget;null!=d.parentNode;){if(d.id==this.divName)return!0;d=d.parentNode}return!1}return!1}return!1}function PopupWindow_hideIfNotClicked(a){this.autoHideEnabled&&!this.isClicked(a)&&this.hidePopup()}function PopupWindow_autoHide(){this.autoHideEnabled=!0}function PopupWindow_hidePopupWindows(a){for(var b=0;b<popupWindowObjects.length;b++)if(null!=popupWindowObjects[b]){var c=popupWindowObjects[b];c.hideIfNotClicked(a)}}function PopupWindow_attachListener(){document.layers&&document.captureEvents(Event.MOUSEUP),window.popupWindowOldEventListener=document.onmouseup,null!=window.popupWindowOldEventListener?document.onmouseup=new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();"):document.onmouseup=PopupWindow_hidePopupWindows}function PopupWindow(){window.popupWindowIndex||(window.popupWindowIndex=0),window.popupWindowObjects||(window.popupWindowObjects=new Array),window.listenerAttached||(window.listenerAttached=!0,PopupWindow_attachListener()),this.index=popupWindowIndex++,popupWindowObjects[this.index]=this,this.divName=null,this.popupWindow=null,this.width=0,this.height=0,this.populated=!1,this.visible=!1,this.autoHideEnabled=!1,this.contents="",this.url="",this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no",arguments.length>0?(this.type="DIV",this.divName=arguments[0]):this.type="WINDOW",this.use_gebi=!1,this.use_css=!1,this.use_layers=!1,document.getElementById?this.use_gebi=!0:document.all?this.use_css=!0:document.layers?this.use_layers=!0:this.type="WINDOW",this.offsetX=0,this.offsetY=0,this.getXYPosition=PopupWindow_getXYPosition,this.populate=PopupWindow_populate,this.setUrl=PopupWindow_setUrl,this.setWindowProperties=PopupWindow_setWindowProperties,this.refresh=PopupWindow_refresh,this.showPopup=PopupWindow_showPopup,this.hidePopup=PopupWindow_hidePopup,this.setSize=PopupWindow_setSize,this.isClicked=PopupWindow_isClicked,this.autoHide=PopupWindow_autoHide,this.hideIfNotClicked=PopupWindow_hideIfNotClicked}function ColorPicker_writeDiv(){document.writeln('<DIV ID="colorPickerDiv" STYLE="position:absolute;visibility:hidden;"> </DIV>')}function ColorPicker_show(a){this.showPopup(a)}function ColorPicker_pickColor(a,b){b.hidePopup(),pickColor(a)}function pickColor(a){return null==ColorPicker_targetInput?void alert("Target Input is null, which means you either didn't use the 'select' function or you have no defined your own 'pickColor' function to handle the picked color!"):void(ColorPicker_targetInput.value=a)}function ColorPicker_select(a,b){return"text"!=a.type&&"hidden"!=a.type&&"textarea"!=a.type?(alert("colorpicker.select: Input object passed is not a valid form input object"),void(window.ColorPicker_targetInput=null)):(window.ColorPicker_targetInput=a,void this.show(b))}function ColorPicker_highlightColor(a){var b=arguments.length>1?arguments[1]:window.document,c=b.getElementById("colorPickerSelectedColor");c.style.backgroundColor=a,c=b.getElementById("colorPickerSelectedColorValue"),c.innerHTML=a}function ColorPicker(){var a=!1;if(0==arguments.length)var b="colorPickerDiv";else if("window"==arguments[0]){var b="";a=!0}else var b=arguments[0];if(""!=b)var c=new PopupWindow(b);else{var c=new PopupWindow;c.setSize(225,250)}c.currentValue="#FFFFFF",c.writeDiv=ColorPicker_writeDiv,c.highlightColor=ColorPicker_highlightColor,c.show=ColorPicker_show,c.select=ColorPicker_select;var d=new Array("#4180B6","#69AEE7","#000000","#000033","#000066","#000099","#0000CC","#0000FF","#330000","#330033","#330066","#330099","#3300CC","#3300FF","#660000","#660033","#660066","#660099","#6600CC","#6600FF","#990000","#990033","#990066","#990099","#9900CC","#9900FF","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#7FFFFF","#7FFFFF","#7FF7F7","#7FEFEF","#7FE7E7","#7FDFDF","#7FD7D7","#7FCFCF","#7FC7C7","#7FBFBF","#7FB7B7","#7FAFAF","#7FA7A7","#7F9F9F","#7F9797","#7F8F8F","#7F8787","#7F7F7F","#7F7777","#7F6F6F","#7F6767","#7F5F5F","#7F5757","#7F4F4F","#7F4747","#7F3F3F","#7F3737","#7F2F2F","#7F2727","#7F1F1F","#7F1717","#7F0F0F","#7F0707","#7F0000","#4180B6","#69AEE7","#003300","#003333","#003366","#003399","#0033CC","#0033FF","#333300","#333333","#333366","#333399","#3333CC","#3333FF","#663300","#663333","#663366","#663399","#6633CC","#6633FF","#993300","#993333","#993366","#993399","#9933CC","#9933FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF7FFF","#FF7FFF","#F77FF7","#EF7FEF","#E77FE7","#DF7FDF","#D77FD7","#CF7FCF","#C77FC7","#BF7FBF","#B77FB7","#AF7FAF","#A77FA7","#9F7F9F","#977F97","#8F7F8F","#877F87","#7F7F7F","#777F77","#6F7F6F","#677F67","#5F7F5F","#577F57","#4F7F4F","#477F47","#3F7F3F","#377F37","#2F7F2F","#277F27","#1F7F1F","#177F17","#0F7F0F","#077F07","#007F00","#4180B6","#69AEE7","#006600","#006633","#006666","#006699","#0066CC","#0066FF","#336600","#336633","#336666","#336699","#3366CC","#3366FF","#666600","#666633","#666666","#666699","#6666CC","#6666FF","#996600","#996633","#996666","#996699","#9966CC","#9966FF","#CC6600","#CC6633","#CC6666","#CC6699","#CC66CC","#CC66FF","#FF6600","#FF6633","#FF6666","#FF6699","#FF66CC","#FF66FF","#FFFF7F","#FFFF7F","#F7F77F","#EFEF7F","#E7E77F","#DFDF7F","#D7D77F","#CFCF7F","#C7C77F","#BFBF7F","#B7B77F","#AFAF7F","#A7A77F","#9F9F7F","#97977F","#8F8F7F","#87877F","#7F7F7F","#77777F","#6F6F7F","#67677F","#5F5F7F","#57577F","#4F4F7F","#47477F","#3F3F7F","#37377F","#2F2F7F","#27277F","#1F1F7F","#17177F","#0F0F7F","#07077F","#00007F","#4180B6","#69AEE7","#009900","#009933","#009966","#009999","#0099CC","#0099FF","#339900","#339933","#339966","#339999","#3399CC","#3399FF","#669900","#669933","#669966","#669999","#6699CC","#6699FF","#999900","#999933","#999966","#999999","#9999CC","#9999FF","#CC9900","#CC9933","#CC9966","#CC9999","#CC99CC","#CC99FF","#FF9900","#FF9933","#FF9966","#FF9999","#FF99CC","#FF99FF","#3FFFFF","#3FFFFF","#3FF7F7","#3FEFEF","#3FE7E7","#3FDFDF","#3FD7D7","#3FCFCF","#3FC7C7","#3FBFBF","#3FB7B7","#3FAFAF","#3FA7A7","#3F9F9F","#3F9797","#3F8F8F","#3F8787","#3F7F7F","#3F7777","#3F6F6F","#3F6767","#3F5F5F","#3F5757","#3F4F4F","#3F4747","#3F3F3F","#3F3737","#3F2F2F","#3F2727","#3F1F1F","#3F1717","#3F0F0F","#3F0707","#3F0000","#4180B6","#69AEE7","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#66CC00","#66CC33","#66CC66","#66CC99","#66CCCC","#66CCFF","#99CC00","#99CC33","#99CC66","#99CC99","#99CCCC","#99CCFF","#CCCC00","#CCCC33","#CCCC66","#CCCC99","#CCCCCC","#CCCCFF","#FFCC00","#FFCC33","#FFCC66","#FFCC99","#FFCCCC","#FFCCFF","#FF3FFF","#FF3FFF","#F73FF7","#EF3FEF","#E73FE7","#DF3FDF","#D73FD7","#CF3FCF","#C73FC7","#BF3FBF","#B73FB7","#AF3FAF","#A73FA7","#9F3F9F","#973F97","#8F3F8F","#873F87","#7F3F7F","#773F77","#6F3F6F","#673F67","#5F3F5F","#573F57","#4F3F4F","#473F47","#3F3F3F","#373F37","#2F3F2F","#273F27","#1F3F1F","#173F17","#0F3F0F","#073F07","#003F00","#4180B6","#69AEE7","#00FF00","#00FF33","#00FF66","#00FF99","#00FFCC","#00FFFF","#33FF00","#33FF33","#33FF66","#33FF99","#33FFCC","#33FFFF","#66FF00","#66FF33","#66FF66","#66FF99","#66FFCC","#66FFFF","#99FF00","#99FF33","#99FF66","#99FF99","#99FFCC","#99FFFF","#CCFF00","#CCFF33","#CCFF66","#CCFF99","#CCFFCC","#CCFFFF","#FFFF00","#FFFF33","#FFFF66","#FFFF99","#FFFFCC","#FFFFFF","#FFFF3F","#FFFF3F","#F7F73F","#EFEF3F","#E7E73F","#DFDF3F","#D7D73F","#CFCF3F","#C7C73F","#BFBF3F","#B7B73F","#AFAF3F","#A7A73F","#9F9F3F","#97973F","#8F8F3F","#87873F","#7F7F3F","#77773F","#6F6F3F","#67673F","#5F5F3F","#57573F","#4F4F3F","#47473F","#3F3F3F","#37373F","#2F2F3F","#27273F","#1F1F3F","#17173F","#0F0F3F","#07073F","#00003F","#4180B6","#69AEE7","#FFFFFF","#FFEEEE","#FFDDDD","#FFCCCC","#FFBBBB","#FFAAAA","#FF9999","#FF8888","#FF7777","#FF6666","#FF5555","#FF4444","#FF3333","#FF2222","#FF1111","#FF0000","#FF0000","#FF0000","#FF0000","#EE0000","#DD0000","#CC0000","#BB0000","#AA0000","#990000","#880000","#770000","#660000","#550000","#440000","#330000","#220000","#110000","#000000","#000000","#000000","#000000","#001111","#002222","#003333","#004444","#005555","#006666","#007777","#008888","#009999","#00AAAA","#00BBBB","#00CCCC","#00DDDD","#00EEEE","#00FFFF","#00FFFF","#00FFFF","#00FFFF","#11FFFF","#22FFFF","#33FFFF","#44FFFF","#55FFFF","#66FFFF","#77FFFF","#88FFFF","#99FFFF","#AAFFFF","#BBFFFF","#CCFFFF","#DDFFFF","#EEFFFF","#FFFFFF","#4180B6","#69AEE7","#FFFFFF","#EEFFEE","#DDFFDD","#CCFFCC","#BBFFBB","#AAFFAA","#99FF99","#88FF88","#77FF77","#66FF66","#55FF55","#44FF44","#33FF33","#22FF22","#11FF11","#00FF00","#00FF00","#00FF00","#00FF00","#00EE00","#00DD00","#00CC00","#00BB00","#00AA00","#009900","#008800","#007700","#006600","#005500","#004400","#003300","#002200","#001100","#000000","#000000","#000000","#000000","#110011","#220022","#330033","#440044","#550055","#660066","#770077","#880088","#990099","#AA00AA","#BB00BB","#CC00CC","#DD00DD","#EE00EE","#FF00FF","#FF00FF","#FF00FF","#FF00FF","#FF11FF","#FF22FF","#FF33FF","#FF44FF","#FF55FF","#FF66FF","#FF77FF","#FF88FF","#FF99FF","#FFAAFF","#FFBBFF","#FFCCFF","#FFDDFF","#FFEEFF","#FFFFFF","#4180B6","#69AEE7","#FFFFFF","#EEEEFF","#DDDDFF","#CCCCFF","#BBBBFF","#AAAAFF","#9999FF","#8888FF","#7777FF","#6666FF","#5555FF","#4444FF","#3333FF","#2222FF","#1111FF","#0000FF","#0000FF","#0000FF","#0000FF","#0000EE","#0000DD","#0000CC","#0000BB","#0000AA","#000099","#000088","#000077","#000066","#000055","#000044","#000033","#000022","#000011","#000000","#000000","#000000","#000000","#111100","#222200","#333300","#444400","#555500","#666600","#777700","#888800","#999900","#AAAA00","#BBBB00","#CCCC00","#DDDD00","#EEEE00","#FFFF00","#FFFF00","#FFFF00","#FFFF00","#FFFF11","#FFFF22","#FFFF33","#FFFF44","#FFFF55","#FFFF66","#FFFF77","#FFFF88","#FFFF99","#FFFFAA","#FFFFBB","#FFFFCC","#FFFFDD","#FFFFEE","#FFFFFF","#4180B6","#69AEE7","#FFFFFF","#FFFFFF","#FBFBFB","#F7F7F7","#F3F3F3","#EFEFEF","#EBEBEB","#E7E7E7","#E3E3E3","#DFDFDF","#DBDBDB","#D7D7D7","#D3D3D3","#CFCFCF","#CBCBCB","#C7C7C7","#C3C3C3","#BFBFBF","#BBBBBB","#B7B7B7","#B3B3B3","#AFAFAF","#ABABAB","#A7A7A7","#A3A3A3","#9F9F9F","#9B9B9B","#979797","#939393","#8F8F8F","#8B8B8B","#878787","#838383","#7F7F7F","#7B7B7B","#777777","#737373","#6F6F6F","#6B6B6B","#676767","#636363","#5F5F5F","#5B5B5B","#575757","#535353","#4F4F4F","#4B4B4B","#474747","#434343","#3F3F3F","#3B3B3B","#373737","#333333","#2F2F2F","#2B2B2B","#272727","#232323","#1F1F1F","#1B1B1B","#171717","#131313","#0F0F0F","#0B0B0B","#070707","#030303","#000000","#000000","#000000","#000000","#000000"),e=d.length,f=72,g="",h=a?"window.opener.":"";a&&(g+="<html><head><title>Select Color</title></head>",g+="<body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0><span style='text-align: center;'>"),g+="<table style='border: none;' cellspacing=0 cellpadding=0>";for(var i=!(!document.getElementById&&!document.all),j=0;j<e;j++){if(j%f==0&&(g+="<tr>"),i)var k='onMouseOver="'+h+"ColorPicker_highlightColor('"+d[j]+"',window.document)\"";else k="";g+='<td style="background-color: '+d[j]+';"><a href="javascript:void()" onclick="'+h+"ColorPicker_pickColor('"+d[j]+"',"+h+"window.popupWindowObjects["+c.index+']);return false;" '+k+">&nbsp;</a></td>",(j+1>=e||(j+1)%f==0)&&(g+="</tr>")}if(document.getElementById){var l=Math.floor(f/2),m=f=l;g+="<tr><td colspan='"+l+"' style='background-color: #FFF;' ID='colorPickerSelectedColor'>&nbsp;</td><td colspan='"+m+"' style='text-align: center;' id='colorPickerSelectedColorValue'>#FFFFFF</td></tr>"}return g+="</table>",a&&(g+="</span></body></html>"),c.populate(g+"\n"),c.offsetY=25,c.autoHide(),c}ColorPicker_targetInput=null;
\ No newline at end of file
index b4b727951c77689f4c299ff793b64716cc4b1d4c..e59f926594e3a02869746279e0974bfa30e6ff28 100644 (file)
@@ -755,6 +755,28 @@ window.wp = window.wp || {};
        // Add the Events mixin to api.Messenger.
        $.extend( api.Messenger.prototype, api.Events );
 
+       /**
+        * Notification.
+        *
+        * @class
+        * @augments wp.customize.Class
+        * @since 4.6.0
+        *
+        * @param {string} code                The error code.
+        * @param {object} params              Params.
+        * @param {string} params.message      The error message.
+        * @param {string} [params.type=error] The notification type.
+        * @param {*}      [params.data]       Any additional data.
+        */
+       api.Notification = api.Class.extend({
+               initialize: function( code, params ) {
+                       this.code = code;
+                       this.message = params.message;
+                       this.type = params.type || 'error';
+                       this.data = params.data || null;
+               }
+       });
+
        // The main API object is also a collection of all customizer settings.
        api = $.extend( new api.Values(), api );
 
index 2a37ba4391c07cba4dd5dddc14dfd38578a46b30..ba6e4acb175445848bd41881679310149c11ef25 100644 (file)
@@ -1 +1 @@
-window.wp=window.wp||{},function(a,b){var c,d,e={},f=Array.prototype.slice;c=function(){},d=function(a,d,e){var f;return f=d&&d.hasOwnProperty("constructor")?d.constructor:function(){var b=a.apply(this,arguments);return b},b.extend(f,a),c.prototype=a.prototype,f.prototype=new c,d&&b.extend(f.prototype,d),e&&b.extend(f,e),f.prototype.constructor=f,f.__super__=a.prototype,f},e.Class=function(a,c,d){var f,g=arguments;return a&&c&&e.Class.applicator===a&&(g=c,b.extend(this,d||{})),f=this,this.instance&&(f=function(){return f.instance.apply(f,arguments)},b.extend(f,this)),f.initialize.apply(f,g),f},e.Class.extend=function(a,b){var c=d(this,a,b);return c.extend=this.extend,c},e.Class.applicator={},e.Class.prototype.initialize=function(){},e.Class.prototype.extended=function(a){for(var b=this;"undefined"!=typeof b.constructor;){if(b.constructor===a)return!0;if("undefined"==typeof b.constructor.__super__)return!1;b=b.constructor.__super__}return!1},e.Events={trigger:function(a){return this.topics&&this.topics[a]&&this.topics[a].fireWith(this,f.call(arguments,1)),this},bind:function(a){return this.topics=this.topics||{},this.topics[a]=this.topics[a]||b.Callbacks(),this.topics[a].add.apply(this.topics[a],f.call(arguments,1)),this},unbind:function(a){return this.topics&&this.topics[a]&&this.topics[a].remove.apply(this.topics[a],f.call(arguments,1)),this}},e.Value=e.Class.extend({initialize:function(a,c){this._value=a,this.callbacks=b.Callbacks(),this._dirty=!1,b.extend(this,c||{}),this.set=b.proxy(this.set,this)},instance:function(){return arguments.length?this.set.apply(this,arguments):this.get()},get:function(){return this._value},set:function(a){var b=this._value;return a=this._setter.apply(this,arguments),a=this.validate(a),null===a||_.isEqual(b,a)?this:(this._value=a,this._dirty=!0,this.callbacks.fireWith(this,[a,b]),this)},_setter:function(a){return a},setter:function(a){var b=this.get();return this._setter=a,this._value=null,this.set(b),this},resetSetter:function(){return this._setter=this.constructor.prototype._setter,this.set(this.get()),this},validate:function(a){return a},bind:function(){return this.callbacks.add.apply(this.callbacks,arguments),this},unbind:function(){return this.callbacks.remove.apply(this.callbacks,arguments),this},link:function(){var a=this.set;return b.each(arguments,function(){this.bind(a)}),this},unlink:function(){var a=this.set;return b.each(arguments,function(){this.unbind(a)}),this},sync:function(){var a=this;return b.each(arguments,function(){a.link(this),this.link(a)}),this},unsync:function(){var a=this;return b.each(arguments,function(){a.unlink(this),this.unlink(a)}),this}}),e.Values=e.Class.extend({defaultConstructor:e.Value,initialize:function(a){b.extend(this,a||{}),this._value={},this._deferreds={}},instance:function(a){return 1===arguments.length?this.value(a):this.when.apply(this,arguments)},value:function(a){return this._value[a]},has:function(a){return"undefined"!=typeof this._value[a]},add:function(a,b){return this.has(a)?this.value(a):(this._value[a]=b,b.parent=this,b.extended(e.Value)&&b.bind(this._change),this.trigger("add",b),this._deferreds[a]&&this._deferreds[a].resolve(),this._value[a])},create:function(a){return this.add(a,new this.defaultConstructor(e.Class.applicator,f.call(arguments,1)))},each:function(a,c){c="undefined"==typeof c?this:c,b.each(this._value,function(b,d){a.call(c,d,b)})},remove:function(a){var b;this.has(a)&&(b=this.value(a),this.trigger("remove",b),b.extended(e.Value)&&b.unbind(this._change),delete b.parent),delete this._value[a],delete this._deferreds[a]},when:function(){var a=this,c=f.call(arguments),d=b.Deferred();return b.isFunction(c[c.length-1])&&d.done(c.pop()),b.when.apply(b,b.map(c,function(c){return a.has(c)?void 0:a._deferreds[c]=a._deferreds[c]||b.Deferred()})).done(function(){var e=b.map(c,function(b){return a(b)});return e.length!==c.length?void a.when.apply(a,c).done(function(){d.resolveWith(a,e)}):void d.resolveWith(a,e)}),d.promise()},_change:function(){this.parent.trigger("change",this)}}),b.extend(e.Values.prototype,e.Events),e.ensure=function(a){return"string"==typeof a?b(a):a},e.Element=e.Value.extend({initialize:function(a,c){var d,f,g,h=this,i=e.Element.synchronizer.html;this.element=e.ensure(a),this.events="",this.element.is("input, select, textarea")&&(this.events+="change",i=e.Element.synchronizer.val,this.element.is("input")?(d=this.element.prop("type"),e.Element.synchronizer[d]&&(i=e.Element.synchronizer[d]),"text"===d||"password"===d?this.events+=" keyup":"range"===d&&(this.events+=" input propertychange")):this.element.is("textarea")&&(this.events+=" keyup")),e.Value.prototype.initialize.call(this,null,b.extend(c||{},i)),this._value=this.get(),f=this.update,g=this.refresh,this.update=function(a){a!==g.call(h)&&f.apply(this,arguments)},this.refresh=function(){h.set(g.call(h))},this.bind(this.update),this.element.bind(this.events,this.refresh)},find:function(a){return b(a,this.element)},refresh:function(){},update:function(){}}),e.Element.synchronizer={},b.each(["html","val"],function(a,b){e.Element.synchronizer[b]={update:function(a){this.element[b](a)},refresh:function(){return this.element[b]()}}}),e.Element.synchronizer.checkbox={update:function(a){this.element.prop("checked",a)},refresh:function(){return this.element.prop("checked")}},e.Element.synchronizer.radio={update:function(a){this.element.filter(function(){return this.value===a}).prop("checked",!0)},refresh:function(){return this.element.filter(":checked").val()}},b.support.postMessage=!!window.postMessage,e.Messenger=e.Class.extend({add:function(a,b,c){return this[a]=new e.Value(b,c)},initialize:function(a,c){var d=window.parent==window?null:window.parent;b.extend(this,c||{}),this.add("channel",a.channel),this.add("url",a.url||""),this.add("origin",this.url()).link(this.url).setter(function(a){return a.replace(/([^:]+:\/\/[^\/]+).*/,"$1")}),this.add("targetWindow",null),this.targetWindow.set=function(a){var b=this._value;return a=this._setter.apply(this,arguments),a=this.validate(a),null===a||b===a?this:(this._value=a,this._dirty=!0,this.callbacks.fireWith(this,[a,b]),this)},this.targetWindow(a.targetWindow||d),this.receive=b.proxy(this.receive,this),this.receive.guid=b.guid++,b(window).on("message",this.receive)},destroy:function(){b(window).off("message",this.receive)},receive:function(a){var b;a=a.originalEvent,this.targetWindow&&this.targetWindow()&&(this.origin()&&a.origin!==this.origin()||"string"==typeof a.data&&"{"===a.data[0]&&(b=JSON.parse(a.data),b&&b.id&&"undefined"!=typeof b.data&&(!b.channel&&!this.channel()||this.channel()===b.channel)&&this.trigger(b.id,b.data)))},send:function(a,b){var c;b="undefined"==typeof b?null:b,this.url()&&this.targetWindow()&&(c={id:a,data:b},this.channel()&&(c.channel=this.channel()),this.targetWindow().postMessage(JSON.stringify(c),this.origin()))}}),b.extend(e.Messenger.prototype,e.Events),e=b.extend(new e.Values,e),e.get=function(){var a={};return this.each(function(b,c){a[c]=b.get()}),a},a.customize=e}(wp,jQuery);
\ No newline at end of file
+window.wp=window.wp||{},function(a,b){var c,d,e={},f=Array.prototype.slice;c=function(){},d=function(a,d,e){var f;return f=d&&d.hasOwnProperty("constructor")?d.constructor:function(){var b=a.apply(this,arguments);return b},b.extend(f,a),c.prototype=a.prototype,f.prototype=new c,d&&b.extend(f.prototype,d),e&&b.extend(f,e),f.prototype.constructor=f,f.__super__=a.prototype,f},e.Class=function(a,c,d){var f,g=arguments;return a&&c&&e.Class.applicator===a&&(g=c,b.extend(this,d||{})),f=this,this.instance&&(f=function(){return f.instance.apply(f,arguments)},b.extend(f,this)),f.initialize.apply(f,g),f},e.Class.extend=function(a,b){var c=d(this,a,b);return c.extend=this.extend,c},e.Class.applicator={},e.Class.prototype.initialize=function(){},e.Class.prototype.extended=function(a){for(var b=this;"undefined"!=typeof b.constructor;){if(b.constructor===a)return!0;if("undefined"==typeof b.constructor.__super__)return!1;b=b.constructor.__super__}return!1},e.Events={trigger:function(a){return this.topics&&this.topics[a]&&this.topics[a].fireWith(this,f.call(arguments,1)),this},bind:function(a){return this.topics=this.topics||{},this.topics[a]=this.topics[a]||b.Callbacks(),this.topics[a].add.apply(this.topics[a],f.call(arguments,1)),this},unbind:function(a){return this.topics&&this.topics[a]&&this.topics[a].remove.apply(this.topics[a],f.call(arguments,1)),this}},e.Value=e.Class.extend({initialize:function(a,c){this._value=a,this.callbacks=b.Callbacks(),this._dirty=!1,b.extend(this,c||{}),this.set=b.proxy(this.set,this)},instance:function(){return arguments.length?this.set.apply(this,arguments):this.get()},get:function(){return this._value},set:function(a){var b=this._value;return a=this._setter.apply(this,arguments),a=this.validate(a),null===a||_.isEqual(b,a)?this:(this._value=a,this._dirty=!0,this.callbacks.fireWith(this,[a,b]),this)},_setter:function(a){return a},setter:function(a){var b=this.get();return this._setter=a,this._value=null,this.set(b),this},resetSetter:function(){return this._setter=this.constructor.prototype._setter,this.set(this.get()),this},validate:function(a){return a},bind:function(){return this.callbacks.add.apply(this.callbacks,arguments),this},unbind:function(){return this.callbacks.remove.apply(this.callbacks,arguments),this},link:function(){var a=this.set;return b.each(arguments,function(){this.bind(a)}),this},unlink:function(){var a=this.set;return b.each(arguments,function(){this.unbind(a)}),this},sync:function(){var a=this;return b.each(arguments,function(){a.link(this),this.link(a)}),this},unsync:function(){var a=this;return b.each(arguments,function(){a.unlink(this),this.unlink(a)}),this}}),e.Values=e.Class.extend({defaultConstructor:e.Value,initialize:function(a){b.extend(this,a||{}),this._value={},this._deferreds={}},instance:function(a){return 1===arguments.length?this.value(a):this.when.apply(this,arguments)},value:function(a){return this._value[a]},has:function(a){return"undefined"!=typeof this._value[a]},add:function(a,b){return this.has(a)?this.value(a):(this._value[a]=b,b.parent=this,b.extended(e.Value)&&b.bind(this._change),this.trigger("add",b),this._deferreds[a]&&this._deferreds[a].resolve(),this._value[a])},create:function(a){return this.add(a,new this.defaultConstructor(e.Class.applicator,f.call(arguments,1)))},each:function(a,c){c="undefined"==typeof c?this:c,b.each(this._value,function(b,d){a.call(c,d,b)})},remove:function(a){var b;this.has(a)&&(b=this.value(a),this.trigger("remove",b),b.extended(e.Value)&&b.unbind(this._change),delete b.parent),delete this._value[a],delete this._deferreds[a]},when:function(){var a=this,c=f.call(arguments),d=b.Deferred();return b.isFunction(c[c.length-1])&&d.done(c.pop()),b.when.apply(b,b.map(c,function(c){if(!a.has(c))return a._deferreds[c]=a._deferreds[c]||b.Deferred()})).done(function(){var e=b.map(c,function(b){return a(b)});return e.length!==c.length?void a.when.apply(a,c).done(function(){d.resolveWith(a,e)}):void d.resolveWith(a,e)}),d.promise()},_change:function(){this.parent.trigger("change",this)}}),b.extend(e.Values.prototype,e.Events),e.ensure=function(a){return"string"==typeof a?b(a):a},e.Element=e.Value.extend({initialize:function(a,c){var d,f,g,h=this,i=e.Element.synchronizer.html;this.element=e.ensure(a),this.events="",this.element.is("input, select, textarea")&&(this.events+="change",i=e.Element.synchronizer.val,this.element.is("input")?(d=this.element.prop("type"),e.Element.synchronizer[d]&&(i=e.Element.synchronizer[d]),"text"===d||"password"===d?this.events+=" keyup":"range"===d&&(this.events+=" input propertychange")):this.element.is("textarea")&&(this.events+=" keyup")),e.Value.prototype.initialize.call(this,null,b.extend(c||{},i)),this._value=this.get(),f=this.update,g=this.refresh,this.update=function(a){a!==g.call(h)&&f.apply(this,arguments)},this.refresh=function(){h.set(g.call(h))},this.bind(this.update),this.element.bind(this.events,this.refresh)},find:function(a){return b(a,this.element)},refresh:function(){},update:function(){}}),e.Element.synchronizer={},b.each(["html","val"],function(a,b){e.Element.synchronizer[b]={update:function(a){this.element[b](a)},refresh:function(){return this.element[b]()}}}),e.Element.synchronizer.checkbox={update:function(a){this.element.prop("checked",a)},refresh:function(){return this.element.prop("checked")}},e.Element.synchronizer.radio={update:function(a){this.element.filter(function(){return this.value===a}).prop("checked",!0)},refresh:function(){return this.element.filter(":checked").val()}},b.support.postMessage=!!window.postMessage,e.Messenger=e.Class.extend({add:function(a,b,c){return this[a]=new e.Value(b,c)},initialize:function(a,c){var d=window.parent==window?null:window.parent;b.extend(this,c||{}),this.add("channel",a.channel),this.add("url",a.url||""),this.add("origin",this.url()).link(this.url).setter(function(a){return a.replace(/([^:]+:\/\/[^\/]+).*/,"$1")}),this.add("targetWindow",null),this.targetWindow.set=function(a){var b=this._value;return a=this._setter.apply(this,arguments),a=this.validate(a),null===a||b===a?this:(this._value=a,this._dirty=!0,this.callbacks.fireWith(this,[a,b]),this)},this.targetWindow(a.targetWindow||d),this.receive=b.proxy(this.receive,this),this.receive.guid=b.guid++,b(window).on("message",this.receive)},destroy:function(){b(window).off("message",this.receive)},receive:function(a){var b;a=a.originalEvent,this.targetWindow&&this.targetWindow()&&(this.origin()&&a.origin!==this.origin()||"string"==typeof a.data&&"{"===a.data[0]&&(b=JSON.parse(a.data),b&&b.id&&"undefined"!=typeof b.data&&((b.channel||this.channel())&&this.channel()!==b.channel||this.trigger(b.id,b.data))))},send:function(a,b){var c;b="undefined"==typeof b?null:b,this.url()&&this.targetWindow()&&(c={id:a,data:b},this.channel()&&(c.channel=this.channel()),this.targetWindow().postMessage(JSON.stringify(c),this.origin()))}}),b.extend(e.Messenger.prototype,e.Events),e.Notification=e.Class.extend({initialize:function(a,b){this.code=a,this.message=b.message,this.type=b.type||"error",this.data=b.data||null}}),e=b.extend(new e.Values,e),e.get=function(){var a={};return this.each(function(b,c){a[c]=b.get()}),a},a.customize=e}(wp,jQuery);
\ No newline at end of file
index f853f37d85f30c1cdff64a9d0949408b36a292f7..e7b411df308a0064a90d22d5ae6fa7be86223863 100644 (file)
@@ -150,12 +150,6 @@ window.wp = window.wp || {};
                        // Prompt AYS dialog when navigating away
                        $( window ).on( 'beforeunload', this.beforeunload );
 
-                       this.messenger.bind( 'activated', function( location ) {
-                               if ( location ) {
-                                       window.location = location;
-                               }
-                       });
-
                        this.messenger.bind( 'saved', function () {
                                Loader.saved( true );
                        } );
index 67eaa75bf6ee79ea2d9320b6c33dca717b3d0354..c4a05134c7ef43f8fb53bb3cc077948a89c826d8 100644 (file)
@@ -1 +1 @@
-window.wp=window.wp||{},function(a,b){var c,d=wp.customize;b.extend(b.support,{history:!(!window.history||!history.pushState),hashchange:"onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7)}),c=b.extend({},d.Events,{initialize:function(){this.body=b(document.body),c.settings&&b.support.postMessage&&(b.support.cors||!c.settings.isCrossDomain)&&(this.window=b(window),this.element=b('<div id="customize-container" />').appendTo(this.body),this.bind("open",this.overlay.show),this.bind("close",this.overlay.hide),b("#wpbody").on("click",".load-customize",function(a){a.preventDefault(),c.link=b(this),c.open(c.link.attr("href"))}),b.support.history&&this.window.on("popstate",c.popstate),b.support.hashchange&&(this.window.on("hashchange",c.hashchange),this.window.triggerHandler("hashchange")))},popstate:function(a){var b=a.originalEvent.state;b&&b.customize?c.open(b.customize):c.active&&c.close()},hashchange:function(){var a=window.location.toString().split("#")[1];a&&0===a.indexOf("wp_customize=on")&&c.open(c.settings.url+"?"+a),a||b.support.history||c.close()},beforeunload:function(){return c.saved()?void 0:c.settings.l10n.saveAlert},open:function(a){if(!this.active){if(c.settings.browser.mobile)return window.location=a;this.originalDocumentTitle=document.title,this.active=!0,this.body.addClass("customize-loading"),this.saved=new d.Value(!0),this.iframe=b("<iframe />",{src:a,title:c.settings.l10n.mainIframeTitle}).appendTo(this.element),this.iframe.one("load",this.loaded),this.messenger=new d.Messenger({url:a,channel:"loader",targetWindow:this.iframe[0].contentWindow}),this.messenger.bind("ready",function(){c.messenger.send("back")}),this.messenger.bind("close",function(){b.support.history?history.back():b.support.hashchange?window.location.hash="":c.close()}),b(window).on("beforeunload",this.beforeunload),this.messenger.bind("activated",function(a){a&&(window.location=a)}),this.messenger.bind("saved",function(){c.saved(!0)}),this.messenger.bind("change",function(){c.saved(!1)}),this.messenger.bind("title",function(a){window.document.title=a}),this.pushState(a),this.trigger("open")}},pushState:function(a){var c=a.split("?")[1];b.support.history&&window.location.href!==a?history.pushState({customize:a},"",a):!b.support.history&&b.support.hashchange&&c&&(window.location.hash="wp_customize=on&"+c),this.trigger("open")},opened:function(){c.body.addClass("customize-active full-overlay-active")},close:function(){if(this.active){if(!this.saved()&&!confirm(c.settings.l10n.saveAlert))return void history.forward();this.active=!1,this.trigger("close"),this.originalDocumentTitle&&(document.title=this.originalDocumentTitle),this.link&&this.link.focus()}},closed:function(){c.iframe.remove(),c.messenger.destroy(),c.iframe=null,c.messenger=null,c.saved=null,c.body.removeClass("customize-active full-overlay-active").removeClass("customize-loading"),b(window).off("beforeunload",c.beforeunload)},loaded:function(){c.body.removeClass("customize-loading")},overlay:{show:function(){this.element.fadeIn(200,c.opened)},hide:function(){this.element.fadeOut(200,c.closed)}}}),b(function(){c.settings=_wpCustomizeLoaderSettings,c.initialize()}),d.Loader=c}(wp,jQuery);
\ No newline at end of file
+window.wp=window.wp||{},function(a,b){var c,d=wp.customize;b.extend(b.support,{history:!(!window.history||!history.pushState),hashchange:"onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7)}),c=b.extend({},d.Events,{initialize:function(){this.body=b(document.body),c.settings&&b.support.postMessage&&(b.support.cors||!c.settings.isCrossDomain)&&(this.window=b(window),this.element=b('<div id="customize-container" />').appendTo(this.body),this.bind("open",this.overlay.show),this.bind("close",this.overlay.hide),b("#wpbody").on("click",".load-customize",function(a){a.preventDefault(),c.link=b(this),c.open(c.link.attr("href"))}),b.support.history&&this.window.on("popstate",c.popstate),b.support.hashchange&&(this.window.on("hashchange",c.hashchange),this.window.triggerHandler("hashchange")))},popstate:function(a){var b=a.originalEvent.state;b&&b.customize?c.open(b.customize):c.active&&c.close()},hashchange:function(){var a=window.location.toString().split("#")[1];a&&0===a.indexOf("wp_customize=on")&&c.open(c.settings.url+"?"+a),a||b.support.history||c.close()},beforeunload:function(){if(!c.saved())return c.settings.l10n.saveAlert},open:function(a){if(!this.active){if(c.settings.browser.mobile)return window.location=a;this.originalDocumentTitle=document.title,this.active=!0,this.body.addClass("customize-loading"),this.saved=new d.Value((!0)),this.iframe=b("<iframe />",{src:a,title:c.settings.l10n.mainIframeTitle}).appendTo(this.element),this.iframe.one("load",this.loaded),this.messenger=new d.Messenger({url:a,channel:"loader",targetWindow:this.iframe[0].contentWindow}),this.messenger.bind("ready",function(){c.messenger.send("back")}),this.messenger.bind("close",function(){b.support.history?history.back():b.support.hashchange?window.location.hash="":c.close()}),b(window).on("beforeunload",this.beforeunload),this.messenger.bind("saved",function(){c.saved(!0)}),this.messenger.bind("change",function(){c.saved(!1)}),this.messenger.bind("title",function(a){window.document.title=a}),this.pushState(a),this.trigger("open")}},pushState:function(a){var c=a.split("?")[1];b.support.history&&window.location.href!==a?history.pushState({customize:a},"",a):!b.support.history&&b.support.hashchange&&c&&(window.location.hash="wp_customize=on&"+c),this.trigger("open")},opened:function(){c.body.addClass("customize-active full-overlay-active")},close:function(){if(this.active){if(!this.saved()&&!confirm(c.settings.l10n.saveAlert))return void history.forward();this.active=!1,this.trigger("close"),this.originalDocumentTitle&&(document.title=this.originalDocumentTitle),this.link&&this.link.focus()}},closed:function(){c.iframe.remove(),c.messenger.destroy(),c.iframe=null,c.messenger=null,c.saved=null,c.body.removeClass("customize-active full-overlay-active").removeClass("customize-loading"),b(window).off("beforeunload",c.beforeunload)},loaded:function(){c.body.removeClass("customize-loading")},overlay:{show:function(){this.element.fadeIn(200,c.opened)},hide:function(){this.element.fadeOut(200,c.closed)}}}),b(function(){c.settings=_wpCustomizeLoaderSettings,c.initialize()}),d.Loader=c}(wp,jQuery);
\ No newline at end of file
index 56f1ab4a507eaccbd31c38670f5e2e3d9a5fa5bd..0e7def5114211d943188af8c82c7db9130729452 100644 (file)
@@ -1 +1 @@
-!function(a,b){var c=b.customize;c.HeaderTool={},c.HeaderTool.ImageModel=Backbone.Model.extend({defaults:function(){return{header:{attachment_id:0,url:"",timestamp:_.now(),thumbnail_url:""},choice:"",selected:!1,random:!1}},initialize:function(){this.on("hide",this.hide,this)},hide:function(){this.set("choice",""),c("header_image").set("remove-header"),c("header_image_data").set("remove-header")},destroy:function(){var a=this.get("header"),d=c.HeaderTool.currentHeader.get("header").attachment_id;d&&a.attachment_id===d&&c.HeaderTool.currentHeader.trigger("hide"),b.ajax.post("custom-header-remove",{nonce:_wpCustomizeHeader.nonces.remove,wp_customize:"on",theme:c.settings.theme.stylesheet,attachment_id:a.attachment_id}),this.trigger("destroy",this,this.collection)},save:function(){this.get("random")?(c("header_image").set(this.get("header").random),c("header_image_data").set(this.get("header").random)):this.get("header").defaultName?(c("header_image").set(this.get("header").url),c("header_image_data").set(this.get("header").defaultName)):(c("header_image").set(this.get("header").url),c("header_image_data").set(this.get("header"))),c.HeaderTool.combinedList.trigger("control:setImage",this)},importImage:function(){var a=this.get("header");void 0!==a.attachment_id&&b.ajax.post("custom-header-add",{nonce:_wpCustomizeHeader.nonces.add,wp_customize:"on",theme:c.settings.theme.stylesheet,attachment_id:a.attachment_id})},shouldBeCropped:function(){return this.get("themeFlexWidth")===!0&&this.get("themeFlexHeight")===!0?!1:this.get("themeFlexWidth")===!0&&this.get("themeHeight")===this.get("imageHeight")?!1:this.get("themeFlexHeight")===!0&&this.get("themeWidth")===this.get("imageWidth")?!1:this.get("themeWidth")===this.get("imageWidth")&&this.get("themeHeight")===this.get("imageHeight")?!1:this.get("imageWidth")<=this.get("themeWidth")?!1:!0}}),c.HeaderTool.ChoiceList=Backbone.Collection.extend({model:c.HeaderTool.ImageModel,comparator:function(a){return-a.get("header").timestamp},initialize:function(){var a=c.HeaderTool.currentHeader.get("choice").replace(/^https?:\/\//,""),b=this.isRandomChoice(c.get().header_image);this.type||(this.type="uploaded"),"undefined"==typeof this.data&&(this.data=_wpCustomizeHeader.uploads),b&&(a=c.get().header_image),this.on("control:setImage",this.setImage,this),this.on("control:removeImage",this.removeImage,this),this.on("add",this.maybeAddRandomChoice,this),_.each(this.data,function(b,c){b.attachment_id||(b.defaultName=c),"undefined"==typeof b.timestamp&&(b.timestamp=0),this.add({header:b,choice:b.url.split("/").pop(),selected:a===b.url.replace(/^https?:\/\//,"")},{silent:!0})},this),this.size()>0&&this.addRandomChoice(a)},maybeAddRandomChoice:function(){1===this.size()&&this.addRandomChoice()},addRandomChoice:function(a){var b=RegExp(this.type).test(a),c="random-"+this.type+"-image";this.add({header:{timestamp:0,random:c,width:245,height:41},choice:c,random:!0,selected:b})},isRandomChoice:function(a){return/^random-(uploaded|default)-image$/.test(a)},shouldHideTitle:function(){return this.size()<2},setImage:function(a){this.each(function(a){a.set("selected",!1)}),a&&a.set("selected",!0)},removeImage:function(){this.each(function(a){a.set("selected",!1)})}}),c.HeaderTool.DefaultsList=c.HeaderTool.ChoiceList.extend({initialize:function(){this.type="default",this.data=_wpCustomizeHeader.defaults,c.HeaderTool.ChoiceList.prototype.initialize.apply(this)}})}(jQuery,window.wp);
\ No newline at end of file
+!function(a,b){var c=b.customize;c.HeaderTool={},c.HeaderTool.ImageModel=Backbone.Model.extend({defaults:function(){return{header:{attachment_id:0,url:"",timestamp:_.now(),thumbnail_url:""},choice:"",selected:!1,random:!1}},initialize:function(){this.on("hide",this.hide,this)},hide:function(){this.set("choice",""),c("header_image").set("remove-header"),c("header_image_data").set("remove-header")},destroy:function(){var a=this.get("header"),d=c.HeaderTool.currentHeader.get("header").attachment_id;d&&a.attachment_id===d&&c.HeaderTool.currentHeader.trigger("hide"),b.ajax.post("custom-header-remove",{nonce:_wpCustomizeHeader.nonces.remove,wp_customize:"on",theme:c.settings.theme.stylesheet,attachment_id:a.attachment_id}),this.trigger("destroy",this,this.collection)},save:function(){this.get("random")?(c("header_image").set(this.get("header").random),c("header_image_data").set(this.get("header").random)):this.get("header").defaultName?(c("header_image").set(this.get("header").url),c("header_image_data").set(this.get("header").defaultName)):(c("header_image").set(this.get("header").url),c("header_image_data").set(this.get("header"))),c.HeaderTool.combinedList.trigger("control:setImage",this)},importImage:function(){var a=this.get("header");void 0!==a.attachment_id&&b.ajax.post("custom-header-add",{nonce:_wpCustomizeHeader.nonces.add,wp_customize:"on",theme:c.settings.theme.stylesheet,attachment_id:a.attachment_id})},shouldBeCropped:function(){return(this.get("themeFlexWidth")!==!0||this.get("themeFlexHeight")!==!0)&&((this.get("themeFlexWidth")!==!0||this.get("themeHeight")!==this.get("imageHeight"))&&((this.get("themeFlexHeight")!==!0||this.get("themeWidth")!==this.get("imageWidth"))&&((this.get("themeWidth")!==this.get("imageWidth")||this.get("themeHeight")!==this.get("imageHeight"))&&!(this.get("imageWidth")<=this.get("themeWidth")))))}}),c.HeaderTool.ChoiceList=Backbone.Collection.extend({model:c.HeaderTool.ImageModel,comparator:function(a){return-a.get("header").timestamp},initialize:function(){var a=c.HeaderTool.currentHeader.get("choice").replace(/^https?:\/\//,""),b=this.isRandomChoice(c.get().header_image);this.type||(this.type="uploaded"),"undefined"==typeof this.data&&(this.data=_wpCustomizeHeader.uploads),b&&(a=c.get().header_image),this.on("control:setImage",this.setImage,this),this.on("control:removeImage",this.removeImage,this),this.on("add",this.maybeAddRandomChoice,this),_.each(this.data,function(b,c){b.attachment_id||(b.defaultName=c),"undefined"==typeof b.timestamp&&(b.timestamp=0),this.add({header:b,choice:b.url.split("/").pop(),selected:a===b.url.replace(/^https?:\/\//,"")},{silent:!0})},this),this.size()>0&&this.addRandomChoice(a)},maybeAddRandomChoice:function(){1===this.size()&&this.addRandomChoice()},addRandomChoice:function(a){var b=RegExp(this.type).test(a),c="random-"+this.type+"-image";this.add({header:{timestamp:0,random:c,width:245,height:41},choice:c,random:!0,selected:b})},isRandomChoice:function(a){return/^random-(uploaded|default)-image$/.test(a)},shouldHideTitle:function(){return this.size()<2},setImage:function(a){this.each(function(a){a.set("selected",!1)}),a&&a.set("selected",!0)},removeImage:function(){this.each(function(a){a.set("selected",!1)})}}),c.HeaderTool.DefaultsList=c.HeaderTool.ChoiceList.extend({initialize:function(){this.type="default",this.data=_wpCustomizeHeader.defaults,c.HeaderTool.ChoiceList.prototype.initialize.apply(this)}})}(jQuery,window.wp);
\ No newline at end of file
index 4a7b05e4c8e7a47ef4a83aeb140aea19be236b46..e321da1662d196cf40d07c1fdc6cb7d765004e9e 100644 (file)
@@ -1 +1 @@
-wp.customize.navMenusPreview=wp.customize.MenusCustomizerPreview=function(a,b,c,d){"use strict";var e={data:{navMenuInstanceArgs:{}}};return"undefined"!=typeof _wpCustomizePreviewNavMenusExports&&b.extend(e.data,_wpCustomizePreviewNavMenusExports),e.init=function(){var a=this;d.selectiveRefresh&&(d.each(function(b){a.bindSettingListener(b)}),d.bind("add",function(b){a.bindSettingListener(b,{fire:!0})}),d.bind("remove",function(b){a.unbindSettingListener(b)}),d.selectiveRefresh.bind("render-partials-response",function(c){c.nav_menu_instance_args&&b.extend(a.data.navMenuInstanceArgs,c.nav_menu_instance_args)})),d.preview.bind("active",function(){a.highlightControls()})},d.selectiveRefresh&&(e.NavMenuInstancePartial=d.selectiveRefresh.Partial.extend({initialize:function(a,c){var e,f,g=this;if(e=a.match(/^nav_menu_instance\[([0-9a-f]{32})]$/),!e)throw new Error("Illegal id for nav_menu_instance partial. The key corresponds with the args HMAC.");if(f=e[1],c=c||{},c.params=b.extend({selector:'[data-customize-partial-id="'+a+'"]',navMenuArgs:c.constructingContainerContext||{},containerInclusive:!0},c.params||{}),d.selectiveRefresh.Partial.prototype.initialize.call(g,a,c),!b.isObject(g.params.navMenuArgs))throw new Error("Missing navMenuArgs");if(g.params.navMenuArgs.args_hmac!==f)throw new Error("args_hmac mismatch with id")},isRelatedSetting:function(a,c,e){var f,g,h,i=this;if(b.isString(a)&&(a=d(a)),h=/^nav_menu_item\[/.test(a.id),h&&b.isObject(c)&&b.isObject(e)&&(delete c.type_label,delete e.type_label,b.isEqual(e,c)))return!1;if(i.params.navMenuArgs.theme_location){if("nav_menu_locations["+i.params.navMenuArgs.theme_location+"]"===a.id)return!0;f=d("nav_menu_locations["+i.params.navMenuArgs.theme_location+"]")}return g=i.params.navMenuArgs.menu,!g&&f&&(g=f()),g?"nav_menu["+g+"]"===a.id||h&&(c&&c.nav_menu_term_id===g||e&&e.nav_menu_term_id===g):!1},refresh:function(){var c,e=this,f=a.Deferred();return b.isNumber(e.params.navMenuArgs.menu)?c=e.params.navMenuArgs.menu:e.params.navMenuArgs.theme_location&&d.has("nav_menu_locations["+e.params.navMenuArgs.theme_location+"]")&&(c=d("nav_menu_locations["+e.params.navMenuArgs.theme_location+"]").get()),c?d.selectiveRefresh.Partial.prototype.refresh.call(e):(e.fallback(),f.reject(),f.promise())},renderContent:function(b){var c=this,e=b.container;""===b.addedContent&&b.partial.fallback(),d.selectiveRefresh.Partial.prototype.renderContent.call(c,b)&&a(document).trigger("customize-preview-menu-refreshed",[{instanceNumber:null,wpNavArgs:b.context,wpNavMenuArgs:b.context,oldContainer:e,newContainer:b.container}])}}),d.selectiveRefresh.partialConstructor.nav_menu_instance=e.NavMenuInstancePartial,e.handleUnplacedNavMenuInstances=function(a){var c;return c=b.filter(b.values(e.data.navMenuInstanceArgs),function(a){return!d.selectiveRefresh.partial.has("nav_menu_instance["+a.args_hmac+"]")}),b.findWhere(c,a)?(d.selectiveRefresh.requestFullRefresh(),!0):!1},e.bindSettingListener=function(a,b){var c;return b=b||{},(c=a.id.match(/^nav_menu\[(-?\d+)]$/))?(a._navMenuId=parseInt(c[1],10),a.bind(this.onChangeNavMenuSetting),b.fire&&this.onChangeNavMenuSetting.call(a,a(),!1),!0):(c=a.id.match(/^nav_menu_item\[(-?\d+)]$/))?(a._navMenuItemId=parseInt(c[1],10),a.bind(this.onChangeNavMenuItemSetting),b.fire&&this.onChangeNavMenuItemSetting.call(a,a(),!1),!0):(c=a.id.match(/^nav_menu_locations\[(.+?)]/),c?(a._navMenuThemeLocation=c[1],a.bind(this.onChangeNavMenuLocationsSetting),b.fire&&this.onChangeNavMenuLocationsSetting.call(a,a(),!1),!0):!1)},e.unbindSettingListener=function(a){a.unbind(this.onChangeNavMenuSetting),a.unbind(this.onChangeNavMenuItemSetting),a.unbind(this.onChangeNavMenuLocationsSetting)},e.onChangeNavMenuSetting=function(){var a=this;e.handleUnplacedNavMenuInstances({menu:a._navMenuId}),d.each(function(b){b._navMenuThemeLocation&&a._navMenuId===b()&&e.handleUnplacedNavMenuInstances({theme_location:b._navMenuThemeLocation})})},e.onChangeNavMenuItemSetting=function(a,b){var c,f=a||b;c=d("nav_menu["+String(f.nav_menu_term_id)+"]"),c&&e.onChangeNavMenuSetting.call(c)},e.onChangeNavMenuLocationsSetting=function(){var a,c=this;e.handleUnplacedNavMenuInstances({theme_location:c._navMenuThemeLocation}),a=!!b.findWhere(b.values(e.data.navMenuInstanceArgs),{theme_location:c._navMenuThemeLocation}),a||d.selectiveRefresh.requestFullRefresh()}),e.highlightControls=function(){var b=".menu-item";a(document).on("click",b,function(b){var c;b.shiftKey&&(c=a(this).attr("class").match(/(?:^|\s)menu-item-(\d+)(?:\s|$)/),c&&(b.preventDefault(),b.stopPropagation(),d.preview.send("focus-nav-menu-item-control",parseInt(c[1],10))))})},d.bind("preview-ready",function(){e.init()}),e}(jQuery,_,wp,wp.customize);
\ No newline at end of file
+wp.customize.navMenusPreview=wp.customize.MenusCustomizerPreview=function(a,b,c,d){"use strict";var e={data:{navMenuInstanceArgs:{}}};return"undefined"!=typeof _wpCustomizePreviewNavMenusExports&&b.extend(e.data,_wpCustomizePreviewNavMenusExports),e.init=function(){var a=this;d.selectiveRefresh&&(d.each(function(b){a.bindSettingListener(b)}),d.bind("add",function(b){a.bindSettingListener(b,{fire:!0})}),d.bind("remove",function(b){a.unbindSettingListener(b)}),d.selectiveRefresh.bind("render-partials-response",function(c){c.nav_menu_instance_args&&b.extend(a.data.navMenuInstanceArgs,c.nav_menu_instance_args)})),d.preview.bind("active",function(){a.highlightControls()})},d.selectiveRefresh&&(e.NavMenuInstancePartial=d.selectiveRefresh.Partial.extend({initialize:function(a,c){var e,f,g=this;if(e=a.match(/^nav_menu_instance\[([0-9a-f]{32})]$/),!e)throw new Error("Illegal id for nav_menu_instance partial. The key corresponds with the args HMAC.");if(f=e[1],c=c||{},c.params=b.extend({selector:'[data-customize-partial-id="'+a+'"]',navMenuArgs:c.constructingContainerContext||{},containerInclusive:!0},c.params||{}),d.selectiveRefresh.Partial.prototype.initialize.call(g,a,c),!b.isObject(g.params.navMenuArgs))throw new Error("Missing navMenuArgs");if(g.params.navMenuArgs.args_hmac!==f)throw new Error("args_hmac mismatch with id")},isRelatedSetting:function(a,c,e){var f,g,h,i=this;if(b.isString(a)&&(a=d(a)),h=/^nav_menu_item\[/.test(a.id),h&&b.isObject(c)&&b.isObject(e)&&(delete c.type_label,delete e.type_label,b.isEqual(e,c)))return!1;if(i.params.navMenuArgs.theme_location){if("nav_menu_locations["+i.params.navMenuArgs.theme_location+"]"===a.id)return!0;f=d("nav_menu_locations["+i.params.navMenuArgs.theme_location+"]")}return g=i.params.navMenuArgs.menu,!g&&f&&(g=f()),!!g&&("nav_menu["+g+"]"===a.id||h&&(c&&c.nav_menu_term_id===g||e&&e.nav_menu_term_id===g))},refresh:function(){var c,e=this,f=a.Deferred();return b.isNumber(e.params.navMenuArgs.menu)?c=e.params.navMenuArgs.menu:e.params.navMenuArgs.theme_location&&d.has("nav_menu_locations["+e.params.navMenuArgs.theme_location+"]")&&(c=d("nav_menu_locations["+e.params.navMenuArgs.theme_location+"]").get()),c?d.selectiveRefresh.Partial.prototype.refresh.call(e):(e.fallback(),f.reject(),f.promise())},renderContent:function(b){var c=this,e=b.container;""===b.addedContent&&b.partial.fallback(),d.selectiveRefresh.Partial.prototype.renderContent.call(c,b)&&a(document).trigger("customize-preview-menu-refreshed",[{instanceNumber:null,wpNavArgs:b.context,wpNavMenuArgs:b.context,oldContainer:e,newContainer:b.container}])}}),d.selectiveRefresh.partialConstructor.nav_menu_instance=e.NavMenuInstancePartial,e.handleUnplacedNavMenuInstances=function(a){var c;return c=b.filter(b.values(e.data.navMenuInstanceArgs),function(a){return!d.selectiveRefresh.partial.has("nav_menu_instance["+a.args_hmac+"]")}),!!b.findWhere(c,a)&&(d.selectiveRefresh.requestFullRefresh(),!0)},e.bindSettingListener=function(a,b){var c;return b=b||{},(c=a.id.match(/^nav_menu\[(-?\d+)]$/))?(a._navMenuId=parseInt(c[1],10),a.bind(this.onChangeNavMenuSetting),b.fire&&this.onChangeNavMenuSetting.call(a,a(),!1),!0):(c=a.id.match(/^nav_menu_item\[(-?\d+)]$/))?(a._navMenuItemId=parseInt(c[1],10),a.bind(this.onChangeNavMenuItemSetting),b.fire&&this.onChangeNavMenuItemSetting.call(a,a(),!1),!0):(c=a.id.match(/^nav_menu_locations\[(.+?)]/),!!c&&(a._navMenuThemeLocation=c[1],a.bind(this.onChangeNavMenuLocationsSetting),b.fire&&this.onChangeNavMenuLocationsSetting.call(a,a(),!1),!0))},e.unbindSettingListener=function(a){a.unbind(this.onChangeNavMenuSetting),a.unbind(this.onChangeNavMenuItemSetting),a.unbind(this.onChangeNavMenuLocationsSetting)},e.onChangeNavMenuSetting=function(){var a=this;e.handleUnplacedNavMenuInstances({menu:a._navMenuId}),d.each(function(b){b._navMenuThemeLocation&&a._navMenuId===b()&&e.handleUnplacedNavMenuInstances({theme_location:b._navMenuThemeLocation})})},e.onChangeNavMenuItemSetting=function(a,b){var c,f=a||b;c=d("nav_menu["+String(f.nav_menu_term_id)+"]"),c&&e.onChangeNavMenuSetting.call(c)},e.onChangeNavMenuLocationsSetting=function(){var a,c=this;e.handleUnplacedNavMenuInstances({theme_location:c._navMenuThemeLocation}),a=!!b.findWhere(b.values(e.data.navMenuInstanceArgs),{theme_location:c._navMenuThemeLocation}),a||d.selectiveRefresh.requestFullRefresh()}),e.highlightControls=function(){var b=".menu-item";a(document).on("click",b,function(b){var c;b.shiftKey&&(c=a(this).attr("class").match(/(?:^|\s)menu-item-(\d+)(?:\s|$)/),c&&(b.preventDefault(),b.stopPropagation(),d.preview.send("focus-nav-menu-item-control",parseInt(c[1],10))))})},d.bind("preview-ready",function(){e.init()}),e}(jQuery,_,wp,wp.customize);
\ No newline at end of file
index b22087b64a2585fd6d2737fb092aa2a97858d9b5..47972784f9101769a42f91368ac83a13ad585453 100644 (file)
@@ -372,10 +372,15 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
                                }
 
                                widgetContainerElement = $(
-                                       sidebarPartial.params.sidebarArgs.before_widget.replace( '%1$s', widgetId ).replace( '%2$s', 'widget' ) +
+                                       sidebarPartial.params.sidebarArgs.before_widget.replace( /%1\$s/g, widgetId ).replace( /%2\$s/g, 'widget' ) +
                                        sidebarPartial.params.sidebarArgs.after_widget
                                );
 
+                               // Handle rare case where before_widget and after_widget are empty.
+                               if ( ! widgetContainerElement[0] ) {
+                                       return;
+                               }
+
                                widgetContainerElement.attr( 'data-customize-partial-id', widgetPartial.id );
                                widgetContainerElement.attr( 'data-customize-partial-type', 'widget' );
                                widgetContainerElement.attr( 'data-customize-widget-id', widgetId );
@@ -511,7 +516,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
 
                $.each( self.registeredSidebars, function( i, sidebar ) {
                        var widgetTpl = [
-                                       sidebar.before_widget.replace( '%1$s', '' ).replace( '%2$s', '' ),
+                                       sidebar.before_widget,
                                        sidebar.before_title,
                                        sidebar.after_title,
                                        sidebar.after_widget
@@ -521,19 +526,18 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
                                widgetClasses;
 
                        emptyWidget = $( widgetTpl );
-                       widgetSelector = emptyWidget.prop( 'tagName' );
-                       widgetClasses = emptyWidget.prop( 'className' );
+                       widgetSelector = emptyWidget.prop( 'tagName' ) || '';
+                       widgetClasses = emptyWidget.prop( 'className' ) || '';
 
                        // Prevent a rare case when before_widget, before_title, after_title and after_widget is empty.
                        if ( ! widgetClasses ) {
                                return;
                        }
 
+                       // Remove class names that incorporate the string formatting placeholders %1$s and %2$s.
+                       widgetClasses = widgetClasses.replace( /\S*%[12]\$s\S*/g, '' );
                        widgetClasses = widgetClasses.replace( /^\s+|\s+$/g, '' );
-
-                       if ( widgetClasses ) {
-                               widgetSelector += '.' + widgetClasses.split( /\s+/ ).join( '.' );
-                       }
+                       widgetSelector += '.' + widgetClasses.split( /\s+/ ).join( '.' );
                        self.widgetSelectors.push( widgetSelector );
                });
        };
index 05197425b41adbc005cf3cdf3f013a53b0b4703b..8a8e2bb7dbca180057ac18e742aca20bdcfff633 100644 (file)
@@ -1 +1 @@
-wp.customize.widgetsPreview=wp.customize.WidgetCustomizerPreview=function(a,b,c,d){var e;return e={renderedSidebars:{},renderedWidgets:{},registeredSidebars:[],registeredWidgets:{},widgetSelectors:[],preview:null,l10n:{widgetTooltip:""},selectiveRefreshableWidgets:{}},e.init=function(){var a=this;a.preview=d.preview,b.isEmpty(a.selectiveRefreshableWidgets)||a.addPartials(),a.buildWidgetSelectors(),a.highlightControls(),a.preview.bind("highlight-widget",a.highlightWidget),d.preview.bind("active",function(){a.highlightControls()})},e.WidgetPartial=d.selectiveRefresh.Partial.extend({initialize:function(a,c){var f,g=this;if(f=a.match(/^widget\[(.+)]$/),!f)throw new Error("Illegal id for widget partial.");g.widgetId=f[1],g.widgetIdParts=e.parseWidgetId(g.widgetId),c=c||{},c.params=b.extend({settings:[e.getWidgetSettingId(g.widgetId)],containerInclusive:!0},c.params||{}),d.selectiveRefresh.Partial.prototype.initialize.call(g,a,c)},refresh:function(){var b,c=this;return e.selectiveRefreshableWidgets[c.widgetIdParts.idBase]?d.selectiveRefresh.Partial.prototype.refresh.call(c):(b=a.Deferred(),b.reject(),c.fallback(),b.promise())},renderContent:function(a){var b=this;d.selectiveRefresh.Partial.prototype.renderContent.call(b,a)&&(d.preview.send("widget-updated",b.widgetId),d.selectiveRefresh.trigger("widget-updated",b))}}),e.SidebarPartial=d.selectiveRefresh.Partial.extend({initialize:function(a,c){var e,f=this;if(e=a.match(/^sidebar\[(.+)]$/),!e)throw new Error("Illegal id for sidebar partial.");if(f.sidebarId=e[1],c=c||{},c.params=b.extend({settings:["sidebars_widgets["+f.sidebarId+"]"]},c.params||{}),d.selectiveRefresh.Partial.prototype.initialize.call(f,a,c),!f.params.sidebarArgs)throw new Error("The sidebarArgs param was not provided.");if(f.params.settings.length>1)throw new Error("Expected SidebarPartial to only have one associated setting")},ready:function(){var a=this;b.each(a.settings(),function(c){d(c).bind(b.bind(a.handleSettingChange,a))}),d.selectiveRefresh.bind("partial-content-rendered",function(c){var f=c.partial.extended(e.WidgetPartial)&&-1!==b.indexOf(a.getWidgetIds(),c.partial.widgetId);f&&d.selectiveRefresh.trigger("sidebar-updated",a)}),d.bind("change",function(c){var d,f;f=e.parseWidgetSettingId(c.id),f&&(d=f.idBase,f.number&&(d+="-"+String(f.number)),-1!==b.indexOf(a.getWidgetIds(),d)&&a.ensureWidgetPlacementContainers(d))})},findDynamicSidebarBoundaryNodes:function(){var a,c,d=this,e={};return a=/^(dynamic_sidebar_before|dynamic_sidebar_after):(.+):(\d+)$/,c=function(f){b.each(f,function(f){var g;if(8===f.nodeType){if(g=f.nodeValue.match(a),!g||g[2]!==d.sidebarId)return;b.isUndefined(e[g[3]])&&(e[g[3]]={before:null,after:null,instanceNumber:parseInt(g[3],10)}),"dynamic_sidebar_before"===g[1]?e[g[3]].before=f:e[g[3]].after=f}else 1===f.nodeType&&c(f.childNodes)})},c(document.body.childNodes),b.values(e)},placements:function(){var a=this;return b.map(a.findDynamicSidebarBoundaryNodes(),function(b){return new d.selectiveRefresh.Placement({partial:a,container:null,startNode:b.before,endNode:b.after,context:{instanceNumber:b.instanceNumber}})})},getWidgetIds:function(){var a,c,e=this;if(a=e.settings()[0],!a)throw new Error("Missing associated setting.");if(!d.has(a))throw new Error("Setting does not exist.");if(c=d(a).get(),!b.isArray(c))throw new Error("Expected setting to be array of widget IDs");return c.slice(0)},reflowWidgets:function(){var a,c,e,f=this,g=[];return c=f.getWidgetIds(),a=f.placements(),e={},b.each(c,function(a){var b=d.selectiveRefresh.partial("widget["+a+"]");b&&(e[a]=b)}),b.each(a,function(a){var c,f=[],h=!1,i=-1;b.each(e,function(d){b.each(d.placements(),function(b){a.context.instanceNumber===b.context.sidebar_instance_number&&(c=b.container.index(),f.push({partial:d,placement:b,position:c}),i>c&&(h=!0),i=c)})}),h&&(b.each(f,function(b){a.endNode.parentNode.insertBefore(b.placement.container[0],a.endNode),d.selectiveRefresh.trigger("partial-content-moved",b.placement)}),g.push(a))}),g.length>0&&d.selectiveRefresh.trigger("sidebar-updated",f),g},ensureWidgetPlacementContainers:function(c){var f,g=this,h=!1,i="widget["+c+"]";return f=d.selectiveRefresh.partial(i),f||(f=new e.WidgetPartial(i,{params:{}}),d.selectiveRefresh.partial.add(f.id,f)),b.each(g.placements(),function(d){var e,i;e=b.find(f.placements(),function(a){return a.context.sidebar_instance_number===d.context.instanceNumber}),e||(i=a(g.params.sidebarArgs.before_widget.replace("%1$s",c).replace("%2$s","widget")+g.params.sidebarArgs.after_widget),i.attr("data-customize-partial-id",f.id),i.attr("data-customize-partial-type","widget"),i.attr("data-customize-widget-id",c),i.data("customize-partial-placement-context",{sidebar_id:g.sidebarId,sidebar_instance_number:d.context.instanceNumber}),d.endNode.parentNode.insertBefore(i[0],d.endNode),h=!0)}),h&&g.reflowWidgets(),f},handleSettingChange:function(a,c){var e,f,g,h=this,i=[];return(e=c.length>0&&0===a.length||a.length>0&&0===c.length)?void h.fallback():(f=b.difference(c,a),b.each(f,function(a){var c=d.selectiveRefresh.partial("widget["+a+"]");c&&b.each(c.placements(),function(a){var b=a.context.sidebar_id===h.sidebarId||a.context.sidebar_args&&a.context.sidebar_args.id===h.sidebarId;b&&a.container.remove()})}),g=b.difference(a,c),b.each(g,function(a){var b=h.ensureWidgetPlacementContainers(a);i.push(b)}),b.each(i,function(a){a.refresh()}),void d.selectiveRefresh.trigger("sidebar-updated",h))},refresh:function(){var c=this,e=a.Deferred();return e.fail(function(){c.fallback()}),0===c.placements().length?e.reject():(b.each(c.reflowWidgets(),function(a){d.selectiveRefresh.trigger("partial-content-rendered",a)}),e.resolve()),e.promise()}}),d.selectiveRefresh.partialConstructor.sidebar=e.SidebarPartial,d.selectiveRefresh.partialConstructor.widget=e.WidgetPartial,e.addPartials=function(){b.each(e.registeredSidebars,function(a){var b,c="sidebar["+a.id+"]";b=d.selectiveRefresh.partial(c),b||(b=new e.SidebarPartial(c,{params:{sidebarArgs:a}}),d.selectiveRefresh.partial.add(b.id,b))})},e.buildWidgetSelectors=function(){var b=this;a.each(b.registeredSidebars,function(c,d){var e,f,g,h=[d.before_widget.replace("%1$s","").replace("%2$s",""),d.before_title,d.after_title,d.after_widget].join("");e=a(h),f=e.prop("tagName"),g=e.prop("className"),g&&(g=g.replace(/^\s+|\s+$/g,""),g&&(f+="."+g.split(/\s+/).join(".")),b.widgetSelectors.push(f))})},e.highlightWidget=function(b){var c=a(document.body),d=a("#"+b);c.find(".widget-customizer-highlighted-widget").removeClass("widget-customizer-highlighted-widget"),d.addClass("widget-customizer-highlighted-widget"),setTimeout(function(){d.removeClass("widget-customizer-highlighted-widget")},500)},e.highlightControls=function(){var b=this,c=this.widgetSelectors.join(",");a(c).attr("title",this.l10n.widgetTooltip),a(document).on("mouseenter",c,function(){b.preview.send("highlight-widget-control",a(this).prop("id"))}),a(document).on("click",c,function(c){c.shiftKey&&(c.preventDefault(),b.preview.send("focus-widget-control",a(this).prop("id")))})},e.parseWidgetId=function(a){var b,c={idBase:"",number:null};return b=a.match(/^(.+)-(\d+)$/),b?(c.idBase=b[1],c.number=parseInt(b[2],10)):c.idBase=a,c},e.parseWidgetSettingId=function(a){var b,c={idBase:"",number:null};return(b=a.match(/^widget_([^\[]+?)(?:\[(\d+)])?$/))?(c.idBase=b[1],b[2]&&(c.number=parseInt(b[2],10)),c):null},e.getWidgetSettingId=function(a){var b,c=this.parseWidgetId(a);return b="widget_"+c.idBase,c.number&&(b+="["+String(c.number)+"]"),b},d.bind("preview-ready",function(){a.extend(e,_wpWidgetCustomizerPreviewSettings),e.init()}),e}(jQuery,_,wp,wp.customize);
\ No newline at end of file
+wp.customize.widgetsPreview=wp.customize.WidgetCustomizerPreview=function(a,b,c,d){var e;return e={renderedSidebars:{},renderedWidgets:{},registeredSidebars:[],registeredWidgets:{},widgetSelectors:[],preview:null,l10n:{widgetTooltip:""},selectiveRefreshableWidgets:{}},e.init=function(){var a=this;a.preview=d.preview,b.isEmpty(a.selectiveRefreshableWidgets)||a.addPartials(),a.buildWidgetSelectors(),a.highlightControls(),a.preview.bind("highlight-widget",a.highlightWidget),d.preview.bind("active",function(){a.highlightControls()})},e.WidgetPartial=d.selectiveRefresh.Partial.extend({initialize:function(a,c){var f,g=this;if(f=a.match(/^widget\[(.+)]$/),!f)throw new Error("Illegal id for widget partial.");g.widgetId=f[1],g.widgetIdParts=e.parseWidgetId(g.widgetId),c=c||{},c.params=b.extend({settings:[e.getWidgetSettingId(g.widgetId)],containerInclusive:!0},c.params||{}),d.selectiveRefresh.Partial.prototype.initialize.call(g,a,c)},refresh:function(){var b,c=this;return e.selectiveRefreshableWidgets[c.widgetIdParts.idBase]?d.selectiveRefresh.Partial.prototype.refresh.call(c):(b=a.Deferred(),b.reject(),c.fallback(),b.promise())},renderContent:function(a){var b=this;d.selectiveRefresh.Partial.prototype.renderContent.call(b,a)&&(d.preview.send("widget-updated",b.widgetId),d.selectiveRefresh.trigger("widget-updated",b))}}),e.SidebarPartial=d.selectiveRefresh.Partial.extend({initialize:function(a,c){var e,f=this;if(e=a.match(/^sidebar\[(.+)]$/),!e)throw new Error("Illegal id for sidebar partial.");if(f.sidebarId=e[1],c=c||{},c.params=b.extend({settings:["sidebars_widgets["+f.sidebarId+"]"]},c.params||{}),d.selectiveRefresh.Partial.prototype.initialize.call(f,a,c),!f.params.sidebarArgs)throw new Error("The sidebarArgs param was not provided.");if(f.params.settings.length>1)throw new Error("Expected SidebarPartial to only have one associated setting")},ready:function(){var a=this;b.each(a.settings(),function(c){d(c).bind(b.bind(a.handleSettingChange,a))}),d.selectiveRefresh.bind("partial-content-rendered",function(c){var f=c.partial.extended(e.WidgetPartial)&&-1!==b.indexOf(a.getWidgetIds(),c.partial.widgetId);f&&d.selectiveRefresh.trigger("sidebar-updated",a)}),d.bind("change",function(c){var d,f;f=e.parseWidgetSettingId(c.id),f&&(d=f.idBase,f.number&&(d+="-"+String(f.number)),-1!==b.indexOf(a.getWidgetIds(),d)&&a.ensureWidgetPlacementContainers(d))})},findDynamicSidebarBoundaryNodes:function(){var a,c,d=this,e={};return a=/^(dynamic_sidebar_before|dynamic_sidebar_after):(.+):(\d+)$/,c=function(f){b.each(f,function(f){var g;if(8===f.nodeType){if(g=f.nodeValue.match(a),!g||g[2]!==d.sidebarId)return;b.isUndefined(e[g[3]])&&(e[g[3]]={before:null,after:null,instanceNumber:parseInt(g[3],10)}),"dynamic_sidebar_before"===g[1]?e[g[3]].before=f:e[g[3]].after=f}else 1===f.nodeType&&c(f.childNodes)})},c(document.body.childNodes),b.values(e)},placements:function(){var a=this;return b.map(a.findDynamicSidebarBoundaryNodes(),function(b){return new d.selectiveRefresh.Placement({partial:a,container:null,startNode:b.before,endNode:b.after,context:{instanceNumber:b.instanceNumber}})})},getWidgetIds:function(){var a,c,e=this;if(a=e.settings()[0],!a)throw new Error("Missing associated setting.");if(!d.has(a))throw new Error("Setting does not exist.");if(c=d(a).get(),!b.isArray(c))throw new Error("Expected setting to be array of widget IDs");return c.slice(0)},reflowWidgets:function(){var a,c,e,f=this,g=[];return c=f.getWidgetIds(),a=f.placements(),e={},b.each(c,function(a){var b=d.selectiveRefresh.partial("widget["+a+"]");b&&(e[a]=b)}),b.each(a,function(a){var c,f=[],h=!1,i=-1;b.each(e,function(d){b.each(d.placements(),function(b){a.context.instanceNumber===b.context.sidebar_instance_number&&(c=b.container.index(),f.push({partial:d,placement:b,position:c}),c<i&&(h=!0),i=c)})}),h&&(b.each(f,function(b){a.endNode.parentNode.insertBefore(b.placement.container[0],a.endNode),d.selectiveRefresh.trigger("partial-content-moved",b.placement)}),g.push(a))}),g.length>0&&d.selectiveRefresh.trigger("sidebar-updated",f),g},ensureWidgetPlacementContainers:function(c){var f,g=this,h=!1,i="widget["+c+"]";return f=d.selectiveRefresh.partial(i),f||(f=new e.WidgetPartial(i,{params:{}}),d.selectiveRefresh.partial.add(f.id,f)),b.each(g.placements(),function(d){var e,i;e=b.find(f.placements(),function(a){return a.context.sidebar_instance_number===d.context.instanceNumber}),e||(i=a(g.params.sidebarArgs.before_widget.replace(/%1\$s/g,c).replace(/%2\$s/g,"widget")+g.params.sidebarArgs.after_widget),i[0]&&(i.attr("data-customize-partial-id",f.id),i.attr("data-customize-partial-type","widget"),i.attr("data-customize-widget-id",c),i.data("customize-partial-placement-context",{sidebar_id:g.sidebarId,sidebar_instance_number:d.context.instanceNumber}),d.endNode.parentNode.insertBefore(i[0],d.endNode),h=!0))}),h&&g.reflowWidgets(),f},handleSettingChange:function(a,c){var e,f,g,h=this,i=[];return(e=c.length>0&&0===a.length||a.length>0&&0===c.length)?void h.fallback():(f=b.difference(c,a),b.each(f,function(a){var c=d.selectiveRefresh.partial("widget["+a+"]");c&&b.each(c.placements(),function(a){var b=a.context.sidebar_id===h.sidebarId||a.context.sidebar_args&&a.context.sidebar_args.id===h.sidebarId;b&&a.container.remove()})}),g=b.difference(a,c),b.each(g,function(a){var b=h.ensureWidgetPlacementContainers(a);i.push(b)}),b.each(i,function(a){a.refresh()}),void d.selectiveRefresh.trigger("sidebar-updated",h))},refresh:function(){var c=this,e=a.Deferred();return e.fail(function(){c.fallback()}),0===c.placements().length?e.reject():(b.each(c.reflowWidgets(),function(a){d.selectiveRefresh.trigger("partial-content-rendered",a)}),e.resolve()),e.promise()}}),d.selectiveRefresh.partialConstructor.sidebar=e.SidebarPartial,d.selectiveRefresh.partialConstructor.widget=e.WidgetPartial,e.addPartials=function(){b.each(e.registeredSidebars,function(a){var b,c="sidebar["+a.id+"]";b=d.selectiveRefresh.partial(c),b||(b=new e.SidebarPartial(c,{params:{sidebarArgs:a}}),d.selectiveRefresh.partial.add(b.id,b))})},e.buildWidgetSelectors=function(){var b=this;a.each(b.registeredSidebars,function(c,d){var e,f,g,h=[d.before_widget,d.before_title,d.after_title,d.after_widget].join("");e=a(h),f=e.prop("tagName")||"",g=e.prop("className")||"",g&&(g=g.replace(/\S*%[12]\$s\S*/g,""),g=g.replace(/^\s+|\s+$/g,""),f+="."+g.split(/\s+/).join("."),b.widgetSelectors.push(f))})},e.highlightWidget=function(b){var c=a(document.body),d=a("#"+b);c.find(".widget-customizer-highlighted-widget").removeClass("widget-customizer-highlighted-widget"),d.addClass("widget-customizer-highlighted-widget"),setTimeout(function(){d.removeClass("widget-customizer-highlighted-widget")},500)},e.highlightControls=function(){var b=this,c=this.widgetSelectors.join(",");a(c).attr("title",this.l10n.widgetTooltip),a(document).on("mouseenter",c,function(){b.preview.send("highlight-widget-control",a(this).prop("id"))}),a(document).on("click",c,function(c){c.shiftKey&&(c.preventDefault(),b.preview.send("focus-widget-control",a(this).prop("id")))})},e.parseWidgetId=function(a){var b,c={idBase:"",number:null};return b=a.match(/^(.+)-(\d+)$/),b?(c.idBase=b[1],c.number=parseInt(b[2],10)):c.idBase=a,c},e.parseWidgetSettingId=function(a){var b,c={idBase:"",number:null};return(b=a.match(/^widget_([^\[]+?)(?:\[(\d+)])?$/))?(c.idBase=b[1],b[2]&&(c.number=parseInt(b[2],10)),c):null},e.getWidgetSettingId=function(a){var b,c=this.parseWidgetId(a);return b="widget_"+c.idBase,c.number&&(b+="["+String(c.number)+"]"),b},d.bind("preview-ready",function(){a.extend(e,_wpWidgetCustomizerPreviewSettings),e.init()}),e}(jQuery,_,wp,wp.customize);
\ No newline at end of file
index ac77551bfd748b9acea8d2b0225b0f8b63a30caf..f5569ed13d05a3a827f03ee673de3a23cd43e526 100644 (file)
                api.preview.send( 'ready', {
                        activePanels: api.settings.activePanels,
                        activeSections: api.settings.activeSections,
-                       activeControls: api.settings.activeControls
+                       activeControls: api.settings.activeControls,
+                       settingValidities: api.settings.settingValidities
                } );
 
                // Display a loading indicator when preview is reloading, and remove on failure.
index d3fd1df2ac5e5fca830627f9b5b8ff967c2d54df..e8413394e98d0fe814045f8fb9114e46c3869059 100644 (file)
@@ -1 +1 @@
-!function(a,b){var c,d=wp.customize;c=function(a,b,c){var d;return function(){var e=arguments;c=c||this,clearTimeout(d),d=setTimeout(function(){d=null,a.apply(c,e)},b)}},d.Preview=d.Messenger.extend({initialize:function(a,e){var f=this;d.Messenger.prototype.initialize.call(this,a,e),this.body=b(document.body),this.body.on("click.preview","a",function(a){var c,d;c=b(this),d="#"===c.attr("href").substr(0,1),a.preventDefault(),d&&"#"!==c.attr("href")&&b(c.attr("href")).each(function(){this.scrollIntoView()}),a.shiftKey||d||(f.send("scroll",0),f.send("url",c.prop("href")))}),this.body.on("submit.preview","form",function(a){a.preventDefault()}),this.window=b(window),this.window.on("scroll.preview",c(function(){f.send("scroll",f.window.scrollTop())},200)),this.bind("scroll",function(a){f.window.scrollTop(a)})}}),b(function(){var a,c;d.settings=window._wpCustomizeSettings,d.settings&&(d.preview=new d.Preview({url:window.location.href,channel:d.settings.channel}),c=function(a,b,c){var e=d(a);e?e.set(b):(c=c||!1,e=d.create(a,b,{id:a}),c&&(e._dirty=!0))},d.preview.bind("settings",function(a){b.each(a,c)}),d.preview.trigger("settings",d.settings.values),b.each(d.settings._dirty,function(a,b){var c=d(b);c&&(c._dirty=!0)}),d.preview.bind("setting",function(a){var b=!0;c.apply(null,a.concat(b))}),d.preview.bind("sync",function(a){b.each(a,function(a,b){d.preview.trigger(a,b)}),d.preview.send("synced")}),d.preview.bind("active",function(){d.preview.send("nonce",d.settings.nonce),d.preview.send("documentTitle",document.title)}),d.preview.bind("saved",function(a){d.trigger("saved",a)}),d.bind("saved",function(){d.each(function(a){a._dirty=!1})}),d.preview.bind("nonce-refresh",function(a){b.extend(d.settings.nonce,a)}),d.preview.send("ready",{activePanels:d.settings.activePanels,activeSections:d.settings.activeSections,activeControls:d.settings.activeControls}),d.preview.bind("loading-initiated",function(){b("body").addClass("wp-customizer-unloading")}),d.preview.bind("loading-failed",function(){b("body").removeClass("wp-customizer-unloading")}),a=b.map(["color","image","position_x","repeat","attachment"],function(a){return"background_"+a}),d.when.apply(d,a).done(function(a,c,d,e,f){var g,h=b(document.body),i=b("head"),j=b("#custom-background-css");g=function(){var g="";h.toggleClass("custom-background",!(!a()&&!c())),a()&&(g+="background-color: "+a()+";"),c()&&(g+='background-image: url("'+c()+'");',g+="background-position: top "+d()+";",g+="background-repeat: "+e()+";",g+="background-attachment: "+f()+";"),j.remove(),j=b('<style type="text/css" id="custom-background-css">body.custom-background { '+g+" }</style>").appendTo(i)},b.each(arguments,function(){this.bind(g)})}),d("custom_logo",function(a){b("body").toggleClass("wp-custom-logo",!!a.get()),a.bind(function(a){b("body").toggleClass("wp-custom-logo",!!a)})}),d.trigger("preview-ready"))})}(wp,jQuery);
\ No newline at end of file
+!function(a,b){var c,d=wp.customize;c=function(a,b,c){var d;return function(){var e=arguments;c=c||this,clearTimeout(d),d=setTimeout(function(){d=null,a.apply(c,e)},b)}},d.Preview=d.Messenger.extend({initialize:function(a,e){var f=this;d.Messenger.prototype.initialize.call(this,a,e),this.body=b(document.body),this.body.on("click.preview","a",function(a){var c,d;c=b(this),d="#"===c.attr("href").substr(0,1),a.preventDefault(),d&&"#"!==c.attr("href")&&b(c.attr("href")).each(function(){this.scrollIntoView()}),a.shiftKey||d||(f.send("scroll",0),f.send("url",c.prop("href")))}),this.body.on("submit.preview","form",function(a){a.preventDefault()}),this.window=b(window),this.window.on("scroll.preview",c(function(){f.send("scroll",f.window.scrollTop())},200)),this.bind("scroll",function(a){f.window.scrollTop(a)})}}),b(function(){var a,c;d.settings=window._wpCustomizeSettings,d.settings&&(d.preview=new d.Preview({url:window.location.href,channel:d.settings.channel}),c=function(a,b,c){var e=d(a);e?e.set(b):(c=c||!1,e=d.create(a,b,{id:a}),c&&(e._dirty=!0))},d.preview.bind("settings",function(a){b.each(a,c)}),d.preview.trigger("settings",d.settings.values),b.each(d.settings._dirty,function(a,b){var c=d(b);c&&(c._dirty=!0)}),d.preview.bind("setting",function(a){var b=!0;c.apply(null,a.concat(b))}),d.preview.bind("sync",function(a){b.each(a,function(a,b){d.preview.trigger(a,b)}),d.preview.send("synced")}),d.preview.bind("active",function(){d.preview.send("nonce",d.settings.nonce),d.preview.send("documentTitle",document.title)}),d.preview.bind("saved",function(a){d.trigger("saved",a)}),d.bind("saved",function(){d.each(function(a){a._dirty=!1})}),d.preview.bind("nonce-refresh",function(a){b.extend(d.settings.nonce,a)}),d.preview.send("ready",{activePanels:d.settings.activePanels,activeSections:d.settings.activeSections,activeControls:d.settings.activeControls,settingValidities:d.settings.settingValidities}),d.preview.bind("loading-initiated",function(){b("body").addClass("wp-customizer-unloading")}),d.preview.bind("loading-failed",function(){b("body").removeClass("wp-customizer-unloading")}),a=b.map(["color","image","position_x","repeat","attachment"],function(a){return"background_"+a}),d.when.apply(d,a).done(function(a,c,d,e,f){var g,h=b(document.body),i=b("head"),j=b("#custom-background-css");g=function(){var g="";h.toggleClass("custom-background",!(!a()&&!c())),a()&&(g+="background-color: "+a()+";"),c()&&(g+='background-image: url("'+c()+'");',g+="background-position: top "+d()+";",g+="background-repeat: "+e()+";",g+="background-attachment: "+f()+";"),j.remove(),j=b('<style type="text/css" id="custom-background-css">body.custom-background { '+g+" }</style>").appendTo(i)},b.each(arguments,function(){this.bind(g)})}),d("custom_logo",function(a){b("body").toggleClass("wp-custom-logo",!!a.get()),a.bind(function(a){b("body").toggleClass("wp-custom-logo",!!a)})}),d.trigger("preview-ready"))})}(wp,jQuery);
\ No newline at end of file
index 7efee3d5f22ab59a78edf14a63b4a49aa61a7eb6..ec51058ec4fabda3dc2f463542421edace99cff8 100644 (file)
@@ -847,6 +847,18 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
                        }
                } );
 
+               /**
+                * Handle setting validities in partial refresh response.
+                *
+                * @param {object} data Response data.
+                * @param {object} data.setting_validities Setting validities.
+                */
+               api.selectiveRefresh.bind( 'render-partials-response', function handleSettingValiditiesResponse( data ) {
+                       if ( data.setting_validities ) {
+                               api.preview.send( 'selective-refresh-setting-validities', data.setting_validities );
+                       }
+               } );
+
                api.preview.bind( 'active', function() {
 
                        // Make all partials ready.
index 43ed02f496e5f6268b7f06da867681024de4dd5c..d84e66fb77daacf5ba09714b90ec073237240dd8 100644 (file)
@@ -1 +1 @@
-wp.customize.selectiveRefresh=function(a,b){"use strict";var c,d,e;return c={ready:a.Deferred(),data:{partials:{},renderQueryVar:"",l10n:{shiftClickToEdit:""},refreshBuffer:250},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(_.pluck(b.placements(),"container"),function(b){a(b).attr("title",c.data.l10n.shiftClickToEdit)}),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()}))})},placements:function(){var b,c=this;return b=c.params.selector||"",b&&(b+=", "),b+='[data-customize-partial-id="'+c.id+'"]',a(b).map(function(){var b,d=a(this);if(b=d.data("customize-partial-placement-context"),_.isString(b)&&"{"===b.substr(0,1))throw new Error("context JSON parse error");return new e({partial:c,container:d,context:b})}).get()},settings:function(){var a=this;return a.params.settings&&0!==a.params.settings.length?a.params.settings:a.params.primarySetting?[a.params.primarySetting]:[a.id]},isRelatedSetting:function(a){var c=this;return _.isString(a)&&(a=b(a)),a?-1!==_.indexOf(c.settings(),a.id):!1},showControl:function(){var a=this,c=a.params.primarySetting;c||(c=_.first(a.settings())),b.preview.send("focus-control-for-setting",c)},preparePlacement:function(b){a(b.container).addClass("customize-partial-refreshing")},_pendingRefreshPromise:null,refresh:function(){var a,b=this;return a=c.requestPartial(b),b._pendingRefreshPromise||(_.each(b.placements(),function(a){b.preparePlacement(a)}),a.done(function(a){_.each(a,function(a){b.renderContent(a)})}),a.fail(function(a,c){b.fallback(a,c)}),b._pendingRefreshPromise=a,a.always(function(){b._pendingRefreshPromise=null})),a},renderContent:function(b){var d,e,f=this;if(!b.container)return f.fallback(new Error("no_container"),[b]),!1;if(b.container=a(b.container),!1===b.addedContent)return f.fallback(new Error("missing_render"),[b]),!1;if(!_.isString(b.addedContent))return f.fallback(new Error("non_string_content"),[b]),!1;c.orginalDocumentWrite=document.write,document.write=function(){throw new Error(c.data.l10n.badDocumentWrite)};try{if(d=b.addedContent,wp.emoji&&wp.emoji.parse&&!a.contains(document.head,b.container[0])&&(d=wp.emoji.parse(d)),f.params.containerInclusive)e=a(d),b.context=_.extend(b.context,e.data("customize-partial-placement-context")||{}),e.data("customize-partial-placement-context",b.context),b.removedNodes=b.container,b.container=e,b.removedNodes.replaceWith(b.container),b.container.attr("title",c.data.l10n.shiftClickToEdit);else{for(b.removedNodes=document.createDocumentFragment();b.container[0].firstChild;)b.removedNodes.appendChild(b.container[0].firstChild);b.container.html(d)}b.container.removeClass("customize-render-content-error")}catch(g){"undefined"!=typeof console&&console.error&&console.error(f.id,g)}return document.write=c.orginalDocumentWrite,c.orginalDocumentWrite=null,b.container.removeClass("customize-partial-refreshing"),b.container.data("customize-partial-content-rendered",!0),c.trigger("partial-content-rendered",b),!0},fallback:function(){var a=this;a.params.fallbackRefresh&&c.requestFullRefresh()}}),c.Placement=e=b.Class.extend({partial:null,container:null,startNode:null,endNode:null,context:null,addedContent:null,removedNodes:null,initialize:function(b){var c=this;if(b=_.extend({},b||{}),!b.partial||!b.partial.extended(d))throw new Error("Missing partial");b.context=b.context||{},b.container&&(b.container=a(b.container)),_.extend(c,b)}}),c.partialConstructor={},c.partial=new b.Values({defaultConstructor:d}),c.getCustomizeQuery=function(){var a={};return b.each(function(b,c){b._dirty&&(a[c]=b())}),{wp_customize:"on",nonce:b.settings.nonce.preview,theme:b.settings.theme.stylesheet,customized:JSON.stringify(a)}},c._pendingPartialRequests={},c._debouncedTimeoutId=null,c._currentRequest=null,c.requestFullRefresh=function(){b.preview.send("refresh")},c.requestPartial=function(d){var f;return c._debouncedTimeoutId&&(clearTimeout(c._debouncedTimeoutId),c._debouncedTimeoutId=null),c._currentRequest&&(c._currentRequest.abort(),c._currentRequest=null),f=c._pendingPartialRequests[d.id],f&&"pending"===f.deferred.state()||(f={deferred:a.Deferred(),partial:d},c._pendingPartialRequests[d.id]=f),d=null,c._debouncedTimeoutId=setTimeout(function(){var a,d,f,g;c._debouncedTimeoutId=null,a=c.getCustomizeQuery(),f={},d={},_.each(c._pendingPartialRequests,function(a,b){f[b]=a.partial.placements(),c.partial.has(b)?d[b]=_.map(f[b],function(a){return a.context||{}}):a.deferred.rejectWith(a.partial,[new Error("partial_removed"),f[b]])}),a.partials=JSON.stringify(d),a[c.data.renderQueryVar]="1",g=c._currentRequest=wp.ajax.send(null,{data:a,url:b.settings.url.self}),g.done(function(a){c.trigger("render-partials-response",a),a.errors&&"undefined"!=typeof console&&console.warn&&_.each(a.errors,function(a){console.warn(a)}),_.each(c._pendingPartialRequests,function(b,c){var d;_.isArray(a.contents[c])?(d=_.map(a.contents[c],function(a,d){var g=f[c][d];return g?g.addedContent=a:g=new e({partial:b.partial,addedContent:a}),g}),b.deferred.resolveWith(b.partial,[d])):b.deferred.rejectWith(b.partial,[new Error("unrecognized_partial"),f[c]])}),c._pendingPartialRequests={}}),g.fail(function(a,b){"abort"!==b&&(_.each(c._pendingPartialRequests,function(b,c){b.deferred.rejectWith(b.partial,[a,f[c]])}),c._pendingPartialRequests={})})},c.data.refreshBuffer),f.deferred.promise()},c.addPartials=function(b,d){var f;b||(b=document.documentElement),b=a(b),d=_.extend({triggerRendered:!0},d||{}),f=b.find("[data-customize-partial-id]"),b.is("[data-customize-partial-id]")&&(f=f.add(b)),f.each(function(){var b,f,g,h,i,j=a(this);f=j.data("customize-partial-id"),f&&(i=j.data("customize-partial-placement-context")||{},b=c.partial(f),b||(h=j.data("customize-partial-options")||{},h.constructingContainerContext=j.data("customize-partial-placement-context")||{},g=c.partialConstructor[j.data("customize-partial-type")]||c.Partial,b=new g(f,h),c.partial.add(b.id,b)),d.triggerRendered&&!j.data("customize-partial-content-rendered")&&c.trigger("partial-content-rendered",new e({partial:b,context:i,container:j})),j.data("customize-partial-content-rendered",!0))})},b.bind("preview-ready",function(){var d,e,f;document.head||(document.head=a("head:first")[0]),_.extend(c.data,_customizePartialRefreshExports),_.each(c.data.partials,function(a,b){var d,e=c.partial(b);e?_.extend(e.params,a):(d=c.partialConstructor[a.type]||c.Partial,e=new d(b,{params:a}),c.partial.add(b,e))}),d=function(a,b){var d=this;c.partial.each(function(c){c.isRelatedSetting(d,a,b)&&c.refresh()})},e=function(a){d.call(a,a(),null),a.bind(d)},f=function(a){d.call(a,null,a()),a.unbind(d)},b.bind("add",e),b.bind("remove",f),b.each(function(a){a.bind(d)}),c.addPartials(document.documentElement,{triggerRendered:!1}),"undefined"!=typeof MutationObserver&&(c.mutationObserver=new MutationObserver(function(b){_.each(b,function(b){c.addPartials(a(b.target))})}),c.mutationObserver.observe(document.documentElement,{childList:!0,subtree:!0})),b.selectiveRefresh.bind("partial-content-rendered",function(a){a.container&&c.addPartials(a.container)}),b.preview.bind("active",function(){c.partial.each(function(a){a.deferred.ready.resolve()}),c.partial.bind("add",function(a){a.deferred.ready.resolve()})})}),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(),data:{partials:{},renderQueryVar:"",l10n:{shiftClickToEdit:""},refreshBuffer:250},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(_.pluck(b.placements(),"container"),function(b){a(b).attr("title",c.data.l10n.shiftClickToEdit)}),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()}))})},placements:function(){var b,c=this;return b=c.params.selector||"",b&&(b+=", "),b+='[data-customize-partial-id="'+c.id+'"]',a(b).map(function(){var b,d=a(this);if(b=d.data("customize-partial-placement-context"),_.isString(b)&&"{"===b.substr(0,1))throw new Error("context JSON parse error");return new e({partial:c,container:d,context:b})}).get()},settings:function(){var a=this;return a.params.settings&&0!==a.params.settings.length?a.params.settings:a.params.primarySetting?[a.params.primarySetting]:[a.id]},isRelatedSetting:function(a){var c=this;return _.isString(a)&&(a=b(a)),!!a&&-1!==_.indexOf(c.settings(),a.id)},showControl:function(){var a=this,c=a.params.primarySetting;c||(c=_.first(a.settings())),b.preview.send("focus-control-for-setting",c)},preparePlacement:function(b){a(b.container).addClass("customize-partial-refreshing")},_pendingRefreshPromise:null,refresh:function(){var a,b=this;return a=c.requestPartial(b),b._pendingRefreshPromise||(_.each(b.placements(),function(a){b.preparePlacement(a)}),a.done(function(a){_.each(a,function(a){b.renderContent(a)})}),a.fail(function(a,c){b.fallback(a,c)}),b._pendingRefreshPromise=a,a.always(function(){b._pendingRefreshPromise=null})),a},renderContent:function(b){var d,e,f=this;if(!b.container)return f.fallback(new Error("no_container"),[b]),!1;if(b.container=a(b.container),!1===b.addedContent)return f.fallback(new Error("missing_render"),[b]),!1;if(!_.isString(b.addedContent))return f.fallback(new Error("non_string_content"),[b]),!1;c.orginalDocumentWrite=document.write,document.write=function(){throw new Error(c.data.l10n.badDocumentWrite)};try{if(d=b.addedContent,wp.emoji&&wp.emoji.parse&&!a.contains(document.head,b.container[0])&&(d=wp.emoji.parse(d)),f.params.containerInclusive)e=a(d),b.context=_.extend(b.context,e.data("customize-partial-placement-context")||{}),e.data("customize-partial-placement-context",b.context),b.removedNodes=b.container,b.container=e,b.removedNodes.replaceWith(b.container),b.container.attr("title",c.data.l10n.shiftClickToEdit);else{for(b.removedNodes=document.createDocumentFragment();b.container[0].firstChild;)b.removedNodes.appendChild(b.container[0].firstChild);b.container.html(d)}b.container.removeClass("customize-render-content-error")}catch(g){"undefined"!=typeof console&&console.error&&console.error(f.id,g)}return document.write=c.orginalDocumentWrite,c.orginalDocumentWrite=null,b.container.removeClass("customize-partial-refreshing"),b.container.data("customize-partial-content-rendered",!0),c.trigger("partial-content-rendered",b),!0},fallback:function(){var a=this;a.params.fallbackRefresh&&c.requestFullRefresh()}}),c.Placement=e=b.Class.extend({partial:null,container:null,startNode:null,endNode:null,context:null,addedContent:null,removedNodes:null,initialize:function(b){var c=this;if(b=_.extend({},b||{}),!b.partial||!b.partial.extended(d))throw new Error("Missing partial");b.context=b.context||{},b.container&&(b.container=a(b.container)),_.extend(c,b)}}),c.partialConstructor={},c.partial=new b.Values({defaultConstructor:d}),c.getCustomizeQuery=function(){var a={};return b.each(function(b,c){b._dirty&&(a[c]=b())}),{wp_customize:"on",nonce:b.settings.nonce.preview,theme:b.settings.theme.stylesheet,customized:JSON.stringify(a)}},c._pendingPartialRequests={},c._debouncedTimeoutId=null,c._currentRequest=null,c.requestFullRefresh=function(){b.preview.send("refresh")},c.requestPartial=function(d){var f;return c._debouncedTimeoutId&&(clearTimeout(c._debouncedTimeoutId),c._debouncedTimeoutId=null),c._currentRequest&&(c._currentRequest.abort(),c._currentRequest=null),f=c._pendingPartialRequests[d.id],f&&"pending"===f.deferred.state()||(f={deferred:a.Deferred(),partial:d},c._pendingPartialRequests[d.id]=f),d=null,c._debouncedTimeoutId=setTimeout(function(){var a,d,f,g;c._debouncedTimeoutId=null,a=c.getCustomizeQuery(),f={},d={},_.each(c._pendingPartialRequests,function(a,b){f[b]=a.partial.placements(),c.partial.has(b)?d[b]=_.map(f[b],function(a){return a.context||{}}):a.deferred.rejectWith(a.partial,[new Error("partial_removed"),f[b]])}),a.partials=JSON.stringify(d),a[c.data.renderQueryVar]="1",g=c._currentRequest=wp.ajax.send(null,{data:a,url:b.settings.url.self}),g.done(function(a){c.trigger("render-partials-response",a),a.errors&&"undefined"!=typeof console&&console.warn&&_.each(a.errors,function(a){console.warn(a)}),_.each(c._pendingPartialRequests,function(b,c){var d;_.isArray(a.contents[c])?(d=_.map(a.contents[c],function(a,d){var g=f[c][d];return g?g.addedContent=a:g=new e({partial:b.partial,addedContent:a}),g}),b.deferred.resolveWith(b.partial,[d])):b.deferred.rejectWith(b.partial,[new Error("unrecognized_partial"),f[c]])}),c._pendingPartialRequests={}}),g.fail(function(a,b){"abort"!==b&&(_.each(c._pendingPartialRequests,function(b,c){b.deferred.rejectWith(b.partial,[a,f[c]])}),c._pendingPartialRequests={})})},c.data.refreshBuffer),f.deferred.promise()},c.addPartials=function(b,d){var f;b||(b=document.documentElement),b=a(b),d=_.extend({triggerRendered:!0},d||{}),f=b.find("[data-customize-partial-id]"),b.is("[data-customize-partial-id]")&&(f=f.add(b)),f.each(function(){var b,f,g,h,i,j=a(this);f=j.data("customize-partial-id"),f&&(i=j.data("customize-partial-placement-context")||{},b=c.partial(f),b||(h=j.data("customize-partial-options")||{},h.constructingContainerContext=j.data("customize-partial-placement-context")||{},g=c.partialConstructor[j.data("customize-partial-type")]||c.Partial,b=new g(f,h),c.partial.add(b.id,b)),d.triggerRendered&&!j.data("customize-partial-content-rendered")&&c.trigger("partial-content-rendered",new e({partial:b,context:i,container:j})),j.data("customize-partial-content-rendered",!0))})},b.bind("preview-ready",function(){var d,e,f;document.head||(document.head=a("head:first")[0]),_.extend(c.data,_customizePartialRefreshExports),_.each(c.data.partials,function(a,b){var d,e=c.partial(b);e?_.extend(e.params,a):(d=c.partialConstructor[a.type]||c.Partial,e=new d(b,{params:a}),c.partial.add(b,e))}),d=function(a,b){var d=this;c.partial.each(function(c){c.isRelatedSetting(d,a,b)&&c.refresh()})},e=function(a){d.call(a,a(),null),a.bind(d)},f=function(a){d.call(a,null,a()),a.unbind(d)},b.bind("add",e),b.bind("remove",f),b.each(function(a){a.bind(d)}),c.addPartials(document.documentElement,{triggerRendered:!1}),"undefined"!=typeof MutationObserver&&(c.mutationObserver=new MutationObserver(function(b){_.each(b,function(b){c.addPartials(a(b.target))})}),c.mutationObserver.observe(document.documentElement,{childList:!0,subtree:!0})),b.selectiveRefresh.bind("partial-content-rendered",function(a){a.container&&c.addPartials(a.container)}),b.selectiveRefresh.bind("render-partials-response",function(a){a.setting_validities&&b.preview.send("selective-refresh-setting-validities",a.setting_validities)}),b.preview.bind("active",function(){c.partial.each(function(a){a.deferred.ready.resolve()}),c.partial.bind("add",function(a){a.deferred.ready.resolve()})})}),c}(jQuery,wp.customize);
\ No newline at end of file
index a4e25a4c1db73509d5fdcae84e8c79edc3472a8a..77c78be985ebf2cdfe8bcc5eaefacdc009c40925 100644 (file)
@@ -1 +1 @@
-!function(a,b,c){var d=function(){function d(){var c,d,f,h;"string"==typeof b.pagenow&&(z.screenId=b.pagenow),"string"==typeof b.ajaxurl&&(z.url=b.ajaxurl),"object"==typeof b.heartbeatSettings&&(c=b.heartbeatSettings,!z.url&&c.ajaxurl&&(z.url=c.ajaxurl),c.interval&&(z.mainInterval=c.interval,z.mainInterval<15?z.mainInterval=15:z.mainInterval>120&&(z.mainInterval=120)),c.minimalInterval&&(c.minimalInterval=parseInt(c.minimalInterval,10),z.minimalInterval=c.minimalInterval>0&&c.minimalInterval<=600?1e3*c.minimalInterval:0),z.minimalInterval&&z.mainInterval<z.minimalInterval&&(z.mainInterval=z.minimalInterval),z.screenId||(z.screenId=c.screenId||"front"),"disable"===c.suspension&&(z.suspendEnabled=!1)),z.mainInterval=1e3*z.mainInterval,z.originalInterval=z.mainInterval,"undefined"!=typeof document.hidden?(d="hidden",h="visibilitychange",f="visibilityState"):"undefined"!=typeof document.msHidden?(d="msHidden",h="msvisibilitychange",f="msVisibilityState"):"undefined"!=typeof document.webkitHidden&&(d="webkitHidden",h="webkitvisibilitychange",f="webkitVisibilityState"),d&&(document[d]&&(z.hasFocus=!1),y.on(h+".wp-heartbeat",function(){"hidden"===document[f]?(l(),b.clearInterval(z.checkFocusTimer)):(m(),document.hasFocus&&(z.checkFocusTimer=b.setInterval(g,1e4)))})),document.hasFocus&&(z.checkFocusTimer=b.setInterval(g,1e4)),a(b).on("unload.wp-heartbeat",function(){z.suspend=!0,z.xhr&&4!==z.xhr.readyState&&z.xhr.abort()}),b.setInterval(o,3e4),y.ready(function(){z.lastTick=e(),k()})}function e(){return(new Date).getTime()}function f(a){var c,d=a.src;if(d&&/^https?:\/\//.test(d)&&(c=b.location.origin?b.location.origin:b.location.protocol+"//"+b.location.host,0!==d.indexOf(c)))return!1;try{if(a.contentWindow.document)return!0}catch(e){}return!1}function g(){z.hasFocus&&!document.hasFocus()?l():!z.hasFocus&&document.hasFocus()&&m()}function h(a,b){var c;if(a){switch(a){case"abort":break;case"timeout":c=!0;break;case"error":if(503===b&&z.hasConnected){c=!0;break}case"parsererror":case"empty":case"unknown":z.errorcount++,z.errorcount>2&&z.hasConnected&&(c=!0)}c&&!q()&&(z.connectionError=!0,y.trigger("heartbeat-connection-lost",[a,b]))}}function i(){z.hasConnected=!0,q()&&(z.errorcount=0,z.connectionError=!1,y.trigger("heartbeat-connection-restored"))}function j(){var c,d;z.connecting||z.suspend||(z.lastTick=e(),d=a.extend({},z.queue),z.queue={},y.trigger("heartbeat-send",[d]),c={data:d,interval:z.tempInterval?z.tempInterval/1e3:z.mainInterval/1e3,_nonce:"object"==typeof b.heartbeatSettings?b.heartbeatSettings.nonce:"",action:"heartbeat",screen_id:z.screenId,has_focus:z.hasFocus},z.connecting=!0,z.xhr=a.ajax({url:z.url,type:"post",timeout:3e4,data:c,dataType:"json"}).always(function(){z.connecting=!1,k()}).done(function(a,b,c){var d;return a?(i(),a.nonces_expired&&y.trigger("heartbeat-nonces-expired"),a.heartbeat_interval&&(d=a.heartbeat_interval,delete a.heartbeat_interval),y.trigger("heartbeat-tick",[a,b,c]),void(d&&t(d))):void h("empty")}).fail(function(a,b,c){h(b||"unknown",a.status),y.trigger("heartbeat-error",[a,b,c])}))}function k(){var a=e()-z.lastTick,c=z.mainInterval;z.suspend||(z.hasFocus?z.countdown>0&&z.tempInterval&&(c=z.tempInterval,z.countdown--,z.countdown<1&&(z.tempInterval=0)):c=12e4,z.minimalInterval&&c<z.minimalInterval&&(c=z.minimalInterval),b.clearTimeout(z.beatTimer),c>a?z.beatTimer=b.setTimeout(function(){j()},c-a):j())}function l(){z.hasFocus=!1}function m(){z.userActivity=e(),z.suspend=!1,z.hasFocus||(z.hasFocus=!0,k())}function n(){z.userActivityEvents=!1,y.off(".wp-heartbeat-active"),a("iframe").each(function(b,c){f(c)&&a(c.contentWindow).off(".wp-heartbeat-active")}),m()}function o(){var b=z.userActivity?e()-z.userActivity:0;b>3e5&&z.hasFocus&&l(),(z.suspendEnabled&&b>6e5||b>36e5)&&(z.suspend=!0),z.userActivityEvents||(y.on("mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active",function(){n()}),a("iframe").each(function(b,c){f(c)&&a(c.contentWindow).on("mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active",function(){n()})}),z.userActivityEvents=!0)}function p(){return z.hasFocus}function q(){return z.connectionError}function r(){z.lastTick=0,k()}function s(){z.suspendEnabled=!1}function t(a,b){var c,d=z.tempInterval?z.tempInterval:z.mainInterval;if(a){switch(a){case"fast":case 5:c=5e3;break;case 15:c=15e3;break;case 30:c=3e4;break;case 60:c=6e4;break;case 120:c=12e4;break;case"long-polling":return z.mainInterval=0,0;default:c=z.originalInterval}z.minimalInterval&&c<z.minimalInterval&&(c=z.minimalInterval),5e3===c?(b=parseInt(b,10)||30,b=1>b||b>30?30:b,z.countdown=b,z.tempInterval=c):(z.countdown=0,z.tempInterval=0,z.mainInterval=c),c!==d&&k()}return z.tempInterval?z.tempInterval/1e3:z.mainInterval/1e3}function u(a,b,c){return a?c&&this.isQueued(a)?!1:(z.queue[a]=b,!0):!1}function v(a){return a?z.queue.hasOwnProperty(a):void 0}function w(a){a&&delete z.queue[a]}function x(a){return a?this.isQueued(a)?z.queue[a]:c:void 0}var y=a(document),z={suspend:!1,suspendEnabled:!0,screenId:"",url:"",lastTick:0,queue:{},mainInterval:60,tempInterval:0,originalInterval:0,minimalInterval:0,countdown:0,connecting:!1,connectionError:!1,errorcount:0,hasConnected:!1,hasFocus:!0,userActivity:0,userActivityEvents:!1,checkFocusTimer:0,beatTimer:0};return d(),{hasFocus:p,connectNow:r,disableSuspend:s,interval:t,hasConnectionError:q,enqueue:u,dequeue:w,isQueued:v,getQueuedItem:x}};b.wp=b.wp||{},b.wp.heartbeat=new d}(jQuery,window);
\ No newline at end of file
+!function(a,b,c){var d=function(){function d(){var c,d,f,h;"string"==typeof b.pagenow&&(z.screenId=b.pagenow),"string"==typeof b.ajaxurl&&(z.url=b.ajaxurl),"object"==typeof b.heartbeatSettings&&(c=b.heartbeatSettings,!z.url&&c.ajaxurl&&(z.url=c.ajaxurl),c.interval&&(z.mainInterval=c.interval,z.mainInterval<15?z.mainInterval=15:z.mainInterval>120&&(z.mainInterval=120)),c.minimalInterval&&(c.minimalInterval=parseInt(c.minimalInterval,10),z.minimalInterval=c.minimalInterval>0&&c.minimalInterval<=600?1e3*c.minimalInterval:0),z.minimalInterval&&z.mainInterval<z.minimalInterval&&(z.mainInterval=z.minimalInterval),z.screenId||(z.screenId=c.screenId||"front"),"disable"===c.suspension&&(z.suspendEnabled=!1)),z.mainInterval=1e3*z.mainInterval,z.originalInterval=z.mainInterval,"undefined"!=typeof document.hidden?(d="hidden",h="visibilitychange",f="visibilityState"):"undefined"!=typeof document.msHidden?(d="msHidden",h="msvisibilitychange",f="msVisibilityState"):"undefined"!=typeof document.webkitHidden&&(d="webkitHidden",h="webkitvisibilitychange",f="webkitVisibilityState"),d&&(document[d]&&(z.hasFocus=!1),y.on(h+".wp-heartbeat",function(){"hidden"===document[f]?(l(),b.clearInterval(z.checkFocusTimer)):(m(),document.hasFocus&&(z.checkFocusTimer=b.setInterval(g,1e4)))})),document.hasFocus&&(z.checkFocusTimer=b.setInterval(g,1e4)),a(b).on("unload.wp-heartbeat",function(){z.suspend=!0,z.xhr&&4!==z.xhr.readyState&&z.xhr.abort()}),b.setInterval(o,3e4),y.ready(function(){z.lastTick=e(),k()})}function e(){return(new Date).getTime()}function f(a){var c,d=a.src;if(d&&/^https?:\/\//.test(d)&&(c=b.location.origin?b.location.origin:b.location.protocol+"//"+b.location.host,0!==d.indexOf(c)))return!1;try{if(a.contentWindow.document)return!0}catch(e){}return!1}function g(){z.hasFocus&&!document.hasFocus()?l():!z.hasFocus&&document.hasFocus()&&m()}function h(a,b){var c;if(a){switch(a){case"abort":break;case"timeout":c=!0;break;case"error":if(503===b&&z.hasConnected){c=!0;break}case"parsererror":case"empty":case"unknown":z.errorcount++,z.errorcount>2&&z.hasConnected&&(c=!0)}c&&!q()&&(z.connectionError=!0,y.trigger("heartbeat-connection-lost",[a,b]))}}function i(){z.hasConnected=!0,q()&&(z.errorcount=0,z.connectionError=!1,y.trigger("heartbeat-connection-restored"))}function j(){var c,d;z.connecting||z.suspend||(z.lastTick=e(),d=a.extend({},z.queue),z.queue={},y.trigger("heartbeat-send",[d]),c={data:d,interval:z.tempInterval?z.tempInterval/1e3:z.mainInterval/1e3,_nonce:"object"==typeof b.heartbeatSettings?b.heartbeatSettings.nonce:"",action:"heartbeat",screen_id:z.screenId,has_focus:z.hasFocus},z.connecting=!0,z.xhr=a.ajax({url:z.url,type:"post",timeout:3e4,data:c,dataType:"json"}).always(function(){z.connecting=!1,k()}).done(function(a,b,c){var d;return a?(i(),a.nonces_expired&&y.trigger("heartbeat-nonces-expired"),a.heartbeat_interval&&(d=a.heartbeat_interval,delete a.heartbeat_interval),y.trigger("heartbeat-tick",[a,b,c]),void(d&&t(d))):void h("empty")}).fail(function(a,b,c){h(b||"unknown",a.status),y.trigger("heartbeat-error",[a,b,c])}))}function k(){var a=e()-z.lastTick,c=z.mainInterval;z.suspend||(z.hasFocus?z.countdown>0&&z.tempInterval&&(c=z.tempInterval,z.countdown--,z.countdown<1&&(z.tempInterval=0)):c=12e4,z.minimalInterval&&c<z.minimalInterval&&(c=z.minimalInterval),b.clearTimeout(z.beatTimer),a<c?z.beatTimer=b.setTimeout(function(){j()},c-a):j())}function l(){z.hasFocus=!1}function m(){z.userActivity=e(),z.suspend=!1,z.hasFocus||(z.hasFocus=!0,k())}function n(){z.userActivityEvents=!1,y.off(".wp-heartbeat-active"),a("iframe").each(function(b,c){f(c)&&a(c.contentWindow).off(".wp-heartbeat-active")}),m()}function o(){var b=z.userActivity?e()-z.userActivity:0;b>3e5&&z.hasFocus&&l(),(z.suspendEnabled&&b>6e5||b>36e5)&&(z.suspend=!0),z.userActivityEvents||(y.on("mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active",function(){n()}),a("iframe").each(function(b,c){f(c)&&a(c.contentWindow).on("mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active",function(){n()})}),z.userActivityEvents=!0)}function p(){return z.hasFocus}function q(){return z.connectionError}function r(){z.lastTick=0,k()}function s(){z.suspendEnabled=!1}function t(a,b){var c,d=z.tempInterval?z.tempInterval:z.mainInterval;if(a){switch(a){case"fast":case 5:c=5e3;break;case 15:c=15e3;break;case 30:c=3e4;break;case 60:c=6e4;break;case 120:c=12e4;break;case"long-polling":return z.mainInterval=0,0;default:c=z.originalInterval}z.minimalInterval&&c<z.minimalInterval&&(c=z.minimalInterval),5e3===c?(b=parseInt(b,10)||30,b=b<1||b>30?30:b,z.countdown=b,z.tempInterval=c):(z.countdown=0,z.tempInterval=0,z.mainInterval=c),c!==d&&k()}return z.tempInterval?z.tempInterval/1e3:z.mainInterval/1e3}function u(a,b,c){return!!a&&((!c||!this.isQueued(a))&&(z.queue[a]=b,!0))}function v(a){if(a)return z.queue.hasOwnProperty(a)}function w(a){a&&delete z.queue[a]}function x(a){if(a)return this.isQueued(a)?z.queue[a]:c}var y=a(document),z={suspend:!1,suspendEnabled:!0,screenId:"",url:"",lastTick:0,queue:{},mainInterval:60,tempInterval:0,originalInterval:0,minimalInterval:0,countdown:0,connecting:!1,connectionError:!1,errorcount:0,hasConnected:!1,hasFocus:!0,userActivity:0,userActivityEvents:!1,checkFocusTimer:0,beatTimer:0};return d(),{hasFocus:p,connectNow:r,disableSuspend:s,interval:t,hasConnectionError:q,enqueue:u,dequeue:w,isQueued:v,getQueuedItem:x}};b.wp=b.wp||{},b.wp.heartbeat=new d}(jQuery,window);
\ No newline at end of file
diff --git a/wp-includes/js/imagesloaded.min.js b/wp-includes/js/imagesloaded.min.js
new file mode 100644 (file)
index 0000000..db66336
--- /dev/null
@@ -0,0 +1 @@
+(function(){"use strict";function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if("object"==typeof a){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b<a.length;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if("object"===c)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:this.EventEmitter=a}).call(this),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):a.eventie=f}(this),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(c,d){return b(a,c,d)}):"object"==typeof module&&module.exports?module.exports=b(a,require("wolfy87-eventemitter"),require("eventie")):a.imagesLoaded=b(a,a.EventEmitter,a.eventie)}(window,function(a,b,c){function d(a,b){for(var c in b)a[c]=b[c];return a}function e(a){return"[object Array]"==l.call(a)}function f(a){var b=[];if(e(a))b=a;else if("number"==typeof a.length)for(var c=0;c<a.length;c++)b.push(a[c]);else b.push(a);return b}function g(a,b,c){if(!(this instanceof g))return new g(a,b,c);"string"==typeof a&&(a=document.querySelectorAll(a)),this.elements=f(a),this.options=d({},this.options),"function"==typeof b?c=b:d(this.options,b),c&&this.on("always",c),this.getImages(),j&&(this.jqDeferred=new j.Deferred);var e=this;setTimeout(function(){e.check()})}function h(a){this.img=a}function i(a,b){this.url=a,this.element=b,this.img=new Image}var j=a.jQuery,k=a.console,l=Object.prototype.toString;g.prototype=new b,g.prototype.options={},g.prototype.getImages=function(){this.images=[];for(var a=0;a<this.elements.length;a++){var b=this.elements[a];this.addElementImages(b)}},g.prototype.addElementImages=function(a){"IMG"==a.nodeName&&this.addImage(a),this.options.background===!0&&this.addElementBackgroundImages(a);var b=a.nodeType;if(b&&m[b]){for(var c=a.querySelectorAll("img"),d=0;d<c.length;d++){var e=c[d];this.addImage(e)}if("string"==typeof this.options.background){var f=a.querySelectorAll(this.options.background);for(d=0;d<f.length;d++){var g=f[d];this.addElementBackgroundImages(g)}}}};var m={1:!0,9:!0,11:!0};g.prototype.addElementBackgroundImages=function(a){for(var b=n(a),c=/url\(['"]*([^'"\)]+)['"]*\)/gi,d=c.exec(b.backgroundImage);null!==d;){var e=d&&d[1];e&&this.addBackground(e,a),d=c.exec(b.backgroundImage)}};var n=a.getComputedStyle||function(a){return a.currentStyle};return g.prototype.addImage=function(a){var b=new h(a);this.images.push(b)},g.prototype.addBackground=function(a,b){var c=new i(a,b);this.images.push(c)},g.prototype.check=function(){function a(a,c,d){setTimeout(function(){b.progress(a,c,d)})}var b=this;if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();for(var c=0;c<this.images.length;c++){var d=this.images[c];d.once("progress",a),d.check()}},g.prototype.progress=function(a,b,c){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!a.isLoaded,this.emit("progress",this,a,b),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,a),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&k&&k.log("progress: "+c,a,b)},g.prototype.complete=function(){var a=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emit(a,this),this.emit("always",this),this.jqDeferred){var b=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[b](this)}},h.prototype=new b,h.prototype.check=function(){var a=this.getIsImageComplete();return a?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,c.bind(this.proxyImage,"load",this),c.bind(this.proxyImage,"error",this),c.bind(this.img,"load",this),c.bind(this.img,"error",this),void(this.proxyImage.src=this.img.src))},h.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},h.prototype.confirm=function(a,b){this.isLoaded=a,this.emit("progress",this,this.img,b)},h.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){c.unbind(this.proxyImage,"load",this),c.unbind(this.proxyImage,"error",this),c.unbind(this.img,"load",this),c.unbind(this.img,"error",this)},i.prototype=new h,i.prototype.check=function(){c.bind(this.img,"load",this),c.bind(this.img,"error",this),this.img.src=this.url;var a=this.getIsImageComplete();a&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},i.prototype.unbindEvents=function(){c.unbind(this.img,"load",this),c.unbind(this.img,"error",this)},i.prototype.confirm=function(a,b){this.isLoaded=a,this.emit("progress",this,this.element,b)},g.makeJQueryPlugin=function(b){b=b||a.jQuery,b&&(j=b,j.fn.imagesLoaded=function(a,b){var c=new g(this,a,b);return c.jqDeferred.promise(j(this))})},g.makeJQueryPlugin(),g});
\ No newline at end of file
index 259a32521680651e9da58b75143977951594ea52..f9d7c10ffe1665117f21a9de6e90aaf69c724fad 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/accordion/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var b=this.options;this.prevShow=this.prevHide=a(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),b.collapsible||b.active!==!1&&null!=b.active||(b.active=0),this._processPanels(),b.active<0&&(b.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():a()}},_createIcons:function(){var b=this.options.icons;b&&(a("<span>").addClass("ui-accordion-header-icon ui-icon "+b.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(b.header).addClass(b.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var a;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),a=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&a.css("height","")},_setOption:function(a,b){return"active"===a?void this._activate(b):("event"===a&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(b)),this._super(a,b),"collapsible"!==a||b||this.options.active!==!1||this._activate(0),"icons"===a&&(this._destroyIcons(),b&&this._createIcons()),void("disabled"===a&&(this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!b))))},_keydown:function(b){if(!b.altKey&&!b.ctrlKey){var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._eventHandler(b);break;case c.HOME:f=this.headers[0];break;case c.END:f=this.headers[d-1]}f&&(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),b.preventDefault())}},_panelKeyDown:function(b){b.keyCode===a.ui.keyCode.UP&&b.ctrlKey&&a(b.currentTarget).prev().focus()},refresh:function(){var b=this.options;this._processPanels(),b.active===!1&&b.collapsible===!0||!this.headers.length?(b.active=!1,this.active=a()):b.active===!1?this._activate(0):this.active.length&&!a.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(b.active=!1,this.active=a()):this._activate(Math.max(0,b.active-1)):b.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var a=this.headers,b=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),b&&(this._off(a.not(this.headers)),this._off(b.not(this.panels)))},_refresh:function(){var b,c=this.options,d=c.heightStyle,e=this.element.parent();this.active=this._findActive(c.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var b=a(this),c=b.uniqueId().attr("id"),d=b.next(),e=d.uniqueId().attr("id");b.attr("aria-controls",e),d.attr("aria-labelledby",c)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(c.event),"fill"===d?(b=e.height(),this.element.siblings(":visible").each(function(){var c=a(this),d=c.css("position");"absolute"!==d&&"fixed"!==d&&(b-=c.outerHeight(!0))}),this.headers.each(function(){b-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,b-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===d&&(b=0,this.headers.next().each(function(){b=Math.max(b,a(this).css("height","").height())}).height(b))},_activate:function(b){var c=this._findActive(b)[0];c!==this.active[0]&&(c=c||this.active[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return"number"==typeof b?this.headers.eq(b):a()},_setupEvents:function(b){var c={keydown:"_keydown"};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,c),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e[0]===d[0],g=f&&c.collapsible,h=g?a():e.next(),i=d.next(),j={oldHeader:d,oldPanel:i,newHeader:g?a():e,newPanel:h};b.preventDefault(),f&&!c.collapsible||this._trigger("beforeActivate",b,j)===!1||(c.active=g?!1:this.headers.index(e),this.active=f?a():e,this._toggle(j),d.removeClass("ui-accordion-header-active ui-state-active"),c.icons&&d.children(".ui-accordion-header-icon").removeClass(c.icons.activeHeader).addClass(c.icons.header),f||(e.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),c.icons&&e.children(".ui-accordion-header-icon").removeClass(c.icons.header).addClass(c.icons.activeHeader),e.next().addClass("ui-accordion-content-active")))},_toggle:function(b){var c=b.newPanel,d=this.prevShow.length?this.prevShow:b.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=c,this.prevHide=d,this.options.animate?this._animate(c,d,b):(d.hide(),c.show(),this._toggleComplete(b)),d.attr({"aria-hidden":"true"}),d.prev().attr({"aria-selected":"false","aria-expanded":"false"}),c.length&&d.length?d.prev().attr({tabIndex:-1,"aria-expanded":"false"}):c.length&&this.headers.filter(function(){return 0===parseInt(a(this).attr("tabIndex"),10)}).attr("tabIndex",-1),c.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(a,b,c){var d,e,f,g=this,h=0,i=a.css("box-sizing"),j=a.length&&(!b.length||a.index()<b.index()),k=this.options.animate||{},l=j&&k.down||k,m=function(){g._toggleComplete(c)};return"number"==typeof l&&(f=l),"string"==typeof l&&(e=l),e=e||l.easing||k.easing,f=f||l.duration||k.duration,b.length?a.length?(d=a.show().outerHeight(),b.animate(this.hideProps,{duration:f,easing:e,step:function(a,b){b.now=Math.round(a)}}),void a.hide().animate(this.showProps,{duration:f,easing:e,complete:m,step:function(a,c){c.now=Math.round(a),"height"!==c.prop?"content-box"===i&&(h+=c.now):"content"!==g.options.heightStyle&&(c.now=Math.round(d-b.outerHeight()-h),h=0)}})):b.animate(this.hideProps,f,e,m):a.animate(this.showProps,f,e,m)},_toggleComplete:function(a){var b=a.oldPanel;b.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),b.length&&(b.parent()[0].className=b.parent()[0].className),this._trigger("activate",null,a)}})});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var b=this.options;this.prevShow=this.prevHide=a(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),b.collapsible||b.active!==!1&&null!=b.active||(b.active=0),this._processPanels(),b.active<0&&(b.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():a()}},_createIcons:function(){var b=this.options.icons;b&&(a("<span>").addClass("ui-accordion-header-icon ui-icon "+b.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(b.header).addClass(b.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var a;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),a=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&a.css("height","")},_setOption:function(a,b){return"active"===a?void this._activate(b):("event"===a&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(b)),this._super(a,b),"collapsible"!==a||b||this.options.active!==!1||this._activate(0),"icons"===a&&(this._destroyIcons(),b&&this._createIcons()),void("disabled"===a&&(this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!b))))},_keydown:function(b){if(!b.altKey&&!b.ctrlKey){var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._eventHandler(b);break;case c.HOME:f=this.headers[0];break;case c.END:f=this.headers[d-1]}f&&(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),b.preventDefault())}},_panelKeyDown:function(b){b.keyCode===a.ui.keyCode.UP&&b.ctrlKey&&a(b.currentTarget).prev().focus()},refresh:function(){var b=this.options;this._processPanels(),b.active===!1&&b.collapsible===!0||!this.headers.length?(b.active=!1,this.active=a()):b.active===!1?this._activate(0):this.active.length&&!a.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(b.active=!1,this.active=a()):this._activate(Math.max(0,b.active-1)):b.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var a=this.headers,b=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),b&&(this._off(a.not(this.headers)),this._off(b.not(this.panels)))},_refresh:function(){var b,c=this.options,d=c.heightStyle,e=this.element.parent();this.active=this._findActive(c.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var b=a(this),c=b.uniqueId().attr("id"),d=b.next(),e=d.uniqueId().attr("id");b.attr("aria-controls",e),d.attr("aria-labelledby",c)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(c.event),"fill"===d?(b=e.height(),this.element.siblings(":visible").each(function(){var c=a(this),d=c.css("position");"absolute"!==d&&"fixed"!==d&&(b-=c.outerHeight(!0))}),this.headers.each(function(){b-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,b-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===d&&(b=0,this.headers.next().each(function(){b=Math.max(b,a(this).css("height","").height())}).height(b))},_activate:function(b){var c=this._findActive(b)[0];c!==this.active[0]&&(c=c||this.active[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return"number"==typeof b?this.headers.eq(b):a()},_setupEvents:function(b){var c={keydown:"_keydown"};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,c),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e[0]===d[0],g=f&&c.collapsible,h=g?a():e.next(),i=d.next(),j={oldHeader:d,oldPanel:i,newHeader:g?a():e,newPanel:h};b.preventDefault(),f&&!c.collapsible||this._trigger("beforeActivate",b,j)===!1||(c.active=!g&&this.headers.index(e),this.active=f?a():e,this._toggle(j),d.removeClass("ui-accordion-header-active ui-state-active"),c.icons&&d.children(".ui-accordion-header-icon").removeClass(c.icons.activeHeader).addClass(c.icons.header),f||(e.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),c.icons&&e.children(".ui-accordion-header-icon").removeClass(c.icons.header).addClass(c.icons.activeHeader),e.next().addClass("ui-accordion-content-active")))},_toggle:function(b){var c=b.newPanel,d=this.prevShow.length?this.prevShow:b.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=c,this.prevHide=d,this.options.animate?this._animate(c,d,b):(d.hide(),c.show(),this._toggleComplete(b)),d.attr({"aria-hidden":"true"}),d.prev().attr({"aria-selected":"false","aria-expanded":"false"}),c.length&&d.length?d.prev().attr({tabIndex:-1,"aria-expanded":"false"}):c.length&&this.headers.filter(function(){return 0===parseInt(a(this).attr("tabIndex"),10)}).attr("tabIndex",-1),c.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(a,b,c){var d,e,f,g=this,h=0,i=a.css("box-sizing"),j=a.length&&(!b.length||a.index()<b.index()),k=this.options.animate||{},l=j&&k.down||k,m=function(){g._toggleComplete(c)};return"number"==typeof l&&(f=l),"string"==typeof l&&(e=l),e=e||l.easing||k.easing,f=f||l.duration||k.duration,b.length?a.length?(d=a.show().outerHeight(),b.animate(this.hideProps,{duration:f,easing:e,step:function(a,b){b.now=Math.round(a)}}),void a.hide().animate(this.showProps,{duration:f,easing:e,complete:m,step:function(a,c){c.now=Math.round(a),"height"!==c.prop?"content-box"===i&&(h+=c.now):"content"!==g.options.heightStyle&&(c.now=Math.round(d-b.outerHeight()-h),h=0)}})):b.animate(this.hideProps,f,e,m):a.animate(this.showProps,f,e,m)},_toggleComplete:function(a){var b=a.oldPanel;b.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),b.length&&(b.parent()[0].className=b.parent()[0].className),this._trigger("activate",null,a)}})});
\ No newline at end of file
index c297fe685069e231ac6e8d8ba4fa86a8211f736f..844ef4b6b0effaff6320e26b0aefc97a09aa382c 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/autocomplete/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position","./menu"],a):a(jQuery)}(function(a){return a.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var b,c,d,e=this.element[0].nodeName.toLowerCase(),f="textarea"===e,g="input"===e;this.isMultiLine=f?!0:g?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[f||g?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))return b=!0,d=!0,void(c=!0);b=!1,d=!1,c=!1;var f=a.ui.keyCode;switch(e.keyCode){case f.PAGE_UP:b=!0,this._move("previousPage",e);break;case f.PAGE_DOWN:b=!0,this._move("nextPage",e);break;case f.UP:b=!0,this._keyEvent("previous",e);break;case f.DOWN:b=!0,this._keyEvent("next",e);break;case f.ENTER:this.menu.active&&(b=!0,e.preventDefault(),this.menu.select(e));break;case f.TAB:this.menu.active&&this.menu.select(e);break;case f.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:c=!0,this._searchTimeout(e)}},keypress:function(d){if(b)return b=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&d.preventDefault());if(!c){var e=a.ui.keyCode;switch(d.keyCode){case e.PAGE_UP:this._move("previousPage",d);break;case e.PAGE_DOWN:this._move("nextPage",d);break;case e.UP:this._keyEvent("previous",d);break;case e.DOWN:this._keyEvent("next",d)}}},input:function(a){return d?(d=!1,void a.preventDefault()):void this._searchTimeout(a)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(a),void this._change(a))}}),this._initSource(),this.menu=a("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(b){b.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var c=this.menu.element[0];a(b.target).closest(".ui-menu-item").length||this._delay(function(){var b=this;this.document.one("mousedown",function(d){d.target===b.element[0]||d.target===c||a.contains(c,d.target)||b.close()})})},menufocus:function(b,c){var d,e;return this.isNewMenu&&(this.isNewMenu=!1,b.originalEvent&&/^mouse/.test(b.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){a(b.target).trigger(b.originalEvent)})):(e=c.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",b,{item:e})&&b.originalEvent&&/^key/.test(b.originalEvent.type)&&this._value(e.value),d=c.item.attr("aria-label")||e.value,void(d&&a.trim(d).length&&(this.liveRegion.children().hide(),a("<div>").text(d).appendTo(this.liveRegion))))},menuselect:function(a,b){var c=b.item.data("ui-autocomplete-item"),d=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d,this.selectedItem=c})),!1!==this._trigger("select",a,{item:c})&&this._value(c.value),this.term=this._value(),this.close(a),this.selectedItem=c}}),this.liveRegion=a("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(a,b){this._super(a,b),"source"===a&&this._initSource(),"appendTo"===a&&this.menu.element.appendTo(this._appendTo()),"disabled"===a&&b&&this.xhr&&this.xhr.abort()},_appendTo:function(){var b=this.options.appendTo;return b&&(b=b.jquery||b.nodeType?a(b):this.document.find(b).eq(0)),b&&b[0]||(b=this.element.closest(".ui-front")),b.length||(b=this.document[0].body),b},_initSource:function(){var b,c,d=this;a.isArray(this.options.source)?(b=this.options.source,this.source=function(c,d){d(a.ui.autocomplete.filter(b,c.term))}):"string"==typeof this.options.source?(c=this.options.source,this.source=function(b,e){d.xhr&&d.xhr.abort(),d.xhr=a.ajax({url:c,data:b,dataType:"json",success:function(a){e(a)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(a){clearTimeout(this.searching),this.searching=this._delay(function(){var b=this.term===this._value(),c=this.menu.element.is(":visible"),d=a.altKey||a.ctrlKey||a.metaKey||a.shiftKey;(!b||b&&!c&&!d)&&(this.selectedItem=null,this.search(null,a))},this.options.delay)},search:function(a,b){return a=null!=a?a:this._value(),this.term=this._value(),a.length<this.options.minLength?this.close(b):this._trigger("search",b)!==!1?this._search(a):void 0},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:a},this._response())},_response:function(){var b=++this.requestIndex;return a.proxy(function(a){b===this.requestIndex&&this.__response(a),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(a){a&&(a=this._normalize(a)),this._trigger("response",null,{content:a}),!this.options.disabled&&a&&a.length&&!this.cancelSearch?(this._suggest(a),this._trigger("open")):this._close()},close:function(a){this.cancelSearch=!0,this._close(a)},_close:function(a){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",a))},_change:function(a){this.previous!==this._value()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return"string"==typeof b?{label:b,value:b}:a.extend({},b,{label:b.label||b.value,value:b.value||b.label})})},_suggest:function(b){var c=this.menu.element.empty();this._renderMenu(c,b),this.isNewMenu=!0,this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItemData(b,c)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-autocomplete-item",b)},_renderItem:function(b,c){return a("<li>").text(c.label).appendTo(b)},_move:function(a,b){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[a](b):void this.search(null,b)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,b){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(a,b),b.preventDefault())}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}}),a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(a){return a+(a>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(b){var c;this._superApply(arguments),this.options.disabled||this.cancelSearch||(c=b&&b.length?this.options.messages.results(b.length):this.options.messages.noResults,this.liveRegion.children().hide(),a("<div>").text(c).appendTo(this.liveRegion))}}),a.ui.autocomplete});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position","./menu"],a):a(jQuery)}(function(a){return a.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var b,c,d,e=this.element[0].nodeName.toLowerCase(),f="textarea"===e,g="input"===e;this.isMultiLine=!!f||!g&&this.element.prop("isContentEditable"),this.valueMethod=this.element[f||g?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))return b=!0,d=!0,void(c=!0);b=!1,d=!1,c=!1;var f=a.ui.keyCode;switch(e.keyCode){case f.PAGE_UP:b=!0,this._move("previousPage",e);break;case f.PAGE_DOWN:b=!0,this._move("nextPage",e);break;case f.UP:b=!0,this._keyEvent("previous",e);break;case f.DOWN:b=!0,this._keyEvent("next",e);break;case f.ENTER:this.menu.active&&(b=!0,e.preventDefault(),this.menu.select(e));break;case f.TAB:this.menu.active&&this.menu.select(e);break;case f.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:c=!0,this._searchTimeout(e)}},keypress:function(d){if(b)return b=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||d.preventDefault());if(!c){var e=a.ui.keyCode;switch(d.keyCode){case e.PAGE_UP:this._move("previousPage",d);break;case e.PAGE_DOWN:this._move("nextPage",d);break;case e.UP:this._keyEvent("previous",d);break;case e.DOWN:this._keyEvent("next",d)}}},input:function(a){return d?(d=!1,void a.preventDefault()):void this._searchTimeout(a)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(a),void this._change(a))}}),this._initSource(),this.menu=a("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(b){b.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var c=this.menu.element[0];a(b.target).closest(".ui-menu-item").length||this._delay(function(){var b=this;this.document.one("mousedown",function(d){d.target===b.element[0]||d.target===c||a.contains(c,d.target)||b.close()})})},menufocus:function(b,c){var d,e;return this.isNewMenu&&(this.isNewMenu=!1,b.originalEvent&&/^mouse/.test(b.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){a(b.target).trigger(b.originalEvent)})):(e=c.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",b,{item:e})&&b.originalEvent&&/^key/.test(b.originalEvent.type)&&this._value(e.value),d=c.item.attr("aria-label")||e.value,void(d&&a.trim(d).length&&(this.liveRegion.children().hide(),a("<div>").text(d).appendTo(this.liveRegion))))},menuselect:function(a,b){var c=b.item.data("ui-autocomplete-item"),d=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d,this.selectedItem=c})),!1!==this._trigger("select",a,{item:c})&&this._value(c.value),this.term=this._value(),this.close(a),this.selectedItem=c}}),this.liveRegion=a("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(a,b){this._super(a,b),"source"===a&&this._initSource(),"appendTo"===a&&this.menu.element.appendTo(this._appendTo()),"disabled"===a&&b&&this.xhr&&this.xhr.abort()},_appendTo:function(){var b=this.options.appendTo;return b&&(b=b.jquery||b.nodeType?a(b):this.document.find(b).eq(0)),b&&b[0]||(b=this.element.closest(".ui-front")),b.length||(b=this.document[0].body),b},_initSource:function(){var b,c,d=this;a.isArray(this.options.source)?(b=this.options.source,this.source=function(c,d){d(a.ui.autocomplete.filter(b,c.term))}):"string"==typeof this.options.source?(c=this.options.source,this.source=function(b,e){d.xhr&&d.xhr.abort(),d.xhr=a.ajax({url:c,data:b,dataType:"json",success:function(a){e(a)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(a){clearTimeout(this.searching),this.searching=this._delay(function(){var b=this.term===this._value(),c=this.menu.element.is(":visible"),d=a.altKey||a.ctrlKey||a.metaKey||a.shiftKey;b&&(!b||c||d)||(this.selectedItem=null,this.search(null,a))},this.options.delay)},search:function(a,b){return a=null!=a?a:this._value(),this.term=this._value(),a.length<this.options.minLength?this.close(b):this._trigger("search",b)!==!1?this._search(a):void 0},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:a},this._response())},_response:function(){var b=++this.requestIndex;return a.proxy(function(a){b===this.requestIndex&&this.__response(a),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(a){a&&(a=this._normalize(a)),this._trigger("response",null,{content:a}),!this.options.disabled&&a&&a.length&&!this.cancelSearch?(this._suggest(a),this._trigger("open")):this._close()},close:function(a){this.cancelSearch=!0,this._close(a)},_close:function(a){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",a))},_change:function(a){this.previous!==this._value()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return"string"==typeof b?{label:b,value:b}:a.extend({},b,{label:b.label||b.value,value:b.value||b.label})})},_suggest:function(b){var c=this.menu.element.empty();this._renderMenu(c,b),this.isNewMenu=!0,this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItemData(b,c)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-autocomplete-item",b)},_renderItem:function(b,c){return a("<li>").text(c.label).appendTo(b)},_move:function(a,b){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[a](b):void this.search(null,b)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,b){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(a,b),b.preventDefault())}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}}),a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(a){return a+(a>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(b){var c;this._superApply(arguments),this.options.disabled||this.cancelSearch||(c=b&&b.length?this.options.messages.results(b.length):this.options.messages.noResults,this.liveRegion.children().hide(),a("<div>").text(c).appendTo(this.liveRegion))}}),a.ui.autocomplete});
\ No newline at end of file
index a09be10d50f48795b8f55cd6f81991d10e617a5e..433de90bd009850488ae88f68fcb8c1a2176be7e 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/button/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],a):a(jQuery)}(function(a){var b,c="ui-button ui-widget ui-state-default ui-corner-all",d="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",e=function(){var b=a(this);setTimeout(function(){b.find(":ui-button").button("refresh")},1)},f=function(b){var c=b.name,d=b.form,e=a([]);return c&&(c=c.replace(/'/g,"\\'"),e=d?a(d).find("[name='"+c+"'][type=radio]"):a("[name='"+c+"'][type=radio]",b.ownerDocument).filter(function(){return!this.form})),e};return a.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,e),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var d=this,g=this.options,h="checkbox"===this.type||"radio"===this.type,i=h?"":"ui-state-active";null===g.label&&(g.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(c).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){g.disabled||this===b&&a(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){g.disabled||a(this).removeClass(i)}).bind("click"+this.eventNamespace,function(a){g.disabled&&(a.preventDefault(),a.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),h&&this.element.bind("change"+this.eventNamespace,function(){d.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return g.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(g.disabled)return!1;a(this).addClass("ui-state-active"),d.buttonElement.attr("aria-pressed","true");var b=d.element[0];f(b).not(b).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return g.disabled?!1:(a(this).addClass("ui-state-active"),b=this,void d.document.one("mouseup",function(){b=null}))}).bind("mouseup"+this.eventNamespace,function(){return g.disabled?!1:void a(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(b){return g.disabled?!1:void((b.keyCode===a.ui.keyCode.SPACE||b.keyCode===a.ui.keyCode.ENTER)&&a(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&&a(this).click()})),this._setOption("disabled",g.disabled),this._resetButton()},_determineButtonType:function(){var a,b,c;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type?(a=this.element.parents().last(),b="label[for='"+this.element.attr("id")+"']",this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible"),c=this.element.is(":checked"),c&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",c)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(c+" ui-state-active "+d).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(a,b){return this._super(a,b),"disabled"===a?(this.widget().toggleClass("ui-state-disabled",!!b),this.element.prop("disabled",!!b),void(b&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")))):void this._resetButton()},refresh:function(){var b=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");b!==this.options.disabled&&this._setOption("disabled",b),"radio"===this.type?f(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var b=this.buttonElement.removeClass(d),c=a("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),e=this.options.icons,f=e.primary&&e.secondary,g=[];e.primary||e.secondary?(this.options.text&&g.push("ui-button-text-icon"+(f?"s":e.primary?"-primary":"-secondary")),e.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+e.primary+"'></span>"),e.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+e.secondary+"'></span>"),this.options.text||(g.push(f?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",a.trim(c)))):g.push("ui-button-text-only"),b.addClass(g.join(" "))}}),a.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,b){"disabled"===a&&this.buttons.button("option",a,b),this._super(a,b)},refresh:function(){var b="rtl"===this.element.css("direction"),c=this.element.find(this.options.items),d=c.filter(":ui-button");c.not(":ui-button").button(),d.button("refresh"),this.buttons=c.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),a.ui.button});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],a):a(jQuery)}(function(a){var b,c="ui-button ui-widget ui-state-default ui-corner-all",d="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",e=function(){var b=a(this);setTimeout(function(){b.find(":ui-button").button("refresh")},1)},f=function(b){var c=b.name,d=b.form,e=a([]);return c&&(c=c.replace(/'/g,"\\'"),e=d?a(d).find("[name='"+c+"'][type=radio]"):a("[name='"+c+"'][type=radio]",b.ownerDocument).filter(function(){return!this.form})),e};return a.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,e),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var d=this,g=this.options,h="checkbox"===this.type||"radio"===this.type,i=h?"":"ui-state-active";null===g.label&&(g.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(c).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){g.disabled||this===b&&a(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){g.disabled||a(this).removeClass(i)}).bind("click"+this.eventNamespace,function(a){g.disabled&&(a.preventDefault(),a.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),h&&this.element.bind("change"+this.eventNamespace,function(){d.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(g.disabled)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(g.disabled)return!1;a(this).addClass("ui-state-active"),d.buttonElement.attr("aria-pressed","true");var b=d.element[0];f(b).not(b).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!g.disabled&&(a(this).addClass("ui-state-active"),b=this,void d.document.one("mouseup",function(){b=null}))}).bind("mouseup"+this.eventNamespace,function(){return!g.disabled&&void a(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(b){return!g.disabled&&void(b.keyCode!==a.ui.keyCode.SPACE&&b.keyCode!==a.ui.keyCode.ENTER||a(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&&a(this).click()})),this._setOption("disabled",g.disabled),this._resetButton()},_determineButtonType:function(){var a,b,c;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type?(a=this.element.parents().last(),b="label[for='"+this.element.attr("id")+"']",this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible"),c=this.element.is(":checked"),c&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",c)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(c+" ui-state-active "+d).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(a,b){return this._super(a,b),"disabled"===a?(this.widget().toggleClass("ui-state-disabled",!!b),this.element.prop("disabled",!!b),void(b&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")))):void this._resetButton()},refresh:function(){var b=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");b!==this.options.disabled&&this._setOption("disabled",b),"radio"===this.type?f(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var b=this.buttonElement.removeClass(d),c=a("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),e=this.options.icons,f=e.primary&&e.secondary,g=[];e.primary||e.secondary?(this.options.text&&g.push("ui-button-text-icon"+(f?"s":e.primary?"-primary":"-secondary")),e.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+e.primary+"'></span>"),e.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+e.secondary+"'></span>"),this.options.text||(g.push(f?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",a.trim(c)))):g.push("ui-button-text-only"),b.addClass(g.join(" "))}}),a.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,b){"disabled"===a&&this.buttons.button("option",a,b),this._super(a,b)},refresh:function(){var b="rtl"===this.element.css("direction"),c=this.element.find(this.options.items),d=c.filter(":ui-button");c.not(":ui-button").button(),d.button("refresh"),this.buttons=c.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),a.ui.button});
\ No newline at end of file
index db53461fe17dbca313042a0a6722eae3a0886175..7b136afa638bfd703194a25a34c30557b224c577 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/category/ui-core/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(b,d){var e,f,g,h=b.nodeName.toLowerCase();return"area"===h?(e=b.parentNode,f=e.name,b.href&&f&&"map"===e.nodeName.toLowerCase()?(g=a("img[usemap='#"+f+"']")[0],!!g&&c(g)):!1):(/^(input|select|textarea|button|object)$/.test(h)?!b.disabled:"a"===h?b.href||d:d)&&c(b)}function c(b){return a.expr.filters.visible(b)&&!a(b).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}a.ui=a.ui||{},a.extend(a.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),a.fn.extend({scrollParent:function(b){var c=this.css("position"),d="absolute"===c,e=b?/(auto|scroll|hidden)/:/(auto|scroll)/,f=this.parents().filter(function(){var b=a(this);return d&&"static"===b.css("position")?!1:e.test(b.css("overflow")+b.css("overflow-y")+b.css("overflow-x"))}).eq(0);return"fixed"!==c&&f.length?f:a(this[0].ownerDocument||document)},uniqueId:function(){var a=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(c){return b(c,!isNaN(a.attr(c,"tabindex")))},tabbable:function(c){var d=a.attr(c,"tabindex"),e=isNaN(d);return(e||d>=0)&&b(c,!e)}}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(b,c){function d(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.css(b,"padding"+this))||0,d&&(c-=parseFloat(a.css(b,"border"+this+"Width"))||0),f&&(c-=parseFloat(a.css(b,"margin"+this))||0)}),c}var e="Width"===c?["Left","Right"]:["Top","Bottom"],f=c.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+c]=function(b){return void 0===b?g["inner"+c].call(this):this.each(function(){a(this).css(f,d(this,b)+"px")})},a.fn["outer"+c]=function(b,e){return"number"!=typeof b?g["outer"+c].call(this,b):this.each(function(){a(this).css(f,d(this,b,!0,e)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=function(b){return function(c){return arguments.length?b.call(this,a.camelCase(c)):b.call(this)}}(a.fn.removeData)),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.fn.extend({focus:function(b){return function(c,d){return"number"==typeof c?this.each(function(){var b=this;setTimeout(function(){a(b).focus(),d&&d.call(b)},c)}):b.apply(this,arguments)}}(a.fn.focus),disableSelection:function(){var a="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(a+".ui-disableSelection",function(a){a.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(b){if(void 0!==b)return this.css("zIndex",b);if(this.length)for(var c,d,e=a(this[0]);e.length&&e[0]!==document;){if(c=e.css("position"),("absolute"===c||"relative"===c||"fixed"===c)&&(d=parseInt(e.css("zIndex"),10),!isNaN(d)&&0!==d))return d;e=e.parent()}return 0}}),a.ui.plugin={add:function(b,c,d){var e,f=a.ui[b].prototype;for(e in d)f.plugins[e]=f.plugins[e]||[],f.plugins[e].push([c,d[e]])},call:function(a,b,c,d){var e,f=a.plugins[b];if(f&&(d||a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType))for(e=0;e<f.length;e++)a.options[f[e][0]]&&f[e][1].apply(a.element,c)}}});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(b,d){var e,f,g,h=b.nodeName.toLowerCase();return"area"===h?(e=b.parentNode,f=e.name,!(!b.href||!f||"map"!==e.nodeName.toLowerCase())&&(g=a("img[usemap='#"+f+"']")[0],!!g&&c(g))):(/^(input|select|textarea|button|object)$/.test(h)?!b.disabled:"a"===h?b.href||d:d)&&c(b)}function c(b){return a.expr.filters.visible(b)&&!a(b).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}a.ui=a.ui||{},a.extend(a.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),a.fn.extend({scrollParent:function(b){var c=this.css("position"),d="absolute"===c,e=b?/(auto|scroll|hidden)/:/(auto|scroll)/,f=this.parents().filter(function(){var b=a(this);return(!d||"static"!==b.css("position"))&&e.test(b.css("overflow")+b.css("overflow-y")+b.css("overflow-x"))}).eq(0);return"fixed"!==c&&f.length?f:a(this[0].ownerDocument||document)},uniqueId:function(){var a=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(c){return b(c,!isNaN(a.attr(c,"tabindex")))},tabbable:function(c){var d=a.attr(c,"tabindex"),e=isNaN(d);return(e||d>=0)&&b(c,!e)}}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(b,c){function d(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.css(b,"padding"+this))||0,d&&(c-=parseFloat(a.css(b,"border"+this+"Width"))||0),f&&(c-=parseFloat(a.css(b,"margin"+this))||0)}),c}var e="Width"===c?["Left","Right"]:["Top","Bottom"],f=c.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+c]=function(b){return void 0===b?g["inner"+c].call(this):this.each(function(){a(this).css(f,d(this,b)+"px")})},a.fn["outer"+c]=function(b,e){return"number"!=typeof b?g["outer"+c].call(this,b):this.each(function(){a(this).css(f,d(this,b,!0,e)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=function(b){return function(c){return arguments.length?b.call(this,a.camelCase(c)):b.call(this)}}(a.fn.removeData)),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.fn.extend({focus:function(b){return function(c,d){return"number"==typeof c?this.each(function(){var b=this;setTimeout(function(){a(b).focus(),d&&d.call(b)},c)}):b.apply(this,arguments)}}(a.fn.focus),disableSelection:function(){var a="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(a+".ui-disableSelection",function(a){a.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(b){if(void 0!==b)return this.css("zIndex",b);if(this.length)for(var c,d,e=a(this[0]);e.length&&e[0]!==document;){if(c=e.css("position"),("absolute"===c||"relative"===c||"fixed"===c)&&(d=parseInt(e.css("zIndex"),10),!isNaN(d)&&0!==d))return d;e=e.parent()}return 0}}),a.ui.plugin={add:function(b,c,d){var e,f=a.ui[b].prototype;for(e in d)f.plugins[e]=f.plugins[e]||[],f.plugins[e].push([c,d[e]])},call:function(a,b,c,d){var e,f=a.plugins[b];if(f&&(d||a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType))for(e=0;e<f.length;e++)a.options[f[e][0]]&&f[e][1].apply(a.element,c)}}});
\ No newline at end of file
index 22cc90876ecf52e92073032096791d4e4dfbd444..805f8e76d0d30128b1683ec9ab8c042b2bcb60ee 100644 (file)
@@ -8,5 +8,5 @@
  *
  * http://api.jqueryui.com/datepicker/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core"],a):a(jQuery)}(function(a){function b(a){for(var b,c;a.length&&a[0]!==document;){if(b=a.css("position"),("absolute"===b||"relative"===b||"fixed"===b)&&(c=parseInt(a.css("zIndex"),10),!isNaN(c)&&0!==c))return c;a=a.parent()}return 0}function c(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},a.extend(this._defaults,this.regional[""]),this.regional.en=a.extend(!0,{},this.regional[""]),this.regional["en-US"]=a.extend(!0,{},this.regional.en),this.dpDiv=d(a("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function d(b){var c="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return b.delegate(c,"mouseout",function(){a(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&a(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&a(this).removeClass("ui-datepicker-next-hover")}).delegate(c,"mouseover",e)}function e(){a.datepicker._isDisabledDatepicker(g.inline?g.dpDiv.parent()[0]:g.input[0])||(a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),a(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&a(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&a(this).addClass("ui-datepicker-next-hover"))}function f(b,c){a.extend(b,c);for(var d in c)null==c[d]&&(b[d]=c[d]);return b}a.extend(a.ui,{datepicker:{version:"1.11.4"}});var g;return a.extend(c.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return f(this._defaults,a||{}),this},_attachDatepicker:function(b,c){var d,e,f;d=b.nodeName.toLowerCase(),e="div"===d||"span"===d,b.id||(this.uuid+=1,b.id="dp"+this.uuid),f=this._newInst(a(b),e),f.settings=a.extend({},c||{}),"input"===d?this._connectDatepicker(b,f):e&&this._inlineDatepicker(b,f)},_newInst:function(b,c){var e=b[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:e,input:b,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:c,dpDiv:c?d(a("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(b,c){var d=a(b);c.append=a([]),c.trigger=a([]),d.hasClass(this.markerClassName)||(this._attachments(d,c),d.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(c),a.data(b,"datepicker",c),c.settings.disabled&&this._disableDatepicker(b))},_attachments:function(b,c){var d,e,f,g=this._get(c,"appendText"),h=this._get(c,"isRTL");c.append&&c.append.remove(),g&&(c.append=a("<span class='"+this._appendClass+"'>"+g+"</span>"),b[h?"before":"after"](c.append)),b.unbind("focus",this._showDatepicker),c.trigger&&c.trigger.remove(),d=this._get(c,"showOn"),("focus"===d||"both"===d)&&b.focus(this._showDatepicker),("button"===d||"both"===d)&&(e=this._get(c,"buttonText"),f=this._get(c,"buttonImage"),c.trigger=a(this._get(c,"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:f,alt:e,title:e}):a("<button type='button'></button>").addClass(this._triggerClass).html(f?a("<img/>").attr({src:f,alt:e,title:e}):e)),b[h?"before":"after"](c.trigger),c.trigger.click(function(){return a.datepicker._datepickerShowing&&a.datepicker._lastInput===b[0]?a.datepicker._hideDatepicker():a.datepicker._datepickerShowing&&a.datepicker._lastInput!==b[0]?(a.datepicker._hideDatepicker(),a.datepicker._showDatepicker(b[0])):a.datepicker._showDatepicker(b[0]),!1}))},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b,c,d,e,f=new Date(2009,11,20),g=this._get(a,"dateFormat");g.match(/[DM]/)&&(b=function(a){for(c=0,d=0,e=0;e<a.length;e++)a[e].length>c&&(c=a[e].length,d=e);return d},f.setMonth(b(this._get(a,g.match(/MM/)?"monthNames":"monthNamesShort"))),f.setDate(b(this._get(a,g.match(/DD/)?"dayNames":"dayNamesShort"))+20-f.getDay())),a.input.attr("size",this._formatDate(a,f).length)}},_inlineDatepicker:function(b,c){var d=a(b);d.hasClass(this.markerClassName)||(d.addClass(this.markerClassName).append(c.dpDiv),a.data(b,"datepicker",c),this._setDate(c,this._getDefaultDate(c),!0),this._updateDatepicker(c),this._updateAlternate(c),c.settings.disabled&&this._disableDatepicker(b),c.dpDiv.css("display","block"))},_dialogDatepicker:function(b,c,d,e,g){var h,i,j,k,l,m=this._dialogInst;return m||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=a("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),a("body").append(this._dialogInput),m=this._dialogInst=this._newInst(this._dialogInput,!1),m.settings={},a.data(this._dialogInput[0],"datepicker",m)),f(m.settings,e||{}),c=c&&c.constructor===Date?this._formatDate(m,c):c,this._dialogInput.val(c),this._pos=g?g.length?g:[g.pageX,g.pageY]:null,this._pos||(i=document.documentElement.clientWidth,j=document.documentElement.clientHeight,k=document.documentElement.scrollLeft||document.body.scrollLeft,l=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[i/2-100+k,j/2-150+l]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),m.settings.onSelect=d,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),a.blockUI&&a.blockUI(this.dpDiv),a.data(this._dialogInput[0],"datepicker",m),this},_destroyDatepicker:function(b){var c,d=a(b),e=a.data(b,"datepicker");d.hasClass(this.markerClassName)&&(c=b.nodeName.toLowerCase(),a.removeData(b,"datepicker"),"input"===c?(e.append.remove(),e.trigger.remove(),d.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===c||"span"===c)&&d.removeClass(this.markerClassName).empty(),g===e&&(g=null))},_enableDatepicker:function(b){var c,d,e=a(b),f=a.data(b,"datepicker");e.hasClass(this.markerClassName)&&(c=b.nodeName.toLowerCase(),"input"===c?(b.disabled=!1,f.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===c||"span"===c)&&(d=e.children("."+this._inlineClass),d.children().removeClass("ui-state-disabled"),d.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}))},_disableDatepicker:function(b){var c,d,e=a(b),f=a.data(b,"datepicker");e.hasClass(this.markerClassName)&&(c=b.nodeName.toLowerCase(),"input"===c?(b.disabled=!0,f.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===c||"span"===c)&&(d=e.children("."+this._inlineClass),d.children().addClass("ui-state-disabled"),d.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}),this._disabledInputs[this._disabledInputs.length]=b)},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]===a)return!0;return!1},_getInst:function(b){try{return a.data(b,"datepicker")}catch(c){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(b,c,d){var e,g,h,i,j=this._getInst(b);return 2===arguments.length&&"string"==typeof c?"defaults"===c?a.extend({},a.datepicker._defaults):j?"all"===c?a.extend({},j.settings):this._get(j,c):null:(e=c||{},"string"==typeof c&&(e={},e[c]=d),void(j&&(this._curInst===j&&this._hideDatepicker(),g=this._getDateDatepicker(b,!0),h=this._getMinMaxDate(j,"min"),i=this._getMinMaxDate(j,"max"),f(j.settings,e),null!==h&&void 0!==e.dateFormat&&void 0===e.minDate&&(j.settings.minDate=this._formatDate(j,h)),null!==i&&void 0!==e.dateFormat&&void 0===e.maxDate&&(j.settings.maxDate=this._formatDate(j,i)),"disabled"in e&&(e.disabled?this._disableDatepicker(b):this._enableDatepicker(b)),this._attachments(a(b),j),this._autoSize(j),this._setDate(j,g),this._updateAlternate(j),this._updateDatepicker(j))))},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&&this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&&!c.inline&&this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(b){var c,d,e,f=a.datepicker._getInst(b.target),g=!0,h=f.dpDiv.is(".ui-datepicker-rtl");if(f._keyEvent=!0,a.datepicker._datepickerShowing)switch(b.keyCode){case 9:a.datepicker._hideDatepicker(),g=!1;break;case 13:return e=a("td."+a.datepicker._dayOverClass+":not(."+a.datepicker._currentClass+")",f.dpDiv),e[0]&&a.datepicker._selectDay(b.target,f.selectedMonth,f.selectedYear,e[0]),c=a.datepicker._get(f,"onSelect"),c?(d=a.datepicker._formatDate(f),c.apply(f.input?f.input[0]:null,[d,f])):a.datepicker._hideDatepicker(),!1;case 27:a.datepicker._hideDatepicker();break;case 33:a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 34:a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,"stepMonths"),"M");break;case 35:(b.ctrlKey||b.metaKey)&&a.datepicker._clearDate(b.target),g=b.ctrlKey||b.metaKey;break;case 36:(b.ctrlKey||b.metaKey)&&a.datepicker._gotoToday(b.target),g=b.ctrlKey||b.metaKey;break;case 37:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,h?1:-1,"D"),g=b.ctrlKey||b.metaKey,b.originalEvent.altKey&&a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 38:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,-7,"D"),g=b.ctrlKey||b.metaKey;break;case 39:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,h?-1:1,"D"),g=b.ctrlKey||b.metaKey,b.originalEvent.altKey&&a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,"stepMonths"),"M");break;case 40:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,7,"D"),g=b.ctrlKey||b.metaKey;break;default:g=!1}else 36===b.keyCode&&b.ctrlKey?a.datepicker._showDatepicker(this):g=!1;g&&(b.preventDefault(),b.stopPropagation())},_doKeyPress:function(b){var c,d,e=a.datepicker._getInst(b.target);return a.datepicker._get(e,"constrainInput")?(c=a.datepicker._possibleChars(a.datepicker._get(e,"dateFormat")),d=String.fromCharCode(null==b.charCode?b.keyCode:b.charCode),b.ctrlKey||b.metaKey||" ">d||!c||c.indexOf(d)>-1):void 0},_doKeyUp:function(b){var c,d=a.datepicker._getInst(b.target);if(d.input.val()!==d.lastVal)try{c=a.datepicker.parseDate(a.datepicker._get(d,"dateFormat"),d.input?d.input.val():null,a.datepicker._getFormatConfig(d)),c&&(a.datepicker._setDateFromField(d),a.datepicker._updateAlternate(d),a.datepicker._updateDatepicker(d))}catch(e){}return!0},_showDatepicker:function(c){if(c=c.target||c,"input"!==c.nodeName.toLowerCase()&&(c=a("input",c.parentNode)[0]),!a.datepicker._isDisabledDatepicker(c)&&a.datepicker._lastInput!==c){var d,e,g,h,i,j,k;d=a.datepicker._getInst(c),a.datepicker._curInst&&a.datepicker._curInst!==d&&(a.datepicker._curInst.dpDiv.stop(!0,!0),d&&a.datepicker._datepickerShowing&&a.datepicker._hideDatepicker(a.datepicker._curInst.input[0])),e=a.datepicker._get(d,"beforeShow"),g=e?e.apply(c,[c,d]):{},g!==!1&&(f(d.settings,g),d.lastVal=null,a.datepicker._lastInput=c,a.datepicker._setDateFromField(d),a.datepicker._inDialog&&(c.value=""),a.datepicker._pos||(a.datepicker._pos=a.datepicker._findPos(c),a.datepicker._pos[1]+=c.offsetHeight),h=!1,a(c).parents().each(function(){return h|="fixed"===a(this).css("position"),!h}),i={left:a.datepicker._pos[0],top:a.datepicker._pos[1]},a.datepicker._pos=null,d.dpDiv.empty(),d.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),a.datepicker._updateDatepicker(d),i=a.datepicker._checkOffset(d,i,h),d.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":h?"fixed":"absolute",display:"none",left:i.left+"px",top:i.top+"px"}),d.inline||(j=a.datepicker._get(d,"showAnim"),k=a.datepicker._get(d,"duration"),d.dpDiv.css("z-index",b(a(c))+1),a.datepicker._datepickerShowing=!0,a.effects&&a.effects.effect[j]?d.dpDiv.show(j,a.datepicker._get(d,"showOptions"),k):d.dpDiv[j||"show"](j?k:null),a.datepicker._shouldFocusInput(d)&&d.input.focus(),a.datepicker._curInst=d))}},_updateDatepicker:function(b){this.maxRows=4,g=b,b.dpDiv.empty().append(this._generateHTML(b)),this._attachHandlers(b);var c,d=this._getNumberOfMonths(b),f=d[1],h=17,i=b.dpDiv.find("."+this._dayOverClass+" a");i.length>0&&e.apply(i.get(0)),b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&b.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",h*f+"em"),b.dpDiv[(1!==d[0]||1!==d[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),b===a.datepicker._curInst&&a.datepicker._datepickerShowing&&a.datepicker._shouldFocusInput(b)&&b.input.focus(),b.yearshtml&&(c=b.yearshtml,setTimeout(function(){c===b.yearshtml&&b.yearshtml&&b.dpDiv.find("select.ui-datepicker-year:first").replaceWith(b.yearshtml),c=b.yearshtml=null},0))},_shouldFocusInput:function(a){return a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&!a.input.is(":focus")},_checkOffset:function(b,c,d){var e=b.dpDiv.outerWidth(),f=b.dpDiv.outerHeight(),g=b.input?b.input.outerWidth():0,h=b.input?b.input.outerHeight():0,i=document.documentElement.clientWidth+(d?0:a(document).scrollLeft()),j=document.documentElement.clientHeight+(d?0:a(document).scrollTop());return c.left-=this._get(b,"isRTL")?e-g:0,c.left-=d&&c.left===b.input.offset().left?a(document).scrollLeft():0,c.top-=d&&c.top===b.input.offset().top+h?a(document).scrollTop():0,c.left-=Math.min(c.left,c.left+e>i&&i>e?Math.abs(c.left+e-i):0),c.top-=Math.min(c.top,c.top+f>j&&j>f?Math.abs(f+h):0),c},_findPos:function(b){for(var c,d=this._getInst(b),e=this._get(d,"isRTL");b&&("hidden"===b.type||1!==b.nodeType||a.expr.filters.hidden(b));)b=b[e?"previousSibling":"nextSibling"];return c=a(b).offset(),[c.left,c.top]},_hideDatepicker:function(b){var c,d,e,f,g=this._curInst;!g||b&&g!==a.data(b,"datepicker")||this._datepickerShowing&&(c=this._get(g,"showAnim"),d=this._get(g,"duration"),e=function(){a.datepicker._tidyDialog(g)},a.effects&&(a.effects.effect[c]||a.effects[c])?g.dpDiv.hide(c,a.datepicker._get(g,"showOptions"),d,e):g.dpDiv["slideDown"===c?"slideUp":"fadeIn"===c?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1,f=this._get(g,"onClose"),f&&f.apply(g.input?g.input[0]:null,[g.input?g.input.val():"",g]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),a.blockUI&&(a.unblockUI(),a("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(b){if(a.datepicker._curInst){var c=a(b.target),d=a.datepicker._getInst(c[0]);(c[0].id!==a.datepicker._mainDivId&&0===c.parents("#"+a.datepicker._mainDivId).length&&!c.hasClass(a.datepicker.markerClassName)&&!c.closest("."+a.datepicker._triggerClass).length&&a.datepicker._datepickerShowing&&(!a.datepicker._inDialog||!a.blockUI)||c.hasClass(a.datepicker.markerClassName)&&a.datepicker._curInst!==d)&&a.datepicker._hideDatepicker()}},_adjustDate:function(b,c,d){var e=a(b),f=this._getInst(e[0]);this._isDisabledDatepicker(e[0])||(this._adjustInstDate(f,c+("M"===d?this._get(f,"showCurrentAtPos"):0),d),this._updateDatepicker(f))},_gotoToday:function(b){var c,d=a(b),e=this._getInst(d[0]);this._get(e,"gotoCurrent")&&e.currentDay?(e.selectedDay=e.currentDay,e.drawMonth=e.selectedMonth=e.currentMonth,e.drawYear=e.selectedYear=e.currentYear):(c=new Date,e.selectedDay=c.getDate(),e.drawMonth=e.selectedMonth=c.getMonth(),e.drawYear=e.selectedYear=c.getFullYear()),this._notifyChange(e),this._adjustDate(d)},_selectMonthYear:function(b,c,d){var e=a(b),f=this._getInst(e[0]);f["selected"+("M"===d?"Month":"Year")]=f["draw"+("M"===d?"Month":"Year")]=parseInt(c.options[c.selectedIndex].value,10),this._notifyChange(f),this._adjustDate(e)},_selectDay:function(b,c,d,e){var f,g=a(b);a(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(g[0])||(f=this._getInst(g[0]),f.selectedDay=f.currentDay=a("a",e).html(),f.selectedMonth=f.currentMonth=c,f.selectedYear=f.currentYear=d,this._selectDate(b,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(b){var c=a(b);this._selectDate(c,"")},_selectDate:function(b,c){var d,e=a(b),f=this._getInst(e[0]);c=null!=c?c:this._formatDate(f),f.input&&f.input.val(c),this._updateAlternate(f),d=this._get(f,"onSelect"),d?d.apply(f.input?f.input[0]:null,[c,f]):f.input&&f.input.trigger("change"),f.inline?this._updateDatepicker(f):(this._hideDatepicker(),this._lastInput=f.input[0],"object"!=typeof f.input[0]&&f.input.focus(),this._lastInput=null)},_updateAlternate:function(b){var c,d,e,f=this._get(b,"altField");f&&(c=this._get(b,"altFormat")||this._get(b,"dateFormat"),d=this._getDate(b),e=this.formatDate(c,d,this._getFormatConfig(b)),a(f).each(function(){a(this).val(e)}))},noWeekends:function(a){var b=a.getDay();return[b>0&&6>b,""]},iso8601Week:function(a){var b,c=new Date(a.getTime());return c.setDate(c.getDate()+4-(c.getDay()||7)),b=c.getTime(),c.setMonth(0),c.setDate(1),Math.floor(Math.round((b-c)/864e5)/7)+1},parseDate:function(b,c,d){if(null==b||null==c)throw"Invalid arguments";if(c="object"==typeof c?c.toString():c+"",""===c)return null;var e,f,g,h,i=0,j=(d?d.shortYearCutoff:null)||this._defaults.shortYearCutoff,k="string"!=typeof j?j:(new Date).getFullYear()%100+parseInt(j,10),l=(d?d.dayNamesShort:null)||this._defaults.dayNamesShort,m=(d?d.dayNames:null)||this._defaults.dayNames,n=(d?d.monthNamesShort:null)||this._defaults.monthNamesShort,o=(d?d.monthNames:null)||this._defaults.monthNames,p=-1,q=-1,r=-1,s=-1,t=!1,u=function(a){var c=e+1<b.length&&b.charAt(e+1)===a;return c&&e++,c},v=function(a){var b=u(a),d="@"===a?14:"!"===a?20:"y"===a&&b?4:"o"===a?3:2,e="y"===a?d:1,f=new RegExp("^\\d{"+e+","+d+"}"),g=c.substring(i).match(f);if(!g)throw"Missing number at position "+i;return i+=g[0].length,parseInt(g[0],10)},w=function(b,d,e){var f=-1,g=a.map(u(b)?e:d,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)});if(a.each(g,function(a,b){var d=b[1];return c.substr(i,d.length).toLowerCase()===d.toLowerCase()?(f=b[0],i+=d.length,!1):void 0}),-1!==f)return f+1;throw"Unknown name at position "+i},x=function(){if(c.charAt(i)!==b.charAt(e))throw"Unexpected literal at position "+i;i++};for(e=0;e<b.length;e++)if(t)"'"!==b.charAt(e)||u("'")?x():t=!1;else switch(b.charAt(e)){case"d":r=v("d");break;case"D":w("D",l,m);break;case"o":s=v("o");break;case"m":q=v("m");break;case"M":q=w("M",n,o);break;case"y":p=v("y");break;case"@":h=new Date(v("@")),p=h.getFullYear(),q=h.getMonth()+1,r=h.getDate();break;case"!":h=new Date((v("!")-this._ticksTo1970)/1e4),p=h.getFullYear(),q=h.getMonth()+1,r=h.getDate();break;case"'":u("'")?x():t=!0;break;default:x()}if(i<c.length&&(g=c.substr(i),!/^\s+/.test(g)))throw"Extra/unparsed characters found in date: "+g;if(-1===p?p=(new Date).getFullYear():100>p&&(p+=(new Date).getFullYear()-(new Date).getFullYear()%100+(k>=p?0:-100)),s>-1)for(q=1,r=s;;){if(f=this._getDaysInMonth(p,q-1),f>=r)break;q++,r-=f}if(h=this._daylightSavingAdjust(new Date(p,q-1,r)),h.getFullYear()!==p||h.getMonth()+1!==q||h.getDate()!==r)throw"Invalid date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d,e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=function(b){var c=d+1<a.length&&a.charAt(d+1)===b;return c&&d++,c},j=function(a,b,c){var d=""+b;if(i(a))for(;d.length<c;)d="0"+d;return d},k=function(a,b,c,d){return i(a)?d[b]:c[b]},l="",m=!1;if(b)for(d=0;d<a.length;d++)if(m)"'"!==a.charAt(d)||i("'")?l+=a.charAt(d):m=!1;else switch(a.charAt(d)){case"d":l+=j("d",b.getDate(),2);break;case"D":l+=k("D",b.getDay(),e,f);break;case"o":l+=j("o",Math.round((new Date(b.getFullYear(),b.getMonth(),b.getDate()).getTime()-new Date(b.getFullYear(),0,0).getTime())/864e5),3);break;case"m":l+=j("m",b.getMonth()+1,2);break;case"M":l+=k("M",b.getMonth(),g,h);break;case"y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":l+=b.getTime();break;case"!":l+=1e4*b.getTime()+this._ticksTo1970;break;case"'":i("'")?l+="'":m=!0;break;default:l+=a.charAt(d)}return l},_possibleChars:function(a){var b,c="",d=!1,e=function(c){var d=b+1<a.length&&a.charAt(b+1)===c;return d&&b++,d};for(b=0;b<a.length;b++)if(d)"'"!==a.charAt(b)||e("'")?c+=a.charAt(b):d=!1;else switch(a.charAt(b)){case"d":case"m":case"y":case"@":c+="0123456789";break;case"D":case"M":return null;case"'":e("'")?c+="'":d=!0;break;default:c+=a.charAt(b)}return c},_get:function(a,b){return void 0!==a.settings[b]?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!==a.lastVal){var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e=this._getDefaultDate(a),f=e,g=this._getFormatConfig(a);try{f=this.parseDate(c,d,g)||e}catch(h){d=b?"":d}a.selectedDay=f.getDate(),a.drawMonth=a.selectedMonth=f.getMonth(),a.drawYear=a.selectedYear=f.getFullYear(),a.currentDay=d?f.getDate():0,a.currentMonth=d?f.getMonth():0,a.currentYear=d?f.getFullYear():0,this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(b,c,d){var e=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},f=function(c){try{return a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),c,a.datepicker._getFormatConfig(b))}catch(d){}for(var e=(c.toLowerCase().match(/^c/)?a.datepicker._getDate(b):null)||new Date,f=e.getFullYear(),g=e.getMonth(),h=e.getDate(),i=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,j=i.exec(c);j;){switch(j[2]||"d"){case"d":case"D":h+=parseInt(j[1],10);break;case"w":case"W":h+=7*parseInt(j[1],10);break;case"m":case"M":g+=parseInt(j[1],10),h=Math.min(h,a.datepicker._getDaysInMonth(f,g));break;case"y":case"Y":f+=parseInt(j[1],10),h=Math.min(h,a.datepicker._getDaysInMonth(f,g))}j=i.exec(c)}return new Date(f,g,h)},g=null==c||""===c?d:"string"==typeof c?f(c):"number"==typeof c?isNaN(c)?d:e(c):new Date(c.getTime());return g=g&&"Invalid Date"===g.toString()?d:g,g&&(g.setHours(0),g.setMinutes(0),g.setSeconds(0),g.setMilliseconds(0)),this._daylightSavingAdjust(g)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),e===a.selectedMonth&&f===a.selectedYear||c||this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&""===a.input.val()?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_attachHandlers:function(b){var c=this._get(b,"stepMonths"),d="#"+b.id.replace(/\\\\/g,"\\");b.dpDiv.find("[data-handler]").map(function(){var b={prev:function(){a.datepicker._adjustDate(d,-c,"M")},next:function(){a.datepicker._adjustDate(d,+c,"M")},hide:function(){a.datepicker._hideDatepicker()},today:function(){a.datepicker._gotoToday(d)},selectDay:function(){return a.datepicker._selectDay(d,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return a.datepicker._selectMonthYear(d,this,"M"),!1},selectYear:function(){return a.datepicker._selectMonthYear(d,this,"Y"),!1}};a(this).bind(this.getAttribute("data-event"),b[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O=new Date,P=this._daylightSavingAdjust(new Date(O.getFullYear(),O.getMonth(),O.getDate())),Q=this._get(a,"isRTL"),R=this._get(a,"showButtonPanel"),S=this._get(a,"hideIfNoPrevNext"),T=this._get(a,"navigationAsDateFormat"),U=this._getNumberOfMonths(a),V=this._get(a,"showCurrentAtPos"),W=this._get(a,"stepMonths"),X=1!==U[0]||1!==U[1],Y=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),Z=this._getMinMaxDate(a,"min"),$=this._getMinMaxDate(a,"max"),_=a.drawMonth-V,aa=a.drawYear;if(0>_&&(_+=12,aa--),$)for(b=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-U[0]*U[1]+1,$.getDate())),b=Z&&Z>b?Z:b;this._daylightSavingAdjust(new Date(aa,_,1))>b;)_--,0>_&&(_=11,aa--);for(a.drawMonth=_,a.drawYear=aa,c=this._get(a,"prevText"),c=T?this.formatDate(c,this._daylightSavingAdjust(new Date(aa,_-W,1)),this._getFormatConfig(a)):c,d=this._canAdjustMonth(a,-1,aa,_)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"e":"w")+"'>"+c+"</span></a>":S?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"e":"w")+"'>"+c+"</span></a>",e=this._get(a,"nextText"),e=T?this.formatDate(e,this._daylightSavingAdjust(new Date(aa,_+W,1)),this._getFormatConfig(a)):e,f=this._canAdjustMonth(a,1,aa,_)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+e+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"w":"e")+"'>"+e+"</span></a>":S?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+e+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"w":"e")+"'>"+e+"</span></a>",g=this._get(a,"currentText"),h=this._get(a,"gotoCurrent")&&a.currentDay?Y:P,g=T?this.formatDate(g,h,this._getFormatConfig(a)):g,i=a.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(a,"closeText")+"</button>",j=R?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Q?i:"")+(this._isInRange(a,h)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+g+"</button>":"")+(Q?"":i)+"</div>":"",k=parseInt(this._get(a,"firstDay"),10),k=isNaN(k)?0:k,l=this._get(a,"showWeek"),m=this._get(a,"dayNames"),n=this._get(a,"dayNamesMin"),o=this._get(a,"monthNames"),p=this._get(a,"monthNamesShort"),q=this._get(a,"beforeShowDay"),r=this._get(a,"showOtherMonths"),s=this._get(a,"selectOtherMonths"),t=this._getDefaultDate(a),u="",w=0;w<U[0];w++){for(x="",this.maxRows=4,y=0;y<U[1];y++){if(z=this._daylightSavingAdjust(new Date(aa,_,a.selectedDay)),A=" ui-corner-all",B="",X){if(B+="<div class='ui-datepicker-group",U[1]>1)switch(y){case 0:B+=" ui-datepicker-group-first",A=" ui-corner-"+(Q?"right":"left");break;case U[1]-1:B+=" ui-datepicker-group-last",A=" ui-corner-"+(Q?"left":"right");break;default:B+=" ui-datepicker-group-middle",A=""}B+="'>"}for(B+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+A+"'>"+(/all|left/.test(A)&&0===w?Q?f:d:"")+(/all|right/.test(A)&&0===w?Q?d:f:"")+this._generateMonthYearHeader(a,_,aa,Z,$,w>0||y>0,o,p)+"</div><table class='ui-datepicker-calendar'><thead><tr>",C=l?"<th class='ui-datepicker-week-col'>"+this._get(a,"weekHeader")+"</th>":"",v=0;7>v;v++)D=(v+k)%7,C+="<th scope='col'"+((v+k+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+m[D]+"'>"+n[D]+"</span></th>";for(B+=C+"</tr></thead><tbody>",E=this._getDaysInMonth(aa,_),aa===a.selectedYear&&_===a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,E)),F=(this._getFirstDayOfMonth(aa,_)-k+7)%7,G=Math.ceil((F+E)/7),H=X&&this.maxRows>G?this.maxRows:G,this.maxRows=H,I=this._daylightSavingAdjust(new Date(aa,_,1-F)),J=0;H>J;J++){for(B+="<tr>",K=l?"<td class='ui-datepicker-week-col'>"+this._get(a,"calculateWeek")(I)+"</td>":"",v=0;7>v;v++)L=q?q.apply(a.input?a.input[0]:null,[I]):[!0,""],M=I.getMonth()!==_,N=M&&!s||!L[0]||Z&&Z>I||$&&I>$,K+="<td class='"+((v+k+6)%7>=5?" ui-datepicker-week-end":"")+(M?" ui-datepicker-other-month":"")+(I.getTime()===z.getTime()&&_===a.selectedMonth&&a._keyEvent||t.getTime()===I.getTime()&&t.getTime()===z.getTime()?" "+this._dayOverClass:"")+(N?" "+this._unselectableClass+" ui-state-disabled":"")+(M&&!r?"":" "+L[1]+(I.getTime()===Y.getTime()?" "+this._currentClass:"")+(I.getTime()===P.getTime()?" ui-datepicker-today":""))+"'"+(M&&!r||!L[2]?"":" title='"+L[2].replace(/'/g,"&#39;")+"'")+(N?"":" data-handler='selectDay' data-event='click' data-month='"+I.getMonth()+"' data-year='"+I.getFullYear()+"'")+">"+(M&&!r?"&#xa0;":N?"<span class='ui-state-default'>"+I.getDate()+"</span>":"<a class='ui-state-default"+(I.getTime()===P.getTime()?" ui-state-highlight":"")+(I.getTime()===Y.getTime()?" ui-state-active":"")+(M?" ui-priority-secondary":"")+"' href='#'>"+I.getDate()+"</a>")+"</td>",I.setDate(I.getDate()+1),I=this._daylightSavingAdjust(I);B+=K+"</tr>"}_++,_>11&&(_=0,aa++),B+="</tbody></table>"+(X?"</div>"+(U[0]>0&&y===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=B}u+=x}return u+=j,a._keyEvent=!1,u},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q=this._get(a,"changeMonth"),r=this._get(a,"changeYear"),s=this._get(a,"showMonthAfterYear"),t="<div class='ui-datepicker-title'>",u="";if(f||!q)u+="<span class='ui-datepicker-month'>"+g[b]+"</span>";else{
-for(i=d&&d.getFullYear()===c,j=e&&e.getFullYear()===c,u+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",k=0;12>k;k++)(!i||k>=d.getMonth())&&(!j||k<=e.getMonth())&&(u+="<option value='"+k+"'"+(k===b?" selected='selected'":"")+">"+h[k]+"</option>");u+="</select>"}if(s||(t+=u+(!f&&q&&r?"":"&#xa0;")),!a.yearshtml)if(a.yearshtml="",f||!r)t+="<span class='ui-datepicker-year'>"+c+"</span>";else{for(l=this._get(a,"yearRange").split(":"),m=(new Date).getFullYear(),n=function(a){var b=a.match(/c[+\-].*/)?c+parseInt(a.substring(1),10):a.match(/[+\-].*/)?m+parseInt(a,10):parseInt(a,10);return isNaN(b)?m:b},o=n(l[0]),p=Math.max(o,n(l[1]||"")),o=d?Math.max(o,d.getFullYear()):o,p=e?Math.min(p,e.getFullYear()):p,a.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";p>=o;o++)a.yearshtml+="<option value='"+o+"'"+(o===c?" selected='selected'":"")+">"+o+"</option>";a.yearshtml+="</select>",t+=a.yearshtml,a.yearshtml=null}return t+=this._get(a,"yearSuffix"),s&&(t+=(!f&&q&&r?"":"&#xa0;")+u),t+="</div>"},_adjustInstDate:function(a,b,c){var d=a.drawYear+("Y"===c?b:0),e=a.drawMonth+("M"===c?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+("D"===c?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),("M"===c||"Y"===c)&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&c>b?c:b;return d&&e>d?d:e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return null==b?[1,1]:"number"==typeof b?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return new Date(a,b,1).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(0>b?b:e[0]*e[1]),1));return 0>b&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c,d,e=this._getMinMaxDate(a,"min"),f=this._getMinMaxDate(a,"max"),g=null,h=null,i=this._get(a,"yearRange");return i&&(c=i.split(":"),d=(new Date).getFullYear(),g=parseInt(c[0],10),h=parseInt(c[1],10),c[0].match(/[+\-].*/)&&(g+=d),c[1].match(/[+\-].*/)&&(h+=d)),(!e||b.getTime()>=e.getTime())&&(!f||b.getTime()<=f.getTime())&&(!g||b.getFullYear()>=g)&&(!h||b.getFullYear()<=h)},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b="string"!=typeof b?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?"object"==typeof b?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),a.fn.datepicker=function(b){if(!this.length)return this;a.datepicker.initialized||(a(document).mousedown(a.datepicker._checkExternalClick),a.datepicker.initialized=!0),0===a("#"+a.datepicker._mainDivId).length&&a("body").append(a.datepicker.dpDiv);var c=Array.prototype.slice.call(arguments,1);return"string"!=typeof b||"isDisabled"!==b&&"getDate"!==b&&"widget"!==b?"option"===b&&2===arguments.length&&"string"==typeof arguments[1]?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c)):this.each(function(){"string"==typeof b?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this].concat(c)):a.datepicker._attachDatepicker(this,b)}):a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c))},a.datepicker=new c,a.datepicker.initialized=!1,a.datepicker.uuid=(new Date).getTime(),a.datepicker.version="1.11.4",a.datepicker});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core"],a):a(jQuery)}(function(a){function b(a){for(var b,c;a.length&&a[0]!==document;){if(b=a.css("position"),("absolute"===b||"relative"===b||"fixed"===b)&&(c=parseInt(a.css("zIndex"),10),!isNaN(c)&&0!==c))return c;a=a.parent()}return 0}function c(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},a.extend(this._defaults,this.regional[""]),this.regional.en=a.extend(!0,{},this.regional[""]),this.regional["en-US"]=a.extend(!0,{},this.regional.en),this.dpDiv=d(a("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function d(b){var c="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return b.delegate(c,"mouseout",function(){a(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&a(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&a(this).removeClass("ui-datepicker-next-hover")}).delegate(c,"mouseover",e)}function e(){a.datepicker._isDisabledDatepicker(g.inline?g.dpDiv.parent()[0]:g.input[0])||(a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),a(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&a(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&a(this).addClass("ui-datepicker-next-hover"))}function f(b,c){a.extend(b,c);for(var d in c)null==c[d]&&(b[d]=c[d]);return b}a.extend(a.ui,{datepicker:{version:"1.11.4"}});var g;return a.extend(c.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return f(this._defaults,a||{}),this},_attachDatepicker:function(b,c){var d,e,f;d=b.nodeName.toLowerCase(),e="div"===d||"span"===d,b.id||(this.uuid+=1,b.id="dp"+this.uuid),f=this._newInst(a(b),e),f.settings=a.extend({},c||{}),"input"===d?this._connectDatepicker(b,f):e&&this._inlineDatepicker(b,f)},_newInst:function(b,c){var e=b[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:e,input:b,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:c,dpDiv:c?d(a("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(b,c){var d=a(b);c.append=a([]),c.trigger=a([]),d.hasClass(this.markerClassName)||(this._attachments(d,c),d.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(c),a.data(b,"datepicker",c),c.settings.disabled&&this._disableDatepicker(b))},_attachments:function(b,c){var d,e,f,g=this._get(c,"appendText"),h=this._get(c,"isRTL");c.append&&c.append.remove(),g&&(c.append=a("<span class='"+this._appendClass+"'>"+g+"</span>"),b[h?"before":"after"](c.append)),b.unbind("focus",this._showDatepicker),c.trigger&&c.trigger.remove(),d=this._get(c,"showOn"),"focus"!==d&&"both"!==d||b.focus(this._showDatepicker),"button"!==d&&"both"!==d||(e=this._get(c,"buttonText"),f=this._get(c,"buttonImage"),c.trigger=a(this._get(c,"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:f,alt:e,title:e}):a("<button type='button'></button>").addClass(this._triggerClass).html(f?a("<img/>").attr({src:f,alt:e,title:e}):e)),b[h?"before":"after"](c.trigger),c.trigger.click(function(){return a.datepicker._datepickerShowing&&a.datepicker._lastInput===b[0]?a.datepicker._hideDatepicker():a.datepicker._datepickerShowing&&a.datepicker._lastInput!==b[0]?(a.datepicker._hideDatepicker(),a.datepicker._showDatepicker(b[0])):a.datepicker._showDatepicker(b[0]),!1}))},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b,c,d,e,f=new Date(2009,11,20),g=this._get(a,"dateFormat");g.match(/[DM]/)&&(b=function(a){for(c=0,d=0,e=0;e<a.length;e++)a[e].length>c&&(c=a[e].length,d=e);return d},f.setMonth(b(this._get(a,g.match(/MM/)?"monthNames":"monthNamesShort"))),f.setDate(b(this._get(a,g.match(/DD/)?"dayNames":"dayNamesShort"))+20-f.getDay())),a.input.attr("size",this._formatDate(a,f).length)}},_inlineDatepicker:function(b,c){var d=a(b);d.hasClass(this.markerClassName)||(d.addClass(this.markerClassName).append(c.dpDiv),a.data(b,"datepicker",c),this._setDate(c,this._getDefaultDate(c),!0),this._updateDatepicker(c),this._updateAlternate(c),c.settings.disabled&&this._disableDatepicker(b),c.dpDiv.css("display","block"))},_dialogDatepicker:function(b,c,d,e,g){var h,i,j,k,l,m=this._dialogInst;return m||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=a("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),a("body").append(this._dialogInput),m=this._dialogInst=this._newInst(this._dialogInput,!1),m.settings={},a.data(this._dialogInput[0],"datepicker",m)),f(m.settings,e||{}),c=c&&c.constructor===Date?this._formatDate(m,c):c,this._dialogInput.val(c),this._pos=g?g.length?g:[g.pageX,g.pageY]:null,this._pos||(i=document.documentElement.clientWidth,j=document.documentElement.clientHeight,k=document.documentElement.scrollLeft||document.body.scrollLeft,l=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[i/2-100+k,j/2-150+l]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),m.settings.onSelect=d,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),a.blockUI&&a.blockUI(this.dpDiv),a.data(this._dialogInput[0],"datepicker",m),this},_destroyDatepicker:function(b){var c,d=a(b),e=a.data(b,"datepicker");d.hasClass(this.markerClassName)&&(c=b.nodeName.toLowerCase(),a.removeData(b,"datepicker"),"input"===c?(e.append.remove(),e.trigger.remove(),d.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==c&&"span"!==c||d.removeClass(this.markerClassName).empty(),g===e&&(g=null))},_enableDatepicker:function(b){var c,d,e=a(b),f=a.data(b,"datepicker");e.hasClass(this.markerClassName)&&(c=b.nodeName.toLowerCase(),"input"===c?(b.disabled=!1,f.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==c&&"span"!==c||(d=e.children("."+this._inlineClass),d.children().removeClass("ui-state-disabled"),d.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}))},_disableDatepicker:function(b){var c,d,e=a(b),f=a.data(b,"datepicker");e.hasClass(this.markerClassName)&&(c=b.nodeName.toLowerCase(),"input"===c?(b.disabled=!0,f.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==c&&"span"!==c||(d=e.children("."+this._inlineClass),d.children().addClass("ui-state-disabled"),d.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}),this._disabledInputs[this._disabledInputs.length]=b)},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]===a)return!0;return!1},_getInst:function(b){try{return a.data(b,"datepicker")}catch(c){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(b,c,d){var e,g,h,i,j=this._getInst(b);return 2===arguments.length&&"string"==typeof c?"defaults"===c?a.extend({},a.datepicker._defaults):j?"all"===c?a.extend({},j.settings):this._get(j,c):null:(e=c||{},"string"==typeof c&&(e={},e[c]=d),void(j&&(this._curInst===j&&this._hideDatepicker(),g=this._getDateDatepicker(b,!0),h=this._getMinMaxDate(j,"min"),i=this._getMinMaxDate(j,"max"),f(j.settings,e),null!==h&&void 0!==e.dateFormat&&void 0===e.minDate&&(j.settings.minDate=this._formatDate(j,h)),null!==i&&void 0!==e.dateFormat&&void 0===e.maxDate&&(j.settings.maxDate=this._formatDate(j,i)),"disabled"in e&&(e.disabled?this._disableDatepicker(b):this._enableDatepicker(b)),this._attachments(a(b),j),this._autoSize(j),this._setDate(j,g),this._updateAlternate(j),this._updateDatepicker(j))))},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&&this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&&!c.inline&&this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(b){var c,d,e,f=a.datepicker._getInst(b.target),g=!0,h=f.dpDiv.is(".ui-datepicker-rtl");if(f._keyEvent=!0,a.datepicker._datepickerShowing)switch(b.keyCode){case 9:a.datepicker._hideDatepicker(),g=!1;break;case 13:return e=a("td."+a.datepicker._dayOverClass+":not(."+a.datepicker._currentClass+")",f.dpDiv),e[0]&&a.datepicker._selectDay(b.target,f.selectedMonth,f.selectedYear,e[0]),c=a.datepicker._get(f,"onSelect"),c?(d=a.datepicker._formatDate(f),c.apply(f.input?f.input[0]:null,[d,f])):a.datepicker._hideDatepicker(),!1;case 27:a.datepicker._hideDatepicker();break;case 33:a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 34:a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,"stepMonths"),"M");break;case 35:(b.ctrlKey||b.metaKey)&&a.datepicker._clearDate(b.target),g=b.ctrlKey||b.metaKey;break;case 36:(b.ctrlKey||b.metaKey)&&a.datepicker._gotoToday(b.target),g=b.ctrlKey||b.metaKey;break;case 37:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,h?1:-1,"D"),g=b.ctrlKey||b.metaKey,b.originalEvent.altKey&&a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 38:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,-7,"D"),g=b.ctrlKey||b.metaKey;break;case 39:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,h?-1:1,"D"),g=b.ctrlKey||b.metaKey,b.originalEvent.altKey&&a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,"stepMonths"),"M");break;case 40:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,7,"D"),g=b.ctrlKey||b.metaKey;break;default:g=!1}else 36===b.keyCode&&b.ctrlKey?a.datepicker._showDatepicker(this):g=!1;g&&(b.preventDefault(),b.stopPropagation())},_doKeyPress:function(b){var c,d,e=a.datepicker._getInst(b.target);if(a.datepicker._get(e,"constrainInput"))return c=a.datepicker._possibleChars(a.datepicker._get(e,"dateFormat")),d=String.fromCharCode(null==b.charCode?b.keyCode:b.charCode),b.ctrlKey||b.metaKey||d<" "||!c||c.indexOf(d)>-1},_doKeyUp:function(b){var c,d=a.datepicker._getInst(b.target);if(d.input.val()!==d.lastVal)try{c=a.datepicker.parseDate(a.datepicker._get(d,"dateFormat"),d.input?d.input.val():null,a.datepicker._getFormatConfig(d)),c&&(a.datepicker._setDateFromField(d),a.datepicker._updateAlternate(d),a.datepicker._updateDatepicker(d))}catch(e){}return!0},_showDatepicker:function(c){if(c=c.target||c,"input"!==c.nodeName.toLowerCase()&&(c=a("input",c.parentNode)[0]),!a.datepicker._isDisabledDatepicker(c)&&a.datepicker._lastInput!==c){var d,e,g,h,i,j,k;d=a.datepicker._getInst(c),a.datepicker._curInst&&a.datepicker._curInst!==d&&(a.datepicker._curInst.dpDiv.stop(!0,!0),d&&a.datepicker._datepickerShowing&&a.datepicker._hideDatepicker(a.datepicker._curInst.input[0])),e=a.datepicker._get(d,"beforeShow"),g=e?e.apply(c,[c,d]):{},g!==!1&&(f(d.settings,g),d.lastVal=null,a.datepicker._lastInput=c,a.datepicker._setDateFromField(d),a.datepicker._inDialog&&(c.value=""),a.datepicker._pos||(a.datepicker._pos=a.datepicker._findPos(c),a.datepicker._pos[1]+=c.offsetHeight),h=!1,a(c).parents().each(function(){return h|="fixed"===a(this).css("position"),!h}),i={left:a.datepicker._pos[0],top:a.datepicker._pos[1]},a.datepicker._pos=null,d.dpDiv.empty(),d.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),a.datepicker._updateDatepicker(d),i=a.datepicker._checkOffset(d,i,h),d.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":h?"fixed":"absolute",display:"none",left:i.left+"px",top:i.top+"px"}),d.inline||(j=a.datepicker._get(d,"showAnim"),k=a.datepicker._get(d,"duration"),d.dpDiv.css("z-index",b(a(c))+1),a.datepicker._datepickerShowing=!0,a.effects&&a.effects.effect[j]?d.dpDiv.show(j,a.datepicker._get(d,"showOptions"),k):d.dpDiv[j||"show"](j?k:null),a.datepicker._shouldFocusInput(d)&&d.input.focus(),a.datepicker._curInst=d))}},_updateDatepicker:function(b){this.maxRows=4,g=b,b.dpDiv.empty().append(this._generateHTML(b)),this._attachHandlers(b);var c,d=this._getNumberOfMonths(b),f=d[1],h=17,i=b.dpDiv.find("."+this._dayOverClass+" a");i.length>0&&e.apply(i.get(0)),b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&b.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",h*f+"em"),b.dpDiv[(1!==d[0]||1!==d[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),b===a.datepicker._curInst&&a.datepicker._datepickerShowing&&a.datepicker._shouldFocusInput(b)&&b.input.focus(),b.yearshtml&&(c=b.yearshtml,setTimeout(function(){c===b.yearshtml&&b.yearshtml&&b.dpDiv.find("select.ui-datepicker-year:first").replaceWith(b.yearshtml),c=b.yearshtml=null},0))},_shouldFocusInput:function(a){return a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&!a.input.is(":focus")},_checkOffset:function(b,c,d){var e=b.dpDiv.outerWidth(),f=b.dpDiv.outerHeight(),g=b.input?b.input.outerWidth():0,h=b.input?b.input.outerHeight():0,i=document.documentElement.clientWidth+(d?0:a(document).scrollLeft()),j=document.documentElement.clientHeight+(d?0:a(document).scrollTop());return c.left-=this._get(b,"isRTL")?e-g:0,c.left-=d&&c.left===b.input.offset().left?a(document).scrollLeft():0,c.top-=d&&c.top===b.input.offset().top+h?a(document).scrollTop():0,c.left-=Math.min(c.left,c.left+e>i&&i>e?Math.abs(c.left+e-i):0),c.top-=Math.min(c.top,c.top+f>j&&j>f?Math.abs(f+h):0),c},_findPos:function(b){for(var c,d=this._getInst(b),e=this._get(d,"isRTL");b&&("hidden"===b.type||1!==b.nodeType||a.expr.filters.hidden(b));)b=b[e?"previousSibling":"nextSibling"];return c=a(b).offset(),[c.left,c.top]},_hideDatepicker:function(b){var c,d,e,f,g=this._curInst;!g||b&&g!==a.data(b,"datepicker")||this._datepickerShowing&&(c=this._get(g,"showAnim"),d=this._get(g,"duration"),e=function(){a.datepicker._tidyDialog(g)},a.effects&&(a.effects.effect[c]||a.effects[c])?g.dpDiv.hide(c,a.datepicker._get(g,"showOptions"),d,e):g.dpDiv["slideDown"===c?"slideUp":"fadeIn"===c?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1,f=this._get(g,"onClose"),f&&f.apply(g.input?g.input[0]:null,[g.input?g.input.val():"",g]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),a.blockUI&&(a.unblockUI(),a("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(b){if(a.datepicker._curInst){var c=a(b.target),d=a.datepicker._getInst(c[0]);(c[0].id===a.datepicker._mainDivId||0!==c.parents("#"+a.datepicker._mainDivId).length||c.hasClass(a.datepicker.markerClassName)||c.closest("."+a.datepicker._triggerClass).length||!a.datepicker._datepickerShowing||a.datepicker._inDialog&&a.blockUI)&&(!c.hasClass(a.datepicker.markerClassName)||a.datepicker._curInst===d)||a.datepicker._hideDatepicker()}},_adjustDate:function(b,c,d){var e=a(b),f=this._getInst(e[0]);this._isDisabledDatepicker(e[0])||(this._adjustInstDate(f,c+("M"===d?this._get(f,"showCurrentAtPos"):0),d),this._updateDatepicker(f))},_gotoToday:function(b){var c,d=a(b),e=this._getInst(d[0]);this._get(e,"gotoCurrent")&&e.currentDay?(e.selectedDay=e.currentDay,e.drawMonth=e.selectedMonth=e.currentMonth,e.drawYear=e.selectedYear=e.currentYear):(c=new Date,e.selectedDay=c.getDate(),e.drawMonth=e.selectedMonth=c.getMonth(),e.drawYear=e.selectedYear=c.getFullYear()),this._notifyChange(e),this._adjustDate(d)},_selectMonthYear:function(b,c,d){var e=a(b),f=this._getInst(e[0]);f["selected"+("M"===d?"Month":"Year")]=f["draw"+("M"===d?"Month":"Year")]=parseInt(c.options[c.selectedIndex].value,10),this._notifyChange(f),this._adjustDate(e)},_selectDay:function(b,c,d,e){var f,g=a(b);a(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(g[0])||(f=this._getInst(g[0]),f.selectedDay=f.currentDay=a("a",e).html(),f.selectedMonth=f.currentMonth=c,f.selectedYear=f.currentYear=d,this._selectDate(b,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(b){var c=a(b);this._selectDate(c,"")},_selectDate:function(b,c){var d,e=a(b),f=this._getInst(e[0]);c=null!=c?c:this._formatDate(f),f.input&&f.input.val(c),this._updateAlternate(f),d=this._get(f,"onSelect"),d?d.apply(f.input?f.input[0]:null,[c,f]):f.input&&f.input.trigger("change"),f.inline?this._updateDatepicker(f):(this._hideDatepicker(),this._lastInput=f.input[0],"object"!=typeof f.input[0]&&f.input.focus(),this._lastInput=null)},_updateAlternate:function(b){var c,d,e,f=this._get(b,"altField");f&&(c=this._get(b,"altFormat")||this._get(b,"dateFormat"),d=this._getDate(b),e=this.formatDate(c,d,this._getFormatConfig(b)),a(f).each(function(){a(this).val(e)}))},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b,c=new Date(a.getTime());return c.setDate(c.getDate()+4-(c.getDay()||7)),b=c.getTime(),c.setMonth(0),c.setDate(1),Math.floor(Math.round((b-c)/864e5)/7)+1},parseDate:function(b,c,d){if(null==b||null==c)throw"Invalid arguments";if(c="object"==typeof c?c.toString():c+"",""===c)return null;var e,f,g,h,i=0,j=(d?d.shortYearCutoff:null)||this._defaults.shortYearCutoff,k="string"!=typeof j?j:(new Date).getFullYear()%100+parseInt(j,10),l=(d?d.dayNamesShort:null)||this._defaults.dayNamesShort,m=(d?d.dayNames:null)||this._defaults.dayNames,n=(d?d.monthNamesShort:null)||this._defaults.monthNamesShort,o=(d?d.monthNames:null)||this._defaults.monthNames,p=-1,q=-1,r=-1,s=-1,t=!1,u=function(a){var c=e+1<b.length&&b.charAt(e+1)===a;return c&&e++,c},v=function(a){var b=u(a),d="@"===a?14:"!"===a?20:"y"===a&&b?4:"o"===a?3:2,e="y"===a?d:1,f=new RegExp("^\\d{"+e+","+d+"}"),g=c.substring(i).match(f);if(!g)throw"Missing number at position "+i;return i+=g[0].length,parseInt(g[0],10)},w=function(b,d,e){var f=-1,g=a.map(u(b)?e:d,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)});if(a.each(g,function(a,b){var d=b[1];if(c.substr(i,d.length).toLowerCase()===d.toLowerCase())return f=b[0],i+=d.length,!1}),f!==-1)return f+1;throw"Unknown name at position "+i},x=function(){if(c.charAt(i)!==b.charAt(e))throw"Unexpected literal at position "+i;i++};for(e=0;e<b.length;e++)if(t)"'"!==b.charAt(e)||u("'")?x():t=!1;else switch(b.charAt(e)){case"d":r=v("d");break;case"D":w("D",l,m);break;case"o":s=v("o");break;case"m":q=v("m");break;case"M":q=w("M",n,o);break;case"y":p=v("y");break;case"@":h=new Date(v("@")),p=h.getFullYear(),q=h.getMonth()+1,r=h.getDate();break;case"!":h=new Date((v("!")-this._ticksTo1970)/1e4),p=h.getFullYear(),q=h.getMonth()+1,r=h.getDate();break;case"'":u("'")?x():t=!0;break;default:x()}if(i<c.length&&(g=c.substr(i),!/^\s+/.test(g)))throw"Extra/unparsed characters found in date: "+g;if(p===-1?p=(new Date).getFullYear():p<100&&(p+=(new Date).getFullYear()-(new Date).getFullYear()%100+(p<=k?0:-100)),s>-1)for(q=1,r=s;;){if(f=this._getDaysInMonth(p,q-1),r<=f)break;q++,r-=f}if(h=this._daylightSavingAdjust(new Date(p,q-1,r)),h.getFullYear()!==p||h.getMonth()+1!==q||h.getDate()!==r)throw"Invalid date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d,e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=function(b){var c=d+1<a.length&&a.charAt(d+1)===b;return c&&d++,c},j=function(a,b,c){var d=""+b;if(i(a))for(;d.length<c;)d="0"+d;return d},k=function(a,b,c,d){return i(a)?d[b]:c[b]},l="",m=!1;if(b)for(d=0;d<a.length;d++)if(m)"'"!==a.charAt(d)||i("'")?l+=a.charAt(d):m=!1;else switch(a.charAt(d)){case"d":l+=j("d",b.getDate(),2);break;case"D":l+=k("D",b.getDay(),e,f);break;case"o":l+=j("o",Math.round((new Date(b.getFullYear(),b.getMonth(),b.getDate()).getTime()-new Date(b.getFullYear(),0,0).getTime())/864e5),3);break;case"m":l+=j("m",b.getMonth()+1,2);break;case"M":l+=k("M",b.getMonth(),g,h);break;case"y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":l+=b.getTime();break;case"!":l+=1e4*b.getTime()+this._ticksTo1970;break;case"'":i("'")?l+="'":m=!0;break;default:l+=a.charAt(d)}return l},_possibleChars:function(a){var b,c="",d=!1,e=function(c){var d=b+1<a.length&&a.charAt(b+1)===c;return d&&b++,d};for(b=0;b<a.length;b++)if(d)"'"!==a.charAt(b)||e("'")?c+=a.charAt(b):d=!1;else switch(a.charAt(b)){case"d":case"m":case"y":case"@":c+="0123456789";break;case"D":case"M":return null;case"'":e("'")?c+="'":d=!0;break;default:c+=a.charAt(b)}return c},_get:function(a,b){return void 0!==a.settings[b]?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!==a.lastVal){var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e=this._getDefaultDate(a),f=e,g=this._getFormatConfig(a);try{f=this.parseDate(c,d,g)||e}catch(h){d=b?"":d}a.selectedDay=f.getDate(),a.drawMonth=a.selectedMonth=f.getMonth(),a.drawYear=a.selectedYear=f.getFullYear(),a.currentDay=d?f.getDate():0,a.currentMonth=d?f.getMonth():0,a.currentYear=d?f.getFullYear():0,this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(b,c,d){var e=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},f=function(c){try{return a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),c,a.datepicker._getFormatConfig(b))}catch(d){}for(var e=(c.toLowerCase().match(/^c/)?a.datepicker._getDate(b):null)||new Date,f=e.getFullYear(),g=e.getMonth(),h=e.getDate(),i=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,j=i.exec(c);j;){switch(j[2]||"d"){case"d":case"D":h+=parseInt(j[1],10);break;case"w":case"W":h+=7*parseInt(j[1],10);break;case"m":case"M":g+=parseInt(j[1],10),h=Math.min(h,a.datepicker._getDaysInMonth(f,g));break;case"y":case"Y":f+=parseInt(j[1],10),h=Math.min(h,a.datepicker._getDaysInMonth(f,g))}j=i.exec(c)}return new Date(f,g,h)},g=null==c||""===c?d:"string"==typeof c?f(c):"number"==typeof c?isNaN(c)?d:e(c):new Date(c.getTime());return g=g&&"Invalid Date"===g.toString()?d:g,g&&(g.setHours(0),g.setMinutes(0),g.setSeconds(0),g.setMilliseconds(0)),this._daylightSavingAdjust(g)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),e===a.selectedMonth&&f===a.selectedYear||c||this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&""===a.input.val()?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_attachHandlers:function(b){var c=this._get(b,"stepMonths"),d="#"+b.id.replace(/\\\\/g,"\\");b.dpDiv.find("[data-handler]").map(function(){var b={prev:function(){a.datepicker._adjustDate(d,-c,"M")},next:function(){a.datepicker._adjustDate(d,+c,"M")},hide:function(){a.datepicker._hideDatepicker()},today:function(){a.datepicker._gotoToday(d)},selectDay:function(){return a.datepicker._selectDay(d,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return a.datepicker._selectMonthYear(d,this,"M"),!1},selectYear:function(){return a.datepicker._selectMonthYear(d,this,"Y"),!1}};a(this).bind(this.getAttribute("data-event"),b[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O=new Date,P=this._daylightSavingAdjust(new Date(O.getFullYear(),O.getMonth(),O.getDate())),Q=this._get(a,"isRTL"),R=this._get(a,"showButtonPanel"),S=this._get(a,"hideIfNoPrevNext"),T=this._get(a,"navigationAsDateFormat"),U=this._getNumberOfMonths(a),V=this._get(a,"showCurrentAtPos"),W=this._get(a,"stepMonths"),X=1!==U[0]||1!==U[1],Y=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),Z=this._getMinMaxDate(a,"min"),$=this._getMinMaxDate(a,"max"),_=a.drawMonth-V,aa=a.drawYear;if(_<0&&(_+=12,aa--),$)for(b=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-U[0]*U[1]+1,$.getDate())),b=Z&&b<Z?Z:b;this._daylightSavingAdjust(new Date(aa,_,1))>b;)_--,_<0&&(_=11,aa--);for(a.drawMonth=_,a.drawYear=aa,c=this._get(a,"prevText"),c=T?this.formatDate(c,this._daylightSavingAdjust(new Date(aa,_-W,1)),this._getFormatConfig(a)):c,d=this._canAdjustMonth(a,-1,aa,_)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"e":"w")+"'>"+c+"</span></a>":S?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"e":"w")+"'>"+c+"</span></a>",e=this._get(a,"nextText"),e=T?this.formatDate(e,this._daylightSavingAdjust(new Date(aa,_+W,1)),this._getFormatConfig(a)):e,f=this._canAdjustMonth(a,1,aa,_)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+e+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"w":"e")+"'>"+e+"</span></a>":S?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+e+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"w":"e")+"'>"+e+"</span></a>",g=this._get(a,"currentText"),h=this._get(a,"gotoCurrent")&&a.currentDay?Y:P,g=T?this.formatDate(g,h,this._getFormatConfig(a)):g,i=a.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(a,"closeText")+"</button>",j=R?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Q?i:"")+(this._isInRange(a,h)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+g+"</button>":"")+(Q?"":i)+"</div>":"",k=parseInt(this._get(a,"firstDay"),10),k=isNaN(k)?0:k,l=this._get(a,"showWeek"),m=this._get(a,"dayNames"),n=this._get(a,"dayNamesMin"),o=this._get(a,"monthNames"),p=this._get(a,"monthNamesShort"),q=this._get(a,"beforeShowDay"),r=this._get(a,"showOtherMonths"),s=this._get(a,"selectOtherMonths"),t=this._getDefaultDate(a),u="",w=0;w<U[0];w++){for(x="",this.maxRows=4,y=0;y<U[1];y++){if(z=this._daylightSavingAdjust(new Date(aa,_,a.selectedDay)),A=" ui-corner-all",B="",X){if(B+="<div class='ui-datepicker-group",U[1]>1)switch(y){case 0:B+=" ui-datepicker-group-first",A=" ui-corner-"+(Q?"right":"left");break;case U[1]-1:B+=" ui-datepicker-group-last",A=" ui-corner-"+(Q?"left":"right");break;default:B+=" ui-datepicker-group-middle",A=""}B+="'>"}for(B+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+A+"'>"+(/all|left/.test(A)&&0===w?Q?f:d:"")+(/all|right/.test(A)&&0===w?Q?d:f:"")+this._generateMonthYearHeader(a,_,aa,Z,$,w>0||y>0,o,p)+"</div><table class='ui-datepicker-calendar'><thead><tr>",C=l?"<th class='ui-datepicker-week-col'>"+this._get(a,"weekHeader")+"</th>":"",v=0;v<7;v++)D=(v+k)%7,C+="<th scope='col'"+((v+k+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+m[D]+"'>"+n[D]+"</span></th>";for(B+=C+"</tr></thead><tbody>",E=this._getDaysInMonth(aa,_),aa===a.selectedYear&&_===a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,E)),F=(this._getFirstDayOfMonth(aa,_)-k+7)%7,G=Math.ceil((F+E)/7),H=X&&this.maxRows>G?this.maxRows:G,this.maxRows=H,I=this._daylightSavingAdjust(new Date(aa,_,1-F)),J=0;J<H;J++){for(B+="<tr>",K=l?"<td class='ui-datepicker-week-col'>"+this._get(a,"calculateWeek")(I)+"</td>":"",v=0;v<7;v++)L=q?q.apply(a.input?a.input[0]:null,[I]):[!0,""],M=I.getMonth()!==_,N=M&&!s||!L[0]||Z&&I<Z||$&&I>$,K+="<td class='"+((v+k+6)%7>=5?" ui-datepicker-week-end":"")+(M?" ui-datepicker-other-month":"")+(I.getTime()===z.getTime()&&_===a.selectedMonth&&a._keyEvent||t.getTime()===I.getTime()&&t.getTime()===z.getTime()?" "+this._dayOverClass:"")+(N?" "+this._unselectableClass+" ui-state-disabled":"")+(M&&!r?"":" "+L[1]+(I.getTime()===Y.getTime()?" "+this._currentClass:"")+(I.getTime()===P.getTime()?" ui-datepicker-today":""))+"'"+(M&&!r||!L[2]?"":" title='"+L[2].replace(/'/g,"&#39;")+"'")+(N?"":" data-handler='selectDay' data-event='click' data-month='"+I.getMonth()+"' data-year='"+I.getFullYear()+"'")+">"+(M&&!r?"&#xa0;":N?"<span class='ui-state-default'>"+I.getDate()+"</span>":"<a class='ui-state-default"+(I.getTime()===P.getTime()?" ui-state-highlight":"")+(I.getTime()===Y.getTime()?" ui-state-active":"")+(M?" ui-priority-secondary":"")+"' href='#'>"+I.getDate()+"</a>")+"</td>",I.setDate(I.getDate()+1),I=this._daylightSavingAdjust(I);B+=K+"</tr>"}_++,_>11&&(_=0,aa++),B+="</tbody></table>"+(X?"</div>"+(U[0]>0&&y===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=B}u+=x}return u+=j,a._keyEvent=!1,u},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q=this._get(a,"changeMonth"),r=this._get(a,"changeYear"),s=this._get(a,"showMonthAfterYear"),t="<div class='ui-datepicker-title'>",u="";if(f||!q)u+="<span class='ui-datepicker-month'>"+g[b]+"</span>";else{
+for(i=d&&d.getFullYear()===c,j=e&&e.getFullYear()===c,u+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",k=0;k<12;k++)(!i||k>=d.getMonth())&&(!j||k<=e.getMonth())&&(u+="<option value='"+k+"'"+(k===b?" selected='selected'":"")+">"+h[k]+"</option>");u+="</select>"}if(s||(t+=u+(!f&&q&&r?"":"&#xa0;")),!a.yearshtml)if(a.yearshtml="",f||!r)t+="<span class='ui-datepicker-year'>"+c+"</span>";else{for(l=this._get(a,"yearRange").split(":"),m=(new Date).getFullYear(),n=function(a){var b=a.match(/c[+\-].*/)?c+parseInt(a.substring(1),10):a.match(/[+\-].*/)?m+parseInt(a,10):parseInt(a,10);return isNaN(b)?m:b},o=n(l[0]),p=Math.max(o,n(l[1]||"")),o=d?Math.max(o,d.getFullYear()):o,p=e?Math.min(p,e.getFullYear()):p,a.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";o<=p;o++)a.yearshtml+="<option value='"+o+"'"+(o===c?" selected='selected'":"")+">"+o+"</option>";a.yearshtml+="</select>",t+=a.yearshtml,a.yearshtml=null}return t+=this._get(a,"yearSuffix"),s&&(t+=(!f&&q&&r?"":"&#xa0;")+u),t+="</div>"},_adjustInstDate:function(a,b,c){var d=a.drawYear+("Y"===c?b:0),e=a.drawMonth+("M"===c?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+("D"===c?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),"M"!==c&&"Y"!==c||this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&b<c?c:b;return d&&e>d?d:e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return null==b?[1,1]:"number"==typeof b?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return new Date(a,b,1).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c,d,e=this._getMinMaxDate(a,"min"),f=this._getMinMaxDate(a,"max"),g=null,h=null,i=this._get(a,"yearRange");return i&&(c=i.split(":"),d=(new Date).getFullYear(),g=parseInt(c[0],10),h=parseInt(c[1],10),c[0].match(/[+\-].*/)&&(g+=d),c[1].match(/[+\-].*/)&&(h+=d)),(!e||b.getTime()>=e.getTime())&&(!f||b.getTime()<=f.getTime())&&(!g||b.getFullYear()>=g)&&(!h||b.getFullYear()<=h)},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b="string"!=typeof b?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?"object"==typeof b?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),a.fn.datepicker=function(b){if(!this.length)return this;a.datepicker.initialized||(a(document).mousedown(a.datepicker._checkExternalClick),a.datepicker.initialized=!0),0===a("#"+a.datepicker._mainDivId).length&&a("body").append(a.datepicker.dpDiv);var c=Array.prototype.slice.call(arguments,1);return"string"!=typeof b||"isDisabled"!==b&&"getDate"!==b&&"widget"!==b?"option"===b&&2===arguments.length&&"string"==typeof arguments[1]?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c)):this.each(function(){"string"==typeof b?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this].concat(c)):a.datepicker._attachDatepicker(this,b)}):a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c))},a.datepicker=new c,a.datepicker.initialized=!1,a.datepicker.uuid=(new Date).getTime(),a.datepicker.version="1.11.4",a.datepicker});
\ No newline at end of file
index fc8be0bc9cef35baab6af20d2ee29af4810c627b..8901218a81e941a7b9722ed32559756cdbfe230f 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/dialog/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./button","./draggable","./mouse","./position","./resizable"],a):a(jQuery)}(function(a){return a.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(b){var c=a(this).css(b).offset().top;0>c&&a(this).css("top",b.top-c)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&a.fn.draggable&&this._makeDraggable(),this.options.resizable&&a.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var b=this.options.appendTo;return b&&(b.jquery||b.nodeType)?a(b):this.document.find(b||"body").eq(0)},_destroy:function(){var a,b=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),a=b.parent.children().eq(b.index),a.length&&a[0]!==this.element[0]?a.before(this.element):b.parent.append(this.element)},widget:function(){return this.uiDialog},disable:a.noop,enable:a.noop,close:function(b){var c,d=this;if(this._isOpen&&this._trigger("beforeClose",b)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{c=this.document[0].activeElement,c&&"body"!==c.nodeName.toLowerCase()&&a(c).blur()}catch(e){}this._hide(this.uiDialog,this.options.hide,function(){d._trigger("close",b)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(b,c){var d=!1,e=this.uiDialog.siblings(".ui-front:visible").map(function(){return+a(this).css("z-index")}).get(),f=Math.max.apply(null,e);return f>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",f+1),d=!0),d&&!c&&this._trigger("focus",b),d},open:function(){var b=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=a(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){b._focusTabbable(),b._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var a=this._focusedElement;a||(a=this.element.find("[autofocus]")),a.length||(a=this.element.find(":tabbable")),a.length||(a=this.uiDialogButtonPane.find(":tabbable")),a.length||(a=this.uiDialogTitlebarClose.filter(":tabbable")),a.length||(a=this.uiDialog),a.eq(0).focus()},_keepFocus:function(b){function c(){var b=this.document[0].activeElement,c=this.uiDialog[0]===b||a.contains(this.uiDialog[0],b);c||this._focusTabbable()}b.preventDefault(),c.call(this),this._delay(c)},_createWrapper:function(){this.uiDialog=a("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(b){if(this.options.closeOnEscape&&!b.isDefaultPrevented()&&b.keyCode&&b.keyCode===a.ui.keyCode.ESCAPE)return b.preventDefault(),void this.close(b);if(b.keyCode===a.ui.keyCode.TAB&&!b.isDefaultPrevented()){var c=this.uiDialog.find(":tabbable"),d=c.filter(":first"),e=c.filter(":last");b.target!==e[0]&&b.target!==this.uiDialog[0]||b.shiftKey?b.target!==d[0]&&b.target!==this.uiDialog[0]||!b.shiftKey||(this._delay(function(){e.focus()}),b.preventDefault()):(this._delay(function(){d.focus()}),b.preventDefault())}},mousedown:function(a){this._moveToTop(a)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var b;this.uiDialogTitlebar=a("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(b){a(b.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=a("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(a){a.preventDefault(),this.close(a)}}),b=a("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(b),this.uiDialog.attr({"aria-labelledby":b.attr("id")})},_title:function(a){this.options.title||a.html("&#160;"),a.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=a("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=a("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var b=this,c=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),a.isEmptyObject(c)||a.isArray(c)&&!c.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(a.each(c,function(c,d){var e,f;d=a.isFunction(d)?{click:d,text:c}:d,d=a.extend({type:"button"},d),e=d.click,d.click=function(){e.apply(b.element[0],arguments)},f={icons:d.icons,text:d.showText},delete d.icons,delete d.showText,a("<button></button>",d).button(f).appendTo(b.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function b(a){return{position:a.position,offset:a.offset}}var c=this,d=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,e){a(this).addClass("ui-dialog-dragging"),c._blockFrames(),c._trigger("dragStart",d,b(e))},drag:function(a,d){c._trigger("drag",a,b(d))},stop:function(e,f){var g=f.offset.left-c.document.scrollLeft(),h=f.offset.top-c.document.scrollTop();d.position={my:"left top",at:"left"+(g>=0?"+":"")+g+" top"+(h>=0?"+":"")+h,of:c.window},a(this).removeClass("ui-dialog-dragging"),c._unblockFrames(),c._trigger("dragStop",e,b(f))}})},_makeResizable:function(){function b(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}var c=this,d=this.options,e=d.resizable,f=this.uiDialog.css("position"),g="string"==typeof e?e:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:d.maxWidth,maxHeight:d.maxHeight,minWidth:d.minWidth,minHeight:this._minHeight(),handles:g,start:function(d,e){a(this).addClass("ui-dialog-resizing"),c._blockFrames(),c._trigger("resizeStart",d,b(e))},resize:function(a,d){c._trigger("resize",a,b(d))},stop:function(e,f){var g=c.uiDialog.offset(),h=g.left-c.document.scrollLeft(),i=g.top-c.document.scrollTop();d.height=c.uiDialog.height(),d.width=c.uiDialog.width(),d.position={my:"left top",at:"left"+(h>=0?"+":"")+h+" top"+(i>=0?"+":"")+i,of:c.window},a(this).removeClass("ui-dialog-resizing"),c._unblockFrames(),c._trigger("resizeStop",e,b(f))}}).css("position",f)},_trackFocus:function(){this._on(this.widget(),{focusin:function(b){this._makeFocusTarget(),this._focusedElement=a(b.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var b=this._trackingInstances(),c=a.inArray(this,b);-1!==c&&b.splice(c,1)},_trackingInstances:function(){var a=this.document.data("ui-dialog-instances");return a||(a=[],this.document.data("ui-dialog-instances",a)),a},_minHeight:function(){var a=this.options;return"auto"===a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(){var a=this.uiDialog.is(":visible");a||this.uiDialog.show(),this.uiDialog.position(this.options.position),a||this.uiDialog.hide()},_setOptions:function(b){var c=this,d=!1,e={};a.each(b,function(a,b){c._setOption(a,b),a in c.sizeRelatedOptions&&(d=!0),a in c.resizableRelatedOptions&&(e[a]=b)}),d&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",e)},_setOption:function(a,b){var c,d,e=this.uiDialog;"dialogClass"===a&&e.removeClass(this.options.dialogClass).addClass(b),"disabled"!==a&&(this._super(a,b),"appendTo"===a&&this.uiDialog.appendTo(this._appendTo()),"buttons"===a&&this._createButtons(),"closeText"===a&&this.uiDialogTitlebarClose.button({label:""+b}),"draggable"===a&&(c=e.is(":data(ui-draggable)"),c&&!b&&e.draggable("destroy"),!c&&b&&this._makeDraggable()),"position"===a&&this._position(),"resizable"===a&&(d=e.is(":data(ui-resizable)"),d&&!b&&e.resizable("destroy"),d&&"string"==typeof b&&e.resizable("option","handles",b),d||b===!1||this._makeResizable()),"title"===a&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var a,b,c,d=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),d.minWidth>d.width&&(d.width=d.minWidth),a=this.uiDialog.css({height:"auto",width:d.width}).outerHeight(),b=Math.max(0,d.minHeight-a),c="number"==typeof d.maxHeight?Math.max(0,d.maxHeight-a):"none","auto"===d.height?this.element.css({minHeight:b,maxHeight:c,height:"auto"}):this.element.height(Math.max(0,d.height-a)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var b=a(this);return a("<div>").css({position:"absolute",width:b.outerWidth(),height:b.outerHeight()}).appendTo(b.parent()).offset(b.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(b){return a(b.target).closest(".ui-dialog").length?!0:!!a(b.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var b=!0;this._delay(function(){b=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(a){b||this._allowInteraction(a)||(a.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=a("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var a=this.document.data("ui-dialog-overlays")-1;a?this.document.data("ui-dialog-overlays",a):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}})});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./button","./draggable","./mouse","./position","./resizable"],a):a(jQuery)}(function(a){return a.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&a.fn.draggable&&this._makeDraggable(),this.options.resizable&&a.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var b=this.options.appendTo;return b&&(b.jquery||b.nodeType)?a(b):this.document.find(b||"body").eq(0)},_destroy:function(){var a,b=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),a=b.parent.children().eq(b.index),a.length&&a[0]!==this.element[0]?a.before(this.element):b.parent.append(this.element)},widget:function(){return this.uiDialog},disable:a.noop,enable:a.noop,close:function(b){var c,d=this;if(this._isOpen&&this._trigger("beforeClose",b)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{c=this.document[0].activeElement,c&&"body"!==c.nodeName.toLowerCase()&&a(c).blur()}catch(e){}this._hide(this.uiDialog,this.options.hide,function(){d._trigger("close",b)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(b,c){var d=!1,e=this.uiDialog.siblings(".ui-front:visible").map(function(){return+a(this).css("z-index")}).get(),f=Math.max.apply(null,e);return f>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",f+1),d=!0),d&&!c&&this._trigger("focus",b),d},open:function(){var b=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=a(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){b._focusTabbable(),b._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var a=this._focusedElement;a||(a=this.element.find("[autofocus]")),a.length||(a=this.element.find(":tabbable")),a.length||(a=this.uiDialogButtonPane.find(":tabbable")),a.length||(a=this.uiDialogTitlebarClose.filter(":tabbable")),a.length||(a=this.uiDialog),a.eq(0).focus()},_keepFocus:function(b){function c(){var b=this.document[0].activeElement,c=this.uiDialog[0]===b||a.contains(this.uiDialog[0],b);c||this._focusTabbable()}b.preventDefault(),c.call(this),this._delay(c)},_createWrapper:function(){this.uiDialog=a("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(b){if(this.options.closeOnEscape&&!b.isDefaultPrevented()&&b.keyCode&&b.keyCode===a.ui.keyCode.ESCAPE)return b.preventDefault(),void this.close(b);if(b.keyCode===a.ui.keyCode.TAB&&!b.isDefaultPrevented()){var c=this.uiDialog.find(":tabbable"),d=c.filter(":first"),e=c.filter(":last");b.target!==e[0]&&b.target!==this.uiDialog[0]||b.shiftKey?b.target!==d[0]&&b.target!==this.uiDialog[0]||!b.shiftKey||(this._delay(function(){e.focus()}),b.preventDefault()):(this._delay(function(){d.focus()}),b.preventDefault())}},mousedown:function(a){this._moveToTop(a)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var b;this.uiDialogTitlebar=a("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(b){a(b.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=a("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(a){a.preventDefault(),this.close(a)}}),b=a("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(b),this.uiDialog.attr({"aria-labelledby":b.attr("id")})},_title:function(a){this.options.title||a.html("&#160;"),a.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=a("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=a("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var b=this,c=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),a.isEmptyObject(c)||a.isArray(c)&&!c.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(a.each(c,function(c,d){var e,f;d=a.isFunction(d)?{click:d,text:c}:d,d=a.extend({type:"button"},d),e=d.click,d.click=function(){e.apply(b.element[0],arguments)},f={icons:d.icons,text:d.showText},delete d.icons,delete d.showText,a("<button></button>",d).button(f).appendTo(b.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function b(a){return{position:a.position,offset:a.offset}}var c=this,d=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,e){a(this).addClass("ui-dialog-dragging"),c._blockFrames(),c._trigger("dragStart",d,b(e))},drag:function(a,d){c._trigger("drag",a,b(d))},stop:function(e,f){var g=f.offset.left-c.document.scrollLeft(),h=f.offset.top-c.document.scrollTop();d.position={my:"left top",at:"left"+(g>=0?"+":"")+g+" top"+(h>=0?"+":"")+h,of:c.window},a(this).removeClass("ui-dialog-dragging"),c._unblockFrames(),c._trigger("dragStop",e,b(f))}})},_makeResizable:function(){function b(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}var c=this,d=this.options,e=d.resizable,f=this.uiDialog.css("position"),g="string"==typeof e?e:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:d.maxWidth,maxHeight:d.maxHeight,minWidth:d.minWidth,minHeight:this._minHeight(),handles:g,start:function(d,e){a(this).addClass("ui-dialog-resizing"),c._blockFrames(),c._trigger("resizeStart",d,b(e))},resize:function(a,d){c._trigger("resize",a,b(d))},stop:function(e,f){var g=c.uiDialog.offset(),h=g.left-c.document.scrollLeft(),i=g.top-c.document.scrollTop();d.height=c.uiDialog.height(),d.width=c.uiDialog.width(),d.position={my:"left top",at:"left"+(h>=0?"+":"")+h+" top"+(i>=0?"+":"")+i,of:c.window},a(this).removeClass("ui-dialog-resizing"),c._unblockFrames(),c._trigger("resizeStop",e,b(f))}}).css("position",f)},_trackFocus:function(){this._on(this.widget(),{focusin:function(b){this._makeFocusTarget(),this._focusedElement=a(b.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var b=this._trackingInstances(),c=a.inArray(this,b);c!==-1&&b.splice(c,1)},_trackingInstances:function(){var a=this.document.data("ui-dialog-instances");return a||(a=[],this.document.data("ui-dialog-instances",a)),a},_minHeight:function(){var a=this.options;return"auto"===a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(){var a=this.uiDialog.is(":visible");a||this.uiDialog.show(),this.uiDialog.position(this.options.position),a||this.uiDialog.hide()},_setOptions:function(b){var c=this,d=!1,e={};a.each(b,function(a,b){c._setOption(a,b),a in c.sizeRelatedOptions&&(d=!0),a in c.resizableRelatedOptions&&(e[a]=b)}),d&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",e)},_setOption:function(a,b){var c,d,e=this.uiDialog;"dialogClass"===a&&e.removeClass(this.options.dialogClass).addClass(b),"disabled"!==a&&(this._super(a,b),"appendTo"===a&&this.uiDialog.appendTo(this._appendTo()),"buttons"===a&&this._createButtons(),"closeText"===a&&this.uiDialogTitlebarClose.button({label:""+b}),"draggable"===a&&(c=e.is(":data(ui-draggable)"),c&&!b&&e.draggable("destroy"),!c&&b&&this._makeDraggable()),"position"===a&&this._position(),"resizable"===a&&(d=e.is(":data(ui-resizable)"),d&&!b&&e.resizable("destroy"),d&&"string"==typeof b&&e.resizable("option","handles",b),d||b===!1||this._makeResizable()),"title"===a&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var a,b,c,d=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),d.minWidth>d.width&&(d.width=d.minWidth),a=this.uiDialog.css({height:"auto",width:d.width}).outerHeight(),b=Math.max(0,d.minHeight-a),c="number"==typeof d.maxHeight?Math.max(0,d.maxHeight-a):"none","auto"===d.height?this.element.css({minHeight:b,maxHeight:c,height:"auto"}):this.element.height(Math.max(0,d.height-a)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var b=a(this);return a("<div>").css({position:"absolute",width:b.outerWidth(),height:b.outerHeight()}).appendTo(b.parent()).offset(b.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(b){return!!a(b.target).closest(".ui-dialog").length||!!a(b.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var b=!0;this._delay(function(){b=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(a){b||this._allowInteraction(a)||(a.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=a("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var a=this.document.data("ui-dialog-overlays")-1;a?this.document.data("ui-dialog-overlays",a):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}})});
\ No newline at end of file
index fec4e09d057b614e9ddc4eca965357b7de813a5c..8ecdebb2c5ede3a3a125d2ee218d18c42005d607 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/draggable/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.draggable",a.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(a,b){this._super(a,b),"handle"===a&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(b){var c=this.options;return this._blurActiveElement(b),this.helper||c.disabled||a(b.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(b),this.handle?(this._blockFrames(c.iframeFix===!0?"iframe":c.iframeFix),!0):!1)},_blockFrames:function(b){this.iframeBlocks=this.document.find(b).map(function(){var b=a(this);return a("<div>").css("position","absolute").appendTo(b.parent()).outerWidth(b.outerWidth()).outerHeight(b.outerHeight()).offset(b.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(b){var c=this.document[0];if(this.handleElement.is(b.target))try{c.activeElement&&"body"!==c.activeElement.nodeName.toLowerCase()&&a(c.activeElement).blur()}catch(d){}},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===a(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(b),this.originalPosition=this.position=this._generatePosition(b,!1),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this._normalizeRightBottom(),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b),!0)},_refreshOffsets:function(a){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:a.pageX-this.offset.left,top:a.pageY-this.offset.top}},_mouseDrag:function(b,c){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(b,!0),this.positionAbs=this._convertPositionTo("absolute"),!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp({}),!1;this.position=d.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=this,d=!1;return a.ui.ddmanager&&!this.options.dropBehaviour&&(d=a.ui.ddmanager.drop(this,b)),this.dropped&&(d=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!d||"valid"===this.options.revert&&d||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)?a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",b)!==!1&&c._clear()}):this._trigger("stop",b)!==!1&&this._clear(),!1},_mouseUp:function(b){return this._unblockFrames(),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),this.handleElement.is(b.target)&&this.element.focus(),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){return this.options.handle?!!a(b.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper),e=d?a(c.helper.apply(this.element[0],[b])):"clone"===c.helper?this.element.clone().removeAttr("id"):this.element;return e.parents("body").length||e.appendTo("parent"===c.appendTo?this.element[0].parentNode:c.appendTo),d&&e[0]===this.element[0]&&this._setPositionRelative(),e[0]===this.element[0]||/(fixed|absolute)/.test(e.css("position"))||e.css("position","absolute"),e},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_isRootNode:function(a){return/(html|body)/i.test(a.tagName)||a===this.document[0]},_getParentOffset:function(){var b=this.offsetParent.offset(),c=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==c&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var a=this.element.position(),b=this._isRootNode(this.scrollParent[0]);return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+(b?0:this.scrollParent.scrollTop()),left:a.left-(parseInt(this.helper.css("left"),10)||0)+(b?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b,c,d,e=this.options,f=this.document[0];return this.relativeContainer=null,e.containment?"window"===e.containment?void(this.containment=[a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,a(window).scrollLeft()+a(window).width()-this.helperProportions.width-this.margins.left,a(window).scrollTop()+(a(window).height()||f.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===e.containment?void(this.containment=[0,0,a(f).width()-this.helperProportions.width-this.margins.left,(a(f).height()||f.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):e.containment.constructor===Array?void(this.containment=e.containment):("parent"===e.containment&&(e.containment=this.helper[0].parentNode),c=a(e.containment),d=c[0],void(d&&(b=/(scroll|auto)/.test(c.css("overflow")),this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+(parseInt(c.css("paddingTop"),10)||0),(b?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(c.css("borderRightWidth"),10)||0)-(parseInt(c.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(b?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(c.css("borderBottomWidth"),10)||0)-(parseInt(c.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=c))):void(this.containment=null)},_convertPositionTo:function(a,b){b||(b=this.position);var c="absolute"===a?1:-1,d=this._isRootNode(this.scrollParent[0]);return{top:b.top+this.offset.relative.top*c+this.offset.parent.top*c-("fixed"===this.cssPosition?-this.offset.scroll.top:d?0:this.offset.scroll.top)*c,left:b.left+this.offset.relative.left*c+this.offset.parent.left*c-("fixed"===this.cssPosition?-this.offset.scroll.left:d?0:this.offset.scroll.left)*c}},_generatePosition:function(a,b){var c,d,e,f,g=this.options,h=this._isRootNode(this.scrollParent[0]),i=a.pageX,j=a.pageY;return h&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),b&&(this.containment&&(this.relativeContainer?(d=this.relativeContainer.offset(),c=[this.containment[0]+d.left,this.containment[1]+d.top,this.containment[2]+d.left,this.containment[3]+d.top]):c=this.containment,a.pageX-this.offset.click.left<c[0]&&(i=c[0]+this.offset.click.left),a.pageY-this.offset.click.top<c[1]&&(j=c[1]+this.offset.click.top),a.pageX-this.offset.click.left>c[2]&&(i=c[2]+this.offset.click.left),a.pageY-this.offset.click.top>c[3]&&(j=c[3]+this.offset.click.top)),g.grid&&(e=g.grid[1]?this.originalPageY+Math.round((j-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY,j=c?e-this.offset.click.top>=c[1]||e-this.offset.click.top>c[3]?e:e-this.offset.click.top>=c[1]?e-g.grid[1]:e+g.grid[1]:e,f=g.grid[0]?this.originalPageX+Math.round((i-this.originalPageX)/g.grid[0])*g.grid[0]:this.originalPageX,i=c?f-this.offset.click.left>=c[0]||f-this.offset.click.left>c[2]?f:f-this.offset.click.left>=c[0]?f-g.grid[0]:f+g.grid[0]:f),"y"===g.axis&&(i=this.originalPageX),"x"===g.axis&&(j=this.originalPageY)),{top:j-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:h?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(b,c,d){return d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d,this],!0),/^(drag|start|stop)/.test(b)&&(this.positionAbs=this._convertPositionTo("absolute"),d.offset=this.positionAbs),a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c,d){var e=a.extend({},c,{item:d.element});d.sortables=[],a(d.options.connectToSortable).each(function(){var c=a(this).sortable("instance");c&&!c.options.disabled&&(d.sortables.push(c),c.refreshPositions(),c._trigger("activate",b,e))})},stop:function(b,c,d){var e=a.extend({},c,{item:d.element});d.cancelHelperRemoval=!1,a.each(d.sortables,function(){var a=this;a.isOver?(a.isOver=0,d.cancelHelperRemoval=!0,a.cancelHelperRemoval=!1,a._storedCSS={position:a.placeholder.css("position"),top:a.placeholder.css("top"),left:a.placeholder.css("left")},a._mouseStop(b),a.options.helper=a.options._helper):(a.cancelHelperRemoval=!0,a._trigger("deactivate",b,e))})},drag:function(b,c,d){a.each(d.sortables,function(){var e=!1,f=this;f.positionAbs=d.positionAbs,f.helperProportions=d.helperProportions,f.offset.click=d.offset.click,f._intersectsWith(f.containerCache)&&(e=!0,a.each(d.sortables,function(){return this.positionAbs=d.positionAbs,this.helperProportions=d.helperProportions,this.offset.click=d.offset.click,this!==f&&this._intersectsWith(this.containerCache)&&a.contains(f.element[0],this.element[0])&&(e=!1),e})),e?(f.isOver||(f.isOver=1,d._parent=c.helper.parent(),f.currentItem=c.helper.appendTo(f.element).data("ui-sortable-item",!0),f.options._helper=f.options.helper,f.options.helper=function(){return c.helper[0]},b.target=f.currentItem[0],f._mouseCapture(b,!0),f._mouseStart(b,!0,!0),f.offset.click.top=d.offset.click.top,f.offset.click.left=d.offset.click.left,f.offset.parent.left-=d.offset.parent.left-f.offset.parent.left,f.offset.parent.top-=d.offset.parent.top-f.offset.parent.top,d._trigger("toSortable",b),d.dropped=f.element,a.each(d.sortables,function(){this.refreshPositions()}),d.currentItem=d.element,f.fromOutside=d),f.currentItem&&(f._mouseDrag(b),c.position=f.position)):f.isOver&&(f.isOver=0,f.cancelHelperRemoval=!0,f.options._revert=f.options.revert,f.options.revert=!1,f._trigger("out",b,f._uiHash(f)),f._mouseStop(b,!0),f.options.revert=f.options._revert,f.options.helper=f.options._helper,f.placeholder&&f.placeholder.remove(),c.helper.appendTo(d._parent),d._refreshOffsets(b),c.position=d._generatePosition(b,!0),d._trigger("fromSortable",b),d.dropped=!1,a.each(d.sortables,function(){this.refreshPositions()}))})}}),a.ui.plugin.add("draggable","cursor",{start:function(b,c,d){var e=a("body"),f=d.options;e.css("cursor")&&(f._cursor=e.css("cursor")),e.css("cursor",f.cursor)},stop:function(b,c,d){var e=d.options;e._cursor&&a("body").css("cursor",e._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c,d){var e=a(c.helper),f=d.options;e.css("opacity")&&(f._opacity=e.css("opacity")),e.css("opacity",f.opacity)},stop:function(b,c,d){var e=d.options;e._opacity&&a(c.helper).css("opacity",e._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(a,b,c){c.scrollParentNotHidden||(c.scrollParentNotHidden=c.helper.scrollParent(!1)),c.scrollParentNotHidden[0]!==c.document[0]&&"HTML"!==c.scrollParentNotHidden[0].tagName&&(c.overflowOffset=c.scrollParentNotHidden.offset())},drag:function(b,c,d){var e=d.options,f=!1,g=d.scrollParentNotHidden[0],h=d.document[0];g!==h&&"HTML"!==g.tagName?(e.axis&&"x"===e.axis||(d.overflowOffset.top+g.offsetHeight-b.pageY<e.scrollSensitivity?g.scrollTop=f=g.scrollTop+e.scrollSpeed:b.pageY-d.overflowOffset.top<e.scrollSensitivity&&(g.scrollTop=f=g.scrollTop-e.scrollSpeed)),e.axis&&"y"===e.axis||(d.overflowOffset.left+g.offsetWidth-b.pageX<e.scrollSensitivity?g.scrollLeft=f=g.scrollLeft+e.scrollSpeed:b.pageX-d.overflowOffset.left<e.scrollSensitivity&&(g.scrollLeft=f=g.scrollLeft-e.scrollSpeed))):(e.axis&&"x"===e.axis||(b.pageY-a(h).scrollTop()<e.scrollSensitivity?f=a(h).scrollTop(a(h).scrollTop()-e.scrollSpeed):a(window).height()-(b.pageY-a(h).scrollTop())<e.scrollSensitivity&&(f=a(h).scrollTop(a(h).scrollTop()+e.scrollSpeed))),e.axis&&"y"===e.axis||(b.pageX-a(h).scrollLeft()<e.scrollSensitivity?f=a(h).scrollLeft(a(h).scrollLeft()-e.scrollSpeed):a(window).width()-(b.pageX-a(h).scrollLeft())<e.scrollSensitivity&&(f=a(h).scrollLeft(a(h).scrollLeft()+e.scrollSpeed)))),f!==!1&&a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,b)}}),a.ui.plugin.add("draggable","snap",{start:function(b,c,d){var e=d.options;d.snapElements=[],a(e.snap.constructor!==String?e.snap.items||":data(ui-draggable)":e.snap).each(function(){var b=a(this),c=b.offset();this!==d.element[0]&&d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})})},drag:function(b,c,d){var e,f,g,h,i,j,k,l,m,n,o=d.options,p=o.snapTolerance,q=c.offset.left,r=q+d.helperProportions.width,s=c.offset.top,t=s+d.helperProportions.height;for(m=d.snapElements.length-1;m>=0;m--)i=d.snapElements[m].left-d.margins.left,j=i+d.snapElements[m].width,k=d.snapElements[m].top-d.margins.top,l=k+d.snapElements[m].height,i-p>r||q>j+p||k-p>t||s>l+p||!a.contains(d.snapElements[m].item.ownerDocument,d.snapElements[m].item)?(d.snapElements[m].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[m].item})),d.snapElements[m].snapping=!1):("inner"!==o.snapMode&&(e=Math.abs(k-t)<=p,f=Math.abs(l-s)<=p,g=Math.abs(i-r)<=p,h=Math.abs(j-q)<=p,e&&(c.position.top=d._convertPositionTo("relative",{top:k-d.helperProportions.height,left:0}).top),f&&(c.position.top=d._convertPositionTo("relative",{top:l,left:0}).top),g&&(c.position.left=d._convertPositionTo("relative",{top:0,left:i-d.helperProportions.width}).left),h&&(c.position.left=d._convertPositionTo("relative",{top:0,left:j}).left)),n=e||f||g||h,"outer"!==o.snapMode&&(e=Math.abs(k-s)<=p,f=Math.abs(l-t)<=p,g=Math.abs(i-q)<=p,h=Math.abs(j-r)<=p,e&&(c.position.top=d._convertPositionTo("relative",{top:k,left:0}).top),f&&(c.position.top=d._convertPositionTo("relative",{top:l-d.helperProportions.height,left:0}).top),g&&(c.position.left=d._convertPositionTo("relative",{top:0,left:i}).left),h&&(c.position.left=d._convertPositionTo("relative",{top:0,left:j-d.helperProportions.width}).left)),!d.snapElements[m].snapping&&(e||f||g||h||n)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[m].item})),d.snapElements[m].snapping=e||f||g||h||n)}}),a.ui.plugin.add("draggable","stack",{start:function(b,c,d){var e,f=d.options,g=a.makeArray(a(f.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});g.length&&(e=parseInt(a(g[0]).css("zIndex"),10)||0,a(g).each(function(b){a(this).css("zIndex",e+b)}),this.css("zIndex",e+g.length))}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c,d){var e=a(c.helper),f=d.options;e.css("zIndex")&&(f._zIndex=e.css("zIndex")),e.css("zIndex",f.zIndex)},stop:function(b,c,d){var e=d.options;e._zIndex&&a(c.helper).css("zIndex",e._zIndex)}}),a.ui.draggable});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.draggable",a.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(a,b){this._super(a,b),"handle"===a&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(b){var c=this.options;return this._blurActiveElement(b),!(this.helper||c.disabled||a(b.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(b),!!this.handle&&(this._blockFrames(c.iframeFix===!0?"iframe":c.iframeFix),!0))},_blockFrames:function(b){this.iframeBlocks=this.document.find(b).map(function(){var b=a(this);return a("<div>").css("position","absolute").appendTo(b.parent()).outerWidth(b.outerWidth()).outerHeight(b.outerHeight()).offset(b.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(b){var c=this.document[0];if(this.handleElement.is(b.target))try{c.activeElement&&"body"!==c.activeElement.nodeName.toLowerCase()&&a(c.activeElement).blur()}catch(d){}},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===a(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(b),this.originalPosition=this.position=this._generatePosition(b,!1),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this._normalizeRightBottom(),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b),!0)},_refreshOffsets:function(a){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:a.pageX-this.offset.left,top:a.pageY-this.offset.top}},_mouseDrag:function(b,c){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(b,!0),this.positionAbs=this._convertPositionTo("absolute"),!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp({}),!1;this.position=d.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=this,d=!1;return a.ui.ddmanager&&!this.options.dropBehaviour&&(d=a.ui.ddmanager.drop(this,b)),this.dropped&&(d=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!d||"valid"===this.options.revert&&d||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)?a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",b)!==!1&&c._clear()}):this._trigger("stop",b)!==!1&&this._clear(),!1},_mouseUp:function(b){return this._unblockFrames(),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),this.handleElement.is(b.target)&&this.element.focus(),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){return!this.options.handle||!!a(b.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper),e=d?a(c.helper.apply(this.element[0],[b])):"clone"===c.helper?this.element.clone().removeAttr("id"):this.element;return e.parents("body").length||e.appendTo("parent"===c.appendTo?this.element[0].parentNode:c.appendTo),d&&e[0]===this.element[0]&&this._setPositionRelative(),e[0]===this.element[0]||/(fixed|absolute)/.test(e.css("position"))||e.css("position","absolute"),e},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_isRootNode:function(a){return/(html|body)/i.test(a.tagName)||a===this.document[0]},_getParentOffset:function(){var b=this.offsetParent.offset(),c=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==c&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var a=this.element.position(),b=this._isRootNode(this.scrollParent[0]);return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+(b?0:this.scrollParent.scrollTop()),left:a.left-(parseInt(this.helper.css("left"),10)||0)+(b?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b,c,d,e=this.options,f=this.document[0];return this.relativeContainer=null,e.containment?"window"===e.containment?void(this.containment=[a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,a(window).scrollLeft()+a(window).width()-this.helperProportions.width-this.margins.left,a(window).scrollTop()+(a(window).height()||f.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===e.containment?void(this.containment=[0,0,a(f).width()-this.helperProportions.width-this.margins.left,(a(f).height()||f.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):e.containment.constructor===Array?void(this.containment=e.containment):("parent"===e.containment&&(e.containment=this.helper[0].parentNode),c=a(e.containment),d=c[0],void(d&&(b=/(scroll|auto)/.test(c.css("overflow")),this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+(parseInt(c.css("paddingTop"),10)||0),(b?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(c.css("borderRightWidth"),10)||0)-(parseInt(c.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(b?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(c.css("borderBottomWidth"),10)||0)-(parseInt(c.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=c))):void(this.containment=null)},_convertPositionTo:function(a,b){b||(b=this.position);var c="absolute"===a?1:-1,d=this._isRootNode(this.scrollParent[0]);return{top:b.top+this.offset.relative.top*c+this.offset.parent.top*c-("fixed"===this.cssPosition?-this.offset.scroll.top:d?0:this.offset.scroll.top)*c,left:b.left+this.offset.relative.left*c+this.offset.parent.left*c-("fixed"===this.cssPosition?-this.offset.scroll.left:d?0:this.offset.scroll.left)*c}},_generatePosition:function(a,b){var c,d,e,f,g=this.options,h=this._isRootNode(this.scrollParent[0]),i=a.pageX,j=a.pageY;return h&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),b&&(this.containment&&(this.relativeContainer?(d=this.relativeContainer.offset(),c=[this.containment[0]+d.left,this.containment[1]+d.top,this.containment[2]+d.left,this.containment[3]+d.top]):c=this.containment,a.pageX-this.offset.click.left<c[0]&&(i=c[0]+this.offset.click.left),a.pageY-this.offset.click.top<c[1]&&(j=c[1]+this.offset.click.top),a.pageX-this.offset.click.left>c[2]&&(i=c[2]+this.offset.click.left),a.pageY-this.offset.click.top>c[3]&&(j=c[3]+this.offset.click.top)),g.grid&&(e=g.grid[1]?this.originalPageY+Math.round((j-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY,j=c?e-this.offset.click.top>=c[1]||e-this.offset.click.top>c[3]?e:e-this.offset.click.top>=c[1]?e-g.grid[1]:e+g.grid[1]:e,f=g.grid[0]?this.originalPageX+Math.round((i-this.originalPageX)/g.grid[0])*g.grid[0]:this.originalPageX,i=c?f-this.offset.click.left>=c[0]||f-this.offset.click.left>c[2]?f:f-this.offset.click.left>=c[0]?f-g.grid[0]:f+g.grid[0]:f),"y"===g.axis&&(i=this.originalPageX),"x"===g.axis&&(j=this.originalPageY)),{top:j-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:h?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(b,c,d){return d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d,this],!0),/^(drag|start|stop)/.test(b)&&(this.positionAbs=this._convertPositionTo("absolute"),d.offset=this.positionAbs),a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c,d){var e=a.extend({},c,{item:d.element});d.sortables=[],a(d.options.connectToSortable).each(function(){var c=a(this).sortable("instance");c&&!c.options.disabled&&(d.sortables.push(c),c.refreshPositions(),c._trigger("activate",b,e))})},stop:function(b,c,d){var e=a.extend({},c,{item:d.element});d.cancelHelperRemoval=!1,a.each(d.sortables,function(){var a=this;a.isOver?(a.isOver=0,d.cancelHelperRemoval=!0,a.cancelHelperRemoval=!1,a._storedCSS={position:a.placeholder.css("position"),top:a.placeholder.css("top"),left:a.placeholder.css("left")},a._mouseStop(b),a.options.helper=a.options._helper):(a.cancelHelperRemoval=!0,a._trigger("deactivate",b,e))})},drag:function(b,c,d){a.each(d.sortables,function(){var e=!1,f=this;f.positionAbs=d.positionAbs,f.helperProportions=d.helperProportions,f.offset.click=d.offset.click,f._intersectsWith(f.containerCache)&&(e=!0,a.each(d.sortables,function(){return this.positionAbs=d.positionAbs,this.helperProportions=d.helperProportions,this.offset.click=d.offset.click,this!==f&&this._intersectsWith(this.containerCache)&&a.contains(f.element[0],this.element[0])&&(e=!1),e})),e?(f.isOver||(f.isOver=1,d._parent=c.helper.parent(),f.currentItem=c.helper.appendTo(f.element).data("ui-sortable-item",!0),f.options._helper=f.options.helper,f.options.helper=function(){return c.helper[0]},b.target=f.currentItem[0],f._mouseCapture(b,!0),f._mouseStart(b,!0,!0),f.offset.click.top=d.offset.click.top,f.offset.click.left=d.offset.click.left,f.offset.parent.left-=d.offset.parent.left-f.offset.parent.left,f.offset.parent.top-=d.offset.parent.top-f.offset.parent.top,d._trigger("toSortable",b),d.dropped=f.element,a.each(d.sortables,function(){this.refreshPositions()}),d.currentItem=d.element,f.fromOutside=d),f.currentItem&&(f._mouseDrag(b),c.position=f.position)):f.isOver&&(f.isOver=0,f.cancelHelperRemoval=!0,f.options._revert=f.options.revert,f.options.revert=!1,f._trigger("out",b,f._uiHash(f)),f._mouseStop(b,!0),f.options.revert=f.options._revert,f.options.helper=f.options._helper,f.placeholder&&f.placeholder.remove(),c.helper.appendTo(d._parent),d._refreshOffsets(b),c.position=d._generatePosition(b,!0),d._trigger("fromSortable",b),d.dropped=!1,a.each(d.sortables,function(){this.refreshPositions()}))})}}),a.ui.plugin.add("draggable","cursor",{start:function(b,c,d){var e=a("body"),f=d.options;e.css("cursor")&&(f._cursor=e.css("cursor")),e.css("cursor",f.cursor)},stop:function(b,c,d){var e=d.options;e._cursor&&a("body").css("cursor",e._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c,d){var e=a(c.helper),f=d.options;e.css("opacity")&&(f._opacity=e.css("opacity")),e.css("opacity",f.opacity)},stop:function(b,c,d){var e=d.options;e._opacity&&a(c.helper).css("opacity",e._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(a,b,c){c.scrollParentNotHidden||(c.scrollParentNotHidden=c.helper.scrollParent(!1)),c.scrollParentNotHidden[0]!==c.document[0]&&"HTML"!==c.scrollParentNotHidden[0].tagName&&(c.overflowOffset=c.scrollParentNotHidden.offset())},drag:function(b,c,d){var e=d.options,f=!1,g=d.scrollParentNotHidden[0],h=d.document[0];g!==h&&"HTML"!==g.tagName?(e.axis&&"x"===e.axis||(d.overflowOffset.top+g.offsetHeight-b.pageY<e.scrollSensitivity?g.scrollTop=f=g.scrollTop+e.scrollSpeed:b.pageY-d.overflowOffset.top<e.scrollSensitivity&&(g.scrollTop=f=g.scrollTop-e.scrollSpeed)),e.axis&&"y"===e.axis||(d.overflowOffset.left+g.offsetWidth-b.pageX<e.scrollSensitivity?g.scrollLeft=f=g.scrollLeft+e.scrollSpeed:b.pageX-d.overflowOffset.left<e.scrollSensitivity&&(g.scrollLeft=f=g.scrollLeft-e.scrollSpeed))):(e.axis&&"x"===e.axis||(b.pageY-a(h).scrollTop()<e.scrollSensitivity?f=a(h).scrollTop(a(h).scrollTop()-e.scrollSpeed):a(window).height()-(b.pageY-a(h).scrollTop())<e.scrollSensitivity&&(f=a(h).scrollTop(a(h).scrollTop()+e.scrollSpeed))),e.axis&&"y"===e.axis||(b.pageX-a(h).scrollLeft()<e.scrollSensitivity?f=a(h).scrollLeft(a(h).scrollLeft()-e.scrollSpeed):a(window).width()-(b.pageX-a(h).scrollLeft())<e.scrollSensitivity&&(f=a(h).scrollLeft(a(h).scrollLeft()+e.scrollSpeed)))),f!==!1&&a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,b)}}),a.ui.plugin.add("draggable","snap",{start:function(b,c,d){var e=d.options;d.snapElements=[],a(e.snap.constructor!==String?e.snap.items||":data(ui-draggable)":e.snap).each(function(){var b=a(this),c=b.offset();this!==d.element[0]&&d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})})},drag:function(b,c,d){var e,f,g,h,i,j,k,l,m,n,o=d.options,p=o.snapTolerance,q=c.offset.left,r=q+d.helperProportions.width,s=c.offset.top,t=s+d.helperProportions.height;for(m=d.snapElements.length-1;m>=0;m--)i=d.snapElements[m].left-d.margins.left,j=i+d.snapElements[m].width,k=d.snapElements[m].top-d.margins.top,l=k+d.snapElements[m].height,r<i-p||q>j+p||t<k-p||s>l+p||!a.contains(d.snapElements[m].item.ownerDocument,d.snapElements[m].item)?(d.snapElements[m].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[m].item})),d.snapElements[m].snapping=!1):("inner"!==o.snapMode&&(e=Math.abs(k-t)<=p,f=Math.abs(l-s)<=p,g=Math.abs(i-r)<=p,h=Math.abs(j-q)<=p,e&&(c.position.top=d._convertPositionTo("relative",{top:k-d.helperProportions.height,left:0}).top),f&&(c.position.top=d._convertPositionTo("relative",{top:l,left:0}).top),g&&(c.position.left=d._convertPositionTo("relative",{top:0,left:i-d.helperProportions.width}).left),h&&(c.position.left=d._convertPositionTo("relative",{top:0,left:j}).left)),n=e||f||g||h,"outer"!==o.snapMode&&(e=Math.abs(k-s)<=p,f=Math.abs(l-t)<=p,g=Math.abs(i-q)<=p,h=Math.abs(j-r)<=p,e&&(c.position.top=d._convertPositionTo("relative",{top:k,left:0}).top),f&&(c.position.top=d._convertPositionTo("relative",{top:l-d.helperProportions.height,left:0}).top),g&&(c.position.left=d._convertPositionTo("relative",{top:0,left:i}).left),h&&(c.position.left=d._convertPositionTo("relative",{top:0,left:j-d.helperProportions.width}).left)),!d.snapElements[m].snapping&&(e||f||g||h||n)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[m].item})),d.snapElements[m].snapping=e||f||g||h||n)}}),a.ui.plugin.add("draggable","stack",{start:function(b,c,d){var e,f=d.options,g=a.makeArray(a(f.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});g.length&&(e=parseInt(a(g[0]).css("zIndex"),10)||0,a(g).each(function(b){a(this).css("zIndex",e+b)}),this.css("zIndex",e+g.length))}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c,d){var e=a(c.helper),f=d.options;e.css("zIndex")&&(f._zIndex=e.css("zIndex")),e.css("zIndex",f.zIndex)},stop:function(b,c,d){var e=d.options;e._zIndex&&a(c.helper).css("zIndex",e._zIndex)}}),a.ui.draggable});
\ No newline at end of file
index c01dc5f77c41e24719f4bd50a3249d6c553c56a2..76204e09edc84906b492647fa85921fdf675364a 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/droppable/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./mouse","./draggable"],a):a(jQuery)}(function(a){return a.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var b,c=this.options,d=c.accept;this.isover=!1,this.isout=!0,this.accept=a.isFunction(d)?d:function(a){return a.is(d)},this.proportions=function(){return arguments.length?void(b=arguments[0]):b?b:b={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(c.scope),c.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(b){a.ui.ddmanager.droppables[b]=a.ui.ddmanager.droppables[b]||[],a.ui.ddmanager.droppables[b].push(this)},_splice:function(a){for(var b=0;b<a.length;b++)a[b]===this&&a.splice(b,1)},_destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];this._splice(b),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(b,c){if("accept"===b)this.accept=a.isFunction(c)?c:function(a){return a.is(c)};else if("scope"===b){var d=a.ui.ddmanager.droppables[this.options.scope];this._splice(d),this._addToManager(c)}this._super(b,c)},_activate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),c&&this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),c&&this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;c&&(c.currentItem||c.element)[0]!==this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",b,this.ui(c)))},_out:function(b){var c=a.ui.ddmanager.current;c&&(c.currentItem||c.element)[0]!==this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",b,this.ui(c)))},_drop:function(b,c){var d=c||a.ui.ddmanager.current,e=!1;return d&&(d.currentItem||d.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var c=a(this).droppable("instance");return c.options.greedy&&!c.options.disabled&&c.options.scope===d.options.scope&&c.accept.call(c.element[0],d.currentItem||d.element)&&a.ui.intersect(d,a.extend(c,{offset:c.element.offset()}),c.options.tolerance,b)?(e=!0,!1):void 0}),e?!1:this.accept.call(this.element[0],d.currentItem||d.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",b,this.ui(d)),this.element):!1):!1},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}}),a.ui.intersect=function(){function a(a,b,c){return a>=b&&b+c>a}return function(b,c,d,e){if(!c.offset)return!1;var f=(b.positionAbs||b.position.absolute).left+b.margins.left,g=(b.positionAbs||b.position.absolute).top+b.margins.top,h=f+b.helperProportions.width,i=g+b.helperProportions.height,j=c.offset.left,k=c.offset.top,l=j+c.proportions().width,m=k+c.proportions().height;switch(d){case"fit":return f>=j&&l>=h&&g>=k&&m>=i;case"intersect":return j<f+b.helperProportions.width/2&&h-b.helperProportions.width/2<l&&k<g+b.helperProportions.height/2&&i-b.helperProportions.height/2<m;case"pointer":return a(e.pageY,k,c.proportions().height)&&a(e.pageX,j,c.proportions().width);case"touch":return(g>=k&&m>=g||i>=k&&m>=i||k>g&&i>m)&&(f>=j&&l>=f||h>=j&&l>=h||j>f&&h>l);default:return!1}}}(),a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(b,c){var d,e,f=a.ui.ddmanager.droppables[b.options.scope]||[],g=c?c.type:null,h=(b.currentItem||b.element).find(":data(ui-droppable)").addBack();a:for(d=0;d<f.length;d++)if(!(f[d].options.disabled||b&&!f[d].accept.call(f[d].element[0],b.currentItem||b.element))){for(e=0;e<h.length;e++)if(h[e]===f[d].element[0]){f[d].proportions().height=0;continue a}f[d].visible="none"!==f[d].element.css("display"),f[d].visible&&("mousedown"===g&&f[d]._activate.call(f[d],c),f[d].offset=f[d].element.offset(),f[d].proportions({width:f[d].element[0].offsetWidth,height:f[d].element[0].offsetHeight}))}},drop:function(b,c){var d=!1;return a.each((a.ui.ddmanager.droppables[b.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance,c)&&(d=this._drop.call(this,c)||d),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,c)))}),d},dragStart:function(b,c){b.element.parentsUntil("body").bind("scroll.droppable",function(){b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){b.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(b,c),a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var d,e,f,g=a.ui.intersect(b,this,this.options.tolerance,c),h=!g&&this.isover?"isout":g&&!this.isover?"isover":null;h&&(this.options.greedy&&(e=this.options.scope,f=this.element.parents(":data(ui-droppable)").filter(function(){return a(this).droppable("instance").options.scope===e}),f.length&&(d=a(f[0]).droppable("instance"),d.greedyChild="isover"===h)),d&&"isover"===h&&(d.isover=!1,d.isout=!0,d._out.call(d,c)),this[h]=!0,this["isout"===h?"isover":"isout"]=!1,this["isover"===h?"_over":"_out"].call(this,c),d&&"isout"===h&&(d.isout=!1,d.isover=!0,d._over.call(d,c)))}})},dragStop:function(b,c){b.element.parentsUntil("body").unbind("scroll.droppable"),b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)}},a.ui.droppable});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./mouse","./draggable"],a):a(jQuery)}(function(a){return a.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var b,c=this.options,d=c.accept;this.isover=!1,this.isout=!0,this.accept=a.isFunction(d)?d:function(a){return a.is(d)},this.proportions=function(){return arguments.length?void(b=arguments[0]):b?b:b={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(c.scope),c.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(b){a.ui.ddmanager.droppables[b]=a.ui.ddmanager.droppables[b]||[],a.ui.ddmanager.droppables[b].push(this)},_splice:function(a){for(var b=0;b<a.length;b++)a[b]===this&&a.splice(b,1)},_destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];this._splice(b),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(b,c){if("accept"===b)this.accept=a.isFunction(c)?c:function(a){return a.is(c)};else if("scope"===b){var d=a.ui.ddmanager.droppables[this.options.scope];this._splice(d),this._addToManager(c)}this._super(b,c)},_activate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),c&&this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),c&&this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;c&&(c.currentItem||c.element)[0]!==this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",b,this.ui(c)))},_out:function(b){var c=a.ui.ddmanager.current;c&&(c.currentItem||c.element)[0]!==this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",b,this.ui(c)))},_drop:function(b,c){var d=c||a.ui.ddmanager.current,e=!1;return!(!d||(d.currentItem||d.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var c=a(this).droppable("instance");if(c.options.greedy&&!c.options.disabled&&c.options.scope===d.options.scope&&c.accept.call(c.element[0],d.currentItem||d.element)&&a.ui.intersect(d,a.extend(c,{offset:c.element.offset()}),c.options.tolerance,b))return e=!0,!1}),!e&&(!!this.accept.call(this.element[0],d.currentItem||d.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",b,this.ui(d)),this.element)))},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}}),a.ui.intersect=function(){function a(a,b,c){return a>=b&&a<b+c}return function(b,c,d,e){if(!c.offset)return!1;var f=(b.positionAbs||b.position.absolute).left+b.margins.left,g=(b.positionAbs||b.position.absolute).top+b.margins.top,h=f+b.helperProportions.width,i=g+b.helperProportions.height,j=c.offset.left,k=c.offset.top,l=j+c.proportions().width,m=k+c.proportions().height;switch(d){case"fit":return j<=f&&h<=l&&k<=g&&i<=m;case"intersect":return j<f+b.helperProportions.width/2&&h-b.helperProportions.width/2<l&&k<g+b.helperProportions.height/2&&i-b.helperProportions.height/2<m;case"pointer":return a(e.pageY,k,c.proportions().height)&&a(e.pageX,j,c.proportions().width);case"touch":return(g>=k&&g<=m||i>=k&&i<=m||g<k&&i>m)&&(f>=j&&f<=l||h>=j&&h<=l||f<j&&h>l);default:return!1}}}(),a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(b,c){var d,e,f=a.ui.ddmanager.droppables[b.options.scope]||[],g=c?c.type:null,h=(b.currentItem||b.element).find(":data(ui-droppable)").addBack();a:for(d=0;d<f.length;d++)if(!(f[d].options.disabled||b&&!f[d].accept.call(f[d].element[0],b.currentItem||b.element))){for(e=0;e<h.length;e++)if(h[e]===f[d].element[0]){f[d].proportions().height=0;continue a}f[d].visible="none"!==f[d].element.css("display"),f[d].visible&&("mousedown"===g&&f[d]._activate.call(f[d],c),f[d].offset=f[d].element.offset(),f[d].proportions({width:f[d].element[0].offsetWidth,height:f[d].element[0].offsetHeight}))}},drop:function(b,c){var d=!1;return a.each((a.ui.ddmanager.droppables[b.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance,c)&&(d=this._drop.call(this,c)||d),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,c)))}),d},dragStart:function(b,c){b.element.parentsUntil("body").bind("scroll.droppable",function(){b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){b.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(b,c),a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var d,e,f,g=a.ui.intersect(b,this,this.options.tolerance,c),h=!g&&this.isover?"isout":g&&!this.isover?"isover":null;h&&(this.options.greedy&&(e=this.options.scope,f=this.element.parents(":data(ui-droppable)").filter(function(){return a(this).droppable("instance").options.scope===e}),f.length&&(d=a(f[0]).droppable("instance"),d.greedyChild="isover"===h)),d&&"isover"===h&&(d.isover=!1,d.isout=!0,d._out.call(d,c)),this[h]=!0,this["isout"===h?"isover":"isout"]=!1,this["isover"===h?"_over":"_out"].call(this,c),d&&"isout"===h&&(d.isout=!1,d.isover=!0,d._over.call(d,c)))}})},dragStop:function(b,c){b.element.parentsUntil("body").unbind("scroll.droppable"),b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)}},a.ui.droppable});
\ No newline at end of file
index 3c7a03199350a6dcfa52d3908548b0b6f712af5b..2a8e82342517af9cd456c5bee2f8562e00fb0227 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/bounce-effect/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./effect"],a):a(jQuery)}(function(a){return a.effects.effect.bounce=function(b,c){var d,e,f,g=a(this),h=["position","top","bottom","left","right","height","width"],i=a.effects.setMode(g,b.mode||"effect"),j="hide"===i,k="show"===i,l=b.direction||"up",m=b.distance,n=b.times||5,o=2*n+(k||j?1:0),p=b.duration/o,q=b.easing,r="up"===l||"down"===l?"top":"left",s="up"===l||"left"===l,t=g.queue(),u=t.length;for((k||j)&&h.push("opacity"),a.effects.save(g,h),g.show(),a.effects.createWrapper(g),m||(m=g["top"===r?"outerHeight":"outerWidth"]()/3),k&&(f={opacity:1},f[r]=0,g.css("opacity",0).css(r,s?2*-m:2*m).animate(f,p,q)),j&&(m/=Math.pow(2,n-1)),f={},f[r]=0,d=0;n>d;d++)e={},e[r]=(s?"-=":"+=")+m,g.animate(e,p,q).animate(f,p,q),m=j?2*m:m/2;j&&(e={opacity:0},e[r]=(s?"-=":"+=")+m,g.animate(e,p,q)),g.queue(function(){j&&g.hide(),a.effects.restore(g,h),a.effects.removeWrapper(g),c()}),u>1&&t.splice.apply(t,[1,0].concat(t.splice(u,o+1))),g.dequeue()}});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./effect"],a):a(jQuery)}(function(a){return a.effects.effect.bounce=function(b,c){var d,e,f,g=a(this),h=["position","top","bottom","left","right","height","width"],i=a.effects.setMode(g,b.mode||"effect"),j="hide"===i,k="show"===i,l=b.direction||"up",m=b.distance,n=b.times||5,o=2*n+(k||j?1:0),p=b.duration/o,q=b.easing,r="up"===l||"down"===l?"top":"left",s="up"===l||"left"===l,t=g.queue(),u=t.length;for((k||j)&&h.push("opacity"),a.effects.save(g,h),g.show(),a.effects.createWrapper(g),m||(m=g["top"===r?"outerHeight":"outerWidth"]()/3),k&&(f={opacity:1},f[r]=0,g.css("opacity",0).css(r,s?2*-m:2*m).animate(f,p,q)),j&&(m/=Math.pow(2,n-1)),f={},f[r]=0,d=0;d<n;d++)e={},e[r]=(s?"-=":"+=")+m,g.animate(e,p,q).animate(f,p,q),m=j?2*m:m/2;j&&(e={opacity:0},e[r]=(s?"-=":"+=")+m,g.animate(e,p,q)),g.queue(function(){j&&g.hide(),a.effects.restore(g,h),a.effects.removeWrapper(g),c()}),u>1&&t.splice.apply(t,[1,0].concat(t.splice(u,o+1))),g.dequeue()}});
\ No newline at end of file
index 57a9b2ebcfb11e8d24a796379a3699e51ade180b..550b923dff2f54614b4594958cfc053f0a85bfff 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/explode-effect/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./effect"],a):a(jQuery)}(function(a){return a.effects.effect.explode=function(b,c){function d(){t.push(this),t.length===l*m&&e()}function e(){n.css({visibility:"visible"}),a(t).remove(),p||n.hide(),c()}var f,g,h,i,j,k,l=b.pieces?Math.round(Math.sqrt(b.pieces)):3,m=l,n=a(this),o=a.effects.setMode(n,b.mode||"hide"),p="show"===o,q=n.show().css("visibility","hidden").offset(),r=Math.ceil(n.outerWidth()/m),s=Math.ceil(n.outerHeight()/l),t=[];for(f=0;l>f;f++)for(i=q.top+f*s,k=f-(l-1)/2,g=0;m>g;g++)h=q.left+g*r,j=g-(m-1)/2,n.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-g*r,top:-f*s}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:r,height:s,left:h+(p?j*r:0),top:i+(p?k*s:0),opacity:p?0:1}).animate({left:h+(p?0:j*r),top:i+(p?0:k*s),opacity:p?1:0},b.duration||500,b.easing,d)}});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./effect"],a):a(jQuery)}(function(a){return a.effects.effect.explode=function(b,c){function d(){t.push(this),t.length===l*m&&e()}function e(){n.css({visibility:"visible"}),a(t).remove(),p||n.hide(),c()}var f,g,h,i,j,k,l=b.pieces?Math.round(Math.sqrt(b.pieces)):3,m=l,n=a(this),o=a.effects.setMode(n,b.mode||"hide"),p="show"===o,q=n.show().css("visibility","hidden").offset(),r=Math.ceil(n.outerWidth()/m),s=Math.ceil(n.outerHeight()/l),t=[];for(f=0;f<l;f++)for(i=q.top+f*s,k=f-(l-1)/2,g=0;g<m;g++)h=q.left+g*r,j=g-(m-1)/2,n.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-g*r,top:-f*s}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:r,height:s,left:h+(p?j*r:0),top:i+(p?k*s:0),opacity:p?0:1}).animate({left:h+(p?0:j*r),top:i+(p?0:k*s),opacity:p?1:0},b.duration||500,b.easing,d)}});
\ No newline at end of file
index 4ab9df9b6c09d1156acf18fc913aa1d61256b004..cde2942e4e443e34ddd257a95e09ddedf9d3d2a8 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/pulsate-effect/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./effect"],a):a(jQuery)}(function(a){return a.effects.effect.pulsate=function(b,c){var d,e=a(this),f=a.effects.setMode(e,b.mode||"show"),g="show"===f,h="hide"===f,i=g||"hide"===f,j=2*(b.times||5)+(i?1:0),k=b.duration/j,l=0,m=e.queue(),n=m.length;for((g||!e.is(":visible"))&&(e.css("opacity",0).show(),l=1),d=1;j>d;d++)e.animate({opacity:l},k,b.easing),l=1-l;e.animate({opacity:l},k,b.easing),e.queue(function(){h&&e.hide(),c()}),n>1&&m.splice.apply(m,[1,0].concat(m.splice(n,j+1))),e.dequeue()}});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./effect"],a):a(jQuery)}(function(a){return a.effects.effect.pulsate=function(b,c){var d,e=a(this),f=a.effects.setMode(e,b.mode||"show"),g="show"===f,h="hide"===f,i=g||"hide"===f,j=2*(b.times||5)+(i?1:0),k=b.duration/j,l=0,m=e.queue(),n=m.length;for(!g&&e.is(":visible")||(e.css("opacity",0).show(),l=1),d=1;d<j;d++)e.animate({opacity:l},k,b.easing),l=1-l;e.animate({opacity:l},k,b.easing),e.queue(function(){h&&e.hide(),c()}),n>1&&m.splice.apply(m,[1,0].concat(m.splice(n,j+1))),e.dequeue()}});
\ No newline at end of file
index 81b3bd74550442b9f17ce2ec849ae290914fe3f8..1372abb104e51df6ed233d950d4b46720acd2e42 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/shake-effect/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./effect"],a):a(jQuery)}(function(a){return a.effects.effect.shake=function(b,c){var d,e=a(this),f=["position","top","bottom","left","right","height","width"],g=a.effects.setMode(e,b.mode||"effect"),h=b.direction||"left",i=b.distance||20,j=b.times||3,k=2*j+1,l=Math.round(b.duration/k),m="up"===h||"down"===h?"top":"left",n="up"===h||"left"===h,o={},p={},q={},r=e.queue(),s=r.length;for(a.effects.save(e,f),e.show(),a.effects.createWrapper(e),o[m]=(n?"-=":"+=")+i,p[m]=(n?"+=":"-=")+2*i,q[m]=(n?"-=":"+=")+2*i,e.animate(o,l,b.easing),d=1;j>d;d++)e.animate(p,l,b.easing).animate(q,l,b.easing);e.animate(p,l,b.easing).animate(o,l/2,b.easing).queue(function(){"hide"===g&&e.hide(),a.effects.restore(e,f),a.effects.removeWrapper(e),c()}),s>1&&r.splice.apply(r,[1,0].concat(r.splice(s,k+1))),e.dequeue()}});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./effect"],a):a(jQuery)}(function(a){return a.effects.effect.shake=function(b,c){var d,e=a(this),f=["position","top","bottom","left","right","height","width"],g=a.effects.setMode(e,b.mode||"effect"),h=b.direction||"left",i=b.distance||20,j=b.times||3,k=2*j+1,l=Math.round(b.duration/k),m="up"===h||"down"===h?"top":"left",n="up"===h||"left"===h,o={},p={},q={},r=e.queue(),s=r.length;for(a.effects.save(e,f),e.show(),a.effects.createWrapper(e),o[m]=(n?"-=":"+=")+i,p[m]=(n?"+=":"-=")+2*i,q[m]=(n?"-=":"+=")+2*i,e.animate(o,l,b.easing),d=1;d<j;d++)e.animate(p,l,b.easing).animate(q,l,b.easing);e.animate(p,l,b.easing).animate(o,l/2,b.easing).queue(function(){"hide"===g&&e.hide(),a.effects.restore(e,f),a.effects.removeWrapper(e),c()}),s>1&&r.splice.apply(r,[1,0].concat(r.splice(s,k+1))),e.dequeue()}});
\ No newline at end of file
index f5bc9ed09f4851d76b8317c8a3524e580d188bfc..ca2f6ae1ffa4168f683dd5b654d293a1a993b768 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/size-effect/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./effect"],a):a(jQuery)}(function(a){return a.effects.effect.size=function(b,c){var d,e,f,g=a(this),h=["position","top","bottom","left","right","width","height","overflow","opacity"],i=["position","top","bottom","left","right","overflow","opacity"],j=["width","height","overflow"],k=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],m=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],n=a.effects.setMode(g,b.mode||"effect"),o=b.restore||"effect"!==n,p=b.scale||"both",q=b.origin||["middle","center"],r=g.css("position"),s=o?h:i,t={height:0,width:0,outerHeight:0,outerWidth:0};"show"===n&&g.show(),d={height:g.height(),width:g.width(),outerHeight:g.outerHeight(),outerWidth:g.outerWidth()},"toggle"===b.mode&&"show"===n?(g.from=b.to||t,g.to=b.from||d):(g.from=b.from||("show"===n?t:d),g.to=b.to||("hide"===n?t:d)),f={from:{y:g.from.height/d.height,x:g.from.width/d.width},to:{y:g.to.height/d.height,x:g.to.width/d.width}},("box"===p||"both"===p)&&(f.from.y!==f.to.y&&(s=s.concat(l),g.from=a.effects.setTransition(g,l,f.from.y,g.from),g.to=a.effects.setTransition(g,l,f.to.y,g.to)),f.from.x!==f.to.x&&(s=s.concat(m),g.from=a.effects.setTransition(g,m,f.from.x,g.from),g.to=a.effects.setTransition(g,m,f.to.x,g.to))),("content"===p||"both"===p)&&f.from.y!==f.to.y&&(s=s.concat(k).concat(j),g.from=a.effects.setTransition(g,k,f.from.y,g.from),g.to=a.effects.setTransition(g,k,f.to.y,g.to)),a.effects.save(g,s),g.show(),a.effects.createWrapper(g),g.css("overflow","hidden").css(g.from),q&&(e=a.effects.getBaseline(q,d),g.from.top=(d.outerHeight-g.outerHeight())*e.y,g.from.left=(d.outerWidth-g.outerWidth())*e.x,g.to.top=(d.outerHeight-g.to.outerHeight)*e.y,g.to.left=(d.outerWidth-g.to.outerWidth)*e.x),g.css(g.from),("content"===p||"both"===p)&&(l=l.concat(["marginTop","marginBottom"]).concat(k),m=m.concat(["marginLeft","marginRight"]),j=h.concat(l).concat(m),g.find("*[width]").each(function(){var c=a(this),d={height:c.height(),width:c.width(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth()};o&&a.effects.save(c,j),c.from={height:d.height*f.from.y,width:d.width*f.from.x,outerHeight:d.outerHeight*f.from.y,outerWidth:d.outerWidth*f.from.x},c.to={height:d.height*f.to.y,width:d.width*f.to.x,outerHeight:d.height*f.to.y,outerWidth:d.width*f.to.x},f.from.y!==f.to.y&&(c.from=a.effects.setTransition(c,l,f.from.y,c.from),c.to=a.effects.setTransition(c,l,f.to.y,c.to)),f.from.x!==f.to.x&&(c.from=a.effects.setTransition(c,m,f.from.x,c.from),c.to=a.effects.setTransition(c,m,f.to.x,c.to)),c.css(c.from),c.animate(c.to,b.duration,b.easing,function(){o&&a.effects.restore(c,j)})})),g.animate(g.to,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){0===g.to.opacity&&g.css("opacity",g.from.opacity),"hide"===n&&g.hide(),a.effects.restore(g,s),o||("static"===r?g.css({position:"relative",top:g.to.top,left:g.to.left}):a.each(["top","left"],function(a,b){g.css(b,function(b,c){var d=parseInt(c,10),e=a?g.to.left:g.to.top;return"auto"===c?e+"px":d+e+"px"})})),a.effects.removeWrapper(g),c()}})}});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./effect"],a):a(jQuery)}(function(a){return a.effects.effect.size=function(b,c){var d,e,f,g=a(this),h=["position","top","bottom","left","right","width","height","overflow","opacity"],i=["position","top","bottom","left","right","overflow","opacity"],j=["width","height","overflow"],k=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],m=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],n=a.effects.setMode(g,b.mode||"effect"),o=b.restore||"effect"!==n,p=b.scale||"both",q=b.origin||["middle","center"],r=g.css("position"),s=o?h:i,t={height:0,width:0,outerHeight:0,outerWidth:0};"show"===n&&g.show(),d={height:g.height(),width:g.width(),outerHeight:g.outerHeight(),outerWidth:g.outerWidth()},"toggle"===b.mode&&"show"===n?(g.from=b.to||t,g.to=b.from||d):(g.from=b.from||("show"===n?t:d),g.to=b.to||("hide"===n?t:d)),f={from:{y:g.from.height/d.height,x:g.from.width/d.width},to:{y:g.to.height/d.height,x:g.to.width/d.width}},"box"!==p&&"both"!==p||(f.from.y!==f.to.y&&(s=s.concat(l),g.from=a.effects.setTransition(g,l,f.from.y,g.from),g.to=a.effects.setTransition(g,l,f.to.y,g.to)),f.from.x!==f.to.x&&(s=s.concat(m),g.from=a.effects.setTransition(g,m,f.from.x,g.from),g.to=a.effects.setTransition(g,m,f.to.x,g.to))),"content"!==p&&"both"!==p||f.from.y!==f.to.y&&(s=s.concat(k).concat(j),g.from=a.effects.setTransition(g,k,f.from.y,g.from),g.to=a.effects.setTransition(g,k,f.to.y,g.to)),a.effects.save(g,s),g.show(),a.effects.createWrapper(g),g.css("overflow","hidden").css(g.from),q&&(e=a.effects.getBaseline(q,d),g.from.top=(d.outerHeight-g.outerHeight())*e.y,g.from.left=(d.outerWidth-g.outerWidth())*e.x,g.to.top=(d.outerHeight-g.to.outerHeight)*e.y,g.to.left=(d.outerWidth-g.to.outerWidth)*e.x),g.css(g.from),"content"!==p&&"both"!==p||(l=l.concat(["marginTop","marginBottom"]).concat(k),m=m.concat(["marginLeft","marginRight"]),j=h.concat(l).concat(m),g.find("*[width]").each(function(){var c=a(this),d={height:c.height(),width:c.width(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth()};o&&a.effects.save(c,j),c.from={height:d.height*f.from.y,width:d.width*f.from.x,outerHeight:d.outerHeight*f.from.y,outerWidth:d.outerWidth*f.from.x},c.to={height:d.height*f.to.y,width:d.width*f.to.x,outerHeight:d.height*f.to.y,outerWidth:d.width*f.to.x},f.from.y!==f.to.y&&(c.from=a.effects.setTransition(c,l,f.from.y,c.from),c.to=a.effects.setTransition(c,l,f.to.y,c.to)),f.from.x!==f.to.x&&(c.from=a.effects.setTransition(c,m,f.from.x,c.from),c.to=a.effects.setTransition(c,m,f.to.x,c.to)),c.css(c.from),c.animate(c.to,b.duration,b.easing,function(){o&&a.effects.restore(c,j)})})),g.animate(g.to,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){0===g.to.opacity&&g.css("opacity",g.from.opacity),"hide"===n&&g.hide(),a.effects.restore(g,s),o||("static"===r?g.css({position:"relative",top:g.to.top,left:g.to.left}):a.each(["top","left"],function(a,b){g.css(b,function(b,c){var d=parseInt(c,10),e=a?g.to.left:g.to.top;return"auto"===c?e+"px":d+e+"px"})})),a.effects.removeWrapper(g),c()}})}});
\ No newline at end of file
index 77833314f71183776c4360d7041dfa98a379e9e2..32dc89f63a9bea2fdaf45ffd13656856a75387e6 100644 (file)
@@ -18,4 +18,4 @@
  *
  * Date: Wed Jan 16 08:47:09 2013 -0600
  */
-return a.effects={effect:{}},function(a,b){function c(a,b,c){var d=l[b.type]||{};return null==a?c||!b.def?null:b.def:(a=d.floor?~~a:parseFloat(a),isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max<a?d.max:a)}function d(b){var c=j(),d=c._rgba=[];return b=b.toLowerCase(),o(i,function(a,e){var f,g=e.re.exec(b),h=g&&e.parse(g),i=e.space||"rgba";return h?(f=c[i](h),c[k[i].cache]=f[k[i].cache],d=c._rgba=f._rgba,!1):void 0}),d.length?("0,0,0,0"===d.join()&&a.extend(d,f.transparent),c):f[b]}function e(a,b,c){return c=(c+1)%1,1>6*c?a+(b-a)*c*6:1>2*c?b:2>3*c?a+(b-a)*(2/3-c)*6:a}var f,g="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",h=/^([\-+])=\s*(\d+\.?\d*)/,i=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],j=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b,c,d,e)},k={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},l={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},m=j.support={},n=a("<p>")[0],o=a.each;n.style.cssText="background-color:rgba(1,1,1,.5)",m.rgba=n.style.backgroundColor.indexOf("rgba")>-1,o(k,function(a,b){b.cache="_"+a,b.props.alpha={idx:3,type:"percent",def:1}}),j.fn=a.extend(j.prototype,{parse:function(e,g,h,i){if(e===b)return this._rgba=[null,null,null,null],this;(e.jquery||e.nodeType)&&(e=a(e).css(g),g=b);var l=this,m=a.type(e),n=this._rgba=[];return g!==b&&(e=[e,g,h,i],m="array"),"string"===m?this.parse(d(e)||f._default):"array"===m?(o(k.rgba.props,function(a,b){n[b.idx]=c(e[b.idx],b)}),this):"object"===m?(e instanceof j?o(k,function(a,b){e[b.cache]&&(l[b.cache]=e[b.cache].slice())}):o(k,function(b,d){var f=d.cache;o(d.props,function(a,b){if(!l[f]&&d.to){if("alpha"===a||null==e[a])return;l[f]=d.to(l._rgba)}l[f][b.idx]=c(e[a],b,!0)}),l[f]&&a.inArray(null,l[f].slice(0,3))<0&&(l[f][3]=1,d.from&&(l._rgba=d.from(l[f])))}),this):void 0},is:function(a){var b=j(a),c=!0,d=this;return o(k,function(a,e){var f,g=b[e.cache];return g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],o(e.props,function(a,b){return null!=g[b.idx]?c=g[b.idx]===f[b.idx]:void 0})),c}),c},_space:function(){var a=[],b=this;return o(k,function(c,d){b[d.cache]&&a.push(c)}),a.pop()},transition:function(a,b){var d=j(a),e=d._space(),f=k[e],g=0===this.alpha()?j("transparent"):this,h=g[f.cache]||f.to(g._rgba),i=h.slice();return d=d[f.cache],o(f.props,function(a,e){var f=e.idx,g=h[f],j=d[f],k=l[e.type]||{};null!==j&&(null===g?i[f]=j:(k.mod&&(j-g>k.mod/2?g+=k.mod:g-j>k.mod/2&&(g-=k.mod)),i[f]=c((j-g)*b+g,e)))}),this[e](i)},blend:function(b){if(1===this._rgba[3])return this;var c=this._rgba.slice(),d=c.pop(),e=j(b)._rgba;return j(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b="rgba(",c=a.map(this._rgba,function(a,b){return null==a?b>2?1:0:a});return 1===c[3]&&(c.pop(),b="rgb("),b+c.join()+")"},toHslaString:function(){var b="hsla(",c=a.map(this.hsla(),function(a,b){return null==a&&(a=b>2?1:0),b&&3>b&&(a=Math.round(100*a)+"%"),a});return 1===c[3]&&(c.pop(),b="hsl("),b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();return b&&c.push(~~(255*d)),"#"+a.map(c,function(a){return a=(a||0).toString(16),1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),j.fn.parse.prototype=j.fn,k.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b,c,d=a[0]/255,e=a[1]/255,f=a[2]/255,g=a[3],h=Math.max(d,e,f),i=Math.min(d,e,f),j=h-i,k=h+i,l=.5*k;return b=i===h?0:d===h?60*(e-f)/j+360:e===h?60*(f-d)/j+120:60*(d-e)/j+240,c=0===j?0:.5>=l?j/k:j/(2-k),[Math.round(b)%360,c,l,null==g?1:g]},k.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],f=a[3],g=.5>=d?d*(1+c):d+c-d*c,h=2*d-g;return[Math.round(255*e(h,g,b+1/3)),Math.round(255*e(h,g,b)),Math.round(255*e(h,g,b-1/3)),f]},o(k,function(d,e){var f=e.props,g=e.cache,i=e.to,k=e.from;j.fn[d]=function(d){if(i&&!this[g]&&(this[g]=i(this._rgba)),d===b)return this[g].slice();var e,h=a.type(d),l="array"===h||"object"===h?d:arguments,m=this[g].slice();return o(f,function(a,b){var d=l["object"===h?a:b.idx];null==d&&(d=m[b.idx]),m[b.idx]=c(d,b)}),k?(e=j(k(m)),e[g]=m,e):j(m)},o(f,function(b,c){j.fn[b]||(j.fn[b]=function(e){var f,g=a.type(e),i="alpha"===b?this._hsla?"hsla":"rgba":d,j=this[i](),k=j[c.idx];return"undefined"===g?k:("function"===g&&(e=e.call(this,k),g=a.type(e)),null==e&&c.empty?this:("string"===g&&(f=h.exec(e),f&&(e=k+parseFloat(f[2])*("+"===f[1]?1:-1))),j[c.idx]=e,this[i](j)))})})}),j.hook=function(b){var c=b.split(" ");o(c,function(b,c){a.cssHooks[c]={set:function(b,e){var f,g,h="";if("transparent"!==e&&("string"!==a.type(e)||(f=d(e)))){if(e=j(f||e),!m.rgba&&1!==e._rgba[3]){for(g="backgroundColor"===c?b.parentNode:b;(""===h||"transparent"===h)&&g&&g.style;)try{h=a.css(g,"backgroundColor"),g=g.parentNode}catch(i){}e=e.blend(h&&"transparent"!==h?h:"_default")}e=e.toRgbaString()}try{b.style[c]=e}catch(i){}}},a.fx.step[c]=function(b){b.colorInit||(b.start=j(b.elem,c),b.end=j(b.end),b.colorInit=!0),a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})},j.hook(g),a.cssHooks.borderColor={expand:function(a){var b={};return o(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a}),b}},f=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(c),function(){function b(b){var c,d,e=b.ownerDocument.defaultView?b.ownerDocument.defaultView.getComputedStyle(b,null):b.currentStyle,f={};if(e&&e.length&&e[0]&&e[e[0]])for(d=e.length;d--;)c=e[d],"string"==typeof e[c]&&(f[a.camelCase(c)]=e[c]);else for(c in e)"string"==typeof e[c]&&(f[c]=e[c]);return f}function d(b,c){var d,e,g={};for(d in c)e=c[d],b[d]!==e&&(f[d]||(a.fx.step[d]||!isNaN(parseFloat(e)))&&(g[d]=e));return g}var e=["add","remove","toggle"],f={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(b,d){a.fx.step[d]=function(a){("none"!==a.end&&!a.setAttr||1===a.pos&&!a.setAttr)&&(c.style(a.elem,d,a.end),a.setAttr=!0)}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a.effects.animateClass=function(c,f,g,h){var i=a.speed(f,g,h);return this.queue(function(){var f,g=a(this),h=g.attr("class")||"",j=i.children?g.find("*").addBack():g;j=j.map(function(){var c=a(this);return{el:c,start:b(this)}}),f=function(){a.each(e,function(a,b){c[b]&&g[b+"Class"](c[b])})},f(),j=j.map(function(){return this.end=b(this.el[0]),this.diff=d(this.start,this.end),this}),g.attr("class",h),j=j.map(function(){var b=this,c=a.Deferred(),d=a.extend({},i,{queue:!1,complete:function(){c.resolve(b)}});return this.el.animate(this.diff,d),c.promise()}),a.when.apply(a,j.get()).done(function(){f(),a.each(arguments,function(){var b=this.el;a.each(this.diff,function(a){b.css(a,"")})}),i.complete.call(g[0])})})},a.fn.extend({addClass:function(b){return function(c,d,e,f){return d?a.effects.animateClass.call(this,{add:c},d,e,f):b.apply(this,arguments)}}(a.fn.addClass),removeClass:function(b){return function(c,d,e,f){return arguments.length>1?a.effects.animateClass.call(this,{remove:c},d,e,f):b.apply(this,arguments)}}(a.fn.removeClass),toggleClass:function(b){return function(c,d,e,f,g){return"boolean"==typeof d||void 0===d?e?a.effects.animateClass.call(this,d?{add:c}:{remove:c},e,f,g):b.apply(this,arguments):a.effects.animateClass.call(this,{toggle:c},d,e,f)}}(a.fn.toggleClass),switchClass:function(b,c,d,e,f){return a.effects.animateClass.call(this,{add:c,remove:b},d,e,f)}})}(),function(){function c(b,c,d,e){return a.isPlainObject(b)&&(c=b,b=b.effect),b={effect:b},null==c&&(c={}),a.isFunction(c)&&(e=c,d=null,c={}),("number"==typeof c||a.fx.speeds[c])&&(e=d,d=c,c={}),a.isFunction(d)&&(e=d,d=null),c&&a.extend(b,c),d=d||c.duration,b.duration=a.fx.off?0:"number"==typeof d?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,b.complete=e||c.complete,b}function d(b){return!b||"number"==typeof b||a.fx.speeds[b]?!0:"string"!=typeof b||a.effects.effect[b]?a.isFunction(b)?!0:"object"!=typeof b||b.effect?!1:!0:!0}a.extend(a.effects,{version:"1.11.4",save:function(a,c){for(var d=0;d<c.length;d++)null!==c[d]&&a.data(b+c[d],a[0].style[c[d]])},restore:function(a,c){var d,e;for(e=0;e<c.length;e++)null!==c[e]&&(d=a.data(b+c[e]),void 0===d&&(d=""),a.css(c[e],d))},setMode:function(a,b){return"toggle"===b&&(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),"float":b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:b.width(),height:b.height()},f=document.activeElement;try{f.id}catch(g){f=document.body}return b.wrap(d),(b[0]===f||a.contains(b[0],f))&&a(f).focus(),d=b.parent(),"static"===b.css("position")?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),b.css(e),d.css(c).show()},removeWrapper:function(b){var c=document.activeElement;return b.parent().is(".ui-effects-wrapper")&&(b.parent().replaceWith(b),(b[0]===c||a.contains(b[0],c))&&a(c).focus()),b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(){function b(b){function c(){a.isFunction(f)&&f.call(e[0]),a.isFunction(b)&&b()}var e=a(this),f=d.complete,h=d.mode;(e.is(":hidden")?"hide"===h:"show"===h)?(e[h](),c()):g.call(e[0],d,c)}var d=c.apply(this,arguments),e=d.mode,f=d.queue,g=a.effects.effect[d.effect];return a.fx.off||!g?e?this[e](d.duration,d.complete):this.each(function(){d.complete&&d.complete.call(this)}):f===!1?this.each(b):this.queue(f||"fx",b)},show:function(a){return function(b){if(d(b))return a.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}}(a.fn.show),hide:function(a){return function(b){if(d(b))return a.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}}(a.fn.hide),toggle:function(a){return function(b){if(d(b)||"boolean"==typeof b)return a.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}}(a.fn.toggle),cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}})}(),function(){var b={};a.each(["Quad","Cubic","Quart","Quint","Expo"],function(a,c){b[c]=function(b){return Math.pow(b,a+2)}}),a.extend(b,{Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return 0===a||1===a?a:-Math.pow(2,8*(a-1))*Math.sin((80*(a-1)-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){for(var b,c=4;a<((b=Math.pow(2,--c))-1)/11;);return 1/Math.pow(4,3-c)-7.5625*Math.pow((3*b-2)/22-a,2)}}),a.each(b,function(b,c){a.easing["easeIn"+b]=c,a.easing["easeOut"+b]=function(a){return 1-c(1-a)},a.easing["easeInOut"+b]=function(a){return.5>a?c(2*a)/2:1-c(-2*a+2)/2}})}(),a.effects});
\ No newline at end of file
+return a.effects={effect:{}},function(a,b){function c(a,b,c){var d=l[b.type]||{};return null==a?c||!b.def?null:b.def:(a=d.floor?~~a:parseFloat(a),isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max<a?d.max:a)}function d(b){var c=j(),d=c._rgba=[];return b=b.toLowerCase(),o(i,function(a,e){var f,g=e.re.exec(b),h=g&&e.parse(g),i=e.space||"rgba";if(h)return f=c[i](h),c[k[i].cache]=f[k[i].cache],d=c._rgba=f._rgba,!1}),d.length?("0,0,0,0"===d.join()&&a.extend(d,f.transparent),c):f[b]}function e(a,b,c){return c=(c+1)%1,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(2/3-c)*6:a}var f,g="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",h=/^([\-+])=\s*(\d+\.?\d*)/,i=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],j=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b,c,d,e)},k={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},l={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},m=j.support={},n=a("<p>")[0],o=a.each;n.style.cssText="background-color:rgba(1,1,1,.5)",m.rgba=n.style.backgroundColor.indexOf("rgba")>-1,o(k,function(a,b){b.cache="_"+a,b.props.alpha={idx:3,type:"percent",def:1}}),j.fn=a.extend(j.prototype,{parse:function(e,g,h,i){if(e===b)return this._rgba=[null,null,null,null],this;(e.jquery||e.nodeType)&&(e=a(e).css(g),g=b);var l=this,m=a.type(e),n=this._rgba=[];return g!==b&&(e=[e,g,h,i],m="array"),"string"===m?this.parse(d(e)||f._default):"array"===m?(o(k.rgba.props,function(a,b){n[b.idx]=c(e[b.idx],b)}),this):"object"===m?(e instanceof j?o(k,function(a,b){e[b.cache]&&(l[b.cache]=e[b.cache].slice())}):o(k,function(b,d){var f=d.cache;o(d.props,function(a,b){if(!l[f]&&d.to){if("alpha"===a||null==e[a])return;l[f]=d.to(l._rgba)}l[f][b.idx]=c(e[a],b,!0)}),l[f]&&a.inArray(null,l[f].slice(0,3))<0&&(l[f][3]=1,d.from&&(l._rgba=d.from(l[f])))}),this):void 0},is:function(a){var b=j(a),c=!0,d=this;return o(k,function(a,e){var f,g=b[e.cache];return g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],o(e.props,function(a,b){if(null!=g[b.idx])return c=g[b.idx]===f[b.idx]})),c}),c},_space:function(){var a=[],b=this;return o(k,function(c,d){b[d.cache]&&a.push(c)}),a.pop()},transition:function(a,b){var d=j(a),e=d._space(),f=k[e],g=0===this.alpha()?j("transparent"):this,h=g[f.cache]||f.to(g._rgba),i=h.slice();return d=d[f.cache],o(f.props,function(a,e){var f=e.idx,g=h[f],j=d[f],k=l[e.type]||{};null!==j&&(null===g?i[f]=j:(k.mod&&(j-g>k.mod/2?g+=k.mod:g-j>k.mod/2&&(g-=k.mod)),i[f]=c((j-g)*b+g,e)))}),this[e](i)},blend:function(b){if(1===this._rgba[3])return this;var c=this._rgba.slice(),d=c.pop(),e=j(b)._rgba;return j(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b="rgba(",c=a.map(this._rgba,function(a,b){return null==a?b>2?1:0:a});return 1===c[3]&&(c.pop(),b="rgb("),b+c.join()+")"},toHslaString:function(){var b="hsla(",c=a.map(this.hsla(),function(a,b){return null==a&&(a=b>2?1:0),b&&b<3&&(a=Math.round(100*a)+"%"),a});return 1===c[3]&&(c.pop(),b="hsl("),b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();return b&&c.push(~~(255*d)),"#"+a.map(c,function(a){return a=(a||0).toString(16),1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),j.fn.parse.prototype=j.fn,k.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b,c,d=a[0]/255,e=a[1]/255,f=a[2]/255,g=a[3],h=Math.max(d,e,f),i=Math.min(d,e,f),j=h-i,k=h+i,l=.5*k;return b=i===h?0:d===h?60*(e-f)/j+360:e===h?60*(f-d)/j+120:60*(d-e)/j+240,c=0===j?0:l<=.5?j/k:j/(2-k),[Math.round(b)%360,c,l,null==g?1:g]},k.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],f=a[3],g=d<=.5?d*(1+c):d+c-d*c,h=2*d-g;return[Math.round(255*e(h,g,b+1/3)),Math.round(255*e(h,g,b)),Math.round(255*e(h,g,b-1/3)),f]},o(k,function(d,e){var f=e.props,g=e.cache,i=e.to,k=e.from;j.fn[d]=function(d){if(i&&!this[g]&&(this[g]=i(this._rgba)),d===b)return this[g].slice();var e,h=a.type(d),l="array"===h||"object"===h?d:arguments,m=this[g].slice();return o(f,function(a,b){var d=l["object"===h?a:b.idx];null==d&&(d=m[b.idx]),m[b.idx]=c(d,b)}),k?(e=j(k(m)),e[g]=m,e):j(m)},o(f,function(b,c){j.fn[b]||(j.fn[b]=function(e){var f,g=a.type(e),i="alpha"===b?this._hsla?"hsla":"rgba":d,j=this[i](),k=j[c.idx];return"undefined"===g?k:("function"===g&&(e=e.call(this,k),g=a.type(e)),null==e&&c.empty?this:("string"===g&&(f=h.exec(e),f&&(e=k+parseFloat(f[2])*("+"===f[1]?1:-1))),j[c.idx]=e,this[i](j)))})})}),j.hook=function(b){var c=b.split(" ");o(c,function(b,c){a.cssHooks[c]={set:function(b,e){var f,g,h="";if("transparent"!==e&&("string"!==a.type(e)||(f=d(e)))){if(e=j(f||e),!m.rgba&&1!==e._rgba[3]){for(g="backgroundColor"===c?b.parentNode:b;(""===h||"transparent"===h)&&g&&g.style;)try{h=a.css(g,"backgroundColor"),g=g.parentNode}catch(i){}e=e.blend(h&&"transparent"!==h?h:"_default")}e=e.toRgbaString()}try{b.style[c]=e}catch(i){}}},a.fx.step[c]=function(b){b.colorInit||(b.start=j(b.elem,c),b.end=j(b.end),b.colorInit=!0),a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})},j.hook(g),a.cssHooks.borderColor={expand:function(a){var b={};return o(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a}),b}},f=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(c),function(){function b(b){var c,d,e=b.ownerDocument.defaultView?b.ownerDocument.defaultView.getComputedStyle(b,null):b.currentStyle,f={};if(e&&e.length&&e[0]&&e[e[0]])for(d=e.length;d--;)c=e[d],"string"==typeof e[c]&&(f[a.camelCase(c)]=e[c]);else for(c in e)"string"==typeof e[c]&&(f[c]=e[c]);return f}function d(b,c){var d,e,g={};for(d in c)e=c[d],b[d]!==e&&(f[d]||!a.fx.step[d]&&isNaN(parseFloat(e))||(g[d]=e));return g}var e=["add","remove","toggle"],f={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(b,d){a.fx.step[d]=function(a){("none"!==a.end&&!a.setAttr||1===a.pos&&!a.setAttr)&&(c.style(a.elem,d,a.end),a.setAttr=!0)}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a.effects.animateClass=function(c,f,g,h){var i=a.speed(f,g,h);return this.queue(function(){var f,g=a(this),h=g.attr("class")||"",j=i.children?g.find("*").addBack():g;j=j.map(function(){var c=a(this);return{el:c,start:b(this)}}),f=function(){a.each(e,function(a,b){c[b]&&g[b+"Class"](c[b])})},f(),j=j.map(function(){return this.end=b(this.el[0]),this.diff=d(this.start,this.end),this}),g.attr("class",h),j=j.map(function(){var b=this,c=a.Deferred(),d=a.extend({},i,{queue:!1,complete:function(){c.resolve(b)}});return this.el.animate(this.diff,d),c.promise()}),a.when.apply(a,j.get()).done(function(){f(),a.each(arguments,function(){var b=this.el;a.each(this.diff,function(a){b.css(a,"")})}),i.complete.call(g[0])})})},a.fn.extend({addClass:function(b){return function(c,d,e,f){return d?a.effects.animateClass.call(this,{add:c},d,e,f):b.apply(this,arguments)}}(a.fn.addClass),removeClass:function(b){return function(c,d,e,f){return arguments.length>1?a.effects.animateClass.call(this,{remove:c},d,e,f):b.apply(this,arguments)}}(a.fn.removeClass),toggleClass:function(b){return function(c,d,e,f,g){return"boolean"==typeof d||void 0===d?e?a.effects.animateClass.call(this,d?{add:c}:{remove:c},e,f,g):b.apply(this,arguments):a.effects.animateClass.call(this,{toggle:c},d,e,f)}}(a.fn.toggleClass),switchClass:function(b,c,d,e,f){return a.effects.animateClass.call(this,{add:c,remove:b},d,e,f)}})}(),function(){function c(b,c,d,e){return a.isPlainObject(b)&&(c=b,b=b.effect),b={effect:b},null==c&&(c={}),a.isFunction(c)&&(e=c,d=null,c={}),("number"==typeof c||a.fx.speeds[c])&&(e=d,d=c,c={}),a.isFunction(d)&&(e=d,d=null),c&&a.extend(b,c),d=d||c.duration,b.duration=a.fx.off?0:"number"==typeof d?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,b.complete=e||c.complete,b}function d(b){return!(b&&"number"!=typeof b&&!a.fx.speeds[b])||("string"==typeof b&&!a.effects.effect[b]||(!!a.isFunction(b)||"object"==typeof b&&!b.effect))}a.extend(a.effects,{version:"1.11.4",save:function(a,c){for(var d=0;d<c.length;d++)null!==c[d]&&a.data(b+c[d],a[0].style[c[d]])},restore:function(a,c){var d,e;for(e=0;e<c.length;e++)null!==c[e]&&(d=a.data(b+c[e]),void 0===d&&(d=""),a.css(c[e],d))},setMode:function(a,b){return"toggle"===b&&(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),"float":b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:b.width(),height:b.height()},f=document.activeElement;try{f.id}catch(g){f=document.body}return b.wrap(d),(b[0]===f||a.contains(b[0],f))&&a(f).focus(),d=b.parent(),"static"===b.css("position")?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),b.css(e),d.css(c).show()},removeWrapper:function(b){var c=document.activeElement;return b.parent().is(".ui-effects-wrapper")&&(b.parent().replaceWith(b),(b[0]===c||a.contains(b[0],c))&&a(c).focus()),b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(){function b(b){function c(){a.isFunction(f)&&f.call(e[0]),a.isFunction(b)&&b()}var e=a(this),f=d.complete,h=d.mode;(e.is(":hidden")?"hide"===h:"show"===h)?(e[h](),c()):g.call(e[0],d,c)}var d=c.apply(this,arguments),e=d.mode,f=d.queue,g=a.effects.effect[d.effect];return a.fx.off||!g?e?this[e](d.duration,d.complete):this.each(function(){d.complete&&d.complete.call(this)}):f===!1?this.each(b):this.queue(f||"fx",b)},show:function(a){return function(b){if(d(b))return a.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}}(a.fn.show),hide:function(a){return function(b){if(d(b))return a.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}}(a.fn.hide),toggle:function(a){return function(b){if(d(b)||"boolean"==typeof b)return a.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}}(a.fn.toggle),cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}})}(),function(){var b={};a.each(["Quad","Cubic","Quart","Quint","Expo"],function(a,c){b[c]=function(b){return Math.pow(b,a+2)}}),a.extend(b,{Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return 0===a||1===a?a:-Math.pow(2,8*(a-1))*Math.sin((80*(a-1)-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){for(var b,c=4;a<((b=Math.pow(2,--c))-1)/11;);return 1/Math.pow(4,3-c)-7.5625*Math.pow((3*b-2)/22-a,2)}}),a.each(b,function(b,c){a.easing["easeIn"+b]=c,a.easing["easeOut"+b]=function(a){return 1-c(1-a)},a.easing["easeInOut"+b]=function(a){return a<.5?c(2*a)/2:1-c(a*-2+2)/2}})}(),a.effects});
\ No newline at end of file
index a63df1729992558fc8d367f54a510e15d40b70fb..a8a24f930e0df79128a7189f359568d9b7a2f2b0 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/menu/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position"],a):a(jQuery)}(function(a){return a.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(a){a.preventDefault()},"click .ui-menu-item":function(b){var c=a(b.target);!this.mouseHandled&&c.not(".ui-state-disabled").length&&(this.select(b),b.isPropagationStopped()||(this.mouseHandled=!0),c.has(".ui-menu").length?this.expand(b):!this.element.is(":focus")&&a(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(b){if(!this.previousFilter){var c=a(b.currentTarget);c.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(b,c)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,b){var c=this.active||this.element.find(this.options.items).eq(0);b||this.focus(a,c)},blur:function(b){this._delay(function(){a.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(b)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(a){this._closeOnDocumentClick(a)&&this.collapseAll(a),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var b=a(this);b.data("ui-menu-submenu-carat")&&b.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(b){var c,d,e,f,g=!0;switch(b.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(b);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(b);break;case a.ui.keyCode.HOME:this._move("first","first",b);break;case a.ui.keyCode.END:this._move("last","last",b);break;case a.ui.keyCode.UP:this.previous(b);break;case a.ui.keyCode.DOWN:this.next(b);break;case a.ui.keyCode.LEFT:this.collapse(b);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(b);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(b);break;case a.ui.keyCode.ESCAPE:this.collapse(b);break;default:g=!1,d=this.previousFilter||"",e=String.fromCharCode(b.keyCode),f=!1,clearTimeout(this.filterTimer),e===d?f=!0:e=d+e,c=this._filterMenuItems(e),c=f&&-1!==c.index(this.active.next())?this.active.nextAll(".ui-menu-item"):c,c.length||(e=String.fromCharCode(b.keyCode),c=this._filterMenuItems(e)),c.length?(this.focus(b,c),this.previousFilter=e,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}g&&b.preventDefault()},_activate:function(a){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(a):this.select(a))},refresh:function(){var b,c,d=this,e=this.options.icons.submenu,f=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),f.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var b=a(this),c=b.parent(),d=a("<span>").addClass("ui-menu-icon ui-icon "+e).data("ui-menu-submenu-carat",!0);c.attr("aria-haspopup","true").prepend(d),b.attr("aria-labelledby",c.attr("id"))}),b=f.add(this.element),c=b.find(this.options.items),c.not(".ui-menu-item").each(function(){var b=a(this);d._isDivider(b)&&b.addClass("ui-widget-content ui-menu-divider")}),c.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),c.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!a.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(a,b){"icons"===a&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(b.submenu),"disabled"===a&&this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b),this._super(a,b)},focus:function(a,b){var c,d;this.blur(a,a&&"focus"===a.type),this._scrollIntoView(b),this.active=b.first(),d=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",d.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),a&&"keydown"===a.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),c=b.children(".ui-menu"),c.length&&a&&/^mouse/.test(a.type)&&this._startOpening(c),this.activeMenu=b.parent(),this._trigger("focus",a,{item:b})},_scrollIntoView:function(b){var c,d,e,f,g,h;this._hasScroll()&&(c=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||0,d=parseFloat(a.css(this.activeMenu[0],"paddingTop"))||0,e=b.offset().top-this.activeMenu.offset().top-c-d,f=this.activeMenu.scrollTop(),g=this.activeMenu.height(),h=b.outerHeight(),0>e?this.activeMenu.scrollTop(f+e):e+h>g&&this.activeMenu.scrollTop(f+e-g+h))},blur:function(a,b){b||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",a,{item:this.active}))},_startOpening:function(a){clearTimeout(this.timer),"true"===a.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(a)},this.delay))},_open:function(b){var c=a.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(b.parents(".ui-menu")).hide().attr("aria-hidden","true"),b.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(c)},collapseAll:function(b,c){clearTimeout(this.timer),this.timer=this._delay(function(){var d=c?this.element:a(b&&b.target).closest(this.element.find(".ui-menu"));d.length||(d=this.element),this._close(d),this.blur(b),this.activeMenu=d},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element),a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(b){return!a(b.target).closest(".ui-menu").length},_isDivider:function(a){return!/[^\-\u2014\u2013\s]/.test(a.text())},collapse:function(a){var b=this.active&&this.active.parent().closest(".ui-menu-item",this.element);b&&b.length&&(this._close(),this.focus(a,b))},expand:function(a){var b=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();b&&b.length&&(this._open(b.parent()),this._delay(function(){this.focus(a,b)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(a,b,c){var d;this.active&&(d="first"===a||"last"===a?this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[a+"All"](".ui-menu-item").eq(0)),d&&d.length&&this.active||(d=this.activeMenu.find(this.options.items)[b]()),this.focus(c,d)},nextPage:function(b){var c,d,e;return this.active?void(this.isLastItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return c=a(this),c.offset().top-d-e<0}),this.focus(b,c)):this.focus(b,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(b)},previousPage:function(b){var c,d,e;return this.active?void(this.isFirstItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return c=a(this),c.offset().top-d+e>0}),this.focus(b,c)):this.focus(b,this.activeMenu.find(this.options.items).first()))):void this.next(b)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(b){this.active=this.active||a(b.target).closest(".ui-menu-item");var c={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(b,!0),this._trigger("select",b,c)},_filterMenuItems:function(b){var c=b.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),d=new RegExp("^"+c,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return d.test(a.trim(a(this).text()))})}})});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position"],a):a(jQuery)}(function(a){return a.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(a){a.preventDefault()},"click .ui-menu-item":function(b){var c=a(b.target);!this.mouseHandled&&c.not(".ui-state-disabled").length&&(this.select(b),b.isPropagationStopped()||(this.mouseHandled=!0),c.has(".ui-menu").length?this.expand(b):!this.element.is(":focus")&&a(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(b){if(!this.previousFilter){var c=a(b.currentTarget);c.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(b,c)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,b){var c=this.active||this.element.find(this.options.items).eq(0);b||this.focus(a,c)},blur:function(b){this._delay(function(){a.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(b)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(a){this._closeOnDocumentClick(a)&&this.collapseAll(a),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var b=a(this);b.data("ui-menu-submenu-carat")&&b.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(b){var c,d,e,f,g=!0;switch(b.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(b);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(b);break;case a.ui.keyCode.HOME:this._move("first","first",b);break;case a.ui.keyCode.END:this._move("last","last",b);break;case a.ui.keyCode.UP:this.previous(b);break;case a.ui.keyCode.DOWN:this.next(b);break;case a.ui.keyCode.LEFT:this.collapse(b);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(b);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(b);break;case a.ui.keyCode.ESCAPE:this.collapse(b);break;default:g=!1,d=this.previousFilter||"",e=String.fromCharCode(b.keyCode),f=!1,clearTimeout(this.filterTimer),e===d?f=!0:e=d+e,c=this._filterMenuItems(e),c=f&&c.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):c,c.length||(e=String.fromCharCode(b.keyCode),c=this._filterMenuItems(e)),c.length?(this.focus(b,c),this.previousFilter=e,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}g&&b.preventDefault()},_activate:function(a){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(a):this.select(a))},refresh:function(){var b,c,d=this,e=this.options.icons.submenu,f=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),f.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var b=a(this),c=b.parent(),d=a("<span>").addClass("ui-menu-icon ui-icon "+e).data("ui-menu-submenu-carat",!0);c.attr("aria-haspopup","true").prepend(d),b.attr("aria-labelledby",c.attr("id"))}),b=f.add(this.element),c=b.find(this.options.items),c.not(".ui-menu-item").each(function(){var b=a(this);d._isDivider(b)&&b.addClass("ui-widget-content ui-menu-divider")}),c.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),c.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!a.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(a,b){"icons"===a&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(b.submenu),"disabled"===a&&this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b),this._super(a,b)},focus:function(a,b){var c,d;this.blur(a,a&&"focus"===a.type),this._scrollIntoView(b),this.active=b.first(),d=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",d.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),a&&"keydown"===a.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),c=b.children(".ui-menu"),c.length&&a&&/^mouse/.test(a.type)&&this._startOpening(c),this.activeMenu=b.parent(),this._trigger("focus",a,{item:b})},_scrollIntoView:function(b){var c,d,e,f,g,h;this._hasScroll()&&(c=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||0,d=parseFloat(a.css(this.activeMenu[0],"paddingTop"))||0,e=b.offset().top-this.activeMenu.offset().top-c-d,f=this.activeMenu.scrollTop(),g=this.activeMenu.height(),h=b.outerHeight(),e<0?this.activeMenu.scrollTop(f+e):e+h>g&&this.activeMenu.scrollTop(f+e-g+h))},blur:function(a,b){b||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",a,{item:this.active}))},_startOpening:function(a){clearTimeout(this.timer),"true"===a.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(a)},this.delay))},_open:function(b){var c=a.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(b.parents(".ui-menu")).hide().attr("aria-hidden","true"),b.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(c)},collapseAll:function(b,c){clearTimeout(this.timer),this.timer=this._delay(function(){var d=c?this.element:a(b&&b.target).closest(this.element.find(".ui-menu"));d.length||(d=this.element),this._close(d),this.blur(b),this.activeMenu=d},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element),a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(b){return!a(b.target).closest(".ui-menu").length},_isDivider:function(a){return!/[^\-\u2014\u2013\s]/.test(a.text())},collapse:function(a){var b=this.active&&this.active.parent().closest(".ui-menu-item",this.element);b&&b.length&&(this._close(),this.focus(a,b))},expand:function(a){var b=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();b&&b.length&&(this._open(b.parent()),this._delay(function(){this.focus(a,b)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(a,b,c){var d;this.active&&(d="first"===a||"last"===a?this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[a+"All"](".ui-menu-item").eq(0)),d&&d.length&&this.active||(d=this.activeMenu.find(this.options.items)[b]()),this.focus(c,d)},nextPage:function(b){var c,d,e;return this.active?void(this.isLastItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return c=a(this),c.offset().top-d-e<0}),this.focus(b,c)):this.focus(b,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(b)},previousPage:function(b){var c,d,e;return this.active?void(this.isFirstItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return c=a(this),c.offset().top-d+e>0}),this.focus(b,c)):this.focus(b,this.activeMenu.find(this.options.items).first()))):void this.next(b)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(b){this.active=this.active||a(b.target).closest(".ui-menu-item");var c={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(b,!0),this._trigger("select",b,c)},_filterMenuItems:function(b){var c=b.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),d=new RegExp("^"+c,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return d.test(a.trim(a(this).text()))})}})});
\ No newline at end of file
index f8f5331de096a58dce38cef9c0599ead77fc796b..140e4b03b6032786032dfa0c3ed6477d18ac277d 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/mouse/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./widget"],a):a(jQuery)}(function(a){var b=!1;return a(document).mouseup(function(){b=!1}),a.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){return!0===a.data(c.target,b.widgetName+".preventClickEvent")?(a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(c){if(!b){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(c),this._mouseDownEvent=c;var d=this,e=1===c.which,f="string"==typeof this.options.cancel&&c.target.nodeName?a(c.target).closest(this.options.cancel).length:!1;return e&&!f&&this._mouseCapture(c)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(c)&&this._mouseDelayMet(c)&&(this._mouseStarted=this._mouseStart(c)!==!1,!this._mouseStarted)?(c.preventDefault(),!0):(!0===a.data(c.target,this.widgetName+".preventClickEvent")&&a.removeData(c.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),c.preventDefault(),b=!0,!0)):!0}},_mouseMove:function(b){if(this._mouseMoved){if(a.ui.ie&&(!document.documentMode||document.documentMode<9)&&!b.button)return this._mouseUp(b);if(!b.which)return this._mouseUp(b)}return(b.which||b.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted)},_mouseUp:function(c){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,c.target===this._mouseDownEvent.target&&a.data(c.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(c)),b=!1,!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./widget"],a):a(jQuery)}(function(a){var b=!1;return a(document).mouseup(function(){b=!1}),a.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(c){if(!b){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(c),this._mouseDownEvent=c;var d=this,e=1===c.which,f=!("string"!=typeof this.options.cancel||!c.target.nodeName)&&a(c.target).closest(this.options.cancel).length;return!(e&&!f&&this._mouseCapture(c))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(c)&&this._mouseDelayMet(c)&&(this._mouseStarted=this._mouseStart(c)!==!1,!this._mouseStarted)?(c.preventDefault(),!0):(!0===a.data(c.target,this.widgetName+".preventClickEvent")&&a.removeData(c.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),c.preventDefault(),b=!0,!0))}},_mouseMove:function(b){if(this._mouseMoved){if(a.ui.ie&&(!document.documentMode||document.documentMode<9)&&!b.button)return this._mouseUp(b);if(!b.which)return this._mouseUp(b)}return(b.which||b.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted)},_mouseUp:function(c){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,c.target===this._mouseDownEvent.target&&a.data(c.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(c)),b=!1,!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});
\ No newline at end of file
index bb180bc298a58abfe116c1a3d71ac51c539c24bf..8cf2dceafda40aa3a05bff4ac5ef425a9d6dea58 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/position/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){return function(){function b(a,b,c){return[parseFloat(a[0])*(n.test(a[0])?b/100:1),parseFloat(a[1])*(n.test(a[1])?c/100:1)]}function c(b,c){return parseInt(a.css(b,c),10)||0}function d(b){var c=b[0];return 9===c.nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:a.isWindow(c)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:c.preventDefault?{width:0,height:0,offset:{top:c.pageY,left:c.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()}}a.ui=a.ui||{};var e,f,g=Math.max,h=Math.abs,i=Math.round,j=/left|center|right/,k=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,m=/^\w+/,n=/%$/,o=a.fn.position;a.position={scrollbarWidth:function(){if(void 0!==e)return e;var b,c,d=a("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),f=d.children()[0];return a("body").append(d),b=f.offsetWidth,d.css("overflow","scroll"),c=f.offsetWidth,b===c&&(c=d[0].clientWidth),d.remove(),e=b-c},getScrollInfo:function(b){var c=b.isWindow||b.isDocument?"":b.element.css("overflow-x"),d=b.isWindow||b.isDocument?"":b.element.css("overflow-y"),e="scroll"===c||"auto"===c&&b.width<b.element[0].scrollWidth,f="scroll"===d||"auto"===d&&b.height<b.element[0].scrollHeight;return{width:f?a.position.scrollbarWidth():0,height:e?a.position.scrollbarWidth():0}},getWithinInfo:function(b){var c=a(b||window),d=a.isWindow(c[0]),e=!!c[0]&&9===c[0].nodeType;return{element:c,isWindow:d,isDocument:e,offset:c.offset()||{left:0,top:0},scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:d||e?c.width():c.outerWidth(),height:d||e?c.height():c.outerHeight()}}},a.fn.position=function(e){if(!e||!e.of)return o.apply(this,arguments);e=a.extend({},e);var n,p,q,r,s,t,u=a(e.of),v=a.position.getWithinInfo(e.within),w=a.position.getScrollInfo(v),x=(e.collision||"flip").split(" "),y={};return t=d(u),u[0].preventDefault&&(e.at="left top"),p=t.width,q=t.height,r=t.offset,s=a.extend({},r),a.each(["my","at"],function(){var a,b,c=(e[this]||"").split(" ");1===c.length&&(c=j.test(c[0])?c.concat(["center"]):k.test(c[0])?["center"].concat(c):["center","center"]),c[0]=j.test(c[0])?c[0]:"center",c[1]=k.test(c[1])?c[1]:"center",a=l.exec(c[0]),b=l.exec(c[1]),y[this]=[a?a[0]:0,b?b[0]:0],e[this]=[m.exec(c[0])[0],m.exec(c[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?s.left+=p:"center"===e.at[0]&&(s.left+=p/2),"bottom"===e.at[1]?s.top+=q:"center"===e.at[1]&&(s.top+=q/2),n=b(y.at,p,q),s.left+=n[0],s.top+=n[1],this.each(function(){var d,j,k=a(this),l=k.outerWidth(),m=k.outerHeight(),o=c(this,"marginLeft"),t=c(this,"marginTop"),z=l+o+c(this,"marginRight")+w.width,A=m+t+c(this,"marginBottom")+w.height,B=a.extend({},s),C=b(y.my,k.outerWidth(),k.outerHeight());"right"===e.my[0]?B.left-=l:"center"===e.my[0]&&(B.left-=l/2),"bottom"===e.my[1]?B.top-=m:"center"===e.my[1]&&(B.top-=m/2),B.left+=C[0],B.top+=C[1],f||(B.left=i(B.left),B.top=i(B.top)),d={marginLeft:o,marginTop:t},a.each(["left","top"],function(b,c){a.ui.position[x[b]]&&a.ui.position[x[b]][c](B,{targetWidth:p,targetHeight:q,elemWidth:l,elemHeight:m,collisionPosition:d,collisionWidth:z,collisionHeight:A,offset:[n[0]+C[0],n[1]+C[1]],my:e.my,at:e.at,within:v,elem:k})}),e.using&&(j=function(a){var b=r.left-B.left,c=b+p-l,d=r.top-B.top,f=d+q-m,i={target:{element:u,left:r.left,top:r.top,width:p,height:q},element:{element:k,left:B.left,top:B.top,width:l,height:m},horizontal:0>c?"left":b>0?"right":"center",vertical:0>f?"top":d>0?"bottom":"middle"};l>p&&h(b+c)<p&&(i.horizontal="center"),m>q&&h(d+f)<q&&(i.vertical="middle"),g(h(b),h(c))>g(h(d),h(f))?i.important="horizontal":i.important="vertical",e.using.call(this,a,i)}),k.offset(a.extend(B,{using:j}))})},a.ui.position={fit:{left:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollLeft:d.offset.left,f=d.width,h=a.left-b.collisionPosition.marginLeft,i=e-h,j=h+b.collisionWidth-f-e;b.collisionWidth>f?i>0&&0>=j?(c=a.left+i+b.collisionWidth-f-e,a.left+=i-c):j>0&&0>=i?a.left=e:i>j?a.left=e+f-b.collisionWidth:a.left=e:i>0?a.left+=i:j>0?a.left-=j:a.left=g(a.left-h,a.left)},top:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollTop:d.offset.top,f=b.within.height,h=a.top-b.collisionPosition.marginTop,i=e-h,j=h+b.collisionHeight-f-e;b.collisionHeight>f?i>0&&0>=j?(c=a.top+i+b.collisionHeight-f-e,a.top+=i-c):j>0&&0>=i?a.top=e:i>j?a.top=e+f-b.collisionHeight:a.top=e:i>0?a.top+=i:j>0?a.top-=j:a.top=g(a.top-h,a.top)}},flip:{left:function(a,b){var c,d,e=b.within,f=e.offset.left+e.scrollLeft,g=e.width,i=e.isWindow?e.scrollLeft:e.offset.left,j=a.left-b.collisionPosition.marginLeft,k=j-i,l=j+b.collisionWidth-g-i,m="left"===b.my[0]?-b.elemWidth:"right"===b.my[0]?b.elemWidth:0,n="left"===b.at[0]?b.targetWidth:"right"===b.at[0]?-b.targetWidth:0,o=-2*b.offset[0];0>k?(c=a.left+m+n+o+b.collisionWidth-g-f,(0>c||c<h(k))&&(a.left+=m+n+o)):l>0&&(d=a.left-b.collisionPosition.marginLeft+m+n+o-i,(d>0||h(d)<l)&&(a.left+=m+n+o))},top:function(a,b){var c,d,e=b.within,f=e.offset.top+e.scrollTop,g=e.height,i=e.isWindow?e.scrollTop:e.offset.top,j=a.top-b.collisionPosition.marginTop,k=j-i,l=j+b.collisionHeight-g-i,m="top"===b.my[1],n=m?-b.elemHeight:"bottom"===b.my[1]?b.elemHeight:0,o="top"===b.at[1]?b.targetHeight:"bottom"===b.at[1]?-b.targetHeight:0,p=-2*b.offset[1];0>k?(d=a.top+n+o+p+b.collisionHeight-g-f,(0>d||d<h(k))&&(a.top+=n+o+p)):l>0&&(c=a.top-b.collisionPosition.marginTop+n+o+p-i,(c>0||h(c)<l)&&(a.top+=n+o+p))}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,arguments),a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments),a.ui.position.fit.top.apply(this,arguments)}}},function(){var b,c,d,e,g,h=document.getElementsByTagName("body")[0],i=document.createElement("div");b=document.createElement(h?"div":"body"),d={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},h&&a.extend(d,{position:"absolute",left:"-1000px",top:"-1000px"});for(g in d)b.style[g]=d[g];b.appendChild(i),c=h||document.documentElement,c.insertBefore(b,c.firstChild),i.style.cssText="position: absolute; left: 10.7432222px;",e=a(i).offset().left,f=e>10&&11>e,b.innerHTML="",c.removeChild(b)}()}(),a.ui.position});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){return function(){function b(a,b,c){return[parseFloat(a[0])*(n.test(a[0])?b/100:1),parseFloat(a[1])*(n.test(a[1])?c/100:1)]}function c(b,c){return parseInt(a.css(b,c),10)||0}function d(b){var c=b[0];return 9===c.nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:a.isWindow(c)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:c.preventDefault?{width:0,height:0,offset:{top:c.pageY,left:c.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()}}a.ui=a.ui||{};var e,f,g=Math.max,h=Math.abs,i=Math.round,j=/left|center|right/,k=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,m=/^\w+/,n=/%$/,o=a.fn.position;a.position={scrollbarWidth:function(){if(void 0!==e)return e;var b,c,d=a("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),f=d.children()[0];return a("body").append(d),b=f.offsetWidth,d.css("overflow","scroll"),c=f.offsetWidth,b===c&&(c=d[0].clientWidth),d.remove(),e=b-c},getScrollInfo:function(b){var c=b.isWindow||b.isDocument?"":b.element.css("overflow-x"),d=b.isWindow||b.isDocument?"":b.element.css("overflow-y"),e="scroll"===c||"auto"===c&&b.width<b.element[0].scrollWidth,f="scroll"===d||"auto"===d&&b.height<b.element[0].scrollHeight;return{width:f?a.position.scrollbarWidth():0,height:e?a.position.scrollbarWidth():0}},getWithinInfo:function(b){var c=a(b||window),d=a.isWindow(c[0]),e=!!c[0]&&9===c[0].nodeType;return{element:c,isWindow:d,isDocument:e,offset:c.offset()||{left:0,top:0},scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:d||e?c.width():c.outerWidth(),height:d||e?c.height():c.outerHeight()}}},a.fn.position=function(e){if(!e||!e.of)return o.apply(this,arguments);e=a.extend({},e);var n,p,q,r,s,t,u=a(e.of),v=a.position.getWithinInfo(e.within),w=a.position.getScrollInfo(v),x=(e.collision||"flip").split(" "),y={};return t=d(u),u[0].preventDefault&&(e.at="left top"),p=t.width,q=t.height,r=t.offset,s=a.extend({},r),a.each(["my","at"],function(){var a,b,c=(e[this]||"").split(" ");1===c.length&&(c=j.test(c[0])?c.concat(["center"]):k.test(c[0])?["center"].concat(c):["center","center"]),c[0]=j.test(c[0])?c[0]:"center",c[1]=k.test(c[1])?c[1]:"center",a=l.exec(c[0]),b=l.exec(c[1]),y[this]=[a?a[0]:0,b?b[0]:0],e[this]=[m.exec(c[0])[0],m.exec(c[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?s.left+=p:"center"===e.at[0]&&(s.left+=p/2),"bottom"===e.at[1]?s.top+=q:"center"===e.at[1]&&(s.top+=q/2),n=b(y.at,p,q),s.left+=n[0],s.top+=n[1],this.each(function(){var d,j,k=a(this),l=k.outerWidth(),m=k.outerHeight(),o=c(this,"marginLeft"),t=c(this,"marginTop"),z=l+o+c(this,"marginRight")+w.width,A=m+t+c(this,"marginBottom")+w.height,B=a.extend({},s),C=b(y.my,k.outerWidth(),k.outerHeight());"right"===e.my[0]?B.left-=l:"center"===e.my[0]&&(B.left-=l/2),"bottom"===e.my[1]?B.top-=m:"center"===e.my[1]&&(B.top-=m/2),B.left+=C[0],B.top+=C[1],f||(B.left=i(B.left),B.top=i(B.top)),d={marginLeft:o,marginTop:t},a.each(["left","top"],function(b,c){a.ui.position[x[b]]&&a.ui.position[x[b]][c](B,{targetWidth:p,targetHeight:q,elemWidth:l,elemHeight:m,collisionPosition:d,collisionWidth:z,collisionHeight:A,offset:[n[0]+C[0],n[1]+C[1]],my:e.my,at:e.at,within:v,elem:k})}),e.using&&(j=function(a){var b=r.left-B.left,c=b+p-l,d=r.top-B.top,f=d+q-m,i={target:{element:u,left:r.left,top:r.top,width:p,height:q},element:{element:k,left:B.left,top:B.top,width:l,height:m},horizontal:c<0?"left":b>0?"right":"center",vertical:f<0?"top":d>0?"bottom":"middle"};p<l&&h(b+c)<p&&(i.horizontal="center"),q<m&&h(d+f)<q&&(i.vertical="middle"),g(h(b),h(c))>g(h(d),h(f))?i.important="horizontal":i.important="vertical",e.using.call(this,a,i)}),k.offset(a.extend(B,{using:j}))})},a.ui.position={fit:{left:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollLeft:d.offset.left,f=d.width,h=a.left-b.collisionPosition.marginLeft,i=e-h,j=h+b.collisionWidth-f-e;b.collisionWidth>f?i>0&&j<=0?(c=a.left+i+b.collisionWidth-f-e,a.left+=i-c):j>0&&i<=0?a.left=e:i>j?a.left=e+f-b.collisionWidth:a.left=e:i>0?a.left+=i:j>0?a.left-=j:a.left=g(a.left-h,a.left)},top:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollTop:d.offset.top,f=b.within.height,h=a.top-b.collisionPosition.marginTop,i=e-h,j=h+b.collisionHeight-f-e;b.collisionHeight>f?i>0&&j<=0?(c=a.top+i+b.collisionHeight-f-e,a.top+=i-c):j>0&&i<=0?a.top=e:i>j?a.top=e+f-b.collisionHeight:a.top=e:i>0?a.top+=i:j>0?a.top-=j:a.top=g(a.top-h,a.top)}},flip:{left:function(a,b){var c,d,e=b.within,f=e.offset.left+e.scrollLeft,g=e.width,i=e.isWindow?e.scrollLeft:e.offset.left,j=a.left-b.collisionPosition.marginLeft,k=j-i,l=j+b.collisionWidth-g-i,m="left"===b.my[0]?-b.elemWidth:"right"===b.my[0]?b.elemWidth:0,n="left"===b.at[0]?b.targetWidth:"right"===b.at[0]?-b.targetWidth:0,o=-2*b.offset[0];k<0?(c=a.left+m+n+o+b.collisionWidth-g-f,(c<0||c<h(k))&&(a.left+=m+n+o)):l>0&&(d=a.left-b.collisionPosition.marginLeft+m+n+o-i,(d>0||h(d)<l)&&(a.left+=m+n+o))},top:function(a,b){var c,d,e=b.within,f=e.offset.top+e.scrollTop,g=e.height,i=e.isWindow?e.scrollTop:e.offset.top,j=a.top-b.collisionPosition.marginTop,k=j-i,l=j+b.collisionHeight-g-i,m="top"===b.my[1],n=m?-b.elemHeight:"bottom"===b.my[1]?b.elemHeight:0,o="top"===b.at[1]?b.targetHeight:"bottom"===b.at[1]?-b.targetHeight:0,p=-2*b.offset[1];k<0?(d=a.top+n+o+p+b.collisionHeight-g-f,(d<0||d<h(k))&&(a.top+=n+o+p)):l>0&&(c=a.top-b.collisionPosition.marginTop+n+o+p-i,(c>0||h(c)<l)&&(a.top+=n+o+p))}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,arguments),a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments),a.ui.position.fit.top.apply(this,arguments)}}},function(){var b,c,d,e,g,h=document.getElementsByTagName("body")[0],i=document.createElement("div");b=document.createElement(h?"div":"body"),d={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},h&&a.extend(d,{position:"absolute",left:"-1000px",top:"-1000px"});for(g in d)b.style[g]=d[g];b.appendChild(i),c=h||document.documentElement,c.insertBefore(b,c.firstChild),i.style.cssText="position: absolute; left: 10.7432222px;",e=a(i).offset().left,f=e>10&&e<11,b.innerHTML="",c.removeChild(b)}()}(),a.ui.position});
\ No newline at end of file
index 880ebf820d838f4d1595aa277123ff9091728811..9298515dfafbdc243bff1ac324e9ff47b228ba02 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/progressbar/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(a){return void 0===a?this.options.value:(this.options.value=this._constrainedValue(a),void this._refreshValue())},_constrainedValue:function(a){return void 0===a&&(a=this.options.value),this.indeterminate=a===!1,"number"!=typeof a&&(a=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,a))},_setOptions:function(a){var b=a.value;delete a.value,this._super(a),this.options.value=this._constrainedValue(b),this._refreshValue()},_setOption:function(a,b){"max"===a&&(b=Math.max(this.min,b)),"disabled"===a&&this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b),this._super(a,b)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var b=this.options.value,c=this._percentage();this.valueDiv.toggle(this.indeterminate||b>this.min).toggleClass("ui-corner-right",b===this.options.max).width(c.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=a("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":b}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==b&&(this.oldValue=b,this._trigger("change")),b===this.options.max&&this._trigger("complete")}})});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(a){return void 0===a?this.options.value:(this.options.value=this._constrainedValue(a),void this._refreshValue())},_constrainedValue:function(a){return void 0===a&&(a=this.options.value),this.indeterminate=a===!1,"number"!=typeof a&&(a=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,a))},_setOptions:function(a){var b=a.value;delete a.value,this._super(a),this.options.value=this._constrainedValue(b),this._refreshValue()},_setOption:function(a,b){"max"===a&&(b=Math.max(this.min,b)),"disabled"===a&&this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b),this._super(a,b)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var b=this.options.value,c=this._percentage();this.valueDiv.toggle(this.indeterminate||b>this.min).toggleClass("ui-corner-right",b===this.options.max).width(c.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=a("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":b}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==b&&(this.oldValue=b,this._trigger("change")),b===this.options.max&&this._trigger("complete")}})});
\ No newline at end of file
index 42c31961769dfe669753c2b3b75f3facd31dd2cf..e2165da37a5396eedfd4e670e3b5705ececb70d2 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/resizable/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.resizable",a.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(a){return parseInt(a,10)||0},_isNumber:function(a){return!isNaN(parseInt(a,10))},_hasScroll:function(b,c){if("hidden"===a(b).css("overflow"))return!1;var d=c&&"left"===c?"scrollLeft":"scrollTop",e=!1;return b[d]>0?!0:(b[d]=1,e=b[d]>0,b[d]=0,e)},_create:function(){var b,c,d,e,f,g=this,h=this.options;if(this.element.addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(a("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=h.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=a(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),b=this.handles.split(","),this.handles={},c=0;c<b.length;c++)d=a.trim(b[c]),f="ui-resizable-"+d,e=a("<div class='ui-resizable-handle "+f+"'></div>"),e.css({zIndex:h.zIndex}),"se"===d&&e.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[d]=".ui-resizable-"+d,this.element.append(e);this._renderAxis=function(b){var c,d,e,f;b=b||this.element;for(c in this.handles)this.handles[c].constructor===String?this.handles[c]=this.element.children(this.handles[c]).first().show():(this.handles[c].jquery||this.handles[c].nodeType)&&(this.handles[c]=a(this.handles[c]),this._on(this.handles[c],{mousedown:g._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(d=a(this.handles[c],this.element),f=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth(),e=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join(""),b.css(e,f),this._proportionallyResize()),this._handles=this._handles.add(this.handles[c])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){g.resizing||(this.className&&(e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),g.axis=e&&e[1]?e[1]:"se")}),h.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").mouseenter(function(){h.disabled||(a(this).removeClass("ui-resizable-autohide"),g._handles.show())}).mouseleave(function(){h.disabled||g.resizing||(a(this).addClass("ui-resizable-autohide"),g._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var b,c=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(c(this.element),b=this.element,this.originalElement.css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")}).insertAfter(b),b.remove()),this.originalElement.css("resize",this.originalResizeStyle),c(this.originalElement),this},_mouseCapture:function(b){var c,d,e=!1;for(c in this.handles)d=a(this.handles[c])[0],(d===b.target||a.contains(d,b.target))&&(e=!0);return!this.options.disabled&&e},_mouseStart:function(b){var c,d,e,f=this.options,g=this.element;return this.resizing=!0,this._renderProxy(),c=this._num(this.helper.css("left")),d=this._num(this.helper.css("top")),f.containment&&(c+=a(f.containment).scrollLeft()||0,d+=a(f.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:c,top:d},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:g.width(),height:g.height()},this.originalSize=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()},this.sizeDiff={width:g.outerWidth()-g.width(),height:g.outerHeight()-g.height()},this.originalPosition={left:c,top:d},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio="number"==typeof f.aspectRatio?f.aspectRatio:this.originalSize.width/this.originalSize.height||1,e=a(".ui-resizable-"+this.axis).css("cursor"),a("body").css("cursor","auto"===e?this.axis+"-resize":e),g.addClass("ui-resizable-resizing"),this._propagate("start",b),!0},_mouseDrag:function(b){var c,d,e=this.originalMousePosition,f=this.axis,g=b.pageX-e.left||0,h=b.pageY-e.top||0,i=this._change[f];return this._updatePrevProperties(),i?(c=i.apply(this,[b,g,h]),this._updateVirtualBoundaries(b.shiftKey),(this._aspectRatio||b.shiftKey)&&(c=this._updateRatio(c,b)),c=this._respectSize(c,b),this._updateCache(c),this._propagate("resize",b),d=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),a.isEmptyObject(d)||(this._updatePrevProperties(),this._trigger("resize",b,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(b){this.resizing=!1;var c,d,e,f,g,h,i,j=this.options,k=this;return this._helper&&(c=this._proportionallyResizeElements,d=c.length&&/textarea/i.test(c[0].nodeName),e=d&&this._hasScroll(c[0],"left")?0:k.sizeDiff.height,f=d?0:k.sizeDiff.width,g={width:k.helper.width()-f,height:k.helper.height()-e},h=parseInt(k.element.css("left"),10)+(k.position.left-k.originalPosition.left)||null,i=parseInt(k.element.css("top"),10)+(k.position.top-k.originalPosition.top)||null,j.animate||this.element.css(a.extend(g,{top:i,left:h})),k.helper.height(k.size.height),k.helper.width(k.size.width),this._helper&&!j.animate&&this._proportionallyResize()),a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var a={};return this.position.top!==this.prevPosition.top&&(a.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(a.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(a.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(a.height=this.size.height+"px"),this.helper.css(a),a},_updateVirtualBoundaries:function(a){var b,c,d,e,f,g=this.options;f={minWidth:this._isNumber(g.minWidth)?g.minWidth:0,maxWidth:this._isNumber(g.maxWidth)?g.maxWidth:1/0,minHeight:this._isNumber(g.minHeight)?g.minHeight:0,maxHeight:this._isNumber(g.maxHeight)?g.maxHeight:1/0},(this._aspectRatio||a)&&(b=f.minHeight*this.aspectRatio,d=f.minWidth/this.aspectRatio,c=f.maxHeight*this.aspectRatio,e=f.maxWidth/this.aspectRatio,b>f.minWidth&&(f.minWidth=b),d>f.minHeight&&(f.minHeight=d),c<f.maxWidth&&(f.maxWidth=c),e<f.maxHeight&&(f.maxHeight=e)),this._vBoundaries=f},_updateCache:function(a){this.offset=this.helper.offset(),this._isNumber(a.left)&&(this.position.left=a.left),this._isNumber(a.top)&&(this.position.top=a.top),this._isNumber(a.height)&&(this.size.height=a.height),this._isNumber(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var b=this.position,c=this.size,d=this.axis;return this._isNumber(a.height)?a.width=a.height*this.aspectRatio:this._isNumber(a.width)&&(a.height=a.width/this.aspectRatio),"sw"===d&&(a.left=b.left+(c.width-a.width),a.top=null),"nw"===d&&(a.top=b.top+(c.height-a.height),a.left=b.left+(c.width-a.width)),a},_respectSize:function(a){var b=this._vBoundaries,c=this.axis,d=this._isNumber(a.width)&&b.maxWidth&&b.maxWidth<a.width,e=this._isNumber(a.height)&&b.maxHeight&&b.maxHeight<a.height,f=this._isNumber(a.width)&&b.minWidth&&b.minWidth>a.width,g=this._isNumber(a.height)&&b.minHeight&&b.minHeight>a.height,h=this.originalPosition.left+this.originalSize.width,i=this.position.top+this.size.height,j=/sw|nw|w/.test(c),k=/nw|ne|n/.test(c);return f&&(a.width=b.minWidth),g&&(a.height=b.minHeight),d&&(a.width=b.maxWidth),e&&(a.height=b.maxHeight),f&&j&&(a.left=h-b.minWidth),d&&j&&(a.left=h-b.maxWidth),g&&k&&(a.top=i-b.minHeight),e&&k&&(a.top=i-b.maxHeight),a.width||a.height||a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null,a},_getPaddingPlusBorderDimensions:function(a){for(var b=0,c=[],d=[a.css("borderTopWidth"),a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")],e=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];4>b;b++)c[b]=parseInt(d[b],10)||0,c[b]+=parseInt(e[b],10)||0;return{height:c[0]+c[2],width:c[1]+c[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var a,b=0,c=this.helper||this.element;b<this._proportionallyResizeElements.length;b++)a=this._proportionallyResizeElements[b],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(a)),a.css({height:c.height()-this.outerDimensions.height||0,width:c.width()-this.outerDimensions.width||0})},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset(),this._helper?(this.helper=this.helper||a("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){var c=this.originalSize,d=this.originalPosition;return{left:d.left+b,width:c.width-b}},n:function(a,b,c){var d=this.originalSize,e=this.originalPosition;return{top:e.top+c,height:d.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),"resize"!==b&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.ui.plugin.add("resizable","animate",{stop:function(b){var c=a(this).resizable("instance"),d=c.options,e=c._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&c._hasScroll(e[0],"left")?0:c.sizeDiff.height,h=f?0:c.sizeDiff.width,i={width:c.size.width-h,height:c.size.height-g},j=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,k=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;c.element.animate(a.extend(i,k&&j?{top:k,left:j}:{}),{duration:d.animateDuration,easing:d.animateEasing,step:function(){var d={width:parseInt(c.element.css("width"),10),height:parseInt(c.element.css("height"),10),top:parseInt(c.element.css("top"),10),left:parseInt(c.element.css("left"),10)};e&&e.length&&a(e[0]).css({width:d.width,height:d.height}),c._updateCache(d),c._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(){var b,c,d,e,f,g,h,i=a(this).resizable("instance"),j=i.options,k=i.element,l=j.containment,m=l instanceof a?l.get(0):/parent/.test(l)?k.parent().get(0):l;m&&(i.containerElement=a(m),/document/.test(l)||l===document?(i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}):(b=a(m),c=[],a(["Top","Right","Left","Bottom"]).each(function(a,d){c[a]=i._num(b.css("padding"+d))}),i.containerOffset=b.offset(),i.containerPosition=b.position(),i.containerSize={height:b.innerHeight()-c[3],width:b.innerWidth()-c[1]},d=i.containerOffset,e=i.containerSize.height,f=i.containerSize.width,g=i._hasScroll(m,"left")?m.scrollWidth:f,h=i._hasScroll(m)?m.scrollHeight:e,i.parentData={element:m,left:d.left,top:d.top,width:g,height:h}))},resize:function(b){var c,d,e,f,g=a(this).resizable("instance"),h=g.options,i=g.containerOffset,j=g.position,k=g._aspectRatio||b.shiftKey,l={top:0,left:0},m=g.containerElement,n=!0;m[0]!==document&&/static/.test(m.css("position"))&&(l=i),j.left<(g._helper?i.left:0)&&(g.size.width=g.size.width+(g._helper?g.position.left-i.left:g.position.left-l.left),k&&(g.size.height=g.size.width/g.aspectRatio,n=!1),g.position.left=h.helper?i.left:0),j.top<(g._helper?i.top:0)&&(g.size.height=g.size.height+(g._helper?g.position.top-i.top:g.position.top),k&&(g.size.width=g.size.height*g.aspectRatio,n=!1),g.position.top=g._helper?i.top:0),e=g.containerElement.get(0)===g.element.parent().get(0),f=/relative|absolute/.test(g.containerElement.css("position")),e&&f?(g.offset.left=g.parentData.left+g.position.left,g.offset.top=g.parentData.top+g.position.top):(g.offset.left=g.element.offset().left,g.offset.top=g.element.offset().top),c=Math.abs(g.sizeDiff.width+(g._helper?g.offset.left-l.left:g.offset.left-i.left)),d=Math.abs(g.sizeDiff.height+(g._helper?g.offset.top-l.top:g.offset.top-i.top)),c+g.size.width>=g.parentData.width&&(g.size.width=g.parentData.width-c,k&&(g.size.height=g.size.width/g.aspectRatio,n=!1)),d+g.size.height>=g.parentData.height&&(g.size.height=g.parentData.height-d,k&&(g.size.width=g.size.height*g.aspectRatio,n=!1)),n||(g.position.left=g.prevPosition.left,g.position.top=g.prevPosition.top,g.size.width=g.prevSize.width,g.size.height=g.prevSize.height)},stop:function(){var b=a(this).resizable("instance"),c=b.options,d=b.containerOffset,e=b.containerPosition,f=b.containerElement,g=a(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width,j=g.outerHeight()-b.sizeDiff.height;b._helper&&!c.animate&&/relative/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j}),b._helper&&!c.animate&&/static/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j})}}),a.ui.plugin.add("resizable","alsoResize",{start:function(){var b=a(this).resizable("instance"),c=b.options;a(c.alsoResize).each(function(){var b=a(this);b.data("ui-resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})},resize:function(b,c){var d=a(this).resizable("instance"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0};a(e.alsoResize).each(function(){var b=a(this),d=a(this).data("ui-resizable-alsoresize"),e={},f=b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(f,function(a,b){var c=(d[b]||0)+(h[b]||0);c&&c>=0&&(e[b]=c||null)}),b.css(e)})},stop:function(){a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","ghost",{start:function(){var b=a(this).resizable("instance"),c=b.options,d=b.size;b.ghost=b.originalElement.clone(),b.ghost.css({opacity:.25,display:"block",position:"relative",height:d.height,width:d.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof c.ghost?c.ghost:""),b.ghost.appendTo(b.helper)},resize:function(){var b=a(this).resizable("instance");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=a(this).resizable("instance");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(){var b,c=a(this).resizable("instance"),d=c.options,e=c.size,f=c.originalSize,g=c.originalPosition,h=c.axis,i="number"==typeof d.grid?[d.grid,d.grid]:d.grid,j=i[0]||1,k=i[1]||1,l=Math.round((e.width-f.width)/j)*j,m=Math.round((e.height-f.height)/k)*k,n=f.width+l,o=f.height+m,p=d.maxWidth&&d.maxWidth<n,q=d.maxHeight&&d.maxHeight<o,r=d.minWidth&&d.minWidth>n,s=d.minHeight&&d.minHeight>o;d.grid=i,r&&(n+=j),s&&(o+=k),p&&(n-=j),q&&(o-=k),/^(se|s|e)$/.test(h)?(c.size.width=n,c.size.height=o):/^(ne)$/.test(h)?(c.size.width=n,c.size.height=o,c.position.top=g.top-m):/^(sw)$/.test(h)?(c.size.width=n,c.size.height=o,c.position.left=g.left-l):((0>=o-k||0>=n-j)&&(b=c._getPaddingPlusBorderDimensions(this)),o-k>0?(c.size.height=o,c.position.top=g.top-m):(o=k-b.height,c.size.height=o,c.position.top=g.top+f.height-o),n-j>0?(c.size.width=n,c.position.left=g.left-l):(n=j-b.width,c.size.width=n,c.position.left=g.left+f.width-n))}}),a.ui.resizable});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.resizable",a.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(a){return parseInt(a,10)||0},_isNumber:function(a){return!isNaN(parseInt(a,10))},_hasScroll:function(b,c){if("hidden"===a(b).css("overflow"))return!1;var d=c&&"left"===c?"scrollLeft":"scrollTop",e=!1;return b[d]>0||(b[d]=1,e=b[d]>0,b[d]=0,e)},_create:function(){var b,c,d,e,f,g=this,h=this.options;if(this.element.addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(a("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=h.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=a(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),b=this.handles.split(","),this.handles={},c=0;c<b.length;c++)d=a.trim(b[c]),f="ui-resizable-"+d,e=a("<div class='ui-resizable-handle "+f+"'></div>"),e.css({zIndex:h.zIndex}),"se"===d&&e.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[d]=".ui-resizable-"+d,this.element.append(e);this._renderAxis=function(b){var c,d,e,f;b=b||this.element;for(c in this.handles)this.handles[c].constructor===String?this.handles[c]=this.element.children(this.handles[c]).first().show():(this.handles[c].jquery||this.handles[c].nodeType)&&(this.handles[c]=a(this.handles[c]),this._on(this.handles[c],{mousedown:g._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(d=a(this.handles[c],this.element),f=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth(),e=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join(""),b.css(e,f),this._proportionallyResize()),this._handles=this._handles.add(this.handles[c])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){g.resizing||(this.className&&(e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),g.axis=e&&e[1]?e[1]:"se")}),h.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").mouseenter(function(){h.disabled||(a(this).removeClass("ui-resizable-autohide"),g._handles.show())}).mouseleave(function(){h.disabled||g.resizing||(a(this).addClass("ui-resizable-autohide"),g._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var b,c=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(c(this.element),b=this.element,this.originalElement.css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")}).insertAfter(b),b.remove()),this.originalElement.css("resize",this.originalResizeStyle),c(this.originalElement),this},_mouseCapture:function(b){var c,d,e=!1;for(c in this.handles)d=a(this.handles[c])[0],(d===b.target||a.contains(d,b.target))&&(e=!0);return!this.options.disabled&&e},_mouseStart:function(b){var c,d,e,f=this.options,g=this.element;return this.resizing=!0,this._renderProxy(),c=this._num(this.helper.css("left")),d=this._num(this.helper.css("top")),f.containment&&(c+=a(f.containment).scrollLeft()||0,d+=a(f.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:c,top:d},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:g.width(),height:g.height()},this.originalSize=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()},this.sizeDiff={width:g.outerWidth()-g.width(),height:g.outerHeight()-g.height()},this.originalPosition={left:c,top:d},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio="number"==typeof f.aspectRatio?f.aspectRatio:this.originalSize.width/this.originalSize.height||1,e=a(".ui-resizable-"+this.axis).css("cursor"),a("body").css("cursor","auto"===e?this.axis+"-resize":e),g.addClass("ui-resizable-resizing"),this._propagate("start",b),!0},_mouseDrag:function(b){var c,d,e=this.originalMousePosition,f=this.axis,g=b.pageX-e.left||0,h=b.pageY-e.top||0,i=this._change[f];return this._updatePrevProperties(),!!i&&(c=i.apply(this,[b,g,h]),this._updateVirtualBoundaries(b.shiftKey),(this._aspectRatio||b.shiftKey)&&(c=this._updateRatio(c,b)),c=this._respectSize(c,b),this._updateCache(c),this._propagate("resize",b),d=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),a.isEmptyObject(d)||(this._updatePrevProperties(),this._trigger("resize",b,this.ui()),this._applyChanges()),!1)},_mouseStop:function(b){this.resizing=!1;var c,d,e,f,g,h,i,j=this.options,k=this;return this._helper&&(c=this._proportionallyResizeElements,d=c.length&&/textarea/i.test(c[0].nodeName),e=d&&this._hasScroll(c[0],"left")?0:k.sizeDiff.height,f=d?0:k.sizeDiff.width,g={width:k.helper.width()-f,height:k.helper.height()-e},h=parseInt(k.element.css("left"),10)+(k.position.left-k.originalPosition.left)||null,i=parseInt(k.element.css("top"),10)+(k.position.top-k.originalPosition.top)||null,j.animate||this.element.css(a.extend(g,{top:i,left:h})),k.helper.height(k.size.height),k.helper.width(k.size.width),this._helper&&!j.animate&&this._proportionallyResize()),a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var a={};return this.position.top!==this.prevPosition.top&&(a.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(a.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(a.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(a.height=this.size.height+"px"),this.helper.css(a),a},_updateVirtualBoundaries:function(a){var b,c,d,e,f,g=this.options;f={minWidth:this._isNumber(g.minWidth)?g.minWidth:0,maxWidth:this._isNumber(g.maxWidth)?g.maxWidth:1/0,minHeight:this._isNumber(g.minHeight)?g.minHeight:0,maxHeight:this._isNumber(g.maxHeight)?g.maxHeight:1/0},(this._aspectRatio||a)&&(b=f.minHeight*this.aspectRatio,d=f.minWidth/this.aspectRatio,c=f.maxHeight*this.aspectRatio,e=f.maxWidth/this.aspectRatio,b>f.minWidth&&(f.minWidth=b),d>f.minHeight&&(f.minHeight=d),c<f.maxWidth&&(f.maxWidth=c),e<f.maxHeight&&(f.maxHeight=e)),this._vBoundaries=f},_updateCache:function(a){this.offset=this.helper.offset(),this._isNumber(a.left)&&(this.position.left=a.left),this._isNumber(a.top)&&(this.position.top=a.top),this._isNumber(a.height)&&(this.size.height=a.height),this._isNumber(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var b=this.position,c=this.size,d=this.axis;return this._isNumber(a.height)?a.width=a.height*this.aspectRatio:this._isNumber(a.width)&&(a.height=a.width/this.aspectRatio),"sw"===d&&(a.left=b.left+(c.width-a.width),a.top=null),"nw"===d&&(a.top=b.top+(c.height-a.height),a.left=b.left+(c.width-a.width)),a},_respectSize:function(a){var b=this._vBoundaries,c=this.axis,d=this._isNumber(a.width)&&b.maxWidth&&b.maxWidth<a.width,e=this._isNumber(a.height)&&b.maxHeight&&b.maxHeight<a.height,f=this._isNumber(a.width)&&b.minWidth&&b.minWidth>a.width,g=this._isNumber(a.height)&&b.minHeight&&b.minHeight>a.height,h=this.originalPosition.left+this.originalSize.width,i=this.position.top+this.size.height,j=/sw|nw|w/.test(c),k=/nw|ne|n/.test(c);return f&&(a.width=b.minWidth),g&&(a.height=b.minHeight),d&&(a.width=b.maxWidth),e&&(a.height=b.maxHeight),f&&j&&(a.left=h-b.minWidth),d&&j&&(a.left=h-b.maxWidth),g&&k&&(a.top=i-b.minHeight),e&&k&&(a.top=i-b.maxHeight),a.width||a.height||a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null,a},_getPaddingPlusBorderDimensions:function(a){for(var b=0,c=[],d=[a.css("borderTopWidth"),a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")],e=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];b<4;b++)c[b]=parseInt(d[b],10)||0,c[b]+=parseInt(e[b],10)||0;return{height:c[0]+c[2],width:c[1]+c[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var a,b=0,c=this.helper||this.element;b<this._proportionallyResizeElements.length;b++)a=this._proportionallyResizeElements[b],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(a)),a.css({height:c.height()-this.outerDimensions.height||0,width:c.width()-this.outerDimensions.width||0})},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset(),this._helper?(this.helper=this.helper||a("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){var c=this.originalSize,d=this.originalPosition;return{left:d.left+b,width:c.width-b}},n:function(a,b,c){var d=this.originalSize,e=this.originalPosition;return{top:e.top+c,height:d.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),"resize"!==b&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.ui.plugin.add("resizable","animate",{stop:function(b){var c=a(this).resizable("instance"),d=c.options,e=c._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&c._hasScroll(e[0],"left")?0:c.sizeDiff.height,h=f?0:c.sizeDiff.width,i={width:c.size.width-h,height:c.size.height-g},j=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,k=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;c.element.animate(a.extend(i,k&&j?{top:k,left:j}:{}),{duration:d.animateDuration,easing:d.animateEasing,step:function(){var d={width:parseInt(c.element.css("width"),10),height:parseInt(c.element.css("height"),10),top:parseInt(c.element.css("top"),10),left:parseInt(c.element.css("left"),10)};e&&e.length&&a(e[0]).css({width:d.width,height:d.height}),c._updateCache(d),c._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(){var b,c,d,e,f,g,h,i=a(this).resizable("instance"),j=i.options,k=i.element,l=j.containment,m=l instanceof a?l.get(0):/parent/.test(l)?k.parent().get(0):l;m&&(i.containerElement=a(m),/document/.test(l)||l===document?(i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}):(b=a(m),c=[],a(["Top","Right","Left","Bottom"]).each(function(a,d){c[a]=i._num(b.css("padding"+d))}),i.containerOffset=b.offset(),i.containerPosition=b.position(),i.containerSize={height:b.innerHeight()-c[3],width:b.innerWidth()-c[1]},d=i.containerOffset,e=i.containerSize.height,f=i.containerSize.width,g=i._hasScroll(m,"left")?m.scrollWidth:f,h=i._hasScroll(m)?m.scrollHeight:e,i.parentData={element:m,left:d.left,top:d.top,width:g,height:h}))},resize:function(b){var c,d,e,f,g=a(this).resizable("instance"),h=g.options,i=g.containerOffset,j=g.position,k=g._aspectRatio||b.shiftKey,l={top:0,left:0},m=g.containerElement,n=!0;m[0]!==document&&/static/.test(m.css("position"))&&(l=i),j.left<(g._helper?i.left:0)&&(g.size.width=g.size.width+(g._helper?g.position.left-i.left:g.position.left-l.left),k&&(g.size.height=g.size.width/g.aspectRatio,n=!1),g.position.left=h.helper?i.left:0),j.top<(g._helper?i.top:0)&&(g.size.height=g.size.height+(g._helper?g.position.top-i.top:g.position.top),k&&(g.size.width=g.size.height*g.aspectRatio,n=!1),g.position.top=g._helper?i.top:0),e=g.containerElement.get(0)===g.element.parent().get(0),f=/relative|absolute/.test(g.containerElement.css("position")),e&&f?(g.offset.left=g.parentData.left+g.position.left,g.offset.top=g.parentData.top+g.position.top):(g.offset.left=g.element.offset().left,g.offset.top=g.element.offset().top),c=Math.abs(g.sizeDiff.width+(g._helper?g.offset.left-l.left:g.offset.left-i.left)),d=Math.abs(g.sizeDiff.height+(g._helper?g.offset.top-l.top:g.offset.top-i.top)),c+g.size.width>=g.parentData.width&&(g.size.width=g.parentData.width-c,k&&(g.size.height=g.size.width/g.aspectRatio,n=!1)),d+g.size.height>=g.parentData.height&&(g.size.height=g.parentData.height-d,k&&(g.size.width=g.size.height*g.aspectRatio,n=!1)),n||(g.position.left=g.prevPosition.left,g.position.top=g.prevPosition.top,g.size.width=g.prevSize.width,g.size.height=g.prevSize.height)},stop:function(){var b=a(this).resizable("instance"),c=b.options,d=b.containerOffset,e=b.containerPosition,f=b.containerElement,g=a(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width,j=g.outerHeight()-b.sizeDiff.height;b._helper&&!c.animate&&/relative/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j}),b._helper&&!c.animate&&/static/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j})}}),a.ui.plugin.add("resizable","alsoResize",{start:function(){var b=a(this).resizable("instance"),c=b.options;a(c.alsoResize).each(function(){var b=a(this);b.data("ui-resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})},resize:function(b,c){var d=a(this).resizable("instance"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0};a(e.alsoResize).each(function(){var b=a(this),d=a(this).data("ui-resizable-alsoresize"),e={},f=b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(f,function(a,b){var c=(d[b]||0)+(h[b]||0);c&&c>=0&&(e[b]=c||null)}),b.css(e)})},stop:function(){a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","ghost",{start:function(){var b=a(this).resizable("instance"),c=b.options,d=b.size;b.ghost=b.originalElement.clone(),b.ghost.css({opacity:.25,display:"block",position:"relative",height:d.height,width:d.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof c.ghost?c.ghost:""),b.ghost.appendTo(b.helper)},resize:function(){var b=a(this).resizable("instance");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=a(this).resizable("instance");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(){var b,c=a(this).resizable("instance"),d=c.options,e=c.size,f=c.originalSize,g=c.originalPosition,h=c.axis,i="number"==typeof d.grid?[d.grid,d.grid]:d.grid,j=i[0]||1,k=i[1]||1,l=Math.round((e.width-f.width)/j)*j,m=Math.round((e.height-f.height)/k)*k,n=f.width+l,o=f.height+m,p=d.maxWidth&&d.maxWidth<n,q=d.maxHeight&&d.maxHeight<o,r=d.minWidth&&d.minWidth>n,s=d.minHeight&&d.minHeight>o;d.grid=i,r&&(n+=j),s&&(o+=k),p&&(n-=j),q&&(o-=k),/^(se|s|e)$/.test(h)?(c.size.width=n,c.size.height=o):/^(ne)$/.test(h)?(c.size.width=n,c.size.height=o,c.position.top=g.top-m):/^(sw)$/.test(h)?(c.size.width=n,c.size.height=o,c.position.left=g.left-l):((o-k<=0||n-j<=0)&&(b=c._getPaddingPlusBorderDimensions(this)),o-k>0?(c.size.height=o,c.position.top=g.top-m):(o=k-b.height,c.size.height=o,c.position.top=g.top+f.height-o),n-j>0?(c.size.width=n,c.position.left=g.left-l):(n=j-b.width,c.size.width=n,c.position.left=g.left+f.width-n))}}),a.ui.resizable});
\ No newline at end of file
index 9d289b251d011022df4783df063e9e13189f460b..d54e86ec965d6807b057d1ff8330e8fee4853f7a 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/selectable/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.selectable",a.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var b,c=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){b=a(c.options.filter,c.element[0]),b.addClass("ui-selectee"),b.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=b.addClass("ui-selectee"),this._mouseInit(),this.helper=a("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(b){var c=this,d=this.options;this.opos=[b.pageX,b.pageY],this.options.disabled||(this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.helper),this.helper.css({left:b.pageX,top:b.pageY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,b.metaKey||b.ctrlKey||(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().addBack().each(function(){var d,e=a.data(this,"selectable-item");return e?(d=!b.metaKey&&!b.ctrlKey||!e.$element.hasClass("ui-selected"),e.$element.removeClass(d?"ui-unselecting":"ui-selected").addClass(d?"ui-selecting":"ui-unselecting"),e.unselecting=!d,e.selecting=d,e.selected=d,d?c._trigger("selecting",b,{selecting:e.element}):c._trigger("unselecting",b,{unselecting:e.element}),!1):void 0}))},_mouseDrag:function(b){if(this.dragged=!0,!this.options.disabled){var c,d=this,e=this.options,f=this.opos[0],g=this.opos[1],h=b.pageX,i=b.pageY;return f>h&&(c=h,h=f,f=c),g>i&&(c=i,i=g,g=c),this.helper.css({left:f,top:g,width:h-f,height:i-g}),this.selectees.each(function(){var c=a.data(this,"selectable-item"),j=!1;c&&c.element!==d.element[0]&&("touch"===e.tolerance?j=!(c.left>h||c.right<f||c.top>i||c.bottom<g):"fit"===e.tolerance&&(j=c.left>f&&c.right<h&&c.top>g&&c.bottom<i),j?(c.selected&&(c.$element.removeClass("ui-selected"),c.selected=!1),c.unselecting&&(c.$element.removeClass("ui-unselecting"),c.unselecting=!1),c.selecting||(c.$element.addClass("ui-selecting"),c.selecting=!0,d._trigger("selecting",b,{selecting:c.element}))):(c.selecting&&((b.metaKey||b.ctrlKey)&&c.startselected?(c.$element.removeClass("ui-selecting"),c.selecting=!1,c.$element.addClass("ui-selected"),c.selected=!0):(c.$element.removeClass("ui-selecting"),c.selecting=!1,c.startselected&&(c.$element.addClass("ui-unselecting"),c.unselecting=!0),d._trigger("unselecting",b,{unselecting:c.element}))),c.selected&&(b.metaKey||b.ctrlKey||c.startselected||(c.$element.removeClass("ui-selected"),c.selected=!1,c.$element.addClass("ui-unselecting"),c.unselecting=!0,d._trigger("unselecting",b,{unselecting:c.element})))))}),!1}},_mouseStop:function(b){var c=this;return this.dragged=!1,a(".ui-unselecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-unselecting"),d.unselecting=!1,d.startselected=!1,c._trigger("unselected",b,{unselected:d.element})}),a(".ui-selecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected"),d.selecting=!1,d.selected=!0,d.startselected=!0,c._trigger("selected",b,{selected:d.element})}),this._trigger("stop",b),this.helper.remove(),!1}})});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.selectable",a.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var b,c=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){b=a(c.options.filter,c.element[0]),b.addClass("ui-selectee"),b.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=b.addClass("ui-selectee"),this._mouseInit(),this.helper=a("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(b){var c=this,d=this.options;this.opos=[b.pageX,b.pageY],this.options.disabled||(this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.helper),this.helper.css({left:b.pageX,top:b.pageY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,b.metaKey||b.ctrlKey||(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().addBack().each(function(){var d,e=a.data(this,"selectable-item");if(e)return d=!b.metaKey&&!b.ctrlKey||!e.$element.hasClass("ui-selected"),e.$element.removeClass(d?"ui-unselecting":"ui-selected").addClass(d?"ui-selecting":"ui-unselecting"),e.unselecting=!d,e.selecting=d,e.selected=d,d?c._trigger("selecting",b,{selecting:e.element}):c._trigger("unselecting",b,{unselecting:e.element}),!1}))},_mouseDrag:function(b){if(this.dragged=!0,!this.options.disabled){var c,d=this,e=this.options,f=this.opos[0],g=this.opos[1],h=b.pageX,i=b.pageY;return f>h&&(c=h,h=f,f=c),g>i&&(c=i,i=g,g=c),this.helper.css({left:f,top:g,width:h-f,height:i-g}),this.selectees.each(function(){var c=a.data(this,"selectable-item"),j=!1;c&&c.element!==d.element[0]&&("touch"===e.tolerance?j=!(c.left>h||c.right<f||c.top>i||c.bottom<g):"fit"===e.tolerance&&(j=c.left>f&&c.right<h&&c.top>g&&c.bottom<i),j?(c.selected&&(c.$element.removeClass("ui-selected"),c.selected=!1),c.unselecting&&(c.$element.removeClass("ui-unselecting"),c.unselecting=!1),c.selecting||(c.$element.addClass("ui-selecting"),c.selecting=!0,d._trigger("selecting",b,{selecting:c.element}))):(c.selecting&&((b.metaKey||b.ctrlKey)&&c.startselected?(c.$element.removeClass("ui-selecting"),c.selecting=!1,c.$element.addClass("ui-selected"),c.selected=!0):(c.$element.removeClass("ui-selecting"),c.selecting=!1,c.startselected&&(c.$element.addClass("ui-unselecting"),c.unselecting=!0),d._trigger("unselecting",b,{unselecting:c.element}))),c.selected&&(b.metaKey||b.ctrlKey||c.startselected||(c.$element.removeClass("ui-selected"),c.selected=!1,c.$element.addClass("ui-unselecting"),c.unselecting=!0,d._trigger("unselecting",b,{unselecting:c.element})))))}),!1}},_mouseStop:function(b){var c=this;return this.dragged=!1,a(".ui-unselecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-unselecting"),d.unselecting=!1,d.startselected=!1,c._trigger("unselected",b,{unselected:d.element})}),a(".ui-selecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected"),d.selecting=!1,d.selected=!0,d.startselected=!0,c._trigger("selected",b,{selected:d.element})}),this._trigger("stop",b),this.helper.remove(),!1}})});
\ No newline at end of file
index 600bc60d1d23ed742912915a08e54f4019c29999..c6a790e91cf375e035cc331f67d58120a5608c95 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/slider/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.slider",a.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var b,c,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",g=[];for(c=d.values&&d.values.length||1,e.length>c&&(e.slice(c).remove(),e=e.slice(0,c)),b=e.length;c>b;b++)g.push(f);this.handles=e.add(a(g.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(b){a(this).data("ui-slider-handle-index",b)})},_createRange:function(){var b=this.options,c="";b.range?(b.range===!0&&(b.values?b.values.length&&2!==b.values.length?b.values=[b.values[0],b.values[0]]:a.isArray(b.values)&&(b.values=b.values.slice(0)):b.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=a("<div></div>").appendTo(this.element),c="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(c+("min"===b.range||"max"===b.range?" ui-slider-range-"+b.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(b){var c,d,e,f,g,h,i,j,k=this,l=this.options;return l.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),c={x:b.pageX,y:b.pageY},d=this._normValueFromMouse(c),e=this._valueMax()-this._valueMin()+1,this.handles.each(function(b){var c=Math.abs(d-k.values(b));(e>c||e===c&&(b===k._lastChangedValue||k.values(b)===l.min))&&(e=c,f=a(this),g=b)}),h=this._start(b,g),h===!1?!1:(this._mouseSliding=!0,this._handleIndex=g,f.addClass("ui-state-active").focus(),i=f.offset(),j=!a(b.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=j?{left:0,top:0}:{left:b.pageX-i.left-f.width()/2,top:b.pageY-i.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,g,d),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return"horizontal"===this.orientation?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),0>d&&(d=0),"vertical"===this.orientation&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),2===this.options.values.length&&this.options.range===!0&&(0===b&&c>d||1===b&&d>c)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._lastChangedValue=b,this._trigger("change",a,c)}},value:function(a){return arguments.length?(this.options.value=this._trimAlignValue(a),this._refreshValue(),void this._change(null,0)):this._value()},values:function(b,c){var d,e,f;if(arguments.length>1)return this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),void this._change(null,b);if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();for(d=this.options.values,e=arguments[0],f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()},_setOption:function(b,c){var d,e=0;switch("range"===b&&this.options.range===!0&&("min"===c?(this.options.value=this._values(0),this.options.values=null):"max"===c&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),a.isArray(this.options.values)&&(e=this.options.values.length),"disabled"===b&&this.element.toggleClass("ui-state-disabled",!!c),this._super(b,c),b){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===c?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),d=0;e>d;d+=1)this._change(null,d);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c,d;if(arguments.length)return b=this.options.values[a],b=this._trimAlignValue(b);if(this.options.values&&this.options.values.length){for(c=this.options.values.slice(),d=0;d<c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c}return[]},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return 2*Math.abs(c)>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_calculateNewMax:function(){var a=this.options.max,b=this._valueMin(),c=this.options.step,d=Math.floor(+(a-b).toFixed(this._precision())/c)*c;a=d+b,this.max=parseFloat(a.toFixed(this._precision()))},_precision:function(){var a=this._precisionOf(this.options.step);return null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){var b=a.toString(),c=b.indexOf(".");return-1===c?0:b.length-c-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var b,c,d,e,f,g=this.options.range,h=this.options,i=this,j=this._animateOff?!1:h.animate,k={};this.options.values&&this.options.values.length?this.handles.each(function(d){c=(i.values(d)-i._valueMin())/(i._valueMax()-i._valueMin())*100,k["horizontal"===i.orientation?"left":"bottom"]=c+"%",a(this).stop(1,1)[j?"animate":"css"](k,h.animate),i.options.range===!0&&("horizontal"===i.orientation?(0===d&&i.range.stop(1,1)[j?"animate":"css"]({left:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({width:c-b+"%"},{queue:!1,duration:h.animate})):(0===d&&i.range.stop(1,1)[j?"animate":"css"]({bottom:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({height:c-b+"%"},{queue:!1,duration:h.animate}))),b=c}):(d=this.value(),e=this._valueMin(),f=this._valueMax(),c=f!==e?(d-e)/(f-e)*100:0,k["horizontal"===this.orientation?"left":"bottom"]=c+"%",this.handle.stop(1,1)[j?"animate":"css"](k,h.animate),"min"===g&&"horizontal"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({width:c+"%"},h.animate),"max"===g&&"horizontal"===this.orientation&&this.range[j?"animate":"css"]({width:100-c+"%"},{queue:!1,duration:h.animate}),"min"===g&&"vertical"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({height:c+"%"},h.animate),"max"===g&&"vertical"===this.orientation&&this.range[j?"animate":"css"]({height:100-c+"%"},{queue:!1,duration:h.animate}))},_handleEvents:{keydown:function(b){var c,d,e,f,g=a(b.target).data("ui-slider-handle-index");switch(b.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(b.preventDefault(),!this._keySliding&&(this._keySliding=!0,a(b.target).addClass("ui-state-active"),c=this._start(b,g),c===!1))return}switch(f=this.options.step,d=e=this.options.values&&this.options.values.length?this.values(g):this.value(),b.keyCode){case a.ui.keyCode.HOME:e=this._valueMin();break;case a.ui.keyCode.END:e=this._valueMax();break;case a.ui.keyCode.PAGE_UP:e=this._trimAlignValue(d+(this._valueMax()-this._valueMin())/this.numPages);break;case a.ui.keyCode.PAGE_DOWN:e=this._trimAlignValue(d-(this._valueMax()-this._valueMin())/this.numPages);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(d===this._valueMax())return;e=this._trimAlignValue(d+f);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(d===this._valueMin())return;e=this._trimAlignValue(d-f)}this._slide(b,g,e)},keyup:function(b){var c=a(b.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(b,c),this._change(b,c),a(b.target).removeClass("ui-state-active"))}}})});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.slider",a.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var b,c,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",g=[];for(c=d.values&&d.values.length||1,e.length>c&&(e.slice(c).remove(),e=e.slice(0,c)),b=e.length;b<c;b++)g.push(f);this.handles=e.add(a(g.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(b){a(this).data("ui-slider-handle-index",b)})},_createRange:function(){var b=this.options,c="";b.range?(b.range===!0&&(b.values?b.values.length&&2!==b.values.length?b.values=[b.values[0],b.values[0]]:a.isArray(b.values)&&(b.values=b.values.slice(0)):b.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=a("<div></div>").appendTo(this.element),c="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(c+("min"===b.range||"max"===b.range?" ui-slider-range-"+b.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(b){var c,d,e,f,g,h,i,j,k=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),c={x:b.pageX,y:b.pageY},d=this._normValueFromMouse(c),e=this._valueMax()-this._valueMin()+1,this.handles.each(function(b){var c=Math.abs(d-k.values(b));(e>c||e===c&&(b===k._lastChangedValue||k.values(b)===l.min))&&(e=c,f=a(this),g=b)}),h=this._start(b,g),h!==!1&&(this._mouseSliding=!0,this._handleIndex=g,f.addClass("ui-state-active").focus(),i=f.offset(),j=!a(b.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=j?{left:0,top:0}:{left:b.pageX-i.left-f.width()/2,top:b.pageY-i.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,g,d),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return"horizontal"===this.orientation?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),"vertical"===this.orientation&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),2===this.options.values.length&&this.options.range===!0&&(0===b&&c>d||1===b&&c<d)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._lastChangedValue=b,this._trigger("change",a,c)}},value:function(a){return arguments.length?(this.options.value=this._trimAlignValue(a),this._refreshValue(),void this._change(null,0)):this._value()},values:function(b,c){var d,e,f;if(arguments.length>1)return this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),void this._change(null,b);if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();for(d=this.options.values,e=arguments[0],f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()},_setOption:function(b,c){var d,e=0;switch("range"===b&&this.options.range===!0&&("min"===c?(this.options.value=this._values(0),this.options.values=null):"max"===c&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),a.isArray(this.options.values)&&(e=this.options.values.length),"disabled"===b&&this.element.toggleClass("ui-state-disabled",!!c),this._super(b,c),b){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===c?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),d=0;d<e;d+=1)this._change(null,d);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c,d;if(arguments.length)return b=this.options.values[a],b=this._trimAlignValue(b);if(this.options.values&&this.options.values.length){for(c=this.options.values.slice(),d=0;d<c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c}return[]},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return 2*Math.abs(c)>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_calculateNewMax:function(){var a=this.options.max,b=this._valueMin(),c=this.options.step,d=Math.floor(+(a-b).toFixed(this._precision())/c)*c;a=d+b,this.max=parseFloat(a.toFixed(this._precision()))},_precision:function(){var a=this._precisionOf(this.options.step);return null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){var b=a.toString(),c=b.indexOf(".");return c===-1?0:b.length-c-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var b,c,d,e,f,g=this.options.range,h=this.options,i=this,j=!this._animateOff&&h.animate,k={};this.options.values&&this.options.values.length?this.handles.each(function(d){c=(i.values(d)-i._valueMin())/(i._valueMax()-i._valueMin())*100,k["horizontal"===i.orientation?"left":"bottom"]=c+"%",a(this).stop(1,1)[j?"animate":"css"](k,h.animate),i.options.range===!0&&("horizontal"===i.orientation?(0===d&&i.range.stop(1,1)[j?"animate":"css"]({left:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({width:c-b+"%"},{queue:!1,duration:h.animate})):(0===d&&i.range.stop(1,1)[j?"animate":"css"]({bottom:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({height:c-b+"%"},{queue:!1,duration:h.animate}))),b=c}):(d=this.value(),e=this._valueMin(),f=this._valueMax(),c=f!==e?(d-e)/(f-e)*100:0,k["horizontal"===this.orientation?"left":"bottom"]=c+"%",this.handle.stop(1,1)[j?"animate":"css"](k,h.animate),"min"===g&&"horizontal"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({width:c+"%"},h.animate),"max"===g&&"horizontal"===this.orientation&&this.range[j?"animate":"css"]({width:100-c+"%"},{queue:!1,duration:h.animate}),"min"===g&&"vertical"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({height:c+"%"},h.animate),"max"===g&&"vertical"===this.orientation&&this.range[j?"animate":"css"]({height:100-c+"%"},{queue:!1,duration:h.animate}))},_handleEvents:{keydown:function(b){var c,d,e,f,g=a(b.target).data("ui-slider-handle-index");switch(b.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(b.preventDefault(),!this._keySliding&&(this._keySliding=!0,a(b.target).addClass("ui-state-active"),c=this._start(b,g),c===!1))return}switch(f=this.options.step,d=e=this.options.values&&this.options.values.length?this.values(g):this.value(),b.keyCode){case a.ui.keyCode.HOME:e=this._valueMin();break;case a.ui.keyCode.END:e=this._valueMax();break;case a.ui.keyCode.PAGE_UP:e=this._trimAlignValue(d+(this._valueMax()-this._valueMin())/this.numPages);break;case a.ui.keyCode.PAGE_DOWN:e=this._trimAlignValue(d-(this._valueMax()-this._valueMin())/this.numPages);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(d===this._valueMax())return;e=this._trimAlignValue(d+f);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(d===this._valueMin())return;e=this._trimAlignValue(d-f)}this._slide(b,g,e)},keyup:function(b){var c=a(b.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(b,c),this._change(b,c),a(b.target).removeClass("ui-state-active"))}}})});
\ No newline at end of file
index 2bc1d6e216c9340e33dde76e0aaeb2778dcdc829..63f16fcb4bca85345db0ad9ecf25dd4bc81229f8 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/sortable/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.sortable",a.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(a,b,c){return a>=b&&b+c>a},_isFloating:function(a){return/left|right/.test(a.css("float"))||/inline|table-cell/.test(a.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(a,b){this._super(a,b),"handle"===a&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),a.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(b,c){var d=null,e=!1,f=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(b),a(b.target).parents().each(function(){return a.data(this,f.widgetName+"-item")===f?(d=a(this),!1):void 0}),a.data(b.target,f.widgetName+"-item")===f&&(d=a(b.target)),d&&(!this.options.handle||c||(a(this.options.handle,d).find("*").addBack().each(function(){this===b.target&&(e=!0)}),e))?(this.currentItem=d,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(b,c,d){var e,f,g=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,g.cursorAt&&this._adjustOffsetFromHelper(g.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),g.containment&&this._setContainment(),g.cursor&&"auto"!==g.cursor&&(f=this.document.find("body"),this.storedCursor=f.css("cursor"),f.css("cursor",g.cursor),this.storedStylesheet=a("<style>*{ cursor: "+g.cursor+" !important; }</style>").appendTo(f)),g.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",g.opacity)),g.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",g.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!d)for(e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("activate",b,this._uiHash(this));return a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!g.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b),!0},_mouseDrag:function(b){var c,d,e,f,g=this.options,h=!1;for(this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<g.scrollSensitivity?this.scrollParent[0].scrollTop=h=this.scrollParent[0].scrollTop+g.scrollSpeed:b.pageY-this.overflowOffset.top<g.scrollSensitivity&&(this.scrollParent[0].scrollTop=h=this.scrollParent[0].scrollTop-g.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX<g.scrollSensitivity?this.scrollParent[0].scrollLeft=h=this.scrollParent[0].scrollLeft+g.scrollSpeed:b.pageX-this.overflowOffset.left<g.scrollSensitivity&&(this.scrollParent[0].scrollLeft=h=this.scrollParent[0].scrollLeft-g.scrollSpeed)):(b.pageY-this.document.scrollTop()<g.scrollSensitivity?h=this.document.scrollTop(this.document.scrollTop()-g.scrollSpeed):this.window.height()-(b.pageY-this.document.scrollTop())<g.scrollSensitivity&&(h=this.document.scrollTop(this.document.scrollTop()+g.scrollSpeed)),b.pageX-this.document.scrollLeft()<g.scrollSensitivity?h=this.document.scrollLeft(this.document.scrollLeft()-g.scrollSpeed):this.window.width()-(b.pageX-this.document.scrollLeft())<g.scrollSensitivity&&(h=this.document.scrollLeft(this.document.scrollLeft()+g.scrollSpeed))),h!==!1&&a.ui.ddmanager&&!g.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),c=this.items.length-1;c>=0;c--)if(d=this.items[c],e=d.item[0],f=this._intersectsWithPointer(d),f&&d.instance===this.currentContainer&&e!==this.currentItem[0]&&this.placeholder[1===f?"next":"prev"]()[0]!==e&&!a.contains(this.placeholder[0],e)&&("semi-dynamic"===this.options.type?!a.contains(this.element[0],e):!0)){if(this.direction=1===f?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(d))break;this._rearrange(b,d),this._trigger("change",b,this._uiHash());break}return this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(b,c){if(b){if(a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b),this.options.revert){var d=this,e=this.placeholder.offset(),f=this.options.axis,g={};f&&"x"!==f||(g.left=e.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),f&&"y"!==f||(g.top=e.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,a(this.helper).animate(g,parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--)this.containers[b]._trigger("deactivate",null,this._uiHash(this)),this.containers[b].containerCache.over&&(this.containers[b]._trigger("out",null,this._uiHash(this)),this.containers[b].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[\-=_](.+)/);c&&d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"="),d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")}),d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l="x"===this.options.axis||d+j>h&&i>d+j,m="y"===this.options.axis||b+k>f&&g>b+k,n=l&&m;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?n:f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i},_intersectsWithPointer:function(a){var b="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height),c="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width),d=b&&c,e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return d?this.floating?f&&"right"===f||"down"===e?2:1:e&&("down"===e?2:1):!1},_intersectsWithSides:function(a){var b=this._isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height),c=this._isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width),d=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?"right"===e&&c||"left"===e&&!c:d&&("down"===d&&b||"up"===d&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return 0!==a&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return 0!==a&&(a>0?"right":"left")},refresh:function(a){return this._refreshItems(a),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor===String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){function c(){h.push(this)}var d,e,f,g,h=[],i=[],j=this._connectWith();if(j&&b)for(d=j.length-1;d>=0;d--)for(f=a(j[d],this.document[0]),e=f.length-1;e>=0;e--)g=a.data(f[e],this.widgetFullName),g&&g!==this&&!g.options.disabled&&i.push([a.isFunction(g.options.items)?g.options.items.call(g.element):a(g.options.items,g.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),g]);for(i.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),d=i.length-1;d>=0;d--)i[d][0].each(c);return a(h)},_removeCurrentsFromItems:function(){var b=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=a.grep(this.items,function(a){for(var c=0;c<b.length;c++)if(b[c]===a.item[0])return!1;return!0})},_refreshItems:function(b){this.items=[],this.containers=[this];var c,d,e,f,g,h,i,j,k=this.items,l=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],m=this._connectWith();if(m&&this.ready)for(c=m.length-1;c>=0;c--)for(e=a(m[c],this.document[0]),d=e.length-1;d>=0;d--)f=a.data(e[d],this.widgetFullName),f&&f!==this&&!f.options.disabled&&(l.push([a.isFunction(f.options.items)?f.options.items.call(f.element[0],b,{item:this.currentItem}):a(f.options.items,f.element),f]),this.containers.push(f));for(c=l.length-1;c>=0;c--)for(g=l[c][1],h=l[c][0],d=0,j=h.length;j>d;d++)i=a(h[d]),i.data(this.widgetName+"-item",g),k.push({item:i,instance:g,width:0,height:0,left:0,top:0})},refreshPositions:function(b){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var c,d,e,f;for(c=this.items.length-1;c>=0;c--)d=this.items[c],d.instance!==this.currentContainer&&this.currentContainer&&d.item[0]!==this.currentItem[0]||(e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item,b||(d.width=e.outerWidth(),d.height=e.outerHeight()),f=e.offset(),d.left=f.left,d.top=f.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(c=this.containers.length-1;c>=0;c--)f=this.containers[c].element.offset(),this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight();return this},_createPlaceholder:function(b){b=b||this;var c,d=b.options;d.placeholder&&d.placeholder.constructor!==String||(c=d.placeholder,d.placeholder={element:function(){var d=b.currentItem[0].nodeName.toLowerCase(),e=a("<"+d+">",b.document[0]).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===d?b._createTrPlaceholder(b.currentItem.find("tr").eq(0),a("<tr>",b.document[0]).appendTo(e)):"tr"===d?b._createTrPlaceholder(b.currentItem,e):"img"===d&&e.attr("src",b.currentItem.attr("src")),c||e.css("visibility","hidden"),e},update:function(a,e){(!c||d.forcePlaceholderSize)&&(e.height()||e.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10)))}}),b.placeholder=a(d.placeholder.element.call(b.element,b.currentItem)),b.currentItem.after(b.placeholder),d.placeholder.update(b,b.placeholder)},_createTrPlaceholder:function(b,c){var d=this;b.children().each(function(){a("<td>&#160;</td>",d.document[0]).attr("colspan",a(this).attr("colspan")||1).appendTo(c)})},_contactContainers:function(b){var c,d,e,f,g,h,i,j,k,l,m=null,n=null;for(c=this.containers.length-1;c>=0;c--)if(!a.contains(this.currentItem[0],this.containers[c].element[0]))if(this._intersectsWith(this.containers[c].containerCache)){if(m&&a.contains(this.containers[c].element[0],m.element[0]))continue;m=this.containers[c],n=c}else this.containers[c].containerCache.over&&(this.containers[c]._trigger("out",b,this._uiHash(this)),this.containers[c].containerCache.over=0);if(m)if(1===this.containers.length)this.containers[n].containerCache.over||(this.containers[n]._trigger("over",b,this._uiHash(this)),this.containers[n].containerCache.over=1);else{for(e=1e4,f=null,k=m.floating||this._isFloating(this.currentItem),g=k?"left":"top",h=k?"width":"height",l=k?"clientX":"clientY",d=this.items.length-1;d>=0;d--)a.contains(this.containers[n].element[0],this.items[d].item[0])&&this.items[d].item[0]!==this.currentItem[0]&&(i=this.items[d].item.offset()[g],j=!1,b[l]-i>this.items[d][h]/2&&(j=!0),Math.abs(b[l]-i)<e&&(e=Math.abs(b[l]-i),f=this.items[d],this.direction=j?"up":"down"));if(!f&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[n])return void(this.currentContainer.containerCache.over||(this.containers[n]._trigger("over",b,this._uiHash()),this.currentContainer.containerCache.over=1));f?this._rearrange(b,f,null,!0):this._rearrange(b,null,this.containers[n].element,!0),this._trigger("change",b,this._uiHash()),this.containers[n]._trigger("change",b,this._uiHash(this)),this.currentContainer=this.containers[n],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[n]._trigger("over",b,this._uiHash(this)),this.containers[n].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):"clone"===c.helper?this.currentItem.clone():this.currentItem;return d.parents("body").length||a("parent"!==c.appendTo?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]),d[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!d[0].style.width||c.forceHelperSize)&&d.width(this.currentItem.width()),(!d[0].style.height||c.forceHelperSize)&&d.height(this.currentItem.height()),d},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&a.ui.ie)&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b,c,d,e=this.options;"parent"===e.containment&&(e.containment=this.helper[0].parentNode),("document"===e.containment||"window"===e.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===e.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===e.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(e.containment)||(b=a(e.containment)[0],c=a(e.containment).offset(),d="hidden"!==a(b).css("overflow"),this.containment=[c.left+(parseInt(a(b).css("borderLeftWidth"),10)||0)+(parseInt(a(b).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(a(b).css("borderTopWidth"),10)||0)+(parseInt(a(b).css("paddingTop"),10)||0)-this.margins.top,c.left+(d?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(a(b).css("borderLeftWidth"),10)||0)-(parseInt(a(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(d?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(a(b).css("borderTopWidth"),10)||0)-(parseInt(a(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(b,c){c||(c=this.position);var d="absolute"===b?1:-1,e="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,f=/(html|body)/i.test(e[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():f?0:e.scrollTop())*d,left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*d}},_generatePosition:function(b){var c,d,e=this.options,f=b.pageX,g=b.pageY,h="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(h[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(b.pageX-this.offset.click.left<this.containment[0]&&(f=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top<this.containment[1]&&(g=this.containment[1]+this.offset.click.top),b.pageX-this.offset.click.left>this.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top)),e.grid&&(c=this.originalPageY+Math.round((g-this.originalPageY)/e.grid[1])*e.grid[1],g=this.containment?c-this.offset.click.top>=this.containment[1]&&c-this.offset.click.top<=this.containment[3]?c:c-this.offset.click.top>=this.containment[1]?c-e.grid[1]:c+e.grid[1]:c,d=this.originalPageX+Math.round((f-this.originalPageX)/e.grid[0])*e.grid[0],f=this.containment?d-this.offset.click.left>=this.containment[0]&&d-this.offset.click.left<=this.containment[2]?d:d-this.offset.click.left>=this.containment[0]?d-e.grid[0]:d+e.grid[0]:d)),{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():i?0:h.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():i?0:h.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?b.item[0]:b.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var e=this.counter;this._delay(function(){e===this.counter&&this.refreshPositions(!d)})},_clear:function(a,b){function c(a,b,c){return function(d){c._trigger(a,d,b._uiHash(b))}}this.reverting=!1;var d,e=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(d in this._storedCSS)("auto"===this._storedCSS[d]||"static"===this._storedCSS[d])&&(this._storedCSS[d]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!b&&e.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||b||e.push(function(a){this._trigger("update",a,this._uiHash())}),this!==this.currentContainer&&(b||(e.push(function(a){this._trigger("remove",a,this._uiHash())}),e.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.currentContainer)),e.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.currentContainer)))),d=this.containers.length-1;d>=0;d--)b||e.push(c("deactivate",this,this.containers[d])),this.containers[d].containerCache.over&&(e.push(c("out",this,this.containers[d])),this.containers[d].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,b||this._trigger("beforeStop",a,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!b){for(d=0;d<e.length;d++)e[d].call(this,a);this._trigger("stop",a,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}})});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.sortable",a.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(a,b,c){return a>=b&&a<b+c},_isFloating:function(a){return/left|right/.test(a.css("float"))||/inline|table-cell/.test(a.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(a,b){this._super(a,b),"handle"===a&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),a.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(b,c){var d=null,e=!1,f=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(b),a(b.target).parents().each(function(){if(a.data(this,f.widgetName+"-item")===f)return d=a(this),!1}),a.data(b.target,f.widgetName+"-item")===f&&(d=a(b.target)),!!d&&(!(this.options.handle&&!c&&(a(this.options.handle,d).find("*").addBack().each(function(){this===b.target&&(e=!0)}),!e))&&(this.currentItem=d,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(b,c,d){var e,f,g=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,g.cursorAt&&this._adjustOffsetFromHelper(g.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),g.containment&&this._setContainment(),g.cursor&&"auto"!==g.cursor&&(f=this.document.find("body"),this.storedCursor=f.css("cursor"),f.css("cursor",g.cursor),this.storedStylesheet=a("<style>*{ cursor: "+g.cursor+" !important; }</style>").appendTo(f)),g.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",g.opacity)),g.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",g.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!d)for(e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("activate",b,this._uiHash(this));return a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!g.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b),!0},_mouseDrag:function(b){var c,d,e,f,g=this.options,h=!1;for(this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<g.scrollSensitivity?this.scrollParent[0].scrollTop=h=this.scrollParent[0].scrollTop+g.scrollSpeed:b.pageY-this.overflowOffset.top<g.scrollSensitivity&&(this.scrollParent[0].scrollTop=h=this.scrollParent[0].scrollTop-g.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX<g.scrollSensitivity?this.scrollParent[0].scrollLeft=h=this.scrollParent[0].scrollLeft+g.scrollSpeed:b.pageX-this.overflowOffset.left<g.scrollSensitivity&&(this.scrollParent[0].scrollLeft=h=this.scrollParent[0].scrollLeft-g.scrollSpeed)):(b.pageY-this.document.scrollTop()<g.scrollSensitivity?h=this.document.scrollTop(this.document.scrollTop()-g.scrollSpeed):this.window.height()-(b.pageY-this.document.scrollTop())<g.scrollSensitivity&&(h=this.document.scrollTop(this.document.scrollTop()+g.scrollSpeed)),b.pageX-this.document.scrollLeft()<g.scrollSensitivity?h=this.document.scrollLeft(this.document.scrollLeft()-g.scrollSpeed):this.window.width()-(b.pageX-this.document.scrollLeft())<g.scrollSensitivity&&(h=this.document.scrollLeft(this.document.scrollLeft()+g.scrollSpeed))),h!==!1&&a.ui.ddmanager&&!g.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),c=this.items.length-1;c>=0;c--)if(d=this.items[c],e=d.item[0],f=this._intersectsWithPointer(d),f&&d.instance===this.currentContainer&&!(e===this.currentItem[0]||this.placeholder[1===f?"next":"prev"]()[0]===e||a.contains(this.placeholder[0],e)||"semi-dynamic"===this.options.type&&a.contains(this.element[0],e))){if(this.direction=1===f?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(d))break;this._rearrange(b,d),this._trigger("change",b,this._uiHash());break}return this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(b,c){if(b){if(a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b),this.options.revert){var d=this,e=this.placeholder.offset(),f=this.options.axis,g={};f&&"x"!==f||(g.left=e.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),f&&"y"!==f||(g.top=e.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,a(this.helper).animate(g,parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--)this.containers[b]._trigger("deactivate",null,this._uiHash(this)),this.containers[b].containerCache.over&&(this.containers[b]._trigger("out",null,this._uiHash(this)),this.containers[b].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[\-=_](.+)/);c&&d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"="),d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")}),d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l="x"===this.options.axis||d+j>h&&d+j<i,m="y"===this.options.axis||b+k>f&&b+k<g,n=l&&m;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?n:f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i},_intersectsWithPointer:function(a){var b="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height),c="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width),d=b&&c,e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return!!d&&(this.floating?f&&"right"===f||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(a){var b=this._isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height),c=this._isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width),d=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?"right"===e&&c||"left"===e&&!c:d&&("down"===d&&b||"up"===d&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return 0!==a&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return 0!==a&&(a>0?"right":"left")},refresh:function(a){return this._refreshItems(a),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor===String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){function c(){h.push(this)}var d,e,f,g,h=[],i=[],j=this._connectWith();if(j&&b)for(d=j.length-1;d>=0;d--)for(f=a(j[d],this.document[0]),e=f.length-1;e>=0;e--)g=a.data(f[e],this.widgetFullName),g&&g!==this&&!g.options.disabled&&i.push([a.isFunction(g.options.items)?g.options.items.call(g.element):a(g.options.items,g.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),g]);for(i.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),d=i.length-1;d>=0;d--)i[d][0].each(c);return a(h)},_removeCurrentsFromItems:function(){var b=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=a.grep(this.items,function(a){for(var c=0;c<b.length;c++)if(b[c]===a.item[0])return!1;return!0})},_refreshItems:function(b){this.items=[],this.containers=[this];var c,d,e,f,g,h,i,j,k=this.items,l=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],m=this._connectWith();if(m&&this.ready)for(c=m.length-1;c>=0;c--)for(e=a(m[c],this.document[0]),d=e.length-1;d>=0;d--)f=a.data(e[d],this.widgetFullName),f&&f!==this&&!f.options.disabled&&(l.push([a.isFunction(f.options.items)?f.options.items.call(f.element[0],b,{item:this.currentItem}):a(f.options.items,f.element),f]),this.containers.push(f));for(c=l.length-1;c>=0;c--)for(g=l[c][1],h=l[c][0],d=0,j=h.length;d<j;d++)i=a(h[d]),i.data(this.widgetName+"-item",g),k.push({item:i,instance:g,width:0,height:0,left:0,top:0})},refreshPositions:function(b){this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var c,d,e,f;for(c=this.items.length-1;c>=0;c--)d=this.items[c],d.instance!==this.currentContainer&&this.currentContainer&&d.item[0]!==this.currentItem[0]||(e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item,b||(d.width=e.outerWidth(),d.height=e.outerHeight()),f=e.offset(),d.left=f.left,d.top=f.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(c=this.containers.length-1;c>=0;c--)f=this.containers[c].element.offset(),this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight();return this},_createPlaceholder:function(b){b=b||this;var c,d=b.options;d.placeholder&&d.placeholder.constructor!==String||(c=d.placeholder,d.placeholder={element:function(){var d=b.currentItem[0].nodeName.toLowerCase(),e=a("<"+d+">",b.document[0]).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===d?b._createTrPlaceholder(b.currentItem.find("tr").eq(0),a("<tr>",b.document[0]).appendTo(e)):"tr"===d?b._createTrPlaceholder(b.currentItem,e):"img"===d&&e.attr("src",b.currentItem.attr("src")),c||e.css("visibility","hidden"),e},update:function(a,e){c&&!d.forcePlaceholderSize||(e.height()||e.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10)))}}),b.placeholder=a(d.placeholder.element.call(b.element,b.currentItem)),b.currentItem.after(b.placeholder),d.placeholder.update(b,b.placeholder)},_createTrPlaceholder:function(b,c){var d=this;b.children().each(function(){a("<td>&#160;</td>",d.document[0]).attr("colspan",a(this).attr("colspan")||1).appendTo(c)})},_contactContainers:function(b){var c,d,e,f,g,h,i,j,k,l,m=null,n=null;for(c=this.containers.length-1;c>=0;c--)if(!a.contains(this.currentItem[0],this.containers[c].element[0]))if(this._intersectsWith(this.containers[c].containerCache)){if(m&&a.contains(this.containers[c].element[0],m.element[0]))continue;m=this.containers[c],n=c}else this.containers[c].containerCache.over&&(this.containers[c]._trigger("out",b,this._uiHash(this)),this.containers[c].containerCache.over=0);if(m)if(1===this.containers.length)this.containers[n].containerCache.over||(this.containers[n]._trigger("over",b,this._uiHash(this)),this.containers[n].containerCache.over=1);else{for(e=1e4,f=null,k=m.floating||this._isFloating(this.currentItem),g=k?"left":"top",h=k?"width":"height",l=k?"clientX":"clientY",d=this.items.length-1;d>=0;d--)a.contains(this.containers[n].element[0],this.items[d].item[0])&&this.items[d].item[0]!==this.currentItem[0]&&(i=this.items[d].item.offset()[g],j=!1,b[l]-i>this.items[d][h]/2&&(j=!0),Math.abs(b[l]-i)<e&&(e=Math.abs(b[l]-i),f=this.items[d],this.direction=j?"up":"down"));if(!f&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[n])return void(this.currentContainer.containerCache.over||(this.containers[n]._trigger("over",b,this._uiHash()),this.currentContainer.containerCache.over=1));f?this._rearrange(b,f,null,!0):this._rearrange(b,null,this.containers[n].element,!0),this._trigger("change",b,this._uiHash()),this.containers[n]._trigger("change",b,this._uiHash(this)),this.currentContainer=this.containers[n],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[n]._trigger("over",b,this._uiHash(this)),this.containers[n].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):"clone"===c.helper?this.currentItem.clone():this.currentItem;return d.parents("body").length||a("parent"!==c.appendTo?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]),d[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),d[0].style.width&&!c.forceHelperSize||d.width(this.currentItem.width()),d[0].style.height&&!c.forceHelperSize||d.height(this.currentItem.height()),d},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&a.ui.ie)&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b,c,d,e=this.options;"parent"===e.containment&&(e.containment=this.helper[0].parentNode),"document"!==e.containment&&"window"!==e.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===e.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===e.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(e.containment)||(b=a(e.containment)[0],c=a(e.containment).offset(),d="hidden"!==a(b).css("overflow"),this.containment=[c.left+(parseInt(a(b).css("borderLeftWidth"),10)||0)+(parseInt(a(b).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(a(b).css("borderTopWidth"),10)||0)+(parseInt(a(b).css("paddingTop"),10)||0)-this.margins.top,c.left+(d?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(a(b).css("borderLeftWidth"),10)||0)-(parseInt(a(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(d?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(a(b).css("borderTopWidth"),10)||0)-(parseInt(a(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(b,c){c||(c=this.position);var d="absolute"===b?1:-1,e="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,f=/(html|body)/i.test(e[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():f?0:e.scrollTop())*d,left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*d}},_generatePosition:function(b){var c,d,e=this.options,f=b.pageX,g=b.pageY,h="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(h[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(b.pageX-this.offset.click.left<this.containment[0]&&(f=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top<this.containment[1]&&(g=this.containment[1]+this.offset.click.top),b.pageX-this.offset.click.left>this.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top)),e.grid&&(c=this.originalPageY+Math.round((g-this.originalPageY)/e.grid[1])*e.grid[1],g=this.containment?c-this.offset.click.top>=this.containment[1]&&c-this.offset.click.top<=this.containment[3]?c:c-this.offset.click.top>=this.containment[1]?c-e.grid[1]:c+e.grid[1]:c,d=this.originalPageX+Math.round((f-this.originalPageX)/e.grid[0])*e.grid[0],f=this.containment?d-this.offset.click.left>=this.containment[0]&&d-this.offset.click.left<=this.containment[2]?d:d-this.offset.click.left>=this.containment[0]?d-e.grid[0]:d+e.grid[0]:d)),{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():i?0:h.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():i?0:h.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?b.item[0]:b.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var e=this.counter;this._delay(function(){e===this.counter&&this.refreshPositions(!d)})},_clear:function(a,b){function c(a,b,c){return function(d){c._trigger(a,d,b._uiHash(b))}}this.reverting=!1;var d,e=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(d in this._storedCSS)"auto"!==this._storedCSS[d]&&"static"!==this._storedCSS[d]||(this._storedCSS[d]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!b&&e.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||b||e.push(function(a){this._trigger("update",a,this._uiHash())}),this!==this.currentContainer&&(b||(e.push(function(a){this._trigger("remove",a,this._uiHash())}),e.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.currentContainer)),e.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.currentContainer)))),d=this.containers.length-1;d>=0;d--)b||e.push(c("deactivate",this,this.containers[d])),this.containers[d].containerCache.over&&(e.push(c("out",this,this.containers[d])),this.containers[d].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,b||this._trigger("beforeStop",a,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!b){for(d=0;d<e.length;d++)e[d].call(this,a);this._trigger("stop",a,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}})});
\ No newline at end of file
index 79b101ef91f4e4414057dd2f4dac8ee27d26546e..95f0e7e2158f12a3718b2d240acbd23ad3fed5d8 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/spinner/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./button"],a):a(jQuery)}(function(a){function b(a){return function(){var b=this.element.val();a.apply(this,arguments),this._refresh(),b!==this.element.val()&&this._trigger("change")}}return a.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var b={},c=this.element;return a.each(["min","max","step"],function(a,d){var e=c.attr(d);void 0!==e&&e.length&&(b[d]=e)}),b},_events:{keydown:function(a){this._start(a)&&this._keydown(a)&&a.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",a)))},mousewheel:function(a,b){if(b){if(!this.spinning&&!this._start(a))return!1;this._spin((b>0?1:-1)*this.options.step,a),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(a)},100),a.preventDefault()}},"mousedown .ui-spinner-button":function(b){function c(){var a=this.element[0]===this.document[0].activeElement;a||(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d}))}var d;d=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),b.preventDefault(),c.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,c.call(this)}),this._start(b)!==!1&&this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(b){return a(b.currentTarget).hasClass("ui-state-active")?this._start(b)===!1?!1:void this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var a=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=a.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*a.height())&&a.height()>0&&a.height(a.height()),this.options.disabled&&this.disable()},_keydown:function(b){var c=this.options,d=a.ui.keyCode;switch(b.keyCode){case d.UP:return this._repeat(null,1,b),!0;case d.DOWN:return this._repeat(null,-1,b),!0;case d.PAGE_UP:return this._repeat(null,c.page,b),!0;case d.PAGE_DOWN:return this._repeat(null,-c.page,b),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(a){return this.spinning||this._trigger("start",a)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(a,b,c){a=a||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,b,c)},a),this._spin(b*this.options.step,c)},_spin:function(a,b){var c=this.value()||0;this.counter||(this.counter=1),c=this._adjustValue(c+a*this._increment(this.counter)),this.spinning&&this._trigger("spin",b,{value:c})===!1||(this._value(c),this.counter++)},_increment:function(b){var c=this.options.incremental;return c?a.isFunction(c)?c(b):Math.floor(b*b*b/5e4-b*b/500+17*b/200+1):1},_precision:function(){var a=this._precisionOf(this.options.step);return null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){var b=a.toString(),c=b.indexOf(".");return-1===c?0:b.length-c-1},_adjustValue:function(a){var b,c,d=this.options;return b=null!==d.min?d.min:0,c=a-b,c=Math.round(c/d.step)*d.step,a=b+c,a=parseFloat(a.toFixed(this._precision())),null!==d.max&&a>d.max?d.max:null!==d.min&&a<d.min?d.min:a},_stop:function(a){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",a))},_setOption:function(a,b){if("culture"===a||"numberFormat"===a){var c=this._parse(this.element.val());return this.options[a]=b,void this.element.val(this._format(c))}("max"===a||"min"===a||"step"===a)&&"string"==typeof b&&(b=this._parse(b)),"icons"===a&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(b.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(b.down)),this._super(a,b),"disabled"===a&&(this.widget().toggleClass("ui-state-disabled",!!b),this.element.prop("disabled",!!b),this.buttons.button(b?"disable":"enable"))},_setOptions:b(function(a){this._super(a)}),_parse:function(a){return"string"==typeof a&&""!==a&&(a=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(a,10,this.options.culture):+a),""===a||isNaN(a)?null:a},_format:function(a){return""===a?"":window.Globalize&&this.options.numberFormat?Globalize.format(a,this.options.numberFormat,this.options.culture):a},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var a=this.value();return null===a?!1:a===this._adjustValue(a)},_value:function(a,b){var c;""!==a&&(c=this._parse(a),null!==c&&(b||(c=this._adjustValue(c)),a=this._format(c))),this.element.val(a),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:b(function(a){this._stepUp(a)}),_stepUp:function(a){this._start()&&(this._spin((a||1)*this.options.step),this._stop())},stepDown:b(function(a){this._stepDown(a)}),_stepDown:function(a){this._start()&&(this._spin((a||1)*-this.options.step),this._stop())},pageUp:b(function(a){this._stepUp((a||1)*this.options.page)}),pageDown:b(function(a){this._stepDown((a||1)*this.options.page)}),value:function(a){return arguments.length?void b(this._value).call(this,a):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./button"],a):a(jQuery)}(function(a){function b(a){return function(){var b=this.element.val();a.apply(this,arguments),this._refresh(),b!==this.element.val()&&this._trigger("change")}}return a.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var b={},c=this.element;return a.each(["min","max","step"],function(a,d){var e=c.attr(d);void 0!==e&&e.length&&(b[d]=e)}),b},_events:{keydown:function(a){this._start(a)&&this._keydown(a)&&a.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",a)))},mousewheel:function(a,b){if(b){if(!this.spinning&&!this._start(a))return!1;this._spin((b>0?1:-1)*this.options.step,a),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(a)},100),a.preventDefault()}},"mousedown .ui-spinner-button":function(b){function c(){var a=this.element[0]===this.document[0].activeElement;a||(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d}))}var d;d=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),b.preventDefault(),c.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,c.call(this)}),this._start(b)!==!1&&this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(b){if(a(b.currentTarget).hasClass("ui-state-active"))return this._start(b)!==!1&&void this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var a=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=a.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*a.height())&&a.height()>0&&a.height(a.height()),this.options.disabled&&this.disable()},_keydown:function(b){var c=this.options,d=a.ui.keyCode;switch(b.keyCode){case d.UP:return this._repeat(null,1,b),!0;case d.DOWN:return this._repeat(null,-1,b),!0;case d.PAGE_UP:return this._repeat(null,c.page,b),!0;case d.PAGE_DOWN:return this._repeat(null,-c.page,b),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(a){return!(!this.spinning&&this._trigger("start",a)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(a,b,c){a=a||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,b,c)},a),this._spin(b*this.options.step,c)},_spin:function(a,b){var c=this.value()||0;this.counter||(this.counter=1),c=this._adjustValue(c+a*this._increment(this.counter)),this.spinning&&this._trigger("spin",b,{value:c})===!1||(this._value(c),this.counter++)},_increment:function(b){var c=this.options.incremental;return c?a.isFunction(c)?c(b):Math.floor(b*b*b/5e4-b*b/500+17*b/200+1):1},_precision:function(){var a=this._precisionOf(this.options.step);return null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){var b=a.toString(),c=b.indexOf(".");return c===-1?0:b.length-c-1},_adjustValue:function(a){var b,c,d=this.options;return b=null!==d.min?d.min:0,c=a-b,c=Math.round(c/d.step)*d.step,a=b+c,a=parseFloat(a.toFixed(this._precision())),null!==d.max&&a>d.max?d.max:null!==d.min&&a<d.min?d.min:a},_stop:function(a){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",a))},_setOption:function(a,b){if("culture"===a||"numberFormat"===a){var c=this._parse(this.element.val());return this.options[a]=b,void this.element.val(this._format(c))}"max"!==a&&"min"!==a&&"step"!==a||"string"==typeof b&&(b=this._parse(b)),"icons"===a&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(b.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(b.down)),this._super(a,b),"disabled"===a&&(this.widget().toggleClass("ui-state-disabled",!!b),this.element.prop("disabled",!!b),this.buttons.button(b?"disable":"enable"))},_setOptions:b(function(a){this._super(a)}),_parse:function(a){return"string"==typeof a&&""!==a&&(a=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(a,10,this.options.culture):+a),""===a||isNaN(a)?null:a},_format:function(a){return""===a?"":window.Globalize&&this.options.numberFormat?Globalize.format(a,this.options.numberFormat,this.options.culture):a},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var a=this.value();return null!==a&&a===this._adjustValue(a)},_value:function(a,b){var c;""!==a&&(c=this._parse(a),null!==c&&(b||(c=this._adjustValue(c)),a=this._format(c))),this.element.val(a),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:b(function(a){this._stepUp(a)}),_stepUp:function(a){this._start()&&(this._spin((a||1)*this.options.step),this._stop())},stepDown:b(function(a){this._stepDown(a)}),_stepDown:function(a){this._start()&&(this._spin((a||1)*-this.options.step),this._stop())},pageUp:b(function(a){this._stepUp((a||1)*this.options.page)}),pageDown:b(function(a){this._stepDown((a||1)*this.options.page)}),value:function(a){return arguments.length?void b(this._value).call(this,a):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})});
\ No newline at end of file
index d2bc0ccd8ac159abfe56a083986286aa075714cc..a946f032966c993f33df73ff9b9d922f5e98c55a 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/tabs/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var a=/#.*$/;return function(b){var c,d;b=b.cloneNode(!1),c=b.href.replace(a,""),d=location.href.replace(a,"");try{c=decodeURIComponent(c)}catch(e){}try{d=decodeURIComponent(d)}catch(e){}return b.hash.length>1&&c===d}}(),_create:function(){var b=this,c=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",c.collapsible),this._processTabs(),c.active=this._initialActive(),a.isArray(c.disabled)&&(c.disabled=a.unique(c.disabled.concat(a.map(this.tabs.filter(".ui-state-disabled"),function(a){return b.tabs.index(a)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(c.active):this.active=a(),this._refresh(),this.active.length&&this.load(c.active)},_initialActive:function(){var b=this.options.active,c=this.options.collapsible,d=location.hash.substring(1);return null===b&&(d&&this.tabs.each(function(c,e){return a(e).attr("aria-controls")===d?(b=c,!1):void 0}),null===b&&(b=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===b||-1===b)&&(b=this.tabs.length?0:!1)),b!==!1&&(b=this.tabs.index(this.tabs.eq(b)),-1===b&&(b=c?!1:0)),!c&&b===!1&&this.anchors.length&&(b=0),b},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):a()}},_tabKeydown:function(b){var c=a(this.document[0].activeElement).closest("li"),d=this.tabs.index(c),e=!0;if(!this._handlePageNav(b)){switch(b.keyCode){case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:d++;break;case a.ui.keyCode.UP:case a.ui.keyCode.LEFT:e=!1,d--;break;case a.ui.keyCode.END:d=this.anchors.length-1;break;case a.ui.keyCode.HOME:d=0;break;case a.ui.keyCode.SPACE:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d);case a.ui.keyCode.ENTER:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d===this.options.active?!1:d);default:return}b.preventDefault(),clearTimeout(this.activating),d=this._focusNextTab(d,e),b.ctrlKey||b.metaKey||(c.attr("aria-selected","false"),this.tabs.eq(d).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",d)},this.delay))}},_panelKeydown:function(b){this._handlePageNav(b)||b.ctrlKey&&b.keyCode===a.ui.keyCode.UP&&(b.preventDefault(),this.active.focus())},_handlePageNav:function(b){return b.altKey&&b.keyCode===a.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):b.altKey&&b.keyCode===a.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(b,c){function d(){return b>e&&(b=0),0>b&&(b=e),b}for(var e=this.tabs.length-1;-1!==a.inArray(d(),this.options.disabled);)b=c?b+1:b-1;return b},_focusNextTab:function(a,b){return a=this._findNextTab(a,b),this.tabs.eq(a).focus(),a},_setOption:function(a,b){return"active"===a?void this._activate(b):"disabled"===a?void this._setupDisabled(b):(this._super(a,b),"collapsible"===a&&(this.element.toggleClass("ui-tabs-collapsible",b),b||this.options.active!==!1||this._activate(0)),"event"===a&&this._setupEvents(b),void("heightStyle"===a&&this._setupHeightStyle(b)))},_sanitizeSelector:function(a){return a?a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var b=this.options,c=this.tablist.children(":has(a[href])");b.disabled=a.map(c.filter(".ui-state-disabled"),function(a){return c.index(a)}),this._processTabs(),b.active!==!1&&this.anchors.length?this.active.length&&!a.contains(this.tablist[0],this.active[0])?this.tabs.length===b.disabled.length?(b.active=!1,this.active=a()):this._activate(this._findNextTab(Math.max(0,b.active-1),!1)):b.active=this.tabs.index(this.active):(b.active=!1,this.active=a()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var b=this,c=this.tabs,d=this.anchors,e=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(b){a(this).is(".ui-state-disabled")&&b.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){a(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return a("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=a(),this.anchors.each(function(c,d){var e,f,g,h=a(d).uniqueId().attr("id"),i=a(d).closest("li"),j=i.attr("aria-controls");b._isLocal(d)?(e=d.hash,g=e.substring(1),f=b.element.find(b._sanitizeSelector(e))):(g=i.attr("aria-controls")||a({}).uniqueId()[0].id,e="#"+g,f=b.element.find(e),f.length||(f=b._createPanel(g),f.insertAfter(b.panels[c-1]||b.tablist)),f.attr("aria-live","polite")),f.length&&(b.panels=b.panels.add(f)),j&&i.data("ui-tabs-aria-controls",j),i.attr({"aria-controls":g,"aria-labelledby":h}),f.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),c&&(this._off(c.not(this.tabs)),this._off(d.not(this.anchors)),this._off(e.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(b){return a("<div>").attr("id",b).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(b){a.isArray(b)&&(b.length?b.length===this.anchors.length&&(b=!0):b=!1);for(var c,d=0;c=this.tabs[d];d++)b===!0||-1!==a.inArray(d,b)?a(c).addClass("ui-state-disabled").attr("aria-disabled","true"):a(c).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=b},_setupEvents:function(b){var c={};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(a){a.preventDefault()}}),this._on(this.anchors,c),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(b){var c,d=this.element.parent();"fill"===b?(c=d.height(),c-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var b=a(this),d=b.css("position");"absolute"!==d&&"fixed"!==d&&(c-=b.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){c-=a(this).outerHeight(!0)}),this.panels.each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===b&&(c=0,this.panels.each(function(){c=Math.max(c,a(this).height("").height())}).height(c))},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e.closest("li"),g=f[0]===d[0],h=g&&c.collapsible,i=h?a():this._getPanelForTab(f),j=d.length?this._getPanelForTab(d):a(),k={oldTab:d,oldPanel:j,newTab:h?a():f,newPanel:i};b.preventDefault(),f.hasClass("ui-state-disabled")||f.hasClass("ui-tabs-loading")||this.running||g&&!c.collapsible||this._trigger("beforeActivate",b,k)===!1||(c.active=h?!1:this.tabs.index(f),this.active=g?a():f,this.xhr&&this.xhr.abort(),j.length||i.length||a.error("jQuery UI Tabs: Mismatching fragment identifier."),i.length&&this.load(this.tabs.index(f),b),this._toggle(b,k))},_toggle:function(b,c){function d(){f.running=!1,f._trigger("activate",b,c)}function e(){c.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),g.length&&f.options.show?f._show(g,f.options.show,d):(g.show(),d())}var f=this,g=c.newPanel,h=c.oldPanel;this.running=!0,h.length&&this.options.hide?this._hide(h,this.options.hide,function(){c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),e()}):(c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),h.hide(),e()),h.attr("aria-hidden","true"),c.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),g.length&&h.length?c.oldTab.attr("tabIndex",-1):g.length&&this.tabs.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1),g.attr("aria-hidden","false"),c.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(b){var c,d=this._findActive(b);d[0]!==this.active[0]&&(d.length||(d=this.active),c=d.find(".ui-tabs-anchor")[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return b===!1?a():this.tabs.eq(b)},_getIndex:function(a){return"string"==typeof a&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){a.data(this,"ui-tabs-destroy")?a(this).remove():a(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var b=a(this),c=b.data("ui-tabs-aria-controls");c?b.attr("aria-controls",c).removeData("ui-tabs-aria-controls"):b.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(b){var c=this.options.disabled;c!==!1&&(void 0===b?c=!1:(b=this._getIndex(b),c=a.isArray(c)?a.map(c,function(a){return a!==b?a:null}):a.map(this.tabs,function(a,c){return c!==b?c:null})),this._setupDisabled(c))},disable:function(b){var c=this.options.disabled;if(c!==!0){if(void 0===b)c=!0;else{if(b=this._getIndex(b),-1!==a.inArray(b,c))return;c=a.isArray(c)?a.merge([b],c).sort():[b]}this._setupDisabled(c)}},load:function(b,c){b=this._getIndex(b);var d=this,e=this.tabs.eq(b),f=e.find(".ui-tabs-anchor"),g=this._getPanelForTab(e),h={tab:e,panel:g},i=function(a,b){"abort"===b&&d.panels.stop(!1,!0),e.removeClass("ui-tabs-loading"),g.removeAttr("aria-busy"),a===d.xhr&&delete d.xhr};this._isLocal(f[0])||(this.xhr=a.ajax(this._ajaxSettings(f,c,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(e.addClass("ui-tabs-loading"),g.attr("aria-busy","true"),this.xhr.done(function(a,b,e){setTimeout(function(){g.html(a),d._trigger("load",c,h),i(e,b)},1)}).fail(function(a,b){setTimeout(function(){i(a,b)},1)})))},_ajaxSettings:function(b,c,d){var e=this;return{url:b.attr("href"),beforeSend:function(b,f){return e._trigger("beforeLoad",c,a.extend({jqXHR:b,ajaxSettings:f},d))}}},_getPanelForTab:function(b){var c=a(b).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+c))}})});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],a):a(jQuery)}(function(a){return a.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var a=/#.*$/;return function(b){var c,d;b=b.cloneNode(!1),c=b.href.replace(a,""),d=location.href.replace(a,"");try{c=decodeURIComponent(c)}catch(e){}try{d=decodeURIComponent(d)}catch(e){}return b.hash.length>1&&c===d}}(),_create:function(){var b=this,c=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",c.collapsible),this._processTabs(),c.active=this._initialActive(),a.isArray(c.disabled)&&(c.disabled=a.unique(c.disabled.concat(a.map(this.tabs.filter(".ui-state-disabled"),function(a){return b.tabs.index(a)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(c.active):this.active=a(),this._refresh(),this.active.length&&this.load(c.active)},_initialActive:function(){var b=this.options.active,c=this.options.collapsible,d=location.hash.substring(1);return null===b&&(d&&this.tabs.each(function(c,e){if(a(e).attr("aria-controls")===d)return b=c,!1}),null===b&&(b=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==b&&b!==-1||(b=!!this.tabs.length&&0)),b!==!1&&(b=this.tabs.index(this.tabs.eq(b)),b===-1&&(b=!c&&0)),!c&&b===!1&&this.anchors.length&&(b=0),b},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):a()}},_tabKeydown:function(b){var c=a(this.document[0].activeElement).closest("li"),d=this.tabs.index(c),e=!0;if(!this._handlePageNav(b)){switch(b.keyCode){case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:d++;break;case a.ui.keyCode.UP:case a.ui.keyCode.LEFT:e=!1,d--;break;case a.ui.keyCode.END:d=this.anchors.length-1;break;case a.ui.keyCode.HOME:d=0;break;case a.ui.keyCode.SPACE:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d);case a.ui.keyCode.ENTER:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d!==this.options.active&&d);default:return}b.preventDefault(),clearTimeout(this.activating),d=this._focusNextTab(d,e),b.ctrlKey||b.metaKey||(c.attr("aria-selected","false"),this.tabs.eq(d).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",d)},this.delay))}},_panelKeydown:function(b){this._handlePageNav(b)||b.ctrlKey&&b.keyCode===a.ui.keyCode.UP&&(b.preventDefault(),this.active.focus())},_handlePageNav:function(b){return b.altKey&&b.keyCode===a.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):b.altKey&&b.keyCode===a.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(b,c){function d(){return b>e&&(b=0),b<0&&(b=e),b}for(var e=this.tabs.length-1;a.inArray(d(),this.options.disabled)!==-1;)b=c?b+1:b-1;return b},_focusNextTab:function(a,b){return a=this._findNextTab(a,b),this.tabs.eq(a).focus(),a},_setOption:function(a,b){return"active"===a?void this._activate(b):"disabled"===a?void this._setupDisabled(b):(this._super(a,b),"collapsible"===a&&(this.element.toggleClass("ui-tabs-collapsible",b),b||this.options.active!==!1||this._activate(0)),"event"===a&&this._setupEvents(b),void("heightStyle"===a&&this._setupHeightStyle(b)))},_sanitizeSelector:function(a){return a?a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var b=this.options,c=this.tablist.children(":has(a[href])");b.disabled=a.map(c.filter(".ui-state-disabled"),function(a){return c.index(a)}),this._processTabs(),b.active!==!1&&this.anchors.length?this.active.length&&!a.contains(this.tablist[0],this.active[0])?this.tabs.length===b.disabled.length?(b.active=!1,this.active=a()):this._activate(this._findNextTab(Math.max(0,b.active-1),!1)):b.active=this.tabs.index(this.active):(b.active=!1,this.active=a()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var b=this,c=this.tabs,d=this.anchors,e=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(b){a(this).is(".ui-state-disabled")&&b.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){a(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return a("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=a(),this.anchors.each(function(c,d){var e,f,g,h=a(d).uniqueId().attr("id"),i=a(d).closest("li"),j=i.attr("aria-controls");b._isLocal(d)?(e=d.hash,g=e.substring(1),f=b.element.find(b._sanitizeSelector(e))):(g=i.attr("aria-controls")||a({}).uniqueId()[0].id,e="#"+g,f=b.element.find(e),f.length||(f=b._createPanel(g),f.insertAfter(b.panels[c-1]||b.tablist)),f.attr("aria-live","polite")),f.length&&(b.panels=b.panels.add(f)),j&&i.data("ui-tabs-aria-controls",j),i.attr({"aria-controls":g,"aria-labelledby":h}),f.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),c&&(this._off(c.not(this.tabs)),this._off(d.not(this.anchors)),this._off(e.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(b){return a("<div>").attr("id",b).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(b){a.isArray(b)&&(b.length?b.length===this.anchors.length&&(b=!0):b=!1);for(var c,d=0;c=this.tabs[d];d++)b===!0||a.inArray(d,b)!==-1?a(c).addClass("ui-state-disabled").attr("aria-disabled","true"):a(c).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=b},_setupEvents:function(b){var c={};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(a){a.preventDefault()}}),this._on(this.anchors,c),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(b){var c,d=this.element.parent();"fill"===b?(c=d.height(),c-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var b=a(this),d=b.css("position");"absolute"!==d&&"fixed"!==d&&(c-=b.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){c-=a(this).outerHeight(!0)}),this.panels.each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===b&&(c=0,this.panels.each(function(){c=Math.max(c,a(this).height("").height())}).height(c))},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e.closest("li"),g=f[0]===d[0],h=g&&c.collapsible,i=h?a():this._getPanelForTab(f),j=d.length?this._getPanelForTab(d):a(),k={oldTab:d,oldPanel:j,newTab:h?a():f,newPanel:i};b.preventDefault(),f.hasClass("ui-state-disabled")||f.hasClass("ui-tabs-loading")||this.running||g&&!c.collapsible||this._trigger("beforeActivate",b,k)===!1||(c.active=!h&&this.tabs.index(f),this.active=g?a():f,this.xhr&&this.xhr.abort(),j.length||i.length||a.error("jQuery UI Tabs: Mismatching fragment identifier."),i.length&&this.load(this.tabs.index(f),b),this._toggle(b,k))},_toggle:function(b,c){function d(){f.running=!1,f._trigger("activate",b,c)}function e(){c.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),g.length&&f.options.show?f._show(g,f.options.show,d):(g.show(),d())}var f=this,g=c.newPanel,h=c.oldPanel;this.running=!0,h.length&&this.options.hide?this._hide(h,this.options.hide,function(){c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),e()}):(c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),h.hide(),e()),h.attr("aria-hidden","true"),c.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),g.length&&h.length?c.oldTab.attr("tabIndex",-1):g.length&&this.tabs.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1),g.attr("aria-hidden","false"),c.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(b){var c,d=this._findActive(b);d[0]!==this.active[0]&&(d.length||(d=this.active),c=d.find(".ui-tabs-anchor")[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return b===!1?a():this.tabs.eq(b)},_getIndex:function(a){return"string"==typeof a&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){a.data(this,"ui-tabs-destroy")?a(this).remove():a(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var b=a(this),c=b.data("ui-tabs-aria-controls");c?b.attr("aria-controls",c).removeData("ui-tabs-aria-controls"):b.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(b){var c=this.options.disabled;c!==!1&&(void 0===b?c=!1:(b=this._getIndex(b),c=a.isArray(c)?a.map(c,function(a){return a!==b?a:null}):a.map(this.tabs,function(a,c){return c!==b?c:null})),this._setupDisabled(c))},disable:function(b){var c=this.options.disabled;if(c!==!0){if(void 0===b)c=!0;else{if(b=this._getIndex(b),a.inArray(b,c)!==-1)return;c=a.isArray(c)?a.merge([b],c).sort():[b]}this._setupDisabled(c)}},load:function(b,c){b=this._getIndex(b);var d=this,e=this.tabs.eq(b),f=e.find(".ui-tabs-anchor"),g=this._getPanelForTab(e),h={tab:e,panel:g},i=function(a,b){"abort"===b&&d.panels.stop(!1,!0),e.removeClass("ui-tabs-loading"),g.removeAttr("aria-busy"),a===d.xhr&&delete d.xhr};this._isLocal(f[0])||(this.xhr=a.ajax(this._ajaxSettings(f,c,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(e.addClass("ui-tabs-loading"),g.attr("aria-busy","true"),this.xhr.done(function(a,b,e){setTimeout(function(){g.html(a),d._trigger("load",c,h),i(e,b)},1)}).fail(function(a,b){setTimeout(function(){i(a,b)},1)})))},_ajaxSettings:function(b,c,d){var e=this;return{url:b.attr("href"),beforeSend:function(b,f){return e._trigger("beforeLoad",c,a.extend({jqXHR:b,ajaxSettings:f},d))}}},_getPanelForTab:function(b){var c=a(b).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+c))}})});
\ No newline at end of file
index aa97932d7ef20d1e791b707115c2d5f22d668b76..b6dec40b3657b5cc2d05b7500ebeb9d40b1664af 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/tooltip/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position"],a):a(jQuery)}(function(a){return a.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var b=a(this).attr("title")||"";return a("<a>").text(b).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(b,c){var d=(b.attr("aria-describedby")||"").split(/\s+/);d.push(c),b.data("ui-tooltip-id",c).attr("aria-describedby",a.trim(d.join(" ")))},_removeDescribedBy:function(b){var c=b.data("ui-tooltip-id"),d=(b.attr("aria-describedby")||"").split(/\s+/),e=a.inArray(c,d);-1!==e&&d.splice(e,1),b.removeData("ui-tooltip-id"),d=a.trim(d.join(" ")),d?b.attr("aria-describedby",d):b.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=a("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(b,c){var d=this;return"disabled"===b?(this[c?"_disable":"_enable"](),void(this.options[b]=c)):(this._super(b,c),void("content"===b&&a.each(this.tooltips,function(a,b){d._updateContent(b.element)})))},_disable:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur");e.target=e.currentTarget=d.element[0],b.close(e,!0)}),this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.is("[title]")&&b.data("ui-tooltip-title",b.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.data("ui-tooltip-title")&&b.attr("title",b.data("ui-tooltip-title"))})},open:function(b){var c=this,d=a(b?b.target:this.element).closest(this.options.items);d.length&&!d.data("ui-tooltip-id")&&(d.attr("title")&&d.data("ui-tooltip-title",d.attr("title")),d.data("ui-tooltip-open",!0),b&&"mouseover"===b.type&&d.parents().each(function(){var b,d=a(this);d.data("ui-tooltip-open")&&(b=a.Event("blur"),b.target=b.currentTarget=this,c.close(b,!0)),d.attr("title")&&(d.uniqueId(),c.parents[this.id]={element:this,title:d.attr("title")},d.attr("title",""))}),this._registerCloseHandlers(b,d),this._updateContent(d,b))},_updateContent:function(a,b){var c,d=this.options.content,e=this,f=b?b.type:null;return"string"==typeof d?this._open(b,a,d):(c=d.call(a[0],function(c){e._delay(function(){a.data("ui-tooltip-open")&&(b&&(b.type=f),this._open(b,a,c))})}),void(c&&this._open(b,a,c)))},_open:function(b,c,d){function e(a){j.of=a,g.is(":hidden")||g.position(j)}var f,g,h,i,j=a.extend({},this.options.position);if(d){if(f=this._find(c))return void f.tooltip.find(".ui-tooltip-content").html(d);c.is("[title]")&&(b&&"mouseover"===b.type?c.attr("title",""):c.removeAttr("title")),f=this._tooltip(c),g=f.tooltip,this._addDescribedBy(c,g.attr("id")),g.find(".ui-tooltip-content").html(d),this.liveRegion.children().hide(),d.clone?(i=d.clone(),i.removeAttr("id").find("[id]").removeAttr("id")):i=d,a("<div>").html(i).appendTo(this.liveRegion),this.options.track&&b&&/^mouse/.test(b.type)?(this._on(this.document,{mousemove:e}),e(b)):g.position(a.extend({of:c},this.options.position)),g.hide(),this._show(g,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){g.is(":visible")&&(e(j.of),clearInterval(h))},a.fx.interval)),this._trigger("open",b,{tooltip:g})}},_registerCloseHandlers:function(b,c){var d={keyup:function(b){if(b.keyCode===a.ui.keyCode.ESCAPE){var d=a.Event(b);d.currentTarget=c[0],this.close(d,!0)}}};c[0]!==this.element[0]&&(d.remove=function(){this._removeTooltip(this._find(c).tooltip)}),b&&"mouseover"!==b.type||(d.mouseleave="close"),b&&"focusin"!==b.type||(d.focusout="close"),this._on(!0,c,d)},close:function(b){var c,d=this,e=a(b?b.currentTarget:this.element),f=this._find(e);return f?(c=f.tooltip,void(f.closing||(clearInterval(this.delayedShow),e.data("ui-tooltip-title")&&!e.attr("title")&&e.attr("title",e.data("ui-tooltip-title")),this._removeDescribedBy(e),f.hiding=!0,c.stop(!0),this._hide(c,this.options.hide,function(){d._removeTooltip(a(this))}),e.removeData("ui-tooltip-open"),this._off(e,"mouseleave focusout keyup"),e[0]!==this.element[0]&&this._off(e,"remove"),this._off(this.document,"mousemove"),b&&"mouseleave"===b.type&&a.each(this.parents,function(b,c){a(c.element).attr("title",c.title),delete d.parents[b]}),f.closing=!0,this._trigger("close",b,{tooltip:c}),f.hiding||(f.closing=!1)))):void e.removeData("ui-tooltip-open")},_tooltip:function(b){var c=a("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),d=c.uniqueId().attr("id");return a("<div>").addClass("ui-tooltip-content").appendTo(c),c.appendTo(this.document[0].body),this.tooltips[d]={element:b,tooltip:c}},_find:function(a){var b=a.data("ui-tooltip-id");return b?this.tooltips[b]:null},_removeTooltip:function(a){a.remove(),delete this.tooltips[a.attr("id")]},_destroy:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur"),f=d.element;e.target=e.currentTarget=f[0],b.close(e,!0),a("#"+c).remove(),f.data("ui-tooltip-title")&&(f.attr("title")||f.attr("title",f.data("ui-tooltip-title")),f.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position"],a):a(jQuery)}(function(a){return a.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var b=a(this).attr("title")||"";return a("<a>").text(b).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(b,c){var d=(b.attr("aria-describedby")||"").split(/\s+/);d.push(c),b.data("ui-tooltip-id",c).attr("aria-describedby",a.trim(d.join(" ")))},_removeDescribedBy:function(b){var c=b.data("ui-tooltip-id"),d=(b.attr("aria-describedby")||"").split(/\s+/),e=a.inArray(c,d);e!==-1&&d.splice(e,1),b.removeData("ui-tooltip-id"),d=a.trim(d.join(" ")),d?b.attr("aria-describedby",d):b.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=a("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(b,c){var d=this;return"disabled"===b?(this[c?"_disable":"_enable"](),void(this.options[b]=c)):(this._super(b,c),void("content"===b&&a.each(this.tooltips,function(a,b){d._updateContent(b.element)})))},_disable:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur");e.target=e.currentTarget=d.element[0],b.close(e,!0)}),this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.is("[title]")&&b.data("ui-tooltip-title",b.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.data("ui-tooltip-title")&&b.attr("title",b.data("ui-tooltip-title"))})},open:function(b){var c=this,d=a(b?b.target:this.element).closest(this.options.items);d.length&&!d.data("ui-tooltip-id")&&(d.attr("title")&&d.data("ui-tooltip-title",d.attr("title")),d.data("ui-tooltip-open",!0),b&&"mouseover"===b.type&&d.parents().each(function(){var b,d=a(this);d.data("ui-tooltip-open")&&(b=a.Event("blur"),b.target=b.currentTarget=this,c.close(b,!0)),d.attr("title")&&(d.uniqueId(),c.parents[this.id]={element:this,title:d.attr("title")},d.attr("title",""))}),this._registerCloseHandlers(b,d),this._updateContent(d,b))},_updateContent:function(a,b){var c,d=this.options.content,e=this,f=b?b.type:null;return"string"==typeof d?this._open(b,a,d):(c=d.call(a[0],function(c){e._delay(function(){a.data("ui-tooltip-open")&&(b&&(b.type=f),this._open(b,a,c))})}),void(c&&this._open(b,a,c)))},_open:function(b,c,d){function e(a){j.of=a,g.is(":hidden")||g.position(j)}var f,g,h,i,j=a.extend({},this.options.position);if(d){if(f=this._find(c))return void f.tooltip.find(".ui-tooltip-content").html(d);c.is("[title]")&&(b&&"mouseover"===b.type?c.attr("title",""):c.removeAttr("title")),f=this._tooltip(c),g=f.tooltip,this._addDescribedBy(c,g.attr("id")),g.find(".ui-tooltip-content").html(d),this.liveRegion.children().hide(),d.clone?(i=d.clone(),i.removeAttr("id").find("[id]").removeAttr("id")):i=d,a("<div>").html(i).appendTo(this.liveRegion),this.options.track&&b&&/^mouse/.test(b.type)?(this._on(this.document,{mousemove:e}),e(b)):g.position(a.extend({of:c},this.options.position)),g.hide(),this._show(g,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){g.is(":visible")&&(e(j.of),clearInterval(h))},a.fx.interval)),this._trigger("open",b,{tooltip:g})}},_registerCloseHandlers:function(b,c){var d={keyup:function(b){if(b.keyCode===a.ui.keyCode.ESCAPE){var d=a.Event(b);d.currentTarget=c[0],this.close(d,!0)}}};c[0]!==this.element[0]&&(d.remove=function(){this._removeTooltip(this._find(c).tooltip)}),b&&"mouseover"!==b.type||(d.mouseleave="close"),b&&"focusin"!==b.type||(d.focusout="close"),this._on(!0,c,d)},close:function(b){var c,d=this,e=a(b?b.currentTarget:this.element),f=this._find(e);return f?(c=f.tooltip,void(f.closing||(clearInterval(this.delayedShow),e.data("ui-tooltip-title")&&!e.attr("title")&&e.attr("title",e.data("ui-tooltip-title")),this._removeDescribedBy(e),f.hiding=!0,c.stop(!0),this._hide(c,this.options.hide,function(){d._removeTooltip(a(this))}),e.removeData("ui-tooltip-open"),this._off(e,"mouseleave focusout keyup"),e[0]!==this.element[0]&&this._off(e,"remove"),this._off(this.document,"mousemove"),b&&"mouseleave"===b.type&&a.each(this.parents,function(b,c){a(c.element).attr("title",c.title),delete d.parents[b]}),f.closing=!0,this._trigger("close",b,{tooltip:c}),f.hiding||(f.closing=!1)))):void e.removeData("ui-tooltip-open")},_tooltip:function(b){var c=a("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),d=c.uniqueId().attr("id");return a("<div>").addClass("ui-tooltip-content").appendTo(c),c.appendTo(this.document[0].body),this.tooltips[d]={element:b,tooltip:c}},_find:function(a){var b=a.data("ui-tooltip-id");return b?this.tooltips[b]:null},_removeTooltip:function(a){a.remove(),delete this.tooltips[a.attr("id")]},_destroy:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur"),f=d.element;e.target=e.currentTarget=f[0],b.close(e,!0),a("#"+c).remove(),f.data("ui-tooltip-title")&&(f.attr("title")||f.attr("title",f.data("ui-tooltip-title")),f.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})});
\ No newline at end of file
index 5d10f5dca79f8a06a0379aa9f07e699d12be86de..aa56ad72e933559c4c6a626247b76a98ede27b1b 100644 (file)
@@ -8,4 +8,4 @@
  *
  * http://api.jqueryui.com/jQuery.widget/
  */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){var b=0,c=Array.prototype.slice;return a.cleanData=function(b){return function(c){var d,e,f;for(f=0;null!=(e=c[f]);f++)try{d=a._data(e,"events"),d&&d.remove&&a(e).triggerHandler("remove")}catch(g){}b(c)}}(a.cleanData),a.widget=function(b,c,d){var e,f,g,h,i={},j=b.split(".")[0];return b=b.split(".")[1],e=j+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[j]=a[j]||{},f=a[j][b],g=a[j][b]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new g(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,d){return a.isFunction(d)?void(i[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},e=function(a){return c.prototype[b].apply(this,a)};return function(){var b,c=this._super,f=this._superApply;return this._super=a,this._superApply=e,b=d.apply(this,arguments),this._super=c,this._superApply=f,b}}()):void(i[b]=d)}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix||b:b},i,{constructor:g,namespace:j,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g),g},a.widget.extend=function(b){for(var d,e,f=c.call(arguments,1),g=0,h=f.length;h>g;g++)for(d in f[g])e=f[g][d],f[g].hasOwnProperty(d)&&void 0!==e&&(a.isPlainObject(e)?b[d]=a.isPlainObject(b[d])?a.widget.extend({},b[d],e):a.widget.extend({},e):b[d]=e);return b},a.widget.bridge=function(b,d){var e=d.prototype.widgetFullName||b;a.fn[b]=function(f){var g="string"==typeof f,h=c.call(arguments,1),i=this;return g?this.each(function(){var c,d=a.data(this,e);return"instance"===f?(i=d,!1):d?a.isFunction(d[f])&&"_"!==f.charAt(0)?(c=d[f].apply(d,h),c!==d&&void 0!==c?(i=c&&c.jquery?i.pushStack(c.get()):c,!1):void 0):a.error("no such method '"+f+"' for "+b+" widget instance"):a.error("cannot call methods on "+b+" prior to initialization; attempted to call method '"+f+"'")}):(h.length&&(f=a.widget.extend.apply(null,[f].concat(h))),this.each(function(){var b=a.data(this,e);b?(b.option(f||{}),b._init&&b._init()):a.data(this,e,new d(f,this))})),i}},a.Widget=function(){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(c,d){d=a(d||this.defaultElement||this)[0],this.element=a(d),this.uuid=b++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=a(),this.hoverable=a(),this.focusable=a(),d!==this&&(a.data(d,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this.options=a.widget.extend({},this.options,this._getCreateOptions(),c),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(b,c){var d,e,f,g=b;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof b)if(g={},d=b.split("."),b=d.shift(),d.length){for(e=g[b]=a.widget.extend({},this.options[b]),f=0;f<d.length-1;f++)e[d[f]]=e[d[f]]||{},e=e[d[f]];if(b=d.pop(),1===arguments.length)return void 0===e[b]?null:e[b];e[b]=c}else{if(1===arguments.length)return void 0===this.options[b]?null:this.options[b];g[b]=c}return this._setOptions(g),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!b),b&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(b,c,d){var e,f=this;"boolean"!=typeof b&&(d=c,c=b,b=!1),d?(c=e=a(c),this.bindings=this.bindings.add(c)):(d=c,c=this.element,e=this.widget()),a.each(d,function(d,g){function h(){return b||f.options.disabled!==!0&&!a(this).hasClass("ui-state-disabled")?("string"==typeof g?f[g]:g).apply(f,arguments):void 0}"string"!=typeof g&&(h.guid=g.guid=g.guid||h.guid||a.guid++);var i=d.match(/^([\w:-]*)\s*(.*)$/),j=i[1]+f.eventNamespace,k=i[2];k?e.delegate(k,j,h):c.bind(j,h)})},_off:function(b,c){c=(c||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,b.unbind(c).undelegate(c),this.bindings=a(this.bindings.not(b).get()),this.focusable=a(this.focusable.not(b).get()),this.hoverable=a(this.hoverable.not(b).get())},_delay:function(a,b){function c(){return("string"==typeof a?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b),this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===!1||c.isDefaultPrevented())}},a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){"string"==typeof e&&(e={effect:e});var g,h=e?e===!0||"number"==typeof e?c:e.effect||c:b;e=e||{},"number"==typeof e&&(e={duration:e}),g=!a.isEmptyObject(e),e.complete=f,e.delay&&d.delay(e.delay),g&&a.effects&&a.effects.effect[h]?d[b](e):h!==b&&d[h]?d[h](e.duration,e.easing,f):d.queue(function(c){a(this)[b](),f&&f.call(d[0]),c()})}}),a.widget});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){var b=0,c=Array.prototype.slice;return a.cleanData=function(b){return function(c){var d,e,f;for(f=0;null!=(e=c[f]);f++)try{d=a._data(e,"events"),d&&d.remove&&a(e).triggerHandler("remove")}catch(g){}b(c)}}(a.cleanData),a.widget=function(b,c,d){var e,f,g,h,i={},j=b.split(".")[0];return b=b.split(".")[1],e=j+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[j]=a[j]||{},f=a[j][b],g=a[j][b]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new g(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,d){return a.isFunction(d)?void(i[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},e=function(a){return c.prototype[b].apply(this,a)};return function(){var b,c=this._super,f=this._superApply;return this._super=a,this._superApply=e,b=d.apply(this,arguments),this._super=c,this._superApply=f,b}}()):void(i[b]=d)}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix||b:b},i,{constructor:g,namespace:j,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g),g},a.widget.extend=function(b){for(var d,e,f=c.call(arguments,1),g=0,h=f.length;g<h;g++)for(d in f[g])e=f[g][d],f[g].hasOwnProperty(d)&&void 0!==e&&(a.isPlainObject(e)?b[d]=a.isPlainObject(b[d])?a.widget.extend({},b[d],e):a.widget.extend({},e):b[d]=e);return b},a.widget.bridge=function(b,d){var e=d.prototype.widgetFullName||b;a.fn[b]=function(f){var g="string"==typeof f,h=c.call(arguments,1),i=this;return g?this.each(function(){var c,d=a.data(this,e);return"instance"===f?(i=d,!1):d?a.isFunction(d[f])&&"_"!==f.charAt(0)?(c=d[f].apply(d,h),c!==d&&void 0!==c?(i=c&&c.jquery?i.pushStack(c.get()):c,!1):void 0):a.error("no such method '"+f+"' for "+b+" widget instance"):a.error("cannot call methods on "+b+" prior to initialization; attempted to call method '"+f+"'")}):(h.length&&(f=a.widget.extend.apply(null,[f].concat(h))),this.each(function(){var b=a.data(this,e);b?(b.option(f||{}),b._init&&b._init()):a.data(this,e,new d(f,this))})),i}},a.Widget=function(){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(c,d){d=a(d||this.defaultElement||this)[0],this.element=a(d),this.uuid=b++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=a(),this.hoverable=a(),this.focusable=a(),d!==this&&(a.data(d,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this.options=a.widget.extend({},this.options,this._getCreateOptions(),c),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(b,c){var d,e,f,g=b;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof b)if(g={},d=b.split("."),b=d.shift(),d.length){for(e=g[b]=a.widget.extend({},this.options[b]),f=0;f<d.length-1;f++)e[d[f]]=e[d[f]]||{},e=e[d[f]];if(b=d.pop(),1===arguments.length)return void 0===e[b]?null:e[b];e[b]=c}else{if(1===arguments.length)return void 0===this.options[b]?null:this.options[b];g[b]=c}return this._setOptions(g),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!b),b&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(b,c,d){var e,f=this;"boolean"!=typeof b&&(d=c,c=b,b=!1),d?(c=e=a(c),this.bindings=this.bindings.add(c)):(d=c,c=this.element,e=this.widget()),a.each(d,function(d,g){function h(){if(b||f.options.disabled!==!0&&!a(this).hasClass("ui-state-disabled"))return("string"==typeof g?f[g]:g).apply(f,arguments)}"string"!=typeof g&&(h.guid=g.guid=g.guid||h.guid||a.guid++);var i=d.match(/^([\w:-]*)\s*(.*)$/),j=i[1]+f.eventNamespace,k=i[2];k?e.delegate(k,j,h):c.bind(j,h)})},_off:function(b,c){c=(c||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,b.unbind(c).undelegate(c),this.bindings=a(this.bindings.not(b).get()),this.focusable=a(this.focusable.not(b).get()),this.hoverable=a(this.hoverable.not(b).get())},_delay:function(a,b){function c(){return("string"==typeof a?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b),this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===!1||c.isDefaultPrevented())}},a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){"string"==typeof e&&(e={effect:e});var g,h=e?e===!0||"number"==typeof e?c:e.effect||c:b;e=e||{},"number"==typeof e&&(e={duration:e}),g=!a.isEmptyObject(e),e.complete=f,e.delay&&d.delay(e.delay),g&&a.effects&&a.effects.effect[h]?d[b](e):h!==b&&d[h]?d[h](e.duration,e.easing,f):d.queue(function(c){a(this)[b](),f&&f.call(d[0]),c()})}}),a.widget});
\ No newline at end of file
index a4aaec1999c5f73169668b91fa9093e76fb09df1..2aee87789f4ea2e2c2dcf5192dc5bf806d3c2a65 100644 (file)
@@ -1 +1 @@
-"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(a){return 10>a?"0"+a:a}function this_value(){return this.valueOf()}function quote(a){return rx_escapable.lastIndex=0,rx_escapable.test(a)?'"'+a.replace(rx_escapable,function(a){var b=meta[a];return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g,h=gap,i=b[a];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(a)),"function"==typeof rep&&(i=rep.call(b,a,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,g=[],"[object Array]"===Object.prototype.toString.apply(i)){for(f=i.length,c=0;f>c;c+=1)g[c]=str(c,i)||"null";return e=0===g.length?"[]":gap?"[\n"+gap+g.join(",\n"+gap)+"\n"+h+"]":"["+g.join(",")+"]",gap=h,e}if(rep&&"object"==typeof rep)for(f=rep.length,c=0;f>c;c+=1)"string"==typeof rep[c]&&(d=rep[c],e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));else for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));return e=0===g.length?"{}":gap?"{\n"+gap+g.join(",\n"+gap)+"\n"+h+"}":"{"+g.join(",")+"}",gap=h,e}}var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","        ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(a,b,c){var d;if(gap="",indent="","number"==typeof c)for(d=0;c>d;d+=1)indent+=" ";else"string"==typeof c&&(indent=c);if(rep=b,b&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw new Error("JSON.stringify");return str("",{"":a})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e)for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}();
\ No newline at end of file
+"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(a){return a<10?"0"+a:a}function this_value(){return this.valueOf()}function quote(a){return rx_escapable.lastIndex=0,rx_escapable.test(a)?'"'+a.replace(rx_escapable,function(a){var b=meta[a];return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g,h=gap,i=b[a];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(a)),"function"==typeof rep&&(i=rep.call(b,a,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,g=[],"[object Array]"===Object.prototype.toString.apply(i)){for(f=i.length,c=0;c<f;c+=1)g[c]=str(c,i)||"null";return e=0===g.length?"[]":gap?"[\n"+gap+g.join(",\n"+gap)+"\n"+h+"]":"["+g.join(",")+"]",gap=h,e}if(rep&&"object"==typeof rep)for(f=rep.length,c=0;c<f;c+=1)"string"==typeof rep[c]&&(d=rep[c],e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));else for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));return e=0===g.length?"{}":gap?"{\n"+gap+g.join(",\n"+gap)+"\n"+h+"}":"{"+g.join(",")+"}",gap=h,e}}var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(a,b,c){var d;if(gap="",indent="","number"==typeof c)for(d=0;d<c;d+=1)indent+=" ";else"string"==typeof c&&(indent=c);if(rep=b,b&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw new Error("JSON.stringify");return str("",{"":a})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e)for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}();
\ No newline at end of file
index da920b7bd2a11423d16eb685e5d92664c1196471..efb1584c5dde0b004d01a2a2971d991d3c4d01e6 100644 (file)
@@ -1,17 +1,9 @@
 /*!
- * Masonry PACKAGED v3.1.4
+ * Masonry PACKAGED v3.3.2
  * Cascading grid layout library
  * http://masonry.desandro.com
  * MIT License
  * by David DeSandro
  */
 
-(function(t){function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function o(e,i){t.fn[e]=function(o){if("string"==typeof o){for(var s=n.call(arguments,1),a=0,h=this.length;h>a;a++){var p=this[a],u=t.data(p,e);if(u)if(t.isFunction(u[o])&&"_"!==o.charAt(0)){var f=u[o].apply(u,s);if(void 0!==f)return f}else r("no such method '"+o+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; "+"attempted to call '"+o+"'")}return this}return this.each(function(){var n=t.data(this,e);n?(n.option(o),n._init()):(n=new i(this,o),t.data(this,e,n))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),o(t,e)},t.bridget}}var n=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):i(t.jQuery)})(window),function(t){function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,n=function(){};i.addEventListener?n=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(n=function(t,i,n){t[i+n]=n.handleEvent?function(){var i=e(t);n.handleEvent.call(n,i)}:function(){var i=e(t);n.call(t,i)},t.attachEvent("on"+i,t[i+n])});var o=function(){};i.removeEventListener?o=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(o=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(n){t[e+i]=void 0}});var r={bind:n,unbind:o};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(this),function(t){function e(t){"function"==typeof t&&(e.isReady?t():r.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==o.readyState;if(!e.isReady&&!i){e.isReady=!0;for(var n=0,s=r.length;s>n;n++){var a=r[n];a()}}}function n(n){return n.bind(o,"DOMContentLoaded",i),n.bind(o,"readystatechange",i),n.bind(t,"load",i),e}var o=t.document,r=[];e.isReady=!1,"function"==typeof define&&define.amd?(e.isReady="function"==typeof requirejs,define("doc-ready/doc-ready",["eventie/eventie"],n)):t.docReady=n(t.eventie)}(this),function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var n=t.prototype,o=this,r=o.EventEmitter;n.getListeners=function(t){var e,i,n=this._getEvents();if(t instanceof RegExp){e={};for(i in n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i])}else e=n[t]||(n[t]=[]);return e},n.flattenListeners=function(t){var e,i=[];for(e=0;t.length>e;e+=1)i.push(t[e].listener);return i},n.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},n.addListener=function(t,i){var n,o=this.getListenersAsObject(t),r="object"==typeof i;for(n in o)o.hasOwnProperty(n)&&-1===e(o[n],i)&&o[n].push(r?i:{listener:i,once:!1});return this},n.on=i("addListener"),n.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},n.once=i("addOnceListener"),n.defineEvent=function(t){return this.getListeners(t),this},n.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},n.removeListener=function(t,i){var n,o,r=this.getListenersAsObject(t);for(o in r)r.hasOwnProperty(o)&&(n=e(r[o],i),-1!==n&&r[o].splice(n,1));return this},n.off=i("removeListener"),n.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},n.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},n.manipulateListeners=function(t,e,i){var n,o,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(n=i.length;n--;)r.call(this,e,i[n]);else for(n in e)e.hasOwnProperty(n)&&(o=e[n])&&("function"==typeof o?r.call(this,n,o):s.call(this,n,o));return this},n.removeEvent=function(t){var e,i=typeof t,n=this._getEvents();if("string"===i)delete n[t];else if(t instanceof RegExp)for(e in n)n.hasOwnProperty(e)&&t.test(e)&&delete n[e];else delete this._events;return this},n.removeAllListeners=i("removeEvent"),n.emitEvent=function(t,e){var i,n,o,r,s=this.getListenersAsObject(t);for(o in s)if(s.hasOwnProperty(o))for(n=s[o].length;n--;)i=s[o][n],i.once===!0&&this.removeListener(t,i.listener),r=i.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},n.trigger=i("emitEvent"),n.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},n.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},n._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},n._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return o.EventEmitter=r,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:this.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof n[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,o=0,r=i.length;r>o;o++)if(e=i[o]+t,"string"==typeof n[e])return e}}var i="Webkit Moz ms Ms O".split(" "),n=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){function e(t){var e=parseFloat(t),i=-1===t.indexOf("%")&&!isNaN(e);return i&&e}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=s.length;i>e;e++){var n=s[e];t[n]=0}return t}function n(t){function n(t){if("string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var n=r(t);if("none"===n.display)return i();var o={};o.width=t.offsetWidth,o.height=t.offsetHeight;for(var u=o.isBorderBox=!(!p||!n[p]||"border-box"!==n[p]),f=0,c=s.length;c>f;f++){var d=s[f],l=n[d];l=a(t,l);var m=parseFloat(l);o[d]=isNaN(m)?0:m}var y=o.paddingLeft+o.paddingRight,g=o.paddingTop+o.paddingBottom,v=o.marginLeft+o.marginRight,b=o.marginTop+o.marginBottom,_=o.borderLeftWidth+o.borderRightWidth,E=o.borderTopWidth+o.borderBottomWidth,L=u&&h,x=e(n.width);x!==!1&&(o.width=x+(L?0:y+_));var z=e(n.height);return z!==!1&&(o.height=z+(L?0:g+E)),o.innerWidth=o.width-(y+_),o.innerHeight=o.height-(g+E),o.outerWidth=o.width+v,o.outerHeight=o.height+b,o}}function a(t,e){if(o||-1===e.indexOf("%"))return e;var i=t.style,n=i.left,r=t.runtimeStyle,s=r&&r.left;return s&&(r.left=t.currentStyle.left),i.left=e,e=i.pixelLeft,i.left=n,s&&(r.left=s),e}var h,p=t("boxSizing");return function(){if(p){var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style[p]="border-box";var i=document.body||document.documentElement;i.appendChild(t);var n=r(t);h=200===e(n.width),i.removeChild(t)}}(),n}var o=t.getComputedStyle,r=o?function(t){return o(t,null)}:function(t){return t.currentStyle},s=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],n):"object"==typeof exports?module.exports=n(require("get-style-property")):t.getSize=n(t.getStyleProperty)}(window),function(t,e){function i(t,e){return t[a](e)}function n(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function o(t,e){n(t);for(var i=t.parentNode.querySelectorAll(e),o=0,r=i.length;r>o;o++)if(i[o]===t)return!0;return!1}function r(t,e){return n(t),i(t,e)}var s,a=function(){if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],i=0,n=t.length;n>i;i++){var o=t[i],r=o+"MatchesSelector";if(e[r])return r}}();if(a){var h=document.createElement("div"),p=i(h,"div");s=p?i:r}else s=o;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return s}):window.matchesSelector=s}(this,Element.prototype),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){for(var e in t)return!1;return e=null,!0}function n(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function o(t,o,r){function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var h=r("transition"),p=r("transform"),u=h&&p,f=!!r("perspective"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[h],d=["transform","transition","transitionDuration","transitionProperty"],l=function(){for(var t={},e=0,i=d.length;i>e;e++){var n=d[e],o=r(n);o&&o!==n&&(t[n]=o)}return t}();e(a.prototype,t.prototype),a.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},a.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},a.prototype.getSize=function(){this.size=o(this.element)},a.prototype.css=function(t){var e=this.element.style;for(var i in t){var n=l[i]||i;e[n]=t[i]}},a.prototype.getPosition=function(){var t=s(this.element),e=this.layout.options,i=e.isOriginLeft,n=e.isOriginTop,o=parseInt(t[i?"left":"right"],10),r=parseInt(t[n?"top":"bottom"],10);o=isNaN(o)?0:o,r=isNaN(r)?0:r;var a=this.layout.size;o-=i?a.paddingLeft:a.paddingRight,r-=n?a.paddingTop:a.paddingBottom,this.position.x=o,this.position.y=r},a.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={};e.isOriginLeft?(i.left=this.position.x+t.paddingLeft+"px",i.right=""):(i.right=this.position.x+t.paddingRight+"px",i.left=""),e.isOriginTop?(i.top=this.position.y+t.paddingTop+"px",i.bottom=""):(i.bottom=this.position.y+t.paddingBottom+"px",i.top=""),this.css(i),this.emitEvent("layout",[this])};var m=f?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};a.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=parseInt(t,10),r=parseInt(e,10),s=o===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return this.layoutPosition(),void 0;var a=t-i,h=e-n,p={},u=this.layout.options;a=u.isOriginLeft?a:-a,h=u.isOriginTop?h:-h,p.transform=m(a,h),this.transition({to:p,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},a.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},a.prototype.moveTo=u?a.prototype._transitionTo:a.prototype.goTo,a.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},a.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},a.prototype._transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(t),void 0;var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var y=p&&n(p)+",opacity";a.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:y,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(c,this,!1))},a.prototype.transition=a.prototype[h?"_transition":"_nonTransition"],a.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},a.prototype.onotransitionend=function(t){this.ontransitionend(t)};var g={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};a.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=g[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var o=e.onEnd[n];o.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},a.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(c,this,!1),this.isTransitioning=!1},a.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var v={transitionProperty:"",transitionDuration:""};return a.prototype.removeTransitionStyles=function(){this.css(v)},a.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},a.prototype.remove=function(){if(!h||!parseFloat(this.layout.options.transitionDuration))return this.removeElem(),void 0;var t=this;this.on("transitionEnd",function(){return t.removeElem(),!0}),this.hide()},a.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options;this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0})},a.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options;this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},a.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a}var r=document.defaultView,s=r&&r.getComputedStyle?function(t){return r.getComputedStyle(t,null)}:function(t){return t.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],o):(t.Outlayer={},t.Outlayer.Item=o(t.EventEmitter,t.getSize,t.getStyleProperty))}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===f.call(t)}function n(t){var e=[];if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var n=0,o=t.length;o>n;n++)e.push(t[n]);else e.push(t);return e}function o(t,e){var i=d(e,t);-1!==i&&e.splice(i,1)}function r(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()}function s(i,s,f,d,l,m){function y(t,i){if("string"==typeof t&&(t=a.querySelector(t)),!t||!c(t))return h&&h.error("Bad "+this.constructor.namespace+" element: "+t),void 0;this.element=t,this.options=e({},this.options),this.option(i);var n=++v;this.element.outlayerGUID=n,b[n]=this,this._create(),this.options.isInitLayout&&this.layout()}function g(t,i){t.prototype[i]=e({},y.prototype[i])}var v=0,b={};return y.namespace="outlayer",y.Item=m,y.prototype.options={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e(y.prototype,f.prototype),y.prototype.option=function(t){e(this.options,t)},y.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},y.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},y.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0,r=e.length;r>o;o++){var s=e[o],a=new i(s,this);n.push(a)}return n},y.prototype._filterFindItemElements=function(t){t=n(t);for(var e=this.options.itemSelector,i=[],o=0,r=t.length;r>o;o++){var s=t[o];if(c(s))if(e){l(s,e)&&i.push(s);for(var a=s.querySelectorAll(e),h=0,p=a.length;p>h;h++)i.push(a[h])}else i.push(s)}return i},y.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;i>e;e++)t.push(this.items[e].element);return t},y.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},y.prototype._init=y.prototype.layout,y.prototype._resetLayout=function(){this.getSize()},y.prototype.getSize=function(){this.size=d(this.element)},y.prototype._getMeasurement=function(t,e){var i,n=this.options[t];n?("string"==typeof n?i=this.element.querySelector(n):c(n)&&(i=n),this[t]=i?d(i)[e]:n):this[t]=0},y.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},y.prototype._getItemsForLayout=function(t){for(var e=[],i=0,n=t.length;n>i;i++){var o=t[i];o.isIgnored||e.push(o)}return e},y.prototype._layoutItems=function(t,e){function i(){n.emitEvent("layoutComplete",[n,t])}var n=this;if(!t||!t.length)return i(),void 0;this._itemsOn(t,"layout",i);for(var o=[],r=0,s=t.length;s>r;r++){var a=t[r],h=this._getItemLayoutPosition(a);h.item=a,h.isInstant=e||a.isLayoutInstant,o.push(h)}this._processLayoutQueue(o)},y.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},y.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;i>e;e++){var n=t[e];this._positionItem(n.item,n.x,n.y,n.isInstant)}},y.prototype._positionItem=function(t,e,i,n){n?t.goTo(e,i):t.moveTo(e,i)},y.prototype._postLayout=function(){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))},y.prototype._getContainerSize=u,y.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},y.prototype._itemsOn=function(t,e,i){function n(){return o++,o===r&&i.call(s),!0}for(var o=0,r=t.length,s=this,a=0,h=t.length;h>a;a++){var p=t[a];p.on(e,n)}},y.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},y.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},y.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;i>e;e++){var n=t[e];this.ignore(n)}}},y.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;i>e;e++){var n=t[e];o(n,this.stamps),this.unignore(n)}},y.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n(t)):void 0},y.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var i=this.stamps[t];this._manageStamp(i)}}},y.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},y.prototype._manageStamp=u,y.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,n=d(t),o={left:e.left-i.left-n.marginLeft,top:e.top-i.top-n.marginTop,right:i.right-e.right-n.marginRight,bottom:i.bottom-e.bottom-n.marginBottom};return o},y.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},y.prototype.bindResize=function(){this.isResizeBound||(i.bind(t,"resize",this),this.isResizeBound=!0)},y.prototype.unbindResize=function(){i.unbind(t,"resize",this),this.isResizeBound=!1},y.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},y.prototype.resize=function(){var t=d(this.element),e=this.size&&t;e&&t.innerWidth===this.size.innerWidth||this.layout()},y.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},y.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},y.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},y.prototype.reveal=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var n=t[i];n.reveal()}},y.prototype.hide=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var n=t[i];n.hide()}},y.prototype.getItem=function(t){for(var e=0,i=this.items.length;i>e;e++){var n=this.items[e];if(n.element===t)return n}},y.prototype.getItems=function(t){if(t&&t.length){for(var e=[],i=0,n=t.length;n>i;i++){var o=t[i],r=this.getItem(o);r&&e.push(r)}return e}},y.prototype.remove=function(t){t=n(t);var e=this.getItems(t);if(e&&e.length){this._itemsOn(e,"remove",function(){this.emitEvent("removeComplete",[this,e])});for(var i=0,r=e.length;r>i;i++){var s=e[i];s.remove(),o(s,this.items)}}},y.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;i>e;e++){var n=this.items[e];n.destroy()}this.unbindResize(),delete this.element.outlayerGUID,p&&p.removeData(this.element,this.constructor.namespace)},y.data=function(t){var e=t&&t.outlayerGUID;return e&&b[e]},y.create=function(t,i){function n(){y.apply(this,arguments)}return Object.create?n.prototype=Object.create(y.prototype):e(n.prototype,y.prototype),n.prototype.constructor=n,g(n,"options"),e(n.prototype.options,i),n.namespace=t,n.data=y.data,n.Item=function(){m.apply(this,arguments)},n.Item.prototype=new m,s(function(){for(var e=r(t),i=a.querySelectorAll(".js-"+e),o="data-"+e+"-options",s=0,u=i.length;u>s;s++){var f,c=i[s],d=c.getAttribute(o);try{f=d&&JSON.parse(d)}catch(l){h&&h.error("Error parsing "+o+" on "+c.nodeName.toLowerCase()+(c.id?"#"+c.id:"")+": "+l);continue}var m=new n(c,f);p&&p.data(c,t,m)}}),p&&p.bridget&&p.bridget(t,n),n},y.Item=m,y}var a=t.document,h=t.console,p=t.jQuery,u=function(){},f=Object.prototype.toString,c="object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1===t.nodeType&&"string"==typeof t.nodeName},d=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],s):t.Outlayer=s(t.eventie,t.docReady,t.EventEmitter,t.getSize,t.matchesSelector,t.Outlayer.Item)}(window),function(t){function e(t,e){var n=t.create("masonry");return n.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},n.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},n.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},n.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,n=e&&1>e?"round":"ceil",o=Math[n](t.size.outerWidth/this.columnWidth);o=Math.min(o,this.cols);for(var r=this._getColGroup(o),s=Math.min.apply(Math,r),a=i(r,s),h={x:this.columnWidth*a,y:s},p=s+t.size.outerHeight,u=this.cols+1-r.length,f=0;u>f;f++)this.colYs[a+f]=p;return h},n.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++){var o=this.colYs.slice(n,n+t);e[n]=Math.max.apply(Math,o)}return e},n.prototype._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this.options.isOriginLeft?n.left:n.right,r=o+i.outerWidth,s=Math.floor(o/this.columnWidth);s=Math.max(0,s);var a=Math.floor(r/this.columnWidth);a-=r%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var h=(this.options.isOriginTop?n.top:n.bottom)+i.outerHeight,p=s;a>=p;p++)this.colYs[p]=Math.max(h,this.colYs[p])},n.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},n.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.prototype.resize=function(){var t=this.containerWidth;this.getContainerWidth(),t!==this.containerWidth&&this.layout()},n}var i=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,n=t.length;n>i;i++){var o=t[i];if(o===e)return i}return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):t.Masonry=e(t.Outlayer,t.getSize)}(window);
-
-/*!
- * imagesLoaded PACKAGED v3.1.4
- * JavaScript is all like "You images are done yet or what?"
- * MIT License
- */
-
-(function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("eventEmitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(this,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function c(e){this.img=e}function f(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);for(var i=n.querySelectorAll("img"),r=0,o=i.length;o>r;r++){var s=i[r];this.addImage(s)}}},s.prototype.addImage=function(e){var t=new c(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),c.prototype=new t,c.prototype.check=function(){var e=v[this.img.src]||new f(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},c.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return f.prototype=new t,f.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},f.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},f.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},f.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},f.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},f.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s});
\ No newline at end of file
+!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b<a.length;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if(a instanceof RegExp)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:e.EventEmitter=a}.call(this),function(a){function b(a){if(a){if("string"==typeof d[a])return a;a=a.charAt(0).toUpperCase()+a.slice(1);for(var b,e=0,f=c.length;f>e;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){}function d(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function e(c){function e(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=j(e);l=200===b(h.width),g.removeChild(e)}}}function h(a){if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var c=j(a);if("none"===c.display)return d();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++){var o=g[m],p=c[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);y!==!1&&(f.width=y+(x?0:r+v));var z=b(c.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return h}var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var a={},b=0,c=p.length;c>b;b++){var e=p[b],f=d(e);f&&f!==e&&(a[e]=f)}return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=q[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=this.layout.size,h=-1!=e.indexOf("%")?parseFloat(e)/100*g.width:parseInt(e,10),i=-1!=f.indexOf("%")?parseFloat(f)/100*g.height:parseInt(f,10);h=isNaN(h)?0:h,i=isNaN(i)?0:i,h-=c?g.paddingLeft:g.paddingRight,i-=d?g.paddingTop:g.paddingBottom,this.position.x=h,this.position.y=i},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g),c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k),c[j]="",this.css(c),this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,n?"translate3d("+a+"px, "+b+"px, 0)":"translate("+a+"px, "+b+"px)"},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r="opacity,"+h(q.transform||"transform");g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++,g===f&&c()}var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c;if(this.emitEvent(a,d),i)if(this.$element=this.$element||i(this.element),b){var e=i.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d});
index b532cb97a57372ffab9f3bff1618d143e5664181..3d2616d7852eb1b9c4661e0a2fb11d4b222f2ae9 100644 (file)
                        this.replaceMarkers();
 
                        if ( content ) {
-                               this.setContent( content, function( editor, node, contentNode ) {
+                               this.setContent( content, function( editor, node ) {
                                        $( node ).data( 'rendered', true );
-                                       this.bindNode.call( this, editor, node, contentNode );
+                                       this.bindNode.call( this, editor, node );
                                }, force ? null : false );
                        } else {
                                this.setLoader();
                 * Runs before their content is removed from the DOM.
                 */
                unbind: function() {
-                       this.getNodes( function( editor, node, contentNode ) {
-                               this.unbindNode.call( this, editor, node, contentNode );
-                               $( node ).trigger( 'wp-mce-view-unbind' );
+                       this.getNodes( function( editor, node ) {
+                               this.unbindNode.call( this, editor, node );
                        }, true );
                },
 
                                                return rendered ? data : ! data;
                                        } )
                                        .each( function() {
-                                               callback.call( self, editor, this, $( this ).find( '.wpview-content' ).get( 0 ) );
+                                               callback.call( self, editor, this, this /* back compat */ );
                                        } );
                        } );
                },
                 */
                replaceMarkers: function() {
                        this.getMarkers( function( editor, node ) {
-                               var selected = node === editor.selection.getNode(),
-                                       $viewNode;
+                               var $viewNode;
 
                                if ( ! this.loader && $( node ).text() !== this.text ) {
                                        editor.dom.setAttrib( node, 'data-wpview-marker', null );
                                }
 
                                $viewNode = editor.$(
-                                       '<div class="wpview-wrap" data-wpview-text="' + this.encodedText + '" data-wpview-type="' + this.type + '">' +
-                                               '<p class="wpview-selection-before">\u00a0</p>' +
-                                               '<div class="wpview-body" contenteditable="false">' +
-                                                       '<div class="wpview-content wpview-type-' + this.type + '"></div>' +
-                                               '</div>' +
-                                               '<p class="wpview-selection-after">\u00a0</p>' +
-                                       '</div>'
+                                       '<div class="wpview wpview-wrap" data-wpview-text="' + this.encodedText + '" data-wpview-type="' + this.type + '" contenteditable="false"></div>'
                                );
 
                                editor.$( node ).replaceWith( $viewNode );
-
-                               if ( selected ) {
-                                       editor.wp.setViewCursor( false, $viewNode[0] );
-                               }
                        } );
                },
 
                        } else if ( _.isString( content ) && content.indexOf( '<script' ) !== -1 ) {
                                this.setIframes( '', content, callback, rendered );
                        } else {
-                               this.getNodes( function( editor, node, contentNode ) {
+                               this.getNodes( function( editor, node ) {
                                        content = content.body || content;
 
                                        if ( content.indexOf( '<iframe' ) !== -1 ) {
-                                               content += '<div class="wpview-overlay"></div>';
+                                               content += '<span class="mce-shim"></span>';
                                        }
 
-                                       contentNode.innerHTML = '';
-                                       contentNode.appendChild( _.isString( content ) ? editor.dom.createFragment( content ) : content );
+                                       editor.undoManager.transact( function() {
+                                               node.innerHTML = '';
+                                               node.appendChild( _.isString( content ) ? editor.dom.createFragment( content ) : content );
+                                               editor.dom.add( node, 'span', { 'class': 'wpview-end' } );
+                                       } );
 
-                                       callback && callback.call( this, editor, node, contentNode );
+                                       callback && callback.call( this, editor, node );
                                }, rendered );
                        }
                },
                 * @param {Boolean}  rendered Only set for (un)rendered nodes. Optional.
                 */
                setIframes: function( head, body, callback, rendered ) {
-                       var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver,
-                               self = this;
+                       var self = this;
 
-                       this.getNodes( function( editor, node, contentNode ) {
+                       this.getNodes( function( editor, node ) {
                                var dom = editor.dom,
                                        styles = '',
                                        bodyClasses = editor.getBody().className || '',
                                } );
 
                                if ( self.iframeHeight ) {
-                                       dom.add( contentNode, 'div', { style: {
-                                               width: '100%',
-                                               height: self.iframeHeight
-                                       } } );
+                                       dom.add( node, 'span', {
+                                               'data-mce-bogus': 1,
+                                               style: {
+                                                       display: 'block',
+                                                       width: '100%',
+                                                       height: self.iframeHeight
+                                               }
+                                       }, '\u200B' );
                                }
 
                                // Seems the browsers need a bit of time to insert/set the view nodes,
                                // or the iframe will fail especially when switching Text => Visual.
                                setTimeout( function() {
-                                       var iframe, iframeDoc, observer, i, block;
-
-                                       contentNode.innerHTML = '';
+                                       var iframe, iframeWin, iframeDoc, MutationObserver, observer, i, block;
+
+                                       editor.undoManager.transact( function() {
+                                               node.innerHTML = '';
+
+                                               iframe = dom.add( node, 'iframe', {
+                                                       /* jshint scripturl: true */
+                                                       src: tinymce.Env.ie ? 'javascript:""' : '',
+                                                       frameBorder: '0',
+                                                       allowTransparency: 'true',
+                                                       scrolling: 'no',
+                                                       'class': 'wpview-sandbox',
+                                                       style: {
+                                                               width: '100%',
+                                                               display: 'block'
+                                                       },
+                                                       height: self.iframeHeight
+                                               } );
 
-                                       iframe = dom.add( contentNode, 'iframe', {
-                                               /* jshint scripturl: true */
-                                               src: tinymce.Env.ie ? 'javascript:""' : '',
-                                               frameBorder: '0',
-                                               allowTransparency: 'true',
-                                               scrolling: 'no',
-                                               'class': 'wpview-sandbox',
-                                               style: {
-                                                       width: '100%',
-                                                       display: 'block'
-                                               },
-                                               height: self.iframeHeight
+                                               dom.add( node, 'span', { 'class': 'mce-shim' } );
+                                               dom.add( node, 'span', { 'class': 'wpview-end' } );
                                        } );
 
-                                       dom.add( contentNode, 'div', { 'class': 'wpview-overlay' } );
-
-                                       iframeDoc = iframe.contentWindow.document;
+                                       // Bail if the iframe node is not attached to the DOM.
+                                       // Happens when the view is dragged in the editor.
+                                       // There is a browser restriction when iframes are moved in the DOM. They get emptied.
+                                       // The iframe will be rerendered after dropping the view node at the new location.
+                                       if ( ! iframe.contentWindow ) {
+                                               return;
+                                       }
 
+                                       iframeWin = iframe.contentWindow;
+                                       iframeDoc = iframeWin.document;
                                        iframeDoc.open();
 
                                        iframeDoc.write(
                                                }, 3000 );
                                        }
 
-                                       $( iframe.contentWindow ).on( 'load', resize );
+                                       $( iframeWin ).on( 'load', resize );
+
+                                       MutationObserver = iframeWin.MutationObserver || iframeWin.WebKitMutationObserver || iframeWin.MozMutationObserver;
 
                                        if ( MutationObserver ) {
                                                observer = new MutationObserver( _.debounce( resize, 100 ) );
                                                        childList: true,
                                                        subtree: true
                                                } );
-
-                                               $( node ).one( 'wp-mce-view-unbind', function() {
-                                                       observer.disconnect();
-                                               } );
                                        } else {
                                                for ( i = 1; i < 6; i++ ) {
                                                        setTimeout( resize, i * 700 );
                                                }
                                        }
 
-                                       function classChange() {
-                                               iframeDoc.body.className = editor.getBody().className;
-                                       }
-
-                                       editor.on( 'wp-body-class-change', classChange );
-
-                                       $( node ).one( 'wp-mce-view-unbind', function() {
-                                               editor.off( 'wp-body-class-change', classChange );
-                                       } );
-
-                                       callback && callback.call( self, editor, node, contentNode );
+                                       callback && callback.call( self, editor, node );
                                }, 50 );
                        }, rendered );
                },
                 * @param {HTMLElement}    node   The view node to remove.
                 */
                remove: function( editor, node ) {
-                       this.unbindNode.call( this, editor, node, $( node ).find( '.wpview-content' ).get( 0 ) );
-                       $( node ).trigger( 'wp-mce-view-unbind' );
+                       this.unbindNode.call( this, editor, node );
                        editor.dom.remove( node );
                        editor.focus();
                }
index c2e2477231d227269bf358f6089b9ad2d1c4769f..055253af00232ba1634738b7f5df35904eca6690 100644 (file)
@@ -1 +1 @@
-!function(a,b,c,d){"use strict";var e={},f={};b.mce=b.mce||{},b.mce.views={register:function(a,c){e[a]=b.mce.View.extend(_.extend(c,{type:a}))},unregister:function(a){delete e[a]},get:function(a){return e[a]},unbind:function(){_.each(f,function(a){a.unbind()})},setMarkers:function(a){var b,c,d=[{content:a}],f=this;return _.each(e,function(a,e){c=d.slice(),d=[],_.each(c,function(c){var g,h,i=c.content;if(c.processed)return void d.push(c);for(;i&&(g=a.prototype.match(i));)g.index&&d.push({content:i.substring(0,g.index)}),b=f.createInstance(e,g.content,g.options),h=b.loader?".":b.text,d.push({content:b.ignore?h:'<p data-wpview-marker="'+b.encodedText+'">'+h+"</p>",processed:!0}),i=i.slice(g.index+g.content.length);i&&d.push({content:i})})}),a=_.pluck(d,"content").join(""),a.replace(/<p>\s*<p data-wpview-marker=/g,"<p data-wpview-marker=").replace(/<\/p>\s*<\/p>/g,"</p>")},createInstance:function(a,b,c,d){var e,g,h=this.get(a);return b=tinymce.DOM.decode(b),!d&&(g=this.getInstance(b))?g:(e=encodeURIComponent(b),c=_.extend(c||{},{text:b,encodedText:e}),f[e]=new h(c))},getInstance:function(a){return"string"==typeof a?f[encodeURIComponent(a)]:f[d(a).attr("data-wpview-text")]},getText:function(a){return decodeURIComponent(d(a).attr("data-wpview-text")||"")},render:function(a){_.each(f,function(b){b.render(a)})},update:function(a,b,c,d){var e=this.getInstance(c);e&&e.update(a,b,c,d)},edit:function(a,b){var c=this.getInstance(b);c&&c.edit&&c.edit(c.text,function(d,e){c.update(d,a,b,e)})},remove:function(a,b){var c=this.getInstance(b);c&&c.remove(a,b)}},b.mce.View=function(a){_.extend(this,a),this.initialize()},b.mce.View.extend=Backbone.View.extend,_.extend(b.mce.View.prototype,{content:null,loader:!0,initialize:function(){},getContent:function(){return this.content},render:function(a,b){null!=a&&(this.content=a),a=this.getContent(),(this.loader||a)&&(b&&this.unbind(),this.replaceMarkers(),a?this.setContent(a,function(a,b,c){d(b).data("rendered",!0),this.bindNode.call(this,a,b,c)},b?null:!1):this.setLoader())},bindNode:function(){},unbindNode:function(){},unbind:function(){this.getNodes(function(a,b,c){this.unbindNode.call(this,a,b,c),d(b).trigger("wp-mce-view-unbind")},!0)},getEditors:function(a){_.each(tinymce.editors,function(b){b.plugins.wpview&&a.call(this,b)},this)},getNodes:function(a,b){this.getEditors(function(c){var e=this;d(c.getBody()).find('[data-wpview-text="'+e.encodedText+'"]').filter(function(){var a;return null==b?!0:(a=d(this).data("rendered")===!0,b?a:!a)}).each(function(){a.call(e,c,this,d(this).find(".wpview-content").get(0))})})},getMarkers:function(a){this.getEditors(function(b){var c=this;d(b.getBody()).find('[data-wpview-marker="'+this.encodedText+'"]').each(function(){a.call(c,b,this)})})},replaceMarkers:function(){this.getMarkers(function(a,b){var c,e=b===a.selection.getNode();return this.loader||d(b).text()===this.text?(c=a.$('<div class="wpview-wrap" data-wpview-text="'+this.encodedText+'" data-wpview-type="'+this.type+'"><p class="wpview-selection-before">\xa0</p><div class="wpview-body" contenteditable="false"><div class="wpview-content wpview-type-'+this.type+'"></div></div><p class="wpview-selection-after">\xa0</p></div>'),a.$(b).replaceWith(c),void(e&&a.wp.setViewCursor(!1,c[0]))):void a.dom.setAttrib(b,"data-wpview-marker",null)})},removeMarkers:function(){this.getMarkers(function(a,b){a.dom.setAttrib(b,"data-wpview-marker",null)})},setContent:function(a,b,c){_.isObject(a)&&-1!==a.body.indexOf("<script")?this.setIframes(a.head||"",a.body,b,c):_.isString(a)&&-1!==a.indexOf("<script")?this.setIframes("",a,b,c):this.getNodes(function(c,d,e){a=a.body||a,-1!==a.indexOf("<iframe")&&(a+='<div class="wpview-overlay"></div>'),e.innerHTML="",e.appendChild(_.isString(a)?c.dom.createFragment(a):a),b&&b.call(this,c,d,e)},c)},setIframes:function(b,c,e,f){var g=a.MutationObserver||a.WebKitMutationObserver||a.MozMutationObserver,h=this;this.getNodes(function(a,f,i){var j=a.dom,k="",l=a.getBody().className||"",m=a.getDoc().getElementsByTagName("head")[0];tinymce.each(j.$('link[rel="stylesheet"]',m),function(a){a.href&&-1===a.href.indexOf("skins/lightgray/content.min.css")&&-1===a.href.indexOf("skins/wordpress/wp-content.css")&&(k+=j.getOuterHTML(a))}),h.iframeHeight&&j.add(i,"div",{style:{width:"100%",height:h.iframeHeight}}),setTimeout(function(){function m(){var b;s||o.contentWindow&&(b=d(o),h.iframeHeight=d(p.body).height(),b.height()!==h.iframeHeight&&(b.height(h.iframeHeight),a.nodeChanged()))}function n(){p.body.className=a.getBody().className}var o,p,q,r,s;if(i.innerHTML="",o=j.add(i,"iframe",{src:tinymce.Env.ie?'javascript:""':"",frameBorder:"0",allowTransparency:"true",scrolling:"no","class":"wpview-sandbox",style:{width:"100%",display:"block"},height:h.iframeHeight}),j.add(i,"div",{"class":"wpview-overlay"}),p=o.contentWindow.document,p.open(),p.write('<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'+b+k+'<style>html {background: transparent;padding: 0;margin: 0;}body#wpview-iframe-sandbox {background: transparent;padding: 1px 0 !important;margin: -1px 0 0 !important;}body#wpview-iframe-sandbox:before,body#wpview-iframe-sandbox:after {display: none;content: "";}</style></head><body id="wpview-iframe-sandbox" class="'+l+'">'+c+"</body></html>"),p.close(),h.iframeHeight&&(s=!0,setTimeout(function(){s=!1,m()},3e3)),d(o.contentWindow).on("load",m),g)q=new g(_.debounce(m,100)),q.observe(p.body,{attributes:!0,childList:!0,subtree:!0}),d(f).one("wp-mce-view-unbind",function(){q.disconnect()});else for(r=1;6>r;r++)setTimeout(m,700*r);a.on("wp-body-class-change",n),d(f).one("wp-mce-view-unbind",function(){a.off("wp-body-class-change",n)}),e&&e.call(h,a,f,i)},50)},f)},setLoader:function(){this.setContent('<div class="loading-placeholder"><div class="dashicons dashicons-admin-media"></div><div class="wpview-loading"><ins></ins></div></div>')},setError:function(a,b){this.setContent('<div class="wpview-error"><div class="dashicons dashicons-'+(b||"no")+'"></div><p>'+a+"</p></div>")},match:function(a){var b=c.next(this.type,a);return b?{index:b.index,content:b.content,options:{shortcode:b.shortcode}}:void 0},update:function(a,c,f,g){_.find(e,function(e,h){var i=e.prototype.match(a);return i?(d(f).data("rendered",!1),c.dom.setAttrib(f,"data-wpview-text",encodeURIComponent(a)),b.mce.views.createInstance(h,a,i.options,g).render(),c.focus(),!0):void 0})},remove:function(a,b){this.unbindNode.call(this,a,b,d(b).find(".wpview-content").get(0)),d(b).trigger("wp-mce-view-unbind"),a.dom.remove(b),a.focus()}})}(window,window.wp,window.wp.shortcode,window.jQuery),function(a,b,c,d){function e(b){var c={};return a.tinymce?!b||-1===b.indexOf("<")&&-1===b.indexOf(">")?b:(j=j||new a.tinymce.html.Schema(c),k=k||new a.tinymce.html.DomParser(c,j),l=l||new a.tinymce.html.Serializer(c,j),l.serialize(k.parse(b,{forced_root_block:!1}))):b.replace(/<[^>]+>/g,"")}var f,g,h,i,j,k,l;f={state:[],edit:function(a,b){var d=this.type,e=c[d].edit(a);this.pausePlayers&&this.pausePlayers(),_.each(this.state,function(a){e.state(a).on("update",function(a){b(c[d].shortcode(a).string(),"gallery"===d)})}),e.on("close",function(){e.detach()}),e.open()}},g=_.extend({},f,{state:["gallery-edit"],template:c.template("editor-gallery"),initialize:function(){var a=c.gallery.attachments(this.shortcode,c.view.settings.post.id),b=this.shortcode.attrs.named,d=this;a.more().done(function(){a=a.toJSON(),_.each(a,function(a){a.sizes&&(b.size&&a.sizes[b.size]?a.thumbnail=a.sizes[b.size]:a.sizes.thumbnail?a.thumbnail=a.sizes.thumbnail:a.sizes.full&&(a.thumbnail=a.sizes.full))}),d.render(d.template({verifyHTML:e,attachments:a,columns:b.columns?parseInt(b.columns,10):c.galleryDefaults.columns}))}).fail(function(a,b){d.setError(b)})}}),h=_.extend({},f,{action:"parse-media-shortcode",initialize:function(){var a=this;this.url&&(this.loader=!1,this.shortcode=c.embed.shortcode({url:this.text})),wp.ajax.post(this.action,{post_ID:c.view.settings.post.id,type:this.shortcode.tag,shortcode:this.shortcode.string()}).done(function(b){a.render(b)}).fail(function(b){a.url?(a.ignore=!0,a.removeMarkers()):a.setError(b.message||b.statusText,"admin-media")}),this.getEditors(function(b){b.on("wpview-selected",function(){a.pausePlayers()})})},pausePlayers:function(){this.getNodes(function(a,b,c){var e=d("iframe.wpview-sandbox",c).get(0);e&&(e=e.contentWindow)&&e.mejs&&_.each(e.mejs.players,function(a){try{a.pause()}catch(b){}})})}}),i=_.extend({},h,{action:"parse-embed",edit:function(a,b){var d=c.embed.edit(a,this.url),e=this;this.pausePlayers(),d.state("embed").props.on("change:url",function(a,b){b&&a.get("url")&&(d.state("embed").metadata=a.toJSON())}),d.state("embed").on("select",function(){var a=d.state("embed").metadata;b(e.url?a.url:c.embed.shortcode(a).string())}),d.on("close",function(){d.detach()}),d.open()}}),b.register("gallery",_.extend({},g)),b.register("audio",_.extend({},h,{state:["audio-details"]})),b.register("video",_.extend({},h,{state:["video-details"]})),b.register("playlist",_.extend({},h,{state:["playlist-edit","video-playlist-edit"]})),b.register("embed",_.extend({},i)),b.register("embedURL",_.extend({},i,{match:function(a){var b=/(^|<p>)(https?:\/\/[^\s"]+?)(<\/p>\s*|$)/gi,c=b.exec(a);return c?{index:c.index+c[1].length,content:c[2],options:{url:!0}}:void 0}}))}(window,window.wp.mce.views,window.wp.media,window.jQuery);
\ No newline at end of file
+!function(a,b,c,d){"use strict";var e={},f={};b.mce=b.mce||{},b.mce.views={register:function(a,c){e[a]=b.mce.View.extend(_.extend(c,{type:a}))},unregister:function(a){delete e[a]},get:function(a){return e[a]},unbind:function(){_.each(f,function(a){a.unbind()})},setMarkers:function(a){var b,c,d=[{content:a}],f=this;return _.each(e,function(a,e){c=d.slice(),d=[],_.each(c,function(c){var g,h,i=c.content;if(c.processed)return void d.push(c);for(;i&&(g=a.prototype.match(i));)g.index&&d.push({content:i.substring(0,g.index)}),b=f.createInstance(e,g.content,g.options),h=b.loader?".":b.text,d.push({content:b.ignore?h:'<p data-wpview-marker="'+b.encodedText+'">'+h+"</p>",processed:!0}),i=i.slice(g.index+g.content.length);i&&d.push({content:i})})}),a=_.pluck(d,"content").join(""),a.replace(/<p>\s*<p data-wpview-marker=/g,"<p data-wpview-marker=").replace(/<\/p>\s*<\/p>/g,"</p>")},createInstance:function(a,b,c,d){var e,g,h=this.get(a);return b=tinymce.DOM.decode(b),!d&&(g=this.getInstance(b))?g:(e=encodeURIComponent(b),c=_.extend(c||{},{text:b,encodedText:e}),f[e]=new h(c))},getInstance:function(a){return"string"==typeof a?f[encodeURIComponent(a)]:f[d(a).attr("data-wpview-text")]},getText:function(a){return decodeURIComponent(d(a).attr("data-wpview-text")||"")},render:function(a){_.each(f,function(b){b.render(a)})},update:function(a,b,c,d){var e=this.getInstance(c);e&&e.update(a,b,c,d)},edit:function(a,b){var c=this.getInstance(b);c&&c.edit&&c.edit(c.text,function(d,e){c.update(d,a,b,e)})},remove:function(a,b){var c=this.getInstance(b);c&&c.remove(a,b)}},b.mce.View=function(a){_.extend(this,a),this.initialize()},b.mce.View.extend=Backbone.View.extend,_.extend(b.mce.View.prototype,{content:null,loader:!0,initialize:function(){},getContent:function(){return this.content},render:function(a,b){null!=a&&(this.content=a),a=this.getContent(),(this.loader||a)&&(b&&this.unbind(),this.replaceMarkers(),a?this.setContent(a,function(a,b){d(b).data("rendered",!0),this.bindNode.call(this,a,b)},!!b&&null):this.setLoader())},bindNode:function(){},unbindNode:function(){},unbind:function(){this.getNodes(function(a,b){this.unbindNode.call(this,a,b)},!0)},getEditors:function(a){_.each(tinymce.editors,function(b){b.plugins.wpview&&a.call(this,b)},this)},getNodes:function(a,b){this.getEditors(function(c){var e=this;d(c.getBody()).find('[data-wpview-text="'+e.encodedText+'"]').filter(function(){var a;return null==b||(a=d(this).data("rendered")===!0,b?a:!a)}).each(function(){a.call(e,c,this,this)})})},getMarkers:function(a){this.getEditors(function(b){var c=this;d(b.getBody()).find('[data-wpview-marker="'+this.encodedText+'"]').each(function(){a.call(c,b,this)})})},replaceMarkers:function(){this.getMarkers(function(a,b){var c;return this.loader||d(b).text()===this.text?(c=a.$('<div class="wpview wpview-wrap" data-wpview-text="'+this.encodedText+'" data-wpview-type="'+this.type+'" contenteditable="false"></div>'),void a.$(b).replaceWith(c)):void a.dom.setAttrib(b,"data-wpview-marker",null)})},removeMarkers:function(){this.getMarkers(function(a,b){a.dom.setAttrib(b,"data-wpview-marker",null)})},setContent:function(a,b,c){_.isObject(a)&&a.body.indexOf("<script")!==-1?this.setIframes(a.head||"",a.body,b,c):_.isString(a)&&a.indexOf("<script")!==-1?this.setIframes("",a,b,c):this.getNodes(function(c,d){a=a.body||a,a.indexOf("<iframe")!==-1&&(a+='<span class="mce-shim"></span>'),c.undoManager.transact(function(){d.innerHTML="",d.appendChild(_.isString(a)?c.dom.createFragment(a):a),c.dom.add(d,"span",{"class":"wpview-end"})}),b&&b.call(this,c,d)},c)},setIframes:function(a,b,c,e){var f=this;this.getNodes(function(e,g){var h=e.dom,i="",j=e.getBody().className||"",k=e.getDoc().getElementsByTagName("head")[0];tinymce.each(h.$('link[rel="stylesheet"]',k),function(a){a.href&&a.href.indexOf("skins/lightgray/content.min.css")===-1&&a.href.indexOf("skins/wordpress/wp-content.css")===-1&&(i+=h.getOuterHTML(a))}),f.iframeHeight&&h.add(g,"span",{"data-mce-bogus":1,style:{display:"block",width:"100%",height:f.iframeHeight}},"\u200b"),setTimeout(function(){function k(){var a;r||l.contentWindow&&(a=d(l),f.iframeHeight=d(n.body).height(),a.height()!==f.iframeHeight&&(a.height(f.iframeHeight),e.nodeChanged()))}var l,m,n,o,p,q,r;if(e.undoManager.transact(function(){g.innerHTML="",l=h.add(g,"iframe",{src:tinymce.Env.ie?'javascript:""':"",frameBorder:"0",allowTransparency:"true",scrolling:"no","class":"wpview-sandbox",style:{width:"100%",display:"block"},height:f.iframeHeight}),h.add(g,"span",{"class":"mce-shim"}),h.add(g,"span",{"class":"wpview-end"})}),l.contentWindow){if(m=l.contentWindow,n=m.document,n.open(),n.write('<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'+a+i+'<style>html {background: transparent;padding: 0;margin: 0;}body#wpview-iframe-sandbox {background: transparent;padding: 1px 0 !important;margin: -1px 0 0 !important;}body#wpview-iframe-sandbox:before,body#wpview-iframe-sandbox:after {display: none;content: "";}</style></head><body id="wpview-iframe-sandbox" class="'+j+'">'+b+"</body></html>"),n.close(),f.iframeHeight&&(r=!0,setTimeout(function(){r=!1,k()},3e3)),d(m).on("load",k),o=m.MutationObserver||m.WebKitMutationObserver||m.MozMutationObserver)p=new o(_.debounce(k,100)),p.observe(n.body,{attributes:!0,childList:!0,subtree:!0});else for(q=1;q<6;q++)setTimeout(k,700*q);c&&c.call(f,e,g)}},50)},e)},setLoader:function(){this.setContent('<div class="loading-placeholder"><div class="dashicons dashicons-admin-media"></div><div class="wpview-loading"><ins></ins></div></div>')},setError:function(a,b){this.setContent('<div class="wpview-error"><div class="dashicons dashicons-'+(b||"no")+'"></div><p>'+a+"</p></div>")},match:function(a){var b=c.next(this.type,a);if(b)return{index:b.index,content:b.content,options:{shortcode:b.shortcode}}},update:function(a,c,f,g){_.find(e,function(e,h){var i=e.prototype.match(a);if(i)return d(f).data("rendered",!1),c.dom.setAttrib(f,"data-wpview-text",encodeURIComponent(a)),b.mce.views.createInstance(h,a,i.options,g).render(),c.focus(),!0})},remove:function(a,b){this.unbindNode.call(this,a,b),a.dom.remove(b),a.focus()}})}(window,window.wp,window.wp.shortcode,window.jQuery),function(a,b,c,d){function e(b){var c={};return a.tinymce?!b||b.indexOf("<")===-1&&b.indexOf(">")===-1?b:(j=j||new a.tinymce.html.Schema(c),k=k||new a.tinymce.html.DomParser(c,j),l=l||new a.tinymce.html.Serializer(c,j),l.serialize(k.parse(b,{forced_root_block:!1}))):b.replace(/<[^>]+>/g,"")}var f,g,h,i,j,k,l;f={state:[],edit:function(a,b){var d=this.type,e=c[d].edit(a);this.pausePlayers&&this.pausePlayers(),_.each(this.state,function(a){e.state(a).on("update",function(a){b(c[d].shortcode(a).string(),"gallery"===d)})}),e.on("close",function(){e.detach()}),e.open()}},g=_.extend({},f,{state:["gallery-edit"],template:c.template("editor-gallery"),initialize:function(){var a=c.gallery.attachments(this.shortcode,c.view.settings.post.id),b=this.shortcode.attrs.named,d=this;a.more().done(function(){a=a.toJSON(),_.each(a,function(a){a.sizes&&(b.size&&a.sizes[b.size]?a.thumbnail=a.sizes[b.size]:a.sizes.thumbnail?a.thumbnail=a.sizes.thumbnail:a.sizes.full&&(a.thumbnail=a.sizes.full))}),d.render(d.template({verifyHTML:e,attachments:a,columns:b.columns?parseInt(b.columns,10):c.galleryDefaults.columns}))}).fail(function(a,b){d.setError(b)})}}),h=_.extend({},f,{action:"parse-media-shortcode",initialize:function(){var a=this;this.url&&(this.loader=!1,this.shortcode=c.embed.shortcode({url:this.text})),wp.ajax.post(this.action,{post_ID:c.view.settings.post.id,type:this.shortcode.tag,shortcode:this.shortcode.string()}).done(function(b){a.render(b)}).fail(function(b){a.url?(a.ignore=!0,a.removeMarkers()):a.setError(b.message||b.statusText,"admin-media")}),this.getEditors(function(b){b.on("wpview-selected",function(){a.pausePlayers()})})},pausePlayers:function(){this.getNodes(function(a,b,c){var e=d("iframe.wpview-sandbox",c).get(0);e&&(e=e.contentWindow)&&e.mejs&&_.each(e.mejs.players,function(a){try{a.pause()}catch(b){}})})}}),i=_.extend({},h,{action:"parse-embed",edit:function(a,b){var d=c.embed.edit(a,this.url),e=this;this.pausePlayers(),d.state("embed").props.on("change:url",function(a,b){b&&a.get("url")&&(d.state("embed").metadata=a.toJSON())}),d.state("embed").on("select",function(){var a=d.state("embed").metadata;b(e.url?a.url:c.embed.shortcode(a).string())}),d.on("close",function(){d.detach()}),d.open()}}),b.register("gallery",_.extend({},g)),b.register("audio",_.extend({},h,{state:["audio-details"]})),b.register("video",_.extend({},h,{state:["video-details"]})),b.register("playlist",_.extend({},h,{state:["playlist-edit","video-playlist-edit"]})),b.register("embed",_.extend({},i)),b.register("embedURL",_.extend({},i,{match:function(a){var b=/(^|<p>)(https?:\/\/[^\s"]+?)(<\/p>\s*|$)/gi,c=b.exec(a);if(c)return{index:c.index+c[1].length,content:c[2],options:{url:!0}}}}))}(window,window.wp.mce.views,window.wp.media,window.jQuery);
\ No newline at end of file
index 5bf5bd3ffaded9806c33da9a3a676079f93086e1..aa407466d0688aaf8378df10b801915bc19bbd6f 100644 (file)
                        fallbacks = function( props ) {
                                // Generate alt fallbacks and strip tags.
                                if ( 'image' === props.type && ! props.alt ) {
-                                       props.alt = props.caption || props.title || '';
+                                       if ( props.caption ) {
+                                               props.alt = props.caption;
+                                       } else if ( props.title !== props.url ) {
+                                               props.alt = props.title;
+                                       } else {
+                                               props.alt = '';
+                                       }
+
                                        props.alt = props.alt.replace( /<\/?[^>]+>/g, '' );
                                        props.alt = props.alt.replace( /[\r\n]+/g, ' ' );
                                }
                        var img = {},
                                options, classes, shortcode, html;
 
+                       props.type = 'image';
                        props = wp.media.string.props( props, attachment );
                        classes = props.classes || [];
 
 
                        settings.post.featuredImageId = id;
 
-                       wp.media.post( 'set-post-thumbnail', {
-                               json:         true,
+                       wp.media.post( 'get-post-thumbnail-html', {
                                post_id:      settings.post.id,
                                thumbnail_id: settings.post.featuredImageId,
                                _wpnonce:     settings.post.nonce
                        }).done( function( html ) {
+                               if ( html == '0' ) {
+                                       window.alert( window.setPostThumbnailL10n.error );
+                                       return;
+                               }
                                $( '.inside', '#postimagediv' ).html( html );
                        });
                },
+               /**
+                * Remove the featured image id, save the post thumbnail data and
+                * set the HTML in the post meta box to no featured image.
+                */
+               remove: function() {
+                       wp.media.featuredImage.set( -1 );
+               },
                /**
                 * The Featured Image workflow
                 *
 
                                wp.media.featuredImage.frame().open();
                        }).on( 'click', '#remove-post-thumbnail', function() {
-                               wp.media.view.settings.post.featuredImageId = -1;
+                               wp.media.featuredImage.remove();
+                               return false;
                        });
                }
        };
index 24ffc50b7e4b7bd6d53dbd2a12f80ee259c35867..1d5c1ce3be007970052aacde80d52ab9f28f2b65 100644 (file)
@@ -1 +1 @@
-!function(a,b){var c={};wp.media.coerce=function(a,c){return b.isUndefined(a[c])&&!b.isUndefined(this.defaults[c])?a[c]=this.defaults[c]:"true"===a[c]?a[c]=!0:"false"===a[c]&&(a[c]=!1),a[c]},wp.media.string={props:function(a,c){var d,e,f,g,h,i=wp.media.view.settings.defaultProps;return h=function(a){return"image"!==a.type||a.alt||(a.alt=a.caption||a.title||"",a.alt=a.alt.replace(/<\/?[^>]+>/g,""),a.alt=a.alt.replace(/[\r\n]+/g," ")),a},a=a?b.clone(a):{},c&&c.type&&(a.type=c.type),"image"===a.type&&(a=b.defaults(a||{},{align:i.align||getUserSetting("align","none"),size:i.size||getUserSetting("imgsize","medium"),url:"",classes:[]})),c?(a.title=a.title||c.title,d=a.link||i.link||getUserSetting("urlbutton","file"),"file"===d||"embed"===d?e=c.url:"post"===d?e=c.link:"custom"===d&&(e=a.linkUrl),a.linkUrl=e||"","image"===c.type?(a.classes.push("wp-image-"+c.id),g=c.sizes,f=g&&g[a.size]?g[a.size]:c,b.extend(a,b.pick(c,"align","caption","alt"),{width:f.width,height:f.height,src:f.url,captionId:"attachment_"+c.id})):"video"===c.type||"audio"===c.type?b.extend(a,b.pick(c,"title","type","icon","mime")):(a.title=a.title||c.filename,a.rel=a.rel||"attachment wp-att-"+c.id),h(a)):h(a)},link:function(a,b){var c;return a=wp.media.string.props(a,b),c={tag:"a",content:a.title,attrs:{href:a.linkUrl}},a.rel&&(c.attrs.rel=a.rel),wp.html.string(c)},audio:function(a,b){return wp.media.string._audioVideo("audio",a,b)},video:function(a,b){return wp.media.string._audioVideo("video",a,b)},_audioVideo:function(a,c,d){var e,f,g;return c=wp.media.string.props(c,d),"embed"!==c.link?wp.media.string.link(c):(e={},"video"===a&&(d.image&&-1===d.image.src.indexOf(d.icon)&&(e.poster=d.image.src),d.width&&(e.width=d.width),d.height&&(e.height=d.height)),g=d.filename.split(".").pop(),b.contains(wp.media.view.settings.embedExts,g)?(e[g]=d.url,f=wp.shortcode.string({tag:a,attrs:e})):wp.media.string.link(c))},image:function(a,c){var d,e,f,g,h={};return a=wp.media.string.props(a,c),e=a.classes||[],h.src=b.isUndefined(c)?a.url:c.url,b.extend(h,b.pick(a,"width","height","alt")),a.align&&!a.caption&&e.push("align"+a.align),a.size&&e.push("size-"+a.size),h["class"]=b.compact(e).join(" "),d={tag:"img",attrs:h,single:!0},a.linkUrl&&(d={tag:"a",attrs:{href:a.linkUrl},content:d}),g=wp.html.string(d),a.caption&&(f={},h.width&&(f.width=h.width),a.captionId&&(f.id=a.captionId),a.align&&(f.align="align"+a.align),g=wp.shortcode.string({tag:"caption",attrs:f,content:g+" "+a.caption})),g}},wp.media.embed={coerce:wp.media.coerce,defaults:{url:"",width:"",height:""},edit:function(a,c){var d,e,f={};return c?f.url=a.replace(/<[^>]+>/g,""):(e=wp.shortcode.next("embed",a).shortcode,f=b.defaults(e.attrs.named,this.defaults),e.content&&(f.url=e.content)),d=wp.media({frame:"post",state:"embed",metadata:f})},shortcode:function(a){var c,d=this;return b.each(this.defaults,function(b,c){a[c]=d.coerce(a,c),b===a[c]&&delete a[c]}),c=a.url,delete a.url,new wp.shortcode({tag:"embed",attrs:a,content:c})}},wp.media.collection=function(a){var c={};return b.extend({coerce:wp.media.coerce,attachments:function(a){var d,e,f,g,h=a.string(),i=c[h],j=this;return delete c[h],i?i:(d=b.defaults(a.attrs.named,this.defaults),e=b.pick(d,"orderby","order"),e.type=this.type,e.perPage=-1,void 0!==d.orderby&&(d._orderByField=d.orderby),"rand"===d.orderby&&(d._orderbyRandom=!0),(!d.orderby||/^menu_order(?: ID)?$/i.test(d.orderby))&&(e.orderby="menuOrder"),d.ids?(e.post__in=d.ids.split(","),e.orderby="post__in"):d.include&&(e.post__in=d.include.split(",")),d.exclude&&(e.post__not_in=d.exclude.split(",")),e.post__in||(e.uploadedTo=d.id),g=b.omit(d,"id","ids","include","exclude","orderby","order"),b.each(this.defaults,function(a,b){g[b]=j.coerce(g,b)}),f=wp.media.query(e),f[this.tag]=new Backbone.Model(g),f)},shortcode:function(a){var d,e,f=a.props.toJSON(),g=b.pick(f,"orderby","order");return a.type&&(g.type=a.type,delete a.type),a[this.tag]&&b.extend(g,a[this.tag].toJSON()),g.ids=a.pluck("id"),f.uploadedTo&&(g.id=f.uploadedTo),delete g.orderby,g._orderbyRandom?g.orderby="rand":g._orderByField&&"rand"!=g._orderByField&&(g.orderby=g._orderByField),delete g._orderbyRandom,delete g._orderByField,g.ids&&"post__in"===g.orderby&&delete g.orderby,g=this.setDefaults(g),d=new wp.shortcode({tag:this.tag,attrs:g,type:"single"}),e=new wp.media.model.Attachments(a.models,{props:f}),e[this.tag]=a[this.tag],c[d.string()]=e,d},edit:function(a){var c,d,e,f=wp.shortcode.next(this.tag,a),g=this.defaults.id;if(f&&f.content===a)return f=f.shortcode,b.isUndefined(f.get("id"))&&!b.isUndefined(g)&&f.set("id",g),c=this.attachments(f),d=new wp.media.model.Selection(c.models,{props:c.props.toJSON(),multiple:!0}),d[this.tag]=c[this.tag],d.more().done(function(){d.props.set({query:!1}),d.unmirror(),d.props.unset("orderby")}),this.frame&&this.frame.dispose(),e=f.attrs.named.type&&"video"===f.attrs.named.type?"video-"+this.tag+"-edit":this.tag+"-edit",this.frame=wp.media({frame:"post",state:e,title:this.editTitle,editing:!0,multiple:!0,selection:d}).open(),this.frame},setDefaults:function(a){var c=this;return b.each(this.defaults,function(b,d){a[d]=c.coerce(a,d),b===a[d]&&delete a[d]}),a}},a)},wp.media._galleryDefaults={itemtag:"dl",icontag:"dt",captiontag:"dd",columns:"3",link:"post",size:"thumbnail",order:"ASC",id:wp.media.view.settings.post&&wp.media.view.settings.post.id,orderby:"menu_order ID"},wp.media.view.settings.galleryDefaults?wp.media.galleryDefaults=b.extend({},wp.media._galleryDefaults,wp.media.view.settings.galleryDefaults):wp.media.galleryDefaults=wp.media._galleryDefaults,wp.media.gallery=new wp.media.collection({tag:"gallery",type:"image",editTitle:wp.media.view.l10n.editGalleryTitle,defaults:wp.media.galleryDefaults,setDefaults:function(a){var c=this,d=!b.isEqual(wp.media.galleryDefaults,wp.media._galleryDefaults);return b.each(this.defaults,function(b,e){a[e]=c.coerce(a,e),b!==a[e]||d&&b!==wp.media._galleryDefaults[e]||delete a[e]}),a}}),wp.media.featuredImage={get:function(){return wp.media.view.settings.post.featuredImageId},set:function(b){var c=wp.media.view.settings;c.post.featuredImageId=b,wp.media.post("set-post-thumbnail",{json:!0,post_id:c.post.id,thumbnail_id:c.post.featuredImageId,_wpnonce:c.post.nonce}).done(function(b){a(".inside","#postimagediv").html(b)})},frame:function(){return this._frame?(wp.media.frame=this._frame,this._frame):(this._frame=wp.media({state:"featured-image",states:[new wp.media.controller.FeaturedImage,new wp.media.controller.EditImage]}),this._frame.on("toolbar:create:featured-image",function(a){this.createSelectToolbar(a,{text:wp.media.view.l10n.setFeaturedImage})},this._frame),this._frame.on("content:render:edit-image",function(){var a=this.state("featured-image").get("selection"),b=new wp.media.view.EditImage({model:a.single(),controller:this}).render();this.content.set(b),b.loadEditor()},this._frame),this._frame.state("featured-image").on("select",this.select),this._frame)},select:function(){var a=this.get("selection").single();wp.media.view.settings.post.featuredImageId&&wp.media.featuredImage.set(a?a.id:-1)},init:function(){a("#postimagediv").on("click","#set-post-thumbnail",function(a){a.preventDefault(),a.stopPropagation(),wp.media.featuredImage.frame().open()}).on("click","#remove-post-thumbnail",function(){wp.media.view.settings.post.featuredImageId=-1})}},a(wp.media.featuredImage.init),wp.media.editor={insert:function(a){var c,d,e=!b.isUndefined(window.tinymce),f=!b.isUndefined(window.QTags);if(d=this.activeEditor?window.wpActiveEditor=this.activeEditor:window.wpActiveEditor,window.send_to_editor)return window.send_to_editor.apply(this,arguments);if(d)e&&(c=tinymce.get(d));else if(e&&tinymce.activeEditor)c=tinymce.activeEditor,d=window.wpActiveEditor=c.id;else if(!f)return!1;if(c&&!c.isHidden()?c.execCommand("mceInsertContent",!1,a):f?QTags.insertContent(a):document.getElementById(d).value+=a,window.tb_remove)try{window.tb_remove()}catch(g){}},add:function(d,e){var f=this.get(d);return f?f:(f=c[d]=wp.media(b.defaults(e||{},{frame:"post",state:"insert",title:wp.media.view.l10n.addMedia,multiple:!0})),f.on("insert",function(c){var d=f.state();c=c||d.get("selection"),c&&a.when.apply(a,c.map(function(a){var b=d.display(a).toJSON();return this.send.attachment(b,a.toJSON())},this)).done(function(){wp.media.editor.insert(b.toArray(arguments).join("\n\n"))})},this),f.state("gallery-edit").on("update",function(a){this.insert(wp.media.gallery.shortcode(a).string())},this),f.state("playlist-edit").on("update",function(a){this.insert(wp.media.playlist.shortcode(a).string())},this),f.state("video-playlist-edit").on("update",function(a){this.insert(wp.media.playlist.shortcode(a).string())},this),f.state("embed").on("select",function(){var a=f.state(),c=a.get("type"),d=a.props.toJSON();d.url=d.url||"","link"===c?(b.defaults(d,{linkText:d.url,linkUrl:d.url}),this.send.link(d).done(function(a){wp.media.editor.insert(a)})):"image"===c&&(b.defaults(d,{title:d.url,linkUrl:"",align:"none",link:"none"}),"none"===d.link?d.linkUrl="":"file"===d.link&&(d.linkUrl=d.url),this.insert(wp.media.string.image(d)))},this),f.state("featured-image").on("select",wp.media.featuredImage.select),f.setState(f.options.state),f)},id:function(a){return a?a:(a=window.wpActiveEditor,a||b.isUndefined(window.tinymce)||!tinymce.activeEditor||(a=tinymce.activeEditor.id),a=a||"")},get:function(a){return a=this.id(a),c[a]},remove:function(a){a=this.id(a),delete c[a]},send:{attachment:function(a,c){var d,e,f=c.caption;return wp.media.view.settings.captions||delete c.caption,a=wp.media.string.props(a,c),d={id:c.id,post_content:c.description,post_excerpt:f},a.linkUrl&&(d.url=a.linkUrl),"image"===c.type?(e=wp.media.string.image(a),b.each({align:"align",size:"image-size",alt:"image_alt"},function(b,c){a[c]&&(d[b]=a[c])})):"video"===c.type?e=wp.media.string.video(a,c):"audio"===c.type?e=wp.media.string.audio(a,c):(e=wp.media.string.link(a),d.post_title=a.title),wp.media.post("send-attachment-to-editor",{nonce:wp.media.view.settings.nonce.sendToEditor,attachment:d,html:e,post_id:wp.media.view.settings.post.id})},link:function(a){return wp.media.post("send-link-to-editor",{nonce:wp.media.view.settings.nonce.sendToEditor,src:a.linkUrl,link_text:a.linkText,html:wp.media.string.link(a),post_id:wp.media.view.settings.post.id})}},open:function(a,b){var c;return b=b||{},a=this.id(a),this.activeEditor=a,c=this.get(a),(!c||c.options&&b.state!==c.options.state)&&(c=this.add(a,b)),wp.media.frame=c,c.open()},init:function(){a(document.body).on("click.add-media-button",".insert-media",function(b){var c=a(b.currentTarget),d=c.data("editor"),e={frame:"post",state:"insert",title:wp.media.view.l10n.addMedia,multiple:!0};b.preventDefault(),c.blur(),c.hasClass("gallery")&&(e.state="gallery",e.title=wp.media.view.l10n.createGalleryTitle),wp.media.editor.open(d,e)}),(new wp.media.view.EditorUploader).render()}},b.bindAll(wp.media.editor,"open"),a(wp.media.editor.init)}(jQuery,_);
\ No newline at end of file
+!function(a,b){var c={};wp.media.coerce=function(a,c){return b.isUndefined(a[c])&&!b.isUndefined(this.defaults[c])?a[c]=this.defaults[c]:"true"===a[c]?a[c]=!0:"false"===a[c]&&(a[c]=!1),a[c]},wp.media.string={props:function(a,c){var d,e,f,g,h,i=wp.media.view.settings.defaultProps;return h=function(a){return"image"!==a.type||a.alt||(a.caption?a.alt=a.caption:a.title!==a.url?a.alt=a.title:a.alt="",a.alt=a.alt.replace(/<\/?[^>]+>/g,""),a.alt=a.alt.replace(/[\r\n]+/g," ")),a},a=a?b.clone(a):{},c&&c.type&&(a.type=c.type),"image"===a.type&&(a=b.defaults(a||{},{align:i.align||getUserSetting("align","none"),size:i.size||getUserSetting("imgsize","medium"),url:"",classes:[]})),c?(a.title=a.title||c.title,d=a.link||i.link||getUserSetting("urlbutton","file"),"file"===d||"embed"===d?e=c.url:"post"===d?e=c.link:"custom"===d&&(e=a.linkUrl),a.linkUrl=e||"","image"===c.type?(a.classes.push("wp-image-"+c.id),g=c.sizes,f=g&&g[a.size]?g[a.size]:c,b.extend(a,b.pick(c,"align","caption","alt"),{width:f.width,height:f.height,src:f.url,captionId:"attachment_"+c.id})):"video"===c.type||"audio"===c.type?b.extend(a,b.pick(c,"title","type","icon","mime")):(a.title=a.title||c.filename,a.rel=a.rel||"attachment wp-att-"+c.id),h(a)):h(a)},link:function(a,b){var c;return a=wp.media.string.props(a,b),c={tag:"a",content:a.title,attrs:{href:a.linkUrl}},a.rel&&(c.attrs.rel=a.rel),wp.html.string(c)},audio:function(a,b){return wp.media.string._audioVideo("audio",a,b)},video:function(a,b){return wp.media.string._audioVideo("video",a,b)},_audioVideo:function(a,c,d){var e,f,g;return c=wp.media.string.props(c,d),"embed"!==c.link?wp.media.string.link(c):(e={},"video"===a&&(d.image&&-1===d.image.src.indexOf(d.icon)&&(e.poster=d.image.src),d.width&&(e.width=d.width),d.height&&(e.height=d.height)),g=d.filename.split(".").pop(),b.contains(wp.media.view.settings.embedExts,g)?(e[g]=d.url,f=wp.shortcode.string({tag:a,attrs:e})):wp.media.string.link(c))},image:function(a,c){var d,e,f,g,h={};return a.type="image",a=wp.media.string.props(a,c),e=a.classes||[],h.src=b.isUndefined(c)?a.url:c.url,b.extend(h,b.pick(a,"width","height","alt")),a.align&&!a.caption&&e.push("align"+a.align),a.size&&e.push("size-"+a.size),h["class"]=b.compact(e).join(" "),d={tag:"img",attrs:h,single:!0},a.linkUrl&&(d={tag:"a",attrs:{href:a.linkUrl},content:d}),g=wp.html.string(d),a.caption&&(f={},h.width&&(f.width=h.width),a.captionId&&(f.id=a.captionId),a.align&&(f.align="align"+a.align),g=wp.shortcode.string({tag:"caption",attrs:f,content:g+" "+a.caption})),g}},wp.media.embed={coerce:wp.media.coerce,defaults:{url:"",width:"",height:""},edit:function(a,c){var d,e,f={};return c?f.url=a.replace(/<[^>]+>/g,""):(e=wp.shortcode.next("embed",a).shortcode,f=b.defaults(e.attrs.named,this.defaults),e.content&&(f.url=e.content)),d=wp.media({frame:"post",state:"embed",metadata:f})},shortcode:function(a){var c,d=this;return b.each(this.defaults,function(b,c){a[c]=d.coerce(a,c),b===a[c]&&delete a[c]}),c=a.url,delete a.url,new wp.shortcode({tag:"embed",attrs:a,content:c})}},wp.media.collection=function(a){var c={};return b.extend({coerce:wp.media.coerce,attachments:function(a){var d,e,f,g,h=a.string(),i=c[h],j=this;return delete c[h],i?i:(d=b.defaults(a.attrs.named,this.defaults),e=b.pick(d,"orderby","order"),e.type=this.type,e.perPage=-1,void 0!==d.orderby&&(d._orderByField=d.orderby),"rand"===d.orderby&&(d._orderbyRandom=!0),d.orderby&&!/^menu_order(?: ID)?$/i.test(d.orderby)||(e.orderby="menuOrder"),d.ids?(e.post__in=d.ids.split(","),e.orderby="post__in"):d.include&&(e.post__in=d.include.split(",")),d.exclude&&(e.post__not_in=d.exclude.split(",")),e.post__in||(e.uploadedTo=d.id),g=b.omit(d,"id","ids","include","exclude","orderby","order"),b.each(this.defaults,function(a,b){g[b]=j.coerce(g,b)}),f=wp.media.query(e),f[this.tag]=new Backbone.Model(g),f)},shortcode:function(a){var d,e,f=a.props.toJSON(),g=b.pick(f,"orderby","order");return a.type&&(g.type=a.type,delete a.type),a[this.tag]&&b.extend(g,a[this.tag].toJSON()),g.ids=a.pluck("id"),f.uploadedTo&&(g.id=f.uploadedTo),delete g.orderby,g._orderbyRandom?g.orderby="rand":g._orderByField&&"rand"!=g._orderByField&&(g.orderby=g._orderByField),delete g._orderbyRandom,delete g._orderByField,g.ids&&"post__in"===g.orderby&&delete g.orderby,g=this.setDefaults(g),d=new wp.shortcode({tag:this.tag,attrs:g,type:"single"}),e=new wp.media.model.Attachments(a.models,{props:f}),e[this.tag]=a[this.tag],c[d.string()]=e,d},edit:function(a){var c,d,e,f=wp.shortcode.next(this.tag,a),g=this.defaults.id;if(f&&f.content===a)return f=f.shortcode,b.isUndefined(f.get("id"))&&!b.isUndefined(g)&&f.set("id",g),c=this.attachments(f),d=new wp.media.model.Selection(c.models,{props:c.props.toJSON(),multiple:!0}),d[this.tag]=c[this.tag],d.more().done(function(){d.props.set({query:!1}),d.unmirror(),d.props.unset("orderby")}),this.frame&&this.frame.dispose(),e=f.attrs.named.type&&"video"===f.attrs.named.type?"video-"+this.tag+"-edit":this.tag+"-edit",this.frame=wp.media({frame:"post",state:e,title:this.editTitle,editing:!0,multiple:!0,selection:d}).open(),this.frame},setDefaults:function(a){var c=this;return b.each(this.defaults,function(b,d){a[d]=c.coerce(a,d),b===a[d]&&delete a[d]}),a}},a)},wp.media._galleryDefaults={itemtag:"dl",icontag:"dt",captiontag:"dd",columns:"3",link:"post",size:"thumbnail",order:"ASC",id:wp.media.view.settings.post&&wp.media.view.settings.post.id,orderby:"menu_order ID"},wp.media.view.settings.galleryDefaults?wp.media.galleryDefaults=b.extend({},wp.media._galleryDefaults,wp.media.view.settings.galleryDefaults):wp.media.galleryDefaults=wp.media._galleryDefaults,wp.media.gallery=new wp.media.collection({tag:"gallery",type:"image",editTitle:wp.media.view.l10n.editGalleryTitle,defaults:wp.media.galleryDefaults,setDefaults:function(a){var c=this,d=!b.isEqual(wp.media.galleryDefaults,wp.media._galleryDefaults);return b.each(this.defaults,function(b,e){a[e]=c.coerce(a,e),b!==a[e]||d&&b!==wp.media._galleryDefaults[e]||delete a[e]}),a}}),wp.media.featuredImage={get:function(){return wp.media.view.settings.post.featuredImageId},set:function(b){var c=wp.media.view.settings;c.post.featuredImageId=b,wp.media.post("get-post-thumbnail-html",{post_id:c.post.id,thumbnail_id:c.post.featuredImageId,_wpnonce:c.post.nonce}).done(function(b){return"0"==b?void window.alert(window.setPostThumbnailL10n.error):void a(".inside","#postimagediv").html(b)})},remove:function(){wp.media.featuredImage.set(-1)},frame:function(){return this._frame?(wp.media.frame=this._frame,this._frame):(this._frame=wp.media({state:"featured-image",states:[new wp.media.controller.FeaturedImage,new wp.media.controller.EditImage]}),this._frame.on("toolbar:create:featured-image",function(a){this.createSelectToolbar(a,{text:wp.media.view.l10n.setFeaturedImage})},this._frame),this._frame.on("content:render:edit-image",function(){var a=this.state("featured-image").get("selection"),b=new wp.media.view.EditImage({model:a.single(),controller:this}).render();this.content.set(b),b.loadEditor()},this._frame),this._frame.state("featured-image").on("select",this.select),this._frame)},select:function(){var a=this.get("selection").single();wp.media.view.settings.post.featuredImageId&&wp.media.featuredImage.set(a?a.id:-1)},init:function(){a("#postimagediv").on("click","#set-post-thumbnail",function(a){a.preventDefault(),a.stopPropagation(),wp.media.featuredImage.frame().open()}).on("click","#remove-post-thumbnail",function(){return wp.media.featuredImage.remove(),!1})}},a(wp.media.featuredImage.init),wp.media.editor={insert:function(a){var c,d,e=!b.isUndefined(window.tinymce),f=!b.isUndefined(window.QTags);if(d=this.activeEditor?window.wpActiveEditor=this.activeEditor:window.wpActiveEditor,window.send_to_editor)return window.send_to_editor.apply(this,arguments);if(d)e&&(c=tinymce.get(d));else if(e&&tinymce.activeEditor)c=tinymce.activeEditor,d=window.wpActiveEditor=c.id;else if(!f)return!1;if(c&&!c.isHidden()?c.execCommand("mceInsertContent",!1,a):f?QTags.insertContent(a):document.getElementById(d).value+=a,window.tb_remove)try{window.tb_remove()}catch(g){}},add:function(d,e){var f=this.get(d);return f?f:(f=c[d]=wp.media(b.defaults(e||{},{frame:"post",state:"insert",title:wp.media.view.l10n.addMedia,multiple:!0})),f.on("insert",function(c){var d=f.state();c=c||d.get("selection"),c&&a.when.apply(a,c.map(function(a){var b=d.display(a).toJSON();return this.send.attachment(b,a.toJSON())},this)).done(function(){wp.media.editor.insert(b.toArray(arguments).join("\n\n"))})},this),f.state("gallery-edit").on("update",function(a){this.insert(wp.media.gallery.shortcode(a).string())},this),f.state("playlist-edit").on("update",function(a){this.insert(wp.media.playlist.shortcode(a).string())},this),f.state("video-playlist-edit").on("update",function(a){this.insert(wp.media.playlist.shortcode(a).string())},this),f.state("embed").on("select",function(){var a=f.state(),c=a.get("type"),d=a.props.toJSON();d.url=d.url||"","link"===c?(b.defaults(d,{linkText:d.url,linkUrl:d.url}),this.send.link(d).done(function(a){wp.media.editor.insert(a)})):"image"===c&&(b.defaults(d,{title:d.url,linkUrl:"",align:"none",link:"none"}),"none"===d.link?d.linkUrl="":"file"===d.link&&(d.linkUrl=d.url),this.insert(wp.media.string.image(d)))},this),f.state("featured-image").on("select",wp.media.featuredImage.select),f.setState(f.options.state),f)},id:function(a){return a?a:(a=window.wpActiveEditor,a||b.isUndefined(window.tinymce)||!tinymce.activeEditor||(a=tinymce.activeEditor.id),a=a||"")},get:function(a){return a=this.id(a),c[a]},remove:function(a){a=this.id(a),delete c[a]},send:{attachment:function(a,c){var d,e,f=c.caption;return wp.media.view.settings.captions||delete c.caption,a=wp.media.string.props(a,c),d={id:c.id,post_content:c.description,post_excerpt:f},a.linkUrl&&(d.url=a.linkUrl),"image"===c.type?(e=wp.media.string.image(a),b.each({align:"align",size:"image-size",alt:"image_alt"},function(b,c){a[c]&&(d[b]=a[c])})):"video"===c.type?e=wp.media.string.video(a,c):"audio"===c.type?e=wp.media.string.audio(a,c):(e=wp.media.string.link(a),d.post_title=a.title),wp.media.post("send-attachment-to-editor",{nonce:wp.media.view.settings.nonce.sendToEditor,attachment:d,html:e,post_id:wp.media.view.settings.post.id})},link:function(a){return wp.media.post("send-link-to-editor",{nonce:wp.media.view.settings.nonce.sendToEditor,src:a.linkUrl,link_text:a.linkText,html:wp.media.string.link(a),post_id:wp.media.view.settings.post.id})}},open:function(a,b){var c;return b=b||{},a=this.id(a),this.activeEditor=a,c=this.get(a),(!c||c.options&&b.state!==c.options.state)&&(c=this.add(a,b)),wp.media.frame=c,c.open()},init:function(){a(document.body).on("click.add-media-button",".insert-media",function(b){var c=a(b.currentTarget),d=c.data("editor"),e={frame:"post",state:"insert",title:wp.media.view.l10n.addMedia,multiple:!0};b.preventDefault(),c.blur(),c.hasClass("gallery")&&(e.state="gallery",e.title=wp.media.view.l10n.createGalleryTitle),wp.media.editor.open(d,e)}),(new wp.media.view.EditorUploader).render()}},b.bindAll(wp.media.editor,"open"),a(wp.media.editor.init)}(jQuery,_);
\ No newline at end of file
index e29494f5764657c6be6b208951ddf1a272725615..5d0faa25f498725e035a6760e0bbd70a26766e81 100644 (file)
@@ -774,6 +774,10 @@ Manage = MediaFrame.extend({
        addNewClickHandler: function( event ) {
                event.preventDefault();
                this.trigger( 'toggle:upload:attachment' );
+
+               if ( this.uploader ) {
+                       this.uploader.refresh();
+               }
        },
 
        /**
index d28902ba38dabca378a39a5216a6702063c3ce03..4460cce1c5af2de622b73c6d513ca19fe79af97c 100644 (file)
@@ -1 +1 @@
-!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.controller.State.extend({defaults:{id:"edit-attachment",title:e.attachmentDetails,content:"edit-metadata",menu:!1,toolbar:!1,router:!1}}),b.exports=d},{}],2:[function(a,b,c){var d=wp.media;d.controller.EditAttachmentMetadata=a("./controllers/edit-attachment-metadata.js"),d.view.MediaFrame.Manage=a("./views/frame/manage.js"),d.view.Attachment.Details.TwoColumn=a("./views/attachment/details-two-column.js"),d.view.MediaFrame.Manage.Router=a("./routers/manage.js"),d.view.EditImage.Details=a("./views/edit-image-details.js"),d.view.MediaFrame.EditAttachments=a("./views/frame/edit-attachments.js"),d.view.SelectModeToggleButton=a("./views/button/select-mode-toggle.js"),d.view.DeleteSelectedButton=a("./views/button/delete-selected.js"),d.view.DeleteSelectedPermanentlyButton=a("./views/button/delete-selected-permanently.js")},{"./controllers/edit-attachment-metadata.js":1,"./routers/manage.js":3,"./views/attachment/details-two-column.js":4,"./views/button/delete-selected-permanently.js":5,"./views/button/delete-selected.js":6,"./views/button/select-mode-toggle.js":7,"./views/edit-image-details.js":8,"./views/frame/edit-attachments.js":9,"./views/frame/manage.js":10}],3:[function(a,b,c){var d=Backbone.Router.extend({routes:{"upload.php?item=:slug":"showItem","upload.php?search=:query":"search"},baseUrl:function(a){return"upload.php"+a},search:function(a){jQuery("#media-search-input").val(a).trigger("input")},showItem:function(a){var b,c=wp.media,d=c.frame.state().get("library");b=d.findWhere({id:parseInt(a,10)}),b?c.frame.trigger("edit:attachment",b):(b=c.attachment(a),c.frame.listenTo(b,"change",function(a){c.frame.stopListening(b),c.frame.trigger("edit:attachment",a)}),b.fetch())}});b.exports=d},{}],4:[function(a,b,c){var d,e=wp.media.view.Attachment.Details;d=e.extend({template:wp.template("attachment-details-two-column"),editAttachment:function(a){a.preventDefault(),this.controller.content.mode("edit-image")},toggleSelectionHandler:function(){},render:function(){e.prototype.render.apply(this,arguments),wp.media.mixin.removeAllPlayers(),this.$("audio, video").each(function(a,b){var c=wp.media.view.MediaDetails.prepareSrc(b);new window.MediaElementPlayer(c,wp.media.mixin.mejsSettings)})}}),b.exports=d},{}],5:[function(a,b,c){var d,e=wp.media.view.Button,f=wp.media.view.DeleteSelectedButton;d=f.extend({initialize:function(){f.prototype.initialize.apply(this,arguments),this.controller.on("select:activate",this.selectActivate,this),this.controller.on("select:deactivate",this.selectDeactivate,this)},filterChange:function(a){this.canShow="trash"===a.get("status")},selectActivate:function(){this.toggleDisabled(),this.$el.toggleClass("hidden",!this.canShow)},selectDeactivate:function(){this.toggleDisabled(),this.$el.addClass("hidden")},render:function(){return e.prototype.render.apply(this,arguments),this.selectActivate(),this}}),b.exports=d},{}],6:[function(a,b,c){var d,e=wp.media.view.Button,f=wp.media.view.l10n;d=e.extend({initialize:function(){e.prototype.initialize.apply(this,arguments),this.options.filters&&this.options.filters.model.on("change",this.filterChange,this),this.controller.on("selection:toggle",this.toggleDisabled,this)},filterChange:function(a){"trash"===a.get("status")?this.model.set("text",f.untrashSelected):wp.media.view.settings.mediaTrash?this.model.set("text",f.trashSelected):this.model.set("text",f.deleteSelected)},toggleDisabled:function(){this.model.set("disabled",!this.controller.state().get("selection").length)},render:function(){return e.prototype.render.apply(this,arguments),this.controller.isModeActive("select")?this.$el.addClass("delete-selected-button"):this.$el.addClass("delete-selected-button hidden"),this.toggleDisabled(),this}}),b.exports=d},{}],7:[function(a,b,c){var d,e=wp.media.view.Button,f=wp.media.view.l10n;d=e.extend({initialize:function(){_.defaults(this.options,{size:""}),e.prototype.initialize.apply(this,arguments),this.controller.on("select:activate select:deactivate",this.toggleBulkEditHandler,this),this.controller.on("selection:action:done",this.back,this)},back:function(){this.controller.deactivateMode("select").activateMode("edit")},click:function(){e.prototype.click.apply(this,arguments),this.controller.isModeActive("select")?this.back():this.controller.deactivateMode("edit").activateMode("select")},render:function(){return e.prototype.render.apply(this,arguments),this.$el.addClass("select-mode-toggle-button"),this},toggleBulkEditHandler:function(){var a,b=this.controller.content.get().toolbar;a=b.$(".media-toolbar-secondary > *, .media-toolbar-primary > *"),this.controller.isModeActive("select")?(this.model.set({size:"large",text:f.cancelSelection}),a.not(".spinner, .media-button").hide(),this.$el.show(),b.$(".delete-selected-button").removeClass("hidden")):(this.model.set({size:"",text:f.bulkSelect}),this.controller.content.get().$el.removeClass("fixed"),b.$el.css("width",""),b.$(".delete-selected-button").addClass("hidden"),a.not(".media-button").show(),this.controller.state().get("selection").reset())}}),b.exports=d},{}],8:[function(a,b,c){var d,e=wp.media.View,f=wp.media.view.EditImage;d=f.extend({initialize:function(a){this.editor=window.imageEdit,this.frame=a.frame,this.controller=a.controller,e.prototype.initialize.apply(this,arguments)},back:function(){this.frame.content.mode("edit-metadata")},save:function(){this.model.fetch().done(_.bind(function(){this.frame.content.mode("edit-metadata")},this))}}),b.exports=d},{}],9:[function(a,b,c){var d,e=wp.media.view.Frame,f=wp.media.view.MediaFrame,g=jQuery;d=f.extend({className:"edit-attachment-frame",template:wp.template("edit-attachment-frame"),regions:["title","content"],events:{"click .left":"previousMediaItem","click .right":"nextMediaItem"},initialize:function(){e.prototype.initialize.apply(this,arguments),_.defaults(this.options,{modal:!0,state:"edit-attachment"}),this.controller=this.options.controller,this.gridRouter=this.controller.gridRouter,this.library=this.options.library,this.options.model&&(this.model=this.options.model),this.bindHandlers(),this.createStates(),this.createModal(),this.title.mode("default"),this.toggleNav()},bindHandlers:function(){this.on("title:create:default",this.createTitle,this),this.listenTo(this.model,"change:status destroy",this.close,this),this.on("content:create:edit-metadata",this.editMetadataMode,this),this.on("content:create:edit-image",this.editImageMode,this),this.on("content:render:edit-image",this.editImageModeRender,this),this.on("close",this.detach)},createModal:function(){this.options.modal&&(this.modal=new wp.media.view.Modal({controller:this,title:this.options.title}),this.modal.on("open",_.bind(function(){g("body").on("keydown.media-modal",_.bind(this.keyEvent,this))},this)),this.modal.on("close",_.bind(function(){this.modal.remove(),g("body").off("keydown.media-modal"),g('li.attachment[data-id="'+this.model.get("id")+'"]').focus(),this.resetRoute()},this)),this.modal.content(this),this.modal.open())},createStates:function(){this.states.add([new wp.media.controller.EditAttachmentMetadata({model:this.model})])},editMetadataMode:function(a){a.view=new wp.media.view.Attachment.Details.TwoColumn({controller:this,model:this.model}),a.view.views.set(".attachment-compat",new wp.media.view.AttachmentCompat({controller:this,model:this.model})),this.model&&this.gridRouter.navigate(this.gridRouter.baseUrl("?item="+this.model.id))},editImageMode:function(a){var b=new wp.media.controller.EditImage({model:this.model,frame:this});b._toolbar=function(){},b._router=function(){},b._menu=function(){},a.view=new wp.media.view.EditImage.Details({model:this.model,frame:this,controller:b})},editImageModeRender:function(a){a.on("ready",a.loadEditor)},toggleNav:function(){this.$(".left").toggleClass("disabled",!this.hasPrevious()),this.$(".right").toggleClass("disabled",!this.hasNext())},rerender:function(){"edit-metadata"!==this.content.mode()?this.content.mode("edit-metadata"):this.content.render(),this.toggleNav()},previousMediaItem:function(){return this.hasPrevious()?(this.model=this.library.at(this.getCurrentIndex()-1),this.rerender(),void this.$(".left").focus()):void this.$(".left").blur()},nextMediaItem:function(){return this.hasNext()?(this.model=this.library.at(this.getCurrentIndex()+1),this.rerender(),void this.$(".right").focus()):void this.$(".right").blur()},getCurrentIndex:function(){return this.library.indexOf(this.model)},hasNext:function(){return this.getCurrentIndex()+1<this.library.length},hasPrevious:function(){return this.getCurrentIndex()-1>-1},keyEvent:function(a){("INPUT"!==a.target.nodeName&&"TEXTAREA"!==a.target.nodeName||a.target.readOnly||a.target.disabled)&&(39===a.keyCode&&this.nextMediaItem(),37===a.keyCode&&this.previousMediaItem())},resetRoute:function(){this.gridRouter.navigate(this.gridRouter.baseUrl(""))}}),b.exports=d},{}],10:[function(a,b,c){var d,e=wp.media.view.MediaFrame,f=wp.media.controller.Library,g=Backbone.$;d=e.extend({initialize:function(){_.defaults(this.options,{title:"",modal:!1,selection:[],library:{},multiple:"add",state:"library",uploader:!0,mode:["grid","edit"]}),this.$body=g(document.body),this.$window=g(window),this.$adminBar=g("#wpadminbar"),this.$window.on("scroll resize",_.debounce(_.bind(this.fixPosition,this),15)),g(document).on("click",".page-title-action",_.bind(this.addNewClickHandler,this)),this.$el.addClass("wp-core-ui"),(wp.Uploader.limitExceeded||!wp.Uploader.browser.supported)&&(this.options.uploader=!1),this.options.uploader&&(this.uploader=new wp.media.view.UploaderWindow({controller:this,uploader:{dropzone:document.body,container:document.body}}).render(),this.uploader.ready(),g("body").append(this.uploader.el),this.options.uploader=!1),this.gridRouter=new wp.media.view.MediaFrame.Manage.Router,e.prototype.initialize.apply(this,arguments),this.$el.appendTo(this.options.container),this.createStates(),this.bindRegionModeHandlers(),this.render(),this.bindSearchHandler()},bindSearchHandler:function(){var a=this.$("#media-search-input"),b=this.options.container.data("search"),c=this.browserView.toolbar.get("search").$el,d=this.$(".view-list"),e=_.debounce(function(a){var b=g(a.currentTarget).val(),c="";b&&(c+="?search="+b),this.gridRouter.navigate(this.gridRouter.baseUrl(c))},1e3);a.on("input",_.bind(e,this)),c.val(b).trigger("input"),this.gridRouter.on("route:search",function(){var a=window.location.href;a.indexOf("mode=")>-1?a=a.replace(/mode=[^&]+/g,"mode=list"):a+=a.indexOf("?")>-1?"&mode=list":"?mode=list",a=a.replace("search=","s="),d.prop("href",a)})},createStates:function(){var a=this.options;this.options.states||this.states.add([new f({library:wp.media.query(a.library),multiple:a.multiple,title:a.title,content:"browse",toolbar:"select",contentUserSetting:!1,filterable:"all",autoSelect:!1})])},bindRegionModeHandlers:function(){this.on("content:create:browse",this.browseContent,this),this.on("edit:attachment",this.openEditAttachmentModal,this),this.on("select:activate",this.bindKeydown,this),this.on("select:deactivate",this.unbindKeydown,this)},handleKeydown:function(a){27===a.which&&(a.preventDefault(),this.deactivateMode("select").activateMode("edit"))},bindKeydown:function(){this.$body.on("keydown.select",_.bind(this.handleKeydown,this))},unbindKeydown:function(){this.$body.off("keydown.select")},fixPosition:function(){var a,b;this.isModeActive("select")&&(a=this.$(".attachments-browser"),b=a.find(".media-toolbar"),a.offset().top+16<this.$window.scrollTop()+this.$adminBar.height()?(a.addClass("fixed"),b.css("width",a.width()+"px")):(a.removeClass("fixed"),b.css("width","")))},addNewClickHandler:function(a){a.preventDefault(),this.trigger("toggle:upload:attachment")},openEditAttachmentModal:function(a){wp.media({frame:"edit-attachments",controller:this,library:this.state().get("library"),model:a})},browseContent:function(a){var b=this.state();this.browserView=a.view=new wp.media.view.AttachmentsBrowser({controller:this,collection:b.get("library"),selection:b.get("selection"),model:b,sortable:b.get("sortable"),search:b.get("searchable"),filters:b.get("filterable"),date:b.get("date"),display:b.get("displaySettings"),dragInfo:b.get("dragInfo"),sidebar:"errors",suggestedWidth:b.get("suggestedWidth"),suggestedHeight:b.get("suggestedHeight"),AttachmentView:b.get("AttachmentView"),scrollElement:document}),this.browserView.on("ready",_.bind(this.bindDeferred,this)),this.errors=wp.Uploader.errors,this.errors.on("add remove reset",this.sidebarVisibility,this)},sidebarVisibility:function(){this.browserView.$(".media-sidebar").toggle(!!this.errors.length)},bindDeferred:function(){this.browserView.dfd&&this.browserView.dfd.done(_.bind(this.startHistory,this))},startHistory:function(){window.history&&window.history.pushState&&Backbone.history.start({root:window._wpMediaGridSettings.adminUrl,pushState:!0})}}),b.exports=d},{}]},{},[2]);
\ No newline at end of file
+!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.controller.State.extend({defaults:{id:"edit-attachment",title:e.attachmentDetails,content:"edit-metadata",menu:!1,toolbar:!1,router:!1}}),b.exports=d},{}],2:[function(a,b,c){var d=wp.media;d.controller.EditAttachmentMetadata=a("./controllers/edit-attachment-metadata.js"),d.view.MediaFrame.Manage=a("./views/frame/manage.js"),d.view.Attachment.Details.TwoColumn=a("./views/attachment/details-two-column.js"),d.view.MediaFrame.Manage.Router=a("./routers/manage.js"),d.view.EditImage.Details=a("./views/edit-image-details.js"),d.view.MediaFrame.EditAttachments=a("./views/frame/edit-attachments.js"),d.view.SelectModeToggleButton=a("./views/button/select-mode-toggle.js"),d.view.DeleteSelectedButton=a("./views/button/delete-selected.js"),d.view.DeleteSelectedPermanentlyButton=a("./views/button/delete-selected-permanently.js")},{"./controllers/edit-attachment-metadata.js":1,"./routers/manage.js":3,"./views/attachment/details-two-column.js":4,"./views/button/delete-selected-permanently.js":5,"./views/button/delete-selected.js":6,"./views/button/select-mode-toggle.js":7,"./views/edit-image-details.js":8,"./views/frame/edit-attachments.js":9,"./views/frame/manage.js":10}],3:[function(a,b,c){var d=Backbone.Router.extend({routes:{"upload.php?item=:slug":"showItem","upload.php?search=:query":"search"},baseUrl:function(a){return"upload.php"+a},search:function(a){jQuery("#media-search-input").val(a).trigger("input")},showItem:function(a){var b,c=wp.media,d=c.frame.state().get("library");b=d.findWhere({id:parseInt(a,10)}),b?c.frame.trigger("edit:attachment",b):(b=c.attachment(a),c.frame.listenTo(b,"change",function(a){c.frame.stopListening(b),c.frame.trigger("edit:attachment",a)}),b.fetch())}});b.exports=d},{}],4:[function(a,b,c){var d,e=wp.media.view.Attachment.Details;d=e.extend({template:wp.template("attachment-details-two-column"),editAttachment:function(a){a.preventDefault(),this.controller.content.mode("edit-image")},toggleSelectionHandler:function(){},render:function(){e.prototype.render.apply(this,arguments),wp.media.mixin.removeAllPlayers(),this.$("audio, video").each(function(a,b){var c=wp.media.view.MediaDetails.prepareSrc(b);new window.MediaElementPlayer(c,wp.media.mixin.mejsSettings)})}}),b.exports=d},{}],5:[function(a,b,c){var d,e=wp.media.view.Button,f=wp.media.view.DeleteSelectedButton;d=f.extend({initialize:function(){f.prototype.initialize.apply(this,arguments),this.controller.on("select:activate",this.selectActivate,this),this.controller.on("select:deactivate",this.selectDeactivate,this)},filterChange:function(a){this.canShow="trash"===a.get("status")},selectActivate:function(){this.toggleDisabled(),this.$el.toggleClass("hidden",!this.canShow)},selectDeactivate:function(){this.toggleDisabled(),this.$el.addClass("hidden")},render:function(){return e.prototype.render.apply(this,arguments),this.selectActivate(),this}}),b.exports=d},{}],6:[function(a,b,c){var d,e=wp.media.view.Button,f=wp.media.view.l10n;d=e.extend({initialize:function(){e.prototype.initialize.apply(this,arguments),this.options.filters&&this.options.filters.model.on("change",this.filterChange,this),this.controller.on("selection:toggle",this.toggleDisabled,this)},filterChange:function(a){"trash"===a.get("status")?this.model.set("text",f.untrashSelected):wp.media.view.settings.mediaTrash?this.model.set("text",f.trashSelected):this.model.set("text",f.deleteSelected)},toggleDisabled:function(){this.model.set("disabled",!this.controller.state().get("selection").length)},render:function(){return e.prototype.render.apply(this,arguments),this.controller.isModeActive("select")?this.$el.addClass("delete-selected-button"):this.$el.addClass("delete-selected-button hidden"),this.toggleDisabled(),this}}),b.exports=d},{}],7:[function(a,b,c){var d,e=wp.media.view.Button,f=wp.media.view.l10n;d=e.extend({initialize:function(){_.defaults(this.options,{size:""}),e.prototype.initialize.apply(this,arguments),this.controller.on("select:activate select:deactivate",this.toggleBulkEditHandler,this),this.controller.on("selection:action:done",this.back,this)},back:function(){this.controller.deactivateMode("select").activateMode("edit")},click:function(){e.prototype.click.apply(this,arguments),this.controller.isModeActive("select")?this.back():this.controller.deactivateMode("edit").activateMode("select")},render:function(){return e.prototype.render.apply(this,arguments),this.$el.addClass("select-mode-toggle-button"),this},toggleBulkEditHandler:function(){var a,b=this.controller.content.get().toolbar;a=b.$(".media-toolbar-secondary > *, .media-toolbar-primary > *"),this.controller.isModeActive("select")?(this.model.set({size:"large",text:f.cancelSelection}),a.not(".spinner, .media-button").hide(),this.$el.show(),b.$(".delete-selected-button").removeClass("hidden")):(this.model.set({size:"",text:f.bulkSelect}),this.controller.content.get().$el.removeClass("fixed"),b.$el.css("width",""),b.$(".delete-selected-button").addClass("hidden"),a.not(".media-button").show(),this.controller.state().get("selection").reset())}}),b.exports=d},{}],8:[function(a,b,c){var d,e=wp.media.View,f=wp.media.view.EditImage;d=f.extend({initialize:function(a){this.editor=window.imageEdit,this.frame=a.frame,this.controller=a.controller,e.prototype.initialize.apply(this,arguments)},back:function(){this.frame.content.mode("edit-metadata")},save:function(){this.model.fetch().done(_.bind(function(){this.frame.content.mode("edit-metadata")},this))}}),b.exports=d},{}],9:[function(a,b,c){var d,e=wp.media.view.Frame,f=wp.media.view.MediaFrame,g=jQuery;d=f.extend({className:"edit-attachment-frame",template:wp.template("edit-attachment-frame"),regions:["title","content"],events:{"click .left":"previousMediaItem","click .right":"nextMediaItem"},initialize:function(){e.prototype.initialize.apply(this,arguments),_.defaults(this.options,{modal:!0,state:"edit-attachment"}),this.controller=this.options.controller,this.gridRouter=this.controller.gridRouter,this.library=this.options.library,this.options.model&&(this.model=this.options.model),this.bindHandlers(),this.createStates(),this.createModal(),this.title.mode("default"),this.toggleNav()},bindHandlers:function(){this.on("title:create:default",this.createTitle,this),this.listenTo(this.model,"change:status destroy",this.close,this),this.on("content:create:edit-metadata",this.editMetadataMode,this),this.on("content:create:edit-image",this.editImageMode,this),this.on("content:render:edit-image",this.editImageModeRender,this),this.on("close",this.detach)},createModal:function(){this.options.modal&&(this.modal=new wp.media.view.Modal({controller:this,title:this.options.title}),this.modal.on("open",_.bind(function(){g("body").on("keydown.media-modal",_.bind(this.keyEvent,this))},this)),this.modal.on("close",_.bind(function(){this.modal.remove(),g("body").off("keydown.media-modal"),g('li.attachment[data-id="'+this.model.get("id")+'"]').focus(),this.resetRoute()},this)),this.modal.content(this),this.modal.open())},createStates:function(){this.states.add([new wp.media.controller.EditAttachmentMetadata({model:this.model})])},editMetadataMode:function(a){a.view=new wp.media.view.Attachment.Details.TwoColumn({controller:this,model:this.model}),a.view.views.set(".attachment-compat",new wp.media.view.AttachmentCompat({controller:this,model:this.model})),this.model&&this.gridRouter.navigate(this.gridRouter.baseUrl("?item="+this.model.id))},editImageMode:function(a){var b=new wp.media.controller.EditImage({model:this.model,frame:this});b._toolbar=function(){},b._router=function(){},b._menu=function(){},a.view=new wp.media.view.EditImage.Details({model:this.model,frame:this,controller:b})},editImageModeRender:function(a){a.on("ready",a.loadEditor)},toggleNav:function(){this.$(".left").toggleClass("disabled",!this.hasPrevious()),this.$(".right").toggleClass("disabled",!this.hasNext())},rerender:function(){"edit-metadata"!==this.content.mode()?this.content.mode("edit-metadata"):this.content.render(),this.toggleNav()},previousMediaItem:function(){return this.hasPrevious()?(this.model=this.library.at(this.getCurrentIndex()-1),this.rerender(),void this.$(".left").focus()):void this.$(".left").blur()},nextMediaItem:function(){return this.hasNext()?(this.model=this.library.at(this.getCurrentIndex()+1),this.rerender(),void this.$(".right").focus()):void this.$(".right").blur()},getCurrentIndex:function(){return this.library.indexOf(this.model)},hasNext:function(){return this.getCurrentIndex()+1<this.library.length},hasPrevious:function(){return this.getCurrentIndex()-1>-1},keyEvent:function(a){("INPUT"!==a.target.nodeName&&"TEXTAREA"!==a.target.nodeName||a.target.readOnly||a.target.disabled)&&(39===a.keyCode&&this.nextMediaItem(),37===a.keyCode&&this.previousMediaItem())},resetRoute:function(){this.gridRouter.navigate(this.gridRouter.baseUrl(""))}}),b.exports=d},{}],10:[function(a,b,c){var d,e=wp.media.view.MediaFrame,f=wp.media.controller.Library,g=Backbone.$;d=e.extend({initialize:function(){_.defaults(this.options,{title:"",modal:!1,selection:[],library:{},multiple:"add",state:"library",uploader:!0,mode:["grid","edit"]}),this.$body=g(document.body),this.$window=g(window),this.$adminBar=g("#wpadminbar"),this.$window.on("scroll resize",_.debounce(_.bind(this.fixPosition,this),15)),g(document).on("click",".page-title-action",_.bind(this.addNewClickHandler,this)),this.$el.addClass("wp-core-ui"),!wp.Uploader.limitExceeded&&wp.Uploader.browser.supported||(this.options.uploader=!1),this.options.uploader&&(this.uploader=new wp.media.view.UploaderWindow({controller:this,uploader:{dropzone:document.body,container:document.body}}).render(),this.uploader.ready(),g("body").append(this.uploader.el),this.options.uploader=!1),this.gridRouter=new wp.media.view.MediaFrame.Manage.Router,e.prototype.initialize.apply(this,arguments),this.$el.appendTo(this.options.container),this.createStates(),this.bindRegionModeHandlers(),this.render(),this.bindSearchHandler()},bindSearchHandler:function(){var a=this.$("#media-search-input"),b=this.options.container.data("search"),c=this.browserView.toolbar.get("search").$el,d=this.$(".view-list"),e=_.debounce(function(a){var b=g(a.currentTarget).val(),c="";b&&(c+="?search="+b),this.gridRouter.navigate(this.gridRouter.baseUrl(c))},1e3);a.on("input",_.bind(e,this)),c.val(b).trigger("input"),this.gridRouter.on("route:search",function(){var a=window.location.href;a.indexOf("mode=")>-1?a=a.replace(/mode=[^&]+/g,"mode=list"):a+=a.indexOf("?")>-1?"&mode=list":"?mode=list",a=a.replace("search=","s="),d.prop("href",a)})},createStates:function(){var a=this.options;this.options.states||this.states.add([new f({library:wp.media.query(a.library),multiple:a.multiple,title:a.title,content:"browse",toolbar:"select",contentUserSetting:!1,filterable:"all",autoSelect:!1})])},bindRegionModeHandlers:function(){this.on("content:create:browse",this.browseContent,this),this.on("edit:attachment",this.openEditAttachmentModal,this),this.on("select:activate",this.bindKeydown,this),this.on("select:deactivate",this.unbindKeydown,this)},handleKeydown:function(a){27===a.which&&(a.preventDefault(),this.deactivateMode("select").activateMode("edit"))},bindKeydown:function(){this.$body.on("keydown.select",_.bind(this.handleKeydown,this))},unbindKeydown:function(){this.$body.off("keydown.select")},fixPosition:function(){var a,b;this.isModeActive("select")&&(a=this.$(".attachments-browser"),b=a.find(".media-toolbar"),a.offset().top+16<this.$window.scrollTop()+this.$adminBar.height()?(a.addClass("fixed"),b.css("width",a.width()+"px")):(a.removeClass("fixed"),b.css("width","")))},addNewClickHandler:function(a){a.preventDefault(),this.trigger("toggle:upload:attachment"),this.uploader&&this.uploader.refresh()},openEditAttachmentModal:function(a){wp.media({frame:"edit-attachments",controller:this,library:this.state().get("library"),model:a})},browseContent:function(a){var b=this.state();this.browserView=a.view=new wp.media.view.AttachmentsBrowser({controller:this,collection:b.get("library"),selection:b.get("selection"),model:b,sortable:b.get("sortable"),search:b.get("searchable"),filters:b.get("filterable"),date:b.get("date"),display:b.get("displaySettings"),dragInfo:b.get("dragInfo"),sidebar:"errors",suggestedWidth:b.get("suggestedWidth"),suggestedHeight:b.get("suggestedHeight"),AttachmentView:b.get("AttachmentView"),scrollElement:document}),this.browserView.on("ready",_.bind(this.bindDeferred,this)),this.errors=wp.Uploader.errors,this.errors.on("add remove reset",this.sidebarVisibility,this)},sidebarVisibility:function(){this.browserView.$(".media-sidebar").toggle(!!this.errors.length)},bindDeferred:function(){this.browserView.dfd&&this.browserView.dfd.done(_.bind(this.startHistory,this))},startHistory:function(){window.history&&window.history.pushState&&Backbone.history.start({root:window._wpMediaGridSettings.adminUrl,pushState:!0})}}),b.exports=d},{}]},{},[2]);
\ No newline at end of file
index 5d919e5ce2d3475678654ff697525a6d9a1d3872..29d3669c9a5f6b1c1022d05131562ae00212938d 100644 (file)
@@ -1 +1 @@
-!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){var d,e,f,g,h=jQuery;window.wp=window.wp||{},g=wp.media=function(a){var b,c=g.view.MediaFrame;if(c)return a=_.defaults(a||{},{frame:"select"}),"select"===a.frame&&c.Select?b=new c.Select(a):"post"===a.frame&&c.Post?b=new c.Post(a):"manage"===a.frame&&c.Manage?b=new c.Manage(a):"image"===a.frame&&c.ImageDetails?b=new c.ImageDetails(a):"audio"===a.frame&&c.AudioDetails?b=new c.AudioDetails(a):"video"===a.frame&&c.VideoDetails?b=new c.VideoDetails(a):"edit-attachments"===a.frame&&c.EditAttachments&&(b=new c.EditAttachments(a)),delete a.frame,g.frame=b,b},_.extend(g,{model:{},view:{},controller:{},frames:{}}),f=g.model.l10n=window._wpMediaModelsL10n||{},g.model.settings=f.settings||{},delete f.settings,d=g.model.Attachment=a("./models/attachment.js"),e=g.model.Attachments=a("./models/attachments.js"),g.model.Query=a("./models/query.js"),g.model.PostImage=a("./models/post-image.js"),g.model.Selection=a("./models/selection.js"),g.compare=function(a,b,c,d){return _.isEqual(a,b)?c===d?0:c>d?-1:1:a>b?-1:1},_.extend(g,{template:wp.template,post:wp.ajax.post,ajax:wp.ajax.send,fit:function(a){var b,c=a.width,d=a.height,e=a.maxWidth,f=a.maxHeight;return _.isUndefined(e)||_.isUndefined(f)?_.isUndefined(f)?b="width":_.isUndefined(e)&&d>f&&(b="height"):b=c/d>e/f?"width":"height","width"===b&&c>e?{width:e,height:Math.round(e*d/c)}:"height"===b&&d>f?{width:Math.round(f*c/d),height:f}:{width:c,height:d}},truncate:function(a,b,c){return b=b||30,c=c||"&hellip;",a.length<=b?a:a.substr(0,b/2)+c+a.substr(-1*b/2)}}),g.attachment=function(a){return d.get(a)},e.all=new e,g.query=function(a){return new e(null,{props:_.extend(_.defaults(a||{},{orderby:"date"}),{query:!0})})},h(window).on("unload",function(){window.wp=null})},{"./models/attachment.js":2,"./models/attachments.js":3,"./models/post-image.js":4,"./models/query.js":5,"./models/selection.js":6}],2:[function(a,b,c){var d,e=Backbone.$;d=Backbone.Model.extend({sync:function(a,b,c){return _.isUndefined(this.id)?e.Deferred().rejectWith(this).promise():"read"===a?(c=c||{},c.context=this,c.data=_.extend(c.data||{},{action:"get-attachment",id:this.id}),wp.media.ajax(c)):"update"===a?this.get("nonces")&&this.get("nonces").update?(c=c||{},c.context=this,c.data=_.extend(c.data||{},{action:"save-attachment",id:this.id,nonce:this.get("nonces").update,post_id:wp.media.model.settings.post.id}),b.hasChanged()&&(c.data.changes={},_.each(b.changed,function(a,b){c.data.changes[b]=this.get(b)},this)),wp.media.ajax(c)):e.Deferred().rejectWith(this).promise():"delete"===a?(c=c||{},c.wait||(this.destroyed=!0),c.context=this,c.data=_.extend(c.data||{},{action:"delete-post",id:this.id,_wpnonce:this.get("nonces")["delete"]}),wp.media.ajax(c).done(function(){this.destroyed=!0}).fail(function(){this.destroyed=!1})):Backbone.Model.prototype.sync.apply(this,arguments)},parse:function(a){return a?(a.date=new Date(a.date),a.modified=new Date(a.modified),a):a},saveCompat:function(a,b){var c=this;return this.get("nonces")&&this.get("nonces").update?wp.media.post("save-attachment-compat",_.defaults({id:this.id,nonce:this.get("nonces").update,post_id:wp.media.model.settings.post.id},a)).done(function(a,d,e){c.set(c.parse(a,e),b)}):e.Deferred().rejectWith(this).promise()}},{create:function(a){var b=wp.media.model.Attachments;return b.all.push(a)},get:_.memoize(function(a,b){var c=wp.media.model.Attachments;return c.all.push(b||{id:a})})}),b.exports=d},{}],3:[function(a,b,c){var d=Backbone.Collection.extend({model:wp.media.model.Attachment,initialize:function(a,b){b=b||{},this.props=new Backbone.Model,this.filters=b.filters||{},this.props.on("change",this._changeFilteredProps,this),this.props.on("change:order",this._changeOrder,this),this.props.on("change:orderby",this._changeOrderby,this),this.props.on("change:query",this._changeQuery,this),this.props.set(_.defaults(b.props||{})),b.observe&&this.observe(b.observe)},_changeOrder:function(){this.comparator&&this.sort()},_changeOrderby:function(a,b){this.comparator&&this.comparator!==d.comparator||(b&&"post__in"!==b?this.comparator=d.comparator:delete this.comparator)},_changeQuery:function(a,b){b?(this.props.on("change",this._requery,this),this._requery()):this.props.off("change",this._requery,this)},_changeFilteredProps:function(a){if(!this.props.get("query")){var b=_.chain(a.changed).map(function(b,c){var e=d.filters[c],f=a.get(c);if(e){if(f&&!this.filters[c])this.filters[c]=e;else{if(f||this.filters[c]!==e)return;delete this.filters[c]}return!0}},this).any().value();b&&(this._source||(this._source=new d(this.models)),this.reset(this._source.filter(this.validator,this)))}},validateDestroyed:!1,validator:function(a){return!this.validateDestroyed&&a.destroyed?!1:_.all(this.filters,function(b){return!!b.call(this,a)},this)},validate:function(a,b){var c=this.validator(a),d=!!this.get(a.cid);return!c&&d?this.remove(a,b):c&&!d&&this.add(a,b),this},validateAll:function(a,b){return b=b||{},_.each(a.models,function(a){this.validate(a,{silent:!0})},this),b.silent||this.trigger("reset",this,b),this},observe:function(a){return this.observers=this.observers||[],this.observers.push(a),a.on("add change remove",this._validateHandler,this),a.on("reset",this._validateAllHandler,this),this.validateAll(a),this},unobserve:function(a){return a?(a.off(null,null,this),this.observers=_.without(this.observers,a)):(_.each(this.observers,function(a){a.off(null,null,this)},this),delete this.observers),this},_validateHandler:function(a,b,c){return c=b===this.mirroring?c:{silent:c&&c.silent},this.validate(a,c)},_validateAllHandler:function(a,b){return this.validateAll(a,b)},mirror:function(a){return this.mirroring&&this.mirroring===a?this:(this.unmirror(),this.mirroring=a,this.reset([],{silent:!0}),this.observe(a),this)},unmirror:function(){this.mirroring&&(this.unobserve(this.mirroring),delete this.mirroring)},more:function(a){var b=jQuery.Deferred(),c=this.mirroring,d=this;return c&&c.more?(c.more(a).done(function(){this===d.mirroring&&b.resolveWith(this)}),b.promise()):b.resolveWith(this).promise()},hasMore:function(){return this.mirroring?this.mirroring.hasMore():!1},parse:function(a,b){return _.isArray(a)||(a=[a]),_.map(a,function(a){var c,d,e;return a instanceof Backbone.Model?(c=a.get("id"),a=a.attributes):c=a.id,d=wp.media.model.Attachment.get(c),e=d.parse(a,b),_.isEqual(d.attributes,e)||d.set(e),d})},_requery:function(a){var b;this.props.get("query")&&(b=this.props.toJSON(),b.cache=!0!==a,this.mirror(wp.media.model.Query.get(b)))},saveMenuOrder:function(){if("menuOrder"===this.props.get("orderby")){var a=this.chain().filter(function(a){return!_.isUndefined(a.id)}).map(function(a,b){return b+=1,a.set("menuOrder",b),[a.id,b]}).object().value();if(!_.isEmpty(a))return wp.media.post("save-attachment-order",{nonce:wp.media.model.settings.post.nonce,post_id:wp.media.model.settings.post.id,attachments:a})}}},{comparator:function(a,b,c){var d=this.props.get("orderby"),e=this.props.get("order")||"DESC",f=a.cid,g=b.cid;return a=a.get(d),b=b.get(d),("date"===d||"modified"===d)&&(a=a||new Date,b=b||new Date),c&&c.ties&&(f=g=null),"DESC"===e?wp.media.compare(a,b,f,g):wp.media.compare(b,a,g,f)},filters:{search:function(a){return this.props.get("search")?_.any(["title","filename","description","caption","name"],function(b){var c=a.get(b);return c&&-1!==c.search(this.props.get("search"))},this):!0},type:function(a){var b,c,d=this.props.get("type"),e=a.toJSON();return!d||_.isArray(d)&&!d.length?!0:(b=e.mime||e.file&&e.file.type||"",c=_.isArray(d)?_.find(d,function(a){return-1!==b.indexOf(a)}):-1!==b.indexOf(d))},uploadedTo:function(a){var b=this.props.get("uploadedTo");return _.isUndefined(b)?!0:b===a.get("uploadedTo")},status:function(a){var b=this.props.get("status");return _.isUndefined(b)?!0:b===a.get("status")}}});b.exports=d},{}],4:[function(a,b,c){var d=Backbone.Model.extend({initialize:function(a){var b=wp.media.model.Attachment;this.attachment=!1,a.attachment_id&&(this.attachment=b.get(a.attachment_id),this.attachment.get("url")?(this.dfd=jQuery.Deferred(),this.dfd.resolve()):this.dfd=this.attachment.fetch(),this.bindAttachmentListeners()),this.on("change:link",this.updateLinkUrl,this),this.on("change:size",this.updateSize,this),this.setLinkTypeFromUrl(),this.setAspectRatio(),this.set("originalUrl",a.url)},bindAttachmentListeners:function(){this.listenTo(this.attachment,"sync",this.setLinkTypeFromUrl),this.listenTo(this.attachment,"sync",this.setAspectRatio),this.listenTo(this.attachment,"change",this.updateSize)},changeAttachment:function(a,b){this.stopListening(this.attachment),this.attachment=a,this.bindAttachmentListeners(),this.set("attachment_id",this.attachment.get("id")),this.set("caption",this.attachment.get("caption")),this.set("alt",this.attachment.get("alt")),this.set("size",b.get("size")),this.set("align",b.get("align")),this.set("link",b.get("link")),this.updateLinkUrl(),this.updateSize()},setLinkTypeFromUrl:function(){var a,b=this.get("linkUrl");return b?(a="custom",this.attachment?this.attachment.get("url")===b?a="file":this.attachment.get("link")===b&&(a="post"):this.get("url")===b&&(a="file"),void this.set("link",a)):void this.set("link","none")},updateLinkUrl:function(){var a,b=this.get("link");switch(b){case"file":a=this.attachment?this.attachment.get("url"):this.get("url"),this.set("linkUrl",a);break;case"post":this.set("linkUrl",this.attachment.get("link"));break;case"none":this.set("linkUrl","")}},updateSize:function(){var a;if(this.attachment){if("custom"===this.get("size"))return this.set("width",this.get("customWidth")),this.set("height",this.get("customHeight")),void this.set("url",this.get("originalUrl"));a=this.attachment.get("sizes")[this.get("size")],a&&(this.set("url",a.url),this.set("width",a.width),this.set("height",a.height))}},setAspectRatio:function(){var a;return this.attachment&&this.attachment.get("sizes")&&(a=this.attachment.get("sizes").full)?void this.set("aspectRatio",a.width/a.height):void this.set("aspectRatio",this.get("customWidth")/this.get("customHeight"))}});b.exports=d},{}],5:[function(a,b,c){var d,e=wp.media.model.Attachments;d=e.extend({initialize:function(a,b){var c;b=b||{},e.prototype.initialize.apply(this,arguments),this.args=b.args,this._hasMore=!0,this.created=new Date,this.filters.order=function(a){var b=this.props.get("orderby"),c=this.props.get("order");return this.comparator?this.length?1!==this.comparator(a,this.last(),{ties:!0}):"DESC"!==c||"date"!==b&&"modified"!==b?"ASC"===c&&"menuOrder"===b?0===a.get(b):!1:a.get(b)>=this.created:!0},c=["s","order","orderby","posts_per_page","post_mime_type","post_parent"],wp.Uploader&&_(this.args).chain().keys().difference(c).isEmpty().value()&&this.observe(wp.Uploader.queue)},hasMore:function(){return this._hasMore},more:function(a){var b=this;return this._more&&"pending"===this._more.state()?this._more:this.hasMore()?(a=a||{},a.remove=!1,this._more=this.fetch(a).done(function(a){(_.isEmpty(a)||-1===this.args.posts_per_page||a.length<this.args.posts_per_page)&&(b._hasMore=!1)})):jQuery.Deferred().resolveWith(this).promise()},sync:function(a,b,c){var d,f;return"read"===a?(c=c||{},c.context=this,c.data=_.extend(c.data||{},{action:"query-attachments",post_id:wp.media.model.settings.post.id}),d=_.clone(this.args),-1!==d.posts_per_page&&(d.paged=Math.round(this.length/d.posts_per_page)+1),c.data.query=d,wp.media.ajax(c)):(f=e.prototype.sync?e.prototype:Backbone,f.sync.apply(this,arguments))}},{defaultProps:{orderby:"date",order:"DESC"},defaultArgs:{posts_per_page:40},orderby:{allowed:["name","author","date","title","modified","uploadedTo","id","post__in","menuOrder"],valuemap:{id:"ID",uploadedTo:"parent",menuOrder:"menu_order ID"}},propmap:{search:"s",type:"post_mime_type",perPage:"posts_per_page",menuOrder:"menu_order",uploadedTo:"post_parent",status:"post_status",include:"post__in",exclude:"post__not_in"},get:function(){var a=[];return function(b,c){var e,f={},g=d.orderby,h=d.defaultProps,i=!!b.cache||_.isUndefined(b.cache);return delete b.query,delete b.cache,_.defaults(b,h),b.order=b.order.toUpperCase(),"DESC"!==b.order&&"ASC"!==b.order&&(b.order=h.order.toUpperCase()),_.contains(g.allowed,b.orderby)||(b.orderby=h.orderby),_.each(["include","exclude"],function(a){b[a]&&!_.isArray(b[a])&&(b[a]=[b[a]])}),_.each(b,function(a,b){_.isNull(a)||(f[d.propmap[b]||b]=a)}),_.defaults(f,d.defaultArgs),f.orderby=g.valuemap[b.orderby]||b.orderby,i?e=_.find(a,function(a){return _.isEqual(a.args,f)}):a=[],e||(e=new d([],_.extend(c||{},{props:b,args:f})),a.push(e)),e}}()}),b.exports=d},{}],6:[function(a,b,c){var d,e=wp.media.model.Attachments;d=e.extend({initialize:function(a,b){e.prototype.initialize.apply(this,arguments),this.multiple=b&&b.multiple,this.on("add remove reset",_.bind(this.single,this,!1))},add:function(a,b){return this.multiple||this.remove(this.models),e.prototype.add.call(this,a,b)},single:function(a){var b=this._single;return a&&(this._single=a),this._single&&!this.get(this._single.cid)&&delete this._single,this._single=this._single||this.last(),this._single!==b&&(b&&(b.trigger("selection:unsingle",b,this),this.get(b.cid)||this.trigger("selection:unsingle",b,this)),this._single&&this._single.trigger("selection:single",this._single,this)),this._single}}),b.exports=d},{}]},{},[1]);
\ No newline at end of file
+!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){var d,e,f,g,h=jQuery;window.wp=window.wp||{},g=wp.media=function(a){var b,c=g.view.MediaFrame;if(c)return a=_.defaults(a||{},{frame:"select"}),"select"===a.frame&&c.Select?b=new c.Select(a):"post"===a.frame&&c.Post?b=new c.Post(a):"manage"===a.frame&&c.Manage?b=new c.Manage(a):"image"===a.frame&&c.ImageDetails?b=new c.ImageDetails(a):"audio"===a.frame&&c.AudioDetails?b=new c.AudioDetails(a):"video"===a.frame&&c.VideoDetails?b=new c.VideoDetails(a):"edit-attachments"===a.frame&&c.EditAttachments&&(b=new c.EditAttachments(a)),delete a.frame,g.frame=b,b},_.extend(g,{model:{},view:{},controller:{},frames:{}}),f=g.model.l10n=window._wpMediaModelsL10n||{},g.model.settings=f.settings||{},delete f.settings,d=g.model.Attachment=a("./models/attachment.js"),e=g.model.Attachments=a("./models/attachments.js"),g.model.Query=a("./models/query.js"),g.model.PostImage=a("./models/post-image.js"),g.model.Selection=a("./models/selection.js"),g.compare=function(a,b,c,d){return _.isEqual(a,b)?c===d?0:c>d?-1:1:a>b?-1:1},_.extend(g,{template:wp.template,post:wp.ajax.post,ajax:wp.ajax.send,fit:function(a){var b,c=a.width,d=a.height,e=a.maxWidth,f=a.maxHeight;return _.isUndefined(e)||_.isUndefined(f)?_.isUndefined(f)?b="width":_.isUndefined(e)&&d>f&&(b="height"):b=c/d>e/f?"width":"height","width"===b&&c>e?{width:e,height:Math.round(e*d/c)}:"height"===b&&d>f?{width:Math.round(f*c/d),height:f}:{width:c,height:d}},truncate:function(a,b,c){return b=b||30,c=c||"&hellip;",a.length<=b?a:a.substr(0,b/2)+c+a.substr(-1*b/2)}}),g.attachment=function(a){return d.get(a)},e.all=new e,g.query=function(a){return new e(null,{props:_.extend(_.defaults(a||{},{orderby:"date"}),{query:!0})})},h(window).on("unload",function(){window.wp=null})},{"./models/attachment.js":2,"./models/attachments.js":3,"./models/post-image.js":4,"./models/query.js":5,"./models/selection.js":6}],2:[function(a,b,c){var d,e=Backbone.$;d=Backbone.Model.extend({sync:function(a,b,c){return _.isUndefined(this.id)?e.Deferred().rejectWith(this).promise():"read"===a?(c=c||{},c.context=this,c.data=_.extend(c.data||{},{action:"get-attachment",id:this.id}),wp.media.ajax(c)):"update"===a?this.get("nonces")&&this.get("nonces").update?(c=c||{},c.context=this,c.data=_.extend(c.data||{},{action:"save-attachment",id:this.id,nonce:this.get("nonces").update,post_id:wp.media.model.settings.post.id}),b.hasChanged()&&(c.data.changes={},_.each(b.changed,function(a,b){c.data.changes[b]=this.get(b)},this)),wp.media.ajax(c)):e.Deferred().rejectWith(this).promise():"delete"===a?(c=c||{},c.wait||(this.destroyed=!0),c.context=this,c.data=_.extend(c.data||{},{action:"delete-post",id:this.id,_wpnonce:this.get("nonces")["delete"]}),wp.media.ajax(c).done(function(){this.destroyed=!0}).fail(function(){this.destroyed=!1})):Backbone.Model.prototype.sync.apply(this,arguments)},parse:function(a){return a?(a.date=new Date(a.date),a.modified=new Date(a.modified),a):a},saveCompat:function(a,b){var c=this;return this.get("nonces")&&this.get("nonces").update?wp.media.post("save-attachment-compat",_.defaults({id:this.id,nonce:this.get("nonces").update,post_id:wp.media.model.settings.post.id},a)).done(function(a,d,e){c.set(c.parse(a,e),b)}):e.Deferred().rejectWith(this).promise()}},{create:function(a){var b=wp.media.model.Attachments;return b.all.push(a)},get:_.memoize(function(a,b){var c=wp.media.model.Attachments;return c.all.push(b||{id:a})})}),b.exports=d},{}],3:[function(a,b,c){var d=Backbone.Collection.extend({model:wp.media.model.Attachment,initialize:function(a,b){b=b||{},this.props=new Backbone.Model,this.filters=b.filters||{},this.props.on("change",this._changeFilteredProps,this),this.props.on("change:order",this._changeOrder,this),this.props.on("change:orderby",this._changeOrderby,this),this.props.on("change:query",this._changeQuery,this),this.props.set(_.defaults(b.props||{})),b.observe&&this.observe(b.observe)},_changeOrder:function(){this.comparator&&this.sort()},_changeOrderby:function(a,b){this.comparator&&this.comparator!==d.comparator||(b&&"post__in"!==b?this.comparator=d.comparator:delete this.comparator)},_changeQuery:function(a,b){b?(this.props.on("change",this._requery,this),this._requery()):this.props.off("change",this._requery,this)},_changeFilteredProps:function(a){if(!this.props.get("query")){var b=_.chain(a.changed).map(function(b,c){var e=d.filters[c],f=a.get(c);if(e){if(f&&!this.filters[c])this.filters[c]=e;else{if(f||this.filters[c]!==e)return;delete this.filters[c]}return!0}},this).any().value();b&&(this._source||(this._source=new d(this.models)),this.reset(this._source.filter(this.validator,this)))}},validateDestroyed:!1,validator:function(a){return!(!this.validateDestroyed&&a.destroyed)&&_.all(this.filters,function(b){return!!b.call(this,a)},this)},validate:function(a,b){var c=this.validator(a),d=!!this.get(a.cid);return!c&&d?this.remove(a,b):c&&!d&&this.add(a,b),this},validateAll:function(a,b){return b=b||{},_.each(a.models,function(a){this.validate(a,{silent:!0})},this),b.silent||this.trigger("reset",this,b),this},observe:function(a){return this.observers=this.observers||[],this.observers.push(a),a.on("add change remove",this._validateHandler,this),a.on("reset",this._validateAllHandler,this),this.validateAll(a),this},unobserve:function(a){return a?(a.off(null,null,this),this.observers=_.without(this.observers,a)):(_.each(this.observers,function(a){a.off(null,null,this)},this),delete this.observers),this},_validateHandler:function(a,b,c){return c=b===this.mirroring?c:{silent:c&&c.silent},this.validate(a,c)},_validateAllHandler:function(a,b){return this.validateAll(a,b)},mirror:function(a){return this.mirroring&&this.mirroring===a?this:(this.unmirror(),this.mirroring=a,this.reset([],{silent:!0}),this.observe(a),this)},unmirror:function(){this.mirroring&&(this.unobserve(this.mirroring),delete this.mirroring)},more:function(a){var b=jQuery.Deferred(),c=this.mirroring,d=this;return c&&c.more?(c.more(a).done(function(){this===d.mirroring&&b.resolveWith(this)}),b.promise()):b.resolveWith(this).promise()},hasMore:function(){return!!this.mirroring&&this.mirroring.hasMore()},parse:function(a,b){return _.isArray(a)||(a=[a]),_.map(a,function(a){var c,d,e;return a instanceof Backbone.Model?(c=a.get("id"),a=a.attributes):c=a.id,d=wp.media.model.Attachment.get(c),e=d.parse(a,b),_.isEqual(d.attributes,e)||d.set(e),d})},_requery:function(a){var b;this.props.get("query")&&(b=this.props.toJSON(),b.cache=!0!==a,this.mirror(wp.media.model.Query.get(b)))},saveMenuOrder:function(){if("menuOrder"===this.props.get("orderby")){var a=this.chain().filter(function(a){return!_.isUndefined(a.id)}).map(function(a,b){return b+=1,a.set("menuOrder",b),[a.id,b]}).object().value();if(!_.isEmpty(a))return wp.media.post("save-attachment-order",{nonce:wp.media.model.settings.post.nonce,post_id:wp.media.model.settings.post.id,attachments:a})}}},{comparator:function(a,b,c){var d=this.props.get("orderby"),e=this.props.get("order")||"DESC",f=a.cid,g=b.cid;return a=a.get(d),b=b.get(d),"date"!==d&&"modified"!==d||(a=a||new Date,b=b||new Date),c&&c.ties&&(f=g=null),"DESC"===e?wp.media.compare(a,b,f,g):wp.media.compare(b,a,g,f)},filters:{search:function(a){return!this.props.get("search")||_.any(["title","filename","description","caption","name"],function(b){var c=a.get(b);return c&&-1!==c.search(this.props.get("search"))},this)},type:function(a){var b,c,d=this.props.get("type"),e=a.toJSON();return!(d&&(!_.isArray(d)||d.length))||(b=e.mime||e.file&&e.file.type||"",c=_.isArray(d)?_.find(d,function(a){return-1!==b.indexOf(a)}):-1!==b.indexOf(d))},uploadedTo:function(a){var b=this.props.get("uploadedTo");return!!_.isUndefined(b)||b===a.get("uploadedTo")},status:function(a){var b=this.props.get("status");return!!_.isUndefined(b)||b===a.get("status")}}});b.exports=d},{}],4:[function(a,b,c){var d=Backbone.Model.extend({initialize:function(a){var b=wp.media.model.Attachment;this.attachment=!1,a.attachment_id&&(this.attachment=b.get(a.attachment_id),this.attachment.get("url")?(this.dfd=jQuery.Deferred(),this.dfd.resolve()):this.dfd=this.attachment.fetch(),this.bindAttachmentListeners()),this.on("change:link",this.updateLinkUrl,this),this.on("change:size",this.updateSize,this),this.setLinkTypeFromUrl(),this.setAspectRatio(),this.set("originalUrl",a.url)},bindAttachmentListeners:function(){this.listenTo(this.attachment,"sync",this.setLinkTypeFromUrl),this.listenTo(this.attachment,"sync",this.setAspectRatio),this.listenTo(this.attachment,"change",this.updateSize)},changeAttachment:function(a,b){this.stopListening(this.attachment),this.attachment=a,this.bindAttachmentListeners(),this.set("attachment_id",this.attachment.get("id")),this.set("caption",this.attachment.get("caption")),this.set("alt",this.attachment.get("alt")),this.set("size",b.get("size")),this.set("align",b.get("align")),this.set("link",b.get("link")),this.updateLinkUrl(),this.updateSize()},setLinkTypeFromUrl:function(){var a,b=this.get("linkUrl");return b?(a="custom",this.attachment?this.attachment.get("url")===b?a="file":this.attachment.get("link")===b&&(a="post"):this.get("url")===b&&(a="file"),void this.set("link",a)):void this.set("link","none")},updateLinkUrl:function(){var a,b=this.get("link");switch(b){case"file":a=this.attachment?this.attachment.get("url"):this.get("url"),this.set("linkUrl",a);break;case"post":this.set("linkUrl",this.attachment.get("link"));break;case"none":this.set("linkUrl","")}},updateSize:function(){var a;if(this.attachment){if("custom"===this.get("size"))return this.set("width",this.get("customWidth")),this.set("height",this.get("customHeight")),void this.set("url",this.get("originalUrl"));a=this.attachment.get("sizes")[this.get("size")],a&&(this.set("url",a.url),this.set("width",a.width),this.set("height",a.height))}},setAspectRatio:function(){var a;return this.attachment&&this.attachment.get("sizes")&&(a=this.attachment.get("sizes").full)?void this.set("aspectRatio",a.width/a.height):void this.set("aspectRatio",this.get("customWidth")/this.get("customHeight"))}});b.exports=d},{}],5:[function(a,b,c){var d,e=wp.media.model.Attachments;d=e.extend({initialize:function(a,b){var c;b=b||{},e.prototype.initialize.apply(this,arguments),this.args=b.args,this._hasMore=!0,this.created=new Date,this.filters.order=function(a){var b=this.props.get("orderby"),c=this.props.get("order");return!this.comparator||(this.length?1!==this.comparator(a,this.last(),{ties:!0}):"DESC"!==c||"date"!==b&&"modified"!==b?"ASC"===c&&"menuOrder"===b&&0===a.get(b):a.get(b)>=this.created)},c=["s","order","orderby","posts_per_page","post_mime_type","post_parent"],wp.Uploader&&_(this.args).chain().keys().difference(c).isEmpty().value()&&this.observe(wp.Uploader.queue)},hasMore:function(){return this._hasMore},more:function(a){var b=this;return this._more&&"pending"===this._more.state()?this._more:this.hasMore()?(a=a||{},a.remove=!1,this._more=this.fetch(a).done(function(a){(_.isEmpty(a)||-1===this.args.posts_per_page||a.length<this.args.posts_per_page)&&(b._hasMore=!1)})):jQuery.Deferred().resolveWith(this).promise()},sync:function(a,b,c){var d,f;return"read"===a?(c=c||{},c.context=this,c.data=_.extend(c.data||{},{action:"query-attachments",post_id:wp.media.model.settings.post.id}),d=_.clone(this.args),-1!==d.posts_per_page&&(d.paged=Math.round(this.length/d.posts_per_page)+1),c.data.query=d,wp.media.ajax(c)):(f=e.prototype.sync?e.prototype:Backbone,f.sync.apply(this,arguments))}},{defaultProps:{orderby:"date",order:"DESC"},defaultArgs:{posts_per_page:40},orderby:{allowed:["name","author","date","title","modified","uploadedTo","id","post__in","menuOrder"],valuemap:{id:"ID",uploadedTo:"parent",menuOrder:"menu_order ID"}},propmap:{search:"s",type:"post_mime_type",perPage:"posts_per_page",menuOrder:"menu_order",uploadedTo:"post_parent",status:"post_status",include:"post__in",exclude:"post__not_in"},get:function(){var a=[];return function(b,c){var e,f={},g=d.orderby,h=d.defaultProps,i=!!b.cache||_.isUndefined(b.cache);return delete b.query,delete b.cache,_.defaults(b,h),b.order=b.order.toUpperCase(),"DESC"!==b.order&&"ASC"!==b.order&&(b.order=h.order.toUpperCase()),_.contains(g.allowed,b.orderby)||(b.orderby=h.orderby),_.each(["include","exclude"],function(a){b[a]&&!_.isArray(b[a])&&(b[a]=[b[a]])}),_.each(b,function(a,b){_.isNull(a)||(f[d.propmap[b]||b]=a)}),_.defaults(f,d.defaultArgs),f.orderby=g.valuemap[b.orderby]||b.orderby,i?e=_.find(a,function(a){return _.isEqual(a.args,f)}):a=[],e||(e=new d([],_.extend(c||{},{props:b,args:f})),a.push(e)),e}}()}),b.exports=d},{}],6:[function(a,b,c){var d,e=wp.media.model.Attachments;d=e.extend({initialize:function(a,b){e.prototype.initialize.apply(this,arguments),this.multiple=b&&b.multiple,this.on("add remove reset",_.bind(this.single,this,!1))},add:function(a,b){return this.multiple||this.remove(this.models),e.prototype.add.call(this,a,b)},single:function(a){var b=this._single;return a&&(this._single=a),this._single&&!this.get(this._single.cid)&&delete this._single,this._single=this._single||this.last(),this._single!==b&&(b&&(b.trigger("selection:unsingle",b,this),this.get(b.cid)||this.trigger("selection:unsingle",b,this)),this._single&&this._single.trigger("selection:single",this._single,this)),this._single}}),b.exports=d},{}]},{},[1]);
\ No newline at end of file
index 60f9b9361fd684819375dccd33aa345e65fee45a..e8a8202d59e11f921f8cb9ebea55b632e5ad9a52 100644 (file)
@@ -3772,11 +3772,11 @@ AttachmentsBrowser = View.extend({
                this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this );
                this.controller.on( 'edit:selection', this.editSelection );
                this.createToolbar();
+               this.createUploader();
+               this.createAttachments();
                if ( this.options.sidebar ) {
                        this.createSidebar();
                }
-               this.createUploader();
-               this.createAttachments();
                this.updateContent();
 
                if ( ! this.options.sidebar || 'errors' === this.options.sidebar ) {
index db8d3f3d8c0ed960be7229d747b3a425aad45f92..f0fdbefcacaab0ec91e4d27921794a92513b291b 100644 (file)
@@ -1,4 +1,4 @@
-!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){var d,e=wp.media.model.Selection,f=wp.media.controller.Library;d=f.extend({defaults:_.defaults({multiple:"add",filterable:"uploaded",priority:100,syncSelection:!1},f.prototype.defaults),initialize:function(){var a=this.get("collectionType");"video"===this.get("type")&&(a="video-"+a),this.set("id",a+"-library"),this.set("toolbar",a+"-add"),this.set("menu",a),this.get("library")||this.set("library",wp.media.query({type:this.get("type")})),f.prototype.initialize.apply(this,arguments)},activate:function(){var a=this.get("library"),b=this.get("editLibrary"),c=this.frame.state(this.get("collectionType")+"-edit").get("library");b&&b!==c&&a.unobserve(b),a.validator=function(a){return!!this.mirroring.get(a.cid)&&!c.get(a.cid)&&e.prototype.validator.apply(this,arguments)},a.reset(a.mirroring.models,{silent:!0}),a.observe(c),this.set("editLibrary",c),f.prototype.activate.apply(this,arguments)}}),b.exports=d},{}],2:[function(a,b,c){var d,e=wp.media.controller.Library,f=wp.media.view.l10n,g=jQuery;d=e.extend({defaults:{multiple:!1,sortable:!0,date:!1,searchable:!1,content:"browse",describe:!0,dragInfo:!0,idealColumnWidth:170,editing:!1,priority:60,SettingsView:!1,syncSelection:!1},initialize:function(){var a=this.get("collectionType");"video"===this.get("type")&&(a="video-"+a),this.set("id",a+"-edit"),this.set("toolbar",a+"-edit"),this.get("library")||this.set("library",new wp.media.model.Selection),this.get("AttachmentView")||this.set("AttachmentView",wp.media.view.Attachment.EditLibrary),e.prototype.initialize.apply(this,arguments)},activate:function(){var a=this.get("library");a.props.set("type",this.get("type")),this.get("library").observe(wp.Uploader.queue),this.frame.on("content:render:browse",this.renderSettings,this),e.prototype.activate.apply(this,arguments)},deactivate:function(){this.get("library").unobserve(wp.Uploader.queue),this.frame.off("content:render:browse",this.renderSettings,this),e.prototype.deactivate.apply(this,arguments)},renderSettings:function(a){var b=this.get("library"),c=this.get("collectionType"),d=this.get("dragInfoText"),e=this.get("SettingsView"),h={};b&&a&&(b[c]=b[c]||new Backbone.Model,h[c]=new e({controller:this,model:b[c],priority:40}),a.sidebar.set(h),d&&a.toolbar.set("dragInfo",new wp.media.View({el:g('<div class="instructions">'+d+"</div>")[0],priority:-40})),a.toolbar.set("reverse",{text:f.reverseOrder,priority:80,click:function(){b.reset(b.toArray().reverse())}}))}}),b.exports=d},{}],3:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.controller.State.extend({defaults:{id:"cropper",title:e.cropImage,toolbar:"crop",content:"crop",router:!1,canSkipCrop:!1,doCropArgs:{}},activate:function(){this.frame.on("content:create:crop",this.createCropContent,this),this.frame.on("close",this.removeCropper,this),this.set("selection",new Backbone.Collection(this.frame._selection.single))},deactivate:function(){this.frame.toolbar.mode("browse")},createCropContent:function(){this.cropperView=new wp.media.view.Cropper({controller:this,attachment:this.get("selection").first()}),this.cropperView.on("image-loaded",this.createCropToolbar,this),this.frame.content.set(this.cropperView)},removeCropper:function(){this.imgSelect.cancelSelection(),this.imgSelect.setOptions({remove:!0}),this.imgSelect.update(),this.cropperView.remove()},createCropToolbar:function(){var a,b;a=this.get("canSkipCrop")||!1,b={controller:this.frame,items:{insert:{style:"primary",text:e.cropImage,priority:80,requires:{library:!1,selection:!1},click:function(){var a,b=this.controller;a=b.state().get("selection").first(),a.set({cropDetails:b.state().imgSelect.getSelection()}),this.$el.text(e.cropping),this.$el.attr("disabled",!0),b.state().doCrop(a).done(function(a){b.trigger("cropped",a),b.close()}).fail(function(){b.trigger("content:error:crop")})}}}},a&&_.extend(b.items,{skip:{style:"secondary",text:e.skipCropping,priority:70,requires:{library:!1,selection:!1},click:function(){var a=this.controller.state().get("selection").first();this.controller.state().cropperView.remove(),this.controller.trigger("skippedcrop",a),this.controller.close()}}}),this.frame.toolbar.set(new wp.media.view.Toolbar(b))},doCrop:function(a){return wp.ajax.post("custom-header-crop",_.extend({},this.defaults.doCropArgs,{nonce:a.get("nonces").edit,id:a.get("id"),cropDetails:a.get("cropDetails")}))}}),b.exports=d},{}],4:[function(a,b,c){var d,e=wp.media.controller;d=e.Cropper.extend({doCrop:function(a){var b=a.get("cropDetails"),c=this.get("control"),d=b.width/b.height;return c.params.flex_width&&c.params.flex_height?(b.dst_width=b.width,b.dst_height=b.height):(b.dst_width=c.params.flex_width?c.params.height*d:c.params.width,b.dst_height=c.params.flex_height?c.params.width/d:c.params.height),wp.ajax.post("crop-image",{wp_customize:"on",nonce:a.get("nonces").edit,id:a.get("id"),context:c.id,cropDetails:b})}}),b.exports=d},{}],5:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.controller.State.extend({defaults:{id:"edit-image",title:e.editImage,menu:!1,toolbar:"edit-image",content:"edit-image",url:""},activate:function(){this.frame.on("toolbar:render:edit-image",_.bind(this.toolbar,this))},deactivate:function(){this.frame.off("toolbar:render:edit-image")},toolbar:function(){var a=this.frame,b=a.lastState(),c=b&&b.id;a.toolbar.set(new wp.media.view.Toolbar({controller:a,items:{back:{style:"primary",text:e.back,priority:20,click:function(){c?a.setState(c):a.close()}}}}))}}),b.exports=d},{}],6:[function(a,b,c){var d,e=wp.media.view.l10n,f=Backbone.$;d=wp.media.controller.State.extend({defaults:{id:"embed",title:e.insertFromUrlTitle,content:"embed",menu:"default",toolbar:"main-embed",priority:120,type:"link",url:"",metadata:{}},sensitivity:400,initialize:function(a){this.metadata=a.metadata,this.debouncedScan=_.debounce(_.bind(this.scan,this),this.sensitivity),this.props=new Backbone.Model(this.metadata||{url:""}),this.props.on("change:url",this.debouncedScan,this),this.props.on("change:url",this.refresh,this),this.on("scan",this.scanImage,this)},scan:function(){var a,b=this,c={type:"link",scanners:[]};this.props.get("url")&&this.trigger("scan",c),c.scanners.length?(a=c.scanners=f.when.apply(f,c.scanners),a.always(function(){b.get("scanners")===a&&b.set("loading",!1)})):c.scanners=null,c.loading=!!c.scanners,this.set(c)},scanImage:function(a){var b=this.frame,c=this,d=this.props.get("url"),e=new Image,g=f.Deferred();a.scanners.push(g.promise()),e.onload=function(){g.resolve(),c===b.state()&&d===c.props.get("url")&&(c.set({type:"image"}),c.props.set({width:e.width,height:e.height}))},e.onerror=g.reject,e.src=d},refresh:function(){this.frame.toolbar.get().refresh()},reset:function(){this.props.clear().set({url:""}),this.active&&this.refresh()}}),b.exports=d},{}],7:[function(a,b,c){var d,e=wp.media.model.Attachment,f=wp.media.controller.Library,g=wp.media.view.l10n;d=f.extend({defaults:_.defaults({id:"featured-image",title:g.setFeaturedImageTitle,multiple:!1,filterable:"uploaded",toolbar:"featured-image",priority:60,syncSelection:!0},f.prototype.defaults),initialize:function(){var a,b;this.get("library")||this.set("library",wp.media.query({type:"image"})),f.prototype.initialize.apply(this,arguments),a=this.get("library"),b=a.comparator,a.comparator=function(a,c){var d=!!this.mirroring.get(a.cid),e=!!this.mirroring.get(c.cid);return!d&&e?-1:d&&!e?1:b.apply(this,arguments)},a.observe(this.get("selection"))},activate:function(){this.updateSelection(),this.frame.on("open",this.updateSelection,this),f.prototype.activate.apply(this,arguments)},deactivate:function(){this.frame.off("open",this.updateSelection,this),f.prototype.deactivate.apply(this,arguments)},updateSelection:function(){var a,b=this.get("selection"),c=wp.media.view.settings.post.featuredImageId;""!==c&&-1!==c&&(a=e.get(c),a.fetch()),b.reset(a?[a]:[])}}),b.exports=d},{}],8:[function(a,b,c){var d,e=wp.media.model.Selection,f=wp.media.controller.Library,g=wp.media.view.l10n;d=f.extend({defaults:_.defaults({id:"gallery-library",title:g.addToGalleryTitle,multiple:"add",filterable:"uploaded",menu:"gallery",toolbar:"gallery-add",priority:100,syncSelection:!1},f.prototype.defaults),initialize:function(){this.get("library")||this.set("library",wp.media.query({type:"image"})),f.prototype.initialize.apply(this,arguments)},activate:function(){var a=this.get("library"),b=this.frame.state("gallery-edit").get("library");this.editLibrary&&this.editLibrary!==b&&a.unobserve(this.editLibrary),a.validator=function(a){return!!this.mirroring.get(a.cid)&&!b.get(a.cid)&&e.prototype.validator.apply(this,arguments)},a.reset(a.mirroring.models,{silent:!0}),a.observe(b),this.editLibrary=b,f.prototype.activate.apply(this,arguments)}}),b.exports=d},{}],9:[function(a,b,c){var d,e=wp.media.controller.Library,f=wp.media.view.l10n;d=e.extend({defaults:{id:"gallery-edit",title:f.editGalleryTitle,multiple:!1,searchable:!1,sortable:!0,date:!1,display:!1,content:"browse",toolbar:"gallery-edit",describe:!0,displaySettings:!0,dragInfo:!0,idealColumnWidth:170,editing:!1,priority:60,syncSelection:!1},initialize:function(){this.get("library")||this.set("library",new wp.media.model.Selection),this.get("AttachmentView")||this.set("AttachmentView",wp.media.view.Attachment.EditLibrary),e.prototype.initialize.apply(this,arguments)},activate:function(){var a=this.get("library");a.props.set("type","image"),this.get("library").observe(wp.Uploader.queue),this.frame.on("content:render:browse",this.gallerySettings,this),e.prototype.activate.apply(this,arguments)},deactivate:function(){this.get("library").unobserve(wp.Uploader.queue),this.frame.off("content:render:browse",this.gallerySettings,this),e.prototype.deactivate.apply(this,arguments)},gallerySettings:function(a){if(this.get("displaySettings")){var b=this.get("library");b&&a&&(b.gallery=b.gallery||new Backbone.Model,a.sidebar.set({gallery:new wp.media.view.Settings.Gallery({controller:this,model:b.gallery,priority:40})}),a.toolbar.set("reverse",{text:f.reverseOrder,priority:80,click:function(){b.reset(b.toArray().reverse())}}))}}}),b.exports=d},{}],10:[function(a,b,c){var d,e=wp.media.controller.State,f=wp.media.controller.Library,g=wp.media.view.l10n;d=e.extend({defaults:_.defaults({id:"image-details",title:g.imageDetailsTitle,content:"image-details",menu:!1,router:!1,toolbar:"image-details",editing:!1,priority:60},f.prototype.defaults),initialize:function(a){this.image=a.image,e.prototype.initialize.apply(this,arguments)},activate:function(){this.frame.modal.$el.addClass("image-details")}}),b.exports=d},{}],11:[function(a,b,c){var d,e=wp.media.view.l10n,f=window.getUserSetting,g=window.setUserSetting;d=wp.media.controller.State.extend({defaults:{id:"library",title:e.mediaLibraryTitle,multiple:!1,content:"upload",menu:"default",router:"browse",toolbar:"select",searchable:!0,filterable:!1,sortable:!0,autoSelect:!0,describe:!1,contentUserSetting:!0,syncSelection:!0},initialize:function(){var a,b=this.get("selection");this.get("library")||this.set("library",wp.media.query()),b instanceof wp.media.model.Selection||(a=b,a||(a=this.get("library").props.toJSON(),a=_.omit(a,"orderby","query")),this.set("selection",new wp.media.model.Selection(null,{multiple:this.get("multiple"),props:a}))),this.resetDisplays()},activate:function(){this.syncSelection(),wp.Uploader.queue.on("add",this.uploading,this),this.get("selection").on("add remove reset",this.refreshContent,this),this.get("router")&&this.get("contentUserSetting")&&(this.frame.on("content:activate",this.saveContentMode,this),this.set("content",f("libraryContent",this.get("content"))))},deactivate:function(){this.recordSelection(),this.frame.off("content:activate",this.saveContentMode,this),this.get("selection").off(null,null,this),wp.Uploader.queue.off(null,null,this)},reset:function(){this.get("selection").reset(),this.resetDisplays(),this.refreshContent()},resetDisplays:function(){var a=wp.media.view.settings.defaultProps;this._displays=[],this._defaultDisplaySettings={align:f("align",a.align)||"none",size:f("imgsize",a.size)||"medium",link:f("urlbutton",a.link)||"none"}},display:function(a){var b=this._displays;return b[a.cid]||(b[a.cid]=new Backbone.Model(this.defaultDisplaySettings(a))),b[a.cid]},defaultDisplaySettings:function(a){var b=_.clone(this._defaultDisplaySettings);return(b.canEmbed=this.canEmbed(a))?b.link="embed":this.isImageAttachment(a)||"none"!==b.link||(b.link="file"),b},isImageAttachment:function(a){return a.get("uploading")?/\.(jpe?g|png|gif)$/i.test(a.get("filename")):"image"===a.get("type")},canEmbed:function(a){if(!a.get("uploading")){var b=a.get("type");if("audio"!==b&&"video"!==b)return!1}return _.contains(wp.media.view.settings.embedExts,a.get("filename").split(".").pop())},refreshContent:function(){var a=this.get("selection"),b=this.frame,c=b.router.get(),d=b.content.mode();this.active&&!a.length&&c&&!c.get(d)&&this.frame.content.render(this.get("content"))},uploading:function(a){var b=this.frame.content;"upload"===b.mode()&&this.frame.content.mode("browse"),this.get("autoSelect")&&(this.get("selection").add(a),this.frame.trigger("library:selection:add"))},saveContentMode:function(){if("browse"===this.get("router")){var a=this.frame.content.mode(),b=this.frame.router.get();b&&b.get(a)&&g("libraryContent",a)}}}),_.extend(d.prototype,wp.media.selectionSync),b.exports=d},{}],12:[function(a,b,c){var d,e=wp.media.controller.Library;d=e.extend({defaults:_.defaults({filterable:"uploaded",displaySettings:!1,priority:80,syncSelection:!1},e.prototype.defaults),initialize:function(a){this.media=a.media,this.type=a.type,this.set("library",wp.media.query({type:this.type})),e.prototype.initialize.apply(this,arguments)},activate:function(){wp.media.frame.lastMime&&(this.set("library",wp.media.query({type:wp.media.frame.lastMime})),delete wp.media.frame.lastMime),e.prototype.activate.apply(this,arguments)}}),b.exports=d},{}],13:[function(a,b,c){var d=function(a){_.extend(this,_.pick(a||{},"id","view","selector"))};d.extend=Backbone.Model.extend,_.extend(d.prototype,{mode:function(a){return a?a===this._mode?this:(this.trigger("deactivate"),this._mode=a,this.render(a),this.trigger("activate"),this):this._mode},render:function(a){if(a&&a!==this._mode)return this.mode(a);var b,c={view:null};return this.trigger("create",c),b=c.view,this.trigger("render",b),b&&this.set(b),this},get:function(){return this.view.views.first(this.selector)},set:function(a,b){return b&&(b.add=!1),this.view.views.set(this.selector,a,b)},trigger:function(a){var b,c;if(this._mode)return c=_.toArray(arguments),b=this.id+":"+a,c[0]=b+":"+this._mode,this.view.trigger.apply(this.view,c),c[0]=b,this.view.trigger.apply(this.view,c),this}}),b.exports=d},{}],14:[function(a,b,c){var d,e=wp.media.controller.Library,f=wp.media.view.l10n;d=e.extend({defaults:_.defaults({id:"replace-image",title:f.replaceImageTitle,multiple:!1,filterable:"uploaded",toolbar:"replace",menu:!1,priority:60,syncSelection:!0},e.prototype.defaults),initialize:function(a){var b,c;this.image=a.image,this.get("library")||this.set("library",wp.media.query({type:"image"})),e.prototype.initialize.apply(this,arguments),b=this.get("library"),c=b.comparator,b.comparator=function(a,b){var d=!!this.mirroring.get(a.cid),e=!!this.mirroring.get(b.cid);return!d&&e?-1:d&&!e?1:c.apply(this,arguments)},b.observe(this.get("selection"))},activate:function(){this.updateSelection(),e.prototype.activate.apply(this,arguments)},updateSelection:function(){var a=this.get("selection"),b=this.image.attachment;a.reset(b?[b]:[])}}),b.exports=d},{}],15:[function(a,b,c){var d,e=wp.media.controller;d=e.Cropper.extend({activate:function(){this.frame.on("content:create:crop",this.createCropContent,this),this.frame.on("close",this.removeCropper,this),this.set("selection",new Backbone.Collection(this.frame._selection.single))},createCropContent:function(){this.cropperView=new wp.media.view.SiteIconCropper({controller:this,attachment:this.get("selection").first()}),this.cropperView.on("image-loaded",this.createCropToolbar,this),this.frame.content.set(this.cropperView)},doCrop:function(a){var b=a.get("cropDetails"),c=this.get("control");return b.dst_width=c.params.width,b.dst_height=c.params.height,wp.ajax.post("crop-image",{nonce:a.get("nonces").edit,id:a.get("id"),context:"site-icon",cropDetails:b})}}),b.exports=d},{}],16:[function(a,b,c){var d=function(a){this.states=new Backbone.Collection(a)};d.extend=Backbone.Model.extend,_.extend(d.prototype,Backbone.Events,{state:function(a){return this.states=this.states||new Backbone.Collection,a=a||this._state,a&&!this.states.get(a)&&this.states.add({id:a}),this.states.get(a)},setState:function(a){var b=this.state();return b&&a===b.id||!this.states||!this.states.get(a)?this:(b&&(b.trigger("deactivate"),this._lastState=b.id),this._state=a,this.state().trigger("activate"),this)},lastState:function(){return this._lastState?this.state(this._lastState):void 0}}),_.each(["on","off","trigger"],function(a){d.prototype[a]=function(){return this.states=this.states||new Backbone.Collection,this.states[a].apply(this.states,arguments),this}}),b.exports=d},{}],17:[function(a,b,c){var d=Backbone.Model.extend({constructor:function(){this.on("activate",this._preActivate,this),this.on("activate",this.activate,this),this.on("activate",this._postActivate,this),this.on("deactivate",this._deactivate,this),this.on("deactivate",this.deactivate,this),this.on("reset",this.reset,this),this.on("ready",this._ready,this),this.on("ready",this.ready,this),Backbone.Model.apply(this,arguments),this.on("change:menu",this._updateMenu,this)},ready:function(){},activate:function(){},deactivate:function(){},reset:function(){},_ready:function(){this._updateMenu()},_preActivate:function(){this.active=!0},_postActivate:function(){this.on("change:menu",this._menu,this),this.on("change:titleMode",this._title,this),this.on("change:content",this._content,this),this.on("change:toolbar",this._toolbar,this),this.frame.on("title:render:default",this._renderTitle,this),this._title(),this._menu(),this._toolbar(),this._content(),this._router()},_deactivate:function(){this.active=!1,this.frame.off("title:render:default",this._renderTitle,this),this.off("change:menu",this._menu,this),this.off("change:titleMode",this._title,this),this.off("change:content",this._content,this),this.off("change:toolbar",this._toolbar,this)},_title:function(){this.frame.title.render(this.get("titleMode")||"default")},_renderTitle:function(a){a.$el.text(this.get("title")||"")},_router:function(){var a,b=this.frame.router,c=this.get("router");this.frame.$el.toggleClass("hide-router",!c),c&&(this.frame.router.render(c),a=b.get(),a&&a.select&&a.select(this.frame.content.mode()))},_menu:function(){var a,b=this.frame.menu,c=this.get("menu");this.frame.$el.toggleClass("hide-menu",!c),c&&(b.mode(c),a=b.get(),a&&a.select&&a.select(this.id))},_updateMenu:function(){var a=this.previous("menu"),b=this.get("menu");a&&this.frame.off("menu:render:"+a,this._renderMenu,this),b&&this.frame.on("menu:render:"+b,this._renderMenu,this)},_renderMenu:function(a){var b=this.get("menuItem"),c=this.get("title"),d=this.get("priority");!b&&c&&(b={text:c},d&&(b.priority=d)),b&&a.set(this.id,b)}});_.each(["toolbar","content"],function(a){d.prototype["_"+a]=function(){var b=this.get(a);b&&this.frame[a].render(b)}}),b.exports=d},{}],18:[function(a,b,c){var d={syncSelection:function(){var a=this.get("selection"),b=this.frame._selection;this.get("syncSelection")&&b&&a&&(a.multiple&&(a.reset([],{silent:!0}),a.validateAll(b.attachments),b.difference=_.difference(b.attachments.models,a.models)),a.single(b.single))},recordSelection:function(){var a=this.get("selection"),b=this.frame._selection;this.get("syncSelection")&&b&&a&&(a.multiple?(b.attachments.reset(a.toArray().concat(b.difference)),b.difference=[]):b.attachments.add(a.toArray()),b.single=a._single)}};b.exports=d},{}],19:[function(a,b,c){var d,e=wp.media,f=jQuery;e.isTouchDevice="ontouchend"in document,d=e.view.l10n=window._wpMediaViewsL10n||{},e.view.settings=d.settings||{},delete d.settings,e.model.settings.post=e.view.settings.post,f.support.transition=function(){var a,b=document.documentElement.style,c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};return a=_.find(_.keys(c),function(a){return!_.isUndefined(b[a])}),a&&{end:c[a]}}(),e.events=_.extend({},Backbone.Events),e.transition=function(a,b){var c=f.Deferred();return b=b||2e3,f.support.transition?(a instanceof f||(a=f(a)),a.first().one(f.support.transition.end,c.resolve),_.delay(c.resolve,b)):c.resolve(),c.promise()},e.controller.Region=a("./controllers/region.js"),e.controller.StateMachine=a("./controllers/state-machine.js"),e.controller.State=a("./controllers/state.js"),e.selectionSync=a("./utils/selection-sync.js"),e.controller.Library=a("./controllers/library.js"),e.controller.ImageDetails=a("./controllers/image-details.js"),e.controller.GalleryEdit=a("./controllers/gallery-edit.js"),e.controller.GalleryAdd=a("./controllers/gallery-add.js"),e.controller.CollectionEdit=a("./controllers/collection-edit.js"),e.controller.CollectionAdd=a("./controllers/collection-add.js"),e.controller.FeaturedImage=a("./controllers/featured-image.js"),e.controller.ReplaceImage=a("./controllers/replace-image.js"),e.controller.EditImage=a("./controllers/edit-image.js"),e.controller.MediaLibrary=a("./controllers/media-library.js"),e.controller.Embed=a("./controllers/embed.js"),e.controller.Cropper=a("./controllers/cropper.js"),e.controller.CustomizeImageCropper=a("./controllers/customize-image-cropper.js"),e.controller.SiteIconCropper=a("./controllers/site-icon-cropper.js"),e.View=a("./views/view.js"),e.view.Frame=a("./views/frame.js"),e.view.MediaFrame=a("./views/media-frame.js"),e.view.MediaFrame.Select=a("./views/frame/select.js"),e.view.MediaFrame.Post=a("./views/frame/post.js"),e.view.MediaFrame.ImageDetails=a("./views/frame/image-details.js"),e.view.Modal=a("./views/modal.js"),e.view.FocusManager=a("./views/focus-manager.js"),e.view.UploaderWindow=a("./views/uploader/window.js"),e.view.EditorUploader=a("./views/uploader/editor.js"),e.view.UploaderInline=a("./views/uploader/inline.js"),e.view.UploaderStatus=a("./views/uploader/status.js"),e.view.UploaderStatusError=a("./views/uploader/status-error.js"),e.view.Toolbar=a("./views/toolbar.js"),e.view.Toolbar.Select=a("./views/toolbar/select.js"),e.view.Toolbar.Embed=a("./views/toolbar/embed.js"),e.view.Button=a("./views/button.js"),e.view.ButtonGroup=a("./views/button-group.js"),e.view.PriorityList=a("./views/priority-list.js"),e.view.MenuItem=a("./views/menu-item.js"),e.view.Menu=a("./views/menu.js"),e.view.RouterItem=a("./views/router-item.js"),e.view.Router=a("./views/router.js"),e.view.Sidebar=a("./views/sidebar.js"),e.view.Attachment=a("./views/attachment.js"),e.view.Attachment.Library=a("./views/attachment/library.js"),e.view.Attachment.EditLibrary=a("./views/attachment/edit-library.js"),e.view.Attachments=a("./views/attachments.js"),e.view.Search=a("./views/search.js"),e.view.AttachmentFilters=a("./views/attachment-filters.js"),e.view.DateFilter=a("./views/attachment-filters/date.js"),e.view.AttachmentFilters.Uploaded=a("./views/attachment-filters/uploaded.js"),e.view.AttachmentFilters.All=a("./views/attachment-filters/all.js"),e.view.AttachmentsBrowser=a("./views/attachments/browser.js"),e.view.Selection=a("./views/selection.js"),e.view.Attachment.Selection=a("./views/attachment/selection.js"),e.view.Attachments.Selection=a("./views/attachments/selection.js"),e.view.Attachment.EditSelection=a("./views/attachment/edit-selection.js"),e.view.Settings=a("./views/settings.js"),e.view.Settings.AttachmentDisplay=a("./views/settings/attachment-display.js"),e.view.Settings.Gallery=a("./views/settings/gallery.js"),e.view.Settings.Playlist=a("./views/settings/playlist.js"),e.view.Attachment.Details=a("./views/attachment/details.js"),e.view.AttachmentCompat=a("./views/attachment-compat.js"),e.view.Iframe=a("./views/iframe.js"),e.view.Embed=a("./views/embed.js"),e.view.Label=a("./views/label.js"),e.view.EmbedUrl=a("./views/embed/url.js"),e.view.EmbedLink=a("./views/embed/link.js"),e.view.EmbedImage=a("./views/embed/image.js"),e.view.ImageDetails=a("./views/image-details.js"),e.view.Cropper=a("./views/cropper.js"),e.view.SiteIconCropper=a("./views/site-icon-cropper.js"),e.view.SiteIconPreview=a("./views/site-icon-preview.js"),e.view.EditImage=a("./views/edit-image.js"),e.view.Spinner=a("./views/spinner.js")},{"./controllers/collection-add.js":1,"./controllers/collection-edit.js":2,"./controllers/cropper.js":3,"./controllers/customize-image-cropper.js":4,"./controllers/edit-image.js":5,"./controllers/embed.js":6,"./controllers/featured-image.js":7,"./controllers/gallery-add.js":8,"./controllers/gallery-edit.js":9,"./controllers/image-details.js":10,"./controllers/library.js":11,"./controllers/media-library.js":12,"./controllers/region.js":13,"./controllers/replace-image.js":14,"./controllers/site-icon-cropper.js":15,"./controllers/state-machine.js":16,"./controllers/state.js":17,"./utils/selection-sync.js":18,"./views/attachment-compat.js":20,"./views/attachment-filters.js":21,"./views/attachment-filters/all.js":22,"./views/attachment-filters/date.js":23,"./views/attachment-filters/uploaded.js":24,"./views/attachment.js":25,"./views/attachment/details.js":26,"./views/attachment/edit-library.js":27,"./views/attachment/edit-selection.js":28,"./views/attachment/library.js":29,"./views/attachment/selection.js":30,"./views/attachments.js":31,"./views/attachments/browser.js":32,"./views/attachments/selection.js":33,"./views/button-group.js":34,"./views/button.js":35,"./views/cropper.js":36,"./views/edit-image.js":37,"./views/embed.js":38,"./views/embed/image.js":39,"./views/embed/link.js":40,"./views/embed/url.js":41,"./views/focus-manager.js":42,"./views/frame.js":43,"./views/frame/image-details.js":44,"./views/frame/post.js":45,"./views/frame/select.js":46,"./views/iframe.js":47,"./views/image-details.js":48,"./views/label.js":49,"./views/media-frame.js":50,"./views/menu-item.js":51,"./views/menu.js":52,"./views/modal.js":53,"./views/priority-list.js":54,"./views/router-item.js":55,"./views/router.js":56,"./views/search.js":57,"./views/selection.js":58,"./views/settings.js":59,"./views/settings/attachment-display.js":60,"./views/settings/gallery.js":61,"./views/settings/playlist.js":62,"./views/sidebar.js":63,"./views/site-icon-cropper.js":64,"./views/site-icon-preview.js":65,"./views/spinner.js":66,"./views/toolbar.js":67,"./views/toolbar/embed.js":68,"./views/toolbar/select.js":69,"./views/uploader/editor.js":70,"./views/uploader/inline.js":71,"./views/uploader/status-error.js":72,"./views/uploader/status.js":73,"./views/uploader/window.js":74,"./views/view.js":75}],20:[function(a,b,c){var d,e=wp.media.View;d=e.extend({tagName:"form",className:"compat-item",events:{submit:"preventDefault","change input":"save","change select":"save","change textarea":"save"},initialize:function(){this.listenTo(this.model,"change:compat",this.render)},dispose:function(){return this.$(":focus").length&&this.save(),e.prototype.dispose.apply(this,arguments)},render:function(){var a=this.model.get("compat");if(a&&a.item)return this.views.detach(),this.$el.html(a.item),this.views.render(),this},preventDefault:function(a){a.preventDefault()},save:function(a){var b={};a&&a.preventDefault(),_.each(this.$el.serializeArray(),function(a){b[a.name]=a.value}),this.controller.trigger("attachment:compat:waiting",["waiting"]),this.model.saveCompat(b).always(_.bind(this.postSave,this))},postSave:function(){this.controller.trigger("attachment:compat:ready",["ready"])}}),b.exports=d},{}],21:[function(a,b,c){var d,e=jQuery;d=wp.media.View.extend({tagName:"select",className:"attachment-filters",id:"media-attachment-filters",events:{change:"change"},keys:[],initialize:function(){this.createFilters(),_.extend(this.filters,this.options.filters),this.$el.html(_.chain(this.filters).map(function(a,b){return{el:e("<option></option>").val(b).html(a.text)[0],priority:a.priority||50}},this).sortBy("priority").pluck("el").value()),this.listenTo(this.model,"change",this.select),this.select()},createFilters:function(){this.filters={}},change:function(){var a=this.filters[this.el.value];a&&this.model.set(a.props)},select:function(){var a=this.model,b="all",c=a.toJSON();_.find(this.filters,function(a,d){var e=_.all(a.props,function(a,b){return a===(_.isUndefined(c[b])?null:c[b])});return e?b=d:void 0}),this.$el.val(b)}}),b.exports=d},{}],22:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.view.AttachmentFilters.extend({createFilters:function(){var a={};_.each(wp.media.view.settings.mimeTypes||{},function(b,c){a[c]={text:b,props:{status:null,type:c,uploadedTo:null,orderby:"date",order:"DESC"}}}),a.all={text:e.allMediaItems,props:{status:null,type:null,uploadedTo:null,orderby:"date",order:"DESC"},priority:10},wp.media.view.settings.post.id&&(a.uploaded={text:e.uploadedToThisPost,props:{status:null,type:null,uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20}),a.unattached={text:e.unattached,props:{status:null,uploadedTo:0,type:null,orderby:"menuOrder",order:"ASC"},priority:50},wp.media.view.settings.mediaTrash&&this.controller.isModeActive("grid")&&(a.trash={text:e.trash,props:{uploadedTo:null,status:"trash",type:null,orderby:"date",order:"DESC"},priority:50}),this.filters=a}}),b.exports=d},{}],23:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.view.AttachmentFilters.extend({id:"media-attachment-date-filters",createFilters:function(){var a={};_.each(wp.media.view.settings.months||{},function(b,c){a[c]={text:b.text,props:{year:b.year,monthnum:b.month}}}),a.all={text:e.allDates,props:{monthnum:!1,year:!1},priority:10},this.filters=a}}),b.exports=d},{}],24:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.view.AttachmentFilters.extend({createFilters:function(){var a,b=this.model.get("type"),c=wp.media.view.settings.mimeTypes;c&&b&&(a=c[b]),this.filters={all:{text:a||e.allMediaItems,props:{uploadedTo:null,orderby:"date",order:"DESC"},priority:10},uploaded:{text:e.uploadedToThisPost,props:{uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20},unattached:{text:e.unattached,props:{uploadedTo:0,orderby:"menuOrder",order:"ASC"},priority:50}}}}),b.exports=d},{}],25:[function(a,b,c){var d,e=wp.media.View,f=jQuery;d=e.extend({tagName:"li",className:"attachment",template:wp.template("attachment"),attributes:function(){return{tabIndex:0,role:"checkbox","aria-label":this.model.get("title"),"aria-checked":!1,"data-id":this.model.get("id")}},events:{"click .js--select-attachment":"toggleSelectionHandler","change [data-setting]":"updateSetting","change [data-setting] input":"updateSetting","change [data-setting] select":"updateSetting","change [data-setting] textarea":"updateSetting","click .attachment-close":"removeFromLibrary","click .check":"checkClickHandler",keydown:"toggleSelectionHandler"},buttons:{},initialize:function(){var a=this.options.selection,b=_.defaults(this.options,{rerenderOnModelChange:!0});b.rerenderOnModelChange?this.listenTo(this.model,"change",this.render):this.listenTo(this.model,"change:percent",this.progress),this.listenTo(this.model,"change:title",this._syncTitle),this.listenTo(this.model,"change:caption",this._syncCaption),this.listenTo(this.model,"change:artist",this._syncArtist),this.listenTo(this.model,"change:album",this._syncAlbum),this.listenTo(this.model,"add",this.select),
-this.listenTo(this.model,"remove",this.deselect),a&&(a.on("reset",this.updateSelect,this),this.listenTo(this.model,"selection:single selection:unsingle",this.details),this.details(this.model,this.controller.state().get("selection"))),this.listenTo(this.controller,"attachment:compat:waiting attachment:compat:ready",this.updateSave)},dispose:function(){var a=this.options.selection;return this.updateAll(),a&&a.off(null,null,this),e.prototype.dispose.apply(this,arguments),this},render:function(){var a=_.defaults(this.model.toJSON(),{orientation:"landscape",uploading:!1,type:"",subtype:"",icon:"",filename:"",caption:"",title:"",dateFormatted:"",width:"",height:"",compat:!1,alt:"",description:""},this.options);return a.buttons=this.buttons,a.describe=this.controller.state().get("describe"),"image"===a.type&&(a.size=this.imageSize()),a.can={},a.nonces&&(a.can.remove=!!a.nonces["delete"],a.can.save=!!a.nonces.update),this.controller.state().get("allowLocalEdits")&&(a.allowLocalEdits=!0),a.uploading&&!a.percent&&(a.percent=0),this.views.detach(),this.$el.html(this.template(a)),this.$el.toggleClass("uploading",a.uploading),a.uploading?this.$bar=this.$(".media-progress-bar div"):delete this.$bar,this.updateSelect(),this.updateSave(),this.views.render(),this},progress:function(){this.$bar&&this.$bar.length&&this.$bar.width(this.model.get("percent")+"%")},toggleSelectionHandler:function(a){var b;if("INPUT"!==a.target.nodeName&&"BUTTON"!==a.target.nodeName){if(37===a.keyCode||38===a.keyCode||39===a.keyCode||40===a.keyCode)return void this.controller.trigger("attachment:keydown:arrow",a);if("keydown"!==a.type||13===a.keyCode||32===a.keyCode){if(a.preventDefault(),this.controller.isModeActive("grid")){if(this.controller.isModeActive("edit"))return void this.controller.trigger("edit:attachment",this.model,a.currentTarget);this.controller.isModeActive("select")&&(b="toggle")}a.shiftKey?b="between":(a.ctrlKey||a.metaKey)&&(b="toggle"),this.toggleSelection({method:b}),this.controller.trigger("selection:toggle")}}},toggleSelection:function(a){var b,c,d,e,f=this.collection,g=this.options.selection,h=this.model,i=a&&a.method;if(g){if(b=g.single(),i=_.isUndefined(i)?g.multiple:i,"between"===i&&b&&g.multiple){if(b===h)return;return d=f.indexOf(b),e=f.indexOf(this.model),c=e>d?f.models.slice(d,e+1):f.models.slice(e,d+1),g.add(c),void g.single(h)}if("toggle"===i)return g[this.selected()?"remove":"add"](h),void g.single(h);if("add"===i)return g.add(h),void g.single(h);i||(i="add"),"add"!==i&&(i="reset"),this.selected()?g[b===h?"remove":"single"](h):(g[i](h),g.single(h))}},updateSelect:function(){this[this.selected()?"select":"deselect"]()},selected:function(){var a=this.options.selection;return a?!!a.get(this.model.cid):void 0},select:function(a,b){var c=this.options.selection,d=this.controller;!c||b&&b!==c||this.$el.hasClass("selected")||(this.$el.addClass("selected").attr("aria-checked",!0),d.isModeActive("grid")&&d.isModeActive("select")||this.$(".check").attr("tabindex","0"))},deselect:function(a,b){var c=this.options.selection;!c||b&&b!==c||this.$el.removeClass("selected").attr("aria-checked",!1).find(".check").attr("tabindex","-1")},details:function(a,b){var c,d=this.options.selection;d===b&&(c=d.single(),this.$el.toggleClass("details",c===this.model))},imageSize:function(a){var b=this.model.get("sizes"),c=!1;return a=a||"medium",b&&(b[a]?c=b[a]:b.large?c=b.large:b.thumbnail?c=b.thumbnail:b.full&&(c=b.full),c)?_.clone(c):{url:this.model.get("url"),width:this.model.get("width"),height:this.model.get("height"),orientation:this.model.get("orientation")}},updateSetting:function(a){var b,c,d=f(a.target).closest("[data-setting]");d.length&&(b=d.data("setting"),c=a.target.value,this.model.get(b)!==c&&this.save(b,c))},save:function(){var a=this,b=this._save=this._save||{status:"ready"},c=this.model.save.apply(this.model,arguments),d=b.requests?f.when(c,b.requests):c;b.savedTimer&&clearTimeout(b.savedTimer),this.updateSave("waiting"),b.requests=d,d.always(function(){b.requests===d&&(a.updateSave("resolved"===d.state()?"complete":"error"),b.savedTimer=setTimeout(function(){a.updateSave("ready"),delete b.savedTimer},2e3))})},updateSave:function(a){var b=this._save=this._save||{status:"ready"};return a&&a!==b.status&&(this.$el.removeClass("save-"+b.status),b.status=a),this.$el.addClass("save-"+b.status),this},updateAll:function(){var a,b=this.$("[data-setting]"),c=this.model;a=_.chain(b).map(function(a){var b,d,e=f("input, textarea, select, [value]",a);if(e.length)return b=f(a).data("setting"),d=e.val(),c.get(b)!==d?[b,d]:void 0}).compact().object().value(),_.isEmpty(a)||c.save(a)},removeFromLibrary:function(a){("keydown"!==a.type||13===a.keyCode||32===a.keyCode)&&(a.stopPropagation(),this.collection.remove(this.model))},checkClickHandler:function(a){var b=this.options.selection;b&&(a.stopPropagation(),b.where({id:this.model.get("id")}).length?(b.remove(this.model),this.$el.focus()):b.add(this.model))}}),_.each({caption:"_syncCaption",title:"_syncTitle",artist:"_syncArtist",album:"_syncAlbum"},function(a,b){d.prototype[a]=function(a,c){var d=this.$('[data-setting="'+b+'"]');return d.length?c===d.find("input, textarea, select, [value]").val()?this:this.render():this}}),b.exports=d},{}],26:[function(a,b,c){var d,e=wp.media.view.Attachment,f=wp.media.view.l10n;d=e.extend({tagName:"div",className:"attachment-details",template:wp.template("attachment-details"),attributes:function(){return{tabIndex:0,"data-id":this.model.get("id")}},events:{"change [data-setting]":"updateSetting","change [data-setting] input":"updateSetting","change [data-setting] select":"updateSetting","change [data-setting] textarea":"updateSetting","click .delete-attachment":"deleteAttachment","click .trash-attachment":"trashAttachment","click .untrash-attachment":"untrashAttachment","click .edit-attachment":"editAttachment",keydown:"toggleSelectionHandler"},initialize:function(){this.options=_.defaults(this.options,{rerenderOnModelChange:!1}),this.on("ready",this.initialFocus),e.prototype.initialize.apply(this,arguments)},initialFocus:function(){wp.media.isTouchDevice||this.$('input[type="text"]').eq(0).focus()},deleteAttachment:function(a){a.preventDefault(),window.confirm(f.warnDelete)&&(this.model.destroy(),this.controller.modal.focusManager.focus())},trashAttachment:function(a){var b=this.controller.library;a.preventDefault(),wp.media.view.settings.mediaTrash&&"edit-metadata"===this.controller.content.mode()?(this.model.set("status","trash"),this.model.save().done(function(){b._requery(!0)})):this.model.destroy()},untrashAttachment:function(a){var b=this.controller.library;a.preventDefault(),this.model.set("status","inherit"),this.model.save().done(function(){b._requery(!0)})},editAttachment:function(a){var b=this.controller.states.get("edit-image");window.imageEdit&&b?(a.preventDefault(),b.set("image",this.model),this.controller.setState("edit-image")):this.$el.addClass("needs-refresh")},toggleSelectionHandler:function(a){return"keydown"===a.type&&9===a.keyCode&&a.shiftKey&&a.target===this.$(":tabbable").get(0)?(this.controller.trigger("attachment:details:shift-tab",a),!1):37===a.keyCode||38===a.keyCode||39===a.keyCode||40===a.keyCode?void this.controller.trigger("attachment:keydown:arrow",a):void 0}}),b.exports=d},{}],27:[function(a,b,c){var d=wp.media.view.Attachment.extend({buttons:{close:!0}});b.exports=d},{}],28:[function(a,b,c){var d=wp.media.view.Attachment.Selection.extend({buttons:{close:!0}});b.exports=d},{}],29:[function(a,b,c){var d=wp.media.view.Attachment.extend({buttons:{check:!0}});b.exports=d},{}],30:[function(a,b,c){var d=wp.media.view.Attachment.extend({className:"attachment selection",toggleSelection:function(){this.options.selection.single(this.model)}});b.exports=d},{}],31:[function(a,b,c){var d,e=wp.media.View,f=jQuery;d=e.extend({tagName:"ul",className:"attachments",attributes:{tabIndex:-1},initialize:function(){this.el.id=_.uniqueId("__attachments-view-"),_.defaults(this.options,{refreshSensitivity:wp.media.isTouchDevice?300:200,refreshThreshold:3,AttachmentView:wp.media.view.Attachment,sortable:!1,resize:!0,idealColumnWidth:f(window).width()<640?135:150}),this._viewsByCid={},this.$window=f(window),this.resizeEvent="resize.media-modal-columns",this.collection.on("add",function(a){this.views.add(this.createAttachmentView(a),{at:this.collection.indexOf(a)})},this),this.collection.on("remove",function(a){var b=this._viewsByCid[a.cid];delete this._viewsByCid[a.cid],b&&b.remove()},this),this.collection.on("reset",this.render,this),this.listenTo(this.controller,"library:selection:add",this.attachmentFocus),this.scroll=_.chain(this.scroll).bind(this).throttle(this.options.refreshSensitivity).value(),this.options.scrollElement=this.options.scrollElement||this.el,f(this.options.scrollElement).on("scroll",this.scroll),this.initSortable(),_.bindAll(this,"setColumns"),this.options.resize&&(this.on("ready",this.bindEvents),this.controller.on("open",this.setColumns),_.defer(this.setColumns,this))},bindEvents:function(){this.$window.off(this.resizeEvent).on(this.resizeEvent,_.debounce(this.setColumns,50))},attachmentFocus:function(){this.$("li:first").focus()},restoreFocus:function(){this.$("li.selected:first").focus()},arrowEvent:function(a){var b=this.$el.children("li"),c=this.columns,d=b.filter(":focus").index(),e=c>=d+1?1:Math.ceil((d+1)/c);if(-1!==d){if(37===a.keyCode){if(0===d)return;b.eq(d-1).focus()}if(38===a.keyCode){if(1===e)return;b.eq(d-c).focus()}if(39===a.keyCode){if(b.length===d)return;b.eq(d+1).focus()}if(40===a.keyCode){if(Math.ceil(b.length/c)===e)return;b.eq(d+c).focus()}}},dispose:function(){this.collection.props.off(null,null,this),this.options.resize&&this.$window.off(this.resizeEvent),e.prototype.dispose.apply(this,arguments)},setColumns:function(){var a=this.columns,b=this.$el.width();b&&(this.columns=Math.min(Math.round(b/this.options.idealColumnWidth),12)||1,a&&a===this.columns||this.$el.closest(".media-frame-content").attr("data-columns",this.columns))},initSortable:function(){var a=this.collection;!wp.media.isTouchDevice&&this.options.sortable&&f.fn.sortable&&(this.$el.sortable(_.extend({disabled:!!a.comparator,tolerance:"pointer",start:function(a,b){b.item.data("sortableIndexStart",b.item.index())},update:function(b,c){var d=a.at(c.item.data("sortableIndexStart")),e=a.comparator;delete a.comparator,a.remove(d,{silent:!0}),a.add(d,{silent:!0,at:c.item.index()}),a.comparator=e,a.trigger("reset",a),a.saveMenuOrder()}},this.options.sortable)),a.props.on("change:orderby",function(){this.$el.sortable("option","disabled",!!a.comparator)},this),this.collection.props.on("change:orderby",this.refreshSortable,this),this.refreshSortable())},refreshSortable:function(){if(!wp.media.isTouchDevice&&this.options.sortable&&f.fn.sortable){var a=this.collection,b=a.props.get("orderby"),c="menuOrder"===b||!a.comparator;this.$el.sortable("option","disabled",!c)}},createAttachmentView:function(a){var b=new this.options.AttachmentView({controller:this.controller,model:a,collection:this.collection,selection:this.options.selection});return this._viewsByCid[a.cid]=b},prepare:function(){this.collection.length?this.views.set(this.collection.map(this.createAttachmentView,this)):(this.views.unset(),this.collection.more().done(this.scroll))},ready:function(){this.scroll()},scroll:function(){var a,b=this,c=this.options.scrollElement,d=c.scrollTop;c===document&&(c=document.body,d=f(document).scrollTop()),f(c).is(":visible")&&this.collection.hasMore()&&(a=this.views.parent.toolbar,c.scrollHeight-(d+c.clientHeight)<c.clientHeight/3&&a.get("spinner").show(),c.scrollHeight<d+c.clientHeight*this.options.refreshThreshold&&this.collection.more().done(function(){b.scroll(),a.get("spinner").hide()}))}}),b.exports=d},{}],32:[function(a,b,c){var d,e=wp.media.View,f=wp.media.view.settings.mediaTrash,g=wp.media.view.l10n,h=jQuery;d=e.extend({tagName:"div",className:"attachments-browser",initialize:function(){_.defaults(this.options,{filters:!1,search:!0,date:!0,display:!1,sidebar:!0,AttachmentView:wp.media.view.Attachment.Library}),this.controller.on("toggle:upload:attachment",this.toggleUploader,this),this.controller.on("edit:selection",this.editSelection),this.createToolbar(),this.options.sidebar&&this.createSidebar(),this.createUploader(),this.createAttachments(),this.updateContent(),this.options.sidebar&&"errors"!==this.options.sidebar||(this.$el.addClass("hide-sidebar"),"errors"===this.options.sidebar&&this.$el.addClass("sidebar-for-errors")),this.collection.on("add remove reset",this.updateContent,this)},editSelection:function(a){a.$(".media-button-backToLibrary").focus()},dispose:function(){return this.options.selection.off(null,null,this),e.prototype.dispose.apply(this,arguments),this},createToolbar:function(){var a,b,c;c={controller:this.controller},this.controller.isModeActive("grid")&&(c.className="media-toolbar wp-filter"),this.toolbar=new wp.media.view.Toolbar(c),this.views.add(this.toolbar),this.toolbar.set("spinner",new wp.media.view.Spinner({priority:-60})),-1!==h.inArray(this.options.filters,["uploaded","all"])&&(this.toolbar.set("filtersLabel",new wp.media.view.Label({value:g.filterByType,attributes:{"for":"media-attachment-filters"},priority:-80}).render()),"uploaded"===this.options.filters?this.toolbar.set("filters",new wp.media.view.AttachmentFilters.Uploaded({controller:this.controller,model:this.collection.props,priority:-80}).render()):(b=new wp.media.view.AttachmentFilters.All({controller:this.controller,model:this.collection.props,priority:-80}),this.toolbar.set("filters",b.render()))),this.controller.isModeActive("grid")?(a=e.extend({className:"view-switch media-grid-view-switch",template:wp.template("media-library-view-switcher")}),this.toolbar.set("libraryViewSwitcher",new a({controller:this.controller,priority:-90}).render()),this.toolbar.set("dateFilterLabel",new wp.media.view.Label({value:g.filterByDate,attributes:{"for":"media-attachment-date-filters"},priority:-75}).render()),this.toolbar.set("dateFilter",new wp.media.view.DateFilter({controller:this.controller,model:this.collection.props,priority:-75}).render()),this.toolbar.set("selectModeToggleButton",new wp.media.view.SelectModeToggleButton({text:g.bulkSelect,controller:this.controller,priority:-70}).render()),this.toolbar.set("deleteSelectedButton",new wp.media.view.DeleteSelectedButton({filters:b,style:"primary",disabled:!0,text:f?g.trashSelected:g.deleteSelected,controller:this.controller,priority:-60,click:function(){var a=[],b=[],c=this.controller.state().get("selection"),d=this.controller.state().get("library");c.length&&(f||window.confirm(g.warnBulkDelete))&&(!f||"trash"===c.at(0).get("status")||window.confirm(g.warnBulkTrash))&&(c.each(function(c){return c.get("nonces")["delete"]?void(f&&"trash"===c.get("status")?(c.set("status","inherit"),a.push(c.save()),b.push(c)):f?(c.set("status","trash"),a.push(c.save()),b.push(c)):c.destroy({wait:!0})):void b.push(c)}),a.length?(c.remove(b),h.when.apply(null,a).then(_.bind(function(){d._requery(!0),this.controller.trigger("selection:action:done")},this))):this.controller.trigger("selection:action:done"))}}).render()),f&&this.toolbar.set("deleteSelectedPermanentlyButton",new wp.media.view.DeleteSelectedPermanentlyButton({filters:b,style:"primary",disabled:!0,text:g.deleteSelected,controller:this.controller,priority:-55,click:function(){var a=[],b=this.controller.state().get("selection");b.length&&window.confirm(g.warnBulkDelete)&&(b.each(function(b){return b.get("nonces")["delete"]?void b.destroy():void a.push(b)}),b.remove(a),this.controller.trigger("selection:action:done"))}}).render())):this.options.date&&(this.toolbar.set("dateFilterLabel",new wp.media.view.Label({value:g.filterByDate,attributes:{"for":"media-attachment-date-filters"},priority:-75}).render()),this.toolbar.set("dateFilter",new wp.media.view.DateFilter({controller:this.controller,model:this.collection.props,priority:-75}).render())),this.options.search&&(this.toolbar.set("searchLabel",new wp.media.view.Label({value:g.searchMediaLabel,attributes:{"for":"media-search-input"},priority:60}).render()),this.toolbar.set("search",new wp.media.view.Search({controller:this.controller,model:this.collection.props,priority:60}).render())),this.options.dragInfo&&this.toolbar.set("dragInfo",new e({el:h('<div class="instructions">'+g.dragInfo+"</div>")[0],priority:-40})),this.options.suggestedWidth&&this.options.suggestedHeight&&this.toolbar.set("suggestedDimensions",new e({el:h('<div class="instructions">'+g.suggestedDimensions+" "+this.options.suggestedWidth+" &times; "+this.options.suggestedHeight+"</div>")[0],priority:-40}))},updateContent:function(){var a,b=this;a=this.controller.isModeActive("grid")?b.attachmentsNoResults:b.uploader,this.collection.length?(a.$el.addClass("hidden"),b.toolbar.get("spinner").hide()):(this.toolbar.get("spinner").show(),this.dfd=this.collection.more().done(function(){b.collection.length?a.$el.addClass("hidden"):a.$el.removeClass("hidden"),b.toolbar.get("spinner").hide()}))},createUploader:function(){this.uploader=new wp.media.view.UploaderInline({controller:this.controller,status:!1,message:this.controller.isModeActive("grid")?"":g.noItemsFound,canClose:this.controller.isModeActive("grid")}),this.uploader.hide(),this.views.add(this.uploader)},toggleUploader:function(){this.uploader.$el.hasClass("hidden")?this.uploader.show():this.uploader.hide()},createAttachments:function(){this.attachments=new wp.media.view.Attachments({controller:this.controller,collection:this.collection,selection:this.options.selection,model:this.model,sortable:this.options.sortable,scrollElement:this.options.scrollElement,idealColumnWidth:this.options.idealColumnWidth,AttachmentView:this.options.AttachmentView}),this.controller.on("attachment:keydown:arrow",_.bind(this.attachments.arrowEvent,this.attachments)),this.controller.on("attachment:details:shift-tab",_.bind(this.attachments.restoreFocus,this.attachments)),this.views.add(this.attachments),this.controller.isModeActive("grid")&&(this.attachmentsNoResults=new e({controller:this.controller,tagName:"p"}),this.attachmentsNoResults.$el.addClass("hidden no-media"),this.attachmentsNoResults.$el.html(g.noMedia),this.views.add(this.attachmentsNoResults))},createSidebar:function(){var a=this.options,b=a.selection,c=this.sidebar=new wp.media.view.Sidebar({controller:this.controller});this.views.add(c),this.controller.uploader&&c.set("uploads",new wp.media.view.UploaderStatus({controller:this.controller,priority:40})),b.on("selection:single",this.createSingle,this),b.on("selection:unsingle",this.disposeSingle,this),b.single()&&this.createSingle()},createSingle:function(){var a=this.sidebar,b=this.options.selection.single();a.set("details",new wp.media.view.Attachment.Details({controller:this.controller,model:b,priority:80})),a.set("compat",new wp.media.view.AttachmentCompat({controller:this.controller,model:b,priority:120})),this.options.display&&a.set("display",new wp.media.view.Settings.AttachmentDisplay({controller:this.controller,model:this.model.display(b),attachment:b,priority:160,userSettings:this.model.get("displayUserSettings")})),"insert"===this.model.id&&a.$el.addClass("visible")},disposeSingle:function(){var a=this.sidebar;a.unset("details"),a.unset("compat"),a.unset("display"),a.$el.removeClass("visible")}}),b.exports=d},{}],33:[function(a,b,c){var d,e=wp.media.view.Attachments;d=e.extend({events:{},initialize:function(){return _.defaults(this.options,{sortable:!1,resize:!1,AttachmentView:wp.media.view.Attachment.Selection}),e.prototype.initialize.apply(this,arguments)}}),b.exports=d},{}],34:[function(a,b,c){var d,e=Backbone.$;d=wp.media.View.extend({tagName:"div",className:"button-group button-large media-button-group",initialize:function(){this.buttons=_.map(this.options.buttons||[],function(a){return a instanceof Backbone.View?a:new wp.media.view.Button(a).render()}),delete this.options.buttons,this.options.classes&&this.$el.addClass(this.options.classes)},render:function(){return this.$el.html(e(_.pluck(this.buttons,"el")).detach()),this}}),b.exports=d},{}],35:[function(a,b,c){var d=wp.media.View.extend({tagName:"button",className:"media-button",attributes:{type:"button"},events:{click:"click"},defaults:{text:"",style:"",size:"large",disabled:!1},initialize:function(){this.model=new Backbone.Model(this.defaults),_.each(this.defaults,function(a,b){var c=this.options[b];_.isUndefined(c)||(this.model.set(b,c),delete this.options[b])},this),this.listenTo(this.model,"change",this.render)},render:function(){var a=["button",this.className],b=this.model.toJSON();return b.style&&a.push("button-"+b.style),b.size&&a.push("button-"+b.size),a=_.uniq(a.concat(this.options.classes)),this.el.className=a.join(" "),this.$el.attr("disabled",b.disabled),this.$el.text(this.model.get("text")),this},click:function(a){"#"===this.attributes.href&&a.preventDefault(),this.options.click&&!this.model.get("disabled")&&this.options.click.apply(this,arguments)}});b.exports=d},{}],36:[function(a,b,c){var d,e=wp.media.View,f=wp.media.view.UploaderStatus,g=wp.media.view.l10n,h=jQuery;d=e.extend({className:"crop-content",template:wp.template("crop-content"),initialize:function(){_.bindAll(this,"onImageLoad")},ready:function(){this.controller.frame.on("content:error:crop",this.onError,this),this.$image=this.$el.find(".crop-image"),this.$image.on("load",this.onImageLoad),h(window).on("resize.cropper",_.debounce(this.onImageLoad,250))},remove:function(){h(window).off("resize.cropper"),this.$el.remove(),this.$el.off(),e.prototype.remove.apply(this,arguments)},prepare:function(){return{title:g.cropYourImage,url:this.options.attachment.get("url")}},onImageLoad:function(){var a=this.controller.get("imgSelectOptions");"function"==typeof a&&(a=a(this.options.attachment,this.controller)),a=_.extend(a,{parent:this.$el}),this.trigger("image-loaded"),this.controller.imgSelect=this.$image.imgAreaSelect(a)},onError:function(){var a=this.options.attachment.get("filename");this.views.add(".upload-errors",new wp.media.view.UploaderStatusError({filename:f.prototype.filename(a),message:window._wpMediaViewsL10n.cropError}),{at:0})}}),b.exports=d},{}],37:[function(a,b,c){var d,e=wp.media.View;d=e.extend({className:"image-editor",template:wp.template("image-editor"),initialize:function(a){this.editor=window.imageEdit,this.controller=a.controller,e.prototype.initialize.apply(this,arguments)},prepare:function(){return this.model.toJSON()},loadEditor:function(){var a=this.editor.open(this.model.get("id"),this.model.get("nonces").edit,this);a.done(_.bind(this.focus,this))},focus:function(){this.$(".imgedit-submit .button").eq(0).focus()},back:function(){var a=this.controller.lastState();this.controller.setState(a)},refresh:function(){this.model.fetch()},save:function(){var a=this.controller.lastState();this.model.fetch().done(_.bind(function(){this.controller.setState(a)},this))}}),b.exports=d},{}],38:[function(a,b,c){var d=wp.media.View.extend({className:"media-embed",initialize:function(){this.url=new wp.media.view.EmbedUrl({controller:this.controller,model:this.model.props}).render(),this.views.set([this.url]),this.refresh(),this.listenTo(this.model,"change:type",this.refresh),this.listenTo(this.model,"change:loading",this.loading)},settings:function(a){this._settings&&this._settings.remove(),this._settings=a,this.views.add(a)},refresh:function(){var a,b=this.model.get("type");if("image"===b)a=wp.media.view.EmbedImage;else{if("link"!==b)return;a=wp.media.view.EmbedLink}this.settings(new a({controller:this.controller,model:this.model.props,priority:40}))},loading:function(){this.$el.toggleClass("embed-loading",this.model.get("loading"))}});b.exports=d},{}],39:[function(a,b,c){var d,e=wp.media.view.Settings.AttachmentDisplay;d=e.extend({className:"embed-media-settings",template:wp.template("embed-image-settings"),initialize:function(){e.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:url",this.updateImage)},updateImage:function(){this.$("img").attr("src",this.model.get("url"))}}),b.exports=d},{}],40:[function(a,b,c){var d,e=jQuery;d=wp.media.view.Settings.extend({className:"embed-link-settings",template:wp.template("embed-link-settings"),initialize:function(){this.listenTo(this.model,"change:url",this.updateoEmbed)},updateoEmbed:_.debounce(function(){var a=this.model.get("url");this.$(".embed-container").hide().find(".embed-preview").empty(),this.$(".setting").hide(),a&&(a.length<11||!a.match(/^http(s)?:\/\//))||this.fetch()},wp.media.controller.Embed.sensitivity),fetch:function(){var a;e("#embed-url-field").val()===this.model.get("url")&&(this.dfd&&"pending"===this.dfd.state()&&this.dfd.abort(),a=new wp.shortcode({tag:"embed",attrs:_.pick(this.model.attributes,["width","height","src"]),content:this.model.get("url")}),this.dfd=e.ajax({type:"POST",url:wp.ajax.settings.url,context:this,data:{action:"parse-embed",post_ID:wp.media.view.settings.post.id,shortcode:a.string()}}).done(this.renderoEmbed).fail(this.renderFail))},renderFail:function(a,b){"abort"!==b&&this.$(".link-text").show()},renderoEmbed:function(a){var b=a&&a.data&&a.data.body||"";b?this.$(".embed-container").show().find(".embed-preview").html(b):this.renderFail()}}),b.exports=d},{}],41:[function(a,b,c){var d,e=wp.media.View,f=jQuery;d=e.extend({tagName:"label",className:"embed-url",events:{input:"url",keyup:"url",change:"url"},initialize:function(){this.$input=f('<input id="embed-url-field" type="url" />').val(this.model.get("url")),this.input=this.$input[0],this.spinner=f('<span class="spinner" />')[0],this.$el.append([this.input,this.spinner]),this.listenTo(this.model,"change:url",this.render),this.model.get("url")&&_.delay(_.bind(function(){this.model.trigger("change:url")},this),500)},render:function(){var a=this.$input;if(!a.is(":focus"))return this.input.value=this.model.get("url")||"http://",e.prototype.render.apply(this,arguments),this},ready:function(){wp.media.isTouchDevice||this.focus()},url:function(a){this.model.set("url",a.target.value)},focus:function(){var a=this.$input;a.is(":visible")&&a.focus()[0].select()}}),b.exports=d},{}],42:[function(a,b,c){var d=wp.media.View.extend({events:{keydown:"constrainTabbing"},focus:function(){this.$(".media-menu-item").first().focus()},constrainTabbing:function(a){var b;if(9===a.keyCode)return b=this.$(":tabbable").not('.moxie-shim input[type="file"]'),b.last()[0]!==a.target||a.shiftKey?b.first()[0]===a.target&&a.shiftKey?(b.last().focus(),!1):void 0:(b.first().focus(),!1)}});b.exports=d},{}],43:[function(a,b,c){var d=wp.media.View.extend({initialize:function(){_.defaults(this.options,{mode:["select"]}),this._createRegions(),this._createStates(),this._createModes()},_createRegions:function(){this.regions=this.regions?this.regions.slice():[],_.each(this.regions,function(a){this[a]=new wp.media.controller.Region({view:this,id:a,selector:".media-frame-"+a})},this)},_createStates:function(){this.states=new Backbone.Collection(null,{model:wp.media.controller.State}),this.states.on("add",function(a){a.frame=this,a.trigger("ready")},this),this.options.states&&this.states.add(this.options.states)},_createModes:function(){this.activeModes=new Backbone.Collection,this.activeModes.on("add remove reset",_.bind(this.triggerModeEvents,this)),_.each(this.options.mode,function(a){this.activateMode(a)},this)},reset:function(){return this.states.invoke("trigger","reset"),this},triggerModeEvents:function(a,b,c){var d,e,f={add:"activate",remove:"deactivate"};_.each(c,function(a,b){a&&(d=b)}),_.has(f,d)&&(e=a.get("id")+":"+f[d],this.trigger(e))},activateMode:function(a){return this.isModeActive(a)?void 0:(this.activeModes.add([{id:a}]),this.$el.addClass("mode-"+a),this)},deactivateMode:function(a){return this.isModeActive(a)?(this.activeModes.remove(this.activeModes.where({id:a})),this.$el.removeClass("mode-"+a),this.trigger(a+":deactivate"),this):this},isModeActive:function(a){return Boolean(this.activeModes.where({id:a}).length)}});_.extend(d.prototype,wp.media.controller.StateMachine.prototype),b.exports=d},{}],44:[function(a,b,c){var d,e=wp.media.view.MediaFrame.Select,f=wp.media.view.l10n;d=e.extend({defaults:{id:"image",url:"",menu:"image-details",content:"image-details",toolbar:"image-details",type:"link",title:f.imageDetailsTitle,priority:120},initialize:function(a){this.image=new wp.media.model.PostImage(a.metadata),this.options.selection=new wp.media.model.Selection(this.image.attachment,{multiple:!1}),e.prototype.initialize.apply(this,arguments)},bindHandlers:function(){e.prototype.bindHandlers.apply(this,arguments),this.on("menu:create:image-details",this.createMenu,this),this.on("content:create:image-details",this.imageDetailsContent,this),this.on("content:render:edit-image",this.editImageContent,this),this.on("toolbar:render:image-details",this.renderImageDetailsToolbar,this),this.on("toolbar:render:replace",this.renderReplaceImageToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.ImageDetails({image:this.image,editable:!1}),new wp.media.controller.ReplaceImage({id:"replace-image",library:wp.media.query({type:"image"}),image:this.image,multiple:!1,title:f.imageReplaceTitle,toolbar:"replace",priority:80,displaySettings:!0}),new wp.media.controller.EditImage({image:this.image,selection:this.options.selection})])},imageDetailsContent:function(a){a.view=new wp.media.view.ImageDetails({controller:this,model:this.state().image,attachment:this.state().image.attachment})},editImageContent:function(){var a,b=this.state(),c=b.get("image");c&&(a=new wp.media.view.EditImage({model:c,controller:this}).render(),this.content.set(a),a.loadEditor())},renderImageDetailsToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{select:{style:"primary",text:f.update,priority:80,click:function(){var a=this.controller,b=a.state();a.close(),b.trigger("update",a.image.toJSON()),a.setState(a.options.state),a.reset()}}}}))},renderReplaceImageToolbar:function(){var a=this,b=a.lastState(),c=b&&b.id;this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{back:{text:f.back,priority:20,click:function(){c?a.setState(c):a.close()}},replace:{style:"primary",text:f.replace,priority:80,click:function(){var a=this.controller,b=a.state(),c=b.get("selection"),d=c.single();a.close(),a.image.changeAttachment(d,b.display(d)),b.trigger("replace",a.image.toJSON()),a.setState(a.options.state),a.reset()}}}}))}}),b.exports=d},{}],45:[function(a,b,c){var d,e=wp.media.view.MediaFrame.Select,f=wp.media.controller.Library,g=wp.media.view.l10n;d=e.extend({initialize:function(){this.counts={audio:{count:wp.media.view.settings.attachmentCounts.audio,state:"playlist"},video:{count:wp.media.view.settings.attachmentCounts.video,state:"video-playlist"}},_.defaults(this.options,{multiple:!0,editing:!1,state:"insert",metadata:{}}),e.prototype.initialize.apply(this,arguments),this.createIframeStates()},createStates:function(){var a=this.options;this.states.add([new f({id:"insert",title:g.insertMediaTitle,priority:20,toolbar:"main-insert",filterable:"all",library:wp.media.query(a.library),multiple:a.multiple?"reset":!1,editable:!0,allowLocalEdits:!0,displaySettings:!0,displayUserSettings:!0}),new f({id:"gallery",title:g.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:wp.media.query(_.defaults({type:"image"},a.library))}),new wp.media.controller.Embed({metadata:a.metadata}),new wp.media.controller.EditImage({model:a.editImage}),new wp.media.controller.GalleryEdit({library:a.selection,editing:a.editing,menu:"gallery"}),new wp.media.controller.GalleryAdd,new f({id:"playlist",title:g.createPlaylistTitle,priority:60,toolbar:"main-playlist",filterable:"uploaded",multiple:"add",editable:!1,library:wp.media.query(_.defaults({type:"audio"},a.library))}),new wp.media.controller.CollectionEdit({type:"audio",collectionType:"playlist",title:g.editPlaylistTitle,SettingsView:wp.media.view.Settings.Playlist,
-library:a.selection,editing:a.editing,menu:"playlist",dragInfoText:g.playlistDragInfo,dragInfo:!1}),new wp.media.controller.CollectionAdd({type:"audio",collectionType:"playlist",title:g.addToPlaylistTitle}),new f({id:"video-playlist",title:g.createVideoPlaylistTitle,priority:60,toolbar:"main-video-playlist",filterable:"uploaded",multiple:"add",editable:!1,library:wp.media.query(_.defaults({type:"video"},a.library))}),new wp.media.controller.CollectionEdit({type:"video",collectionType:"playlist",title:g.editVideoPlaylistTitle,SettingsView:wp.media.view.Settings.Playlist,library:a.selection,editing:a.editing,menu:"video-playlist",dragInfoText:g.videoPlaylistDragInfo,dragInfo:!1}),new wp.media.controller.CollectionAdd({type:"video",collectionType:"playlist",title:g.addToVideoPlaylistTitle})]),wp.media.view.settings.post.featuredImageId&&this.states.add(new wp.media.controller.FeaturedImage)},bindHandlers:function(){var a,b;e.prototype.bindHandlers.apply(this,arguments),this.on("activate",this.activate,this),b=_.find(this.counts,function(a){return 0===a.count}),"undefined"!=typeof b&&this.listenTo(wp.media.model.Attachments.all,"change:type",this.mediaTypeCounts),this.on("menu:create:gallery",this.createMenu,this),this.on("menu:create:playlist",this.createMenu,this),this.on("menu:create:video-playlist",this.createMenu,this),this.on("toolbar:create:main-insert",this.createToolbar,this),this.on("toolbar:create:main-gallery",this.createToolbar,this),this.on("toolbar:create:main-playlist",this.createToolbar,this),this.on("toolbar:create:main-video-playlist",this.createToolbar,this),this.on("toolbar:create:featured-image",this.featuredImageToolbar,this),this.on("toolbar:create:main-embed",this.mainEmbedToolbar,this),a={menu:{"default":"mainMenu",gallery:"galleryMenu",playlist:"playlistMenu","video-playlist":"videoPlaylistMenu"},content:{embed:"embedContent","edit-image":"editImageContent","edit-selection":"editSelectionContent"},toolbar:{"main-insert":"mainInsertToolbar","main-gallery":"mainGalleryToolbar","gallery-edit":"galleryEditToolbar","gallery-add":"galleryAddToolbar","main-playlist":"mainPlaylistToolbar","playlist-edit":"playlistEditToolbar","playlist-add":"playlistAddToolbar","main-video-playlist":"mainVideoPlaylistToolbar","video-playlist-edit":"videoPlaylistEditToolbar","video-playlist-add":"videoPlaylistAddToolbar"}},_.each(a,function(a,b){_.each(a,function(a,c){this.on(b+":render:"+c,this[a],this)},this)},this)},activate:function(){_.each(this.counts,function(a){a.count<1&&this.menuItemVisibility(a.state,"hide")},this)},mediaTypeCounts:function(a,b){"undefined"!=typeof this.counts[b]&&this.counts[b].count<1&&(this.counts[b].count++,this.menuItemVisibility(this.counts[b].state,"show"))},mainMenu:function(a){a.set({"library-separator":new wp.media.View({className:"separator",priority:100})})},menuItemVisibility:function(a,b){var c=this.menu.get();"hide"===b?c.hide(a):"show"===b&&c.show(a)},galleryMenu:function(a){var b=this.lastState(),c=b&&b.id,d=this;a.set({cancel:{text:g.cancelGalleryTitle,priority:20,click:function(){c?d.setState(c):d.close(),this.controller.modal.focusManager.focus()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},playlistMenu:function(a){var b=this.lastState(),c=b&&b.id,d=this;a.set({cancel:{text:g.cancelPlaylistTitle,priority:20,click:function(){c?d.setState(c):d.close()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},videoPlaylistMenu:function(a){var b=this.lastState(),c=b&&b.id,d=this;a.set({cancel:{text:g.cancelVideoPlaylistTitle,priority:20,click:function(){c?d.setState(c):d.close()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},embedContent:function(){var a=new wp.media.view.Embed({controller:this,model:this.state()}).render();this.content.set(a),wp.media.isTouchDevice||a.url.focus()},editSelectionContent:function(){var a,b=this.state(),c=b.get("selection");a=new wp.media.view.AttachmentsBrowser({controller:this,collection:c,selection:c,model:b,sortable:!0,search:!1,date:!1,dragInfo:!0,AttachmentView:wp.media.view.Attachments.EditSelection}).render(),a.toolbar.set("backToLibrary",{text:g.returnToLibrary,priority:-100,click:function(){this.controller.content.mode("browse")}}),this.content.set(a),this.trigger("edit:selection",this)},editImageContent:function(){var a=this.state().get("image"),b=new wp.media.view.EditImage({model:a,controller:this}).render();this.content.set(b),b.loadEditor()},selectionStatusToolbar:function(a){var b=this.state().get("editable");a.set("selection",new wp.media.view.Selection({controller:this,collection:this.state().get("selection"),priority:-40,editable:b&&function(){this.controller.content.mode("edit-selection")}}).render())},mainInsertToolbar:function(a){var b=this;this.selectionStatusToolbar(a),a.set("insert",{style:"primary",priority:80,text:g.insertIntoPost,requires:{selection:!0},click:function(){var a=b.state(),c=a.get("selection");b.close(),a.trigger("insert",c).reset()}})},mainGalleryToolbar:function(a){var b=this;this.selectionStatusToolbar(a),a.set("gallery",{style:"primary",text:g.createNewGallery,priority:60,requires:{selection:!0},click:function(){var a=b.state().get("selection"),c=b.state("gallery-edit"),d=a.where({type:"image"});c.set("library",new wp.media.model.Selection(d,{props:a.props.toJSON(),multiple:!0})),this.controller.setState("gallery-edit"),this.controller.modal.focusManager.focus()}})},mainPlaylistToolbar:function(a){var b=this;this.selectionStatusToolbar(a),a.set("playlist",{style:"primary",text:g.createNewPlaylist,priority:100,requires:{selection:!0},click:function(){var a=b.state().get("selection"),c=b.state("playlist-edit"),d=a.where({type:"audio"});c.set("library",new wp.media.model.Selection(d,{props:a.props.toJSON(),multiple:!0})),this.controller.setState("playlist-edit"),this.controller.modal.focusManager.focus()}})},mainVideoPlaylistToolbar:function(a){var b=this;this.selectionStatusToolbar(a),a.set("video-playlist",{style:"primary",text:g.createNewVideoPlaylist,priority:100,requires:{selection:!0},click:function(){var a=b.state().get("selection"),c=b.state("video-playlist-edit"),d=a.where({type:"video"});c.set("library",new wp.media.model.Selection(d,{props:a.props.toJSON(),multiple:!0})),this.controller.setState("video-playlist-edit"),this.controller.modal.focusManager.focus()}})},featuredImageToolbar:function(a){this.createSelectToolbar(a,{text:g.setFeaturedImage,state:this.options.state})},mainEmbedToolbar:function(a){a.view=new wp.media.view.Toolbar.Embed({controller:this})},galleryEditToolbar:function(){var a=this.state().get("editing");this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:a?g.updateGallery:g.insertGallery,priority:80,requires:{library:!0},click:function(){var a=this.controller,b=a.state();a.close(),b.trigger("update",b.get("library")),a.setState(a.options.state),a.reset()}}}}))},galleryAddToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:g.addToGallery,priority:80,requires:{selection:!0},click:function(){var a=this.controller,b=a.state(),c=a.state("gallery-edit");c.get("library").add(b.get("selection").models),b.trigger("reset"),a.setState("gallery-edit")}}}}))},playlistEditToolbar:function(){var a=this.state().get("editing");this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:a?g.updatePlaylist:g.insertPlaylist,priority:80,requires:{library:!0},click:function(){var a=this.controller,b=a.state();a.close(),b.trigger("update",b.get("library")),a.setState(a.options.state),a.reset()}}}}))},playlistAddToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:g.addToPlaylist,priority:80,requires:{selection:!0},click:function(){var a=this.controller,b=a.state(),c=a.state("playlist-edit");c.get("library").add(b.get("selection").models),b.trigger("reset"),a.setState("playlist-edit")}}}}))},videoPlaylistEditToolbar:function(){var a=this.state().get("editing");this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:a?g.updateVideoPlaylist:g.insertVideoPlaylist,priority:140,requires:{library:!0},click:function(){var a=this.controller,b=a.state(),c=b.get("library");c.type="video",a.close(),b.trigger("update",c),a.setState(a.options.state),a.reset()}}}}))},videoPlaylistAddToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:g.addToVideoPlaylist,priority:140,requires:{selection:!0},click:function(){var a=this.controller,b=a.state(),c=a.state("video-playlist-edit");c.get("library").add(b.get("selection").models),b.trigger("reset"),a.setState("video-playlist-edit")}}}}))}}),b.exports=d},{}],46:[function(a,b,c){var d,e=wp.media.view.MediaFrame,f=wp.media.view.l10n;d=e.extend({initialize:function(){e.prototype.initialize.apply(this,arguments),_.defaults(this.options,{selection:[],library:{},multiple:!1,state:"library"}),this.createSelection(),this.createStates(),this.bindHandlers()},createSelection:function(){var a=this.options.selection;a instanceof wp.media.model.Selection||(this.options.selection=new wp.media.model.Selection(a,{multiple:this.options.multiple})),this._selection={attachments:new wp.media.model.Attachments,difference:[]}},createStates:function(){var a=this.options;this.options.states||this.states.add([new wp.media.controller.Library({library:wp.media.query(a.library),multiple:a.multiple,title:a.title,priority:20})])},bindHandlers:function(){this.on("router:create:browse",this.createRouter,this),this.on("router:render:browse",this.browseRouter,this),this.on("content:create:browse",this.browseContent,this),this.on("content:render:upload",this.uploadContent,this),this.on("toolbar:create:select",this.createSelectToolbar,this)},browseRouter:function(a){a.set({upload:{text:f.uploadFilesTitle,priority:20},browse:{text:f.mediaLibraryTitle,priority:40}})},browseContent:function(a){var b=this.state();this.$el.removeClass("hide-toolbar"),a.view=new wp.media.view.AttachmentsBrowser({controller:this,collection:b.get("library"),selection:b.get("selection"),model:b,sortable:b.get("sortable"),search:b.get("searchable"),filters:b.get("filterable"),date:b.get("date"),display:b.has("display")?b.get("display"):b.get("displaySettings"),dragInfo:b.get("dragInfo"),idealColumnWidth:b.get("idealColumnWidth"),suggestedWidth:b.get("suggestedWidth"),suggestedHeight:b.get("suggestedHeight"),AttachmentView:b.get("AttachmentView")})},uploadContent:function(){this.$el.removeClass("hide-toolbar"),this.content.set(new wp.media.view.UploaderInline({controller:this}))},createSelectToolbar:function(a,b){b=b||this.options.button||{},b.controller=this,a.view=new wp.media.view.Toolbar.Select(b)}}),b.exports=d},{}],47:[function(a,b,c){var d=wp.media.View.extend({className:"media-iframe",render:function(){return this.views.detach(),this.$el.html('<iframe src="'+this.controller.state().get("src")+'" />'),this.views.render(),this}});b.exports=d},{}],48:[function(a,b,c){var d,e=wp.media.view.Settings.AttachmentDisplay,f=jQuery;d=e.extend({className:"image-details",template:wp.template("image-details"),events:_.defaults(e.prototype.events,{"click .edit-attachment":"editAttachment","click .replace-attachment":"replaceAttachment","click .advanced-toggle":"onToggleAdvanced",'change [data-setting="customWidth"]':"onCustomSize",'change [data-setting="customHeight"]':"onCustomSize",'keyup [data-setting="customWidth"]':"onCustomSize",'keyup [data-setting="customHeight"]':"onCustomSize"}),initialize:function(){this.options.attachment=this.model.attachment,this.listenTo(this.model,"change:url",this.updateUrl),this.listenTo(this.model,"change:link",this.toggleLinkSettings),this.listenTo(this.model,"change:size",this.toggleCustomSize),e.prototype.initialize.apply(this,arguments)},prepare:function(){var a=!1;return this.model.attachment&&(a=this.model.attachment.toJSON()),_.defaults({model:this.model.toJSON(),attachment:a},this.options)},render:function(){var a=arguments;return this.model.attachment&&"pending"===this.model.dfd.state()?this.model.dfd.done(_.bind(function(){e.prototype.render.apply(this,a),this.postRender()},this)).fail(_.bind(function(){this.model.attachment=!1,e.prototype.render.apply(this,a),this.postRender()},this)):(e.prototype.render.apply(this,arguments),this.postRender()),this},postRender:function(){setTimeout(_.bind(this.resetFocus,this),10),this.toggleLinkSettings(),"show"===window.getUserSetting("advImgDetails")&&this.toggleAdvanced(!0),this.trigger("post-render")},resetFocus:function(){this.$(".link-to-custom").blur(),this.$(".embed-media-settings").scrollTop(0)},updateUrl:function(){this.$(".image img").attr("src",this.model.get("url")),this.$(".url").val(this.model.get("url"))},toggleLinkSettings:function(){"none"===this.model.get("link")?this.$(".link-settings").addClass("hidden"):this.$(".link-settings").removeClass("hidden")},toggleCustomSize:function(){"custom"!==this.model.get("size")?this.$(".custom-size").addClass("hidden"):this.$(".custom-size").removeClass("hidden")},onCustomSize:function(a){var b,c=f(a.target).data("setting"),d=f(a.target).val();return!/^\d+/.test(d)||parseInt(d,10)<1?void a.preventDefault():void("customWidth"===c?(b=Math.round(1/this.model.get("aspectRatio")*d),this.model.set("customHeight",b,{silent:!0}),this.$('[data-setting="customHeight"]').val(b)):(b=Math.round(this.model.get("aspectRatio")*d),this.model.set("customWidth",b,{silent:!0}),this.$('[data-setting="customWidth"]').val(b)))},onToggleAdvanced:function(a){a.preventDefault(),this.toggleAdvanced()},toggleAdvanced:function(a){var b,c=this.$el.find(".advanced-section");c.hasClass("advanced-visible")||a===!1?(c.removeClass("advanced-visible"),c.find(".advanced-settings").addClass("hidden"),b="hide"):(c.addClass("advanced-visible"),c.find(".advanced-settings").removeClass("hidden"),b="show"),window.setUserSetting("advImgDetails",b)},editAttachment:function(a){var b=this.controller.states.get("edit-image");window.imageEdit&&b&&(a.preventDefault(),b.set("image",this.model.attachment),this.controller.setState("edit-image"))},replaceAttachment:function(a){a.preventDefault(),this.controller.setState("replace-image")}}),b.exports=d},{}],49:[function(a,b,c){var d=wp.media.View.extend({tagName:"label",className:"screen-reader-text",initialize:function(){this.value=this.options.value},render:function(){return this.$el.html(this.value),this}});b.exports=d},{}],50:[function(a,b,c){var d,e=wp.media.view.Frame,f=jQuery;d=e.extend({className:"media-frame",template:wp.template("media-frame"),regions:["menu","title","content","toolbar","router"],events:{"click div.media-frame-title h1":"toggleMenu"},initialize:function(){e.prototype.initialize.apply(this,arguments),_.defaults(this.options,{title:"",modal:!0,uploader:!0}),this.$el.addClass("wp-core-ui"),this.options.modal&&(this.modal=new wp.media.view.Modal({controller:this,title:this.options.title}),this.modal.content(this)),(wp.Uploader.limitExceeded||!wp.Uploader.browser.supported)&&(this.options.uploader=!1),this.options.uploader&&(this.uploader=new wp.media.view.UploaderWindow({controller:this,uploader:{dropzone:this.modal?this.modal.$el:this.$el,container:this.$el}}),this.views.set(".media-frame-uploader",this.uploader)),this.on("attach",_.bind(this.views.ready,this.views),this),this.on("title:create:default",this.createTitle,this),this.title.mode("default"),this.on("title:render",function(a){a.$el.append('<span class="dashicons dashicons-arrow-down"></span>')}),this.on("menu:create:default",this.createMenu,this)},render:function(){return!this.state()&&this.options.state&&this.setState(this.options.state),e.prototype.render.apply(this,arguments)},createTitle:function(a){a.view=new wp.media.View({controller:this,tagName:"h1"})},createMenu:function(a){a.view=new wp.media.view.Menu({controller:this})},toggleMenu:function(){this.$el.find(".media-menu").toggleClass("visible")},createToolbar:function(a){a.view=new wp.media.view.Toolbar({controller:this})},createRouter:function(a){a.view=new wp.media.view.Router({controller:this})},createIframeStates:function(a){var b,c=wp.media.view.settings,d=c.tabs,e=c.tabUrl;d&&e&&(b=f("#post_ID"),b.length&&(e+="&post_id="+b.val()),_.each(d,function(b,c){this.state("iframe:"+c).set(_.defaults({tab:c,src:e+"&tab="+c,title:b,content:"iframe",menu:"default"},a))},this),this.on("content:create:iframe",this.iframeContent,this),this.on("content:deactivate:iframe",this.iframeContentCleanup,this),this.on("menu:render:default",this.iframeMenu,this),this.on("open",this.hijackThickbox,this),this.on("close",this.restoreThickbox,this))},iframeContent:function(a){this.$el.addClass("hide-toolbar"),a.view=new wp.media.view.Iframe({controller:this})},iframeContentCleanup:function(){this.$el.removeClass("hide-toolbar")},iframeMenu:function(a){var b={};a&&(_.each(wp.media.view.settings.tabs,function(a,c){b["iframe:"+c]={text:this.state("iframe:"+c).get("title"),priority:200}},this),a.set(b))},hijackThickbox:function(){var a=this;window.tb_remove&&!this._tb_remove&&(this._tb_remove=window.tb_remove,window.tb_remove=function(){a.close(),a.reset(),a.setState(a.options.state),a._tb_remove.call(window)})},restoreThickbox:function(){this._tb_remove&&(window.tb_remove=this._tb_remove,delete this._tb_remove)}}),_.each(["open","close","attach","detach","escape"],function(a){d.prototype[a]=function(){return this.modal&&this.modal[a].apply(this.modal,arguments),this}}),b.exports=d},{}],51:[function(a,b,c){var d,e=jQuery;d=wp.media.View.extend({tagName:"a",className:"media-menu-item",attributes:{href:"#"},events:{click:"_click"},_click:function(a){var b=this.options.click;a&&a.preventDefault(),b?b.call(this):this.click(),wp.media.isTouchDevice||e(".media-frame-content input").first().focus()},click:function(){var a=this.options.state;a&&(this.controller.setState(a),this.views.parent.$el.removeClass("visible"))},render:function(){var a=this.options;return a.text?this.$el.text(a.text):a.html&&this.$el.html(a.html),this}}),b.exports=d},{}],52:[function(a,b,c){var d,e=wp.media.view.MenuItem,f=wp.media.view.PriorityList;d=f.extend({tagName:"div",className:"media-menu",property:"state",ItemView:e,region:"menu",toView:function(a,b){return a=a||{},a[this.property]=a[this.property]||b,new this.ItemView(a).render()},ready:function(){f.prototype.ready.apply(this,arguments),this.visibility()},set:function(){f.prototype.set.apply(this,arguments),this.visibility()},unset:function(){f.prototype.unset.apply(this,arguments),this.visibility()},visibility:function(){var a=this.region,b=this.controller[a].get(),c=this.views.get(),d=!c||c.length<2;this===b&&this.controller.$el.toggleClass("hide-"+a,d)},select:function(a){var b=this.get(a);b&&(this.deselect(),b.$el.addClass("active"))},deselect:function(){this.$el.children().removeClass("active")},hide:function(a){var b=this.get(a);b&&b.$el.addClass("hidden")},show:function(a){var b=this.get(a);b&&b.$el.removeClass("hidden")}}),b.exports=d},{}],53:[function(a,b,c){var d,e=jQuery;d=wp.media.View.extend({tagName:"div",template:wp.template("media-modal"),attributes:{tabindex:0},events:{"click .media-modal-backdrop, .media-modal-close":"escapeHandler",keydown:"keydown"},initialize:function(){_.defaults(this.options,{container:document.body,title:"",propagate:!0,freeze:!0}),this.focusManager=new wp.media.view.FocusManager({el:this.el})},prepare:function(){return{title:this.options.title}},attach:function(){return this.views.attached?this:(this.views.rendered||this.render(),this.$el.appendTo(this.options.container),this.views.attached=!0,this.views.ready(),this.propagate("attach"))},detach:function(){return this.$el.is(":visible")&&this.close(),this.$el.detach(),this.views.attached=!1,this.propagate("detach")},open:function(){var a,b=this.$el,c=this.options;return b.is(":visible")?this:(this.views.attached||this.attach(),c.freeze&&(this._freeze={scrollTop:e(window).scrollTop()}),e("body").addClass("modal-open"),b.show(),"ontouchend"in document&&(a=window.tinymce&&window.tinymce.activeEditor)&&!a.isHidden()&&a.iframeElement&&(a.iframeElement.focus(),a.iframeElement.blur(),setTimeout(function(){a.iframeElement.blur()},100)),this.$el.focus(),this.propagate("open"))},close:function(a){var b=this._freeze;return this.views.attached&&this.$el.is(":visible")?(e("body").removeClass("modal-open"),this.$el.hide().undelegate("keydown"),e("#wpbody-content").focus(),this.propagate("close"),b&&e(window).scrollTop(b.scrollTop),a&&a.escape&&this.propagate("escape"),this):this},escape:function(){return this.close({escape:!0})},escapeHandler:function(a){a.preventDefault(),this.escape()},content:function(a){return this.views.set(".media-modal-content",a),this},propagate:function(a){return this.trigger(a),this.options.propagate&&this.controller.trigger(a),this},keydown:function(a){27===a.which&&this.$el.is(":visible")&&(this.escape(),a.stopImmediatePropagation())}}),b.exports=d},{}],54:[function(a,b,c){var d=wp.media.View.extend({tagName:"div",initialize:function(){this._views={},this.set(_.extend({},this._views,this.options.views),{silent:!0}),delete this.options.views,this.options.silent||this.render()},set:function(a,b,c){var d,e,f;return c=c||{},_.isObject(a)?(_.each(a,function(a,b){this.set(b,a)},this),this):(b instanceof Backbone.View||(b=this.toView(b,a,c)),b.controller=b.controller||this.controller,this.unset(a),d=b.options.priority||10,e=this.views.get()||[],_.find(e,function(a,b){return a.options.priority>d?(f=b,!0):void 0}),this._views[a]=b,this.views.add(b,{at:_.isNumber(f)?f:e.length||0}),this)},get:function(a){return this._views[a]},unset:function(a){var b=this.get(a);return b&&b.remove(),delete this._views[a],this},toView:function(a){return new wp.media.View(a)}});b.exports=d},{}],55:[function(a,b,c){var d=wp.media.view.MenuItem.extend({click:function(){var a=this.options.contentMode;a&&this.controller.content.mode(a)}});b.exports=d},{}],56:[function(a,b,c){var d,e=wp.media.view.Menu;d=e.extend({tagName:"div",className:"media-router",property:"contentMode",ItemView:wp.media.view.RouterItem,region:"router",initialize:function(){this.controller.on("content:render",this.update,this),e.prototype.initialize.apply(this,arguments)},update:function(){var a=this.controller.content.mode();a&&this.select(a)}}),b.exports=d},{}],57:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.View.extend({tagName:"input",className:"search",id:"media-search-input",attributes:{type:"search",placeholder:e.search},events:{input:"search",keyup:"search",change:"search",search:"search"},render:function(){return this.el.value=this.model.escape("search"),this},search:function(a){a.target.value?this.model.set("search",a.target.value):this.model.unset("search")}}),b.exports=d},{}],58:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.View.extend({tagName:"div",className:"media-selection",template:wp.template("media-selection"),events:{"click .edit-selection":"edit","click .clear-selection":"clear"},initialize:function(){_.defaults(this.options,{editable:!1,clearable:!0}),this.attachments=new wp.media.view.Attachments.Selection({controller:this.controller,collection:this.collection,selection:this.collection,model:new Backbone.Model}),this.views.set(".selection-view",this.attachments),this.collection.on("add remove reset",this.refresh,this),this.controller.on("content:activate",this.refresh,this)},ready:function(){this.refresh()},refresh:function(){if(this.$el.children().length){var a=this.collection,b="edit-selection"===this.controller.content.mode();this.$el.toggleClass("empty",!a.length),this.$el.toggleClass("one",1===a.length),this.$el.toggleClass("editing",b),this.$(".count").text(e.selected.replace("%d",a.length))}},edit:function(a){a.preventDefault(),this.options.editable&&this.options.editable.call(this,this.collection)},clear:function(a){a.preventDefault(),this.collection.reset(),this.controller.modal.focusManager.focus()}}),b.exports=d},{}],59:[function(a,b,c){var d,e=wp.media.View,f=Backbone.$;d=e.extend({events:{"click button":"updateHandler","change input":"updateHandler","change select":"updateHandler","change textarea":"updateHandler"},initialize:function(){this.model=this.model||new Backbone.Model,this.listenTo(this.model,"change",this.updateChanges)},prepare:function(){return _.defaults({model:this.model.toJSON()},this.options)},render:function(){return e.prototype.render.apply(this,arguments),_(this.model.attributes).chain().keys().each(this.update,this),this},update:function(a){var b,c,d=this.model.get(a),e=this.$('[data-setting="'+a+'"]');e.length&&(e.is("select")?(c=e.find('[value="'+d+'"]'),c.length?(e.find("option").prop("selected",!1),c.prop("selected",!0)):this.model.set(a,e.find(":selected").val())):e.hasClass("button-group")?(b=e.find("button").removeClass("active"),b.filter('[value="'+d+'"]').addClass("active")):e.is('input[type="text"], textarea')?e.is(":focus")||e.val(d):e.is('input[type="checkbox"]')&&e.prop("checked",!!d&&"false"!==d))},updateHandler:function(a){var b,c=f(a.target).closest("[data-setting]"),d=a.target.value;a.preventDefault(),c.length&&(c.is('input[type="checkbox"]')&&(d=c[0].checked),this.model.set(c.data("setting"),d),(b=c.data("userSetting"))&&window.setUserSetting(b,d))},updateChanges:function(a){a.hasChanged()&&_(a.changed).chain().keys().each(this.update,this)}}),b.exports=d},{}],60:[function(a,b,c){var d,e=wp.media.view.Settings;d=e.extend({className:"attachment-display-settings",template:wp.template("attachment-display-settings"),initialize:function(){var a=this.options.attachment;_.defaults(this.options,{userSettings:!1}),e.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:link",this.updateLinkTo),a&&a.on("change:uploading",this.render,this)},dispose:function(){var a=this.options.attachment;a&&a.off(null,null,this),e.prototype.dispose.apply(this,arguments)},render:function(){var a=this.options.attachment;return a&&_.extend(this.options,{sizes:a.get("sizes"),type:a.get("type")}),e.prototype.render.call(this),this.updateLinkTo(),this},updateLinkTo:function(){var a=this.model.get("link"),b=this.$(".link-to-custom"),c=this.options.attachment;return"none"===a||"embed"===a||!c&&"custom"!==a?void b.addClass("hidden"):(c&&("post"===a?b.val(c.get("link")):"file"===a?b.val(c.get("url")):this.model.get("linkUrl")||b.val("http://"),b.prop("readonly","custom"!==a)),b.removeClass("hidden"),void(!wp.media.isTouchDevice&&b.is(":visible")&&b.focus()[0].select()))}}),b.exports=d},{}],61:[function(a,b,c){var d=wp.media.view.Settings.extend({className:"collection-settings gallery-settings",template:wp.template("gallery-settings")});b.exports=d},{}],62:[function(a,b,c){var d=wp.media.view.Settings.extend({className:"collection-settings playlist-settings",template:wp.template("playlist-settings")});b.exports=d},{}],63:[function(a,b,c){var d=wp.media.view.PriorityList.extend({className:"media-sidebar"});b.exports=d},{}],64:[function(a,b,c){var d,e=wp.media.view;d=e.Cropper.extend({className:"crop-content site-icon",ready:function(){e.Cropper.prototype.ready.apply(this,arguments),this.$(".crop-image").on("load",_.bind(this.addSidebar,this))},addSidebar:function(){this.sidebar=new wp.media.view.Sidebar({controller:this.controller}),this.sidebar.set("preview",new wp.media.view.SiteIconPreview({controller:this.controller,attachment:this.options.attachment})),this.controller.cropperView.views.add(this.sidebar)}}),b.exports=d},{}],65:[function(a,b,c){var d,e=wp.media.View,f=jQuery;d=e.extend({className:"site-icon-preview",template:wp.template("site-icon-preview"),ready:function(){this.controller.imgSelect.setOptions({onInit:this.updatePreview,onSelectChange:this.updatePreview})},prepare:function(){return{url:this.options.attachment.get("url")}},updatePreview:function(a,b){var c=64/b.width,d=64/b.height,e=16/b.width,g=16/b.height;f("#preview-app-icon").css({width:Math.round(c*this.imageWidth)+"px",height:Math.round(d*this.imageHeight)+"px",marginLeft:"-"+Math.round(c*b.x1)+"px",marginTop:"-"+Math.round(d*b.y1)+"px"}),f("#preview-favicon").css({width:Math.round(e*this.imageWidth)+"px",height:Math.round(g*this.imageHeight)+"px",marginLeft:"-"+Math.round(e*b.x1)+"px",marginTop:"-"+Math.floor(g*b.y1)+"px"})}}),b.exports=d},{}],66:[function(a,b,c){var d=wp.media.View.extend({tagName:"span",className:"spinner",spinnerTimeout:!1,delay:400,show:function(){return this.spinnerTimeout||(this.spinnerTimeout=_.delay(function(a){a.addClass("is-active")},this.delay,this.$el)),this},hide:function(){return this.$el.removeClass("is-active"),this.spinnerTimeout=clearTimeout(this.spinnerTimeout),this}});b.exports=d},{}],67:[function(a,b,c){var d,e=wp.media.View;d=e.extend({tagName:"div",className:"media-toolbar",initialize:function(){var a=this.controller.state(),b=this.selection=a.get("selection"),c=this.library=a.get("library");this._views={},this.primary=new wp.media.view.PriorityList,this.secondary=new wp.media.view.PriorityList,this.primary.$el.addClass("media-toolbar-primary search-form"),this.secondary.$el.addClass("media-toolbar-secondary"),this.views.set([this.secondary,this.primary]),this.options.items&&this.set(this.options.items,{silent:!0}),this.options.silent||this.render(),b&&b.on("add remove reset",this.refresh,this),c&&c.on("add remove reset",this.refresh,this)},dispose:function(){return this.selection&&this.selection.off(null,null,this),this.library&&this.library.off(null,null,this),e.prototype.dispose.apply(this,arguments)},ready:function(){this.refresh()},set:function(a,b,c){var d;return c=c||{},_.isObject(a)?_.each(a,function(a,b){this.set(b,a,{silent:!0})},this):(b instanceof Backbone.View||(b.classes=["media-button-"+a].concat(b.classes||[]),b=new wp.media.view.Button(b).render()),b.controller=b.controller||this.controller,this._views[a]=b,d=b.options.priority<0?"secondary":"primary",this[d].set(a,b,c)),c.silent||this.refresh(),this},get:function(a){return this._views[a]},unset:function(a,b){return delete this._views[a],this.primary.unset(a,b),this.secondary.unset(a,b),b&&b.silent||this.refresh(),this},refresh:function(){var a=this.controller.state(),b=a.get("library"),c=a.get("selection");_.each(this._views,function(a){if(a.model&&a.options&&a.options.requires){var d=a.options.requires,e=!1;e=_.some(c.models,function(a){return a.get("uploading")===!0}),d.selection&&c&&!c.length?e=!0:d.library&&b&&!b.length&&(e=!0),a.model.set("disabled",e)}})}}),b.exports=d},{}],68:[function(a,b,c){var d,e=wp.media.view.Toolbar.Select,f=wp.media.view.l10n;d=e.extend({initialize:function(){_.defaults(this.options,{text:f.insertIntoPost,requires:!1}),e.prototype.initialize.apply(this,arguments)},refresh:function(){var a=this.controller.state().props.get("url");this.get("select").model.set("disabled",!a||"http://"===a),e.prototype.refresh.apply(this,arguments)}}),b.exports=d},{}],69:[function(a,b,c){var d,e=wp.media.view.Toolbar,f=wp.media.view.l10n;d=e.extend({initialize:function(){var a=this.options;_.bindAll(this,"clickSelect"),_.defaults(a,{event:"select",state:!1,reset:!0,close:!0,text:f.select,requires:{selection:!0}}),a.items=_.defaults(a.items||{},{select:{style:"primary",text:a.text,priority:80,click:this.clickSelect,requires:a.requires}}),e.prototype.initialize.apply(this,arguments)},clickSelect:function(){var a=this.options,b=this.controller;a.close&&b.close(),a.event&&b.state().trigger(a.event),a.state&&b.setState(a.state),a.reset&&b.reset()}}),b.exports=d},{}],70:[function(a,b,c){var d,e=wp.media.View,f=wp.media.view.l10n,g=jQuery;d=e.extend({tagName:"div",className:"uploader-editor",template:wp.template("uploader-editor"),localDrag:!1,overContainer:!1,overDropzone:!1,draggingFile:null,initialize:function(){return this.initialized=!1,window.tinyMCEPreInit&&window.tinyMCEPreInit.dragDropUpload&&this.browserSupport()?(this.$document=g(document),
-this.dropzones=[],this.files=[],this.$document.on("drop",".uploader-editor",_.bind(this.drop,this)),this.$document.on("dragover",".uploader-editor",_.bind(this.dropzoneDragover,this)),this.$document.on("dragleave",".uploader-editor",_.bind(this.dropzoneDragleave,this)),this.$document.on("click",".uploader-editor",_.bind(this.click,this)),this.$document.on("dragover",_.bind(this.containerDragover,this)),this.$document.on("dragleave",_.bind(this.containerDragleave,this)),this.$document.on("dragstart dragend drop",_.bind(function(a){this.localDrag="dragstart"===a.type,"drop"===a.type&&this.containerDragleave()},this)),this.initialized=!0,this):this},browserSupport:function(){var a=!1,b=document.createElement("div");return a="draggable"in b||"ondragstart"in b&&"ondrop"in b,a=a&&!!(window.File&&window.FileList&&window.FileReader)},isDraggingFile:function(a){return null!==this.draggingFile?this.draggingFile:_.isUndefined(a.originalEvent)||_.isUndefined(a.originalEvent.dataTransfer)?!1:(this.draggingFile=_.indexOf(a.originalEvent.dataTransfer.types,"Files")>-1&&-1===_.indexOf(a.originalEvent.dataTransfer.types,"text/plain"),this.draggingFile)},refresh:function(a){var b;for(b in this.dropzones)this.dropzones[b].toggle(this.overContainer||this.overDropzone);return _.isUndefined(a)||g(a.target).closest(".uploader-editor").toggleClass("droppable",this.overDropzone),this.overContainer||this.overDropzone||(this.draggingFile=null),this},render:function(){return this.initialized?(e.prototype.render.apply(this,arguments),g(".wp-editor-wrap").each(_.bind(this.attach,this)),this):this},attach:function(a,b){var c=this.$el.clone();return this.dropzones.push(c),g(b).append(c),this},drop:function(a){var b,c;return this.containerDragleave(a),this.dropzoneDragleave(a),this.files=a.originalEvent.dataTransfer.files,this.files.length<1?void 0:(b=g(a.target).parents(".wp-editor-wrap"),b.length>0&&b[0].id&&(window.wpActiveEditor=b[0].id.slice(3,-5)),this.workflow?(this.workflow.state().reset(),this.addFiles.apply(this),this.workflow.open()):(this.workflow=wp.media.editor.open(window.wpActiveEditor,{frame:"post",state:"insert",title:f.addMedia,multiple:!0}),c=this.workflow.uploader,c.uploader&&c.uploader.ready?this.addFiles.apply(this):this.workflow.on("uploader:ready",this.addFiles,this)),!1)},addFiles:function(){return this.files.length&&(this.workflow.uploader.uploader.uploader.addFile(_.toArray(this.files)),this.files=[]),this},containerDragover:function(a){!this.localDrag&&this.isDraggingFile(a)&&(this.overContainer=!0,this.refresh())},containerDragleave:function(){this.overContainer=!1,_.delay(_.bind(this.refresh,this),50)},dropzoneDragover:function(a){return!this.localDrag&&this.isDraggingFile(a)?(this.overDropzone=!0,this.refresh(a),!1):void 0},dropzoneDragleave:function(a){this.overDropzone=!1,_.delay(_.bind(this.refresh,this,a),50)},click:function(a){this.containerDragleave(a),this.dropzoneDragleave(a),this.localDrag=!1}}),b.exports=d},{}],71:[function(a,b,c){var d,e=wp.media.View;d=e.extend({tagName:"div",className:"uploader-inline",template:wp.template("uploader-inline"),events:{"click .close":"hide"},initialize:function(){_.defaults(this.options,{message:"",status:!0,canClose:!1}),!this.options.$browser&&this.controller.uploader&&(this.options.$browser=this.controller.uploader.$browser),_.isUndefined(this.options.postId)&&(this.options.postId=wp.media.view.settings.post.id),this.options.status&&this.views.set(".upload-inline-status",new wp.media.view.UploaderStatus({controller:this.controller}))},prepare:function(){var a=this.controller.state().get("suggestedWidth"),b=this.controller.state().get("suggestedHeight"),c={};return c.message=this.options.message,c.canClose=this.options.canClose,a&&b&&(c.suggestedWidth=a,c.suggestedHeight=b),c},dispose:function(){return this.disposing?e.prototype.dispose.apply(this,arguments):(this.disposing=!0,this.remove())},remove:function(){var a=e.prototype.remove.apply(this,arguments);return _.defer(_.bind(this.refresh,this)),a},refresh:function(){var a=this.controller.uploader;a&&a.refresh()},ready:function(){var a,b=this.options.$browser;if(this.controller.uploader){if(a=this.$(".browser"),a[0]===b[0])return;b.detach().text(a.text()),b[0].className=a[0].className,a.replaceWith(b.show())}return this.refresh(),this},show:function(){this.$el.removeClass("hidden")},hide:function(){this.$el.addClass("hidden")}}),b.exports=d},{}],72:[function(a,b,c){var d=wp.media.View.extend({className:"upload-error",template:wp.template("uploader-status-error")});b.exports=d},{}],73:[function(a,b,c){var d,e=wp.media.View;d=e.extend({className:"media-uploader-status",template:wp.template("uploader-status"),events:{"click .upload-dismiss-errors":"dismiss"},initialize:function(){this.queue=wp.Uploader.queue,this.queue.on("add remove reset",this.visibility,this),this.queue.on("add remove reset change:percent",this.progress,this),this.queue.on("add remove reset change:uploading",this.info,this),this.errors=wp.Uploader.errors,this.errors.reset(),this.errors.on("add remove reset",this.visibility,this),this.errors.on("add",this.error,this)},dispose:function(){return wp.Uploader.queue.off(null,null,this),e.prototype.dispose.apply(this,arguments),this},visibility:function(){this.$el.toggleClass("uploading",!!this.queue.length),this.$el.toggleClass("errors",!!this.errors.length),this.$el.toggle(!!this.queue.length||!!this.errors.length)},ready:function(){_.each({$bar:".media-progress-bar div",$index:".upload-index",$total:".upload-total",$filename:".upload-filename"},function(a,b){this[b]=this.$(a)},this),this.visibility(),this.progress(),this.info()},progress:function(){var a=this.queue,b=this.$bar;b&&a.length&&b.width(a.reduce(function(a,b){if(!b.get("uploading"))return a+100;var c=b.get("percent");return a+(_.isNumber(c)?c:100)},0)/a.length+"%")},info:function(){var a,b=this.queue,c=0;b.length&&(a=this.queue.find(function(a,b){return c=b,a.get("uploading")}),this.$index.text(c+1),this.$total.text(b.length),this.$filename.html(a?this.filename(a.get("filename")):""))},filename:function(a){return _.escape(a)},error:function(a){this.views.add(".upload-errors",new wp.media.view.UploaderStatusError({filename:this.filename(a.get("file").name),message:a.get("message")}),{at:0})},dismiss:function(a){var b=this.views.get(".upload-errors");a.preventDefault(),b&&_.invoke(b,"remove"),wp.Uploader.errors.reset()}}),b.exports=d},{}],74:[function(a,b,c){var d,e=jQuery;d=wp.media.View.extend({tagName:"div",className:"uploader-window",template:wp.template("uploader-window"),initialize:function(){var a;this.$browser=e('<a href="#" class="browser" />').hide().appendTo("body"),a=this.options.uploader=_.defaults(this.options.uploader||{},{dropzone:this.$el,browser:this.$browser,params:{}}),!a.dropzone||a.dropzone instanceof e||(a.dropzone=e(a.dropzone)),this.controller.on("activate",this.refresh,this),this.controller.on("detach",function(){this.$browser.remove()},this)},refresh:function(){this.uploader&&this.uploader.refresh()},ready:function(){var a,b=wp.media.view.settings.post.id;this.uploader||(b&&(this.options.uploader.params.post_id=b),this.uploader=new wp.Uploader(this.options.uploader),a=this.uploader.dropzone,a.on("dropzone:enter",_.bind(this.show,this)),a.on("dropzone:leave",_.bind(this.hide,this)),e(this.uploader).on("uploader:ready",_.bind(this._ready,this)))},_ready:function(){this.controller.trigger("uploader:ready")},show:function(){var a=this.$el.show();_.defer(function(){a.css({opacity:1})})},hide:function(){var a=this.$el.css({opacity:0});wp.media.transition(a).done(function(){"0"===a.css("opacity")&&a.hide()}),_.delay(function(){"0"===a.css("opacity")&&a.is(":visible")&&a.hide()},500)}}),b.exports=d},{}],75:[function(a,b,c){var d=wp.Backbone.View.extend({constructor:function(a){a&&a.controller&&(this.controller=a.controller),wp.Backbone.View.apply(this,arguments)},dispose:function(){return this.undelegateEvents(),this.model&&this.model.off&&this.model.off(null,null,this),this.collection&&this.collection.off&&this.collection.off(null,null,this),this.controller&&this.controller.off&&this.controller.off(null,null,this),this},remove:function(){return this.dispose(),wp.Backbone.View.prototype.remove.apply(this,arguments)}});b.exports=d},{}]},{},[19]);
\ No newline at end of file
+!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){var d,e=wp.media.model.Selection,f=wp.media.controller.Library;d=f.extend({defaults:_.defaults({multiple:"add",filterable:"uploaded",priority:100,syncSelection:!1},f.prototype.defaults),initialize:function(){var a=this.get("collectionType");"video"===this.get("type")&&(a="video-"+a),this.set("id",a+"-library"),this.set("toolbar",a+"-add"),this.set("menu",a),this.get("library")||this.set("library",wp.media.query({type:this.get("type")})),f.prototype.initialize.apply(this,arguments)},activate:function(){var a=this.get("library"),b=this.get("editLibrary"),c=this.frame.state(this.get("collectionType")+"-edit").get("library");b&&b!==c&&a.unobserve(b),a.validator=function(a){return!!this.mirroring.get(a.cid)&&!c.get(a.cid)&&e.prototype.validator.apply(this,arguments)},a.reset(a.mirroring.models,{silent:!0}),a.observe(c),this.set("editLibrary",c),f.prototype.activate.apply(this,arguments)}}),b.exports=d},{}],2:[function(a,b,c){var d,e=wp.media.controller.Library,f=wp.media.view.l10n,g=jQuery;d=e.extend({defaults:{multiple:!1,sortable:!0,date:!1,searchable:!1,content:"browse",describe:!0,dragInfo:!0,idealColumnWidth:170,editing:!1,priority:60,SettingsView:!1,syncSelection:!1},initialize:function(){var a=this.get("collectionType");"video"===this.get("type")&&(a="video-"+a),this.set("id",a+"-edit"),this.set("toolbar",a+"-edit"),this.get("library")||this.set("library",new wp.media.model.Selection),this.get("AttachmentView")||this.set("AttachmentView",wp.media.view.Attachment.EditLibrary),e.prototype.initialize.apply(this,arguments)},activate:function(){var a=this.get("library");a.props.set("type",this.get("type")),this.get("library").observe(wp.Uploader.queue),this.frame.on("content:render:browse",this.renderSettings,this),e.prototype.activate.apply(this,arguments)},deactivate:function(){this.get("library").unobserve(wp.Uploader.queue),this.frame.off("content:render:browse",this.renderSettings,this),e.prototype.deactivate.apply(this,arguments)},renderSettings:function(a){var b=this.get("library"),c=this.get("collectionType"),d=this.get("dragInfoText"),e=this.get("SettingsView"),h={};b&&a&&(b[c]=b[c]||new Backbone.Model,h[c]=new e({controller:this,model:b[c],priority:40}),a.sidebar.set(h),d&&a.toolbar.set("dragInfo",new wp.media.View({el:g('<div class="instructions">'+d+"</div>")[0],priority:-40})),a.toolbar.set("reverse",{text:f.reverseOrder,priority:80,click:function(){b.reset(b.toArray().reverse())}}))}}),b.exports=d},{}],3:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.controller.State.extend({defaults:{id:"cropper",title:e.cropImage,toolbar:"crop",content:"crop",router:!1,canSkipCrop:!1,doCropArgs:{}},activate:function(){this.frame.on("content:create:crop",this.createCropContent,this),this.frame.on("close",this.removeCropper,this),this.set("selection",new Backbone.Collection(this.frame._selection.single))},deactivate:function(){this.frame.toolbar.mode("browse")},createCropContent:function(){this.cropperView=new wp.media.view.Cropper({controller:this,attachment:this.get("selection").first()}),this.cropperView.on("image-loaded",this.createCropToolbar,this),this.frame.content.set(this.cropperView)},removeCropper:function(){this.imgSelect.cancelSelection(),this.imgSelect.setOptions({remove:!0}),this.imgSelect.update(),this.cropperView.remove()},createCropToolbar:function(){var a,b;a=this.get("canSkipCrop")||!1,b={controller:this.frame,items:{insert:{style:"primary",text:e.cropImage,priority:80,requires:{library:!1,selection:!1},click:function(){var a,b=this.controller;a=b.state().get("selection").first(),a.set({cropDetails:b.state().imgSelect.getSelection()}),this.$el.text(e.cropping),this.$el.attr("disabled",!0),b.state().doCrop(a).done(function(a){b.trigger("cropped",a),b.close()}).fail(function(){b.trigger("content:error:crop")})}}}},a&&_.extend(b.items,{skip:{style:"secondary",text:e.skipCropping,priority:70,requires:{library:!1,selection:!1},click:function(){var a=this.controller.state().get("selection").first();this.controller.state().cropperView.remove(),this.controller.trigger("skippedcrop",a),this.controller.close()}}}),this.frame.toolbar.set(new wp.media.view.Toolbar(b))},doCrop:function(a){return wp.ajax.post("custom-header-crop",_.extend({},this.defaults.doCropArgs,{nonce:a.get("nonces").edit,id:a.get("id"),cropDetails:a.get("cropDetails")}))}}),b.exports=d},{}],4:[function(a,b,c){var d,e=wp.media.controller;d=e.Cropper.extend({doCrop:function(a){var b=a.get("cropDetails"),c=this.get("control"),d=b.width/b.height;return c.params.flex_width&&c.params.flex_height?(b.dst_width=b.width,b.dst_height=b.height):(b.dst_width=c.params.flex_width?c.params.height*d:c.params.width,b.dst_height=c.params.flex_height?c.params.width/d:c.params.height),wp.ajax.post("crop-image",{wp_customize:"on",nonce:a.get("nonces").edit,id:a.get("id"),context:c.id,cropDetails:b})}}),b.exports=d},{}],5:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.controller.State.extend({defaults:{id:"edit-image",title:e.editImage,menu:!1,toolbar:"edit-image",content:"edit-image",url:""},activate:function(){this.frame.on("toolbar:render:edit-image",_.bind(this.toolbar,this))},deactivate:function(){this.frame.off("toolbar:render:edit-image")},toolbar:function(){var a=this.frame,b=a.lastState(),c=b&&b.id;a.toolbar.set(new wp.media.view.Toolbar({controller:a,items:{back:{style:"primary",text:e.back,priority:20,click:function(){c?a.setState(c):a.close()}}}}))}}),b.exports=d},{}],6:[function(a,b,c){var d,e=wp.media.view.l10n,f=Backbone.$;d=wp.media.controller.State.extend({defaults:{id:"embed",title:e.insertFromUrlTitle,content:"embed",menu:"default",toolbar:"main-embed",priority:120,type:"link",url:"",metadata:{}},sensitivity:400,initialize:function(a){this.metadata=a.metadata,this.debouncedScan=_.debounce(_.bind(this.scan,this),this.sensitivity),this.props=new Backbone.Model(this.metadata||{url:""}),this.props.on("change:url",this.debouncedScan,this),this.props.on("change:url",this.refresh,this),this.on("scan",this.scanImage,this)},scan:function(){var a,b=this,c={type:"link",scanners:[]};this.props.get("url")&&this.trigger("scan",c),c.scanners.length?(a=c.scanners=f.when.apply(f,c.scanners),a.always(function(){b.get("scanners")===a&&b.set("loading",!1)})):c.scanners=null,c.loading=!!c.scanners,this.set(c)},scanImage:function(a){var b=this.frame,c=this,d=this.props.get("url"),e=new Image,g=f.Deferred();a.scanners.push(g.promise()),e.onload=function(){g.resolve(),c===b.state()&&d===c.props.get("url")&&(c.set({type:"image"}),c.props.set({width:e.width,height:e.height}))},e.onerror=g.reject,e.src=d},refresh:function(){this.frame.toolbar.get().refresh()},reset:function(){this.props.clear().set({url:""}),this.active&&this.refresh()}}),b.exports=d},{}],7:[function(a,b,c){var d,e=wp.media.model.Attachment,f=wp.media.controller.Library,g=wp.media.view.l10n;d=f.extend({defaults:_.defaults({id:"featured-image",title:g.setFeaturedImageTitle,multiple:!1,filterable:"uploaded",toolbar:"featured-image",priority:60,syncSelection:!0},f.prototype.defaults),initialize:function(){var a,b;this.get("library")||this.set("library",wp.media.query({type:"image"})),f.prototype.initialize.apply(this,arguments),a=this.get("library"),b=a.comparator,a.comparator=function(a,c){var d=!!this.mirroring.get(a.cid),e=!!this.mirroring.get(c.cid);return!d&&e?-1:d&&!e?1:b.apply(this,arguments)},a.observe(this.get("selection"))},activate:function(){this.updateSelection(),this.frame.on("open",this.updateSelection,this),f.prototype.activate.apply(this,arguments)},deactivate:function(){this.frame.off("open",this.updateSelection,this),f.prototype.deactivate.apply(this,arguments)},updateSelection:function(){var a,b=this.get("selection"),c=wp.media.view.settings.post.featuredImageId;""!==c&&-1!==c&&(a=e.get(c),a.fetch()),b.reset(a?[a]:[])}}),b.exports=d},{}],8:[function(a,b,c){var d,e=wp.media.model.Selection,f=wp.media.controller.Library,g=wp.media.view.l10n;d=f.extend({defaults:_.defaults({id:"gallery-library",title:g.addToGalleryTitle,multiple:"add",filterable:"uploaded",menu:"gallery",toolbar:"gallery-add",priority:100,syncSelection:!1},f.prototype.defaults),initialize:function(){this.get("library")||this.set("library",wp.media.query({type:"image"})),f.prototype.initialize.apply(this,arguments)},activate:function(){var a=this.get("library"),b=this.frame.state("gallery-edit").get("library");this.editLibrary&&this.editLibrary!==b&&a.unobserve(this.editLibrary),a.validator=function(a){return!!this.mirroring.get(a.cid)&&!b.get(a.cid)&&e.prototype.validator.apply(this,arguments)},a.reset(a.mirroring.models,{silent:!0}),a.observe(b),this.editLibrary=b,f.prototype.activate.apply(this,arguments)}}),b.exports=d},{}],9:[function(a,b,c){var d,e=wp.media.controller.Library,f=wp.media.view.l10n;d=e.extend({defaults:{id:"gallery-edit",title:f.editGalleryTitle,multiple:!1,searchable:!1,sortable:!0,date:!1,display:!1,content:"browse",toolbar:"gallery-edit",describe:!0,displaySettings:!0,dragInfo:!0,idealColumnWidth:170,editing:!1,priority:60,syncSelection:!1},initialize:function(){this.get("library")||this.set("library",new wp.media.model.Selection),this.get("AttachmentView")||this.set("AttachmentView",wp.media.view.Attachment.EditLibrary),e.prototype.initialize.apply(this,arguments)},activate:function(){var a=this.get("library");a.props.set("type","image"),this.get("library").observe(wp.Uploader.queue),this.frame.on("content:render:browse",this.gallerySettings,this),e.prototype.activate.apply(this,arguments)},deactivate:function(){this.get("library").unobserve(wp.Uploader.queue),this.frame.off("content:render:browse",this.gallerySettings,this),e.prototype.deactivate.apply(this,arguments)},gallerySettings:function(a){if(this.get("displaySettings")){var b=this.get("library");b&&a&&(b.gallery=b.gallery||new Backbone.Model,a.sidebar.set({gallery:new wp.media.view.Settings.Gallery({controller:this,model:b.gallery,priority:40})}),a.toolbar.set("reverse",{text:f.reverseOrder,priority:80,click:function(){b.reset(b.toArray().reverse())}}))}}}),b.exports=d},{}],10:[function(a,b,c){var d,e=wp.media.controller.State,f=wp.media.controller.Library,g=wp.media.view.l10n;d=e.extend({defaults:_.defaults({id:"image-details",title:g.imageDetailsTitle,content:"image-details",menu:!1,router:!1,toolbar:"image-details",editing:!1,priority:60},f.prototype.defaults),initialize:function(a){this.image=a.image,e.prototype.initialize.apply(this,arguments)},activate:function(){this.frame.modal.$el.addClass("image-details")}}),b.exports=d},{}],11:[function(a,b,c){var d,e=wp.media.view.l10n,f=window.getUserSetting,g=window.setUserSetting;d=wp.media.controller.State.extend({defaults:{id:"library",title:e.mediaLibraryTitle,multiple:!1,content:"upload",menu:"default",router:"browse",toolbar:"select",searchable:!0,filterable:!1,sortable:!0,autoSelect:!0,describe:!1,contentUserSetting:!0,syncSelection:!0},initialize:function(){var a,b=this.get("selection");this.get("library")||this.set("library",wp.media.query()),b instanceof wp.media.model.Selection||(a=b,a||(a=this.get("library").props.toJSON(),a=_.omit(a,"orderby","query")),this.set("selection",new wp.media.model.Selection(null,{multiple:this.get("multiple"),props:a}))),this.resetDisplays()},activate:function(){this.syncSelection(),wp.Uploader.queue.on("add",this.uploading,this),this.get("selection").on("add remove reset",this.refreshContent,this),this.get("router")&&this.get("contentUserSetting")&&(this.frame.on("content:activate",this.saveContentMode,this),this.set("content",f("libraryContent",this.get("content"))))},deactivate:function(){this.recordSelection(),this.frame.off("content:activate",this.saveContentMode,this),this.get("selection").off(null,null,this),wp.Uploader.queue.off(null,null,this)},reset:function(){this.get("selection").reset(),this.resetDisplays(),this.refreshContent()},resetDisplays:function(){var a=wp.media.view.settings.defaultProps;this._displays=[],this._defaultDisplaySettings={align:f("align",a.align)||"none",size:f("imgsize",a.size)||"medium",link:f("urlbutton",a.link)||"none"}},display:function(a){var b=this._displays;return b[a.cid]||(b[a.cid]=new Backbone.Model(this.defaultDisplaySettings(a))),b[a.cid]},defaultDisplaySettings:function(a){var b=_.clone(this._defaultDisplaySettings);return(b.canEmbed=this.canEmbed(a))?b.link="embed":this.isImageAttachment(a)||"none"!==b.link||(b.link="file"),b},isImageAttachment:function(a){return a.get("uploading")?/\.(jpe?g|png|gif)$/i.test(a.get("filename")):"image"===a.get("type")},canEmbed:function(a){if(!a.get("uploading")){var b=a.get("type");if("audio"!==b&&"video"!==b)return!1}return _.contains(wp.media.view.settings.embedExts,a.get("filename").split(".").pop())},refreshContent:function(){var a=this.get("selection"),b=this.frame,c=b.router.get(),d=b.content.mode();this.active&&!a.length&&c&&!c.get(d)&&this.frame.content.render(this.get("content"))},uploading:function(a){var b=this.frame.content;"upload"===b.mode()&&this.frame.content.mode("browse"),this.get("autoSelect")&&(this.get("selection").add(a),this.frame.trigger("library:selection:add"))},saveContentMode:function(){if("browse"===this.get("router")){var a=this.frame.content.mode(),b=this.frame.router.get();b&&b.get(a)&&g("libraryContent",a)}}}),_.extend(d.prototype,wp.media.selectionSync),b.exports=d},{}],12:[function(a,b,c){var d,e=wp.media.controller.Library;d=e.extend({defaults:_.defaults({filterable:"uploaded",displaySettings:!1,priority:80,syncSelection:!1},e.prototype.defaults),initialize:function(a){this.media=a.media,this.type=a.type,this.set("library",wp.media.query({type:this.type})),e.prototype.initialize.apply(this,arguments)},activate:function(){wp.media.frame.lastMime&&(this.set("library",wp.media.query({type:wp.media.frame.lastMime})),delete wp.media.frame.lastMime),e.prototype.activate.apply(this,arguments)}}),b.exports=d},{}],13:[function(a,b,c){var d=function(a){_.extend(this,_.pick(a||{},"id","view","selector"))};d.extend=Backbone.Model.extend,_.extend(d.prototype,{mode:function(a){return a?a===this._mode?this:(this.trigger("deactivate"),this._mode=a,this.render(a),this.trigger("activate"),this):this._mode},render:function(a){if(a&&a!==this._mode)return this.mode(a);var b,c={view:null};return this.trigger("create",c),b=c.view,this.trigger("render",b),b&&this.set(b),this},get:function(){return this.view.views.first(this.selector)},set:function(a,b){return b&&(b.add=!1),this.view.views.set(this.selector,a,b)},trigger:function(a){var b,c;if(this._mode)return c=_.toArray(arguments),b=this.id+":"+a,c[0]=b+":"+this._mode,this.view.trigger.apply(this.view,c),c[0]=b,this.view.trigger.apply(this.view,c),this}}),b.exports=d},{}],14:[function(a,b,c){var d,e=wp.media.controller.Library,f=wp.media.view.l10n;d=e.extend({defaults:_.defaults({id:"replace-image",title:f.replaceImageTitle,multiple:!1,filterable:"uploaded",toolbar:"replace",menu:!1,priority:60,syncSelection:!0},e.prototype.defaults),initialize:function(a){var b,c;this.image=a.image,this.get("library")||this.set("library",wp.media.query({type:"image"})),e.prototype.initialize.apply(this,arguments),b=this.get("library"),c=b.comparator,b.comparator=function(a,b){var d=!!this.mirroring.get(a.cid),e=!!this.mirroring.get(b.cid);return!d&&e?-1:d&&!e?1:c.apply(this,arguments)},b.observe(this.get("selection"))},activate:function(){this.updateSelection(),e.prototype.activate.apply(this,arguments)},updateSelection:function(){var a=this.get("selection"),b=this.image.attachment;a.reset(b?[b]:[])}}),b.exports=d},{}],15:[function(a,b,c){var d,e=wp.media.controller;d=e.Cropper.extend({activate:function(){this.frame.on("content:create:crop",this.createCropContent,this),this.frame.on("close",this.removeCropper,this),this.set("selection",new Backbone.Collection(this.frame._selection.single))},createCropContent:function(){this.cropperView=new wp.media.view.SiteIconCropper({controller:this,attachment:this.get("selection").first()}),this.cropperView.on("image-loaded",this.createCropToolbar,this),this.frame.content.set(this.cropperView)},doCrop:function(a){var b=a.get("cropDetails"),c=this.get("control");return b.dst_width=c.params.width,b.dst_height=c.params.height,wp.ajax.post("crop-image",{nonce:a.get("nonces").edit,id:a.get("id"),context:"site-icon",cropDetails:b})}}),b.exports=d},{}],16:[function(a,b,c){var d=function(a){this.states=new Backbone.Collection(a)};d.extend=Backbone.Model.extend,_.extend(d.prototype,Backbone.Events,{state:function(a){return this.states=this.states||new Backbone.Collection,a=a||this._state,a&&!this.states.get(a)&&this.states.add({id:a}),this.states.get(a)},setState:function(a){var b=this.state();return b&&a===b.id||!this.states||!this.states.get(a)?this:(b&&(b.trigger("deactivate"),this._lastState=b.id),this._state=a,this.state().trigger("activate"),this)},lastState:function(){if(this._lastState)return this.state(this._lastState)}}),_.each(["on","off","trigger"],function(a){d.prototype[a]=function(){return this.states=this.states||new Backbone.Collection,this.states[a].apply(this.states,arguments),this}}),b.exports=d},{}],17:[function(a,b,c){var d=Backbone.Model.extend({constructor:function(){this.on("activate",this._preActivate,this),this.on("activate",this.activate,this),this.on("activate",this._postActivate,this),this.on("deactivate",this._deactivate,this),this.on("deactivate",this.deactivate,this),this.on("reset",this.reset,this),this.on("ready",this._ready,this),this.on("ready",this.ready,this),Backbone.Model.apply(this,arguments),this.on("change:menu",this._updateMenu,this)},ready:function(){},activate:function(){},deactivate:function(){},reset:function(){},_ready:function(){this._updateMenu()},_preActivate:function(){this.active=!0},_postActivate:function(){this.on("change:menu",this._menu,this),this.on("change:titleMode",this._title,this),this.on("change:content",this._content,this),this.on("change:toolbar",this._toolbar,this),this.frame.on("title:render:default",this._renderTitle,this),this._title(),this._menu(),this._toolbar(),this._content(),this._router()},_deactivate:function(){this.active=!1,this.frame.off("title:render:default",this._renderTitle,this),this.off("change:menu",this._menu,this),this.off("change:titleMode",this._title,this),this.off("change:content",this._content,this),this.off("change:toolbar",this._toolbar,this)},_title:function(){this.frame.title.render(this.get("titleMode")||"default")},_renderTitle:function(a){a.$el.text(this.get("title")||"")},_router:function(){var a,b=this.frame.router,c=this.get("router");this.frame.$el.toggleClass("hide-router",!c),c&&(this.frame.router.render(c),a=b.get(),a&&a.select&&a.select(this.frame.content.mode()))},_menu:function(){var a,b=this.frame.menu,c=this.get("menu");this.frame.$el.toggleClass("hide-menu",!c),c&&(b.mode(c),a=b.get(),a&&a.select&&a.select(this.id))},_updateMenu:function(){var a=this.previous("menu"),b=this.get("menu");a&&this.frame.off("menu:render:"+a,this._renderMenu,this),b&&this.frame.on("menu:render:"+b,this._renderMenu,this)},_renderMenu:function(a){var b=this.get("menuItem"),c=this.get("title"),d=this.get("priority");!b&&c&&(b={text:c},d&&(b.priority=d)),b&&a.set(this.id,b)}});_.each(["toolbar","content"],function(a){d.prototype["_"+a]=function(){var b=this.get(a);b&&this.frame[a].render(b)}}),b.exports=d},{}],18:[function(a,b,c){var d={syncSelection:function(){var a=this.get("selection"),b=this.frame._selection;this.get("syncSelection")&&b&&a&&(a.multiple&&(a.reset([],{silent:!0}),a.validateAll(b.attachments),b.difference=_.difference(b.attachments.models,a.models)),a.single(b.single))},recordSelection:function(){var a=this.get("selection"),b=this.frame._selection;this.get("syncSelection")&&b&&a&&(a.multiple?(b.attachments.reset(a.toArray().concat(b.difference)),b.difference=[]):b.attachments.add(a.toArray()),b.single=a._single)}};b.exports=d},{}],19:[function(a,b,c){var d,e=wp.media,f=jQuery;e.isTouchDevice="ontouchend"in document,d=e.view.l10n=window._wpMediaViewsL10n||{},e.view.settings=d.settings||{},delete d.settings,e.model.settings.post=e.view.settings.post,f.support.transition=function(){var a,b=document.documentElement.style,c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};return a=_.find(_.keys(c),function(a){return!_.isUndefined(b[a])}),a&&{end:c[a]}}(),e.events=_.extend({},Backbone.Events),e.transition=function(a,b){var c=f.Deferred();return b=b||2e3,f.support.transition?(a instanceof f||(a=f(a)),a.first().one(f.support.transition.end,c.resolve),_.delay(c.resolve,b)):c.resolve(),c.promise()},e.controller.Region=a("./controllers/region.js"),e.controller.StateMachine=a("./controllers/state-machine.js"),e.controller.State=a("./controllers/state.js"),e.selectionSync=a("./utils/selection-sync.js"),e.controller.Library=a("./controllers/library.js"),e.controller.ImageDetails=a("./controllers/image-details.js"),e.controller.GalleryEdit=a("./controllers/gallery-edit.js"),e.controller.GalleryAdd=a("./controllers/gallery-add.js"),e.controller.CollectionEdit=a("./controllers/collection-edit.js"),e.controller.CollectionAdd=a("./controllers/collection-add.js"),e.controller.FeaturedImage=a("./controllers/featured-image.js"),e.controller.ReplaceImage=a("./controllers/replace-image.js"),e.controller.EditImage=a("./controllers/edit-image.js"),e.controller.MediaLibrary=a("./controllers/media-library.js"),e.controller.Embed=a("./controllers/embed.js"),e.controller.Cropper=a("./controllers/cropper.js"),e.controller.CustomizeImageCropper=a("./controllers/customize-image-cropper.js"),e.controller.SiteIconCropper=a("./controllers/site-icon-cropper.js"),e.View=a("./views/view.js"),e.view.Frame=a("./views/frame.js"),e.view.MediaFrame=a("./views/media-frame.js"),e.view.MediaFrame.Select=a("./views/frame/select.js"),e.view.MediaFrame.Post=a("./views/frame/post.js"),e.view.MediaFrame.ImageDetails=a("./views/frame/image-details.js"),e.view.Modal=a("./views/modal.js"),e.view.FocusManager=a("./views/focus-manager.js"),e.view.UploaderWindow=a("./views/uploader/window.js"),e.view.EditorUploader=a("./views/uploader/editor.js"),e.view.UploaderInline=a("./views/uploader/inline.js"),e.view.UploaderStatus=a("./views/uploader/status.js"),e.view.UploaderStatusError=a("./views/uploader/status-error.js"),e.view.Toolbar=a("./views/toolbar.js"),e.view.Toolbar.Select=a("./views/toolbar/select.js"),e.view.Toolbar.Embed=a("./views/toolbar/embed.js"),e.view.Button=a("./views/button.js"),e.view.ButtonGroup=a("./views/button-group.js"),e.view.PriorityList=a("./views/priority-list.js"),e.view.MenuItem=a("./views/menu-item.js"),e.view.Menu=a("./views/menu.js"),e.view.RouterItem=a("./views/router-item.js"),e.view.Router=a("./views/router.js"),e.view.Sidebar=a("./views/sidebar.js"),e.view.Attachment=a("./views/attachment.js"),e.view.Attachment.Library=a("./views/attachment/library.js"),e.view.Attachment.EditLibrary=a("./views/attachment/edit-library.js"),e.view.Attachments=a("./views/attachments.js"),e.view.Search=a("./views/search.js"),e.view.AttachmentFilters=a("./views/attachment-filters.js"),e.view.DateFilter=a("./views/attachment-filters/date.js"),e.view.AttachmentFilters.Uploaded=a("./views/attachment-filters/uploaded.js"),e.view.AttachmentFilters.All=a("./views/attachment-filters/all.js"),e.view.AttachmentsBrowser=a("./views/attachments/browser.js"),e.view.Selection=a("./views/selection.js"),e.view.Attachment.Selection=a("./views/attachment/selection.js"),e.view.Attachments.Selection=a("./views/attachments/selection.js"),e.view.Attachment.EditSelection=a("./views/attachment/edit-selection.js"),e.view.Settings=a("./views/settings.js"),e.view.Settings.AttachmentDisplay=a("./views/settings/attachment-display.js"),e.view.Settings.Gallery=a("./views/settings/gallery.js"),e.view.Settings.Playlist=a("./views/settings/playlist.js"),e.view.Attachment.Details=a("./views/attachment/details.js"),e.view.AttachmentCompat=a("./views/attachment-compat.js"),e.view.Iframe=a("./views/iframe.js"),e.view.Embed=a("./views/embed.js"),e.view.Label=a("./views/label.js"),e.view.EmbedUrl=a("./views/embed/url.js"),e.view.EmbedLink=a("./views/embed/link.js"),e.view.EmbedImage=a("./views/embed/image.js"),e.view.ImageDetails=a("./views/image-details.js"),e.view.Cropper=a("./views/cropper.js"),e.view.SiteIconCropper=a("./views/site-icon-cropper.js"),e.view.SiteIconPreview=a("./views/site-icon-preview.js"),e.view.EditImage=a("./views/edit-image.js"),e.view.Spinner=a("./views/spinner.js")},{"./controllers/collection-add.js":1,"./controllers/collection-edit.js":2,"./controllers/cropper.js":3,"./controllers/customize-image-cropper.js":4,"./controllers/edit-image.js":5,"./controllers/embed.js":6,"./controllers/featured-image.js":7,"./controllers/gallery-add.js":8,"./controllers/gallery-edit.js":9,"./controllers/image-details.js":10,"./controllers/library.js":11,"./controllers/media-library.js":12,"./controllers/region.js":13,"./controllers/replace-image.js":14,"./controllers/site-icon-cropper.js":15,"./controllers/state-machine.js":16,"./controllers/state.js":17,"./utils/selection-sync.js":18,"./views/attachment-compat.js":20,"./views/attachment-filters.js":21,"./views/attachment-filters/all.js":22,"./views/attachment-filters/date.js":23,"./views/attachment-filters/uploaded.js":24,"./views/attachment.js":25,"./views/attachment/details.js":26,"./views/attachment/edit-library.js":27,"./views/attachment/edit-selection.js":28,"./views/attachment/library.js":29,"./views/attachment/selection.js":30,"./views/attachments.js":31,"./views/attachments/browser.js":32,"./views/attachments/selection.js":33,"./views/button-group.js":34,"./views/button.js":35,"./views/cropper.js":36,"./views/edit-image.js":37,"./views/embed.js":38,"./views/embed/image.js":39,"./views/embed/link.js":40,"./views/embed/url.js":41,"./views/focus-manager.js":42,"./views/frame.js":43,"./views/frame/image-details.js":44,"./views/frame/post.js":45,"./views/frame/select.js":46,"./views/iframe.js":47,"./views/image-details.js":48,"./views/label.js":49,"./views/media-frame.js":50,"./views/menu-item.js":51,"./views/menu.js":52,"./views/modal.js":53,"./views/priority-list.js":54,"./views/router-item.js":55,"./views/router.js":56,"./views/search.js":57,"./views/selection.js":58,"./views/settings.js":59,"./views/settings/attachment-display.js":60,"./views/settings/gallery.js":61,"./views/settings/playlist.js":62,"./views/sidebar.js":63,"./views/site-icon-cropper.js":64,"./views/site-icon-preview.js":65,"./views/spinner.js":66,"./views/toolbar.js":67,"./views/toolbar/embed.js":68,"./views/toolbar/select.js":69,"./views/uploader/editor.js":70,"./views/uploader/inline.js":71,"./views/uploader/status-error.js":72,"./views/uploader/status.js":73,"./views/uploader/window.js":74,"./views/view.js":75}],20:[function(a,b,c){var d,e=wp.media.View;d=e.extend({tagName:"form",className:"compat-item",events:{submit:"preventDefault","change input":"save","change select":"save","change textarea":"save"},initialize:function(){this.listenTo(this.model,"change:compat",this.render)},dispose:function(){return this.$(":focus").length&&this.save(),e.prototype.dispose.apply(this,arguments)},render:function(){var a=this.model.get("compat");if(a&&a.item)return this.views.detach(),this.$el.html(a.item),this.views.render(),this},preventDefault:function(a){a.preventDefault()},save:function(a){var b={};a&&a.preventDefault(),_.each(this.$el.serializeArray(),function(a){b[a.name]=a.value}),this.controller.trigger("attachment:compat:waiting",["waiting"]),this.model.saveCompat(b).always(_.bind(this.postSave,this))},postSave:function(){this.controller.trigger("attachment:compat:ready",["ready"])}}),b.exports=d},{}],21:[function(a,b,c){var d,e=jQuery;d=wp.media.View.extend({tagName:"select",className:"attachment-filters",id:"media-attachment-filters",events:{change:"change"},keys:[],initialize:function(){this.createFilters(),_.extend(this.filters,this.options.filters),this.$el.html(_.chain(this.filters).map(function(a,b){return{el:e("<option></option>").val(b).html(a.text)[0],priority:a.priority||50}},this).sortBy("priority").pluck("el").value()),this.listenTo(this.model,"change",this.select),this.select()},createFilters:function(){this.filters={}},change:function(){var a=this.filters[this.el.value];a&&this.model.set(a.props)},select:function(){var a=this.model,b="all",c=a.toJSON();_.find(this.filters,function(a,d){var e=_.all(a.props,function(a,b){return a===(_.isUndefined(c[b])?null:c[b])});if(e)return b=d}),this.$el.val(b)}}),b.exports=d},{}],22:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.view.AttachmentFilters.extend({createFilters:function(){var a={};_.each(wp.media.view.settings.mimeTypes||{},function(b,c){a[c]={text:b,props:{status:null,type:c,uploadedTo:null,orderby:"date",order:"DESC"}}}),a.all={text:e.allMediaItems,props:{status:null,type:null,uploadedTo:null,orderby:"date",order:"DESC"},priority:10},wp.media.view.settings.post.id&&(a.uploaded={text:e.uploadedToThisPost,props:{status:null,type:null,uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20}),a.unattached={text:e.unattached,props:{status:null,uploadedTo:0,type:null,orderby:"menuOrder",order:"ASC"},priority:50},wp.media.view.settings.mediaTrash&&this.controller.isModeActive("grid")&&(a.trash={text:e.trash,props:{uploadedTo:null,status:"trash",type:null,orderby:"date",order:"DESC"},priority:50}),this.filters=a}}),b.exports=d},{}],23:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.view.AttachmentFilters.extend({id:"media-attachment-date-filters",createFilters:function(){var a={};_.each(wp.media.view.settings.months||{},function(b,c){a[c]={text:b.text,props:{year:b.year,monthnum:b.month}}}),a.all={text:e.allDates,props:{monthnum:!1,year:!1},priority:10},this.filters=a}}),b.exports=d},{}],24:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.view.AttachmentFilters.extend({createFilters:function(){var a,b=this.model.get("type"),c=wp.media.view.settings.mimeTypes;c&&b&&(a=c[b]),this.filters={all:{text:a||e.allMediaItems,props:{uploadedTo:null,orderby:"date",order:"DESC"},priority:10},uploaded:{text:e.uploadedToThisPost,props:{uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20},unattached:{text:e.unattached,props:{uploadedTo:0,orderby:"menuOrder",order:"ASC"},priority:50}}}}),b.exports=d},{}],25:[function(a,b,c){var d,e=wp.media.View,f=jQuery;d=e.extend({tagName:"li",className:"attachment",template:wp.template("attachment"),attributes:function(){return{tabIndex:0,role:"checkbox","aria-label":this.model.get("title"),"aria-checked":!1,"data-id":this.model.get("id")}},events:{"click .js--select-attachment":"toggleSelectionHandler","change [data-setting]":"updateSetting","change [data-setting] input":"updateSetting","change [data-setting] select":"updateSetting","change [data-setting] textarea":"updateSetting","click .attachment-close":"removeFromLibrary","click .check":"checkClickHandler",keydown:"toggleSelectionHandler"},buttons:{},initialize:function(){var a=this.options.selection,b=_.defaults(this.options,{rerenderOnModelChange:!0});b.rerenderOnModelChange?this.listenTo(this.model,"change",this.render):this.listenTo(this.model,"change:percent",this.progress),this.listenTo(this.model,"change:title",this._syncTitle),this.listenTo(this.model,"change:caption",this._syncCaption),this.listenTo(this.model,"change:artist",this._syncArtist),this.listenTo(this.model,"change:album",this._syncAlbum),this.listenTo(this.model,"add",this.select),
+this.listenTo(this.model,"remove",this.deselect),a&&(a.on("reset",this.updateSelect,this),this.listenTo(this.model,"selection:single selection:unsingle",this.details),this.details(this.model,this.controller.state().get("selection"))),this.listenTo(this.controller,"attachment:compat:waiting attachment:compat:ready",this.updateSave)},dispose:function(){var a=this.options.selection;return this.updateAll(),a&&a.off(null,null,this),e.prototype.dispose.apply(this,arguments),this},render:function(){var a=_.defaults(this.model.toJSON(),{orientation:"landscape",uploading:!1,type:"",subtype:"",icon:"",filename:"",caption:"",title:"",dateFormatted:"",width:"",height:"",compat:!1,alt:"",description:""},this.options);return a.buttons=this.buttons,a.describe=this.controller.state().get("describe"),"image"===a.type&&(a.size=this.imageSize()),a.can={},a.nonces&&(a.can.remove=!!a.nonces["delete"],a.can.save=!!a.nonces.update),this.controller.state().get("allowLocalEdits")&&(a.allowLocalEdits=!0),a.uploading&&!a.percent&&(a.percent=0),this.views.detach(),this.$el.html(this.template(a)),this.$el.toggleClass("uploading",a.uploading),a.uploading?this.$bar=this.$(".media-progress-bar div"):delete this.$bar,this.updateSelect(),this.updateSave(),this.views.render(),this},progress:function(){this.$bar&&this.$bar.length&&this.$bar.width(this.model.get("percent")+"%")},toggleSelectionHandler:function(a){var b;if("INPUT"!==a.target.nodeName&&"BUTTON"!==a.target.nodeName){if(37===a.keyCode||38===a.keyCode||39===a.keyCode||40===a.keyCode)return void this.controller.trigger("attachment:keydown:arrow",a);if("keydown"!==a.type||13===a.keyCode||32===a.keyCode){if(a.preventDefault(),this.controller.isModeActive("grid")){if(this.controller.isModeActive("edit"))return void this.controller.trigger("edit:attachment",this.model,a.currentTarget);this.controller.isModeActive("select")&&(b="toggle")}a.shiftKey?b="between":(a.ctrlKey||a.metaKey)&&(b="toggle"),this.toggleSelection({method:b}),this.controller.trigger("selection:toggle")}}},toggleSelection:function(a){var b,c,d,e,f=this.collection,g=this.options.selection,h=this.model,i=a&&a.method;if(g){if(b=g.single(),i=_.isUndefined(i)?g.multiple:i,"between"===i&&b&&g.multiple){if(b===h)return;return d=f.indexOf(b),e=f.indexOf(this.model),c=d<e?f.models.slice(d,e+1):f.models.slice(e,d+1),g.add(c),void g.single(h)}if("toggle"===i)return g[this.selected()?"remove":"add"](h),void g.single(h);if("add"===i)return g.add(h),void g.single(h);i||(i="add"),"add"!==i&&(i="reset"),this.selected()?g[b===h?"remove":"single"](h):(g[i](h),g.single(h))}},updateSelect:function(){this[this.selected()?"select":"deselect"]()},selected:function(){var a=this.options.selection;if(a)return!!a.get(this.model.cid)},select:function(a,b){var c=this.options.selection,d=this.controller;!c||b&&b!==c||this.$el.hasClass("selected")||(this.$el.addClass("selected").attr("aria-checked",!0),d.isModeActive("grid")&&d.isModeActive("select")||this.$(".check").attr("tabindex","0"))},deselect:function(a,b){var c=this.options.selection;!c||b&&b!==c||this.$el.removeClass("selected").attr("aria-checked",!1).find(".check").attr("tabindex","-1")},details:function(a,b){var c,d=this.options.selection;d===b&&(c=d.single(),this.$el.toggleClass("details",c===this.model))},imageSize:function(a){var b=this.model.get("sizes"),c=!1;return a=a||"medium",b&&(b[a]?c=b[a]:b.large?c=b.large:b.thumbnail?c=b.thumbnail:b.full&&(c=b.full),c)?_.clone(c):{url:this.model.get("url"),width:this.model.get("width"),height:this.model.get("height"),orientation:this.model.get("orientation")}},updateSetting:function(a){var b,c,d=f(a.target).closest("[data-setting]");d.length&&(b=d.data("setting"),c=a.target.value,this.model.get(b)!==c&&this.save(b,c))},save:function(){var a=this,b=this._save=this._save||{status:"ready"},c=this.model.save.apply(this.model,arguments),d=b.requests?f.when(c,b.requests):c;b.savedTimer&&clearTimeout(b.savedTimer),this.updateSave("waiting"),b.requests=d,d.always(function(){b.requests===d&&(a.updateSave("resolved"===d.state()?"complete":"error"),b.savedTimer=setTimeout(function(){a.updateSave("ready"),delete b.savedTimer},2e3))})},updateSave:function(a){var b=this._save=this._save||{status:"ready"};return a&&a!==b.status&&(this.$el.removeClass("save-"+b.status),b.status=a),this.$el.addClass("save-"+b.status),this},updateAll:function(){var a,b=this.$("[data-setting]"),c=this.model;a=_.chain(b).map(function(a){var b,d,e=f("input, textarea, select, [value]",a);if(e.length)return b=f(a).data("setting"),d=e.val(),c.get(b)!==d?[b,d]:void 0}).compact().object().value(),_.isEmpty(a)||c.save(a)},removeFromLibrary:function(a){"keydown"===a.type&&13!==a.keyCode&&32!==a.keyCode||(a.stopPropagation(),this.collection.remove(this.model))},checkClickHandler:function(a){var b=this.options.selection;b&&(a.stopPropagation(),b.where({id:this.model.get("id")}).length?(b.remove(this.model),this.$el.focus()):b.add(this.model))}}),_.each({caption:"_syncCaption",title:"_syncTitle",artist:"_syncArtist",album:"_syncAlbum"},function(a,b){d.prototype[a]=function(a,c){var d=this.$('[data-setting="'+b+'"]');return d.length?c===d.find("input, textarea, select, [value]").val()?this:this.render():this}}),b.exports=d},{}],26:[function(a,b,c){var d,e=wp.media.view.Attachment,f=wp.media.view.l10n;d=e.extend({tagName:"div",className:"attachment-details",template:wp.template("attachment-details"),attributes:function(){return{tabIndex:0,"data-id":this.model.get("id")}},events:{"change [data-setting]":"updateSetting","change [data-setting] input":"updateSetting","change [data-setting] select":"updateSetting","change [data-setting] textarea":"updateSetting","click .delete-attachment":"deleteAttachment","click .trash-attachment":"trashAttachment","click .untrash-attachment":"untrashAttachment","click .edit-attachment":"editAttachment",keydown:"toggleSelectionHandler"},initialize:function(){this.options=_.defaults(this.options,{rerenderOnModelChange:!1}),this.on("ready",this.initialFocus),e.prototype.initialize.apply(this,arguments)},initialFocus:function(){wp.media.isTouchDevice||this.$('input[type="text"]').eq(0).focus()},deleteAttachment:function(a){a.preventDefault(),window.confirm(f.warnDelete)&&(this.model.destroy(),this.controller.modal.focusManager.focus())},trashAttachment:function(a){var b=this.controller.library;a.preventDefault(),wp.media.view.settings.mediaTrash&&"edit-metadata"===this.controller.content.mode()?(this.model.set("status","trash"),this.model.save().done(function(){b._requery(!0)})):this.model.destroy()},untrashAttachment:function(a){var b=this.controller.library;a.preventDefault(),this.model.set("status","inherit"),this.model.save().done(function(){b._requery(!0)})},editAttachment:function(a){var b=this.controller.states.get("edit-image");window.imageEdit&&b?(a.preventDefault(),b.set("image",this.model),this.controller.setState("edit-image")):this.$el.addClass("needs-refresh")},toggleSelectionHandler:function(a){return"keydown"===a.type&&9===a.keyCode&&a.shiftKey&&a.target===this.$(":tabbable").get(0)?(this.controller.trigger("attachment:details:shift-tab",a),!1):37===a.keyCode||38===a.keyCode||39===a.keyCode||40===a.keyCode?void this.controller.trigger("attachment:keydown:arrow",a):void 0}}),b.exports=d},{}],27:[function(a,b,c){var d=wp.media.view.Attachment.extend({buttons:{close:!0}});b.exports=d},{}],28:[function(a,b,c){var d=wp.media.view.Attachment.Selection.extend({buttons:{close:!0}});b.exports=d},{}],29:[function(a,b,c){var d=wp.media.view.Attachment.extend({buttons:{check:!0}});b.exports=d},{}],30:[function(a,b,c){var d=wp.media.view.Attachment.extend({className:"attachment selection",toggleSelection:function(){this.options.selection.single(this.model)}});b.exports=d},{}],31:[function(a,b,c){var d,e=wp.media.View,f=jQuery;d=e.extend({tagName:"ul",className:"attachments",attributes:{tabIndex:-1},initialize:function(){this.el.id=_.uniqueId("__attachments-view-"),_.defaults(this.options,{refreshSensitivity:wp.media.isTouchDevice?300:200,refreshThreshold:3,AttachmentView:wp.media.view.Attachment,sortable:!1,resize:!0,idealColumnWidth:f(window).width()<640?135:150}),this._viewsByCid={},this.$window=f(window),this.resizeEvent="resize.media-modal-columns",this.collection.on("add",function(a){this.views.add(this.createAttachmentView(a),{at:this.collection.indexOf(a)})},this),this.collection.on("remove",function(a){var b=this._viewsByCid[a.cid];delete this._viewsByCid[a.cid],b&&b.remove()},this),this.collection.on("reset",this.render,this),this.listenTo(this.controller,"library:selection:add",this.attachmentFocus),this.scroll=_.chain(this.scroll).bind(this).throttle(this.options.refreshSensitivity).value(),this.options.scrollElement=this.options.scrollElement||this.el,f(this.options.scrollElement).on("scroll",this.scroll),this.initSortable(),_.bindAll(this,"setColumns"),this.options.resize&&(this.on("ready",this.bindEvents),this.controller.on("open",this.setColumns),_.defer(this.setColumns,this))},bindEvents:function(){this.$window.off(this.resizeEvent).on(this.resizeEvent,_.debounce(this.setColumns,50))},attachmentFocus:function(){this.$("li:first").focus()},restoreFocus:function(){this.$("li.selected:first").focus()},arrowEvent:function(a){var b=this.$el.children("li"),c=this.columns,d=b.filter(":focus").index(),e=d+1<=c?1:Math.ceil((d+1)/c);if(d!==-1){if(37===a.keyCode){if(0===d)return;b.eq(d-1).focus()}if(38===a.keyCode){if(1===e)return;b.eq(d-c).focus()}if(39===a.keyCode){if(b.length===d)return;b.eq(d+1).focus()}if(40===a.keyCode){if(Math.ceil(b.length/c)===e)return;b.eq(d+c).focus()}}},dispose:function(){this.collection.props.off(null,null,this),this.options.resize&&this.$window.off(this.resizeEvent),e.prototype.dispose.apply(this,arguments)},setColumns:function(){var a=this.columns,b=this.$el.width();b&&(this.columns=Math.min(Math.round(b/this.options.idealColumnWidth),12)||1,a&&a===this.columns||this.$el.closest(".media-frame-content").attr("data-columns",this.columns))},initSortable:function(){var a=this.collection;!wp.media.isTouchDevice&&this.options.sortable&&f.fn.sortable&&(this.$el.sortable(_.extend({disabled:!!a.comparator,tolerance:"pointer",start:function(a,b){b.item.data("sortableIndexStart",b.item.index())},update:function(b,c){var d=a.at(c.item.data("sortableIndexStart")),e=a.comparator;delete a.comparator,a.remove(d,{silent:!0}),a.add(d,{silent:!0,at:c.item.index()}),a.comparator=e,a.trigger("reset",a),a.saveMenuOrder()}},this.options.sortable)),a.props.on("change:orderby",function(){this.$el.sortable("option","disabled",!!a.comparator)},this),this.collection.props.on("change:orderby",this.refreshSortable,this),this.refreshSortable())},refreshSortable:function(){if(!wp.media.isTouchDevice&&this.options.sortable&&f.fn.sortable){var a=this.collection,b=a.props.get("orderby"),c="menuOrder"===b||!a.comparator;this.$el.sortable("option","disabled",!c)}},createAttachmentView:function(a){var b=new this.options.AttachmentView({controller:this.controller,model:a,collection:this.collection,selection:this.options.selection});return this._viewsByCid[a.cid]=b},prepare:function(){this.collection.length?this.views.set(this.collection.map(this.createAttachmentView,this)):(this.views.unset(),this.collection.more().done(this.scroll))},ready:function(){this.scroll()},scroll:function(){var a,b=this,c=this.options.scrollElement,d=c.scrollTop;c===document&&(c=document.body,d=f(document).scrollTop()),f(c).is(":visible")&&this.collection.hasMore()&&(a=this.views.parent.toolbar,c.scrollHeight-(d+c.clientHeight)<c.clientHeight/3&&a.get("spinner").show(),c.scrollHeight<d+c.clientHeight*this.options.refreshThreshold&&this.collection.more().done(function(){b.scroll(),a.get("spinner").hide()}))}}),b.exports=d},{}],32:[function(a,b,c){var d,e=wp.media.View,f=wp.media.view.settings.mediaTrash,g=wp.media.view.l10n,h=jQuery;d=e.extend({tagName:"div",className:"attachments-browser",initialize:function(){_.defaults(this.options,{filters:!1,search:!0,date:!0,display:!1,sidebar:!0,AttachmentView:wp.media.view.Attachment.Library}),this.controller.on("toggle:upload:attachment",this.toggleUploader,this),this.controller.on("edit:selection",this.editSelection),this.createToolbar(),this.createUploader(),this.createAttachments(),this.options.sidebar&&this.createSidebar(),this.updateContent(),this.options.sidebar&&"errors"!==this.options.sidebar||(this.$el.addClass("hide-sidebar"),"errors"===this.options.sidebar&&this.$el.addClass("sidebar-for-errors")),this.collection.on("add remove reset",this.updateContent,this)},editSelection:function(a){a.$(".media-button-backToLibrary").focus()},dispose:function(){return this.options.selection.off(null,null,this),e.prototype.dispose.apply(this,arguments),this},createToolbar:function(){var a,b,c;c={controller:this.controller},this.controller.isModeActive("grid")&&(c.className="media-toolbar wp-filter"),this.toolbar=new wp.media.view.Toolbar(c),this.views.add(this.toolbar),this.toolbar.set("spinner",new wp.media.view.Spinner({priority:-60})),-1!==h.inArray(this.options.filters,["uploaded","all"])&&(this.toolbar.set("filtersLabel",new wp.media.view.Label({value:g.filterByType,attributes:{"for":"media-attachment-filters"},priority:-80}).render()),"uploaded"===this.options.filters?this.toolbar.set("filters",new wp.media.view.AttachmentFilters.Uploaded({controller:this.controller,model:this.collection.props,priority:-80}).render()):(b=new wp.media.view.AttachmentFilters.All({controller:this.controller,model:this.collection.props,priority:-80}),this.toolbar.set("filters",b.render()))),this.controller.isModeActive("grid")?(a=e.extend({className:"view-switch media-grid-view-switch",template:wp.template("media-library-view-switcher")}),this.toolbar.set("libraryViewSwitcher",new a({controller:this.controller,priority:-90}).render()),this.toolbar.set("dateFilterLabel",new wp.media.view.Label({value:g.filterByDate,attributes:{"for":"media-attachment-date-filters"},priority:-75}).render()),this.toolbar.set("dateFilter",new wp.media.view.DateFilter({controller:this.controller,model:this.collection.props,priority:-75}).render()),this.toolbar.set("selectModeToggleButton",new wp.media.view.SelectModeToggleButton({text:g.bulkSelect,controller:this.controller,priority:-70}).render()),this.toolbar.set("deleteSelectedButton",new wp.media.view.DeleteSelectedButton({filters:b,style:"primary",disabled:!0,text:f?g.trashSelected:g.deleteSelected,controller:this.controller,priority:-60,click:function(){var a=[],b=[],c=this.controller.state().get("selection"),d=this.controller.state().get("library");c.length&&(f||window.confirm(g.warnBulkDelete))&&(f&&"trash"!==c.at(0).get("status")&&!window.confirm(g.warnBulkTrash)||(c.each(function(c){return c.get("nonces")["delete"]?void(f&&"trash"===c.get("status")?(c.set("status","inherit"),a.push(c.save()),b.push(c)):f?(c.set("status","trash"),a.push(c.save()),b.push(c)):c.destroy({wait:!0})):void b.push(c)}),a.length?(c.remove(b),h.when.apply(null,a).then(_.bind(function(){d._requery(!0),this.controller.trigger("selection:action:done")},this))):this.controller.trigger("selection:action:done")))}}).render()),f&&this.toolbar.set("deleteSelectedPermanentlyButton",new wp.media.view.DeleteSelectedPermanentlyButton({filters:b,style:"primary",disabled:!0,text:g.deleteSelected,controller:this.controller,priority:-55,click:function(){var a=[],b=this.controller.state().get("selection");b.length&&window.confirm(g.warnBulkDelete)&&(b.each(function(b){return b.get("nonces")["delete"]?void b.destroy():void a.push(b)}),b.remove(a),this.controller.trigger("selection:action:done"))}}).render())):this.options.date&&(this.toolbar.set("dateFilterLabel",new wp.media.view.Label({value:g.filterByDate,attributes:{"for":"media-attachment-date-filters"},priority:-75}).render()),this.toolbar.set("dateFilter",new wp.media.view.DateFilter({controller:this.controller,model:this.collection.props,priority:-75}).render())),this.options.search&&(this.toolbar.set("searchLabel",new wp.media.view.Label({value:g.searchMediaLabel,attributes:{"for":"media-search-input"},priority:60}).render()),this.toolbar.set("search",new wp.media.view.Search({controller:this.controller,model:this.collection.props,priority:60}).render())),this.options.dragInfo&&this.toolbar.set("dragInfo",new e({el:h('<div class="instructions">'+g.dragInfo+"</div>")[0],priority:-40})),this.options.suggestedWidth&&this.options.suggestedHeight&&this.toolbar.set("suggestedDimensions",new e({el:h('<div class="instructions">'+g.suggestedDimensions+" "+this.options.suggestedWidth+" &times; "+this.options.suggestedHeight+"</div>")[0],priority:-40}))},updateContent:function(){var a,b=this;a=this.controller.isModeActive("grid")?b.attachmentsNoResults:b.uploader,this.collection.length?(a.$el.addClass("hidden"),b.toolbar.get("spinner").hide()):(this.toolbar.get("spinner").show(),this.dfd=this.collection.more().done(function(){b.collection.length?a.$el.addClass("hidden"):a.$el.removeClass("hidden"),b.toolbar.get("spinner").hide()}))},createUploader:function(){this.uploader=new wp.media.view.UploaderInline({controller:this.controller,status:!1,message:this.controller.isModeActive("grid")?"":g.noItemsFound,canClose:this.controller.isModeActive("grid")}),this.uploader.hide(),this.views.add(this.uploader)},toggleUploader:function(){this.uploader.$el.hasClass("hidden")?this.uploader.show():this.uploader.hide()},createAttachments:function(){this.attachments=new wp.media.view.Attachments({controller:this.controller,collection:this.collection,selection:this.options.selection,model:this.model,sortable:this.options.sortable,scrollElement:this.options.scrollElement,idealColumnWidth:this.options.idealColumnWidth,AttachmentView:this.options.AttachmentView}),this.controller.on("attachment:keydown:arrow",_.bind(this.attachments.arrowEvent,this.attachments)),this.controller.on("attachment:details:shift-tab",_.bind(this.attachments.restoreFocus,this.attachments)),this.views.add(this.attachments),this.controller.isModeActive("grid")&&(this.attachmentsNoResults=new e({controller:this.controller,tagName:"p"}),this.attachmentsNoResults.$el.addClass("hidden no-media"),this.attachmentsNoResults.$el.html(g.noMedia),this.views.add(this.attachmentsNoResults))},createSidebar:function(){var a=this.options,b=a.selection,c=this.sidebar=new wp.media.view.Sidebar({controller:this.controller});this.views.add(c),this.controller.uploader&&c.set("uploads",new wp.media.view.UploaderStatus({controller:this.controller,priority:40})),b.on("selection:single",this.createSingle,this),b.on("selection:unsingle",this.disposeSingle,this),b.single()&&this.createSingle()},createSingle:function(){var a=this.sidebar,b=this.options.selection.single();a.set("details",new wp.media.view.Attachment.Details({controller:this.controller,model:b,priority:80})),a.set("compat",new wp.media.view.AttachmentCompat({controller:this.controller,model:b,priority:120})),this.options.display&&a.set("display",new wp.media.view.Settings.AttachmentDisplay({controller:this.controller,model:this.model.display(b),attachment:b,priority:160,userSettings:this.model.get("displayUserSettings")})),"insert"===this.model.id&&a.$el.addClass("visible")},disposeSingle:function(){var a=this.sidebar;a.unset("details"),a.unset("compat"),a.unset("display"),a.$el.removeClass("visible")}}),b.exports=d},{}],33:[function(a,b,c){var d,e=wp.media.view.Attachments;d=e.extend({events:{},initialize:function(){return _.defaults(this.options,{sortable:!1,resize:!1,AttachmentView:wp.media.view.Attachment.Selection}),e.prototype.initialize.apply(this,arguments)}}),b.exports=d},{}],34:[function(a,b,c){var d,e=Backbone.$;d=wp.media.View.extend({tagName:"div",className:"button-group button-large media-button-group",initialize:function(){this.buttons=_.map(this.options.buttons||[],function(a){return a instanceof Backbone.View?a:new wp.media.view.Button(a).render()}),delete this.options.buttons,this.options.classes&&this.$el.addClass(this.options.classes)},render:function(){return this.$el.html(e(_.pluck(this.buttons,"el")).detach()),this}}),b.exports=d},{}],35:[function(a,b,c){var d=wp.media.View.extend({tagName:"button",className:"media-button",attributes:{type:"button"},events:{click:"click"},defaults:{text:"",style:"",size:"large",disabled:!1},initialize:function(){this.model=new Backbone.Model(this.defaults),_.each(this.defaults,function(a,b){var c=this.options[b];_.isUndefined(c)||(this.model.set(b,c),delete this.options[b])},this),this.listenTo(this.model,"change",this.render)},render:function(){var a=["button",this.className],b=this.model.toJSON();return b.style&&a.push("button-"+b.style),b.size&&a.push("button-"+b.size),a=_.uniq(a.concat(this.options.classes)),this.el.className=a.join(" "),this.$el.attr("disabled",b.disabled),this.$el.text(this.model.get("text")),this},click:function(a){"#"===this.attributes.href&&a.preventDefault(),this.options.click&&!this.model.get("disabled")&&this.options.click.apply(this,arguments)}});b.exports=d},{}],36:[function(a,b,c){var d,e=wp.media.View,f=wp.media.view.UploaderStatus,g=wp.media.view.l10n,h=jQuery;d=e.extend({className:"crop-content",template:wp.template("crop-content"),initialize:function(){_.bindAll(this,"onImageLoad")},ready:function(){this.controller.frame.on("content:error:crop",this.onError,this),this.$image=this.$el.find(".crop-image"),this.$image.on("load",this.onImageLoad),h(window).on("resize.cropper",_.debounce(this.onImageLoad,250))},remove:function(){h(window).off("resize.cropper"),this.$el.remove(),this.$el.off(),e.prototype.remove.apply(this,arguments)},prepare:function(){return{title:g.cropYourImage,url:this.options.attachment.get("url")}},onImageLoad:function(){var a=this.controller.get("imgSelectOptions");"function"==typeof a&&(a=a(this.options.attachment,this.controller)),a=_.extend(a,{parent:this.$el}),this.trigger("image-loaded"),this.controller.imgSelect=this.$image.imgAreaSelect(a)},onError:function(){var a=this.options.attachment.get("filename");this.views.add(".upload-errors",new wp.media.view.UploaderStatusError({filename:f.prototype.filename(a),message:window._wpMediaViewsL10n.cropError}),{at:0})}}),b.exports=d},{}],37:[function(a,b,c){var d,e=wp.media.View;d=e.extend({className:"image-editor",template:wp.template("image-editor"),initialize:function(a){this.editor=window.imageEdit,this.controller=a.controller,e.prototype.initialize.apply(this,arguments)},prepare:function(){return this.model.toJSON()},loadEditor:function(){var a=this.editor.open(this.model.get("id"),this.model.get("nonces").edit,this);a.done(_.bind(this.focus,this))},focus:function(){this.$(".imgedit-submit .button").eq(0).focus()},back:function(){var a=this.controller.lastState();this.controller.setState(a)},refresh:function(){this.model.fetch()},save:function(){var a=this.controller.lastState();this.model.fetch().done(_.bind(function(){this.controller.setState(a)},this))}}),b.exports=d},{}],38:[function(a,b,c){var d=wp.media.View.extend({className:"media-embed",initialize:function(){this.url=new wp.media.view.EmbedUrl({controller:this.controller,model:this.model.props}).render(),this.views.set([this.url]),this.refresh(),this.listenTo(this.model,"change:type",this.refresh),this.listenTo(this.model,"change:loading",this.loading)},settings:function(a){this._settings&&this._settings.remove(),this._settings=a,this.views.add(a)},refresh:function(){var a,b=this.model.get("type");if("image"===b)a=wp.media.view.EmbedImage;else{if("link"!==b)return;a=wp.media.view.EmbedLink}this.settings(new a({controller:this.controller,model:this.model.props,priority:40}))},loading:function(){this.$el.toggleClass("embed-loading",this.model.get("loading"))}});b.exports=d},{}],39:[function(a,b,c){var d,e=wp.media.view.Settings.AttachmentDisplay;d=e.extend({className:"embed-media-settings",template:wp.template("embed-image-settings"),initialize:function(){e.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:url",this.updateImage)},updateImage:function(){this.$("img").attr("src",this.model.get("url"))}}),b.exports=d},{}],40:[function(a,b,c){var d,e=jQuery;d=wp.media.view.Settings.extend({className:"embed-link-settings",template:wp.template("embed-link-settings"),initialize:function(){this.listenTo(this.model,"change:url",this.updateoEmbed)},updateoEmbed:_.debounce(function(){var a=this.model.get("url");this.$(".embed-container").hide().find(".embed-preview").empty(),this.$(".setting").hide(),a&&(a.length<11||!a.match(/^http(s)?:\/\//))||this.fetch()},wp.media.controller.Embed.sensitivity),fetch:function(){var a;e("#embed-url-field").val()===this.model.get("url")&&(this.dfd&&"pending"===this.dfd.state()&&this.dfd.abort(),a=new wp.shortcode({tag:"embed",attrs:_.pick(this.model.attributes,["width","height","src"]),content:this.model.get("url")}),this.dfd=e.ajax({type:"POST",url:wp.ajax.settings.url,context:this,data:{action:"parse-embed",post_ID:wp.media.view.settings.post.id,shortcode:a.string()}}).done(this.renderoEmbed).fail(this.renderFail))},renderFail:function(a,b){"abort"!==b&&this.$(".link-text").show()},renderoEmbed:function(a){var b=a&&a.data&&a.data.body||"";b?this.$(".embed-container").show().find(".embed-preview").html(b):this.renderFail()}}),b.exports=d},{}],41:[function(a,b,c){var d,e=wp.media.View,f=jQuery;d=e.extend({tagName:"label",className:"embed-url",events:{input:"url",keyup:"url",change:"url"},initialize:function(){this.$input=f('<input id="embed-url-field" type="url" />').val(this.model.get("url")),this.input=this.$input[0],this.spinner=f('<span class="spinner" />')[0],this.$el.append([this.input,this.spinner]),this.listenTo(this.model,"change:url",this.render),this.model.get("url")&&_.delay(_.bind(function(){this.model.trigger("change:url")},this),500)},render:function(){var a=this.$input;if(!a.is(":focus"))return this.input.value=this.model.get("url")||"http://",e.prototype.render.apply(this,arguments),this},ready:function(){wp.media.isTouchDevice||this.focus()},url:function(a){this.model.set("url",a.target.value)},focus:function(){var a=this.$input;a.is(":visible")&&a.focus()[0].select()}}),b.exports=d},{}],42:[function(a,b,c){var d=wp.media.View.extend({events:{keydown:"constrainTabbing"},focus:function(){this.$(".media-menu-item").first().focus()},constrainTabbing:function(a){var b;if(9===a.keyCode)return b=this.$(":tabbable").not('.moxie-shim input[type="file"]'),b.last()[0]!==a.target||a.shiftKey?b.first()[0]===a.target&&a.shiftKey?(b.last().focus(),!1):void 0:(b.first().focus(),!1)}});b.exports=d},{}],43:[function(a,b,c){var d=wp.media.View.extend({initialize:function(){_.defaults(this.options,{mode:["select"]}),this._createRegions(),this._createStates(),this._createModes()},_createRegions:function(){this.regions=this.regions?this.regions.slice():[],_.each(this.regions,function(a){this[a]=new wp.media.controller.Region({view:this,id:a,selector:".media-frame-"+a})},this)},_createStates:function(){this.states=new Backbone.Collection(null,{model:wp.media.controller.State}),this.states.on("add",function(a){a.frame=this,a.trigger("ready")},this),this.options.states&&this.states.add(this.options.states)},_createModes:function(){this.activeModes=new Backbone.Collection,this.activeModes.on("add remove reset",_.bind(this.triggerModeEvents,this)),_.each(this.options.mode,function(a){this.activateMode(a)},this)},reset:function(){return this.states.invoke("trigger","reset"),this},triggerModeEvents:function(a,b,c){var d,e,f={add:"activate",remove:"deactivate"};_.each(c,function(a,b){a&&(d=b)}),_.has(f,d)&&(e=a.get("id")+":"+f[d],this.trigger(e))},activateMode:function(a){if(!this.isModeActive(a))return this.activeModes.add([{id:a}]),this.$el.addClass("mode-"+a),this},deactivateMode:function(a){return this.isModeActive(a)?(this.activeModes.remove(this.activeModes.where({id:a})),this.$el.removeClass("mode-"+a),this.trigger(a+":deactivate"),this):this},isModeActive:function(a){return Boolean(this.activeModes.where({id:a}).length)}});_.extend(d.prototype,wp.media.controller.StateMachine.prototype),b.exports=d},{}],44:[function(a,b,c){var d,e=wp.media.view.MediaFrame.Select,f=wp.media.view.l10n;d=e.extend({defaults:{id:"image",url:"",menu:"image-details",content:"image-details",toolbar:"image-details",type:"link",title:f.imageDetailsTitle,priority:120},initialize:function(a){this.image=new wp.media.model.PostImage(a.metadata),this.options.selection=new wp.media.model.Selection(this.image.attachment,{multiple:!1}),e.prototype.initialize.apply(this,arguments)},bindHandlers:function(){e.prototype.bindHandlers.apply(this,arguments),this.on("menu:create:image-details",this.createMenu,this),this.on("content:create:image-details",this.imageDetailsContent,this),this.on("content:render:edit-image",this.editImageContent,this),this.on("toolbar:render:image-details",this.renderImageDetailsToolbar,this),this.on("toolbar:render:replace",this.renderReplaceImageToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.ImageDetails({image:this.image,editable:!1}),new wp.media.controller.ReplaceImage({id:"replace-image",library:wp.media.query({type:"image"}),image:this.image,multiple:!1,title:f.imageReplaceTitle,toolbar:"replace",priority:80,displaySettings:!0}),new wp.media.controller.EditImage({image:this.image,selection:this.options.selection})])},imageDetailsContent:function(a){a.view=new wp.media.view.ImageDetails({controller:this,model:this.state().image,attachment:this.state().image.attachment})},editImageContent:function(){var a,b=this.state(),c=b.get("image");c&&(a=new wp.media.view.EditImage({model:c,controller:this}).render(),this.content.set(a),a.loadEditor())},renderImageDetailsToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{select:{style:"primary",text:f.update,priority:80,click:function(){var a=this.controller,b=a.state();a.close(),b.trigger("update",a.image.toJSON()),a.setState(a.options.state),a.reset()}}}}))},renderReplaceImageToolbar:function(){var a=this,b=a.lastState(),c=b&&b.id;this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{back:{text:f.back,priority:20,click:function(){c?a.setState(c):a.close()}},replace:{style:"primary",text:f.replace,priority:80,click:function(){var a=this.controller,b=a.state(),c=b.get("selection"),d=c.single();a.close(),a.image.changeAttachment(d,b.display(d)),b.trigger("replace",a.image.toJSON()),a.setState(a.options.state),a.reset()}}}}))}}),b.exports=d},{}],45:[function(a,b,c){var d,e=wp.media.view.MediaFrame.Select,f=wp.media.controller.Library,g=wp.media.view.l10n;d=e.extend({initialize:function(){this.counts={audio:{count:wp.media.view.settings.attachmentCounts.audio,state:"playlist"},video:{count:wp.media.view.settings.attachmentCounts.video,state:"video-playlist"}},_.defaults(this.options,{multiple:!0,editing:!1,state:"insert",metadata:{}}),e.prototype.initialize.apply(this,arguments),this.createIframeStates()},createStates:function(){var a=this.options;this.states.add([new f({id:"insert",title:g.insertMediaTitle,priority:20,toolbar:"main-insert",filterable:"all",library:wp.media.query(a.library),multiple:!!a.multiple&&"reset",editable:!0,allowLocalEdits:!0,displaySettings:!0,displayUserSettings:!0}),new f({id:"gallery",title:g.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:wp.media.query(_.defaults({type:"image"},a.library))}),new wp.media.controller.Embed({metadata:a.metadata}),new wp.media.controller.EditImage({model:a.editImage}),new wp.media.controller.GalleryEdit({library:a.selection,editing:a.editing,menu:"gallery"}),new wp.media.controller.GalleryAdd,new f({id:"playlist",title:g.createPlaylistTitle,priority:60,toolbar:"main-playlist",filterable:"uploaded",multiple:"add",editable:!1,library:wp.media.query(_.defaults({type:"audio"},a.library))}),new wp.media.controller.CollectionEdit({type:"audio",collectionType:"playlist",title:g.editPlaylistTitle,SettingsView:wp.media.view.Settings.Playlist,
+library:a.selection,editing:a.editing,menu:"playlist",dragInfoText:g.playlistDragInfo,dragInfo:!1}),new wp.media.controller.CollectionAdd({type:"audio",collectionType:"playlist",title:g.addToPlaylistTitle}),new f({id:"video-playlist",title:g.createVideoPlaylistTitle,priority:60,toolbar:"main-video-playlist",filterable:"uploaded",multiple:"add",editable:!1,library:wp.media.query(_.defaults({type:"video"},a.library))}),new wp.media.controller.CollectionEdit({type:"video",collectionType:"playlist",title:g.editVideoPlaylistTitle,SettingsView:wp.media.view.Settings.Playlist,library:a.selection,editing:a.editing,menu:"video-playlist",dragInfoText:g.videoPlaylistDragInfo,dragInfo:!1}),new wp.media.controller.CollectionAdd({type:"video",collectionType:"playlist",title:g.addToVideoPlaylistTitle})]),wp.media.view.settings.post.featuredImageId&&this.states.add(new wp.media.controller.FeaturedImage)},bindHandlers:function(){var a,b;e.prototype.bindHandlers.apply(this,arguments),this.on("activate",this.activate,this),b=_.find(this.counts,function(a){return 0===a.count}),"undefined"!=typeof b&&this.listenTo(wp.media.model.Attachments.all,"change:type",this.mediaTypeCounts),this.on("menu:create:gallery",this.createMenu,this),this.on("menu:create:playlist",this.createMenu,this),this.on("menu:create:video-playlist",this.createMenu,this),this.on("toolbar:create:main-insert",this.createToolbar,this),this.on("toolbar:create:main-gallery",this.createToolbar,this),this.on("toolbar:create:main-playlist",this.createToolbar,this),this.on("toolbar:create:main-video-playlist",this.createToolbar,this),this.on("toolbar:create:featured-image",this.featuredImageToolbar,this),this.on("toolbar:create:main-embed",this.mainEmbedToolbar,this),a={menu:{"default":"mainMenu",gallery:"galleryMenu",playlist:"playlistMenu","video-playlist":"videoPlaylistMenu"},content:{embed:"embedContent","edit-image":"editImageContent","edit-selection":"editSelectionContent"},toolbar:{"main-insert":"mainInsertToolbar","main-gallery":"mainGalleryToolbar","gallery-edit":"galleryEditToolbar","gallery-add":"galleryAddToolbar","main-playlist":"mainPlaylistToolbar","playlist-edit":"playlistEditToolbar","playlist-add":"playlistAddToolbar","main-video-playlist":"mainVideoPlaylistToolbar","video-playlist-edit":"videoPlaylistEditToolbar","video-playlist-add":"videoPlaylistAddToolbar"}},_.each(a,function(a,b){_.each(a,function(a,c){this.on(b+":render:"+c,this[a],this)},this)},this)},activate:function(){_.each(this.counts,function(a){a.count<1&&this.menuItemVisibility(a.state,"hide")},this)},mediaTypeCounts:function(a,b){"undefined"!=typeof this.counts[b]&&this.counts[b].count<1&&(this.counts[b].count++,this.menuItemVisibility(this.counts[b].state,"show"))},mainMenu:function(a){a.set({"library-separator":new wp.media.View({className:"separator",priority:100})})},menuItemVisibility:function(a,b){var c=this.menu.get();"hide"===b?c.hide(a):"show"===b&&c.show(a)},galleryMenu:function(a){var b=this.lastState(),c=b&&b.id,d=this;a.set({cancel:{text:g.cancelGalleryTitle,priority:20,click:function(){c?d.setState(c):d.close(),this.controller.modal.focusManager.focus()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},playlistMenu:function(a){var b=this.lastState(),c=b&&b.id,d=this;a.set({cancel:{text:g.cancelPlaylistTitle,priority:20,click:function(){c?d.setState(c):d.close()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},videoPlaylistMenu:function(a){var b=this.lastState(),c=b&&b.id,d=this;a.set({cancel:{text:g.cancelVideoPlaylistTitle,priority:20,click:function(){c?d.setState(c):d.close()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},embedContent:function(){var a=new wp.media.view.Embed({controller:this,model:this.state()}).render();this.content.set(a),wp.media.isTouchDevice||a.url.focus()},editSelectionContent:function(){var a,b=this.state(),c=b.get("selection");a=new wp.media.view.AttachmentsBrowser({controller:this,collection:c,selection:c,model:b,sortable:!0,search:!1,date:!1,dragInfo:!0,AttachmentView:wp.media.view.Attachments.EditSelection}).render(),a.toolbar.set("backToLibrary",{text:g.returnToLibrary,priority:-100,click:function(){this.controller.content.mode("browse")}}),this.content.set(a),this.trigger("edit:selection",this)},editImageContent:function(){var a=this.state().get("image"),b=new wp.media.view.EditImage({model:a,controller:this}).render();this.content.set(b),b.loadEditor()},selectionStatusToolbar:function(a){var b=this.state().get("editable");a.set("selection",new wp.media.view.Selection({controller:this,collection:this.state().get("selection"),priority:-40,editable:b&&function(){this.controller.content.mode("edit-selection")}}).render())},mainInsertToolbar:function(a){var b=this;this.selectionStatusToolbar(a),a.set("insert",{style:"primary",priority:80,text:g.insertIntoPost,requires:{selection:!0},click:function(){var a=b.state(),c=a.get("selection");b.close(),a.trigger("insert",c).reset()}})},mainGalleryToolbar:function(a){var b=this;this.selectionStatusToolbar(a),a.set("gallery",{style:"primary",text:g.createNewGallery,priority:60,requires:{selection:!0},click:function(){var a=b.state().get("selection"),c=b.state("gallery-edit"),d=a.where({type:"image"});c.set("library",new wp.media.model.Selection(d,{props:a.props.toJSON(),multiple:!0})),this.controller.setState("gallery-edit"),this.controller.modal.focusManager.focus()}})},mainPlaylistToolbar:function(a){var b=this;this.selectionStatusToolbar(a),a.set("playlist",{style:"primary",text:g.createNewPlaylist,priority:100,requires:{selection:!0},click:function(){var a=b.state().get("selection"),c=b.state("playlist-edit"),d=a.where({type:"audio"});c.set("library",new wp.media.model.Selection(d,{props:a.props.toJSON(),multiple:!0})),this.controller.setState("playlist-edit"),this.controller.modal.focusManager.focus()}})},mainVideoPlaylistToolbar:function(a){var b=this;this.selectionStatusToolbar(a),a.set("video-playlist",{style:"primary",text:g.createNewVideoPlaylist,priority:100,requires:{selection:!0},click:function(){var a=b.state().get("selection"),c=b.state("video-playlist-edit"),d=a.where({type:"video"});c.set("library",new wp.media.model.Selection(d,{props:a.props.toJSON(),multiple:!0})),this.controller.setState("video-playlist-edit"),this.controller.modal.focusManager.focus()}})},featuredImageToolbar:function(a){this.createSelectToolbar(a,{text:g.setFeaturedImage,state:this.options.state})},mainEmbedToolbar:function(a){a.view=new wp.media.view.Toolbar.Embed({controller:this})},galleryEditToolbar:function(){var a=this.state().get("editing");this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:a?g.updateGallery:g.insertGallery,priority:80,requires:{library:!0},click:function(){var a=this.controller,b=a.state();a.close(),b.trigger("update",b.get("library")),a.setState(a.options.state),a.reset()}}}}))},galleryAddToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:g.addToGallery,priority:80,requires:{selection:!0},click:function(){var a=this.controller,b=a.state(),c=a.state("gallery-edit");c.get("library").add(b.get("selection").models),b.trigger("reset"),a.setState("gallery-edit")}}}}))},playlistEditToolbar:function(){var a=this.state().get("editing");this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:a?g.updatePlaylist:g.insertPlaylist,priority:80,requires:{library:!0},click:function(){var a=this.controller,b=a.state();a.close(),b.trigger("update",b.get("library")),a.setState(a.options.state),a.reset()}}}}))},playlistAddToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:g.addToPlaylist,priority:80,requires:{selection:!0},click:function(){var a=this.controller,b=a.state(),c=a.state("playlist-edit");c.get("library").add(b.get("selection").models),b.trigger("reset"),a.setState("playlist-edit")}}}}))},videoPlaylistEditToolbar:function(){var a=this.state().get("editing");this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:a?g.updateVideoPlaylist:g.insertVideoPlaylist,priority:140,requires:{library:!0},click:function(){var a=this.controller,b=a.state(),c=b.get("library");c.type="video",a.close(),b.trigger("update",c),a.setState(a.options.state),a.reset()}}}}))},videoPlaylistAddToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:g.addToVideoPlaylist,priority:140,requires:{selection:!0},click:function(){var a=this.controller,b=a.state(),c=a.state("video-playlist-edit");c.get("library").add(b.get("selection").models),b.trigger("reset"),a.setState("video-playlist-edit")}}}}))}}),b.exports=d},{}],46:[function(a,b,c){var d,e=wp.media.view.MediaFrame,f=wp.media.view.l10n;d=e.extend({initialize:function(){e.prototype.initialize.apply(this,arguments),_.defaults(this.options,{selection:[],library:{},multiple:!1,state:"library"}),this.createSelection(),this.createStates(),this.bindHandlers()},createSelection:function(){var a=this.options.selection;a instanceof wp.media.model.Selection||(this.options.selection=new wp.media.model.Selection(a,{multiple:this.options.multiple})),this._selection={attachments:new wp.media.model.Attachments,difference:[]}},createStates:function(){var a=this.options;this.options.states||this.states.add([new wp.media.controller.Library({library:wp.media.query(a.library),multiple:a.multiple,title:a.title,priority:20})])},bindHandlers:function(){this.on("router:create:browse",this.createRouter,this),this.on("router:render:browse",this.browseRouter,this),this.on("content:create:browse",this.browseContent,this),this.on("content:render:upload",this.uploadContent,this),this.on("toolbar:create:select",this.createSelectToolbar,this)},browseRouter:function(a){a.set({upload:{text:f.uploadFilesTitle,priority:20},browse:{text:f.mediaLibraryTitle,priority:40}})},browseContent:function(a){var b=this.state();this.$el.removeClass("hide-toolbar"),a.view=new wp.media.view.AttachmentsBrowser({controller:this,collection:b.get("library"),selection:b.get("selection"),model:b,sortable:b.get("sortable"),search:b.get("searchable"),filters:b.get("filterable"),date:b.get("date"),display:b.has("display")?b.get("display"):b.get("displaySettings"),dragInfo:b.get("dragInfo"),idealColumnWidth:b.get("idealColumnWidth"),suggestedWidth:b.get("suggestedWidth"),suggestedHeight:b.get("suggestedHeight"),AttachmentView:b.get("AttachmentView")})},uploadContent:function(){this.$el.removeClass("hide-toolbar"),this.content.set(new wp.media.view.UploaderInline({controller:this}))},createSelectToolbar:function(a,b){b=b||this.options.button||{},b.controller=this,a.view=new wp.media.view.Toolbar.Select(b)}}),b.exports=d},{}],47:[function(a,b,c){var d=wp.media.View.extend({className:"media-iframe",render:function(){return this.views.detach(),this.$el.html('<iframe src="'+this.controller.state().get("src")+'" />'),this.views.render(),this}});b.exports=d},{}],48:[function(a,b,c){var d,e=wp.media.view.Settings.AttachmentDisplay,f=jQuery;d=e.extend({className:"image-details",template:wp.template("image-details"),events:_.defaults(e.prototype.events,{"click .edit-attachment":"editAttachment","click .replace-attachment":"replaceAttachment","click .advanced-toggle":"onToggleAdvanced",'change [data-setting="customWidth"]':"onCustomSize",'change [data-setting="customHeight"]':"onCustomSize",'keyup [data-setting="customWidth"]':"onCustomSize",'keyup [data-setting="customHeight"]':"onCustomSize"}),initialize:function(){this.options.attachment=this.model.attachment,this.listenTo(this.model,"change:url",this.updateUrl),this.listenTo(this.model,"change:link",this.toggleLinkSettings),this.listenTo(this.model,"change:size",this.toggleCustomSize),e.prototype.initialize.apply(this,arguments)},prepare:function(){var a=!1;return this.model.attachment&&(a=this.model.attachment.toJSON()),_.defaults({model:this.model.toJSON(),attachment:a},this.options)},render:function(){var a=arguments;return this.model.attachment&&"pending"===this.model.dfd.state()?this.model.dfd.done(_.bind(function(){e.prototype.render.apply(this,a),this.postRender()},this)).fail(_.bind(function(){this.model.attachment=!1,e.prototype.render.apply(this,a),this.postRender()},this)):(e.prototype.render.apply(this,arguments),this.postRender()),this},postRender:function(){setTimeout(_.bind(this.resetFocus,this),10),this.toggleLinkSettings(),"show"===window.getUserSetting("advImgDetails")&&this.toggleAdvanced(!0),this.trigger("post-render")},resetFocus:function(){this.$(".link-to-custom").blur(),this.$(".embed-media-settings").scrollTop(0)},updateUrl:function(){this.$(".image img").attr("src",this.model.get("url")),this.$(".url").val(this.model.get("url"))},toggleLinkSettings:function(){"none"===this.model.get("link")?this.$(".link-settings").addClass("hidden"):this.$(".link-settings").removeClass("hidden")},toggleCustomSize:function(){"custom"!==this.model.get("size")?this.$(".custom-size").addClass("hidden"):this.$(".custom-size").removeClass("hidden")},onCustomSize:function(a){var b,c=f(a.target).data("setting"),d=f(a.target).val();return!/^\d+/.test(d)||parseInt(d,10)<1?void a.preventDefault():void("customWidth"===c?(b=Math.round(1/this.model.get("aspectRatio")*d),this.model.set("customHeight",b,{silent:!0}),this.$('[data-setting="customHeight"]').val(b)):(b=Math.round(this.model.get("aspectRatio")*d),this.model.set("customWidth",b,{silent:!0}),this.$('[data-setting="customWidth"]').val(b)))},onToggleAdvanced:function(a){a.preventDefault(),this.toggleAdvanced()},toggleAdvanced:function(a){var b,c=this.$el.find(".advanced-section");c.hasClass("advanced-visible")||a===!1?(c.removeClass("advanced-visible"),c.find(".advanced-settings").addClass("hidden"),b="hide"):(c.addClass("advanced-visible"),c.find(".advanced-settings").removeClass("hidden"),b="show"),window.setUserSetting("advImgDetails",b)},editAttachment:function(a){var b=this.controller.states.get("edit-image");window.imageEdit&&b&&(a.preventDefault(),b.set("image",this.model.attachment),this.controller.setState("edit-image"))},replaceAttachment:function(a){a.preventDefault(),this.controller.setState("replace-image")}}),b.exports=d},{}],49:[function(a,b,c){var d=wp.media.View.extend({tagName:"label",className:"screen-reader-text",initialize:function(){this.value=this.options.value},render:function(){return this.$el.html(this.value),this}});b.exports=d},{}],50:[function(a,b,c){var d,e=wp.media.view.Frame,f=jQuery;d=e.extend({className:"media-frame",template:wp.template("media-frame"),regions:["menu","title","content","toolbar","router"],events:{"click div.media-frame-title h1":"toggleMenu"},initialize:function(){e.prototype.initialize.apply(this,arguments),_.defaults(this.options,{title:"",modal:!0,uploader:!0}),this.$el.addClass("wp-core-ui"),this.options.modal&&(this.modal=new wp.media.view.Modal({controller:this,title:this.options.title}),this.modal.content(this)),!wp.Uploader.limitExceeded&&wp.Uploader.browser.supported||(this.options.uploader=!1),this.options.uploader&&(this.uploader=new wp.media.view.UploaderWindow({controller:this,uploader:{dropzone:this.modal?this.modal.$el:this.$el,container:this.$el}}),this.views.set(".media-frame-uploader",this.uploader)),this.on("attach",_.bind(this.views.ready,this.views),this),this.on("title:create:default",this.createTitle,this),this.title.mode("default"),this.on("title:render",function(a){a.$el.append('<span class="dashicons dashicons-arrow-down"></span>')}),this.on("menu:create:default",this.createMenu,this)},render:function(){return!this.state()&&this.options.state&&this.setState(this.options.state),e.prototype.render.apply(this,arguments)},createTitle:function(a){a.view=new wp.media.View({controller:this,tagName:"h1"})},createMenu:function(a){a.view=new wp.media.view.Menu({controller:this})},toggleMenu:function(){this.$el.find(".media-menu").toggleClass("visible")},createToolbar:function(a){a.view=new wp.media.view.Toolbar({controller:this})},createRouter:function(a){a.view=new wp.media.view.Router({controller:this})},createIframeStates:function(a){var b,c=wp.media.view.settings,d=c.tabs,e=c.tabUrl;d&&e&&(b=f("#post_ID"),b.length&&(e+="&post_id="+b.val()),_.each(d,function(b,c){this.state("iframe:"+c).set(_.defaults({tab:c,src:e+"&tab="+c,title:b,content:"iframe",menu:"default"},a))},this),this.on("content:create:iframe",this.iframeContent,this),this.on("content:deactivate:iframe",this.iframeContentCleanup,this),this.on("menu:render:default",this.iframeMenu,this),this.on("open",this.hijackThickbox,this),this.on("close",this.restoreThickbox,this))},iframeContent:function(a){this.$el.addClass("hide-toolbar"),a.view=new wp.media.view.Iframe({controller:this})},iframeContentCleanup:function(){this.$el.removeClass("hide-toolbar")},iframeMenu:function(a){var b={};a&&(_.each(wp.media.view.settings.tabs,function(a,c){b["iframe:"+c]={text:this.state("iframe:"+c).get("title"),priority:200}},this),a.set(b))},hijackThickbox:function(){var a=this;window.tb_remove&&!this._tb_remove&&(this._tb_remove=window.tb_remove,window.tb_remove=function(){a.close(),a.reset(),a.setState(a.options.state),a._tb_remove.call(window)})},restoreThickbox:function(){this._tb_remove&&(window.tb_remove=this._tb_remove,delete this._tb_remove)}}),_.each(["open","close","attach","detach","escape"],function(a){d.prototype[a]=function(){return this.modal&&this.modal[a].apply(this.modal,arguments),this}}),b.exports=d},{}],51:[function(a,b,c){var d,e=jQuery;d=wp.media.View.extend({tagName:"a",className:"media-menu-item",attributes:{href:"#"},events:{click:"_click"},_click:function(a){var b=this.options.click;a&&a.preventDefault(),b?b.call(this):this.click(),wp.media.isTouchDevice||e(".media-frame-content input").first().focus()},click:function(){var a=this.options.state;a&&(this.controller.setState(a),this.views.parent.$el.removeClass("visible"))},render:function(){var a=this.options;return a.text?this.$el.text(a.text):a.html&&this.$el.html(a.html),this}}),b.exports=d},{}],52:[function(a,b,c){var d,e=wp.media.view.MenuItem,f=wp.media.view.PriorityList;d=f.extend({tagName:"div",className:"media-menu",property:"state",ItemView:e,region:"menu",toView:function(a,b){return a=a||{},a[this.property]=a[this.property]||b,new this.ItemView(a).render()},ready:function(){f.prototype.ready.apply(this,arguments),this.visibility()},set:function(){f.prototype.set.apply(this,arguments),this.visibility()},unset:function(){f.prototype.unset.apply(this,arguments),this.visibility()},visibility:function(){var a=this.region,b=this.controller[a].get(),c=this.views.get(),d=!c||c.length<2;this===b&&this.controller.$el.toggleClass("hide-"+a,d)},select:function(a){var b=this.get(a);b&&(this.deselect(),b.$el.addClass("active"))},deselect:function(){this.$el.children().removeClass("active")},hide:function(a){var b=this.get(a);b&&b.$el.addClass("hidden")},show:function(a){var b=this.get(a);b&&b.$el.removeClass("hidden")}}),b.exports=d},{}],53:[function(a,b,c){var d,e=jQuery;d=wp.media.View.extend({tagName:"div",template:wp.template("media-modal"),attributes:{tabindex:0},events:{"click .media-modal-backdrop, .media-modal-close":"escapeHandler",keydown:"keydown"},initialize:function(){_.defaults(this.options,{container:document.body,title:"",propagate:!0,freeze:!0}),this.focusManager=new wp.media.view.FocusManager({el:this.el})},prepare:function(){return{title:this.options.title}},attach:function(){return this.views.attached?this:(this.views.rendered||this.render(),this.$el.appendTo(this.options.container),this.views.attached=!0,this.views.ready(),this.propagate("attach"))},detach:function(){return this.$el.is(":visible")&&this.close(),this.$el.detach(),this.views.attached=!1,this.propagate("detach")},open:function(){var a,b=this.$el,c=this.options;return b.is(":visible")?this:(this.views.attached||this.attach(),c.freeze&&(this._freeze={scrollTop:e(window).scrollTop()}),e("body").addClass("modal-open"),b.show(),"ontouchend"in document&&(a=window.tinymce&&window.tinymce.activeEditor)&&!a.isHidden()&&a.iframeElement&&(a.iframeElement.focus(),a.iframeElement.blur(),setTimeout(function(){a.iframeElement.blur()},100)),this.$el.focus(),this.propagate("open"))},close:function(a){var b=this._freeze;return this.views.attached&&this.$el.is(":visible")?(e("body").removeClass("modal-open"),this.$el.hide().undelegate("keydown"),e("#wpbody-content").focus(),this.propagate("close"),b&&e(window).scrollTop(b.scrollTop),a&&a.escape&&this.propagate("escape"),this):this},escape:function(){return this.close({escape:!0})},escapeHandler:function(a){a.preventDefault(),this.escape()},content:function(a){return this.views.set(".media-modal-content",a),this},propagate:function(a){return this.trigger(a),this.options.propagate&&this.controller.trigger(a),this},keydown:function(a){27===a.which&&this.$el.is(":visible")&&(this.escape(),a.stopImmediatePropagation())}}),b.exports=d},{}],54:[function(a,b,c){var d=wp.media.View.extend({tagName:"div",initialize:function(){this._views={},this.set(_.extend({},this._views,this.options.views),{silent:!0}),delete this.options.views,this.options.silent||this.render()},set:function(a,b,c){var d,e,f;return c=c||{},_.isObject(a)?(_.each(a,function(a,b){this.set(b,a)},this),this):(b instanceof Backbone.View||(b=this.toView(b,a,c)),b.controller=b.controller||this.controller,this.unset(a),d=b.options.priority||10,e=this.views.get()||[],_.find(e,function(a,b){if(a.options.priority>d)return f=b,!0}),this._views[a]=b,this.views.add(b,{at:_.isNumber(f)?f:e.length||0}),this)},get:function(a){return this._views[a]},unset:function(a){var b=this.get(a);return b&&b.remove(),delete this._views[a],this},toView:function(a){return new wp.media.View(a)}});b.exports=d},{}],55:[function(a,b,c){var d=wp.media.view.MenuItem.extend({click:function(){var a=this.options.contentMode;a&&this.controller.content.mode(a)}});b.exports=d},{}],56:[function(a,b,c){var d,e=wp.media.view.Menu;d=e.extend({tagName:"div",className:"media-router",property:"contentMode",ItemView:wp.media.view.RouterItem,region:"router",initialize:function(){this.controller.on("content:render",this.update,this),e.prototype.initialize.apply(this,arguments)},update:function(){var a=this.controller.content.mode();a&&this.select(a)}}),b.exports=d},{}],57:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.View.extend({tagName:"input",className:"search",id:"media-search-input",attributes:{type:"search",placeholder:e.search},events:{input:"search",keyup:"search",change:"search",search:"search"},render:function(){return this.el.value=this.model.escape("search"),this},search:function(a){a.target.value?this.model.set("search",a.target.value):this.model.unset("search")}}),b.exports=d},{}],58:[function(a,b,c){var d,e=wp.media.view.l10n;d=wp.media.View.extend({tagName:"div",className:"media-selection",template:wp.template("media-selection"),events:{"click .edit-selection":"edit","click .clear-selection":"clear"},initialize:function(){_.defaults(this.options,{editable:!1,clearable:!0}),this.attachments=new wp.media.view.Attachments.Selection({controller:this.controller,collection:this.collection,selection:this.collection,model:new Backbone.Model}),this.views.set(".selection-view",this.attachments),this.collection.on("add remove reset",this.refresh,this),this.controller.on("content:activate",this.refresh,this)},ready:function(){this.refresh()},refresh:function(){if(this.$el.children().length){var a=this.collection,b="edit-selection"===this.controller.content.mode();this.$el.toggleClass("empty",!a.length),this.$el.toggleClass("one",1===a.length),this.$el.toggleClass("editing",b),this.$(".count").text(e.selected.replace("%d",a.length))}},edit:function(a){a.preventDefault(),this.options.editable&&this.options.editable.call(this,this.collection)},clear:function(a){a.preventDefault(),this.collection.reset(),this.controller.modal.focusManager.focus()}}),b.exports=d},{}],59:[function(a,b,c){var d,e=wp.media.View,f=Backbone.$;d=e.extend({events:{"click button":"updateHandler","change input":"updateHandler","change select":"updateHandler","change textarea":"updateHandler"},initialize:function(){this.model=this.model||new Backbone.Model,this.listenTo(this.model,"change",this.updateChanges)},prepare:function(){return _.defaults({model:this.model.toJSON()},this.options)},render:function(){return e.prototype.render.apply(this,arguments),_(this.model.attributes).chain().keys().each(this.update,this),this},update:function(a){var b,c,d=this.model.get(a),e=this.$('[data-setting="'+a+'"]');e.length&&(e.is("select")?(c=e.find('[value="'+d+'"]'),c.length?(e.find("option").prop("selected",!1),c.prop("selected",!0)):this.model.set(a,e.find(":selected").val())):e.hasClass("button-group")?(b=e.find("button").removeClass("active"),b.filter('[value="'+d+'"]').addClass("active")):e.is('input[type="text"], textarea')?e.is(":focus")||e.val(d):e.is('input[type="checkbox"]')&&e.prop("checked",!!d&&"false"!==d))},updateHandler:function(a){var b,c=f(a.target).closest("[data-setting]"),d=a.target.value;a.preventDefault(),c.length&&(c.is('input[type="checkbox"]')&&(d=c[0].checked),this.model.set(c.data("setting"),d),(b=c.data("userSetting"))&&window.setUserSetting(b,d))},updateChanges:function(a){a.hasChanged()&&_(a.changed).chain().keys().each(this.update,this)}}),b.exports=d},{}],60:[function(a,b,c){var d,e=wp.media.view.Settings;d=e.extend({className:"attachment-display-settings",template:wp.template("attachment-display-settings"),initialize:function(){var a=this.options.attachment;_.defaults(this.options,{userSettings:!1}),e.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:link",this.updateLinkTo),a&&a.on("change:uploading",this.render,this)},dispose:function(){var a=this.options.attachment;a&&a.off(null,null,this),e.prototype.dispose.apply(this,arguments)},render:function(){var a=this.options.attachment;return a&&_.extend(this.options,{sizes:a.get("sizes"),type:a.get("type")}),e.prototype.render.call(this),this.updateLinkTo(),this},updateLinkTo:function(){var a=this.model.get("link"),b=this.$(".link-to-custom"),c=this.options.attachment;return"none"===a||"embed"===a||!c&&"custom"!==a?void b.addClass("hidden"):(c&&("post"===a?b.val(c.get("link")):"file"===a?b.val(c.get("url")):this.model.get("linkUrl")||b.val("http://"),b.prop("readonly","custom"!==a)),b.removeClass("hidden"),void(!wp.media.isTouchDevice&&b.is(":visible")&&b.focus()[0].select()))}}),b.exports=d},{}],61:[function(a,b,c){var d=wp.media.view.Settings.extend({className:"collection-settings gallery-settings",template:wp.template("gallery-settings")});b.exports=d},{}],62:[function(a,b,c){var d=wp.media.view.Settings.extend({className:"collection-settings playlist-settings",template:wp.template("playlist-settings")});b.exports=d},{}],63:[function(a,b,c){var d=wp.media.view.PriorityList.extend({className:"media-sidebar"});b.exports=d},{}],64:[function(a,b,c){var d,e=wp.media.view;d=e.Cropper.extend({className:"crop-content site-icon",ready:function(){e.Cropper.prototype.ready.apply(this,arguments),this.$(".crop-image").on("load",_.bind(this.addSidebar,this))},addSidebar:function(){this.sidebar=new wp.media.view.Sidebar({controller:this.controller}),this.sidebar.set("preview",new wp.media.view.SiteIconPreview({controller:this.controller,attachment:this.options.attachment})),this.controller.cropperView.views.add(this.sidebar)}}),b.exports=d},{}],65:[function(a,b,c){var d,e=wp.media.View,f=jQuery;d=e.extend({className:"site-icon-preview",template:wp.template("site-icon-preview"),ready:function(){this.controller.imgSelect.setOptions({onInit:this.updatePreview,onSelectChange:this.updatePreview})},prepare:function(){return{url:this.options.attachment.get("url")}},updatePreview:function(a,b){var c=64/b.width,d=64/b.height,e=16/b.width,g=16/b.height;f("#preview-app-icon").css({width:Math.round(c*this.imageWidth)+"px",height:Math.round(d*this.imageHeight)+"px",marginLeft:"-"+Math.round(c*b.x1)+"px",marginTop:"-"+Math.round(d*b.y1)+"px"}),f("#preview-favicon").css({width:Math.round(e*this.imageWidth)+"px",height:Math.round(g*this.imageHeight)+"px",marginLeft:"-"+Math.round(e*b.x1)+"px",marginTop:"-"+Math.floor(g*b.y1)+"px"})}}),b.exports=d},{}],66:[function(a,b,c){var d=wp.media.View.extend({tagName:"span",className:"spinner",spinnerTimeout:!1,delay:400,show:function(){return this.spinnerTimeout||(this.spinnerTimeout=_.delay(function(a){a.addClass("is-active")},this.delay,this.$el)),this},hide:function(){return this.$el.removeClass("is-active"),this.spinnerTimeout=clearTimeout(this.spinnerTimeout),this}});b.exports=d},{}],67:[function(a,b,c){var d,e=wp.media.View;d=e.extend({tagName:"div",className:"media-toolbar",initialize:function(){var a=this.controller.state(),b=this.selection=a.get("selection"),c=this.library=a.get("library");this._views={},this.primary=new wp.media.view.PriorityList,this.secondary=new wp.media.view.PriorityList,this.primary.$el.addClass("media-toolbar-primary search-form"),this.secondary.$el.addClass("media-toolbar-secondary"),this.views.set([this.secondary,this.primary]),this.options.items&&this.set(this.options.items,{silent:!0}),this.options.silent||this.render(),b&&b.on("add remove reset",this.refresh,this),c&&c.on("add remove reset",this.refresh,this)},dispose:function(){return this.selection&&this.selection.off(null,null,this),this.library&&this.library.off(null,null,this),e.prototype.dispose.apply(this,arguments)},ready:function(){this.refresh()},set:function(a,b,c){var d;return c=c||{},_.isObject(a)?_.each(a,function(a,b){this.set(b,a,{silent:!0})},this):(b instanceof Backbone.View||(b.classes=["media-button-"+a].concat(b.classes||[]),b=new wp.media.view.Button(b).render()),b.controller=b.controller||this.controller,this._views[a]=b,d=b.options.priority<0?"secondary":"primary",this[d].set(a,b,c)),c.silent||this.refresh(),this},get:function(a){return this._views[a]},unset:function(a,b){return delete this._views[a],this.primary.unset(a,b),this.secondary.unset(a,b),b&&b.silent||this.refresh(),this},refresh:function(){var a=this.controller.state(),b=a.get("library"),c=a.get("selection");_.each(this._views,function(a){if(a.model&&a.options&&a.options.requires){var d=a.options.requires,e=!1;e=_.some(c.models,function(a){return a.get("uploading")===!0}),d.selection&&c&&!c.length?e=!0:d.library&&b&&!b.length&&(e=!0),a.model.set("disabled",e)}})}}),b.exports=d},{}],68:[function(a,b,c){var d,e=wp.media.view.Toolbar.Select,f=wp.media.view.l10n;d=e.extend({initialize:function(){_.defaults(this.options,{text:f.insertIntoPost,requires:!1}),e.prototype.initialize.apply(this,arguments)},refresh:function(){var a=this.controller.state().props.get("url");this.get("select").model.set("disabled",!a||"http://"===a),e.prototype.refresh.apply(this,arguments)}}),b.exports=d},{}],69:[function(a,b,c){var d,e=wp.media.view.Toolbar,f=wp.media.view.l10n;d=e.extend({initialize:function(){var a=this.options;_.bindAll(this,"clickSelect"),_.defaults(a,{event:"select",state:!1,reset:!0,close:!0,text:f.select,requires:{selection:!0}}),a.items=_.defaults(a.items||{},{select:{style:"primary",text:a.text,priority:80,click:this.clickSelect,requires:a.requires}}),e.prototype.initialize.apply(this,arguments)},clickSelect:function(){var a=this.options,b=this.controller;a.close&&b.close(),a.event&&b.state().trigger(a.event),a.state&&b.setState(a.state),a.reset&&b.reset()}}),b.exports=d},{}],70:[function(a,b,c){var d,e=wp.media.View,f=wp.media.view.l10n,g=jQuery;d=e.extend({tagName:"div",className:"uploader-editor",template:wp.template("uploader-editor"),localDrag:!1,overContainer:!1,overDropzone:!1,draggingFile:null,initialize:function(){return this.initialized=!1,window.tinyMCEPreInit&&window.tinyMCEPreInit.dragDropUpload&&this.browserSupport()?(this.$document=g(document),this.dropzones=[],
+this.files=[],this.$document.on("drop",".uploader-editor",_.bind(this.drop,this)),this.$document.on("dragover",".uploader-editor",_.bind(this.dropzoneDragover,this)),this.$document.on("dragleave",".uploader-editor",_.bind(this.dropzoneDragleave,this)),this.$document.on("click",".uploader-editor",_.bind(this.click,this)),this.$document.on("dragover",_.bind(this.containerDragover,this)),this.$document.on("dragleave",_.bind(this.containerDragleave,this)),this.$document.on("dragstart dragend drop",_.bind(function(a){this.localDrag="dragstart"===a.type,"drop"===a.type&&this.containerDragleave()},this)),this.initialized=!0,this):this},browserSupport:function(){var a=!1,b=document.createElement("div");return a="draggable"in b||"ondragstart"in b&&"ondrop"in b,a=a&&!!(window.File&&window.FileList&&window.FileReader)},isDraggingFile:function(a){return null!==this.draggingFile?this.draggingFile:!_.isUndefined(a.originalEvent)&&!_.isUndefined(a.originalEvent.dataTransfer)&&(this.draggingFile=_.indexOf(a.originalEvent.dataTransfer.types,"Files")>-1&&_.indexOf(a.originalEvent.dataTransfer.types,"text/plain")===-1,this.draggingFile)},refresh:function(a){var b;for(b in this.dropzones)this.dropzones[b].toggle(this.overContainer||this.overDropzone);return _.isUndefined(a)||g(a.target).closest(".uploader-editor").toggleClass("droppable",this.overDropzone),this.overContainer||this.overDropzone||(this.draggingFile=null),this},render:function(){return this.initialized?(e.prototype.render.apply(this,arguments),g(".wp-editor-wrap").each(_.bind(this.attach,this)),this):this},attach:function(a,b){var c=this.$el.clone();return this.dropzones.push(c),g(b).append(c),this},drop:function(a){var b,c;if(this.containerDragleave(a),this.dropzoneDragleave(a),this.files=a.originalEvent.dataTransfer.files,!(this.files.length<1))return b=g(a.target).parents(".wp-editor-wrap"),b.length>0&&b[0].id&&(window.wpActiveEditor=b[0].id.slice(3,-5)),this.workflow?(this.workflow.state().reset(),this.addFiles.apply(this),this.workflow.open()):(this.workflow=wp.media.editor.open(window.wpActiveEditor,{frame:"post",state:"insert",title:f.addMedia,multiple:!0}),c=this.workflow.uploader,c.uploader&&c.uploader.ready?this.addFiles.apply(this):this.workflow.on("uploader:ready",this.addFiles,this)),!1},addFiles:function(){return this.files.length&&(this.workflow.uploader.uploader.uploader.addFile(_.toArray(this.files)),this.files=[]),this},containerDragover:function(a){!this.localDrag&&this.isDraggingFile(a)&&(this.overContainer=!0,this.refresh())},containerDragleave:function(){this.overContainer=!1,_.delay(_.bind(this.refresh,this),50)},dropzoneDragover:function(a){if(!this.localDrag&&this.isDraggingFile(a))return this.overDropzone=!0,this.refresh(a),!1},dropzoneDragleave:function(a){this.overDropzone=!1,_.delay(_.bind(this.refresh,this,a),50)},click:function(a){this.containerDragleave(a),this.dropzoneDragleave(a),this.localDrag=!1}}),b.exports=d},{}],71:[function(a,b,c){var d,e=wp.media.View;d=e.extend({tagName:"div",className:"uploader-inline",template:wp.template("uploader-inline"),events:{"click .close":"hide"},initialize:function(){_.defaults(this.options,{message:"",status:!0,canClose:!1}),!this.options.$browser&&this.controller.uploader&&(this.options.$browser=this.controller.uploader.$browser),_.isUndefined(this.options.postId)&&(this.options.postId=wp.media.view.settings.post.id),this.options.status&&this.views.set(".upload-inline-status",new wp.media.view.UploaderStatus({controller:this.controller}))},prepare:function(){var a=this.controller.state().get("suggestedWidth"),b=this.controller.state().get("suggestedHeight"),c={};return c.message=this.options.message,c.canClose=this.options.canClose,a&&b&&(c.suggestedWidth=a,c.suggestedHeight=b),c},dispose:function(){return this.disposing?e.prototype.dispose.apply(this,arguments):(this.disposing=!0,this.remove())},remove:function(){var a=e.prototype.remove.apply(this,arguments);return _.defer(_.bind(this.refresh,this)),a},refresh:function(){var a=this.controller.uploader;a&&a.refresh()},ready:function(){var a,b=this.options.$browser;if(this.controller.uploader){if(a=this.$(".browser"),a[0]===b[0])return;b.detach().text(a.text()),b[0].className=a[0].className,a.replaceWith(b.show())}return this.refresh(),this},show:function(){this.$el.removeClass("hidden")},hide:function(){this.$el.addClass("hidden")}}),b.exports=d},{}],72:[function(a,b,c){var d=wp.media.View.extend({className:"upload-error",template:wp.template("uploader-status-error")});b.exports=d},{}],73:[function(a,b,c){var d,e=wp.media.View;d=e.extend({className:"media-uploader-status",template:wp.template("uploader-status"),events:{"click .upload-dismiss-errors":"dismiss"},initialize:function(){this.queue=wp.Uploader.queue,this.queue.on("add remove reset",this.visibility,this),this.queue.on("add remove reset change:percent",this.progress,this),this.queue.on("add remove reset change:uploading",this.info,this),this.errors=wp.Uploader.errors,this.errors.reset(),this.errors.on("add remove reset",this.visibility,this),this.errors.on("add",this.error,this)},dispose:function(){return wp.Uploader.queue.off(null,null,this),e.prototype.dispose.apply(this,arguments),this},visibility:function(){this.$el.toggleClass("uploading",!!this.queue.length),this.$el.toggleClass("errors",!!this.errors.length),this.$el.toggle(!!this.queue.length||!!this.errors.length)},ready:function(){_.each({$bar:".media-progress-bar div",$index:".upload-index",$total:".upload-total",$filename:".upload-filename"},function(a,b){this[b]=this.$(a)},this),this.visibility(),this.progress(),this.info()},progress:function(){var a=this.queue,b=this.$bar;b&&a.length&&b.width(a.reduce(function(a,b){if(!b.get("uploading"))return a+100;var c=b.get("percent");return a+(_.isNumber(c)?c:100)},0)/a.length+"%")},info:function(){var a,b=this.queue,c=0;b.length&&(a=this.queue.find(function(a,b){return c=b,a.get("uploading")}),this.$index.text(c+1),this.$total.text(b.length),this.$filename.html(a?this.filename(a.get("filename")):""))},filename:function(a){return _.escape(a)},error:function(a){this.views.add(".upload-errors",new wp.media.view.UploaderStatusError({filename:this.filename(a.get("file").name),message:a.get("message")}),{at:0})},dismiss:function(a){var b=this.views.get(".upload-errors");a.preventDefault(),b&&_.invoke(b,"remove"),wp.Uploader.errors.reset()}}),b.exports=d},{}],74:[function(a,b,c){var d,e=jQuery;d=wp.media.View.extend({tagName:"div",className:"uploader-window",template:wp.template("uploader-window"),initialize:function(){var a;this.$browser=e('<a href="#" class="browser" />').hide().appendTo("body"),a=this.options.uploader=_.defaults(this.options.uploader||{},{dropzone:this.$el,browser:this.$browser,params:{}}),!a.dropzone||a.dropzone instanceof e||(a.dropzone=e(a.dropzone)),this.controller.on("activate",this.refresh,this),this.controller.on("detach",function(){this.$browser.remove()},this)},refresh:function(){this.uploader&&this.uploader.refresh()},ready:function(){var a,b=wp.media.view.settings.post.id;this.uploader||(b&&(this.options.uploader.params.post_id=b),this.uploader=new wp.Uploader(this.options.uploader),a=this.uploader.dropzone,a.on("dropzone:enter",_.bind(this.show,this)),a.on("dropzone:leave",_.bind(this.hide,this)),e(this.uploader).on("uploader:ready",_.bind(this._ready,this)))},_ready:function(){this.controller.trigger("uploader:ready")},show:function(){var a=this.$el.show();_.defer(function(){a.css({opacity:1})})},hide:function(){var a=this.$el.css({opacity:0});wp.media.transition(a).done(function(){"0"===a.css("opacity")&&a.hide()}),_.delay(function(){"0"===a.css("opacity")&&a.is(":visible")&&a.hide()},500)}}),b.exports=d},{}],75:[function(a,b,c){var d=wp.Backbone.View.extend({constructor:function(a){a&&a.controller&&(this.controller=a.controller),wp.Backbone.View.apply(this,arguments)},dispose:function(){return this.undelegateEvents(),this.model&&this.model.off&&this.model.off(null,null,this),this.collection&&this.collection.off&&this.collection.off(null,null,this),this.controller&&this.controller.off&&this.controller.off(null,null,this),this},remove:function(){return this.dispose(),wp.Backbone.View.prototype.remove.apply(this,arguments)}});b.exports=d},{}]},{},[19]);
\ No newline at end of file
index 4546a383252c7f46aedca44b47c287903a08b67c..8e689ebd6222311ec88ebcf816c45f90464afec6 100644 (file)
Binary files a/wp-includes/js/mediaelement/flashmediaelement.swf and b/wp-includes/js/mediaelement/flashmediaelement.swf differ
index e0a1389df268889323b7ead5f6950f500fba057d..6ea6b5931c5ec0c882b4bb010badfc0c40cd500f 100644 (file)
@@ -12,7 +12,7 @@
  * License: MIT
  *
  */
-var mejs=mejs||{};mejs.version="2.18.1",mejs.meIndex=0,mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/youtube","video/x-youtube","video/dailymotion","video/x-dailymotion","application/x-mpegURL"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo","video/x-vimeo"]}]},mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")},absolutizeUrl:function(a){var b=document.createElement("div");return b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>',b.firstChild.href},getScriptPath:function(a){for(var b,c,d,e,f,g,h=0,i="",j="",k=document.getElementsByTagName("script"),l=k.length,m=a.length;l>h;h++){for(e=k[h].src,c=e.lastIndexOf("/"),c>-1?(g=e.substring(c+1),f=e.substring(0,c+1)):(g=e,f=""),b=0;m>b;b++)if(j=a[b],d=g.indexOf(j),d>-1){i=f;break}if(""!==i)break}return i},calculateTimeFormat:function(a,b,c){0>a&&(a=0),"undefined"==typeof c&&(c=25);var d=b.timeFormat,e=d[0],f=d[1]==d[0],g=f?2:1,h=":",i=Math.floor(a/3600)%24,j=Math.floor(a/60)%60,k=Math.floor(a%60),l=Math.floor((a%1*c).toFixed(3)),m=[[l,"f"],[k,"s"],[j,"m"],[i,"h"]];d.length<g&&(h=d[g]);for(var n=!1,o=0,p=m.length;p>o;o++)if(-1!==d.indexOf(m[o][1]))n=!0;else if(n){for(var q=!1,r=o;p>r;r++)if(m[r][0]>0){q=!0;break}if(!q)break;f||(d=e+d),d=m[o][1]+h+d,f&&(d=m[o][1]+d),e=m[o][1]}b.currentTimeFormat=d},twoDigitsString:function(a){return 10>a?"0"+a:String(a)},secondsToTimeCode:function(a,b){if(0>a&&(a=0),"object"!=typeof b){var c="m:ss";c=arguments[1]?"hh:mm:ss":c,c=arguments[2]?c+":ff":c,b={currentTimeFormat:c,framesPerSecond:arguments[3]||25}}var d=b.framesPerSecond;"undefined"==typeof d&&(d=25);var c=b.currentTimeFormat,e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60),h=Math.floor((a%1*d).toFixed(3));lis=[[h,"f"],[g,"s"],[f,"m"],[e,"h"]];var j=c;for(i=0,len=lis.length;len>i;i++)j=j.replace(lis[i][1]+lis[i][1],this.twoDigitsString(lis[i][0])),j=j.replace(lis[i][1],lis[i][0]);return j},timeCodeToSeconds:function(a,b,c,d){"undefined"==typeof c?c=!1:"undefined"==typeof d&&(d=25);var e=a.split(":"),f=parseInt(e[0],10),g=parseInt(e[1],10),h=parseInt(e[2],10),i=0,j=0;return c&&(i=parseInt(e[3])/d),j=3600*f+60*g+h+i},convertSMPTEtoSeconds:function(a){if("string"!=typeof a)return!1;a=a.replace(",",".");var b=0,c=-1!=a.indexOf(".")?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++)d=1,e>0&&(d=Math.pow(60,e)),b+=Number(a[e])*d;return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);b&&/object|embed/i.test(b.nodeName)&&(mejs.MediaFeatures.isIE?(b.style.display="none",function(){4==b.readyState?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))},removeObjectInIE:function(a){var b=document.getElementById(a);if(b){for(var c in b)"function"==typeof b[c]&&(b[c]=null);b.parentNode.removeChild(b)}}},mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];return b[1]=b[1]||0,b[2]=b[2]||0,c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?!0:!1},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e,f,g,h=[0,0,0];if("undefined"!=typeof this.nav.plugins&&"object"==typeof this.nav.plugins[a]){if(e=this.nav.plugins[a].description,e&&("undefined"==typeof this.nav.mimeTypes||!this.nav.mimeTypes[b]||this.nav.mimeTypes[b].enabledPlugin))for(h=e.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split("."),f=0;f<h.length;f++)h[f]=parseInt(h[f].match(/\d+/),10)}else if("undefined"!=typeof window.ActiveXObject)try{g=new ActiveXObject(c),g&&(h=d(g))}catch(i){}return h}},mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[],c=a.GetVariable("$version");return c&&(c=c.split(" ")[1].split(","),b=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]),b}),mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(a,b,c,d){for(;a.isVersionSupported(b[0]+"."+b[1]+"."+b[2]+"."+b[3]);)b[c]+=d;b[c]-=d};return c(a,b,0,1),c(a,b,1,1),c(a,b,2,1e4),c(a,b,2,1e3),c(a,b,2,100),c(a,b,2,10),c(a,b,2,1),c(a,b,3,1),b}),mejs.MediaFeatures={init:function(){var a,b,c=this,d=document,e=mejs.PluginDetector.nav,f=mejs.PluginDetector.ua.toLowerCase(),g=["source","track","audio","video"];c.isiPad=null!==f.match(/ipad/i),c.isiPhone=null!==f.match(/iphone/i),c.isiOS=c.isiPhone||c.isiPad,c.isAndroid=null!==f.match(/android/i),c.isBustedAndroid=null!==f.match(/android 2\.[12]/),c.isBustedNativeHTTPS="https:"===location.protocol&&(null!==f.match(/android [12]\./)||null!==f.match(/macintosh.* version.* safari/)),c.isIE=-1!=e.appName.toLowerCase().indexOf("microsoft")||null!==e.appName.toLowerCase().match(/trident/gi),c.isChrome=null!==f.match(/chrome/gi),c.isChromium=null!==f.match(/chromium/gi),c.isFirefox=null!==f.match(/firefox/gi),c.isWebkit=null!==f.match(/webkit/gi),c.isGecko=null!==f.match(/gecko/gi)&&!c.isWebkit&&!c.isIE,c.isOpera=null!==f.match(/opera/gi),c.hasTouch="ontouchstart"in window,c.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;for(a=0;a<g.length;a++)b=document.createElement(g[a]);c.supportsMediaTag="undefined"!=typeof b.canPlayType||c.isBustedAndroid;try{b.canPlayType("video/mp4")}catch(h){c.supportsMediaTag=!1}c.hasSemiNativeFullScreen="undefined"!=typeof b.webkitEnterFullscreen,c.hasNativeFullscreen="undefined"!=typeof b.requestFullscreen,c.hasWebkitNativeFullScreen="undefined"!=typeof b.webkitRequestFullScreen,c.hasMozNativeFullScreen="undefined"!=typeof b.mozRequestFullScreen,c.hasMsNativeFullScreen="undefined"!=typeof b.msRequestFullscreen,c.hasTrueNativeFullScreen=c.hasWebkitNativeFullScreen||c.hasMozNativeFullScreen||c.hasMsNativeFullScreen,c.nativeFullScreenEnabled=c.hasTrueNativeFullScreen,c.hasMozNativeFullScreen?c.nativeFullScreenEnabled=document.mozFullScreenEnabled:c.hasMsNativeFullScreen&&(c.nativeFullScreenEnabled=document.msFullscreenEnabled),c.isChrome&&(c.hasSemiNativeFullScreen=!1),c.hasTrueNativeFullScreen&&(c.fullScreenEventName="",c.hasWebkitNativeFullScreen?c.fullScreenEventName="webkitfullscreenchange":c.hasMozNativeFullScreen?c.fullScreenEventName="mozfullscreenchange":c.hasMsNativeFullScreen&&(c.fullScreenEventName="MSFullscreenChange"),c.isFullScreen=function(){return c.hasMozNativeFullScreen?d.mozFullScreen:c.hasWebkitNativeFullScreen?d.webkitIsFullScreen:c.hasMsNativeFullScreen?null!==d.msFullscreenElement:void 0},c.requestFullScreen=function(a){c.hasWebkitNativeFullScreen?a.webkitRequestFullScreen():c.hasMozNativeFullScreen?a.mozRequestFullScreen():c.hasMsNativeFullScreen&&a.msRequestFullscreen()},c.cancelFullScreen=function(){c.hasWebkitNativeFullScreen?document.webkitCancelFullScreen():c.hasMozNativeFullScreen?document.mozCancelFullScreen():c.hasMsNativeFullScreen&&document.msExitFullscreen()}),c.hasSemiNativeFullScreen&&f.match(/mac os x 10_5/i)&&(c.hasNativeFullScreen=!1,c.hasSemiNativeFullScreen=!1)}},mejs.MediaFeatures.init(),mejs.HtmlMediaElement={pluginType:"native",isFullScreen:!1,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if("string"==typeof a)this.src=a;else{var c,d;for(c=0;c<a.length;c++)if(d=a[c],this.canPlayType(d.type)){this.src=d.src;break}}},setVideoSize:function(a,b){this.width=a,this.height=b}},mejs.PluginMediaElement=function(a,b,c){this.id=a,this.pluginType=b,this.src=c,this.events={},this.attributes={}},mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:!1,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:!0,ended:!1,seeking:!1,duration:0,error:null,tagName:"",muted:!1,volume:1,currentTime:0,play:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.playVideo():this.pluginApi.playMedia(),this.paused=!1)},load:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType||this.pluginApi.loadMedia(),this.paused=!1)},pause:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.pauseVideo():this.pluginApi.pauseMedia(),this.paused=!0)},stop:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.stopVideo():this.pluginApi.stopMedia(),this.paused=!0)},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++)if(d=e[b],mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return"probably";return""},positionFullscreenButton:function(a,b,c){null!=this.pluginApi&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(Math.floor(a),Math.floor(b),c)},hideFullscreenButton:function(){null!=this.pluginApi&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if("string"==typeof a)this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a)),this.src=mejs.Utility.absolutizeUrl(a);else{var b,c;for(b=0;b<a.length;b++)if(c=a[b],this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src)),this.src=mejs.Utility.absolutizeUrl(c.src);break}}},setCurrentTime:function(a){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a),this.currentTime=a)},setVolume:function(a){null!=this.pluginApi&&(this.pluginApi.setVolume("youtube"==this.pluginType?100*a:a),this.volume=a)},setMuted:function(a){null!=this.pluginApi&&("youtube"==this.pluginType?(a?this.pluginApi.mute():this.pluginApi.unMute(),this.muted=a,this.dispatchEvent({type:"volumechange"})):this.pluginApi.setMuted(a),this.muted=a)},setVideoSize:function(a,b){this.pluginElement&&this.pluginElement.style&&(this.pluginElement.style.width=a+"px",this.pluginElement.style.height=b+"px"),null!=this.pluginApi&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!0)},exitFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!1)},addEventListener:function(a,b){this.events[a]=this.events[a]||[],this.events[a].push(b)},removeEventListener:function(a,b){if(!a)return this.events={},!0;var c=this.events[a];if(!c)return!0;if(!b)return this.events[a]=[],!0;for(var d=0;d<c.length;d++)if(c[d]===b)return this.events[a].splice(d,1),!0;return!1},dispatchEvent:function(a){var b,c=this.events[a.type];if(c)for(b=0;b<c.length;b++)c[b].apply(this,[a])},hasAttribute:function(a){return a in this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){return this.hasAttribute(a)?this.attributes[a]:""},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id),mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id)}},mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b,this.htmlMediaElements[a]=c},unregisterPluginElement:function(a){delete this.pluginMediaElements[a],delete this.htmlMediaElements[a]},initPlugin:function(a){var b=this.pluginMediaElements[a],c=this.htmlMediaElements[a];if(b){switch(b.pluginType){case"flash":b.pluginElement=b.pluginApi=document.getElementById(a);break;case"silverlight":b.pluginElement=document.getElementById(b.id),b.pluginApi=b.pluginElement.Content.MediaElementJS}null!=b.pluginApi&&b.success&&b.success(b,c)}},fireEvent:function(a,b,c){var d,e,f,g=this.pluginMediaElements[a];if(g){d={type:b,target:g};for(e in c)g[e]=c[e],d[e]=c[e];f=c.bufferedTime||0,d.target.buffered=d.buffered={start:function(){return 0},end:function(){return f},length:1},g.dispatchEvent(d)}}},mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:!1,httpsBasicAuthSite:!1,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",flashScriptAccess:"sameDomain",enablePluginSmoothing:!1,enablePseudoStreaming:!1,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:.8,success:function(){},error:function(){}},mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)},mejs.HtmlMediaElementShim={create:function(a,b){var c,d,e={},f="string"==typeof a?document.getElementById(a):a,g=f.tagName.toLowerCase(),h="audio"===g||"video"===g,i=f.getAttribute(h?"src":"href"),j=f.getAttribute("poster"),k=f.getAttribute("autoplay"),l=f.getAttribute("preload"),m=f.getAttribute("controls");for(d in mejs.MediaElementDefaults)e[d]=mejs.MediaElementDefaults[d];for(d in b)e[d]=b[d];return i="undefined"==typeof i||null===i||""==i?null:i,j="undefined"==typeof j||null===j?"":j,l="undefined"==typeof l||null===l||"false"===l?"none":l,k=!("undefined"==typeof k||null===k||"false"===k),m=!("undefined"==typeof m||null===m||"false"===m),c=this.determinePlayback(f,e,mejs.MediaFeatures.supportsMediaTag,h,i),c.url=null!==c.url?mejs.Utility.absolutizeUrl(c.url):"","native"==c.method?(mejs.MediaFeatures.isBustedAndroid&&(f.src=c.url,f.addEventListener("click",function(){f.play()},!1)),this.updateNative(c,e,k,l)):""!==c.method?this.createPlugin(c,e,j,k,l,m):(this.createErrorMessage(c,e,j),this)},determinePlayback:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=[],r={method:"",url:"",htmlMediaElement:a,isVideo:"audio"!=a.tagName.toLowerCase()};if("undefined"!=typeof b.type&&""!==b.type)if("string"==typeof b.type)q.push({type:b.type,url:e});else for(f=0;f<b.type.length;f++)q.push({type:b.type[f],url:e});else if(null!==e)k=this.formatType(e,a.getAttribute("type")),q.push({type:k,url:e});else for(f=0;f<a.childNodes.length;f++)j=a.childNodes[f],1==j.nodeType&&"source"==j.tagName.toLowerCase()&&(e=j.getAttribute("src"),k=this.formatType(e,j.getAttribute("type")),p=j.getAttribute("media"),(!p||!window.matchMedia||window.matchMedia&&window.matchMedia(p).matches)&&q.push({type:k,url:e}));if(!d&&q.length>0&&null!==q[0].url&&this.getTypeFromFile(q[0].url).indexOf("audio")>-1&&(r.isVideo=!1),mejs.MediaFeatures.isBustedAndroid&&(a.canPlayType=function(a){return null!==a.match(/video\/(mp4|m4v)/gi)?"maybe":""}),!(!c||"auto"!==b.mode&&"auto_plugin"!==b.mode&&"native"!==b.mode||mejs.MediaFeatures.isBustedNativeHTTPS&&b.httpsBasicAuthSite===!0)){for(d||(o=document.createElement(r.isVideo?"video":"audio"),a.parentNode.insertBefore(o,a),a.style.display="none",r.htmlMediaElement=a=o),f=0;f<q.length;f++)if("video/m3u8"==q[f].type||""!==a.canPlayType(q[f].type).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/mp3/,"mpeg")).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/m4a/,"mp4")).replace(/no/,"")){r.method="native",r.url=q[f].url;break}if("native"===r.method&&(null!==r.url&&(a.src=r.url),"auto_plugin"!==b.mode))return r}if("auto"===b.mode||"auto_plugin"===b.mode||"shim"===b.mode)for(f=0;f<q.length;f++)for(k=q[f].type,g=0;g<b.plugins.length;g++)for(l=b.plugins[g],m=mejs.plugins[l],h=0;h<m.length;h++)if(n=m[h],null==n.version||mejs.PluginDetector.hasPluginVersion(l,n.version))for(i=0;i<n.types.length;i++)if(k.toLowerCase()==n.types[i].toLowerCase())return r.method=l,r.url=q[f].url,r;return"auto_plugin"===b.mode&&"native"===r.method?r:(""===r.method&&q.length>0&&(r.url=q[0].url),r)},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.split("?")[0];var b=a.substring(a.lastIndexOf(".")+1).toLowerCase(),c=/(mp4|m4v|ogg|ogv|m3u8|webm|webmv|flv|wmv|mpeg|mov)/gi.test(b)?"video/":"audio/";return this.getTypeFromExtension(b,c)},getTypeFromExtension:function(a,b){switch(b=b||"",a){case"mp4":case"m4v":case"m4a":case"f4v":case"f4a":return b+"mp4";case"flv":return b+"x-flv";case"webm":case"webma":case"webmv":return b+"webm";case"ogg":case"oga":case"ogv":return b+"ogg";case"m3u8":return"application/x-mpegurl";case"ts":return b+"mp2t";default:return b+a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div"),f=b.customError;e.className="me-cannotplay";try{e.style.width=d.width+"px",e.style.height=d.height+"px"}catch(g){}f||(f='<a href="'+a.url+'">',""!==c&&(f+='<img src="'+c+'" width="100%" height="100%" alt="" />'),f+="<span>"+mejs.i18n.t("Download File")+"</span></a>"),e.innerHTML=f,d.parentNode.insertBefore(e,d),d.style.display="none",b.error(d)},createPlugin:function(a,b,c,d,e,f){var g,h,i,j=a.htmlMediaElement,k=1,l=1,m="me_"+a.method+"_"+mejs.meIndex++,n=new mejs.PluginMediaElement(m,a.method,a.url),o=document.createElement("div");n.tagName=j.tagName;for(var p=0;p<j.attributes.length;p++){var q=j.attributes[p];q.specified&&n.setAttribute(q.name,q.value)}for(h=j.parentNode;null!==h&&null!=h.tagName&&"body"!==h.tagName.toLowerCase()&&null!=h.parentNode&&null!=h.parentNode.tagName&&null!=h.parentNode.constructor&&"ShadowRoot"===h.parentNode.constructor.name;){if("p"===h.parentNode.tagName.toLowerCase()){h.parentNode.parentNode.insertBefore(h,h.parentNode);break}h=h.parentNode}switch(a.isVideo?(k=b.pluginWidth>0?b.pluginWidth:b.videoWidth>0?b.videoWidth:null!==j.getAttribute("width")?j.getAttribute("width"):b.defaultVideoWidth,l=b.pluginHeight>0?b.pluginHeight:b.videoHeight>0?b.videoHeight:null!==j.getAttribute("height")?j.getAttribute("height"):b.defaultVideoHeight,k=mejs.Utility.encodeUrl(k),l=mejs.Utility.encodeUrl(l)):b.enablePluginDebug&&(k=320,l=240),n.success=b.success,mejs.MediaPluginBridge.registerPluginElement(m,n,j),o.className="me-plugin",o.id=m+"_container",a.isVideo?j.parentNode.insertBefore(o,j):document.body.insertBefore(o,document.body.childNodes[0]),i=["id="+m,"jsinitfunction=mejs.MediaPluginBridge.initPlugin","jscallbackfunction=mejs.MediaPluginBridge.fireEvent","isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+k,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+l,"pseudostreamstart="+b.pseudoStreamingStartQueryParam],null!==a.url&&i.push("flash"==a.method?"file="+mejs.Utility.encodeUrl(a.url):"file="+a.url),b.enablePluginDebug&&i.push("debug=true"),b.enablePluginSmoothing&&i.push("smoothing=true"),b.enablePseudoStreaming&&i.push("pseudostreaming=true"),f&&i.push("controls=true"),b.pluginVars&&(i=i.concat(b.pluginVars)),a.method){case"silverlight":o.innerHTML='<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+m+'" name="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="initParams" value="'+i.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case"flash":mejs.MediaFeatures.isIE?(g=document.createElement("div"),o.appendChild(g),g.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?"+(new Date).getTime()+'" /><param name="flashvars" value="'+i.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+b.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /><param name="scale" value="default" /></object>'):o.innerHTML='<embed id="'+m+'" name="'+m+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="'+b.flashScriptAccess+'" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+b.pluginPath+b.flashName+'" flashvars="'+i.join("&")+'" width="'+k+'" height="'+l+'" scale="default"class="mejs-shim"></embed>';break;case"youtube":var r;-1!=a.url.lastIndexOf("youtu.be")?(r=a.url.substr(a.url.lastIndexOf("/")+1),-1!=r.indexOf("?")&&(r=r.substr(0,r.indexOf("?")))):r=a.url.substr(a.url.lastIndexOf("=")+1),youtubeSettings={container:o,containerId:o.id,pluginMediaElement:n,pluginId:m,videoId:r,height:l,width:k},mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings,b):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case"vimeo":var s=m+"_player";if(n.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1),o.innerHTML='<iframe src="//player.vimeo.com/video/'+n.vimeoid+"?api=1&portrait=0&byline=0&title=0&player_id="+s+'" width="'+k+'" height="'+l+'" frameborder="0" class="mejs-shim" id="'+s+'" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>',"function"==typeof $f){var t=$f(o.childNodes[0]);t.addEvent("ready",function(){function a(a,b,c,d){var e={type:c,target:b};"timeupdate"==c&&(b.currentTime=e.currentTime=d.seconds,b.duration=e.duration=d.duration),b.dispatchEvent(e)}t.playVideo=function(){t.api("play")},t.stopVideo=function(){t.api("unload")},t.pauseVideo=function(){t.api("pause")},t.seekTo=function(a){t.api("seekTo",a)},t.setVolume=function(a){t.api("setVolume",a)},t.setMuted=function(a){a?(t.lastVolume=t.api("getVolume"),t.api("setVolume",0)):(t.api("setVolume",t.lastVolume),delete t.lastVolume)},t.addEvent("play",function(){a(t,n,"play"),a(t,n,"playing")}),t.addEvent("pause",function(){a(t,n,"pause")}),t.addEvent("finish",function(){a(t,n,"ended")}),t.addEvent("playProgress",function(b){a(t,n,"timeupdate",b)}),n.pluginElement=o,n.pluginApi=t,mejs.MediaPluginBridge.initPlugin(m)})}else console.warn("You need to include froogaloop for vimeo to work")}return j.style.display="none",j.removeAttribute("autoplay"),n},updateNative:function(a,b){var c,d=a.htmlMediaElement;for(c in mejs.HtmlMediaElement)d[c]=mejs.HtmlMediaElement[c];return b.success(d,d),d}},mejs.YouTubeApi={isIframeStarted:!1,isIframeLoaded:!1,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="//www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b),this.isIframeStarted=!0}},iframeQueue:[],enqueueIframe:function(a){this.isLoaded?this.createIframe(a):(this.loadIframeApi(),this.iframeQueue.push(a))},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId,{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c,mejs.MediaPluginBridge.initPlugin(a.pluginId),setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(a){mejs.YouTubeApi.handleStateChange(a.data,c,b)}}})},createEvent:function(a,b,c){var d={type:c,target:b};if(a&&a.getDuration){b.currentTime=d.currentTime=a.getCurrentTime(),b.duration=d.duration=a.getDuration(),d.paused=b.paused,d.ended=b.ended,d.muted=a.isMuted(),d.volume=a.getVolume()/100,d.bytesTotal=a.getVideoBytesTotal(),d.bufferedBytes=a.getVideoBytesLoaded();var e=d.bufferedBytes/d.bytesTotal*d.duration;d.target.buffered=d.buffered={start:function(){return 0},end:function(){return e},length:1}}b.dispatchEvent(d)},iFrameReady:function(){for(this.isLoaded=!0,this.isIframeLoaded=!0;this.iframeQueue.length>0;){var a=this.iframeQueue.pop();this.createIframe(a)}},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=a;var b,c="//www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid="+a.pluginId+"&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0";mejs.MediaFeatures.isIE?(b=document.createElement("div"),a.container.appendChild(b),b.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'" class="mejs-shim"><param name="movie" value="'+c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+options.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /></object>'):a.container.innerHTML='<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="'+options.flashScriptAccess+'"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPlayers[a],c=document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c,mejs.MediaPluginBridge.initPlugin(a),c.cueVideoById(b.videoId);var e=b.containerId+"_callback";window[e]=function(a){mejs.YouTubeApi.handleStateChange(a,c,d)},c.addEventListener("onStateChange",e),setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250),mejs.YouTubeApi.createEvent(c,d,"canplay")},handleStateChange:function(a,b,c){switch(a){case-1:c.paused=!0,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=!1,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=!1,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"play"),mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=!0,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress");break;case 5:}}},window.onYouTubePlayerAPIReady=function(){mejs.YouTubeApi.iFrameReady()},window.onYouTubePlayerReady=function(a){mejs.YouTubeApi.flashReady(a)},window.mejs=mejs,window.MediaElement=mejs.MediaElement,function(a,b){"use strict";var c={locale:{language:b.i18n&&b.i18n.locale.language||"",strings:b.i18n&&b.i18n.locale.strings||{}},ietf_lang_regex:/^(x\-)?[a-z]{2,}(\-\w{2,})?(\-\w{2,})?$/,methods:{}};c.getLanguage=function(){var a=c.locale.language||window.navigator.userLanguage||window.navigator.language;return c.ietf_lang_regex.exec(a)?a:null},"undefined"!=typeof mejsL10n&&(c.locale.language=mejsL10n.language),c.methods.checkPlain=function(a){var b,c,d={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"};a=String(a);for(b in d)d.hasOwnProperty(b)&&(c=new RegExp(b,"g"),a=a.replace(c,d[b]));return a},c.methods.t=function(a,b){return c.locale.strings&&c.locale.strings[b.context]&&c.locale.strings[b.context][a]&&(a=c.locale.strings[b.context][a]),c.methods.checkPlain(a)},c.t=function(a,b){if("string"==typeof a&&a.length>0){var d=c.getLanguage();return b=b||{context:d},c.methods.t(a,b)}throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."}},b.i18n=c}(document,mejs),function(a){"use strict";"undefined"!=typeof mejsL10n&&(a[mejsL10n.language]=mejsL10n.strings)}(mejs.i18n.locale.strings),/*!
+var mejs=mejs||{};mejs.version="2.22.0",mejs.meIndex=0,mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/dailymotion","video/x-dailymotion","application/x-mpegURL"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo","video/x-vimeo"]}]},mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")},absolutizeUrl:function(a){var b=document.createElement("div");return b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>',b.firstChild.href},getScriptPath:function(a){for(var b,c,d,e,f,g,h=0,i="",j="",k=document.getElementsByTagName("script"),l=k.length,m=a.length;l>h;h++){for(e=k[h].src,c=e.lastIndexOf("/"),c>-1?(g=e.substring(c+1),f=e.substring(0,c+1)):(g=e,f=""),b=0;m>b;b++)if(j=a[b],d=g.indexOf(j),d>-1){i=f;break}if(""!==i)break}return i},calculateTimeFormat:function(a,b,c){0>a&&(a=0),"undefined"==typeof c&&(c=25);var d=b.timeFormat,e=d[0],f=d[1]==d[0],g=f?2:1,h=":",i=Math.floor(a/3600)%24,j=Math.floor(a/60)%60,k=Math.floor(a%60),l=Math.floor((a%1*c).toFixed(3)),m=[[l,"f"],[k,"s"],[j,"m"],[i,"h"]];d.length<g&&(h=d[g]);for(var n=!1,o=0,p=m.length;p>o;o++)if(-1!==d.indexOf(m[o][1]))n=!0;else if(n){for(var q=!1,r=o;p>r;r++)if(m[r][0]>0){q=!0;break}if(!q)break;f||(d=e+d),d=m[o][1]+h+d,f&&(d=m[o][1]+d),e=m[o][1]}b.currentTimeFormat=d},twoDigitsString:function(a){return 10>a?"0"+a:String(a)},secondsToTimeCode:function(a,b){if(0>a&&(a=0),"object"!=typeof b){var c="m:ss";c=arguments[1]?"hh:mm:ss":c,c=arguments[2]?c+":ff":c,b={currentTimeFormat:c,framesPerSecond:arguments[3]||25}}var d=b.framesPerSecond;"undefined"==typeof d&&(d=25);var c=b.currentTimeFormat,e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60),h=Math.floor((a%1*d).toFixed(3));lis=[[h,"f"],[g,"s"],[f,"m"],[e,"h"]];var j=c;for(i=0,len=lis.length;i<len;i++)j=j.replace(lis[i][1]+lis[i][1],this.twoDigitsString(lis[i][0])),j=j.replace(lis[i][1],lis[i][0]);return j},timeCodeToSeconds:function(a,b,c,d){"undefined"==typeof c?c=!1:"undefined"==typeof d&&(d=25);var e=a.split(":"),f=parseInt(e[0],10),g=parseInt(e[1],10),h=parseInt(e[2],10),i=0,j=0;return c&&(i=parseInt(e[3])/d),j=3600*f+60*g+h+i},convertSMPTEtoSeconds:function(a){if("string"!=typeof a)return!1;a=a.replace(",",".");var b=0,c=-1!=a.indexOf(".")?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++)d=1,e>0&&(d=Math.pow(60,e)),b+=Number(a[e])*d;return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);b&&/object|embed/i.test(b.nodeName)&&(mejs.MediaFeatures.isIE?(b.style.display="none",function(){4==b.readyState?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))},removeObjectInIE:function(a){var b=document.getElementById(a);if(b){for(var c in b)"function"==typeof b[c]&&(b[c]=null);b.parentNode.removeChild(b)}},determineScheme:function(a){return a&&-1!=a.indexOf("://")?a.substr(0,a.indexOf("://")+3):"//"}},mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];return b[1]=b[1]||0,b[2]=b[2]||0,c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?!0:!1},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e,f,g,h=[0,0,0];if("undefined"!=typeof this.nav.plugins&&"object"==typeof this.nav.plugins[a]){if(e=this.nav.plugins[a].description,e&&("undefined"==typeof this.nav.mimeTypes||!this.nav.mimeTypes[b]||this.nav.mimeTypes[b].enabledPlugin))for(h=e.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split("."),f=0;f<h.length;f++)h[f]=parseInt(h[f].match(/\d+/),10)}else if("undefined"!=typeof window.ActiveXObject)try{g=new ActiveXObject(c),g&&(h=d(g))}catch(i){}return h}},mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[],c=a.GetVariable("$version");return c&&(c=c.split(" ")[1].split(","),b=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]),b}),mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(a,b,c,d){for(;a.isVersionSupported(b[0]+"."+b[1]+"."+b[2]+"."+b[3]);)b[c]+=d;b[c]-=d};return c(a,b,0,1),c(a,b,1,1),c(a,b,2,1e4),c(a,b,2,1e3),c(a,b,2,100),c(a,b,2,10),c(a,b,2,1),c(a,b,3,1),b}),mejs.MediaFeatures={init:function(){var a,b,c=this,d=document,e=mejs.PluginDetector.nav,f=mejs.PluginDetector.ua.toLowerCase(),g=["source","track","audio","video"];c.isiPad=null!==f.match(/ipad/i),c.isiPhone=null!==f.match(/iphone/i),c.isiOS=c.isiPhone||c.isiPad,c.isAndroid=null!==f.match(/android/i),c.isBustedAndroid=null!==f.match(/android 2\.[12]/),c.isBustedNativeHTTPS="https:"===location.protocol&&(null!==f.match(/android [12]\./)||null!==f.match(/macintosh.* version.* safari/)),c.isIE=-1!=e.appName.toLowerCase().indexOf("microsoft")||null!==e.appName.toLowerCase().match(/trident/gi),c.isChrome=null!==f.match(/chrome/gi),c.isChromium=null!==f.match(/chromium/gi),c.isFirefox=null!==f.match(/firefox/gi),c.isWebkit=null!==f.match(/webkit/gi),c.isGecko=null!==f.match(/gecko/gi)&&!c.isWebkit&&!c.isIE,c.isOpera=null!==f.match(/opera/gi),c.hasTouch="ontouchstart"in window,c.svgAsImg=!!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1");for(a=0;a<g.length;a++)b=document.createElement(g[a]);c.supportsMediaTag="undefined"!=typeof b.canPlayType||c.isBustedAndroid;try{b.canPlayType("video/mp4")}catch(h){c.supportsMediaTag=!1}c.supportsPointerEvents=function(){var a,b=document.createElement("x"),c=document.documentElement,d=window.getComputedStyle;return"pointerEvents"in b.style?(b.style.pointerEvents="auto",b.style.pointerEvents="x",c.appendChild(b),a=d&&"auto"===d(b,"").pointerEvents,c.removeChild(b),!!a):!1}(),c.hasFirefoxPluginMovingProblem=!1,c.hasiOSFullScreen="undefined"!=typeof b.webkitEnterFullscreen,c.hasNativeFullscreen="undefined"!=typeof b.requestFullscreen,c.hasWebkitNativeFullScreen="undefined"!=typeof b.webkitRequestFullScreen,c.hasMozNativeFullScreen="undefined"!=typeof b.mozRequestFullScreen,c.hasMsNativeFullScreen="undefined"!=typeof b.msRequestFullscreen,c.hasTrueNativeFullScreen=c.hasWebkitNativeFullScreen||c.hasMozNativeFullScreen||c.hasMsNativeFullScreen,c.nativeFullScreenEnabled=c.hasTrueNativeFullScreen,c.hasMozNativeFullScreen?c.nativeFullScreenEnabled=document.mozFullScreenEnabled:c.hasMsNativeFullScreen&&(c.nativeFullScreenEnabled=document.msFullscreenEnabled),c.isChrome&&(c.hasiOSFullScreen=!1),c.hasTrueNativeFullScreen&&(c.fullScreenEventName="",c.hasWebkitNativeFullScreen?c.fullScreenEventName="webkitfullscreenchange":c.hasMozNativeFullScreen?c.fullScreenEventName="mozfullscreenchange":c.hasMsNativeFullScreen&&(c.fullScreenEventName="MSFullscreenChange"),c.isFullScreen=function(){return c.hasMozNativeFullScreen?d.mozFullScreen:c.hasWebkitNativeFullScreen?d.webkitIsFullScreen:c.hasMsNativeFullScreen?null!==d.msFullscreenElement:void 0},c.requestFullScreen=function(a){c.hasWebkitNativeFullScreen?a.webkitRequestFullScreen():c.hasMozNativeFullScreen?a.mozRequestFullScreen():c.hasMsNativeFullScreen&&a.msRequestFullscreen()},c.cancelFullScreen=function(){c.hasWebkitNativeFullScreen?document.webkitCancelFullScreen():c.hasMozNativeFullScreen?document.mozCancelFullScreen():c.hasMsNativeFullScreen&&document.msExitFullscreen()}),c.hasiOSFullScreen&&f.match(/mac os x 10_5/i)&&(c.hasNativeFullScreen=!1,c.hasiOSFullScreen=!1)}},mejs.MediaFeatures.init(),mejs.HtmlMediaElement={pluginType:"native",isFullScreen:!1,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if("string"==typeof a)this.src=a;else{var c,d;for(c=0;c<a.length;c++)if(d=a[c],this.canPlayType(d.type)){this.src=d.src;break}}},setVideoSize:function(a,b){this.width=a,this.height=b}},mejs.PluginMediaElement=function(a,b,c){this.id=a,this.pluginType=b,this.src=c,this.events={},this.attributes={}},mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:!1,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:!0,ended:!1,seeking:!1,duration:0,error:null,tagName:"",muted:!1,volume:1,currentTime:0,play:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.playVideo():this.pluginApi.playMedia(),this.paused=!1)},load:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType||this.pluginApi.loadMedia(),this.paused=!1)},pause:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?1==this.pluginApi.getPlayerState()&&this.pluginApi.pauseVideo():this.pluginApi.pauseMedia(),this.paused=!0)},stop:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.stopVideo():this.pluginApi.stopMedia(),this.paused=!0)},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++)if(d=e[b],mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return"probably";return""},positionFullscreenButton:function(a,b,c){null!=this.pluginApi&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(Math.floor(a),Math.floor(b),c)},hideFullscreenButton:function(){null!=this.pluginApi&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if("string"==typeof a)this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a)),this.src=mejs.Utility.absolutizeUrl(a);else{var b,c;for(b=0;b<a.length;b++)if(c=a[b],this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src)),this.src=mejs.Utility.absolutizeUrl(c.src);break}}},setCurrentTime:function(a){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a),this.currentTime=a)},setVolume:function(a){null!=this.pluginApi&&("youtube"==this.pluginType?this.pluginApi.setVolume(100*a):this.pluginApi.setVolume(a),this.volume=a)},setMuted:function(a){null!=this.pluginApi&&("youtube"==this.pluginType?(a?this.pluginApi.mute():this.pluginApi.unMute(),this.muted=a,this.dispatchEvent({type:"volumechange"})):this.pluginApi.setMuted(a),this.muted=a)},setVideoSize:function(a,b){this.pluginElement&&this.pluginElement.style&&(this.pluginElement.style.width=a+"px",this.pluginElement.style.height=b+"px"),null!=this.pluginApi&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!0)},exitFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!1)},addEventListener:function(a,b,c){this.events[a]=this.events[a]||[],this.events[a].push(b)},removeEventListener:function(a,b){if(!a)return this.events={},!0;var c=this.events[a];if(!c)return!0;if(!b)return this.events[a]=[],!0;for(var d=0;d<c.length;d++)if(c[d]===b)return this.events[a].splice(d,1),!0;return!1},dispatchEvent:function(a){var b,c=this.events[a.type];if(c)for(b=0;b<c.length;b++)c[b].apply(this,[a])},hasAttribute:function(a){return a in this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){return this.hasAttribute(a)?this.attributes[a]:""},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id)}},mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:!1,httpsBasicAuthSite:!1,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",flashScriptAccess:"sameDomain",enablePluginSmoothing:!1,enablePseudoStreaming:!1,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:.8,success:function(){},error:function(){}},mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)},mejs.HtmlMediaElementShim={create:function(a,b){var c,d,e={},f="string"==typeof a?document.getElementById(a):a,g=f.tagName.toLowerCase(),h="audio"===g||"video"===g,i=h?f.getAttribute("src"):f.getAttribute("href"),j=f.getAttribute("poster"),k=f.getAttribute("autoplay"),l=f.getAttribute("preload"),m=f.getAttribute("controls");for(d in mejs.MediaElementDefaults)e[d]=mejs.MediaElementDefaults[d];for(d in b)e[d]=b[d];return i="undefined"==typeof i||null===i||""==i?null:i,j="undefined"==typeof j||null===j?"":j,l="undefined"==typeof l||null===l||"false"===l?"none":l,k=!("undefined"==typeof k||null===k||"false"===k),m=!("undefined"==typeof m||null===m||"false"===m),c=this.determinePlayback(f,e,mejs.MediaFeatures.supportsMediaTag,h,i),c.url=null!==c.url?mejs.Utility.absolutizeUrl(c.url):"",c.scheme=mejs.Utility.determineScheme(c.url),"native"==c.method?(mejs.MediaFeatures.isBustedAndroid&&(f.src=c.url,f.addEventListener("click",function(){f.play()},!1)),this.updateNative(c,e,k,l)):""!==c.method?this.createPlugin(c,e,j,k,l,m):(this.createErrorMessage(c,e,j),this)},determinePlayback:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=[],r={method:"",url:"",htmlMediaElement:a,isVideo:"audio"!=a.tagName.toLowerCase(),scheme:""};if("undefined"!=typeof b.type&&""!==b.type)if("string"==typeof b.type)q.push({type:b.type,url:e});else for(f=0;f<b.type.length;f++)q.push({type:b.type[f],url:e});else if(null!==e)k=this.formatType(e,a.getAttribute("type")),q.push({type:k,url:e});else for(f=0;f<a.childNodes.length;f++)j=a.childNodes[f],1==j.nodeType&&"source"==j.tagName.toLowerCase()&&(e=j.getAttribute("src"),k=this.formatType(e,j.getAttribute("type")),p=j.getAttribute("media"),(!p||!window.matchMedia||window.matchMedia&&window.matchMedia(p).matches)&&q.push({type:k,url:e}));if(!d&&q.length>0&&null!==q[0].url&&this.getTypeFromFile(q[0].url).indexOf("audio")>-1&&(r.isVideo=!1),mejs.MediaFeatures.isBustedAndroid&&(a.canPlayType=function(a){return null!==a.match(/video\/(mp4|m4v)/gi)?"maybe":""}),mejs.MediaFeatures.isChromium&&(a.canPlayType=function(a){return null!==a.match(/video\/(webm|ogv|ogg)/gi)?"maybe":""}),c&&("auto"===b.mode||"auto_plugin"===b.mode||"native"===b.mode)&&(!mejs.MediaFeatures.isBustedNativeHTTPS||b.httpsBasicAuthSite!==!0)){for(d||(o=document.createElement(r.isVideo?"video":"audio"),a.parentNode.insertBefore(o,a),a.style.display="none",r.htmlMediaElement=a=o),f=0;f<q.length;f++)if("video/m3u8"==q[f].type||""!==a.canPlayType(q[f].type).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/mp3/,"mpeg")).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/m4a/,"mp4")).replace(/no/,"")){r.method="native",r.url=q[f].url;break}if("native"===r.method&&(null!==r.url&&(a.src=r.url),"auto_plugin"!==b.mode))return r}if("auto"===b.mode||"auto_plugin"===b.mode||"shim"===b.mode)for(f=0;f<q.length;f++)for(k=q[f].type,g=0;g<b.plugins.length;g++)for(l=b.plugins[g],m=mejs.plugins[l],h=0;h<m.length;h++)if(n=m[h],null==n.version||mejs.PluginDetector.hasPluginVersion(l,n.version))for(i=0;i<n.types.length;i++)if(k.toLowerCase()==n.types[i].toLowerCase())return r.method=l,r.url=q[f].url,r;return"auto_plugin"===b.mode&&"native"===r.method?r:(""===r.method&&q.length>0&&(r.url=q[0].url),r)},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.split("?")[0];var b=a.substring(a.lastIndexOf(".")+1).toLowerCase(),c=/(mp4|m4v|ogg|ogv|m3u8|webm|webmv|flv|wmv|mpeg|mov)/gi.test(b)?"video/":"audio/";return this.getTypeFromExtension(b,c)},getTypeFromExtension:function(a,b){switch(b=b||"",a){case"mp4":case"m4v":case"m4a":case"f4v":case"f4a":return b+"mp4";case"flv":return b+"x-flv";case"webm":case"webma":case"webmv":return b+"webm";case"ogg":case"oga":case"ogv":return b+"ogg";case"m3u8":return"application/x-mpegurl";case"ts":return b+"mp2t";default:return b+a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div"),f=b.customError;e.className="me-cannotplay";try{e.style.width=d.width+"px",e.style.height=d.height+"px"}catch(g){}f||(f='<a href="'+a.url+'">',""!==c&&(f+='<img src="'+c+'" width="100%" height="100%" alt="" />'),f+="<span>"+mejs.i18n.t("Download File")+"</span></a>"),e.innerHTML=f,d.parentNode.insertBefore(e,d),d.style.display="none",b.error(d)},createPlugin:function(a,b,c,d,e,f){var g,h,i,j=a.htmlMediaElement,k=1,l=1,m="me_"+a.method+"_"+mejs.meIndex++,n=new mejs.PluginMediaElement(m,a.method,a.url),o=document.createElement("div");n.tagName=j.tagName;for(var p=0;p<j.attributes.length;p++){var q=j.attributes[p];q.specified&&n.setAttribute(q.name,q.value)}for(h=j.parentNode;null!==h&&null!=h.tagName&&"body"!==h.tagName.toLowerCase()&&null!=h.parentNode&&null!=h.parentNode.tagName&&null!=h.parentNode.constructor&&"ShadowRoot"===h.parentNode.constructor.name;){if("p"===h.parentNode.tagName.toLowerCase()){h.parentNode.parentNode.insertBefore(h,h.parentNode);break}h=h.parentNode}switch(a.isVideo?(k=b.pluginWidth>0?b.pluginWidth:b.videoWidth>0?b.videoWidth:null!==j.getAttribute("width")?j.getAttribute("width"):b.defaultVideoWidth,l=b.pluginHeight>0?b.pluginHeight:b.videoHeight>0?b.videoHeight:null!==j.getAttribute("height")?j.getAttribute("height"):b.defaultVideoHeight,k=mejs.Utility.encodeUrl(k),l=mejs.Utility.encodeUrl(l)):b.enablePluginDebug&&(k=320,l=240),n.success=b.success,o.className="me-plugin",o.id=m+"_container",a.isVideo?j.parentNode.insertBefore(o,j):document.body.insertBefore(o,document.body.childNodes[0]),("flash"===a.method||"silverlight"===a.method)&&(i=["id="+m,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+k,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+l,"pseudostreamstart="+b.pseudoStreamingStartQueryParam],null!==a.url&&("flash"==a.method?i.push("file="+mejs.Utility.encodeUrl(a.url)):i.push("file="+a.url)),b.enablePluginDebug&&i.push("debug=true"),b.enablePluginSmoothing&&i.push("smoothing=true"),b.enablePseudoStreaming&&i.push("pseudostreaming=true"),f&&i.push("controls=true"),b.pluginVars&&(i=i.concat(b.pluginVars)),window[m+"_init"]=function(){switch(n.pluginType){case"flash":n.pluginElement=n.pluginApi=document.getElementById(m);break;case"silverlight":n.pluginElement=document.getElementById(n.id),n.pluginApi=n.pluginElement.Content.MediaElementJS}null!=n.pluginApi&&n.success&&n.success(n,j)},window[m+"_event"]=function(a,b){var c,d,e;c={type:a,target:n};for(d in b)n[d]=b[d],c[d]=b[d];e=b.bufferedTime||0,c.target.buffered=c.buffered={start:function(a){return 0},end:function(a){return e},length:1},n.dispatchEvent(c)}),a.method){case"silverlight":o.innerHTML='<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+m+'" name="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="initParams" value="'+i.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case"flash":mejs.MediaFeatures.isIE?(g=document.createElement("div"),o.appendChild(g),g.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?"+(new Date).getTime()+'" /><param name="flashvars" value="'+i.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+b.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /><param name="scale" value="default" /></object>'):o.innerHTML='<embed id="'+m+'" name="'+m+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="'+b.flashScriptAccess+'" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+b.pluginPath+b.flashName+'" flashvars="'+i.join("&")+'" width="'+k+'" height="'+l+'" scale="default"class="mejs-shim"></embed>';break;case"youtube":var r;if(-1!=a.url.lastIndexOf("youtu.be"))r=a.url.substr(a.url.lastIndexOf("/")+1),-1!=r.indexOf("?")&&(r=r.substr(0,r.indexOf("?")));else{var s=a.url.match(/[?&]v=([^&#]+)|&|#|$/);s&&(r=s[1])}youtubeSettings={container:o,containerId:o.id,pluginMediaElement:n,pluginId:m,videoId:r,height:l,width:k,scheme:a.scheme},window.postMessage?mejs.YouTubeApi.enqueueIframe(youtubeSettings):mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])&&mejs.YouTubeApi.createFlash(youtubeSettings,b);break;case"vimeo":var t=m+"_player";if(n.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1),o.innerHTML='<iframe src="'+a.scheme+"player.vimeo.com/video/"+n.vimeoid+"?api=1&portrait=0&byline=0&title=0&player_id="+t+'" width="'+k+'" height="'+l+'" frameborder="0" class="mejs-shim" id="'+t+'" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>',"function"==typeof $f){var u=$f(o.childNodes[0]),v=-1;u.addEvent("ready",function(){function a(a,b,c,d){var e={type:c,target:b};"timeupdate"==c&&(b.currentTime=e.currentTime=d.seconds,b.duration=e.duration=d.duration),b.dispatchEvent(e)}u.playVideo=function(){u.api("play")},u.stopVideo=function(){u.api("unload")},u.pauseVideo=function(){u.api("pause")},u.seekTo=function(a){u.api("seekTo",a)},u.setVolume=function(a){u.api("setVolume",a)},u.setMuted=function(a){a?(u.lastVolume=u.api("getVolume"),u.api("setVolume",0)):(u.api("setVolume",u.lastVolume),delete u.lastVolume)},u.getPlayerState=function(){return v},u.addEvent("play",function(){v=1,a(u,n,"play"),a(u,n,"playing")}),u.addEvent("pause",function(){v=2,a(u,n,"pause")}),u.addEvent("finish",function(){v=0,a(u,n,"ended")}),u.addEvent("playProgress",function(b){a(u,n,"timeupdate",b)}),u.addEvent("seek",function(b){v=3,a(u,n,"seeked",b)}),u.addEvent("loadProgress",function(b){v=3,a(u,n,"progress",b)}),n.pluginElement=o,n.pluginApi=u,n.success(n,n.pluginElement)})}else console.warn("You need to include froogaloop for vimeo to work")}return j.style.display="none",j.removeAttribute("autoplay"),n},updateNative:function(a,b,c,d){var e,f=a.htmlMediaElement;for(e in mejs.HtmlMediaElement)f[e]=mejs.HtmlMediaElement[e];return b.success(f,f),f}},mejs.YouTubeApi={isIframeStarted:!1,isIframeLoaded:!1,loadIframeApi:function(a){if(!this.isIframeStarted){var b=document.createElement("script");b.src=a.scheme+"www.youtube.com/player_api";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c),this.isIframeStarted=!0}},iframeQueue:[],enqueueIframe:function(a){this.isLoaded?this.createIframe(a):(this.loadIframeApi(a),this.iframeQueue.push(a))},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId,{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0,wmode:"transparent"},events:{onReady:function(){c.setVideoSize=function(a,b){c.setSize(a,b)},a.pluginMediaElement.pluginApi=c,a.pluginMediaElement.pluginElement=document.getElementById(a.containerId),b.success(b,b.pluginElement),setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(a){mejs.YouTubeApi.handleStateChange(a.data,c,b)}}})},createEvent:function(a,b,c){var d={type:c,target:b};if(a&&a.getDuration){b.currentTime=d.currentTime=a.getCurrentTime(),b.duration=d.duration=a.getDuration(),d.paused=b.paused,d.ended=b.ended,d.muted=a.isMuted(),d.volume=a.getVolume()/100,d.bytesTotal=a.getVideoBytesTotal(),d.bufferedBytes=a.getVideoBytesLoaded();var e=d.bufferedBytes/d.bytesTotal*d.duration;d.target.buffered=d.buffered={start:function(a){return 0},end:function(a){return e},length:1}}b.dispatchEvent(d)},iFrameReady:function(){for(this.isLoaded=!0,this.isIframeLoaded=!0;this.iframeQueue.length>0;){var a=this.iframeQueue.pop();this.createIframe(a)}},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=a;var b,c=a.scheme+"www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid="+a.pluginId+"&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0";mejs.MediaFeatures.isIE?(b=document.createElement("div"),a.container.appendChild(b),b.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+a.scheme+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'" class="mejs-shim"><param name="movie" value="'+c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+options.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /></object>'):a.container.innerHTML='<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="'+options.flashScriptAccess+'"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPlayers[a],c=document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c,b.success(d,d.pluginElement),c.cueVideoById(b.videoId);var e=b.containerId+"_callback";window[e]=function(a){mejs.YouTubeApi.handleStateChange(a,c,d)},c.addEventListener("onStateChange",e),setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250),mejs.YouTubeApi.createEvent(c,d,"canplay")},handleStateChange:function(a,b,c){switch(a){case-1:c.paused=!0,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=!1,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=!1,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"play"),mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=!0,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress");break;case 5:}}},window.onYouTubePlayerAPIReady=function(){mejs.YouTubeApi.iFrameReady()},window.onYouTubePlayerReady=function(a){mejs.YouTubeApi.flashReady(a)},window.mejs=mejs,window.MediaElement=mejs.MediaElement,function(a,b,c){"use strict";var d={locale:{language:b.i18n&&b.i18n.locale.language||"",strings:b.i18n&&b.i18n.locale.strings||{}},ietf_lang_regex:/^(x\-)?[a-z]{2,}(\-\w{2,})?(\-\w{2,})?$/,methods:{}};d.getLanguage=function(){var a=d.locale.language||window.navigator.userLanguage||window.navigator.language;return d.ietf_lang_regex.exec(a)?a:null},"undefined"!=typeof mejsL10n&&(d.locale.language=mejsL10n.language),d.methods.checkPlain=function(a){var b,c,d={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"};a=String(a);for(b in d)d.hasOwnProperty(b)&&(c=new RegExp(b,"g"),a=a.replace(c,d[b]));return a},d.methods.t=function(a,b){return d.locale.strings&&d.locale.strings[b.context]&&d.locale.strings[b.context][a]&&(a=d.locale.strings[b.context][a]),d.methods.checkPlain(a)},d.t=function(a,b){if("string"==typeof a&&a.length>0){var c=d.getLanguage();return b=b||{context:c},d.methods.t(a,b)}throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."}},b.i18n=d}(document,mejs),function(a,b){"use strict";"undefined"!=typeof mejsL10n&&(a[mejsL10n.language]=mejsL10n.strings)}(mejs.i18n.locale.strings),/*!
  *
  * MediaElementPlayer
  * http://mediaelementjs.com/
@@ -24,5 +24,5 @@ var mejs=mejs||{};mejs.version="2.18.1",mejs.meIndex=0,mejs.plugins={silverlight
  * License: MIT
  *
  */
-"undefined"!=typeof jQuery?mejs.$=jQuery:"undefined"!=typeof Zepto?(mejs.$=Zepto,Zepto.fn.outerWidth=function(a){var b=$(this).width();return a&&(b+=parseInt($(this).css("margin-right"),10),b+=parseInt($(this).css("margin-left"),10)),b}):"undefined"!=typeof ender&&(mejs.$=ender),function(a){mejs.MepDefaults={poster:"",showPosterWhenEnded:!1,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return.05*a.duration},defaultSeekForwardInterval:function(a){return.05*a.duration},setDimensions:!0,audioWidth:-1,audioHeight:-1,startVolume:.8,loop:!1,autoRewind:!0,enableAutosize:!0,timeFormat:"",alwaysShowHours:!1,showTimecodeFrameCount:!1,framesPerSecond:25,autosizeProgress:!0,alwaysShowControls:!1,hideVideoControlsOnLoad:!1,clickToPlayPause:!0,iPadUseNativeControls:!1,iPhoneUseNativeControls:!1,AndroidUseNativeControls:!1,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:!0,enableKeyboard:!0,pauseOtherPlayers:!0,keyActions:[{keys:[32,179],action:function(a,b){b.paused||b.ended?b.play():b.pause()}},{keys:[38],action:function(a,b){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.min(b.volume+.1,1);b.setVolume(c)}},{keys:[40],action:function(a,b){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.max(b.volume-.1,0);b.setVolume(c)}},{keys:[37,227],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function(a){"undefined"!=typeof a.enterFullScreen&&(a.isFullScreen?a.exitFullScreen():a.enterFullScreen())}},{keys:[77],action:function(a){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer()),a.setMuted(a.media.muted?!1:!0)}}]},mejs.mepIndex=0,mejs.players={},mejs.MediaElementPlayer=function(b,c){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(b,c);var d=this;return d.$media=d.$node=a(b),d.node=d.media=d.$media[0],d.node?"undefined"!=typeof d.node.player?d.node.player:("undefined"==typeof c&&(c=d.$node.data("mejsoptions")),d.options=a.extend({},mejs.MepDefaults,c),d.options.timeFormat||(d.options.timeFormat="mm:ss",d.options.alwaysShowHours&&(d.options.timeFormat="hh:mm:ss"),d.options.showTimecodeFrameCount&&(d.options.timeFormat+=":ff")),mejs.Utility.calculateTimeFormat(0,d.options,d.options.framesPerSecond||25),d.id="mep_"+mejs.mepIndex++,mejs.players[d.id]=d,d.init(),d):void 0},mejs.MediaElementPlayer.prototype={hasFocus:!1,controlsAreVisible:!0,init:function(){var b=this,c=mejs.MediaFeatures,d=a.extend(!0,{},b.options,{success:function(a,c){b.meReady(a,c)},error:function(a){b.handleError(a)}}),e=b.media.tagName.toLowerCase();if(b.isDynamic="audio"!==e&&"video"!==e,b.isVideo=b.isDynamic?b.options.isVideo:"audio"!==e&&b.options.isVideo,c.isiPad&&b.options.iPadUseNativeControls||c.isiPhone&&b.options.iPhoneUseNativeControls)b.$media.attr("controls","controls"),c.isiPad&&null!==b.media.getAttribute("autoplay")&&b.play();else if(c.isAndroid&&b.options.AndroidUseNativeControls);else{b.$media.removeAttr("controls");var f=mejs.i18n.t(b.isVideo?"Video Player":"Audio Player");if(a('<span class="mejs-offscreen">'+f+"</span>").insertBefore(b.$media),b.container=a('<div id="'+b.id+'" class="mejs-container '+(mejs.MediaFeatures.svg?"svg":"no-svg")+'" tabindex="0" role="application" aria-label="'+f+'"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(b.$media[0].className).insertBefore(b.$media).focus(function(){if(!b.controlsAreVisible){b.showControls(!0);var a=b.container.find(".mejs-playpause-button > button");a.focus()}}),b.container.addClass((c.isAndroid?"mejs-android ":"")+(c.isiOS?"mejs-ios ":"")+(c.isiPad?"mejs-ipad ":"")+(c.isiPhone?"mejs-iphone ":"")+(b.isVideo?"mejs-video ":"mejs-audio ")),c.isiOS){var g=b.$media.clone();b.container.find(".mejs-mediaelement").append(g),b.$media.remove(),b.$node=b.$media=g,b.node=b.media=g[0]}else b.container.find(".mejs-mediaelement").append(b.$media);b.node.player=b,b.controls=b.container.find(".mejs-controls"),b.layers=b.container.find(".mejs-layers");var h=b.isVideo?"video":"audio",i=h.substring(0,1).toUpperCase()+h.substring(1);b.width=b.options[h+"Width"]>0||b.options[h+"Width"].toString().indexOf("%")>-1?b.options[h+"Width"]:""!==b.media.style.width&&null!==b.media.style.width?b.media.style.width:null!==b.media.getAttribute("width")?b.$media.attr("width"):b.options["default"+i+"Width"],b.height=b.options[h+"Height"]>0||b.options[h+"Height"].toString().indexOf("%")>-1?b.options[h+"Height"]:""!==b.media.style.height&&null!==b.media.style.height?b.media.style.height:null!==b.$media[0].getAttribute("height")?b.$media.attr("height"):b.options["default"+i+"Height"],b.setPlayerSize(b.width,b.height),d.pluginWidth=b.width,d.pluginHeight=b.height}mejs.MediaElement(b.$media[0],d),"undefined"!=typeof b.container&&b.controlsAreVisible&&b.container.trigger("controlsshown")},showControls:function(a){var b=this;a="undefined"==typeof a||a,b.controlsAreVisible||(a?(b.controls.css("visibility","visible").stop(!0,!0).fadeIn(200,function(){b.controlsAreVisible=!0,b.container.trigger("controlsshown")}),b.container.find(".mejs-control").css("visibility","visible").stop(!0,!0).fadeIn(200,function(){b.controlsAreVisible=!0})):(b.controls.css("visibility","visible").css("display","block"),b.container.find(".mejs-control").css("visibility","visible").css("display","block"),b.controlsAreVisible=!0,b.container.trigger("controlsshown")),b.setControlsSize())},hideControls:function(b){var c=this;b="undefined"==typeof b||b,!c.controlsAreVisible||c.options.alwaysShowControls||c.keyboardAction||(b?(c.controls.stop(!0,!0).fadeOut(200,function(){a(this).css("visibility","hidden").css("display","block"),c.controlsAreVisible=!1,c.container.trigger("controlshidden")}),c.container.find(".mejs-control").stop(!0,!0).fadeOut(200,function(){a(this).css("visibility","hidden").css("display","block")})):(c.controls.css("visibility","hidden").css("display","block"),c.container.find(".mejs-control").css("visibility","hidden").css("display","block"),c.controlsAreVisible=!1,c.container.trigger("controlshidden")))},controlsTimer:null,startControlsTimer:function(a){var b=this;a="undefined"!=typeof a?a:1500,b.killControlsTimer("start"),b.controlsTimer=setTimeout(function(){b.hideControls(),b.killControlsTimer("hide")},a)},killControlsTimer:function(){var a=this;null!==a.controlsTimer&&(clearTimeout(a.controlsTimer),delete a.controlsTimer,a.controlsTimer=null)},controlsEnabled:!0,disableControls:function(){var a=this;a.killControlsTimer(),a.hideControls(!1),this.controlsEnabled=!1},enableControls:function(){var a=this;a.showControls(!1),a.controlsEnabled=!0},meReady:function(b,c){var d,e,f=this,g=mejs.MediaFeatures,h=c.getAttribute("autoplay"),i=!("undefined"==typeof h||null===h||"false"===h);if(!f.created){if(f.created=!0,f.media=b,f.domNode=c,!(g.isAndroid&&f.options.AndroidUseNativeControls||g.isiPad&&f.options.iPadUseNativeControls||g.isiPhone&&f.options.iPhoneUseNativeControls)){f.buildposter(f,f.controls,f.layers,f.media),f.buildkeyboard(f,f.controls,f.layers,f.media),f.buildoverlays(f,f.controls,f.layers,f.media),f.findTracks();for(d in f.options.features)if(e=f.options.features[d],f["build"+e])try{f["build"+e](f,f.controls,f.layers,f.media)}catch(j){}f.container.trigger("controlsready"),f.setPlayerSize(f.width,f.height),f.setControlsSize(),f.isVideo&&(mejs.MediaFeatures.hasTouch?f.$media.bind("touchstart",function(){f.controlsAreVisible?f.hideControls(!1):f.controlsEnabled&&f.showControls(!1)}):(f.clickToPlayPauseCallback=function(){f.options.clickToPlayPause&&(f.media.paused?f.play():f.pause())},f.media.addEventListener("click",f.clickToPlayPauseCallback,!1),f.container.bind("mouseenter",function(){f.controlsEnabled&&(f.options.alwaysShowControls||(f.killControlsTimer("enter"),f.showControls(),f.startControlsTimer(2500)))}).bind("mousemove",function(){f.controlsEnabled&&(f.controlsAreVisible||f.showControls(),f.options.alwaysShowControls||f.startControlsTimer(2500))}).bind("mouseleave",function(){f.controlsEnabled&&(f.media.paused||f.options.alwaysShowControls||f.startControlsTimer(1e3))})),f.options.hideVideoControlsOnLoad&&f.hideControls(!1),i&&!f.options.alwaysShowControls&&f.hideControls(),f.options.enableAutosize&&f.media.addEventListener("loadedmetadata",function(a){f.options.videoHeight<=0&&null===f.domNode.getAttribute("height")&&!isNaN(a.target.videoHeight)&&(f.setPlayerSize(a.target.videoWidth,a.target.videoHeight),f.setControlsSize(),f.media.setVideoSize(a.target.videoWidth,a.target.videoHeight))},!1)),b.addEventListener("play",function(){var a;for(a in mejs.players){var b=mejs.players[a];b.id==f.id||!f.options.pauseOtherPlayers||b.paused||b.ended||b.pause(),b.hasFocus=!1}f.hasFocus=!0},!1),f.media.addEventListener("ended",function(){if(f.options.autoRewind)try{f.media.setCurrentTime(0),window.setTimeout(function(){a(f.container).find(".mejs-overlay-loading").parent().hide()},20)}catch(b){}f.media.pause(),f.setProgressRail&&f.setProgressRail(),f.setCurrentRail&&f.setCurrentRail(),f.options.loop?f.play():!f.options.alwaysShowControls&&f.controlsEnabled&&f.showControls()},!1),f.media.addEventListener("loadedmetadata",function(){f.updateDuration&&f.updateDuration(),f.updateCurrent&&f.updateCurrent(),f.isFullScreen||(f.setPlayerSize(f.width,f.height),f.setControlsSize())},!1);var k=null;f.media.addEventListener("timeupdate",function(){k!==this.duration&&(k=this.duration,mejs.Utility.calculateTimeFormat(k,f.options,f.options.framesPerSecond||25))},!1),f.container.focusout(function(b){if(b.relatedTarget){var c=a(b.relatedTarget);f.keyboardAction&&0===c.parents(".mejs-container").length&&(f.keyboardAction=!1,f.hideControls(!0))}}),setTimeout(function(){f.setPlayerSize(f.width,f.height),f.setControlsSize()},50),f.globalBind("resize",function(){f.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||f.setPlayerSize(f.width,f.height),f.setControlsSize()}),"youtube"==f.media.pluginType&&(g.isiOS||g.isAndroid)&&f.container.find(".mejs-overlay-play").hide()}i&&"native"==b.pluginType&&f.play(),f.options.success&&("string"==typeof f.options.success?window[f.options.success](f.media,f.domNode,f):f.options.success(f.media,f.domNode,f))}},handleError:function(a){var b=this;b.controls.hide(),b.options.error&&b.options.error(a)},setPlayerSize:function(b,c){var d=this;if(!d.options.setDimensions)return!1;if("undefined"!=typeof b&&(d.width=b),"undefined"!=typeof c&&(d.height=c),d.height.toString().indexOf("%")>0||"none"!==d.$node.css("max-width")&&"t.width"!==d.$node.css("max-width")||d.$node[0].currentStyle&&"100%"===d.$node[0].currentStyle.maxWidth){var e=function(){return d.isVideo?d.media.videoWidth&&d.media.videoWidth>0?d.media.videoWidth:null!==d.media.getAttribute("width")?d.media.getAttribute("width"):d.options.defaultVideoWidth:d.options.defaultAudioWidth}(),f=function(){return d.isVideo?d.media.videoHeight&&d.media.videoHeight>0?d.media.videoHeight:null!==d.media.getAttribute("height")?d.media.getAttribute("height"):d.options.defaultVideoHeight:d.options.defaultAudioHeight}(),g=d.container.parent().closest(":visible").width(),h=d.container.parent().closest(":visible").height(),i=d.isVideo||!d.options.autosizeProgress?parseInt(g*f/e,10):f;isNaN(i)&&(i=h),d.container.parent().length>0&&"body"===d.container.parent()[0].tagName.toLowerCase()&&(g=a(window).width(),i=a(window).height()),i&&g&&(d.container.width(g).height(i),d.$media.add(d.container.find(".mejs-shim")).width("100%").height("100%"),d.isVideo&&d.media.setVideoSize&&d.media.setVideoSize(g,i),d.layers.children(".mejs-layer").width("100%").height("100%"))}else d.container.width(d.width).height(d.height),d.layers.children(".mejs-layer").width(d.width).height(d.height)},setControlsSize:function(){var b=this,c=0,d=0,e=b.controls.find(".mejs-time-rail"),f=b.controls.find(".mejs-time-total"),g=e.siblings(),h=g.last(),i=null;if(b.container.is(":visible")&&e.length&&e.is(":visible")){b.options&&!b.options.autosizeProgress&&(d=parseInt(e.css("width"),10)),0!==d&&d||(g.each(function(){var b=a(this);"absolute"!=b.css("position")&&b.is(":visible")&&(c+=a(this).outerWidth(!0))}),d=b.controls.width()-c-(e.outerWidth(!0)-e.width()));do e.width(d),f.width(d-(f.outerWidth(!0)-f.width())),"absolute"!=h.css("position")&&(i=h.length?h.position():null,d--);while(null!==i&&i.top>0&&d>0);b.container.trigger("controlsresize")}},buildposter:function(b,c,d,e){var f=this,g=a('<div class="mejs-poster mejs-layer"></div>').appendTo(d),h=b.$media.attr("poster");""!==b.options.poster&&(h=b.options.poster),h?f.setPoster(h):g.hide(),e.addEventListener("play",function(){g.hide()},!1),b.options.showPosterWhenEnded&&b.options.autoRewind&&e.addEventListener("ended",function(){g.show()},!1)},setPoster:function(b){var c=this,d=c.container.find(".mejs-poster"),e=d.find("img");0===e.length&&(e=a('<img width="100%" height="100%" alt="" />').appendTo(d)),e.attr("src",b),d.css({"background-image":"url("+b+")"})},buildoverlays:function(b,c,d,e){var f=this;if(b.isVideo){var g=a('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(d),h=a('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(d),i=a('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(d).bind("click",function(){f.options.clickToPlayPause&&e.paused&&e.play()});e.addEventListener("play",function(){i.hide(),g.hide(),c.find(".mejs-time-buffering").hide(),h.hide()},!1),e.addEventListener("playing",function(){i.hide(),g.hide(),c.find(".mejs-time-buffering").hide(),h.hide()},!1),e.addEventListener("seeking",function(){g.show(),c.find(".mejs-time-buffering").show()},!1),e.addEventListener("seeked",function(){g.hide(),c.find(".mejs-time-buffering").hide()},!1),e.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||i.show()},!1),e.addEventListener("waiting",function(){g.show(),c.find(".mejs-time-buffering").show()},!1),e.addEventListener("loadeddata",function(){g.show(),c.find(".mejs-time-buffering").show(),mejs.MediaFeatures.isAndroid&&(e.canplayTimeout=window.setTimeout(function(){if(document.createEvent){var a=document.createEvent("HTMLEvents");return a.initEvent("canplay",!0,!0),e.dispatchEvent(a)}},300))},!1),e.addEventListener("canplay",function(){g.hide(),c.find(".mejs-time-buffering").hide(),clearTimeout(e.canplayTimeout)},!1),e.addEventListener("error",function(a){f.handleError(a),g.hide(),i.hide(),h.show(),h.find(".mejs-overlay-error").html("Error loading this resource")},!1),e.addEventListener("keydown",function(a){f.onkeydown(b,e,a)},!1)}},buildkeyboard:function(b,c,d,e){var f=this;f.container.keydown(function(){f.keyboardAction=!0}),f.globalBind("keydown",function(c){return b.hasFocus=0!==a(c.target).closest(".mejs-container").length,f.onkeydown(b,e,c)}),f.globalBind("click",function(c){b.hasFocus=0!==a(c.target).closest(".mejs-container").length})},onkeydown:function(a,b,c){if(a.hasFocus&&a.options.enableKeyboard)for(var d=0,e=a.options.keyActions.length;e>d;d++)for(var f=a.options.keyActions[d],g=0,h=f.keys.length;h>g;g++)if(c.keyCode==f.keys[g])return"function"==typeof c.preventDefault&&c.preventDefault(),f.action(a,b,c.keyCode),!1;return!0},findTracks:function(){var b=this,c=b.$media.find("track");b.tracks=[],c.each(function(c,d){d=a(d),b.tracks.push({srclang:d.attr("srclang")?d.attr("srclang").toLowerCase():"",src:d.attr("src"),kind:d.attr("kind"),label:d.attr("label")||"",entries:[],isLoaded:!1})})},changeSkin:function(a){this.container[0].className="mejs-container "+a,this.setPlayerSize(this.width,this.height),this.setControlsSize()},play:function(){this.load(),this.media.play()},pause:function(){try{this.media.pause()}catch(a){}},load:function(){this.isLoaded||this.media.load(),this.isLoaded=!0},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)},remove:function(){var a,b,c=this;c.container.prev(".mejs-offscreen").remove();for(a in c.options.features)if(b=c.options.features[a],c["clean"+b])try{c["clean"+b](c)}catch(d){}c.isDynamic?c.$node.insertBefore(c.container):(c.$media.prop("controls",!0),c.$node.clone().insertBefore(c.container).show(),c.$node.remove()),"native"!==c.media.pluginType&&c.media.remove(),delete mejs.players[c.id],"object"==typeof c.container&&c.container.remove(),c.globalUnbind(),delete c.node.player},rebuildtracks:function(){var a=this;a.findTracks(),a.buildtracks(a,a.controls,a.layers,a.media)},resetSize:function(){var a=this;setTimeout(function(){a.setPlayerSize(a.width,a.height),a.setControlsSize()},50)}},function(){function b(b,d){var e={d:[],w:[]};return a.each((b||"").split(" "),function(a,b){var f=b+"."+d;0===f.indexOf(".")?(e.d.push(f),e.w.push(f)):e[c.test(b)?"w":"d"].push(f)}),e.d=e.d.join(" "),e.w=e.w.join(" "),e}var c=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(c,d,e){var f=this;c=b(c,f.id),c.d&&a(document).bind(c.d,d,e),c.w&&a(window).bind(c.w,d,e)},mejs.MediaElementPlayer.prototype.globalUnbind=function(c,d){var e=this;c=b(c,e.id),c.d&&a(document).unbind(c.d,d),c.w&&a(window).unbind(c.w,d)}}(),"undefined"!=typeof a&&(a.fn.mediaelementplayer=function(b){return this.each(b===!1?function(){var b=a(this).data("mediaelementplayer");b&&b.remove(),a(this).removeData("mediaelementplayer")}:function(){a(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,b))}),this},a(document).ready(function(){a(".mejs-player").mediaelementplayer()})),window.MediaElementPlayer=mejs.MediaElementPlayer}(mejs.$),function(a){a.extend(mejs.MepDefaults,{playText:mejs.i18n.t("Play"),pauseText:mejs.i18n.t("Pause")}),a.extend(MediaElementPlayer.prototype,{buildplaypause:function(b,c,d,e){function f(a){"play"===a?(i.removeClass("mejs-play").addClass("mejs-pause"),j.attr({title:h.pauseText,"aria-label":h.pauseText})):(i.removeClass("mejs-pause").addClass("mejs-play"),j.attr({title:h.playText,"aria-label":h.playText}))}var g=this,h=g.options,i=a('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+g.id+'" title="'+h.playText+'" aria-label="'+h.playText+'"></button></div>').appendTo(c).click(function(a){return a.preventDefault(),e.paused?e.play():e.pause(),!1}),j=i.find("button");f("pse"),e.addEventListener("play",function(){f("play")},!1),e.addEventListener("playing",function(){f("play")},!1),e.addEventListener("pause",function(){f("pse")},!1),e.addEventListener("paused",function(){f("pse")},!1)}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{stopText:"Stop"}),a.extend(MediaElementPlayer.prototype,{buildstop:function(b,c,d,e){var f=this;a('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+f.id+'" title="'+f.options.stopText+'" aria-label="'+f.options.stopText+'"></button></div>').appendTo(c).click(function(){e.paused||e.pause(),e.currentTime>0&&(e.setCurrentTime(0),e.pause(),c.find(".mejs-time-current").width("0px"),c.find(".mejs-time-handle").css("left","0px"),c.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0,b.options)),c.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0,b.options)),d.find(".mejs-poster").show())})}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{progessHelpText:mejs.i18n.t("Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.")}),a.extend(MediaElementPlayer.prototype,{buildprogress:function(b,c,d,e){a('<div class="mejs-time-rail"><span  class="mejs-time-total mejs-time-slider"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(c),c.find(".mejs-time-buffering").hide();var f=this,g=c.find(".mejs-time-total"),h=c.find(".mejs-time-loaded"),i=c.find(".mejs-time-current"),j=c.find(".mejs-time-handle"),k=c.find(".mejs-time-float"),l=c.find(".mejs-time-float-current"),m=c.find(".mejs-time-slider"),n=function(a){var c,d=g.offset(),f=g.width(),h=0,i=0,j=0;c=a.originalEvent&&a.originalEvent.changedTouches?a.originalEvent.changedTouches[0].pageX:a.changedTouches?a.changedTouches[0].pageX:a.pageX,e.duration&&(c<d.left?c=d.left:c>f+d.left&&(c=f+d.left),j=c-d.left,h=j/f,i=.02>=h?0:h*e.duration,o&&i!==e.currentTime&&e.setCurrentTime(i),mejs.MediaFeatures.hasTouch||(k.css("left",j),l.html(mejs.Utility.secondsToTimeCode(i,b.options)),k.show()))},o=!1,p=!1,q=0,r=!1,s=b.options.autoRewind,t=function(){var a=e.currentTime,c=mejs.i18n.t("Time Slider"),d=mejs.Utility.secondsToTimeCode(a,b.options),f=e.duration;m.attr({"aria-label":c,"aria-valuemin":0,"aria-valuemax":f,"aria-valuenow":a,"aria-valuetext":d,role:"slider",tabindex:0})},u=function(){var a=new Date;a-q>=1e3&&e.play()};m.bind("focus",function(){b.options.autoRewind=!1}),m.bind("blur",function(){b.options.autoRewind=s}),m.bind("keydown",function(a){new Date-q>=1e3&&(r=e.paused);var b=a.keyCode,c=e.duration,d=e.currentTime;switch(b){case 37:d-=1;break;case 39:d+=1;break;case 38:d+=Math.floor(.1*c);break;case 40:d-=Math.floor(.1*c);break;case 36:d=0;break;case 35:d=c;break;case 10:return void(e.paused?e.play():e.pause());case 13:return void(e.paused?e.play():e.pause());default:return}return d=0>d?0:d>=c?c:Math.floor(d),q=new Date,r||e.pause(),d<e.duration&&!r&&setTimeout(u,1100),e.setCurrentTime(d),a.preventDefault(),a.stopPropagation(),!1}),g.bind("mousedown touchstart",function(a){(1===a.which||0===a.which)&&(o=!0,n(a),f.globalBind("mousemove.dur touchmove.dur",function(a){n(a)}),f.globalBind("mouseup.dur touchend.dur",function(){o=!1,k.hide(),f.globalUnbind(".dur")}))}).bind("mouseenter",function(){p=!0,f.globalBind("mousemove.dur",function(a){n(a)}),mejs.MediaFeatures.hasTouch||k.show()}).bind("mouseleave",function(){p=!1,o||(f.globalUnbind(".dur"),k.hide())}),e.addEventListener("progress",function(a){b.setProgressRail(a),b.setCurrentRail(a)},!1),e.addEventListener("timeupdate",function(a){b.setProgressRail(a),b.setCurrentRail(a),t(a)},!1),f.container.on("controlsresize",function(){b.setProgressRail(),b.setCurrentRail()}),f.loaded=h,f.total=g,f.current=i,f.handle=j},setProgressRail:function(a){var b=this,c=void 0!==a?a.target:b.media,d=null;c&&c.buffered&&c.buffered.length>0&&c.buffered.end&&c.duration?d=c.buffered.end(c.buffered.length-1)/c.duration:c&&void 0!==c.bytesTotal&&c.bytesTotal>0&&void 0!==c.bufferedBytes?d=c.bufferedBytes/c.bytesTotal:a&&a.lengthComputable&&0!==a.total&&(d=a.loaded/a.total),null!==d&&(d=Math.min(1,Math.max(0,d)),b.loaded&&b.total&&b.loaded.width(b.total.width()*d))},setCurrentRail:function(){var a=this;if(void 0!==a.media.currentTime&&a.media.duration&&a.total&&a.handle){var b=Math.round(a.total.width()*a.media.currentTime/a.media.duration),c=b-Math.round(a.handle.outerWidth(!0)/2);a.current.width(b),a.handle.css("left",c)}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:"<span> | </span>"}),a.extend(MediaElementPlayer.prototype,{buildcurrent:function(b,c,d,e){var f=this;a('<div class="mejs-time" role="timer" aria-live="off"><span class="mejs-currenttime">'+mejs.Utility.secondsToTimeCode(0,b.options)+"</span></div>").appendTo(c),f.currenttime=f.controls.find(".mejs-currenttime"),e.addEventListener("timeupdate",function(){b.updateCurrent()},!1)},buildduration:function(b,c,d,e){var f=this;c.children().last().find(".mejs-currenttime").length>0?a(f.options.timeAndDurationSeparator+'<span class="mejs-duration">'+mejs.Utility.secondsToTimeCode(f.options.duration,f.options)+"</span>").appendTo(c.find(".mejs-time")):(c.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"),a('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+mejs.Utility.secondsToTimeCode(f.options.duration,f.options)+"</span></div>").appendTo(c)),f.durationD=f.controls.find(".mejs-duration"),e.addEventListener("timeupdate",function(){b.updateDuration()},!1)},updateCurrent:function(){var a=this;a.currenttime&&a.currenttime.html(mejs.Utility.secondsToTimeCode(a.media.currentTime,a.options))},updateDuration:function(){var a=this;a.container.toggleClass("mejs-long-video",a.media.duration>3600),a.durationD&&(a.options.duration>0||a.media.duration)&&a.durationD.html(mejs.Utility.secondsToTimeCode(a.options.duration>0?a.options.duration:a.media.duration,a.options))}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),allyVolumeControlText:mejs.i18n.t("Use Up/Down Arrow keys to increase or decrease volume."),hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical"}),a.extend(MediaElementPlayer.prototype,{buildvolume:function(b,c,d,e){if(!mejs.MediaFeatures.isAndroid&&!mejs.MediaFeatures.isiOS||!this.options.hideVolumeOnTouchDevices){var f=this,g=f.isVideo?f.options.videoVolume:f.options.audioVolume,h="horizontal"==g?a('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+f.id+'" title="'+f.options.muteText+'" aria-label="'+f.options.muteText+'"></button></div><a href="javascript:void(0);" class="mejs-horizontal-volume-slider"><span class="mejs-offscreen">'+f.options.allyVolumeControlText+'</span><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></a>').appendTo(c):a('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+f.id+'" title="'+f.options.muteText+'" aria-label="'+f.options.muteText+'"></button><a href="javascript:void(0);" class="mejs-volume-slider"><span class="mejs-offscreen">'+f.options.allyVolumeControlText+'</span><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></a></div>').appendTo(c),i=f.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),j=f.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),k=f.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),l=f.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),m=function(a,b){if(!i.is(":visible")&&"undefined"==typeof b)return i.show(),m(a,!0),void i.hide();a=Math.max(0,a),a=Math.min(a,1),0===a?(h.removeClass("mejs-mute").addClass("mejs-unmute"),h.children("button").attr("title",mejs.i18n.t("Unmute")).attr("aria-label",mejs.i18n.t("Unmute"))):(h.removeClass("mejs-unmute").addClass("mejs-mute"),h.children("button").attr("title",mejs.i18n.t("Mute")).attr("aria-label",mejs.i18n.t("Mute")));var c=j.position();if("vertical"==g){var d=j.height(),e=d-d*a;l.css("top",Math.round(c.top+e-l.height()/2)),k.height(d-e),k.css("top",c.top+e)}else{var f=j.width(),n=f*a;l.css("left",Math.round(c.left+n-l.width()/2)),k.width(Math.round(n))}},n=function(a){var b=null,c=j.offset();if("vertical"===g){var d=j.height(),f=a.pageY-c.top;if(b=(d-f)/d,0===c.top||0===c.left)return}else{var h=j.width(),i=a.pageX-c.left;b=i/h}b=Math.max(0,b),b=Math.min(b,1),m(b),e.setMuted(0===b?!0:!1),e.setVolume(b)},o=!1,p=!1;h.hover(function(){i.show(),p=!0},function(){p=!1,o||"vertical"!=g||i.hide()});var q=function(){var a=Math.floor(100*e.volume);i.attr({"aria-label":mejs.i18n.t("volumeSlider"),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,"aria-valuetext":a+"%",role:"slider",tabindex:0})};i.bind("mouseover",function(){p=!0}).bind("mousedown",function(a){return n(a),f.globalBind("mousemove.vol",function(a){n(a)}),f.globalBind("mouseup.vol",function(){o=!1,f.globalUnbind(".vol"),p||"vertical"!=g||i.hide()}),o=!0,!1}).bind("keydown",function(a){var b=a.keyCode,c=e.volume;switch(b){case 38:c+=.1;break;case 40:c-=.1;break;default:return!0}return o=!1,m(c),e.setVolume(c),!1}),h.find("button").click(function(){e.setMuted(!e.muted)}),h.find("button").bind("focus",function(){i.show()}),e.addEventListener("volumechange",function(a){o||(e.muted?(m(0),h.removeClass("mejs-mute").addClass("mejs-unmute")):(m(e.volume),h.removeClass("mejs-unmute").addClass("mejs-mute"))),q(a)},!1),0===b.options.startVolume&&e.setMuted(!0),"native"===e.pluginType&&e.setVolume(b.options.startVolume),f.container.on("controlsresize",function(){m(e.volume)})}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{usePluginFullScreen:!0,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")}),a.extend(MediaElementPlayer.prototype,{isFullScreen:!1,isNativeFullScreen:!1,isInIframe:!1,buildfullscreen:function(b,c,d,e){if(b.isVideo){if(b.isInIframe=window.location!=window.parent.location,mejs.MediaFeatures.hasTrueNativeFullScreen){var f=function(){b.isFullScreen&&(mejs.MediaFeatures.isFullScreen()?(b.isNativeFullScreen=!0,b.setControlsSize()):(b.isNativeFullScreen=!1,b.exitFullScreen()))};b.globalBind(mejs.MediaFeatures.fullScreenEventName,f)}var g=this,h=a('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+g.id+'" title="'+g.options.fullscreenText+'" aria-label="'+g.options.fullscreenText+'"></button></div>').appendTo(c);if("native"===g.media.pluginType||!g.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)h.click(function(){var a=mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||b.isFullScreen;a?b.exitFullScreen():b.enterFullScreen()});else{var i=null,j=function(){var a,b=document.createElement("x"),c=document.documentElement,d=window.getComputedStyle;return"pointerEvents"in b.style?(b.style.pointerEvents="auto",b.style.pointerEvents="x",c.appendChild(b),a=d&&"auto"===d(b,"").pointerEvents,c.removeChild(b),!!a):!1}();if(j&&!mejs.MediaFeatures.isOpera){var k,l,m=!1,n=function(){if(m){for(var a in o)o[a].hide();h.css("pointer-events",""),g.controls.css("pointer-events",""),g.media.removeEventListener("click",g.clickToPlayPauseCallback),m=!1}},o={},p=["top","left","right","bottom"],q=function(){var a=h.offset().left-g.container.offset().left,b=h.offset().top-g.container.offset().top,c=h.outerWidth(!0),d=h.outerHeight(!0),e=g.container.width(),f=g.container.height();for(k in o)o[k].css({position:"absolute",top:0,left:0});o.top.width(e).height(b),o.left.width(a).height(d).css({top:b}),o.right.width(e-a-c).height(d).css({top:b,left:a+c}),o.bottom.width(e).height(f-d-b).css({top:b+d})};for(g.globalBind("resize",function(){q()}),k=0,l=p.length;l>k;k++)o[p[k]]=a('<div class="mejs-fullscreen-hover" />').appendTo(g.container).mouseover(n).hide();h.on("mouseover",function(){if(!g.isFullScreen){var a=h.offset(),c=b.container.offset();e.positionFullscreenButton(a.left-c.left,a.top-c.top,!1),h.css("pointer-events","none"),g.controls.css("pointer-events","none"),g.media.addEventListener("click",g.clickToPlayPauseCallback);for(k in o)o[k].show();q(),m=!0}}),e.addEventListener("fullscreenchange",function(){g.isFullScreen=!g.isFullScreen,g.isFullScreen?g.media.removeEventListener("click",g.clickToPlayPauseCallback):g.media.addEventListener("click",g.clickToPlayPauseCallback),n()
-}),g.globalBind("mousemove",function(a){if(m){var b=h.offset();(a.pageY<b.top||a.pageY>b.top+h.outerHeight(!0)||a.pageX<b.left||a.pageX>b.left+h.outerWidth(!0))&&(h.css("pointer-events",""),g.controls.css("pointer-events",""),m=!1)}})}else h.on("mouseover",function(){null!==i&&(clearTimeout(i),delete i);var a=h.offset(),c=b.container.offset();e.positionFullscreenButton(a.left-c.left,a.top-c.top,!0)}).on("mouseout",function(){null!==i&&(clearTimeout(i),delete i),i=setTimeout(function(){e.hideFullscreenButton()},1500)})}b.fullscreenBtn=h,g.globalBind("keydown",function(a){(mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||g.isFullScreen)&&27==a.keyCode&&b.exitFullScreen()}),g.normalHeight=0,g.normalWidth=0}},cleanfullscreen:function(a){a.exitFullScreen()},containerSizeTimeout:null,enterFullScreen:function(){var b=this;if("native"===b.media.pluginType||!mejs.MediaFeatures.isFirefox&&!b.options.usePluginFullScreen){if(a(document.documentElement).addClass("mejs-fullscreen"),b.normalHeight=b.container.height(),b.normalWidth=b.container.width(),"native"===b.media.pluginType)if(mejs.MediaFeatures.hasTrueNativeFullScreen)mejs.MediaFeatures.requestFullScreen(b.container[0]),b.isInIframe&&setTimeout(function d(){if(b.isNativeFullScreen){var c=window.devicePixelRatio||1,e=.002,f=c*a(window).width(),g=screen.width,h=c*f;Math.abs(g-f)>Math.abs(g-h)&&(f=h);var i=Math.abs(g-f),j=g*e;i>j?b.exitFullScreen():setTimeout(d,500)}},1e3);else if(mejs.MediaFeatures.hasSemiNativeFullScreen)return void b.media.webkitEnterFullscreen();if(b.isInIframe){var c=b.options.newWindowCallback(this);if(""!==c){if(!mejs.MediaFeatures.hasTrueNativeFullScreen)return b.pause(),void window.open(c,b.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");setTimeout(function(){b.isNativeFullScreen||(b.pause(),window.open(c,b.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no"))},250)}}b.container.addClass("mejs-container-fullscreen").width("100%").height("100%"),b.containerSizeTimeout=setTimeout(function(){b.container.css({width:"100%",height:"100%"}),b.setControlsSize()},500),"native"===b.media.pluginType?b.$media.width("100%").height("100%"):(b.container.find(".mejs-shim").width("100%").height("100%"),b.media.setVideoSize(a(window).width(),a(window).height())),b.layers.children("div").width("100%").height("100%"),b.fullscreenBtn&&b.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen"),b.setControlsSize(),b.isFullScreen=!0,b.container.find(".mejs-captions-text").css("font-size",screen.width/b.width*1*100+"%"),b.container.find(".mejs-captions-position").css("bottom","45px"),b.container.trigger("enteredfullscreen")}},exitFullScreen:function(){var b=this;return clearTimeout(b.containerSizeTimeout),"native"!==b.media.pluginType&&mejs.MediaFeatures.isFirefox?void b.media.setFullscreen(!1):(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||b.isFullScreen)&&mejs.MediaFeatures.cancelFullScreen(),a(document.documentElement).removeClass("mejs-fullscreen"),b.container.removeClass("mejs-container-fullscreen").width(b.normalWidth).height(b.normalHeight),"native"===b.media.pluginType?b.$media.width(b.normalWidth).height(b.normalHeight):(b.container.find(".mejs-shim").width(b.normalWidth).height(b.normalHeight),b.media.setVideoSize(b.normalWidth,b.normalHeight)),b.layers.children("div").width(b.normalWidth).height(b.normalHeight),b.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen"),b.setControlsSize(),b.isFullScreen=!1,b.container.find(".mejs-captions-text").css("font-size",""),b.container.find(".mejs-captions-position").css("bottom",""),void b.container.trigger("exitedfullscreen"))}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{speeds:["2.00","1.50","1.25","1.00","0.75"],defaultSpeed:"1.00",speedChar:"x"}),a.extend(MediaElementPlayer.prototype,{buildspeed:function(b,c,d,e){var f=this;if("native"==f.media.pluginType){for(var g=null,h=null,i=null,j=null,k=[],l=!1,m=0,n=f.options.speeds.length;n>m;m++){var o=f.options.speeds[m];"string"==typeof o?(k.push({name:o+f.options.speedChar,value:o}),o===f.options.defaultSpeed&&(l=!0)):(k.push(o),o.value===f.options.defaultSpeed&&(l=!0))}l||k.push({name:f.options.defaultSpeed+f.options.speedChar,value:f.options.defaultSpeed}),k.sort(function(a,b){return parseFloat(b.value)-parseFloat(a.value)});var p=function(a){for(m=0,n=k.length;n>m;m++)if(k[m].value===a)return k[m].name},q='<div class="mejs-button mejs-speed-button"><button type="button">'+p(f.options.defaultSpeed)+'</button><div class="mejs-speed-selector"><ul>';for(m=0,il=k.length;il>m;m++)j=f.id+"-speed-"+k[m].value,q+='<li><input type="radio" name="speed" value="'+k[m].value+'" id="'+j+'" '+(k[m].value===f.options.defaultSpeed?" checked":"")+' /><label for="'+j+'" '+(k[m].value===f.options.defaultSpeed?' class="mejs-speed-selected"':"")+">"+k[m].name+"</label></li>";q+="</ul></div></div>",g=a(q).appendTo(c),h=g.find(".mejs-speed-selector"),i=f.options.defaultSpeed,e.addEventListener("loadedmetadata",function(){i&&(e.playbackRate=parseFloat(i))},!0),h.on("click",'input[type="radio"]',function(){var b=a(this).attr("value");i=b,e.playbackRate=parseFloat(b),g.find("button").html(p(b)),g.find(".mejs-speed-selected").removeClass("mejs-speed-selected"),g.find('input[type="radio"]:checked').next().addClass("mejs-speed-selected")}),g.one("mouseenter focusin",function(){h.height(g.find(".mejs-speed-selector ul").outerHeight(!0)+g.find(".mejs-speed-translations").outerHeight(!0)).css("top",-1*h.height()+"px")})}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),tracksAriaLive:!1,hideCaptionsButtonWhenEmpty:!0,toggleCaptionsButtonWhenOnlyOne:!1,slidesSelector:""}),a.extend(MediaElementPlayer.prototype,{hasChapters:!1,cleartracks:function(a){a&&(a.captions&&a.captions.remove(),a.chapters&&a.chapters.remove(),a.captionsText&&a.captionsText.remove(),a.captionsButton&&a.captionsButton.remove())},buildtracks:function(b,c,d,e){if(0!==b.tracks.length){var f,g=this,h=g.options.tracksAriaLive?'role="log" aria-live="assertive" aria-atomic="false"':"";if(g.domNode.textTracks)for(f=g.domNode.textTracks.length-1;f>=0;f--)g.domNode.textTracks[f].mode="hidden";g.cleartracks(b,c,d,e),b.chapters=a('<div class="mejs-chapters mejs-layer"></div>').prependTo(d).hide(),b.captions=a('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover" '+h+'><span class="mejs-captions-text"></span></div></div>').prependTo(d).hide(),b.captionsText=b.captions.find(".mejs-captions-text"),b.captionsButton=a('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+g.id+'" title="'+g.options.tracksText+'" aria-label="'+g.options.tracksText+'"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+b.id+'_captions" id="'+b.id+'_captions_none" value="none" checked="checked" /><label for="'+b.id+'_captions_none">'+mejs.i18n.t("None")+"</label></li></ul></div></div>").appendTo(c);var i=0;for(f=0;f<b.tracks.length;f++)"subtitles"==b.tracks[f].kind&&i++;for(g.options.toggleCaptionsButtonWhenOnlyOne&&1==i?b.captionsButton.on("click",function(){lang=null===b.selectedTrack?b.tracks[0].srclang:"none",b.setTrack(lang)}):(b.captionsButton.on("mouseenter focusin",function(){a(this).find(".mejs-captions-selector").css("visibility","visible")}).on("click","input[type=radio]",function(){lang=this.value,b.setTrack(lang)}),b.captionsButton.on("mouseleave focusout",function(){a(this).find(".mejs-captions-selector").css("visibility","hidden")})),b.options.alwaysShowControls?b.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):b.container.bind("controlsshown",function(){b.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("controlshidden",function(){e.paused||b.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")}),b.trackToLoad=-1,b.selectedTrack=null,b.isLoadingTrack=!1,f=0;f<b.tracks.length;f++)"subtitles"==b.tracks[f].kind&&b.addTrackButton(b.tracks[f].srclang,b.tracks[f].label);b.loadNextTrack(),e.addEventListener("timeupdate",function(){b.displayCaptions()},!1),""!==b.options.slidesSelector&&(b.slidesContainer=a(b.options.slidesSelector),e.addEventListener("timeupdate",function(){b.displaySlides()},!1)),e.addEventListener("loadedmetadata",function(){b.displayChapters()},!1),b.container.hover(function(){b.hasChapters&&(b.chapters.css("visibility","visible"),b.chapters.fadeIn(200).height(b.chapters.find(".mejs-chapter").outerHeight()))},function(){b.hasChapters&&!e.paused&&b.chapters.fadeOut(200,function(){a(this).css("visibility","hidden"),a(this).css("display","block")})}),g.container.on("controlsresize",function(){g.adjustLanguageBox()}),null!==b.node.getAttribute("autoplay")&&b.chapters.css("visibility","hidden")}},setTrack:function(a){var b,c=this;if("none"==a)c.selectedTrack=null,c.captionsButton.removeClass("mejs-captions-enabled");else for(b=0;b<c.tracks.length;b++)if(c.tracks[b].srclang==a){null===c.selectedTrack&&c.captionsButton.addClass("mejs-captions-enabled"),c.selectedTrack=c.tracks[b],c.captions.attr("lang",c.selectedTrack.srclang),c.displayCaptions();break}},loadNextTrack:function(){var a=this;a.trackToLoad++,a.trackToLoad<a.tracks.length?(a.isLoadingTrack=!0,a.loadTrack(a.trackToLoad)):(a.isLoadingTrack=!1,a.checkForTracks())},loadTrack:function(b){var c=this,d=c.tracks[b],e=function(){d.isLoaded=!0,c.enableTrackButton(d.srclang,d.label),c.loadNextTrack()};a.ajax({url:d.src,dataType:"text",success:function(a){d.entries="string"==typeof a&&/<tt\s+xml/gi.exec(a)?mejs.TrackFormatParser.dfxp.parse(a):mejs.TrackFormatParser.webvtt.parse(a),e(),"chapters"==d.kind&&c.media.addEventListener("play",function(){c.media.duration>0&&c.displayChapters(d)},!1),"slides"==d.kind&&c.setupSlides(d)},error:function(){c.removeTrackButton(d.srclang),c.loadNextTrack()}})},enableTrackButton:function(b,c){var d=this;""===c&&(c=mejs.language.codes[b]||b),d.captionsButton.find("input[value="+b+"]").prop("disabled",!1).siblings("label").html(c),d.options.startLanguage==b&&a("#"+d.id+"_captions_"+b).prop("checked",!0).trigger("click"),d.adjustLanguageBox()},removeTrackButton:function(a){var b=this;b.captionsButton.find("input[value="+a+"]").closest("li").remove(),b.adjustLanguageBox()},addTrackButton:function(b,c){var d=this;""===c&&(c=mejs.language.codes[b]||b),d.captionsButton.find("ul").append(a('<li><input type="radio" name="'+d.id+'_captions" id="'+d.id+"_captions_"+b+'" value="'+b+'" disabled="disabled" /><label for="'+d.id+"_captions_"+b+'">'+c+" (loading)</label></li>")),d.adjustLanguageBox(),d.container.find(".mejs-captions-translations option[value="+b+"]").remove()},adjustLanguageBox:function(){var a=this;a.captionsButton.find(".mejs-captions-selector").height(a.captionsButton.find(".mejs-captions-selector ul").outerHeight(!0)+a.captionsButton.find(".mejs-captions-translations").outerHeight(!0))},checkForTracks:function(){var a=this,b=!1;if(a.options.hideCaptionsButtonWhenEmpty){for(i=0;i<a.tracks.length;i++)if("subtitles"==a.tracks[i].kind&&a.tracks[i].isLoaded){b=!0;break}b||(a.captionsButton.hide(),a.setControlsSize())}},displayCaptions:function(){if("undefined"!=typeof this.tracks){var a,b=this,c=b.selectedTrack;if(null!==c&&c.isLoaded){for(a=0;a<c.entries.times.length;a++)if(b.media.currentTime>=c.entries.times[a].start&&b.media.currentTime<=c.entries.times[a].stop)return b.captionsText.html(c.entries.text[a]).attr("class","mejs-captions-text "+(c.entries.times[a].identifier||"")),void b.captions.show().height(0);b.captions.hide()}else b.captions.hide()}},setupSlides:function(a){var b=this;b.slides=a,b.slides.entries.imgs=[b.slides.entries.text.length],b.showSlide(0)},showSlide:function(b){if("undefined"!=typeof this.tracks&&"undefined"!=typeof this.slidesContainer){var c=this,d=c.slides.entries.text[b],e=c.slides.entries.imgs[b];"undefined"==typeof e||"undefined"==typeof e.fadeIn?c.slides.entries.imgs[b]=e=a('<img src="'+d+'">').on("load",function(){e.appendTo(c.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()}):e.is(":visible")||e.is(":animated")||e.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if("undefined"!=typeof this.slides){var a,b=this,c=b.slides;for(a=0;a<c.entries.times.length;a++)if(b.media.currentTime>=c.entries.times[a].start&&b.media.currentTime<=c.entries.times[a].stop)return void b.showSlide(a)}},displayChapters:function(){var a,b=this;for(a=0;a<b.tracks.length;a++)if("chapters"==b.tracks[a].kind&&b.tracks[a].isLoaded){b.drawChapters(b.tracks[a]),b.hasChapters=!0;break}},drawChapters:function(b){var c,d,e=this,f=0,g=0;for(e.chapters.empty(),c=0;c<b.entries.times.length;c++)d=b.entries.times[c].stop-b.entries.times[c].start,f=Math.floor(d/e.media.duration*100),(f+g>100||c==b.entries.times.length-1&&100>f+g)&&(f=100-g),e.chapters.append(a('<div class="mejs-chapter" rel="'+b.entries.times[c].start+'" style="left: '+g.toString()+"%;width: "+f.toString()+'%;"><div class="mejs-chapter-block'+(c==b.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+b.entries.text[c]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(b.entries.times[c].start,e.options)+"&ndash;"+mejs.Utility.secondsToTimeCode(b.entries.times[c].stop,e.options)+"</span></div></div>")),g+=f;e.chapters.find("div.mejs-chapter").click(function(){e.media.setCurrentTime(parseFloat(a(this).attr("rel"))),e.media.paused&&e.media.play()}),e.chapters.show()}}),mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",fl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}},mejs.TrackFormatParser={webvtt:{pattern_timecode:/^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(b){for(var c,d,e,f=0,g=mejs.TrackFormatParser.split2(b,/\r?\n/),h={text:[],times:[]};f<g.length;f++){if(c=this.pattern_timecode.exec(g[f]),c&&f<g.length){for(f-1>=0&&""!==g[f-1]&&(e=g[f-1]),f++,d=g[f],f++;""!==g[f]&&f<g.length;)d=d+"\n"+g[f],f++;d=a.trim(d).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),h.text.push(d),h.times.push({identifier:e,start:0===mejs.Utility.convertSMPTEtoSeconds(c[1])?.2:mejs.Utility.convertSMPTEtoSeconds(c[1]),stop:mejs.Utility.convertSMPTEtoSeconds(c[3]),settings:c[5]})}e=""}return h}},dfxp:{parse:function(b){b=a(b).filter("tt");var c,d,e=0,f=b.children("div").eq(0),g=f.find("p"),h=b.find("#"+f.attr("style")),i={text:[],times:[]};if(h.length){var j=h.removeAttr("id").get(0).attributes;if(j.length)for(c={},e=0;e<j.length;e++)c[j[e].name.split(":")[1]]=j[e].value}for(e=0;e<g.length;e++){var k,l={start:null,stop:null,style:null};if(g.eq(e).attr("begin")&&(l.start=mejs.Utility.convertSMPTEtoSeconds(g.eq(e).attr("begin"))),!l.start&&g.eq(e-1).attr("end")&&(l.start=mejs.Utility.convertSMPTEtoSeconds(g.eq(e-1).attr("end"))),g.eq(e).attr("end")&&(l.stop=mejs.Utility.convertSMPTEtoSeconds(g.eq(e).attr("end"))),!l.stop&&g.eq(e+1).attr("begin")&&(l.stop=mejs.Utility.convertSMPTEtoSeconds(g.eq(e+1).attr("begin"))),c){k="";for(var m in c)k+=m+":"+c[m]+";"}k&&(l.style=k),0===l.start&&(l.start=.2),i.times.push(l),d=a.trim(g.eq(e).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),i.text.push(d),0===i.times.start&&(i.times.start=2)}return i}},split2:function(a,b){return a.split(b)}},3!="x\n\ny".split(/\n/gi).length&&(mejs.TrackFormatParser.split2=function(a,b){var c,d=[],e="";for(c=0;c<a.length;c++)e+=a.substring(c,c+1),b.test(e)&&(d.push(e.replace(b,"")),e="");return d.push(e),d})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){return"undefined"==typeof a.enterFullScreen?null:mejs.i18n.t(a.isFullScreen?"Turn off Fullscreen":"Go Fullscreen")},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return mejs.i18n.t(a.media.muted?"Unmute":"Mute")},click:function(a){a.setMuted(a.media.muted?!1:!0)}},{isSeparator:!0},{render:function(){return mejs.i18n.t("Download Video")},click:function(a){window.location.href=a.media.currentSrc}}]}),a.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(b){b.contextMenu=a('<div class="mejs-contextmenu"></div>').appendTo(a("body")).hide(),b.container.bind("contextmenu",function(a){return b.isContextMenuEnabled?(a.preventDefault(),b.renderContextMenu(a.clientX-1,a.clientY-1),!1):void 0}),b.container.bind("click",function(){b.contextMenu.hide()}),b.contextMenu.bind("mouseleave",function(){b.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()},isContextMenuEnabled:!0,enableContextMenu:function(){this.isContextMenuEnabled=!0},disableContextMenu:function(){this.isContextMenuEnabled=!1},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer(),a.contextMenuTimer=setTimeout(function(){a.hideContextMenu(),a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;null!=a&&(clearTimeout(a),delete a,a=null)},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(b,c){for(var d=this,e="",f=d.options.contextMenuItems,g=0,h=f.length;h>g;g++)if(f[g].isSeparator)e+='<div class="mejs-contextmenu-separator"></div>';else{var i=f[g].render(d);null!=i&&(e+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+1e6*Math.random()+'">'+i+"</div>")}d.contextMenu.empty().append(a(e)).css({top:c,left:b}).show(),d.contextMenu.find(".mejs-contextmenu-item").each(function(){var b=a(this),c=parseInt(b.data("itemindex"),10),e=d.options.contextMenuItems[c];"undefined"!=typeof e.show&&e.show(b,d),b.click(function(){"undefined"!=typeof e.click&&e.click(d),d.contextMenu.hide()})}),setTimeout(function(){d.killControlsTimer("rev3")},100)}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{skipBackInterval:30,skipBackText:mejs.i18n.t("Skip back %1 seconds")}),a.extend(MediaElementPlayer.prototype,{buildskipback:function(b,c,d,e){{var f=this,g=f.options.skipBackText.replace("%1",f.options.skipBackInterval);a('<div class="mejs-button mejs-skip-back-button"><button type="button" aria-controls="'+f.id+'" title="'+g+'" aria-label="'+g+'">'+f.options.skipBackInterval+"</button></div>").appendTo(c).click(function(){e.setCurrentTime(Math.max(e.currentTime-f.options.skipBackInterval,0)),a(this).find("button").blur()})}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")}),a.extend(MediaElementPlayer.prototype,{buildpostroll:function(b,c,d){var e=this,f=e.container.find('link[rel="postroll"]').attr("href");"undefined"!=typeof f&&(b.postroll=a('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+e.options.postrollCloseText+'</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(d).hide(),e.media.addEventListener("ended",function(){a.ajax({dataType:"html",url:f,success:function(a){d.find(".mejs-postroll-layer-content").html(a)}}),b.postroll.show()},!1))}})}(mejs.$);
+"undefined"!=typeof jQuery?mejs.$=jQuery:"undefined"!=typeof Zepto?(mejs.$=Zepto,Zepto.fn.outerWidth=function(a){var b=$(this).width();return a&&(b+=parseInt($(this).css("margin-right"),10),b+=parseInt($(this).css("margin-left"),10)),b}):"undefined"!=typeof ender&&(mejs.$=ender),function(a){mejs.MepDefaults={poster:"",showPosterWhenEnded:!1,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return.05*a.duration},defaultSeekForwardInterval:function(a){return.05*a.duration},setDimensions:!0,audioWidth:-1,audioHeight:-1,startVolume:.8,loop:!1,autoRewind:!0,enableAutosize:!0,timeFormat:"",alwaysShowHours:!1,showTimecodeFrameCount:!1,framesPerSecond:25,autosizeProgress:!0,alwaysShowControls:!1,hideVideoControlsOnLoad:!1,clickToPlayPause:!0,iPadUseNativeControls:!1,iPhoneUseNativeControls:!1,AndroidUseNativeControls:!1,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:!0,stretching:"auto",enableKeyboard:!0,pauseOtherPlayers:!0,keyActions:[{keys:[32,179],action:function(a,b){b.paused||b.ended?b.play():b.pause()}},{keys:[38],action:function(a,b){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.min(b.volume+.1,1);b.setVolume(c)}},{keys:[40],action:function(a,b){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.max(b.volume-.1,0);b.setVolume(c)}},{keys:[37,227],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function(a,b){"undefined"!=typeof a.enterFullScreen&&(a.isFullScreen?a.exitFullScreen():a.enterFullScreen())}},{keys:[77],action:function(a,b){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer()),a.media.muted?a.setMuted(!1):a.setMuted(!0)}}]},mejs.mepIndex=0,mejs.players={},mejs.MediaElementPlayer=function(b,c){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(b,c);var d=this;return d.$media=d.$node=a(b),d.node=d.media=d.$media[0],d.node?"undefined"!=typeof d.node.player?d.node.player:("undefined"==typeof c&&(c=d.$node.data("mejsoptions")),d.options=a.extend({},mejs.MepDefaults,c),d.options.timeFormat||(d.options.timeFormat="mm:ss",d.options.alwaysShowHours&&(d.options.timeFormat="hh:mm:ss"),d.options.showTimecodeFrameCount&&(d.options.timeFormat+=":ff")),mejs.Utility.calculateTimeFormat(0,d.options,d.options.framesPerSecond||25),d.id="mep_"+mejs.mepIndex++,mejs.players[d.id]=d,d.init(),d):void 0},mejs.MediaElementPlayer.prototype={hasFocus:!1,controlsAreVisible:!0,init:function(){var b=this,c=mejs.MediaFeatures,d=a.extend(!0,{},b.options,{success:function(a,c){b.meReady(a,c)},error:function(a){b.handleError(a)}}),e=b.media.tagName.toLowerCase();if(b.isDynamic="audio"!==e&&"video"!==e,b.isDynamic?b.isVideo=b.options.isVideo:b.isVideo="audio"!==e&&b.options.isVideo,c.isiPad&&b.options.iPadUseNativeControls||c.isiPhone&&b.options.iPhoneUseNativeControls)b.$media.attr("controls","controls"),c.isiPad&&null!==b.media.getAttribute("autoplay")&&b.play();else if(c.isAndroid&&b.options.AndroidUseNativeControls);else{b.$media.removeAttr("controls");var f=b.isVideo?mejs.i18n.t("Video Player"):mejs.i18n.t("Audio Player");a('<span class="mejs-offscreen">'+f+"</span>").insertBefore(b.$media),b.container=a('<div id="'+b.id+'" class="mejs-container '+(mejs.MediaFeatures.svgAsImg?"svg":"no-svg")+'" tabindex="0" role="application" aria-label="'+f+'"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(b.$media[0].className).insertBefore(b.$media).focus(function(a){if(!b.controlsAreVisible&&!b.hasFocus&&(b.showControls(!0),!b.hasMsNativeFullScreen)){var c=b.container.find(".mejs-playpause-button > button");c.focus()}}),"fill"!==b.options.stretching||b.container.parent("mejs-fill-container").length||(b.outerContainer=b.$media.parent(),b.container.wrap('<div class="mejs-fill-container"/>')),b.container.addClass((c.isAndroid?"mejs-android ":"")+(c.isiOS?"mejs-ios ":"")+(c.isiPad?"mejs-ipad ":"")+(c.isiPhone?"mejs-iphone ":"")+(b.isVideo?"mejs-video ":"mejs-audio ")),b.container.find(".mejs-mediaelement").append(b.$media),b.node.player=b,b.controls=b.container.find(".mejs-controls"),b.layers=b.container.find(".mejs-layers");var g=b.isVideo?"video":"audio",h=g.substring(0,1).toUpperCase()+g.substring(1);b.options[g+"Width"]>0||b.options[g+"Width"].toString().indexOf("%")>-1?b.width=b.options[g+"Width"]:""!==b.media.style.width&&null!==b.media.style.width?b.width=b.media.style.width:null!==b.media.getAttribute("width")?b.width=b.$media.attr("width"):b.width=b.options["default"+h+"Width"],b.options[g+"Height"]>0||b.options[g+"Height"].toString().indexOf("%")>-1?b.height=b.options[g+"Height"]:""!==b.media.style.height&&null!==b.media.style.height?b.height=b.media.style.height:null!==b.$media[0].getAttribute("height")?b.height=b.$media.attr("height"):b.height=b.options["default"+h+"Height"],b.setPlayerSize(b.width,b.height),d.pluginWidth=b.width,d.pluginHeight=b.height}mejs.MediaElement(b.$media[0],d),"undefined"!=typeof b.container&&b.controlsAreVisible&&b.container.trigger("controlsshown")},showControls:function(a){var b=this;a="undefined"==typeof a||a,b.controlsAreVisible||(a?(b.controls.removeClass("mejs-offscreen").stop(!0,!0).fadeIn(200,function(){b.controlsAreVisible=!0,b.container.trigger("controlsshown")}),b.container.find(".mejs-control").removeClass("mejs-offscreen").stop(!0,!0).fadeIn(200,function(){b.controlsAreVisible=!0})):(b.controls.removeClass("mejs-offscreen").css("display","block"),b.container.find(".mejs-control").removeClass("mejs-offscreen").css("display","block"),b.controlsAreVisible=!0,b.container.trigger("controlsshown")),b.setControlsSize())},hideControls:function(b){var c=this;b="undefined"==typeof b||b,!c.controlsAreVisible||c.options.alwaysShowControls||c.keyboardAction||(b?(c.controls.stop(!0,!0).fadeOut(200,function(){a(this).addClass("mejs-offscreen").css("display","block"),c.controlsAreVisible=!1,c.container.trigger("controlshidden")}),c.container.find(".mejs-control").stop(!0,!0).fadeOut(200,function(){a(this).addClass("mejs-offscreen").css("display","block")})):(c.controls.addClass("mejs-offscreen").css("display","block"),c.container.find(".mejs-control").addClass("mejs-offscreen").css("display","block"),c.controlsAreVisible=!1,c.container.trigger("controlshidden")))},controlsTimer:null,startControlsTimer:function(a){var b=this;a="undefined"!=typeof a?a:1500,b.killControlsTimer("start"),b.controlsTimer=setTimeout(function(){b.hideControls(),b.killControlsTimer("hide")},a)},killControlsTimer:function(a){var b=this;null!==b.controlsTimer&&(clearTimeout(b.controlsTimer),delete b.controlsTimer,b.controlsTimer=null)},controlsEnabled:!0,disableControls:function(){var a=this;a.killControlsTimer(),a.hideControls(!1),this.controlsEnabled=!1},enableControls:function(){var a=this;a.showControls(!1),a.controlsEnabled=!0},meReady:function(b,c){var d,e,f=this,g=mejs.MediaFeatures,h=c.getAttribute("autoplay"),i=!("undefined"==typeof h||null===h||"false"===h);if(!f.created){if(f.created=!0,f.media=b,f.domNode=c,!(g.isAndroid&&f.options.AndroidUseNativeControls||g.isiPad&&f.options.iPadUseNativeControls||g.isiPhone&&f.options.iPhoneUseNativeControls)){f.buildposter(f,f.controls,f.layers,f.media),f.buildkeyboard(f,f.controls,f.layers,f.media),f.buildoverlays(f,f.controls,f.layers,f.media),f.findTracks();for(d in f.options.features)if(e=f.options.features[d],f["build"+e])try{f["build"+e](f,f.controls,f.layers,f.media)}catch(j){}f.container.trigger("controlsready"),f.setPlayerSize(f.width,f.height),f.setControlsSize(),f.isVideo&&(mejs.MediaFeatures.hasTouch?f.$media.bind("touchstart",function(){f.controlsAreVisible?f.hideControls(!1):f.controlsEnabled&&f.showControls(!1)}):(f.clickToPlayPauseCallback=function(){f.options.clickToPlayPause&&(f.media.paused?f.play():f.pause())},f.media.addEventListener("click",f.clickToPlayPauseCallback,!1),f.container.bind("mouseenter",function(){f.controlsEnabled&&(f.options.alwaysShowControls||(f.killControlsTimer("enter"),f.showControls(),f.startControlsTimer(2500)))}).bind("mousemove",function(){f.controlsEnabled&&(f.controlsAreVisible||f.showControls(),f.options.alwaysShowControls||f.startControlsTimer(2500))}).bind("mouseleave",function(){f.controlsEnabled&&(f.media.paused||f.options.alwaysShowControls||f.startControlsTimer(1e3))})),f.options.hideVideoControlsOnLoad&&f.hideControls(!1),i&&!f.options.alwaysShowControls&&f.hideControls(),f.options.enableAutosize&&f.media.addEventListener("loadedmetadata",function(a){f.options.videoHeight<=0&&null===f.domNode.getAttribute("height")&&!isNaN(a.target.videoHeight)&&(f.setPlayerSize(a.target.videoWidth,a.target.videoHeight),f.setControlsSize(),f.media.setVideoSize(a.target.videoWidth,a.target.videoHeight))},!1)),f.media.addEventListener("play",function(){var a;for(a in mejs.players){var b=mejs.players[a];b.id==f.id||!f.options.pauseOtherPlayers||b.paused||b.ended||b.pause(),b.hasFocus=!1}f.hasFocus=!0},!1),f.media.addEventListener("ended",function(b){if(f.options.autoRewind)try{f.media.setCurrentTime(0),window.setTimeout(function(){a(f.container).find(".mejs-overlay-loading").parent().hide()},20)}catch(c){}f.media.pause(),f.setProgressRail&&f.setProgressRail(),f.setCurrentRail&&f.setCurrentRail(),f.options.loop?f.play():!f.options.alwaysShowControls&&f.controlsEnabled&&f.showControls()},!1),f.media.addEventListener("loadedmetadata",function(a){f.updateDuration&&f.updateDuration(),f.updateCurrent&&f.updateCurrent(),f.isFullScreen||(f.setPlayerSize(f.width,f.height),f.setControlsSize())},!1);var k=null;f.media.addEventListener("timeupdate",function(){k!==this.duration&&(k=this.duration,mejs.Utility.calculateTimeFormat(k,f.options,f.options.framesPerSecond||25),f.updateDuration&&f.updateDuration(),f.updateCurrent&&f.updateCurrent(),f.setControlsSize())},!1),f.container.focusout(function(b){if(b.relatedTarget){var c=a(b.relatedTarget);f.keyboardAction&&0===c.parents(".mejs-container").length&&(f.keyboardAction=!1,f.hideControls(!0))}}),setTimeout(function(){f.setPlayerSize(f.width,f.height),f.setControlsSize()},50),f.globalBind("resize",function(){f.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||f.setPlayerSize(f.width,f.height),f.setControlsSize()}),"youtube"==f.media.pluginType&&(g.isiOS||g.isAndroid)&&(f.container.find(".mejs-overlay-play").hide(),f.container.find(".mejs-poster").hide())}i&&"native"==b.pluginType&&f.play(),f.options.success&&("string"==typeof f.options.success?window[f.options.success](f.media,f.domNode,f):f.options.success(f.media,f.domNode,f))}},handleError:function(a){var b=this;b.controls&&b.controls.hide(),b.options.error&&b.options.error(a)},setPlayerSize:function(a,b){var c=this;if(!c.options.setDimensions)return!1;switch("undefined"!=typeof a&&(c.width=a),"undefined"!=typeof b&&(c.height=b),c.options.stretching){case"fill":c.isVideo?this.setFillMode():this.setDimensions(c.width,c.height);break;case"responsive":this.setResponsiveMode();break;case"none":this.setDimensions(c.width,c.height);break;default:this.hasFluidMode()===!0?this.setResponsiveMode():this.setDimensions(c.width,c.height)}},hasFluidMode:function(){var a=this;return a.height.toString().indexOf("%")>0||"none"!==a.$node.css("max-width")&&"t.width"!==a.$node.css("max-width")||a.$node[0].currentStyle&&"100%"===a.$node[0].currentStyle.maxWidth},setResponsiveMode:function(){var b=this,c=function(){return b.isVideo?b.media.videoWidth&&b.media.videoWidth>0?b.media.videoWidth:null!==b.media.getAttribute("width")?b.media.getAttribute("width"):b.options.defaultVideoWidth:b.options.defaultAudioWidth}(),d=function(){return b.isVideo?b.media.videoHeight&&b.media.videoHeight>0?b.media.videoHeight:null!==b.media.getAttribute("height")?b.media.getAttribute("height"):b.options.defaultVideoHeight:b.options.defaultAudioHeight}(),e=b.container.parent().closest(":visible").width(),f=b.container.parent().closest(":visible").height(),g=b.isVideo||!b.options.autosizeProgress?parseInt(e*d/c,10):d;(isNaN(g)||0!==f&&g>f&&f>d)&&(g=f),b.container.parent().length>0&&"body"===b.container.parent()[0].tagName.toLowerCase()&&(e=a(window).width(),g=a(window).height()),g&&e&&(b.container.width(e).height(g),b.$media.add(b.container.find(".mejs-shim")).width("100%").height("100%"),b.isVideo&&b.media.setVideoSize&&b.media.setVideoSize(e,g),b.layers.children(".mejs-layer").width("100%").height("100%"))},setFillMode:function(){var a=this,b=a.outerContainer;b.width()||b.height(a.$media.width()),b.height()||b.height(a.$media.height());var c=b.width(),d=b.height();a.setDimensions("100%","100%"),a.container.find(".mejs-poster img").css("display","block"),targetElement=a.container.find("object, embed, iframe, video");var e=a.height,f=a.width,g=c,h=e*c/f,i=f*d/e,j=d,k=!(i>c),l=k?Math.floor(g):Math.floor(i),m=k?Math.floor(h):Math.floor(j);k?(targetElement.height(m).width(c),a.media.setVideoSize&&a.media.setVideoSize(c,m)):(targetElement.height(d).width(l),a.media.setVideoSize&&a.media.setVideoSize(l,d)),targetElement.css({"margin-left":Math.floor((c-l)/2),"margin-top":0})},setDimensions:function(a,b){var c=this;c.container.width(a).height(b),c.layers.children(".mejs-layer").width(a).height(b)},setControlsSize:function(){var b=this,c=0,d=0,e=b.controls.find(".mejs-time-rail"),f=b.controls.find(".mejs-time-total"),g=e.siblings(),h=g.last(),i=null;if(b.container.is(":visible")&&e.length&&e.is(":visible")){b.options&&!b.options.autosizeProgress&&(d=parseInt(e.css("width"),10)),0!==d&&d||(g.each(function(){var b=a(this);"absolute"!=b.css("position")&&b.is(":visible")&&(c+=a(this).outerWidth(!0))}),d=b.controls.width()-c-(e.outerWidth(!0)-e.width()));do e.width(d),f.width(d-(f.outerWidth(!0)-f.width())),"absolute"!=h.css("position")&&(i=h.length?h.position():null,d--);while(null!==i&&i.top.toFixed(2)>0&&d>0);b.container.trigger("controlsresize")}},buildposter:function(b,c,d,e){var f=this,g=a('<div class="mejs-poster mejs-layer"></div>').appendTo(d),h=b.$media.attr("poster");""!==b.options.poster&&(h=b.options.poster),h?f.setPoster(h):g.hide(),e.addEventListener("play",function(){g.hide()},!1),b.options.showPosterWhenEnded&&b.options.autoRewind&&e.addEventListener("ended",function(){g.show()},!1)},setPoster:function(b){var c=this,d=c.container.find(".mejs-poster"),e=d.find("img");0===e.length&&(e=a('<img width="100%" height="100%" alt="" />').appendTo(d)),e.attr("src",b),d.css({"background-image":"url("+b+")"})},buildoverlays:function(b,c,d,e){var f=this;if(b.isVideo){var g=a('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(d),h=a('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(d),i=a('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(d).bind("click",function(){f.options.clickToPlayPause&&e.paused&&e.play()});e.addEventListener("play",function(){i.hide(),g.hide(),c.find(".mejs-time-buffering").hide(),h.hide()},!1),e.addEventListener("playing",function(){i.hide(),g.hide(),c.find(".mejs-time-buffering").hide(),h.hide()},!1),e.addEventListener("seeking",function(){g.show(),c.find(".mejs-time-buffering").show()},!1),e.addEventListener("seeked",function(){g.hide(),c.find(".mejs-time-buffering").hide()},!1),e.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||i.show()},!1),e.addEventListener("waiting",function(){g.show(),c.find(".mejs-time-buffering").show()},!1),e.addEventListener("loadeddata",function(){g.show(),c.find(".mejs-time-buffering").show(),mejs.MediaFeatures.isAndroid&&(e.canplayTimeout=window.setTimeout(function(){if(document.createEvent){var a=document.createEvent("HTMLEvents");return a.initEvent("canplay",!0,!0),e.dispatchEvent(a)}},300))},!1),e.addEventListener("canplay",function(){g.hide(),c.find(".mejs-time-buffering").hide(),clearTimeout(e.canplayTimeout)},!1),e.addEventListener("error",function(a){f.handleError(a),g.hide(),i.hide(),h.show(),h.find(".mejs-overlay-error").html("Error loading this resource")},!1),e.addEventListener("keydown",function(a){f.onkeydown(b,e,a)},!1)}},buildkeyboard:function(b,c,d,e){var f=this;f.container.keydown(function(){f.keyboardAction=!0}),f.globalBind("keydown",function(c){return b.hasFocus=0!==a(c.target).closest(".mejs-container").length&&a(c.target).closest(".mejs-container").attr("id")===b.$media.closest(".mejs-container").attr("id"),f.onkeydown(b,e,c)}),f.globalBind("click",function(c){b.hasFocus=0!==a(c.target).closest(".mejs-container").length})},onkeydown:function(a,b,c){if(a.hasFocus&&a.options.enableKeyboard)for(var d=0,e=a.options.keyActions.length;e>d;d++)for(var f=a.options.keyActions[d],g=0,h=f.keys.length;h>g;g++)if(c.keyCode==f.keys[g])return"function"==typeof c.preventDefault&&c.preventDefault(),f.action(a,b,c.keyCode,c),!1;return!0},findTracks:function(){var b=this,c=b.$media.find("track");b.tracks=[],c.each(function(c,d){d=a(d),b.tracks.push({srclang:d.attr("srclang")?d.attr("srclang").toLowerCase():"",src:d.attr("src"),kind:d.attr("kind"),label:d.attr("label")||"",entries:[],isLoaded:!1})})},changeSkin:function(a){this.container[0].className="mejs-container "+a,this.setPlayerSize(this.width,this.height),this.setControlsSize()},play:function(){this.load(),this.media.play()},pause:function(){try{this.media.pause()}catch(a){}},load:function(){this.isLoaded||this.media.load(),this.isLoaded=!0},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)},remove:function(){var a,b,c=this;c.container.prev(".mejs-offscreen").remove();for(a in c.options.features)if(b=c.options.features[a],c["clean"+b])try{c["clean"+b](c)}catch(d){}c.isDynamic?c.$node.insertBefore(c.container):(c.$media.prop("controls",!0),c.$node.clone().insertBefore(c.container).show(),c.$node.remove()),"native"!==c.media.pluginType&&c.media.remove(),delete mejs.players[c.id],"object"==typeof c.container&&c.container.remove(),c.globalUnbind(),delete c.node.player},rebuildtracks:function(){var a=this;a.findTracks(),a.buildtracks(a,a.controls,a.layers,a.media)},resetSize:function(){var a=this;setTimeout(function(){a.setPlayerSize(a.width,a.height),a.setControlsSize()},50)}},function(){function b(b,d){var e={d:[],w:[]};return a.each((b||"").split(" "),function(a,b){var f=b+"."+d;0===f.indexOf(".")?(e.d.push(f),e.w.push(f)):e[c.test(b)?"w":"d"].push(f)}),e.d=e.d.join(" "),e.w=e.w.join(" "),e}var c=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(c,d,e){var f=this,g=f.node?f.node.ownerDocument:document;c=b(c,f.id),c.d&&a(g).bind(c.d,d,e),c.w&&a(window).bind(c.w,d,e)},mejs.MediaElementPlayer.prototype.globalUnbind=function(c,d){var e=this,f=e.node?e.node.ownerDocument:document;c=b(c,e.id),c.d&&a(f).unbind(c.d,d),c.w&&a(window).unbind(c.w,d)}}(),"undefined"!=typeof a&&(a.fn.mediaelementplayer=function(b){return b===!1?this.each(function(){var b=a(this).data("mediaelementplayer");b&&b.remove(),a(this).removeData("mediaelementplayer")}):this.each(function(){a(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,b))}),this},a(document).ready(function(){a(".mejs-player").mediaelementplayer()})),window.MediaElementPlayer=mejs.MediaElementPlayer}(mejs.$),function(a){a.extend(mejs.MepDefaults,{playText:mejs.i18n.t("Play"),pauseText:mejs.i18n.t("Pause")}),a.extend(MediaElementPlayer.prototype,{buildplaypause:function(b,c,d,e){function f(a){"play"===a?(i.removeClass("mejs-play").addClass("mejs-pause"),j.attr({title:h.pauseText,"aria-label":h.pauseText})):(i.removeClass("mejs-pause").addClass("mejs-play"),j.attr({title:h.playText,"aria-label":h.playText}))}var g=this,h=g.options,i=a('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+g.id+'" title="'+h.playText+'" aria-label="'+h.playText+'"></button></div>').appendTo(c).click(function(a){return a.preventDefault(),e.paused?e.play():e.pause(),!1}),j=i.find("button");f("pse"),e.addEventListener("play",function(){f("play")},!1),e.addEventListener("playing",function(){f("play")},!1),e.addEventListener("pause",function(){f("pse")},!1),e.addEventListener("paused",function(){f("pse")},!1)}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{stopText:"Stop"}),a.extend(MediaElementPlayer.prototype,{buildstop:function(b,c,d,e){var f=this;a('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+f.id+'" title="'+f.options.stopText+'" aria-label="'+f.options.stopText+'"></button></div>').appendTo(c).click(function(){e.paused||e.pause(),e.currentTime>0&&(e.setCurrentTime(0),e.pause(),c.find(".mejs-time-current").width("0px"),c.find(".mejs-time-handle").css("left","0px"),c.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0,b.options)),c.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0,b.options)),d.find(".mejs-poster").show())})}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{progessHelpText:mejs.i18n.t("Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.")}),a.extend(MediaElementPlayer.prototype,{buildprogress:function(b,c,d,e){a('<div class="mejs-time-rail"><span  class="mejs-time-total mejs-time-slider"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(c),c.find(".mejs-time-buffering").hide();var f=this,g=c.find(".mejs-time-total"),h=c.find(".mejs-time-loaded"),i=c.find(".mejs-time-current"),j=c.find(".mejs-time-handle"),k=c.find(".mejs-time-float"),l=c.find(".mejs-time-float-current"),m=c.find(".mejs-time-slider"),n=function(a){var c,d=g.offset(),f=g.width(),h=0,i=0,j=0;c=a.originalEvent&&a.originalEvent.changedTouches?a.originalEvent.changedTouches[0].pageX:a.changedTouches?a.changedTouches[0].pageX:a.pageX,e.duration&&(c<d.left?c=d.left:c>f+d.left&&(c=f+d.left),j=c-d.left,h=j/f,i=.02>=h?0:h*e.duration,o&&i!==e.currentTime&&e.setCurrentTime(i),mejs.MediaFeatures.hasTouch||(k.css("left",j),l.html(mejs.Utility.secondsToTimeCode(i,b.options)),k.show()))},o=!1,p=!1,q=0,r=!1,s=b.options.autoRewind,t=function(a){var c=e.currentTime,d=mejs.i18n.t("Time Slider"),f=mejs.Utility.secondsToTimeCode(c,b.options),g=e.duration;m.attr({"aria-label":d,"aria-valuemin":0,"aria-valuemax":g,"aria-valuenow":c,"aria-valuetext":f,role:"slider",tabindex:0})},u=function(){var a=new Date;a-q>=1e3&&e.play()};m.bind("focus",function(a){b.options.autoRewind=!1}),m.bind("blur",function(a){b.options.autoRewind=s}),m.bind("keydown",function(a){new Date-q>=1e3&&(r=e.paused);var c=a.keyCode,d=e.duration,f=e.currentTime,g=b.options.defaultSeekForwardInterval(d),h=b.options.defaultSeekBackwardInterval(d);switch(c){case 37:case 40:f-=h;break;case 39:case 38:f+=g;break;case 36:f=0;break;case 35:f=d;break;case 32:case 13:return void(e.paused?e.play():e.pause());default:return}return f=0>f?0:f>=d?d:Math.floor(f),q=new Date,r||e.pause(),f<e.duration&&!r&&setTimeout(u,1100),e.setCurrentTime(f),a.preventDefault(),a.stopPropagation(),!1}),g.bind("mousedown touchstart",function(a){(1===a.which||0===a.which)&&(o=!0,n(a),f.globalBind("mousemove.dur touchmove.dur",function(a){n(a)}),f.globalBind("mouseup.dur touchend.dur",function(a){o=!1,k.hide(),f.globalUnbind(".dur")}))}).bind("mouseenter",function(a){p=!0,f.globalBind("mousemove.dur",function(a){n(a)}),mejs.MediaFeatures.hasTouch||k.show()}).bind("mouseleave",function(a){p=!1,o||(f.globalUnbind(".dur"),k.hide())}),e.addEventListener("progress",function(a){b.setProgressRail(a),b.setCurrentRail(a)},!1),e.addEventListener("timeupdate",function(a){b.setProgressRail(a),b.setCurrentRail(a),t(a)},!1),f.container.on("controlsresize",function(){b.setProgressRail(),b.setCurrentRail()}),f.loaded=h,f.total=g,f.current=i,f.handle=j},setProgressRail:function(a){var b=this,c=void 0!==a?a.target:b.media,d=null;c&&c.buffered&&c.buffered.length>0&&c.buffered.end&&c.duration?d=c.buffered.end(c.buffered.length-1)/c.duration:c&&void 0!==c.bytesTotal&&c.bytesTotal>0&&void 0!==c.bufferedBytes?d=c.bufferedBytes/c.bytesTotal:a&&a.lengthComputable&&0!==a.total&&(d=a.loaded/a.total),null!==d&&(d=Math.min(1,Math.max(0,d)),b.loaded&&b.total&&b.loaded.width(b.total.width()*d))},setCurrentRail:function(){var a=this;if(void 0!==a.media.currentTime&&a.media.duration&&a.total&&a.handle){var b=Math.round(a.total.width()*a.media.currentTime/a.media.duration),c=b-Math.round(a.handle.outerWidth(!0)/2);a.current.width(b),a.handle.css("left",c)}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:"<span> | </span>"}),a.extend(MediaElementPlayer.prototype,{buildcurrent:function(b,c,d,e){var f=this;a('<div class="mejs-time" role="timer" aria-live="off"><span class="mejs-currenttime">'+mejs.Utility.secondsToTimeCode(0,b.options)+"</span></div>").appendTo(c),f.currenttime=f.controls.find(".mejs-currenttime"),e.addEventListener("timeupdate",function(){b.updateCurrent()},!1)},buildduration:function(b,c,d,e){var f=this;c.children().last().find(".mejs-currenttime").length>0?a(f.options.timeAndDurationSeparator+'<span class="mejs-duration">'+mejs.Utility.secondsToTimeCode(f.options.duration,f.options)+"</span>").appendTo(c.find(".mejs-time")):(c.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"),a('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+mejs.Utility.secondsToTimeCode(f.options.duration,f.options)+"</span></div>").appendTo(c)),f.durationD=f.controls.find(".mejs-duration"),e.addEventListener("timeupdate",function(){b.updateDuration()},!1)},updateCurrent:function(){var a=this,b=a.media.currentTime;isNaN(b)&&(b=0),a.currenttime&&a.currenttime.html(mejs.Utility.secondsToTimeCode(b,a.options))},updateDuration:function(){var a=this,b=a.media.duration;a.options.duration>0&&(b=a.options.duration),isNaN(b)&&(b=0),a.container.toggleClass("mejs-long-video",b>3600),a.durationD&&b>0&&a.durationD.html(mejs.Utility.secondsToTimeCode(b,a.options))}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),allyVolumeControlText:mejs.i18n.t("Use Up/Down Arrow keys to increase or decrease volume."),hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical"}),a.extend(MediaElementPlayer.prototype,{buildvolume:function(b,c,d,e){if(!mejs.MediaFeatures.isAndroid&&!mejs.MediaFeatures.isiOS||!this.options.hideVolumeOnTouchDevices){var f=this,g=f.isVideo?f.options.videoVolume:f.options.audioVolume,h="horizontal"==g?a('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+f.id+'" title="'+f.options.muteText+'" aria-label="'+f.options.muteText+'"></button></div><a href="javascript:void(0);" class="mejs-horizontal-volume-slider"><span class="mejs-offscreen">'+f.options.allyVolumeControlText+'</span><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></a>').appendTo(c):a('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+f.id+'" title="'+f.options.muteText+'" aria-label="'+f.options.muteText+'"></button><a href="javascript:void(0);" class="mejs-volume-slider"><span class="mejs-offscreen">'+f.options.allyVolumeControlText+'</span><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></a></div>').appendTo(c),i=f.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),j=f.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),k=f.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),l=f.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),m=function(a,b){if(!i.is(":visible")&&"undefined"==typeof b)return i.show(),m(a,!0),void i.hide();a=Math.max(0,a),a=Math.min(a,1),0===a?(h.removeClass("mejs-mute").addClass("mejs-unmute"),h.children("button").attr("title",mejs.i18n.t("Unmute")).attr("aria-label",mejs.i18n.t("Unmute"))):(h.removeClass("mejs-unmute").addClass("mejs-mute"),h.children("button").attr("title",mejs.i18n.t("Mute")).attr("aria-label",mejs.i18n.t("Mute")));var c=j.position();if("vertical"==g){var d=j.height(),e=d-d*a;l.css("top",Math.round(c.top+e-l.height()/2)),k.height(d-e),k.css("top",c.top+e)}else{var f=j.width(),n=f*a;l.css("left",Math.round(c.left+n-l.width()/2)),k.width(Math.round(n))}},n=function(a){var b=null,c=j.offset();if("vertical"===g){var d=j.height(),f=a.pageY-c.top;if(b=(d-f)/d,0===c.top||0===c.left)return}else{var h=j.width(),i=a.pageX-c.left;b=i/h}b=Math.max(0,b),b=Math.min(b,1),m(b),0===b?e.setMuted(!0):e.setMuted(!1),e.setVolume(b)},o=!1,p=!1;h.hover(function(){i.show(),p=!0},function(){p=!1,o||"vertical"!=g||i.hide()});var q=function(a){var b=Math.floor(100*e.volume);i.attr({"aria-label":mejs.i18n.t("Volume Slider"),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":b,"aria-valuetext":b+"%",role:"slider",tabindex:0})};i.bind("mouseover",function(){p=!0}).bind("mousedown",function(a){return n(a),f.globalBind("mousemove.vol",function(a){n(a)}),f.globalBind("mouseup.vol",function(){o=!1,f.globalUnbind(".vol"),p||"vertical"!=g||i.hide()}),o=!0,!1}).bind("keydown",function(a){var b=a.keyCode,c=e.volume;switch(b){case 38:c=Math.min(c+.1,1);break;case 40:c=Math.max(0,c-.1);break;default:return!0}return o=!1,m(c),e.setVolume(c),!1}),h.find("button").click(function(){e.setMuted(!e.muted)}),h.find("button").bind("focus",function(){i.show()}),e.addEventListener("volumechange",function(a){o||(e.muted?(m(0),h.removeClass("mejs-mute").addClass("mejs-unmute")):(m(e.volume),h.removeClass("mejs-unmute").addClass("mejs-mute"))),q(a)},!1),0===b.options.startVolume&&e.setMuted(!0),"native"===e.pluginType&&e.setVolume(b.options.startVolume),f.container.on("controlsresize",function(){m(e.volume)})}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{usePluginFullScreen:!0,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")}),a.extend(MediaElementPlayer.prototype,{isFullScreen:!1,isNativeFullScreen:!1,isInIframe:!1,fullscreenMode:"",buildfullscreen:function(b,c,d,e){if(b.isVideo){b.isInIframe=window.location!=window.parent.location,e.addEventListener("play",function(){b.detectFullscreenMode()});var f=this,g=null,h=a('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+f.id+'" title="'+f.options.fullscreenText+'" aria-label="'+f.options.fullscreenText+'"></button></div>').appendTo(c).on("click",function(){var a=mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||b.isFullScreen;a?b.exitFullScreen():b.enterFullScreen()}).on("mouseover",function(){if("plugin-hover"==f.fullscreenMode){null!==g&&(clearTimeout(g),delete g);var a=h.offset(),c=b.container.offset();e.positionFullscreenButton(a.left-c.left,a.top-c.top,!0);
+}}).on("mouseout",function(){"plugin-hover"==f.fullscreenMode&&(null!==g&&(clearTimeout(g),delete g),g=setTimeout(function(){e.hideFullscreenButton()},1500))});if(b.fullscreenBtn=h,f.globalBind("keydown",function(a){27==a.keyCode&&(mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||f.isFullScreen)&&b.exitFullScreen()}),f.normalHeight=0,f.normalWidth=0,mejs.MediaFeatures.hasTrueNativeFullScreen){var i=function(a){b.isFullScreen&&(mejs.MediaFeatures.isFullScreen()?(b.isNativeFullScreen=!0,b.setControlsSize()):(b.isNativeFullScreen=!1,b.exitFullScreen()))};b.globalBind(mejs.MediaFeatures.fullScreenEventName,i)}}},detectFullscreenMode:function(){var a=this,b="",c=mejs.MediaFeatures;return c.hasTrueNativeFullScreen&&"native"===a.media.pluginType?b="native-native":c.hasTrueNativeFullScreen&&"native"!==a.media.pluginType&&!c.hasFirefoxPluginMovingProblem?b="plugin-native":a.usePluginFullScreen?mejs.MediaFeatures.supportsPointerEvents?(b="plugin-click",a.createPluginClickThrough()):b="plugin-hover":b="fullwindow",a.fullscreenMode=b,b},isPluginClickThroughCreated:!1,createPluginClickThrough:function(){var b=this;if(!b.isPluginClickThroughCreated){var c,d,e=!1,f=function(){if(e){for(var a in g)g[a].hide();b.fullscreenBtn.css("pointer-events",""),b.controls.css("pointer-events",""),b.media.removeEventListener("click",b.clickToPlayPauseCallback),e=!1}},g={},h=["top","left","right","bottom"],i=function(){var a=fullscreenBtn.offset().left-b.container.offset().left,d=fullscreenBtn.offset().top-b.container.offset().top,e=fullscreenBtn.outerWidth(!0),f=fullscreenBtn.outerHeight(!0),h=b.container.width(),i=b.container.height();for(c in g)g[c].css({position:"absolute",top:0,left:0});g.top.width(h).height(d),g.left.width(a).height(f).css({top:d}),g.right.width(h-a-e).height(f).css({top:d,left:a+e}),g.bottom.width(h).height(i-f-d).css({top:d+f})};for(b.globalBind("resize",function(){i()}),c=0,d=h.length;d>c;c++)g[h[c]]=a('<div class="mejs-fullscreen-hover" />').appendTo(b.container).mouseover(f).hide();fullscreenBtn.on("mouseover",function(){if(!b.isFullScreen){var a=fullscreenBtn.offset(),d=player.container.offset();media.positionFullscreenButton(a.left-d.left,a.top-d.top,!1),b.fullscreenBtn.css("pointer-events","none"),b.controls.css("pointer-events","none"),b.media.addEventListener("click",b.clickToPlayPauseCallback);for(c in g)g[c].show();i(),e=!0}}),media.addEventListener("fullscreenchange",function(a){b.isFullScreen=!b.isFullScreen,b.isFullScreen?b.media.removeEventListener("click",b.clickToPlayPauseCallback):b.media.addEventListener("click",b.clickToPlayPauseCallback),f()}),b.globalBind("mousemove",function(a){if(e){var c=fullscreenBtn.offset();(a.pageY<c.top||a.pageY>c.top+fullscreenBtn.outerHeight(!0)||a.pageX<c.left||a.pageX>c.left+fullscreenBtn.outerWidth(!0))&&(fullscreenBtn.css("pointer-events",""),b.controls.css("pointer-events",""),e=!1)}}),b.isPluginClickThroughCreated=!0}},cleanfullscreen:function(a){a.exitFullScreen()},containerSizeTimeout:null,enterFullScreen:function(){var b=this;return mejs.MediaFeatures.hasiOSFullScreen?void b.media.webkitEnterFullscreen():(a(document.documentElement).addClass("mejs-fullscreen"),b.normalHeight=b.container.height(),b.normalWidth=b.container.width(),"native-native"===b.fullscreenMode||"plugin-native"===b.fullscreenMode?(mejs.MediaFeatures.requestFullScreen(b.container[0]),b.isInIframe&&setTimeout(function c(){if(b.isNativeFullScreen){var d=.002,e=a(window).width(),f=screen.width,g=Math.abs(f-e),h=f*d;g>h?b.exitFullScreen():setTimeout(c,500)}},1e3)):"fullwindow"==b.fullscreeMode,b.container.addClass("mejs-container-fullscreen").width("100%").height("100%"),b.containerSizeTimeout=setTimeout(function(){b.container.css({width:"100%",height:"100%"}),b.setControlsSize()},500),"native"===b.media.pluginType?b.$media.width("100%").height("100%"):(b.container.find(".mejs-shim").width("100%").height("100%"),setTimeout(function(){var c=a(window),d=c.width(),e=c.height();b.media.setVideoSize(d,e)},500)),b.layers.children("div").width("100%").height("100%"),b.fullscreenBtn&&b.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen"),b.setControlsSize(),b.isFullScreen=!0,b.container.find(".mejs-captions-text").css("font-size",screen.width/b.width*1*100+"%"),b.container.find(".mejs-captions-position").css("bottom","45px"),void b.container.trigger("enteredfullscreen"))},exitFullScreen:function(){var b=this;clearTimeout(b.containerSizeTimeout),mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||b.isFullScreen)&&mejs.MediaFeatures.cancelFullScreen(),a(document.documentElement).removeClass("mejs-fullscreen"),b.container.removeClass("mejs-container-fullscreen").width(b.normalWidth).height(b.normalHeight),"native"===b.media.pluginType?b.$media.width(b.normalWidth).height(b.normalHeight):(b.container.find(".mejs-shim").width(b.normalWidth).height(b.normalHeight),b.media.setVideoSize(b.normalWidth,b.normalHeight)),b.layers.children("div").width(b.normalWidth).height(b.normalHeight),b.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen"),b.setControlsSize(),b.isFullScreen=!1,b.container.find(".mejs-captions-text").css("font-size",""),b.container.find(".mejs-captions-position").css("bottom",""),b.container.trigger("exitedfullscreen")}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{speeds:["2.00","1.50","1.25","1.00","0.75"],defaultSpeed:"1.00",speedChar:"x"}),a.extend(MediaElementPlayer.prototype,{buildspeed:function(b,c,d,e){var f=this;if("native"==f.media.pluginType){for(var g=null,h=null,i=null,j=null,k=[],l=!1,m=0,n=f.options.speeds.length;n>m;m++){var o=f.options.speeds[m];"string"==typeof o?(k.push({name:o+f.options.speedChar,value:o}),o===f.options.defaultSpeed&&(l=!0)):(k.push(o),o.value===f.options.defaultSpeed&&(l=!0))}l||k.push({name:f.options.defaultSpeed+f.options.speedChar,value:f.options.defaultSpeed}),k.sort(function(a,b){return parseFloat(b.value)-parseFloat(a.value)});var p=function(a){for(m=0,n=k.length;n>m;m++)if(k[m].value===a)return k[m].name},q='<div class="mejs-button mejs-speed-button"><button type="button">'+p(f.options.defaultSpeed)+'</button><div class="mejs-speed-selector"><ul>';for(m=0,il=k.length;m<il;m++)j=f.id+"-speed-"+k[m].value,q+='<li><input type="radio" name="speed" value="'+k[m].value+'" id="'+j+'" '+(k[m].value===f.options.defaultSpeed?" checked":"")+' /><label for="'+j+'" '+(k[m].value===f.options.defaultSpeed?' class="mejs-speed-selected"':"")+">"+k[m].name+"</label></li>";q+="</ul></div></div>",g=a(q).appendTo(c),h=g.find(".mejs-speed-selector"),i=f.options.defaultSpeed,e.addEventListener("loadedmetadata",function(a){i&&(e.playbackRate=parseFloat(i))},!0),h.on("click",'input[type="radio"]',function(){var b=a(this).attr("value");i=b,e.playbackRate=parseFloat(b),g.find("button").html(p(b)),g.find(".mejs-speed-selected").removeClass("mejs-speed-selected"),g.find('input[type="radio"]:checked').next().addClass("mejs-speed-selected")}),g.one("mouseenter focusin",function(){h.height(g.find(".mejs-speed-selector ul").outerHeight(!0)+g.find(".mejs-speed-translations").outerHeight(!0)).css("top",-1*h.height()+"px")})}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),tracksAriaLive:!1,hideCaptionsButtonWhenEmpty:!0,toggleCaptionsButtonWhenOnlyOne:!1,slidesSelector:""}),a.extend(MediaElementPlayer.prototype,{hasChapters:!1,cleartracks:function(a,b,c,d){a&&(a.captions&&a.captions.remove(),a.chapters&&a.chapters.remove(),a.captionsText&&a.captionsText.remove(),a.captionsButton&&a.captionsButton.remove())},buildtracks:function(b,c,d,e){if(0!==b.tracks.length){var f,g=this,h=g.options.tracksAriaLive?'role="log" aria-live="assertive" aria-atomic="false"':"";if(g.domNode.textTracks)for(f=g.domNode.textTracks.length-1;f>=0;f--)g.domNode.textTracks[f].mode="hidden";g.cleartracks(b,c,d,e),b.chapters=a('<div class="mejs-chapters mejs-layer"></div>').prependTo(d).hide(),b.captions=a('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover" '+h+'><span class="mejs-captions-text"></span></div></div>').prependTo(d).hide(),b.captionsText=b.captions.find(".mejs-captions-text"),b.captionsButton=a('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+g.id+'" title="'+g.options.tracksText+'" aria-label="'+g.options.tracksText+'"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+b.id+'_captions" id="'+b.id+'_captions_none" value="none" checked="checked" /><label for="'+b.id+'_captions_none">'+mejs.i18n.t("None")+"</label></li></ul></div></div>").appendTo(c);var i=0;for(f=0;f<b.tracks.length;f++)"subtitles"==b.tracks[f].kind&&i++;for(g.options.toggleCaptionsButtonWhenOnlyOne&&1==i?b.captionsButton.on("click",function(){null===b.selectedTrack?lang=b.tracks[0].srclang:lang="none",b.setTrack(lang)}):(b.captionsButton.on("mouseenter focusin",function(){a(this).find(".mejs-captions-selector").removeClass("mejs-offscreen")}).on("click","input[type=radio]",function(){lang=this.value,b.setTrack(lang)}),b.captionsButton.on("mouseleave focusout",function(){a(this).find(".mejs-captions-selector").addClass("mejs-offscreen")})),b.options.alwaysShowControls?b.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):b.container.bind("controlsshown",function(){b.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("controlshidden",function(){e.paused||b.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")}),b.trackToLoad=-1,b.selectedTrack=null,b.isLoadingTrack=!1,f=0;f<b.tracks.length;f++)"subtitles"==b.tracks[f].kind&&b.addTrackButton(b.tracks[f].srclang,b.tracks[f].label);b.loadNextTrack(),e.addEventListener("timeupdate",function(a){b.displayCaptions()},!1),""!==b.options.slidesSelector&&(b.slidesContainer=a(b.options.slidesSelector),e.addEventListener("timeupdate",function(a){b.displaySlides()},!1)),e.addEventListener("loadedmetadata",function(a){b.displayChapters()},!1),b.container.hover(function(){b.hasChapters&&(b.chapters.removeClass("mejs-offscreen"),b.chapters.fadeIn(200).height(b.chapters.find(".mejs-chapter").outerHeight()))},function(){b.hasChapters&&!e.paused&&b.chapters.fadeOut(200,function(){a(this).addClass("mejs-offscreen"),a(this).css("display","block")})}),g.container.on("controlsresize",function(){g.adjustLanguageBox()}),null!==b.node.getAttribute("autoplay")&&b.chapters.addClass("mejs-offscreen")}},setTrack:function(a){var b,c=this;if("none"==a)c.selectedTrack=null,c.captionsButton.removeClass("mejs-captions-enabled");else for(b=0;b<c.tracks.length;b++)if(c.tracks[b].srclang==a){null===c.selectedTrack&&c.captionsButton.addClass("mejs-captions-enabled"),c.selectedTrack=c.tracks[b],c.captions.attr("lang",c.selectedTrack.srclang),c.displayCaptions();break}},loadNextTrack:function(){var a=this;a.trackToLoad++,a.trackToLoad<a.tracks.length?(a.isLoadingTrack=!0,a.loadTrack(a.trackToLoad)):(a.isLoadingTrack=!1,a.checkForTracks())},loadTrack:function(b){var c=this,d=c.tracks[b],e=function(){d.isLoaded=!0,c.enableTrackButton(d.srclang,d.label),c.loadNextTrack()};a.ajax({url:d.src,dataType:"text",success:function(a){"string"==typeof a&&/<tt\s+xml/gi.exec(a)?d.entries=mejs.TrackFormatParser.dfxp.parse(a):d.entries=mejs.TrackFormatParser.webvtt.parse(a),e(),"chapters"==d.kind&&c.media.addEventListener("play",function(a){c.media.duration>0&&c.displayChapters(d)},!1),"slides"==d.kind&&c.setupSlides(d)},error:function(){c.removeTrackButton(d.srclang),c.loadNextTrack()}})},enableTrackButton:function(b,c){var d=this;""===c&&(c=mejs.language.codes[b]||b),d.captionsButton.find("input[value="+b+"]").prop("disabled",!1).siblings("label").html(c),d.options.startLanguage==b&&a("#"+d.id+"_captions_"+b).prop("checked",!0).trigger("click"),d.adjustLanguageBox()},removeTrackButton:function(a){var b=this;b.captionsButton.find("input[value="+a+"]").closest("li").remove(),b.adjustLanguageBox()},addTrackButton:function(b,c){var d=this;""===c&&(c=mejs.language.codes[b]||b),d.captionsButton.find("ul").append(a('<li><input type="radio" name="'+d.id+'_captions" id="'+d.id+"_captions_"+b+'" value="'+b+'" disabled="disabled" /><label for="'+d.id+"_captions_"+b+'">'+c+" (loading)</label></li>")),d.adjustLanguageBox(),d.container.find(".mejs-captions-translations option[value="+b+"]").remove()},adjustLanguageBox:function(){var a=this;a.captionsButton.find(".mejs-captions-selector").height(a.captionsButton.find(".mejs-captions-selector ul").outerHeight(!0)+a.captionsButton.find(".mejs-captions-translations").outerHeight(!0))},checkForTracks:function(){var a=this,b=!1;if(a.options.hideCaptionsButtonWhenEmpty){for(i=0;i<a.tracks.length;i++)if("subtitles"==a.tracks[i].kind&&a.tracks[i].isLoaded){b=!0;break}b||(a.captionsButton.hide(),a.setControlsSize())}},displayCaptions:function(){if("undefined"!=typeof this.tracks){var a,b=this,c=b.selectedTrack;if(null!==c&&c.isLoaded){for(a=0;a<c.entries.times.length;a++)if(b.media.currentTime>=c.entries.times[a].start&&b.media.currentTime<=c.entries.times[a].stop)return b.captionsText.html(c.entries.text[a]).attr("class","mejs-captions-text "+(c.entries.times[a].identifier||"")),void b.captions.show().height(0);b.captions.hide()}else b.captions.hide()}},setupSlides:function(a){var b=this;b.slides=a,b.slides.entries.imgs=[b.slides.entries.text.length],b.showSlide(0)},showSlide:function(b){if("undefined"!=typeof this.tracks&&"undefined"!=typeof this.slidesContainer){var c=this,d=c.slides.entries.text[b],e=c.slides.entries.imgs[b];"undefined"==typeof e||"undefined"==typeof e.fadeIn?c.slides.entries.imgs[b]=e=a('<img src="'+d+'">').on("load",function(){e.appendTo(c.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()}):e.is(":visible")||e.is(":animated")||e.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if("undefined"!=typeof this.slides){var a,b=this,c=b.slides;for(a=0;a<c.entries.times.length;a++)if(b.media.currentTime>=c.entries.times[a].start&&b.media.currentTime<=c.entries.times[a].stop)return void b.showSlide(a)}},displayChapters:function(){var a,b=this;for(a=0;a<b.tracks.length;a++)if("chapters"==b.tracks[a].kind&&b.tracks[a].isLoaded){b.drawChapters(b.tracks[a]),b.hasChapters=!0;break}},drawChapters:function(b){var c,d,e=this,f=0,g=0;for(e.chapters.empty(),c=0;c<b.entries.times.length;c++)d=b.entries.times[c].stop-b.entries.times[c].start,f=Math.floor(d/e.media.duration*100),(f+g>100||c==b.entries.times.length-1&&100>f+g)&&(f=100-g),e.chapters.append(a('<div class="mejs-chapter" rel="'+b.entries.times[c].start+'" style="left: '+g.toString()+"%;width: "+f.toString()+'%;"><div class="mejs-chapter-block'+(c==b.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+b.entries.text[c]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(b.entries.times[c].start,e.options)+"&ndash;"+mejs.Utility.secondsToTimeCode(b.entries.times[c].stop,e.options)+"</span></div></div>")),g+=f;e.chapters.find("div.mejs-chapter").click(function(){e.media.setCurrentTime(parseFloat(a(this).attr("rel"))),e.media.paused&&e.media.play()}),e.chapters.show()}}),mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",fl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}},mejs.TrackFormatParser={webvtt:{pattern_timecode:/^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(b){for(var c,d,e,f=0,g=mejs.TrackFormatParser.split2(b,/\r?\n/),h={text:[],times:[]};f<g.length;f++){if(c=this.pattern_timecode.exec(g[f]),c&&f<g.length){for(f-1>=0&&""!==g[f-1]&&(e=g[f-1]),f++,d=g[f],f++;""!==g[f]&&f<g.length;)d=d+"\n"+g[f],f++;d=a.trim(d).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),h.text.push(d),h.times.push({identifier:e,start:0===mejs.Utility.convertSMPTEtoSeconds(c[1])?.2:mejs.Utility.convertSMPTEtoSeconds(c[1]),stop:mejs.Utility.convertSMPTEtoSeconds(c[3]),settings:c[5]})}e=""}return h}},dfxp:{parse:function(b){b=a(b).filter("tt");var c,d,e=0,f=b.children("div").eq(0),g=f.find("p"),h=b.find("#"+f.attr("style")),i={text:[],times:[]};if(h.length){var j=h.removeAttr("id").get(0).attributes;if(j.length)for(c={},e=0;e<j.length;e++)c[j[e].name.split(":")[1]]=j[e].value}for(e=0;e<g.length;e++){var k,l={start:null,stop:null,style:null};if(g.eq(e).attr("begin")&&(l.start=mejs.Utility.convertSMPTEtoSeconds(g.eq(e).attr("begin"))),!l.start&&g.eq(e-1).attr("end")&&(l.start=mejs.Utility.convertSMPTEtoSeconds(g.eq(e-1).attr("end"))),g.eq(e).attr("end")&&(l.stop=mejs.Utility.convertSMPTEtoSeconds(g.eq(e).attr("end"))),!l.stop&&g.eq(e+1).attr("begin")&&(l.stop=mejs.Utility.convertSMPTEtoSeconds(g.eq(e+1).attr("begin"))),c){k="";for(var m in c)k+=m+":"+c[m]+";"}k&&(l.style=k),0===l.start&&(l.start=.2),i.times.push(l),d=a.trim(g.eq(e).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),i.text.push(d),0===i.times.start&&(i.times.start=2)}return i}},split2:function(a,b){return a.split(b)}},3!="x\n\ny".split(/\n/gi).length&&(mejs.TrackFormatParser.split2=function(a,b){var c,d=[],e="";for(c=0;c<a.length;c++)e+=a.substring(c,c+1),b.test(e)&&(d.push(e.replace(b,"")),e="");return d.push(e),d})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){return"undefined"==typeof a.enterFullScreen?null:a.isFullScreen?mejs.i18n.t("Turn off Fullscreen"):mejs.i18n.t("Go Fullscreen")},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?mejs.i18n.t("Unmute"):mejs.i18n.t("Mute")},click:function(a){a.media.muted?a.setMuted(!1):a.setMuted(!0)}},{isSeparator:!0},{render:function(a){return mejs.i18n.t("Download Video")},click:function(a){window.location.href=a.media.currentSrc}}]}),a.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(b,c,d,e){b.contextMenu=a('<div class="mejs-contextmenu"></div>').appendTo(a("body")).hide(),b.container.bind("contextmenu",function(a){return b.isContextMenuEnabled?(a.preventDefault(),b.renderContextMenu(a.clientX-1,a.clientY-1),!1):void 0}),b.container.bind("click",function(){b.contextMenu.hide()}),b.contextMenu.bind("mouseleave",function(){b.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()},isContextMenuEnabled:!0,enableContextMenu:function(){this.isContextMenuEnabled=!0},disableContextMenu:function(){this.isContextMenuEnabled=!1},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer(),a.contextMenuTimer=setTimeout(function(){a.hideContextMenu(),a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;null!=a&&(clearTimeout(a),delete a,a=null)},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(b,c){for(var d=this,e="",f=d.options.contextMenuItems,g=0,h=f.length;h>g;g++)if(f[g].isSeparator)e+='<div class="mejs-contextmenu-separator"></div>';else{var i=f[g].render(d);null!=i&&(e+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+1e6*Math.random()+'">'+i+"</div>")}d.contextMenu.empty().append(a(e)).css({top:c,left:b}).show(),d.contextMenu.find(".mejs-contextmenu-item").each(function(){var b=a(this),c=parseInt(b.data("itemindex"),10),e=d.options.contextMenuItems[c];"undefined"!=typeof e.show&&e.show(b,d),b.click(function(){"undefined"!=typeof e.click&&e.click(d),d.contextMenu.hide()})}),setTimeout(function(){d.killControlsTimer("rev3")},100)}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{skipBackInterval:30,skipBackText:mejs.i18n.t("Skip back %1 seconds")}),a.extend(MediaElementPlayer.prototype,{buildskipback:function(b,c,d,e){var f=this,g=f.options.skipBackText.replace("%1",f.options.skipBackInterval);a('<div class="mejs-button mejs-skip-back-button"><button type="button" aria-controls="'+f.id+'" title="'+g+'" aria-label="'+g+'">'+f.options.skipBackInterval+"</button></div>").appendTo(c).click(function(){e.setCurrentTime(Math.max(e.currentTime-f.options.skipBackInterval,0)),a(this).find("button").blur()})}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")}),a.extend(MediaElementPlayer.prototype,{buildpostroll:function(b,c,d,e){var f=this,g=f.container.find('link[rel="postroll"]').attr("href");"undefined"!=typeof g&&(b.postroll=a('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+f.options.postrollCloseText+'</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(d).hide(),f.media.addEventListener("ended",function(c){a.ajax({dataType:"html",url:g,success:function(a,b){d.find(".mejs-postroll-layer-content").html(a)}}),b.postroll.show()},!1))}})}(mejs.$);
\ No newline at end of file
index 93605e8dce838f08e5a9514ddcceaca0723775ea..fced6edc69c40853e20802b228cbd8a8eb5ca365 100644 (file)
@@ -1 +1 @@
-.mejs-offscreen{position:absolute!important;top:-10000px;left:-10000px;overflow:hidden;width:1px;height:1px}.mejs-container{position:relative;background:#000;font-family:Helvetica,Arial;text-align:left;vertical-align:top;text-indent:0}.mejs-container:focus{outline:0}.me-plugin{position:absolute}.mejs-embed,.mejs-embed body{width:100%;height:100%;margin:0;padding:0;background:#000;overflow:hidden}.mejs-fullscreen{overflow:hidden!important}.mejs-container-fullscreen{position:fixed;left:0;top:0;right:0;bottom:0;overflow:hidden;z-index:1000}.mejs-container-fullscreen .mejs-mediaelement,.mejs-container-fullscreen video{width:100%;height:100%}.mejs-clear{clear:both}.mejs-background{position:absolute;top:0;left:0}.mejs-mediaelement{position:absolute;top:0;left:0;width:100%;height:100%}.mejs-poster{position:absolute;top:0;left:0;background-size:contain;background-position:50% 50%;background-repeat:no-repeat}:root .mejs-poster img{display:none}.mejs-poster img{border:0;padding:0;border:0}.mejs-overlay{position:absolute;top:0;left:0}.mejs-overlay-play{cursor:pointer}.mejs-overlay-button{position:absolute;top:50%;left:50%;width:100px;height:100px;margin:-50px 0 0 -50px;background:url(bigplay.svg) no-repeat}.no-svg .mejs-overlay-button{background-image:url(bigplay.png)}.mejs-overlay:hover .mejs-overlay-button{background-position:0 -100px}.mejs-overlay-loading{position:absolute;top:50%;left:50%;width:80px;height:80px;margin:-40px 0 0 -40px;background:#333;background:url(background.png);background:rgba(0,0,0,.9);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(50,50,50,.9)),to(rgba(0,0,0,.9)));background:-webkit-linear-gradient(top,rgba(50,50,50,.9),rgba(0,0,0,.9));background:-moz-linear-gradient(top,rgba(50,50,50,.9),rgba(0,0,0,.9));background:-o-linear-gradient(top,rgba(50,50,50,.9),rgba(0,0,0,.9));background:-ms-linear-gradient(top,rgba(50,50,50,.9),rgba(0,0,0,.9));background:linear-gradient(rgba(50,50,50,.9),rgba(0,0,0,.9))}.mejs-overlay-loading span{display:block;width:80px;height:80px;background:transparent url(loading.gif) 50% 50% no-repeat}.mejs-container .mejs-controls{position:absolute;list-style-type:none;margin:0;padding:0;bottom:0;left:0;background:url(background.png);background:rgba(0,0,0,.7);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(50,50,50,.7)),to(rgba(0,0,0,.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-moz-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-o-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-ms-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:linear-gradient(rgba(50,50,50,.7),rgba(0,0,0,.7));height:30px;width:100%}.mejs-container .mejs-controls div{list-style-type:none;background-image:none;display:block;float:left;margin:0;padding:0;width:26px;height:26px;font-size:11px;line-height:11px;font-family:Helvetica,Arial;border:0}.mejs-controls .mejs-button button{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;padding:0;position:absolute;height:16px;width:16px;border:0;background:transparent url(controls.svg) no-repeat}.no-svg .mejs-controls .mejs-button button{background-image:url(controls.png)}.mejs-controls .mejs-button button:focus{outline:dotted 1px #999}.mejs-container .mejs-controls .mejs-time{color:#fff;display:block;height:17px;width:auto;padding:10px 3px 0;overflow:hidden;text-align:center;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.mejs-container .mejs-controls .mejs-time a{color:#fff;font-size:11px;line-height:12px;display:block;float:left;margin:1px 2px 0 0;width:auto}.mejs-controls .mejs-play button{background-position:0 0}.mejs-controls .mejs-pause button{background-position:0 -16px}.mejs-controls .mejs-stop button{background-position:-112px 0}.mejs-controls div.mejs-time-rail{direction:ltr;width:200px;padding-top:5px}.mejs-controls .mejs-time-rail span,.mejs-controls .mejs-time-rail a{display:block;position:absolute;width:180px;height:10px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;cursor:pointer}.mejs-controls .mejs-time-rail .mejs-time-total{margin:5px;background:#333;background:rgba(50,50,50,.8);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(30,30,30,.8)),to(rgba(60,60,60,.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-moz-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-o-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-ms-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:linear-gradient(rgba(30,30,30,.8),rgba(60,60,60,.8))}.mejs-controls .mejs-time-rail .mejs-time-buffering{width:100%;background-image:-o-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:15px 15px;-moz-background-size:15px 15px;-o-background-size:15px 15px;background-size:15px 15px;-webkit-animation:buffering-stripes 2s linear infinite;-moz-animation:buffering-stripes 2s linear infinite;-ms-animation:buffering-stripes 2s linear infinite;-o-animation:buffering-stripes 2s linear infinite;animation:buffering-stripes 2s linear infinite}@-webkit-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@-moz-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@-ms-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@-o-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}.mejs-controls .mejs-time-rail .mejs-time-loaded{background:#3caac8;background:rgba(60,170,200,.8);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(44,124,145,.8)),to(rgba(78,183,212,.8)));background:-webkit-linear-gradient(top,rgba(44,124,145,.8),rgba(78,183,212,.8));background:-moz-linear-gradient(top,rgba(44,124,145,.8),rgba(78,183,212,.8));background:-o-linear-gradient(top,rgba(44,124,145,.8),rgba(78,183,212,.8));background:-ms-linear-gradient(top,rgba(44,124,145,.8),rgba(78,183,212,.8));background:linear-gradient(rgba(44,124,145,.8),rgba(78,183,212,.8));width:0}.mejs-controls .mejs-time-rail .mejs-time-current{background:#fff;background:rgba(255,255,255,.8);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(255,255,255,.9)),to(rgba(200,200,200,.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-moz-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-o-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-ms-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:linear-gradient(rgba(255,255,255,.9),rgba(200,200,200,.8));width:0}.mejs-controls .mejs-time-rail .mejs-time-handle{display:none;position:absolute;margin:0;width:10px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;cursor:pointer;border:solid 2px #333;top:-2px;text-align:center}.mejs-controls .mejs-time-rail .mejs-time-float{position:absolute;display:none;background:#eee;width:36px;height:17px;border:solid 1px #333;top:-26px;margin-left:-18px;text-align:center;color:#111}.mejs-controls .mejs-time-rail .mejs-time-float-current{margin:2px;width:30px;display:block;text-align:center;left:0}.mejs-controls .mejs-time-rail .mejs-time-float-corner{position:absolute;display:block;width:0;height:0;line-height:0;border:solid 5px #eee;border-color:#eee transparent transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:15px;left:13px}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float{width:48px}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-current{width:44px}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-corner{left:18px}.mejs-controls .mejs-fullscreen-button button{background-position:-32px 0}.mejs-controls .mejs-unfullscreen button{background-position:-32px -16px}.mejs-controls .mejs-volume-button{}.mejs-controls .mejs-mute button{background-position:-16px -16px}.mejs-controls .mejs-unmute button{background-position:-16px 0}.mejs-controls .mejs-volume-button{position:relative}.mejs-controls .mejs-volume-button .mejs-volume-slider{display:none;height:115px;width:25px;background:url(background.png);background:rgba(50,50,50,.7);-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:-115px;left:0;z-index:1;position:absolute;margin:0}.mejs-controls .mejs-volume-button:hover{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-total{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,.5);margin:0}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-current{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,.9);margin:0}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-handle{position:absolute;left:4px;top:-3px;width:16px;height:6px;background:#ddd;background:rgba(255,255,255,.9);cursor:N-resize;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;margin:0}.mejs-controls a.mejs-horizontal-volume-slider{height:26px;width:56px;position:relative;display:block;float:left;vertical-align:middle}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#333;background:rgba(50,50,50,.8);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(30,30,30,.8)),to(rgba(60,60,60,.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-moz-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-o-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-ms-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:linear-gradient(rgba(30,30,30,.8),rgba(60,60,60,.8))}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#fff;background:rgba(255,255,255,.8);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(255,255,255,.9)),to(rgba(200,200,200,.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-moz-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-o-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-ms-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:linear-gradient(rgba(255,255,255,.9),rgba(200,200,200,.8))}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-handle{display:none}.mejs-controls .mejs-captions-button{position:relative}.mejs-controls .mejs-captions-button button{background-position:-48px 0}.mejs-controls .mejs-captions-button .mejs-captions-selector{visibility:hidden;position:absolute;bottom:26px;right:-51px;width:85px;height:100px;background:url(background.png);background:rgba(50,50,50,.7);border:solid 1px transparent;padding:10px 10px 0;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mejs-controls .mejs-captions-button .mejs-captions-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li{margin:0 0 6px;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li label{width:55px;float:left;padding:4px 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px}.mejs-controls .mejs-captions-button .mejs-captions-translations{font-size:10px;margin:0 0 5px}.mejs-chapters{position:absolute;top:0;left:0;-xborder-right:solid 1px #fff;width:10000px;z-index:1}.mejs-chapters .mejs-chapter{position:absolute;float:left;background:#222;background:rgba(0,0,0,.7);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(50,50,50,.7)),to(rgba(0,0,0,.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-moz-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-o-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-ms-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:linear-gradient(rgba(50,50,50,.7),rgba(0,0,0,.7));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#323232, endColorstr=#000000);overflow:hidden;border:0}.mejs-chapters .mejs-chapter .mejs-chapter-block{font-size:11px;color:#fff;padding:5px;display:block;border-right:solid 1px #333;border-bottom:solid 1px #333;cursor:pointer}.mejs-chapters .mejs-chapter .mejs-chapter-block-last{border-right:0}.mejs-chapters .mejs-chapter .mejs-chapter-block:hover{background:#666;background:rgba(102,102,102,.7);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(102,102,102,.7)),to(rgba(50,50,50,.6)));background:-webkit-linear-gradient(top,rgba(102,102,102,.7),rgba(50,50,50,.6));background:-moz-linear-gradient(top,rgba(102,102,102,.7),rgba(50,50,50,.6));background:-o-linear-gradient(top,rgba(102,102,102,.7),rgba(50,50,50,.6));background:-ms-linear-gradient(top,rgba(102,102,102,.7),rgba(50,50,50,.6));background:linear-gradient(rgba(102,102,102,.7),rgba(50,50,50,.6));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#666666, endColorstr=#323232)}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-title{font-size:12px;font-weight:700;display:block;white-space:nowrap;text-overflow:ellipsis;margin:0 0 3px;line-height:12px}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-timespan{font-size:12px;line-height:12px;margin:3px 0 4px;display:block;white-space:nowrap;text-overflow:ellipsis}.mejs-captions-layer{position:absolute;bottom:0;left:0;text-align:center;line-height:20px;font-size:16px;color:#fff}.mejs-captions-layer a{color:#fff;text-decoration:underline}.mejs-captions-layer[lang=ar]{font-size:20px;font-weight:400}.mejs-captions-position{position:absolute;width:100%;bottom:15px;left:0}.mejs-captions-position-hover{bottom:35px}.mejs-captions-text{padding:3px 5px;background:url(background.png);background:rgba(20,20,20,.5);white-space:pre-wrap}.me-cannotplay{}.me-cannotplay a{color:#fff;font-weight:700}.me-cannotplay span{padding:15px;display:block}.mejs-controls .mejs-loop-off button{background-position:-64px -16px}.mejs-controls .mejs-loop-on button{background-position:-64px 0}.mejs-controls .mejs-backlight-off button{background-position:-80px -16px}.mejs-controls .mejs-backlight-on button{background-position:-80px 0}.mejs-controls .mejs-picturecontrols-button{background-position:-96px 0}.mejs-contextmenu{position:absolute;width:150px;padding:10px;border-radius:4px;top:0;left:0;background:#fff;border:solid 1px #999;z-index:1001}.mejs-contextmenu .mejs-contextmenu-separator{height:1px;font-size:0;margin:5px 6px;background:#333}.mejs-contextmenu .mejs-contextmenu-item{font-family:Helvetica,Arial;font-size:12px;padding:4px 6px;cursor:pointer;color:#333}.mejs-contextmenu .mejs-contextmenu-item:hover{background:#2C7C91;color:#fff}.mejs-controls .mejs-sourcechooser-button{position:relative}.mejs-controls .mejs-sourcechooser-button button{background-position:-128px 0}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector{visibility:hidden;position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li{margin:0 0 6px;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li label{width:100px;float:left;padding:4px 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px}.mejs-postroll-layer{position:absolute;bottom:0;left:0;width:100%;height:100%;background:url(background.png);background:rgba(50,50,50,.7);z-index:1000;overflow:hidden}.mejs-postroll-layer-content{width:100%;height:100%}.mejs-postroll-close{position:absolute;right:0;top:0;background:url(background.png);background:rgba(50,50,50,.7);color:#fff;padding:4px;z-index:100;cursor:pointer}div.mejs-speed-button{width:46px!important;position:relative}.mejs-controls .mejs-button.mejs-speed-button button{background:transparent;width:36px;font-size:11px;line-height:normal;color:#fff}.mejs-controls .mejs-speed-button .mejs-speed-selector{display:none;position:absolute;top:-100px;left:-10px;width:60px;height:100px;background:url(background.png);background:rgba(50,50,50,.7);border:solid 1px transparent;padding:0;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mejs-controls .mejs-speed-button:hover>.mejs-speed-selector{display:block}.mejs-controls .mejs-speed-button .mejs-speed-selector ul li label.mejs-speed-selected{color:rgba(33,248,248,1)}.mejs-controls .mejs-speed-button .mejs-speed-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden}.mejs-controls .mejs-speed-button .mejs-speed-selector ul li{margin:0 0 6px;padding:0 10px;list-style-type:none!important;display:block;color:#fff;overflow:hidden}.mejs-controls .mejs-speed-button .mejs-speed-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px;display:none}.mejs-controls .mejs-speed-button .mejs-speed-selector ul li label{width:60px;float:left;padding:4px 0 0;line-height:15px;font-family:helvetica,arial;font-size:11.5px;color:#fff;margin-left:5px;cursor:pointer}.mejs-controls .mejs-speed-button .mejs-speed-selector ul li:hover{background-color:#c8c8c8!important;background-color:rgba(255,255,255,.4)!important}.mejs-controls .mejs-button.mejs-jump-forward-button{background:transparent url(jumpforward.png) no-repeat;background-position:3px 3px}.mejs-controls .mejs-button.mejs-jump-forward-button button{background:transparent;font-size:9px;line-height:normal;color:#fff}.mejs-controls .mejs-button.mejs-skip-back-button{background:transparent url(skipback.png) no-repeat;background-position:3px 3px}.mejs-controls .mejs-button.mejs-skip-back-button button{background:transparent;font-size:9px;line-height:normal;color:#fff}
\ No newline at end of file
+.mejs-offscreen{clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);clip-path:polygon(0px 0,0 0,0 0,0 0);position:absolute!important;height:1px;width:1px;overflow:hidden}.mejs-container{position:relative;background:#000;font-family:Helvetica,Arial;text-align:left;vertical-align:top;text-indent:0}.mejs-fill-container,.mejs-fill-container .mejs-container{width:100%;height:100%}.mejs-fill-container{overflow:hidden}.mejs-container:focus{outline:0}.me-plugin{position:absolute}.mejs-embed,.mejs-embed body{width:100%;height:100%;margin:0;padding:0;background:#000;overflow:hidden}.mejs-fullscreen{overflow:hidden!important}.mejs-container-fullscreen{position:fixed;left:0;top:0;right:0;bottom:0;overflow:hidden;z-index:1000}.mejs-container-fullscreen .mejs-mediaelement,.mejs-container-fullscreen video{width:100%;height:100%}.mejs-clear{clear:both}.mejs-background{position:absolute;top:0;left:0}.mejs-mediaelement{position:absolute;top:0;left:0;width:100%;height:100%}.mejs-poster{position:absolute;top:0;left:0;background-size:contain;background-position:50% 50%;background-repeat:no-repeat}:root .mejs-poster img{display:none}.mejs-poster img{border:0;padding:0;border:0}.mejs-overlay{position:absolute;top:0;left:0}.mejs-overlay-play{cursor:pointer}.mejs-overlay-button{position:absolute;top:50%;left:50%;width:100px;height:100px;margin:-50px 0 0 -50px;background:url(bigplay.svg) no-repeat}.no-svg .mejs-overlay-button{background-image:url(bigplay.png)}.mejs-overlay:hover .mejs-overlay-button{background-position:0 -100px}.mejs-overlay-loading{position:absolute;top:50%;left:50%;width:80px;height:80px;margin:-40px 0 0 -40px;background:#333;background:url(background.png);background:rgba(0,0,0,.9);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(50,50,50,.9)),to(rgba(0,0,0,.9)));background:-webkit-linear-gradient(top,rgba(50,50,50,.9),rgba(0,0,0,.9));background:-moz-linear-gradient(top,rgba(50,50,50,.9),rgba(0,0,0,.9));background:-o-linear-gradient(top,rgba(50,50,50,.9),rgba(0,0,0,.9));background:-ms-linear-gradient(top,rgba(50,50,50,.9),rgba(0,0,0,.9));background:linear-gradient(rgba(50,50,50,.9),rgba(0,0,0,.9))}.mejs-overlay-loading span{display:block;width:80px;height:80px;background:transparent url(loading.gif) 50% 50% no-repeat}.mejs-container .mejs-controls{position:absolute;list-style-type:none;margin:0;padding:0;bottom:0;left:0;background:url(background.png);background:rgba(0,0,0,.7);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(50,50,50,.7)),to(rgba(0,0,0,.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-moz-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-o-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-ms-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:linear-gradient(rgba(50,50,50,.7),rgba(0,0,0,.7));height:30px;width:100%}.mejs-container .mejs-controls div{list-style-type:none;background-image:none;display:block;float:left;margin:0;padding:0;width:26px;height:26px;font-size:11px;line-height:11px;font-family:Helvetica,Arial;border:0}.mejs-controls .mejs-button button{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;padding:0;position:absolute;height:16px;width:16px;border:0;background:transparent url(controls.svg) no-repeat}.no-svg .mejs-controls .mejs-button button{background-image:url(controls.png)}.mejs-controls .mejs-button button:focus{outline:dotted 1px #999}.mejs-container .mejs-controls .mejs-time{color:#fff;display:block;height:17px;width:auto;padding:10px 3px 0;overflow:hidden;text-align:center;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.mejs-container .mejs-controls .mejs-time a{color:#fff;font-size:11px;line-height:12px;display:block;float:left;margin:1px 2px 0 0;width:auto}.mejs-controls .mejs-play button{background-position:0 0}.mejs-controls .mejs-pause button{background-position:0 -16px}.mejs-controls .mejs-stop button{background-position:-112px 0}.mejs-controls div.mejs-time-rail{direction:ltr;width:200px;padding-top:5px}.mejs-controls .mejs-time-rail span,.mejs-controls .mejs-time-rail a{display:block;position:absolute;width:180px;height:10px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;cursor:pointer}.mejs-controls .mejs-time-rail .mejs-time-total{margin:5px;background:#333;background:rgba(50,50,50,.8);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(30,30,30,.8)),to(rgba(60,60,60,.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-moz-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-o-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-ms-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:linear-gradient(rgba(30,30,30,.8),rgba(60,60,60,.8))}.mejs-controls .mejs-time-rail .mejs-time-buffering{width:100%;background-image:-o-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:15px 15px;-moz-background-size:15px 15px;-o-background-size:15px 15px;background-size:15px 15px;-webkit-animation:buffering-stripes 2s linear infinite;-moz-animation:buffering-stripes 2s linear infinite;-ms-animation:buffering-stripes 2s linear infinite;-o-animation:buffering-stripes 2s linear infinite;animation:buffering-stripes 2s linear infinite}@-webkit-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@-moz-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@-ms-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@-o-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}.mejs-controls .mejs-time-rail .mejs-time-loaded{background:#3caac8;background:rgba(60,170,200,.8);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(44,124,145,.8)),to(rgba(78,183,212,.8)));background:-webkit-linear-gradient(top,rgba(44,124,145,.8),rgba(78,183,212,.8));background:-moz-linear-gradient(top,rgba(44,124,145,.8),rgba(78,183,212,.8));background:-o-linear-gradient(top,rgba(44,124,145,.8),rgba(78,183,212,.8));background:-ms-linear-gradient(top,rgba(44,124,145,.8),rgba(78,183,212,.8));background:linear-gradient(rgba(44,124,145,.8),rgba(78,183,212,.8));width:0}.mejs-controls .mejs-time-rail .mejs-time-current{background:#fff;background:rgba(255,255,255,.8);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(255,255,255,.9)),to(rgba(200,200,200,.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-moz-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-o-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-ms-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:linear-gradient(rgba(255,255,255,.9),rgba(200,200,200,.8));width:0}.mejs-controls .mejs-time-rail .mejs-time-handle{display:none;position:absolute;margin:0;width:10px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;cursor:pointer;border:solid 2px #333;top:-2px;text-align:center}.mejs-controls .mejs-time-rail .mejs-time-float{position:absolute;display:none;background:#eee;width:36px;height:17px;border:solid 1px #333;top:-26px;margin-left:-18px;text-align:center;color:#111}.mejs-controls .mejs-time-rail .mejs-time-float-current{margin:2px;width:30px;display:block;text-align:center;left:0}.mejs-controls .mejs-time-rail .mejs-time-float-corner{position:absolute;display:block;width:0;height:0;line-height:0;border:solid 5px #eee;border-color:#eee transparent transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:15px;left:13px}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float{width:48px}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-current{width:44px}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-corner{left:18px}.mejs-controls .mejs-fullscreen-button button{background-position:-32px 0}.mejs-controls .mejs-unfullscreen button{background-position:-32px -16px}.mejs-controls .mejs-volume-button{}.mejs-controls .mejs-mute button{background-position:-16px -16px}.mejs-controls .mejs-unmute button{background-position:-16px 0}.mejs-controls .mejs-volume-button{position:relative}.mejs-controls .mejs-volume-button .mejs-volume-slider{display:none;height:115px;width:25px;background:url(background.png);background:rgba(50,50,50,.7);-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:-115px;left:0;z-index:1;position:absolute;margin:0}.mejs-controls .mejs-volume-button:hover{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-total{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,.5);margin:0}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-current{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,.9);margin:0}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-handle{position:absolute;left:4px;top:-3px;width:16px;height:6px;background:#ddd;background:rgba(255,255,255,.9);cursor:N-resize;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;margin:0}.mejs-controls a.mejs-horizontal-volume-slider{height:26px;width:56px;position:relative;display:block;float:left;vertical-align:middle}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#333;background:rgba(50,50,50,.8);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(30,30,30,.8)),to(rgba(60,60,60,.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-moz-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-o-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:-ms-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));background:linear-gradient(rgba(30,30,30,.8),rgba(60,60,60,.8))}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#fff;background:rgba(255,255,255,.8);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(255,255,255,.9)),to(rgba(200,200,200,.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-moz-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-o-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:-ms-linear-gradient(top,rgba(255,255,255,.9),rgba(200,200,200,.8));background:linear-gradient(rgba(255,255,255,.9),rgba(200,200,200,.8))}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-handle{display:none}.mejs-controls .mejs-captions-button{position:relative}.mejs-controls .mejs-captions-button button{background-position:-48px 0}.mejs-controls .mejs-captions-button .mejs-captions-selector{visibility:hidden;position:absolute;bottom:26px;right:-51px;width:85px;height:100px;background:url(background.png);background:rgba(50,50,50,.7);border:solid 1px transparent;padding:10px 10px 0;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mejs-controls .mejs-captions-button:hover .mejs-captions-selector{visibility:visible}.mejs-controls .mejs-captions-button .mejs-captions-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li{margin:0 0 6px;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li label{width:55px;float:left;padding:4px 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px}.mejs-controls .mejs-captions-button .mejs-captions-translations{font-size:10px;margin:0 0 5px}.mejs-chapters{position:absolute;top:0;left:0;-xborder-right:solid 1px #fff;width:10000px;z-index:1}.mejs-chapters .mejs-chapter{position:absolute;float:left;background:#222;background:rgba(0,0,0,.7);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(50,50,50,.7)),to(rgba(0,0,0,.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-moz-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-o-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:-ms-linear-gradient(top,rgba(50,50,50,.7),rgba(0,0,0,.7));background:linear-gradient(rgba(50,50,50,.7),rgba(0,0,0,.7));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#323232, endColorstr=#000000);overflow:hidden;border:0}.mejs-chapters .mejs-chapter .mejs-chapter-block{font-size:11px;color:#fff;padding:5px;display:block;border-right:solid 1px #333;border-bottom:solid 1px #333;cursor:pointer}.mejs-chapters .mejs-chapter .mejs-chapter-block-last{border-right:0}.mejs-chapters .mejs-chapter .mejs-chapter-block:hover{background:#666;background:rgba(102,102,102,.7);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(102,102,102,.7)),to(rgba(50,50,50,.6)));background:-webkit-linear-gradient(top,rgba(102,102,102,.7),rgba(50,50,50,.6));background:-moz-linear-gradient(top,rgba(102,102,102,.7),rgba(50,50,50,.6));background:-o-linear-gradient(top,rgba(102,102,102,.7),rgba(50,50,50,.6));background:-ms-linear-gradient(top,rgba(102,102,102,.7),rgba(50,50,50,.6));background:linear-gradient(rgba(102,102,102,.7),rgba(50,50,50,.6));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr=#666666, endColorstr=#323232)}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-title{font-size:12px;font-weight:700;display:block;white-space:nowrap;text-overflow:ellipsis;margin:0 0 3px;line-height:12px}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-timespan{font-size:12px;line-height:12px;margin:3px 0 4px;display:block;white-space:nowrap;text-overflow:ellipsis}.mejs-captions-layer{position:absolute;bottom:0;left:0;text-align:center;line-height:20px;font-size:16px;color:#fff}.mejs-captions-layer a{color:#fff;text-decoration:underline}.mejs-captions-layer[lang=ar]{font-size:20px;font-weight:400}.mejs-captions-position{position:absolute;width:100%;bottom:15px;left:0}.mejs-captions-position-hover{bottom:35px}.mejs-captions-text{padding:3px 5px;background:url(background.png);background:rgba(20,20,20,.5);white-space:pre-wrap}.me-cannotplay{}.me-cannotplay a{color:#fff;font-weight:700}.me-cannotplay span{padding:15px;display:block}.mejs-controls .mejs-loop-off button{background-position:-64px -16px}.mejs-controls .mejs-loop-on button{background-position:-64px 0}.mejs-controls .mejs-backlight-off button{background-position:-80px -16px}.mejs-controls .mejs-backlight-on button{background-position:-80px 0}.mejs-controls .mejs-picturecontrols-button{background-position:-96px 0}.mejs-contextmenu{position:absolute;width:150px;padding:10px;border-radius:4px;top:0;left:0;background:#fff;border:solid 1px #999;z-index:1001}.mejs-contextmenu .mejs-contextmenu-separator{height:1px;font-size:0;margin:5px 6px;background:#333}.mejs-contextmenu .mejs-contextmenu-item{font-family:Helvetica,Arial;font-size:12px;padding:4px 6px;cursor:pointer;color:#333}.mejs-contextmenu .mejs-contextmenu-item:hover{background:#2C7C91;color:#fff}.mejs-controls .mejs-sourcechooser-button{position:relative}.mejs-controls .mejs-sourcechooser-button button{background-position:-128px 0}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector{visibility:hidden;position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li{margin:0 0 6px;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li label{width:100px;float:left;padding:4px 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px}.mejs-postroll-layer{position:absolute;bottom:0;left:0;width:100%;height:100%;background:url(background.png);background:rgba(50,50,50,.7);z-index:1000;overflow:hidden}.mejs-postroll-layer-content{width:100%;height:100%}.mejs-postroll-close{position:absolute;right:0;top:0;background:url(background.png);background:rgba(50,50,50,.7);color:#fff;padding:4px;z-index:100;cursor:pointer}div.mejs-speed-button{width:46px!important;position:relative}.mejs-controls .mejs-button.mejs-speed-button button{background:transparent;width:36px;font-size:11px;line-height:normal;color:#fff}.mejs-controls .mejs-speed-button .mejs-speed-selector{display:none;position:absolute;top:-100px;left:-10px;width:60px;height:100px;background:url(background.png);background:rgba(50,50,50,.7);border:solid 1px transparent;padding:0;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mejs-controls .mejs-speed-button:hover>.mejs-speed-selector{display:block}.mejs-controls .mejs-speed-button .mejs-speed-selector ul li label.mejs-speed-selected{color:rgba(33,248,248,1)}.mejs-controls .mejs-speed-button .mejs-speed-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden}.mejs-controls .mejs-speed-button .mejs-speed-selector ul li{margin:0 0 6px;padding:0 10px;list-style-type:none!important;display:block;color:#fff;overflow:hidden}.mejs-controls .mejs-speed-button .mejs-speed-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px;display:none}.mejs-controls .mejs-speed-button .mejs-speed-selector ul li label{width:60px;float:left;padding:4px 0 0;line-height:15px;font-family:helvetica,arial;font-size:11.5px;color:#fff;margin-left:5px;cursor:pointer}.mejs-controls .mejs-speed-button .mejs-speed-selector ul li:hover{background-color:#c8c8c8!important;background-color:rgba(255,255,255,.4)!important}.mejs-controls .mejs-button.mejs-jump-forward-button{background:transparent url(jumpforward.png) no-repeat;background-position:3px 3px}.mejs-controls .mejs-button.mejs-jump-forward-button button{background:transparent;font-size:9px;line-height:normal;color:#fff}.mejs-controls .mejs-button.mejs-skip-back-button{background:transparent url(skipback.png) no-repeat;background-position:3px 3px}.mejs-controls .mejs-button.mejs-skip-back-button button{background:transparent;font-size:9px;line-height:normal;color:#fff}
\ No newline at end of file
index 3704748fdf5177fdba20e8ccc0d43fccda978da1..38a9cc490bf7e66037bd83e5c0ab7aad83e08942 100644 (file)
Binary files a/wp-includes/js/mediaelement/silverlightmediaelement.xap and b/wp-includes/js/mediaelement/silverlightmediaelement.xap differ
index 2732553722a58fe565ca59b677674637d094b94c..18cd4a5064187012da73b05ac209abecce4ce464 100644 (file)
@@ -1 +1 @@
-!function(a,b,c){"use strict";var d=c.View.extend({initialize:function(d){this.index=0,this.settings={},this.data=d.metadata||a.parseJSON(this.$("script.wp-playlist-script").html()),this.playerNode=this.$(this.data.type),this.tracks=new c.Collection(this.data.tracks),this.current=this.tracks.first(),"audio"===this.data.type&&(this.currentTemplate=wp.template("wp-playlist-current-item"),this.currentNode=this.$(".wp-playlist-current-item")),this.renderCurrent(),this.data.tracklist&&(this.itemTemplate=wp.template("wp-playlist-item"),this.playingClass="wp-playlist-playing",this.renderTracks()),this.playerNode.attr("src",this.current.get("src")),b.bindAll(this,"bindPlayer","bindResetPlayer","setPlayer","ended","clickTrack"),b.isUndefined(window._wpmejsSettings)||(this.settings=b.clone(_wpmejsSettings)),this.settings.success=this.bindPlayer,this.setPlayer()},bindPlayer:function(a){this.mejs=a,this.mejs.addEventListener("ended",this.ended)},bindResetPlayer:function(a){this.bindPlayer(a),this.playCurrentSrc()},setPlayer:function(a){this.player&&(this.player.pause(),this.player.remove(),this.playerNode=this.$(this.data.type)),a&&(this.playerNode.attr("src",this.current.get("src")),this.settings.success=this.bindResetPlayer),this.player=new MediaElementPlayer(this.playerNode.get(0),this.settings)},playCurrentSrc:function(){this.renderCurrent(),this.mejs.setSrc(this.playerNode.attr("src")),this.mejs.load(),this.mejs.play()},renderCurrent:function(){var a,b="wp-includes/images/media/video.png";"video"===this.data.type?(this.data.images&&this.current.get("image")&&-1===this.current.get("image").src.indexOf(b)&&this.playerNode.attr("poster",this.current.get("image").src),a=this.current.get("dimensions").resized,this.playerNode.attr(a)):(this.data.images||this.current.set("image",!1),this.currentNode.html(this.currentTemplate(this.current.toJSON())))},renderTracks:function(){var b=this,c=1,d=a('<div class="wp-playlist-tracks"></div>');this.tracks.each(function(a){b.data.images||a.set("image",!1),a.set("artists",b.data.artists),a.set("index",b.data.tracknumbers?c:!1),d.append(b.itemTemplate(a.toJSON())),c+=1}),this.$el.append(d),this.$(".wp-playlist-item").eq(0).addClass(this.playingClass)},events:{"click .wp-playlist-item":"clickTrack","click .wp-playlist-next":"next","click .wp-playlist-prev":"prev"},clickTrack:function(a){a.preventDefault(),this.index=this.$(".wp-playlist-item").index(a.currentTarget),this.setCurrent()},ended:function(){this.index+1<this.tracks.length?this.next():(this.index=0,this.setCurrent())},next:function(){this.index=this.index+1>=this.tracks.length?0:this.index+1,this.setCurrent()},prev:function(){this.index=this.index-1<0?this.tracks.length-1:this.index-1,this.setCurrent()},loadCurrent:function(){var a=this.playerNode.attr("src")&&this.playerNode.attr("src").split(".").pop(),b=this.current.get("src").split(".").pop();this.mejs&&this.mejs.pause(),a!==b?this.setPlayer(!0):(this.playerNode.attr("src",this.current.get("src")),this.playCurrentSrc())},setCurrent:function(){this.current=this.tracks.at(this.index),this.data.tracklist&&this.$(".wp-playlist-item").removeClass(this.playingClass).eq(this.index).addClass(this.playingClass),this.loadCurrent()}});a(document).ready(function(){a(".wp-playlist").each(function(){return new d({el:this})})}),window.WPPlaylistView=d}(jQuery,_,Backbone);
\ No newline at end of file
+!function(a,b,c){"use strict";var d=c.View.extend({initialize:function(d){this.index=0,this.settings={},this.data=d.metadata||a.parseJSON(this.$("script.wp-playlist-script").html()),this.playerNode=this.$(this.data.type),this.tracks=new c.Collection(this.data.tracks),this.current=this.tracks.first(),"audio"===this.data.type&&(this.currentTemplate=wp.template("wp-playlist-current-item"),this.currentNode=this.$(".wp-playlist-current-item")),this.renderCurrent(),this.data.tracklist&&(this.itemTemplate=wp.template("wp-playlist-item"),this.playingClass="wp-playlist-playing",this.renderTracks()),this.playerNode.attr("src",this.current.get("src")),b.bindAll(this,"bindPlayer","bindResetPlayer","setPlayer","ended","clickTrack"),b.isUndefined(window._wpmejsSettings)||(this.settings=b.clone(_wpmejsSettings)),this.settings.success=this.bindPlayer,this.setPlayer()},bindPlayer:function(a){this.mejs=a,this.mejs.addEventListener("ended",this.ended)},bindResetPlayer:function(a){this.bindPlayer(a),this.playCurrentSrc()},setPlayer:function(a){this.player&&(this.player.pause(),this.player.remove(),this.playerNode=this.$(this.data.type)),a&&(this.playerNode.attr("src",this.current.get("src")),this.settings.success=this.bindResetPlayer),this.player=new MediaElementPlayer(this.playerNode.get(0),this.settings)},playCurrentSrc:function(){this.renderCurrent(),this.mejs.setSrc(this.playerNode.attr("src")),this.mejs.load(),this.mejs.play()},renderCurrent:function(){var a,b="wp-includes/images/media/video.png";"video"===this.data.type?(this.data.images&&this.current.get("image")&&-1===this.current.get("image").src.indexOf(b)&&this.playerNode.attr("poster",this.current.get("image").src),a=this.current.get("dimensions").resized,this.playerNode.attr(a)):(this.data.images||this.current.set("image",!1),this.currentNode.html(this.currentTemplate(this.current.toJSON())))},renderTracks:function(){var b=this,c=1,d=a('<div class="wp-playlist-tracks"></div>');this.tracks.each(function(a){b.data.images||a.set("image",!1),a.set("artists",b.data.artists),a.set("index",!!b.data.tracknumbers&&c),d.append(b.itemTemplate(a.toJSON())),c+=1}),this.$el.append(d),this.$(".wp-playlist-item").eq(0).addClass(this.playingClass)},events:{"click .wp-playlist-item":"clickTrack","click .wp-playlist-next":"next","click .wp-playlist-prev":"prev"},clickTrack:function(a){a.preventDefault(),this.index=this.$(".wp-playlist-item").index(a.currentTarget),this.setCurrent()},ended:function(){this.index+1<this.tracks.length?this.next():(this.index=0,this.setCurrent())},next:function(){this.index=this.index+1>=this.tracks.length?0:this.index+1,this.setCurrent()},prev:function(){this.index=this.index-1<0?this.tracks.length-1:this.index-1,this.setCurrent()},loadCurrent:function(){var a=this.playerNode.attr("src")&&this.playerNode.attr("src").split(".").pop(),b=this.current.get("src").split(".").pop();this.mejs&&this.mejs.pause(),a!==b?this.setPlayer(!0):(this.playerNode.attr("src",this.current.get("src")),this.playCurrentSrc())},setCurrent:function(){this.current=this.tracks.at(this.index),this.data.tracklist&&this.$(".wp-playlist-item").removeClass(this.playingClass).eq(this.index).addClass(this.playingClass),this.loadCurrent()}});a(document).ready(function(){a(".wp-playlist").each(function(){return new d({el:this})})}),window.WPPlaylistView=d}(jQuery,_,Backbone);
\ No newline at end of file
index 1396a2d3be77183ace657818af291f27c5356e82..7f3a8c246916a2c01d04c2e8d63850394ebce610 100644 (file)
@@ -285,7 +285,7 @@ function uploadError(fileObj, errorCode, message, uploader) {
                        wpFileError(fileObj, pluploadL10n.upload_failed);
                        break;
                case plupload.FILE_EXTENSION_ERROR:
-                       wpFileError(fileObj, pluploadL10n.invalid_filetype);
+                       wpFileExtensionError( uploader, fileObj, pluploadL10n.invalid_filetype );
                        break;
                case plupload.FILE_SIZE_ERROR:
                        uploadSizeError(uploader, fileObj);
@@ -340,6 +340,11 @@ function uploadSizeError( up, file, over100mb ) {
        up.removeFile(file);
 }
 
+function wpFileExtensionError( up, file, message ) {
+       jQuery('#media-items').append('<div id="media-item-' + file.id + '" class="media-item error"><p>' + message + '</p></div>');
+       up.removeFile(file);
+}
+
 jQuery(document).ready(function($){
        $('.media-upload-form').bind('click.uploader', function(e) {
                var target = $(e.target), tr, c;
@@ -430,14 +435,14 @@ jQuery(document).ready(function($){
 
                        if ( up.features.dragdrop && ! $(document.body).hasClass('mobile') ) {
                                uploaddiv.addClass('drag-drop');
-                               $('#drag-drop-area').bind('dragover.wp-uploader', function(){ // dragenter doesn't fire right :(
+                               $('#drag-drop-area').on('dragover.wp-uploader', function(){ // dragenter doesn't fire right :(
                                        uploaddiv.addClass('drag-over');
-                               }).bind('dragleave.wp-uploader, drop.wp-uploader', function(){
+                               }).on('dragleave.wp-uploader, drop.wp-uploader', function(){
                                        uploaddiv.removeClass('drag-over');
                                });
                        } else {
                                uploaddiv.removeClass('drag-drop');
-                               $('#drag-drop-area').unbind('.wp-uploader');
+                               $('#drag-drop-area').off('.wp-uploader');
                        }
 
                        if ( up.runtime === 'html4' ) {
@@ -445,6 +450,10 @@ jQuery(document).ready(function($){
                        }
                });
 
+               uploader.bind( 'postinit', function( up ) {
+                       up.refresh();
+               });
+
                uploader.init();
 
                uploader.bind('FilesAdded', function( up, files ) {
index 3d8a5a982f37cb0a57d7e983cc3817186115db6c..e9975a48d6610d7d75166ead1718923365591dcf 100644 (file)
@@ -1 +1 @@
-function fileQueued(a){jQuery(".media-blank").remove();var b=jQuery("#media-items").children(),c=post_id||0;1==b.length&&b.removeClass("open").find(".slidetoggle").slideUp(200),jQuery('<div class="media-item">').attr("id","media-item-"+a.id).addClass("child-of-"+c).append('<div class="progress"><div class="percent">0%</div><div class="bar"></div></div>',jQuery('<div class="filename original">').text(" "+a.name)).appendTo(jQuery("#media-items")),jQuery("#insert-gallery").prop("disabled",!0)}function uploadStart(){try{"undefined"!=typeof topWin.tb_remove&&topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}catch(a){}return!0}function uploadProgress(a,b){var c=jQuery("#media-item-"+b.id);jQuery(".bar",c).width(200*b.loaded/b.size),jQuery(".percent",c).html(b.percent+"%")}function fileUploading(a,b){var c=104857600,d=parseInt(a.settings.max_file_size,10);d>c&&b.size>c&&setTimeout(function(){b.status<3&&0===b.loaded&&(wpFileError(b,pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>")),a.stop(),a.removeFile(b),a.start())},1e4)}function updateMediaForm(){var a=jQuery("#media-items").children();1==a.length?(a.addClass("open").find(".slidetoggle").show(),jQuery(".insert-gallery").hide()):a.length>1&&(a.removeClass("open"),jQuery(".insert-gallery").show()),a.not(".media-blank").length>0?jQuery(".savebutton").show():jQuery(".savebutton").hide()}function uploadSuccess(a,b){var c=jQuery("#media-item-"+a.id);return b=b.replace(/^<pre>(\d+)<\/pre>$/,"$1"),b.match(/media-upload-error|error-div/)?void c.html(b):(jQuery(".percent",c).html(pluploadL10n.crunching),prepareMediaItem(a,b),updateMediaForm(),void(post_id&&c.hasClass("child-of-"+post_id)&&jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)))}function setResize(a){a?window.resize_width&&window.resize_height?uploader.settings.resize={enabled:!0,width:window.resize_width,height:window.resize_height,quality:100}:uploader.settings.multipart_params.image_resize=!0:delete uploader.settings.multipart_params.image_resize}function prepareMediaItem(a,b){var c="undefined"==typeof shortform?1:2,d=jQuery("#media-item-"+a.id);2==c&&shortform>2&&(c=shortform);try{"undefined"!=typeof topWin.tb_remove&&topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}catch(e){}isNaN(b)||!b?(d.append(b),prepareMediaItemInit(a)):d.load("async-upload.php",{attachment_id:b,fetch:c},function(){prepareMediaItemInit(a),updateMediaForm()})}function prepareMediaItemInit(a){var b=jQuery("#media-item-"+a.id);jQuery(".thumbnail",b).clone().attr("class","pinkynail toggle").prependTo(b),jQuery(".filename.original",b).replaceWith(jQuery(".filename.new",b)),jQuery("a.delete",b).click(function(){return jQuery.ajax({url:ajaxurl,type:"post",success:deleteSuccess,error:deleteError,id:a.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}}),!1}),jQuery("a.undo",b).click(function(){return jQuery.ajax({url:ajaxurl,type:"post",id:a.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(){var b,c=jQuery("#media-item-"+a.id);(b=jQuery("#type-of-"+a.id).val())&&jQuery("#"+b+"-counter").text(jQuery("#"+b+"-counter").text()-0+1),post_id&&c.hasClass("child-of-"+post_id)&&jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1),jQuery(".filename .trashnotice",c).remove(),jQuery(".filename .title",c).css("font-weight","normal"),jQuery("a.undo",c).addClass("hidden"),jQuery(".menu_order_input",c).show(),c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:!1,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}}),!1}),jQuery("#media-item-"+a.id+".startopen").removeClass("startopen").addClass("open").find("slidetoggle").fadeIn()}function wpQueueError(a){jQuery("#media-upload-error").show().html('<div class="error"><p>'+a+"</p></div>")}function wpFileError(a,b){itemAjaxError(a.id,b)}function itemAjaxError(a,b){var c=jQuery("#media-item-"+a),d=c.find(".filename").text(),e=c.data("last-err");e!=a&&c.html('<div class="error-div"><a class="dismiss" href="#">'+pluploadL10n.dismiss+"</a><strong>"+pluploadL10n.error_uploading.replace("%s",jQuery.trim(d))+"</strong> "+b+"</div>").data("last-err",a)}function deleteSuccess(a){var b,c,d;return"-1"==a?itemAjaxError(this.id,"You do not have permission. Has your session expired?"):"0"==a?itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?"):(c=this.id,d=jQuery("#media-item-"+c),(b=jQuery("#type-of-"+c).val())&&jQuery("#"+b+"-counter").text(jQuery("#"+b+"-counter").text()-1),post_id&&d.hasClass("child-of-"+post_id)&&jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1),1==jQuery("form.type-form #media-items").children().length&&jQuery(".hidden","#media-items").length>0&&(jQuery(".toggle").toggle(),jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")),jQuery(".toggle",d).toggle(),jQuery(".slidetoggle",d).slideUp(200).siblings().removeClass("hidden"),d.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:!1,duration:500}).addClass("undo"),jQuery(".filename:empty",d).remove(),jQuery(".filename .title",d).css("font-weight","bold"),jQuery(".filename",d).append('<span class="trashnotice"> '+pluploadL10n.deleted+" </span>").siblings("a.toggle").hide(),jQuery(".filename",d).append(jQuery("a.undo",d).removeClass("hidden")),void jQuery(".menu_order_input",d).hide())}function deleteError(){}function uploadComplete(){jQuery("#insert-gallery").prop("disabled",!1)}function switchUploader(a){a?(deleteUserSetting("uploader"),jQuery(".media-upload-form").removeClass("html-uploader"),"object"==typeof uploader&&uploader.refresh()):(setUserSetting("uploader","1"),jQuery(".media-upload-form").addClass("html-uploader"))}function uploadError(a,b,c,d){var e,f=104857600;switch(b){case plupload.FAILED:wpFileError(a,pluploadL10n.upload_failed);break;case plupload.FILE_EXTENSION_ERROR:wpFileError(a,pluploadL10n.invalid_filetype);break;case plupload.FILE_SIZE_ERROR:uploadSizeError(d,a);break;case plupload.IMAGE_FORMAT_ERROR:wpFileError(a,pluploadL10n.not_an_image);break;case plupload.IMAGE_MEMORY_ERROR:wpFileError(a,pluploadL10n.image_memory_exceeded);break;case plupload.IMAGE_DIMENSIONS_ERROR:wpFileError(a,pluploadL10n.image_dimensions_exceeded);break;case plupload.GENERIC_ERROR:wpQueueError(pluploadL10n.upload_failed);break;case plupload.IO_ERROR:e=parseInt(d.settings.filters.max_file_size,10),e>f&&a.size>f?wpFileError(a,pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>")):wpQueueError(pluploadL10n.io_error);break;case plupload.HTTP_ERROR:wpQueueError(pluploadL10n.http_error);break;case plupload.INIT_ERROR:jQuery(".media-upload-form").addClass("html-uploader");break;case plupload.SECURITY_ERROR:wpQueueError(pluploadL10n.security_error);break;default:wpFileError(a,pluploadL10n.default_error)}}function uploadSizeError(a,b,c){var d;d=c?pluploadL10n.big_upload_queued.replace("%s",b.name)+" "+pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>"):pluploadL10n.file_exceeds_size_limit.replace("%s",b.name),jQuery("#media-items").append('<div id="media-item-'+b.id+'" class="media-item error"><p>'+d+"</p></div>"),a.removeFile(b)}var topWin=window.dialogArguments||opener||parent||top,uploader,uploader_init;jQuery(document).ready(function(a){a(".media-upload-form").bind("click.uploader",function(b){var c,d,e=a(b.target);e.is('input[type="radio"]')?(c=e.closest("tr"),c.hasClass("align")?setUserSetting("align",e.val()):c.hasClass("image-size")&&setUserSetting("imgsize",e.val())):e.is("button.button")?(d=b.target.className||"",d=d.match(/url([^ '"]+)/),d&&d[1]&&(setUserSetting("urlbutton",d[1]),e.siblings(".urlfield").val(e.data("link-url")))):e.is("a.dismiss")?e.parents(".media-item").fadeOut(200,function(){a(this).remove()}):e.is(".upload-flash-bypass a")||e.is("a.uploader-html")?(a("#media-items, p.submit, span.big-file-warning").css("display","none"),switchUploader(0),b.preventDefault()):e.is(".upload-html-bypass a")?(a("#media-items, p.submit, span.big-file-warning").css("display",""),switchUploader(1),b.preventDefault()):e.is("a.describe-toggle-on")?(e.parent().addClass("open"),e.siblings(".slidetoggle").fadeIn(250,function(){var b,c,d=a(window).scrollTop(),e=a(window).height(),f=a(this).offset().top,g=a(this).height();e&&f&&g&&(b=f+g,c=d+e,b>c&&(f-d>b-c?window.scrollBy(0,b-c+10):window.scrollBy(0,f-d-40)))}),b.preventDefault()):e.is("a.describe-toggle-off")&&(e.siblings(".slidetoggle").fadeOut(250,function(){e.parent().removeClass("open")}),b.preventDefault())}),uploader_init=function(){var b=-1!=navigator.userAgent.indexOf("Trident/")||-1!=navigator.userAgent.indexOf("MSIE ");b||"flash"!==plupload.predictRuntime(wpUploaderInit)||wpUploaderInit.required_features&&wpUploaderInit.required_features.hasOwnProperty("send_binary_string")||(wpUploaderInit.required_features=wpUploaderInit.required_features||{},wpUploaderInit.required_features.send_binary_string=!0),uploader=new plupload.Uploader(wpUploaderInit),a("#image_resize").bind("change",function(){var b=a(this).prop("checked");setResize(b),b?setUserSetting("upload_resize","1"):deleteUserSetting("upload_resize")}),uploader.bind("Init",function(b){var c=a("#plupload-upload-ui");setResize(getUserSetting("upload_resize",!1)),b.features.dragdrop&&!a(document.body).hasClass("mobile")?(c.addClass("drag-drop"),a("#drag-drop-area").bind("dragover.wp-uploader",function(){c.addClass("drag-over")}).bind("dragleave.wp-uploader, drop.wp-uploader",function(){c.removeClass("drag-over")})):(c.removeClass("drag-drop"),a("#drag-drop-area").unbind(".wp-uploader")),"html4"===b.runtime&&a(".upload-flash-bypass").hide()}),uploader.init(),uploader.bind("FilesAdded",function(b,c){a("#media-upload-error").empty(),uploadStart(),plupload.each(c,function(a){fileQueued(a)}),b.refresh(),b.start()}),uploader.bind("UploadFile",function(a,b){fileUploading(a,b)}),uploader.bind("UploadProgress",function(a,b){uploadProgress(a,b)}),uploader.bind("Error",function(a,b){uploadError(b.file,b.code,b.message,a),a.refresh()}),uploader.bind("FileUploaded",function(a,b,c){uploadSuccess(b,c.response)}),uploader.bind("UploadComplete",function(){uploadComplete()})},"object"==typeof wpUploaderInit&&uploader_init()});
\ No newline at end of file
+function fileQueued(a){jQuery(".media-blank").remove();var b=jQuery("#media-items").children(),c=post_id||0;1==b.length&&b.removeClass("open").find(".slidetoggle").slideUp(200),jQuery('<div class="media-item">').attr("id","media-item-"+a.id).addClass("child-of-"+c).append('<div class="progress"><div class="percent">0%</div><div class="bar"></div></div>',jQuery('<div class="filename original">').text(" "+a.name)).appendTo(jQuery("#media-items")),jQuery("#insert-gallery").prop("disabled",!0)}function uploadStart(){try{"undefined"!=typeof topWin.tb_remove&&topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}catch(a){}return!0}function uploadProgress(a,b){var c=jQuery("#media-item-"+b.id);jQuery(".bar",c).width(200*b.loaded/b.size),jQuery(".percent",c).html(b.percent+"%")}function fileUploading(a,b){var c=104857600,d=parseInt(a.settings.max_file_size,10);d>c&&b.size>c&&setTimeout(function(){b.status<3&&0===b.loaded&&(wpFileError(b,pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>")),a.stop(),a.removeFile(b),a.start())},1e4)}function updateMediaForm(){var a=jQuery("#media-items").children();1==a.length?(a.addClass("open").find(".slidetoggle").show(),jQuery(".insert-gallery").hide()):a.length>1&&(a.removeClass("open"),jQuery(".insert-gallery").show()),a.not(".media-blank").length>0?jQuery(".savebutton").show():jQuery(".savebutton").hide()}function uploadSuccess(a,b){var c=jQuery("#media-item-"+a.id);return b=b.replace(/^<pre>(\d+)<\/pre>$/,"$1"),b.match(/media-upload-error|error-div/)?void c.html(b):(jQuery(".percent",c).html(pluploadL10n.crunching),prepareMediaItem(a,b),updateMediaForm(),void(post_id&&c.hasClass("child-of-"+post_id)&&jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)))}function setResize(a){a?window.resize_width&&window.resize_height?uploader.settings.resize={enabled:!0,width:window.resize_width,height:window.resize_height,quality:100}:uploader.settings.multipart_params.image_resize=!0:delete uploader.settings.multipart_params.image_resize}function prepareMediaItem(a,b){var c="undefined"==typeof shortform?1:2,d=jQuery("#media-item-"+a.id);2==c&&shortform>2&&(c=shortform);try{"undefined"!=typeof topWin.tb_remove&&topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}catch(e){}isNaN(b)||!b?(d.append(b),prepareMediaItemInit(a)):d.load("async-upload.php",{attachment_id:b,fetch:c},function(){prepareMediaItemInit(a),updateMediaForm()})}function prepareMediaItemInit(a){var b=jQuery("#media-item-"+a.id);jQuery(".thumbnail",b).clone().attr("class","pinkynail toggle").prependTo(b),jQuery(".filename.original",b).replaceWith(jQuery(".filename.new",b)),jQuery("a.delete",b).click(function(){return jQuery.ajax({url:ajaxurl,type:"post",success:deleteSuccess,error:deleteError,id:a.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}}),!1}),jQuery("a.undo",b).click(function(){return jQuery.ajax({url:ajaxurl,type:"post",id:a.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(){var b,c=jQuery("#media-item-"+a.id);(b=jQuery("#type-of-"+a.id).val())&&jQuery("#"+b+"-counter").text(jQuery("#"+b+"-counter").text()-0+1),post_id&&c.hasClass("child-of-"+post_id)&&jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1),jQuery(".filename .trashnotice",c).remove(),jQuery(".filename .title",c).css("font-weight","normal"),jQuery("a.undo",c).addClass("hidden"),jQuery(".menu_order_input",c).show(),c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:!1,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}}),!1}),jQuery("#media-item-"+a.id+".startopen").removeClass("startopen").addClass("open").find("slidetoggle").fadeIn()}function wpQueueError(a){jQuery("#media-upload-error").show().html('<div class="error"><p>'+a+"</p></div>")}function wpFileError(a,b){itemAjaxError(a.id,b)}function itemAjaxError(a,b){var c=jQuery("#media-item-"+a),d=c.find(".filename").text(),e=c.data("last-err");e!=a&&c.html('<div class="error-div"><a class="dismiss" href="#">'+pluploadL10n.dismiss+"</a><strong>"+pluploadL10n.error_uploading.replace("%s",jQuery.trim(d))+"</strong> "+b+"</div>").data("last-err",a)}function deleteSuccess(a){var b,c,d;return"-1"==a?itemAjaxError(this.id,"You do not have permission. Has your session expired?"):"0"==a?itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?"):(c=this.id,d=jQuery("#media-item-"+c),(b=jQuery("#type-of-"+c).val())&&jQuery("#"+b+"-counter").text(jQuery("#"+b+"-counter").text()-1),post_id&&d.hasClass("child-of-"+post_id)&&jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1),1==jQuery("form.type-form #media-items").children().length&&jQuery(".hidden","#media-items").length>0&&(jQuery(".toggle").toggle(),jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")),jQuery(".toggle",d).toggle(),jQuery(".slidetoggle",d).slideUp(200).siblings().removeClass("hidden"),d.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:!1,duration:500}).addClass("undo"),jQuery(".filename:empty",d).remove(),jQuery(".filename .title",d).css("font-weight","bold"),jQuery(".filename",d).append('<span class="trashnotice"> '+pluploadL10n.deleted+" </span>").siblings("a.toggle").hide(),jQuery(".filename",d).append(jQuery("a.undo",d).removeClass("hidden")),void jQuery(".menu_order_input",d).hide())}function deleteError(){}function uploadComplete(){jQuery("#insert-gallery").prop("disabled",!1)}function switchUploader(a){a?(deleteUserSetting("uploader"),jQuery(".media-upload-form").removeClass("html-uploader"),"object"==typeof uploader&&uploader.refresh()):(setUserSetting("uploader","1"),jQuery(".media-upload-form").addClass("html-uploader"))}function uploadError(a,b,c,d){var e,f=104857600;switch(b){case plupload.FAILED:wpFileError(a,pluploadL10n.upload_failed);break;case plupload.FILE_EXTENSION_ERROR:wpFileExtensionError(d,a,pluploadL10n.invalid_filetype);break;case plupload.FILE_SIZE_ERROR:uploadSizeError(d,a);break;case plupload.IMAGE_FORMAT_ERROR:wpFileError(a,pluploadL10n.not_an_image);break;case plupload.IMAGE_MEMORY_ERROR:wpFileError(a,pluploadL10n.image_memory_exceeded);break;case plupload.IMAGE_DIMENSIONS_ERROR:wpFileError(a,pluploadL10n.image_dimensions_exceeded);break;case plupload.GENERIC_ERROR:wpQueueError(pluploadL10n.upload_failed);break;case plupload.IO_ERROR:e=parseInt(d.settings.filters.max_file_size,10),e>f&&a.size>f?wpFileError(a,pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>")):wpQueueError(pluploadL10n.io_error);break;case plupload.HTTP_ERROR:wpQueueError(pluploadL10n.http_error);break;case plupload.INIT_ERROR:jQuery(".media-upload-form").addClass("html-uploader");break;case plupload.SECURITY_ERROR:wpQueueError(pluploadL10n.security_error);break;default:wpFileError(a,pluploadL10n.default_error)}}function uploadSizeError(a,b,c){var d;d=c?pluploadL10n.big_upload_queued.replace("%s",b.name)+" "+pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>"):pluploadL10n.file_exceeds_size_limit.replace("%s",b.name),jQuery("#media-items").append('<div id="media-item-'+b.id+'" class="media-item error"><p>'+d+"</p></div>"),a.removeFile(b)}function wpFileExtensionError(a,b,c){jQuery("#media-items").append('<div id="media-item-'+b.id+'" class="media-item error"><p>'+c+"</p></div>"),a.removeFile(b)}var topWin=window.dialogArguments||opener||parent||top,uploader,uploader_init;jQuery(document).ready(function(a){a(".media-upload-form").bind("click.uploader",function(b){var c,d,e=a(b.target);e.is('input[type="radio"]')?(c=e.closest("tr"),c.hasClass("align")?setUserSetting("align",e.val()):c.hasClass("image-size")&&setUserSetting("imgsize",e.val())):e.is("button.button")?(d=b.target.className||"",d=d.match(/url([^ '"]+)/),d&&d[1]&&(setUserSetting("urlbutton",d[1]),e.siblings(".urlfield").val(e.data("link-url")))):e.is("a.dismiss")?e.parents(".media-item").fadeOut(200,function(){a(this).remove()}):e.is(".upload-flash-bypass a")||e.is("a.uploader-html")?(a("#media-items, p.submit, span.big-file-warning").css("display","none"),switchUploader(0),b.preventDefault()):e.is(".upload-html-bypass a")?(a("#media-items, p.submit, span.big-file-warning").css("display",""),switchUploader(1),b.preventDefault()):e.is("a.describe-toggle-on")?(e.parent().addClass("open"),e.siblings(".slidetoggle").fadeIn(250,function(){var b,c,d=a(window).scrollTop(),e=a(window).height(),f=a(this).offset().top,g=a(this).height();e&&f&&g&&(b=f+g,c=d+e,b>c&&(b-c<f-d?window.scrollBy(0,b-c+10):window.scrollBy(0,f-d-40)))}),b.preventDefault()):e.is("a.describe-toggle-off")&&(e.siblings(".slidetoggle").fadeOut(250,function(){e.parent().removeClass("open")}),b.preventDefault())}),uploader_init=function(){var b=navigator.userAgent.indexOf("Trident/")!=-1||navigator.userAgent.indexOf("MSIE ")!=-1;b||"flash"!==plupload.predictRuntime(wpUploaderInit)||wpUploaderInit.required_features&&wpUploaderInit.required_features.hasOwnProperty("send_binary_string")||(wpUploaderInit.required_features=wpUploaderInit.required_features||{},wpUploaderInit.required_features.send_binary_string=!0),uploader=new plupload.Uploader(wpUploaderInit),a("#image_resize").bind("change",function(){var b=a(this).prop("checked");setResize(b),b?setUserSetting("upload_resize","1"):deleteUserSetting("upload_resize")}),uploader.bind("Init",function(b){var c=a("#plupload-upload-ui");setResize(getUserSetting("upload_resize",!1)),b.features.dragdrop&&!a(document.body).hasClass("mobile")?(c.addClass("drag-drop"),a("#drag-drop-area").on("dragover.wp-uploader",function(){c.addClass("drag-over")}).on("dragleave.wp-uploader, drop.wp-uploader",function(){c.removeClass("drag-over")})):(c.removeClass("drag-drop"),a("#drag-drop-area").off(".wp-uploader")),"html4"===b.runtime&&a(".upload-flash-bypass").hide()}),uploader.bind("postinit",function(a){a.refresh()}),uploader.init(),uploader.bind("FilesAdded",function(b,c){a("#media-upload-error").empty(),uploadStart(),plupload.each(c,function(a){fileQueued(a)}),b.refresh(),b.start()}),uploader.bind("UploadFile",function(a,b){fileUploading(a,b)}),uploader.bind("UploadProgress",function(a,b){uploadProgress(a,b)}),uploader.bind("Error",function(a,b){uploadError(b.file,b.code,b.message,a),a.refresh()}),uploader.bind("FileUploaded",function(a,b,c){uploadSuccess(b,c.response)}),uploader.bind("UploadComplete",function(){uploadComplete()})},"object"==typeof wpUploaderInit&&uploader_init()});
\ No newline at end of file
index 88f0170458fed9405258c2abdc531c86db6fcbd1..032a38feff0dfc45a211d4fb1b8f78a08184326f 100644 (file)
@@ -180,6 +180,11 @@ window.wp = window.wp || {};
                        $(self).trigger( 'uploader:ready' );
                });
 
+               this.uploader.bind( 'postinit', function( up ) {
+                       up.refresh();
+                       self.init();
+               });
+
                this.uploader.init();
 
                if ( this.browser ) {
@@ -311,9 +316,6 @@ window.wp = window.wp || {};
                        up.refresh();
                });
 
-               this.uploader.bind( 'PostInit', function() {
-                       self.init();
-               });
        };
 
        // Adds the 'defaults' and 'browser' properties.
index c1b104fb884813e2023574024610f3d6c067ecdd..dd2f3e1098a473d2ca5ce4673fdd31352d739065 100644 (file)
@@ -1 +1 @@
-window.wp=window.wp||{},function(a,b){var c;"undefined"!=typeof _wpPluploadSettings&&(c=function(a){var d,e,f=this,g=-1!=navigator.userAgent.indexOf("Trident/")||-1!=navigator.userAgent.indexOf("MSIE "),h={container:"container",browser:"browse_button",dropzone:"drop_element"};if(this.supports={upload:c.browser.supported},this.supported=this.supports.upload,this.supported){this.plupload=b.extend(!0,{multipart_params:{}},c.defaults),this.container=document.body,b.extend(!0,this,a);for(d in this)b.isFunction(this[d])&&(this[d]=b.proxy(this[d],this));for(d in h)this[d]&&(this[d]=b(this[d]).first(),this[d].length?(this[d].prop("id")||this[d].prop("id","__wp-uploader-id-"+c.uuid++),this.plupload[h[d]]=this[d].prop("id")):delete this[d]);(this.browser&&this.browser.length||this.dropzone&&this.dropzone.length)&&(g||"flash"!==plupload.predictRuntime(this.plupload)||this.plupload.required_features&&this.plupload.required_features.hasOwnProperty("send_binary_string")||(this.plupload.required_features=this.plupload.required_features||{},this.plupload.required_features.send_binary_string=!0),this.uploader=new plupload.Uploader(this.plupload),delete this.plupload,this.param(this.params||{}),delete this.params,e=function(a,b,d){d.attachment&&d.attachment.destroy(),c.errors.unshift({message:a||pluploadL10n.default_error,data:b,file:d}),f.error(a,b,d)},this.uploader.bind("init",function(a){var d,e,g,h=f.dropzone;if(g=f.supports.dragdrop=a.features.dragdrop&&!c.browser.mobile,h){if(h.toggleClass("supports-drag-drop",!!g),!g)return h.unbind(".wp-uploader");h.bind("dragover.wp-uploader",function(){d&&clearTimeout(d),e||(h.trigger("dropzone:enter").addClass("drag-over"),e=!0)}),h.bind("dragleave.wp-uploader, drop.wp-uploader",function(){d=setTimeout(function(){e=!1,h.trigger("dropzone:leave").removeClass("drag-over")},0)}),f.ready=!0,b(f).trigger("uploader:ready")}}),this.uploader.init(),this.browser?this.browser.on("mouseenter",this.refresh):(this.uploader.disableBrowse(!0),b("#"+this.uploader.id+"_html5_container").hide()),this.uploader.bind("FilesAdded",function(a,b){_.each(b,function(a){var b,d;plupload.FAILED!==a.status&&(b=_.extend({file:a,uploading:!0,date:new Date,filename:a.name,menuOrder:0,uploadedTo:wp.media.model.settings.post.id},_.pick(a,"loaded","size","percent")),d=/(?:jpe?g|png|gif)$/i.exec(a.name),d&&(b.type="image",b.subtype="jpg"===d[0]?"jpeg":d[0]),a.attachment=wp.media.model.Attachment.create(b),c.queue.add(a.attachment),f.added(a.attachment))}),a.refresh(),a.start()}),this.uploader.bind("UploadProgress",function(a,b){b.attachment.set(_.pick(b,"loaded","percent")),f.progress(b.attachment)}),this.uploader.bind("FileUploaded",function(a,b,d){var g;try{d=JSON.parse(d.response)}catch(h){return e(pluploadL10n.default_error,h,b)}return!_.isObject(d)||_.isUndefined(d.success)?e(pluploadL10n.default_error,null,b):d.success?(_.each(["file","loaded","size","percent"],function(a){b.attachment.unset(a)}),b.attachment.set(_.extend(d.data,{uploading:!1})),wp.media.model.Attachment.get(d.data.id,b.attachment),g=c.queue.all(function(a){return!a.get("uploading")}),g&&c.queue.reset(),void f.success(b.attachment)):e(d.data&&d.data.message,d.data,b)}),this.uploader.bind("Error",function(a,b){var d,f=pluploadL10n.default_error;for(d in c.errorMap)if(b.code===plupload[d]){f=c.errorMap[d],_.isFunction(f)&&(f=f(b.file,b));break}e(f,b,b.file),a.refresh()}),this.uploader.bind("PostInit",function(){f.init()}))}},b.extend(c,_wpPluploadSettings),c.uuid=0,c.errorMap={FAILED:pluploadL10n.upload_failed,FILE_EXTENSION_ERROR:pluploadL10n.invalid_filetype,IMAGE_FORMAT_ERROR:pluploadL10n.not_an_image,IMAGE_MEMORY_ERROR:pluploadL10n.image_memory_exceeded,IMAGE_DIMENSIONS_ERROR:pluploadL10n.image_dimensions_exceeded,GENERIC_ERROR:pluploadL10n.upload_failed,IO_ERROR:pluploadL10n.io_error,HTTP_ERROR:pluploadL10n.http_error,SECURITY_ERROR:pluploadL10n.security_error,FILE_SIZE_ERROR:function(a){return pluploadL10n.file_exceeds_size_limit.replace("%s",a.name)}},b.extend(c.prototype,{param:function(a,c){return 1===arguments.length&&"string"==typeof a?this.uploader.settings.multipart_params[a]:void(arguments.length>1?this.uploader.settings.multipart_params[a]=c:b.extend(this.uploader.settings.multipart_params,a))},init:function(){},error:function(){},success:function(){},added:function(){},progress:function(){},complete:function(){},refresh:function(){var a,c,d,e;if(this.browser){for(a=this.browser[0];a;){if(a===document.body){c=!0;break}a=a.parentNode}c||(e="wp-uploader-browser-"+this.uploader.id,d=b("#"+e),d.length||(d=b('<div class="wp-uploader-browser" />').css({position:"fixed",top:"-1000px",left:"-1000px",height:0,width:0}).attr("id","wp-uploader-browser-"+this.uploader.id).appendTo("body")),d.append(this.browser))}this.uploader.refresh()}}),c.queue=new wp.media.model.Attachments([],{query:!1}),c.errors=new Backbone.Collection,a.Uploader=c)}(wp,jQuery);
\ No newline at end of file
+window.wp=window.wp||{},function(a,b){var c;"undefined"!=typeof _wpPluploadSettings&&(c=function(a){var d,e,f=this,g=navigator.userAgent.indexOf("Trident/")!=-1||navigator.userAgent.indexOf("MSIE ")!=-1,h={container:"container",browser:"browse_button",dropzone:"drop_element"};if(this.supports={upload:c.browser.supported},this.supported=this.supports.upload,this.supported){this.plupload=b.extend(!0,{multipart_params:{}},c.defaults),this.container=document.body,b.extend(!0,this,a);for(d in this)b.isFunction(this[d])&&(this[d]=b.proxy(this[d],this));for(d in h)this[d]&&(this[d]=b(this[d]).first(),this[d].length?(this[d].prop("id")||this[d].prop("id","__wp-uploader-id-"+c.uuid++),this.plupload[h[d]]=this[d].prop("id")):delete this[d]);(this.browser&&this.browser.length||this.dropzone&&this.dropzone.length)&&(g||"flash"!==plupload.predictRuntime(this.plupload)||this.plupload.required_features&&this.plupload.required_features.hasOwnProperty("send_binary_string")||(this.plupload.required_features=this.plupload.required_features||{},this.plupload.required_features.send_binary_string=!0),this.uploader=new plupload.Uploader(this.plupload),delete this.plupload,this.param(this.params||{}),delete this.params,e=function(a,b,d){d.attachment&&d.attachment.destroy(),c.errors.unshift({message:a||pluploadL10n.default_error,data:b,file:d}),f.error(a,b,d)},this.uploader.bind("init",function(a){var d,e,g,h=f.dropzone;if(g=f.supports.dragdrop=a.features.dragdrop&&!c.browser.mobile,h){if(h.toggleClass("supports-drag-drop",!!g),!g)return h.unbind(".wp-uploader");h.bind("dragover.wp-uploader",function(){d&&clearTimeout(d),e||(h.trigger("dropzone:enter").addClass("drag-over"),e=!0)}),h.bind("dragleave.wp-uploader, drop.wp-uploader",function(){d=setTimeout(function(){e=!1,h.trigger("dropzone:leave").removeClass("drag-over")},0)}),f.ready=!0,b(f).trigger("uploader:ready")}}),this.uploader.bind("postinit",function(a){a.refresh(),f.init()}),this.uploader.init(),this.browser?this.browser.on("mouseenter",this.refresh):(this.uploader.disableBrowse(!0),b("#"+this.uploader.id+"_html5_container").hide()),this.uploader.bind("FilesAdded",function(a,b){_.each(b,function(a){var b,d;plupload.FAILED!==a.status&&(b=_.extend({file:a,uploading:!0,date:new Date,filename:a.name,menuOrder:0,uploadedTo:wp.media.model.settings.post.id},_.pick(a,"loaded","size","percent")),d=/(?:jpe?g|png|gif)$/i.exec(a.name),d&&(b.type="image",b.subtype="jpg"===d[0]?"jpeg":d[0]),a.attachment=wp.media.model.Attachment.create(b),c.queue.add(a.attachment),f.added(a.attachment))}),a.refresh(),a.start()}),this.uploader.bind("UploadProgress",function(a,b){b.attachment.set(_.pick(b,"loaded","percent")),f.progress(b.attachment)}),this.uploader.bind("FileUploaded",function(a,b,d){var g;try{d=JSON.parse(d.response)}catch(h){return e(pluploadL10n.default_error,h,b)}return!_.isObject(d)||_.isUndefined(d.success)?e(pluploadL10n.default_error,null,b):d.success?(_.each(["file","loaded","size","percent"],function(a){b.attachment.unset(a)}),b.attachment.set(_.extend(d.data,{uploading:!1})),wp.media.model.Attachment.get(d.data.id,b.attachment),g=c.queue.all(function(a){return!a.get("uploading")}),g&&c.queue.reset(),void f.success(b.attachment)):e(d.data&&d.data.message,d.data,b)}),this.uploader.bind("Error",function(a,b){var d,f=pluploadL10n.default_error;for(d in c.errorMap)if(b.code===plupload[d]){f=c.errorMap[d],_.isFunction(f)&&(f=f(b.file,b));break}e(f,b,b.file),a.refresh()}))}},b.extend(c,_wpPluploadSettings),c.uuid=0,c.errorMap={FAILED:pluploadL10n.upload_failed,FILE_EXTENSION_ERROR:pluploadL10n.invalid_filetype,IMAGE_FORMAT_ERROR:pluploadL10n.not_an_image,IMAGE_MEMORY_ERROR:pluploadL10n.image_memory_exceeded,IMAGE_DIMENSIONS_ERROR:pluploadL10n.image_dimensions_exceeded,GENERIC_ERROR:pluploadL10n.upload_failed,IO_ERROR:pluploadL10n.io_error,HTTP_ERROR:pluploadL10n.http_error,SECURITY_ERROR:pluploadL10n.security_error,FILE_SIZE_ERROR:function(a){return pluploadL10n.file_exceeds_size_limit.replace("%s",a.name)}},b.extend(c.prototype,{param:function(a,c){return 1===arguments.length&&"string"==typeof a?this.uploader.settings.multipart_params[a]:void(arguments.length>1?this.uploader.settings.multipart_params[a]=c:b.extend(this.uploader.settings.multipart_params,a))},init:function(){},error:function(){},success:function(){},added:function(){},progress:function(){},complete:function(){},refresh:function(){var a,c,d,e;if(this.browser){for(a=this.browser[0];a;){if(a===document.body){c=!0;break}a=a.parentNode}c||(e="wp-uploader-browser-"+this.uploader.id,d=b("#"+e),d.length||(d=b('<div class="wp-uploader-browser" />').css({position:"fixed",top:"-1000px",left:"-1000px",height:0,width:0}).attr("id","wp-uploader-browser-"+this.uploader.id).appendTo("body")),d.append(this.browser))}this.uploader.refresh()}}),c.queue=new wp.media.model.Attachments([],{query:!1}),c.errors=new Backbone.Collection,a.Uploader=c)}(wp,jQuery);
\ No newline at end of file
index 11f87850593c1103964743486ee23a7e504d2bfe..6d00901a78645c98e473d5f6157fbd831186c161 100644 (file)
@@ -526,6 +526,11 @@ function edButton(id, display, tagStart, tagEnd, access) {
                } else if ( canvas.selectionStart || canvas.selectionStart === 0 ) { // FF, WebKit, Opera
                        startPos = canvas.selectionStart;
                        endPos = canvas.selectionEnd;
+
+                       if ( startPos < endPos && v.charAt( endPos - 1 ) === '\n' ) {
+                               endPos -= 1;
+                       }
+
                        cursorPos = endPos;
                        scrollTop = canvas.scrollTop;
                        l = v.substring(0, startPos); // left of the selection
index a75c0b1d871a80beaee0b349f6b7a814e285ab2d..dd896c916f31bcc51939cc585d72a65cb0e053ad 100644 (file)
@@ -1 +1 @@
-function quicktags(a){return new QTags(a)}function edInsertContent(a,b){return QTags.insertContent(b)}function edButton(a,b,c,d,e){return QTags.addButton(a,b,c,d,e,"",-1)}var QTags,edCanvas,edButtons=[],edAddTag=function(){},edCheckOpenTags=function(){},edCloseAllTags=function(){},edInsertImage=function(){},edInsertLink=function(){},edInsertTag=function(){},edLink=function(){},edQuickLink=function(){},edRemoveTag=function(){},edShowButton=function(){},edShowLinks=function(){},edSpell=function(){},edToolbar=function(){};!function(){function a(a){return a=a||"",a=a.replace(/&([^#])(?![a-z1-4]{1,8};)/gi,"&#038;$1"),a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}var b,c=function(a){var b,d,e,f;"undefined"!=typeof jQuery?jQuery(document).ready(a):(b=c,b.funcs=[],b.ready=function(){if(!b.isReady)for(b.isReady=!0,d=0;d<b.funcs.length;d++)b.funcs[d]()},b.isReady?a():b.funcs.push(a),b.eventAttached||(document.addEventListener?(e=function(){document.removeEventListener("DOMContentLoaded",e,!1),b.ready()},document.addEventListener("DOMContentLoaded",e,!1),window.addEventListener("load",b.ready,!1)):document.attachEvent&&(e=function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",e),b.ready())},document.attachEvent("onreadystatechange",e),window.attachEvent("onload",b.ready),(f=function(){try{document.documentElement.doScroll("left")}catch(a){return void setTimeout(f,50)}b.ready()})()),b.eventAttached=!0))},d=function(){var a,b=new Date;return a=function(a){var b=a.toString();return b.length<2&&(b="0"+b),b},b.getUTCFullYear()+"-"+a(b.getUTCMonth()+1)+"-"+a(b.getUTCDate())+"T"+a(b.getUTCHours())+":"+a(b.getUTCMinutes())+":"+a(b.getUTCSeconds())+"+00:00"}();b=QTags=function(a){if("string"==typeof a)a={id:a};else if("object"!=typeof a)return!1;var d,e,f,g,h,i=this,j=a.id,k=document.getElementById(j),l="qt_"+j;return j&&k?(i.name=l,i.id=j,i.canvas=k,i.settings=a,"content"!==j||"string"!=typeof adminpage||"post-new-php"!==adminpage&&"post-php"!==adminpage?f=l+"_toolbar":(edCanvas=k,f="ed_toolbar"),d=document.getElementById(f),d||(d=document.createElement("div"),d.id=f,d.className="quicktags-toolbar"),k.parentNode.insertBefore(d,k),i.toolbar=d,e=function(a){a=a||window.event;var b,c=a.target||a.srcElement,d=c.clientWidth||c.offsetWidth;d&&/ ed_button /.test(" "+c.className+" ")&&(i.canvas=k=document.getElementById(j),b=c.id.replace(l+"_",""),i.theButtons[b]&&i.theButtons[b].callback.call(i.theButtons[b],c,k,i))},h=function(){window.wpActiveEditor=j},g=document.getElementById("wp-"+j+"-wrap"),d.addEventListener?(d.addEventListener("click",e,!1),g&&g.addEventListener("click",h,!1)):d.attachEvent&&(d.attachEvent("onclick",e),g&&g.attachEvent("onclick",h)),i.getButton=function(a){return i.theButtons[a]},i.getButtonElement=function(a){return document.getElementById(l+"_"+a)},b.instances[j]=i,void(b.instances[0]||(b.instances[0]=b.instances[j],c(function(){b._buttonsInit()})))):!1},b.instances={},b.getInstance=function(a){return b.instances[a]},b._buttonsInit=function(){var a,c,d,e,f,g,h,i,j,k,l=this,m=",strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,";for(g in l.instances)if("0"!==g){h=l.instances[g],a=h.canvas,c=h.name,d=h.settings,f="",e={},k="",d.buttons&&(k=","+d.buttons+",");for(j in edButtons)edButtons[j]&&(i=edButtons[j].id,k&&-1!==m.indexOf(","+i+",")&&-1===k.indexOf(","+i+",")||edButtons[j].instance&&edButtons[j].instance!==g||(e[i]=edButtons[j],edButtons[j].html&&(f+=edButtons[j].html(c+"_"))));k&&-1!==k.indexOf(",dfw,")&&(e.dfw=new b.DFWButton,f+=e.dfw.html(c+"_")),"rtl"===document.getElementsByTagName("html")[0].dir&&(e.textdirection=new b.TextDirectionButton,f+=e.textdirection.html(c+"_")),h.toolbar.innerHTML=f,h.theButtons=e,"undefined"!=typeof jQuery&&jQuery(document).triggerHandler("quicktags-init",[h])}l.buttonsInitDone=!0},b.addButton=function(a,c,d,e,f,g,h,i,j){var k;if(a&&c){if(h=h||0,e=e||"",j=j||{},"function"==typeof d)k=new b.Button(a,c,f,g,i,j),k.callback=d;else{if("string"!=typeof d)return;k=new b.TagButton(a,c,d,e,f,g,i,j)}if(-1===h)return k;if(h>0){for(;"undefined"!=typeof edButtons[h];)h++;edButtons[h]=k}else edButtons[edButtons.length]=k;this.buttonsInitDone&&this._buttonsInit()}},b.insertContent=function(a){var b,c,d,e,f,g=document.getElementById(wpActiveEditor);return g?(document.selection?(g.focus(),b=document.selection.createRange(),b.text=a,g.focus()):g.selectionStart||0===g.selectionStart?(f=g.value,c=g.selectionStart,d=g.selectionEnd,e=g.scrollTop,g.value=f.substring(0,c)+a+f.substring(d,f.length),g.selectionStart=c+a.length,g.selectionEnd=c+a.length,g.scrollTop=e,g.focus()):(g.value+=a,g.focus()),!0):!1},b.Button=function(a,b,c,d,e,f){this.id=a,this.display=b,this.access="",this.title=d||"",this.instance=e||"",this.attr=f||{}},b.Button.prototype.html=function(b){var c,d,e,f=this.title?' title="'+a(this.title)+'"':"",g=this.attr&&this.attr.ariaLabel?' aria-label="'+a(this.attr.ariaLabel)+'"':"",h=this.display?' value="'+a(this.display)+'"':"",i=this.id?' id="'+a(b+this.id)+'"':"",j=(e=window.wp)&&e.editor&&e.editor.dfw;return"fullscreen"===this.id?'<button type="button"'+i+' class="ed_button qt-dfw qt-fullscreen"'+f+g+"></button>":"dfw"===this.id?(c=j&&j.isActive()?"":' disabled="disabled"',d=j&&j.isOn()?" active":"",'<button type="button"'+i+' class="ed_button qt-dfw'+d+'"'+f+g+c+"></button>"):'<input type="button"'+i+' class="ed_button button button-small"'+f+g+h+" />"},b.Button.prototype.callback=function(){},b.TagButton=function(a,c,d,e,f,g,h,i){var j=this;b.Button.call(j,a,c,f,g,h,i),j.tagStart=d,j.tagEnd=e},b.TagButton.prototype=new b.Button,b.TagButton.prototype.openTag=function(a,b){b.openTags||(b.openTags=[]),this.tagEnd&&(b.openTags.push(this.id),a.value="/"+a.value,this.attr.ariaLabelClose&&a.setAttribute("aria-label",this.attr.ariaLabelClose))},b.TagButton.prototype.closeTag=function(a,b){var c=this.isOpen(b);c!==!1&&b.openTags.splice(c,1),a.value=this.display,this.attr.ariaLabel&&a.setAttribute("aria-label",this.attr.ariaLabel)},b.TagButton.prototype.isOpen=function(a){var b=this,c=0,d=!1;if(a.openTags)for(;d===!1&&c<a.openTags.length;)d=a.openTags[c]===b.id?c:!1,c++;else d=!1;return d},b.TagButton.prototype.callback=function(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=b.value,n=m?l.tagEnd:"";document.selection?(b.focus(),k=document.selection.createRange(),k.text.length>0?l.tagEnd?k.text=l.tagStart+k.text+n:k.text=k.text+l.tagStart:l.tagEnd?l.isOpen(c)===!1?(k.text=l.tagStart,l.openTag(a,c)):(k.text=n,l.closeTag(a,c)):k.text=l.tagStart,b.focus()):b.selectionStart||0===b.selectionStart?(d=b.selectionStart,e=b.selectionEnd,f=e,g=b.scrollTop,h=m.substring(0,d),i=m.substring(e,m.length),j=m.substring(d,e),d!==e?l.tagEnd?(b.value=h+l.tagStart+j+n+i,f+=l.tagStart.length+n.length):(b.value=h+j+l.tagStart+i,f+=l.tagStart.length):l.tagEnd?l.isOpen(c)===!1?(b.value=h+l.tagStart+i,l.openTag(a,c),f=d+l.tagStart.length):(b.value=h+n+i,f=d+n.length,l.closeTag(a,c)):(b.value=h+l.tagStart+i,f=d+l.tagStart.length),b.selectionStart=f,b.selectionEnd=f,b.scrollTop=g,b.focus()):(n?l.isOpen(c)!==!1?(b.value+=l.tagStart,l.openTag(a,c)):(b.value+=n,l.closeTag(a,c)):b.value+=l.tagStart,b.focus())},b.SpellButton=function(){},b.CloseButton=function(){b.Button.call(this,"close",quicktagsL10n.closeTags,"",quicktagsL10n.closeAllOpenTags)},b.CloseButton.prototype=new b.Button,b._close=function(a,b,c){var d,e,f=c.openTags;if(f)for(;f.length>0;)d=c.getButton(f[f.length-1]),e=document.getElementById(c.name+"_"+d.id),a?d.callback.call(d,e,b,c):d.closeTag(e,c)},b.CloseButton.prototype.callback=b._close,b.closeAllTags=function(a){var c=this.getInstance(a);b._close("",c.canvas,c)},b.LinkButton=function(){var a={ariaLabel:quicktagsL10n.link};b.TagButton.call(this,"link","link","","</a>","","","",a)},b.LinkButton.prototype=new b.TagButton,b.LinkButton.prototype.callback=function(a,c,d,e){var f,g=this;return"undefined"!=typeof wpLink?void wpLink.open(d.id):(e||(e="http://"),void(g.isOpen(d)===!1?(f=prompt(quicktagsL10n.enterURL,e),f&&(g.tagStart='<a href="'+f+'">',b.TagButton.prototype.callback.call(g,a,c,d))):b.TagButton.prototype.callback.call(g,a,c,d)))},b.ImgButton=function(){var a={ariaLabel:quicktagsL10n.image};b.TagButton.call(this,"img","img","","","","","",a)},b.ImgButton.prototype=new b.TagButton,b.ImgButton.prototype.callback=function(a,c,d,e){e||(e="http://");var f,g=prompt(quicktagsL10n.enterImageURL,e);g&&(f=prompt(quicktagsL10n.enterImageDescription,""),this.tagStart='<img src="'+g+'" alt="'+f+'" />',b.TagButton.prototype.callback.call(this,a,c,d))},b.DFWButton=function(){b.Button.call(this,"dfw","","f",quicktagsL10n.dfw)},b.DFWButton.prototype=new b.Button,b.DFWButton.prototype.callback=function(){var a;(a=window.wp)&&a.editor&&a.editor.dfw&&window.wp.editor.dfw.toggle()},b.TextDirectionButton=function(){b.Button.call(this,"textdirection",quicktagsL10n.textdirection,"",quicktagsL10n.toggleTextdirection)},b.TextDirectionButton.prototype=new b.Button,b.TextDirectionButton.prototype.callback=function(a,b){var c="rtl"===document.getElementsByTagName("html")[0].dir,d=b.style.direction;d||(d=c?"rtl":"ltr"),b.style.direction="rtl"===d?"ltr":"rtl",b.focus()},edButtons[10]=new b.TagButton("strong","b","<strong>","</strong>","","","",{ariaLabel:quicktagsL10n.strong,ariaLabelClose:quicktagsL10n.strongClose}),edButtons[20]=new b.TagButton("em","i","<em>","</em>","","","",{ariaLabel:quicktagsL10n.em,ariaLabelClose:quicktagsL10n.emClose}),edButtons[30]=new b.LinkButton,edButtons[40]=new b.TagButton("block","b-quote","\n\n<blockquote>","</blockquote>\n\n","","","",{ariaLabel:quicktagsL10n.blockquote,ariaLabelClose:quicktagsL10n.blockquoteClose}),edButtons[50]=new b.TagButton("del","del",'<del datetime="'+d+'">',"</del>","","","",{ariaLabel:quicktagsL10n.del,ariaLabelClose:quicktagsL10n.delClose}),edButtons[60]=new b.TagButton("ins","ins",'<ins datetime="'+d+'">',"</ins>","","","",{ariaLabel:quicktagsL10n.ins,ariaLabelClose:quicktagsL10n.insClose}),edButtons[70]=new b.ImgButton,edButtons[80]=new b.TagButton("ul","ul","<ul>\n","</ul>\n\n","","","",{ariaLabel:quicktagsL10n.ul,ariaLabelClose:quicktagsL10n.ulClose}),edButtons[90]=new b.TagButton("ol","ol","<ol>\n","</ol>\n\n","","","",{ariaLabel:quicktagsL10n.ol,ariaLabelClose:quicktagsL10n.olClose}),edButtons[100]=new b.TagButton("li","li","    <li>","</li>\n","","","",{ariaLabel:quicktagsL10n.li,ariaLabelClose:quicktagsL10n.liClose}),edButtons[110]=new b.TagButton("code","code","<code>","</code>","","","",{ariaLabel:quicktagsL10n.code,ariaLabelClose:quicktagsL10n.codeClose}),edButtons[120]=new b.TagButton("more","more","<!--more-->\n\n","","","","",{ariaLabel:quicktagsL10n.more}),edButtons[140]=new b.CloseButton}();
\ No newline at end of file
+function quicktags(a){return new QTags(a)}function edInsertContent(a,b){return QTags.insertContent(b)}function edButton(a,b,c,d,e){return QTags.addButton(a,b,c,d,e,"",-1)}var QTags,edCanvas,edButtons=[],edAddTag=function(){},edCheckOpenTags=function(){},edCloseAllTags=function(){},edInsertImage=function(){},edInsertLink=function(){},edInsertTag=function(){},edLink=function(){},edQuickLink=function(){},edRemoveTag=function(){},edShowButton=function(){},edShowLinks=function(){},edSpell=function(){},edToolbar=function(){};!function(){function a(a){return a=a||"",a=a.replace(/&([^#])(?![a-z1-4]{1,8};)/gi,"&#038;$1"),a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}var b,c=function(a){var b,d,e,f;"undefined"!=typeof jQuery?jQuery(document).ready(a):(b=c,b.funcs=[],b.ready=function(){if(!b.isReady)for(b.isReady=!0,d=0;d<b.funcs.length;d++)b.funcs[d]()},b.isReady?a():b.funcs.push(a),b.eventAttached||(document.addEventListener?(e=function(){document.removeEventListener("DOMContentLoaded",e,!1),b.ready()},document.addEventListener("DOMContentLoaded",e,!1),window.addEventListener("load",b.ready,!1)):document.attachEvent&&(e=function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",e),b.ready())},document.attachEvent("onreadystatechange",e),window.attachEvent("onload",b.ready),(f=function(){try{document.documentElement.doScroll("left")}catch(a){return void setTimeout(f,50)}b.ready()})()),b.eventAttached=!0))},d=function(){var a,b=new Date;return a=function(a){var b=a.toString();return b.length<2&&(b="0"+b),b},b.getUTCFullYear()+"-"+a(b.getUTCMonth()+1)+"-"+a(b.getUTCDate())+"T"+a(b.getUTCHours())+":"+a(b.getUTCMinutes())+":"+a(b.getUTCSeconds())+"+00:00"}();b=QTags=function(a){if("string"==typeof a)a={id:a};else if("object"!=typeof a)return!1;var d,e,f,g,h,i=this,j=a.id,k=document.getElementById(j),l="qt_"+j;return!(!j||!k)&&(i.name=l,i.id=j,i.canvas=k,i.settings=a,"content"!==j||"string"!=typeof adminpage||"post-new-php"!==adminpage&&"post-php"!==adminpage?f=l+"_toolbar":(edCanvas=k,f="ed_toolbar"),d=document.getElementById(f),d||(d=document.createElement("div"),d.id=f,d.className="quicktags-toolbar"),k.parentNode.insertBefore(d,k),i.toolbar=d,e=function(a){a=a||window.event;var b,c=a.target||a.srcElement,d=c.clientWidth||c.offsetWidth;d&&/ ed_button /.test(" "+c.className+" ")&&(i.canvas=k=document.getElementById(j),b=c.id.replace(l+"_",""),i.theButtons[b]&&i.theButtons[b].callback.call(i.theButtons[b],c,k,i))},h=function(){window.wpActiveEditor=j},g=document.getElementById("wp-"+j+"-wrap"),d.addEventListener?(d.addEventListener("click",e,!1),g&&g.addEventListener("click",h,!1)):d.attachEvent&&(d.attachEvent("onclick",e),g&&g.attachEvent("onclick",h)),i.getButton=function(a){return i.theButtons[a]},i.getButtonElement=function(a){return document.getElementById(l+"_"+a)},b.instances[j]=i,void(b.instances[0]||(b.instances[0]=b.instances[j],c(function(){b._buttonsInit()}))))},b.instances={},b.getInstance=function(a){return b.instances[a]},b._buttonsInit=function(){var a,c,d,e,f,g,h,i,j,k,l=this,m=",strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,";for(g in l.instances)if("0"!==g){h=l.instances[g],a=h.canvas,c=h.name,d=h.settings,f="",e={},k="",d.buttons&&(k=","+d.buttons+",");for(j in edButtons)edButtons[j]&&(i=edButtons[j].id,k&&m.indexOf(","+i+",")!==-1&&k.indexOf(","+i+",")===-1||edButtons[j].instance&&edButtons[j].instance!==g||(e[i]=edButtons[j],edButtons[j].html&&(f+=edButtons[j].html(c+"_"))));k&&k.indexOf(",dfw,")!==-1&&(e.dfw=new b.DFWButton,f+=e.dfw.html(c+"_")),"rtl"===document.getElementsByTagName("html")[0].dir&&(e.textdirection=new b.TextDirectionButton,f+=e.textdirection.html(c+"_")),h.toolbar.innerHTML=f,h.theButtons=e,"undefined"!=typeof jQuery&&jQuery(document).triggerHandler("quicktags-init",[h])}l.buttonsInitDone=!0},b.addButton=function(a,c,d,e,f,g,h,i,j){var k;if(a&&c){if(h=h||0,e=e||"",j=j||{},"function"==typeof d)k=new b.Button(a,c,f,g,i,j),k.callback=d;else{if("string"!=typeof d)return;k=new b.TagButton(a,c,d,e,f,g,i,j)}if(h===-1)return k;if(h>0){for(;"undefined"!=typeof edButtons[h];)h++;edButtons[h]=k}else edButtons[edButtons.length]=k;this.buttonsInitDone&&this._buttonsInit()}},b.insertContent=function(a){var b,c,d,e,f,g=document.getElementById(wpActiveEditor);return!!g&&(document.selection?(g.focus(),b=document.selection.createRange(),b.text=a,g.focus()):g.selectionStart||0===g.selectionStart?(f=g.value,c=g.selectionStart,d=g.selectionEnd,e=g.scrollTop,g.value=f.substring(0,c)+a+f.substring(d,f.length),g.selectionStart=c+a.length,g.selectionEnd=c+a.length,g.scrollTop=e,g.focus()):(g.value+=a,g.focus()),!0)},b.Button=function(a,b,c,d,e,f){this.id=a,this.display=b,this.access="",this.title=d||"",this.instance=e||"",this.attr=f||{}},b.Button.prototype.html=function(b){var c,d,e,f=this.title?' title="'+a(this.title)+'"':"",g=this.attr&&this.attr.ariaLabel?' aria-label="'+a(this.attr.ariaLabel)+'"':"",h=this.display?' value="'+a(this.display)+'"':"",i=this.id?' id="'+a(b+this.id)+'"':"",j=(e=window.wp)&&e.editor&&e.editor.dfw;return"fullscreen"===this.id?'<button type="button"'+i+' class="ed_button qt-dfw qt-fullscreen"'+f+g+"></button>":"dfw"===this.id?(c=j&&j.isActive()?"":' disabled="disabled"',d=j&&j.isOn()?" active":"",'<button type="button"'+i+' class="ed_button qt-dfw'+d+'"'+f+g+c+"></button>"):'<input type="button"'+i+' class="ed_button button button-small"'+f+g+h+" />"},b.Button.prototype.callback=function(){},b.TagButton=function(a,c,d,e,f,g,h,i){var j=this;b.Button.call(j,a,c,f,g,h,i),j.tagStart=d,j.tagEnd=e},b.TagButton.prototype=new b.Button,b.TagButton.prototype.openTag=function(a,b){b.openTags||(b.openTags=[]),this.tagEnd&&(b.openTags.push(this.id),a.value="/"+a.value,this.attr.ariaLabelClose&&a.setAttribute("aria-label",this.attr.ariaLabelClose))},b.TagButton.prototype.closeTag=function(a,b){var c=this.isOpen(b);c!==!1&&b.openTags.splice(c,1),a.value=this.display,this.attr.ariaLabel&&a.setAttribute("aria-label",this.attr.ariaLabel)},b.TagButton.prototype.isOpen=function(a){var b=this,c=0,d=!1;if(a.openTags)for(;d===!1&&c<a.openTags.length;)d=a.openTags[c]===b.id&&c,c++;else d=!1;return d},b.TagButton.prototype.callback=function(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=b.value,n=m?l.tagEnd:"";document.selection?(b.focus(),k=document.selection.createRange(),k.text.length>0?l.tagEnd?k.text=l.tagStart+k.text+n:k.text=k.text+l.tagStart:l.tagEnd?l.isOpen(c)===!1?(k.text=l.tagStart,l.openTag(a,c)):(k.text=n,l.closeTag(a,c)):k.text=l.tagStart,b.focus()):b.selectionStart||0===b.selectionStart?(d=b.selectionStart,e=b.selectionEnd,d<e&&"\n"===m.charAt(e-1)&&(e-=1),f=e,g=b.scrollTop,h=m.substring(0,d),i=m.substring(e,m.length),j=m.substring(d,e),d!==e?l.tagEnd?(b.value=h+l.tagStart+j+n+i,f+=l.tagStart.length+n.length):(b.value=h+j+l.tagStart+i,f+=l.tagStart.length):l.tagEnd?l.isOpen(c)===!1?(b.value=h+l.tagStart+i,l.openTag(a,c),f=d+l.tagStart.length):(b.value=h+n+i,f=d+n.length,l.closeTag(a,c)):(b.value=h+l.tagStart+i,f=d+l.tagStart.length),b.selectionStart=f,b.selectionEnd=f,b.scrollTop=g,b.focus()):(n?l.isOpen(c)!==!1?(b.value+=l.tagStart,l.openTag(a,c)):(b.value+=n,l.closeTag(a,c)):b.value+=l.tagStart,b.focus())},b.SpellButton=function(){},b.CloseButton=function(){b.Button.call(this,"close",quicktagsL10n.closeTags,"",quicktagsL10n.closeAllOpenTags)},b.CloseButton.prototype=new b.Button,b._close=function(a,b,c){var d,e,f=c.openTags;if(f)for(;f.length>0;)d=c.getButton(f[f.length-1]),e=document.getElementById(c.name+"_"+d.id),a?d.callback.call(d,e,b,c):d.closeTag(e,c)},b.CloseButton.prototype.callback=b._close,b.closeAllTags=function(a){var c=this.getInstance(a);b._close("",c.canvas,c)},b.LinkButton=function(){var a={ariaLabel:quicktagsL10n.link};b.TagButton.call(this,"link","link","","</a>","","","",a)},b.LinkButton.prototype=new b.TagButton,b.LinkButton.prototype.callback=function(a,c,d,e){var f,g=this;return"undefined"!=typeof wpLink?void wpLink.open(d.id):(e||(e="http://"),void(g.isOpen(d)===!1?(f=prompt(quicktagsL10n.enterURL,e),f&&(g.tagStart='<a href="'+f+'">',b.TagButton.prototype.callback.call(g,a,c,d))):b.TagButton.prototype.callback.call(g,a,c,d)))},b.ImgButton=function(){var a={ariaLabel:quicktagsL10n.image};b.TagButton.call(this,"img","img","","","","","",a)},b.ImgButton.prototype=new b.TagButton,b.ImgButton.prototype.callback=function(a,c,d,e){e||(e="http://");var f,g=prompt(quicktagsL10n.enterImageURL,e);g&&(f=prompt(quicktagsL10n.enterImageDescription,""),this.tagStart='<img src="'+g+'" alt="'+f+'" />',b.TagButton.prototype.callback.call(this,a,c,d))},b.DFWButton=function(){b.Button.call(this,"dfw","","f",quicktagsL10n.dfw)},b.DFWButton.prototype=new b.Button,b.DFWButton.prototype.callback=function(){var a;(a=window.wp)&&a.editor&&a.editor.dfw&&window.wp.editor.dfw.toggle()},b.TextDirectionButton=function(){b.Button.call(this,"textdirection",quicktagsL10n.textdirection,"",quicktagsL10n.toggleTextdirection)},b.TextDirectionButton.prototype=new b.Button,b.TextDirectionButton.prototype.callback=function(a,b){var c="rtl"===document.getElementsByTagName("html")[0].dir,d=b.style.direction;d||(d=c?"rtl":"ltr"),b.style.direction="rtl"===d?"ltr":"rtl",b.focus()},edButtons[10]=new b.TagButton("strong","b","<strong>","</strong>","","","",{ariaLabel:quicktagsL10n.strong,ariaLabelClose:quicktagsL10n.strongClose}),edButtons[20]=new b.TagButton("em","i","<em>","</em>","","","",{ariaLabel:quicktagsL10n.em,ariaLabelClose:quicktagsL10n.emClose}),edButtons[30]=new b.LinkButton,edButtons[40]=new b.TagButton("block","b-quote","\n\n<blockquote>","</blockquote>\n\n","","","",{ariaLabel:quicktagsL10n.blockquote,ariaLabelClose:quicktagsL10n.blockquoteClose}),edButtons[50]=new b.TagButton("del","del",'<del datetime="'+d+'">',"</del>","","","",{ariaLabel:quicktagsL10n.del,ariaLabelClose:quicktagsL10n.delClose}),edButtons[60]=new b.TagButton("ins","ins",'<ins datetime="'+d+'">',"</ins>","","","",{ariaLabel:quicktagsL10n.ins,ariaLabelClose:quicktagsL10n.insClose}),edButtons[70]=new b.ImgButton,edButtons[80]=new b.TagButton("ul","ul","<ul>\n","</ul>\n\n","","","",{ariaLabel:quicktagsL10n.ul,ariaLabelClose:quicktagsL10n.ulClose}),edButtons[90]=new b.TagButton("ol","ol","<ol>\n","</ol>\n\n","","","",{ariaLabel:quicktagsL10n.ol,ariaLabelClose:quicktagsL10n.olClose}),edButtons[100]=new b.TagButton("li","li","\t<li>","</li>\n","","","",{ariaLabel:quicktagsL10n.li,ariaLabelClose:quicktagsL10n.liClose}),edButtons[110]=new b.TagButton("code","code","<code>","</code>","","","",{ariaLabel:quicktagsL10n.code,ariaLabelClose:quicktagsL10n.codeClose}),edButtons[120]=new b.TagButton("more","more","<!--more-->\n\n","","","","",{ariaLabel:quicktagsL10n.more}),edButtons[140]=new b.CloseButton}();
\ No newline at end of file
index 7028f6a8bdb5a0888ada2e88633265a041c51771..79423eecfff2a37b4a0101e5116aab8be5b94487 100644 (file)
@@ -326,11 +326,6 @@ window.wp = window.wp || {};
                        _.each( options.attrs, function( value, attr ) {
                                text += ' ' + attr;
 
-                               // Use empty attribute notation where possible.
-                               if ( '' === value ) {
-                                       return;
-                               }
-
                                // Convert boolean values to strings.
                                if ( _.isBoolean( value ) ) {
                                        value = value ? 'true' : 'false';
index 8544d1417c9802c4399dc146572a2656e3fab7cd..110580cc433fc516b544774d90abead7dd65a507 100644 (file)
@@ -1 +1 @@
-window.wp=window.wp||{},function(){wp.shortcode={next:function(a,b,c){var d,e,f=wp.shortcode.regexp(a);return f.lastIndex=c||0,(d=f.exec(b))?"["===d[1]&&"]"===d[7]?wp.shortcode.next(a,b,f.lastIndex):(e={index:d.index,content:d[0],shortcode:wp.shortcode.fromMatch(d)},d[1]&&(e.content=e.content.slice(1),e.index++),d[7]&&(e.content=e.content.slice(0,-1)),e):void 0},replace:function(a,b,c){return b.replace(wp.shortcode.regexp(a),function(a,b,d,e,f,g,h,i){if("["===b&&"]"===i)return a;var j=c(wp.shortcode.fromMatch(arguments));return j?b+j+i:a})},string:function(a){return new wp.shortcode(a).string()},regexp:_.memoize(function(a){return new RegExp("\\[(\\[?)("+a+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}),attrs:_.memoize(function(a){var b,c,d={},e=[];for(b=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/g,a=a.replace(/[\u00a0\u200b]/g," ");c=b.exec(a);)c[1]?d[c[1].toLowerCase()]=c[2]:c[3]?d[c[3].toLowerCase()]=c[4]:c[5]?d[c[5].toLowerCase()]=c[6]:c[7]?e.push(c[7]):c[8]&&e.push(c[8]);return{named:d,numeric:e}}),fromMatch:function(a){var b;return b=a[4]?"self-closing":a[6]?"closed":"single",new wp.shortcode({tag:a[2],attrs:a[3],type:b,content:a[5]})}},wp.shortcode=_.extend(function(a){_.extend(this,_.pick(a||{},"tag","attrs","type","content"));var b=this.attrs;this.attrs={named:{},numeric:[]},b&&(_.isString(b)?this.attrs=wp.shortcode.attrs(b):_.isEqual(_.keys(b),["named","numeric"])?this.attrs=b:_.each(a.attrs,function(a,b){this.set(b,a)},this))},wp.shortcode),_.extend(wp.shortcode.prototype,{get:function(a){return this.attrs[_.isNumber(a)?"numeric":"named"][a]},set:function(a,b){return this.attrs[_.isNumber(a)?"numeric":"named"][a]=b,this},string:function(){var a="["+this.tag;return _.each(this.attrs.numeric,function(b){a+=/\s/.test(b)?' "'+b+'"':" "+b}),_.each(this.attrs.named,function(b,c){a+=" "+c+'="'+b+'"'}),"single"===this.type?a+"]":"self-closing"===this.type?a+" /]":(a+="]",this.content&&(a+=this.content),a+"[/"+this.tag+"]")}})}(),function(){wp.html=_.extend(wp.html||{},{attrs:function(a){var b,c;return"/"===a[a.length-1]&&(a=a.slice(0,-1)),b=wp.shortcode.attrs(a),c=b.named,_.each(b.numeric,function(a){/\s/.test(a)||(c[a]="")}),c},string:function(a){var b="<"+a.tag,c=a.content||"";return _.each(a.attrs,function(a,c){b+=" "+c,""!==a&&(_.isBoolean(a)&&(a=a?"true":"false"),b+='="'+a+'"')}),a.single?b+" />":(b+=">",b+=_.isObject(c)?wp.html.string(c):c,b+"</"+a.tag+">")}})}();
\ No newline at end of file
+window.wp=window.wp||{},function(){wp.shortcode={next:function(a,b,c){var d,e,f=wp.shortcode.regexp(a);if(f.lastIndex=c||0,d=f.exec(b))return"["===d[1]&&"]"===d[7]?wp.shortcode.next(a,b,f.lastIndex):(e={index:d.index,content:d[0],shortcode:wp.shortcode.fromMatch(d)},d[1]&&(e.content=e.content.slice(1),e.index++),d[7]&&(e.content=e.content.slice(0,-1)),e)},replace:function(a,b,c){return b.replace(wp.shortcode.regexp(a),function(a,b,d,e,f,g,h,i){if("["===b&&"]"===i)return a;var j=c(wp.shortcode.fromMatch(arguments));return j?b+j+i:a})},string:function(a){return new wp.shortcode(a).string()},regexp:_.memoize(function(a){return new RegExp("\\[(\\[?)("+a+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}),attrs:_.memoize(function(a){var b,c,d={},e=[];for(b=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/g,a=a.replace(/[\u00a0\u200b]/g," ");c=b.exec(a);)c[1]?d[c[1].toLowerCase()]=c[2]:c[3]?d[c[3].toLowerCase()]=c[4]:c[5]?d[c[5].toLowerCase()]=c[6]:c[7]?e.push(c[7]):c[8]&&e.push(c[8]);return{named:d,numeric:e}}),fromMatch:function(a){var b;return b=a[4]?"self-closing":a[6]?"closed":"single",new wp.shortcode({tag:a[2],attrs:a[3],type:b,content:a[5]})}},wp.shortcode=_.extend(function(a){_.extend(this,_.pick(a||{},"tag","attrs","type","content"));var b=this.attrs;this.attrs={named:{},numeric:[]},b&&(_.isString(b)?this.attrs=wp.shortcode.attrs(b):_.isEqual(_.keys(b),["named","numeric"])?this.attrs=b:_.each(a.attrs,function(a,b){this.set(b,a)},this))},wp.shortcode),_.extend(wp.shortcode.prototype,{get:function(a){return this.attrs[_.isNumber(a)?"numeric":"named"][a]},set:function(a,b){return this.attrs[_.isNumber(a)?"numeric":"named"][a]=b,this},string:function(){var a="["+this.tag;return _.each(this.attrs.numeric,function(b){a+=/\s/.test(b)?' "'+b+'"':" "+b}),_.each(this.attrs.named,function(b,c){a+=" "+c+'="'+b+'"'}),"single"===this.type?a+"]":"self-closing"===this.type?a+" /]":(a+="]",this.content&&(a+=this.content),a+"[/"+this.tag+"]")}})}(),function(){wp.html=_.extend(wp.html||{},{attrs:function(a){var b,c;return"/"===a[a.length-1]&&(a=a.slice(0,-1)),b=wp.shortcode.attrs(a),c=b.named,_.each(b.numeric,function(a){/\s/.test(a)||(c[a]="")}),c},string:function(a){var b="<"+a.tag,c=a.content||"";return _.each(a.attrs,function(a,c){b+=" "+c,_.isBoolean(a)&&(a=a?"true":"false"),b+='="'+a+'"'}),a.single?b+" />":(b+=">",b+=_.isObject(c)?wp.html.string(c):c,b+"</"+a.tag+">")}})}();
\ No newline at end of file
index 6bfac61ee4d000540d0ca8354a0a22507b7091aa..3374f68569a0a227a6c42a997c38b6d265212dbb 100644 (file)
 #TB_closeWindowButton:focus .tb-close-icon {
        color: #00a0d2;
 }
+
+#TB_closeWindowButton:focus .tb-close-icon {
+       -webkit-box-shadow:
+               0 0 0 1px #5b9dd9,
+               0 0 2px 1px rgba(30, 140, 190, .8);
+       box-shadow:
+               0 0 0 1px #5b9dd9,
+               0 0 2px 1px rgba(30, 140, 190, .8);
+}
index 164f72e61688e85ea5ad3387086ba1a0d06c1169..391fd4186e268dc67e97cd02dcb80a3d3eb5e8a4 100644 (file)
@@ -212,7 +212,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
                        }else{// not an iframe, ajax
                                        if(jQuery("#TB_window").css("visibility") != "visible"){
                                                if(params['modal'] != "true"){//ajax no modal
-                                               jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><div class='tb-close-icon'></div></a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
+                                               jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
                                                }else{//ajax modal
                                                jQuery("#TB_overlay").unbind();
                                                jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");
index 295d8d4903d05158394d2f770ff4dc51f77e0573..90de9383cac98c522f824bbca95cffc11391ba01 100644 (file)
@@ -117,16 +117,19 @@ tinymce.PluginManager.add('charmap', function(editor) {
                        ['195', 'A - tilde'],
                        ['196', 'A - diaeresis'],
                        ['197', 'A - ring above'],
+                       ['256', 'A - macron'],
                        ['198', 'ligature AE'],
                        ['199', 'C - cedilla'],
                        ['200', 'E - grave'],
                        ['201', 'E - acute'],
                        ['202', 'E - circumflex'],
                        ['203', 'E - diaeresis'],
+                       ['274', 'E - macron'],
                        ['204', 'I - grave'],
                        ['205', 'I - acute'],
                        ['206', 'I - circumflex'],
                        ['207', 'I - diaeresis'],
+                       ['298', 'I - macron'],
                        ['208', 'ETH'],
                        ['209', 'N - tilde'],
                        ['210', 'O - grave'],
@@ -135,14 +138,17 @@ tinymce.PluginManager.add('charmap', function(editor) {
                        ['213', 'O - tilde'],
                        ['214', 'O - diaeresis'],
                        ['216', 'O - slash'],
+                       ['332', 'O - macron'],
                        ['338', 'ligature OE'],
                        ['352', 'S - caron'],
                        ['217', 'U - grave'],
                        ['218', 'U - acute'],
                        ['219', 'U - circumflex'],
                        ['220', 'U - diaeresis'],
+                       ['362', 'U - macron'],
                        ['221', 'Y - acute'],
                        ['376', 'Y - diaeresis'],
+                       ['562', 'Y - macron'],
                        ['222', 'THORN'],
                        ['224', 'a - grave'],
                        ['225', 'a - acute'],
@@ -150,16 +156,19 @@ tinymce.PluginManager.add('charmap', function(editor) {
                        ['227', 'a - tilde'],
                        ['228', 'a - diaeresis'],
                        ['229', 'a - ring above'],
+                       ['257', 'a - macron'],
                        ['230', 'ligature ae'],
                        ['231', 'c - cedilla'],
                        ['232', 'e - grave'],
                        ['233', 'e - acute'],
                        ['234', 'e - circumflex'],
                        ['235', 'e - diaeresis'],
+                       ['275', 'e - macron'],
                        ['236', 'i - grave'],
                        ['237', 'i - acute'],
                        ['238', 'i - circumflex'],
                        ['239', 'i - diaeresis'],
+                       ['299', 'i - macron'],
                        ['240', 'eth'],
                        ['241', 'n - tilde'],
                        ['242', 'o - grave'],
@@ -168,15 +177,18 @@ tinymce.PluginManager.add('charmap', function(editor) {
                        ['245', 'o - tilde'],
                        ['246', 'o - diaeresis'],
                        ['248', 'o slash'],
+                       ['333', 'o macron'],
                        ['339', 'ligature oe'],
                        ['353', 's - caron'],
                        ['249', 'u - grave'],
                        ['250', 'u - acute'],
                        ['251', 'u - circumflex'],
                        ['252', 'u - diaeresis'],
+                       ['363', 'u - macron'],
                        ['253', 'y - acute'],
                        ['254', 'thorn'],
                        ['255', 'y - diaeresis'],
+                       ['563', 'y - macron'],
                        ['913', 'Alpha'],
                        ['914', 'Beta'],
                        ['915', 'Gamma'],
index 9fd639ef9c2adb9553e66c799ab71fccedf4c4e8..9bf1e9fcd85f4968f089884dd0f4163c57a833e4 100644 (file)
@@ -1 +1 @@
-tinymce.PluginManager.add("charmap",function(a){function b(){return[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["221","Y - acute"],["376","Y - diaeresis"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]]}function c(a){return tinymce.util.Tools.grep(a,function(a){return i(a)&&2==a.length})}function d(a){return i(a)?[].concat(c(a)):"function"==typeof a?a():[]}function e(b){var c=a.settings;return c.charmap&&(b=d(c.charmap)),c.charmap_append?[].concat(b).concat(d(c.charmap_append)):b}function f(){return e(b())}function g(b){a.fire("insertCustomChar",{chr:b}).chr,a.execCommand("mceInsertContent",!1,b)}function h(){function b(a){for(;a;){if("TD"==a.nodeName)return a;a=a.parentNode}}var c,d,e,h;c='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';var i=f(),j=Math.min(i.length,25),k=Math.ceil(i.length/j);for(e=0;k>e;e++){for(c+="<tr>",d=0;j>d;d++){var l=e*j+d;if(l<i.length){var m=i[l];c+='<td title="'+m[1]+'"><div tabindex="-1" title="'+m[1]+'" role="button">'+(m?String.fromCharCode(parseInt(m[0],10)):"&nbsp;")+"</div></td>"}else c+="<td />"}c+="</tr>"}c+="</tbody></table>";var n={type:"container",html:c,onclick:function(a){var c=a.target;/^(TD|DIV)$/.test(c.nodeName)&&b(c).firstChild&&(g(tinymce.trim(c.innerText||c.textContent)),a.ctrlKey||h.close())},onmouseover:function(a){var c=b(a.target);c&&c.firstChild?(h.find("#preview").text(c.firstChild.firstChild.data),h.find("#previewTitle").text(c.title)):(h.find("#preview").text(" "),h.find("#previewTitle").text(" "))}};h=a.windowManager.open({title:"Special character",spacing:10,padding:10,items:[n,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"label",name:"previewTitle",text:" ",style:"text-align: center",border:1,minWidth:140,minHeight:80}]}],buttons:[{text:"Close",onclick:function(){h.close()}}]})}var i=tinymce.util.Tools.isArray;return a.addCommand("mceShowCharmap",h),a.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),a.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"}),{getCharMap:f,insertChar:g}});
\ No newline at end of file
+tinymce.PluginManager.add("charmap",function(a){function b(){return[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]]}function c(a){return tinymce.util.Tools.grep(a,function(a){return i(a)&&2==a.length})}function d(a){return i(a)?[].concat(c(a)):"function"==typeof a?a():[]}function e(b){var c=a.settings;return c.charmap&&(b=d(c.charmap)),c.charmap_append?[].concat(b).concat(d(c.charmap_append)):b}function f(){return e(b())}function g(b){a.fire("insertCustomChar",{chr:b}).chr,a.execCommand("mceInsertContent",!1,b)}function h(){function b(a){for(;a;){if("TD"==a.nodeName)return a;a=a.parentNode}}var c,d,e,h;c='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';var i=f(),j=Math.min(i.length,25),k=Math.ceil(i.length/j);for(e=0;k>e;e++){for(c+="<tr>",d=0;j>d;d++){var l=e*j+d;if(l<i.length){var m=i[l];c+='<td title="'+m[1]+'"><div tabindex="-1" title="'+m[1]+'" role="button">'+(m?String.fromCharCode(parseInt(m[0],10)):"&nbsp;")+"</div></td>"}else c+="<td />"}c+="</tr>"}c+="</tbody></table>";var n={type:"container",html:c,onclick:function(a){var c=a.target;/^(TD|DIV)$/.test(c.nodeName)&&b(c).firstChild&&(g(tinymce.trim(c.innerText||c.textContent)),a.ctrlKey||h.close())},onmouseover:function(a){var c=b(a.target);c&&c.firstChild?(h.find("#preview").text(c.firstChild.firstChild.data),h.find("#previewTitle").text(c.title)):(h.find("#preview").text(" "),h.find("#previewTitle").text(" "))}};h=a.windowManager.open({title:"Special character",spacing:10,padding:10,items:[n,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"label",name:"previewTitle",text:" ",style:"text-align: center",border:1,minWidth:140,minHeight:80}]}],buttons:[{text:"Close",onclick:function(){h.close()}}]})}var i=tinymce.util.Tools.isArray;return a.addCommand("mceShowCharmap",h),a.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),a.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"}),{getCharMap:f,insertChar:g}});
\ No newline at end of file
index 4d1f29ff461c7e34327a72e1e90c034aa27adaf8..0aacc8b3e879b6067d55b1ce43af02df2aa31747 100644 (file)
@@ -1,8 +1,6 @@
-@import url("https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=latin-ext,latin");
-
 /* Generic */
 body {
-font-family: "Open Sans", sans-serif;
+font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
 font-size:13px;
 background:#fcfcfc;
 padding:0;
@@ -65,7 +63,7 @@ input.mceButton,
        background-image: -moz-linear-gradient(top, #fafafa, #e9e9e9);
        background-image: -o-linear-gradient(top, #fafafa, #e9e9e9);
        background-image: linear-gradient(to bottom, #fafafa, #e9e9e9);
-       
+
        text-shadow: 0 1px 0 #fff;
        -webkit-box-shadow: inset 0 1px 0 #fff;
        -moz-box-shadow: inset 0 1px 0 #fff;
@@ -201,7 +199,7 @@ h3 {font-size:14px;}
 #colorpicker #picker_panel fieldset {margin:auto;width:325px;}
 
 
-/* Localization */ 
+/* Localization */
 
 body[dir="rtl"],
 body[dir="rtl"] fieldset,
index 80ebcb74fc720c910d7dd81fee1448abce18c0fe..59efa5510e16d705141416eee50059bc6586304a 100644 (file)
@@ -117,7 +117,7 @@ tinymce.PluginManager.add('fullscreen', function(editor) {
 
        editor.addMenuItem('fullscreen', {
                text: 'Fullscreen',
-               shortcut: 'Meta+Alt+F',
+               shortcut: 'Ctrl+Shift+F',
                selectable: true,
                onClick: function() {
                        toggleFullscreen();
@@ -135,7 +135,7 @@ tinymce.PluginManager.add('fullscreen', function(editor) {
 
        editor.addButton('fullscreen', {
                tooltip: 'Fullscreen',
-               shortcut: 'Meta+Alt+F',
+               shortcut: 'Ctrl+Alt+F',
                onClick: toggleFullscreen,
                onPostRender: function() {
                        var self = this;
index c65807aac279c22bf0afdd8279510643cad166c2..675d6fd415c25ae813029d174b11736d83ebcffc 100644 (file)
@@ -1 +1 @@
-tinymce.PluginManager.add("fullscreen",function(a){function b(){var a,b,c=window,d=document,e=d.body;return e.offsetWidth&&(a=e.offsetWidth,b=e.offsetHeight),c.innerWidth&&c.innerHeight&&(a=c.innerWidth,b=c.innerHeight),{w:a,h:b}}function c(){var a=tinymce.DOM.getViewPort();return{x:a.x,y:a.y}}function d(a){scrollTo(a.x,a.y)}function e(){function e(){m.setStyle(p,"height",b().h-(o.clientHeight-p.clientHeight))}var n,o,p,q,r=document.body,s=document.documentElement;l=!l,o=a.getContainer(),n=o.style,p=a.getContentAreaContainer().firstChild,q=p.style,l?(k=c(),f=q.width,g=q.height,q.width=q.height="100%",i=n.width,j=n.height,n.width=n.height="",m.addClass(r,"mce-fullscreen"),m.addClass(s,"mce-fullscreen"),m.addClass(o,"mce-fullscreen"),m.bind(window,"resize",e),e(),h=e):(q.width=f,q.height=g,i&&(n.width=i),j&&(n.height=j),m.removeClass(r,"mce-fullscreen"),m.removeClass(s,"mce-fullscreen"),m.removeClass(o,"mce-fullscreen"),m.unbind(window,"resize",h),d(k)),a.fire("FullscreenStateChanged",{state:l})}var f,g,h,i,j,k,l=!1,m=tinymce.DOM;return a.settings.inline?void 0:(a.on("init",function(){a.addShortcut("Ctrl+Shift+F","",e)}),a.on("remove",function(){h&&m.unbind(window,"resize",h)}),a.addCommand("mceFullScreen",e),a.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Meta+Alt+F",selectable:!0,onClick:function(){e(),a.focus()},onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})},context:"view"}),a.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Meta+Alt+F",onClick:e,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})}}),{isFullscreen:function(){return l}})});
\ No newline at end of file
+tinymce.PluginManager.add("fullscreen",function(a){function b(){var a,b,c=window,d=document,e=d.body;return e.offsetWidth&&(a=e.offsetWidth,b=e.offsetHeight),c.innerWidth&&c.innerHeight&&(a=c.innerWidth,b=c.innerHeight),{w:a,h:b}}function c(){var a=tinymce.DOM.getViewPort();return{x:a.x,y:a.y}}function d(a){scrollTo(a.x,a.y)}function e(){function e(){m.setStyle(p,"height",b().h-(o.clientHeight-p.clientHeight))}var n,o,p,q,r=document.body,s=document.documentElement;l=!l,o=a.getContainer(),n=o.style,p=a.getContentAreaContainer().firstChild,q=p.style,l?(k=c(),f=q.width,g=q.height,q.width=q.height="100%",i=n.width,j=n.height,n.width=n.height="",m.addClass(r,"mce-fullscreen"),m.addClass(s,"mce-fullscreen"),m.addClass(o,"mce-fullscreen"),m.bind(window,"resize",e),e(),h=e):(q.width=f,q.height=g,i&&(n.width=i),j&&(n.height=j),m.removeClass(r,"mce-fullscreen"),m.removeClass(s,"mce-fullscreen"),m.removeClass(o,"mce-fullscreen"),m.unbind(window,"resize",h),d(k)),a.fire("FullscreenStateChanged",{state:l})}var f,g,h,i,j,k,l=!1,m=tinymce.DOM;return a.settings.inline?void 0:(a.on("init",function(){a.addShortcut("Ctrl+Shift+F","",e)}),a.on("remove",function(){h&&m.unbind(window,"resize",h)}),a.addCommand("mceFullScreen",e),a.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,onClick:function(){e(),a.focus()},onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})},context:"view"}),a.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Alt+F",onClick:e,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})}}),{isFullscreen:function(){return l}})});
\ No newline at end of file
index d1a1c1c3d059bf18847f564f615a73c55664d3d9..4a778ff05b98ba2a415973ca23ba47bf11957ada 100644 (file)
@@ -270,11 +270,17 @@ tinymce.PluginManager.add('lists', function(editor) {
                        }
                }
 
+               var shouldMerge = function (listBlock, sibling) {
+                       var targetStyle = editor.dom.getStyle(listBlock, 'list-style-type', true);
+                       var style = editor.dom.getStyle(sibling, 'list-style-type', true);
+                       return targetStyle === style;
+               };
+
                function mergeWithAdjacentLists(listBlock) {
                        var sibling, node;
 
                        sibling = listBlock.nextSibling;
-                       if (sibling && isListNode(sibling) && sibling.nodeName == listBlock.nodeName) {
+                       if (sibling && isListNode(sibling) && sibling.nodeName == listBlock.nodeName && shouldMerge(listBlock, sibling)) {
                                while ((node = sibling.firstChild)) {
                                        listBlock.appendChild(node);
                                }
@@ -283,7 +289,7 @@ tinymce.PluginManager.add('lists', function(editor) {
                        }
 
                        sibling = listBlock.previousSibling;
-                       if (sibling && isListNode(sibling) && sibling.nodeName == listBlock.nodeName) {
+                       if (sibling && isListNode(sibling) && sibling.nodeName == listBlock.nodeName && shouldMerge(listBlock, sibling)) {
                                while ((node = sibling.firstChild)) {
                                        listBlock.insertBefore(node, listBlock.firstChild);
                                }
@@ -394,7 +400,7 @@ tinymce.PluginManager.add('lists', function(editor) {
                }
 
                function indent(li) {
-                       var sibling, newList;
+                       var sibling, newList, listStyle;
 
                        function mergeLists(from, to) {
                                var node;
@@ -440,6 +446,10 @@ tinymce.PluginManager.add('lists', function(editor) {
                        sibling = li.previousSibling;
                        if (sibling && sibling.nodeName == 'LI') {
                                newList = dom.create(li.parentNode.nodeName);
+                               listStyle = dom.getStyle(li.parentNode, 'listStyleType');
+                               if (listStyle) {
+                                       dom.setStyle(newList, 'listStyleType', listStyle);
+                               }
                                sibling.appendChild(newList);
                                newList.appendChild(li);
                                mergeLists(li.lastChild, newList);
@@ -505,7 +515,7 @@ tinymce.PluginManager.add('lists', function(editor) {
                        }
                }
 
-               function applyList(listName) {
+               function applyList(listName, detail) {
                        var rng = selection.getRng(true), bookmark, listItemName = 'LI';
 
                        if (dom.getContentEditable(selection.getNode()) === "false") {
@@ -600,8 +610,17 @@ tinymce.PluginManager.add('lists', function(editor) {
                        tinymce.each(getSelectedTextBlocks(), function(block) {
                                var listBlock, sibling;
 
+                               var hasCompatibleStyle = function (sib) {
+                                       var sibStyle = dom.getStyle(sib, 'list-style-type');
+                                       var detailStyle = detail ? detail['list-style-type'] : '';
+
+                                       detailStyle = detailStyle === null ? '' : detailStyle;
+
+                                       return sibStyle === detailStyle;
+                               };
+
                                sibling = block.previousSibling;
-                               if (sibling && isListNode(sibling) && sibling.nodeName == listName) {
+                               if (sibling && isListNode(sibling) && sibling.nodeName == listName && hasCompatibleStyle(sibling)) {
                                        listBlock = sibling;
                                        block = dom.rename(block, listItemName);
                                        sibling.appendChild(block);
@@ -612,12 +631,17 @@ tinymce.PluginManager.add('lists', function(editor) {
                                        block = dom.rename(block, listItemName);
                                }
 
+                               updateListStyle(listBlock, detail);
                                mergeWithAdjacentLists(listBlock);
                        });
 
                        moveToBookmark(bookmark);
                }
 
+               var updateListStyle = function (el, detail) {
+                       dom.setStyle(el, 'list-style-type', detail ? detail['list-style-type'] : null);
+               };
+
                function removeList() {
                        var bookmark = createBookmark(selection.getRng(true)), root = editor.getBody();
 
@@ -645,7 +669,7 @@ tinymce.PluginManager.add('lists', function(editor) {
                        moveToBookmark(bookmark);
                }
 
-               function toggleList(listName) {
+               function toggleList(listName, detail) {
                        var parentList = dom.getParent(selection.getStart(), 'OL,UL,DL');
 
                        if (isEditorBody(parentList)) {
@@ -657,11 +681,13 @@ tinymce.PluginManager.add('lists', function(editor) {
                                        removeList(listName);
                                } else {
                                        var bookmark = createBookmark(selection.getRng(true));
+                                       updateListStyle(parentList, detail);
                                        mergeWithAdjacentLists(dom.rename(parentList, listName));
+
                                        moveToBookmark(bookmark);
                                }
                        } else {
-                               applyList(listName);
+                               applyList(listName, detail);
                        }
                }
 
@@ -819,16 +845,16 @@ tinymce.PluginManager.add('lists', function(editor) {
                        }
                });
 
-               editor.addCommand('InsertUnorderedList', function() {
-                       toggleList('UL');
+               editor.addCommand('InsertUnorderedList', function(ui, detail) {
+                       toggleList('UL', detail);
                });
 
-               editor.addCommand('InsertOrderedList', function() {
-                       toggleList('OL');
+               editor.addCommand('InsertOrderedList', function(ui, detail) {
+                       toggleList('OL', detail);
                });
 
-               editor.addCommand('InsertDefinitionList', function() {
-                       toggleList('DL');
+               editor.addCommand('InsertDefinitionList', function(ui, detail) {
+                       toggleList('DL', detail);
                });
 
                editor.addQueryStateHandler('InsertUnorderedList', queryListCommandState('UL'));
index 8ef4cf32220d8630e125347c62d81c3779a49140..cf72080a1d60e3b91119fb52e3f90e6245abc0d8 100644 (file)
@@ -1 +1 @@
-tinymce.PluginManager.add("lists",function(a){function b(b){return a.$.contains(a.getBody(),b)}function c(a){return a&&"BR"==a.nodeName}function d(a){return a&&/^(OL|UL|DL)$/.test(a.nodeName)&&b(a)}function e(a){return a.parentNode.firstChild==a}function f(a){return a.parentNode.lastChild==a}function g(b){return b&&!!a.schema.getTextBlockElements()[b.nodeName]}function h(b){return b===a.getBody()}var i=this;a.on("init",function(){function j(a,b){var c=A.isEmpty(a);return b&&A.select("span[data-mce-type=bookmark]").length>0?!1:c}function k(a){function b(b){var d,e,f;e=a[b?"startContainer":"endContainer"],f=a[b?"startOffset":"endOffset"],1==e.nodeType&&(d=A.create("span",{"data-mce-type":"bookmark"}),e.hasChildNodes()?(f=Math.min(f,e.childNodes.length-1),b?e.insertBefore(d,e.childNodes[f]):A.insertAfter(d,e.childNodes[f])):e.appendChild(d),e=d,f=0),c[b?"startContainer":"endContainer"]=e,c[b?"startOffset":"endOffset"]=f}var c={};return b(!0),a.collapsed||b(),c}function l(a){function b(b){function c(a){for(var b=a.parentNode.firstChild,c=0;b;){if(b==a)return c;1==b.nodeType&&"bookmark"==b.getAttribute("data-mce-type")||c++,b=b.nextSibling}return-1}var d,e,f;d=f=a[b?"startContainer":"endContainer"],e=a[b?"startOffset":"endOffset"],d&&(1==d.nodeType&&(e=c(d),d=d.parentNode,A.remove(f)),a[b?"startContainer":"endContainer"]=d,a[b?"startOffset":"endOffset"]=e)}b(!0),b();var c=A.createRng();c.setStart(a.startContainer,a.startOffset),a.endContainer&&c.setEnd(a.endContainer,a.endOffset),B.setRng(c)}function m(b,c){var d,e,f,g=A.createFragment(),h=a.schema.getBlockElements();if(a.settings.forced_root_block&&(c=c||a.settings.forced_root_block),c&&(e=A.create(c),e.tagName===a.settings.forced_root_block&&A.setAttribs(e,a.settings.forced_root_block_attrs),g.appendChild(e)),b)for(;d=b.firstChild;){var i=d.nodeName;f||"SPAN"==i&&"bookmark"==d.getAttribute("data-mce-type")||(f=!0),h[i]?(g.appendChild(d),e=null):c?(e||(e=A.create(c),g.appendChild(e)),e.appendChild(d)):g.appendChild(d)}return a.settings.forced_root_block?f||tinymce.Env.ie&&!(tinymce.Env.ie>10)||e.appendChild(A.create("br",{"data-mce-bogus":"1"})):g.appendChild(A.create("br")),g}function n(){return tinymce.grep(B.getSelectedBlocks(),function(a){return/^(LI|DT|DD)$/.test(a.nodeName)})}function o(a,b,c){function d(a){tinymce.each(g,function(c){a.parentNode.insertBefore(c,b.parentNode)}),A.remove(a)}var e,f,g,h;for(g=A.select('span[data-mce-type="bookmark"]',a),c=c||m(b),e=A.createRng(),e.setStartAfter(b),e.setEndAfter(a),f=e.extractContents(),h=f.firstChild;h;h=h.firstChild)if("LI"==h.nodeName&&A.isEmpty(h)){A.remove(h);break}A.isEmpty(f)||A.insertAfter(f,a),A.insertAfter(c,a),j(b.parentNode)&&d(b.parentNode),A.remove(b),j(a)&&A.remove(a)}function p(a){var b,c;if(b=a.nextSibling,b&&d(b)&&b.nodeName==a.nodeName){for(;c=b.firstChild;)a.appendChild(c);A.remove(b)}if(b=a.previousSibling,b&&d(b)&&b.nodeName==a.nodeName){for(;c=b.firstChild;)a.insertBefore(c,a.firstChild);A.remove(b)}}function q(a){tinymce.each(tinymce.grep(A.select("ol,ul",a)),function(a){var b,c=a.parentNode;"LI"==c.nodeName&&c.firstChild==a&&(b=c.previousSibling,b&&"LI"==b.nodeName&&(b.appendChild(a),j(c)&&A.remove(c))),d(c)&&(b=c.previousSibling,b&&"LI"==b.nodeName&&b.appendChild(a))})}function r(a){function b(a){j(a)&&A.remove(a)}var c,g=a.parentNode,i=g.parentNode;return h(g)?!0:"DD"==a.nodeName?(A.rename(a,"DT"),!0):e(a)&&f(a)?("LI"==i.nodeName?(A.insertAfter(a,i),b(i),A.remove(g)):d(i)?A.remove(g,!0):(i.insertBefore(m(a),g),A.remove(g)),!0):e(a)?("LI"==i.nodeName?(A.insertAfter(a,i),a.appendChild(g),b(i)):d(i)?i.insertBefore(a,g):(i.insertBefore(m(a),g),A.remove(a)),!0):f(a)?("LI"==i.nodeName?A.insertAfter(a,i):d(i)?A.insertAfter(a,g):(A.insertAfter(m(a),g),A.remove(a)),!0):("LI"==i.nodeName?(g=i,c=m(a,"LI")):c=d(i)?m(a,"LI"):m(a),o(g,a,c),q(g.parentNode),!0)}function s(a){function b(b,c){var e;if(d(b)){for(;e=a.lastChild.firstChild;)c.appendChild(e);A.remove(b)}}var c,e;return"DT"==a.nodeName?(A.rename(a,"DD"),!0):(c=a.previousSibling,c&&d(c)?(c.appendChild(a),!0):c&&"LI"==c.nodeName&&d(c.lastChild)?(c.lastChild.appendChild(a),b(a.lastChild,c.lastChild),!0):(c=a.nextSibling,c&&d(c)?(c.insertBefore(a,c.firstChild),!0):(c=a.previousSibling,c&&"LI"==c.nodeName?(e=A.create(a.parentNode.nodeName),c.appendChild(e),e.appendChild(a),b(a.lastChild,e),!0):!1)))}function t(){var b=n();if(b.length){for(var c=k(B.getRng(!0)),d=0;d<b.length&&(s(b[d])||0!==d);d++);return l(c),a.nodeChanged(),!0}}function u(){var b=n();if(b.length){var c,d,e=k(B.getRng(!0)),f=a.getBody();for(c=b.length;c--;)for(var g=b[c].parentNode;g&&g!=f;){for(d=b.length;d--;)if(b[d]===g){b.splice(c,1);break}g=g.parentNode}for(c=0;c<b.length&&(r(b[c])||0!==c);c++);return l(e),a.nodeChanged(),!0}}function v(b){function e(){function b(a){var b,c;for(b=h[a?"startContainer":"endContainer"],c=h[a?"startOffset":"endOffset"],1==b.nodeType&&(b=b.childNodes[Math.min(c,b.childNodes.length-1)]||b);b.parentNode!=f;){if(g(b))return b;if(/^(TD|TH)$/.test(b.parentNode.nodeName))return b;b=b.parentNode}return b}for(var d,e=[],f=a.getBody(),i=b(!0),j=b(),k=[],l=i;l&&(k.push(l),l!=j);l=l.nextSibling);return tinymce.each(k,function(a){if(g(a))return e.push(a),void(d=null);if(A.isBlock(a)||c(a))return c(a)&&A.remove(a),void(d=null);var b=a.nextSibling;return tinymce.dom.BookmarkManager.isBookmarkNode(a)&&(g(b)||!b&&a.parentNode==f)?void(d=null):(d||(d=A.create("p"),a.parentNode.insertBefore(d,a),e.push(d)),void d.appendChild(a))}),e}var f,h=B.getRng(!0),i="LI";"false"!==A.getContentEditable(B.getNode())&&(b=b.toUpperCase(),"DL"==b&&(i="DT"),f=k(h),tinymce.each(e(),function(a){var c,e;e=a.previousSibling,e&&d(e)&&e.nodeName==b?(c=e,a=A.rename(a,i),e.appendChild(a)):(c=A.create(b),a.parentNode.insertBefore(c,a),c.appendChild(a),a=A.rename(a,i)),p(c)}),l(f))}function w(){var b=k(B.getRng(!0)),c=a.getBody();tinymce.each(n(),function(a){var b,e;if(!h(a.parentNode)){if(j(a))return void r(a);for(b=a;b&&b!=c;b=b.parentNode)d(b)&&(e=b);o(e,a)}}),l(b)}function x(a){var b=A.getParent(B.getStart(),"OL,UL,DL");if(!h(b))if(b)if(b.nodeName==a)w(a);else{var c=k(B.getRng(!0));p(A.rename(b,a)),l(c)}else v(a)}function y(b){return function(){var c=A.getParent(a.selection.getStart(),"UL,OL,DL");return c&&c.nodeName==b}}function z(a){return c(a)?!(!A.isBlock(a.nextSibling)||c(a.previousSibling)):!1}var A=a.dom,B=a.selection;i.backspaceDelete=function(e){function f(b,c){var d,e,f=b.startContainer,g=b.startOffset;if(3==f.nodeType&&(c?g<f.data.length:g>0))return f;for(d=a.schema.getNonEmptyElements(),1==f.nodeType&&(f=tinymce.dom.RangeUtils.getNode(f,g)),e=new tinymce.dom.TreeWalker(f,a.getBody()),c&&z(f)&&e.next();f=e[c?"next":"prev2"]();){if("LI"==f.nodeName&&!f.hasChildNodes())return f;if(d[f.nodeName])return f;if(3==f.nodeType&&f.data.length>0)return f}}function g(a,e){var f,g,i=a.parentNode;if(b(a)&&b(e)){if(d(e.lastChild)&&(g=e.lastChild),i==e.lastChild&&c(i.previousSibling)&&A.remove(i.previousSibling),f=e.lastChild,f&&c(f)&&a.hasChildNodes()&&A.remove(f),j(e,!0)&&A.$(e).empty(),!j(a,!0))for(;f=a.firstChild;)e.appendChild(f);g&&e.appendChild(g),A.remove(a),j(i)&&!h(i)&&A.remove(i)}}if(B.isCollapsed()){var i,m,n,o=A.getParent(B.getStart(),"LI");if(o){if(i=o.parentNode,h(i)&&A.isEmpty(i))return!0;if(m=B.getRng(!0),n=A.getParent(f(m,e),"LI"),n&&n!=o){var p=k(m);return e?g(n,o):g(o,n),l(p),!0}if(!n&&!e&&w(i.nodeName))return!0}}},a.on("BeforeExecCommand",function(b){var c,d=b.command.toLowerCase();return"indent"==d?t()&&(c=!0):"outdent"==d&&u()&&(c=!0),c?(a.fire("ExecCommand",{command:b.command}),b.preventDefault(),!0):void 0}),a.addCommand("InsertUnorderedList",function(){x("UL")}),a.addCommand("InsertOrderedList",function(){x("OL")}),a.addCommand("InsertDefinitionList",function(){x("DL")}),a.addQueryStateHandler("InsertUnorderedList",y("UL")),a.addQueryStateHandler("InsertOrderedList",y("OL")),a.addQueryStateHandler("InsertDefinitionList",y("DL")),a.on("keydown",function(b){9!=b.keyCode||tinymce.util.VK.metaKeyPressed(b)||a.dom.getParent(a.selection.getStart(),"LI,DT,DD")&&(b.preventDefault(),b.shiftKey?u():t())})}),a.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:function(){var b=this;a.on("nodechange",function(){for(var c=a.selection.getSelectedBlocks(),d=!1,f=0,g=c.length;!d&&g>f;f++){var h=c[f].nodeName;d="LI"==h&&e(c[f])||"UL"==h||"OL"==h||"DD"==h}b.disabled(d)})}}),a.on("keydown",function(a){a.keyCode==tinymce.util.VK.BACKSPACE?i.backspaceDelete()&&a.preventDefault():a.keyCode==tinymce.util.VK.DELETE&&i.backspaceDelete(!0)&&a.preventDefault()})});
\ No newline at end of file
+tinymce.PluginManager.add("lists",function(a){function b(b){return a.$.contains(a.getBody(),b)}function c(a){return a&&"BR"==a.nodeName}function d(a){return a&&/^(OL|UL|DL)$/.test(a.nodeName)&&b(a)}function e(a){return a.parentNode.firstChild==a}function f(a){return a.parentNode.lastChild==a}function g(b){return b&&!!a.schema.getTextBlockElements()[b.nodeName]}function h(b){return b===a.getBody()}var i=this;a.on("init",function(){function j(a,b){var c=A.isEmpty(a);return b&&A.select("span[data-mce-type=bookmark]").length>0?!1:c}function k(a){function b(b){var d,e,f;e=a[b?"startContainer":"endContainer"],f=a[b?"startOffset":"endOffset"],1==e.nodeType&&(d=A.create("span",{"data-mce-type":"bookmark"}),e.hasChildNodes()?(f=Math.min(f,e.childNodes.length-1),b?e.insertBefore(d,e.childNodes[f]):A.insertAfter(d,e.childNodes[f])):e.appendChild(d),e=d,f=0),c[b?"startContainer":"endContainer"]=e,c[b?"startOffset":"endOffset"]=f}var c={};return b(!0),a.collapsed||b(),c}function l(a){function b(b){function c(a){for(var b=a.parentNode.firstChild,c=0;b;){if(b==a)return c;1==b.nodeType&&"bookmark"==b.getAttribute("data-mce-type")||c++,b=b.nextSibling}return-1}var d,e,f;d=f=a[b?"startContainer":"endContainer"],e=a[b?"startOffset":"endOffset"],d&&(1==d.nodeType&&(e=c(d),d=d.parentNode,A.remove(f)),a[b?"startContainer":"endContainer"]=d,a[b?"startOffset":"endOffset"]=e)}b(!0),b();var c=A.createRng();c.setStart(a.startContainer,a.startOffset),a.endContainer&&c.setEnd(a.endContainer,a.endOffset),B.setRng(c)}function m(b,c){var d,e,f,g=A.createFragment(),h=a.schema.getBlockElements();if(a.settings.forced_root_block&&(c=c||a.settings.forced_root_block),c&&(e=A.create(c),e.tagName===a.settings.forced_root_block&&A.setAttribs(e,a.settings.forced_root_block_attrs),g.appendChild(e)),b)for(;d=b.firstChild;){var i=d.nodeName;f||"SPAN"==i&&"bookmark"==d.getAttribute("data-mce-type")||(f=!0),h[i]?(g.appendChild(d),e=null):c?(e||(e=A.create(c),g.appendChild(e)),e.appendChild(d)):g.appendChild(d)}return a.settings.forced_root_block?f||tinymce.Env.ie&&!(tinymce.Env.ie>10)||e.appendChild(A.create("br",{"data-mce-bogus":"1"})):g.appendChild(A.create("br")),g}function n(){return tinymce.grep(B.getSelectedBlocks(),function(a){return/^(LI|DT|DD)$/.test(a.nodeName)})}function o(a,b,c){function d(a){tinymce.each(g,function(c){a.parentNode.insertBefore(c,b.parentNode)}),A.remove(a)}var e,f,g,h;for(g=A.select('span[data-mce-type="bookmark"]',a),c=c||m(b),e=A.createRng(),e.setStartAfter(b),e.setEndAfter(a),f=e.extractContents(),h=f.firstChild;h;h=h.firstChild)if("LI"==h.nodeName&&A.isEmpty(h)){A.remove(h);break}A.isEmpty(f)||A.insertAfter(f,a),A.insertAfter(c,a),j(b.parentNode)&&d(b.parentNode),A.remove(b),j(a)&&A.remove(a)}function p(a){var b,c;if(b=a.nextSibling,b&&d(b)&&b.nodeName==a.nodeName&&C(a,b)){for(;c=b.firstChild;)a.appendChild(c);A.remove(b)}if(b=a.previousSibling,b&&d(b)&&b.nodeName==a.nodeName&&C(a,b)){for(;c=b.firstChild;)a.insertBefore(c,a.firstChild);A.remove(b)}}function q(a){tinymce.each(tinymce.grep(A.select("ol,ul",a)),function(a){var b,c=a.parentNode;"LI"==c.nodeName&&c.firstChild==a&&(b=c.previousSibling,b&&"LI"==b.nodeName&&(b.appendChild(a),j(c)&&A.remove(c))),d(c)&&(b=c.previousSibling,b&&"LI"==b.nodeName&&b.appendChild(a))})}function r(a){function b(a){j(a)&&A.remove(a)}var c,g=a.parentNode,i=g.parentNode;return h(g)?!0:"DD"==a.nodeName?(A.rename(a,"DT"),!0):e(a)&&f(a)?("LI"==i.nodeName?(A.insertAfter(a,i),b(i),A.remove(g)):d(i)?A.remove(g,!0):(i.insertBefore(m(a),g),A.remove(g)),!0):e(a)?("LI"==i.nodeName?(A.insertAfter(a,i),a.appendChild(g),b(i)):d(i)?i.insertBefore(a,g):(i.insertBefore(m(a),g),A.remove(a)),!0):f(a)?("LI"==i.nodeName?A.insertAfter(a,i):d(i)?A.insertAfter(a,g):(A.insertAfter(m(a),g),A.remove(a)),!0):("LI"==i.nodeName?(g=i,c=m(a,"LI")):c=d(i)?m(a,"LI"):m(a),o(g,a,c),q(g.parentNode),!0)}function s(a){function b(b,c){var e;if(d(b)){for(;e=a.lastChild.firstChild;)c.appendChild(e);A.remove(b)}}var c,e,f;return"DT"==a.nodeName?(A.rename(a,"DD"),!0):(c=a.previousSibling,c&&d(c)?(c.appendChild(a),!0):c&&"LI"==c.nodeName&&d(c.lastChild)?(c.lastChild.appendChild(a),b(a.lastChild,c.lastChild),!0):(c=a.nextSibling,c&&d(c)?(c.insertBefore(a,c.firstChild),!0):(c=a.previousSibling,c&&"LI"==c.nodeName?(e=A.create(a.parentNode.nodeName),f=A.getStyle(a.parentNode,"listStyleType"),f&&A.setStyle(e,"listStyleType",f),c.appendChild(e),e.appendChild(a),b(a.lastChild,e),!0):!1)))}function t(){var b=n();if(b.length){for(var c=k(B.getRng(!0)),d=0;d<b.length&&(s(b[d])||0!==d);d++);return l(c),a.nodeChanged(),!0}}function u(){var b=n();if(b.length){var c,d,e=k(B.getRng(!0)),f=a.getBody();for(c=b.length;c--;)for(var g=b[c].parentNode;g&&g!=f;){for(d=b.length;d--;)if(b[d]===g){b.splice(c,1);break}g=g.parentNode}for(c=0;c<b.length&&(r(b[c])||0!==c);c++);return l(e),a.nodeChanged(),!0}}function v(b,e){function f(){function b(a){var b,c;for(b=i[a?"startContainer":"endContainer"],c=i[a?"startOffset":"endOffset"],1==b.nodeType&&(b=b.childNodes[Math.min(c,b.childNodes.length-1)]||b);b.parentNode!=f;){if(g(b))return b;if(/^(TD|TH)$/.test(b.parentNode.nodeName))return b;b=b.parentNode}return b}for(var d,e=[],f=a.getBody(),h=b(!0),j=b(),k=[],l=h;l&&(k.push(l),l!=j);l=l.nextSibling);return tinymce.each(k,function(a){if(g(a))return e.push(a),void(d=null);if(A.isBlock(a)||c(a))return c(a)&&A.remove(a),void(d=null);var b=a.nextSibling;return tinymce.dom.BookmarkManager.isBookmarkNode(a)&&(g(b)||!b&&a.parentNode==f)?void(d=null):(d||(d=A.create("p"),a.parentNode.insertBefore(d,a),e.push(d)),void d.appendChild(a))}),e}var h,i=B.getRng(!0),j="LI";"false"!==A.getContentEditable(B.getNode())&&(b=b.toUpperCase(),"DL"==b&&(j="DT"),h=k(i),tinymce.each(f(),function(a){var c,f,g=function(a){var b=A.getStyle(a,"list-style-type"),c=e?e["list-style-type"]:"";return c=null===c?"":c,b===c};f=a.previousSibling,f&&d(f)&&f.nodeName==b&&g(f)?(c=f,a=A.rename(a,j),f.appendChild(a)):(c=A.create(b),a.parentNode.insertBefore(c,a),c.appendChild(a),a=A.rename(a,j)),D(c,e),p(c)}),l(h))}function w(){var b=k(B.getRng(!0)),c=a.getBody();tinymce.each(n(),function(a){var b,e;if(!h(a.parentNode)){if(j(a))return void r(a);for(b=a;b&&b!=c;b=b.parentNode)d(b)&&(e=b);o(e,a)}}),l(b)}function x(a,b){var c=A.getParent(B.getStart(),"OL,UL,DL");if(!h(c))if(c)if(c.nodeName==a)w(a);else{var d=k(B.getRng(!0));D(c,b),p(A.rename(c,a)),l(d)}else v(a,b)}function y(b){return function(){var c=A.getParent(a.selection.getStart(),"UL,OL,DL");return c&&c.nodeName==b}}function z(a){return c(a)?!(!A.isBlock(a.nextSibling)||c(a.previousSibling)):!1}var A=a.dom,B=a.selection,C=function(b,c){var d=a.dom.getStyle(b,"list-style-type",!0),e=a.dom.getStyle(c,"list-style-type",!0);return d===e},D=function(a,b){A.setStyle(a,"list-style-type",b?b["list-style-type"]:null)};i.backspaceDelete=function(e){function f(b,c){var d,e,f=b.startContainer,g=b.startOffset;if(3==f.nodeType&&(c?g<f.data.length:g>0))return f;for(d=a.schema.getNonEmptyElements(),1==f.nodeType&&(f=tinymce.dom.RangeUtils.getNode(f,g)),e=new tinymce.dom.TreeWalker(f,a.getBody()),c&&z(f)&&e.next();f=e[c?"next":"prev2"]();){if("LI"==f.nodeName&&!f.hasChildNodes())return f;if(d[f.nodeName])return f;if(3==f.nodeType&&f.data.length>0)return f}}function g(a,e){var f,g,i=a.parentNode;if(b(a)&&b(e)){if(d(e.lastChild)&&(g=e.lastChild),i==e.lastChild&&c(i.previousSibling)&&A.remove(i.previousSibling),f=e.lastChild,f&&c(f)&&a.hasChildNodes()&&A.remove(f),j(e,!0)&&A.$(e).empty(),!j(a,!0))for(;f=a.firstChild;)e.appendChild(f);g&&e.appendChild(g),A.remove(a),j(i)&&!h(i)&&A.remove(i)}}if(B.isCollapsed()){var i,m,n,o=A.getParent(B.getStart(),"LI");if(o){if(i=o.parentNode,h(i)&&A.isEmpty(i))return!0;if(m=B.getRng(!0),n=A.getParent(f(m,e),"LI"),n&&n!=o){var p=k(m);return e?g(n,o):g(o,n),l(p),!0}if(!n&&!e&&w(i.nodeName))return!0}}},a.on("BeforeExecCommand",function(b){var c,d=b.command.toLowerCase();return"indent"==d?t()&&(c=!0):"outdent"==d&&u()&&(c=!0),c?(a.fire("ExecCommand",{command:b.command}),b.preventDefault(),!0):void 0}),a.addCommand("InsertUnorderedList",function(a,b){x("UL",b)}),a.addCommand("InsertOrderedList",function(a,b){x("OL",b)}),a.addCommand("InsertDefinitionList",function(a,b){x("DL",b)}),a.addQueryStateHandler("InsertUnorderedList",y("UL")),a.addQueryStateHandler("InsertOrderedList",y("OL")),a.addQueryStateHandler("InsertDefinitionList",y("DL")),a.on("keydown",function(b){9!=b.keyCode||tinymce.util.VK.metaKeyPressed(b)||a.dom.getParent(a.selection.getStart(),"LI,DT,DD")&&(b.preventDefault(),b.shiftKey?u():t())})}),a.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:function(){var b=this;a.on("nodechange",function(){for(var c=a.selection.getSelectedBlocks(),d=!1,f=0,g=c.length;!d&&g>f;f++){var h=c[f].nodeName;d="LI"==h&&e(c[f])||"UL"==h||"OL"==h||"DD"==h}b.disabled(d)})}}),a.on("keydown",function(a){a.keyCode==tinymce.util.VK.BACKSPACE?i.backspaceDelete()&&a.preventDefault():a.keyCode==tinymce.util.VK.DELETE&&i.backspaceDelete(!0)&&a.preventDefault()})});
\ No newline at end of file
index 21a2c8cf56a37a9cbde47c777f8f1fcf3453648b..0667425baff0ad93e06fcbdd90cf11ada70357fb 100644 (file)
@@ -16,7 +16,7 @@ tinymce.PluginManager.add('media', function(editor, url) {
        var urlPatterns = [
                {regex: /youtu\.be\/([\w\-.]+)/, type: 'iframe', w: 560, h: 314, url: '//www.youtube.com/embed/$1', allowFullscreen: true},
                {regex: /youtube\.com(.+)v=([^&]+)/, type: 'iframe', w: 560, h: 314, url: '//www.youtube.com/embed/$2', allowFullscreen: true},
-               {regex: /youtube.com\/embed\/([a-z0-9\-_]+)/i, type: 'iframe', w: 560, h: 314, url: '//www.youtube.com/embed/$1', allowFullscreen: true},
+               {regex: /youtube.com\/embed\/([a-z0-9\-_]+(?:\?.+)?)/i, type: 'iframe', w: 560, h: 314, url: '//www.youtube.com/embed/$1', allowFullscreen: true},
                {regex: /vimeo\.com\/([0-9]+)/, type: 'iframe', w: 425, h: 350, url: '//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc', allowfullscreen: true},
                {regex: /vimeo\.com\/(.*)\/([0-9]+)/, type: "iframe", w: 425, h: 350, url: "//player.vimeo.com/video/$2?title=0&amp;byline=0", allowfullscreen: true},
                {regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, type: 'iframe', w: 425, h: 350, url: '//maps.google.com/maps/ms?msid=$2&output=embed"', allowFullscreen: false},
index d15be630b1155eb70a62278f1abfb8cc02bc7d8d..f7eff6c40477443871229e6965250add9770c8bd 100644 (file)
@@ -1 +1 @@
-tinymce.PluginManager.add("media",function(a,b){function c(a){return a=a.toLowerCase(),-1!=a.indexOf(".mp3")?"audio/mpeg":-1!=a.indexOf(".wav")?"audio/wav":-1!=a.indexOf(".mp4")?"video/mp4":-1!=a.indexOf(".webm")?"video/webm":-1!=a.indexOf(".ogg")?"video/ogg":-1!=a.indexOf(".swf")?"application/x-shockwave-flash":""}function d(b){var c=a.settings.media_scripts;if(c)for(var d=0;d<c.length;d++)if(-1!==b.indexOf(c[d].filter))return c[d]}function e(){function b(a){var b,c,f,g;b=d.find("#width")[0],c=d.find("#height")[0],f=b.value(),g=c.value(),d.find("#constrain")[0].checked()&&e&&j&&f&&g&&(a.control==b?(g=Math.round(f/e*g),isNaN(g)||c.value(g)):(f=Math.round(g/j*f),isNaN(f)||b.value(f))),e=f,j=g}function c(){k=h(this.value()),this.parent().parent().fromJSON(k)}var d,e,j,k,l=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onchange:function(a){tinymce.each(a.meta,function(a,b){d.find("#"+b).value(a)})}}];a.settings.media_alt_source!==!1&&l.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),a.settings.media_poster!==!1&&l.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),a.settings.media_dimensions!==!1&&l.push({type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:3,onchange:b,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:3,onchange:b,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}),k=i(a.selection.getNode()),e=k.width,j=k.height;var m={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:f(),multiline:!0,label:"Source"};m[p]=c,d=a.windowManager.open({title:"Insert/edit video",data:k,bodyType:"tabpanel",body:[{title:"General",type:"form",onShowTab:function(){k=h(this.next().find("#embed").value()),this.fromJSON(k)},items:l},{title:"Embed",type:"container",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,onShowTab:function(){this.find("#embed").value(g(this.parent().toJSON()))},items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},m]}],onSubmit:function(){var b,c,d,e;for(b=a.dom.select("img[data-mce-object]"),a.insertContent(g(this.toJSON())),c=a.dom.select("img[data-mce-object]"),d=0;d<b.length;d++)for(e=c.length-1;e>=0;e--)b[d]==c[e]&&c.splice(e,1);a.selection.select(c[0]),a.nodeChanged()}})}function f(){var b=a.selection.getNode();return b.getAttribute("data-mce-object")?a.selection.getContent():void 0}function g(e){var f="";if(!e.source1&&(tinymce.extend(e,h(e.embed)),!e.source1))return"";if(e.source2||(e.source2=""),e.poster||(e.poster=""),e.source1=a.convertURL(e.source1,"source"),e.source2=a.convertURL(e.source2,"source"),e.source1mime=c(e.source1),e.source2mime=c(e.source2),e.poster=a.convertURL(e.poster,"poster"),e.flashPlayerUrl=a.convertURL(b+"/moxieplayer.swf","movie"),tinymce.each(o,function(a){var b,c,d;if(b=a.regex.exec(e.source1)){for(d=a.url,c=0;b[c];c++)d=d.replace("$"+c,function(){return b[c]});e.source1=d,e.type=a.type,e.allowFullscreen=a.allowFullscreen,e.width=e.width||a.w,e.height=e.height||a.h}}),e.embed)f=k(e.embed,e,!0);else{var g=d(e.source1);if(g&&(e.type="script",e.width=g.width,e.height=g.height),e.width=e.width||300,e.height=e.height||150,tinymce.each(e,function(b,c){e[c]=a.dom.encode(b)}),"iframe"==e.type){var i=e.allowFullscreen?' allowFullscreen="1"':"";f+='<iframe src="'+e.source1+'" width="'+e.width+'" height="'+e.height+'"'+i+"></iframe>"}else"application/x-shockwave-flash"==e.source1mime?(f+='<object data="'+e.source1+'" width="'+e.width+'" height="'+e.height+'" type="application/x-shockwave-flash">',e.poster&&(f+='<img src="'+e.poster+'" width="'+e.width+'" height="'+e.height+'" />'),f+="</object>"):-1!=e.source1mime.indexOf("audio")?a.settings.audio_template_callback?f=a.settings.audio_template_callback(e):f+='<audio controls="controls" src="'+e.source1+'">'+(e.source2?'\n<source src="'+e.source2+'"'+(e.source2mime?' type="'+e.source2mime+'"':"")+" />\n":"")+"</audio>":"script"==e.type?f+='<script src="'+e.source1+'"></script>':f=a.settings.video_template_callback?a.settings.video_template_callback(e):'<video width="'+e.width+'" height="'+e.height+'"'+(e.poster?' poster="'+e.poster+'"':"")+' controls="controls">\n<source src="'+e.source1+'"'+(e.source1mime?' type="'+e.source1mime+'"':"")+" />\n"+(e.source2?'<source src="'+e.source2+'"'+(e.source2mime?' type="'+e.source2mime+'"':"")+" />\n":"")+"</video>"}return f}function h(a){var b={};return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(a,c){if(b.source1||"param"!=a||(b.source1=c.map.movie),"iframe"!=a&&"object"!=a&&"embed"!=a&&"video"!=a&&"audio"!=a||(b.type||(b.type=a),b=tinymce.extend(c.map,b)),"script"==a){var e=d(c.map.src);if(!e)return;b={type:"script",source1:c.map.src,width:e.width,height:e.height}}"source"==a&&(b.source1?b.source2||(b.source2=c.map.src):b.source1=c.map.src),"img"!=a||b.poster||(b.poster=c.map.src)}}).parse(a),b.source1=b.source1||b.src||b.data,b.source2=b.source2||"",b.poster=b.poster||"",b}function i(b){return b.getAttribute("data-mce-object")?h(a.serializer.serialize(b,{selection:!0})):{}}function j(b){if(a.settings.media_filter_html===!1)return b;var c,d=new tinymce.html.Writer;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(a){d.comment(a)},cdata:function(a){d.cdata(a)},text:function(a,b){d.text(a,b)},start:function(b,e,f){if(c=!0,"script"!=b&&"noscript"!=b){for(var g=0;g<e.length;g++){if(0===e[g].name.indexOf("on"))return;"style"==e[g].name&&(e[g].value=a.dom.serializeStyle(a.dom.parseStyle(e[g].value),b))}d.start(b,e,f),c=!1}},end:function(a){c||d.end(a)}},new tinymce.html.Schema({})).parse(b),d.getContent()}function k(a,b,c){function d(a,b){var c,d,e,f;for(c in b)if(e=""+b[c],a.map[c])for(d=a.length;d--;)f=a[d],f.name==c&&(e?(a.map[c]=e,f.value=e):(delete a.map[c],a.splice(d,1)));else e&&(a.push({name:c,value:e}),a.map[c]=e)}var e,f=new tinymce.html.Writer,g=0;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(a){f.comment(a)},cdata:function(a){f.cdata(a)},text:function(a,b){f.text(a,b)},start:function(a,h,i){switch(a){case"video":case"object":case"embed":case"img":case"iframe":d(h,{width:b.width,height:b.height})}if(c)switch(a){case"video":d(h,{poster:b.poster,src:""}),b.source2&&d(h,{src:""});break;case"iframe":d(h,{src:b.source1});break;case"source":if(g++,2>=g&&(d(h,{src:b["source"+g],type:b["source"+g+"mime"]}),!b["source"+g]))return;break;case"img":if(!b.poster)return;e=!0}f.start(a,h,i)},end:function(a){if("video"==a&&c)for(var h=1;2>=h;h++)if(b["source"+h]){var i=[];i.map={},h>g&&(d(i,{src:b["source"+h],type:b["source"+h+"mime"]}),f.start("source",i,!0))}if(b.poster&&"object"==a&&c&&!e){var j=[];j.map={},d(j,{src:b.poster,width:b.width,height:b.height}),f.start("img",j,!0)}f.end(a)}},new tinymce.html.Schema({})).parse(a),f.getContent()}function l(b,c){var d,e,f,g,h;for(f=b.attributes,g=f.length;g--;)d=f[g].name,e=f[g].value,"width"!==d&&"height"!==d&&"style"!==d&&("data"!=d&&"src"!=d||(e=a.convertURL(e,d)),c.attr("data-mce-p-"+d,e));h=b.firstChild&&b.firstChild.value,h&&(c.attr("data-mce-html",escape(h)),c.firstChild=null)}function m(a){var b,c=a.name;return b=new tinymce.html.Node("img",1),b.shortEnded=!0,l(a,b),b.attr({width:a.attr("width")||"300",height:a.attr("height")||("audio"==c?"30":"150"),style:a.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":c,"class":"mce-object mce-object-"+c}),b}function n(a){var b,c,d,e=a.name;return b=new tinymce.html.Node("span",1),b.attr({contentEditable:"false",style:a.attr("style"),"data-mce-object":e,"class":"mce-preview-object mce-object-"+e}),l(a,b),c=new tinymce.html.Node(e,1),c.attr({src:a.attr("src"),allowfullscreen:a.attr("allowfullscreen"),width:a.attr("width")||"300",height:a.attr("height")||("audio"==e?"30":"150"),frameborder:"0"}),d=new tinymce.html.Node("span",1),d.attr("class","mce-shim"),b.append(c),b.append(d),b}var o=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\-_]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowfullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&amp;byline=0",allowfullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],p=tinymce.Env.ie&&tinymce.Env.ie<=8?"onChange":"onInput";a.on("ResolveName",function(a){var b;1==a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)}),a.on("preInit",function(){var b=a.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(a){b[a]=new RegExp("</"+a+"[^>]*>","gi")});var c=a.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){c[a]={}}),a.parser.addNodeFilter("iframe,video,audio,object,embed,script",function(b){for(var c,e,f,g=b.length;g--;)c=b[g],c.parent&&(c.parent.attr("data-mce-object")||("script"!=c.name||(f=d(c.attr("src"))))&&(f&&(f.width&&c.attr("width",f.width.toString()),f.height&&c.attr("height",f.height.toString())),e="iframe"==c.name&&a.settings.media_live_embeds!==!1&&tinymce.Env.ceFalse?n(c):m(c),c.replace(e)))}),a.serializer.addAttributeFilter("data-mce-object",function(a,b){for(var c,d,e,f,g,h,i,k,l=a.length;l--;)if(c=a[l],c.parent){for(i=c.attr(b),d=new tinymce.html.Node(i,1),"audio"!=i&&"script"!=i&&(k=c.attr("class"),k&&-1!==k.indexOf("mce-preview-object")?d.attr({width:c.firstChild.attr("width"),height:c.firstChild.attr("height")}):d.attr({width:c.attr("width"),height:c.attr("height")})),d.attr({style:c.attr("style")}),f=c.attributes,e=f.length;e--;){var m=f[e].name;0===m.indexOf("data-mce-p-")&&d.attr(m.substr(11),f[e].value)}"script"==i&&d.attr("type","text/javascript"),g=c.attr("data-mce-html"),g&&(h=new tinymce.html.Node("#text",3),h.raw=!0,h.value=j(unescape(g)),d.append(h)),c.replace(d)}})}),a.on("click keyup",function(){var b=a.selection.getNode();b&&a.dom.hasClass(b,"mce-preview-object")&&a.dom.getAttrib(b,"data-mce-selected")&&b.setAttribute("data-mce-selected","2")}),a.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");"audio"!=b&&"script"!=b||a.preventDefault()}),a.on("objectResized",function(a){var b,c=a.target;c.getAttribute("data-mce-object")&&(b=c.getAttribute("data-mce-html"),b&&(b=unescape(b),c.setAttribute("data-mce-html",escape(k(b,{width:a.width,height:a.height})))))}),a.addButton("media",{tooltip:"Insert/edit video",onclick:e,stateSelector:["img[data-mce-object]","span[data-mce-object]"]}),a.addMenuItem("media",{icon:"media",text:"Insert/edit video",onclick:e,context:"insert",prependToContext:!0}),a.on("setContent",function(){a.$("span.mce-preview-object").each(function(b,c){var d=a.$(c);0===d.find("span.mce-shim",c).length&&d.append('<span class="mce-shim"></span>')})}),a.addCommand("mceMedia",e),this.showDialog=e});
\ No newline at end of file
+tinymce.PluginManager.add("media",function(a,b){function c(a){return a=a.toLowerCase(),-1!=a.indexOf(".mp3")?"audio/mpeg":-1!=a.indexOf(".wav")?"audio/wav":-1!=a.indexOf(".mp4")?"video/mp4":-1!=a.indexOf(".webm")?"video/webm":-1!=a.indexOf(".ogg")?"video/ogg":-1!=a.indexOf(".swf")?"application/x-shockwave-flash":""}function d(b){var c=a.settings.media_scripts;if(c)for(var d=0;d<c.length;d++)if(-1!==b.indexOf(c[d].filter))return c[d]}function e(){function b(a){var b,c,f,g;b=d.find("#width")[0],c=d.find("#height")[0],f=b.value(),g=c.value(),d.find("#constrain")[0].checked()&&e&&j&&f&&g&&(a.control==b?(g=Math.round(f/e*g),isNaN(g)||c.value(g)):(f=Math.round(g/j*f),isNaN(f)||b.value(f))),e=f,j=g}function c(){k=h(this.value()),this.parent().parent().fromJSON(k)}var d,e,j,k,l=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onchange:function(a){tinymce.each(a.meta,function(a,b){d.find("#"+b).value(a)})}}];a.settings.media_alt_source!==!1&&l.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),a.settings.media_poster!==!1&&l.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),a.settings.media_dimensions!==!1&&l.push({type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:3,onchange:b,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:3,onchange:b,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}),k=i(a.selection.getNode()),e=k.width,j=k.height;var m={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:f(),multiline:!0,label:"Source"};m[p]=c,d=a.windowManager.open({title:"Insert/edit video",data:k,bodyType:"tabpanel",body:[{title:"General",type:"form",onShowTab:function(){k=h(this.next().find("#embed").value()),this.fromJSON(k)},items:l},{title:"Embed",type:"container",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,onShowTab:function(){this.find("#embed").value(g(this.parent().toJSON()))},items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},m]}],onSubmit:function(){var b,c,d,e;for(b=a.dom.select("img[data-mce-object]"),a.insertContent(g(this.toJSON())),c=a.dom.select("img[data-mce-object]"),d=0;d<b.length;d++)for(e=c.length-1;e>=0;e--)b[d]==c[e]&&c.splice(e,1);a.selection.select(c[0]),a.nodeChanged()}})}function f(){var b=a.selection.getNode();return b.getAttribute("data-mce-object")?a.selection.getContent():void 0}function g(e){var f="";if(!e.source1&&(tinymce.extend(e,h(e.embed)),!e.source1))return"";if(e.source2||(e.source2=""),e.poster||(e.poster=""),e.source1=a.convertURL(e.source1,"source"),e.source2=a.convertURL(e.source2,"source"),e.source1mime=c(e.source1),e.source2mime=c(e.source2),e.poster=a.convertURL(e.poster,"poster"),e.flashPlayerUrl=a.convertURL(b+"/moxieplayer.swf","movie"),tinymce.each(o,function(a){var b,c,d;if(b=a.regex.exec(e.source1)){for(d=a.url,c=0;b[c];c++)d=d.replace("$"+c,function(){return b[c]});e.source1=d,e.type=a.type,e.allowFullscreen=a.allowFullscreen,e.width=e.width||a.w,e.height=e.height||a.h}}),e.embed)f=k(e.embed,e,!0);else{var g=d(e.source1);if(g&&(e.type="script",e.width=g.width,e.height=g.height),e.width=e.width||300,e.height=e.height||150,tinymce.each(e,function(b,c){e[c]=a.dom.encode(b)}),"iframe"==e.type){var i=e.allowFullscreen?' allowFullscreen="1"':"";f+='<iframe src="'+e.source1+'" width="'+e.width+'" height="'+e.height+'"'+i+"></iframe>"}else"application/x-shockwave-flash"==e.source1mime?(f+='<object data="'+e.source1+'" width="'+e.width+'" height="'+e.height+'" type="application/x-shockwave-flash">',e.poster&&(f+='<img src="'+e.poster+'" width="'+e.width+'" height="'+e.height+'" />'),f+="</object>"):-1!=e.source1mime.indexOf("audio")?a.settings.audio_template_callback?f=a.settings.audio_template_callback(e):f+='<audio controls="controls" src="'+e.source1+'">'+(e.source2?'\n<source src="'+e.source2+'"'+(e.source2mime?' type="'+e.source2mime+'"':"")+" />\n":"")+"</audio>":"script"==e.type?f+='<script src="'+e.source1+'"></script>':f=a.settings.video_template_callback?a.settings.video_template_callback(e):'<video width="'+e.width+'" height="'+e.height+'"'+(e.poster?' poster="'+e.poster+'"':"")+' controls="controls">\n<source src="'+e.source1+'"'+(e.source1mime?' type="'+e.source1mime+'"':"")+" />\n"+(e.source2?'<source src="'+e.source2+'"'+(e.source2mime?' type="'+e.source2mime+'"':"")+" />\n":"")+"</video>"}return f}function h(a){var b={};return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(a,c){if(b.source1||"param"!=a||(b.source1=c.map.movie),"iframe"!=a&&"object"!=a&&"embed"!=a&&"video"!=a&&"audio"!=a||(b.type||(b.type=a),b=tinymce.extend(c.map,b)),"script"==a){var e=d(c.map.src);if(!e)return;b={type:"script",source1:c.map.src,width:e.width,height:e.height}}"source"==a&&(b.source1?b.source2||(b.source2=c.map.src):b.source1=c.map.src),"img"!=a||b.poster||(b.poster=c.map.src)}}).parse(a),b.source1=b.source1||b.src||b.data,b.source2=b.source2||"",b.poster=b.poster||"",b}function i(b){return b.getAttribute("data-mce-object")?h(a.serializer.serialize(b,{selection:!0})):{}}function j(b){if(a.settings.media_filter_html===!1)return b;var c,d=new tinymce.html.Writer;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(a){d.comment(a)},cdata:function(a){d.cdata(a)},text:function(a,b){d.text(a,b)},start:function(b,e,f){if(c=!0,"script"!=b&&"noscript"!=b){for(var g=0;g<e.length;g++){if(0===e[g].name.indexOf("on"))return;"style"==e[g].name&&(e[g].value=a.dom.serializeStyle(a.dom.parseStyle(e[g].value),b))}d.start(b,e,f),c=!1}},end:function(a){c||d.end(a)}},new tinymce.html.Schema({})).parse(b),d.getContent()}function k(a,b,c){function d(a,b){var c,d,e,f;for(c in b)if(e=""+b[c],a.map[c])for(d=a.length;d--;)f=a[d],f.name==c&&(e?(a.map[c]=e,f.value=e):(delete a.map[c],a.splice(d,1)));else e&&(a.push({name:c,value:e}),a.map[c]=e)}var e,f=new tinymce.html.Writer,g=0;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(a){f.comment(a)},cdata:function(a){f.cdata(a)},text:function(a,b){f.text(a,b)},start:function(a,h,i){switch(a){case"video":case"object":case"embed":case"img":case"iframe":d(h,{width:b.width,height:b.height})}if(c)switch(a){case"video":d(h,{poster:b.poster,src:""}),b.source2&&d(h,{src:""});break;case"iframe":d(h,{src:b.source1});break;case"source":if(g++,2>=g&&(d(h,{src:b["source"+g],type:b["source"+g+"mime"]}),!b["source"+g]))return;break;case"img":if(!b.poster)return;e=!0}f.start(a,h,i)},end:function(a){if("video"==a&&c)for(var h=1;2>=h;h++)if(b["source"+h]){var i=[];i.map={},h>g&&(d(i,{src:b["source"+h],type:b["source"+h+"mime"]}),f.start("source",i,!0))}if(b.poster&&"object"==a&&c&&!e){var j=[];j.map={},d(j,{src:b.poster,width:b.width,height:b.height}),f.start("img",j,!0)}f.end(a)}},new tinymce.html.Schema({})).parse(a),f.getContent()}function l(b,c){var d,e,f,g,h;for(f=b.attributes,g=f.length;g--;)d=f[g].name,e=f[g].value,"width"!==d&&"height"!==d&&"style"!==d&&("data"!=d&&"src"!=d||(e=a.convertURL(e,d)),c.attr("data-mce-p-"+d,e));h=b.firstChild&&b.firstChild.value,h&&(c.attr("data-mce-html",escape(h)),c.firstChild=null)}function m(a){var b,c=a.name;return b=new tinymce.html.Node("img",1),b.shortEnded=!0,l(a,b),b.attr({width:a.attr("width")||"300",height:a.attr("height")||("audio"==c?"30":"150"),style:a.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":c,"class":"mce-object mce-object-"+c}),b}function n(a){var b,c,d,e=a.name;return b=new tinymce.html.Node("span",1),b.attr({contentEditable:"false",style:a.attr("style"),"data-mce-object":e,"class":"mce-preview-object mce-object-"+e}),l(a,b),c=new tinymce.html.Node(e,1),c.attr({src:a.attr("src"),allowfullscreen:a.attr("allowfullscreen"),width:a.attr("width")||"300",height:a.attr("height")||("audio"==e?"30":"150"),frameborder:"0"}),d=new tinymce.html.Node("span",1),d.attr("class","mce-shim"),b.append(c),b.append(d),b}var o=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\-_]+(?:\?.+)?)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowfullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&amp;byline=0",allowfullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],p=tinymce.Env.ie&&tinymce.Env.ie<=8?"onChange":"onInput";a.on("ResolveName",function(a){var b;1==a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)}),a.on("preInit",function(){var b=a.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(a){b[a]=new RegExp("</"+a+"[^>]*>","gi")});var c=a.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){c[a]={}}),a.parser.addNodeFilter("iframe,video,audio,object,embed,script",function(b){for(var c,e,f,g=b.length;g--;)c=b[g],c.parent&&(c.parent.attr("data-mce-object")||("script"!=c.name||(f=d(c.attr("src"))))&&(f&&(f.width&&c.attr("width",f.width.toString()),f.height&&c.attr("height",f.height.toString())),e="iframe"==c.name&&a.settings.media_live_embeds!==!1&&tinymce.Env.ceFalse?n(c):m(c),c.replace(e)))}),a.serializer.addAttributeFilter("data-mce-object",function(a,b){for(var c,d,e,f,g,h,i,k,l=a.length;l--;)if(c=a[l],c.parent){for(i=c.attr(b),d=new tinymce.html.Node(i,1),"audio"!=i&&"script"!=i&&(k=c.attr("class"),k&&-1!==k.indexOf("mce-preview-object")?d.attr({width:c.firstChild.attr("width"),height:c.firstChild.attr("height")}):d.attr({width:c.attr("width"),height:c.attr("height")})),d.attr({style:c.attr("style")}),f=c.attributes,e=f.length;e--;){var m=f[e].name;0===m.indexOf("data-mce-p-")&&d.attr(m.substr(11),f[e].value)}"script"==i&&d.attr("type","text/javascript"),g=c.attr("data-mce-html"),g&&(h=new tinymce.html.Node("#text",3),h.raw=!0,h.value=j(unescape(g)),d.append(h)),c.replace(d)}})}),a.on("click keyup",function(){var b=a.selection.getNode();b&&a.dom.hasClass(b,"mce-preview-object")&&a.dom.getAttrib(b,"data-mce-selected")&&b.setAttribute("data-mce-selected","2")}),a.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");"audio"!=b&&"script"!=b||a.preventDefault()}),a.on("objectResized",function(a){var b,c=a.target;c.getAttribute("data-mce-object")&&(b=c.getAttribute("data-mce-html"),b&&(b=unescape(b),c.setAttribute("data-mce-html",escape(k(b,{width:a.width,height:a.height})))))}),a.addButton("media",{tooltip:"Insert/edit video",onclick:e,stateSelector:["img[data-mce-object]","span[data-mce-object]"]}),a.addMenuItem("media",{icon:"media",text:"Insert/edit video",onclick:e,context:"insert",prependToContext:!0}),a.on("setContent",function(){a.$("span.mce-preview-object").each(function(b,c){var d=a.$(c);0===d.find("span.mce-shim",c).length&&d.append('<span class="mce-shim"></span>')})}),a.addCommand("mceMedia",e),this.showDialog=e});
\ No newline at end of file
index 7ecf23a44a7e6878ecfc5756706a230f3975e51e..8839e9ad4486934e993cb2ee66356692bbf299f7 100644 (file)
@@ -240,6 +240,99 @@ define("tinymce/pasteplugin/Utils", [
        };
 });
 
+// Included from: js/tinymce/plugins/paste/classes/SmartPaste.js
+
+/**
+ * SmartPaste.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * Tries to be smart depending on what the user pastes if it looks like an url
+ * it will make a link out of the current selection. If it's an image url that looks
+ * like an image it will check if it's an image and insert it as an image.
+ *
+ * @class tinymce.pasteplugin.SmartPaste
+ * @private
+ */
+define("tinymce/pasteplugin/SmartPaste", [
+       "tinymce/util/Tools"
+], function (Tools) {
+       var isAbsoluteUrl = function (url) {
+               return /^https?:\/\/[\w\?\-\/+=.&%]+$/i.test(url);
+       };
+
+       var isImageUrl = function (url) {
+               return isAbsoluteUrl(url) && /.(gif|jpe?g|png)$/.test(url);
+       };
+
+       var createImage = function (editor, url, pasteHtml) {
+               editor.undoManager.extra(function () {
+                       pasteHtml(editor, url);
+               }, function () {
+                       editor.insertContent('<img src="' + url + '">');
+               });
+
+               return true;
+       };
+
+       var createLink = function (editor, url, pasteHtml) {
+               editor.undoManager.extra(function () {
+                       pasteHtml(editor, url);
+               }, function () {
+                       editor.execCommand('mceInsertLink', false, url);
+               });
+
+               return true;
+       };
+
+       var linkSelection = function (editor, html, pasteHtml) {
+               return editor.selection.isCollapsed() === false && isAbsoluteUrl(html) ? createLink(editor, html, pasteHtml) : false;
+       };
+
+       var insertImage = function (editor, html, pasteHtml) {
+               return isImageUrl(html) ? createImage(editor, html, pasteHtml) : false;
+       };
+
+       var pasteHtml = function (editor, html) {
+               editor.insertContent(html, {
+                       merge: editor.settings.paste_merge_formats !== false,
+                       paste: true
+               });
+
+               return true;
+       };
+
+       var smartInsertContent = function (editor, html) {
+               Tools.each([
+                       linkSelection,
+                       insertImage,
+                       pasteHtml
+               ], function (action) {
+                       return action(editor, html, pasteHtml) !== true;
+               });
+       };
+
+       var insertContent = function (editor, html) {
+               if (editor.settings.smart_paste === false) {
+                       pasteHtml(editor, html);
+               } else {
+                       smartInsertContent(editor, html);
+               }
+       };
+
+       return {
+               isImageUrl: isImageUrl,
+               isAbsoluteUrl: isAbsoluteUrl,
+               insertContent: insertContent
+       };
+});
+
 // Included from: js/tinymce/plugins/paste/classes/Clipboard.js
 
 /**
@@ -276,8 +369,9 @@ define("tinymce/pasteplugin/Clipboard", [
        "tinymce/dom/RangeUtils",
        "tinymce/util/VK",
        "tinymce/pasteplugin/Utils",
+       "tinymce/pasteplugin/SmartPaste",
        "tinymce/util/Delay"
-], function(Env, RangeUtils, VK, Utils, Delay) {
+], function(Env, RangeUtils, VK, Utils, SmartPaste, Delay) {
        return function(editor) {
                var self = this, pasteBinElm, lastRng, keyboardPasteTimeStamp = 0, draggingInternally = false;
                var pasteBinDefaultContent = '%MCEPASTEBIN%', keyboardPastePlainTextState;
@@ -311,7 +405,7 @@ define("tinymce/pasteplugin/Clipboard", [
                                }
 
                                if (!args.isDefaultPrevented()) {
-                                       editor.insertContent(html, {merge: editor.settings.paste_merge_formats !== false, data: {paste: true}});
+                                       SmartPaste.insertContent(editor, html);
                                }
                        }
                }
@@ -571,6 +665,55 @@ define("tinymce/pasteplugin/Clipboard", [
                        return hasContentType(content, 'text/html') || hasContentType(content, 'text/plain');
                }
 
+               function getBase64FromUri(uri) {
+                       var idx;
+
+                       idx = uri.indexOf(',');
+                       if (idx !== -1) {
+                               return uri.substr(idx + 1);
+                       }
+
+                       return null;
+               }
+
+               function isValidDataUriImage(settings, imgElm) {
+                       return settings.images_dataimg_filter ? settings.images_dataimg_filter(imgElm) : true;
+               }
+
+               function pasteImage(rng, reader, blob) {
+                       if (rng) {
+                               editor.selection.setRng(rng);
+                               rng = null;
+                       }
+
+                       var dataUri = reader.result;
+                       var base64 = getBase64FromUri(dataUri);
+
+                       var img = new Image();
+                       img.src = dataUri;
+
+                       // TODO: Move the bulk of the cache logic to EditorUpload
+                       if (isValidDataUriImage(editor.settings, img)) {
+                               var blobCache = editor.editorUpload.blobCache;
+                               var blobInfo, existingBlobInfo;
+
+                               existingBlobInfo = blobCache.findFirst(function(cachedBlobInfo) {
+                                       return cachedBlobInfo.base64() === base64;
+                               });
+
+                               if (!existingBlobInfo) {
+                                       blobInfo = blobCache.create(uniqueId(), blob, base64);
+                                       blobCache.add(blobInfo);
+                               } else {
+                                       blobInfo = existingBlobInfo;
+                               }
+
+                               pasteHtml('<img src="' + blobInfo.blobUri() + '">');
+                       } else {
+                               pasteHtml('<img src="' + dataUri + '">');
+                       }
+               }
+
                /**
                 * Checks if the clipboard contains image data if it does it will take that data
                 * and convert it into a data url image and paste that image at the caret location.
@@ -582,33 +725,9 @@ define("tinymce/pasteplugin/Clipboard", [
                function pasteImageData(e, rng) {
                        var dataTransfer = e.clipboardData || e.dataTransfer;
 
-                       function getBase64FromUri(uri) {
-                               var idx;
-
-                               idx = uri.indexOf(',');
-                               if (idx !== -1) {
-                                       return uri.substr(idx + 1);
-                               }
-
-                               return null;
-                       }
-
                        function processItems(items) {
                                var i, item, reader, hadImage = false;
 
-                               function pasteImage(reader, blob) {
-                                       if (rng) {
-                                               editor.selection.setRng(rng);
-                                               rng = null;
-                                       }
-
-                                       var blobCache = editor.editorUpload.blobCache;
-                                       var blobInfo = blobCache.create(uniqueId(), blob, getBase64FromUri(reader.result));
-                                       blobCache.add(blobInfo);
-
-                                       pasteHtml('<img src="' + blobInfo.blobUri() + '">');
-                               }
-
                                if (items) {
                                        for (i = 0; i < items.length; i++) {
                                                item = items[i];
@@ -617,7 +736,7 @@ define("tinymce/pasteplugin/Clipboard", [
                                                        var blob = item.getAsFile ? item.getAsFile() : item;
 
                                                        reader = new FileReader();
-                                                       reader.onload = pasteImage.bind(null, reader, blob);
+                                                       reader.onload = pasteImage.bind(null, rng, reader, blob);
                                                        reader.readAsDataURL(blob);
 
                                                        e.preventDefault();
@@ -874,6 +993,7 @@ define("tinymce/pasteplugin/Clipboard", [
 
                self.pasteHtml = pasteHtml;
                self.pasteText = pasteText;
+               self.pasteImageData = pasteImageData;
 
                editor.on('preInit', function() {
                        registerEventHandlers();
index 47ead81b2af40e80889c2aed3440dd4dc4a8738c..207f84d7d551f28e89a73be954d84f50188a7932 100644 (file)
@@ -1 +1 @@
-!function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;f<a.length;++f){if(c=g[a[f]]||e(a[f]),!c)throw"module definition dependecy not found: "+a[f];d.push(c)}b.apply(null,d)}function d(a,d,e){if("string"!=typeof a)throw"invalid module definition, module id must be defined and be a string";if(d===b)throw"invalid module definition, dependencies must be specified";if(e===b)throw"invalid module definition, definition function must be specified";c(d,function(){g[a]=e.apply(null,arguments)})}function e(b){for(var c=a,d=b.split(/[.\/]/),e=0;e<d.length;++e){if(!c[d[e]])return;c=c[d[e]]}return c}function f(c){var d,e,f,h,i;for(d=0;d<c.length;d++){e=a,f=c[d],h=f.split(/[.\/]/);for(var j=0;j<h.length-1;++j)e[h[j]]===b&&(e[h[j]]={}),e=e[h[j]];e[h[h.length-1]]=g[f]}if(a.AMDLC_TESTS){i=a.privateModules||{};for(f in g)i[f]=g[f];for(d=0;d<c.length;d++)delete i[c[d]];a.privateModules=i}}var g={};d("tinymce/pasteplugin/Utils",["tinymce/util/Tools","tinymce/html/DomParser","tinymce/html/Schema"],function(a,b,c){function d(b,c){return a.each(c,function(a){b=a.constructor==RegExp?b.replace(a,""):b.replace(a[0],a[1])}),b}function e(e){function f(a){var b=a.name,c=a;if("br"===b)return void(i+="\n");if(j[b]&&(i+=" "),k[b])return void(i+=" ");if(3==a.type&&(i+=a.value),!a.shortEnded&&(a=a.firstChild))do f(a);while(a=a.next);l[b]&&c.next&&(i+="\n","p"==b&&(i+="\n"))}var g=new c,h=new b({},g),i="",j=g.getShortEndedElements(),k=a.makeMap("script noscript style textarea video audio iframe object"," "),l=g.getBlockElements();return e=d(e,[/<!\[[^\]]+\]>/g]),f(h.parse(e)),i}function f(a){function b(a,b,c){return b||c?"\xa0":" "}return a=d(a,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,b],/<br class="Apple-interchange-newline">/g,/<br>$/i])}function g(a){var b=0;return function(){return a+b++}}return{filter:d,innerText:e,trimHtml:f,createIdGenerator:g}}),d("tinymce/pasteplugin/Clipboard",["tinymce/Env","tinymce/dom/RangeUtils","tinymce/util/VK","tinymce/pasteplugin/Utils","tinymce/util/Delay"],function(a,b,c,d,e){return function(f){function g(a){var b,c=f.dom;if(b=f.fire("BeforePastePreProcess",{content:a}),b=f.fire("PastePreProcess",b),a=b.content,!b.isDefaultPrevented()){if(f.hasEventListeners("PastePostProcess")&&!b.isDefaultPrevented()){var d=c.add(f.getBody(),"div",{style:"display:none"},a);b=f.fire("PastePostProcess",{node:d}),c.remove(d),a=b.node.innerHTML}b.isDefaultPrevented()||f.insertContent(a,{merge:f.settings.paste_merge_formats!==!1,data:{paste:!0}})}}function h(a){a=f.dom.encode(a).replace(/\r\n/g,"\n");var b,c=f.dom.getParent(f.selection.getStart(),f.dom.isBlock),e=f.settings.forced_root_block;e&&(b=f.dom.createHTML(e,f.settings.forced_root_block_attrs),b=b.substr(0,b.length-3)+">"),c&&/^(PRE|DIV)$/.test(c.nodeName)||!e?a=d.filter(a,[[/\n/g,"<br>"]]):(a=d.filter(a,[[/\n\n/g,"</p>"+b],[/^(.*<\/p>)(<p>)$/,b+"$1"],[/\n/g,"<br />"]]),-1!=a.indexOf("<p>")&&(a=b+a)),g(a)}function i(){function b(a){var b,c,e,f=a.startContainer;if(b=a.getClientRects(),b.length)return b[0];if(a.collapsed&&1==f.nodeType){for(e=f.childNodes[v.startOffset];e&&3==e.nodeType&&!e.data.length;)e=e.nextSibling;if(e)return"BR"==e.tagName&&(c=d.doc.createTextNode("\ufeff"),e.parentNode.insertBefore(c,e),a=d.createRng(),a.setStartBefore(c),a.setEndAfter(c),b=a.getClientRects(),d.remove(c)),b.length?b[0]:void 0}}var c,d=f.dom,e=f.getBody(),g=f.dom.getViewPort(f.getWin()),h=g.y,i=20;if(v=f.selection.getRng(),f.inline&&(c=f.selection.getScrollContainer(),c&&c.scrollTop>0&&(h=c.scrollTop)),v.getClientRects){var j=b(v);if(j)i=h+(j.top-d.getPos(e).y);else{i=h;var k=v.startContainer;k&&(3==k.nodeType&&k.parentNode!=e&&(k=k.parentNode),1==k.nodeType&&(i=d.getPos(k,c||e).y))}}u=d.add(f.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+i+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},A),(a.ie||a.gecko)&&d.setStyle(u,"left","rtl"==d.getStyle(e,"direction",!0)?65535:-65535),d.bind(u,"beforedeactivate focusin focusout",function(a){a.stopPropagation()}),u.focus(),f.selection.select(u,!0)}function j(){if(u){for(var a;a=f.dom.get("mcepastebin");)f.dom.remove(a),f.dom.unbind(a);v&&f.selection.setRng(v)}u=v=null}function k(){var a,b,c,d,e="";for(a=f.dom.select("div[id=mcepastebin]"),b=0;b<a.length;b++)c=a[b],c.firstChild&&"mcepastebin"==c.firstChild.id&&(c=c.firstChild),d=c.innerHTML,e!=A&&(e+=d);return e}function l(a){var b={};if(a){if(a.getData){var c=a.getData("Text");c&&c.length>0&&-1==c.indexOf(B)&&(b["text/plain"]=c)}if(a.types)for(var d=0;d<a.types.length;d++){var e=a.types[d];b[e]=a.getData(e)}}return b}function m(a){return l(a.clipboardData||f.getDoc().dataTransfer)}function n(a){return r(a,"text/html")||r(a,"text/plain")}function o(a,b){function c(a){var b;return b=a.indexOf(","),-1!==b?a.substr(b+1):null}function d(d){function e(a,d){b&&(f.selection.setRng(b),b=null);var e=f.editorUpload.blobCache,h=e.create(C(),d,c(a.result));e.add(h),g('<img src="'+h.blobUri()+'">')}var h,i,j,k=!1;if(d)for(h=0;h<d.length;h++)if(i=d[h],/^image\/(jpeg|png|gif|bmp)$/.test(i.type)){var l=i.getAsFile?i.getAsFile():i;j=new FileReader,j.onload=e.bind(null,j,l),j.readAsDataURL(l),a.preventDefault(),k=!0}return k}var e=a.clipboardData||a.dataTransfer;return f.settings.paste_data_images&&e?d(e.items)||d(e.files):void 0}function p(a){var b=a.clipboardData;return-1!=navigator.userAgent.indexOf("Android")&&b&&b.items&&0===b.items.length}function q(a){return b.getCaretRangeFromPoint(a.clientX,a.clientY,f.getDoc())}function r(a,b){return b in a&&a[b].length>0}function s(a){return c.metaKeyPressed(a)&&86==a.keyCode||a.shiftKey&&45==a.keyCode}function t(){function b(a,b,c){var e;return r(a,"text/html")?e=a["text/html"]:(e=k(),e==A&&(c=!0)),e=d.trimHtml(e),u&&u.firstChild&&"mcepastebin"===u.firstChild.id&&(c=!0),j(),e.length||(c=!0),c&&(e=r(a,"text/plain")&&-1==e.indexOf("</p>")?a["text/plain"]:d.innerText(e)),e==A?void(b||f.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.")):void(c?h(e):g(e))}function c(a){return 0===a["text/plain"].indexOf("file://")}f.on("keydown",function(b){function c(a){s(a)&&!a.isDefaultPrevented()&&j()}if(s(b)&&!b.isDefaultPrevented()){if(w=b.shiftKey&&86==b.keyCode,w&&a.webkit&&-1!=navigator.userAgent.indexOf("Version/"))return;if(b.stopImmediatePropagation(),y=(new Date).getTime(),a.ie&&w)return b.preventDefault(),void f.fire("paste",{ieFake:!0});j(),i(),f.once("keyup",c),f.once("paste",function(){f.off("keyup",c)})}});var t=function(){return v||f.selection.getRng()};f.on("paste",function(c){var d=(new Date).getTime(),g=m(c),h=(new Date).getTime()-d,l=(new Date).getTime()-y-h<1e3,q="text"==x.pasteFormat||w;return w=!1,c.isDefaultPrevented()||p(c)?void j():!n(g)&&o(c,t())?void j():(l||c.preventDefault(),!a.ie||l&&!c.ieFake||(i(),f.dom.bind(u,"paste",function(a){a.stopPropagation()}),f.getDoc().execCommand("Paste",!1,null),g["text/html"]=k()),void(r(g,"text/html")?(c.preventDefault(),b(g,l,q)):e.setEditorTimeout(f,function(){b(g,l,q)},0)))}),f.on("dragstart dragend",function(a){z="dragstart"==a.type}),f.on("drop",function(a){var b,i;if(i=q(a),!a.isDefaultPrevented()&&!z&&(b=l(a.dataTransfer),(n(b)&&!c(b)||!o(a,i))&&i&&f.settings.paste_filter_drop!==!1)){var j=b["mce-internal"]||b["text/html"]||b["text/plain"];j&&(a.preventDefault(),e.setEditorTimeout(f,function(){f.undoManager.transact(function(){b["mce-internal"]&&f.execCommand("Delete"),f.selection.setRng(i),j=d.trimHtml(j),b["text/html"]?g(j):h(j)})}))}}),f.on("dragover dragend",function(a){f.settings.paste_data_images&&a.preventDefault()})}var u,v,w,x=this,y=0,z=!1,A="%MCEPASTEBIN%",B="data:text/mce-internal,",C=d.createIdGenerator("mceclip");x.pasteHtml=g,x.pasteText=h,f.on("preInit",function(){t(),f.parser.addNodeFilter("img",function(b,c,d){function e(a){return a.data&&a.data.paste===!0}function g(b){b.attr("data-mce-object")||k===a.transparentSrc||b.remove()}function h(a){return 0===a.indexOf("webkit-fake-url")}function i(a){return 0===a.indexOf("data:")}if(!f.settings.paste_data_images&&e(d))for(var j=b.length;j--;){var k=b[j].attributes.map.src;k&&(h(k)?g(b[j]):!f.settings.allow_html_data_urls&&i(k)&&g(b[j]))}})})}}),d("tinymce/pasteplugin/WordFilter",["tinymce/util/Tools","tinymce/html/DomParser","tinymce/html/Schema","tinymce/html/Serializer","tinymce/html/Node","tinymce/pasteplugin/Utils"],function(a,b,c,d,e,f){function g(a){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(a)||/class="OutlineElement/.test(a)||/id="?docs\-internal\-guid\-/.test(a)}function h(b){var c,d;return d=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],b=b.replace(/^[\u00a0 ]+/,""),a.each(d,function(a){return a.test(b)?(c=!0,!1):void 0}),c}function i(a){return/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(a)}function j(j){var k=j.settings;j.on("BeforePastePreProcess",function(l){function m(a){function b(a){var c="";if(3===a.type)return a.value;if(a=a.firstChild)do c+=b(a);while(a=a.next);return c}function c(a,b){if(3===a.type&&b.test(a.value))return a.value=a.value.replace(b,""),!1;if(a=a.firstChild)do if(!c(a,b))return!1;while(a=a.next);return!0}function d(a){if(a._listIgnore)return void a.remove();if(a=a.firstChild)do d(a);while(a=a.next)}function f(a,b,f){var h=a._listLevel||k;h!=k&&(k>h?g&&(g=g.parent.parent):(j=g,g=null)),g&&g.name==b?g.append(a):(j=j||g,g=new e(b,1),f>1&&g.attr("start",""+f),a.wrap(g)),a.name="li",h>k&&j&&j.lastChild.append(g),k=h,d(a),c(a,/^\u00a0+/),c(a,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),c(a,/^\u00a0+/)}for(var g,j,k=1,l=[],m=a.firstChild;"undefined"!=typeof m&&null!==m;)if(l.push(m),m=m.walk(),null!==m)for(;"undefined"!=typeof m&&m.parent!==a;)m=m.walk();for(var n=0;n<l.length;n++)if(a=l[n],"p"==a.name&&a.firstChild){var o=b(a);if(i(o)){f(a,"ul");continue}if(h(o)){var p=/([0-9]+)\./.exec(o),q=1;p&&(q=parseInt(p[1],10)),f(a,"ol",q);continue}if(a._listLevel){f(a,"ul",1);continue}g=null}else j=g,g=null}function n(b,c){var d,f={},g=j.dom.parseStyle(c);return a.each(g,function(a,e){switch(e){case"mso-list":d=/\w+ \w+([0-9]+)/i.exec(c),d&&(b._listLevel=parseInt(d[1],10)),/Ignore/i.test(a)&&b.firstChild&&(b._listIgnore=!0,b.firstChild._listIgnore=!0);break;case"horiz-align":e="text-align";break;case"vert-align":e="vertical-align";break;case"font-color":case"mso-foreground":e="color";break;case"mso-background":case"mso-highlight":e="background";break;case"font-weight":case"font-style":return void("normal"!=a&&(f[e]=a));case"mso-element":if(/^(comment|comment-list)$/i.test(a))return void b.remove()}return 0===e.indexOf("mso-comment")?void b.remove():void(0!==e.indexOf("mso-")&&("all"==o||p&&p[e])&&(f[e]=a))}),/(bold)/i.test(f["font-weight"])&&(delete f["font-weight"],b.wrap(new e("b",1))),/(italic)/i.test(f["font-style"])&&(delete f["font-style"],b.wrap(new e("i",1))),f=j.dom.serializeStyle(f,b.name),f?f:null}var o,p,q=l.content;if(q=q.replace(/<b[^>]+id="?docs-internal-[^>]*>/gi,""),q=q.replace(/<br class="?Apple-interchange-newline"?>/gi,""),o=k.paste_retain_style_properties,o&&(p=a.makeMap(o.split(/[, ]/))),k.paste_enable_default_filters!==!1&&g(l.content)){l.wordContent=!0,q=f.filter(q,[/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(a,b){return b.length>0?b.replace(/./," ").slice(Math.floor(b.length/2)).split("").join("\xa0"):""}]]);var r=k.paste_word_valid_elements;r||(r="-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody");var s=new c({valid_elements:r,valid_children:"-li[p]"});a.each(s.elements,function(a){a.attributes["class"]||(a.attributes["class"]={},a.attributesOrder.push("class")),a.attributes.style||(a.attributes.style={},a.attributesOrder.push("style"))});var t=new b({},s);t.addAttributeFilter("style",function(a){for(var b,c=a.length;c--;)b=a[c],b.attr("style",n(b,b.attr("style"))),"span"==b.name&&b.parent&&!b.attributes.length&&b.unwrap()}),t.addAttributeFilter("class",function(a){for(var b,c,d=a.length;d--;)b=a[d],c=b.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(c)&&b.remove(),b.attr("class",null)}),t.addNodeFilter("del",function(a){for(var b=a.length;b--;)a[b].remove()}),t.addNodeFilter("a",function(a){for(var b,c,d,e=a.length;e--;)if(b=a[e],c=b.attr("href"),d=b.attr("name"),c&&-1!=c.indexOf("#_msocom_"))b.remove();else if(c&&0===c.indexOf("file://")&&(c=c.split("#")[1],c&&(c="#"+c)),c||d){if(d&&!/^_?(?:toc|edn|ftn)/i.test(d)){b.unwrap();continue}b.attr({href:c,name:d})}else b.unwrap()});var u=t.parse(q);k.paste_convert_word_fake_lists!==!1&&m(u),l.content=new d({validate:k.validate},s).serialize(u)}})}return j.isWordContent=g,j}),d("tinymce/pasteplugin/Quirks",["tinymce/Env","tinymce/util/Tools","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Utils"],function(a,b,c,d){return function(e){function f(a){e.on("BeforePastePreProcess",function(b){b.content=a(b.content)})}function g(a){if(!c.isWordContent(a))return a;var f=[];b.each(e.schema.getBlockElements(),function(a,b){f.push(b)});var g=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+f.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return a=d.filter(a,[[g,"$1"]]),a=d.filter(a,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function h(a){if(c.isWordContent(a))return a;var b=e.settings.paste_webkit_styles;if(e.settings.paste_remove_styles_if_webkit===!1||"all"==b)return a;if(b&&(b=b.split(/[, ]/)),b){var d=e.dom,f=e.selection.getNode();a=a.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(a,c,e,g){var h=d.parseStyle(e,"span"),i={};if("none"===b)return c+g;for(var j=0;j<b.length;j++){var k=h[b[j]],l=d.getStyle(f,b[j],!0);/color/.test(b[j])&&(k=d.toHex(k),l=d.toHex(l)),l!=k&&(i[b[j]]=k)}return i=d.serializeStyle(i,"span"),i?c+' style="'+i+'"'+g:c+g})}else a=a.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return a=a.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(a,b,c,d){return b+' style="'+c+'"'+d})}a.webkit&&f(h),a.ie&&f(g)}}),d("tinymce/pasteplugin/Plugin",["tinymce/PluginManager","tinymce/pasteplugin/Clipboard","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Quirks"],function(a,b,c,d){var e;a.add("paste",function(a){function f(){return e||a.settings.paste_plaintext_inform===!1}function g(){if("text"==h.pasteFormat)this.active(!1),h.pasteFormat="html",a.fire("PastePlainTextToggle",{state:!1});else if(h.pasteFormat="text",this.active(!0),!f()){var b=a.translate("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.");a.notificationManager.open({text:b,type:"info"}),e=!0,a.fire("PastePlainTextToggle",{state:!0})}a.focus()}var h,i=this,j=a.settings;i.clipboard=h=new b(a),i.quirks=new d(a),i.wordFilter=new c(a),a.settings.paste_as_text&&(i.clipboard.pasteFormat="text"),j.paste_preprocess&&a.on("PastePreProcess",function(a){j.paste_preprocess.call(i,i,a)}),j.paste_postprocess&&a.on("PastePostProcess",function(a){j.paste_postprocess.call(i,i,a)}),a.addCommand("mceInsertClipboardContent",function(a,b){b.content&&i.clipboard.pasteHtml(b.content),b.text&&i.clipboard.pasteText(b.text)}),a.settings.paste_block_drop&&a.on("dragend dragover draggesture dragdrop drop drag",function(a){a.preventDefault(),a.stopPropagation()}),a.settings.paste_data_images||a.on("drop",function(a){var b=a.dataTransfer;b&&b.files&&b.files.length>0&&a.preventDefault()}),a.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:g,active:"text"==i.clipboard.pasteFormat}),a.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:h.pasteFormat,onclick:g})})}),f(["tinymce/pasteplugin/Utils"])}(this);
\ No newline at end of file
+!function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;f<a.length;++f){if(c=g[a[f]]||e(a[f]),!c)throw"module definition dependecy not found: "+a[f];d.push(c)}b.apply(null,d)}function d(a,d,e){if("string"!=typeof a)throw"invalid module definition, module id must be defined and be a string";if(d===b)throw"invalid module definition, dependencies must be specified";if(e===b)throw"invalid module definition, definition function must be specified";c(d,function(){g[a]=e.apply(null,arguments)})}function e(b){for(var c=a,d=b.split(/[.\/]/),e=0;e<d.length;++e){if(!c[d[e]])return;c=c[d[e]]}return c}function f(c){var d,e,f,h,i;for(d=0;d<c.length;d++){e=a,f=c[d],h=f.split(/[.\/]/);for(var j=0;j<h.length-1;++j)e[h[j]]===b&&(e[h[j]]={}),e=e[h[j]];e[h[h.length-1]]=g[f]}if(a.AMDLC_TESTS){i=a.privateModules||{};for(f in g)i[f]=g[f];for(d=0;d<c.length;d++)delete i[c[d]];a.privateModules=i}}var g={};d("tinymce/pasteplugin/Utils",["tinymce/util/Tools","tinymce/html/DomParser","tinymce/html/Schema"],function(a,b,c){function d(b,c){return a.each(c,function(a){b=a.constructor==RegExp?b.replace(a,""):b.replace(a[0],a[1])}),b}function e(e){function f(a){var b=a.name,c=a;if("br"===b)return void(i+="\n");if(j[b]&&(i+=" "),k[b])return void(i+=" ");if(3==a.type&&(i+=a.value),!a.shortEnded&&(a=a.firstChild))do f(a);while(a=a.next);l[b]&&c.next&&(i+="\n","p"==b&&(i+="\n"))}var g=new c,h=new b({},g),i="",j=g.getShortEndedElements(),k=a.makeMap("script noscript style textarea video audio iframe object"," "),l=g.getBlockElements();return e=d(e,[/<!\[[^\]]+\]>/g]),f(h.parse(e)),i}function f(a){function b(a,b,c){return b||c?"\xa0":" "}return a=d(a,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,b],/<br class="Apple-interchange-newline">/g,/<br>$/i])}function g(a){var b=0;return function(){return a+b++}}return{filter:d,innerText:e,trimHtml:f,createIdGenerator:g}}),d("tinymce/pasteplugin/SmartPaste",["tinymce/util/Tools"],function(a){var b=function(a){return/^https?:\/\/[\w\?\-\/+=.&%]+$/i.test(a)},c=function(a){return b(a)&&/.(gif|jpe?g|png)$/.test(a)},d=function(a,b,c){return a.undoManager.extra(function(){c(a,b)},function(){a.insertContent('<img src="'+b+'">')}),!0},e=function(a,b,c){return a.undoManager.extra(function(){c(a,b)},function(){a.execCommand("mceInsertLink",!1,b)}),!0},f=function(a,c,d){return a.selection.isCollapsed()===!1&&b(c)?e(a,c,d):!1},g=function(a,b,e){return c(b)?d(a,b,e):!1},h=function(a,b){return a.insertContent(b,{merge:a.settings.paste_merge_formats!==!1,paste:!0}),!0},i=function(b,c){a.each([f,g,h],function(a){return a(b,c,h)!==!0})},j=function(a,b){a.settings.smart_paste===!1?h(a,b):i(a,b)};return{isImageUrl:c,isAbsoluteUrl:b,insertContent:j}}),d("tinymce/pasteplugin/Clipboard",["tinymce/Env","tinymce/dom/RangeUtils","tinymce/util/VK","tinymce/pasteplugin/Utils","tinymce/pasteplugin/SmartPaste","tinymce/util/Delay"],function(a,b,c,d,e,f){return function(g){function h(a){var b,c=g.dom;if(b=g.fire("BeforePastePreProcess",{content:a}),b=g.fire("PastePreProcess",b),a=b.content,!b.isDefaultPrevented()){if(g.hasEventListeners("PastePostProcess")&&!b.isDefaultPrevented()){var d=c.add(g.getBody(),"div",{style:"display:none"},a);b=g.fire("PastePostProcess",{node:d}),c.remove(d),a=b.node.innerHTML}b.isDefaultPrevented()||e.insertContent(g,a)}}function i(a){a=g.dom.encode(a).replace(/\r\n/g,"\n");var b,c=g.dom.getParent(g.selection.getStart(),g.dom.isBlock),e=g.settings.forced_root_block;e&&(b=g.dom.createHTML(e,g.settings.forced_root_block_attrs),b=b.substr(0,b.length-3)+">"),c&&/^(PRE|DIV)$/.test(c.nodeName)||!e?a=d.filter(a,[[/\n/g,"<br>"]]):(a=d.filter(a,[[/\n\n/g,"</p>"+b],[/^(.*<\/p>)(<p>)$/,b+"$1"],[/\n/g,"<br />"]]),-1!=a.indexOf("<p>")&&(a=b+a)),h(a)}function j(){function b(a){var b,c,e,f=a.startContainer;if(b=a.getClientRects(),b.length)return b[0];if(a.collapsed&&1==f.nodeType){for(e=f.childNodes[z.startOffset];e&&3==e.nodeType&&!e.data.length;)e=e.nextSibling;if(e)return"BR"==e.tagName&&(c=d.doc.createTextNode("\ufeff"),e.parentNode.insertBefore(c,e),a=d.createRng(),a.setStartBefore(c),a.setEndAfter(c),b=a.getClientRects(),d.remove(c)),b.length?b[0]:void 0}}var c,d=g.dom,e=g.getBody(),f=g.dom.getViewPort(g.getWin()),h=f.y,i=20;if(z=g.selection.getRng(),g.inline&&(c=g.selection.getScrollContainer(),c&&c.scrollTop>0&&(h=c.scrollTop)),z.getClientRects){var j=b(z);if(j)i=h+(j.top-d.getPos(e).y);else{i=h;var k=z.startContainer;k&&(3==k.nodeType&&k.parentNode!=e&&(k=k.parentNode),1==k.nodeType&&(i=d.getPos(k,c||e).y))}}y=d.add(g.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+i+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},E),(a.ie||a.gecko)&&d.setStyle(y,"left","rtl"==d.getStyle(e,"direction",!0)?65535:-65535),d.bind(y,"beforedeactivate focusin focusout",function(a){a.stopPropagation()}),y.focus(),g.selection.select(y,!0)}function k(){if(y){for(var a;a=g.dom.get("mcepastebin");)g.dom.remove(a),g.dom.unbind(a);z&&g.selection.setRng(z)}y=z=null}function l(){var a,b,c,d,e="";for(a=g.dom.select("div[id=mcepastebin]"),b=0;b<a.length;b++)c=a[b],c.firstChild&&"mcepastebin"==c.firstChild.id&&(c=c.firstChild),d=c.innerHTML,e!=E&&(e+=d);return e}function m(a){var b={};if(a){if(a.getData){var c=a.getData("Text");c&&c.length>0&&-1==c.indexOf(F)&&(b["text/plain"]=c)}if(a.types)for(var d=0;d<a.types.length;d++){var e=a.types[d];b[e]=a.getData(e)}}return b}function n(a){return m(a.clipboardData||g.getDoc().dataTransfer)}function o(a){return v(a,"text/html")||v(a,"text/plain")}function p(a){var b;return b=a.indexOf(","),-1!==b?a.substr(b+1):null}function q(a,b){return a.images_dataimg_filter?a.images_dataimg_filter(b):!0}function r(a,b,c){a&&(g.selection.setRng(a),a=null);var d=b.result,e=p(d),f=new Image;if(f.src=d,q(g.settings,f)){var i,j,k=g.editorUpload.blobCache;j=k.findFirst(function(a){return a.base64()===e}),j?i=j:(i=k.create(G(),c,e),k.add(i)),h('<img src="'+i.blobUri()+'">')}else h('<img src="'+d+'">')}function s(a,b){function c(c){var d,e,f,g=!1;if(c)for(d=0;d<c.length;d++)if(e=c[d],/^image\/(jpeg|png|gif|bmp)$/.test(e.type)){var h=e.getAsFile?e.getAsFile():e;f=new FileReader,f.onload=r.bind(null,b,f,h),f.readAsDataURL(h),a.preventDefault(),g=!0}return g}var d=a.clipboardData||a.dataTransfer;return g.settings.paste_data_images&&d?c(d.items)||c(d.files):void 0}function t(a){var b=a.clipboardData;return-1!=navigator.userAgent.indexOf("Android")&&b&&b.items&&0===b.items.length}function u(a){return b.getCaretRangeFromPoint(a.clientX,a.clientY,g.getDoc())}function v(a,b){return b in a&&a[b].length>0}function w(a){return c.metaKeyPressed(a)&&86==a.keyCode||a.shiftKey&&45==a.keyCode}function x(){function b(a,b,c){var e;return v(a,"text/html")?e=a["text/html"]:(e=l(),e==E&&(c=!0)),e=d.trimHtml(e),y&&y.firstChild&&"mcepastebin"===y.firstChild.id&&(c=!0),k(),e.length||(c=!0),c&&(e=v(a,"text/plain")&&-1==e.indexOf("</p>")?a["text/plain"]:d.innerText(e)),e==E?void(b||g.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.")):void(c?i(e):h(e))}function c(a){return 0===a["text/plain"].indexOf("file://")}g.on("keydown",function(b){function c(a){w(a)&&!a.isDefaultPrevented()&&k()}if(w(b)&&!b.isDefaultPrevented()){if(A=b.shiftKey&&86==b.keyCode,A&&a.webkit&&-1!=navigator.userAgent.indexOf("Version/"))return;if(b.stopImmediatePropagation(),C=(new Date).getTime(),a.ie&&A)return b.preventDefault(),void g.fire("paste",{ieFake:!0});k(),j(),g.once("keyup",c),g.once("paste",function(){g.off("keyup",c)})}});var e=function(){return z||g.selection.getRng()};g.on("paste",function(c){var d=(new Date).getTime(),h=n(c),i=(new Date).getTime()-d,m=(new Date).getTime()-C-i<1e3,p="text"==B.pasteFormat||A;return A=!1,c.isDefaultPrevented()||t(c)?void k():!o(h)&&s(c,e())?void k():(m||c.preventDefault(),!a.ie||m&&!c.ieFake||(j(),g.dom.bind(y,"paste",function(a){a.stopPropagation()}),g.getDoc().execCommand("Paste",!1,null),h["text/html"]=l()),void(v(h,"text/html")?(c.preventDefault(),b(h,m,p)):f.setEditorTimeout(g,function(){b(h,m,p)},0)))}),g.on("dragstart dragend",function(a){D="dragstart"==a.type}),g.on("drop",function(a){var b,e;if(e=u(a),!a.isDefaultPrevented()&&!D&&(b=m(a.dataTransfer),(o(b)&&!c(b)||!s(a,e))&&e&&g.settings.paste_filter_drop!==!1)){var j=b["mce-internal"]||b["text/html"]||b["text/plain"];j&&(a.preventDefault(),f.setEditorTimeout(g,function(){g.undoManager.transact(function(){b["mce-internal"]&&g.execCommand("Delete"),g.selection.setRng(e),j=d.trimHtml(j),b["text/html"]?h(j):i(j)})}))}}),g.on("dragover dragend",function(a){g.settings.paste_data_images&&a.preventDefault()})}var y,z,A,B=this,C=0,D=!1,E="%MCEPASTEBIN%",F="data:text/mce-internal,",G=d.createIdGenerator("mceclip");B.pasteHtml=h,B.pasteText=i,B.pasteImageData=s,g.on("preInit",function(){x(),g.parser.addNodeFilter("img",function(b,c,d){function e(a){return a.data&&a.data.paste===!0}function f(b){b.attr("data-mce-object")||k===a.transparentSrc||b.remove()}function h(a){return 0===a.indexOf("webkit-fake-url")}function i(a){return 0===a.indexOf("data:")}if(!g.settings.paste_data_images&&e(d))for(var j=b.length;j--;){var k=b[j].attributes.map.src;k&&(h(k)?f(b[j]):!g.settings.allow_html_data_urls&&i(k)&&f(b[j]))}})})}}),d("tinymce/pasteplugin/WordFilter",["tinymce/util/Tools","tinymce/html/DomParser","tinymce/html/Schema","tinymce/html/Serializer","tinymce/html/Node","tinymce/pasteplugin/Utils"],function(a,b,c,d,e,f){function g(a){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(a)||/class="OutlineElement/.test(a)||/id="?docs\-internal\-guid\-/.test(a)}function h(b){var c,d;return d=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],b=b.replace(/^[\u00a0 ]+/,""),a.each(d,function(a){return a.test(b)?(c=!0,!1):void 0}),c}function i(a){return/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(a)}function j(j){var k=j.settings;j.on("BeforePastePreProcess",function(l){function m(a){function b(a){var c="";if(3===a.type)return a.value;if(a=a.firstChild)do c+=b(a);while(a=a.next);return c}function c(a,b){if(3===a.type&&b.test(a.value))return a.value=a.value.replace(b,""),!1;if(a=a.firstChild)do if(!c(a,b))return!1;while(a=a.next);return!0}function d(a){if(a._listIgnore)return void a.remove();if(a=a.firstChild)do d(a);while(a=a.next)}function f(a,b,f){var h=a._listLevel||k;h!=k&&(k>h?g&&(g=g.parent.parent):(j=g,g=null)),g&&g.name==b?g.append(a):(j=j||g,g=new e(b,1),f>1&&g.attr("start",""+f),a.wrap(g)),a.name="li",h>k&&j&&j.lastChild.append(g),k=h,d(a),c(a,/^\u00a0+/),c(a,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),c(a,/^\u00a0+/)}for(var g,j,k=1,l=[],m=a.firstChild;"undefined"!=typeof m&&null!==m;)if(l.push(m),m=m.walk(),null!==m)for(;"undefined"!=typeof m&&m.parent!==a;)m=m.walk();for(var n=0;n<l.length;n++)if(a=l[n],"p"==a.name&&a.firstChild){var o=b(a);if(i(o)){f(a,"ul");continue}if(h(o)){var p=/([0-9]+)\./.exec(o),q=1;p&&(q=parseInt(p[1],10)),f(a,"ol",q);continue}if(a._listLevel){f(a,"ul",1);continue}g=null}else j=g,g=null}function n(b,c){var d,f={},g=j.dom.parseStyle(c);return a.each(g,function(a,e){switch(e){case"mso-list":d=/\w+ \w+([0-9]+)/i.exec(c),d&&(b._listLevel=parseInt(d[1],10)),/Ignore/i.test(a)&&b.firstChild&&(b._listIgnore=!0,b.firstChild._listIgnore=!0);break;case"horiz-align":e="text-align";break;case"vert-align":e="vertical-align";break;case"font-color":case"mso-foreground":e="color";break;case"mso-background":case"mso-highlight":e="background";break;case"font-weight":case"font-style":return void("normal"!=a&&(f[e]=a));case"mso-element":if(/^(comment|comment-list)$/i.test(a))return void b.remove()}return 0===e.indexOf("mso-comment")?void b.remove():void(0!==e.indexOf("mso-")&&("all"==o||p&&p[e])&&(f[e]=a))}),/(bold)/i.test(f["font-weight"])&&(delete f["font-weight"],b.wrap(new e("b",1))),/(italic)/i.test(f["font-style"])&&(delete f["font-style"],b.wrap(new e("i",1))),f=j.dom.serializeStyle(f,b.name),f?f:null}var o,p,q=l.content;if(q=q.replace(/<b[^>]+id="?docs-internal-[^>]*>/gi,""),q=q.replace(/<br class="?Apple-interchange-newline"?>/gi,""),o=k.paste_retain_style_properties,o&&(p=a.makeMap(o.split(/[, ]/))),k.paste_enable_default_filters!==!1&&g(l.content)){l.wordContent=!0,q=f.filter(q,[/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(a,b){return b.length>0?b.replace(/./," ").slice(Math.floor(b.length/2)).split("").join("\xa0"):""}]]);var r=k.paste_word_valid_elements;r||(r="-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody");var s=new c({valid_elements:r,valid_children:"-li[p]"});a.each(s.elements,function(a){a.attributes["class"]||(a.attributes["class"]={},a.attributesOrder.push("class")),a.attributes.style||(a.attributes.style={},a.attributesOrder.push("style"))});var t=new b({},s);t.addAttributeFilter("style",function(a){for(var b,c=a.length;c--;)b=a[c],b.attr("style",n(b,b.attr("style"))),"span"==b.name&&b.parent&&!b.attributes.length&&b.unwrap()}),t.addAttributeFilter("class",function(a){for(var b,c,d=a.length;d--;)b=a[d],c=b.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(c)&&b.remove(),b.attr("class",null)}),t.addNodeFilter("del",function(a){for(var b=a.length;b--;)a[b].remove()}),t.addNodeFilter("a",function(a){for(var b,c,d,e=a.length;e--;)if(b=a[e],c=b.attr("href"),d=b.attr("name"),c&&-1!=c.indexOf("#_msocom_"))b.remove();else if(c&&0===c.indexOf("file://")&&(c=c.split("#")[1],c&&(c="#"+c)),c||d){if(d&&!/^_?(?:toc|edn|ftn)/i.test(d)){b.unwrap();continue}b.attr({href:c,name:d})}else b.unwrap()});var u=t.parse(q);k.paste_convert_word_fake_lists!==!1&&m(u),l.content=new d({validate:k.validate},s).serialize(u)}})}return j.isWordContent=g,j}),d("tinymce/pasteplugin/Quirks",["tinymce/Env","tinymce/util/Tools","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Utils"],function(a,b,c,d){return function(e){function f(a){e.on("BeforePastePreProcess",function(b){b.content=a(b.content)})}function g(a){if(!c.isWordContent(a))return a;var f=[];b.each(e.schema.getBlockElements(),function(a,b){f.push(b)});var g=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+f.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return a=d.filter(a,[[g,"$1"]]),a=d.filter(a,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function h(a){if(c.isWordContent(a))return a;var b=e.settings.paste_webkit_styles;if(e.settings.paste_remove_styles_if_webkit===!1||"all"==b)return a;if(b&&(b=b.split(/[, ]/)),b){var d=e.dom,f=e.selection.getNode();a=a.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(a,c,e,g){var h=d.parseStyle(e,"span"),i={};if("none"===b)return c+g;for(var j=0;j<b.length;j++){var k=h[b[j]],l=d.getStyle(f,b[j],!0);/color/.test(b[j])&&(k=d.toHex(k),l=d.toHex(l)),l!=k&&(i[b[j]]=k)}return i=d.serializeStyle(i,"span"),i?c+' style="'+i+'"'+g:c+g})}else a=a.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return a=a.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(a,b,c,d){return b+' style="'+c+'"'+d})}a.webkit&&f(h),a.ie&&f(g)}}),d("tinymce/pasteplugin/Plugin",["tinymce/PluginManager","tinymce/pasteplugin/Clipboard","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Quirks"],function(a,b,c,d){var e;a.add("paste",function(a){function f(){return e||a.settings.paste_plaintext_inform===!1}function g(){if("text"==h.pasteFormat)this.active(!1),h.pasteFormat="html",a.fire("PastePlainTextToggle",{state:!1});else if(h.pasteFormat="text",this.active(!0),!f()){var b=a.translate("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.");a.notificationManager.open({text:b,type:"info"}),e=!0,a.fire("PastePlainTextToggle",{state:!0})}a.focus()}var h,i=this,j=a.settings;i.clipboard=h=new b(a),i.quirks=new d(a),i.wordFilter=new c(a),a.settings.paste_as_text&&(i.clipboard.pasteFormat="text"),j.paste_preprocess&&a.on("PastePreProcess",function(a){j.paste_preprocess.call(i,i,a)}),j.paste_postprocess&&a.on("PastePostProcess",function(a){j.paste_postprocess.call(i,i,a)}),a.addCommand("mceInsertClipboardContent",function(a,b){b.content&&i.clipboard.pasteHtml(b.content),b.text&&i.clipboard.pasteText(b.text)}),a.settings.paste_block_drop&&a.on("dragend dragover draggesture dragdrop drop drag",function(a){a.preventDefault(),a.stopPropagation()}),a.settings.paste_data_images||a.on("drop",function(a){var b=a.dataTransfer;b&&b.files&&b.files.length>0&&a.preventDefault()}),a.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:g,active:"text"==i.clipboard.pasteFormat}),a.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:h.pasteFormat,onclick:g})})}),f(["tinymce/pasteplugin/Utils"])}(this);
\ No newline at end of file
index 3ea329c608248ecd8be31afb7d8537d8e957b9a7..b930e921f209f8208a7d1e6004fb2ed71eb43215 100644 (file)
@@ -90,7 +90,6 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
         window.wpActiveEditor = editor.id;
     });
 
-       // Replace Read More/Next Page tags with images
        editor.on( 'BeforeSetContent', function( event ) {
                var title;
 
@@ -116,6 +115,21 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
                                event.content = wp.editor.autop( event.content );
                        }
 
+                       if ( event.content.indexOf( '<script' ) !== -1 || event.content.indexOf( '<style' ) !== -1 ) {
+                               event.content = event.content.replace( /<(script|style)[^>]*>[\s\S]*?<\/\1>/g, function( match, tag ) {
+                                       return '<img ' +
+                                               'src="' + tinymce.Env.transparentSrc + '" ' +
+                                               'data-wp-preserve="' + encodeURIComponent( match ) + '" ' +
+                                               'data-mce-resize="false" ' +
+                                               'data-mce-placeholder="1" '+
+                                               'class="mce-object" ' +
+                                               'width="20" height="20" '+
+                                               'alt="&lt;' + tag + '&gt;" ' +
+                                               'title="&lt;' + tag + '&gt;" ' +
+                                       '/>';
+                               } );
+                       }
+
                        // Remove spaces from empty paragraphs.
                        // Avoid backtracking, can freeze the editor. See #35890.
                        // (This is also quite faster than using only one regex.)
@@ -129,23 +143,28 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
                }
        });
 
-       // Replace images with tags
-       editor.on( 'PostProcess', function( e ) {
-               if ( e.get ) {
-                       e.content = e.content.replace(/<img[^>]+>/g, function( image ) {
-                               var match, moretext = '';
+       editor.on( 'PostProcess', function( event ) {
+               if ( event.get ) {
+                       event.content = event.content.replace(/<img[^>]+>/g, function( image ) {
+                               var match,
+                                       string,
+                                       moretext = '';
 
                                if ( image.indexOf( 'data-wp-more="more"' ) !== -1 ) {
                                        if ( match = image.match( /data-wp-more-text="([^"]+)"/ ) ) {
                                                moretext = match[1];
                                        }
 
-                                       image = '<!--more' + moretext + '-->';
+                                       string = '<!--more' + moretext + '-->';
                                } else if ( image.indexOf( 'data-wp-more="nextpage"' ) !== -1 ) {
-                                       image = '<!--nextpage-->';
+                                       string = '<!--nextpage-->';
+                               } else if ( image.indexOf( 'data-wp-preserve' ) !== -1 ) {
+                                       if ( match = image.match( / data-wp-preserve="([^"]+)"/ ) ) {
+                                               string = decodeURIComponent( match[1] );
+                                       }
                                }
 
-                               return image;
+                               return string || image;
                        });
                }
        });
@@ -540,7 +559,6 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
                        q: 'mceBlockQuote',
                        u: 'InsertUnorderedList',
                        o: 'InsertOrderedList',
-                       s: 'unlink',
                        m: 'WP_Medialib',
                        z: 'WP_Adv',
                        t: 'WP_More',
@@ -561,6 +579,11 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
                if ( window.getUserSetting( 'editor_plain_text_paste_warning' ) > 1 ) {
                        editor.settings.paste_plaintext_inform = false;
                }
+
+               // Change the editor iframe title on MacOS, add the correct help shortcut.
+               if ( tinymce.Env.mac ) {
+                       tinymce.$( editor.iframeElement ).attr( 'title', __( 'Rich Text Area. Press Control-Option-H for help.' ) );
+               }
        } );
 
        editor.on( 'PastePlainTextToggle', function( event ) {
@@ -745,12 +768,11 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
                                        },
                                        toolbar = this.getEl(),
                                        toolbarWidth = toolbar.offsetWidth,
-                                       toolbarHeight = toolbar.offsetHeight,
+                                       toolbarHeight = toolbar.clientHeight,
                                        selection = currentSelection.getBoundingClientRect(),
                                        selectionMiddle = ( selection.left + selection.right ) / 2,
                                        buffer = 5,
-                                       margin = 8,
-                                       spaceNeeded = toolbarHeight + margin + buffer,
+                                       spaceNeeded = toolbarHeight + buffer,
                                        wpAdminbarBottom = wpAdminbar ? wpAdminbar.getBoundingClientRect().bottom : 0,
                                        mceToolbarBottom = mceToolbar ? mceToolbar.getBoundingClientRect().bottom : 0,
                                        mceStatusbarTop = mceStatusbar ? windowHeight - mceStatusbar.getBoundingClientRect().top : 0,
@@ -784,12 +806,12 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
                                                top = selection.bottom + iframeRect.top + scrollY - iosOffsetBottom;
                                        } else if ( spaceTop >= spaceNeeded ) {
                                                className = ' mce-arrow-down';
-                                               top = selection.top + iframeRect.top + scrollY - toolbarHeight - margin + iosOffsetTop;
+                                               top = selection.top + iframeRect.top + scrollY - toolbarHeight + iosOffsetTop;
                                        }
                                } else {
                                        if ( spaceTop >= spaceNeeded ) {
                                                className = ' mce-arrow-down';
-                                               top = selection.top + iframeRect.top + scrollY - toolbarHeight - margin + iosOffsetTop;
+                                               top = selection.top + iframeRect.top + scrollY - toolbarHeight + iosOffsetTop;
                                        } else if ( spaceBottom >= spaceNeeded && editorHeight / 2 > selection.bottom + iframeRect.top - blockedTop ) {
                                                className = ' mce-arrow-up';
                                                top = selection.bottom + iframeRect.top + scrollY - iosOffsetBottom;
index c1ce95beed3555b5c73fd8f90e1ba0a7cde27910..f06f2faabf065bcea58a91ea0eb2da18c0e9e7ae 100644 (file)
@@ -1 +1 @@
-!function(a){a.ui.FloatPanel.zIndex=100100,a.PluginManager.add("wordpress",function(b){function c(c){var d,f,i,j=0;f="hide"===c,b.theme.panel&&(i=b.theme.panel.find(".toolbar:not(.menubar)")),!i||i.length<2||"hide"===c&&!i[1].visible()||(!c&&i[1].visible()&&(c="hide"),h(i,function(a,b){b>0&&("hide"===c?(a.hide(),j+=30):(a.show(),j-=30))}),j&&!f&&(a.Env.iOS||(d=b.getContentAreaContainer().firstChild,g.setStyle(d,"height",d.clientHeight+j)),"hide"===c?(setUserSetting("hidetb","0"),e&&e.active(!1)):(setUserSetting("hidetb","1"),e&&e.active(!0))),b.fire("wp-toolbar-toggle"))}function d(){}var e,f,g=a.DOM,h=a.each,i=b.editorManager.i18n.translate,j=window.jQuery,k=window.wp,l=k&&k.editor&&k.editor.autop&&b.getParam("wpautop",!0);return j&&j(document).triggerHandler("tinymce-editor-setup",[b]),b.addButton("wp_adv",{tooltip:"Toolbar Toggle",cmd:"WP_Adv",onPostRender:function(){e=this,e.active("1"===getUserSetting("hidetb")?!0:!1)}}),b.on("PostRender",function(){b.getParam("wordpress_adv_hidden",!0)&&"0"===getUserSetting("hidetb","0")&&c("hide")}),b.addCommand("WP_Adv",function(){c()}),b.on("focus",function(){window.wpActiveEditor=b.id}),b.on("BeforeSetContent",function(b){var c;b.content&&(-1!==b.content.indexOf("<!--more")&&(c=i("Read more..."),b.content=b.content.replace(/<!--more(.*?)-->/g,function(b,d){return'<img src="'+a.Env.transparentSrc+'" data-wp-more="more" data-wp-more-text="'+d+'" class="wp-more-tag mce-wp-more" alt="" title="'+c+'" data-mce-resize="false" data-mce-placeholder="1" />'})),-1!==b.content.indexOf("<!--nextpage-->")&&(c=i("Page break"),b.content=b.content.replace(/<!--nextpage-->/g,'<img src="'+a.Env.transparentSrc+'" data-wp-more="nextpage" class="wp-more-tag mce-wp-nextpage" alt="" title="'+c+'" data-mce-resize="false" data-mce-placeholder="1" />')),b.load&&"raw"!==b.format&&l&&(b.content=k.editor.autop(b.content)),b.content=b.content.replace(/<p>([^<>]+)<\/p>/gi,function(a,b){return/^(&nbsp;|\s|\u00a0|\ufeff)+$/i.test(b)?"<p><br /></p>":a}))}),b.on("PostProcess",function(a){a.get&&(a.content=a.content.replace(/<img[^>]+>/g,function(a){var b,c="";return-1!==a.indexOf('data-wp-more="more"')?((b=a.match(/data-wp-more-text="([^"]+)"/))&&(c=b[1]),a="<!--more"+c+"-->"):-1!==a.indexOf('data-wp-more="nextpage"')&&(a="<!--nextpage-->"),a}))}),b.on("ResolveName",function(a){var c;"IMG"===a.target.nodeName&&(c=b.dom.getAttrib(a.target,"data-wp-more"))&&(a.name=c)}),b.addCommand("WP_More",function(c){var d,e,f,g="wp-more-tag",h=b.dom,j=b.selection.getNode();return c=c||"more",g+=" mce-wp-"+c,f="more"===c?"Read more...":"Next page",f=i(f),e='<img src="'+a.Env.transparentSrc+'" alt="" title="'+f+'" class="'+g+'" data-wp-more="'+c+'" data-mce-resize="false" data-mce-placeholder="1" />',"BODY"===j.nodeName||"P"===j.nodeName&&"BODY"===j.parentNode.nodeName?void b.insertContent(e):(d=h.getParent(j,function(a){return a.parentNode&&"BODY"===a.parentNode.nodeName?!0:!1},b.getBody()),void(d&&("P"===d.nodeName?d.appendChild(h.create("p",null,e).firstChild):h.insertAfter(h.create("p",null,e),d),b.nodeChanged())))}),b.addCommand("WP_Code",function(){b.formatter.toggle("code")}),b.addCommand("WP_Page",function(){b.execCommand("WP_More","nextpage")}),b.addCommand("WP_Help",function(){function c(a){var b="<tr>";return h(a,function(a,c){b+=a?"<td><kbd>"+c+"</kbd></td><td>"+i(a)+"</td>":"<td></td><td></td>"}),b+"</tr>"}var d,e,f,g,j=i(a.Env.mac?"Ctrl + Alt + letter:":"Shift + Alt + letter:"),k=i(a.Env.mac?"Cmd + letter:":"Ctrl + letter:"),l=[],m=[];h([{c:"Copy",x:"Cut"},{v:"Paste",a:"Select all"},{z:"Undo",y:"Redo"},{b:"Bold",i:"Italic"},{u:"Underline",k:"Insert/edit link"}],function(a){l.push(c(a))}),h([{1:"Heading 1",2:"Heading 2"},{3:"Heading 3",4:"Heading 4"},{5:"Heading 5",6:"Heading 6"},{l:"Align left",c:"Align center"},{r:"Align right",j:"Justify"},{d:"Strikethrough",q:"Blockquote"},{u:"Bullet list",o:"Numbered list"},{a:"Insert/edit link",s:"Remove link"},{m:"Insert/edit image",t:"Insert Read More tag"},{h:"Keyboard Shortcuts",x:"Code"},{p:"Insert Page Break tag",w:"Distraction-free writing mode"}],function(a){m.push(c(a))}),d=[i("Letter"),i("Action"),i("Letter"),i("Action")],d="<tr><th>"+d.join("</th><th>")+"</th></tr>",e='<div class="wp-editor-help">',e=e+"<h2>"+i("Default shortcuts,")+" "+k+'</h2><table class="wp-help-th-center fixed">'+d+l.join("")+"</table><h2>"+i("Additional shortcuts,")+" "+j+'</h2><table class="wp-help-th-center fixed">'+d+m.join("")+"</table>",b.plugins.wptextpattern&&(!a.Env.ie||a.Env.ie>8)&&(e=e+"<h2>"+i("When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.")+'</h2><table class="wp-help-th-center fixed">'+c({"*":"Bullet list","1.":"Numbered list"})+c({"-":"Bullet list","1)":"Numbered list"})+"</table>",e=e+"<h2>"+i("The following formatting shortcuts are replaced when pressing Enter. Press Escape or the Undo button to undo.")+'</h2><table class="wp-help-single">'+c({">":"Blockquote"})+c({"##":"Heading 2"})+c({"###":"Heading 3"})+c({"####":"Heading 4"})+c({"#####":"Heading 5"})+c({"######":"Heading 6"})+c({"---":"Horizontal line"})+"</table>"),e=e+"<h2>"+i("Focus shortcuts:")+'</h2><table class="wp-help-single">'+c({"Alt + F8":"Inline toolbar (when an image, link or preview is selected)"})+c({"Alt + F9":"Editor menu (when enabled)"})+c({"Alt + F10":"Editor toolbar"})+c({"Alt + F11":"Elements path"})+"</table><p>"+i("To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.")+"</p>",e+="</div>",f=b.windowManager.open({title:"Keyboard Shortcuts",items:{type:"container",classes:"wp-help",html:e},buttons:{text:"Close",onclick:"close"}}),f.$el&&(f.$el.find('div[role="application"]').attr("role","document"),g=f.$el.find(".mce-wp-help"),g[0]&&(g.attr("tabindex","0"),g[0].focus(),g.on("keydown",function(a){a.keyCode>=33&&a.keyCode<=40&&a.stopPropagation()})))}),b.addCommand("WP_Medialib",function(){k&&k.media&&k.media.editor&&k.media.editor.open(b.id)}),b.addButton("wp_more",{tooltip:"Insert Read More tag",onclick:function(){b.execCommand("WP_More","more")}}),b.addButton("wp_page",{tooltip:"Page break",onclick:function(){b.execCommand("WP_More","nextpage")}}),b.addButton("wp_help",{tooltip:"Keyboard Shortcuts",cmd:"WP_Help"}),b.addButton("wp_code",{tooltip:"Code",cmd:"WP_Code",stateSelector:"code"}),k&&k.media&&k.media.editor&&b.addMenuItem("add_media",{text:"Add Media",icon:"wp-media-library",context:"insert",cmd:"WP_Medialib"}),b.addMenuItem("wp_more",{text:"Insert Read More tag",icon:"wp_more",context:"insert",onclick:function(){b.execCommand("WP_More","more")}}),b.addMenuItem("wp_page",{text:"Page break",icon:"wp_page",context:"insert",onclick:function(){b.execCommand("WP_More","nextpage")}}),b.on("BeforeExecCommand",function(c){!a.Env.webkit||"InsertUnorderedList"!==c.command&&"InsertOrderedList"!==c.command||(f||(f=b.dom.create("style",{type:"text/css"},"#tinymce,#tinymce span,#tinymce li,#tinymce li>span,#tinymce p,#tinymce p>span{font:medium sans-serif;color:#000;line-height:normal;}")),b.getDoc().head.appendChild(f))}),b.on("ExecCommand",function(c){a.Env.webkit&&f&&("InsertUnorderedList"===c.command||"InsertOrderedList"===c.command)&&b.dom.remove(f)}),b.on("init",function(){var c=a.Env,d=["mceContentBody"],e=b.getDoc(),f=b.dom;c.iOS&&f.addClass(e.documentElement,"ios"),"rtl"===b.getParam("directionality")&&(d.push("rtl"),f.setAttrib(e.documentElement,"dir","rtl")),f.setAttrib(e.documentElement,"lang",b.getParam("wp_lang_attr")),c.ie?9===parseInt(c.ie,10)?d.push("ie9"):8===parseInt(c.ie,10)?d.push("ie8"):c.ie<8&&d.push("ie7"):c.webkit&&d.push("webkit"),d.push("wp-editor"),h(d,function(a){a&&f.addClass(e.body,a)}),b.on("BeforeSetContent",function(a){a.content&&(a.content=a.content.replace(/<p>\s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre)( [^>]*)?>/gi,"<$1$2>").replace(/<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre)>\s*<\/p>/gi,"</$1>"))}),j&&j(document).triggerHandler("tinymce-editor-init",[b]),window.tinyMCEPreInit&&window.tinyMCEPreInit.dragDropUpload&&f.bind(e,"dragstart dragend dragover drop",function(a){j&&j(document).trigger(new j.Event(a))}),b.getParam("wp_paste_filters",!0)&&(b.on("PastePreProcess",function(b){b.content=b.content.replace(/<br class="?Apple-interchange-newline"?>/gi,""),a.Env.webkit||(b.content=b.content.replace(/(<[^>]+) style="[^"]*"([^>]*>)/gi,"$1$2"),b.content=b.content.replace(/(<[^>]+) data-mce-style=([^>]+>)/gi,"$1 style=$2"))}),b.on("PastePostProcess",function(a){h(f.select("p",a.node),function(a){f.isEmpty(a)&&f.remove(a)})}))}),b.on("SaveContent",function(a){return!b.inline&&b.isHidden()?void(a.content=a.element.value):(a.content=a.content.replace(/<p>(?:<br ?\/?>|\u00a0|\uFEFF| )*<\/p>/g,"<p>&nbsp;</p>"),void(l&&(a.content=k.editor.removep(a.content))))}),b.on("preInit",function(){var c="@[id|accesskey|class|dir|lang|style|tabindex|title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],i,b,script[src|async|defer|type|charset|crossorigin|integrity]";b.schema.addValidElements(c),a.Env.iOS&&(b.settings.height=300),h({c:"JustifyCenter",r:"JustifyRight",l:"JustifyLeft",j:"JustifyFull",q:"mceBlockQuote",u:"InsertUnorderedList",o:"InsertOrderedList",s:"unlink",m:"WP_Medialib",z:"WP_Adv",t:"WP_More",d:"Strikethrough",h:"WP_Help",p:"WP_Page",x:"WP_Code"},function(a,c){b.shortcuts.add("access+"+c,"",a)}),b.addShortcut("meta+s","",function(){k&&k.autosave&&k.autosave.server.triggerSave()}),window.getUserSetting("editor_plain_text_paste_warning")>1&&(b.settings.paste_plaintext_inform=!1)}),b.on("PastePlainTextToggle",function(a){if(a.state===!0){var b=parseInt(window.getUserSetting("editor_plain_text_paste_warning"),10)||0;2>b&&window.setUserSetting("editor_plain_text_paste_warning",++b)}}),b.on("preinit",function(){function c(c,d){function e(){if(!f)return this;var b,c,d=window.pageXOffset||document.documentElement.scrollLeft,e=window.pageYOffset||document.documentElement.scrollTop,h=window.innerWidth,i=window.innerHeight,m=q?q.getBoundingClientRect():{top:0,right:h,bottom:i,left:0,width:h,height:i},n=this.getEl(),o=n.offsetWidth,r=n.offsetHeight,s=f.getBoundingClientRect(),t=(s.left+s.right)/2,u=5,v=8,w=r+v+u,x=p?p.getBoundingClientRect().bottom:0,y=j?j.getBoundingClientRect().bottom:0,z=k?i-k.getBoundingClientRect().top:0,A=l?i-l.getBoundingClientRect().top:0,B=Math.max(0,x,y,m.top),C=Math.max(0,z,A,i-m.bottom),D=s.top+m.top-B,E=i-m.top-s.bottom-C,F=i-B-C,G="",H=0,I=0;return D>=F||E>=F?(this.scrolling=!0,this.hide(),this.scrolling=!1,this):(a.Env.iOS&&"IMG"===f.nodeName&&(H=54,I=46),this.bottom?E>=w?(G=" mce-arrow-up",b=s.bottom+m.top+e-I):D>=w&&(G=" mce-arrow-down",b=s.top+m.top+e-r-v+H):D>=w?(G=" mce-arrow-down",b=s.top+m.top+e-r-v+H):E>=w&&F/2>s.bottom+m.top-B&&(G=" mce-arrow-up",b=s.bottom+m.top+e-I),"undefined"==typeof b&&(b=e+B+u+I),c=t-o/2+m.left+d,s.left<0||s.right>m.width?c=m.left+d+(m.width-o)/2:o>=h?(G+=" mce-arrow-full",c=0):0>c&&s.left+o>h||c+o>h&&s.right-o<0?c=(h-o)/2:c<m.left+d?(G+=" mce-arrow-left",c=s.left+m.left+d):c+o>m.width+m.left+d&&(G+=" mce-arrow-right",c=s.right-o+m.left+d),a.Env.iOS&&"IMG"===f.nodeName&&(G=G.replace(/ ?mce-arrow-(up|down)/g,"")),n.className=n.className.replace(/ ?mce-arrow-[\w]+/g,"")+G,g.setStyles(n,{left:c,top:b}),this)}var i,o,r=[];return h(c,function(a){function c(){var c=b.selection;"bullist"===d&&c.selectorChanged("ul > li",function(b,c){for(var d,e=c.parents.length;e--&&(d=c.parents[e].nodeName,"OL"!==d&&"UL"!=d););a.active(b&&"UL"===d)}),"numlist"===d&&c.selectorChanged("ol > li",function(b,c){for(var d,e=c.parents.length;e--&&(d=c.parents[e].nodeName,"OL"!==d&&"UL"!==d););a.active(b&&"OL"===d)}),a.settings.stateSelector&&c.selectorChanged(a.settings.stateSelector,function(b){a.active(b)},!0),a.settings.disabledStateSelector&&c.selectorChanged(a.settings.disabledStateSelector,function(b){a.disabled(b)})}var d;"|"===a?o=null:m.has(a)?(a={type:a},n.toolbar_items_size&&(a.size=n.toolbar_items_size),r.push(a),o=null):(o||(o={type:"buttongroup",items:[]},r.push(o)),b.buttons[a]&&(d=a,a=b.buttons[d],"function"==typeof a&&(a=a()),a.type=a.type||"button",n.toolbar_items_size&&(a.size=n.toolbar_items_size),a=m.create(a),o.items.push(a),b.initialized?c():b.on("init",c)))}),i=m.create({type:"panel",layout:"stack",classes:"toolbar-grp inline-toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:[{type:"toolbar",layout:"flow",items:r}]}),i.bottom=d,i.on("show",function(){this.reposition()}),i.on("keydown",function(a){27===a.keyCode&&(this.hide(),b.focus())}),b.on("remove",function(){i.remove()}),i.reposition=e,i.hide().renderTo(document.body),i}function d(a){e&&(e.tempHide||"hide"===a.type?(e.hide(),e=!1):"resizewindow"!==a.type&&"scrollwindow"!==a.type&&"resize"!==a.type&&"scroll"!==a.type||e.blockHide||(clearTimeout(i),i=setTimeout(function(){e&&"function"==typeof e.show&&(e.scrolling=!1,e.show())},250),e.scrolling=!0,e.hide()))}var e,f,i,j,k,l,m=a.ui.Factory,n=b.settings,o=b.getContainer(),p=document.getElementById("wpadminbar"),q=document.getElementById(b.id+"_ifr");o&&(j=a.$(".mce-toolbar-grp",o)[0],k=a.$(".mce-statusbar",o)[0]),"content"===b.id&&(l=document.getElementById("post-status-info")),b.shortcuts.add("alt+119","",function(){var a;e&&(a=e.find("toolbar")[0],a&&a.focus(!0))}),b.on("nodechange",function(a){var c=b.selection.isCollapsed(),d={element:a.element,parents:a.parents,collapsed:c};b.fire("wptoolbar",d),f=d.selection||d.element,e&&e!==d.toolbar&&e.hide(),d.toolbar?e!==d.toolbar?(e=d.toolbar,e.show()):e.reposition():e=!1}),b.on("focus",function(){e&&e.show()}),b.on("resizewindow scrollwindow",d),b.dom.bind(b.getWin(),"resize scroll",d),b.on("remove",function(){b.off("resizewindow scrollwindow",d),b.dom.unbind(b.getWin(),"resize scroll",d)}),b.on("blur hide",d),b.wp=b.wp||{},b.wp._createToolbar=c},!0),{_showButtons:d,_hideButtons:d,_setEmbed:d,_getEmbed:d}})}(window.tinymce);
\ No newline at end of file
+!function(a){a.ui.FloatPanel.zIndex=100100,a.PluginManager.add("wordpress",function(b){function c(c){var d,f,i,j=0;f="hide"===c,b.theme.panel&&(i=b.theme.panel.find(".toolbar:not(.menubar)")),!i||i.length<2||"hide"===c&&!i[1].visible()||(!c&&i[1].visible()&&(c="hide"),h(i,function(a,b){b>0&&("hide"===c?(a.hide(),j+=30):(a.show(),j-=30))}),j&&!f&&(a.Env.iOS||(d=b.getContentAreaContainer().firstChild,g.setStyle(d,"height",d.clientHeight+j)),"hide"===c?(setUserSetting("hidetb","0"),e&&e.active(!1)):(setUserSetting("hidetb","1"),e&&e.active(!0))),b.fire("wp-toolbar-toggle"))}function d(){}var e,f,g=a.DOM,h=a.each,i=b.editorManager.i18n.translate,j=window.jQuery,k=window.wp,l=k&&k.editor&&k.editor.autop&&b.getParam("wpautop",!0);return j&&j(document).triggerHandler("tinymce-editor-setup",[b]),b.addButton("wp_adv",{tooltip:"Toolbar Toggle",cmd:"WP_Adv",onPostRender:function(){e=this,e.active("1"===getUserSetting("hidetb"))}}),b.on("PostRender",function(){b.getParam("wordpress_adv_hidden",!0)&&"0"===getUserSetting("hidetb","0")&&c("hide")}),b.addCommand("WP_Adv",function(){c()}),b.on("focus",function(){window.wpActiveEditor=b.id}),b.on("BeforeSetContent",function(b){var c;b.content&&(b.content.indexOf("<!--more")!==-1&&(c=i("Read more..."),b.content=b.content.replace(/<!--more(.*?)-->/g,function(b,d){return'<img src="'+a.Env.transparentSrc+'" data-wp-more="more" data-wp-more-text="'+d+'" class="wp-more-tag mce-wp-more" alt="" title="'+c+'" data-mce-resize="false" data-mce-placeholder="1" />'})),b.content.indexOf("<!--nextpage-->")!==-1&&(c=i("Page break"),b.content=b.content.replace(/<!--nextpage-->/g,'<img src="'+a.Env.transparentSrc+'" data-wp-more="nextpage" class="wp-more-tag mce-wp-nextpage" alt="" title="'+c+'" data-mce-resize="false" data-mce-placeholder="1" />')),b.load&&"raw"!==b.format&&l&&(b.content=k.editor.autop(b.content)),b.content.indexOf("<script")===-1&&b.content.indexOf("<style")===-1||(b.content=b.content.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g,function(b,c){return'<img src="'+a.Env.transparentSrc+'" data-wp-preserve="'+encodeURIComponent(b)+'" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="&lt;'+c+'&gt;" title="&lt;'+c+'&gt;" />'})),b.content=b.content.replace(/<p>([^<>]+)<\/p>/gi,function(a,b){return/^(&nbsp;|\s|\u00a0|\ufeff)+$/i.test(b)?"<p><br /></p>":a}))}),b.on("PostProcess",function(a){a.get&&(a.content=a.content.replace(/<img[^>]+>/g,function(a){var b,c,d="";return a.indexOf('data-wp-more="more"')!==-1?((b=a.match(/data-wp-more-text="([^"]+)"/))&&(d=b[1]),c="<!--more"+d+"-->"):a.indexOf('data-wp-more="nextpage"')!==-1?c="<!--nextpage-->":a.indexOf("data-wp-preserve")!==-1&&(b=a.match(/ data-wp-preserve="([^"]+)"/))&&(c=decodeURIComponent(b[1])),c||a}))}),b.on("ResolveName",function(a){var c;"IMG"===a.target.nodeName&&(c=b.dom.getAttrib(a.target,"data-wp-more"))&&(a.name=c)}),b.addCommand("WP_More",function(c){var d,e,f,g="wp-more-tag",h=b.dom,j=b.selection.getNode();return c=c||"more",g+=" mce-wp-"+c,f="more"===c?"Read more...":"Next page",f=i(f),e='<img src="'+a.Env.transparentSrc+'" alt="" title="'+f+'" class="'+g+'" data-wp-more="'+c+'" data-mce-resize="false" data-mce-placeholder="1" />',"BODY"===j.nodeName||"P"===j.nodeName&&"BODY"===j.parentNode.nodeName?void b.insertContent(e):(d=h.getParent(j,function(a){return!(!a.parentNode||"BODY"!==a.parentNode.nodeName)},b.getBody()),void(d&&("P"===d.nodeName?d.appendChild(h.create("p",null,e).firstChild):h.insertAfter(h.create("p",null,e),d),b.nodeChanged())))}),b.addCommand("WP_Code",function(){b.formatter.toggle("code")}),b.addCommand("WP_Page",function(){b.execCommand("WP_More","nextpage")}),b.addCommand("WP_Help",function(){function c(a){var b="<tr>";return h(a,function(a,c){b+=a?"<td><kbd>"+c+"</kbd></td><td>"+i(a)+"</td>":"<td></td><td></td>"}),b+"</tr>"}var d,e,f,g,j=i(a.Env.mac?"Ctrl + Alt + letter:":"Shift + Alt + letter:"),k=i(a.Env.mac?"Cmd + letter:":"Ctrl + letter:"),l=[],m=[];h([{c:"Copy",x:"Cut"},{v:"Paste",a:"Select all"},{z:"Undo",y:"Redo"},{b:"Bold",i:"Italic"},{u:"Underline",k:"Insert/edit link"}],function(a){l.push(c(a))}),h([{1:"Heading 1",2:"Heading 2"},{3:"Heading 3",4:"Heading 4"},{5:"Heading 5",6:"Heading 6"},{l:"Align left",c:"Align center"},{r:"Align right",j:"Justify"},{d:"Strikethrough",q:"Blockquote"},{u:"Bullet list",o:"Numbered list"},{a:"Insert/edit link",s:"Remove link"},{m:"Insert/edit image",t:"Insert Read More tag"},{h:"Keyboard Shortcuts",x:"Code"},{p:"Insert Page Break tag",w:"Distraction-free writing mode"}],function(a){m.push(c(a))}),d=[i("Letter"),i("Action"),i("Letter"),i("Action")],d="<tr><th>"+d.join("</th><th>")+"</th></tr>",e='<div class="wp-editor-help">',e=e+"<h2>"+i("Default shortcuts,")+" "+k+'</h2><table class="wp-help-th-center fixed">'+d+l.join("")+"</table><h2>"+i("Additional shortcuts,")+" "+j+'</h2><table class="wp-help-th-center fixed">'+d+m.join("")+"</table>",b.plugins.wptextpattern&&(!a.Env.ie||a.Env.ie>8)&&(e=e+"<h2>"+i("When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.")+'</h2><table class="wp-help-th-center fixed">'+c({"*":"Bullet list","1.":"Numbered list"})+c({"-":"Bullet list","1)":"Numbered list"})+"</table>",e=e+"<h2>"+i("The following formatting shortcuts are replaced when pressing Enter. Press Escape or the Undo button to undo.")+'</h2><table class="wp-help-single">'+c({">":"Blockquote"})+c({"##":"Heading 2"})+c({"###":"Heading 3"})+c({"####":"Heading 4"})+c({"#####":"Heading 5"})+c({"######":"Heading 6"})+c({"---":"Horizontal line"})+"</table>"),e=e+"<h2>"+i("Focus shortcuts:")+'</h2><table class="wp-help-single">'+c({"Alt + F8":"Inline toolbar (when an image, link or preview is selected)"})+c({"Alt + F9":"Editor menu (when enabled)"})+c({"Alt + F10":"Editor toolbar"})+c({"Alt + F11":"Elements path"})+"</table><p>"+i("To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.")+"</p>",e+="</div>",f=b.windowManager.open({title:"Keyboard Shortcuts",items:{type:"container",classes:"wp-help",html:e},buttons:{text:"Close",onclick:"close"}}),f.$el&&(f.$el.find('div[role="application"]').attr("role","document"),g=f.$el.find(".mce-wp-help"),g[0]&&(g.attr("tabindex","0"),g[0].focus(),g.on("keydown",function(a){a.keyCode>=33&&a.keyCode<=40&&a.stopPropagation()})))}),b.addCommand("WP_Medialib",function(){k&&k.media&&k.media.editor&&k.media.editor.open(b.id)}),b.addButton("wp_more",{tooltip:"Insert Read More tag",onclick:function(){b.execCommand("WP_More","more")}}),b.addButton("wp_page",{tooltip:"Page break",onclick:function(){b.execCommand("WP_More","nextpage")}}),b.addButton("wp_help",{tooltip:"Keyboard Shortcuts",cmd:"WP_Help"}),b.addButton("wp_code",{tooltip:"Code",cmd:"WP_Code",stateSelector:"code"}),k&&k.media&&k.media.editor&&b.addMenuItem("add_media",{text:"Add Media",icon:"wp-media-library",context:"insert",cmd:"WP_Medialib"}),b.addMenuItem("wp_more",{text:"Insert Read More tag",icon:"wp_more",context:"insert",onclick:function(){b.execCommand("WP_More","more")}}),b.addMenuItem("wp_page",{text:"Page break",icon:"wp_page",context:"insert",onclick:function(){b.execCommand("WP_More","nextpage")}}),b.on("BeforeExecCommand",function(c){!a.Env.webkit||"InsertUnorderedList"!==c.command&&"InsertOrderedList"!==c.command||(f||(f=b.dom.create("style",{type:"text/css"},"#tinymce,#tinymce span,#tinymce li,#tinymce li>span,#tinymce p,#tinymce p>span{font:medium sans-serif;color:#000;line-height:normal;}")),b.getDoc().head.appendChild(f))}),b.on("ExecCommand",function(c){a.Env.webkit&&f&&("InsertUnorderedList"===c.command||"InsertOrderedList"===c.command)&&b.dom.remove(f)}),b.on("init",function(){var c=a.Env,d=["mceContentBody"],e=b.getDoc(),f=b.dom;c.iOS&&f.addClass(e.documentElement,"ios"),"rtl"===b.getParam("directionality")&&(d.push("rtl"),f.setAttrib(e.documentElement,"dir","rtl")),f.setAttrib(e.documentElement,"lang",b.getParam("wp_lang_attr")),c.ie?9===parseInt(c.ie,10)?d.push("ie9"):8===parseInt(c.ie,10)?d.push("ie8"):c.ie<8&&d.push("ie7"):c.webkit&&d.push("webkit"),d.push("wp-editor"),h(d,function(a){a&&f.addClass(e.body,a)}),b.on("BeforeSetContent",function(a){a.content&&(a.content=a.content.replace(/<p>\s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre)( [^>]*)?>/gi,"<$1$2>").replace(/<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre)>\s*<\/p>/gi,"</$1>"))}),j&&j(document).triggerHandler("tinymce-editor-init",[b]),window.tinyMCEPreInit&&window.tinyMCEPreInit.dragDropUpload&&f.bind(e,"dragstart dragend dragover drop",function(a){j&&j(document).trigger(new j.Event(a))}),b.getParam("wp_paste_filters",!0)&&(b.on("PastePreProcess",function(b){b.content=b.content.replace(/<br class="?Apple-interchange-newline"?>/gi,""),a.Env.webkit||(b.content=b.content.replace(/(<[^>]+) style="[^"]*"([^>]*>)/gi,"$1$2"),b.content=b.content.replace(/(<[^>]+) data-mce-style=([^>]+>)/gi,"$1 style=$2"))}),b.on("PastePostProcess",function(a){h(f.select("p",a.node),function(a){f.isEmpty(a)&&f.remove(a)})}))}),b.on("SaveContent",function(a){return!b.inline&&b.isHidden()?void(a.content=a.element.value):(a.content=a.content.replace(/<p>(?:<br ?\/?>|\u00a0|\uFEFF| )*<\/p>/g,"<p>&nbsp;</p>"),void(l&&(a.content=k.editor.removep(a.content))))}),b.on("preInit",function(){var c="@[id|accesskey|class|dir|lang|style|tabindex|title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],i,b,script[src|async|defer|type|charset|crossorigin|integrity]";b.schema.addValidElements(c),a.Env.iOS&&(b.settings.height=300),h({c:"JustifyCenter",r:"JustifyRight",l:"JustifyLeft",j:"JustifyFull",q:"mceBlockQuote",u:"InsertUnorderedList",o:"InsertOrderedList",m:"WP_Medialib",z:"WP_Adv",t:"WP_More",d:"Strikethrough",h:"WP_Help",p:"WP_Page",x:"WP_Code"},function(a,c){b.shortcuts.add("access+"+c,"",a)}),b.addShortcut("meta+s","",function(){k&&k.autosave&&k.autosave.server.triggerSave()}),window.getUserSetting("editor_plain_text_paste_warning")>1&&(b.settings.paste_plaintext_inform=!1),a.Env.mac&&a.$(b.iframeElement).attr("title",i("Rich Text Area. Press Control-Option-H for help."))}),b.on("PastePlainTextToggle",function(a){if(a.state===!0){var b=parseInt(window.getUserSetting("editor_plain_text_paste_warning"),10)||0;b<2&&window.setUserSetting("editor_plain_text_paste_warning",++b)}}),b.on("preinit",function(){function c(c,d){function e(){if(!f)return this;var b,c,d=window.pageXOffset||document.documentElement.scrollLeft,e=window.pageYOffset||document.documentElement.scrollTop,h=window.innerWidth,i=window.innerHeight,m=q?q.getBoundingClientRect():{top:0,right:h,bottom:i,left:0,width:h,height:i},n=this.getEl(),o=n.offsetWidth,r=n.clientHeight,s=f.getBoundingClientRect(),t=(s.left+s.right)/2,u=5,v=r+u,w=p?p.getBoundingClientRect().bottom:0,x=j?j.getBoundingClientRect().bottom:0,y=k?i-k.getBoundingClientRect().top:0,z=l?i-l.getBoundingClientRect().top:0,A=Math.max(0,w,x,m.top),B=Math.max(0,y,z,i-m.bottom),C=s.top+m.top-A,D=i-m.top-s.bottom-B,E=i-A-B,F="",G=0,H=0;return C>=E||D>=E?(this.scrolling=!0,this.hide(),this.scrolling=!1,this):(a.Env.iOS&&"IMG"===f.nodeName&&(G=54,H=46),this.bottom?D>=v?(F=" mce-arrow-up",b=s.bottom+m.top+e-H):C>=v&&(F=" mce-arrow-down",b=s.top+m.top+e-r+G):C>=v?(F=" mce-arrow-down",b=s.top+m.top+e-r+G):D>=v&&E/2>s.bottom+m.top-A&&(F=" mce-arrow-up",b=s.bottom+m.top+e-H),"undefined"==typeof b&&(b=e+A+u+H),c=t-o/2+m.left+d,s.left<0||s.right>m.width?c=m.left+d+(m.width-o)/2:o>=h?(F+=" mce-arrow-full",c=0):c<0&&s.left+o>h||c+o>h&&s.right-o<0?c=(h-o)/2:c<m.left+d?(F+=" mce-arrow-left",c=s.left+m.left+d):c+o>m.width+m.left+d&&(F+=" mce-arrow-right",c=s.right-o+m.left+d),a.Env.iOS&&"IMG"===f.nodeName&&(F=F.replace(/ ?mce-arrow-(up|down)/g,"")),n.className=n.className.replace(/ ?mce-arrow-[\w]+/g,"")+F,g.setStyles(n,{left:c,top:b}),this)}var i,o,r=[];return h(c,function(a){function c(){var c=b.selection;"bullist"===d&&c.selectorChanged("ul > li",function(b,c){for(var d,e=c.parents.length;e--&&(d=c.parents[e].nodeName,"OL"!==d&&"UL"!=d););a.active(b&&"UL"===d)}),"numlist"===d&&c.selectorChanged("ol > li",function(b,c){for(var d,e=c.parents.length;e--&&(d=c.parents[e].nodeName,"OL"!==d&&"UL"!==d););a.active(b&&"OL"===d)}),a.settings.stateSelector&&c.selectorChanged(a.settings.stateSelector,function(b){a.active(b)},!0),a.settings.disabledStateSelector&&c.selectorChanged(a.settings.disabledStateSelector,function(b){a.disabled(b)})}var d;"|"===a?o=null:m.has(a)?(a={type:a},n.toolbar_items_size&&(a.size=n.toolbar_items_size),r.push(a),o=null):(o||(o={type:"buttongroup",items:[]},r.push(o)),b.buttons[a]&&(d=a,a=b.buttons[d],"function"==typeof a&&(a=a()),a.type=a.type||"button",n.toolbar_items_size&&(a.size=n.toolbar_items_size),a=m.create(a),o.items.push(a),b.initialized?c():b.on("init",c)))}),i=m.create({type:"panel",layout:"stack",classes:"toolbar-grp inline-toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:[{type:"toolbar",layout:"flow",items:r}]}),i.bottom=d,i.on("show",function(){this.reposition()}),i.on("keydown",function(a){27===a.keyCode&&(this.hide(),b.focus())}),b.on("remove",function(){i.remove()}),i.reposition=e,i.hide().renderTo(document.body),i}function d(a){e&&(e.tempHide||"hide"===a.type?(e.hide(),e=!1):"resizewindow"!==a.type&&"scrollwindow"!==a.type&&"resize"!==a.type&&"scroll"!==a.type||e.blockHide||(clearTimeout(i),i=setTimeout(function(){e&&"function"==typeof e.show&&(e.scrolling=!1,e.show())},250),e.scrolling=!0,e.hide()))}var e,f,i,j,k,l,m=a.ui.Factory,n=b.settings,o=b.getContainer(),p=document.getElementById("wpadminbar"),q=document.getElementById(b.id+"_ifr");o&&(j=a.$(".mce-toolbar-grp",o)[0],k=a.$(".mce-statusbar",o)[0]),"content"===b.id&&(l=document.getElementById("post-status-info")),b.shortcuts.add("alt+119","",function(){var a;e&&(a=e.find("toolbar")[0],a&&a.focus(!0))}),b.on("nodechange",function(a){var c=b.selection.isCollapsed(),d={element:a.element,parents:a.parents,collapsed:c};b.fire("wptoolbar",d),f=d.selection||d.element,e&&e!==d.toolbar&&e.hide(),d.toolbar?e!==d.toolbar?(e=d.toolbar,e.show()):e.reposition():e=!1}),b.on("focus",function(){e&&e.show()}),b.on("resizewindow scrollwindow",d),b.dom.bind(b.getWin(),"resize scroll",d),b.on("remove",function(){b.off("resizewindow scrollwindow",d),b.dom.unbind(b.getWin(),"resize scroll",d)}),b.on("blur hide",d),b.wp=b.wp||{},b.wp._createToolbar=c},!0),{_showButtons:d,_hideButtons:d,_setEmbed:d,_getEmbed:d}})}(window.tinymce);
\ No newline at end of file
index 6970a9c2406bcc2e6cfa37ea93358737b6cdf631..4bfc165fd2ae0adf605b8eb2421584d5198eb5e2 100644 (file)
@@ -1 +1 @@
-tinymce.PluginManager.add("wpautoresize",function(a){function b(){return a.plugins.fullscreen&&a.plugins.fullscreen.isFullscreen()}function c(a){return parseInt(a,10)||0}function d(e){var f,g,k,l,m,n,o,p,q,r,s,t,u=tinymce.DOM;if(j&&(g=a.getDoc())){if(e=e||{},k=g.body,l=g.documentElement,m=h.autoresize_min_height,!k||e&&"setcontent"===e.type&&e.initial||b())return void(k&&l&&(k.style.overflowY="auto",l.style.overflowY="auto"));o=a.dom.getStyle(k,"margin-top",!0),p=a.dom.getStyle(k,"margin-bottom",!0),q=a.dom.getStyle(k,"padding-top",!0),r=a.dom.getStyle(k,"padding-bottom",!0),s=a.dom.getStyle(k,"border-top-width",!0),t=a.dom.getStyle(k,"border-bottom-width",!0),n=k.offsetHeight+c(o)+c(p)+c(q)+c(r)+c(s)+c(t),n&&n<l.offsetHeight&&(n=l.offsetHeight),(isNaN(n)||0>=n)&&(n=tinymce.Env.ie?k.scrollHeight:tinymce.Env.webkit&&0===k.clientHeight?0:k.offsetHeight),n>h.autoresize_min_height&&(m=n),h.autoresize_max_height&&n>h.autoresize_max_height?(m=h.autoresize_max_height,k.style.overflowY="auto",l.style.overflowY="auto"):(k.style.overflowY="hidden",l.style.overflowY="hidden",k.scrollTop=0),m!==i&&(f=m-i,u.setStyle(a.iframeElement,"height",m+"px"),i=m,tinymce.isWebKit&&0>f&&d(e),a.fire("wp-autoresize",{height:m,deltaHeight:"nodechange"===e.type?f:null}))}}function e(a,b,c){setTimeout(function(){d(),a--?e(a,b,c):c&&c()},b)}function f(){a.dom.hasClass(a.getBody(),"wp-autoresize")||(j=!0,a.dom.addClass(a.getBody(),"wp-autoresize"),a.on("nodechange setcontent keyup FullscreenStateChanged",d),d())}function g(){var b;h.wp_autoresize_on||(j=!1,b=a.getDoc(),a.dom.removeClass(a.getBody(),"wp-autoresize"),a.off("nodechange setcontent keyup FullscreenStateChanged",d),b.body.style.overflowY="auto",b.documentElement.style.overflowY="auto",i=0)}var h=a.settings,i=300,j=!1;a.settings.inline||tinymce.Env.iOS||(h.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight),10),h.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0),10),h.wp_autoresize_on&&(j=!0,a.on("init",function(){a.dom.addClass(a.getBody(),"wp-autoresize")}),a.on("nodechange keyup FullscreenStateChanged",d),a.on("setcontent",function(){e(3,100)}),a.getParam("autoresize_on_init",!0)&&a.on("init",function(){e(10,200,function(){e(5,1e3)})})),a.on("show",function(){i=0}),a.addCommand("wpAutoResize",d),a.addCommand("wpAutoResizeOn",f),a.addCommand("wpAutoResizeOff",g))});
\ No newline at end of file
+tinymce.PluginManager.add("wpautoresize",function(a){function b(){return a.plugins.fullscreen&&a.plugins.fullscreen.isFullscreen()}function c(a){return parseInt(a,10)||0}function d(e){var f,g,k,l,m,n,o,p,q,r,s,t,u=tinymce.DOM;if(j&&(g=a.getDoc())){if(e=e||{},k=g.body,l=g.documentElement,m=h.autoresize_min_height,!k||e&&"setcontent"===e.type&&e.initial||b())return void(k&&l&&(k.style.overflowY="auto",l.style.overflowY="auto"));o=a.dom.getStyle(k,"margin-top",!0),p=a.dom.getStyle(k,"margin-bottom",!0),q=a.dom.getStyle(k,"padding-top",!0),r=a.dom.getStyle(k,"padding-bottom",!0),s=a.dom.getStyle(k,"border-top-width",!0),t=a.dom.getStyle(k,"border-bottom-width",!0),n=k.offsetHeight+c(o)+c(p)+c(q)+c(r)+c(s)+c(t),n&&n<l.offsetHeight&&(n=l.offsetHeight),(isNaN(n)||n<=0)&&(n=tinymce.Env.ie?k.scrollHeight:tinymce.Env.webkit&&0===k.clientHeight?0:k.offsetHeight),n>h.autoresize_min_height&&(m=n),h.autoresize_max_height&&n>h.autoresize_max_height?(m=h.autoresize_max_height,k.style.overflowY="auto",l.style.overflowY="auto"):(k.style.overflowY="hidden",l.style.overflowY="hidden",k.scrollTop=0),m!==i&&(f=m-i,u.setStyle(a.iframeElement,"height",m+"px"),i=m,tinymce.isWebKit&&f<0&&d(e),a.fire("wp-autoresize",{height:m,deltaHeight:"nodechange"===e.type?f:null}))}}function e(a,b,c){setTimeout(function(){d(),a--?e(a,b,c):c&&c()},b)}function f(){a.dom.hasClass(a.getBody(),"wp-autoresize")||(j=!0,a.dom.addClass(a.getBody(),"wp-autoresize"),a.on("nodechange setcontent keyup FullscreenStateChanged",d),d())}function g(){var b;h.wp_autoresize_on||(j=!1,b=a.getDoc(),a.dom.removeClass(a.getBody(),"wp-autoresize"),a.off("nodechange setcontent keyup FullscreenStateChanged",d),b.body.style.overflowY="auto",b.documentElement.style.overflowY="auto",i=0)}var h=a.settings,i=300,j=!1;a.settings.inline||tinymce.Env.iOS||(h.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight),10),h.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0),10),h.wp_autoresize_on&&(j=!0,a.on("init",function(){a.dom.addClass(a.getBody(),"wp-autoresize")}),a.on("nodechange keyup FullscreenStateChanged",d),a.on("setcontent",function(){e(3,100)}),a.getParam("autoresize_on_init",!0)&&a.on("init",function(){e(10,200,function(){e(5,1e3)})})),a.on("show",function(){i=0}),a.addCommand("wpAutoResize",d),a.addCommand("wpAutoResizeOn",f),a.addCommand("wpAutoResizeOff",g))});
\ No newline at end of file
index 50045e79507afb7a97258efa24d7cc2ce058583b..890da1c2c8828a9205cc88d94cb70842fbfb0615 100644 (file)
@@ -79,24 +79,27 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
                }
        } );
 
+       function isNonEditable( node ) {
+               var parent = editor.$( node ).parents( '[contenteditable]' );
+               return parent && parent.attr( 'contenteditable' ) === 'false';
+       }
+
        // Safari on iOS fails to select images in contentEditoble mode on touch.
        // Select them again.
        if ( iOS ) {
                editor.on( 'init', function() {
                        editor.on( 'touchstart', function( event ) {
-                               if ( event.target.nodeName === 'IMG' ) {
+                               if ( event.target.nodeName === 'IMG' && ! isNonEditable( event.target ) ) {
                                        touchOnImage = true;
                                }
                        });
 
-                       editor.dom.bind( editor.getDoc(), 'touchmove', function( event ) {
-                               if ( event.target.nodeName === 'IMG' ) {
-                                       touchOnImage = false;
-                               }
+                       editor.dom.bind( editor.getDoc(), 'touchmove', function() {
+                               touchOnImage = false;
                        });
 
                        editor.on( 'touchend', function( event ) {
-                               if ( touchOnImage && event.target.nodeName === 'IMG' ) {
+                               if ( touchOnImage && event.target.nodeName === 'IMG' && ! isNonEditable( event.target ) ) {
                                        var node = event.target;
 
                                        touchOnImage = false;
@@ -104,7 +107,7 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
                                        window.setTimeout( function() {
                                                editor.selection.select( node );
                                                editor.nodeChanged();
-                                       }, 200 );
+                                       }, 100 );
                                } else if ( toolbar ) {
                                        toolbar.hide();
                                }
index 77624ee740559dd946d9f86f23de8f6eff9edba2..8193b11ee302a147b0e9abd433066334c3aed208 100644 (file)
@@ -1 +1 @@
-tinymce.PluginManager.add("wpeditimage",function(a){function b(b){return!(!a.dom.getAttrib(b,"data-mce-placeholder")&&!a.dom.getAttrib(b,"data-mce-object"))}function c(b){return b.replace(/(?:<p>)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g,function(b,c,d){var e,f,g,h,i,j;return e=c.match(/id=['"]([^'"]*)['"] ?/),e&&(c=c.replace(e[0],"")),f=c.match(/align=['"]([^'"]*)['"] ?/),f&&(c=c.replace(f[0],"")),g=c.match(/class=['"]([^'"]*)['"] ?/),g&&(c=c.replace(g[0],"")),j=c.match(/width=['"]([0-9]*)['"] ?/),j&&(c=c.replace(j[0],"")),d=o(d),i=d.match(/((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)([\s\S]*)/i),i&&i[2]?(h=o(i[2]),i=o(i[1])):(h=o(c).replace(/caption=['"]/,"").replace(/['"]$/,""),i=d),e=e&&e[1]?e[1].replace(/[<>&]+/g,""):"",f=f&&f[1]?f[1]:"alignnone",g=g&&g[1]?" "+g[1].replace(/[<>&]+/g,""):"",!j&&i&&(j=i.match(/width=['"]([0-9]*)['"]/)),j&&j[1]&&(j=j[1]),j&&h?(j=parseInt(j,10),a.getParam("wpeditimage_html5_captions")||(j+=10),'<div class="mceTemp"><dl id="'+e+'" class="wp-caption '+f+g+'" style="width: '+j+'px"><dt class="wp-caption-dt">'+i+'</dt><dd class="wp-caption-dd">'+h+"</dd></dl></div>"):d})}function d(a){return a.replace(/(?:<div [^>]+mceTemp[^>]+>)?\s*(<dl [^>]+wp-caption[^>]+>[\s\S]+?<\/dl>)\s*(?:<\/div>)?/g,function(a,b){var c="";return-1===b.indexOf("<img ")?(c=b.match(/<dd [^>]+>([\s\S]+?)<\/dd>/i),c&&c[1]?"<p>"+c[1]+"</p>":""):(c=b.replace(/\s*<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>\s*/gi,function(a,b,c,d){var e,f,g,h;return h=c.match(/width="([0-9]*)"/),h=h&&h[1]?h[1]:"",f=b.match(/class="([^"]*)"/),f=f&&f[1]?f[1]:"",g=f.match(/align[a-z]+/i)||"alignnone",h&&d?(e=b.match(/id="([^"]*)"/),e=e&&e[1]?e[1]:"",f=f.replace(/wp-caption ?|align[a-z]+ ?/gi,""),f&&(f=' class="'+f+'"'),d=d.replace(/\r\n|\r/g,"\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),d=d.replace(/\s*\n\s*/g,"<br />"),'[caption id="'+e+'" align="'+g+'" width="'+h+'"'+f+"]"+c+" "+d+"[/caption]"):("alignnone"!==g[0]&&(c=c.replace(/><img/,' class="'+g[0]+'"><img')),c)}),-1===c.indexOf("[caption")&&(c=b.replace(/[\s\S]*?((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)(<p>[\s\S]*<\/p>)?[\s\S]*/gi,"<p>$1</p>$2")),c)})}function e(b){var c,d,e,f,g,h,i,j,k=[],l=a.dom,m=/^\d+$/;return e={attachment_id:!1,size:"custom",caption:"",align:"none",extraClasses:"",link:!1,linkUrl:"",linkClassName:"",linkTargetBlank:!1,linkRel:"",title:""},e.url=l.getAttrib(b,"src"),e.alt=l.getAttrib(b,"alt"),e.title=l.getAttrib(b,"title"),i=l.getAttrib(b,"width"),j=l.getAttrib(b,"height"),(!m.test(i)||parseInt(i,10)<1)&&(i=b.naturalWidth||b.width),(!m.test(j)||parseInt(j,10)<1)&&(j=b.naturalHeight||b.height),e.customWidth=e.width=i,e.customHeight=e.height=j,c=tinymce.explode(b.className," "),d=[],tinymce.each(c,function(a){/^wp-image/.test(a)?e.attachment_id=parseInt(a.replace("wp-image-",""),10):/^align/.test(a)?e.align=a.replace("align",""):/^size/.test(a)?e.size=a.replace("size-",""):d.push(a)}),e.extraClasses=d.join(" "),f=l.getParents(b,".wp-caption"),f.length&&(f=f[0],c=f.className.split(" "),tinymce.each(c,function(a){/^align/.test(a)?e.align=a.replace("align",""):a&&"wp-caption"!==a&&k.push(a)}),e.captionClassName=k.join(" "),g=l.select("dd.wp-caption-dd",f),g.length&&(g=g[0],e.caption=a.serializer.serialize(g).replace(/<br[^>]*>/g,"$&\n").replace(/^<p>/,"").replace(/<\/p>$/,""))),b.parentNode&&"A"===b.parentNode.nodeName&&(h=b.parentNode,e.linkUrl=l.getAttrib(h,"href"),e.linkTargetBlank="_blank"===l.getAttrib(h,"target")?!0:!1,e.linkRel=l.getAttrib(h,"rel"),e.linkClassName=h.className),e}function f(a){return a&&!(!a.textContent&&!a.innerText)}function g(b){return!b||-1===b.indexOf("<")&&-1===b.indexOf(">")?b:(l||(l=new tinymce.html.Serializer({},a.schema)),l.serialize(a.parser.parse(b,{forced_root_block:!1})))}function h(b,c){var d,e,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=a.dom;d=tinymce.explode(c.extraClasses," "),d||(d=[]),c.caption||d.push("align"+c.align),c.attachment_id&&(d.push("wp-image-"+c.attachment_id),c.size&&"custom"!==c.size&&d.push("size-"+c.size)),s=c.width,t=c.height,"custom"===c.size&&(s=c.customWidth,t=c.customHeight),q={src:c.url,width:s||null,height:t||null,alt:c.alt,title:c.title||null,"class":d.join(" ")||null},y.setAttribs(b,q),r={href:c.linkUrl,rel:c.linkRel||null,target:c.linkTargetBlank?"_blank":null,"class":c.linkClassName||null},b.parentNode&&"A"===b.parentNode.nodeName&&!f(b.parentNode)?c.linkUrl?y.setAttribs(b.parentNode,r):y.remove(b.parentNode,!0):c.linkUrl&&((l=y.getParent(b,"a"))&&y.insertAfter(b,l),l=y.create("a",r),b.parentNode.insertBefore(l,b),l.appendChild(b)),m=a.dom.getParent(b,".mceTemp"),h=b.parentNode&&"A"===b.parentNode.nodeName&&!f(b.parentNode)?b.parentNode:b,c.caption?(c.caption=g(c.caption),p=c.attachment_id?"attachment_"+c.attachment_id:null,u="align"+(c.align||"none"),e="wp-caption "+u,c.captionClassName&&(e+=" "+c.captionClassName.replace(/[<>&]+/g,"")),a.getParam("wpeditimage_html5_captions")||(s=parseInt(s,10),s+=10),m?(o=y.select("dl.wp-caption",m),o.length&&y.setAttribs(o,{id:p,"class":e,style:"width: "+s+"px"}),n=y.select(".wp-caption-dd",m),n.length&&y.setHTML(n[0],c.caption)):(p=p?'id="'+p+'" ':"",i="<dl "+p+'class="'+e+'" style="width: '+s+'px"><dt class="wp-caption-dt"></dt><dd class="wp-caption-dd">'+c.caption+"</dd></dl>",k=y.create("div",{"class":"mceTemp"},i),(j=y.getParent(h,"p"))?j.parentNode.insertBefore(k,j):h.parentNode.insertBefore(k,h),a.$(k).find("dt.wp-caption-dt").append(h),j&&y.isEmpty(j)&&y.remove(j))):m&&(j=y.create("p"),m.parentNode.insertBefore(j,m),j.appendChild(h),y.remove(m)),v=a.$(b),w=v.attr("srcset"),x=v.attr("src"),w&&x&&(x=x.replace(/[?#].*/,""),-1===w.indexOf(x)&&v.attr("srcset",null).attr("sizes",null)),wp.media.events&&wp.media.events.trigger("editor:image-update",{editor:a,metadata:c,image:b}),a.nodeChanged()}function i(b){var c,d,f;return"undefined"!=typeof wp&&wp.media?(f=e(b),wp.media.events.trigger("editor:image-edit",{editor:a,metadata:f,image:b}),c=wp.media({frame:"image",state:"image-details",metadata:f}),wp.media.events.trigger("editor:frame-create",{frame:c}),d=function(d){a.focus(),a.undoManager.transact(function(){h(b,d)}),c.detach()},c.state("image-details").on("update",d),c.state("replace-image").on("replace",d),c.on("close",function(){a.focus(),c.detach()}),void c.open()):void a.execCommand("mceImage")}function j(b){var c=a.dom.getParent(b,"div.mceTemp");c||"IMG"!==b.nodeName||(c=a.dom.getParent(b,"a")),c?(c.nextSibling?a.selection.select(c.nextSibling):c.previousSibling?a.selection.select(c.previousSibling):a.selection.select(c.parentNode),a.selection.collapse(!0),a.dom.remove(c)):a.dom.remove(b),a.nodeChanged(),a.undoManager.add()}var k,l,m,n=tinymce.each,o=tinymce.trim,p=tinymce.Env.iOS;return a.addButton("wp_img_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){j(a.selection.getNode())}}),a.addButton("wp_img_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",onclick:function(){i(a.selection.getNode())}}),n({alignleft:"Align left",aligncenter:"Align center",alignright:"Align right",alignnone:"No alignment"},function(b,c){var d=c.slice(5);a.addButton("wp_img_"+c,{tooltip:b,icon:"dashicon dashicons-align-"+d,cmd:"alignnone"===c?"wpAlignNone":"Justify"+d.slice(0,1).toUpperCase()+d.slice(1),onPostRender:function(){var b=this;a.on("NodeChange",function(d){var e;"IMG"===d.element.nodeName&&(e=a.dom.getParent(d.element,".wp-caption")||d.element,"alignnone"===c?b.active(!/\balign(left|center|right)\b/.test(e.className)):b.active(a.dom.hasClass(e,c)))})}})}),a.once("preinit",function(){a.wp&&a.wp._createToolbar&&(k=a.wp._createToolbar(["wp_img_alignleft","wp_img_aligncenter","wp_img_alignright","wp_img_alignnone","wp_img_edit","wp_img_remove"]))}),a.on("wptoolbar",function(a){"IMG"!==a.element.nodeName||b(a.element)||(a.toolbar=k)}),p&&a.on("init",function(){a.on("touchstart",function(a){"IMG"===a.target.nodeName&&(m=!0)}),a.dom.bind(a.getDoc(),"touchmove",function(a){"IMG"===a.target.nodeName&&(m=!1)}),a.on("touchend",function(b){if(m&&"IMG"===b.target.nodeName){var c=b.target;m=!1,window.setTimeout(function(){a.selection.select(c),a.nodeChanged()},200)}else k&&k.hide()})}),a.on("init",function(){var b=a.dom,c=a.getParam("wpeditimage_html5_captions")?"html5-captions":"html4-captions";b.addClass(a.getBody(),c),a.on("wpLoadImageForm",function(b){if(!a.getParam("wpeditimage_disable_captions")){var c={type:"textbox",flex:1,name:"wpcaption",minHeight:60,multiline:!0,scroll:!0,label:"Image caption"};b.data.splice(b.data.length-1,0,c)}}),a.on("wpNewImageRefresh",function(a){var c,d;(c=b.getParent(a.node,"dl.wp-caption"))&&(c.style.width||(d=parseInt(a.node.clientWidth,10)+10,d=d?d+"px":"50%",b.setStyle(c,"width",d)))}),a.on("wpImageFormSubmit",function(c){var d,e,f,h,i,j=c.imgData.data,k=c.imgData.node,l=c.imgData.wpcaption,m="",n="",o="";return j.id="__wp-temp-img-id",c.imgData.cancel=!0,j.style||(j.style=null),j.src?(l&&(l=l.replace(/\r\n|\r/g,"\n").replace(/<\/?[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),l=l.replace(/(<br[^>]*>)\s*\n\s*/g,"$1").replace(/\s*\n\s*/g,"<br />"),l=g(l)),k?(i=k.id||null,b.setAttribs(k,j),d=b.getParent(k,"dl.wp-caption"),l?d?(e=b.select("dd.wp-caption-dd",d)[0])&&(e.innerHTML=l):(k.className&&(m=k.className.match(/wp-image-([0-9]+)/),n=k.className.match(/align(left|right|center|none)/)),n?(n=n[0],k.className=k.className.replace(/align(left|right|center|none)/g,"")):n="alignnone",n=' class="wp-caption '+n+'"',m&&(m=' id="attachment_'+m[1]+'"'),o=j.width||k.clientWidth,o&&(o=parseInt(o,10),a.getParam("wpeditimage_html5_captions")||(o+=10),o=' style="width: '+o+'px"'),f=k.parentNode&&"A"===k.parentNode.nodeName?k.parentNode:k,h="<dl "+m+n+o+'><dt class="wp-caption-dt"></dt><dd class="wp-caption-dd">'+l+"</dd></dl>",d=b.create("div",{"class":"mceTemp"},h),(e=b.getParent(f,"p"))?e.parentNode.insertBefore(d,e):f.parentNode.insertBefore(d,f),a.$(d).find("dt.wp-caption-dt").append(f),e&&b.isEmpty(e)&&b.remove(e)):d&&(h="A"===k.parentNode.nodeName?b.getOuterHTML(k.parentNode):b.getOuterHTML(k),e=b.create("p",{},h),b.insertAfter(e,d.parentNode),a.selection.select(e),a.nodeChanged(),b.remove(d.parentNode))):(h=b.createHTML("img",j),l?(f=a.selection.getNode(),j.width&&(o=parseInt(j.width,10),a.getParam("wpeditimage_html5_captions")||(o+=10),o=' style="width: '+o+'px"'),h='<dl class="wp-caption alignnone"'+o+'><dt class="wp-caption-dt">'+h+'</dt><dd class="wp-caption-dd">'+l+"</dd></dl>",e="P"===f.nodeName?f:b.getParent(f,"p"),e&&"P"===e.nodeName?(d=b.create("div",{"class":"mceTemp"},h),e.parentNode.insertBefore(d,e),a.selection.select(d),a.nodeChanged(),b.isEmpty(e)&&b.remove(e)):a.selection.setContent('<div class="mceTemp">'+h+"</div>")):a.selection.setContent(h)),k=b.get("__wp-temp-img-id"),b.setAttrib(k,"id",i),void(c.imgData.node=k)):void(k&&((d=b.getParent(k,"div.mceTemp"))?b.remove(d):"A"===k.parentNode.nodeName?b.remove(k.parentNode):b.remove(k),a.nodeChanged()))}),a.on("wpLoadImageData",function(c){var d,e=c.imgData.data,f=c.imgData.node;(d=b.getParent(f,"dl.wp-caption"))&&(d=b.select("dd.wp-caption-dd",d)[0],d&&(e.wpcaption=a.serializer.serialize(d).replace(/<br[^>]*>/g,"$&\n").replace(/^<p>/,"").replace(/<\/p>$/,"")))}),tinymce.Env.ie&&tinymce.Env.ie>10&&b.bind(a.getBody(),"mscontrolselect",function(c){"IMG"===c.target.nodeName&&b.getParent(c.target,".wp-caption")?a.getBody().focus():"DL"===c.target.nodeName&&b.hasClass(c.target,"wp-caption")&&c.target.focus()})}),a.on("ObjectResized",function(b){var c=b.target;"IMG"===c.nodeName&&a.undoManager.transact(function(){var d,e,f=a.dom;c.className=c.className.replace(/\bsize-[^ ]+/,""),(d=f.getParent(c,".wp-caption"))&&(e=b.width||f.getAttrib(c,"width"),e&&(e=parseInt(e,10),a.getParam("wpeditimage_html5_captions")||(e+=10),f.setStyle(d,"width",e+"px")))})}),a.on("BeforeExecCommand",function(b){var c,d,e,f,g,h=b.command,i=a.dom;if("mceInsertContent"===h)(c=i.getParent(a.selection.getNode(),"div.mceTemp"))&&(d=i.create("p"),i.insertAfter(d,c),a.selection.setCursorLocation(d,0),a.nodeChanged());else if("JustifyLeft"===h||"JustifyRight"===h||"JustifyCenter"===h||"wpAlignNone"===h){if(c=a.selection.getNode(),f="align"+h.slice(7).toLowerCase(),e=a.dom.getParent(c,".wp-caption"),"IMG"!==c.nodeName&&!e)return;c=e||c,g=a.dom.hasClass(c,f)?" alignnone":" "+f,c.className=o(c.className.replace(/ ?align(left|center|right|none)/g,"")+g),a.nodeChanged(),b.preventDefault(),k&&k.reposition(),a.fire("ExecCommand",{command:h,ui:b.ui,value:b.value})}}),a.on("keydown",function(b){var c,d,e,f,g=a.selection,h=b.keyCode,i=a.dom,k=tinymce.util.VK;if(h===k.ENTER)c=g.getNode(),d=i.getParent(c,"div.mceTemp"),d&&(i.events.cancel(b),tinymce.each(i.select("dt, dd",d),function(a){i.isEmpty(a)&&i.remove(a)}),f=tinymce.Env.ie&&tinymce.Env.ie<11?"":'<br data-mce-bogus="1" />',e=i.create("p",null,f),"DD"===c.nodeName?i.insertAfter(e,d):d.parentNode.insertBefore(e,d),a.nodeChanged(),g.setCursorLocation(e,0));else if((h===k.DELETE||h===k.BACKSPACE)&&(c=g.getNode(),"DIV"===c.nodeName&&i.hasClass(c,"mceTemp")?d=c:("IMG"===c.nodeName||"DT"===c.nodeName||"A"===c.nodeName)&&(d=i.getParent(c,"div.mceTemp")),d))return i.events.cancel(b),j(c),!1}),tinymce.Env.gecko&&a.on("undo redo",function(){"IMG"===a.selection.getNode().nodeName&&a.selection.collapse()}),a.wpSetImgCaption=function(a){return c(a)},a.wpGetImgCaption=function(a){return d(a)},a.on("BeforeSetContent",function(b){"raw"!==b.format&&(b.content=a.wpSetImgCaption(b.content))}),a.on("PostProcess",function(b){b.get&&(b.content=a.wpGetImgCaption(b.content))}),function(){var b;a.on("dragstart",function(){var c=a.selection.getNode();"IMG"===c.nodeName&&(b=a.dom.getParent(c,".mceTemp"),b||"A"!==c.parentNode.nodeName||f(c.parentNode)||(b=c.parentNode))}),a.on("drop",function(c){var d=a.dom,e=tinymce.dom.RangeUtils.getCaretRangeFromPoint(c.clientX,c.clientY,a.getDoc());e&&d.getParent(e.startContainer,".mceTemp")?c.preventDefault():b&&(c.preventDefault(),a.undoManager.transact(function(){e&&a.selection.setRng(e),a.selection.setNode(b),d.remove(b)})),b=null})}(),a.wp=a.wp||{},a.wp.isPlaceholder=b,{_do_shcode:c,_get_shcode:d}});
\ No newline at end of file
+tinymce.PluginManager.add("wpeditimage",function(a){function b(b){return!(!a.dom.getAttrib(b,"data-mce-placeholder")&&!a.dom.getAttrib(b,"data-mce-object"))}function c(b){var c=a.$(b).parents("[contenteditable]");return c&&"false"===c.attr("contenteditable")}function d(b){return b.replace(/(?:<p>)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g,function(b,c,d){var e,f,g,h,i,j;return e=c.match(/id=['"]([^'"]*)['"] ?/),e&&(c=c.replace(e[0],"")),f=c.match(/align=['"]([^'"]*)['"] ?/),f&&(c=c.replace(f[0],"")),g=c.match(/class=['"]([^'"]*)['"] ?/),g&&(c=c.replace(g[0],"")),j=c.match(/width=['"]([0-9]*)['"] ?/),j&&(c=c.replace(j[0],"")),d=p(d),i=d.match(/((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)([\s\S]*)/i),i&&i[2]?(h=p(i[2]),i=p(i[1])):(h=p(c).replace(/caption=['"]/,"").replace(/['"]$/,""),i=d),e=e&&e[1]?e[1].replace(/[<>&]+/g,""):"",f=f&&f[1]?f[1]:"alignnone",g=g&&g[1]?" "+g[1].replace(/[<>&]+/g,""):"",!j&&i&&(j=i.match(/width=['"]([0-9]*)['"]/)),j&&j[1]&&(j=j[1]),j&&h?(j=parseInt(j,10),a.getParam("wpeditimage_html5_captions")||(j+=10),'<div class="mceTemp"><dl id="'+e+'" class="wp-caption '+f+g+'" style="width: '+j+'px"><dt class="wp-caption-dt">'+i+'</dt><dd class="wp-caption-dd">'+h+"</dd></dl></div>"):d})}function e(a){return a.replace(/(?:<div [^>]+mceTemp[^>]+>)?\s*(<dl [^>]+wp-caption[^>]+>[\s\S]+?<\/dl>)\s*(?:<\/div>)?/g,function(a,b){var c="";return b.indexOf("<img ")===-1?(c=b.match(/<dd [^>]+>([\s\S]+?)<\/dd>/i),c&&c[1]?"<p>"+c[1]+"</p>":""):(c=b.replace(/\s*<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>\s*/gi,function(a,b,c,d){var e,f,g,h;return h=c.match(/width="([0-9]*)"/),h=h&&h[1]?h[1]:"",f=b.match(/class="([^"]*)"/),f=f&&f[1]?f[1]:"",g=f.match(/align[a-z]+/i)||"alignnone",h&&d?(e=b.match(/id="([^"]*)"/),e=e&&e[1]?e[1]:"",f=f.replace(/wp-caption ?|align[a-z]+ ?/gi,""),f&&(f=' class="'+f+'"'),d=d.replace(/\r\n|\r/g,"\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),d=d.replace(/\s*\n\s*/g,"<br />"),'[caption id="'+e+'" align="'+g+'" width="'+h+'"'+f+"]"+c+" "+d+"[/caption]"):("alignnone"!==g[0]&&(c=c.replace(/><img/,' class="'+g[0]+'"><img')),c)}),c.indexOf("[caption")===-1&&(c=b.replace(/[\s\S]*?((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)(<p>[\s\S]*<\/p>)?[\s\S]*/gi,"<p>$1</p>$2")),c)})}function f(b){var c,d,e,f,g,h,i,j,k=[],l=a.dom,m=/^\d+$/;return e={attachment_id:!1,size:"custom",caption:"",align:"none",extraClasses:"",link:!1,linkUrl:"",linkClassName:"",linkTargetBlank:!1,linkRel:"",title:""},e.url=l.getAttrib(b,"src"),e.alt=l.getAttrib(b,"alt"),e.title=l.getAttrib(b,"title"),i=l.getAttrib(b,"width"),j=l.getAttrib(b,"height"),(!m.test(i)||parseInt(i,10)<1)&&(i=b.naturalWidth||b.width),(!m.test(j)||parseInt(j,10)<1)&&(j=b.naturalHeight||b.height),e.customWidth=e.width=i,e.customHeight=e.height=j,c=tinymce.explode(b.className," "),d=[],tinymce.each(c,function(a){/^wp-image/.test(a)?e.attachment_id=parseInt(a.replace("wp-image-",""),10):/^align/.test(a)?e.align=a.replace("align",""):/^size/.test(a)?e.size=a.replace("size-",""):d.push(a)}),e.extraClasses=d.join(" "),f=l.getParents(b,".wp-caption"),f.length&&(f=f[0],c=f.className.split(" "),tinymce.each(c,function(a){/^align/.test(a)?e.align=a.replace("align",""):a&&"wp-caption"!==a&&k.push(a)}),e.captionClassName=k.join(" "),g=l.select("dd.wp-caption-dd",f),g.length&&(g=g[0],e.caption=a.serializer.serialize(g).replace(/<br[^>]*>/g,"$&\n").replace(/^<p>/,"").replace(/<\/p>$/,""))),b.parentNode&&"A"===b.parentNode.nodeName&&(h=b.parentNode,e.linkUrl=l.getAttrib(h,"href"),e.linkTargetBlank="_blank"===l.getAttrib(h,"target"),e.linkRel=l.getAttrib(h,"rel"),e.linkClassName=h.className),e}function g(a){return a&&!(!a.textContent&&!a.innerText)}function h(b){return!b||b.indexOf("<")===-1&&b.indexOf(">")===-1?b:(m||(m=new tinymce.html.Serializer({},a.schema)),m.serialize(a.parser.parse(b,{forced_root_block:!1})))}function i(b,c){var d,e,f,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=a.dom;d=tinymce.explode(c.extraClasses," "),d||(d=[]),c.caption||d.push("align"+c.align),c.attachment_id&&(d.push("wp-image-"+c.attachment_id),c.size&&"custom"!==c.size&&d.push("size-"+c.size)),s=c.width,t=c.height,"custom"===c.size&&(s=c.customWidth,t=c.customHeight),q={src:c.url,width:s||null,height:t||null,alt:c.alt,title:c.title||null,"class":d.join(" ")||null},y.setAttribs(b,q),r={href:c.linkUrl,rel:c.linkRel||null,target:c.linkTargetBlank?"_blank":null,"class":c.linkClassName||null},b.parentNode&&"A"===b.parentNode.nodeName&&!g(b.parentNode)?c.linkUrl?y.setAttribs(b.parentNode,r):y.remove(b.parentNode,!0):c.linkUrl&&((l=y.getParent(b,"a"))&&y.insertAfter(b,l),l=y.create("a",r),b.parentNode.insertBefore(l,b),l.appendChild(b)),m=a.dom.getParent(b,".mceTemp"),f=b.parentNode&&"A"===b.parentNode.nodeName&&!g(b.parentNode)?b.parentNode:b,c.caption?(c.caption=h(c.caption),p=c.attachment_id?"attachment_"+c.attachment_id:null,u="align"+(c.align||"none"),e="wp-caption "+u,c.captionClassName&&(e+=" "+c.captionClassName.replace(/[<>&]+/g,"")),a.getParam("wpeditimage_html5_captions")||(s=parseInt(s,10),s+=10),m?(o=y.select("dl.wp-caption",m),o.length&&y.setAttribs(o,{id:p,"class":e,style:"width: "+s+"px"}),n=y.select(".wp-caption-dd",m),n.length&&y.setHTML(n[0],c.caption)):(p=p?'id="'+p+'" ':"",i="<dl "+p+'class="'+e+'" style="width: '+s+'px"><dt class="wp-caption-dt"></dt><dd class="wp-caption-dd">'+c.caption+"</dd></dl>",k=y.create("div",{"class":"mceTemp"},i),(j=y.getParent(f,"p"))?j.parentNode.insertBefore(k,j):f.parentNode.insertBefore(k,f),a.$(k).find("dt.wp-caption-dt").append(f),j&&y.isEmpty(j)&&y.remove(j))):m&&(j=y.create("p"),m.parentNode.insertBefore(j,m),j.appendChild(f),y.remove(m)),v=a.$(b),w=v.attr("srcset"),x=v.attr("src"),w&&x&&(x=x.replace(/[?#].*/,""),w.indexOf(x)===-1&&v.attr("srcset",null).attr("sizes",null)),wp.media.events&&wp.media.events.trigger("editor:image-update",{editor:a,metadata:c,image:b}),a.nodeChanged()}function j(b){var c,d,e;return"undefined"!=typeof wp&&wp.media?(e=f(b),wp.media.events.trigger("editor:image-edit",{editor:a,metadata:e,image:b}),c=wp.media({frame:"image",state:"image-details",metadata:e}),wp.media.events.trigger("editor:frame-create",{frame:c}),d=function(d){a.focus(),a.undoManager.transact(function(){i(b,d)}),c.detach()},c.state("image-details").on("update",d),c.state("replace-image").on("replace",d),c.on("close",function(){a.focus(),c.detach()}),void c.open()):void a.execCommand("mceImage")}function k(b){var c=a.dom.getParent(b,"div.mceTemp");c||"IMG"!==b.nodeName||(c=a.dom.getParent(b,"a")),c?(c.nextSibling?a.selection.select(c.nextSibling):c.previousSibling?a.selection.select(c.previousSibling):a.selection.select(c.parentNode),a.selection.collapse(!0),a.dom.remove(c)):a.dom.remove(b),a.nodeChanged(),a.undoManager.add()}var l,m,n,o=tinymce.each,p=tinymce.trim,q=tinymce.Env.iOS;return a.addButton("wp_img_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){k(a.selection.getNode())}}),a.addButton("wp_img_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",onclick:function(){j(a.selection.getNode())}}),o({alignleft:"Align left",aligncenter:"Align center",alignright:"Align right",alignnone:"No alignment"},function(b,c){var d=c.slice(5);a.addButton("wp_img_"+c,{tooltip:b,icon:"dashicon dashicons-align-"+d,cmd:"alignnone"===c?"wpAlignNone":"Justify"+d.slice(0,1).toUpperCase()+d.slice(1),onPostRender:function(){var b=this;a.on("NodeChange",function(d){var e;"IMG"===d.element.nodeName&&(e=a.dom.getParent(d.element,".wp-caption")||d.element,"alignnone"===c?b.active(!/\balign(left|center|right)\b/.test(e.className)):b.active(a.dom.hasClass(e,c)))})}})}),a.once("preinit",function(){a.wp&&a.wp._createToolbar&&(l=a.wp._createToolbar(["wp_img_alignleft","wp_img_aligncenter","wp_img_alignright","wp_img_alignnone","wp_img_edit","wp_img_remove"]))}),a.on("wptoolbar",function(a){"IMG"!==a.element.nodeName||b(a.element)||(a.toolbar=l)}),q&&a.on("init",function(){a.on("touchstart",function(a){"IMG"!==a.target.nodeName||c(a.target)||(n=!0)}),a.dom.bind(a.getDoc(),"touchmove",function(){n=!1}),a.on("touchend",function(b){if(n&&"IMG"===b.target.nodeName&&!c(b.target)){var d=b.target;n=!1,window.setTimeout(function(){a.selection.select(d),a.nodeChanged()},100)}else l&&l.hide()})}),a.on("init",function(){var b=a.dom,c=a.getParam("wpeditimage_html5_captions")?"html5-captions":"html4-captions";b.addClass(a.getBody(),c),a.on("wpLoadImageForm",function(b){if(!a.getParam("wpeditimage_disable_captions")){var c={type:"textbox",flex:1,name:"wpcaption",minHeight:60,multiline:!0,scroll:!0,label:"Image caption"};b.data.splice(b.data.length-1,0,c)}}),a.on("wpNewImageRefresh",function(a){var c,d;(c=b.getParent(a.node,"dl.wp-caption"))&&(c.style.width||(d=parseInt(a.node.clientWidth,10)+10,d=d?d+"px":"50%",b.setStyle(c,"width",d)))}),a.on("wpImageFormSubmit",function(c){var d,e,f,g,i,j=c.imgData.data,k=c.imgData.node,l=c.imgData.wpcaption,m="",n="",o="";return j.id="__wp-temp-img-id",c.imgData.cancel=!0,j.style||(j.style=null),j.src?(l&&(l=l.replace(/\r\n|\r/g,"\n").replace(/<\/?[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),l=l.replace(/(<br[^>]*>)\s*\n\s*/g,"$1").replace(/\s*\n\s*/g,"<br />"),l=h(l)),k?(i=k.id||null,b.setAttribs(k,j),d=b.getParent(k,"dl.wp-caption"),l?d?(e=b.select("dd.wp-caption-dd",d)[0])&&(e.innerHTML=l):(k.className&&(m=k.className.match(/wp-image-([0-9]+)/),n=k.className.match(/align(left|right|center|none)/)),n?(n=n[0],k.className=k.className.replace(/align(left|right|center|none)/g,"")):n="alignnone",n=' class="wp-caption '+n+'"',m&&(m=' id="attachment_'+m[1]+'"'),o=j.width||k.clientWidth,o&&(o=parseInt(o,10),a.getParam("wpeditimage_html5_captions")||(o+=10),o=' style="width: '+o+'px"'),f=k.parentNode&&"A"===k.parentNode.nodeName?k.parentNode:k,g="<dl "+m+n+o+'><dt class="wp-caption-dt"></dt><dd class="wp-caption-dd">'+l+"</dd></dl>",d=b.create("div",{"class":"mceTemp"},g),(e=b.getParent(f,"p"))?e.parentNode.insertBefore(d,e):f.parentNode.insertBefore(d,f),a.$(d).find("dt.wp-caption-dt").append(f),e&&b.isEmpty(e)&&b.remove(e)):d&&(g="A"===k.parentNode.nodeName?b.getOuterHTML(k.parentNode):b.getOuterHTML(k),e=b.create("p",{},g),b.insertAfter(e,d.parentNode),a.selection.select(e),a.nodeChanged(),b.remove(d.parentNode))):(g=b.createHTML("img",j),l?(f=a.selection.getNode(),j.width&&(o=parseInt(j.width,10),a.getParam("wpeditimage_html5_captions")||(o+=10),o=' style="width: '+o+'px"'),g='<dl class="wp-caption alignnone"'+o+'><dt class="wp-caption-dt">'+g+'</dt><dd class="wp-caption-dd">'+l+"</dd></dl>",e="P"===f.nodeName?f:b.getParent(f,"p"),e&&"P"===e.nodeName?(d=b.create("div",{"class":"mceTemp"},g),e.parentNode.insertBefore(d,e),a.selection.select(d),a.nodeChanged(),b.isEmpty(e)&&b.remove(e)):a.selection.setContent('<div class="mceTemp">'+g+"</div>")):a.selection.setContent(g)),k=b.get("__wp-temp-img-id"),b.setAttrib(k,"id",i),void(c.imgData.node=k)):void(k&&((d=b.getParent(k,"div.mceTemp"))?b.remove(d):"A"===k.parentNode.nodeName?b.remove(k.parentNode):b.remove(k),a.nodeChanged()))}),a.on("wpLoadImageData",function(c){var d,e=c.imgData.data,f=c.imgData.node;(d=b.getParent(f,"dl.wp-caption"))&&(d=b.select("dd.wp-caption-dd",d)[0],d&&(e.wpcaption=a.serializer.serialize(d).replace(/<br[^>]*>/g,"$&\n").replace(/^<p>/,"").replace(/<\/p>$/,"")))}),tinymce.Env.ie&&tinymce.Env.ie>10&&b.bind(a.getBody(),"mscontrolselect",function(c){"IMG"===c.target.nodeName&&b.getParent(c.target,".wp-caption")?a.getBody().focus():"DL"===c.target.nodeName&&b.hasClass(c.target,"wp-caption")&&c.target.focus()})}),a.on("ObjectResized",function(b){var c=b.target;"IMG"===c.nodeName&&a.undoManager.transact(function(){var d,e,f=a.dom;c.className=c.className.replace(/\bsize-[^ ]+/,""),(d=f.getParent(c,".wp-caption"))&&(e=b.width||f.getAttrib(c,"width"),e&&(e=parseInt(e,10),a.getParam("wpeditimage_html5_captions")||(e+=10),f.setStyle(d,"width",e+"px")))})}),a.on("BeforeExecCommand",function(b){var c,d,e,f,g,h=b.command,i=a.dom;if("mceInsertContent"===h)(c=i.getParent(a.selection.getNode(),"div.mceTemp"))&&(d=i.create("p"),i.insertAfter(d,c),a.selection.setCursorLocation(d,0),a.nodeChanged());else if("JustifyLeft"===h||"JustifyRight"===h||"JustifyCenter"===h||"wpAlignNone"===h){if(c=a.selection.getNode(),f="align"+h.slice(7).toLowerCase(),e=a.dom.getParent(c,".wp-caption"),"IMG"!==c.nodeName&&!e)return;c=e||c,g=a.dom.hasClass(c,f)?" alignnone":" "+f,c.className=p(c.className.replace(/ ?align(left|center|right|none)/g,"")+g),a.nodeChanged(),b.preventDefault(),l&&l.reposition(),a.fire("ExecCommand",{command:h,ui:b.ui,value:b.value})}}),a.on("keydown",function(b){var c,d,e,f,g=a.selection,h=b.keyCode,i=a.dom,j=tinymce.util.VK;if(h===j.ENTER)c=g.getNode(),d=i.getParent(c,"div.mceTemp"),d&&(i.events.cancel(b),tinymce.each(i.select("dt, dd",d),function(a){i.isEmpty(a)&&i.remove(a)}),f=tinymce.Env.ie&&tinymce.Env.ie<11?"":'<br data-mce-bogus="1" />',e=i.create("p",null,f),"DD"===c.nodeName?i.insertAfter(e,d):d.parentNode.insertBefore(e,d),a.nodeChanged(),g.setCursorLocation(e,0));else if((h===j.DELETE||h===j.BACKSPACE)&&(c=g.getNode(),"DIV"===c.nodeName&&i.hasClass(c,"mceTemp")?d=c:"IMG"!==c.nodeName&&"DT"!==c.nodeName&&"A"!==c.nodeName||(d=i.getParent(c,"div.mceTemp")),d))return i.events.cancel(b),k(c),!1}),tinymce.Env.gecko&&a.on("undo redo",function(){"IMG"===a.selection.getNode().nodeName&&a.selection.collapse()}),a.wpSetImgCaption=function(a){return d(a)},a.wpGetImgCaption=function(a){return e(a)},a.on("BeforeSetContent",function(b){"raw"!==b.format&&(b.content=a.wpSetImgCaption(b.content))}),a.on("PostProcess",function(b){b.get&&(b.content=a.wpGetImgCaption(b.content))}),function(){var b;a.on("dragstart",function(){var c=a.selection.getNode();"IMG"===c.nodeName&&(b=a.dom.getParent(c,".mceTemp"),b||"A"!==c.parentNode.nodeName||g(c.parentNode)||(b=c.parentNode))}),a.on("drop",function(c){var d=a.dom,e=tinymce.dom.RangeUtils.getCaretRangeFromPoint(c.clientX,c.clientY,a.getDoc());e&&d.getParent(e.startContainer,".mceTemp")?c.preventDefault():b&&(c.preventDefault(),a.undoManager.transact(function(){e&&a.selection.setRng(e),a.selection.setNode(b),d.remove(b)})),b=null})}(),a.wp=a.wp||{},a.wp.isPlaceholder=b,{_do_shcode:d,_get_shcode:e}});
\ No newline at end of file
index edf56002aae9310736e78437c1d38818d19121da..ecfa425ac24f9eeba667ae776f1fb0d5be275da2 100644 (file)
@@ -1 +1 @@
-!function(a,b,c){a.PluginManager.add("wpemoji",function(d){function e(a){a.className="emoji",a.setAttribute("data-mce-resize","false"),a.setAttribute("data-mce-placeholder","1"),a.setAttribute("data-wp-emoji","1")}function f(a){var c={"data-mce-resize":"false","data-mce-placeholder":"1","data-wp-emoji":"1"};b.emoji.parse(a,{imgAttr:c})}function g(a){var b,c;a&&window.twemoji&&window.twemoji.test(a.textContent||a.innerText)&&(i.webkit&&(b=d.selection,c=b.getBookmark()),f(a),i.webkit&&b.moveToBookmark(c))}var h,i=a.Env,j=window.navigator.userAgent,k=j.indexOf("Windows")>-1,l=function(){var a=j.match(/Windows NT 6\.(\d)/);return a&&a[1]>1?!0:!1}();b&&b.emoji&&!c.supports.everything&&(l?d.on("keyup",function(a){231===a.keyCode&&g(d.selection.getNode())}):k||(d.on("keydown keyup",function(a){h="keydown"===a.type}),d.on("input",function(){h||g(d.selection.getNode())})),d.on("setcontent",function(a){var b=d.selection,c=b.getNode();window.twemoji&&window.twemoji.test(c.textContent||c.innerText)&&(f(c),i.ie&&i.ie<9&&a.load&&c&&"BODY"===c.nodeName&&b.collapse(!0))}),d.on("PastePostProcess",function(b){window.twemoji&&a.each(d.dom.$("img.emoji",b.node),function(a){a.alt&&window.twemoji.test(a.alt)&&e(a)})}),d.on("postprocess",function(a){a.content&&(a.content=a.content.replace(/<img[^>]+data-wp-emoji="[^>]+>/g,function(a){var b=a.match(/alt="([^"]+)"/);return b&&b[1]?b[1]:a}))}),d.on("resolvename",function(a){"IMG"===a.target.nodeName&&d.dom.getAttrib(a.target,"data-wp-emoji")&&a.preventDefault()}))})}(window.tinymce,window.wp,window._wpemojiSettings);
\ No newline at end of file
+!function(a,b,c){a.PluginManager.add("wpemoji",function(d){function e(a){a.className="emoji",a.setAttribute("data-mce-resize","false"),a.setAttribute("data-mce-placeholder","1"),a.setAttribute("data-wp-emoji","1")}function f(a){var c={"data-mce-resize":"false","data-mce-placeholder":"1","data-wp-emoji":"1"};b.emoji.parse(a,{imgAttr:c})}function g(a){var b,c;a&&window.twemoji&&window.twemoji.test(a.textContent||a.innerText)&&(i.webkit&&(b=d.selection,c=b.getBookmark()),f(a),i.webkit&&b.moveToBookmark(c))}var h,i=a.Env,j=window.navigator.userAgent,k=j.indexOf("Windows")>-1,l=function(){var a=j.match(/Windows NT 6\.(\d)/);return!!(a&&a[1]>1)}();b&&b.emoji&&!c.supports.everything&&(l?d.on("keyup",function(a){231===a.keyCode&&g(d.selection.getNode())}):k||(d.on("keydown keyup",function(a){h="keydown"===a.type}),d.on("input",function(){h||g(d.selection.getNode())})),d.on("setcontent",function(a){var b=d.selection,c=b.getNode();window.twemoji&&window.twemoji.test(c.textContent||c.innerText)&&(f(c),i.ie&&i.ie<9&&a.load&&c&&"BODY"===c.nodeName&&b.collapse(!0))}),d.on("PastePostProcess",function(b){window.twemoji&&a.each(d.dom.$("img.emoji",b.node),function(a){a.alt&&window.twemoji.test(a.alt)&&e(a)})}),d.on("postprocess",function(a){a.content&&(a.content=a.content.replace(/<img[^>]+data-wp-emoji="[^>]+>/g,function(a){var b=a.match(/alt="([^"]+)"/);return b&&b[1]?b[1]:a}))}),d.on("resolvename",function(a){"IMG"===a.target.nodeName&&d.dom.getAttrib(a.target,"data-wp-emoji")&&a.preventDefault()}))})}(window.tinymce,window.wp,window._wpemojiSettings);
\ No newline at end of file
index d98c0da69499755887cf28443c8d0580e34cb4c0..1ce1c926c1abc85b69c5ea18f4b325ffff32dd62 100644 (file)
                var doingUndoRedo;
                var doingUndoRedoTimer;
                var $ = window.jQuery;
+               var emailRegex = /^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;
+               var urlRegex1 = /^https?:\/\/([^\s/?.#-][^\s\/?.#]*\.?)+(\/[^\s"]*)?$/i;
+               var urlRegex2 = /^https?:\/\/[^\/]+\.[^\/]+($|\/)/i;
+               var speak = ( typeof window.wp !== 'undefined' && window.wp.a11y && window.wp.a11y.speak ) ? window.wp.a11y.speak : function() {};
+               var hasLinkError = false;
 
                function getSelectedLink() {
                        var href, html,
                }
 
                function removePlaceholderStrings( content, dataAttr ) {
-                       if ( dataAttr ) {
-                               content = content.replace( / data-wplink-edit="true"/g, '' );
+                       return content.replace( /(<a [^>]+>)([\s\S]*?)<\/a>/g, function( all, tag, text ) {
+                               if ( tag.indexOf( ' href="_wp_link_placeholder"' ) > -1 ) {
+                                       return text;
+                               }
+
+                               if ( dataAttr ) {
+                                       tag = tag.replace( / data-wplink-edit="true"/g, '' );
+                               }
+
+                               tag = tag.replace( / data-wplink-url-error="true"/g, '' );
+
+                               return tag + text + '</a>';
+                       });
+               }
+
+               function checkLink( node ) {
+                       var $link = editor.$( node );
+                       var href = $link.attr( 'href' );
+
+                       if ( ! href || typeof $ === 'undefined' ) {
+                               return;
                        }
 
-                       return content.replace( /<a [^>]*?href="_wp_link_placeholder"[^>]*>([\s\S]+)<\/a>/g, '$1' );
+                       hasLinkError = false;
+
+                       if ( /^http/i.test( href ) && ( ! urlRegex1.test( href ) || ! urlRegex2.test( href ) ) ) {
+                               hasLinkError = true;
+                               $link.attr( 'data-wplink-url-error', 'true' );
+                               speak( editor.translate( 'Warning: the link has been inserted but may have errors. Please test it.' ), 'assertive' );
+                       } else {
+                               $link.removeAttr( 'data-wplink-url-error' );
+                       }
                }
 
                editor.on( 'preinit', function() {
                                editToolbar = editor.wp._createToolbar( editButtons, true );
 
                                editToolbar.on( 'show', function() {
-                                       if ( ! tinymce.$( document.body ).hasClass( 'modal-open' ) ) {
+                                       if ( typeof window.wpLink === 'undefined' || ! window.wpLink.modalOpen ) {
                                                window.setTimeout( function() {
                                                        var element = editToolbar.$el.find( 'input.ui-autocomplete-input' )[0],
                                                                selection = linkNode && ( linkNode.textContent || linkNode.innerText );
                                        return;
                                }
 
-                               if ( ! /^(?:[a-z]+:|#|\?|\.|\/)/.test( href ) ) {
+                               if ( ! /^(?:[a-z]+:|#|\?|\.|\/)/.test( href ) && ! emailRegex.test( href ) ) {
                                        href = 'http://' + href;
                                }
 
                                if ( ! tinymce.trim( linkNode.innerHTML ) ) {
                                        editor.$( linkNode ).text( text || href );
                                }
+
+                               checkLink( linkNode );
                        }
 
                        inputInstance.reset();
                        editor.nodeChanged();
 
                        // Audible confirmation message when a link has been inserted in the Editor.
-                       if ( typeof window.wp !== 'undefined' && window.wp.a11y && typeof window.wpLinkL10n !== 'undefined' ) {
-                               window.wp.a11y.speak( window.wpLinkL10n.linkInserted );
+                       if ( typeof window.wpLinkL10n !== 'undefined' && ! hasLinkError ) {
+                               speak( window.wpLinkL10n.linkInserted );
                        }
                } );
 
                        if ( ! editToolbar.tempHide ) {
                                inputInstance.reset();
                                removePlaceholders();
-                               editor.focus();
-                               editToolbar.tempHide = false;
                        }
                } );
 
-               // WP default shortcut
+               editor.addCommand( 'wp_unlink', function() {
+                       editor.execCommand( 'unlink' );
+                       editToolbar.tempHide = false;
+                       editor.execCommand( 'wp_link_cancel' );
+               } );
+
+               // WP default shortcuts
                editor.addShortcut( 'access+a', '', 'WP_Link' );
+               editor.addShortcut( 'access+s', '', 'wp_unlink' );
                // The "de-facto standard" shortcut, see #27305
                editor.addShortcut( 'meta+k', '', 'WP_Link' );
 
                // When doing undo and redo with keyboard shortcuts (Ctrl|Cmd+Z, Ctrl|Cmd+Shift+Z, Ctrl|Cmd+Y),
                // set a flag to not focus the inline dialog. The editor has to remain focused so the users can do consecutive undo/redo.
                editor.on( 'keydown', function( event ) {
+                       if ( event.keyCode === 27 ) { // Esc
+                               editor.execCommand( 'wp_link_cancel' );
+                       }
+
                        if ( event.altKey || ( tinymce.Env.mac && ( ! event.metaKey || event.ctrlKey ) ) ||
                                ( ! tinymce.Env.mac && ! event.ctrlKey ) ) {
 
                                                        $input.val( ui.item.permalink );
                                                        $( element.firstChild.nextSibling ).val( ui.item.title );
 
-                                                       if ( 9 === event.keyCode && typeof window.wp !== 'undefined' &&
-                                                               window.wp.a11y && typeof window.wpLinkL10n !== 'undefined' ) {
+                                                       if ( 9 === event.keyCode && typeof window.wpLinkL10n !== 'undefined' ) {
                                                                // Audible confirmation message when a link has been selected.
-                                                               window.wp.a11y.speak( window.wpLinkL10n.linkSelected );
+                                                               speak( window.wpLinkL10n.linkSelected );
                                                        }
 
                                                        return false;
                        var linkNode = editor.dom.getParent( event.element, 'a' ),
                                $linkNode, href, edit;
 
-                       if ( tinymce.$( document.body ).hasClass( 'modal-open' ) ) {
+                       if ( typeof window.wpLink !== 'undefined' && window.wpLink.modalOpen ) {
                                editToolbar.tempHide = true;
                                return;
                        }
                                        previewInstance.setURL( href );
                                        event.element = linkNode;
                                        event.toolbar = toolbar;
+
+                                       if ( $linkNode.attr( 'data-wplink-url-error' ) === 'true' ) {
+                                               toolbar.$el.find( '.wp-link-preview a' ).addClass( 'wplink-url-error' );
+                                       } else {
+                                               toolbar.$el.find( '.wp-link-preview a' ).removeClass( 'wplink-url-error' );
+                                               hasLinkError = false;
+                                       }
                                }
+                       } else if ( editToolbar.visible() ) {
+                               editor.execCommand( 'wp_link_cancel' );
                        }
                } );
 
                editor.addButton( 'wp_link_remove', {
                        tooltip: 'Remove',
                        icon: 'dashicon dashicons-no',
-                       cmd: 'unlink'
+                       cmd: 'wp_unlink'
                } );
 
                editor.addButton( 'wp_link_advanced', {
                        close: function() {
                                editToolbar.tempHide = false;
                                editor.execCommand( 'wp_link_cancel' );
-                       }
+                       },
+                       checkLink: checkLink
                };
        } );
 } )( window.tinymce );
index 731762afc7b2af1f3e740822acfd6c03caf4adc9..8351bef21416f0aff61b6c629cc024c90fc626b4 100644 (file)
@@ -1 +1 @@
-!function(a){a.ui.WPLinkPreview=a.ui.Control.extend({url:"#",renderHtml:function(){return'<div id="'+this._id+'" class="wp-link-preview"><a href="'+this.url+'" target="_blank" tabindex="-1">'+this.url+"</a></div>"},setURL:function(b){var c,d;this.url!==b&&(this.url=b,b=window.decodeURIComponent(b),b=b.replace(/^(?:https?:)?\/\/(?:www\.)?/,""),-1!==(c=b.indexOf("?"))&&(b=b.slice(0,c)),-1!==(c=b.indexOf("#"))&&(b=b.slice(0,c)),b=b.replace(/(?:index)?\.html$/,""),"/"===b.charAt(b.length-1)&&(b=b.slice(0,-1)),""===b&&(b=this.url),b.length>40&&-1!==(c=b.indexOf("/"))&&-1!==(d=b.lastIndexOf("/"))&&d!==c&&(c+b.length-d<40&&(d=-(40-(c+1))),b=b.slice(0,c+1)+"\u2026"+b.slice(d)),a.$(this.getEl().firstChild).attr("href",this.url).text(b))}}),a.ui.WPLinkInput=a.ui.Control.extend({renderHtml:function(){return'<div id="'+this._id+'" class="wp-link-input"><input type="text" value="" placeholder="'+a.translate("Paste URL or type to search")+'" /><input type="text" style="display:none" value="" /></div>'},setURL:function(a){this.getEl().firstChild.value=a},getURL:function(){return a.trim(this.getEl().firstChild.value)},getLinkText:function(){var b=this.getEl().firstChild.nextSibling.value;return a.trim(b)?b.replace(/[\r\n\t ]+/g," "):""},reset:function(){var a=this.getEl().firstChild;a.value="",a.nextSibling.value=""}}),a.PluginManager.add("wplink",function(b){function c(){var a,c,d=b.selection.getNode(),e=b.dom.getParent(d,"a[href]");return e||(c=b.selection.getContent({format:"raw"}),c&&-1!==c.indexOf("</a>")&&(a=c.match(/href="([^">]+)"/),a&&a[1]&&(e=b.$('a[href="'+a[1]+'"]',d)[0]),e&&b.selection.select(e))),e}function d(){b.$("a").each(function(a,c){var d=b.$(c);"_wp_link_placeholder"===d.attr("href")?b.dom.remove(c,!0):d.attr("data-wplink-edit")&&d.attr("data-wplink-edit",null)})}function e(a,b){return b&&(a=a.replace(/ data-wplink-edit="true"/g,"")),a.replace(/<a [^>]*?href="_wp_link_placeholder"[^>]*>([\s\S]+)<\/a>/g,"$1")}var f,g,h,i,j,k,l,m=window.jQuery;return b.on("preinit",function(){if(b.wp&&b.wp._createToolbar){f=b.wp._createToolbar(["wp_link_preview","wp_link_edit","wp_link_remove"],!0);var c=["wp_link_input","wp_link_apply"];"undefined"!=typeof window.wpLink&&c.push("wp_link_advanced"),g=b.wp._createToolbar(c,!0),g.on("show",function(){a.$(document.body).hasClass("modal-open")||window.setTimeout(function(){var a=g.$el.find("input.ui-autocomplete-input")[0],b=j&&(j.textContent||j.innerText);a&&(!a.value&&b&&"undefined"!=typeof window.wpLink&&(a.value=window.wpLink.getUrlFromSelection(b)),k||(a.focus(),a.select()))})}),g.on("hide",function(){g.scrolling||b.execCommand("wp_link_cancel")})}}),b.addCommand("WP_Link",function(){return a.Env.ie&&a.Env.ie<10&&"undefined"!=typeof window.wpLink?void window.wpLink.open(b.id):(j=c(),g.tempHide=!1,void(j?b.dom.setAttribs(j,{"data-wplink-edit":!0}):(d(),b.execCommand("mceInsertLink",!1,{href:"_wp_link_placeholder"}),j=b.$('a[href="_wp_link_placeholder"]')[0],b.nodeChanged())))}),b.addCommand("wp_link_apply",function(){if(!g.scrolling){var c,d;if(j){if(c=i.getURL(),d=i.getLinkText(),b.focus(),!c)return void b.dom.remove(j,!0);/^(?:[a-z]+:|#|\?|\.|\/)/.test(c)||(c="http://"+c),b.dom.setAttribs(j,{href:c,"data-wplink-edit":null}),a.trim(j.innerHTML)||b.$(j).text(d||c)}i.reset(),b.nodeChanged(),"undefined"!=typeof window.wp&&window.wp.a11y&&"undefined"!=typeof window.wpLinkL10n&&window.wp.a11y.speak(window.wpLinkL10n.linkInserted)}}),b.addCommand("wp_link_cancel",function(){g.tempHide||(i.reset(),d(),b.focus(),g.tempHide=!1)}),b.addShortcut("access+a","","WP_Link"),b.addShortcut("meta+k","","WP_Link"),b.addButton("link",{icon:"link",tooltip:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]"}),b.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink"}),b.addMenuItem("link",{icon:"link",text:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]",context:"insert",prependToContext:!0}),b.on("pastepreprocess",function(c){var d=c.content,e=/^(?:https?:)?\/\/\S+$/i;b.selection.isCollapsed()||e.test(b.selection.getContent())||(d=d.replace(/<[^>]+>/g,""),d=a.trim(d),e.test(d)&&(b.execCommand("mceInsertLink",!1,{href:b.dom.decode(d)}),c.preventDefault()))}),b.on("savecontent",function(a){a.content=e(a.content,!0)}),b.on("BeforeAddUndo",function(a){a.lastLevel&&a.lastLevel.content&&a.level.content&&a.lastLevel.content===e(a.level.content)&&a.preventDefault()}),b.on("keydown",function(b){b.altKey||a.Env.mac&&(!b.metaKey||b.ctrlKey)||!a.Env.mac&&!b.ctrlKey||(89===b.keyCode||90===b.keyCode)&&(k=!0,window.clearTimeout(l),l=window.setTimeout(function(){k=!1},500))}),b.addButton("wp_link_preview",{type:"WPLinkPreview",onPostRender:function(){h=this}}),b.addButton("wp_link_input",{type:"WPLinkInput",onPostRender:function(){var c,d,e,f=this.getEl(),h=f.firstChild;i=this,m&&m.ui&&m.ui.autocomplete&&(c=m(h),c.on("keydown",function(){c.removeAttr("aria-activedescendant")}).autocomplete({source:function(a,b){return e===a.term?void b(d):/^https?:/.test(a.term)||-1!==a.term.indexOf(".")?b():(m.post(window.ajaxurl,{action:"wp-link-ajax",page:1,search:a.term,_ajax_linking_nonce:m("#_ajax_linking_nonce").val()},function(a){d=a,b(a)},"json"),void(e=a.term))},focus:function(a,b){c.attr("aria-activedescendant","mce-wp-autocomplete-"+b.item.ID),a.preventDefault()},select:function(a,b){return c.val(b.item.permalink),m(f.firstChild.nextSibling).val(b.item.title),9===a.keyCode&&"undefined"!=typeof window.wp&&window.wp.a11y&&"undefined"!=typeof window.wpLinkL10n&&window.wp.a11y.speak(window.wpLinkL10n.linkSelected),!1},open:function(){c.attr("aria-expanded","true"),g.blockHide=!0},close:function(){c.attr("aria-expanded","false"),g.blockHide=!1},minLength:2,position:{my:"left top+2"},messages:{noResults:"undefined"!=typeof window.uiAutocompleteL10n?window.uiAutocompleteL10n.noResults:"",results:function(a){return"undefined"!=typeof window.uiAutocompleteL10n?a>1?window.uiAutocompleteL10n.manyResults.replace("%d",a):window.uiAutocompleteL10n.oneResult:void 0}}}).autocomplete("instance")._renderItem=function(a,b){return m('<li role="option" id="mce-wp-autocomplete-'+b.ID+'">').append("<span>"+b.title+'</span>&nbsp;<span class="wp-editor-float-right">'+b.info+"</span>").appendTo(a)},c.attr({role:"combobox","aria-autocomplete":"list","aria-expanded":"false","aria-owns":c.autocomplete("widget").attr("id")}).on("focus",function(){var a=c.val();a&&!/^https?:/.test(a)&&c.autocomplete("search")}).autocomplete("widget").addClass("wplink-autocomplete").attr("role","listbox").removeAttr("tabindex").on("menufocus",function(a,b){b.item.attr("aria-selected","true")}).on("menublur",function(){m(this).find('[aria-selected="true"]').removeAttr("aria-selected")})),a.$(h).on("keydown",function(a){13===a.keyCode&&(b.execCommand("wp_link_apply"),a.preventDefault())})}}),b.on("wptoolbar",function(c){var d,e,j,k=b.dom.getParent(c.element,"a");return a.$(document.body).hasClass("modal-open")?void(g.tempHide=!0):(g.tempHide=!1,void(k&&(d=b.$(k),e=d.attr("href"),j=d.attr("data-wplink-edit"),"_wp_link_placeholder"===e||j?("_wp_link_placeholder"===e||i.getURL()||i.setURL(e),c.element=k,c.toolbar=g):e&&!d.find("img").length&&(h.setURL(e),c.element=k,c.toolbar=f))))}),b.addButton("wp_link_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",cmd:"WP_Link"}),b.addButton("wp_link_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",cmd:"unlink"}),b.addButton("wp_link_advanced",{tooltip:"Link options",icon:"dashicon dashicons-admin-generic",onclick:function(){if("undefined"!=typeof window.wpLink){var c=i.getURL()||null,d=i.getLinkText()||null;a.Env.ie&&b.focus(),window.wpLink.open(b.id,c,d,j),g.tempHide=!0,i.reset()}}}),b.addButton("wp_link_apply",{tooltip:"Apply",icon:"dashicon dashicons-editor-break",cmd:"wp_link_apply",classes:"widget btn primary"}),{close:function(){g.tempHide=!1,b.execCommand("wp_link_cancel")}}})}(window.tinymce);
\ No newline at end of file
+!function(a){a.ui.WPLinkPreview=a.ui.Control.extend({url:"#",renderHtml:function(){return'<div id="'+this._id+'" class="wp-link-preview"><a href="'+this.url+'" target="_blank" tabindex="-1">'+this.url+"</a></div>"},setURL:function(b){var c,d;this.url!==b&&(this.url=b,b=window.decodeURIComponent(b),b=b.replace(/^(?:https?:)?\/\/(?:www\.)?/,""),(c=b.indexOf("?"))!==-1&&(b=b.slice(0,c)),(c=b.indexOf("#"))!==-1&&(b=b.slice(0,c)),b=b.replace(/(?:index)?\.html$/,""),"/"===b.charAt(b.length-1)&&(b=b.slice(0,-1)),""===b&&(b=this.url),b.length>40&&(c=b.indexOf("/"))!==-1&&(d=b.lastIndexOf("/"))!==-1&&d!==c&&(c+b.length-d<40&&(d=-(40-(c+1))),b=b.slice(0,c+1)+"\u2026"+b.slice(d)),a.$(this.getEl().firstChild).attr("href",this.url).text(b))}}),a.ui.WPLinkInput=a.ui.Control.extend({renderHtml:function(){return'<div id="'+this._id+'" class="wp-link-input"><input type="text" value="" placeholder="'+a.translate("Paste URL or type to search")+'" /><input type="text" style="display:none" value="" /></div>'},setURL:function(a){this.getEl().firstChild.value=a},getURL:function(){return a.trim(this.getEl().firstChild.value)},getLinkText:function(){var b=this.getEl().firstChild.nextSibling.value;return a.trim(b)?b.replace(/[\r\n\t ]+/g," "):""},reset:function(){var a=this.getEl().firstChild;a.value="",a.nextSibling.value=""}}),a.PluginManager.add("wplink",function(b){function c(){var a,c,d=b.selection.getNode(),e=b.dom.getParent(d,"a[href]");return e||(c=b.selection.getContent({format:"raw"}),c&&c.indexOf("</a>")!==-1&&(a=c.match(/href="([^">]+)"/),a&&a[1]&&(e=b.$('a[href="'+a[1]+'"]',d)[0]),e&&b.selection.select(e))),e}function d(){b.$("a").each(function(a,c){var d=b.$(c);"_wp_link_placeholder"===d.attr("href")?b.dom.remove(c,!0):d.attr("data-wplink-edit")&&d.attr("data-wplink-edit",null)})}function e(a,b){return a.replace(/(<a [^>]+>)([\s\S]*?)<\/a>/g,function(a,c,d){return c.indexOf(' href="_wp_link_placeholder"')>-1?d:(b&&(c=c.replace(/ data-wplink-edit="true"/g,"")),c=c.replace(/ data-wplink-url-error="true"/g,""),c+d+"</a>")})}function f(a){var c=b.$(a),d=c.attr("href");d&&"undefined"!=typeof n&&(s=!1,!/^http/i.test(d)||p.test(d)&&q.test(d)?c.removeAttr("data-wplink-url-error"):(s=!0,c.attr("data-wplink-url-error","true"),r(b.translate("Warning: the link has been inserted but may have errors. Please test it."),"assertive")))}var g,h,i,j,k,l,m,n=window.jQuery,o=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i,p=/^https?:\/\/([^\s/?.#-][^\s\/?.#]*\.?)+(\/[^\s"]*)?$/i,q=/^https?:\/\/[^\/]+\.[^\/]+($|\/)/i,r="undefined"!=typeof window.wp&&window.wp.a11y&&window.wp.a11y.speak?window.wp.a11y.speak:function(){},s=!1;return b.on("preinit",function(){if(b.wp&&b.wp._createToolbar){g=b.wp._createToolbar(["wp_link_preview","wp_link_edit","wp_link_remove"],!0);var a=["wp_link_input","wp_link_apply"];"undefined"!=typeof window.wpLink&&a.push("wp_link_advanced"),h=b.wp._createToolbar(a,!0),h.on("show",function(){"undefined"!=typeof window.wpLink&&window.wpLink.modalOpen||window.setTimeout(function(){var a=h.$el.find("input.ui-autocomplete-input")[0],b=k&&(k.textContent||k.innerText);a&&(!a.value&&b&&"undefined"!=typeof window.wpLink&&(a.value=window.wpLink.getUrlFromSelection(b)),l||(a.focus(),a.select()))})}),h.on("hide",function(){h.scrolling||b.execCommand("wp_link_cancel")})}}),b.addCommand("WP_Link",function(){return a.Env.ie&&a.Env.ie<10&&"undefined"!=typeof window.wpLink?void window.wpLink.open(b.id):(k=c(),h.tempHide=!1,void(k?b.dom.setAttribs(k,{"data-wplink-edit":!0}):(d(),b.execCommand("mceInsertLink",!1,{href:"_wp_link_placeholder"}),k=b.$('a[href="_wp_link_placeholder"]')[0],b.nodeChanged())))}),b.addCommand("wp_link_apply",function(){if(!h.scrolling){var c,d;if(k){if(c=j.getURL(),d=j.getLinkText(),b.focus(),!c)return void b.dom.remove(k,!0);/^(?:[a-z]+:|#|\?|\.|\/)/.test(c)||o.test(c)||(c="http://"+c),b.dom.setAttribs(k,{href:c,"data-wplink-edit":null}),a.trim(k.innerHTML)||b.$(k).text(d||c),f(k)}j.reset(),b.nodeChanged(),"undefined"==typeof window.wpLinkL10n||s||r(window.wpLinkL10n.linkInserted)}}),b.addCommand("wp_link_cancel",function(){h.tempHide||(j.reset(),d())}),b.addCommand("wp_unlink",function(){b.execCommand("unlink"),h.tempHide=!1,b.execCommand("wp_link_cancel")}),b.addShortcut("access+a","","WP_Link"),b.addShortcut("access+s","","wp_unlink"),b.addShortcut("meta+k","","WP_Link"),b.addButton("link",{icon:"link",tooltip:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]"}),b.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink"}),b.addMenuItem("link",{icon:"link",text:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]",context:"insert",prependToContext:!0}),b.on("pastepreprocess",function(c){var d=c.content,e=/^(?:https?:)?\/\/\S+$/i;b.selection.isCollapsed()||e.test(b.selection.getContent())||(d=d.replace(/<[^>]+>/g,""),d=a.trim(d),e.test(d)&&(b.execCommand("mceInsertLink",!1,{href:b.dom.decode(d)}),c.preventDefault()))}),b.on("savecontent",function(a){a.content=e(a.content,!0)}),b.on("BeforeAddUndo",function(a){a.lastLevel&&a.lastLevel.content&&a.level.content&&a.lastLevel.content===e(a.level.content)&&a.preventDefault()}),b.on("keydown",function(c){27===c.keyCode&&b.execCommand("wp_link_cancel"),c.altKey||a.Env.mac&&(!c.metaKey||c.ctrlKey)||!a.Env.mac&&!c.ctrlKey||89!==c.keyCode&&90!==c.keyCode||(l=!0,window.clearTimeout(m),m=window.setTimeout(function(){l=!1},500))}),b.addButton("wp_link_preview",{type:"WPLinkPreview",onPostRender:function(){i=this}}),b.addButton("wp_link_input",{type:"WPLinkInput",onPostRender:function(){var c,d,e,f=this.getEl(),g=f.firstChild;j=this,n&&n.ui&&n.ui.autocomplete&&(c=n(g),c.on("keydown",function(){c.removeAttr("aria-activedescendant")}).autocomplete({source:function(a,b){return e===a.term?void b(d):/^https?:/.test(a.term)||a.term.indexOf(".")!==-1?b():(n.post(window.ajaxurl,{action:"wp-link-ajax",page:1,search:a.term,_ajax_linking_nonce:n("#_ajax_linking_nonce").val()},function(a){d=a,b(a)},"json"),void(e=a.term))},focus:function(a,b){c.attr("aria-activedescendant","mce-wp-autocomplete-"+b.item.ID),a.preventDefault()},select:function(a,b){return c.val(b.item.permalink),n(f.firstChild.nextSibling).val(b.item.title),9===a.keyCode&&"undefined"!=typeof window.wpLinkL10n&&r(window.wpLinkL10n.linkSelected),!1},open:function(){c.attr("aria-expanded","true"),h.blockHide=!0},close:function(){c.attr("aria-expanded","false"),h.blockHide=!1},minLength:2,position:{my:"left top+2"},messages:{noResults:"undefined"!=typeof window.uiAutocompleteL10n?window.uiAutocompleteL10n.noResults:"",results:function(a){if("undefined"!=typeof window.uiAutocompleteL10n)return a>1?window.uiAutocompleteL10n.manyResults.replace("%d",a):window.uiAutocompleteL10n.oneResult}}}).autocomplete("instance")._renderItem=function(a,b){return n('<li role="option" id="mce-wp-autocomplete-'+b.ID+'">').append("<span>"+b.title+'</span>&nbsp;<span class="wp-editor-float-right">'+b.info+"</span>").appendTo(a)},c.attr({role:"combobox","aria-autocomplete":"list","aria-expanded":"false","aria-owns":c.autocomplete("widget").attr("id")}).on("focus",function(){var a=c.val();a&&!/^https?:/.test(a)&&c.autocomplete("search")}).autocomplete("widget").addClass("wplink-autocomplete").attr("role","listbox").removeAttr("tabindex").on("menufocus",function(a,b){b.item.attr("aria-selected","true")}).on("menublur",function(){n(this).find('[aria-selected="true"]').removeAttr("aria-selected")})),a.$(g).on("keydown",function(a){13===a.keyCode&&(b.execCommand("wp_link_apply"),a.preventDefault())})}}),b.on("wptoolbar",function(a){var c,d,e,f=b.dom.getParent(a.element,"a");return"undefined"!=typeof window.wpLink&&window.wpLink.modalOpen?void(h.tempHide=!0):(h.tempHide=!1,void(f?(c=b.$(f),d=c.attr("href"),e=c.attr("data-wplink-edit"),"_wp_link_placeholder"===d||e?("_wp_link_placeholder"===d||j.getURL()||j.setURL(d),a.element=f,a.toolbar=h):d&&!c.find("img").length&&(i.setURL(d),a.element=f,a.toolbar=g,"true"===c.attr("data-wplink-url-error")?g.$el.find(".wp-link-preview a").addClass("wplink-url-error"):(g.$el.find(".wp-link-preview a").removeClass("wplink-url-error"),s=!1))):h.visible()&&b.execCommand("wp_link_cancel")))}),b.addButton("wp_link_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",cmd:"WP_Link"}),b.addButton("wp_link_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",cmd:"wp_unlink"}),b.addButton("wp_link_advanced",{tooltip:"Link options",icon:"dashicon dashicons-admin-generic",onclick:function(){if("undefined"!=typeof window.wpLink){var c=j.getURL()||null,d=j.getLinkText()||null;a.Env.ie&&b.focus(),window.wpLink.open(b.id,c,d,k),h.tempHide=!0,j.reset()}}}),b.addButton("wp_link_apply",{tooltip:"Apply",icon:"dashicon dashicons-editor-break",cmd:"wp_link_apply",classes:"widget btn primary"}),{close:function(){h.tempHide=!1,b.execCommand("wp_link_cancel")},checkLink:f}})}(window.tinymce);
\ No newline at end of file
index d68904afb1084c037ba8f4318967221a94d56ca8..5f3ff1a827f88b18198653cb1e30f29b47e1b651 100644 (file)
                        if ( event.keyCode === VK.ENTER && ! VK.modifierPressed( event ) ) {
                                enter();
                        }
-               }, true );
 
-               editor.on( 'keyup', function( event ) {
+                       // Wait for the browser to insert the character.
                        if ( event.keyCode === VK.SPACEBAR && ! event.ctrlKey && ! event.metaKey && ! event.altKey ) {
-                               space();
+                               setTimeout( space );
                        } else if ( event.keyCode > 47 && ! ( event.keyCode >= 91 && event.keyCode <= 93 ) ) {
-                               inline();
+                               setTimeout( inline );
                        }
-               } );
+               }, true );
 
                function inline() {
                        var rng = editor.selection.getRng();
index 6c9daa4d1b9c1209e07b4397f829f1ec27454743..9de68ef33d39bf50bfb4809439d124784877e01c 100644 (file)
@@ -1 +1 @@
-!function(a,b){a.Env.ie&&a.Env.ie<9||a.PluginManager.add("wptextpattern",function(c){function d(){function d(a){for(var b,c=m.length;c--;)if(g=m[c],b=a.data.indexOf(g.end),-1!==b)return b}var e,f,g,h,j,k=c.selection.getRng(),l=k.startContainer,o=k.startOffset;l&&3===l.nodeType&&l.data.length&&o&&-1!==a.inArray(n,l.data.charAt(o-1))&&(e=d(l),f=l.data.lastIndexOf(g.end),e!==f&&-1!==f&&(f-e<=g.start.length||-1===l.data.slice(e+g.start.length,f).indexOf(g.start.slice(0,1))&&(h=c.formatter.get(g.format),h&&h[0].inline&&(c.undoManager.add(),c.undoManager.transact(function(){l.insertData(o,"\u200b"),l=l.splitText(e),j=l.splitText(o-e),l.deleteData(0,g.start.length),l.deleteData(l.data.length-g.end.length,g.end.length),c.formatter.apply(g.format,{},l),c.selection.setCursorLocation(j,1)}),b(function(){i="space",c.once("selectionchange",function(){var a;j&&(a=j.data.indexOf("\u200b"),-1!==a&&j.deleteData(a,a+1))})})))))}function e(a){var b,d=c.dom.getParent(a,"p");if(d){for(;(b=d.firstChild)&&3!==b.nodeType;)d=b;if(b)return b.data||(b=b.nextSibling&&3===b.nextSibling.nodeType?b.nextSibling:null),b}}function f(){var d,f,g=c.selection.getRng(),h=g.startContainer;h&&e(h)===h&&(d=h.parentNode,f=h.data,a.each(k,function(a){var e=f.match(a.regExp);if(e&&g.startOffset===e[0].length)return c.undoManager.add(),c.undoManager.transact(function(){h.deleteData(0,e[0].length),d.innerHTML||d.appendChild(document.createElement("br")),c.selection.setCursorLocation(d),c.execCommand(a.cmd)}),b(function(){i="space"}),!1}))}function g(){var d,f,g,j=c.selection.getRng(),k=j.startContainer,m=e(k),n=l.length;if(m){for(d=m.data;n--;)if(l[n].start){if(0===d.indexOf(l[n].start)){f=l[n];break}}else if(l[n].regExp&&l[n].regExp.test(d)){f=l[n];break}f&&(m!==k||a.trim(d)!==f.start)&&c.once("keyup",function(){c.undoManager.add(),c.undoManager.transact(function(){f.format?(c.formatter.apply(f.format,{},m),m.replaceData(0,m.data.length,h(m.data.slice(f.start.length)))):f.element&&(g=m.parentNode&&m.parentNode.parentNode,g&&g.replaceChild(document.createElement(f.element),m.parentNode))}),b(function(){i="enter"})})}}function h(a){return a?a.replace(/^\s+/,""):""}var i,j=a.util.VK,k=[{regExp:/^[*-]\s/,cmd:"InsertUnorderedList"},{regExp:/^1[.)]\s/,cmd:"InsertOrderedList"}],l=[{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:">",format:"blockquote"},{regExp:/^(-){3,}$/,element:"hr"}],m=[{start:"`",end:"`",format:"code"}],n=[];a.each(m,function(b){a.each((b.start+b.end).split(""),function(b){-1===a.inArray(n,b)&&n.push(b)})}),c.on("selectionchange",function(){i=null}),c.on("keydown",function(a){(i&&27===a.keyCode||"space"===i&&a.keyCode===j.BACKSPACE)&&(c.undoManager.undo(),a.preventDefault(),a.stopImmediatePropagation()),a.keyCode!==j.ENTER||j.modifierPressed(a)||g()},!0),c.on("keyup",function(a){a.keyCode!==j.SPACEBAR||a.ctrlKey||a.metaKey||a.altKey?a.keyCode>47&&!(a.keyCode>=91&&a.keyCode<=93)&&d():f()})})}(window.tinymce,window.setTimeout);
\ No newline at end of file
+!function(a,b){a.Env.ie&&a.Env.ie<9||a.PluginManager.add("wptextpattern",function(c){function d(){function d(a){for(var b,c=m.length;c--;)if(g=m[c],b=a.data.indexOf(g.end),b!==-1)return b}var e,f,g,h,j,k=c.selection.getRng(),l=k.startContainer,o=k.startOffset;l&&3===l.nodeType&&l.data.length&&o&&a.inArray(n,l.data.charAt(o-1))!==-1&&(e=d(l),f=l.data.lastIndexOf(g.end),e!==f&&f!==-1&&(f-e<=g.start.length||l.data.slice(e+g.start.length,f).indexOf(g.start.slice(0,1))===-1&&(h=c.formatter.get(g.format),h&&h[0].inline&&(c.undoManager.add(),c.undoManager.transact(function(){l.insertData(o,"\u200b"),l=l.splitText(e),j=l.splitText(o-e),l.deleteData(0,g.start.length),l.deleteData(l.data.length-g.end.length,g.end.length),c.formatter.apply(g.format,{},l),c.selection.setCursorLocation(j,1)}),b(function(){i="space",c.once("selectionchange",function(){var a;j&&(a=j.data.indexOf("\u200b"),a!==-1&&j.deleteData(a,a+1))})})))))}function e(a){var b,d=c.dom.getParent(a,"p");if(d){for(;(b=d.firstChild)&&3!==b.nodeType;)d=b;if(b)return b.data||(b=b.nextSibling&&3===b.nextSibling.nodeType?b.nextSibling:null),b}}function f(){var d,f,g=c.selection.getRng(),h=g.startContainer;h&&e(h)===h&&(d=h.parentNode,f=h.data,a.each(k,function(a){var e=f.match(a.regExp);if(e&&g.startOffset===e[0].length)return c.undoManager.add(),c.undoManager.transact(function(){h.deleteData(0,e[0].length),d.innerHTML||d.appendChild(document.createElement("br")),c.selection.setCursorLocation(d),c.execCommand(a.cmd)}),b(function(){i="space"}),!1}))}function g(){var d,f,g,j=c.selection.getRng(),k=j.startContainer,m=e(k),n=l.length;if(m){for(d=m.data;n--;)if(l[n].start){if(0===d.indexOf(l[n].start)){f=l[n];break}}else if(l[n].regExp&&l[n].regExp.test(d)){f=l[n];break}f&&(m===k&&a.trim(d)===f.start||c.once("keyup",function(){c.undoManager.add(),c.undoManager.transact(function(){f.format?(c.formatter.apply(f.format,{},m),m.replaceData(0,m.data.length,h(m.data.slice(f.start.length)))):f.element&&(g=m.parentNode&&m.parentNode.parentNode,g&&g.replaceChild(document.createElement(f.element),m.parentNode))}),b(function(){i="enter"})}))}}function h(a){return a?a.replace(/^\s+/,""):""}var i,j=a.util.VK,k=[{regExp:/^[*-]\s/,cmd:"InsertUnorderedList"},{regExp:/^1[.)]\s/,cmd:"InsertOrderedList"}],l=[{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:">",format:"blockquote"},{regExp:/^(-){3,}$/,element:"hr"}],m=[{start:"`",end:"`",format:"code"}],n=[];a.each(m,function(b){a.each((b.start+b.end).split(""),function(b){a.inArray(n,b)===-1&&n.push(b)})}),c.on("selectionchange",function(){i=null}),c.on("keydown",function(a){(i&&27===a.keyCode||"space"===i&&a.keyCode===j.BACKSPACE)&&(c.undoManager.undo(),a.preventDefault(),a.stopImmediatePropagation()),a.keyCode!==j.ENTER||j.modifierPressed(a)||g(),a.keyCode!==j.SPACEBAR||a.ctrlKey||a.metaKey||a.altKey?a.keyCode>47&&!(a.keyCode>=91&&a.keyCode<=93)&&b(d):b(f)},!0)})}(window.tinymce,window.setTimeout);
\ No newline at end of file
index 61f34bc4b444d5a9dcd15d2f76ace3f90e44b07c..2fc0e4b3d858bceae3657e8a926f589ab38e8906 100644 (file)
-/* global tinymce */
-
 /**
  * WordPress View plugin.
  */
-tinymce.PluginManager.add( 'wpview', function( editor ) {
-       var $ = editor.$,
-               selected,
-               Env = tinymce.Env,
-               VK = tinymce.util.VK,
-               TreeWalker = tinymce.dom.TreeWalker,
-               toRemove = false,
-               firstFocus = true,
-               _noop = function() { return false; },
-               isios = /iPad|iPod|iPhone/.test( navigator.userAgent ),
-               cursorInterval,
-               lastKeyDownNode,
-               setViewCursorTries,
-               focus,
-               execCommandView,
-               execCommandBefore,
-               toolbar;
-
-       function getView( node ) {
-               return getParent( node, 'wpview-wrap' );
-       }
-
-       /**
-        * Returns the node or a parent of the node that has the passed className.
-        * Doing this directly is about 40% faster
-        */
-       function getParent( node, className ) {
-               while ( node && node.parentNode ) {
-                       if ( node.className && ( ' ' + node.className + ' ' ).indexOf( ' ' + className + ' ' ) !== -1 ) {
-                               return node;
-                       }
-
-                       node = node.parentNode;
-               }
-
-               return false;
-       }
-
-       function _stop( event ) {
-               event.stopPropagation();
-       }
-
-       function setViewCursor( before, view ) {
-               var location = before ? 'before' : 'after',
-                       offset = before ? 0 : 1;
-               deselect();
-               editor.selection.setCursorLocation( editor.dom.select( '.wpview-selection-' + location, view )[0], offset );
-               editor.nodeChanged();
-       }
-
-       function handleEnter( view, before, key ) {
-               var dom = editor.dom,
-                       padNode = dom.create( 'p' );
-
-               if ( ! ( Env.ie && Env.ie < 11 ) ) {
-                       padNode.innerHTML = '<br data-mce-bogus="1">';
-               }
+( function( tinymce, wp ) {
+       tinymce.PluginManager.add( 'wpview', function( editor ) {
+               function noop () {}
 
-               if ( before ) {
-                       view.parentNode.insertBefore( padNode, view );
-               } else {
-                       dom.insertAfter( padNode, view );
+               if ( ! wp || ! wp.mce || ! wp.mce.views ) {
+                       return {
+                               getView: noop
+                       };
                }
 
-               deselect();
-
-               if ( before && key === VK.ENTER ) {
-                       setViewCursor( before, view );
-               } else {
-                       editor.selection.setCursorLocation( padNode, 0 );
-               }
-
-               editor.nodeChanged();
-       }
-
-       function removeView( view ) {
-               editor.undoManager.transact( function() {
-                       handleEnter( view );
-                       wp.mce.views.remove( editor, view );
-               });
-       }
-
-       function select( viewNode ) {
-               var clipboard,
-                       dom = editor.dom;
-
-               if ( ! viewNode ) {
-                       return;
+               // Check if a node is a view or not.
+               function isView( node ) {
+                       return editor.dom.hasClass( node, 'wpview' );
                }
 
-               if ( viewNode !== selected ) {
-                       // Make sure that the editor is focused.
-                       // It is possible that the editor is not focused when the mouse event fires
-                       // without focus, the selection will not work properly.
-                       editor.getBody().focus();
-
-                       deselect();
-                       selected = viewNode;
-                       dom.setAttrib( viewNode, 'data-mce-selected', 1 );
-
-                       clipboard = dom.create( 'div', {
-                               'class': 'wpview-clipboard',
-                               'contenteditable': 'true'
-                       }, wp.mce.views.getText( viewNode ) );
-
-                       editor.dom.select( '.wpview-body', viewNode )[0].appendChild( clipboard );
-
-                       // Both of the following are necessary to prevent manipulating the selection/focus
-                       dom.bind( clipboard, 'beforedeactivate focusin focusout', _stop );
-                       dom.bind( selected, 'beforedeactivate focusin focusout', _stop );
-
-                       // select the hidden div
-                       if ( isios ) {
-                               editor.selection.select( clipboard );
-                       } else {
-                               editor.selection.select( clipboard, true );
+               // Replace view tags with their text.
+               function resetViews( content ) {
+                       function callback( match, $1 ) {
+                               return '<p>' + window.decodeURIComponent( $1 ) + '</p>';
                        }
-               }
-
-               editor.nodeChanged();
-               editor.fire( 'wpview-selected', viewNode );
-       }
-
-       /**
-        * Deselect a selected view and remove clipboard
-        */
-       function deselect() {
-               var clipboard,
-                       dom = editor.dom;
-
-               if ( selected ) {
-                       clipboard = editor.dom.select( '.wpview-clipboard', selected )[0];
-                       dom.unbind( clipboard );
-                       dom.remove( clipboard );
-
-                       dom.unbind( selected, 'beforedeactivate focusin focusout click mouseup', _stop );
-                       dom.setAttrib( selected, 'data-mce-selected', null );
-               }
-
-               selected = null;
-       }
-
-       // Check if the `wp.mce` API exists.
-       if ( typeof wp === 'undefined' || ! wp.mce ) {
-               return {
-                       getView: _noop
-               };
-       }
-
-       function resetViewsCallback( match, viewText ) {
-               return '<p>' + window.decodeURIComponent( viewText ) + '</p>';
-       }
-
-       // Replace the view tags with the view string
-       function resetViews( content ) {
-               return content.replace( /<div[^>]+data-wpview-text="([^"]+)"[^>]*>(?:[\s\S]+?wpview-selection-after[^>]+>[^<>]*<\/p>\s*|\.)<\/div>/g, resetViewsCallback )
-                       .replace( /<p [^>]*?data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g, resetViewsCallback );
-       }
-
-       // Prevent adding undo levels on changes inside a view wrapper
-       editor.on( 'BeforeAddUndo', function( event ) {
-               if ( event.level.content ) {
-                       event.level.content = resetViews( event.level.content );
-               }
-       });
-
-       // When the editor's content changes, scan the new content for
-       // matching view patterns, and transform the matches into
-       // view wrappers.
-       editor.on( 'BeforeSetContent', function( event ) {
-               var node;
-
-               if ( ! event.selection ) {
-                       wp.mce.views.unbind();
-               }
 
-               if ( ! event.content ) {
-                       return;
-               }
-
-               if ( ! event.load ) {
-                       if ( selected ) {
-                               removeView( selected );
+                       if ( ! content ) {
+                               return content;
                        }
 
-                       node = editor.selection.getNode();
-
-                       if ( node && node !== editor.getBody() && /^\s*https?:\/\/\S+\s*$/i.test( event.content ) ) {
-                               // When a url is pasted or inserted, only try to embed it when it is in an empty paragrapgh.
-                               node = editor.dom.getParent( node, 'p' );
-
-                               if ( node && /^[\s\uFEFF\u00A0]*$/.test( $( node ).text() || '' ) ) {
-                                       // Make sure there are no empty inline elements in the <p>
-                                       node.innerHTML = '';
-                               } else {
-                                       return;
-                               }
-                       }
+                       return content
+                               .replace( /<div[^>]+data-wpview-text="([^"]+)"[^>]*>(?:\.|[\s\S]+?wpview-end[^>]+>\s*<\/span>\s*)?<\/div>/g, callback )
+                               .replace( /<p[^>]+data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g, callback );
                }
 
-               event.content = wp.mce.views.setMarkers( event.content );
-       });
-
-       // When pasting strip all tags and check if the string is an URL.
-       // Then replace the pasted content with the cleaned URL.
-       editor.on( 'pastePreProcess', function( event ) {
-               var pastedStr = event.content;
-
-               if ( pastedStr ) {
-                       pastedStr = tinymce.trim( pastedStr.replace( /<[^>]+>/g, '' ) );
+               editor.on( 'init', function() {
+                       var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
 
-                       if ( /^https?:\/\/\S+$/i.test( pastedStr ) ) {
-                               event.content = pastedStr;
+                       if ( MutationObserver ) {
+                               new MutationObserver( function() {
+                                       editor.fire( 'wp-body-class-change' );
+                               } )
+                               .observe( editor.getBody(), {
+                                       attributes: true,
+                                       attributeFilter: ['class']
+                               } );
                        }
-               }
-       });
-
-       // When the editor's content has been updated and the DOM has been
-       // processed, render the views in the document.
-       editor.on( 'SetContent', function() {
-               wp.mce.views.render();
-       });
-
-       // Set the cursor before or after a view when clicking next to it.
-       editor.on( 'click', function( event ) {
-               var x = event.clientX,
-                       y = event.clientY,
-                       body = editor.getBody(),
-                       bodyRect = body.getBoundingClientRect(),
-                       first = body.firstChild,
-                       last = body.lastChild,
-                       firstRect, lastRect, view;
-
-               if ( ! first || ! last ) {
-                       return;
-               }
 
-               firstRect = first.getBoundingClientRect();
-               lastRect = last.getBoundingClientRect();
-
-               if ( y < firstRect.top && ( view = getView( first ) ) ) {
-                       setViewCursor( true, view );
-                       event.preventDefault();
-               } else if ( y > lastRect.bottom && ( view = getView( last ) ) ) {
-                       setViewCursor( false, view );
-                       event.preventDefault();
-               } else if ( x < bodyRect.left || x > bodyRect.right ) {
-                       tinymce.each( editor.dom.select( '.wpview-wrap' ), function( view ) {
-                               var rect = view.getBoundingClientRect();
-
-                               if ( y < rect.top ) {
-                                       return false;
-                               }
+                       // Pass on body class name changes from the editor to the wpView iframes.
+                       editor.on( 'wp-body-class-change', function() {
+                               var className = editor.getBody().className;
 
-                               if ( y >= rect.top && y <= rect.bottom ) {
-                                       if ( x < bodyRect.left ) {
-                                               setViewCursor( true, view );
-                                               event.preventDefault();
-                                       } else if ( x > bodyRect.right ) {
-                                               setViewCursor( false, view );
-                                               event.preventDefault();
+                               editor.$( 'iframe[class="wpview-sandbox"]' ).each( function( i, iframe ) {
+                                       // Make sure it is a local iframe
+                                       // jshint scripturl: true
+                                       if ( ! iframe.src || iframe.src === 'javascript:""' ) {
+                                               try {
+                                                       iframe.contentWindow.document.body.className = className;
+                                               } catch( er ) {}
                                        }
+                               });
+                       } );
+               });
 
-                                       return false;
-                               }
-                       });
-               }
-       });
-
-       editor.on( 'init', function() {
-               var scrolled = false,
-                       selection = editor.selection,
-                       MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
-
-               // When a view is selected, ensure content that is being pasted
-               // or inserted is added to a text node (instead of the view).
-               editor.on( 'BeforeSetContent', function() {
-                       var walker, target,
-                               view = getView( selection.getNode() );
+               // Scan new content for matching view patterns and replace them with markers.
+               editor.on( 'beforesetcontent', function( event ) {
+                       var node;
 
-                       // If the selection is not within a view, bail.
-                       if ( ! view ) {
-                               return;
+                       if ( ! event.selection ) {
+                               wp.mce.views.unbind();
                        }
 
-                       if ( ! view.nextSibling || getView( view.nextSibling ) ) {
-                               // If there are no additional nodes or the next node is a
-                               // view, create a text node after the current view.
-                               target = editor.getDoc().createTextNode('');
-                               editor.dom.insertAfter( target, view );
-                       } else {
-                               // Otherwise, find the next text node.
-                               walker = new TreeWalker( view.nextSibling, view.nextSibling );
-                               target = walker.next();
+                       if ( ! event.content ) {
+                               return;
                        }
 
-                       // Select the `target` text node.
-                       selection.select( target );
-                       selection.collapse( true );
-               });
-
-               editor.dom.bind( editor.getDoc(), 'touchmove', function() {
-                       scrolled = true;
-               });
-
-               editor.on( 'mousedown mouseup click touchend', function( event ) {
-                       var view = getView( event.target );
-
-                       firstFocus = false;
-
-                       // Contain clicks inside the view wrapper
-                       if ( view ) {
-                               event.stopImmediatePropagation();
-                               event.preventDefault();
+                       if ( ! event.load ) {
+                               node = editor.selection.getNode();
 
-                               if ( event.type === 'touchend' && scrolled ) {
-                                       scrolled = false;
-                               } else {
-                                       select( view );
-                               }
+                               if ( node && node !== editor.getBody() && /^\s*https?:\/\/\S+\s*$/i.test( event.content ) ) {
+                                       // When a url is pasted or inserted, only try to embed it when it is in an empty paragrapgh.
+                                       node = editor.dom.getParent( node, 'p' );
 
-                               // Returning false stops the ugly bars from appearing in IE11 and stops the view being selected as a range in FF.
-                               // Unfortunately, it also inhibits the dragging of views to a new location.
-                               return false;
-                       } else {
-                               if ( event.type === 'touchend' || event.type === 'mousedown' ) {
-                                       deselect();
+                                       if ( node && /^[\s\uFEFF\u00A0]*$/.test( editor.$( node ).text() || '' ) ) {
+                                               // Make sure there are no empty inline elements in the <p>
+                                               node.innerHTML = '';
+                                       } else {
+                                               return;
+                                       }
                                }
                        }
 
-                       if ( event.type === 'touchend' && scrolled ) {
-                               scrolled = false;
-                       }
-               }, true );
+                       event.content = wp.mce.views.setMarkers( event.content );
+               } );
 
-               if ( MutationObserver ) {
-                       new MutationObserver( function() {
-                               editor.fire( 'wp-body-class-change' );
-                       } )
-                       .observe( editor.getBody(), {
-                               attributes: true,
-                               attributeFilter: ['class']
+               // Replace any new markers nodes with views.
+               editor.on( 'setcontent', function() {
+                       wp.mce.views.render();
+               } );
+
+               // Empty view nodes for easier processing.
+               editor.on( 'preprocess', function( event ) {
+                       editor.$( 'div[data-wpview-text], p[data-wpview-marker]', event.node ).each( function( i, node ) {
+                               node.innerHTML = '.';
                        } );
-               }
+               }, true );
 
-               if ( tinymce.Env.ie ) {
-                       // Prevent resize handles in newer IE
-                       editor.dom.bind( editor.getBody(), 'controlselect mscontrolselect', function( event ) {
-                               if ( getView( event.target ) ) {
-                                       event.preventDefault();
-                               }
-                       });
-               }
-       });
+               // Replace views with their text.
+               editor.on( 'postprocess', function( event ) {
+                       event.content = resetViews( event.content );
+               } );
 
-       // Empty the wpview wrap and marker nodes
-       function emptyViewNodes( rootNode ) {
-               $( 'div[data-wpview-text], p[data-wpview-marker]', rootNode ).each( function( i, node ) {
-                       node.innerHTML = '.';
-               });
-       }
-
-       // Run that before the DOM cleanup
-       editor.on( 'PreProcess', function( event ) {
-               emptyViewNodes( event.node );
-       }, true );
-
-       editor.on( 'hide', function() {
-               wp.mce.views.unbind();
-               deselect();
-               emptyViewNodes();
-       });
-
-       editor.on( 'PostProcess', function( event ) {
-               if ( event.content ) {
-                       event.content = event.content.replace( /<div [^>]*?data-wpview-text="([^"]+)"[^>]*>[\s\S]*?<\/div>/g, resetViewsCallback )
-                               .replace( /<p [^>]*?data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g, resetViewsCallback );
-               }
-       });
-
-       // Excludes arrow keys, delete, backspace, enter, space bar.
-       // Ref: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.keyCode
-       function isSpecialKey( key ) {
-               return ( ( key <= 47 && key !== VK.SPACEBAR && key !== VK.ENTER && key !== VK.DELETE && key !== VK.BACKSPACE && ( key < 37 || key > 40 ) ) ||
-                       key >= 224 || // OEM or non-printable
-                       ( key >= 144 && key <= 150 ) || // Num Lock, Scroll Lock, OEM
-                       ( key >= 91 && key <= 93 ) || // Windows keys
-                       ( key >= 112 && key <= 135 ) ); // F keys
-       }
-
-       // (De)select views when arrow keys are used to navigate the content of the editor.
-       editor.on( 'keydown', function( event ) {
-               var key = event.keyCode,
-                       dom = editor.dom,
-                       selection = editor.selection,
-                       node, view, cursorBefore, cursorAfter,
-                       range, clonedRange, tempRange;
-
-               if ( selected ) {
-                       // Ignore key presses that involve the command or control key, but continue when in combination with backspace or v.
-                       // Also ignore the F# keys.
-                       if ( ( ( event.metaKey || event.ctrlKey ) && key !== VK.BACKSPACE && key !== 86 ) || ( key >= 112 && key <= 123 ) ) {
-                               // Remove the view when pressing cmd/ctrl+x on keyup, otherwise the browser can't copy the content.
-                               if ( ( event.metaKey || event.ctrlKey ) && key === 88 ) {
-                                       toRemove = selected;
-                               }
-                               return;
-                       }
-
-                       view = getView( selection.getNode() );
+               // Replace views with their text inside undo levels.
+               // This also prevents that new levels are added when there are changes inside the views.
+               editor.on( 'beforeaddundo', function( event ) {
+                       event.level.content = resetViews( event.level.content );
+               } );
 
-                       // If the caret is not within the selected view, deselect the view and bail.
-                       if ( view !== selected ) {
-                               deselect();
-                               return;
+               // Make sure views are copied as their text.
+               editor.on( 'drop objectselected', function( event ) {
+                       if ( isView( event.targetClone ) ) {
+                               event.targetClone = editor.getDoc().createTextNode(
+                                       window.decodeURIComponent( editor.dom.getAttrib( event.targetClone, 'data-wpview-text' ) )
+                               );
                        }
+               } );
 
-                       if ( key === VK.LEFT ) {
-                               setViewCursor( true, view );
-                               event.preventDefault();
-                       } else if ( key === VK.UP ) {
-                               if ( view.previousSibling ) {
-                                       if ( getView( view.previousSibling ) ) {
-                                               setViewCursor( true, view.previousSibling );
-                                       } else {
-                                               deselect();
-                                               selection.select( view.previousSibling, true );
-                                               selection.collapse();
-                                       }
-                               } else {
-                                       setViewCursor( true, view );
-                               }
-                               event.preventDefault();
-                       } else if ( key === VK.RIGHT ) {
-                               setViewCursor( false, view );
-                               event.preventDefault();
-                       } else if ( key === VK.DOWN ) {
-                               if ( view.nextSibling ) {
-                                       if ( getView( view.nextSibling ) ) {
-                                               setViewCursor( false, view.nextSibling );
-                                       } else {
-                                               deselect();
-                                               selection.setCursorLocation( view.nextSibling, 0 );
-                                       }
-                               } else {
-                                       setViewCursor( false, view );
-                               }
+               // Clean up URLs for easier processing.
+               editor.on( 'pastepreprocess', function( event ) {
+                       var content = event.content;
 
-                               event.preventDefault();
-                       // Ignore keys that don't insert anything.
-                       } else if ( ! isSpecialKey( key ) ) {
-                               removeView( selected );
+                       if ( content ) {
+                               content = tinymce.trim( content.replace( /<[^>]+>/g, '' ) );
 
-                               if ( key === VK.ENTER || key === VK.DELETE || key === VK.BACKSPACE ) {
-                                       event.preventDefault();
+                               if ( /^https?:\/\/\S+$/i.test( content ) ) {
+                                       event.content = content;
                                }
                        }
-               } else {
-                       if ( event.metaKey || event.ctrlKey || ( key >= 112 && key <= 123 ) ) {
-                               return;
-                       }
+               } );
 
-                       node = selection.getNode();
-                       lastKeyDownNode = node;
-                       view = getView( node );
-
-                       // Make sure we don't delete part of a view.
-                       // If the range ends or starts with the view, we'll need to trim it.
-                       if ( ! selection.isCollapsed() ) {
-                               range = selection.getRng();
-
-                               if ( view = getView( range.endContainer ) ) {
-                                       clonedRange = range.cloneRange();
-                                       selection.select( view.previousSibling, true );
-                                       selection.collapse();
-                                       tempRange = selection.getRng();
-                                       clonedRange.setEnd( tempRange.endContainer, tempRange.endOffset );
-                                       selection.setRng( clonedRange );
-                               } else if ( view = getView( range.startContainer ) ) {
-                                       clonedRange = range.cloneRange();
-                                       clonedRange.setStart( view.nextSibling, 0 );
-                                       selection.setRng( clonedRange );
-                               }
+               // Show the view type in the element path.
+               editor.on( 'resolvename', function( event ) {
+                       if ( isView( event.target ) ) {
+                               event.name = editor.dom.getAttrib( event.target, 'data-wpview-type' ) || 'object';
                        }
+               } );
 
-                       if ( ! view ) {
-                               // Make sure we don't eat any content.
-                               if ( event.keyCode === VK.BACKSPACE ) {
-                                       if ( editor.dom.isEmpty( node ) ) {
-                                               if ( view = getView( node.previousSibling ) ) {
-                                                       setViewCursor( false, view );
-                                                       editor.dom.remove( node );
-                                                       event.preventDefault();
-                                               }
-                                       } else if ( ( range = selection.getRng() ) &&
-                                                       range.startOffset === 0 &&
-                                                       range.endOffset === 0 &&
-                                                       ( view = getView( node.previousSibling ) ) ) {
-                                               setViewCursor( false, view );
-                                               event.preventDefault();
-                                       }
-                               }
-                               return;
-                       }
+               // See `media` plugin.
+               editor.on( 'click keyup', function() {
+                       var node = editor.selection.getNode();
 
-                       if ( ! ( ( cursorBefore = dom.hasClass( view, 'wpview-selection-before' ) ) ||
-                                       ( cursorAfter = dom.hasClass( view, 'wpview-selection-after' ) ) ) ) {
-                               return;
+                       if ( isView( node ) ) {
+                               if ( editor.dom.getAttrib( node, 'data-mce-selected' ) ) {
+                                       node.setAttribute( 'data-mce-selected', '2' );
+                               }
                        }
+               } );
 
-                       if ( isSpecialKey( key ) ) {
-                               // ignore
-                               return;
-                       }
+               editor.addButton( 'wp_view_edit', {
+                       tooltip: 'Edit ', // trailing space is needed, used for context
+                       icon: 'dashicon dashicons-edit',
+                       onclick: function() {
+                               var node = editor.selection.getNode();
 
-                       if ( ( cursorAfter && key === VK.UP ) || ( cursorBefore && key === VK.BACKSPACE ) ) {
-                               if ( view.previousSibling ) {
-                                       if ( getView( view.previousSibling ) ) {
-                                               setViewCursor( false, view.previousSibling );
-                                       } else {
-                                               if ( dom.isEmpty( view.previousSibling ) && key === VK.BACKSPACE ) {
-                                                       dom.remove( view.previousSibling );
-                                               } else {
-                                                       selection.select( view.previousSibling, true );
-                                                       selection.collapse();
-                                               }
-                                       }
-                               } else {
-                                       setViewCursor( true, view );
-                               }
-                               event.preventDefault();
-                       } else if ( cursorAfter && ( key === VK.DOWN || key === VK.RIGHT ) ) {
-                               if ( view.nextSibling ) {
-                                       if ( getView( view.nextSibling ) ) {
-                                               setViewCursor( key === VK.RIGHT, view.nextSibling );
-                                       } else {
-                                               selection.setCursorLocation( view.nextSibling, 0 );
-                                       }
-                               }
-                               event.preventDefault();
-                       } else if ( cursorBefore && ( key === VK.UP || key ===  VK.LEFT ) ) {
-                               if ( view.previousSibling ) {
-                                       if ( getView( view.previousSibling ) ) {
-                                               setViewCursor( key === VK.UP, view.previousSibling );
-                                       } else {
-                                               selection.select( view.previousSibling, true );
-                                               selection.collapse();
-                                       }
-                               }
-                               event.preventDefault();
-                       } else if ( cursorBefore && key === VK.DOWN ) {
-                               if ( view.nextSibling ) {
-                                       if ( getView( view.nextSibling ) ) {
-                                               setViewCursor( true, view.nextSibling );
-                                       } else {
-                                               selection.setCursorLocation( view.nextSibling, 0 );
-                                       }
-                               } else {
-                                       setViewCursor( false, view );
+                               if ( isView( node ) ) {
+                                       wp.mce.views.edit( editor, node );
                                }
-                               event.preventDefault();
-                       } else if ( ( cursorAfter && key === VK.LEFT ) || ( cursorBefore && key === VK.RIGHT ) ) {
-                               select( view );
-                               event.preventDefault();
-                       } else if ( cursorAfter && key === VK.BACKSPACE ) {
-                               removeView( view );
-                               event.preventDefault();
-                       } else if ( cursorAfter ) {
-                               handleEnter( view );
-                       } else if ( cursorBefore ) {
-                               handleEnter( view , true, key );
                        }
+               } );
 
-                       if ( key === VK.ENTER ) {
-                               event.preventDefault();
+               editor.addButton( 'wp_view_remove', {
+                       tooltip: 'Remove',
+                       icon: 'dashicon dashicons-no',
+                       onclick: function() {
+                               editor.fire( 'cut' );
                        }
-               }
-       });
-
-       editor.on( 'keyup', function() {
-               if ( toRemove ) {
-                       removeView( toRemove );
-                       toRemove = false;
-               }
-       });
-
-       editor.on( 'focus', function() {
-               var view;
+               } );
 
-               focus = true;
-               editor.dom.addClass( editor.getBody(), 'has-focus' );
+               editor.once( 'preinit', function() {
+                       var toolbar;
 
-               // Edge case: show the fake caret when the editor is focused for the first time
-               // and the first element is a view.
-               if ( firstFocus && ( view = getView( editor.getBody().firstChild ) ) ) {
-                       setViewCursor( true, view );
-               }
-
-               firstFocus = false;
-       } );
-
-       editor.on( 'blur', function() {
-               focus = false;
-               editor.dom.removeClass( editor.getBody(), 'has-focus' );
-       } );
+                       if ( editor.wp && editor.wp._createToolbar ) {
+                               toolbar = editor.wp._createToolbar( [
+                                       'wp_view_edit',
+                                       'wp_view_remove'
+                               ] );
 
-       editor.on( 'NodeChange', function( event ) {
-               var dom = editor.dom,
-                       views = editor.dom.select( '.wpview-wrap' ),
-                       className = event.element.className,
-                       view = getView( event.element ),
-                       lKDN = lastKeyDownNode;
-
-               lastKeyDownNode = false;
-
-               clearInterval( cursorInterval );
-
-               // This runs a lot and is faster than replacing each class separately
-               tinymce.each( views, function ( view ) {
-                       if ( view.className ) {
-                               view.className = view.className.replace( / ?\bwpview-(?:selection-before|selection-after|cursor-hide)\b/g, '' );
-                       }
-               });
-
-               if ( focus && view ) {
-                       if ( ( className === 'wpview-selection-before' || className === 'wpview-selection-after' ) &&
-                               editor.selection.isCollapsed() ) {
-
-                               setViewCursorTries = 0;
-
-                               deselect();
-
-                               // Make sure the cursor arrived in the right node.
-                               // This is necessary for Firefox.
-                               if ( lKDN === view.previousSibling ) {
-                                       setViewCursor( true, view );
-                                       return;
-                               } else if ( lKDN === view.nextSibling ) {
-                                       setViewCursor( false, view );
-                                       return;
-                               }
-
-                               dom.addClass( view, className );
-
-                               cursorInterval = setInterval( function() {
-                                       if ( dom.hasClass( view, 'wpview-cursor-hide' ) ) {
-                                               dom.removeClass( view, 'wpview-cursor-hide' );
-                                       } else {
-                                               dom.addClass( view, 'wpview-cursor-hide' );
+                               editor.on( 'wptoolbar', function( event ) {
+                                       if ( isView( event.element ) ) {
+                                               event.toolbar = toolbar;
                                        }
-                               }, 500 );
-                       // If the cursor lands anywhere else in the view, set the cursor before it.
-                       // Only try this once to prevent a loop. (You never know.)
-                       } else if ( ! getParent( event.element, 'wpview-clipboard' ) && ! setViewCursorTries ) {
-                               deselect();
-                               setViewCursorTries++;
-                               setViewCursor( true, view );
+                               } );
                        }
-               }
-       });
-
-       editor.on( 'BeforeExecCommand', function() {
-               var node = editor.selection.getNode(),
-                       view;
-
-               if ( node && ( ( execCommandBefore = node.className === 'wpview-selection-before' ) || node.className === 'wpview-selection-after' ) && ( view = getView( node ) ) ) {
-                       handleEnter( view, execCommandBefore );
-                       execCommandView = view;
-               }
-       });
-
-       editor.on( 'ExecCommand', function() {
-               var toSelect, node;
-
-               if ( selected ) {
-                       toSelect = selected;
-                       deselect();
-                       select( toSelect );
-               }
+               } );
 
-               if ( execCommandView ) {
-                       node = execCommandView[ execCommandBefore ? 'previousSibling' : 'nextSibling' ];
+               editor.wp = editor.wp || {};
+               editor.wp.getView = noop;
+               editor.wp.setViewCursor = noop;
 
-                       if ( node && node.nodeName === 'P' && editor.dom.isEmpty( node ) ) {
-                               editor.dom.remove( node );
-                               setViewCursor( execCommandBefore, execCommandView );
-                       }
-
-                       execCommandView = false;
-               }
-       });
-
-       editor.on( 'ResolveName', function( event ) {
-               if ( editor.dom.hasClass( event.target, 'wpview-wrap' ) ) {
-                       event.name = editor.dom.getAttrib( event.target, 'data-wpview-type' ) || 'wpview';
-                       event.stopPropagation();
-               } else if ( getView( event.target ) ) {
-                       event.preventDefault();
-                       event.stopPropagation();
-               }
-       });
-
-       editor.addButton( 'wp_view_edit', {
-               tooltip: 'Edit ', // trailing space is needed, used for context
-               icon: 'dashicon dashicons-edit',
-               onclick: function() {
-                       selected && wp.mce.views.edit( editor, selected );
-               }
-       } );
-
-       editor.addButton( 'wp_view_remove', {
-               tooltip: 'Remove',
-               icon: 'dashicon dashicons-no',
-               onclick: function() {
-                       selected && removeView( selected );
-               }
-       } );
-
-       editor.once( 'preinit', function() {
-               if ( editor.wp && editor.wp._createToolbar ) {
-                       toolbar = editor.wp._createToolbar( [
-                               'wp_view_edit',
-                               'wp_view_remove'
-                       ] );
-               }
-       } );
-
-       editor.on( 'wptoolbar', function( event ) {
-               if ( selected ) {
-                       event.element = selected;
-                       event.toolbar = toolbar;
-               }
+               return {
+                       getView: noop
+               };
        } );
-
-       // Add to editor.wp
-       editor.wp = editor.wp || {};
-       editor.wp.getView = getView;
-       editor.wp.setViewCursor = setViewCursor;
-
-       // Keep for back-compat.
-       return {
-               getView: getView
-       };
-});
+} )( window.tinymce, window.wp );
index d3584177b964e5f86cd4a8c7e85b39dc68145b41..0581ce901224f50815b47d8d98b24ea4f31b0ec8 100644 (file)
@@ -1 +1 @@
-tinymce.PluginManager.add("wpview",function(a){function b(a){return c(a,"wpview-wrap")}function c(a,b){for(;a&&a.parentNode;){if(a.className&&-1!==(" "+a.className+" ").indexOf(" "+b+" "))return a;a=a.parentNode}return!1}function d(a){a.stopPropagation()}function e(b,c){var d=b?"before":"after",e=b?0:1;i(),a.selection.setCursorLocation(a.dom.select(".wpview-selection-"+d,c)[0],e),a.nodeChanged()}function f(b,c,d){var f=a.dom,g=f.create("p");w.ie&&w.ie<11||(g.innerHTML='<br data-mce-bogus="1">'),c?b.parentNode.insertBefore(g,b):f.insertAfter(g,b),i(),c&&d===x.ENTER?e(c,b):a.selection.setCursorLocation(g,0),a.nodeChanged()}function g(b){a.undoManager.transact(function(){f(b),wp.mce.views.remove(a,b)})}function h(b){var c,e=a.dom;b&&(b!==n&&(a.getBody().focus(),i(),n=b,e.setAttrib(b,"data-mce-selected",1),c=e.create("div",{"class":"wpview-clipboard",contenteditable:"true"},wp.mce.views.getText(b)),a.dom.select(".wpview-body",b)[0].appendChild(c),e.bind(c,"beforedeactivate focusin focusout",d),e.bind(n,"beforedeactivate focusin focusout",d),C?a.selection.select(c):a.selection.select(c,!0)),a.nodeChanged(),a.fire("wpview-selected",b))}function i(){var b,c=a.dom;n&&(b=a.dom.select(".wpview-clipboard",n)[0],c.unbind(b),c.remove(b),c.unbind(n,"beforedeactivate focusin focusout click mouseup",d),c.setAttrib(n,"data-mce-selected",null)),n=null}function j(a,b){return"<p>"+window.decodeURIComponent(b)+"</p>"}function k(a){return a.replace(/<div[^>]+data-wpview-text="([^"]+)"[^>]*>(?:[\s\S]+?wpview-selection-after[^>]+>[^<>]*<\/p>\s*|\.)<\/div>/g,j).replace(/<p [^>]*?data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g,j)}function l(a){v("div[data-wpview-text], p[data-wpview-marker]",a).each(function(a,b){b.innerHTML="."})}function m(a){return 47>=a&&a!==x.SPACEBAR&&a!==x.ENTER&&a!==x.DELETE&&a!==x.BACKSPACE&&(37>a||a>40)||a>=224||a>=144&&150>=a||a>=91&&93>=a||a>=112&&135>=a}var n,o,p,q,r,s,t,u,v=a.$,w=tinymce.Env,x=tinymce.util.VK,y=tinymce.dom.TreeWalker,z=!1,A=!0,B=function(){return!1},C=/iPad|iPod|iPhone/.test(navigator.userAgent);return"undefined"!=typeof wp&&wp.mce?(a.on("BeforeAddUndo",function(a){a.level.content&&(a.level.content=k(a.level.content))}),a.on("BeforeSetContent",function(b){var c;if(b.selection||wp.mce.views.unbind(),b.content){if(!b.load&&(n&&g(n),c=a.selection.getNode(),c&&c!==a.getBody()&&/^\s*https?:\/\/\S+\s*$/i.test(b.content))){if(c=a.dom.getParent(c,"p"),!c||!/^[\s\uFEFF\u00A0]*$/.test(v(c).text()||""))return;c.innerHTML=""}b.content=wp.mce.views.setMarkers(b.content)}}),a.on("pastePreProcess",function(a){var b=a.content;b&&(b=tinymce.trim(b.replace(/<[^>]+>/g,"")),/^https?:\/\/\S+$/i.test(b)&&(a.content=b))}),a.on("SetContent",function(){wp.mce.views.render()}),a.on("click",function(c){var d,f,g,h=c.clientX,i=c.clientY,j=a.getBody(),k=j.getBoundingClientRect(),l=j.firstChild,m=j.lastChild;l&&m&&(d=l.getBoundingClientRect(),f=m.getBoundingClientRect(),i<d.top&&(g=b(l))?(e(!0,g),c.preventDefault()):i>f.bottom&&(g=b(m))?(e(!1,g),c.preventDefault()):(h<k.left||h>k.right)&&tinymce.each(a.dom.select(".wpview-wrap"),function(a){var b=a.getBoundingClientRect();return i<b.top?!1:i>=b.top&&i<=b.bottom?(h<k.left?(e(!0,a),c.preventDefault()):h>k.right&&(e(!1,a),c.preventDefault()),!1):void 0}))}),a.on("init",function(){var c=!1,d=a.selection,e=window.MutationObserver||window.WebKitMutationObserver;a.on("BeforeSetContent",function(){var c,e,f=b(d.getNode());f&&(!f.nextSibling||b(f.nextSibling)?(e=a.getDoc().createTextNode(""),a.dom.insertAfter(e,f)):(c=new y(f.nextSibling,f.nextSibling),e=c.next()),d.select(e),d.collapse(!0))}),a.dom.bind(a.getDoc(),"touchmove",function(){c=!0}),a.on("mousedown mouseup click touchend",function(a){var d=b(a.target);return A=!1,d?(a.stopImmediatePropagation(),a.preventDefault(),"touchend"===a.type&&c?c=!1:h(d),!1):(("touchend"===a.type||"mousedown"===a.type)&&i(),void("touchend"===a.type&&c&&(c=!1)))},!0),e&&new e(function(){a.fire("wp-body-class-change")}).observe(a.getBody(),{attributes:!0,attributeFilter:["class"]}),tinymce.Env.ie&&a.dom.bind(a.getBody(),"controlselect mscontrolselect",function(a){b(a.target)&&a.preventDefault()})}),a.on("PreProcess",function(a){l(a.node)},!0),a.on("hide",function(){wp.mce.views.unbind(),i(),l()}),a.on("PostProcess",function(a){a.content&&(a.content=a.content.replace(/<div [^>]*?data-wpview-text="([^"]+)"[^>]*>[\s\S]*?<\/div>/g,j).replace(/<p [^>]*?data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g,j))}),a.on("keydown",function(c){var d,j,k,l,o,q,r,s=c.keyCode,t=a.dom,u=a.selection;if(n){if((c.metaKey||c.ctrlKey)&&s!==x.BACKSPACE&&86!==s||s>=112&&123>=s)return void((c.metaKey||c.ctrlKey)&&88===s&&(z=n));if(j=b(u.getNode()),j!==n)return void i();s===x.LEFT?(e(!0,j),c.preventDefault()):s===x.UP?(j.previousSibling?b(j.previousSibling)?e(!0,j.previousSibling):(i(),u.select(j.previousSibling,!0),u.collapse()):e(!0,j),c.preventDefault()):s===x.RIGHT?(e(!1,j),c.preventDefault()):s===x.DOWN?(j.nextSibling?b(j.nextSibling)?e(!1,j.nextSibling):(i(),u.setCursorLocation(j.nextSibling,0)):e(!1,j),c.preventDefault()):m(s)||(g(n),(s===x.ENTER||s===x.DELETE||s===x.BACKSPACE)&&c.preventDefault())}else{if(c.metaKey||c.ctrlKey||s>=112&&123>=s)return;if(d=u.getNode(),p=d,j=b(d),u.isCollapsed()||(o=u.getRng(),(j=b(o.endContainer))?(q=o.cloneRange(),u.select(j.previousSibling,!0),u.collapse(),r=u.getRng(),q.setEnd(r.endContainer,r.endOffset),u.setRng(q)):(j=b(o.startContainer))&&(q=o.cloneRange(),q.setStart(j.nextSibling,0),u.setRng(q))),!j)return void(c.keyCode===x.BACKSPACE&&(a.dom.isEmpty(d)?(j=b(d.previousSibling))&&(e(!1,j),a.dom.remove(d),c.preventDefault()):(o=u.getRng())&&0===o.startOffset&&0===o.endOffset&&(j=b(d.previousSibling))&&(e(!1,j),c.preventDefault())));if(!(k=t.hasClass(j,"wpview-selection-before"))&&!(l=t.hasClass(j,"wpview-selection-after")))return;if(m(s))return;l&&s===x.UP||k&&s===x.BACKSPACE?(j.previousSibling?b(j.previousSibling)?e(!1,j.previousSibling):t.isEmpty(j.previousSibling)&&s===x.BACKSPACE?t.remove(j.previousSibling):(u.select(j.previousSibling,!0),u.collapse()):e(!0,j),c.preventDefault()):!l||s!==x.DOWN&&s!==x.RIGHT?!k||s!==x.UP&&s!==x.LEFT?k&&s===x.DOWN?(j.nextSibling?b(j.nextSibling)?e(!0,j.nextSibling):u.setCursorLocation(j.nextSibling,0):e(!1,j),c.preventDefault()):l&&s===x.LEFT||k&&s===x.RIGHT?(h(j),c.preventDefault()):l&&s===x.BACKSPACE?(g(j),c.preventDefault()):l?f(j):k&&f(j,!0,s):(j.previousSibling&&(b(j.previousSibling)?e(s===x.UP,j.previousSibling):(u.select(j.previousSibling,!0),u.collapse())),c.preventDefault()):(j.nextSibling&&(b(j.nextSibling)?e(s===x.RIGHT,j.nextSibling):u.setCursorLocation(j.nextSibling,0)),c.preventDefault()),s===x.ENTER&&c.preventDefault()}}),a.on("keyup",function(){z&&(g(z),z=!1)}),a.on("focus",function(){var c;r=!0,a.dom.addClass(a.getBody(),"has-focus"),A&&(c=b(a.getBody().firstChild))&&e(!0,c),A=!1}),a.on("blur",function(){r=!1,a.dom.removeClass(a.getBody(),"has-focus")}),a.on("NodeChange",function(d){var f=a.dom,g=a.dom.select(".wpview-wrap"),h=d.element.className,j=b(d.element),k=p;if(p=!1,clearInterval(o),tinymce.each(g,function(a){a.className&&(a.className=a.className.replace(/ ?\bwpview-(?:selection-before|selection-after|cursor-hide)\b/g,""))}),r&&j)if("wpview-selection-before"!==h&&"wpview-selection-after"!==h||!a.selection.isCollapsed())c(d.element,"wpview-clipboard")||q||(i(),q++,e(!0,j));else{if(q=0,i(),k===j.previousSibling)return void e(!0,j);if(k===j.nextSibling)return void e(!1,j);f.addClass(j,h),o=setInterval(function(){f.hasClass(j,"wpview-cursor-hide")?f.removeClass(j,"wpview-cursor-hide"):f.addClass(j,"wpview-cursor-hide")},500)}}),a.on("BeforeExecCommand",function(){var c,d=a.selection.getNode();d&&((t="wpview-selection-before"===d.className)||"wpview-selection-after"===d.className)&&(c=b(d))&&(f(c,t),s=c)}),a.on("ExecCommand",function(){var b,c;n&&(b=n,i(),h(b)),s&&(c=s[t?"previousSibling":"nextSibling"],c&&"P"===c.nodeName&&a.dom.isEmpty(c)&&(a.dom.remove(c),e(t,s)),s=!1)}),a.on("ResolveName",function(c){a.dom.hasClass(c.target,"wpview-wrap")?(c.name=a.dom.getAttrib(c.target,"data-wpview-type")||"wpview",c.stopPropagation()):b(c.target)&&(c.preventDefault(),c.stopPropagation())}),a.addButton("wp_view_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",onclick:function(){n&&wp.mce.views.edit(a,n)}}),a.addButton("wp_view_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){n&&g(n)}}),a.once("preinit",function(){a.wp&&a.wp._createToolbar&&(u=a.wp._createToolbar(["wp_view_edit","wp_view_remove"]))}),a.on("wptoolbar",function(a){n&&(a.element=n,a.toolbar=u)}),a.wp=a.wp||{},a.wp.getView=b,a.wp.setViewCursor=e,{getView:b}):{getView:B}});
\ No newline at end of file
+!function(a,b){a.PluginManager.add("wpview",function(c){function d(){}function e(a){return c.dom.hasClass(a,"wpview")}function f(a){function b(a,b){return"<p>"+window.decodeURIComponent(b)+"</p>"}return a?a.replace(/<div[^>]+data-wpview-text="([^"]+)"[^>]*>(?:\.|[\s\S]+?wpview-end[^>]+>\s*<\/span>\s*)?<\/div>/g,b).replace(/<p[^>]+data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g,b):a}return b&&b.mce&&b.mce.views?(c.on("init",function(){var a=window.MutationObserver||window.WebKitMutationObserver;a&&new a(function(){c.fire("wp-body-class-change")}).observe(c.getBody(),{attributes:!0,attributeFilter:["class"]}),c.on("wp-body-class-change",function(){var a=c.getBody().className;c.$('iframe[class="wpview-sandbox"]').each(function(b,c){if(!c.src||'javascript:""'===c.src)try{c.contentWindow.document.body.className=a}catch(d){}})})}),c.on("beforesetcontent",function(a){var d;if(a.selection||b.mce.views.unbind(),a.content){if(!a.load&&(d=c.selection.getNode(),d&&d!==c.getBody()&&/^\s*https?:\/\/\S+\s*$/i.test(a.content))){if(d=c.dom.getParent(d,"p"),!d||!/^[\s\uFEFF\u00A0]*$/.test(c.$(d).text()||""))return;d.innerHTML=""}a.content=b.mce.views.setMarkers(a.content)}}),c.on("setcontent",function(){b.mce.views.render()}),c.on("preprocess",function(a){c.$("div[data-wpview-text], p[data-wpview-marker]",a.node).each(function(a,b){b.innerHTML="."})},!0),c.on("postprocess",function(a){a.content=f(a.content)}),c.on("beforeaddundo",function(a){a.level.content=f(a.level.content)}),c.on("drop objectselected",function(a){e(a.targetClone)&&(a.targetClone=c.getDoc().createTextNode(window.decodeURIComponent(c.dom.getAttrib(a.targetClone,"data-wpview-text"))))}),c.on("pastepreprocess",function(b){var c=b.content;c&&(c=a.trim(c.replace(/<[^>]+>/g,"")),/^https?:\/\/\S+$/i.test(c)&&(b.content=c))}),c.on("resolvename",function(a){e(a.target)&&(a.name=c.dom.getAttrib(a.target,"data-wpview-type")||"object")}),c.on("click keyup",function(){var a=c.selection.getNode();e(a)&&c.dom.getAttrib(a,"data-mce-selected")&&a.setAttribute("data-mce-selected","2")}),c.addButton("wp_view_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",onclick:function(){var a=c.selection.getNode();e(a)&&b.mce.views.edit(c,a)}}),c.addButton("wp_view_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){c.fire("cut")}}),c.once("preinit",function(){var a;c.wp&&c.wp._createToolbar&&(a=c.wp._createToolbar(["wp_view_edit","wp_view_remove"]),c.on("wptoolbar",function(b){e(b.element)&&(b.toolbar=a)}))}),c.wp=c.wp||{},c.wp.getView=d,c.wp.setViewCursor=d,{getView:d}):{getView:d}})}(window.tinymce,window.wp);
\ No newline at end of file
index cbc985b2b3eca42a09c280eecaf740cac9a90be5..0808be0572527dc1fb69ac971235d12069adec7e 100644 (file)
                                "order": 25,
                                "prevSize": 32,
                                "code": 57373,
-                               "name": "removefromat",
+                               "name": "removeformat",
                                "ligatures": ""
                        },
                        "setIdx": 0,
index a9076ca858e4e738b718d4847599e50208d2612d..b4ee6f4088b2a4de25918f2df2a72f16d805eeaa 100644 (file)
@@ -36,7 +36,7 @@
 <glyph unicode="&#xe01a;" glyph-name="forecolor" d="M651.168 676.166c-24.612 81.962-28.876 91.834-107.168 91.834h-64c-79.618 0-82.664-10.152-108.418-96 0-0.002 0-0.002-0.002-0.004l-143.998-479.996h113.636l57.6 192h226.366l57.6-192h113.63l-145.246 484.166zM437.218 512l38.4 136c10.086 33.618 36.38 30 36.38 30s26.294 3.618 36.38-30h0.004l38.4-136h-149.564z" />
 <glyph unicode="&#xe01b;" glyph-name="table" d="M64 768v-704h896v704h-896zM384 320v128h256v-128h-256zM640 256v-128h-256v128h256zM640 640v-128h-256v128h256zM320 640v-128h-192v128h192zM128 448h192v-128h-192v128zM704 448h192v-128h-192v128zM704 512v128h192v-128h-192zM128 256h192v-128h-192v128zM704 128v128h192v-128h-192z" />
 <glyph unicode="&#xe01c;" glyph-name="hr" d="M64 512h896v-128h-896z" />
-<glyph unicode="&#xe01d;" glyph-name="removefromat" d="M64 192h512v-128h-512v128zM768 768h-220.558l-183.766-512h-132.288l183.762 512h-223.15v128h576v-128zM929.774 64l-129.774 129.774-129.774-129.774-62.226 62.226 129.774 129.774-129.774 129.774 62.226 62.226 129.774-129.774 129.774 129.774 62.226-62.226-129.774-129.774 129.774-129.774-62.226-62.226z" />
+<glyph unicode="&#xe01d;" glyph-name="removeformat" d="M64 192h512v-128h-512v128zM768 768h-220.558l-183.766-512h-132.288l183.762 512h-223.15v128h576v-128zM929.774 64l-129.774 129.774-129.774-129.774-62.226 62.226 129.774 129.774-129.774 129.774 62.226 62.226 129.774-129.774 129.774 129.774 62.226-62.226-129.774-129.774 129.774-129.774-62.226-62.226z" />
 <glyph unicode="&#xe01e;" glyph-name="subscript" d="M768 50v-50h128v-64h-192v146l128 60v50h-128v64h192v-146zM676 704h-136l-188-188-188 188h-136l256-256-256-256h136l188 188 188-188h136l-256 256z" />
 <glyph unicode="&#xe01f;" glyph-name="superscript" d="M768 754v-50h128v-64h-192v146l128 60v50h-128v64h192v-146zM676 704h-136l-188-188-188 188h-136l256-256-256-256h136l188 188 188-188h136l-256 256z" />
 <glyph unicode="&#xe020;" glyph-name="charmap" d="M704 128v37.004c151.348 61.628 256 193.82 256 346.996 0 212.078-200.576 384-448 384s-448-171.922-448-384c0-153.176 104.654-285.368 256-346.996v-37.004h-192l-64 96v-224h320v222.812c-100.9 51.362-170.666 161.54-170.666 289.188 0 176.732 133.718 320 298.666 320s298.666-143.268 298.666-320c0-127.648-69.766-237.826-170.666-289.188v-222.812h320v224l-64-96h-192z" />
index 77cb52b5b75abd81b4f4c025e97258d34e82f263..2e64b8952763073bb353dee030e37d4d50d577e1 100644 (file)
@@ -1 +1 @@
-.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit !important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#fff;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid rgba(0,0,0,0.2);width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td.mce-grid-cell div{border:1px solid #d6d6d6;width:15px;height:15px;margin:0;cursor:pointer}.mce-grid td.mce-grid-cell div:focus{border-color:#3498db}.mce-grid td.mce-grid-cell div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#3498db}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#3498db;background:#3498db}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%}.mce-colorbtn-trans div{text-align:center;vertical-align:middle;font-weight:bold;font-size:20px;line-height:16px;color:#707070}.mce-monospace{font-family:"Courier New",Courier,monospace}.mce-toolbar-grp{padding:2px 0}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-croprect-container{position:absolute;top:0;left:0}.mce-croprect-handle{position:absolute;top:0;left:0;width:20px;height:20px;border:2px solid white}.mce-croprect-handle-nw{border-width:2px 0 0 2px;margin:-2px 0 0 -2px;cursor:nw-resize;top:100px;left:100px}.mce-croprect-handle-ne{border-width:2px 2px 0 0;margin:-2px 0 0 -20px;cursor:ne-resize;top:100px;left:200px}.mce-croprect-handle-sw{border-width:0 0 2px 2px;margin:-20px 2px 0 -2px;cursor:sw-resize;top:200px;left:100px}.mce-croprect-handle-se{border-width:0 2px 2px 0;margin:-20px 0 0 -20px;cursor:se-resize;top:200px;left:200px}.mce-croprect-handle-move{position:absolute;cursor:move;border:0}.mce-croprect-block{opacity:.3;filter:alpha(opacity=30);zoom:1;position:absolute;background:black}.mce-croprect-handle:focus{border-color:#3498db}.mce-croprect-handle-move:focus{outline:1px solid #3498db}.mce-imagepanel{overflow:auto;background:black}.mce-imagepanel img{position:absolute}.mce-imagetool.mce-btn .mce-ico{display:block;width:20px;height:20px;text-align:center;line-height:20px;font-size:20px;padding:5px}.mce-arrow-up{margin-top:3px}.mce-arrow-down{margin-top:-3px}.mce-arrow:before,.mce-arrow:after{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.mce-arrow.mce-arrow-up:before{top:-9px;border-bottom-color:rgba(0,0,0,0.2);border-width:0 9px 9px;margin-left:-9px}.mce-arrow.mce-arrow-down:before{bottom:-9px;border-top-color:rgba(0,0,0,0.2);border-width:9px 9px 0;margin-left:-9px}.mce-arrow.mce-arrow-up:after{top:-8px;border-bottom-color:#f0f0f0;border-width:0 8px 8px;margin-left:-8px}.mce-arrow.mce-arrow-down:after{bottom:-8px;border-top-color:#f0f0f0;border-width:8px 8px 0;margin-left:-8px}.mce-arrow.mce-arrow-left:before,.mce-arrow.mce-arrow-left:after{margin:0}.mce-arrow.mce-arrow-left:before{left:20px}.mce-arrow.mce-arrow-left:after{left:21px}.mce-arrow.mce-arrow-right:before,.mce-arrow.mce-arrow-right:after{left:auto;margin:0}.mce-arrow.mce-arrow-right:before{right:20px}.mce-arrow.mce-arrow-right:after{right:21px}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#aaa;opacity:.6;filter:alpha(opacity=60);zoom:1}.mce-scroll{position:relative}.mce-panel{border:0 solid #cacaca;border:0 solid rgba(0,0,0,0.2);background-color:#f0f0f0}.mce-floatpanel{position:absolute}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;top:0;left:0;background:#fff;border:1px solid rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:rgba(0,0,0,0.2);border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;transform:scale(.1);transition:transform 100ms ease-in,opacity 150ms ease-in}.mce-window.mce-in{transform:scale(1);opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:0;top:0;height:38px;width:38px;text-align:center;cursor:pointer}.mce-window-head .mce-close i{color:#858585}.mce-close:hover i{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:20px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window-body .mce-listbox{border-color:#ccc}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:white;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-progress{display:inline-block;position:relative;height:20px}.mce-progress .mce-bar-container{display:inline-block;width:100px;height:100%;margin-right:8px;border:1px solid #ccc;overflow:hidden}.mce-progress .mce-text{display:inline-block;margin-top:auto;margin-bottom:auto;font-size:14px;width:40px;color:#333}.mce-bar{display:block;width:0;height:100%;background-color:#d7d7d7;-webkit-transition:width .2s ease;transition:width .2s ease}.mce-notification{position:absolute;background-color:#f0f0f0;padding:5px;margin-top:5px;border-width:1px;border-style:solid;border-color:#ccc;transform:scale(.1);transition:transform 100ms ease-in,opacity 150ms ease-in;opacity:0}.mce-notification.mce-in{opacity:1;transform:scale(1)}.mce-notification-success{background-color:#dff0d8;border-color:#d6e9c6}.mce-notification-info{background-color:#d9edf7;border-color:#779ecb}.mce-notification-warning{background-color:#fcf8e3;border-color:#faebcc}.mce-notification-error{background-color:#f2dede;border-color:#ebccd1}.mce-notification.mce-has-close{padding-right:15px}.mce-notification .mce-ico{margin-top:5px}.mce-notification-inner{display:inline-block;font-size:14px;margin:5px 8px 4px 8px;text-align:center;white-space:normal;color:#31708f}.mce-notification-inner a{text-decoration:underline;cursor:pointer}.mce-notification .mce-progress{margin-right:8px}.mce-notification .mce-progress .mce-text{margin-top:5px}.mce-notification *,.mce-notification .mce-progress .mce-text{color:#333}.mce-notification .mce-progress .mce-bar-container{border-color:#ccc}.mce-notification .mce-progress .mce-bar-container .mce-bar{background-color:#333}.mce-notification-success *,.mce-notification-success .mce-progress .mce-text{color:#3c763d}.mce-notification-success .mce-progress .mce-bar-container{border-color:#d6e9c6}.mce-notification-success .mce-progress .mce-bar-container .mce-bar{background-color:#3c763d}.mce-notification-info *,.mce-notification-info .mce-progress .mce-text{color:#31708f}.mce-notification-info .mce-progress .mce-bar-container{border-color:#779ecb}.mce-notification-info .mce-progress .mce-bar-container .mce-bar{background-color:#31708f}.mce-notification-warning *,.mce-notification-warning .mce-progress .mce-text{color:#8a6d3b}.mce-notification-warning .mce-progress .mce-bar-container{border-color:#faebcc}.mce-notification-warning .mce-progress .mce-bar-container .mce-bar{background-color:#8a6d3b}.mce-notification-error *,.mce-notification-error .mce-progress .mce-text{color:#a94442}.mce-notification-error .mce-progress .mce-bar-container{border-color:#ebccd1}.mce-notification-error .mce-progress .mce-bar-container .mce-bar{background-color:#a94442}.mce-notification .mce-close{position:absolute;top:6px;right:8px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-btn{border:1px solid #b1b1b1;border-color:transparent transparent transparent transparent;position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;background-color:#f0f0f0}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;border-color:#ccc}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#dbdbdb;border-color:#ccc}.mce-btn:active{background-color:#e0e0e0;border-color:#ccc}.mce-btn button{padding:4px 8px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px none}.mce-primary{min-width:50px;color:#fff;border:1px solid transparent;border-color:transparent;background-color:#2d8ac7}.mce-primary:hover,.mce-primary:focus{background-color:#257cb6;border-color:transparent}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#206ea1}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px none}.mce-btn .mce-txt{font-size:inherit;line-height:inherit;color:inherit}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-btn-flat{border:0;background:transparent;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none}.mce-btn-has-text .mce-ico{padding-right:5px}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px;margin:0;margin-left:2px}.mce-btn-group:not(:first-child){border-left:1px solid #d9d9d9;padding-left:3px;margin-left:3px}.mce-btn-group .mce-first{margin-left:0}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-rtl .mce-btn-group .mce-btn{margin-left:0;margin-right:2px}.mce-rtl .mce-btn-group .mce-first{margin-right:0}.mce-rtl .mce-btn-group:not(:first-child){border-left:none;border-right:1px solid #d9d9d9;padding-right:4px;margin-right:4px}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;background-color:#f0f0f0;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-checkbox .mce-label{vertical-align:middle}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox .mce-btn{border:1px solid #c5c5c5;border-left:0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:6px;padding-left:6px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-17px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:1px solid transparent}.mce-colorbutton:hover .mce-open{border-color:#ccc}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:3px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;padding-left:2px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:0}.mce-colorpicker{position:relative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom, rgba(0,0,0,0), #000)}.mce-colorpicker-selector1{background:none;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid black;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid white;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid #333;background:#fff;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9e9e9e}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid rgba(0,0,0,0.2);width:100%;height:100%}.mce-infobox{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden;border:1px solid red}.mce-infobox div{display:block;margin:5px}.mce-infobox div button{position:absolute;top:50%;right:4px;cursor:pointer;margin-top:-8px;display:none}.mce-infobox div button:focus{outline:2px solid #ccc}.mce-infobox.mce-has-help div{margin-right:25px}.mce-infobox.mce-has-help button{display:block}.mce-infobox.mce-success{background:#dff0d8;border-color:#d6e9c6}.mce-infobox.mce-success div{color:#3c763d}.mce-infobox.mce-warning{background:#fcf8e3;border-color:#faebcc}.mce-infobox.mce-warning div{color:#8a6d3b}.mce-infobox.mce-error{background:#f2dede;border-color:#ebccd1}.mce-infobox.mce-error div{color:#a94442}.mce-rtl .mce-infobox div{text-align:right;direction:rtl}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-success{color:#468847}.mce-label.mce-warning{color:#c09853}.mce-label.mce-error{color:#b94a48}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;filter:none}.mce-menubar .mce-menubtn button{color:#333}.mce-menubar{border:1px solid rgba(217,217,217,0.52)}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:#ccc;background:#fff;filter:none}.mce-menubtn button{color:#333}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:white}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:white}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:white}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:white}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#3498db}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:white}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:white}.mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:white}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:white;background-color:#2d8ac7}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:transparent;border-bottom:1px solid rgba(0,0,0,0.1);cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:white}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}.mce-menu .mce-throbber-inline{height:25px;background-size:contain}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:-1px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-selectbox{background:#fff;border:1px solid #c5c5c5}.mce-slider{border:1px solid #aaa;background:#eee;width:100px;height:10px;position:relative;display:block}.mce-slider.mce-vertical{width:10px;height:100px}.mce-slider-handle{border:1px solid #bbb;background:#ddd;display:block;width:13px;height:13px;position:absolute;top:0;left:0;margin-left:-1px;margin-top:-2px}.mce-slider-handle:focus{background:#bbb}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#ccc}.mce-splitbtn button{padding-right:6px;padding-left:6px}.mce-splitbtn .mce-open{padding-right:4px;padding-left:4px}.mce-splitbtn .mce-open.mce-active{background-color:#dbdbdb;outline:1px solid #ccc}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:4px;padding-left:4px}.mce-rtl .mce-splitbtn .mce-open{border-left:0}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tabs,.mce-tabs+.mce-container-body{background:#fff}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#fff;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:#3498db}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px;height:auto}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce';font-style:normal;font-weight:normal;font-size:16px;line-height:16px;vertical-align:text-top;-webkit-font-smoothing:antialiased;display:inline-block;background:transparent center center;width:16px;height:16px;color:#333;-ie7-icon:' '}.mce-btn-small .mce-ico{font-family:'tinymce-small'}.mce-ico,i.mce-i-checkbox{zoom:expression(this.runtimeStyle['zoom'] = '1', this.innerHTML = this.currentStyle['-ie7-icon'].substr(1, 1) + '&nbsp;')}.mce-i-save{-ie7-icon:"\e000"}.mce-i-newdocument{-ie7-icon:"\e001"}.mce-i-fullpage{-ie7-icon:"\e002"}.mce-i-alignleft{-ie7-icon:"\e003"}.mce-i-aligncenter{-ie7-icon:"\e004"}.mce-i-alignright{-ie7-icon:"\e005"}.mce-i-alignjustify{-ie7-icon:"\e006"}.mce-i-alignnone{-ie7-icon:"\e003"}.mce-i-cut{-ie7-icon:"\e007"}.mce-i-paste{-ie7-icon:"\e008"}.mce-i-searchreplace{-ie7-icon:"\e009"}.mce-i-bullist{-ie7-icon:"\e00a"}.mce-i-numlist{-ie7-icon:"\e00b"}.mce-i-indent{-ie7-icon:"\e00c"}.mce-i-outdent{-ie7-icon:"\e00d"}.mce-i-blockquote{-ie7-icon:"\e00e"}.mce-i-undo{-ie7-icon:"\e00f"}.mce-i-redo{-ie7-icon:"\e010"}.mce-i-link{-ie7-icon:"\e011"}.mce-i-unlink{-ie7-icon:"\e012"}.mce-i-anchor{-ie7-icon:"\e013"}.mce-i-image{-ie7-icon:"\e014"}.mce-i-media{-ie7-icon:"\e015"}.mce-i-help{-ie7-icon:"\e016"}.mce-i-code{-ie7-icon:"\e017"}.mce-i-insertdatetime{-ie7-icon:"\e018"}.mce-i-preview{-ie7-icon:"\e019"}.mce-i-forecolor{-ie7-icon:"\e01a"}.mce-i-backcolor{-ie7-icon:"\e01a"}.mce-i-table{-ie7-icon:"\e01b"}.mce-i-hr{-ie7-icon:"\e01c"}.mce-i-removeformat{-ie7-icon:"\e01d"}.mce-i-subscript{-ie7-icon:"\e01e"}.mce-i-superscript{-ie7-icon:"\e01f"}.mce-i-charmap{-ie7-icon:"\e020"}.mce-i-emoticons{-ie7-icon:"\e021"}.mce-i-print{-ie7-icon:"\e022"}.mce-i-fullscreen{-ie7-icon:"\e023"}.mce-i-spellchecker{-ie7-icon:"\e024"}.mce-i-nonbreaking{-ie7-icon:"\e025"}.mce-i-template{-ie7-icon:"\e026"}.mce-i-pagebreak{-ie7-icon:"\e027"}.mce-i-restoredraft{-ie7-icon:"\e028"}.mce-i-untitled{-ie7-icon:"\e029"}.mce-i-bold{-ie7-icon:"\e02a"}.mce-i-italic{-ie7-icon:"\e02b"}.mce-i-underline{-ie7-icon:"\e02c"}.mce-i-strikethrough{-ie7-icon:"\e02d"}.mce-i-visualchars{-ie7-icon:"\e02e"}.mce-i-ltr{-ie7-icon:"\e02f"}.mce-i-rtl{-ie7-icon:"\e030"}.mce-i-copy{-ie7-icon:"\e031"}.mce-i-resize{-ie7-icon:"\e032"}.mce-i-browse{-ie7-icon:"\e034"}.mce-i-pastetext{-ie7-icon:"\e035"}.mce-i-rotateleft{-ie7-icon:"\eaa8"}.mce-i-rotateright{-ie7-icon:"\eaa9"}.mce-i-crop{-ie7-icon:"\ee78"}.mce-i-editimage{-ie7-icon:"\e914"}.mce-i-options{-ie7-icon:"\ec6a"}.mce-i-flipv{-ie7-icon:"\eaaa"}.mce-i-fliph{-ie7-icon:"\eaac"}.mce-i-zoomin{-ie7-icon:"\eb35"}.mce-i-zoomout{-ie7-icon:"\eb36"}.mce-i-sun{-ie7-icon:"\eccc"}.mce-i-moon{-ie7-icon:"\eccd"}.mce-i-arrowleft{-ie7-icon:"\edc0"}.mce-i-arrowright{-ie7-icon:"\edb8"}.mce-i-drop{-ie7-icon:"\e934"}.mce-i-contrast{-ie7-icon:"\ecd4"}.mce-i-sharpen{-ie7-icon:"\eba7"}.mce-i-palette{-ie7-icon:"\e92a"}.mce-i-resize2{-ie7-icon:"\edf9"}.mce-i-orientation{-ie7-icon:"\e601"}.mce-i-invert{-ie7-icon:"\e602"}.mce-i-gamma{-ie7-icon:"\e600"}.mce-i-remove{-ie7-icon:"\ed6a"}.mce-i-codesample{-ie7-icon:"\e603"}.mce-i-checkbox,.mce-i-selected{-ie7-icon:"\e033"}.mce-i-selected{visibility:hidden}.mce-i-backcolor{background:#bbb}
\ No newline at end of file
+.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit !important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#fff;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid rgba(0,0,0,0.2);width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td.mce-grid-cell div{border:1px solid #d6d6d6;width:15px;height:15px;margin:0;cursor:pointer}.mce-grid td.mce-grid-cell div:focus{border-color:#3498db}.mce-grid td.mce-grid-cell div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#3498db}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#3498db;background:#3498db}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%}.mce-colorbtn-trans div{text-align:center;vertical-align:middle;font-weight:bold;font-size:20px;line-height:16px;color:#707070}.mce-monospace{font-family:"Courier New",Courier,monospace}.mce-toolbar-grp{padding:2px 0}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-croprect-container{position:absolute;top:0;left:0}.mce-croprect-handle{position:absolute;top:0;left:0;width:20px;height:20px;border:2px solid white}.mce-croprect-handle-nw{border-width:2px 0 0 2px;margin:-2px 0 0 -2px;cursor:nw-resize;top:100px;left:100px}.mce-croprect-handle-ne{border-width:2px 2px 0 0;margin:-2px 0 0 -20px;cursor:ne-resize;top:100px;left:200px}.mce-croprect-handle-sw{border-width:0 0 2px 2px;margin:-20px 2px 0 -2px;cursor:sw-resize;top:200px;left:100px}.mce-croprect-handle-se{border-width:0 2px 2px 0;margin:-20px 0 0 -20px;cursor:se-resize;top:200px;left:200px}.mce-croprect-handle-move{position:absolute;cursor:move;border:0}.mce-croprect-block{opacity:.3;filter:alpha(opacity=30);zoom:1;position:absolute;background:black}.mce-croprect-handle:focus{border-color:#3498db}.mce-croprect-handle-move:focus{outline:1px solid #3498db}.mce-imagepanel{overflow:auto;background:black}.mce-imagepanel img{position:absolute}.mce-imagetool.mce-btn .mce-ico{display:block;width:20px;height:20px;text-align:center;line-height:20px;font-size:20px;padding:5px}.mce-arrow-up{margin-top:12px}.mce-arrow-down{margin-top:-12px}.mce-arrow:before,.mce-arrow:after{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.mce-arrow.mce-arrow-up:before{top:-9px;border-bottom-color:rgba(0,0,0,0.2);border-width:0 9px 9px;margin-left:-9px}.mce-arrow.mce-arrow-down:before{bottom:-9px;border-top-color:rgba(0,0,0,0.2);border-width:9px 9px 0;margin-left:-9px}.mce-arrow.mce-arrow-up:after{top:-8px;border-bottom-color:#f0f0f0;border-width:0 8px 8px;margin-left:-8px}.mce-arrow.mce-arrow-down:after{bottom:-8px;border-top-color:#f0f0f0;border-width:8px 8px 0;margin-left:-8px}.mce-arrow.mce-arrow-left:before,.mce-arrow.mce-arrow-left:after{margin:0}.mce-arrow.mce-arrow-left:before{left:8px}.mce-arrow.mce-arrow-left:after{left:9px}.mce-arrow.mce-arrow-right:before,.mce-arrow.mce-arrow-right:after{left:auto;margin:0}.mce-arrow.mce-arrow-right:before{right:8px}.mce-arrow.mce-arrow-right:after{right:9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:before{left:-9px;top:50%;border-right-color:rgba(0,0,0,0.2);border-width:9px 9px 9px 0;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:after{left:-8px;top:50%;border-right-color:#f0f0f0;border-width:8px 8px 8px 0;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left{margin-left:12px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:before{right:-9px;top:50%;border-left-color:rgba(0,0,0,0.2);border-width:9px 0 9px 9px;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:after{right:-8px;top:50%;border-left-color:#f0f0f0;border-width:8px 0 8px 8px;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right{margin-left:-14px}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#aaa;opacity:.6;filter:alpha(opacity=60);zoom:1}.mce-scroll{position:relative}.mce-panel{border:0 solid #cacaca;border:0 solid rgba(0,0,0,0.2);background-color:#f0f0f0}.mce-floatpanel{position:absolute}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;top:0;left:0;background:#fff;border:1px solid rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:rgba(0,0,0,0.2);border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;transform:scale(.1);transition:transform 100ms ease-in,opacity 150ms ease-in}.mce-window.mce-in{transform:scale(1);opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:0;top:0;height:38px;width:38px;text-align:center;cursor:pointer}.mce-window-head .mce-close i{color:#858585}.mce-close:hover i{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:20px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window-body .mce-listbox{border-color:#ccc}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:white;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-progress{display:inline-block;position:relative;height:20px}.mce-progress .mce-bar-container{display:inline-block;width:100px;height:100%;margin-right:8px;border:1px solid #ccc;overflow:hidden}.mce-progress .mce-text{display:inline-block;margin-top:auto;margin-bottom:auto;font-size:14px;width:40px;color:#333}.mce-bar{display:block;width:0;height:100%;background-color:#d7d7d7;-webkit-transition:width .2s ease;transition:width .2s ease}.mce-notification{position:absolute;background-color:#f0f0f0;padding:5px;margin-top:5px;border-width:1px;border-style:solid;border-color:#ccc;transition:transform 100ms ease-in,opacity 150ms ease-in;opacity:0}.mce-notification.mce-in{opacity:1}.mce-notification-success{background-color:#dff0d8;border-color:#d6e9c6}.mce-notification-info{background-color:#d9edf7;border-color:#779ecb}.mce-notification-warning{background-color:#fcf8e3;border-color:#faebcc}.mce-notification-error{background-color:#f2dede;border-color:#ebccd1}.mce-notification.mce-has-close{padding-right:15px}.mce-notification .mce-ico{margin-top:5px}.mce-notification-inner{display:inline-block;font-size:14px;margin:5px 8px 4px 8px;text-align:center;white-space:normal;color:#31708f}.mce-notification-inner a{text-decoration:underline;cursor:pointer}.mce-notification .mce-progress{margin-right:8px}.mce-notification .mce-progress .mce-text{margin-top:5px}.mce-notification *,.mce-notification .mce-progress .mce-text{color:#333}.mce-notification .mce-progress .mce-bar-container{border-color:#ccc}.mce-notification .mce-progress .mce-bar-container .mce-bar{background-color:#333}.mce-notification-success *,.mce-notification-success .mce-progress .mce-text{color:#3c763d}.mce-notification-success .mce-progress .mce-bar-container{border-color:#d6e9c6}.mce-notification-success .mce-progress .mce-bar-container .mce-bar{background-color:#3c763d}.mce-notification-info *,.mce-notification-info .mce-progress .mce-text{color:#31708f}.mce-notification-info .mce-progress .mce-bar-container{border-color:#779ecb}.mce-notification-info .mce-progress .mce-bar-container .mce-bar{background-color:#31708f}.mce-notification-warning *,.mce-notification-warning .mce-progress .mce-text{color:#8a6d3b}.mce-notification-warning .mce-progress .mce-bar-container{border-color:#faebcc}.mce-notification-warning .mce-progress .mce-bar-container .mce-bar{background-color:#8a6d3b}.mce-notification-error *,.mce-notification-error .mce-progress .mce-text{color:#a94442}.mce-notification-error .mce-progress .mce-bar-container{border-color:#ebccd1}.mce-notification-error .mce-progress .mce-bar-container .mce-bar{background-color:#a94442}.mce-notification .mce-close{position:absolute;top:6px;right:8px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-btn{border:1px solid #b1b1b1;border-color:transparent transparent transparent transparent;position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;background-color:#f0f0f0}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;border-color:#ccc}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#dbdbdb;border-color:#ccc}.mce-btn:active{background-color:#e0e0e0;border-color:#ccc}.mce-btn button{padding:4px 8px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px none}.mce-primary.mce-btn-has-text{min-width:50px}.mce-primary{color:#fff;border:1px solid transparent;border-color:transparent;background-color:#2d8ac7}.mce-primary:hover,.mce-primary:focus{background-color:#257cb6;border-color:transparent}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#206ea1}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px none}.mce-btn .mce-txt{font-size:inherit;line-height:inherit;color:inherit}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-btn-flat{border:0;background:transparent;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none}.mce-btn-has-text .mce-ico{padding-right:5px}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px;margin:0;margin-left:2px}.mce-btn-group:not(:first-child){border-left:1px solid #d9d9d9;padding-left:3px;margin-left:3px}.mce-btn-group .mce-first{margin-left:0}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-rtl .mce-btn-group .mce-btn{margin-left:0;margin-right:2px}.mce-rtl .mce-btn-group .mce-first{margin-right:0}.mce-rtl .mce-btn-group:not(:first-child){border-left:none;border-right:1px solid #d9d9d9;padding-right:4px;margin-right:4px}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;background-color:#f0f0f0;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-checkbox .mce-label{vertical-align:middle}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox .mce-btn{border:1px solid #c5c5c5;border-left:0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:6px;padding-left:6px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-17px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:1px solid transparent}.mce-colorbutton:hover .mce-open{border-color:#ccc}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:3px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;padding-left:2px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:0}.mce-colorpicker{position:relative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom, rgba(0,0,0,0), #000)}.mce-colorpicker-selector1{background:none;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid black;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid white;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid #333;background:#fff;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9e9e9e}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid rgba(0,0,0,0.2);width:100%;height:100%}.mce-infobox{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden;border:1px solid red}.mce-infobox div{display:block;margin:5px}.mce-infobox div button{position:absolute;top:50%;right:4px;cursor:pointer;margin-top:-8px;display:none}.mce-infobox div button:focus{outline:2px solid #ccc}.mce-infobox.mce-has-help div{margin-right:25px}.mce-infobox.mce-has-help button{display:block}.mce-infobox.mce-success{background:#dff0d8;border-color:#d6e9c6}.mce-infobox.mce-success div{color:#3c763d}.mce-infobox.mce-warning{background:#fcf8e3;border-color:#faebcc}.mce-infobox.mce-warning div{color:#8a6d3b}.mce-infobox.mce-error{background:#f2dede;border-color:#ebccd1}.mce-infobox.mce-error div{color:#a94442}.mce-rtl .mce-infobox div{text-align:right;direction:rtl}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-success{color:#468847}.mce-label.mce-warning{color:#c09853}.mce-label.mce-error{color:#b94a48}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;filter:none}.mce-menubar .mce-menubtn button{color:#333}.mce-menubar{border:1px solid rgba(217,217,217,0.52)}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:#ccc;background:#fff;filter:none}.mce-menubtn button{color:#333}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:white}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:white}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:white}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:white}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#3498db}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:white}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:white}.mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:white}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:white;background-color:#2d8ac7}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:transparent;border-bottom:1px solid rgba(0,0,0,0.1);cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:white}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}.mce-menu .mce-throbber-inline{height:25px;background-size:contain}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:-1px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-selectbox{background:#fff;border:1px solid #c5c5c5}.mce-slider{border:1px solid #aaa;background:#eee;width:100px;height:10px;position:relative;display:block}.mce-slider.mce-vertical{width:10px;height:100px}.mce-slider-handle{border:1px solid #bbb;background:#ddd;display:block;width:13px;height:13px;position:absolute;top:0;left:0;margin-left:-1px;margin-top:-2px}.mce-slider-handle:focus{background:#bbb}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#ccc}.mce-splitbtn button{padding-right:6px;padding-left:6px}.mce-splitbtn .mce-open{padding-right:4px;padding-left:4px}.mce-splitbtn .mce-open.mce-active{background-color:#dbdbdb;outline:1px solid #ccc}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:4px;padding-left:4px}.mce-rtl .mce-splitbtn .mce-open{border-left:0}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tabs,.mce-tabs+.mce-container-body{background:#fff}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#fff;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:#3498db}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px;height:auto}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce';font-style:normal;font-weight:normal;font-size:16px;line-height:16px;vertical-align:text-top;-webkit-font-smoothing:antialiased;display:inline-block;background:transparent center center;width:16px;height:16px;color:#333;-ie7-icon:' '}.mce-btn-small .mce-ico{font-family:'tinymce-small'}.mce-ico,i.mce-i-checkbox{zoom:expression(this.runtimeStyle['zoom'] = '1', this.innerHTML = this.currentStyle['-ie7-icon'].substr(1, 1) + '&nbsp;')}.mce-i-save{-ie7-icon:"\e000"}.mce-i-newdocument{-ie7-icon:"\e001"}.mce-i-fullpage{-ie7-icon:"\e002"}.mce-i-alignleft{-ie7-icon:"\e003"}.mce-i-aligncenter{-ie7-icon:"\e004"}.mce-i-alignright{-ie7-icon:"\e005"}.mce-i-alignjustify{-ie7-icon:"\e006"}.mce-i-alignnone{-ie7-icon:"\e003"}.mce-i-cut{-ie7-icon:"\e007"}.mce-i-paste{-ie7-icon:"\e008"}.mce-i-searchreplace{-ie7-icon:"\e009"}.mce-i-bullist{-ie7-icon:"\e00a"}.mce-i-numlist{-ie7-icon:"\e00b"}.mce-i-indent{-ie7-icon:"\e00c"}.mce-i-outdent{-ie7-icon:"\e00d"}.mce-i-blockquote{-ie7-icon:"\e00e"}.mce-i-undo{-ie7-icon:"\e00f"}.mce-i-redo{-ie7-icon:"\e010"}.mce-i-link{-ie7-icon:"\e011"}.mce-i-unlink{-ie7-icon:"\e012"}.mce-i-anchor{-ie7-icon:"\e013"}.mce-i-image{-ie7-icon:"\e014"}.mce-i-media{-ie7-icon:"\e015"}.mce-i-help{-ie7-icon:"\e016"}.mce-i-code{-ie7-icon:"\e017"}.mce-i-insertdatetime{-ie7-icon:"\e018"}.mce-i-preview{-ie7-icon:"\e019"}.mce-i-forecolor{-ie7-icon:"\e01a"}.mce-i-backcolor{-ie7-icon:"\e01a"}.mce-i-table{-ie7-icon:"\e01b"}.mce-i-hr{-ie7-icon:"\e01c"}.mce-i-removeformat{-ie7-icon:"\e01d"}.mce-i-subscript{-ie7-icon:"\e01e"}.mce-i-superscript{-ie7-icon:"\e01f"}.mce-i-charmap{-ie7-icon:"\e020"}.mce-i-emoticons{-ie7-icon:"\e021"}.mce-i-print{-ie7-icon:"\e022"}.mce-i-fullscreen{-ie7-icon:"\e023"}.mce-i-spellchecker{-ie7-icon:"\e024"}.mce-i-nonbreaking{-ie7-icon:"\e025"}.mce-i-template{-ie7-icon:"\e026"}.mce-i-pagebreak{-ie7-icon:"\e027"}.mce-i-restoredraft{-ie7-icon:"\e028"}.mce-i-untitled{-ie7-icon:"\e029"}.mce-i-bold{-ie7-icon:"\e02a"}.mce-i-italic{-ie7-icon:"\e02b"}.mce-i-underline{-ie7-icon:"\e02c"}.mce-i-strikethrough{-ie7-icon:"\e02d"}.mce-i-visualchars{-ie7-icon:"\e02e"}.mce-i-ltr{-ie7-icon:"\e02f"}.mce-i-rtl{-ie7-icon:"\e030"}.mce-i-copy{-ie7-icon:"\e031"}.mce-i-resize{-ie7-icon:"\e032"}.mce-i-browse{-ie7-icon:"\e034"}.mce-i-pastetext{-ie7-icon:"\e035"}.mce-i-rotateleft{-ie7-icon:"\eaa8"}.mce-i-rotateright{-ie7-icon:"\eaa9"}.mce-i-crop{-ie7-icon:"\ee78"}.mce-i-editimage{-ie7-icon:"\e914"}.mce-i-options{-ie7-icon:"\ec6a"}.mce-i-flipv{-ie7-icon:"\eaaa"}.mce-i-fliph{-ie7-icon:"\eaac"}.mce-i-zoomin{-ie7-icon:"\eb35"}.mce-i-zoomout{-ie7-icon:"\eb36"}.mce-i-sun{-ie7-icon:"\eccc"}.mce-i-moon{-ie7-icon:"\eccd"}.mce-i-arrowleft{-ie7-icon:"\edc0"}.mce-i-arrowright{-ie7-icon:"\edb8"}.mce-i-drop{-ie7-icon:"\e934"}.mce-i-contrast{-ie7-icon:"\ecd4"}.mce-i-sharpen{-ie7-icon:"\eba7"}.mce-i-palette{-ie7-icon:"\e92a"}.mce-i-resize2{-ie7-icon:"\edf9"}.mce-i-orientation{-ie7-icon:"\e601"}.mce-i-invert{-ie7-icon:"\e602"}.mce-i-gamma{-ie7-icon:"\e600"}.mce-i-remove{-ie7-icon:"\ed6a"}.mce-i-codesample{-ie7-icon:"\e603"}.mce-i-checkbox,.mce-i-selected{-ie7-icon:"\e033"}.mce-i-selected{visibility:hidden}.mce-i-backcolor{background:#bbb}
\ No newline at end of file
index 9ff09bee9c367c29a8dc3dc563405d201ec471e7..43598556c94d90b4f9384c7610b473ee30fc16e3 100644 (file)
@@ -1 +1 @@
-.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit !important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#fff;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid rgba(0,0,0,0.2);width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td.mce-grid-cell div{border:1px solid #d6d6d6;width:15px;height:15px;margin:0;cursor:pointer}.mce-grid td.mce-grid-cell div:focus{border-color:#3498db}.mce-grid td.mce-grid-cell div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#3498db}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#3498db;background:#3498db}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%}.mce-colorbtn-trans div{text-align:center;vertical-align:middle;font-weight:bold;font-size:20px;line-height:16px;color:#707070}.mce-monospace{font-family:"Courier New",Courier,monospace}.mce-toolbar-grp{padding:2px 0}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-croprect-container{position:absolute;top:0;left:0}.mce-croprect-handle{position:absolute;top:0;left:0;width:20px;height:20px;border:2px solid white}.mce-croprect-handle-nw{border-width:2px 0 0 2px;margin:-2px 0 0 -2px;cursor:nw-resize;top:100px;left:100px}.mce-croprect-handle-ne{border-width:2px 2px 0 0;margin:-2px 0 0 -20px;cursor:ne-resize;top:100px;left:200px}.mce-croprect-handle-sw{border-width:0 0 2px 2px;margin:-20px 2px 0 -2px;cursor:sw-resize;top:200px;left:100px}.mce-croprect-handle-se{border-width:0 2px 2px 0;margin:-20px 0 0 -20px;cursor:se-resize;top:200px;left:200px}.mce-croprect-handle-move{position:absolute;cursor:move;border:0}.mce-croprect-block{opacity:.3;filter:alpha(opacity=30);zoom:1;position:absolute;background:black}.mce-croprect-handle:focus{border-color:#3498db}.mce-croprect-handle-move:focus{outline:1px solid #3498db}.mce-imagepanel{overflow:auto;background:black}.mce-imagepanel img{position:absolute}.mce-imagetool.mce-btn .mce-ico{display:block;width:20px;height:20px;text-align:center;line-height:20px;font-size:20px;padding:5px}.mce-arrow-up{margin-top:3px}.mce-arrow-down{margin-top:-3px}.mce-arrow:before,.mce-arrow:after{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.mce-arrow.mce-arrow-up:before{top:-9px;border-bottom-color:rgba(0,0,0,0.2);border-width:0 9px 9px;margin-left:-9px}.mce-arrow.mce-arrow-down:before{bottom:-9px;border-top-color:rgba(0,0,0,0.2);border-width:9px 9px 0;margin-left:-9px}.mce-arrow.mce-arrow-up:after{top:-8px;border-bottom-color:#f0f0f0;border-width:0 8px 8px;margin-left:-8px}.mce-arrow.mce-arrow-down:after{bottom:-8px;border-top-color:#f0f0f0;border-width:8px 8px 0;margin-left:-8px}.mce-arrow.mce-arrow-left:before,.mce-arrow.mce-arrow-left:after{margin:0}.mce-arrow.mce-arrow-left:before{left:20px}.mce-arrow.mce-arrow-left:after{left:21px}.mce-arrow.mce-arrow-right:before,.mce-arrow.mce-arrow-right:after{left:auto;margin:0}.mce-arrow.mce-arrow-right:before{right:20px}.mce-arrow.mce-arrow-right:after{right:21px}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#aaa;opacity:.6;filter:alpha(opacity=60);zoom:1}.mce-scroll{position:relative}.mce-panel{border:0 solid #cacaca;border:0 solid rgba(0,0,0,0.2);background-color:#f0f0f0}.mce-floatpanel{position:absolute}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;top:0;left:0;background:#fff;border:1px solid rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:rgba(0,0,0,0.2);border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;transform:scale(.1);transition:transform 100ms ease-in,opacity 150ms ease-in}.mce-window.mce-in{transform:scale(1);opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:0;top:0;height:38px;width:38px;text-align:center;cursor:pointer}.mce-window-head .mce-close i{color:#858585}.mce-close:hover i{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:20px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window-body .mce-listbox{border-color:#ccc}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:white;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-progress{display:inline-block;position:relative;height:20px}.mce-progress .mce-bar-container{display:inline-block;width:100px;height:100%;margin-right:8px;border:1px solid #ccc;overflow:hidden}.mce-progress .mce-text{display:inline-block;margin-top:auto;margin-bottom:auto;font-size:14px;width:40px;color:#333}.mce-bar{display:block;width:0;height:100%;background-color:#d7d7d7;-webkit-transition:width .2s ease;transition:width .2s ease}.mce-notification{position:absolute;background-color:#f0f0f0;padding:5px;margin-top:5px;border-width:1px;border-style:solid;border-color:#ccc;transform:scale(.1);transition:transform 100ms ease-in,opacity 150ms ease-in;opacity:0}.mce-notification.mce-in{opacity:1;transform:scale(1)}.mce-notification-success{background-color:#dff0d8;border-color:#d6e9c6}.mce-notification-info{background-color:#d9edf7;border-color:#779ecb}.mce-notification-warning{background-color:#fcf8e3;border-color:#faebcc}.mce-notification-error{background-color:#f2dede;border-color:#ebccd1}.mce-notification.mce-has-close{padding-right:15px}.mce-notification .mce-ico{margin-top:5px}.mce-notification-inner{display:inline-block;font-size:14px;margin:5px 8px 4px 8px;text-align:center;white-space:normal;color:#31708f}.mce-notification-inner a{text-decoration:underline;cursor:pointer}.mce-notification .mce-progress{margin-right:8px}.mce-notification .mce-progress .mce-text{margin-top:5px}.mce-notification *,.mce-notification .mce-progress .mce-text{color:#333}.mce-notification .mce-progress .mce-bar-container{border-color:#ccc}.mce-notification .mce-progress .mce-bar-container .mce-bar{background-color:#333}.mce-notification-success *,.mce-notification-success .mce-progress .mce-text{color:#3c763d}.mce-notification-success .mce-progress .mce-bar-container{border-color:#d6e9c6}.mce-notification-success .mce-progress .mce-bar-container .mce-bar{background-color:#3c763d}.mce-notification-info *,.mce-notification-info .mce-progress .mce-text{color:#31708f}.mce-notification-info .mce-progress .mce-bar-container{border-color:#779ecb}.mce-notification-info .mce-progress .mce-bar-container .mce-bar{background-color:#31708f}.mce-notification-warning *,.mce-notification-warning .mce-progress .mce-text{color:#8a6d3b}.mce-notification-warning .mce-progress .mce-bar-container{border-color:#faebcc}.mce-notification-warning .mce-progress .mce-bar-container .mce-bar{background-color:#8a6d3b}.mce-notification-error *,.mce-notification-error .mce-progress .mce-text{color:#a94442}.mce-notification-error .mce-progress .mce-bar-container{border-color:#ebccd1}.mce-notification-error .mce-progress .mce-bar-container .mce-bar{background-color:#a94442}.mce-notification .mce-close{position:absolute;top:6px;right:8px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-btn{border:1px solid #b1b1b1;border-color:transparent transparent transparent transparent;position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;background-color:#f0f0f0}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;border-color:#ccc}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#dbdbdb;border-color:#ccc}.mce-btn:active{background-color:#e0e0e0;border-color:#ccc}.mce-btn button{padding:4px 8px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px none}.mce-primary{min-width:50px;color:#fff;border:1px solid transparent;border-color:transparent;background-color:#2d8ac7}.mce-primary:hover,.mce-primary:focus{background-color:#257cb6;border-color:transparent}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#206ea1}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px none}.mce-btn .mce-txt{font-size:inherit;line-height:inherit;color:inherit}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-btn-flat{border:0;background:transparent;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none}.mce-btn-has-text .mce-ico{padding-right:5px}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px;margin:0;margin-left:2px}.mce-btn-group:not(:first-child){border-left:1px solid #d9d9d9;padding-left:3px;margin-left:3px}.mce-btn-group .mce-first{margin-left:0}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-rtl .mce-btn-group .mce-btn{margin-left:0;margin-right:2px}.mce-rtl .mce-btn-group .mce-first{margin-right:0}.mce-rtl .mce-btn-group:not(:first-child){border-left:none;border-right:1px solid #d9d9d9;padding-right:4px;margin-right:4px}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;background-color:#f0f0f0;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-checkbox .mce-label{vertical-align:middle}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox .mce-btn{border:1px solid #c5c5c5;border-left:0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:6px;padding-left:6px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-17px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:1px solid transparent}.mce-colorbutton:hover .mce-open{border-color:#ccc}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:3px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;padding-left:2px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:0}.mce-colorpicker{position:relative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom, rgba(0,0,0,0), #000)}.mce-colorpicker-selector1{background:none;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid black;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid white;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid #333;background:#fff;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9e9e9e}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid rgba(0,0,0,0.2);width:100%;height:100%}.mce-infobox{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden;border:1px solid red}.mce-infobox div{display:block;margin:5px}.mce-infobox div button{position:absolute;top:50%;right:4px;cursor:pointer;margin-top:-8px;display:none}.mce-infobox div button:focus{outline:2px solid #ccc}.mce-infobox.mce-has-help div{margin-right:25px}.mce-infobox.mce-has-help button{display:block}.mce-infobox.mce-success{background:#dff0d8;border-color:#d6e9c6}.mce-infobox.mce-success div{color:#3c763d}.mce-infobox.mce-warning{background:#fcf8e3;border-color:#faebcc}.mce-infobox.mce-warning div{color:#8a6d3b}.mce-infobox.mce-error{background:#f2dede;border-color:#ebccd1}.mce-infobox.mce-error div{color:#a94442}.mce-rtl .mce-infobox div{text-align:right;direction:rtl}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-success{color:#468847}.mce-label.mce-warning{color:#c09853}.mce-label.mce-error{color:#b94a48}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;filter:none}.mce-menubar .mce-menubtn button{color:#333}.mce-menubar{border:1px solid rgba(217,217,217,0.52)}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:#ccc;background:#fff;filter:none}.mce-menubtn button{color:#333}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:white}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:white}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:white}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:white}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#3498db}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:white}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:white}.mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:white}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:white;background-color:#2d8ac7}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:transparent;border-bottom:1px solid rgba(0,0,0,0.1);cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:white}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}.mce-menu .mce-throbber-inline{height:25px;background-size:contain}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:-1px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-selectbox{background:#fff;border:1px solid #c5c5c5}.mce-slider{border:1px solid #aaa;background:#eee;width:100px;height:10px;position:relative;display:block}.mce-slider.mce-vertical{width:10px;height:100px}.mce-slider-handle{border:1px solid #bbb;background:#ddd;display:block;width:13px;height:13px;position:absolute;top:0;left:0;margin-left:-1px;margin-top:-2px}.mce-slider-handle:focus{background:#bbb}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#ccc}.mce-splitbtn button{padding-right:6px;padding-left:6px}.mce-splitbtn .mce-open{padding-right:4px;padding-left:4px}.mce-splitbtn .mce-open.mce-active{background-color:#dbdbdb;outline:1px solid #ccc}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:4px;padding-left:4px}.mce-rtl .mce-splitbtn .mce-open{border-left:0}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tabs,.mce-tabs+.mce-container-body{background:#fff}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#fff;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:#3498db}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px;height:auto}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce',Arial;font-style:normal;font-weight:normal;font-variant:normal;font-size:16px;line-height:16px;speak:none;vertical-align:text-top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;background:transparent center center;background-size:cover;width:16px;height:16px;color:#333}.mce-btn-small .mce-ico{font-family:'tinymce-small',Arial}.mce-i-save:before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-alignnone:before{content:"\e003"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image:before{content:"\e014"}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-insertdatetime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content:"\e027"}.mce-i-restoredraft:before{content:"\e028"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-visualblocks:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-pastetext:before{content:"\e035"}.mce-i-rotateleft:before{content:"\eaa8"}.mce-i-rotateright:before{content:"\eaa9"}.mce-i-crop:before{content:"\ee78"}.mce-i-editimage:before{content:"\e915"}.mce-i-options:before{content:"\ec6a"}.mce-i-flipv:before{content:"\eaaa"}.mce-i-fliph:before{content:"\eaac"}.mce-i-zoomin:before{content:"\eb35"}.mce-i-zoomout:before{content:"\eb36"}.mce-i-sun:before{content:"\eccc"}.mce-i-moon:before{content:"\eccd"}.mce-i-arrowleft:before{content:"\edc0"}.mce-i-arrowright:before{content:"\e93c"}.mce-i-drop:before{content:"\e935"}.mce-i-contrast:before{content:"\ecd4"}.mce-i-sharpen:before{content:"\eba7"}.mce-i-resize2:before{content:"\edf9"}.mce-i-orientation:before{content:"\e601"}.mce-i-invert:before{content:"\e602"}.mce-i-gamma:before{content:"\e600"}.mce-i-remove:before{content:"\ed6a"}.mce-i-tablerowprops:before{content:"\e604"}.mce-i-tablecellprops:before{content:"\e605"}.mce-i-table2:before{content:"\e606"}.mce-i-tablemergecells:before{content:"\e607"}.mce-i-tableinsertcolbefore:before{content:"\e608"}.mce-i-tableinsertcolafter:before{content:"\e609"}.mce-i-tableinsertrowbefore:before{content:"\e60a"}.mce-i-tableinsertrowafter:before{content:"\e60b"}.mce-i-tablesplitcells:before{content:"\e60d"}.mce-i-tabledelete:before{content:"\e60e"}.mce-i-tableleftheader:before{content:"\e62a"}.mce-i-tabletopheader:before{content:"\e62b"}.mce-i-tabledeleterow:before{content:"\e800"}.mce-i-tabledeletecol:before{content:"\e801"}.mce-i-codesample:before{content:"\e603"}.mce-i-fill:before{content:"\e902"}.mce-i-borderwidth:before{content:"\e903"}.mce-i-line:before{content:"\e904"}.mce-i-count:before{content:"\e905"}.mce-i-translate:before{content:"\e907"}.mce-i-drag:before{content:"\e908"}.mce-i-home:before{content:"\e90b"}.mce-i-upload:before{content:"\e914"}.mce-i-bubble:before{content:"\e91c"}.mce-i-user:before{content:"\e91d"}.mce-i-lock:before{content:"\e926"}.mce-i-unlock:before{content:"\e927"}.mce-i-settings:before{content:"\e928"}.mce-i-remove2:before{content:"\e92a"}.mce-i-menu:before{content:"\e92d"}.mce-i-warning:before{content:"\e930"}.mce-i-question:before{content:"\e931"}.mce-i-pluscircle:before{content:"\e932"}.mce-i-info:before{content:"\e933"}.mce-i-notice:before{content:"\e934"}.mce-i-arrowup:before{content:"\e93b"}.mce-i-arrowdown:before{content:"\e93d"}.mce-i-arrowup2:before{content:"\e93f"}.mce-i-arrowdown2:before{content:"\e940"}.mce-i-menu2:before{content:"\e941"}.mce-i-newtab:before{content:"\e961"}.mce-i-a11y:before{content:"\e900"}.mce-i-plus:before{content:"\e93a"}.mce-i-minus:before{content:"\e939"}.mce-i-books:before{content:"\e911"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#bbb}
\ No newline at end of file
+.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit !important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#fff;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid rgba(0,0,0,0.2);width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td.mce-grid-cell div{border:1px solid #d6d6d6;width:15px;height:15px;margin:0;cursor:pointer}.mce-grid td.mce-grid-cell div:focus{border-color:#3498db}.mce-grid td.mce-grid-cell div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#3498db}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#3498db;background:#3498db}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%}.mce-colorbtn-trans div{text-align:center;vertical-align:middle;font-weight:bold;font-size:20px;line-height:16px;color:#707070}.mce-monospace{font-family:"Courier New",Courier,monospace}.mce-toolbar-grp{padding:2px 0}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-croprect-container{position:absolute;top:0;left:0}.mce-croprect-handle{position:absolute;top:0;left:0;width:20px;height:20px;border:2px solid white}.mce-croprect-handle-nw{border-width:2px 0 0 2px;margin:-2px 0 0 -2px;cursor:nw-resize;top:100px;left:100px}.mce-croprect-handle-ne{border-width:2px 2px 0 0;margin:-2px 0 0 -20px;cursor:ne-resize;top:100px;left:200px}.mce-croprect-handle-sw{border-width:0 0 2px 2px;margin:-20px 2px 0 -2px;cursor:sw-resize;top:200px;left:100px}.mce-croprect-handle-se{border-width:0 2px 2px 0;margin:-20px 0 0 -20px;cursor:se-resize;top:200px;left:200px}.mce-croprect-handle-move{position:absolute;cursor:move;border:0}.mce-croprect-block{opacity:.3;filter:alpha(opacity=30);zoom:1;position:absolute;background:black}.mce-croprect-handle:focus{border-color:#3498db}.mce-croprect-handle-move:focus{outline:1px solid #3498db}.mce-imagepanel{overflow:auto;background:black}.mce-imagepanel img{position:absolute}.mce-imagetool.mce-btn .mce-ico{display:block;width:20px;height:20px;text-align:center;line-height:20px;font-size:20px;padding:5px}.mce-arrow-up{margin-top:12px}.mce-arrow-down{margin-top:-12px}.mce-arrow:before,.mce-arrow:after{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.mce-arrow.mce-arrow-up:before{top:-9px;border-bottom-color:rgba(0,0,0,0.2);border-width:0 9px 9px;margin-left:-9px}.mce-arrow.mce-arrow-down:before{bottom:-9px;border-top-color:rgba(0,0,0,0.2);border-width:9px 9px 0;margin-left:-9px}.mce-arrow.mce-arrow-up:after{top:-8px;border-bottom-color:#f0f0f0;border-width:0 8px 8px;margin-left:-8px}.mce-arrow.mce-arrow-down:after{bottom:-8px;border-top-color:#f0f0f0;border-width:8px 8px 0;margin-left:-8px}.mce-arrow.mce-arrow-left:before,.mce-arrow.mce-arrow-left:after{margin:0}.mce-arrow.mce-arrow-left:before{left:8px}.mce-arrow.mce-arrow-left:after{left:9px}.mce-arrow.mce-arrow-right:before,.mce-arrow.mce-arrow-right:after{left:auto;margin:0}.mce-arrow.mce-arrow-right:before{right:8px}.mce-arrow.mce-arrow-right:after{right:9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:before{left:-9px;top:50%;border-right-color:rgba(0,0,0,0.2);border-width:9px 9px 9px 0;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:after{left:-8px;top:50%;border-right-color:#f0f0f0;border-width:8px 8px 8px 0;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left{margin-left:12px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:before{right:-9px;top:50%;border-left-color:rgba(0,0,0,0.2);border-width:9px 0 9px 9px;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:after{right:-8px;top:50%;border-left-color:#f0f0f0;border-width:8px 0 8px 8px;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right{margin-left:-14px}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#aaa;opacity:.6;filter:alpha(opacity=60);zoom:1}.mce-scroll{position:relative}.mce-panel{border:0 solid #cacaca;border:0 solid rgba(0,0,0,0.2);background-color:#f0f0f0}.mce-floatpanel{position:absolute}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;top:0;left:0;background:#fff;border:1px solid rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:rgba(0,0,0,0.2);border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;transform:scale(.1);transition:transform 100ms ease-in,opacity 150ms ease-in}.mce-window.mce-in{transform:scale(1);opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:0;top:0;height:38px;width:38px;text-align:center;cursor:pointer}.mce-window-head .mce-close i{color:#858585}.mce-close:hover i{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:20px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window-body .mce-listbox{border-color:#ccc}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:white;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-progress{display:inline-block;position:relative;height:20px}.mce-progress .mce-bar-container{display:inline-block;width:100px;height:100%;margin-right:8px;border:1px solid #ccc;overflow:hidden}.mce-progress .mce-text{display:inline-block;margin-top:auto;margin-bottom:auto;font-size:14px;width:40px;color:#333}.mce-bar{display:block;width:0;height:100%;background-color:#d7d7d7;-webkit-transition:width .2s ease;transition:width .2s ease}.mce-notification{position:absolute;background-color:#f0f0f0;padding:5px;margin-top:5px;border-width:1px;border-style:solid;border-color:#ccc;transition:transform 100ms ease-in,opacity 150ms ease-in;opacity:0}.mce-notification.mce-in{opacity:1}.mce-notification-success{background-color:#dff0d8;border-color:#d6e9c6}.mce-notification-info{background-color:#d9edf7;border-color:#779ecb}.mce-notification-warning{background-color:#fcf8e3;border-color:#faebcc}.mce-notification-error{background-color:#f2dede;border-color:#ebccd1}.mce-notification.mce-has-close{padding-right:15px}.mce-notification .mce-ico{margin-top:5px}.mce-notification-inner{display:inline-block;font-size:14px;margin:5px 8px 4px 8px;text-align:center;white-space:normal;color:#31708f}.mce-notification-inner a{text-decoration:underline;cursor:pointer}.mce-notification .mce-progress{margin-right:8px}.mce-notification .mce-progress .mce-text{margin-top:5px}.mce-notification *,.mce-notification .mce-progress .mce-text{color:#333}.mce-notification .mce-progress .mce-bar-container{border-color:#ccc}.mce-notification .mce-progress .mce-bar-container .mce-bar{background-color:#333}.mce-notification-success *,.mce-notification-success .mce-progress .mce-text{color:#3c763d}.mce-notification-success .mce-progress .mce-bar-container{border-color:#d6e9c6}.mce-notification-success .mce-progress .mce-bar-container .mce-bar{background-color:#3c763d}.mce-notification-info *,.mce-notification-info .mce-progress .mce-text{color:#31708f}.mce-notification-info .mce-progress .mce-bar-container{border-color:#779ecb}.mce-notification-info .mce-progress .mce-bar-container .mce-bar{background-color:#31708f}.mce-notification-warning *,.mce-notification-warning .mce-progress .mce-text{color:#8a6d3b}.mce-notification-warning .mce-progress .mce-bar-container{border-color:#faebcc}.mce-notification-warning .mce-progress .mce-bar-container .mce-bar{background-color:#8a6d3b}.mce-notification-error *,.mce-notification-error .mce-progress .mce-text{color:#a94442}.mce-notification-error .mce-progress .mce-bar-container{border-color:#ebccd1}.mce-notification-error .mce-progress .mce-bar-container .mce-bar{background-color:#a94442}.mce-notification .mce-close{position:absolute;top:6px;right:8px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-btn{border:1px solid #b1b1b1;border-color:transparent transparent transparent transparent;position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;background-color:#f0f0f0}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;border-color:#ccc}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#dbdbdb;border-color:#ccc}.mce-btn:active{background-color:#e0e0e0;border-color:#ccc}.mce-btn button{padding:4px 8px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px none}.mce-primary.mce-btn-has-text{min-width:50px}.mce-primary{color:#fff;border:1px solid transparent;border-color:transparent;background-color:#2d8ac7}.mce-primary:hover,.mce-primary:focus{background-color:#257cb6;border-color:transparent}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#206ea1}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px none}.mce-btn .mce-txt{font-size:inherit;line-height:inherit;color:inherit}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-btn-flat{border:0;background:transparent;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none}.mce-btn-has-text .mce-ico{padding-right:5px}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px;margin:0;margin-left:2px}.mce-btn-group:not(:first-child){border-left:1px solid #d9d9d9;padding-left:3px;margin-left:3px}.mce-btn-group .mce-first{margin-left:0}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-rtl .mce-btn-group .mce-btn{margin-left:0;margin-right:2px}.mce-rtl .mce-btn-group .mce-first{margin-right:0}.mce-rtl .mce-btn-group:not(:first-child){border-left:none;border-right:1px solid #d9d9d9;padding-right:4px;margin-right:4px}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;background-color:#f0f0f0;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-checkbox .mce-label{vertical-align:middle}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox .mce-btn{border:1px solid #c5c5c5;border-left:0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:6px;padding-left:6px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-17px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:1px solid transparent}.mce-colorbutton:hover .mce-open{border-color:#ccc}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:3px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;padding-left:2px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:0}.mce-colorpicker{position:relative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom, rgba(0,0,0,0), #000)}.mce-colorpicker-selector1{background:none;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid black;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid white;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid #333;background:#fff;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9e9e9e}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid rgba(0,0,0,0.2);width:100%;height:100%}.mce-infobox{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden;border:1px solid red}.mce-infobox div{display:block;margin:5px}.mce-infobox div button{position:absolute;top:50%;right:4px;cursor:pointer;margin-top:-8px;display:none}.mce-infobox div button:focus{outline:2px solid #ccc}.mce-infobox.mce-has-help div{margin-right:25px}.mce-infobox.mce-has-help button{display:block}.mce-infobox.mce-success{background:#dff0d8;border-color:#d6e9c6}.mce-infobox.mce-success div{color:#3c763d}.mce-infobox.mce-warning{background:#fcf8e3;border-color:#faebcc}.mce-infobox.mce-warning div{color:#8a6d3b}.mce-infobox.mce-error{background:#f2dede;border-color:#ebccd1}.mce-infobox.mce-error div{color:#a94442}.mce-rtl .mce-infobox div{text-align:right;direction:rtl}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-success{color:#468847}.mce-label.mce-warning{color:#c09853}.mce-label.mce-error{color:#b94a48}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;filter:none}.mce-menubar .mce-menubtn button{color:#333}.mce-menubar{border:1px solid rgba(217,217,217,0.52)}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:#ccc;background:#fff;filter:none}.mce-menubtn button{color:#333}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:white}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:white}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:white}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:white}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#3498db}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:white}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:white}.mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:white}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:white;background-color:#2d8ac7}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:transparent;border-bottom:1px solid rgba(0,0,0,0.1);cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:white}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}.mce-menu .mce-throbber-inline{height:25px;background-size:contain}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:-1px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-selectbox{background:#fff;border:1px solid #c5c5c5}.mce-slider{border:1px solid #aaa;background:#eee;width:100px;height:10px;position:relative;display:block}.mce-slider.mce-vertical{width:10px;height:100px}.mce-slider-handle{border:1px solid #bbb;background:#ddd;display:block;width:13px;height:13px;position:absolute;top:0;left:0;margin-left:-1px;margin-top:-2px}.mce-slider-handle:focus{background:#bbb}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#ccc}.mce-splitbtn button{padding-right:6px;padding-left:6px}.mce-splitbtn .mce-open{padding-right:4px;padding-left:4px}.mce-splitbtn .mce-open.mce-active{background-color:#dbdbdb;outline:1px solid #ccc}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:4px;padding-left:4px}.mce-rtl .mce-splitbtn .mce-open{border-left:0}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tabs,.mce-tabs+.mce-container-body{background:#fff}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#fff;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:#3498db}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px;height:auto}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce',Arial;font-style:normal;font-weight:normal;font-variant:normal;font-size:16px;line-height:16px;speak:none;vertical-align:text-top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;background:transparent center center;background-size:cover;width:16px;height:16px;color:#333}.mce-btn-small .mce-ico{font-family:'tinymce-small',Arial}.mce-i-save:before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-alignnone:before{content:"\e003"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image:before{content:"\e014"}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-insertdatetime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content:"\e027"}.mce-i-restoredraft:before{content:"\e028"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-visualblocks:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-pastetext:before{content:"\e035"}.mce-i-rotateleft:before{content:"\eaa8"}.mce-i-rotateright:before{content:"\eaa9"}.mce-i-crop:before{content:"\ee78"}.mce-i-editimage:before{content:"\e915"}.mce-i-options:before{content:"\ec6a"}.mce-i-flipv:before{content:"\eaaa"}.mce-i-fliph:before{content:"\eaac"}.mce-i-zoomin:before{content:"\eb35"}.mce-i-zoomout:before{content:"\eb36"}.mce-i-sun:before{content:"\eccc"}.mce-i-moon:before{content:"\eccd"}.mce-i-arrowleft:before{content:"\edc0"}.mce-i-arrowright:before{content:"\e93c"}.mce-i-drop:before{content:"\e935"}.mce-i-contrast:before{content:"\ecd4"}.mce-i-sharpen:before{content:"\eba7"}.mce-i-resize2:before{content:"\edf9"}.mce-i-orientation:before{content:"\e601"}.mce-i-invert:before{content:"\e602"}.mce-i-gamma:before{content:"\e600"}.mce-i-remove:before{content:"\ed6a"}.mce-i-tablerowprops:before{content:"\e604"}.mce-i-tablecellprops:before{content:"\e605"}.mce-i-table2:before{content:"\e606"}.mce-i-tablemergecells:before{content:"\e607"}.mce-i-tableinsertcolbefore:before{content:"\e608"}.mce-i-tableinsertcolafter:before{content:"\e609"}.mce-i-tableinsertrowbefore:before{content:"\e60a"}.mce-i-tableinsertrowafter:before{content:"\e60b"}.mce-i-tablesplitcells:before{content:"\e60d"}.mce-i-tabledelete:before{content:"\e60e"}.mce-i-tableleftheader:before{content:"\e62a"}.mce-i-tabletopheader:before{content:"\e62b"}.mce-i-tabledeleterow:before{content:"\e800"}.mce-i-tabledeletecol:before{content:"\e801"}.mce-i-codesample:before{content:"\e603"}.mce-i-fill:before{content:"\e902"}.mce-i-borderwidth:before{content:"\e903"}.mce-i-line:before{content:"\e904"}.mce-i-count:before{content:"\e905"}.mce-i-translate:before{content:"\e907"}.mce-i-drag:before{content:"\e908"}.mce-i-home:before{content:"\e90b"}.mce-i-upload:before{content:"\e914"}.mce-i-bubble:before{content:"\e91c"}.mce-i-user:before{content:"\e91d"}.mce-i-lock:before{content:"\e926"}.mce-i-unlock:before{content:"\e927"}.mce-i-settings:before{content:"\e928"}.mce-i-remove2:before{content:"\e92a"}.mce-i-menu:before{content:"\e92d"}.mce-i-warning:before{content:"\e930"}.mce-i-question:before{content:"\e931"}.mce-i-pluscircle:before{content:"\e932"}.mce-i-info:before{content:"\e933"}.mce-i-notice:before{content:"\e934"}.mce-i-arrowup:before{content:"\e93b"}.mce-i-arrowdown:before{content:"\e93d"}.mce-i-arrowup2:before{content:"\e93f"}.mce-i-arrowdown2:before{content:"\e940"}.mce-i-menu2:before{content:"\e941"}.mce-i-newtab:before{content:"\e961"}.mce-i-a11y:before{content:"\e900"}.mce-i-plus:before{content:"\e93a"}.mce-i-minus:before{content:"\e939"}.mce-i-books:before{content:"\e911"}.mce-i-checkmark:before{content:"\e033"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#bbb}
\ No newline at end of file
index 39af33835f5cbc92549852a200752e9736de08ef..fe497d877695cae11b7d0635842fc7b42026c1c7 100644 (file)
@@ -205,102 +205,38 @@ audio {
        visibility: hidden;
 }
 
-/**
- * WP Views
- */
-
-.wpview-wrap {
-       width: 99.99%; /* All IE need hasLayout, incl. 11 (ugh, not again!!) */
+a[data-wplink-url-error],
+a[data-wplink-url-error]:hover,
+a[data-wplink-url-error]:focus {
+       outline: 2px dotted #dc3232;
        position: relative;
-       clear: both;
-}
-
-/* delegate the handling of the selection to the wpview tinymce plugin */
-.wpview-wrap,
-.wpview-wrap * {
-       -moz-user-select: none;
-       -webkit-user-select: none;
-       -ms-user-select: none;
-       user-select: none;
-}
-
-/* hide the shortcode content, but allow the content to still be selected */
-.wpview-wrap .wpview-clipboard,
-.wpview-wrap > p {
-       position: absolute;
-       top: 0;
-       left: 0;
-       z-index: -1;
-       clip: rect(1px 1px 1px 1px); /* IE7 */
-       clip: rect(1px, 1px, 1px, 1px);
-       overflow: hidden;
-       outline: 0;
-       padding: 0;
-       border: 0;
-       width: 1px;
-       height: 1px;
-}
-
-/* An ugly box will appear when this is focussed in IE, so we'll move it outside the window. */
-.wpview-wrap.wpview-selection-before > p,
-.wpview-wrap.wpview-selection-after > p {
-       left: -10000px;
 }
 
-.wpview-wrap .wpview-clipboard,
-.wpview-wrap .wpview-clipboard *,
-.wpview-wrap > p {
-       -moz-user-select: text;
-       -webkit-user-select: text;
-       -ms-user-select: text;
-       user-select: text;
-}
-
-.has-focus .wpview-wrap.wpview-selection-before:before,
-.has-focus .wpview-wrap.wpview-selection-after:before {
+a[data-wplink-url-error]:before {
        content: '';
-       margin: 0;
-       padding: 0;
+       display: block;
        position: absolute;
        top: -2px;
-       left: -3px;
+       right: -2px;
        bottom: -2px;
-       width: 1px;
-       background-color: black;
-       background-color: currentcolor;
-       opacity: 1;
-}
-
-.has-focus .wpview-wrap.wpview-selection-after:before {
-       left: auto;
-       right: -3px;
-}
-
-.has-focus .wpview-wrap.wpview-cursor-hide:before {
-       opacity: 0;
+       left: -2px;
+       outline: 2px dotted #fff;
+       z-index: -1;
 }
 
 /**
- * Media previews
+ * WP Views
  */
-.wpview-wrap {
-    position: relative;
-    margin-bottom: 16px;
-       border: 1px solid transparent;
-}
-
-.wpview-wrap[data-mce-selected] {
-       background-color: rgba(0,0,0,0.1);
-       border-color: rgba(0,0,0,0.3);
-}
 
-.ie8 .wpview-wrap[data-mce-selected],
-.ie7 .wpview-wrap[data-mce-selected] {
-       background-color: #e5e5e5;
-       border-color: #72777c;
+.wpview {
+       width: 99.99%; /* All IE need hasLayout, incl. 11 (ugh, not again!!) */
+       position: relative;
+       clear: both;
+       margin-bottom: 16px;
+       border: 1px solid transparent;
 }
 
-.wpview-overlay {
+.mce-shim {
        position: absolute;
        top: 0;
        right: 0;
@@ -308,21 +244,21 @@ audio {
        left: 0;
 }
 
-.wpview-wrap[data-mce-selected] .wpview-overlay {
+.wpview[data-mce-selected="2"] .mce-shim {
        display: none;
 }
 
-.wpview-wrap .loading-placeholder {
+.wpview .loading-placeholder {
        border: 1px dashed #ccc;
        padding: 10px;
 }
 
-.wpview-wrap[data-mce-selected] .loading-placeholder {
+.wpview[data-mce-selected] .loading-placeholder {
        border-color: transparent;
 }
 
 /* A little "loading" animation, not showing in IE < 10 */
-.wpview-wrap .wpview-loading {
+.wpview .wpview-loading {
        width: 60px;
        height: 5px;
        overflow: hidden;
@@ -330,7 +266,7 @@ audio {
        margin: 10px auto 0;
 }
 
-.wpview-wrap .wpview-loading ins {
+.wpview .wpview-loading ins {
        background-color: #333;
        margin: 0 0 0 -60px;
        width: 36px;
@@ -358,7 +294,7 @@ audio {
        }
 }
 
-.wpview-wrap .wpview-content > iframe {
+.wpview .wpview-content > iframe {
        max-width: 100%;
        background: transparent;
 }
@@ -370,7 +306,7 @@ audio {
        word-wrap: break-word;
 }
 
-.wpview-wrap[data-mce-selected] .wpview-error {
+.wpview[data-mce-selected] .wpview-error {
        border-color: transparent;
 }
 
@@ -386,7 +322,7 @@ audio {
 .wpview-error p {
        margin: 0;
        text-align: center;
-       font-family: 'Open Sans', sans-serif;
+       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
 }
 
 .wpview-type-gallery:after {
diff --git a/wp-includes/js/tinymce/themes/inlite/theme.js b/wp-includes/js/tinymce/themes/inlite/theme.js
new file mode 100644 (file)
index 0000000..13152a5
--- /dev/null
@@ -0,0 +1,1679 @@
+(function () {
+
+var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
+
+// Used when there is no 'main' module.
+// The name is probably (hopefully) unique so minification removes for releases.
+var register_3795 = function (id) {
+  var module = dem(id);
+  var fragments = id.split('.');
+  var target = Function('return this;')();
+  for (var i = 0; i < fragments.length - 1; ++i) {
+    if (target[fragments[i]] === undefined)
+      target[fragments[i]] = {};
+    target = target[fragments[i]];
+  }
+  target[fragments[fragments.length - 1]] = module;
+};
+
+var instantiate = function (id) {
+  var actual = defs[id];
+  var dependencies = actual.deps;
+  var definition = actual.defn;
+  var len = dependencies.length;
+  var instances = new Array(len);
+  for (var i = 0; i < len; ++i)
+    instances[i] = dem(dependencies[i]);
+  var defResult = definition.apply(null, instances);
+  if (defResult === undefined)
+     throw 'module [' + id + '] returned undefined';
+  actual.instance = defResult;
+};
+
+var def = function (id, dependencies, definition) {
+  if (typeof id !== 'string')
+    throw 'module id must be a string';
+  else if (dependencies === undefined)
+    throw 'no dependencies for ' + id;
+  else if (definition === undefined)
+    throw 'no definition function for ' + id;
+  defs[id] = {
+    deps: dependencies,
+    defn: definition,
+    instance: undefined
+  };
+};
+
+var dem = function (id) {
+  var actual = defs[id];
+  if (actual === undefined)
+    throw 'module [' + id + '] was undefined';
+  else if (actual.instance === undefined)
+    instantiate(id);
+  return actual.instance;
+};
+
+var req = function (ids, callback) {
+  var len = ids.length;
+  var instances = new Array(len);
+  for (var i = 0; i < len; ++i)
+    instances.push(dem(ids[i]));
+  callback.apply(null, callback);
+};
+
+var ephox = {};
+
+ephox.bolt = {
+  module: {
+    api: {
+      define: def,
+      require: req,
+      demand: dem
+    }
+  }
+};
+
+var define = def;
+var require = req;
+var demand = dem;
+// this helps with minificiation when using a lot of global references
+var defineGlobal = function (id, ref) {
+  define(id, [], function () { return ref; });
+};
+/*jsc
+["tinymce/inlite/Theme","global!tinymce.ThemeManager","global!tinymce.util.Delay","tinymce/inlite/ui/Panel","tinymce/inlite/ui/Buttons","tinymce/inlite/core/SkinLoader","tinymce/inlite/core/SelectionMatcher","tinymce/inlite/core/ElementMatcher","tinymce/inlite/core/Matcher","tinymce/inlite/alien/Arr","tinymce/inlite/core/PredicateId","global!tinymce.util.Tools","global!tinymce.ui.Factory","global!tinymce.DOM","tinymce/inlite/ui/Toolbar","tinymce/inlite/ui/Forms","tinymce/inlite/core/Measure","tinymce/inlite/core/Layout","tinymce/inlite/file/Conversions","tinymce/inlite/file/Picker","tinymce/inlite/core/Actions","global!tinymce.EditorManager","global!tinymce.util.Promise","tinymce/inlite/alien/Uuid","tinymce/inlite/alien/Unlink","tinymce/inlite/core/UrlType","global!tinymce.geom.Rect","tinymce/inlite/core/Convert","tinymce/inlite/alien/Bookmark","global!tinymce.dom.TreeWalker","global!tinymce.dom.RangeUtils"]
+jsc*/
+defineGlobal("global!tinymce.ThemeManager", tinymce.ThemeManager);
+defineGlobal("global!tinymce.util.Delay", tinymce.util.Delay);
+defineGlobal("global!tinymce.util.Tools", tinymce.util.Tools);
+defineGlobal("global!tinymce.ui.Factory", tinymce.ui.Factory);
+defineGlobal("global!tinymce.DOM", tinymce.DOM);
+/**
+ * Toolbar.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/ui/Toolbar', [
+       'global!tinymce.util.Tools',
+       'global!tinymce.ui.Factory'
+], function (Tools, Factory) {
+       var setActiveItem = function (item, name) {
+               return function(state, args) {
+                       var nodeName, i = args.parents.length;
+
+                       while (i--) {
+                               nodeName = args.parents[i].nodeName;
+                               if (nodeName == 'OL' || nodeName == 'UL') {
+                                       break;
+                               }
+                       }
+
+                       item.active(state && nodeName == name);
+               };
+       };
+
+       var getSelectorStateResult = function (itemName, item) {
+               var result = function (selector, handler) {
+                       return {
+                               selector: selector,
+                               handler: handler
+                       };
+               };
+
+               var activeHandler = function(state) {
+                       item.active(state);
+               };
+
+               var disabledHandler = function (state) {
+                       item.disabled(state);
+               };
+
+               if (itemName == 'bullist') {
+                       return result('ul > li', setActiveItem(item, 'UL'));
+               }
+
+               if (itemName == 'numlist') {
+                       return result('ol > li', setActiveItem(item, 'OL'));
+               }
+
+               if (item.settings.stateSelector) {
+                       return result(item.settings.stateSelector, activeHandler);
+               }
+
+               if (item.settings.disabledStateSelector) {
+                       return result(item.settings.disabledStateSelector, disabledHandler);
+               }
+
+               return null;
+       };
+
+       var bindSelectorChanged = function (editor, itemName, item) {
+               return function () {
+                       var result = getSelectorStateResult(itemName, item);
+                       if (result !== null) {
+                               editor.selection.selectorChanged(result.selector, result.handler);
+                       }
+               };
+       };
+
+       var create = function (editor, name, items) {
+               var toolbarItems = [], buttonGroup;
+
+               if (!items) {
+                       return;
+               }
+
+               Tools.each(items.split(/[ ,]/), function(item) {
+                       var itemName;
+
+                       if (item == '|') {
+                               buttonGroup = null;
+                       } else {
+                               if (Factory.has(item)) {
+                                       item = {type: item};
+                                       toolbarItems.push(item);
+                                       buttonGroup = null;
+                               } else {
+                                       if (!buttonGroup) {
+                                               buttonGroup = {type: 'buttongroup', items: []};
+                                               toolbarItems.push(buttonGroup);
+                                       }
+
+                                       if (editor.buttons[item]) {
+                                               itemName = item;
+                                               item = editor.buttons[itemName];
+
+                                               if (typeof item == 'function') {
+                                                       item = item();
+                                               }
+
+                                               item.type = item.type || 'button';
+
+                                               item = Factory.create(item);
+                                               item.on('postRender', bindSelectorChanged(editor, itemName, item));
+                                               buttonGroup.items.push(item);
+                                       }
+                               }
+                       }
+               });
+
+               return Factory.create({
+                       type: 'toolbar',
+                       layout: 'flow',
+                       name: name,
+                       items: toolbarItems
+               });
+       };
+
+       return {
+               create: create
+       };
+});
+
+defineGlobal("global!tinymce.util.Promise", tinymce.util.Promise);
+/**
+ * Uuid.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * Generates unique ids this is the same as in core but since
+ * it's not exposed as a global we can't access it.
+ */
+define("tinymce/inlite/alien/Uuid", [
+], function() {
+       var count = 0;
+
+       var seed = function () {
+               var rnd = function () {
+                       return Math.round(Math.random() * 0xFFFFFFFF).toString(36);
+               };
+
+               return 's' + Date.now().toString(36) + rnd() + rnd() + rnd();
+       };
+
+       var uuid = function (prefix) {
+               return prefix + (count++) + seed();
+       };
+
+       return {
+               uuid: uuid
+       };
+});
+
+/**
+ * Bookmark.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/alien/Bookmark', [
+], function () {
+       /**
+        * Returns a range bookmark. This will convert indexed bookmarks into temporary span elements with
+        * index 0 so that they can be restored properly after the DOM has been modified. Text bookmarks will not have spans
+        * added to them since they can be restored after a dom operation.
+        *
+        * So this: <p><b>|</b><b>|</b></p>
+        * becomes: <p><b><span data-mce-type="bookmark">|</span></b><b data-mce-type="bookmark">|</span></b></p>
+        *
+        * @param  {DOMRange} rng DOM Range to get bookmark on.
+        * @return {Object} Bookmark object.
+        */
+       var create = function (dom, rng) {
+               var bookmark = {};
+
+               function setupEndPoint(start) {
+                       var offsetNode, container, offset;
+
+                       container = rng[start ? 'startContainer' : 'endContainer'];
+                       offset = rng[start ? 'startOffset' : 'endOffset'];
+
+                       if (container.nodeType == 1) {
+                               offsetNode = dom.create('span', {'data-mce-type': 'bookmark'});
+
+                               if (container.hasChildNodes()) {
+                                       offset = Math.min(offset, container.childNodes.length - 1);
+
+                                       if (start) {
+                                               container.insertBefore(offsetNode, container.childNodes[offset]);
+                                       } else {
+                                               dom.insertAfter(offsetNode, container.childNodes[offset]);
+                                       }
+                               } else {
+                                       container.appendChild(offsetNode);
+                               }
+
+                               container = offsetNode;
+                               offset = 0;
+                       }
+
+                       bookmark[start ? 'startContainer' : 'endContainer'] = container;
+                       bookmark[start ? 'startOffset' : 'endOffset'] = offset;
+               }
+
+               setupEndPoint(true);
+
+               if (!rng.collapsed) {
+                       setupEndPoint();
+               }
+
+               return bookmark;
+       };
+
+       /**
+        * Moves the selection to the current bookmark and removes any selection container wrappers.
+        *
+        * @param {Object} bookmark Bookmark object to move selection to.
+        */
+       var resolve = function (dom, bookmark) {
+               function restoreEndPoint(start) {
+                       var container, offset, node;
+
+                       function nodeIndex(container) {
+                               var node = container.parentNode.firstChild, idx = 0;
+
+                               while (node) {
+                                       if (node == container) {
+                                               return idx;
+                                       }
+
+                                       // Skip data-mce-type=bookmark nodes
+                                       if (node.nodeType != 1 || node.getAttribute('data-mce-type') != 'bookmark') {
+                                               idx++;
+                                       }
+
+                                       node = node.nextSibling;
+                               }
+
+                               return -1;
+                       }
+
+                       container = node = bookmark[start ? 'startContainer' : 'endContainer'];
+                       offset = bookmark[start ? 'startOffset' : 'endOffset'];
+
+                       if (!container) {
+                               return;
+                       }
+
+                       if (container.nodeType == 1) {
+                               offset = nodeIndex(container);
+                               container = container.parentNode;
+                               dom.remove(node);
+                       }
+
+                       bookmark[start ? 'startContainer' : 'endContainer'] = container;
+                       bookmark[start ? 'startOffset' : 'endOffset'] = offset;
+               }
+
+               restoreEndPoint(true);
+               restoreEndPoint();
+
+               var rng = dom.createRng();
+
+               rng.setStart(bookmark.startContainer, bookmark.startOffset);
+
+               if (bookmark.endContainer) {
+                       rng.setEnd(bookmark.endContainer, bookmark.endOffset);
+               }
+
+               return rng;
+       };
+
+       return {
+               create: create,
+               resolve: resolve
+       };
+});
+
+
+
+defineGlobal("global!tinymce.dom.TreeWalker", tinymce.dom.TreeWalker);
+defineGlobal("global!tinymce.dom.RangeUtils", tinymce.dom.RangeUtils);
+/**
+ * Unlink.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * Unlink implementation that doesn't leave partial links for example it would produce:
+ *  a[b<a href="x">c]d</a>e -> a[bc]de
+ * instead of:
+ *  a[b<a href="x">c]d</a>e -> a[bc]<a href="x">d</a>e
+ */
+define("tinymce/inlite/alien/Unlink", [
+       'tinymce/inlite/alien/Bookmark',
+       'global!tinymce.util.Tools',
+       'global!tinymce.dom.TreeWalker',
+       'global!tinymce.dom.RangeUtils'
+], function (Bookmark, Tools, TreeWalker, RangeUtils) {
+       var getSelectedElements = function (rootElm, startNode, endNode) {
+               var walker, node, elms = [];
+
+               walker = new TreeWalker(startNode, rootElm);
+               for (node = startNode; node; node = walker.next()) {
+                       if (node.nodeType === 1) {
+                               elms.push(node);
+                       }
+
+                       if (node === endNode) {
+                               break;
+                       }
+               }
+
+               return elms;
+       };
+
+       var unwrapElements = function (editor, elms) {
+               var bookmark, dom, selection;
+
+               dom = editor.dom;
+               selection = editor.selection;
+               bookmark = Bookmark.create(dom, selection.getRng());
+
+               Tools.each(elms, function (elm) {
+                       editor.dom.remove(elm, true);
+               });
+
+               selection.setRng(Bookmark.resolve(dom, bookmark));
+       };
+
+       var isLink = function (elm) {
+               return elm.nodeName === 'A' && elm.hasAttribute('href');
+       };
+
+       var getParentAnchorOrSelf = function (dom, elm) {
+               var anchorElm = dom.getParent(elm, isLink);
+               return anchorElm ? anchorElm : elm;
+       };
+
+       var getSelectedAnchors = function (editor) {
+               var startElm, endElm, rootElm, anchorElms, selection, dom, rng;
+
+               selection = editor.selection;
+               dom = editor.dom;
+               rng = selection.getRng();
+               startElm = getParentAnchorOrSelf(dom, RangeUtils.getNode(rng.startContainer, rng.startOffset));
+               endElm = RangeUtils.getNode(rng.endContainer, rng.endOffset);
+               rootElm = editor.getBody();
+               anchorElms = Tools.grep(getSelectedElements(rootElm, startElm, endElm), isLink);
+
+               return anchorElms;
+       };
+
+       var unlinkSelection = function (editor) {
+               unwrapElements(editor, getSelectedAnchors(editor));
+       };
+
+       return {
+               unlinkSelection: unlinkSelection
+       };
+});
+
+/**
+ * Actions.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/core/Actions', [
+       'tinymce/inlite/alien/Uuid',
+       'tinymce/inlite/alien/Unlink'
+], function (Uuid, Unlink) {
+       var createTableHtml = function (cols, rows) {
+               var x, y, html;
+
+               html = '<table data-mce-id="mce" style="width: 100%">';
+               html += '<tbody>';
+
+               for (y = 0; y < rows; y++) {
+                       html += '<tr>';
+
+                       for (x = 0; x < cols; x++) {
+                               html += '<td><br></td>';
+                       }
+
+                       html += '</tr>';
+               }
+
+               html += '</tbody>';
+               html += '</table>';
+
+               return html;
+       };
+
+       var getInsertedElement = function (editor) {
+               var elms = editor.dom.select('*[data-mce-id]');
+               return elms[0];
+       };
+
+       var insertTable = function (editor, cols, rows) {
+               editor.undoManager.transact(function () {
+                       var tableElm, cellElm;
+
+                       editor.insertContent(createTableHtml(cols, rows));
+
+                       tableElm = getInsertedElement(editor);
+                       tableElm.removeAttribute('data-mce-id');
+                       cellElm = editor.dom.select('td,th', tableElm);
+                       editor.selection.setCursorLocation(cellElm[0], 0);
+               });
+       };
+
+       var formatBlock = function (editor, formatName) {
+               editor.execCommand('FormatBlock', false, formatName);
+       };
+
+       var insertBlob = function (editor, base64, blob) {
+               var blobCache, blobInfo;
+
+               blobCache = editor.editorUpload.blobCache;
+               blobInfo = blobCache.create(Uuid.uuid('mceu'), blob, base64);
+               blobCache.add(blobInfo);
+
+               editor.insertContent(editor.dom.createHTML('img', {src: blobInfo.blobUri()}));
+       };
+
+       var collapseSelectionToEnd = function (editor) {
+               editor.selection.collapse(false);
+       };
+
+       var unlink = function (editor) {
+               editor.focus();
+               Unlink.unlinkSelection(editor);
+               collapseSelectionToEnd(editor);
+       };
+
+       var changeHref = function (editor, elm, url) {
+               editor.focus();
+               editor.dom.setAttrib(elm, 'href', url);
+               collapseSelectionToEnd(editor);
+       };
+
+       var insertLink = function (editor, url) {
+               editor.execCommand('mceInsertLink', false, {href: url});
+               collapseSelectionToEnd(editor);
+       };
+
+       var updateOrInsertLink = function (editor, url) {
+               var elm = editor.dom.getParent(editor.selection.getStart(), 'a[href]');
+               elm ? changeHref(editor, elm, url) : insertLink(editor, url);
+       };
+
+       var createLink = function (editor, url) {
+               url.trim().length === 0 ? unlink(editor) : updateOrInsertLink(editor, url);
+       };
+
+       return {
+               insertTable: insertTable,
+               formatBlock: formatBlock,
+               insertBlob: insertBlob,
+               createLink: createLink,
+               unlink: unlink
+       };
+});
+
+/**
+ * UrlType.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/core/UrlType', [
+], function () {
+       var isDomainLike = function (href) {
+               return /^www\.|\.(com|org|edu|gov|uk|net|ca|de|jp|fr|au|us|ru|ch|it|nl|se|no|es|mil)$/i.test(href.trim());
+       };
+
+       var isAbsolute = function (href) {
+               return /^https?:\/\//.test(href.trim());
+       };
+
+       return {
+               isDomainLike: isDomainLike,
+               isAbsolute: isAbsolute
+       };
+});
+
+
+
+/**
+ * Forms.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/ui/Forms', [
+       'global!tinymce.util.Tools',
+       'global!tinymce.ui.Factory',
+       'global!tinymce.util.Promise',
+       'tinymce/inlite/core/Actions',
+       'tinymce/inlite/core/UrlType'
+], function (Tools, Factory, Promise, Actions, UrlType) {
+       var focusFirstTextBox = function (form) {
+               form.find('textbox').eq(0).each(function (ctrl) {
+                       ctrl.focus();
+               });
+       };
+
+       var createForm = function (name, spec) {
+               var form = Factory.create(
+                       Tools.extend({
+                               type: 'form',
+                               layout: 'flex',
+                               direction: 'row',
+                               padding: 5,
+                               name: name,
+                               spacing: 3
+                       }, spec)
+               );
+
+               form.on('show', function () {
+                       focusFirstTextBox(form);
+               });
+
+               return form;
+       };
+
+       var toggleVisibility = function (ctrl, state) {
+               return state ? ctrl.show() : ctrl.hide();
+       };
+
+       var askAboutPrefix = function (editor, href) {
+               return new Promise(function (resolve) {
+                       editor.windowManager.confirm(
+                               'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?',
+                               function (result) {
+                                       var output = result === true ? 'http://' + href : href;
+                                       resolve(output);
+                               }
+                       );
+               });
+       };
+
+       var convertLinkToAbsolute = function (editor, href) {
+               return !UrlType.isAbsolute(href) && UrlType.isDomainLike(href) ? askAboutPrefix(editor, href) : Promise.resolve(href);
+       };
+
+       var createQuickLinkForm = function (editor, hide) {
+               var unlink = function () {
+                       editor.focus();
+                       Actions.unlink(editor);
+                       hide();
+               };
+
+               return createForm('quicklink', {
+                       items: [
+                               {type: 'button', name: 'unlink', icon: 'unlink', onclick: unlink, tooltip: 'Remove link'},
+                               {type: 'textbox', name: 'linkurl', placeholder: 'Paste or type a link'},
+                               {type: 'button', icon: 'checkmark', subtype: 'primary', tooltip: 'Ok', onclick: 'submit'}
+                       ],
+                       onshow: function () {
+                               var elm, linkurl = '';
+
+                               elm = editor.dom.getParent(editor.selection.getStart(), 'a[href]');
+                               if (elm) {
+                                       linkurl = editor.dom.getAttrib(elm, 'href');
+                               }
+
+                               this.fromJSON({
+                                       linkurl: linkurl
+                               });
+
+                               toggleVisibility(this.find('#unlink'), elm);
+                       },
+                       onsubmit: function (e) {
+                               convertLinkToAbsolute(editor, e.data.linkurl).then(function (url) {
+                                       Actions.createLink(editor, url);
+                                       hide();
+                               });
+                       }
+               });
+       };
+
+       return {
+               createQuickLinkForm: createQuickLinkForm
+       };
+});
+
+defineGlobal("global!tinymce.geom.Rect", tinymce.geom.Rect);
+/**
+ * Convert.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/core/Convert', [
+], function () {
+       var fromClientRect = function (clientRect) {
+               return {
+                       x: clientRect.left,
+                       y: clientRect.top,
+                       w: clientRect.width,
+                       h: clientRect.height
+               };
+       };
+
+       var toClientRect = function (geomRect) {
+               return {
+                       left: geomRect.x,
+                       top: geomRect.y,
+                       width: geomRect.w,
+                       height: geomRect.h,
+                       right: geomRect.x + geomRect.w,
+                       bottom: geomRect.y + geomRect.h
+               };
+       };
+
+       return {
+               fromClientRect: fromClientRect,
+               toClientRect: toClientRect
+       };
+});
+
+/**
+ * Measure.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/core/Measure', [
+       'global!tinymce.DOM',
+       'global!tinymce.geom.Rect',
+       'tinymce/inlite/core/Convert'
+], function (DOM, Rect, Convert) {
+       var toAbsolute = function (rect) {
+               var vp = DOM.getViewPort();
+
+               return {
+                       x: rect.x + vp.x,
+                       y: rect.y + vp.y,
+                       w: rect.w,
+                       h: rect.h
+               };
+       };
+
+       var measureElement = function (elm) {
+               var clientRect = elm.getBoundingClientRect();
+
+               return toAbsolute({
+                       x: clientRect.left,
+                       y: clientRect.top,
+                       w: Math.max(elm.clientWidth, elm.offsetWidth),
+                       h: Math.max(elm.clientHeight, elm.offsetHeight)
+               });
+       };
+
+       var getElementRect = function (editor, elm) {
+               return measureElement(elm);
+       };
+
+       var getPageAreaRect = function (editor) {
+               return measureElement(editor.getElement().ownerDocument.body);
+       };
+
+       var getContentAreaRect = function (editor) {
+               return measureElement(editor.getContentAreaContainer() || editor.getBody());
+       };
+
+       var getSelectionRect = function (editor) {
+               var clientRect = editor.selection.getBoundingClientRect();
+               return clientRect ? toAbsolute(Convert.fromClientRect(clientRect)) : null;
+       };
+
+       return {
+               getElementRect: getElementRect,
+               getPageAreaRect: getPageAreaRect,
+               getContentAreaRect: getContentAreaRect,
+               getSelectionRect: getSelectionRect
+       };
+});
+
+/**
+ * Layout.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/core/Layout', [
+       'global!tinymce.geom.Rect',
+       'tinymce/inlite/core/Convert'
+], function (Rect, Convert) {
+       var result = function (rect, position) {
+               return {
+                       rect: rect,
+                       position: position
+               };
+       };
+
+       var moveTo = function (rect, toRect) {
+               return {x: toRect.x, y: toRect.y, w: rect.w, h: rect.h};
+       };
+
+       var calcByPositions = function (testPositions1, testPositions2, targetRect, contentAreaRect, panelRect) {
+               var relPos, relRect, outputPanelRect;
+
+               relPos = Rect.findBestRelativePosition(panelRect, targetRect, contentAreaRect, testPositions1);
+               targetRect = Rect.clamp(targetRect, contentAreaRect);
+
+               if (relPos) {
+                       relRect = Rect.relativePosition(panelRect, targetRect, relPos);
+                       outputPanelRect = moveTo(panelRect, relRect);
+                       return result(outputPanelRect, relPos);
+               }
+
+               targetRect = Rect.intersect(contentAreaRect, targetRect);
+               if (targetRect) {
+                       relPos = Rect.findBestRelativePosition(panelRect, targetRect, contentAreaRect, testPositions2);
+                       if (relPos) {
+                               relRect = Rect.relativePosition(panelRect, targetRect, relPos);
+                               outputPanelRect = moveTo(panelRect, relRect);
+                               return result(outputPanelRect, relPos);
+                       }
+
+                       outputPanelRect = moveTo(panelRect, targetRect);
+                       return result(outputPanelRect, relPos);
+               }
+
+               return null;
+       };
+
+       var calcInsert = function (targetRect, contentAreaRect, panelRect) {
+               return calcByPositions(
+                       ['cr-cl', 'cl-cr'],
+                       ['bc-tc', 'bl-tl', 'br-tr'],
+                       targetRect,
+                       contentAreaRect,
+                       panelRect
+               );
+       };
+
+       var calc = function (targetRect, contentAreaRect, panelRect) {
+               return calcByPositions(
+                       ['tc-bc', 'bc-tc', 'tl-bl', 'bl-tl', 'tr-br', 'br-tr'],
+                       ['bc-tc', 'bl-tl', 'br-tr'],
+                       targetRect,
+                       contentAreaRect,
+                       panelRect
+               );
+       };
+
+       var userConstrain = function (handler, targetRect, contentAreaRect, panelRect) {
+               var userConstrainedPanelRect;
+
+               if (typeof handler === 'function') {
+                       userConstrainedPanelRect = handler({
+                               elementRect: Convert.toClientRect(targetRect),
+                               contentAreaRect: Convert.toClientRect(contentAreaRect),
+                               panelRect: Convert.toClientRect(panelRect)
+                       });
+
+                       return Convert.fromClientRect(userConstrainedPanelRect);
+               }
+
+               return panelRect;
+       };
+
+       return {
+               calcInsert: calcInsert,
+               calc: calc,
+               userConstrain: userConstrain
+       };
+});
+
+/**
+ * Panel.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/ui/Panel', [
+       'global!tinymce.util.Tools',
+       'global!tinymce.ui.Factory',
+       'global!tinymce.DOM',
+       'tinymce/inlite/ui/Toolbar',
+       'tinymce/inlite/ui/Forms',
+       'tinymce/inlite/core/Measure',
+       'tinymce/inlite/core/Layout'
+], function (Tools, Factory, DOM, Toolbar, Forms, Measure, Layout) {
+       return function () {
+               var DEFAULT_TEXT_SELECTION_ITEMS = 'bold italic | quicklink h2 h3 blockquote';
+               var DEFAULT_INSERT_TOOLBAR_ITEMS = 'quickimage quicktable';
+               var panel, currentRect;
+
+               var createToolbars = function (editor, toolbars) {
+                       return Tools.map(toolbars, function (toolbar) {
+                               return Toolbar.create(editor, toolbar.id, toolbar.items);
+                       });
+               };
+
+               var getTextSelectionToolbarItems = function (settings) {
+                       var value = settings.selection_toolbar;
+                       return value ? value : DEFAULT_TEXT_SELECTION_ITEMS;
+               };
+
+               var getInsertToolbarItems = function (settings) {
+                       var value = settings.insert_toolbar;
+                       return value ? value : DEFAULT_INSERT_TOOLBAR_ITEMS;
+               };
+
+               var create = function (editor, toolbars) {
+                       var items, settings = editor.settings;
+
+                       items = createToolbars(editor, toolbars);
+                       items = items.concat([
+                               Toolbar.create(editor, 'text', getTextSelectionToolbarItems(settings)),
+                               Toolbar.create(editor, 'insert', getInsertToolbarItems(settings)),
+                               Forms.createQuickLinkForm(editor, hide)
+                       ]);
+
+                       return Factory.create({
+                               type: 'floatpanel',
+                               role: 'dialog',
+                               classes: 'tinymce tinymce-inline arrow',
+                               ariaLabel: 'Inline toolbar',
+                               layout: 'flex',
+                               direction: 'column',
+                               align: 'stretch',
+                               autohide: false,
+                               autofix: true,
+                               fixed: true,
+                               border: 1,
+                               items: items,
+                               oncancel: function() {
+                                       editor.focus();
+                               }
+                       });
+               };
+
+               var showPanel = function (panel) {
+                       if (panel) {
+                               panel.show();
+                       }
+               };
+
+               var movePanelTo = function (panel, pos) {
+                       panel.moveTo(pos.x, pos.y);
+               };
+
+               var togglePositionClass = function (panel, relPos) {
+                       relPos = relPos ? relPos.substr(0, 2) : '';
+
+                       Tools.each({
+                               t: 'down',
+                               b: 'up',
+                               c: 'center'
+                       }, function(cls, pos) {
+                               panel.classes.toggle('arrow-' + cls, pos === relPos.substr(0, 1));
+                       });
+
+                       if (relPos === 'cr') {
+                               panel.classes.toggle('arrow-left', true);
+                               panel.classes.toggle('arrow-right', false);
+                       } else if (relPos === 'cl') {
+                               panel.classes.toggle('arrow-left', true);
+                               panel.classes.toggle('arrow-right', true);
+                       } else {
+                               Tools.each({
+                                       l: 'left',
+                                       r: 'right'
+                               }, function(cls, pos) {
+                                       panel.classes.toggle('arrow-' + cls, pos === relPos.substr(1, 1));
+                               });
+                       }
+               };
+
+               var showToolbar = function (panel, id) {
+                       var toolbars = panel.items().filter('#' + id);
+
+                       if (toolbars.length > 0) {
+                               toolbars[0].show();
+                               panel.reflow();
+                       }
+               };
+
+               var showPanelAt = function (panel, id, editor, targetRect) {
+                       var contentAreaRect, panelRect, result, userConstainHandler;
+
+                       showPanel(panel);
+                       panel.items().hide();
+                       showToolbar(panel, id);
+
+                       userConstainHandler = editor.settings.inline_toolbar_position_handler;
+                       contentAreaRect = Measure.getContentAreaRect(editor);
+                       panelRect = DOM.getRect(panel.getEl());
+
+                       if (id === 'insert') {
+                               result = Layout.calcInsert(targetRect, contentAreaRect, panelRect);
+                       } else {
+                               result = Layout.calc(targetRect, contentAreaRect, panelRect);
+                       }
+
+                       if (result) {
+                               panelRect = result.rect;
+                               currentRect = targetRect;
+                               movePanelTo(panel, Layout.userConstrain(userConstainHandler, targetRect, contentAreaRect, panelRect));
+
+                               togglePositionClass(panel, result.position);
+                       } else {
+                               hide(panel);
+                       }
+               };
+
+               var hasFormVisible = function () {
+                       return panel.items().filter('form:visible').length > 0;
+               };
+
+               var showForm = function (editor, id) {
+                       if (panel) {
+                               panel.items().hide();
+                               showToolbar(panel, id);
+
+                               var contentAreaRect, panelRect, result, userConstainHandler;
+
+                               showPanel(panel);
+                               panel.items().hide();
+                               showToolbar(panel, id);
+
+                               userConstainHandler = editor.settings.inline_toolbar_position_handler;
+                               contentAreaRect = Measure.getContentAreaRect(editor);
+                               panelRect = DOM.getRect(panel.getEl());
+
+                               result = Layout.calc(currentRect, contentAreaRect, panelRect);
+
+                               if (result) {
+                                       panelRect = result.rect;
+                                       movePanelTo(panel, Layout.userConstrain(userConstainHandler, currentRect, contentAreaRect, panelRect));
+
+                                       togglePositionClass(panel, result.position);
+                               }
+                       }
+               };
+
+               var show = function (editor, id, targetRect, toolbars) {
+                       if (!panel) {
+                               panel = create(editor, toolbars);
+                               panel.renderTo(document.body).reflow().moveTo(targetRect.x, targetRect.y);
+                               editor.nodeChanged();
+                       }
+
+                       showPanelAt(panel, id, editor, targetRect);
+               };
+
+               var hide = function () {
+                       if (panel) {
+                               panel.hide();
+                       }
+               };
+
+               var focus = function () {
+                       if (panel) {
+                               panel.find('toolbar:visible').eq(0).each(function (item) {
+                                       item.focus(true);
+                               });
+                       }
+               };
+
+               var remove = function () {
+                       if (panel) {
+                               panel.remove();
+                               panel = null;
+                       }
+               };
+
+               var inForm = function () {
+                       return panel && panel.visible() && hasFormVisible();
+               };
+
+               return {
+                       show: show,
+                       showForm: showForm,
+                       inForm: inForm,
+                       hide: hide,
+                       focus: focus,
+                       remove: remove
+               };
+       };
+});
+
+/**
+ * Conversions.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/file/Conversions', [
+       'global!tinymce.util.Promise'
+], function (Promise) {
+       var blobToBase64 = function (blob) {
+               return new Promise(function(resolve) {
+                       var reader = new FileReader();
+
+                       reader.onloadend = function() {
+                               resolve(reader.result.split(',')[1]);
+                       };
+
+                       reader.readAsDataURL(blob);
+               });
+       };
+
+       return {
+               blobToBase64: blobToBase64
+       };
+});
+
+
+
+/**
+ * Picker.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/file/Picker', [
+       'global!tinymce.util.Promise'
+], function (Promise) {
+       var pickFile = function () {
+               return new Promise(function (resolve) {
+                       var fileInput;
+
+                       fileInput = document.createElement("input");
+                       fileInput.type = "file";
+                       fileInput.style.position = 'fixed';
+                       fileInput.style.left = 0;
+                       fileInput.style.top = 0;
+                       fileInput.style.opacity = 0.001;
+                       document.body.appendChild(fileInput);
+
+                       fileInput.onchange = function(e) {
+                               resolve(Array.prototype.slice.call(e.target.files));
+                       };
+
+                       fileInput.click();
+                       fileInput.parentNode.removeChild(fileInput);
+               });
+       };
+
+       return {
+               pickFile: pickFile
+       };
+});
+
+
+
+/**
+ * Buttons.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/ui/Buttons', [
+       'tinymce/inlite/ui/Panel',
+       'tinymce/inlite/file/Conversions',
+       'tinymce/inlite/file/Picker',
+       'tinymce/inlite/core/Actions'
+], function (Panel, Conversions, Picker, Actions) {
+       var addHeaderButtons = function (editor) {
+               var formatBlock = function (name) {
+                       return function () {
+                               Actions.formatBlock(editor, name);
+                       };
+               };
+
+               for (var i = 1; i < 6; i++) {
+                       var name = 'h' + i;
+
+                       editor.addButton(name, {
+                               text: name.toUpperCase(),
+                               tooltip: 'Heading ' + i,
+                               stateSelector: name,
+                               onclick: formatBlock(name),
+                               onPostRender: function () {
+                                       // TODO: Remove this hack that produces bold H1-H6 when we have proper icons
+                                       var span = this.getEl().firstChild.firstChild;
+                                       span.style.fontWeight = 'bold';
+                               }
+                       });
+               }
+       };
+
+       var addToEditor = function (editor, panel) {
+               editor.addButton('quicklink', {
+                       icon: 'link',
+                       tooltip: 'Insert/Edit link',
+                       stateSelector: 'a[href]',
+                       onclick: function () {
+                               panel.showForm(editor, 'quicklink');
+                       }
+               });
+
+               editor.addButton('quickimage', {
+                       icon: 'image',
+                       tooltip: 'Insert image',
+                       onclick: function () {
+                               Picker.pickFile().then(function (files) {
+                                       var blob = files[0];
+
+                                       Conversions.blobToBase64(blob).then(function (base64) {
+                                               Actions.insertBlob(editor, base64, blob);
+                                       });
+                               });
+                       }
+               });
+
+               editor.addButton('quicktable', {
+                       icon: 'table',
+                       tooltip: 'Insert table',
+                       onclick: function () {
+                               panel.hide();
+                               Actions.insertTable(editor, 2, 2);
+                       }
+               });
+
+               addHeaderButtons(editor);
+       };
+
+       return {
+               addToEditor: addToEditor
+       };
+});
+
+defineGlobal("global!tinymce.EditorManager", tinymce.EditorManager);
+/**
+ * SkinLoader.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/core/SkinLoader', [
+       'global!tinymce.EditorManager',
+       'global!tinymce.DOM'
+], function (EditorManager, DOM) {
+       var fireSkinLoaded = function (editor, callback) {
+               var done = function () {
+                       editor.fire('SkinLoaded');
+                       callback();
+               };
+
+               if (editor.initialized) {
+                       done();
+               } else {
+                       editor.on('init', done);
+               }
+       };
+
+       var load = function (editor, skin, callback) {
+               var baseUrl = EditorManager.baseURL;
+               var skinUrl = baseUrl + '/skins/' + skin;
+
+               var done = function () {
+                       fireSkinLoaded(editor, callback);
+               };
+
+               DOM.styleSheetLoader.load(skinUrl + '/skin.min.css', done);
+               editor.contentCSS.push(skinUrl + '/content.inline.min.css');
+       };
+
+       return {
+               load: load
+       };
+});
+
+
+
+/**
+ * Matcher.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/core/Matcher', [
+], function () {
+       // result :: String, Rect -> Matcher.result
+       var result = function (id, rect) {
+               return {
+                       id: id,
+                       rect: rect
+               };
+       };
+
+       // match :: Editor, [(Editor -> Matcher.result | Null)] -> Matcher.result | Null
+       var match = function (editor, matchers) {
+               for (var i = 0; i < matchers.length; i++) {
+                       var f = matchers[i];
+                       var result = f(editor);
+
+                       if (result) {
+                               return result;
+                       }
+               }
+
+               return null;
+       };
+
+       return {
+               match: match,
+               result: result
+       };
+});
+
+/**
+ * SelectionMatcher.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/core/SelectionMatcher', [
+       'tinymce/inlite/core/Matcher',
+       'tinymce/inlite/core/Measure'
+], function (Matcher, Measure) {
+       // textSelection :: String -> (Editor -> Matcher.result | Null)
+       var textSelection = function (id) {
+               return function (editor) {
+                       if (!editor.selection.isCollapsed()) {
+                               return Matcher.result(id, Measure.getSelectionRect(editor));
+                       }
+
+                       return null;
+               };
+       };
+
+       // emptyTextBlock :: [Elements], String -> (Editor -> Matcher.result | Null)
+       var emptyTextBlock = function (elements, id) {
+               return function (editor) {
+                       var i, textBlockElementsMap = editor.schema.getTextBlockElements();
+
+                       for (i = 0; i < elements.length; i++) {
+                               if (elements[i].nodeName === 'TABLE') {
+                                       return null;
+                               }
+                       }
+
+                       for (i = 0; i < elements.length; i++) {
+                               if (elements[i].nodeName in textBlockElementsMap) {
+                                       if (editor.dom.isEmpty(elements[i])) {
+                                               return Matcher.result(id, Measure.getSelectionRect(editor));
+                                       }
+
+                                       return null;
+                               }
+                       }
+
+                       return null;
+               };
+       };
+
+       return {
+               textSelection: textSelection,
+               emptyTextBlock: emptyTextBlock
+       };
+});
+
+/**
+ * ElementMatcher.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/core/ElementMatcher', [
+       'tinymce/inlite/core/Matcher',
+       'tinymce/inlite/core/Measure'
+], function (Matcher, Measure) {
+       // element :: Element, [PredicateId] -> (Editor -> Matcher.result | Null)
+       var element = function (element, predicateIds) {
+               return function (editor) {
+                       for (var i = 0; i < predicateIds.length; i++) {
+                               if (predicateIds[i].predicate(element)) {
+                                       return Matcher.result(predicateIds[i].id, Measure.getElementRect(editor, element));
+                               }
+                       }
+
+                       return null;
+               };
+       };
+
+       // parent :: [Elements], [PredicateId] -> (Editor -> Matcher.result | Null)
+       var parent = function (elements, predicateIds) {
+               return function (editor) {
+                       for (var i = 0; i < elements.length; i++) {
+                               for (var x = 0; x < predicateIds.length; x++) {
+                                       if (predicateIds[x].predicate(elements[i])) {
+                                               return Matcher.result(predicateIds[x].id, Measure.getElementRect(editor, elements[i]));
+                                       }
+                               }
+                       }
+
+                       return null;
+               };
+       };
+
+       return {
+               element: element,
+               parent: parent
+       };
+});
+
+/**
+ * Arr.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/alien/Arr', [
+], function () {
+       var flatten = function (arr) {
+               return arr.reduce(function (results, item) {
+                       return Array.isArray(item) ? results.concat(flatten(item)) : results.concat(item);
+               }, []);
+       };
+
+       return {
+               flatten: flatten
+       };
+});
+
+/**
+ * PredicateId.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/core/PredicateId', [
+       'global!tinymce.util.Tools'
+], function (Tools) {
+       var create = function (id, predicate) {
+               return {
+                       id: id,
+                       predicate: predicate
+               };
+       };
+
+       // fromContextToolbars :: [ContextToolbar] -> [PredicateId]
+       var fromContextToolbars = function (toolbars) {
+               return Tools.map(toolbars, function (toolbar) {
+                       return create(toolbar.id, toolbar.predicate);
+               });
+       };
+
+       return {
+               create: create,
+               fromContextToolbars: fromContextToolbars
+       };
+});
+
+/**
+ * Theme.js
+ *
+ * Released under LGPL License.
+ * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+define('tinymce/inlite/Theme', [
+       'global!tinymce.ThemeManager',
+       'global!tinymce.util.Delay',
+       'tinymce/inlite/ui/Panel',
+       'tinymce/inlite/ui/Buttons',
+       'tinymce/inlite/core/SkinLoader',
+       'tinymce/inlite/core/SelectionMatcher',
+       'tinymce/inlite/core/ElementMatcher',
+       'tinymce/inlite/core/Matcher',
+       'tinymce/inlite/alien/Arr',
+       'tinymce/inlite/core/PredicateId'
+], function(ThemeManager, Delay, Panel, Buttons, SkinLoader, SelectionMatcher, ElementMatcher, Matcher, Arr, PredicateId) {
+       var getSelectionElements = function (editor) {
+               var node = editor.selection.getNode();
+               var elms = editor.dom.getParents(node);
+               return elms;
+       };
+
+       var createToolbar = function (editor, selector, id, items) {
+               var selectorPredicate = function (elm) {
+                       return editor.dom.is(elm, selector);
+               };
+
+               return {
+                       predicate: selectorPredicate,
+                       id: id,
+                       items: items
+               };
+       };
+
+       var getToolbars = function (editor) {
+               var contextToolbars = editor.contextToolbars;
+
+               return Arr.flatten([
+                       contextToolbars ? contextToolbars : [],
+                       createToolbar(editor, 'img', 'image', 'alignleft aligncenter alignright')
+               ]);
+       };
+
+       var findMatchResult = function (editor, toolbars) {
+               var result, elements, contextToolbarsPredicateIds;
+
+               elements = getSelectionElements(editor);
+               contextToolbarsPredicateIds = PredicateId.fromContextToolbars(toolbars);
+
+               result = Matcher.match(editor, [
+                       ElementMatcher.element(elements[0], contextToolbarsPredicateIds),
+                       SelectionMatcher.textSelection('text'),
+                       SelectionMatcher.emptyTextBlock(elements, 'insert'),
+                       ElementMatcher.parent(elements, contextToolbarsPredicateIds)
+               ]);
+
+               return result && result.rect ? result : null;
+       };
+
+       var togglePanel = function (editor, panel) {
+               var toggle = function () {
+                       var toolbars = getToolbars(editor);
+                       var result = findMatchResult(editor, toolbars);
+
+                       if (result) {
+                               panel.show(editor, result.id, result.rect, toolbars);
+                       } else {
+                               panel.hide();
+                       }
+               };
+
+               return function () {
+                       if (!editor.removed) {
+                               toggle();
+                       }
+               };
+       };
+
+       var ignoreWhenFormIsVisible = function (panel, f) {
+               return function () {
+                       if (!panel.inForm()) {
+                               f();
+                       }
+               };
+       };
+
+       var bindContextualToolbarsEvents = function (editor, panel) {
+               var throttledTogglePanel = Delay.throttle(togglePanel(editor, panel), 0);
+               var throttledTogglePanelWhenNotInForm = Delay.throttle(ignoreWhenFormIsVisible(panel, togglePanel(editor, panel)), 0);
+
+               editor.on('blur hide ObjectResizeStart', panel.hide);
+               editor.on('click', throttledTogglePanel);
+               editor.on('nodeChange mouseup', throttledTogglePanelWhenNotInForm);
+               editor.on('ResizeEditor ResizeWindow keyup', throttledTogglePanel);
+               editor.on('remove', panel.remove);
+
+               editor.shortcuts.add('Alt+F10', '', panel.focus);
+       };
+
+       var overrideLinkShortcut = function (editor, panel) {
+               editor.shortcuts.remove('meta+k');
+               editor.shortcuts.add('meta+k', '', function () {
+                       var toolbars = getToolbars(editor);
+                       var result = result = Matcher.match(editor, [
+                               SelectionMatcher.textSelection('quicklink')
+                       ]);
+
+                       if (result) {
+                               panel.show(editor, result.id, result.rect, toolbars);
+                       }
+               });
+       };
+
+       var renderInlineUI = function (editor, panel) {
+               var skinName = editor.settings.skin || 'lightgray';
+
+               SkinLoader.load(editor, skinName, function () {
+                       bindContextualToolbarsEvents(editor, panel);
+                       overrideLinkShortcut(editor, panel);
+               });
+
+               return {};
+       };
+
+       var fail = function (message) {
+               throw new Error(message);
+       };
+
+       ThemeManager.add('inlite', function (editor) {
+               var panel = new Panel();
+
+               Buttons.addToEditor(editor, panel);
+
+               var renderUI = function () {
+                       return editor.inline ? renderInlineUI(editor, panel) : fail('inlite theme only supports inline mode.');
+               };
+
+               return {
+                       renderUI: renderUI
+               };
+       });
+
+       return function() {};
+});
+
+dem('tinymce/inlite/Theme')();
+})();
diff --git a/wp-includes/js/tinymce/themes/inlite/theme.min.js b/wp-includes/js/tinymce/themes/inlite/theme.min.js
new file mode 100644 (file)
index 0000000..4d3f267
--- /dev/null
@@ -0,0 +1 @@
+!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;g>i;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;c>f;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("1",tinymce.ThemeManager),h("2",tinymce.util.Delay),h("b",tinymce.util.Tools),h("c",tinymce.ui.Factory),h("d",tinymce.DOM),g("e",["b","c"],function(a,b){var c=function(a,b){return function(c,d){for(var e,f=d.parents.length;f--&&(e=d.parents[f].nodeName,"OL"!=e&&"UL"!=e););a.active(c&&e==b)}},d=function(a,b){var d=function(a,b){return{selector:a,handler:b}},e=function(a){b.active(a)},f=function(a){b.disabled(a)};return"bullist"==a?d("ul > li",c(b,"UL")):"numlist"==a?d("ol > li",c(b,"OL")):b.settings.stateSelector?d(b.settings.stateSelector,e):b.settings.disabledStateSelector?d(b.settings.disabledStateSelector,f):null},e=function(a,b,c){return function(){var e=d(b,c);null!==e&&a.selection.selectorChanged(e.selector,e.handler)}},f=function(c,d,f){var g,h=[];if(f)return a.each(f.split(/[ ,]/),function(a){var d;"|"==a?g=null:b.has(a)?(a={type:a},h.push(a),g=null):(g||(g={type:"buttongroup",items:[]},h.push(g)),c.buttons[a]&&(d=a,a=c.buttons[d],"function"==typeof a&&(a=a()),a.type=a.type||"button",a=b.create(a),a.on("postRender",e(c,d,a)),g.items.push(a)))}),b.create({type:"toolbar",layout:"flow",name:d,items:h})};return{create:f}}),h("m",tinymce.util.Promise),g("n",[],function(){var a=0,b=function(){var a=function(){return Math.round(4294967295*Math.random()).toString(36)};return"s"+Date.now().toString(36)+a()+a()+a()},c=function(c){return c+a++ +b()};return{uuid:c}}),g("s",[],function(){var a=function(a,b){function c(c){var e,f,g;f=b[c?"startContainer":"endContainer"],g=b[c?"startOffset":"endOffset"],1==f.nodeType&&(e=a.create("span",{"data-mce-type":"bookmark"}),f.hasChildNodes()?(g=Math.min(g,f.childNodes.length-1),c?f.insertBefore(e,f.childNodes[g]):a.insertAfter(e,f.childNodes[g])):f.appendChild(e),f=e,g=0),d[c?"startContainer":"endContainer"]=f,d[c?"startOffset":"endOffset"]=g}var d={};return c(!0),b.collapsed||c(),d},b=function(a,b){function c(c){function d(a){for(var b=a.parentNode.firstChild,c=0;b;){if(b==a)return c;1==b.nodeType&&"bookmark"==b.getAttribute("data-mce-type")||c++,b=b.nextSibling}return-1}var e,f,g;e=g=b[c?"startContainer":"endContainer"],f=b[c?"startOffset":"endOffset"],e&&(1==e.nodeType&&(f=d(e),e=e.parentNode,a.remove(g)),b[c?"startContainer":"endContainer"]=e,b[c?"startOffset":"endOffset"]=f)}c(!0),c();var d=a.createRng();return d.setStart(b.startContainer,b.startOffset),b.endContainer&&d.setEnd(b.endContainer,b.endOffset),d};return{create:a,resolve:b}}),h("t",tinymce.dom.TreeWalker),h("u",tinymce.dom.RangeUtils),g("o",["s","b","t","u"],function(a,b,c,d){var e=function(a,b,d){var e,f,g=[];for(e=new c(b,a),f=b;f&&(1===f.nodeType&&g.push(f),f!==d);f=e.next());return g},f=function(c,d){var e,f,g;f=c.dom,g=c.selection,e=a.create(f,g.getRng()),b.each(d,function(a){c.dom.remove(a,!0)}),g.setRng(a.resolve(f,e))},g=function(a){return"A"===a.nodeName&&a.hasAttribute("href")},h=function(a,b){var c=a.getParent(b,g);return c?c:b},i=function(a){var c,f,i,j,k,l,m;return k=a.selection,l=a.dom,m=k.getRng(),c=h(l,d.getNode(m.startContainer,m.startOffset)),f=d.getNode(m.endContainer,m.endOffset),i=a.getBody(),j=b.grep(e(i,c,f),g)},j=function(a){f(a,i(a))};return{unlinkSelection:j}}),g("k",["n","o"],function(a,b){var c=function(a,b){var c,d,e;for(e='<table data-mce-id="mce" style="width: 100%">',e+="<tbody>",d=0;b>d;d++){for(e+="<tr>",c=0;a>c;c++)e+="<td><br></td>";e+="</tr>"}return e+="</tbody>",e+="</table>"},d=function(a){var b=a.dom.select("*[data-mce-id]");return b[0]},e=function(a,b,e){a.undoManager.transact(function(){var f,g;a.insertContent(c(b,e)),f=d(a),f.removeAttribute("data-mce-id"),g=a.dom.select("td,th",f),a.selection.setCursorLocation(g[0],0)})},f=function(a,b){a.execCommand("FormatBlock",!1,b)},g=function(b,c,d){var e,f;e=b.editorUpload.blobCache,f=e.create(a.uuid("mceu"),d,c),e.add(f),b.insertContent(b.dom.createHTML("img",{src:f.blobUri()}))},h=function(a){a.selection.collapse(!1)},i=function(a){a.focus(),b.unlinkSelection(a),h(a)},j=function(a,b,c){a.focus(),a.dom.setAttrib(b,"href",c),h(a)},k=function(a,b){a.execCommand("mceInsertLink",!1,{href:b}),h(a)},l=function(a,b){var c=a.dom.getParent(a.selection.getStart(),"a[href]");c?j(a,c,b):k(a,b)},m=function(a,b){0===b.trim().length?i(a):l(a,b)};return{insertTable:e,formatBlock:f,insertBlob:g,createLink:m,unlink:i}}),g("p",[],function(){var a=function(a){return/^www\.|\.(com|org|edu|gov|uk|net|ca|de|jp|fr|au|us|ru|ch|it|nl|se|no|es|mil)$/i.test(a.trim())},b=function(a){return/^https?:\/\//.test(a.trim())};return{isDomainLike:a,isAbsolute:b}}),g("f",["b","c","m","k","p"],function(a,b,c,d,e){var f=function(a){a.find("textbox").eq(0).each(function(a){a.focus()})},g=function(c,d){var e=b.create(a.extend({type:"form",layout:"flex",direction:"row",padding:5,name:c,spacing:3},d));return e.on("show",function(){f(e)}),e},h=function(a,b){return b?a.show():a.hide()},i=function(a,b){return new c(function(c){a.windowManager.confirm("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(a){var d=a===!0?"http://"+b:b;c(d)})})},j=function(a,b){return!e.isAbsolute(b)&&e.isDomainLike(b)?i(a,b):c.resolve(b)},k=function(a,b){var c=function(){a.focus(),d.unlink(a),b()};return g("quicklink",{items:[{type:"button",name:"unlink",icon:"unlink",onclick:c,tooltip:"Remove link"},{type:"textbox",name:"linkurl",placeholder:"Paste or type a link"},{type:"button",icon:"checkmark",subtype:"primary",tooltip:"Ok",onclick:"submit"}],onshow:function(){var b,c="";b=a.dom.getParent(a.selection.getStart(),"a[href]"),b&&(c=a.dom.getAttrib(b,"href")),this.fromJSON({linkurl:c}),h(this.find("#unlink"),b)},onsubmit:function(c){j(a,c.data.linkurl).then(function(c){d.createLink(a,c),b()})}})};return{createQuickLinkForm:k}}),h("q",tinymce.geom.Rect),g("r",[],function(){var a=function(a){return{x:a.left,y:a.top,w:a.width,h:a.height}},b=function(a){return{left:a.x,top:a.y,width:a.w,height:a.h,right:a.x+a.w,bottom:a.y+a.h}};return{fromClientRect:a,toClientRect:b}}),g("g",["d","q","r"],function(a,b,c){var d=function(b){var c=a.getViewPort();return{x:b.x+c.x,y:b.y+c.y,w:b.w,h:b.h}},e=function(a){var b=a.getBoundingClientRect();return d({x:b.left,y:b.top,w:Math.max(a.clientWidth,a.offsetWidth),h:Math.max(a.clientHeight,a.offsetHeight)})},f=function(a,b){return e(b)},g=function(a){return e(a.getElement().ownerDocument.body)},h=function(a){return e(a.getContentAreaContainer()||a.getBody())},i=function(a){var b=a.selection.getBoundingClientRect();return b?d(c.fromClientRect(b)):null};return{getElementRect:f,getPageAreaRect:g,getContentAreaRect:h,getSelectionRect:i}}),g("h",["q","r"],function(a,b){var c=function(a,b){return{rect:a,position:b}},d=function(a,b){return{x:b.x,y:b.y,w:a.w,h:a.h}},e=function(b,e,f,g,h){var i,j,k;return i=a.findBestRelativePosition(h,f,g,b),f=a.clamp(f,g),i?(j=a.relativePosition(h,f,i),k=d(h,j),c(k,i)):(f=a.intersect(g,f),f?(i=a.findBestRelativePosition(h,f,g,e))?(j=a.relativePosition(h,f,i),k=d(h,j),c(k,i)):(k=d(h,f),c(k,i)):null)},f=function(a,b,c){return e(["cr-cl","cl-cr"],["bc-tc","bl-tl","br-tr"],a,b,c)},g=function(a,b,c){return e(["tc-bc","bc-tc","tl-bl","bl-tl","tr-br","br-tr"],["bc-tc","bl-tl","br-tr"],a,b,c)},h=function(a,c,d,e){var f;return"function"==typeof a?(f=a({elementRect:b.toClientRect(c),contentAreaRect:b.toClientRect(d),panelRect:b.toClientRect(e)}),b.fromClientRect(f)):e};return{calcInsert:f,calc:g,userConstrain:h}}),g("3",["b","c","d","e","f","g","h"],function(a,b,c,d,e,f,g){return function(){var h,i,j="bold italic | quicklink h2 h3 blockquote",k="quickimage quicktable",l=function(b,c){return a.map(c,function(a){return d.create(b,a.id,a.items)})},m=function(a){var b=a.selection_toolbar;return b?b:j},n=function(a){var b=a.insert_toolbar;return b?b:k},o=function(a,c){var f,g=a.settings;return f=l(a,c),f=f.concat([d.create(a,"text",m(g)),d.create(a,"insert",n(g)),e.createQuickLinkForm(a,x)]),b.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:f,oncancel:function(){a.focus()}})},p=function(a){a&&a.show()},q=function(a,b){a.moveTo(b.x,b.y)},r=function(b,c){c=c?c.substr(0,2):"",a.each({t:"down",b:"up",c:"center"},function(a,d){b.classes.toggle("arrow-"+a,d===c.substr(0,1))}),"cr"===c?(b.classes.toggle("arrow-left",!0),b.classes.toggle("arrow-right",!1)):"cl"===c?(b.classes.toggle("arrow-left",!0),b.classes.toggle("arrow-right",!0)):a.each({l:"left",r:"right"},function(a,d){b.classes.toggle("arrow-"+a,d===c.substr(1,1))})},s=function(a,b){var c=a.items().filter("#"+b);c.length>0&&(c[0].show(),a.reflow())},t=function(a,b,d,e){var h,j,k,l;p(a),a.items().hide(),s(a,b),l=d.settings.inline_toolbar_position_handler,h=f.getContentAreaRect(d),j=c.getRect(a.getEl()),k="insert"===b?g.calcInsert(e,h,j):g.calc(e,h,j),k?(j=k.rect,i=e,q(a,g.userConstrain(l,e,h,j)),r(a,k.position)):x(a)},u=function(){return h.items().filter("form:visible").length>0},v=function(a,b){if(h){h.items().hide(),s(h,b);var d,e,j,k;p(h),h.items().hide(),s(h,b),k=a.settings.inline_toolbar_position_handler,d=f.getContentAreaRect(a),e=c.getRect(h.getEl()),j=g.calc(i,d,e),j&&(e=j.rect,q(h,g.userConstrain(k,i,d,e)),r(h,j.position))}},w=function(a,b,c,d){h||(h=o(a,d),h.renderTo(document.body).reflow().moveTo(c.x,c.y),a.nodeChanged()),t(h,b,a,c)},x=function(){h&&h.hide()},y=function(){h&&h.find("toolbar:visible").eq(0).each(function(a){a.focus(!0)})},z=function(){h&&(h.remove(),h=null)},A=function(){return h&&h.visible()&&u()};return{show:w,showForm:v,inForm:A,hide:x,focus:y,remove:z}}}),g("i",["m"],function(a){var b=function(b){return new a(function(a){var c=new FileReader;c.onloadend=function(){a(c.result.split(",")[1])},c.readAsDataURL(b)})};return{blobToBase64:b}}),g("j",["m"],function(a){var b=function(){return new a(function(a){var b;b=document.createElement("input"),b.type="file",b.style.position="fixed",b.style.left=0,b.style.top=0,b.style.opacity=.001,document.body.appendChild(b),b.onchange=function(b){a(Array.prototype.slice.call(b.target.files))},b.click(),b.parentNode.removeChild(b)})};return{pickFile:b}}),g("4",["3","i","j","k"],function(a,b,c,d){var e=function(a){for(var b=function(b){return function(){d.formatBlock(a,b)}},c=1;6>c;c++){var e="h"+c;a.addButton(e,{text:e.toUpperCase(),tooltip:"Heading "+c,stateSelector:e,onclick:b(e),onPostRender:function(){var a=this.getEl().firstChild.firstChild;a.style.fontWeight="bold"}})}},f=function(a,f){a.addButton("quicklink",{icon:"link",tooltip:"Insert/Edit link",stateSelector:"a[href]",onclick:function(){f.showForm(a,"quicklink")}}),a.addButton("quickimage",{icon:"image",tooltip:"Insert image",onclick:function(){c.pickFile().then(function(c){var e=c[0];b.blobToBase64(e).then(function(b){d.insertBlob(a,b,e)})})}}),a.addButton("quicktable",{icon:"table",tooltip:"Insert table",onclick:function(){f.hide(),d.insertTable(a,2,2)}}),e(a)};return{addToEditor:f}}),h("l",tinymce.EditorManager),g("5",["l","d"],function(a,b){var c=function(a,b){var c=function(){a.fire("SkinLoaded"),b()};a.initialized?c():a.on("init",c)},d=function(d,e,f){var g=a.baseURL,h=g+"/skins/"+e,i=function(){c(d,f)};b.styleSheetLoader.load(h+"/skin.min.css",i),d.contentCSS.push(h+"/content.inline.min.css")};return{load:d}}),g("8",[],function(){var a=function(a,b){return{id:a,rect:b}},b=function(a,b){for(var c=0;c<b.length;c++){var d=b[c],e=d(a);if(e)return e}return null};return{match:b,result:a}}),g("6",["8","g"],function(a,b){var c=function(c){return function(d){return d.selection.isCollapsed()?null:a.result(c,b.getSelectionRect(d))}},d=function(c,d){return function(e){var f,g=e.schema.getTextBlockElements();for(f=0;f<c.length;f++)if("TABLE"===c[f].nodeName)return null;for(f=0;f<c.length;f++)if(c[f].nodeName in g)return e.dom.isEmpty(c[f])?a.result(d,b.getSelectionRect(e)):null;return null}};return{textSelection:c,emptyTextBlock:d}}),g("7",["8","g"],function(a,b){var c=function(c,d){return function(e){for(var f=0;f<d.length;f++)if(d[f].predicate(c))return a.result(d[f].id,b.getElementRect(e,c));return null}},d=function(c,d){return function(e){for(var f=0;f<c.length;f++)for(var g=0;g<d.length;g++)if(d[g].predicate(c[f]))return a.result(d[g].id,b.getElementRect(e,c[f]));return null}};return{element:c,parent:d}}),g("9",[],function(){var a=function(b){return b.reduce(function(b,c){return Array.isArray(c)?b.concat(a(c)):b.concat(c)},[])};return{flatten:a}}),g("a",["b"],function(a){var b=function(a,b){return{id:a,predicate:b}},c=function(c){return a.map(c,function(a){return b(a.id,a.predicate)})};return{create:b,fromContextToolbars:c}}),g("0",["1","2","3","4","5","6","7","8","9","a"],function(a,b,c,d,e,f,g,h,i,j){var k=function(a){var b=a.selection.getNode(),c=a.dom.getParents(b);return c},l=function(a,b,c,d){var e=function(c){return a.dom.is(c,b)};return{predicate:e,id:c,items:d}},m=function(a){var b=a.contextToolbars;return i.flatten([b?b:[],l(a,"img","image","alignleft aligncenter alignright")])},n=function(a,b){var c,d,e;return d=k(a),e=j.fromContextToolbars(b),c=h.match(a,[g.element(d[0],e),f.textSelection("text"),f.emptyTextBlock(d,"insert"),g.parent(d,e)]),c&&c.rect?c:null},o=function(a,b){var c=function(){var c=m(a),d=n(a,c);d?b.show(a,d.id,d.rect,c):b.hide()};return function(){a.removed||c()}},p=function(a,b){return function(){a.inForm()||b()}},q=function(a,c){var d=b.throttle(o(a,c),0),e=b.throttle(p(c,o(a,c)),0);a.on("blur hide ObjectResizeStart",c.hide),a.on("click",d),a.on("nodeChange mouseup",e),a.on("ResizeEditor ResizeWindow keyup",d),a.on("remove",c.remove),a.shortcuts.add("Alt+F10","",c.focus)},r=function(a,b){a.shortcuts.remove("meta+k"),a.shortcuts.add("meta+k","",function(){var c=m(a),d=d=h.match(a,[f.textSelection("quicklink")]);d&&b.show(a,d.id,d.rect,c)})},s=function(a,b){var c=a.settings.skin||"lightgray";return e.load(a,c,function(){q(a,b),r(a,b)}),{}},t=function(a){throw new Error(a)};return a.add("inlite",function(a){var b=new c;d.addToEditor(a,b);var e=function(){return a.inline?s(a,b):t("inlite theme only supports inline mode.")};return{renderUI:e}}),function(){}}),d("0")()}();
\ No newline at end of file
index ab20a8a36c9a42785be331039cbe2e329a1ef9ff..0e079f63793792302e6d64cb6bf676c46378dfbc 100644 (file)
@@ -439,7 +439,7 @@ tinymce.ThemeManager.add('modern', function(editor) {
                }
 
                function reposition(match) {
-                       var relPos, panelRect, elementRect, contentAreaRect, panel, relRect, testPositions;
+                       var relPos, panelRect, elementRect, contentAreaRect, panel, relRect, testPositions, smallElementWidthThreshold;
 
                        if (editor.removed) {
                                return;
@@ -462,6 +462,7 @@ tinymce.ThemeManager.add('modern', function(editor) {
                        elementRect = getElementRect(match.element);
                        panelRect = tinymce.DOM.getRect(panel.getEl());
                        contentAreaRect = tinymce.DOM.getRect(editor.getContentAreaContainer() || editor.getBody());
+                       smallElementWidthThreshold = 25;
 
                        // We need to use these instead of the rect values since the style
                        // size properites might not be the same as the real size for a table
@@ -473,7 +474,7 @@ tinymce.ThemeManager.add('modern', function(editor) {
                        }
 
                        // Inflate the elementRect so it doesn't get placed above resize handles
-                       if (editor.selection.controlSelection.isResizable(match.element)) {
+                       if (editor.selection.controlSelection.isResizable(match.element) && elementRect.w < smallElementWidthThreshold) {
                                elementRect = Rect.inflate(elementRect, 0, 8);
                        }
 
@@ -485,7 +486,7 @@ tinymce.ThemeManager.add('modern', function(editor) {
                                movePanelTo(panel, userConstrain(relRect.x, relRect.y, elementRect, contentAreaRect, panelRect));
                        } else {
                                // Allow overflow below the editor to avoid placing toolbars ontop of tables
-                               contentAreaRect.h += 40;
+                               contentAreaRect.h += panelRect.h;
 
                                elementRect = Rect.intersect(contentAreaRect, elementRect);
                                if (elementRect) {
@@ -505,7 +506,7 @@ tinymce.ThemeManager.add('modern', function(editor) {
                        }
 
                        togglePositionClass(panel, relPos, function(pos1, pos2) {
-                               return (!elementRect || elementRect.w > 40) && pos1 === pos2;
+                               return pos1 === pos2;
                        });
 
                        //drawRect(contentAreaRect, 'blue');
@@ -847,7 +848,7 @@ tinymce.ThemeManager.add('modern', function(editor) {
                // Add statusbar if needed
                if (settings.statusbar !== false) {
                        panel.add({type: 'panel', name: 'statusbar', classes: 'statusbar', layout: 'flow', border: '1 0 0 0', ariaRoot: true, items: [
-                               {type: 'elementpath'},
+                               {type: 'elementpath', editor: editor},
                                resizeHandleCtrl
                        ]});
                }
index cfaf31ab4074b150f30e514c58d69841e3e98284..3b8ac484ce13fa135504f09a0ab5615aaf429f64 100644 (file)
@@ -1 +1 @@
-tinymce.ThemeManager.add("modern",function(a){function b(b,c){var d,e=[];if(b)return o(b.split(/[ ,]/),function(b){function f(){function c(a){return function(c,d){for(var e,f=d.parents.length;f--&&(e=d.parents[f].nodeName,"OL"!=e&&"UL"!=e););b.active(c&&e==a)}}var d=a.selection;"bullist"==g&&d.selectorChanged("ul > li",c("UL")),"numlist"==g&&d.selectorChanged("ol > li",c("OL")),b.settings.stateSelector&&d.selectorChanged(b.settings.stateSelector,function(a){b.active(a)},!0),b.settings.disabledStateSelector&&d.selectorChanged(b.settings.disabledStateSelector,function(a){b.disabled(a)})}var g;"|"==b?d=null:n.has(b)?(b={type:b,size:c},e.push(b),d=null):(d||(d={type:"buttongroup",items:[]},e.push(d)),a.buttons[b]&&(g=b,b=a.buttons[g],"function"==typeof b&&(b=b()),b.type=b.type||"button",b.size=c,b=n.create(b),d.items.push(b),a.initialized?f():a.on("init",f)))}),{type:"toolbar",layout:"flow",items:e}}function c(a){function c(c){return c?(d.push(b(c,a)),!0):void 0}var d=[];if(tinymce.isArray(m.toolbar)){if(0===m.toolbar.length)return;tinymce.each(m.toolbar,function(a,b){m["toolbar"+(b+1)]=a}),delete m.toolbar}for(var e=1;10>e&&c(m["toolbar"+e]);e++);return d.length||m.toolbar===!1||c(m.toolbar||t),d.length?{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:d}:void 0}function d(){function b(b){var c;return"|"==b?{text:"|"}:c=a.menuItems[b]}function c(c){var d,e,f,g,h;if(h=tinymce.makeMap((m.removed_menuitems||"").split(/[ ,]/)),m.menu?(e=m.menu[c],g=!0):e=s[c],e){d={text:e.title},f=[],o((e.items||"").split(/[ ,]/),function(a){var c=b(a);c&&!h[a]&&f.push(b(a))}),g||o(a.menuItems,function(a){a.context==c&&("before"==a.separator&&f.push({text:"|"}),a.prependToContext?f.unshift(a):f.push(a),"after"==a.separator&&f.push({text:"|"}))});for(var i=0;i<f.length;i++)"|"==f[i].text&&(0===i||i==f.length-1)&&f.splice(i,1);if(d.menu=f,!d.menu.length)return null}return d}var d,e=[],f=[];if(m.menu)for(d in m.menu)f.push(d);else for(d in s)f.push(d);for(var g="string"==typeof m.menubar?m.menubar.split(/[ ,]/):f,h=0;h<g.length;h++){var i=g[h];i=c(i),i&&e.push(i)}return e}function e(b){function c(a){var c=b.find(a)[0];c&&c.focus(!0)}a.shortcuts.add("Alt+F9","",function(){c("menubar")}),a.shortcuts.add("Alt+F10","",function(){c("toolbar")}),a.shortcuts.add("Alt+F11","",function(){c("elementpath")}),b.on("cancel",function(){a.focus()})}function f(b,c){function d(a){return{width:a.clientWidth,height:a.clientHeight}}var e,f,g,h;e=a.getContainer(),f=a.getContentAreaContainer().firstChild,g=d(e),h=d(f),null!==b&&(b=Math.max(m.min_width||100,b),b=Math.min(m.max_width||65535,b),p.setStyle(e,"width",b+(g.width-h.width)),p.setStyle(f,"width",b)),c=Math.max(m.min_height||100,c),c=Math.min(m.max_height||65535,c),p.setStyle(f,"height",c),a.fire("ResizeEditor")}function g(b,c){var d=a.getContentAreaContainer();l.resizeTo(d.clientWidth+b,d.clientHeight+c)}function h(){function c(){return a.contextToolbars||[]}function d(b){var c,d,e;return c=tinymce.DOM.getPos(a.getContentAreaContainer()),d=a.dom.getRect(b),e=a.dom.getRoot(),"BODY"==e.nodeName&&(d.x-=e.ownerDocument.documentElement.scrollLeft||e.scrollLeft,d.y-=e.ownerDocument.documentElement.scrollTop||e.scrollTop),d.x+=c.x,d.y+=c.y,d}function e(){o(a.contextToolbars,function(a){a.panel&&a.panel.hide()})}function f(a,b,c){b=b?b.substr(0,2):"",o({t:"down",b:"up"},function(d,e){a.classes.toggle("arrow-"+d,c(e,b.substr(0,1)))}),o({l:"left",r:"right"},function(d,e){a.classes.toggle("arrow-"+d,c(e,b.substr(1,1)))})}function g(a){return{left:a.x,top:a.y,width:a.w,height:a.h,right:a.x+a.w,bottom:a.y+a.h}}function h(a,b,c,d,e){return e=g({x:a,y:b,w:e.w,h:e.h}),m.inline_toolbar_position_handler&&(e=m.inline_toolbar_position_handler({elementRect:g(c),contentAreaRect:g(d),panelRect:e})),e}function i(a,b){a.moveTo(b.left,b.top)}function j(b){var c,g,j,k,l,m,n;if(!a.removed){if(!b||!b.toolbar.panel)return void e();n=["bc-tc","tc-bc","tl-bl","bl-tl","tr-br","br-tr"],l=b.toolbar.panel,l.show(),j=d(b.element),g=tinymce.DOM.getRect(l.getEl()),k=tinymce.DOM.getRect(a.getContentAreaContainer()||a.getBody()),j.w=b.element.clientWidth,j.h=b.element.clientHeight,a.inline||(k.w=a.getDoc().documentElement.offsetWidth),a.selection.controlSelection.isResizable(b.element)&&(j=q.inflate(j,0,8)),c=q.findBestRelativePosition(g,j,k,n),j=q.clamp(j,k),c?(m=q.relativePosition(g,j,c),i(l,h(m.x,m.y,j,k,g))):(k.h+=40,j=q.intersect(k,j),j?(c=q.findBestRelativePosition(g,j,k,["bc-tc","bl-tl","br-tr"]),c?(m=q.relativePosition(g,j,c),i(l,h(m.x,m.y,j,k,g))):i(l,h(j.x,j.y,j,k,g))):l.hide()),f(l,c,function(a,b){return(!j||j.w>40)&&a===b})}}function k(){function b(){a.selection&&j(s(a.selection.getNode()))}tinymce.util.Delay.requestAnimationFrame(b)}function l(){t||(t=a.selection.getScrollContainer()||a.getWin(),tinymce.$(t).on("scroll",k),a.on("remove",function(){tinymce.$(t).off("scroll")}))}function p(c){var d;return c.toolbar.panel?(c.toolbar.panel.show(),void j(c)):(l(),d=n.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:b(c.toolbar.items),oncancel:function(){a.focus()}}),c.toolbar.panel=d,d.renderTo(document.body).reflow(),void j(c))}function r(){tinymce.each(c(),function(a){a.panel&&a.panel.hide()})}function s(b){var d,e,f,g=c();for(f=a.$(b).parents().add(b),d=f.length-1;d>=0;d--)for(e=g.length-1;e>=0;e--)if(g[e].predicate(f[d]))return{toolbar:g[e],element:f[d]};return null}var t;a.on("click keyup setContent",function(b){("setcontent"!=b.type||b.selection)&&tinymce.util.Delay.setEditorTimeout(a,function(){var b;b=s(a.selection.getNode()),b?(r(),p(b)):r()})}),a.on("blur hide",r),a.on("ObjectResizeStart",function(){var b=s(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.hide()}),a.on("nodeChange ResizeEditor ResizeWindow",k),a.on("remove",function(){tinymce.each(c(),function(a){a.panel&&a.panel.remove()}),a.contextToolbars={}}),a.shortcuts.add("ctrl+shift+e > ctrl+shift+p","",function(){var b=s(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.items()[0].focus()})}function i(a){return function(){a.initialized?a.fire("SkinLoaded"):a.on("init",function(){a.fire("SkinLoaded")})}}function j(b){function f(){if(o&&o.moveRel&&o.visible()&&!o._fixed){var b=a.selection.getScrollContainer(),c=a.getBody(),d=0,e=0;if(b){var f=p.getPos(c),g=p.getPos(b);d=Math.max(0,g.x-f.x),e=Math.max(0,g.y-f.y)}o.fixed(!1).moveRel(c,a.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(d,e)}}function g(){o&&(o.show(),f(),p.addClass(a.getBody(),"mce-edit-focus"))}function j(){o&&(o.hide(),r.hideAll(),p.removeClass(a.getBody(),"mce-edit-focus"))}function k(){return o?void(o.visible()||g()):(o=l.panel=n.create({type:q?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!!q,border:1,items:[m.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c(m.toolbar_items_size)]}),a.fire("BeforeRenderUI"),o.renderTo(q||document.body).reflow(),e(o),g(),h(),a.on("nodeChange",f),a.on("activate",g),a.on("deactivate",j),void a.nodeChanged())}var o,q;return m.fixed_toolbar_container&&(q=p.select(m.fixed_toolbar_container)[0]),m.content_editable=!0,a.on("focus",function(){b.skinUiCss?tinymce.DOM.styleSheetLoader.load(b.skinUiCss,k,k):k()}),a.on("blur hide",j),a.on("remove",function(){o&&(o.remove(),o=null)}),b.skinUiCss&&tinymce.DOM.styleSheetLoader.load(b.skinUiCss,i(a)),{}}function k(b){function g(){return function(a){j.find("*").disabled("readonly"==a.mode?!0:!1)}}var j,k,o;return b.skinUiCss&&tinymce.DOM.styleSheetLoader.load(b.skinUiCss,i(a)),j=l.panel=n.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[m.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c(m.toolbar_items_size),{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",html:"",border:"1 0 0 0"}]}),m.resize!==!1&&(k={type:"resizehandle",direction:m.resize,onResizeStart:function(){var b=a.getContentAreaContainer().firstChild;o={width:b.clientWidth,height:b.clientHeight}},onResize:function(a){"both"==m.resize?f(o.width+a.deltaX,o.height+a.deltaY):f(null,o.height+a.deltaY)}}),m.statusbar!==!1&&j.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath"},k]}),a.fire("BeforeRenderUI"),a.on("SwitchMode",g()),j.renderBefore(b.targetNode).reflow(),m.readonly&&a.setMode("readonly"),m.width&&tinymce.DOM.setStyle(j.getEl(),"width",m.width),a.on("remove",function(){j.remove(),j=null}),e(j),h(),{iframeContainer:j.find("#iframe")[0].getEl(),editorContainer:j.getEl()}}var l=this,m=a.settings,n=tinymce.ui.Factory,o=tinymce.each,p=tinymce.DOM,q=tinymce.geom.Rect,r=tinymce.ui.FloatPanel,s={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},t="undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image";l.renderUI=function(b){var c=m.skin!==!1?m.skin||"lightgray":!1;if(c){var d=m.skin_url;d=d?a.documentBaseURI.toAbsolute(d):tinymce.baseURL+"/skins/"+c,tinymce.Env.documentMode<=7?b.skinUiCss=d+"/skin.ie7.min.css":b.skinUiCss=d+"/skin.min.css",a.contentCSS.push(d+"/content"+(a.inline?".inline":"")+".min.css")}return a.on("ProgressState",function(a){l.throbber=l.throbber||new tinymce.ui.Throbber(l.panel.getEl("body")),a.state?l.throbber.show(a.time):l.throbber.hide()}),m.inline?j(b):k(b)},l.resizeTo=f,l.resizeBy=g});
\ No newline at end of file
+tinymce.ThemeManager.add("modern",function(a){function b(b,c){var d,e=[];if(b)return o(b.split(/[ ,]/),function(b){function f(){function c(a){return function(c,d){for(var e,f=d.parents.length;f--&&(e=d.parents[f].nodeName,"OL"!=e&&"UL"!=e););b.active(c&&e==a)}}var d=a.selection;"bullist"==g&&d.selectorChanged("ul > li",c("UL")),"numlist"==g&&d.selectorChanged("ol > li",c("OL")),b.settings.stateSelector&&d.selectorChanged(b.settings.stateSelector,function(a){b.active(a)},!0),b.settings.disabledStateSelector&&d.selectorChanged(b.settings.disabledStateSelector,function(a){b.disabled(a)})}var g;"|"==b?d=null:n.has(b)?(b={type:b,size:c},e.push(b),d=null):(d||(d={type:"buttongroup",items:[]},e.push(d)),a.buttons[b]&&(g=b,b=a.buttons[g],"function"==typeof b&&(b=b()),b.type=b.type||"button",b.size=c,b=n.create(b),d.items.push(b),a.initialized?f():a.on("init",f)))}),{type:"toolbar",layout:"flow",items:e}}function c(a){function c(c){return c?(d.push(b(c,a)),!0):void 0}var d=[];if(tinymce.isArray(m.toolbar)){if(0===m.toolbar.length)return;tinymce.each(m.toolbar,function(a,b){m["toolbar"+(b+1)]=a}),delete m.toolbar}for(var e=1;10>e&&c(m["toolbar"+e]);e++);return d.length||m.toolbar===!1||c(m.toolbar||t),d.length?{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:d}:void 0}function d(){function b(b){var c;return"|"==b?{text:"|"}:c=a.menuItems[b]}function c(c){var d,e,f,g,h;if(h=tinymce.makeMap((m.removed_menuitems||"").split(/[ ,]/)),m.menu?(e=m.menu[c],g=!0):e=s[c],e){d={text:e.title},f=[],o((e.items||"").split(/[ ,]/),function(a){var c=b(a);c&&!h[a]&&f.push(b(a))}),g||o(a.menuItems,function(a){a.context==c&&("before"==a.separator&&f.push({text:"|"}),a.prependToContext?f.unshift(a):f.push(a),"after"==a.separator&&f.push({text:"|"}))});for(var i=0;i<f.length;i++)"|"==f[i].text&&(0!==i&&i!=f.length-1||f.splice(i,1));if(d.menu=f,!d.menu.length)return null}return d}var d,e=[],f=[];if(m.menu)for(d in m.menu)f.push(d);else for(d in s)f.push(d);for(var g="string"==typeof m.menubar?m.menubar.split(/[ ,]/):f,h=0;h<g.length;h++){var i=g[h];i=c(i),i&&e.push(i)}return e}function e(b){function c(a){var c=b.find(a)[0];c&&c.focus(!0)}a.shortcuts.add("Alt+F9","",function(){c("menubar")}),a.shortcuts.add("Alt+F10","",function(){c("toolbar")}),a.shortcuts.add("Alt+F11","",function(){c("elementpath")}),b.on("cancel",function(){a.focus()})}function f(b,c){function d(a){return{width:a.clientWidth,height:a.clientHeight}}var e,f,g,h;e=a.getContainer(),f=a.getContentAreaContainer().firstChild,g=d(e),h=d(f),null!==b&&(b=Math.max(m.min_width||100,b),b=Math.min(m.max_width||65535,b),p.setStyle(e,"width",b+(g.width-h.width)),p.setStyle(f,"width",b)),c=Math.max(m.min_height||100,c),c=Math.min(m.max_height||65535,c),p.setStyle(f,"height",c),a.fire("ResizeEditor")}function g(b,c){var d=a.getContentAreaContainer();l.resizeTo(d.clientWidth+b,d.clientHeight+c)}function h(){function c(){return a.contextToolbars||[]}function d(b){var c,d,e;return c=tinymce.DOM.getPos(a.getContentAreaContainer()),d=a.dom.getRect(b),e=a.dom.getRoot(),"BODY"==e.nodeName&&(d.x-=e.ownerDocument.documentElement.scrollLeft||e.scrollLeft,d.y-=e.ownerDocument.documentElement.scrollTop||e.scrollTop),d.x+=c.x,d.y+=c.y,d}function e(){o(a.contextToolbars,function(a){a.panel&&a.panel.hide()})}function f(a,b,c){b=b?b.substr(0,2):"",o({t:"down",b:"up"},function(d,e){a.classes.toggle("arrow-"+d,c(e,b.substr(0,1)))}),o({l:"left",r:"right"},function(d,e){a.classes.toggle("arrow-"+d,c(e,b.substr(1,1)))})}function g(a){return{left:a.x,top:a.y,width:a.w,height:a.h,right:a.x+a.w,bottom:a.y+a.h}}function h(a,b,c,d,e){return e=g({x:a,y:b,w:e.w,h:e.h}),m.inline_toolbar_position_handler&&(e=m.inline_toolbar_position_handler({elementRect:g(c),contentAreaRect:g(d),panelRect:e})),e}function i(a,b){a.moveTo(b.left,b.top)}function j(b){var c,g,j,k,l,m,n,o;if(!a.removed){if(!b||!b.toolbar.panel)return void e();n=["bc-tc","tc-bc","tl-bl","bl-tl","tr-br","br-tr"],l=b.toolbar.panel,l.show(),j=d(b.element),g=tinymce.DOM.getRect(l.getEl()),k=tinymce.DOM.getRect(a.getContentAreaContainer()||a.getBody()),o=25,j.w=b.element.clientWidth,j.h=b.element.clientHeight,a.inline||(k.w=a.getDoc().documentElement.offsetWidth),a.selection.controlSelection.isResizable(b.element)&&j.w<o&&(j=q.inflate(j,0,8)),c=q.findBestRelativePosition(g,j,k,n),j=q.clamp(j,k),c?(m=q.relativePosition(g,j,c),i(l,h(m.x,m.y,j,k,g))):(k.h+=g.h,j=q.intersect(k,j),j?(c=q.findBestRelativePosition(g,j,k,["bc-tc","bl-tl","br-tr"]),c?(m=q.relativePosition(g,j,c),i(l,h(m.x,m.y,j,k,g))):i(l,h(j.x,j.y,j,k,g))):l.hide()),f(l,c,function(a,b){return a===b})}}function k(){function b(){a.selection&&j(s(a.selection.getNode()))}tinymce.util.Delay.requestAnimationFrame(b)}function l(){t||(t=a.selection.getScrollContainer()||a.getWin(),tinymce.$(t).on("scroll",k),a.on("remove",function(){tinymce.$(t).off("scroll")}))}function p(c){var d;return c.toolbar.panel?(c.toolbar.panel.show(),void j(c)):(l(),d=n.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:b(c.toolbar.items),oncancel:function(){a.focus()}}),c.toolbar.panel=d,d.renderTo(document.body).reflow(),void j(c))}function r(){tinymce.each(c(),function(a){a.panel&&a.panel.hide()})}function s(b){var d,e,f,g=c();for(f=a.$(b).parents().add(b),d=f.length-1;d>=0;d--)for(e=g.length-1;e>=0;e--)if(g[e].predicate(f[d]))return{toolbar:g[e],element:f[d]};return null}var t;a.on("click keyup setContent",function(b){("setcontent"!=b.type||b.selection)&&tinymce.util.Delay.setEditorTimeout(a,function(){var b;b=s(a.selection.getNode()),b?(r(),p(b)):r()})}),a.on("blur hide",r),a.on("ObjectResizeStart",function(){var b=s(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.hide()}),a.on("nodeChange ResizeEditor ResizeWindow",k),a.on("remove",function(){tinymce.each(c(),function(a){a.panel&&a.panel.remove()}),a.contextToolbars={}}),a.shortcuts.add("ctrl+shift+e > ctrl+shift+p","",function(){var b=s(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.items()[0].focus()})}function i(a){return function(){a.initialized?a.fire("SkinLoaded"):a.on("init",function(){a.fire("SkinLoaded")})}}function j(b){function f(){if(o&&o.moveRel&&o.visible()&&!o._fixed){var b=a.selection.getScrollContainer(),c=a.getBody(),d=0,e=0;if(b){var f=p.getPos(c),g=p.getPos(b);d=Math.max(0,g.x-f.x),e=Math.max(0,g.y-f.y)}o.fixed(!1).moveRel(c,a.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(d,e)}}function g(){o&&(o.show(),f(),p.addClass(a.getBody(),"mce-edit-focus"))}function j(){o&&(o.hide(),r.hideAll(),p.removeClass(a.getBody(),"mce-edit-focus"))}function k(){return o?void(o.visible()||g()):(o=l.panel=n.create({type:q?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!!q,border:1,items:[m.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c(m.toolbar_items_size)]}),a.fire("BeforeRenderUI"),o.renderTo(q||document.body).reflow(),e(o),g(),h(),a.on("nodeChange",f),a.on("activate",g),a.on("deactivate",j),void a.nodeChanged())}var o,q;return m.fixed_toolbar_container&&(q=p.select(m.fixed_toolbar_container)[0]),m.content_editable=!0,a.on("focus",function(){b.skinUiCss?tinymce.DOM.styleSheetLoader.load(b.skinUiCss,k,k):k()}),a.on("blur hide",j),a.on("remove",function(){o&&(o.remove(),o=null)}),b.skinUiCss&&tinymce.DOM.styleSheetLoader.load(b.skinUiCss,i(a)),{}}function k(b){function g(){return function(a){"readonly"==a.mode?j.find("*").disabled(!0):j.find("*").disabled(!1)}}var j,k,o;return b.skinUiCss&&tinymce.DOM.styleSheetLoader.load(b.skinUiCss,i(a)),j=l.panel=n.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[m.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c(m.toolbar_items_size),{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",html:"",border:"1 0 0 0"}]}),m.resize!==!1&&(k={type:"resizehandle",direction:m.resize,onResizeStart:function(){var b=a.getContentAreaContainer().firstChild;o={width:b.clientWidth,height:b.clientHeight}},onResize:function(a){"both"==m.resize?f(o.width+a.deltaX,o.height+a.deltaY):f(null,o.height+a.deltaY)}}),m.statusbar!==!1&&j.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath",editor:a},k]}),a.fire("BeforeRenderUI"),a.on("SwitchMode",g()),j.renderBefore(b.targetNode).reflow(),m.readonly&&a.setMode("readonly"),m.width&&tinymce.DOM.setStyle(j.getEl(),"width",m.width),a.on("remove",function(){j.remove(),j=null}),e(j),h(),{iframeContainer:j.find("#iframe")[0].getEl(),editorContainer:j.getEl()}}var l=this,m=a.settings,n=tinymce.ui.Factory,o=tinymce.each,p=tinymce.DOM,q=tinymce.geom.Rect,r=tinymce.ui.FloatPanel,s={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},t="undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image";l.renderUI=function(b){var c=m.skin!==!1?m.skin||"lightgray":!1;if(c){var d=m.skin_url;d=d?a.documentBaseURI.toAbsolute(d):tinymce.baseURL+"/skins/"+c,tinymce.Env.documentMode<=7?b.skinUiCss=d+"/skin.ie7.min.css":b.skinUiCss=d+"/skin.min.css",a.contentCSS.push(d+"/content"+(a.inline?".inline":"")+".min.css")}return a.on("ProgressState",function(a){l.throbber=l.throbber||new tinymce.ui.Throbber(l.panel.getEl("body")),a.state?l.throbber.show(a.time):l.throbber.hide()}),m.inline?j(b):k(b)},l.resizeTo=f,l.resizeBy=g});
\ No newline at end of file
index 1eeac3683df165252f997a531a718662e9d16b26..ddd85f7bfe0955a860bda26062b14a71e816d38f 100644 (file)
@@ -1,13 +1,13 @@
-// 4.3.10 (2016-04-12)
-!function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;i<e.length;++i){if(n=s[e[i]]||o(e[i]),!n)throw"module definition dependecy not found: "+e[i];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){s[e]=i.apply(null,arguments)})}function i(e){return!!s[e]}function o(t){for(var n=e,r=t.split(/[.\/]/),i=0;i<r.length;++i){if(!n[r[i]])return;n=n[r[i]]}return n}function a(n){var r,i,o,a,l;for(r=0;r<n.length;r++){i=e,o=n[r],a=o.split(/[.\/]/);for(var c=0;c<a.length-1;++c)i[a[c]]===t&&(i[a[c]]={}),i=i[a[c]];i[a[a.length-1]]=s[o]}if(e.AMDLC_TESTS){l=e.privateModules||{};for(o in s)l[o]=s[o];for(r=0;r<n.length;r++)delete l[n[r]];e.privateModules=l}}var s={},l="tinymce/geom/Rect",c="tinymce/util/Promise",u="tinymce/util/Delay",d="tinymce/dom/EventUtils",f="tinymce/dom/Sizzle",h="tinymce/Env",p="tinymce/util/Arr",m="tinymce/util/Tools",g="tinymce/dom/DomQuery",v="tinymce/html/Styles",y="tinymce/dom/TreeWalker",b="tinymce/dom/Range",C="tinymce/html/Entities",x="tinymce/dom/StyleSheetLoader",w="tinymce/dom/DOMUtils",E="tinymce/dom/ScriptLoader",N="tinymce/AddOnManager",_="tinymce/dom/NodeType",S="tinymce/text/Zwsp",k="tinymce/caret/CaretContainer",T="tinymce/dom/RangeUtils",R="tinymce/NodeChange",A="tinymce/html/Node",B="tinymce/html/Schema",D="tinymce/html/SaxParser",M="tinymce/html/DomParser",L="tinymce/html/Writer",P="tinymce/html/Serializer",H="tinymce/dom/Serializer",O="tinymce/dom/TridentSelection",I="tinymce/util/VK",F="tinymce/dom/ControlSelection",z="tinymce/util/Fun",W="tinymce/caret/CaretCandidate",V="tinymce/geom/ClientRect",U="tinymce/text/ExtendingChar",$="tinymce/caret/CaretPosition",q="tinymce/caret/CaretBookmark",j="tinymce/dom/BookmarkManager",Y="tinymce/dom/Selection",X="tinymce/dom/ElementUtils",K="tinymce/fmt/Preview",G="tinymce/fmt/Hooks",J="tinymce/Formatter",Q="tinymce/UndoManager",Z="tinymce/EnterKey",ee="tinymce/ForceBlocks",te="tinymce/caret/CaretUtils",ne="tinymce/caret/CaretWalker",re="tinymce/EditorCommands",ie="tinymce/util/URI",oe="tinymce/util/Class",ae="tinymce/util/EventDispatcher",se="tinymce/data/Binding",le="tinymce/util/Observable",ce="tinymce/data/ObservableObject",ue="tinymce/ui/Selector",de="tinymce/ui/Collection",fe="tinymce/ui/DomUtils",he="tinymce/ui/BoxUtils",pe="tinymce/ui/ClassList",me="tinymce/ui/ReflowQueue",ge="tinymce/ui/Control",ve="tinymce/ui/Factory",ye="tinymce/ui/KeyboardNavigation",be="tinymce/ui/Container",Ce="tinymce/ui/DragHelper",xe="tinymce/ui/Scrollable",we="tinymce/ui/Panel",Ee="tinymce/ui/Movable",Ne="tinymce/ui/Resizable",_e="tinymce/ui/FloatPanel",Se="tinymce/ui/Window",ke="tinymce/ui/MessageBox",Te="tinymce/WindowManager",Re="tinymce/ui/Tooltip",Ae="tinymce/ui/Widget",Be="tinymce/ui/Progress",De="tinymce/ui/Notification",Me="tinymce/NotificationManager",Le="tinymce/dom/NodePath",Pe="tinymce/util/Quirks",He="tinymce/EditorObservable",Oe="tinymce/Mode",Ie="tinymce/Shortcuts",Fe="tinymce/file/Uploader",ze="tinymce/file/Conversions",We="tinymce/file/ImageScanner",Ve="tinymce/file/BlobCache",Ue="tinymce/EditorUpload",$e="tinymce/caret/FakeCaret",qe="tinymce/dom/Dimensions",je="tinymce/caret/LineWalker",Ye="tinymce/caret/LineUtils",Xe="tinymce/DragDropOverrides",Ke="tinymce/SelectionOverrides",Ge="tinymce/Editor",Je="tinymce/util/I18n",Qe="tinymce/FocusManager",Ze="tinymce/EditorManager",et="tinymce/LegacyInput",tt="tinymce/util/XHR",nt="tinymce/util/JSON",rt="tinymce/util/JSONRequest",it="tinymce/util/JSONP",ot="tinymce/util/LocalStorage",at="tinymce/Compat",st="tinymce/ui/Layout",lt="tinymce/ui/AbsoluteLayout",ct="tinymce/ui/Button",ut="tinymce/ui/ButtonGroup",dt="tinymce/ui/Checkbox",ft="tinymce/ui/ComboBox",ht="tinymce/ui/ColorBox",pt="tinymce/ui/PanelButton",mt="tinymce/ui/ColorButton",gt="tinymce/util/Color",vt="tinymce/ui/ColorPicker",yt="tinymce/ui/Path",bt="tinymce/ui/ElementPath",Ct="tinymce/ui/FormItem",xt="tinymce/ui/Form",wt="tinymce/ui/FieldSet",Et="tinymce/ui/FilePicker",Nt="tinymce/ui/FitLayout",_t="tinymce/ui/FlexLayout",St="tinymce/ui/FlowLayout",kt="tinymce/ui/FormatControls",Tt="tinymce/ui/GridLayout",Rt="tinymce/ui/Iframe",At="tinymce/ui/InfoBox",Bt="tinymce/ui/Label",Dt="tinymce/ui/Toolbar",Mt="tinymce/ui/MenuBar",Lt="tinymce/ui/MenuButton",Pt="tinymce/ui/MenuItem",Ht="tinymce/ui/Throbber",Ot="tinymce/ui/Menu",It="tinymce/ui/ListBox",Ft="tinymce/ui/Radio",zt="tinymce/ui/ResizeHandle",Wt="tinymce/ui/SelectBox",Vt="tinymce/ui/Slider",Ut="tinymce/ui/Spacer",$t="tinymce/ui/SplitButton",qt="tinymce/ui/StackLayout",jt="tinymce/ui/TabPanel",Yt="tinymce/ui/TextBox",Xt="tinymce/Register";r(l,[],function(){function e(e,t,n){var r,i,a,s,l,u;return r=t.x,i=t.y,a=e.w,s=e.h,l=t.w,u=t.h,n=(n||"").split(""),"b"===n[0]&&(i+=u),"r"===n[1]&&(r+=l),"c"===n[0]&&(i+=c(u/2)),"c"===n[1]&&(r+=c(l/2)),"b"===n[3]&&(i-=s),"r"===n[4]&&(r-=a),"c"===n[3]&&(i-=c(s/2)),"c"===n[4]&&(r-=c(a/2)),o(r,i,a,s)}function t(t,n,r,i){var o,a;for(a=0;a<i.length;a++)if(o=e(t,n,i[a]),o.x>=r.x&&o.x+o.w<=r.w+r.x&&o.y>=r.y&&o.y+o.h<=r.h+r.y)return i[a];return null}function n(e,t,n){return o(e.x-t,e.y-n,e.w+2*t,e.h+2*n)}function r(e,t){var n,r,i,a;return n=l(e.x,t.x),r=l(e.y,t.y),i=s(e.x+e.w,t.x+t.w),a=s(e.y+e.h,t.y+t.h),0>i-n||0>a-r?null:o(n,r,i-n,a-r)}function i(e,t,n){var r,i,a,s,c,u,d,f,h,p;return c=e.x,u=e.y,d=e.x+e.w,f=e.y+e.h,h=t.x+t.w,p=t.y+t.h,r=l(0,t.x-c),i=l(0,t.y-u),a=l(0,d-h),s=l(0,f-p),c+=r,u+=i,n&&(d+=r,f+=i,c-=a,u-=s),d-=a,f-=s,o(c,u,d-c,f-u)}function o(e,t,n,r){return{x:e,y:t,w:n,h:r}}function a(e){return o(e.left,e.top,e.width,e.height)}var s=Math.min,l=Math.max,c=Math.round;return{inflate:n,relativePosition:e,findBestRelativePosition:t,intersect:r,clamp:i,create:o,fromClientRect:a}}),r(c,[],function(){function e(e,t){return function(){e.apply(t,arguments)}}function t(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],s(t,e(r,this),e(i,this))}function n(e){var t=this;return null===this._state?void this._deferreds.push(e):void l(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var r;try{r=n(t._value)}catch(i){return void e.reject(i)}e.resolve(r)})}function r(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void s(e(n,t),e(r,this),e(i,this))}this._state=!0,this._value=t,o.call(this)}catch(a){i.call(this,a)}}function i(e){this._state=!1,this._value=e,o.call(this)}function o(){for(var e=0,t=this._deferreds.length;t>e;e++)n.call(this,this._deferreds[e]);this._deferreds=null}function a(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function s(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(i){if(r)return;r=!0,n(i)}}if(window.Promise)return window.Promise;var l=t.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)},c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,r){var i=this;return new t(function(t,o){n.call(i,new a(e,r,t,o))})},t.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&c(arguments[0])?arguments[0]:arguments);return new t(function(t,n){function r(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){r(o,e)},n)}e[o]=a,0===--i&&t(e)}catch(l){n(l)}}if(0===e.length)return t([]);for(var i=e.length,o=0;o<e.length;o++)r(o,e[o])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(t){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.race=function(e){return new t(function(t,n){for(var r=0,i=e.length;i>r;r++)e[r].then(t,n)})},t}),r(u,[c],function(e){function t(e,t){function n(e){window.setTimeout(e,0)}var r,i=window.requestAnimationFrame,o=["ms","moz","webkit"];for(r=0;r<o.length&&!i;r++)i=window[o[r]+"RequestAnimationFrame"];i||(i=n),i(e,t)}function n(e,t){return"number"!=typeof t&&(t=0),setTimeout(e,t)}function r(e,t){return"number"!=typeof t&&(t=0),setInterval(e,t)}function i(e){return clearTimeout(e)}function o(e){return clearInterval(e)}var a;return{requestAnimationFrame:function(n,r){return a?void a.then(n):void(a=new e(function(e){r||(r=document.body),t(e,r)}).then(n))},setTimeout:n,setInterval:r,setEditorTimeout:function(e,t,r){return n(function(){e.removed||t()},r)},setEditorInterval:function(e,t,n){var i;return i=r(function(){e.removed?clearInterval(i):t()},n)},throttle:function(e,t){var r,i;return i=function(){var i=arguments;clearTimeout(r),r=n(function(){e.apply(this,i)},t)},i.stop=function(){clearTimeout(r)},i},clearInterval:o,clearTimeout:i}}),r(d,[u],function(e){function t(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function n(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function r(e,t){function n(){return!1}function r(){return!0}var i,o=t||{},a;for(i in e)l[i]||(o[i]=e[i]);if(o.target||(o.target=o.srcElement||document),o.path&&(o.target=o.path[0]||o.target),o.deepPath&&(o.target=o.deepPath[0]||o.target),e&&s.test(e.type)&&e.pageX===a&&e.clientX!==a){var c=o.target.ownerDocument||document,u=c.documentElement,d=c.body;o.pageX=e.clientX+(u&&u.scrollLeft||d&&d.scrollLeft||0)-(u&&u.clientLeft||d&&d.clientLeft||0),o.pageY=e.clientY+(u&&u.scrollTop||d&&d.scrollTop||0)-(u&&u.clientTop||d&&d.clientTop||0)}return o.preventDefault=function(){o.isDefaultPrevented=r,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},o.stopPropagation=function(){o.isPropagationStopped=r,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},o.stopImmediatePropagation=function(){o.isImmediatePropagationStopped=r,o.stopPropagation()},o.isDefaultPrevented||(o.isDefaultPrevented=n,o.isPropagationStopped=n,o.isImmediatePropagationStopped=n),"undefined"==typeof o.metaKey&&(o.metaKey=!1),o}function i(r,i,o){function a(){o.domLoaded||(o.domLoaded=!0,i(u))}function s(){("complete"===c.readyState||"interactive"===c.readyState&&c.body)&&(n(c,"readystatechange",s),a())}function l(){try{c.documentElement.doScroll("left")}catch(t){return void e.setTimeout(l)}a()}var c=r.document,u={type:"ready"};return o.domLoaded?void i(u):(c.addEventListener?"complete"===c.readyState?a():t(r,"DOMContentLoaded",a):(t(c,"readystatechange",s),c.documentElement.doScroll&&r.self===r.top&&l()),void t(r,"load",a))}function o(){function e(e,t){var n,r,i,o,a=s[t];if(n=a&&a[e.type])for(r=0,i=n.length;i>r;r++)if(o=n[r],o&&o.func.call(o.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}var o=this,s={},l,c,u,d,f;c=a+(+new Date).toString(32),d="onmouseenter"in document.documentElement,u="onfocusin"in document.documentElement,f={mouseenter:"mouseover",mouseleave:"mouseout"},l=1,o.domLoaded=!1,o.events=s,o.bind=function(n,a,h,p){function m(t){e(r(t||E.event),g)}var g,v,y,b,C,x,w,E=window;if(n&&3!==n.nodeType&&8!==n.nodeType){for(n[c]?g=n[c]:(g=l++,n[c]=g,s[g]={}),p=p||n,a=a.split(" "),y=a.length;y--;)b=a[y],x=m,C=w=!1,"DOMContentLoaded"===b&&(b="ready"),o.domLoaded&&"ready"===b&&"complete"==n.readyState?h.call(p,r({type:b})):(d||(C=f[b],C&&(x=function(t){var n,i;if(n=t.currentTarget,i=t.relatedTarget,i&&n.contains)i=n.contains(i);else for(;i&&i!==n;)i=i.parentNode;i||(t=r(t||E.event),t.type="mouseout"===t.type?"mouseleave":"mouseenter",t.target=n,e(t,g))})),u||"focusin"!==b&&"focusout"!==b||(w=!0,C="focusin"===b?"focus":"blur",x=function(t){t=r(t||E.event),t.type="focus"===t.type?"focusin":"focusout",e(t,g)}),v=s[g][b],v?"ready"===b&&o.domLoaded?h({type:b}):v.push({func:h,scope:p}):(s[g][b]=v=[{func:h,scope:p}],v.fakeName=C,v.capture=w,v.nativeHandler=x,"ready"===b?i(n,x,o):t(n,C||b,x,w)));return n=v=0,h}},o.unbind=function(e,t,r){var i,a,l,u,d,f;if(!e||3===e.nodeType||8===e.nodeType)return o;if(i=e[c]){if(f=s[i],t){for(t=t.split(" "),l=t.length;l--;)if(d=t[l],a=f[d]){if(r)for(u=a.length;u--;)if(a[u].func===r){var h=a.nativeHandler,p=a.fakeName,m=a.capture;a=a.slice(0,u).concat(a.slice(u+1)),a.nativeHandler=h,a.fakeName=p,a.capture=m,f[d]=a}r&&0!==a.length||(delete f[d],n(e,a.fakeName||d,a.nativeHandler,a.capture))}}else{for(d in f)a=f[d],n(e,a.fakeName||d,a.nativeHandler,a.capture);f={}}for(d in f)return o;delete s[i];try{delete e[c]}catch(g){e[c]=null}}return o},o.fire=function(t,n,i){var a;if(!t||3===t.nodeType||8===t.nodeType)return o;i=r(null,i),i.type=n,i.target=t;do a=t[c],a&&e(i,a),t=t.parentNode||t.ownerDocument||t.defaultView||t.parentWindow;while(t&&!i.isPropagationStopped());return o},o.clean=function(e){var t,n,r=o.unbind;if(!e||3===e.nodeType||8===e.nodeType)return o;if(e[c]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),n=e.getElementsByTagName("*"),t=n.length;t--;)e=n[t],e[c]&&r(e);return o},o.destroy=function(){s={}},o.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}var a="mce-data-",s=/^(?:mouse|contextmenu)|click/,l={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1};return o.Event=new o,o.Event.bind(window,"ready",function(){}),o}),r(f,[],function(){function e(e,t,n,r){var i,o,a,s,l,c,d,h,p,m;if((t?t.ownerDocument||t:z)!==D&&B(t),t=t||D,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(L&&!r){if(i=ve.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&I(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&x.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(x.qsa&&(!P||!P.test(e))){if(h=d=F,p=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=_(e),(d=t.getAttribute("id"))?h=d.replace(be,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",l=c.length;l--;)c[l]=h+f(c[l]);p=ye.test(e)&&u(t.parentNode)||t,m=c.join(",")}if(m)try{return Z.apply(n,p.querySelectorAll(m)),n}catch(g){}finally{d||t.removeAttribute("id")}}}return k(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[F]=!0,e}function i(e){var t=D.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&typeof e.getElementsByTagName!==Y&&e}function d(){}function f(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=V++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,c=[W,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(l=t[F]||(t[F]={}),(s=l[r])&&s[0]===W&&s[1]===o)return c[2]=s[2];if(l[r]=c,c[2]=e(t,n,a))return!0}}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(t,n,r){for(var i=0,o=n.length;o>i;i++)e(t,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),c&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[F]&&(i=v(i)),o&&!o[F]&&(o=v(o,a)),r(function(r,a,s,l){var c,u,d,f=[],h=[],p=a.length,v=r||m(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?v:g(v,f,e,s,l),b=n?o||(r?e:p||i)?[]:a:y;if(n&&n(y,b,s,l),i)for(c=g(b,h),i(c,[],s,l),u=c.length;u--;)(d=c[u])&&(b[h[u]]=!(y[h[u]]=d));if(r){if(o||e){if(o){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(y[u]=d);o(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=o?te.call(r,d):f[u])>-1&&(r[c]=!(a[c]=d))}}else b=g(b===a?b.splice(p,b.length):b),o?o(null,a,b,l):Z.apply(a,b)})}function y(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),c=h(function(e){return te.call(t,e)>-1},a,!0),u=[function(e,n,r){return!o&&(r||n!==T)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];i>s;s++)if(n=w.relative[e[s].type])u=[h(p(u),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[F]){for(r=++s;i>r&&!w.relative[e[r].type];r++);return v(s>1&&p(u),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&f(e))}u.push(n)}return p(u)}function b(t,n){var i=n.length>0,o=t.length>0,a=function(r,a,s,l,c){var u,d,f,h=0,p="0",m=r&&[],v=[],y=T,b=r||o&&w.find.TAG("*",c),C=W+=null==y?1:Math.random()||.1,x=b.length;for(c&&(T=a!==D&&a);p!==x&&null!=(u=b[p]);p++){if(o&&u){for(d=0;f=t[d++];)if(f(u,a,s)){l.push(u);break}c&&(W=C)}i&&((u=!f&&u)&&h--,r&&m.push(u))}if(h+=p,i&&p!==h){for(d=0;f=n[d++];)f(m,v,a,s);if(r){if(h>0)for(;p--;)m[p]||v[p]||(v[p]=J.call(l));v=g(v)}Z.apply(l,v),c&&!r&&v.length>0&&h+n.length>1&&e.uniqueSort(l)}return c&&(W=C,T=y),m};return i?r(a):a}var C,x,w,E,N,_,S,k,T,R,A,B,D,M,L,P,H,O,I,F="sizzle"+-new Date,z=window.document,W=0,V=0,U=n(),$=n(),q=n(),j=function(e,t){return e===t&&(A=!0),0},Y=typeof t,X=1<<31,K={}.hasOwnProperty,G=[],J=G.pop,Q=G.push,Z=G.push,ee=G.slice,te=G.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},ne="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",re="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe="\\["+re+"*("+ie+")(?:"+re+"*([*^$|!~]?=)"+re+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+re+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp("^"+re+"+|((?:^|[^\\\\])(?:\\\\.)*)"+re+"+$","g"),le=new RegExp("^"+re+"*,"+re+"*"),ce=new RegExp("^"+re+"*([>+~]|"+re+")"+re+"*"),ue=new RegExp("="+re+"*([^\\]'\"]*?)"+re+"*\\]","g"),de=new RegExp(ae),fe=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+re+"*(even|odd|(([+-]|)(\\d*)n|)"+re+"*(?:([+-]|)"+re+"*(\\d+)|))"+re+"*\\)|)","i"),bool:new RegExp("^(?:"+ne+")$","i"),needsContext:new RegExp("^"+re+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+re+"*((?:-\\d)?\\d*)"+re+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,Ce=new RegExp("\\\\([\\da-f]{1,6}"+re+"?|("+re+")|.)","ig"),xe=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Z.apply(G=ee.call(z.childNodes),z.childNodes),G[z.childNodes.length].nodeType}catch(we){Z={apply:G.length?function(e,t){Q.apply(e,ee.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=e.support={},N=e.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},B=e.setDocument=function(e){function t(e){try{return e.top}catch(t){}return null}var n,r=e?e.ownerDocument||e:z,o=r.defaultView;return r!==D&&9===r.nodeType&&r.documentElement?(D=r,M=r.documentElement,L=!N(r),o&&o!==t(o)&&(o.addEventListener?o.addEventListener("unload",function(){B()},!1):o.attachEvent&&o.attachEvent("onunload",function(){B()})),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ge.test(r.getElementsByClassName),x.getById=i(function(e){return M.appendChild(e).id=F,!r.getElementsByName||!r.getElementsByName(F).length}),x.getById?(w.find.ID=function(e,t){if(typeof t.getElementById!==Y&&L){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},w.filter.ID=function(e){var t=e.replace(Ce,xe);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(Ce,xe);return function(e){var n=typeof e.getAttributeNode!==Y&&e.getAttributeNode("id");return n&&n.value===t}}),w.find.TAG=x.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==Y?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=x.getElementsByClassName&&function(e,t){return L?t.getElementsByClassName(e):void 0},H=[],P=[],(x.qsa=ge.test(r.querySelectorAll))&&(i(function(e){e.innerHTML="<select msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+re+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+re+"*(?:value|"+ne+")"),e.querySelectorAll(":checked").length||P.push(":checked")}),i(function(e){var t=r.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+re+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(x.matchesSelector=ge.test(O=M.matches||M.webkitMatchesSelector||M.mozMatchesSelector||M.oMatchesSelector||M.msMatchesSelector))&&i(function(e){x.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),H.push("!=",ae)}),P=P.length&&new RegExp(P.join("|")),H=H.length&&new RegExp(H.join("|")),n=ge.test(M.compareDocumentPosition),I=n||ge.test(M.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},j=n?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===r||e.ownerDocument===z&&I(z,e)?-1:t===r||t.ownerDocument===z&&I(z,t)?1:R?te.call(R,e)-te.call(R,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,i=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!o||!s)return e===r?-1:t===r?1:o?-1:s?1:R?te.call(R,e)-te.call(R,t):0;if(o===s)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;l[i]===c[i];)i++;return i?a(l[i],c[i]):l[i]===z?-1:c[i]===z?1:0},r):D},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==D&&B(t),n=n.replace(ue,"='$1']"),x.matchesSelector&&L&&(!H||!H.test(n))&&(!P||!P.test(n)))try{var r=O.call(t,n);if(r||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(i){}return e(n,D,null,[t]).length>0},e.contains=function(e,t){return(e.ownerDocument||e)!==D&&B(e),I(e,t)},e.attr=function(e,n){(e.ownerDocument||e)!==D&&B(e);var r=w.attrHandle[n.toLowerCase()],i=r&&K.call(w.attrHandle,n.toLowerCase())?r(e,n,!L):t;return i!==t?i:x.attributes||!L?e.getAttribute(n):(i=e.getAttributeNode(n))&&i.specified?i.value:null},e.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},e.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!x.detectDuplicates,R=!x.sortStable&&e.slice(0),e.sort(j),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return R=null,e},E=e.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=E(t);return n},w=e.selectors={cacheLength:50,createPseudo:r,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Ce,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(Ce,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=_(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Ce,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+re+")"+e+"("+re+"|$)"))&&U(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Y&&e.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(i){var o=e.attr(i,t);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,h,p,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(u=g[F]||(g[F]={}),c=u[e]||[],h=c[0]===W&&c[1],f=c[0]===W&&c[2],d=h&&g.childNodes[h];d=++h&&d&&d[m]||(f=h=0)||p.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[W,h,f];break}}else if(y&&(c=(t[F]||(t[F]={}))[e])&&c[0]===W)f=c[1];else for(;(d=++h&&d&&d[m]||(f=h=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[F]||(d[F]={}))[e]=[W,f]),d!==t)););return f-=i,f===r||f%r===0&&f/r>=0}}},PSEUDO:function(t,n){var i,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[F]?o(n):o.length>1?(i=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=te.call(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(se,"$1"));return i[F]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(e){return e=e.replace(Ce,xe),function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:r(function(t){return fe.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(Ce,xe).toLowerCase(),function(e){var n;do if(n=L?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===M},focus:function(e){return e===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},w.pseudos.nth=w.pseudos.eq;for(C in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[C]=s(C);for(C in{submit:!0,reset:!0})w.pseudos[C]=l(C);return d.prototype=w.filters=w.pseudos,w.setFilters=new d,_=e.tokenize=function(t,n){var r,i,o,a,s,l,c,u=$[t+" "];if(u)return n?0:u.slice(0);for(s=t,l=[],c=w.preFilter;s;){r&&!(i=le.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),r=!1,(i=ce.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(se," ")}),s=s.slice(r.length));for(a in w.filter)!(i=he[a].exec(s))||c[a]&&!(i=c[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?e.error(t):$(t,l).slice(0)},S=e.compile=function(e,t){var n,r=[],i=[],o=q[e+" "];if(!o){for(t||(t=_(e)),n=t.length;n--;)o=y(t[n]),o[F]?r.push(o):i.push(o);o=q(e,b(i,r)),o.selector=e}return o},k=e.select=function(e,t,n,r){var i,o,a,s,l,c="function"==typeof e&&e,d=!r&&_(e=c.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&L&&w.relative[o[1].type]){if(t=(w.find.ID(a.matches[0].replace(Ce,xe),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=he.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((l=w.find[s])&&(r=l(a.matches[0].replace(Ce,xe),ye.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&f(o),!e)return Z.apply(n,r),n;break}}return(c||S(e,d))(r,t,!L,n,ye.test(e)&&u(t.parentNode)||t),n},x.sortStable=F.split("").sort(j).join("")===F,x.detectDuplicates=!!A,B(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(D.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(ne,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),e}),r(h,[],function(){function e(e){return"matchMedia"in window?matchMedia(e).matches:!1}var t=navigator,n=t.userAgent,r,i,o,a,s,l,c,u,d,f,h,p,m;r=window.opera&&window.opera.buildNumber,d=/Android/.test(n),i=/WebKit/.test(n),o=!i&&!r&&/MSIE/gi.test(n)&&/Explorer/gi.test(t.appName),
-o=o&&/MSIE (\w+)\./.exec(n)[1],a=-1==n.indexOf("Trident/")||-1==n.indexOf("rv:")&&-1==t.appName.indexOf("Netscape")?!1:11,s=-1==n.indexOf("Edge/")||o||a?!1:12,o=o||a||s,l=!i&&!a&&/Gecko/.test(n),c=-1!=n.indexOf("Mac"),u=/(iPad|iPhone)/.test(n),f="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,h=e("only screen and (max-device-width: 480px)")&&(d||u),p=e("only screen and (min-width: 800px)")&&(d||u),m=-1!=n.indexOf("Windows Phone"),s&&(i=!1);var g=!u||f||n.match(/AppleWebKit\/(\d*)/)[1]>=534;return{opera:r,webkit:i,ie:o,gecko:l,mac:c,iOS:u,android:d,contentEditable:g,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=o,range:window.getSelection&&"Range"in window,documentMode:o&&!s?document.documentMode||7:10,fileApi:f,ceFalse:o===!1||o>8,desktop:!h&&!p,windowsPhone:m}}),r(p,[],function(){function e(e){var t=e,n,r;if(!u(e))for(t=[],n=0,r=e.length;r>n;n++)t[n]=e[n];return t}function n(e,n,r){var i,o;if(!e)return 0;if(r=r||e,e.length!==t){for(i=0,o=e.length;o>i;i++)if(n.call(r,e[i],i,e)===!1)return 0}else for(i in e)if(e.hasOwnProperty(i)&&n.call(r,e[i],i,e)===!1)return 0;return 1}function r(e,t){var r=[];return n(e,function(n,i){r.push(t(n,i,e))}),r}function i(e,t){var r=[];return n(e,function(n,i){t&&!t(n,i,e)||r.push(n)}),r}function o(e,t){var n,r;if(e)for(n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function a(e,t,n,r){var i=0;for(arguments.length<3&&(n=e[0]);i<e.length;i++)n=t.call(r,n,e[i],i);return n}function s(e,t,n){var r,i;for(r=0,i=e.length;i>r;r++)if(t.call(n,e[r],r,e))return r;return-1}function l(e,n,r){var i=s(e,n,r);return-1!==i?e[i]:t}function c(e){return e[e.length-1]}var u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return{isArray:u,toArray:e,each:n,map:r,filter:i,indexOf:o,reduce:a,findIndex:s,find:l,last:c}}),r(m,[h,p],function(e,n){function r(e){return null===e||e===t?"":(""+e).replace(h,"")}function i(e,r){return r?"array"==r&&n.isArray(e)?!0:typeof e==r:e!==t}function o(e,t,n){var r;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n}function a(e,t,n){var r=this,i,o,a,s,l,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),a=e[3].match(/(^|\.)(\w+)$/i)[2],o=r.createNS(e[3].replace(/\.\w+$/,""),n),!o[a]){if("static"==e[2])return o[a]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[a]));t[a]||(t[a]=function(){},c=1),o[a]=t[a],r.extend(o[a].prototype,t),e[5]&&(i=r.resolve(e[5]).prototype,s=e[5].match(/\.(\w+)$/i)[1],l=o[a],c?o[a]=function(){return i[s].apply(this,arguments)}:o[a]=function(){return this.parent=i[s],l.apply(this,arguments)},o[a].prototype[a]=o[a],r.each(i,function(e,t){o[a].prototype[t]=i[t]}),r.each(t,function(e,t){i[t]?o[a].prototype[t]=function(){return this.parent=i[t],e.apply(this,arguments)}:t!=a&&(o[a].prototype[t]=e)})),r.each(t["static"],function(e,t){o[a][t]=e})}}function s(e,n){var r,i,o,a=arguments,s;for(r=1,i=a.length;i>r;r++){n=a[r];for(o in n)n.hasOwnProperty(o)&&(s=n[o],s!==t&&(e[o]=s))}return e}function l(e,t,r,i){i=i||this,e&&(r&&(e=e[r]),n.each(e,function(e,n){return t.call(i,e,n,r)===!1?!1:void l(e,t,r,i)}))}function c(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;n<e.length;n++)r=e[n],t[r]||(t[r]={}),t=t[r];return t}function u(e,t){var n,r;for(t=t||window,e=e.split("."),n=0,r=e.length;r>n&&(t=t[e[n]],t);n++);return t}function d(e,t){return!e||i(e,"array")?e:n.map(e.split(t||","),r)}function f(t){var n=e.cacheSuffix;return n&&(t+=(-1===t.indexOf("?")?"?":"&")+n),t}var h=/^\s*|\s*$/g;return{trim:r,isArray:n.isArray,is:i,toArray:n.toArray,makeMap:o,each:n.each,map:n.map,grep:n.filter,inArray:n.indexOf,extend:s,create:a,walk:l,createNS:c,resolve:u,explode:d,_addCacheSuffix:f}}),r(g,[d,f,m,h],function(e,n,r,i){function o(e){return"undefined"!=typeof e}function a(e){return"string"==typeof e}function s(e){return e&&e==e.window}function l(e,t){var n,r,i;for(t=t||w,i=t.createElement("div"),n=t.createDocumentFragment(),i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return n}function c(e,t,n,r){var i;if(a(t))t=l(t,v(e[0]));else if(t.length&&!t.nodeType){if(t=f.makeArray(t),r)for(i=t.length-1;i>=0;i--)c(e,t[i],n,r);else for(i=0;i<t.length;i++)c(e,t[i],n,r);return e}if(t.nodeType)for(i=e.length;i--;)n.call(e[i],t);return e}function u(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")}function d(e,t,n){var r,i;return t=f(t)[0],e.each(function(){var e=this;n&&r==e.parentNode?i.appendChild(e):(r=e.parentNode,i=t.cloneNode(!1),e.parentNode.insertBefore(i,e),i.appendChild(e))}),e}function f(e,t){return new f.fn.init(e,t)}function h(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1}function p(e){return null===e||e===k?"":(""+e).replace(P,"")}function m(e,t){var n,r,i,o,a;if(e)if(n=e.length,n===o){for(r in e)if(e.hasOwnProperty(r)&&(a=e[r],t.call(a,r,a)===!1))break}else for(i=0;n>i&&(a=e[i],t.call(a,i,a)!==!1);i++);return e}function g(e,t){var n=[];return m(e,function(e,r){t(r,e)&&n.push(r)}),n}function v(e){return e?9==e.nodeType?e:e.ownerDocument:w}function y(e,n,r){var i=[],o=e[n];for("string"!=typeof r&&r instanceof f&&(r=r[0]);o&&9!==o.nodeType;){if(r!==t){if(o===r)break;if("string"==typeof r&&f(o).is(r))break}1===o.nodeType&&i.push(o),o=o[n]}return i}function b(e,n,r,i){var o=[];for(i instanceof f&&(i=i[0]);e;e=e[n])if(!r||e.nodeType===r){if(i!==t){if(e===i)break;if("string"==typeof i&&f(e).is(i))break}o.push(e)}return o}function C(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType==n)return e;return null}function x(e,t,n){m(n,function(n,r){e[n]=e[n]||{},e[n][t]=r})}var w=document,E=Array.prototype.push,N=Array.prototype.slice,_=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,S=e.Event,k,T=r.makeMap("children,contents,next,prev"),R=r.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),A=r.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),B={"for":"htmlFor","class":"className",readonly:"readOnly"},D={"float":"cssFloat"},M={},L={},P=/^\s*|\s*$/g;return f.fn=f.prototype={constructor:f,selector:"",context:null,length:0,init:function(e,t){var n=this,r,i;if(!e)return n;if(e.nodeType)return n.context=n[0]=e,n.length=1,n;if(t&&t.nodeType)n.context=t;else{if(t)return f(e).attr(t);n.context=t=document}if(a(e)){if(n.selector=e,r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:_.exec(e),!r)return f(t).find(e);if(r[1])for(i=l(e,v(t)).firstChild;i;)E.call(n,i),i=i.nextSibling;else{if(i=v(t).getElementById(r[2]),!i)return n;if(i.id!==r[2])return n.find(e);n.length=1,n[0]=i}}else this.add(e,!1);return n},toArray:function(){return r.toArray(this)},add:function(e,t){var n=this,r,i;if(a(e))return n.add(f(e));if(t!==!1)for(r=f.unique(n.toArray().concat(f.makeArray(e))),n.length=r.length,i=0;i<r.length;i++)n[i]=r[i];else E.apply(n,f.makeArray(e));return n},attr:function(e,t){var n=this,r;if("object"==typeof e)m(e,function(e,t){n.attr(e,t)});else{if(!o(t)){if(n[0]&&1===n[0].nodeType){if(r=M[e],r&&r.get)return r.get(n[0],e);if(A[e])return n.prop(e)?e:k;t=n[0].getAttribute(e,2),null===t&&(t=k)}return t}this.each(function(){var n;if(1===this.nodeType){if(n=M[e],n&&n.set)return void n.set(this,t);null===t?this.removeAttribute(e,2):this.setAttribute(e,t,2)}})}return n},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if(e=B[e]||e,"object"==typeof e)m(e,function(e,t){n.prop(e,t)});else{if(!o(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each(function(){1==this.nodeType&&(this[e]=t)})}return n},css:function(e,t){function n(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})}function r(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})}var i=this,a,s;if("object"==typeof e)m(e,function(e,t){i.css(e,t)});else if(o(t))e=n(e),"number"!=typeof t||R[e]||(t+="px"),i.each(function(){var n=this.style;if(s=L[e],s&&s.set)return void s.set(this,t);try{this.style[D[e]||e]=t}catch(i){}null!==t&&""!==t||(n.removeProperty?n.removeProperty(r(e)):n.removeAttribute(e))});else{if(a=i[0],s=L[e],s&&s.get)return s.get(a);if(a.ownerDocument.defaultView)try{return a.ownerDocument.defaultView.getComputedStyle(a,null).getPropertyValue(r(e))}catch(l){return k}else if(a.currentStyle)return a.currentStyle[n(e)]}return i},remove:function(){for(var e=this,t,n=this.length;n--;)t=e[n],S.clean(t),t.parentNode&&t.parentNode.removeChild(t);return this},empty:function(){for(var e=this,t,n=this.length;n--;)for(t=e[n];t.firstChild;)t.removeChild(t.firstChild);return this},html:function(e){var t=this,n;if(o(e)){n=t.length;try{for(;n--;)t[n].innerHTML=e}catch(r){f(t[n]).empty().append(e)}return t}return t[0]?t[0].innerHTML:""},text:function(e){var t=this,n;if(o(e)){for(n=t.length;n--;)"innerText"in t[n]?t[n].innerText=e:t[0].textContent=e;return t}return t[0]?t[0].innerText||t[0].textContent:""},append:function(){return c(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return c(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){var e=this;return e[0]&&e[0].parentNode?c(e,arguments,function(e){this.parentNode.insertBefore(e,this)}):e},after:function(){var e=this;return e[0]&&e[0].parentNode?c(e,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):e},appendTo:function(e){return f(e).append(this),this},prependTo:function(e){return f(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return d(this,e)},wrapAll:function(e){return d(this,e,!0)},wrapInner:function(e){return this.each(function(){f(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){f(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),f(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(e,t){var n=this;return"string"!=typeof e?n:(-1!==e.indexOf(" ")?m(e.split(" "),function(){n.toggleClass(this,t)}):n.each(function(n,r){var i,o;o=u(r,e),o!==t&&(i=r.className,o?r.className=p((" "+i+" ").replace(" "+e+" "," ")):r.className+=i?" "+e:e)}),n)},hasClass:function(e){return u(this[0],e)},each:function(e){return m(this,e)},on:function(e,t){return this.each(function(){S.bind(this,e,t)})},off:function(e,t){return this.each(function(){S.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?S.fire(this,e.type,e):S.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new f(N.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,r=[];for(t=0,n=this.length;n>t;t++)f.find(e,this[t],r);return f(r)},filter:function(e){return f("function"==typeof e?g(this.toArray(),function(t,n){return e(n,t)}):f.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof f&&(e=e[0]),this.each(function(n,r){for(;r;){if("string"==typeof e&&f(r).is(e)){t.push(r);break}if(r==e){t.push(r);break}r=r.parentNode}}),f(t)},offset:function(e){var t,n,r,i=0,o=0,a;return e?this.css(e):(t=this[0],t&&(n=t.ownerDocument,r=n.documentElement,t.getBoundingClientRect&&(a=t.getBoundingClientRect(),i=a.left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,o=a.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:o})},push:E,sort:[].sort,splice:[].splice},r.extend(f,{extend:r.extend,makeArray:function(e){return s(e)||e.nodeType?[e]:r.toArray(e)},inArray:h,isArray:r.isArray,each:m,trim:p,grep:g,find:n,expr:n.selectors,unique:n.uniqueSort,text:n.getText,contains:n.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!=t[r].nodeType&&t.splice(r,1);return t=1===t.length?f.find.matchesSelector(t[0],e)?[t[0]]:[]:f.find.matches(e,t)}}),m({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return y(e,"parentNode")},next:function(e){return C(e,"nextSibling",1)},prev:function(e){return C(e,"previousSibling",1)},children:function(e){return b(e.firstChild,"nextSibling",1)},contents:function(e){return r.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){f.fn[e]=function(n){var r=this,i=[];return r.each(function(){var e=t.call(i,this,n,i);e&&(f.isArray(e)?i.push.apply(i,e):i.push(e))}),this.length>1&&(T[e]||(i=f.unique(i)),0===e.indexOf("parents")&&(i=i.reverse())),i=f(i),n?i.filter(n):i}}),m({parentsUntil:function(e,t){return y(e,"parentNode",t)},nextUntil:function(e,t){return b(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return b(e,"previousSibling",1,t).slice(1)}},function(e,t){f.fn[e]=function(n,r){var i=this,o=[];return i.each(function(){var e=t.call(o,this,n,o);e&&(f.isArray(e)?o.push.apply(o,e):o.push(e))}),this.length>1&&(o=f.unique(o),0!==e.indexOf("parents")&&"prevUntil"!==e||(o=o.reverse())),o=f(o),r?o.filter(r):o}}),f.fn.is=function(e){return!!e&&this.filter(e).length>0},f.fn.init.prototype=f.fn,f.overrideDefaults=function(e){function t(r,i){return n=n||e(),0===arguments.length&&(r=n.element),i||(i=n.context),new t.fn.init(r,i)}var n;return f.extend(t,this),t},i.ie&&i.ie<8&&(x(M,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?k:t},size:function(e){var t=e.size;return 20===t?k:t},"class":function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?k:t}}),x(M,"set",{"class":function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),i.ie&&i.ie<9&&(D["float"]="styleFloat",x(L,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),f.attrHooks=M,f.cssHooks=L,f}),r(v,[],function(){return function(e,t){function n(e,t,n,r){function i(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+i(t)+i(n)+i(r)}var r=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,i=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,o=/\s*([^:]+):\s*([^;]+);?/g,a=/\s+$/,s,l,c={},u,d,f,h="\ufeff";for(e=e||{},t&&(d=t.getValidStyles(),f=t.getInvalidStyles()),u=("\\\" \\' \\; \\: ; : "+h).split(" "),l=0;l<u.length;l++)c[u[l]]=h+l,c[h+l]=u[l];return{toHex:function(e){return e.replace(r,n)},parse:function(t){function s(e,t,n){var r,i,o,a;if(r=m[e+"-top"+t],r&&(i=m[e+"-right"+t],i&&(o=m[e+"-bottom"+t],o&&(a=m[e+"-left"+t])))){var s=[r,i,o,a];for(l=s.length-1;l--&&s[l]===s[l+1];);l>-1&&n||(m[e+t]=-1==l?s[0]:s.join(" "),delete m[e+"-top"+t],delete m[e+"-right"+t],delete m[e+"-bottom"+t],delete m[e+"-left"+t])}}function u(e){var t=m[e],n;if(t){for(t=t.split(" "),n=t.length;n--;)if(t[n]!==t[0])return!1;return m[e]=t[0],!0}}function d(e,t,n,r){u(t)&&u(n)&&u(r)&&(m[e]=m[t]+" "+m[n]+" "+m[r],delete m[t],delete m[n],delete m[r])}function f(e){return b=!0,c[e]}function h(e,t){return b&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return c[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function p(t,n,r,i,o,a){if(o=o||a)return o=h(o),"'"+o.replace(/\'/g,"\\'")+"'";if(n=h(n||r||i),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return C&&(n=C.call(x,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"}var m={},g,v,y,b,C=e.url_converter,x=e.url_converter_scope||this;if(t){for(t=t.replace(/[\u0000-\u001F]/g,""),t=t.replace(/\\[\"\';:\uFEFF]/g,f).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,f)});g=o.exec(t);){if(v=g[1].replace(a,"").toLowerCase(),y=g[2].replace(a,""),y=y.replace(/\\[0-9a-f]+/g,function(e){return String.fromCharCode(parseInt(e.substr(1),16))}),v&&y.length>0){if(!e.allow_script_urls&&("behavior"==v||/expression\s*\(|\/\*|\*\//.test(y)))continue;"font-weight"===v&&"700"===y?y="bold":"color"!==v&&"background-color"!==v||(y=y.toLowerCase()),y=y.replace(r,n),y=y.replace(i,p),m[v]=b?h(y,!0):y}o.lastIndex=g.index+g[0].length}s("border","",!0),s("border","-width"),s("border","-color"),s("border","-style"),s("padding",""),s("margin",""),d("border","border-width","border-style","border-color"),"medium none"===m.border&&delete m.border,"none"===m["border-image"]&&delete m["border-image"]}return m},serialize:function(e,t){function n(t){var n,r,o,a;if(n=d[t])for(r=0,o=n.length;o>r;r++)t=n[r],a=e[t],a!==s&&a.length>0&&(i+=(i.length>0?" ":"")+t+": "+a+";")}function r(e,t){var n;return n=f["*"],n&&n[e]?!1:(n=f[t],!n||!n[e])}var i="",o,a;if(t&&d)n("*"),n(t);else for(o in e)a=e[o],a!==s&&a.length>0&&(f&&!r(o,t)||(i+=(i.length>0?" ":"")+o+": "+a+";"));return i}}}}),r(y,[],function(){return function(e,t){function n(e,n,r,i){var o,a;if(e){if(!i&&e[n])return e[n];if(e!=t){if(o=e[r])return o;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(o=a[r])return o}}}function r(e,n,r,i){var o,a,s;if(e){if(o=e[r],t&&o===t)return;if(o){if(!i)for(s=o[n];s;s=s[n])if(!s[n])return s;return o}if(a=e.parentNode,a&&a!==t)return a}}var i=e;this.current=function(){return i},this.next=function(e){return i=n(i,"firstChild","nextSibling",e)},this.prev=function(e){return i=n(i,"lastChild","previousSibling",e)},this.prev2=function(e){return i=r(i,"lastChild","previousSibling",e)}}}),r(b,[m],function(e){function t(n){function r(){return P.createDocumentFragment()}function i(e,t){E(F,e,t)}function o(e,t){E(z,e,t)}function a(e){i(e.parentNode,j(e))}function s(e){i(e.parentNode,j(e)+1)}function l(e){o(e.parentNode,j(e))}function c(e){o(e.parentNode,j(e)+1)}function u(e){e?(L[U]=L[V],L[$]=L[W]):(L[V]=L[U],L[W]=L[$]),L.collapsed=F}function d(e){a(e),c(e)}function f(e){i(e,0),o(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function h(e,t){var n=L[V],r=L[W],i=L[U],o=L[$],a=t.startContainer,s=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?w(n,r,a,s):1===e?w(i,o,a,s):2===e?w(i,o,l,c):3===e?w(n,r,l,c):void 0}function p(){N(I)}function m(){return N(H)}function g(){return N(O)}function v(e){var t=this[V],r=this[W],i,o;3!==t.nodeType&&4!==t.nodeType||!t.nodeValue?(t.childNodes.length>0&&(o=t.childNodes[r]),o?t.insertBefore(e,o):3==t.nodeType?n.insertAfter(e,t):t.appendChild(e)):r?r>=t.nodeValue.length?n.insertAfter(e,t):(i=t.splitText(r),t.parentNode.insertBefore(e,i)):t.parentNode.insertBefore(e,t)}function y(e){var t=L.extractContents();L.insertNode(e),e.appendChild(t),L.selectNode(e)}function b(){return q(new t(n),{startContainer:L[V],startOffset:L[W],endContainer:L[U],endOffset:L[$],collapsed:L.collapsed,commonAncestorContainer:L.commonAncestorContainer})}function C(e,t){var n;if(3==e.nodeType)return e;if(0>t)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n?n:e}function x(){return L[V]==L[U]&&L[W]==L[$]}function w(e,t,r,i){var o,a,s,l,c,u;if(e==r)return t==i?0:i>t?-1:1;for(o=r;o&&o.parentNode!=e;)o=o.parentNode;if(o){for(a=0,s=e.firstChild;s!=o&&t>a;)a++,s=s.nextSibling;return a>=t?-1:1}for(o=e;o&&o.parentNode!=r;)o=o.parentNode;if(o){for(a=0,s=r.firstChild;s!=o&&i>a;)a++,s=s.nextSibling;return i>a?-1:1}for(l=n.findCommonAncestor(e,r),c=e;c&&c.parentNode!=l;)c=c.parentNode;for(c||(c=l),u=r;u&&u.parentNode!=l;)u=u.parentNode;if(u||(u=l),c==u)return 0;for(s=l.firstChild;s;){if(s==c)return-1;if(s==u)return 1;s=s.nextSibling}}function E(e,t,r){var i,o;for(e?(L[V]=t,L[W]=r):(L[U]=t,L[$]=r),i=L[U];i.parentNode;)i=i.parentNode;for(o=L[V];o.parentNode;)o=o.parentNode;o==i?w(L[V],L[W],L[U],L[$])>0&&L.collapse(e):L.collapse(e),L.collapsed=x(),L.commonAncestorContainer=n.findCommonAncestor(L[V],L[U])}function N(e){var t,n=0,r=0,i,o,a,s,l,c;if(L[V]==L[U])return _(e);for(t=L[U],i=t.parentNode;i;t=i,i=i.parentNode){if(i==L[V])return S(t,e);++n}for(t=L[V],i=t.parentNode;i;t=i,i=i.parentNode){if(i==L[U])return k(t,e);++r}for(o=r-n,a=L[V];o>0;)a=a.parentNode,o--;for(s=L[U];0>o;)s=s.parentNode,o++;for(l=a.parentNode,c=s.parentNode;l!=c;l=l.parentNode,c=c.parentNode)a=l,s=c;return T(a,s,e)}function _(e){var t,n,i,o,a,s,l,c,u;if(e!=I&&(t=r()),L[W]==L[$])return t;if(3==L[V].nodeType){if(n=L[V].nodeValue,i=n.substring(L[W],L[$]),e!=O&&(o=L[V],c=L[W],u=L[$]-L[W],0===c&&u>=o.nodeValue.length-1?o.parentNode.removeChild(o):o.deleteData(c,u),L.collapse(F)),e==I)return;return i.length>0&&t.appendChild(P.createTextNode(i)),t}for(o=C(L[V],L[W]),a=L[$]-L[W];o&&a>0;)s=o.nextSibling,l=D(o,e),t&&t.appendChild(l),--a,o=s;return e!=O&&L.collapse(F),t}function S(e,t){var n,i,o,a,s,l;if(t!=I&&(n=r()),i=R(e,t),n&&n.appendChild(i),o=j(e),a=o-L[W],0>=a)return t!=O&&(L.setEndBefore(e),L.collapse(z)),n;for(i=e.previousSibling;a>0;)s=i.previousSibling,l=D(i,t),n&&n.insertBefore(l,n.firstChild),--a,i=s;return t!=O&&(L.setEndBefore(e),L.collapse(z)),n}function k(e,t){var n,i,o,a,s,l;for(t!=I&&(n=r()),o=A(e,t),n&&n.appendChild(o),i=j(e),++i,a=L[$]-i,o=e.nextSibling;o&&a>0;)s=o.nextSibling,l=D(o,t),n&&n.appendChild(l),--a,o=s;return t!=O&&(L.setStartAfter(e),L.collapse(F)),n}function T(e,t,n){var i,o,a,s,l,c,u;for(n!=I&&(o=r()),i=A(e,n),o&&o.appendChild(i),a=j(e),s=j(t),++a,l=s-a,c=e.nextSibling;l>0;)u=c.nextSibling,i=D(c,n),o&&o.appendChild(i),c=u,--l;return i=R(t,n),o&&o.appendChild(i),n!=O&&(L.setStartAfter(e),L.collapse(F)),o}function R(e,t){var n=C(L[U],L[$]-1),r,i,o,a,s,l=n!=L[U];if(n==e)return B(n,l,z,t);for(r=n.parentNode,i=B(r,z,z,t);r;){for(;n;)o=n.previousSibling,a=B(n,l,z,t),t!=I&&i.insertBefore(a,i.firstChild),l=F,n=o;if(r==e)return i;n=r.previousSibling,r=r.parentNode,s=B(r,z,z,t),t!=I&&s.appendChild(i),i=s}}function A(e,t){var n=C(L[V],L[W]),r=n!=L[V],i,o,a,s,l;if(n==e)return B(n,r,F,t);for(i=n.parentNode,o=B(i,z,F,t);i;){for(;n;)a=n.nextSibling,s=B(n,r,F,t),t!=I&&o.appendChild(s),r=F,n=a;if(i==e)return o;n=i.nextSibling,i=i.parentNode,l=B(i,z,F,t),t!=I&&l.appendChild(o),o=l}}function B(e,t,r,i){var o,a,s,l,c;if(t)return D(e,i);if(3==e.nodeType){if(o=e.nodeValue,r?(l=L[W],a=o.substring(l),s=o.substring(0,l)):(l=L[$],a=o.substring(0,l),s=o.substring(l)),i!=O&&(e.nodeValue=s),i==I)return;return c=n.clone(e,z),c.nodeValue=a,c}if(i!=I)return n.clone(e,z)}function D(e,t){return t!=I?t==O?n.clone(e,F):e:void e.parentNode.removeChild(e)}function M(){return n.create("body",null,g()).outerText}var L=this,P=n.doc,H=0,O=1,I=2,F=!0,z=!1,W="startOffset",V="startContainer",U="endContainer",$="endOffset",q=e.extend,j=n.nodeIndex;return q(L,{startContainer:P,startOffset:0,endContainer:P,endOffset:0,collapsed:F,commonAncestorContainer:P,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:i,setEnd:o,setStartBefore:a,setStartAfter:s,setEndBefore:l,setEndAfter:c,collapse:u,selectNode:d,selectNodeContents:f,compareBoundaryPoints:h,deleteContents:p,extractContents:m,cloneContents:g,insertNode:v,surroundContents:y,cloneRange:b,toStringIE:M}),L}return t.prototype.toString=function(){return this.toStringIE()},t}),r(C,[m],function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,r,i,a={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),o[r]||(i="&"+e[n+1]+";",a[r]=i,a[i]=r);return a}}var r=e.makeMap,i,o,a,s=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,u=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,d={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};o={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},a={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},i=n("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var f={encodeRaw:function(e,t){return e.replace(t?s:l,function(e){return o[e]||e})},encodeAllRaw:function(e){return(""+e).replace(c,function(e){return o[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:l,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":o[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||i,e.replace(t?s:l,function(e){return o[e]||n[e]||e})},getEncodeFunc:function(e,t){function a(e,n){return e.replace(n?s:l,function(e){return o[e]||t[e]||"&#"+e.charCodeAt(0)+";"||e})}function c(e,n){return f.encodeNamed(e,n,t)}return t=n(t)||i,e=r(e.replace(/\+/g,",")),e.named&&e.numeric?a:e.named?t?c:f.encodeNamed:e.numeric?f.encodeNumeric:f.encodeRaw},decode:function(e){return e.replace(u,function(e,n){return n?(n="x"===n.charAt(0).toLowerCase()?parseInt(n.substr(1),16):parseInt(n,10),n>65535?(n-=65536,String.fromCharCode(55296+(n>>10),56320+(1023&n))):d[n]||String.fromCharCode(n)):a[e]||i[e]||t(e)})}};return f}),r(x,[m,u],function(e,t){return function(n,r){function i(e){n.getElementsByTagName("head")[0].appendChild(e)}function o(r,o,c){function u(){for(var e=b.passed,t=e.length;t--;)e[t]();b.status=2,b.passed=[],b.failed=[]}function d(){for(var e=b.failed,t=e.length;t--;)e[t]();b.status=3,b.passed=[],b.failed=[]}function f(){var e=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(e&&e[1]<536)}function h(e,n){e()||((new Date).getTime()-y<l?t.setTimeout(n):d())}function p(){h(function(){for(var e=n.styleSheets,t,r=e.length,i;r--;)if(t=e[r],i=t.ownerNode?t.ownerNode:t.owningElement,i&&i.id===g.id)return u(),!0},p)}function m(){h(function(){try{var e=v.sheet.cssRules;return u(),!!e}catch(t){}},m)}var g,v,y,b;if(r=e._addCacheSuffix(r),s[r]?b=s[r]:(b={passed:[],failed:[]},s[r]=b),o&&b.passed.push(o),c&&b.failed.push(c),1!=b.status){if(2==b.status)return void u();if(3==b.status)return void d();if(b.status=1,g=n.createElement("link"),g.rel="stylesheet",g.type="text/css",g.id="u"+a++,g.async=!1,g.defer=!1,y=(new Date).getTime(),"onload"in g&&!f())g.onload=p,g.onerror=d;else{if(navigator.userAgent.indexOf("Firefox")>0)return v=n.createElement("style"),v.textContent='@import "'+r+'"',m(),void i(v);p()}i(g),g.href=r}}var a=0,s={},l;r=r||{},l=r.maxLoadTime||5e3,this.load=o}}),r(w,[f,g,v,d,y,b,C,h,m,x],function(e,n,r,i,o,a,s,l,c,u){function d(e,t){var n={},r=t.keep_values,i;return i={set:function(n,r,i){t.url_converter&&(r=t.url_converter.call(t.url_converter_scope||e,r,i,n[0])),n.attr("data-mce-"+i,r).attr(i,r)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},n={style:{set:function(e,t){return null!==t&&"object"==typeof t?void e.css(t):(r&&e.attr("data-mce-style",t),void e.attr("style",t))},get:function(t){var n=t.attr("data-mce-style")||t.attr("style");return n=e.serializeStyle(e.parseStyle(n),t[0].nodeName)}}},r&&(n.href=n.src=i),n}function f(e,t){var n=t.attr("style");n=e.serializeStyle(e.parseStyle(n),t[0].nodeName),n||(n=null),t.attr("data-mce-style",n)}function h(e,t){var n=0,r,i;if(e)for(r=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)i=e.nodeType,(!t||3!=i||i!=r&&e.nodeValue.length)&&(n++,r=i);return n}function p(e,t){var o=this,a;o.doc=e,o.win=window,o.files={},o.counter=0,o.stdMode=!b||e.documentMode>=8,o.boxModel=!b||"CSS1Compat"==e.compatMode||o.stdMode,o.styleSheetLoader=new u(e),o.boundEvents=[],o.settings=t=t||{},o.schema=t.schema,o.styles=new r({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),o.fixDoc(e),o.events=t.ownEvents?new i(t.proxy):i.Event,o.attrHooks=d(o,t),a=t.schema?t.schema.getBlockElements():{},o.$=n.overrideDefaults(function(){return{context:e,element:o.getRoot()}}),o.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!a[e.nodeName]):!!a[e]}}var m=c.each,g=c.is,v=c.grep,y=c.trim,b=l.ie,C=/^([a-z0-9],?)+$/i,x=/^[ \t\r\n]*$/;return p.prototype={$$:function(e){return"string"==typeof e&&(e=this.get(e)),this.$(e)},root:null,fixDoc:function(e){var t=this.settings,n;if(b&&t.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(t){e.createElement(t)});for(n in t.schema.getCustomElements())e.createElement(n)}},clone:function(e,t){var n=this,r,i;return!b||1!==e.nodeType||t?e.cloneNode(t):(i=n.doc,t?r.firstChild:(r=i.createElement(e.nodeName),m(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),r))},getRoot:function(){var e=this;return e.settings.root_element||e.doc.body},getViewPort:function(e){var t,n;return e=e?e:this.win,t=e.document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t=this,n,r;return e=t.get(e),n=t.getPos(e),r=t.getSize(e),{x:n.x,y:n.y,w:r.w,h:r.h}},getSize:function(e){var t=this,n,r;return e=t.get(e),n=t.getStyle(e,"width"),r=t.getStyle(e,"height"),-1===n.indexOf("px")&&(n=0),-1===r.indexOf("px")&&(r=0),{w:parseInt(n,10)||e.offsetWidth||e.clientWidth,h:parseInt(r,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,n,r,i){var o=this,a,s=[];for(e=o.get(e),i=i===t,r=r||("BODY"!=o.getRoot().nodeName?o.getRoot().parentNode:null),g(n,"string")&&(a=n,n="*"===n?function(e){return 1==e.nodeType}:function(e){return o.is(e,a)});e&&e!=r&&e.nodeType&&9!==e.nodeType;){if(!n||n(e)){if(!i)return e;s.push(e)}e=e.parentNode}return i?s:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,e=this.doc.getElementById(e),
-e&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(t,n){var r=this;return e(t,r.get(n)||r.settings.root_element||r.doc,[])},is:function(n,r){var i;if(n.length===t){if("*"===r)return 1==n.nodeType;if(C.test(r)){for(r=r.toLowerCase().split(/,/),n=n.nodeName.toLowerCase(),i=r.length-1;i>=0;i--)if(r[i]==n)return!0;return!1}}if(n.nodeType&&1!=n.nodeType)return!1;var o=n.nodeType?[n]:n;return e(r,o[0].ownerDocument||o[0],null,o).length>0},add:function(e,t,n,r,i){var o=this;return this.run(e,function(e){var a;return a=g(t,"string")?o.doc.createElement(t):t,o.setAttribs(a,n),r&&(r.nodeType?a.appendChild(r):o.setHTML(a,r)),i?a:e.appendChild(a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var r="",i;r+="<"+e;for(i in t)t.hasOwnProperty(i)&&null!==t[i]&&"undefined"!=typeof t[i]&&(r+=" "+i+'="'+this.encode(t[i])+'"');return"undefined"!=typeof n?r+">"+n+"</"+e+">":r+" />"},createFragment:function(e){var t,n,r=this.doc,i;for(i=r.createElement("div"),t=r.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},remove:function(e,t){return e=this.$$(e),t?e.each(function(){for(var e;e=this.firstChild;)3==e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():e.remove(),e.length>1?e.toArray():e[0]},setStyle:function(e,t,n){e=this.$$(e).css(t,n),this.settings.update_styles&&f(this,e)},getStyle:function(e,n,r){return e=this.$$(e),r?e.css(n):(n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==n&&(n=l.ie&&l.ie<12?"styleFloat":"cssFloat"),e[0]&&e[0].style?e[0].style[n]:t)},setStyles:function(e,t){e=this.$$(e).css(t),this.settings.update_styles&&f(this,e)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,t,n){var r=this,i,o,a=r.settings;""===n&&(n=null),e=r.$$(e),i=e.attr(t),e.length&&(o=r.attrHooks[t],o&&o.set?o.set(e,n,t):e.attr(t,n),i!=n&&a.onSetAttrib&&a.onSetAttrib({attrElm:e,attrName:t,attrValue:n}))},setAttribs:function(e,t){var n=this;n.$$(e).each(function(e,r){m(t,function(e,t){n.setAttrib(r,t,e)})})},getAttrib:function(e,t,n){var r=this,i,o;return e=r.$$(e),e.length&&(i=r.attrHooks[t],o=i&&i.get?i.get(e,t):e.attr(t)),"undefined"==typeof o&&(o=n||""),o},getPos:function(e,t){var r=this,i=0,o=0,a,s=r.doc,l=s.body,c;if(e=r.get(e),t=t||l,e){if(t===l&&e.getBoundingClientRect&&"static"===n(l).css("position"))return c=e.getBoundingClientRect(),t=r.boxModel?s.documentElement:l,i=c.left+(s.documentElement.scrollLeft||l.scrollLeft)-t.clientLeft,o=c.top+(s.documentElement.scrollTop||l.scrollTop)-t.clientTop,{x:i,y:o};for(a=e;a&&a!=t&&a.nodeType;)i+=a.offsetLeft||0,o+=a.offsetTop||0,a=a.offsetParent;for(a=e.parentNode;a&&a!=t&&a.nodeType;)i-=a.scrollLeft||0,o-=a.scrollTop||0,a=a.parentNode}return{x:i,y:o}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t=this,n=t.doc,r,i;if(t!==p.DOM&&n===document){var o=p.DOM.addedStyles;if(o=o||[],o[e])return;o[e]=!0,p.DOM.addedStyles=o}i=n.getElementById("mceDefaultStyles"),i||(i=n.createElement("style"),i.id="mceDefaultStyles",i.type="text/css",r=n.getElementsByTagName("head")[0],r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i)),i.styleSheet?i.styleSheet.cssText+=e:i.appendChild(n.createTextNode(e))},loadCSS:function(e){var t=this,n=t.doc,r;return t!==p.DOM&&n===document?void p.DOM.loadCSS(e):(e||(e=""),r=n.getElementsByTagName("head")[0],void m(e.split(","),function(e){var i;e=c._addCacheSuffix(e),t.files[e]||(t.files[e]=!0,i=t.create("link",{rel:"stylesheet",href:e}),b&&n.documentMode&&n.recalc&&(i.onload=function(){n.recalc&&n.recalc(),i.onload=null}),r.appendChild(i))}))},addClass:function(e,t){this.$$(e).addClass(t)},removeClass:function(e,t){this.toggleClass(e,t,!1)},hasClass:function(e,t){return this.$$(e).hasClass(t)},toggleClass:function(e,t,r){this.$$(e).toggleClass(t,r).each(function(){""===this.className&&n(this).attr("class",null)})},show:function(e){this.$$(e).show()},hide:function(e){this.$$(e).hide()},isHidden:function(e){return"none"==this.$$(e).css("display")},uniqueId:function(e){return(e?e:"mce_")+this.counter++},setHTML:function(e,t){e=this.$$(e),b?e.each(function(e,r){if(r.canHaveHTML!==!1){for(;r.firstChild;)r.removeChild(r.firstChild);try{r.innerHTML="<br>"+t,r.removeChild(r.firstChild)}catch(i){n("<div>").html("<br>"+t).contents().slice(1).appendTo(r)}return t}}):e.html(t)},getOuterHTML:function(e){return e=this.get(e),1==e.nodeType&&"outerHTML"in e?e.outerHTML:n("<div>").append(n(e).clone()).html()},setOuterHTML:function(e,t){var r=this;r.$$(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}r.remove(n(this).html(t),!0)})},decode:s.decode,encode:s.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,r;return n=t.parentNode,r=t.nextSibling,r?n.insertBefore(e,r):n.appendChild(e),e})},replace:function(e,t,n){var r=this;return r.run(t,function(t){return g(t,"array")&&(e=e.cloneNode(!0)),n&&m(v(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n=this,r;return e.nodeName!=t.toUpperCase()&&(r=n.create(t),m(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),n.replace(r,e,1)),r||e},findCommonAncestor:function(e,t){for(var n=e,r;n;){for(r=t;r&&n!=r;)r=r.parentNode;if(n==r)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},toHex:function(e){return this.styles.toHex(c.trim(e))},run:function(e,t,n){var r=this,i;return"string"==typeof e&&(e=r.get(e)),e?(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(i=[],m(e,function(e,o){e&&("string"==typeof e&&(e=r.get(e)),i.push(t.call(n,e,o)))}),i)):!1},getAttribs:function(e){var t;if(e=this.get(e),!e)return[];if(b){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});var n=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;return e.cloneNode(!1).outerHTML.replace(n,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n=this,r,i,a,s,l,c=0;if(e=e.firstChild){s=new o(e,e.parentNode),t=t||(n.schema?n.schema.getNonEmptyElements():null);do{if(a=e.nodeType,1===a){if(e.getAttribute("data-mce-bogus"))continue;if(l=e.nodeName.toLowerCase(),t&&t[l]){if("br"===l){c++;continue}return!1}for(i=n.getAttribs(e),r=i.length;r--;)if(l=i[r].nodeName,"name"===l||"data-mce-bookmark"===l)return!1}if(8==a)return!1;if(3===a&&!x.test(e.nodeValue))return!1}while(e=s.next())}return 1>=c},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new a(this)},nodeIndex:h,split:function(e,t,n){function r(e){function t(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}var n,o=e.childNodes,a=e.nodeType;if(1!=a||"bookmark"!=e.getAttribute("data-mce-type")){for(n=o.length-1;n>=0;n--)r(o[n]);if(9!=a){if(3==a&&e.nodeValue.length>0){var s=y(e.nodeValue).length;if(!i.isBlock(e.parentNode)||s>0||0===s&&t(e))return}else if(1==a&&(o=e.childNodes,1==o.length&&o[0]&&1==o[0].nodeType&&"bookmark"==o[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(o[0],e),o.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;i.remove(e)}return e}}var i=this,o=i.createRng(),a,s,l;return e&&t?(o.setStart(e.parentNode,i.nodeIndex(e)),o.setEnd(t.parentNode,i.nodeIndex(t)),a=o.extractContents(),o=i.createRng(),o.setStart(t.parentNode,i.nodeIndex(t)+1),o.setEnd(e.parentNode,i.nodeIndex(e)+1),s=o.extractContents(),l=e.parentNode,l.insertBefore(r(a),e),n?l.insertBefore(n,e):l.insertBefore(t,e),l.insertBefore(r(s),e),i.remove(e),n||t):void 0},bind:function(e,t,n,r){var i=this;if(c.isArray(e)){for(var o=e.length;o--;)e[o]=i.bind(e[o],t,n,r);return e}return!i.settings.collect||e!==i.doc&&e!==i.win||i.boundEvents.push([e,t,n,r]),i.events.bind(e,t,n,r||i)},unbind:function(e,t,n){var r=this,i;if(c.isArray(e)){for(i=e.length;i--;)e[i]=r.unbind(e[i],t,n);return e}if(r.boundEvents&&(e===r.doc||e===r.win))for(i=r.boundEvents.length;i--;){var o=r.boundEvents[i];e!=o[0]||t&&t!=o[1]||n&&n!=o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null):null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&(n=this.getContentEditable(e),null===n);e=e.parentNode);return n},destroy:function(){var t=this;if(t.boundEvents){for(var n=t.boundEvents.length;n--;){var r=t.boundEvents[n];this.events.unbind(r[0],r[1],r[2])}t.boundEvents=null}e.setDocument&&e.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var r=this,i=t;if(e)for("string"==typeof i&&(i=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(i(e))return e;return null}},p.DOM=new p(document),p.nodeIndex=h,p}),r(E,[w,m],function(e,t){function n(){function e(e,n){function i(){a.remove(l),s&&(s.onreadystatechange=s.onload=s=null),n()}function o(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+e)}var a=r,s,l;l=a.uniqueId(),s=document.createElement("script"),s.id=l,s.type="text/javascript",s.src=t._addCacheSuffix(e),"onreadystatechange"in s?s.onreadystatechange=function(){/loaded|complete/.test(s.readyState)&&i()}:s.onload=i,s.onerror=o,(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}var n=0,a=1,s=2,l={},c=[],u={},d=[],f=0,h;this.isDone=function(e){return l[e]==s},this.markDone=function(e){l[e]=s},this.add=this.load=function(e,t,r){var i=l[e];i==h&&(c.push(e),l[e]=n),t&&(u[e]||(u[e]=[]),u[e].push({func:t,scope:r||this}))},this.loadQueue=function(e,t){this.loadScripts(c,e,t)},this.loadScripts=function(t,n,r){function c(e){i(u[e],function(e){e.func.call(e.scope)}),u[e]=h}var p;d.push({func:n,scope:r||this}),(p=function(){var n=o(t);t.length=0,i(n,function(t){return l[t]==s?void c(t):void(l[t]!=a&&(l[t]=a,f++,e(t,function(){l[t]=s,f--,c(t),p()})))}),f||(i(d,function(e){e.func.call(e.scope)}),d.length=0)})()}}var r=e.DOM,i=t.each,o=t.grep;return n.ScriptLoader=new n,n}),r(N,[E,m],function(e,n){function r(){var e=this;e.items=[],e.urls={},e.lookup={}}var i=n.each;return r.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:t},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t,n){var i=r.language;if(i&&r.languageLoad!==!1){if(n)if(n=","+n+",",-1!=n.indexOf(","+i.substr(0,2)+","))i=i.substr(0,2);else if(-1==n.indexOf(","+i+","))return;e.ScriptLoader.add(this.urls[t]+"/langs/"+i+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var r=this.urls[t];i(n,function(t){e.ScriptLoader.add(r+"/"+t)})},load:function(n,o,a,s){function l(){var r=c.dependencies(n);i(r,function(e){var n=c.createUrl(o,e);c.load(n.resource,n,t,t)}),a&&(s?a.call(s):a.call(e))}var c=this,u=o;c.urls[n]||("object"==typeof o&&(u=o.prefix+o.resource+o.suffix),0!==u.indexOf("/")&&-1==u.indexOf("://")&&(u=r.baseURL+"/"+u),c.urls[n]=u.substring(0,u.lastIndexOf("/")),c.lookup[n]?l():e.ScriptLoader.add(u,l,s))}},r.PluginManager=new r,r.ThemeManager=new r,r}),r(_,[],function(){function e(e){return function(t){return!!t&&t.nodeType==e}}function t(e){return e=e.toLowerCase().split(" "),function(t){var n,r;if(t&&t.nodeType)for(r=t.nodeName.toLowerCase(),n=0;n<e.length;n++)if(r===e[n])return!0;return!1}}function n(e,t){return t=t.toLowerCase().split(" "),function(n){var r,i;if(s(n))for(r=0;r<t.length;r++)if(i=getComputedStyle(n,null).getPropertyValue(e),i===t[r])return!0;return!1}}function r(e,t){return function(n){return s(n)&&n[e]===t}}function i(e,t){return function(n){return s(n)&&n.getAttribute(e)===t}}function o(e){return s(e)&&e.hasAttribute("data-mce-bogus")}function a(e){return function(t){if(s(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1}}var s=e(1);return{isText:e(3),isElement:s,isComment:e(8),isBr:t("br"),isContentEditableTrue:a("true"),isContentEditableFalse:a("false"),matchNodeNames:t,hasPropValue:r,hasAttributeValue:i,matchStyleValues:n,isBogus:o}}),r(S,[],function(){function e(e){return e==n}function t(e){return e.replace(new RegExp(n,"g"),"")}var n="\u200b";return{isZwsp:e,ZWSP:n,trim:t}}),r(k,[_,S],function(e,t){function n(e){return d(e)&&(e=e.parentNode),u(e)&&e.hasAttribute("data-mce-caret")}function r(e){return d(e)&&t.isZwsp(e.data)}function i(e){return n(e)||r(e)}function o(e,n){var r,o,a,s;if(r=e.ownerDocument,a=r.createTextNode(t.ZWSP),s=e.parentNode,n){if(o=e.previousSibling,d(o)){if(i(o))return o;if(c(o))return o.splitText(o.data.length-1)}s.insertBefore(a,e)}else{if(o=e.nextSibling,d(o)){if(i(o))return o;if(l(o))return o.splitText(1),o}e.nextSibling?s.insertBefore(a,e.nextSibling):s.appendChild(a)}return a}function a(e,t,n){var r,i,o;return r=t.ownerDocument,i=r.createElement(e),i.setAttribute("data-mce-caret",n?"before":"after"),i.setAttribute("data-mce-bogus","all"),i.appendChild(r.createTextNode("\xa0")),o=t.parentNode,n?o.insertBefore(i,t):t.nextSibling?o.insertBefore(i,t.nextSibling):o.appendChild(i),i}function s(e){var n;u(e)&&i(e)&&("&nbsp;"!=e.innerHTML?e.removeAttribute("data-mce-caret"):e.parentNode&&e.parentNode.removeChild(e)),d(e)&&(n=t.trim(e.data),0===n.length&&e.parentNode&&e.parentNode.removeChild(e),e.nodeValue=n)}function l(e){return d(e)&&e.data[0]==t.ZWSP}function c(e){return d(e)&&e.data[e.data.length-1]==t.ZWSP}var u=e.isElement,d=e.isText;return{isCaretContainer:i,isCaretContainerBlock:n,isCaretContainerInline:r,insertInline:o,insertBlock:a,remove:s,startsWithCaretContainer:l,endsWithCaretContainer:c}}),r(T,[m,y,_,k],function(e,t,n,r){function i(e,t){var n=e.childNodes;return t--,t>n.length-1?t=n.length-1:0>t&&(t=0),n[t]||e}function o(e){this.walk=function(t,n){function r(e){var t;return t=e[0],3===t.nodeType&&t===c&&u>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===f&&e.length>0&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e}function o(e,t,n){for(var r=[];e&&e!=n;e=e[t])r.push(e);return r}function a(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function l(e,t,i){var a=i?"nextSibling":"previousSibling";for(g=e,v=g.parentNode;g&&g!=t;g=v)v=g.parentNode,y=o(g==e?g:g[a],a),y.length&&(i||y.reverse(),n(r(y)))}var c=t.startContainer,u=t.startOffset,d=t.endContainer,f=t.endOffset,h,p,m,g,v,y,b;if(b=e.select("td[data-mce-selected],th[data-mce-selected]"),b.length>0)return void s(b,function(e){n([e])});if(1==c.nodeType&&c.hasChildNodes()&&(c=c.childNodes[u]),1==d.nodeType&&d.hasChildNodes()&&(d=i(d,f)),c==d)return n(r([c]));for(h=e.findCommonAncestor(c,d),g=c;g;g=g.parentNode){if(g===d)return l(c,h,!0);if(g===h)break}for(g=d;g;g=g.parentNode){if(g===c)return l(d,h);if(g===h)break}p=a(c,h)||c,m=a(d,h)||d,l(c,p,!0),y=o(p==c?p:p.nextSibling,"nextSibling",m==d?m.nextSibling:m),y.length&&n(r(y)),l(d,m)},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return n==i&&3==n.nodeType?r>0&&r<n.nodeValue.length&&(i=t(n,r),n=i.previousSibling,o>r?(o-=r,n=i=t(i,o).previousSibling,o=i.nodeValue.length,r=0):o=0):(3==n.nodeType&&r>0&&r<n.nodeValue.length&&(n=t(n,r),r=0),3==i.nodeType&&o>0&&o<i.nodeValue.length&&(i=t(i,o).previousSibling,o=i.nodeValue.length)),{startContainer:n,startOffset:r,endContainer:i,endOffset:o}},this.normalize=function(n){function r(r){function a(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)}function s(n,r){for(var i=new t(n,e.getParent(n.parentNode,e.isBlock)||g);n=i[r?"prev":"next"]();)if("BR"===n.nodeName)return!0}function u(e){for(;e&&e!=g;){if(l(e))return!0;e=e.parentNode}return!1}function d(e,t){return e.previousSibling&&e.previousSibling.nodeName==t}function f(n,r){var a,s,l;if(r=r||h,l=e.getParent(r.parentNode,e.isBlock)||g,n&&"BR"==r.nodeName&&C&&e.isEmpty(l))return h=r.parentNode,p=e.nodeIndex(r),void(i=!0);for(a=new t(r,l);v=a[n?"prev":"next"]();){if("false"===e.getContentEditableParent(v)||c(v))return;if(3===v.nodeType&&v.nodeValue.length>0)return h=v,p=n?v.nodeValue.length:0,void(i=!0);if(e.isBlock(v)||y[v.nodeName.toLowerCase()])return;s=v}o&&s&&(h=s,i=!0,p=0)}var h,p,m,g=e.getRoot(),v,y,b,C;if(h=n[(r?"start":"end")+"Container"],p=n[(r?"start":"end")+"Offset"],C=1==h.nodeType&&p===h.childNodes.length,y=e.schema.getNonEmptyElements(),b=r,!c(h)){if(1==h.nodeType&&p>h.childNodes.length-1&&(b=!1),9===h.nodeType&&(h=e.getRoot(),p=0),h===g){if(b&&(v=h.childNodes[p>0?p-1:0])){if(c(v))return;if(y[v.nodeName]||"TABLE"==v.nodeName)return}if(h.hasChildNodes()){if(p=Math.min(!b&&p>0?p-1:p,h.childNodes.length-1),h=h.childNodes[p],p=0,u(h)||c(h))return;if(h.hasChildNodes()&&!/TABLE/.test(h.nodeName)){v=h,m=new t(h,g);do{if(l(v)||c(v)){i=!1;break}if(3===v.nodeType&&v.nodeValue.length>0){p=b?0:v.nodeValue.length,h=v,i=!0;break}if(y[v.nodeName.toLowerCase()]&&!a(v)){p=e.nodeIndex(v),h=v.parentNode,"IMG"!=v.nodeName||b||p++,i=!0;break}}while(v=b?m.next():m.prev())}}}o&&(3===h.nodeType&&0===p&&f(!0),1===h.nodeType&&(v=h.childNodes[p],v||(v=h.childNodes[p-1]),!v||"BR"!==v.nodeName||d(v,"A")||s(v)||s(v,!0)||f(!0,v))),b&&!o&&3===h.nodeType&&p===h.nodeValue.length&&f(!1),i&&n["set"+(r?"Start":"End")](h,p)}}var i,o;return o=n.collapsed,r(!0),o||r(),i&&o&&n.collapse(!0),i}}function a(t,n,r){var i,o,a;if(i=r.elementFromPoint(t,n),o=r.body.createTextRange(),"HTML"==i.tagName&&(i=r.body),o.moveToElementText(i),a=e.toArray(o.getClientRects()),a=a.sort(function(e,t){return e=Math.abs(Math.max(e.top-n,e.bottom-n)),t=Math.abs(Math.max(t.top-n,t.bottom-n)),e-t}),a.length>0){n=(a[0].bottom+a[0].top)/2;try{return o.moveToPoint(t,n),o.collapse(!0),o}catch(s){}}return null}var s=e.each,l=n.isContentEditableFalse,c=r.isCaretContainer;return o.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1},o.getCaretRangeFromPoint=function(e,t,n){var r,i;if(n.caretPositionFromPoint)i=n.caretPositionFromPoint(e,t),r=n.createRange(),r.setStart(i.offsetNode,i.offset),r.collapse(!0);else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(n.body.createTextRange){r=n.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(o){r=a(e,t,n)}}return r},o.getSelectedNode=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset==n+1?t.childNodes[n]:null},o.getNode=function(e,t){return 1==e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},o}),r(R,[T,h,u],function(e,t,n){return function(r){function i(e){var t,n;if(n=r.$(e).parentsUntil(r.getBody()).add(e),n.length===a.length){for(t=n.length;t>=0&&n[t]===a[t];t--);if(-1===t)return a=n,!0}return a=n,!1}var o,a=[];"onselectionchange"in r.getDoc()||r.on("NodeChange Click MouseUp KeyUp Focus",function(t){var n,i;n=r.selection.getRng(),i={startContainer:n.startContainer,startOffset:n.startOffset,endContainer:n.endContainer,endOffset:n.endOffset},"nodechange"!=t.type&&e.compareRanges(i,o)||r.fire("SelectionChange"),o=i}),r.on("contextmenu",function(){r.fire("SelectionChange")}),r.on("SelectionChange",function(){var e=r.selection.getStart(!0);!t.range&&r.selection.isCollapsed()||!i(e)&&r.dom.isChildOf(e,r.getBody())&&r.nodeChanged({selectionChange:!0})}),r.on("MouseUp",function(e){e.isDefaultPrevented()||("IMG"==r.selection.getNode().nodeName?n.setEditorTimeout(r,function(){r.nodeChanged()}):r.nodeChanged())}),this.nodeChanged=function(e){var t=r.selection,n,i,o;r.initialized&&t&&!r.settings.disable_nodechange&&!r.readonly&&(o=r.getBody(),n=t.getStart()||o,n=n.ownerDocument!=r.getDoc()?r.getBody():n,"IMG"==n.nodeName&&t.isCollapsed()&&(n=n.parentNode),i=[],r.dom.getParent(n,function(e){return e===o?!0:void i.push(e)}),e=e||{},e.element=n,e.parents=i,r.fire("NodeChange",e))}}}),r(A,[],function(){function e(e,t,n){var r,i,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(r=e[a])return r;for(i=e.parent;i&&i!==t;i=i.parent)if(r=i[a])return r}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.prototype={replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n=this,r,i,o;if("string"!=typeof e){for(i in e)n.attr(i,e[i]);return n}if(r=n.attributes){if(t!==o){if(null===t){if(e in r.map)for(delete r.map[e],i=r.length;i--;)if(r[i].name===e)return r=r.splice(i,1),n;return n}if(e in r.map){for(i=r.length;i--;)if(r[i].name===e){r[i].value=t;break}}else r.push({name:e,value:t});return r.map[e]=t,n}return r.map[e]}},clone:function(){var e=this,n=new t(e.name,e.type),r,i,o,a,s;if(o=e.attributes){for(s=[],s.map={},r=0,i=o.length;i>r;r++)a=o[r],"id"!==a.name&&(s[s.length]={name:a.name,value:a.value},s.map[a.name]=a.value);n.attributes=s}return n.value=e.value,n.shortEnded=e.shortEnded,n},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e=this,t,n;for(t=e.firstChild;t;)n=t.next,e.insert(t,e,!0),t=n;e.remove()},remove:function(){var e=this,t=e.parent,n=e.next,r=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):r.next=n,t.lastChild===e?(t.lastChild=r,r&&(r.next=null)):n.prev=r,e.parent=e.next=e.prev=null),e},append:function(e){var t=this,n;return e.parent&&e.remove(),n=t.lastChild,n?(n.next=e,e.prev=n,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e},insert:function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},getAll:function(t){var n=this,r,i=[];for(r=n.firstChild;r;r=e(r,n))r.name===t&&i.push(r);return i},empty:function(){var t=this,n,r,i;if(t.firstChild){for(n=[],i=t.firstChild;i;i=e(i,t))n.push(i);for(r=n.length;r--;)i=n[r],i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}return t.firstChild=t.lastChild=null,t},isEmpty:function(t){var r=this,i=r.firstChild,o,a;if(i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(t[i.name])return!1;for(o=i.attributes.length;o--;)if(a=i.attributes[o].name,"name"===a||0===a.indexOf("data-mce-bookmark"))return!1}if(8===i.type)return!1;if(3===i.type&&!n.test(i.value))return!1}while(i=e(i,r));return!0},walk:function(t){return e(this,null,t)}},t.create=function(e,n){var i,o;if(i=new t(e,r[e]||1),n)for(o in n)i.attr(o,n[o]);return i},t}),r(B,[m],function(e){function t(e,t){return e?e.split(t||" "):[]}function n(e){function n(e,n,r){function i(e,t){var n={},r,i;for(r=0,i=e.length;i>r;r++)n[e[r]]=t||{};return n}var s,c,u,d=arguments;for(r=r||[],n=n||"","string"==typeof r&&(r=t(r)),c=3;c<d.length;c++)"string"==typeof d[c]&&(d[c]=t(d[c])),r.push.apply(r,d[c]);for(e=t(e),s=e.length;s--;)u=[].concat(l,t(n)),a[e[s]]={attributes:i(u),attributesOrder:u,children:i(r,o)}}function r(e,n){var r,i,o,s;for(e=t(e),r=e.length,n=t(n);r--;)for(i=a[e[r]],o=0,s=n.length;s>o;o++)i.attributes[n[o]]={},i.attributesOrder.push(n[o])}var a={},l,c,u,d,f,h;return i[e]?i[e]:(l=t("id accesskey class dir lang style tabindex title"),c=t("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"),u=t("a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment"),"html4"!=e&&(l.push.apply(l,t("contenteditable contextmenu draggable dropzone hidden spellcheck translate")),c.push.apply(c,t("article aside details dialog figure header footer hgroup section nav")),u.push.apply(u,t("audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"))),"html5-strict"!=e&&(l.push("xml:lang"),h=t("acronym applet basefont big font strike tt"),u.push.apply(u,h),s(h,function(e){n(e,"",u)}),f=t("center dir isindex noframes"),c.push.apply(c,f),d=[].concat(c,u),s(f,function(e){n(e,"",d)})),d=d||[].concat(c,u),n("html","manifest","head body"),n("head","","base command link meta noscript script style title"),n("title hr noscript br"),n("base","href target"),n("link","href rel media hreflang type sizes hreflang"),n("meta","name http-equiv content charset"),n("style","media type scoped"),n("script","src async defer type charset"),n("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",d),n("address dt dd div caption","",d),n("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",u),n("blockquote","cite",d),n("ol","reversed start type","li"),n("ul","","li"),n("li","value",d),n("dl","","dt dd"),n("a","href target rel media hreflang type",u),n("q","cite",u),n("ins del","cite datetime",d),n("img","src sizes srcset alt usemap ismap width height"),n("iframe","src name width height",d),n("embed","src type width height"),n("object","data type typemustmatch name usemap form width height",d,"param"),n("param","name value"),n("map","name",d,"area"),n("area","alt coords shape href target rel media hreflang type"),n("table","border","caption colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),n("colgroup","span","col"),n("col","span"),n("tbody thead tfoot","","tr"),n("tr","","td th"),n("td","colspan rowspan headers",d),n("th","colspan rowspan headers scope abbr",d),n("form","accept-charset action autocomplete enctype method name novalidate target",d),n("fieldset","disabled form name",d,"legend"),n("label","form for",u),n("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),n("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==e?d:u),n("select","disabled form multiple name required size","option optgroup"),n("optgroup","disabled label","option"),n("option","disabled label selected value"),n("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),n("menu","type label",d,"li"),n("noscript","",d),"html4"!=e&&(n("wbr"),n("ruby","",u,"rt rp"),n("figcaption","",d),n("mark rt rp summary bdi","",u),n("canvas","width height",d),n("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",d,"track source"),n("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",d,"track source"),n("picture","","img source"),n("source","src srcset type media sizes"),n("track","kind src srclang label default"),n("datalist","",u,"option"),n("article section nav aside header footer","",d),n("hgroup","","h1 h2 h3 h4 h5 h6"),n("figure","",d,"figcaption"),n("time","datetime",u),n("dialog","open",d),n("command","type label icon disabled checked radiogroup command"),n("output","for form name",u),n("progress","value max",u),n("meter","value min max low high optimum",u),n("details","open",d,"summary"),n("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(r("script","language xml:space"),r("style","xml:space"),r("object","declare classid code codebase codetype archive standby align border hspace vspace"),r("embed","align name hspace vspace"),r("param","valuetype type"),r("a","charset name rev shape coords"),r("br","clear"),r("applet","codebase archive code object alt name width height align hspace vspace"),r("img","name longdesc align border hspace vspace"),r("iframe","longdesc frameborder marginwidth marginheight scrolling align"),r("font basefont","size color face"),r("input","usemap align"),r("select","onchange"),r("textarea"),r("h1 h2 h3 h4 h5 h6 div p legend caption","align"),r("ul","type compact"),r("li","type"),r("ol dl menu dir","compact"),r("pre","width xml:space"),r("hr","align noshade size width"),r("isindex","prompt"),r("table","summary width frame rules cellspacing cellpadding align bgcolor"),r("col","width align char charoff valign"),r("colgroup","width align char charoff valign"),r("thead","align char charoff valign"),r("tr","align char charoff valign bgcolor"),r("th","axis align char charoff valign nowrap bgcolor width height"),r("form","accept"),r("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),r("tfoot","align char charoff valign"),r("tbody","align char charoff valign"),r("area","nohref"),r("body","background bgcolor text link vlink alink")),"html4"!=e&&(r("input button select textarea","autofocus"),r("input textarea","placeholder"),r("a","download"),r("link script img","crossorigin"),r("iframe","sandbox seamless allowfullscreen")),s(t("a form meter progress dfn"),function(e){a[e]&&delete a[e].children[e]}),delete a.caption.children.table,delete a.script,i[e]=a,a)}function r(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),s(e,function(e,r){n[r]=n[r.toUpperCase()]="map"==t?a(e,/[, ]/):c(e,/[, ]/)})),n}var i={},o={},a=e.makeMap,s=e.each,l=e.extend,c=e.explode,u=e.inArray;return function(e){function o(t,n,r){var o=e[t];return o?o=a(o,/[, ]/,a(o.toUpperCase(),/[, ]/)):(o=i[t],o||(o=a(n," ",a(n.toUpperCase()," ")),o=l(o,r),i[t]=o)),o}function d(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function f(e){var n,r,i,o,s,l,c,f,h,p,m,g,v,b,x,w,E,N,_,S=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,k=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,T=/[*?+]/;if(e)for(e=t(e,","),y["@"]&&(w=y["@"].attributes,E=y["@"].attributesOrder),n=0,r=e.length;r>n;n++)if(s=S.exec(e[n])){if(b=s[1],h=s[2],x=s[3],f=s[5],g={},v=[],l={attributes:g,attributesOrder:v},"#"===b&&(l.paddEmpty=!0),"-"===b&&(l.removeEmpty=!0),"!"===s[4]&&(l.removeEmptyAttrs=!0),w){for(N in w)g[N]=w[N];v.push.apply(v,E)}if(f)for(f=t(f,"|"),i=0,o=f.length;o>i;i++)if(s=k.exec(f[i])){if(c={},m=s[1],p=s[2].replace(/::/g,":"),b=s[3],_=s[4],"!"===m&&(l.attributesRequired=l.attributesRequired||[],l.attributesRequired.push(p),c.required=!0),"-"===m){delete g[p],v.splice(u(v,p),1);continue}b&&("="===b&&(l.attributesDefault=l.attributesDefault||[],l.attributesDefault.push({name:p,value:_}),c.defaultValue=_),":"===b&&(l.attributesForced=l.attributesForced||[],l.attributesForced.push({name:p,value:_}),c.forcedValue=_),"<"===b&&(c.validValues=a(_,"?"))),T.test(p)?(l.attributePatterns=l.attributePatterns||[],c.pattern=d(p),l.attributePatterns.push(c)):(g[p]||v.push(p),g[p]=c)}w||"@"!=h||(w=g,E=v),x&&(l.outputName=h,y[x]=l),T.test(h)?(l.pattern=d(h),C.push(l)):y[h]=l}}function h(e){y={},C=[],f(e),s(E,function(e,t){b[t]=e.children})}function p(e){var n=/^(~)?(.+)$/;e&&(i.text_block_elements=i.block_elements=null,s(t(e,","),function(e){var t=n.exec(e),r="~"===t[1],i=r?"span":"div",o=t[2];if(b[o]=b[i],L[o]=i,r||(R[o.toUpperCase()]={},R[o]={}),!y[o]){var a=y[i];
-a=l({},a),delete a.removeEmptyAttrs,delete a.removeEmpty,y[o]=a}s(b,function(e,t){e[i]&&(b[t]=e=l({},b[t]),e[o]=e[i])})}))}function m(n){var r=/^([+\-]?)(\w+)\[([^\]]+)\]$/;i[e.schema]=null,n&&s(t(n,","),function(e){var n=r.exec(e),i,o;n&&(o=n[1],i=o?b[n[2]]:b[n[2]]={"#comment":{}},i=b[n[2]],s(t(n[3],"|"),function(e){"-"===o?delete i[e]:i[e]={}}))})}function g(e){var t=y[e],n;if(t)return t;for(n=C.length;n--;)if(t=C[n],t.pattern.test(e))return t}var v=this,y={},b={},C=[],x,w,E,N,_,S,k,T,R,A,B,D,M,L={},P={};e=e||{},E=n(e.schema),e.verify_html===!1&&(e.valid_elements="*[*]"),x=r(e.valid_styles),w=r(e.invalid_styles,"map"),T=r(e.valid_classes,"map"),N=o("whitespace_elements","pre script noscript style textarea video audio iframe object"),_=o("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),S=o("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),k=o("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),A=o("non_empty_elements","td th iframe video audio object script",S),B=o("move_caret_before_on_enter_elements","table",A),D=o("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),R=o("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption",D),M=o("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),s((e.special||"script noscript style textarea").split(" "),function(e){P[e]=new RegExp("</"+e+"[^>]*>","gi")}),e.valid_elements?h(e.valid_elements):(s(E,function(e,t){y[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},b[t]=e.children}),"html5"!=e.schema&&s(t("strong/b em/i"),function(e){e=t(e,"/"),y[e[1]].outputName=e[0]}),s(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){y[e]&&(y[e].removeEmpty=!0)}),s(t("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){y[e].paddEmpty=!0}),s(t("span"),function(e){y[e].removeEmptyAttrs=!0})),p(e.custom_elements),m(e.valid_children),f(e.extended_valid_elements),m("+ol[ul|ol],+ul[ul|ol]"),e.invalid_elements&&s(c(e.invalid_elements),function(e){y[e]&&delete y[e]}),g("span")||f("span[!data-mce-type|*]"),v.children=b,v.getValidStyles=function(){return x},v.getInvalidStyles=function(){return w},v.getValidClasses=function(){return T},v.getBoolAttrs=function(){return k},v.getBlockElements=function(){return R},v.getTextBlockElements=function(){return D},v.getTextInlineElements=function(){return M},v.getShortEndedElements=function(){return S},v.getSelfClosingElements=function(){return _},v.getNonEmptyElements=function(){return A},v.getMoveCaretBeforeOnEnterElements=function(){return B},v.getWhiteSpaceElements=function(){return N},v.getSpecialElements=function(){return P},v.isValidChild=function(e,t){var n=b[e];return!(!n||!n[t])},v.isValid=function(e,t){var n,r,i=g(e);if(i){if(!t)return!0;if(i.attributes[t])return!0;if(n=i.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},v.getElementRule=g,v.getCustomElements=function(){return L},v.addValidElements=f,v.setValidElements=h,v.addCustomElements=p,v.addValidChildren=m,v.elements=y}}),r(D,[B,C,m],function(e,t,n){function r(e,t,n){var r=1,i,o,a,s;for(s=e.getShortEndedElements(),a=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g,a.lastIndex=i=n;o=a.exec(t);){if(i=a.lastIndex,"/"===o[1])r--;else if(!o[1]){if(o[2]in s)continue;r++}if(0===r)break}return i}function i(i,a){function s(){}var l=this;i=i||{},l.schema=a=a||new e,i.fix_self_closing!==!1&&(i.fix_self_closing=!0),o("comment cdata text start end pi doctype".split(" "),function(e){e&&(l[e]=i[e]||s)}),l.parse=function(e){function o(e){var t,n;for(t=h.length;t--&&h[t].name!==e;);if(t>=0){for(n=h.length-1;n>=t;n--)e=h[n],e.valid&&l.end(e.name);h.length=t}}function s(e,t,n,r,o){var a,s,l=/[\s\u0000-\u001F]+/g;if(t=t.toLowerCase(),n=t in x?t:z(n||r||o||""),E&&!y&&0!==t.indexOf("data-")){if(a=T[t],!a&&R){for(s=R.length;s--&&(a=R[s],!a.pattern.test(t)););-1===s&&(a=null)}if(!a)return;if(a.validValues&&!(n in a.validValues))return}if(V[t]&&!i.allow_script_urls){var c=n.replace(l,"");try{c=decodeURIComponent(c)}catch(u){c=unescape(c)}if(U.test(c))return;if(!i.allow_html_data_urls&&$.test(c)&&!/^data:image\//i.test(c))return}p.map[t]=n,p.push({name:t,value:n})}var l=this,c,u=0,d,f,h=[],p,m,g,v,y,b,C,x,w,E,N,_,S,k,T,R,A,B,D,M,L,P,H,O,I,F=0,z=t.decode,W,V=n.makeMap("src,href,data,background,formaction,poster"),U=/((java|vb)script|mhtml):/i,$=/^data:/i;for(P=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-_\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),H=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,C=a.getShortEndedElements(),L=i.self_closing_elements||a.getSelfClosingElements(),x=a.getBoolAttrs(),E=i.validate,b=i.remove_internals,W=i.fix_self_closing,O=a.getSpecialElements();c=P.exec(e);){if(u<c.index&&l.text(z(e.substr(u,c.index-u))),d=c[6])d=d.toLowerCase(),":"===d.charAt(0)&&(d=d.substr(1)),o(d);else if(d=c[7]){if(d=d.toLowerCase(),":"===d.charAt(0)&&(d=d.substr(1)),w=d in C,W&&L[d]&&h.length>0&&h[h.length-1].name===d&&o(d),!E||(N=a.getElementRule(d))){if(_=!0,E&&(T=N.attributes,R=N.attributePatterns),(k=c[8])?(y=-1!==k.indexOf("data-mce-type"),y&&b&&(_=!1),p=[],p.map={},k.replace(H,s)):(p=[],p.map={}),E&&!y){if(A=N.attributesRequired,B=N.attributesDefault,D=N.attributesForced,M=N.removeEmptyAttrs,M&&!p.length&&(_=!1),D)for(m=D.length;m--;)S=D[m],v=S.name,I=S.value,"{$uid}"===I&&(I="mce_"+F++),p.map[v]=I,p.push({name:v,value:I});if(B)for(m=B.length;m--;)S=B[m],v=S.name,v in p.map||(I=S.value,"{$uid}"===I&&(I="mce_"+F++),p.map[v]=I,p.push({name:v,value:I}));if(A){for(m=A.length;m--&&!(A[m]in p.map););-1===m&&(_=!1)}if(S=p.map["data-mce-bogus"]){if("all"===S){u=r(a,e,P.lastIndex),P.lastIndex=u;continue}_=!1}}_&&l.start(d,p,w)}else _=!1;if(f=O[d]){f.lastIndex=u=c.index+c[0].length,(c=f.exec(e))?(_&&(g=e.substr(u,c.index-u)),u=c.index+c[0].length):(g=e.substr(u),u=e.length),_&&(g.length>0&&l.text(g,!0),l.end(d)),P.lastIndex=u;continue}w||(k&&k.indexOf("/")==k.length-1?_&&l.end(d):h.push({name:d,valid:_}))}else(d=c[1])?(">"===d.charAt(0)&&(d=" "+d),i.allow_conditional_comments||"[if"!==d.substr(0,3)||(d=" "+d),l.comment(d)):(d=c[2])?l.cdata(d):(d=c[3])?l.doctype(d):(d=c[4])&&l.pi(d,c[5]);u=c.index+c[0].length}for(u<e.length&&l.text(z(e.substr(u))),m=h.length-1;m>=0;m--)d=h[m],d.valid&&l.end(d.name)}}var o=n.each;return i.findEndTag=r,i}),r(M,[A,B,D,m],function(e,t,n,r){var i=r.makeMap,o=r.each,a=r.explode,s=r.extend;return function(r,l){function c(t){var n,r,o,a,s,c,d,f,h,p,m,g,v,y,b;for(m=i("tr,td,th,tbody,thead,tfoot,table"),p=l.getNonEmptyElements(),g=l.getTextBlockElements(),v=l.getSpecialElements(),n=0;n<t.length;n++)if(r=t[n],r.parent&&!r.fixed)if(g[r.name]&&"li"==r.parent.name){for(y=r.next;y&&g[y.name];)y.name="li",y.fixed=!0,r.parent.insert(y,r.parent),y=y.next;r.unwrap(r)}else{for(a=[r],o=r.parent;o&&!l.isValidChild(o.name,r.name)&&!m[o.name];o=o.parent)a.push(o);if(o&&a.length>1){for(a.reverse(),s=c=u.filterNode(a[0].clone()),h=0;h<a.length-1;h++){for(l.isValidChild(c.name,a[h].name)?(d=u.filterNode(a[h].clone()),c.append(d)):d=c,f=a[h].firstChild;f&&f!=a[h+1];)b=f.next,d.append(f),f=b;c=d}s.isEmpty(p)?o.insert(r,a[0],!0):(o.insert(s,a[0],!0),o.insert(r,s)),o=a[0],(o.isEmpty(p)||o.firstChild===o.lastChild&&"br"===o.firstChild.name)&&o.empty().remove()}else if(r.parent){if("li"===r.name){if(y=r.prev,y&&("ul"===y.name||"ul"===y.name)){y.append(r);continue}if(y=r.next,y&&("ul"===y.name||"ul"===y.name)){y.insert(r,y.firstChild,!0);continue}r.wrap(u.filterNode(new e("ul",1)));continue}l.isValidChild(r.parent.name,"div")&&l.isValidChild("div",r.name)?r.wrap(u.filterNode(new e("div",1))):v[r.name]?r.empty().remove():r.unwrap()}}}var u=this,d={},f=[],h={},p={};r=r||{},r.validate="validate"in r?r.validate:!0,r.root_name=r.root_name||"body",u.schema=l=l||new t,u.filterNode=function(e){var t,n,r;n in d&&(r=h[n],r?r.push(e):h[n]=[e]),t=f.length;for(;t--;)n=f[t].name,n in e.attributes.map&&(r=p[n],r?r.push(e):p[n]=[e]);return e},u.addNodeFilter=function(e,t){o(a(e),function(e){var n=d[e];n||(d[e]=n=[]),n.push(t)})},u.addAttributeFilter=function(e,t){o(a(e),function(e){var n;for(n=0;n<f.length;n++)if(f[n].name===e)return void f[n].callbacks.push(t);f.push({name:e,callbacks:[t]})})},u.parse=function(t,o){function a(){function e(e){e&&(t=e.firstChild,t&&3==t.type&&(t.value=t.value.replace(R,"")),t=e.lastChild,t&&3==t.type&&(t.value=t.value.replace(D,"")))}var t=y.firstChild,n,i;if(l.isValidChild(y.name,I.toLowerCase())){for(;t;)n=t.next,3==t.type||1==t.type&&"p"!==t.name&&!T[t.name]&&!t.attr("data-mce-type")?i?i.append(t):(i=u(I,1),i.attr(r.forced_root_block_attrs),y.insert(i,t),i.append(t)):(e(i),i=null),t=n;e(i)}}function u(t,n){var r=new e(t,n),i;return t in d&&(i=h[t],i?i.push(r):h[t]=[r]),r}function m(e){var t,n,r,i,o=l.getBlockElements();for(t=e.prev;t&&3===t.type;){if(r=t.value.replace(D,""),r.length>0)return void(t.value=r);if(n=t.next){if(3==n.type&&n.value.length){t=t.prev;continue}if(!o[n.name]&&"script"!=n.name&&"style"!=n.name){t=t.prev;continue}}i=t.prev,t.remove(),t=i}}function g(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}var v,y,b,C,x,w,E,N,_,S,k,T,R,A=[],B,D,M,L,P,H,O,I;if(o=o||{},h={},p={},T=s(i("script,style,head,html,body,title,meta,param"),l.getBlockElements()),O=l.getNonEmptyElements(),H=l.children,k=r.validate,I="forced_root_block"in o?o.forced_root_block:r.forced_root_block,P=l.getWhiteSpaceElements(),R=/^[ \t\r\n]+/,D=/[ \t\r\n]+$/,M=/[ \t\r\n]+/g,L=/^[ \t\r\n]+$/,v=new n({validate:k,allow_script_urls:r.allow_script_urls,allow_conditional_comments:r.allow_conditional_comments,self_closing_elements:g(l.getSelfClosingElements()),cdata:function(e){b.append(u("#cdata",4)).value=e},text:function(e,t){var n;B||(e=e.replace(M," "),b.lastChild&&T[b.lastChild.name]&&(e=e.replace(R,""))),0!==e.length&&(n=u("#text",3),n.raw=!!t,b.append(n).value=e)},comment:function(e){b.append(u("#comment",8)).value=e},pi:function(e,t){b.append(u(e,7)).value=t,m(b)},doctype:function(e){var t;t=b.append(u("#doctype",10)),t.value=e,m(b)},start:function(e,t,n){var r,i,o,a,s;if(o=k?l.getElementRule(e):{}){for(r=u(o.outputName||e,1),r.attributes=t,r.shortEnded=n,b.append(r),s=H[b.name],s&&H[r.name]&&!s[r.name]&&A.push(r),i=f.length;i--;)a=f[i].name,a in t.map&&(_=p[a],_?_.push(r):p[a]=[r]);T[e]&&m(r),n||(b=r),!B&&P[e]&&(B=!0)}},end:function(t){var n,r,i,o,a;if(r=k?l.getElementRule(t):{}){if(T[t]&&!B){if(n=b.firstChild,n&&3===n.type)if(i=n.value.replace(R,""),i.length>0)n.value=i,n=n.next;else for(o=n.next,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.next,(0===i.length||L.test(i))&&(n.remove(),n=o),n=o;if(n=b.lastChild,n&&3===n.type)if(i=n.value.replace(D,""),i.length>0)n.value=i,n=n.prev;else for(o=n.prev,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.prev,(0===i.length||L.test(i))&&(n.remove(),n=o),n=o}if(B&&P[t]&&(B=!1),(r.removeEmpty||r.paddEmpty)&&b.isEmpty(O))if(r.paddEmpty)b.empty().append(new e("#text","3")).value="\xa0";else if(!b.attributes.map.name&&!b.attributes.map.id)return a=b.parent,T[b.name]?b.empty().remove():b.unwrap(),void(b=a);b=b.parent}}},l),y=b=new e(o.context||r.root_name,11),v.parse(t),k&&A.length&&(o.context?o.invalid=!0:c(A)),I&&("body"==y.name||o.isRootContent)&&a(),!o.invalid){for(S in h){for(_=d[S],C=h[S],E=C.length;E--;)C[E].parent||C.splice(E,1);for(x=0,w=_.length;w>x;x++)_[x](C,S,o)}for(x=0,w=f.length;w>x;x++)if(_=f[x],_.name in p){for(C=p[_.name],E=C.length;E--;)C[E].parent||C.splice(E,1);for(E=0,N=_.callbacks.length;N>E;E++)_.callbacks[E](C,_.name,o)}}return y},r.remove_trailing_brs&&u.addNodeFilter("br",function(t){var n,r=t.length,i,o=s({},l.getBlockElements()),a=l.getNonEmptyElements(),c,u,d,f,h,p;for(o.body=1,n=0;r>n;n++)if(i=t[n],c=i.parent,o[i.parent.name]&&i===c.lastChild){for(d=i.prev;d;){if(f=d.name,"span"!==f||"bookmark"!==d.attr("data-mce-type")){if("br"!==f)break;if("br"===f){i=null;break}}d=d.prev}i&&(i.remove(),c.isEmpty(a)&&(h=l.getElementRule(c.name),h&&(h.removeEmpty?c.remove():h.paddEmpty&&(c.empty().append(new e("#text",3)).value="\xa0"))))}else{for(u=i;c&&c.firstChild===u&&c.lastChild===u&&(u=c,!o[c.name]);)c=c.parent;u===c&&(p=new e("#text",3),p.value="\xa0",i.replace(p))}}),r.allow_html_in_named_anchor||u.addAttributeFilter("id,name",function(e){for(var t=e.length,n,r,i,o;t--;)if(o=e[t],"a"===o.name&&o.firstChild&&!o.attr("href")){i=o.parent,n=o.lastChild;do r=n.prev,i.insert(n,o),n=r;while(n)}}),r.validate&&l.getValidClasses()&&u.addAttributeFilter("class",function(e){for(var t=e.length,n,r,i,o,a,s=l.getValidClasses(),c,u;t--;){for(n=e[t],r=n.attr("class").split(" "),a="",i=0;i<r.length;i++)o=r[i],u=!1,c=s["*"],c&&c[o]&&(u=!0),c=s[n.name],!u&&c&&c[o]&&(u=!0),u&&(a&&(a+=" "),a+=o);a.length||(a=null),n.attr("class",a)}})}}),r(L,[C,m],function(e,t){var n=t.makeMap;return function(t){var r=[],i,o,a,s,l;return t=t||{},i=t.indent,o=n(t.indent_before||""),a=n(t.indent_after||""),s=e.getEncodeFunc(t.entity_encoding||"raw",t.entities),l="html"==t.element_format,{start:function(e,t,n){var c,u,d,f;if(i&&o[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n")),r.push("<",e),t)for(c=0,u=t.length;u>c;c++)d=t[c],r.push(" ",d.name,'="',s(d.value,!0),'"');!n||l?r[r.length]=">":r[r.length]=" />",n&&i&&a[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n"))},end:function(e){var t;r.push("</",e,">"),i&&a[e]&&r.length>0&&(t=r[r.length-1],t.length>0&&"\n"!==t&&r.push("\n"))},text:function(e,t){e.length>0&&(r[r.length]=t?e:s(e))},cdata:function(e){r.push("<![CDATA[",e,"]]>")},comment:function(e){r.push("<!--",e,"-->")},pi:function(e,t){t?r.push("<?",e," ",s(t),"?>"):r.push("<?",e,"?>"),i&&r.push("\n")},doctype:function(e){r.push("<!DOCTYPE",e,">",i?"\n":"")},reset:function(){r.length=0},getContent:function(){return r.join("").replace(/\n$/,"")}}}}),r(P,[L,B],function(e,t){return function(n,r){var i=this,o=new e(n);n=n||{},n.validate="validate"in n?n.validate:!0,i.schema=r=r||new t,i.writer=o,i.serialize=function(e){function t(e){var n=i[e.type],s,l,c,u,d,f,h,p,m;if(n)n(e);else{if(s=e.name,l=e.shortEnded,c=e.attributes,a&&c&&c.length>1&&(f=[],f.map={},m=r.getElementRule(e.name))){for(h=0,p=m.attributesOrder.length;p>h;h++)u=m.attributesOrder[h],u in c.map&&(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));for(h=0,p=c.length;p>h;h++)u=c[h].name,u in f.map||(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));c=f}if(o.start(e.name,c,l),!l){if(e=e.firstChild)do t(e);while(e=e.next);o.end(s)}}}var i,a;return a=n.validate,i={3:function(e){o.text(e.value,e.raw)},8:function(e){o.comment(e.value)},7:function(e){o.pi(e.name,e.value)},10:function(e){o.doctype(e.value)},4:function(e){o.cdata(e.value)},11:function(e){if(e=e.firstChild)do t(e);while(e=e.next)}},o.reset(),1!=e.type||n.inner?i[11](e):t(e),o.getContent()}}}),r(H,[w,M,D,C,P,A,B,h,m,S],function(e,t,n,r,i,o,a,s,l,c){function u(e){function t(e){return e&&"br"===e.name}var n,r;n=e.lastChild,t(n)&&(r=n.prev,t(r)&&(n.remove(),r.remove()))}var d=l.each,f=l.trim,h=e.DOM,p=["data-mce-selected"];return function(e,o){function m(e){var t=new RegExp(["<span[^>]+data-mce-bogus[^>]+>[\u200b\ufeff]+<\\/span>","\\s?("+p.join("|")+')="[^"]+"'].join("|"),"gi");return e=c.trim(e.replace(t,""))}function g(){var e=o.getBody().innerHTML,t=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,r,i,a,s,l,c=o.schema;for(e=m(e),l=c.getShortEndedElements();s=t.exec(e);)i=t.lastIndex,a=s[0].length,r=l[s[1]]?i:n.findEndTag(c,e,i),e=e.substring(0,i-a)+e.substring(r),t.lastIndex=i-a;return f(e)}function v(e){-1===l.inArray(p,e)&&(C.addAttributeFilter(e,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),p.push(e))}var y,b,C;return o&&(y=o.dom,b=o.schema),y=y||h,b=b||new a(e),e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs="remove_trailing_brs"in e?e.remove_trailing_brs:!0,C=new t(e,b),C.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n=e.length,r;n--;)r=e[n],r.attr("tabindex",r.attributes.map["data-mce-tabindex"]),r.attr(t,null)}),C.addAttributeFilter("src,href,style",function(t,n){for(var r=t.length,i,o,a="data-mce-"+n,s=e.url_converter,l=e.url_converter_scope,c;r--;)i=t[r],o=i.attributes.map[a],o!==c?(i.attr(n,o.length>0?o:null),i.attr(a,null)):(o=i.attributes.map[n],"style"===n?o=y.serializeStyle(y.parseStyle(o),i.name):s&&(o=s.call(l,o,n,i.name)),i.attr(n,o.length>0?o:null))}),C.addAttributeFilter("class",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("class"),r&&(r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null))}),C.addAttributeFilter("data-mce-type",function(e,t,n){for(var r=e.length,i;r--;)i=e[r],"bookmark"!==i.attributes.map["data-mce-type"]||n.cleanup||i.remove()}),C.addNodeFilter("noscript",function(e){for(var t=e.length,n;t--;)n=e[t].firstChild,n&&(n.value=r.decode(n.value))}),C.addNodeFilter("script,style",function(e,t){function n(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var r=e.length,i,o,a;r--;)i=e[r],o=i.firstChild?i.firstChild.value:"","script"===t?(a=i.attr("type"),a&&i.attr("type","mce-no/type"==a?null:a.replace(/^mce\-/,"")),o.length>0&&(i.firstChild.value="// <![CDATA[\n"+n(o)+"\n// ]]>")):o.length>0&&(i.firstChild.value="<!--\n"+n(o)+"\n-->")}),C.addNodeFilter("#comment",function(e){for(var t=e.length,n;t--;)n=e[t],0===n.value.indexOf("[CDATA[")?(n.name="#cdata",n.type=4,n.value=n.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===n.value.indexOf("mce:protected ")&&(n.name="#text",n.type=3,n.raw=!0,n.value=unescape(n.value).substr(14))}),C.addNodeFilter("xml:namespace,input",function(e,t){for(var n=e.length,r;n--;)r=e[n],7===r.type?r.remove():1===r.type&&("input"!==t||"type"in r.attributes.map||r.attr("type","text"))}),e.fix_list_elements&&C.addNodeFilter("ul,ol",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.parent,"ul"!==r.name&&"ol"!==r.name||n.prev&&"li"===n.prev.name&&n.prev.append(n)}),C.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:b,addNodeFilter:C.addNodeFilter,addAttributeFilter:C.addAttributeFilter,serialize:function(t,n){var r=this,o,a,l,h,p,m;return s.ie&&y.select("script,style,select,map").length>0?(p=t.innerHTML,t=t.cloneNode(!1),y.setHTML(t,p)):t=t.cloneNode(!0),o=t.ownerDocument.implementation,o.createHTMLDocument&&(a=o.createHTMLDocument(""),d("BODY"==t.nodeName?t.childNodes:[t],function(e){a.body.appendChild(a.importNode(e,!0))}),t="BODY"!=t.nodeName?a.body.firstChild:a.body,l=y.doc,y.doc=a),n=n||{},n.format=n.format||"html",n.selection&&(n.forced_root_block=""),n.no_events||(n.node=t,r.onPreProcess(n)),m=C.parse(f(n.getInner?t.innerHTML:y.getOuterHTML(t)),n),u(m),h=new i(e,b),n.content=h.serialize(m),n.cleanup||(n.content=c.trim(n.content),n.content=n.content.replace(/\uFEFF/g,"")),n.no_events||r.onPostProcess(n),l&&(y.doc=l),n.node=null,n.content},addRules:function(e){b.addValidElements(e)},setRules:function(e){b.setValidElements(e)},onPreProcess:function(e){o&&o.fire("PreProcess",e)},onPostProcess:function(e){o&&o.fire("PostProcess",e)},addTempAttr:v,trimHtml:m,getTrimmedContent:g}}}),r(O,[],function(){function e(e){function t(t,n){var r,i=0,o,a,s,l,c,u,d=-1,f;if(r=t.duplicate(),r.collapse(n),f=r.parentElement(),f.ownerDocument===e.dom.doc){for(;"false"===f.contentEditable;)f=f.parentNode;if(!f.hasChildNodes())return{node:f,inside:1};for(s=f.children,o=s.length-1;o>=i;)if(u=Math.floor((i+o)/2),l=s[u],r.moveToElementText(l),d=r.compareEndPoints(n?"StartToStart":"EndToEnd",t),d>0)o=u-1;else{if(!(0>d))return{node:l};i=u+1}if(0>d)for(l?r.collapse(!1):(r.moveToElementText(f),r.collapse(!0),l=f,a=!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",1)&&f==r.parentElement();)c++;else for(r.collapse(!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",-1)&&f==r.parentElement();)c++;return{node:l,position:d,offset:c,inside:a}}}function n(){function n(e){var n=t(o,e),r,i,s=0,l,c,u;if(r=n.node,i=n.offset,n.inside&&!r.hasChildNodes())return void a[e?"setStart":"setEnd"](r,0);if(i===c)return void a[e?"setStartBefore":"setEndAfter"](r);if(n.position<0){if(l=n.inside?r.firstChild:r.nextSibling,!l)return void a[e?"setStartAfter":"setEndAfter"](r);if(!i)return void(3==l.nodeType?a[e?"setStart":"setEnd"](l,0):a[e?"setStartBefore":"setEndBefore"](l));for(;l;){if(3==l.nodeType&&(u=l.nodeValue,s+=u.length,s>=i)){r=l,s-=i,s=u.length-s;break}l=l.nextSibling}}else{if(l=r.previousSibling,!l)return a[e?"setStartBefore":"setEndBefore"](r);if(!i)return void(3==r.nodeType?a[e?"setStart":"setEnd"](l,r.nodeValue.length):a[e?"setStartAfter":"setEndAfter"](l));for(;l;){if(3==l.nodeType&&(s+=l.nodeValue.length,s>=i)){r=l,s-=i;break}l=l.previousSibling}}a[e?"setStart":"setEnd"](r,s)}var o=e.getRng(),a=i.createRng(),s,l,c,u,d;if(s=o.item?o.item(0):o.parentElement(),s.ownerDocument!=i.doc)return a;if(l=e.isCollapsed(),o.item)return a.setStart(s.parentNode,i.nodeIndex(s)),a.setEnd(a.startContainer,a.startOffset+1),a;try{n(!0),l||n()}catch(f){if(-2147024809!=f.number)throw f;d=r.getBookmark(2),c=o.duplicate(),c.collapse(!0),s=c.parentElement(),l||(c=o.duplicate(),c.collapse(!1),u=c.parentElement(),u.innerHTML=u.innerHTML),s.innerHTML=s.innerHTML,r.moveToBookmark(d),o=e.getRng(),n(!0),l||n()}return a}var r=this,i=e.dom,o=!1;this.getBookmark=function(n){function r(e){var t,n,r,o,a=[];for(t=e.parentNode,n=i.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(r=t.children,o=r.length;o--;)if(e===r[o]){a.push(o);break}e=t,t=t.parentNode}return a}function o(e){var n;return n=t(a,e),n?{position:n.position,offset:n.offset,indexes:r(n.node),inside:n.inside}:void 0}var a=e.getRng(),s={};return 2===n&&(a.item?s.start={ctrl:!0,indexes:r(a.item(0))}:(s.start=o(!0),e.isCollapsed()||(s.end=o()))),s},this.moveToBookmark=function(e){function t(e){var t,n,r,o;for(t=i.getRoot(),n=e.length-1;n>=0;n--)o=t.children,r=e[n],r<=o.length-1&&(t=o[r]);return t}function n(n){var i=e[n?"start":"end"],a,s,l,c;i&&(a=i.position>0,s=o.createTextRange(),s.moveToElementText(t(i.indexes)),c=i.offset,c!==l?(s.collapse(i.inside||a),s.moveStart("character",a?-c:c)):s.collapse(n),r.setEndPoint(n?"StartToStart":"EndToStart",s),n&&r.collapse(!0))}var r,o=i.doc.body;e.start&&(e.start.ctrl?(r=o.createControlRange(),r.addElement(t(e.start.indexes)),r.select()):(r=o.createTextRange(),n(!0),n(),r.select()))},this.addRange=function(t){function n(e){var t,n,a,d,p;a=i.create("a"),t=e?s:c,n=e?l:u,d=r.duplicate(),t!=f&&t!=f.documentElement||(t=h,n=0),3==t.nodeType?(t.parentNode.insertBefore(a,t),d.moveToElementText(a),d.moveStart("character",n),i.remove(a),r.setEndPoint(e?"StartToStart":"EndToEnd",d)):(p=t.childNodes,p.length?(n>=p.length?i.insertAfter(a,p[p.length-1]):t.insertBefore(a,p[n]),d.moveToElementText(a)):t.canHaveHTML&&(t.innerHTML="<span>&#xFEFF;</span>",a=t.firstChild,d.moveToElementText(a),d.collapse(o)),r.setEndPoint(e?"StartToStart":"EndToEnd",d),i.remove(a))}var r,a,s,l,c,u,d,f=e.dom.doc,h=f.body,p,m;if(s=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset,r=h.createTextRange(),s==c&&1==s.nodeType){if(l==u&&!s.hasChildNodes()){if(s.canHaveHTML)return d=s.previousSibling,d&&!d.hasChildNodes()&&i.isBlock(d)?d.innerHTML="&#xFEFF;":d=null,s.innerHTML="<span>&#xFEFF;</span><span>&#xFEFF;</span>",r.moveToElementText(s.lastChild),r.select(),i.doc.selection.clear(),s.innerHTML="",void(d&&(d.innerHTML=""));l=i.nodeIndex(s),s=s.parentNode}if(l==u-1)try{if(m=s.childNodes[l],a=h.createControlRange(),a.addElement(m),a.select(),p=e.getRng(),p.item&&m===p.item(0))return}catch(g){}}n(!0),n(),r.select()},this.getRangeAt=n}return e}),r(I,[h],function(e){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(t){return e.mac?t.metaKey:t.ctrlKey&&!t.altKey}}}),r(F,[I,m,u,h,_],function(e,t,n,r,i){var o=i.isContentEditableFalse;return function(i,a){function s(e){var t=a.settings.object_resizing;return t===!1||r.iOS?!1:("string"!=typeof t&&(t="table,img,div"),"false"===e.getAttribute("data-mce-resize")?!1:e==a.getBody()?!1:a.dom.is(e,t))}function l(t){var n,r,i,o,s;n=t.screenX-B,r=t.screenY-D,F=n*R[2]+P,z=r*R[3]+H,F=5>F?5:F,z=5>z?5:z,i="IMG"==_.nodeName&&a.settings.resize_img_proportional!==!1?!e.modifierPressed(t):e.modifierPressed(t)||"IMG"==_.nodeName&&R[2]*R[3]!==0,i&&($(n)>$(r)?(z=q(F*O),F=q(z/O)):(F=q(z/O),z=q(F*O))),E.setStyles(S,{width:F,height:z}),o=R.startPos.x+n,s=R.startPos.y+r,o=o>0?o:0,s=s>0?s:0,E.setStyles(k,{left:o,top:s,display:"block"}),k.innerHTML=F+" &times; "+z,R[2]<0&&S.clientWidth<=F&&E.setStyle(S,"left",M+(P-F)),R[3]<0&&S.clientHeight<=z&&E.setStyle(S,"top",L+(H-z)),n=j.scrollWidth-Y,r=j.scrollHeight-X,n+r!==0&&E.setStyles(k,{left:o-n,top:s-r}),I||(a.fire("ObjectResizeStart",{target:_,width:P,height:H}),I=!0)}function c(){function e(e,t){t&&(_.style[e]||!a.schema.isValid(_.nodeName.toLowerCase(),e)?E.setStyle(_,e,t):E.setAttrib(_,e,t))}I=!1,e("width",F),e("height",z),E.unbind(W,"mousemove",l),E.unbind(W,"mouseup",c),V!=W&&(E.unbind(V,"mousemove",l),E.unbind(V,"mouseup",c)),E.remove(S),E.remove(k),U&&"TABLE"!=_.nodeName||u(_),a.fire("ObjectResized",{target:_,width:F,height:z}),E.setAttrib(_,"style",E.getAttrib(_,"style")),a.nodeChanged()}function u(e,t,n){var i,o,u,f,h;d(),b(),i=E.getPos(e,j),M=i.x,L=i.y,h=e.getBoundingClientRect(),o=h.width||h.right-h.left,u=h.height||h.bottom-h.top,_!=e&&(y(),_=e,F=z=0),f=a.fire("ObjectSelected",{target:e}),s(e)&&!f.isDefaultPrevented()?N(T,function(e,i){function a(t){B=t.screenX,D=t.screenY,P=_.clientWidth,H=_.clientHeight,O=H/P,R=e,e.startPos={x:o*e[0]+M,y:u*e[1]+L},Y=j.scrollWidth,X=j.scrollHeight,S=_.cloneNode(!0),E.addClass(S,"mce-clonedresizable"),E.setAttrib(S,"data-mce-bogus","all"),S.contentEditable=!1,S.unSelectabe=!0,E.setStyles(S,{left:M,top:L,margin:0}),S.removeAttribute("data-mce-selected"),j.appendChild(S),E.bind(W,"mousemove",l),E.bind(W,"mouseup",c),V!=W&&(E.bind(V,"mousemove",l),E.bind(V,"mouseup",c)),k=E.add(j,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},P+" &times; "+H)}var s;return t?void(i==t&&a(n)):(s=E.get("mceResizeHandle"+i),s&&E.remove(s),s=E.add(j,"div",{id:"mceResizeHandle"+i,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+i+"-resize; margin:0; padding:0"}),r.ie&&(s.contentEditable=!1),E.bind(s,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),a(e)}),e.elm=s,void E.setStyles(s,{left:o*e[0]+M-s.offsetWidth/2,top:u*e[1]+L-s.offsetHeight/2}))}):d(),_.setAttribute("data-mce-selected","1")}function d(){var e,t;b(),_&&_.removeAttribute("data-mce-selected");for(e in T)t=E.get("mceResizeHandle"+e),t&&(E.unbind(t),E.remove(t))}function f(e){function t(e,t){if(e)do if(e===t)return!0;while(e=e.parentNode)}var n,r;if(!I&&!a.removed)return N(E.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),r="mousedown"==e.type?e.target:i.getNode(),r=E.$(r).closest(U?"table":"table,img,hr")[0],t(r,j)&&(C(),n=i.getStart(!0),t(n,r)&&t(i.getEnd(!0),r)&&(!U||r!=n&&"IMG"!==n.nodeName))?void u(r):void d()}function h(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function p(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function m(e){var t=e.srcElement,n,r,i,o,s,l,c;n=t.getBoundingClientRect(),l=A.clientX-n.left,c=A.clientY-n.top;for(r in T)if(i=T[r],o=t.offsetWidth*i[0],s=t.offsetHeight*i[1],$(o-l)<8&&$(s-c)<8){R=i;break}I=!0,a.fire("ObjectResizeStart",{target:_,width:_.clientWidth,height:_.clientHeight}),a.getDoc().selection.empty(),u(t,r,A)}function g(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function v(e){var t=e.srcElement;if(o(t))return void g(e);if(t!=_){if(a.fire("ObjectSelected",{target:t}),y(),0===t.id.indexOf("mceResizeHandle"))return void(e.returnValue=!1);"IMG"!=t.nodeName&&"TABLE"!=t.nodeName||(d(),_=t,h(t,"resizestart",m))}}function y(){p(_,"resizestart",m)}function b(){for(var e in T){var t=T[e];t.elm&&(E.unbind(t.elm),delete t.elm)}}function C(){try{a.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}}function x(e){var t;if(U){t=W.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(n){}}}function w(){_=S=null,U&&(y(),p(j,"controlselect",v))}var E=a.dom,N=t.each,_,S,k,T,R,A,B,D,M,L,P,H,O,I,F,z,W=a.getDoc(),V=document,U=r.ie&&r.ie<11,$=Math.abs,q=Math.round,j=a.getBody(),Y,X;T={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var K=".mce-content-body";return a.contentStyles.push(K+" div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: box-sizing;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+K+" .mce-resizehandle:hover {background: #000}"+K+" img[data-mce-selected],"+K+" hr[data-mce-selected] {outline: 1px solid black;resize: none}"+K+" .mce-clonedresizable {position: absolute;"+(r.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+K+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}"),a.on("init",function(){U?(a.on("ObjectResized",function(e){"TABLE"!=e.target.nodeName&&(d(),x(e.target))}),h(j,"controlselect",v),a.on("mousedown",function(e){A=e})):(C(),r.ie>=11&&(a.on("mousedown click",function(e){var t=e.target.nodeName;!I&&/^(TABLE|IMG|HR)$/.test(t)&&(a.selection.select(e.target,"TABLE"==t),"mousedown"==e.type&&a.nodeChanged())}),a.dom.bind(j,"mscontrolselect",function(e){function t(e){n.setEditorTimeout(a,function(){a.selection.select(e)})}return o(e.target)?(e.preventDefault(),void t(e.target)):void(/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"==e.target.tagName&&t(e.target)))})));var e=n.throttle(f);a.on("nodechange ResizeEditor ResizeWindow drop",function(t){a.composing||e(t)}),a.on("keydown keyup compositionend",function(t){_&&"TABLE"==_.nodeName&&!a.composing&&e(t)}),a.on("hide blur",d)}),a.on("remove",b),{isResizable:s,showResizeRect:u,hideResizeRect:d,updateResizeRect:f,controlSelect:x,destroy:w}}}),r(z,[],function(){function e(e){return function(){return e}}function t(e){return function(t){return!e(t)}}function n(e,t){return function(n){return e(t(n))}}function r(){var e=a.call(arguments);return function(t){for(var n=0;n<e.length;n++)if(e[n](t))return!0;return!1}}function i(){var e=a.call(arguments);return function(t){for(var n=0;n<e.length;n++)if(!e[n](t))return!1;return!0}}function o(e){var t=a.call(arguments);return t.length-1>=e.length?e.apply(this,t.slice(1)):function(){var e=t.concat([].slice.call(arguments));return o.apply(this,e)}}var a=[].slice;return{constant:e,negate:t,and:i,or:r,curry:o,compose:n}}),r(W,[_,p,k],function(e,t,n){function r(e){return m(e)?!1:d(e)?!f(e.parentNode):h(e)||u(e)||p(e)||c(e)}function i(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode){if(c(e))return!1;if(l(e))return!0}return!0}function o(e){return c(e)?t.reduce(e.getElementsByTagName("*"),function(e,t){return e||l(t);
-},!1)!==!0:!1}function a(e){return h(e)||o(e)}function s(e,t){return r(e)&&i(e,t)}var l=e.isContentEditableTrue,c=e.isContentEditableFalse,u=e.isBr,d=e.isText,f=e.matchNodeNames("script style textarea"),h=e.matchNodeNames("img input textarea hr iframe video audio object"),p=e.matchNodeNames("table"),m=n.isCaretContainer;return{isCaretCandidate:r,isInEditable:i,isAtomic:a,isEditableCaretCandidate:s}}),r(V,[],function(){function e(e){return e?{left:u(e.left),top:u(e.top),bottom:u(e.bottom),right:u(e.right),width:u(e.width),height:u(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}}function t(t,n){return t=e(t),n?t.right=t.left:(t.left=t.left+t.width,t.right=t.left),t.width=0,t}function n(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right}function r(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2}function i(e,t){return e.bottom<t.top?!0:e.top>t.bottom?!1:r(t.top-e.bottom,e,t)}function o(e,t){return e.top>t.bottom?!0:e.bottom<t.top?!1:r(t.bottom-e.top,e,t)}function a(e,t){return e.left<t.left}function s(e,t){return e.right>t.right}function l(e,t){return i(e,t)?-1:o(e,t)?1:a(e,t)?-1:s(e,t)?1:0}function c(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}var u=Math.round;return{clone:e,collapse:t,isEqual:n,isAbove:i,isBelow:o,isLeft:a,isRight:s,compare:l,containsXY:c}}),r(U,[],function(){function e(e){return"string"==typeof e&&e.charCodeAt(0)>=768&&t.test(e)}var t=new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]");return{isExtendingChar:e}}),r($,[z,_,w,T,W,V,U],function(e,t,n,r,i,o,a){function s(e){return e&&/[\r\n\t ]/.test(e)}function l(e){var t=e.startContainer,n=e.startOffset,r;return!!(s(e.toString())&&g(t.parentNode)&&(r=t.data,s(r[n-1])||s(r[n+1])))}function c(e){function t(e){var t=e.ownerDocument,n=t.createRange(),r=t.createTextNode("\xa0"),i=e.parentNode,a;return i.insertBefore(r,e),n.setStart(r,0),n.setEnd(r,1),a=o.clone(n.getBoundingClientRect()),i.removeChild(r),a}function n(e){var n,r;return r=e.getClientRects(),n=r.length>0?o.clone(r[0]):o.clone(e.getBoundingClientRect()),y(e)&&0===n.left?t(e):n}function r(e,t){return e=o.collapse(e,t),e.width=1,e.right=e.left+1,e}function i(e){0!==e.height&&(c.length>0&&o.isEqual(e,c[c.length-1])||c.push(e))}function s(e,t){var o=e.ownerDocument.createRange();if(t<e.data.length){if(a.isExtendingChar(e.data[t]))return c;if(a.isExtendingChar(e.data[t-1])&&(o.setStart(e,t),o.setEnd(e,t+1),!l(o)))return i(r(n(o),!1)),c}t>0&&(o.setStart(e,t-1),o.setEnd(e,t),l(o)||i(r(n(o),!1))),t<e.data.length&&(o.setStart(e,t),o.setEnd(e,t+1),l(o)||i(r(n(o),!0)))}var c=[],u,f;if(v(e.container()))return s(e.container(),e.offset()),c;if(d(e.container()))if(e.isAtEnd())f=C(e.container(),e.offset()),v(f)&&s(f,f.data.length),m(f)&&!y(f)&&i(r(n(f),!1));else{if(f=C(e.container(),e.offset()),v(f)&&s(f,0),m(f)&&e.isAtEnd())return i(r(n(f),!1)),c;u=C(e.container(),e.offset()-1),m(u)&&!y(u)&&(h(u)||h(f)||!m(f))&&i(r(n(u),!1)),m(f)&&i(r(n(f),!0))}return c}function u(t,n,r){function i(){return v(t)?0===n:0===n}function o(){return v(t)?n>=t.data.length:n>=t.childNodes.length}function a(){var e;return e=t.ownerDocument.createRange(),e.setStart(t,n),e.setEnd(t,n),e}function s(){return r||(r=c(new u(t,n))),r}function l(){return s().length>0}function d(e){return e&&t===e.container()&&n===e.offset()}function f(e){return C(t,e?n-1:n)}return{container:e.constant(t),offset:e.constant(n),toRange:a,getClientRects:s,isVisible:l,isAtStart:i,isAtEnd:o,isEqual:d,getNode:f}}var d=t.isElement,f=i.isCaretCandidate,h=t.matchStyleValues("display","block table"),p=t.matchStyleValues("float","left right"),m=e.and(d,f,e.negate(p)),g=e.negate(t.matchStyleValues("white-space","pre pre-line pre-wrap")),v=t.isText,y=t.isBr,b=n.nodeIndex,C=r.getNode;return u.fromRangeStart=function(e){return new u(e.startContainer,e.startOffset)},u.fromRangeEnd=function(e){return new u(e.endContainer,e.endOffset)},u.after=function(e){return new u(e.parentNode,b(e)+1)},u.before=function(e){return new u(e.parentNode,b(e))},u}),r(q,[_,w,z,p,$],function(e,t,n,r,i){function o(e){var t=e.parentNode;return v(t)?o(t):t}function a(e){return e?r.reduce(e.childNodes,function(e,t){return v(t)&&"BR"!=t.nodeName?e=e.concat(a(t)):e.push(t),e},[]):[]}function s(e,t){for(;(e=e.previousSibling)&&g(e);)t+=e.data.length;return t}function l(e){return function(t){return e===t}}function c(t){var n,i,s;return n=a(o(t)),i=r.findIndex(n,l(t),t),n=n.slice(0,i+1),s=r.reduce(n,function(e,t,r){return g(t)&&g(n[r-1])&&e++,e},0),n=r.filter(n,e.matchNodeNames(t.nodeName)),i=r.findIndex(n,l(t),t),i-s}function u(e){var t;return t=g(e)?"text()":e.nodeName.toLowerCase(),t+"["+c(e)+"]"}function d(e,t,n){var r=[];for(t=t.parentNode;t!=e&&(!n||!n(t));t=t.parentNode)r.push(t);return r}function f(t,i){var o,a,l=[],c,f,h;return o=i.container(),a=i.offset(),g(o)?c=s(o,a):(f=o.childNodes,a>=f.length?(c="after",a=f.length-1):c="before",o=f[a]),l.push(u(o)),h=d(t,o),h=r.filter(h,n.negate(e.isBogus)),l=l.concat(r.map(h,function(e){return u(e)})),l.reverse().join("/")+","+c}function h(t,n,i){var o=a(t);return o=r.filter(o,function(e,t){return!g(e)||!g(o[t-1])}),o=r.filter(o,e.matchNodeNames(n)),o[i]}function p(e,t){for(var n=e,r=0,o;g(n);){if(o=n.data.length,t>=r&&r+o>=t){e=n,t-=r;break}if(!g(n.nextSibling)){e=n,t=o;break}r+=o,n=n.nextSibling}return t>e.data.length&&(t=e.data.length),new i(e,t)}function m(e,t){var n,o,a;return t?(n=t.split(","),t=n[0].split("/"),a=n.length>1?n[1]:"before",o=r.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),h(e,t[1],parseInt(t[2],10))):null},e),o?g(o)?p(o,parseInt(a,10)):(a="after"===a?y(o)+1:y(o),new i(o.parentNode,a)):null):null}var g=e.isText,v=e.isBogus,y=t.nodeIndex;return{create:f,resolve:m}}),r(j,[h,m,k,q,$,_],function(e,t,n,r,i,o){function a(a){var l=a.dom;this.getBookmark=function(e,c){function u(e,n){var r=0;return t.each(l.select(e),function(e){return"all"!==e.getAttribute("data-mce-bogus")?e==n?!1:void r++:void 0}),r}function d(e){function t(t){var n,r,i,o=t?"start":"end";n=e[o+"Container"],r=e[o+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(i=n.childNodes,n=i[Math.min(t?r:r-1,i.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))}return t(!0),t(),e}function f(e){function t(e,t){var r=e[t?"startContainer":"endContainer"],i=e[t?"startOffset":"endOffset"],o=[],a,s,u=0;if(3==r.nodeType){if(c)for(a=r.previousSibling;a&&3==a.nodeType;a=a.previousSibling)i+=a.nodeValue.length;o.push(i)}else s=r.childNodes,i>=s.length&&s.length&&(u=1,i=Math.max(0,s.length-1)),o.push(l.nodeIndex(s[i],c)+u);for(;r&&r!=n;r=r.parentNode)o.push(l.nodeIndex(r,c));return o}var n=l.getRoot(),r={};return r.start=t(e,!0),a.isCollapsed()||(r.end=t(e)),r}function h(e){function t(e){var t;if(n.isCaretContainer(e)){if(o.isText(e)&&n.isCaretContainerBlock(e)&&(e=e.parentNode),t=e.previousSibling,s(t))return t;if(t=e.nextSibling,s(t))return t}}return t(e.startContainer)||t(e.endContainer)}var p,m,g,v,y,b,C="&#xFEFF;",x;if(2==e)return b=a.getNode(),y=b?b.nodeName:null,p=a.getRng(),s(b)||"IMG"==y?{name:y,index:u(y,b)}:a.tridentSel?a.tridentSel.getBookmark(e):(b=h(p),b?(y=b.tagName,{name:y,index:u(y,b)}):f(p));if(3==e)return p=a.getRng(),{start:r.create(l.getRoot(),i.fromRangeStart(p)),end:r.create(l.getRoot(),i.fromRangeEnd(p))};if(e)return{rng:a.getRng()};if(p=a.getRng(),g=l.uniqueId(),v=a.isCollapsed(),x="overflow:hidden;line-height:0px",p.duplicate||p.item){if(p.item)return b=p.item(0),y=b.nodeName,{name:y,index:u(y,b)};m=p.duplicate();try{p.collapse(),p.pasteHTML('<span data-mce-type="bookmark" id="'+g+'_start" style="'+x+'">'+C+"</span>"),v||(m.collapse(!1),p.moveToElementText(m.parentElement()),0===p.compareEndPoints("StartToEnd",m)&&m.move("character",-1),m.pasteHTML('<span data-mce-type="bookmark" id="'+g+'_end" style="'+x+'">'+C+"</span>"))}catch(w){return null}}else{if(b=a.getNode(),y=b.nodeName,"IMG"==y)return{name:y,index:u(y,b)};m=d(p.cloneRange()),v||(m.collapse(!1),m.insertNode(l.create("span",{"data-mce-type":"bookmark",id:g+"_end",style:x},C))),p=d(p),p.collapse(!0),p.insertNode(l.create("span",{"data-mce-type":"bookmark",id:g+"_start",style:x},C))}return a.moveToBookmark({id:g,keep:1}),{id:g}},this.moveToBookmark=function(n){function i(e){var t=n[e?"start":"end"],r,i,o,a;if(t){for(o=t[0],i=d,r=t.length-1;r>=1;r--){if(a=i.childNodes,t[r]>a.length-1)return;i=a[t[r]]}3===i.nodeType&&(o=Math.min(t[0],i.nodeValue.length)),1===i.nodeType&&(o=Math.min(t[0],i.childNodes.length)),e?u.setStart(i,o):u.setEnd(i,o)}return!0}function o(r){var i=l.get(n.id+"_"+r),o,a,s,c,u=n.keep;if(i&&(o=i.parentNode,"start"==r?(u?(o=i.firstChild,a=1):a=l.nodeIndex(i),f=h=o,p=m=a):(u?(o=i.firstChild,a=1):a=l.nodeIndex(i),h=o,m=a),!u)){for(c=i.previousSibling,s=i.nextSibling,t.each(t.grep(i.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});i=l.get(n.id+"_"+r);)l.remove(i,1);c&&s&&c.nodeType==s.nodeType&&3==c.nodeType&&!e.opera&&(a=c.nodeValue.length,c.appendData(s.nodeValue),l.remove(s),"start"==r?(f=h=c,p=m=a):(h=c,m=a))}}function s(t){return!l.isBlock(t)||t.innerHTML||e.ie||(t.innerHTML='<br data-mce-bogus="1" />'),t}function c(){var e,t;return e=l.createRng(),t=r.resolve(l.getRoot(),n.start),e.setStart(t.container(),t.offset()),t=r.resolve(l.getRoot(),n.end),e.setEnd(t.container(),t.offset()),e}var u,d,f,h,p,m;if(n)if(t.isArray(n.start)){if(u=l.createRng(),d=l.getRoot(),a.tridentSel)return a.tridentSel.moveToBookmark(n);i(!0)&&i()&&a.setRng(u)}else"string"==typeof n.start?a.setRng(c(n)):n.id?(o("start"),o("end"),f&&(u=l.createRng(),u.setStart(s(f),p),u.setEnd(s(h),m),a.setRng(u))):n.name?a.select(l.select(n.name)[n.index]):n.rng&&a.setRng(n.rng)}}var s=o.isContentEditableFalse;return a.isBookmarkNode=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},a}),r(Y,[y,O,F,T,j,_,h,m],function(e,n,r,i,o,a,s,l){function c(e,t,i,a){var s=this;s.dom=e,s.win=t,s.serializer=i,s.editor=a,s.bookmarkManager=new o(s),s.controlSelection=new r(s,a),s.win.getSelection||(s.tridentSel=new n(s))}var u=l.each,d=l.trim,f=s.ie;return c.prototype={setCursorLocation:function(e,t){var n=this,r=n.dom.createRng();e?(r.setStart(e,t),r.setEnd(e,t),n.setRng(r),n.collapse(!1)):(n._moveEndPoint(r,n.editor.getBody(),!0),n.setRng(r))},getContent:function(e){var n=this,r=n.getRng(),i=n.dom.create("body"),o=n.getSel(),a,s,l;return e=e||{},a=s="",e.get=!0,e.format=e.format||"html",e.selection=!0,n.editor.fire("BeforeGetContent",e),"text"==e.format?n.isCollapsed()?"":r.text||(o.toString?o.toString():""):(r.cloneContents?(l=r.cloneContents(),l&&i.appendChild(l)):r.item!==t||r.htmlText!==t?(i.innerHTML="<br>"+(r.item?r.item(0).outerHTML:r.htmlText),i.removeChild(i.firstChild)):i.innerHTML=r.toString(),/^\s/.test(i.innerHTML)&&(a=" "),/\s+$/.test(i.innerHTML)&&(s=" "),e.getInner=!0,e.content=n.isCollapsed()?"":a+n.serializer.serialize(i,e)+s,n.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n=this,r=n.getRng(),i,o=n.win.document,a,s;if(t=t||{format:"html"},t.set=!0,t.selection=!0,t.content=e,t.no_events||n.editor.fire("BeforeSetContent",t),e=t.content,r.insertNode){e+='<span id="__caret">_</span>',r.startContainer==o&&r.endContainer==o?o.body.innerHTML=e:(r.deleteContents(),0===o.body.childNodes.length?o.body.innerHTML=e:r.createContextualFragment?r.insertNode(r.createContextualFragment(e)):(a=o.createDocumentFragment(),s=o.createElement("div"),a.appendChild(s),s.outerHTML=e,r.insertNode(a))),i=n.dom.get("__caret"),r=o.createRange(),r.setStartBefore(i),r.setEndBefore(i),n.setRng(r),n.dom.remove("__caret");try{n.setRng(r)}catch(l){}}else r.item&&(o.execCommand("Delete",!1,null),r=n.getRng()),/^\s+/.test(e)?(r.pasteHTML('<span id="__mce_tmp">_</span>'+e),n.dom.remove("__mce_tmp")):r.pasteHTML(e);t.no_events||n.editor.fire("SetContent",t)},getStart:function(e){var t=this,n=t.getRng(),r,i,o,a;if(n.duplicate||n.item){if(n.item)return n.item(0);for(o=n.duplicate(),o.collapse(1),r=o.parentElement(),r.ownerDocument!==t.dom.doc&&(r=t.dom.getRoot()),i=a=n.parentElement();a=a.parentNode;)if(a==r){r=i;break}return r}return r=n.startContainer,1==r.nodeType&&r.hasChildNodes()&&(e&&n.collapsed||(r=r.childNodes[Math.min(r.childNodes.length-1,n.startOffset)])),r&&3==r.nodeType?r.parentNode:r},getEnd:function(e){var t=this,n=t.getRng(),r,i;return n.duplicate||n.item?n.item?n.item(0):(n=n.duplicate(),n.collapse(0),r=n.parentElement(),r.ownerDocument!==t.dom.doc&&(r=t.dom.getRoot()),r&&"BODY"==r.nodeName?r.lastChild||r:r):(r=n.endContainer,i=n.endOffset,1==r.nodeType&&r.hasChildNodes()&&(e&&n.collapsed||(r=r.childNodes[i>0?i-1:i])),r&&3==r.nodeType?r.parentNode:r)},getBookmark:function(e,t){return this.bookmarkManager.getBookmark(e,t)},moveToBookmark:function(e){return this.bookmarkManager.moveToBookmark(e)},select:function(e,t){var n=this,r=n.dom,i=r.createRng(),o;if(n.lastFocusBookmark=null,e){if(!t&&n.controlSelection.controlSelect(e))return;o=r.nodeIndex(e),i.setStart(e.parentNode,o),i.setEnd(e.parentNode,o+1),t&&(n._moveEndPoint(i,e,!0),n._moveEndPoint(i,e)),n.setRng(i)}return e},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed},collapse:function(e){var t=this,n=t.getRng(),r;n.item&&(r=n.item(0),n=t.win.document.body.createTextRange(),n.moveToElementText(r)),n.collapse(!!e),t.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){function t(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}}var n=this,r,i,o,a,s,l;if(!n.win)return null;if(a=n.win.document,!e&&n.lastFocusBookmark){var c=n.lastFocusBookmark;return c.startContainer?(i=a.createRange(),i.setStart(c.startContainer,c.startOffset),i.setEnd(c.endContainer,c.endOffset)):i=c,i}if(e&&n.tridentSel)return n.tridentSel.getRangeAt(0);try{(r=n.getSel())&&(i=r.rangeCount>0?r.getRangeAt(0):r.createRange?r.createRange():a.createRange())}catch(u){}if(l=n.editor.fire("GetSelectionRange",{range:i}),l.range!==i)return l.range;if(f&&i&&i.setStart&&a.selection){try{s=a.selection.createRange()}catch(u){}s&&s.item&&(o=s.item(0),i=a.createRange(),i.setStartBefore(o),i.setEndAfter(o))}return i||(i=a.createRange?a.createRange():a.body.createTextRange()),i.setStart&&9===i.startContainer.nodeType&&i.collapsed&&(o=n.dom.getRoot(),i.setStart(o,0),i.setEnd(o,0)),n.selectedRange&&n.explicitRange&&(0===t(i.START_TO_START,i,n.selectedRange)&&0===t(i.END_TO_END,i,n.selectedRange)?i=n.explicitRange:(n.selectedRange=null,n.explicitRange=null)),i},setRng:function(e,t){var n=this,r,i,o;if(e)if(e.select){n.explicitRange=null;try{e.select()}catch(a){}}else if(n.tridentSel){if(e.cloneRange)try{n.tridentSel.addRange(e)}catch(a){}}else{if(r=n.getSel(),o=n.editor.fire("SetSelectionRange",{range:e}),e=o.range,r){n.explicitRange=e;try{r.removeAllRanges(),r.addRange(e)}catch(a){}t===!1&&r.extend&&(r.collapse(e.endContainer,e.endOffset),r.extend(e.startContainer,e.startOffset)),n.selectedRange=r.rangeCount>0?r.getRangeAt(0):null}e.collapsed||e.startContainer!=e.endContainer||!r.setBaseAndExtent||s.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(i=e.startContainer.childNodes[e.startOffset],i&&"IMG"==i.tagName&&n.getSel().setBaseAndExtent(i,0,i,1))}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t=this,n=t.getRng(),r,i,o,a,s,l=t.dom.getRoot();return n?(i=n.startContainer,o=n.endContainer,a=n.startOffset,s=n.endOffset,n.setStart?(r=n.commonAncestorContainer,!n.collapsed&&(i==o&&2>s-a&&i.hasChildNodes()&&(r=i.childNodes[a]),3===i.nodeType&&3===o.nodeType&&(i=i.length===a?e(i.nextSibling,!0):i.parentNode,o=0===s?e(o.previousSibling,!1):o.parentNode,i&&i===o))?i:r&&3==r.nodeType?r.parentNode:r):(r=n.item?n.item(0):n.parentElement(),r.ownerDocument!==t.win.document&&(r=l),r)):l},getSelectedBlocks:function(t,n){var r=this,i=r.dom,o,a,s=[];if(a=i.getRoot(),t=i.getParent(t||r.getStart(),i.isBlock),n=i.getParent(n||r.getEnd(),i.isBlock),t&&t!=a&&s.push(t),t&&n&&t!=n){o=t;for(var l=new e(t,a);(o=l.next())&&o!=n;)i.isBlock(o)&&s.push(o)}return n&&t!=n&&n!=a&&s.push(n),s},isForward:function(){var e=this.dom,t=this.getSel(),n,r;return t&&t.anchorNode&&t.focusNode?(n=e.createRng(),n.setStart(t.anchorNode,t.anchorOffset),n.collapse(!0),r=e.createRng(),r.setStart(t.focusNode,t.focusOffset),r.collapse(!0),n.compareBoundaryPoints(n.START_TO_START,r)<=0):!0},normalize:function(){var e=this,t=e.getRng();return s.range&&new i(e.dom).normalize(t)&&e.setRng(t,e.isForward()),t},selectorChanged:function(e,t){var n=this,r;return n.selectorChangedData||(n.selectorChangedData={},r={},n.editor.on("NodeChange",function(e){var t=e.element,i=n.dom,o=i.getParents(t,null,i.getRoot()),a={};u(n.selectorChangedData,function(e,t){u(o,function(n){return i.is(n,t)?(r[t]||(u(e,function(e){e(!0,{node:n,selector:t,parents:o})}),r[t]=e),a[t]=e,!1):void 0})}),u(r,function(e,n){a[n]||(delete r[n],u(e,function(e){e(!1,{node:t,selector:n,parents:o})}))})})),n.selectorChangedData[e]||(n.selectorChangedData[e]=[]),n.selectorChangedData[e].push(t),n},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){function n(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}}var r,i,o=this,s=o.dom,l=s.getRoot(),c,u,d=0;if(a.isElement(e)){if(t===!1&&(d=e.offsetHeight),"BODY"!=l.nodeName){var f=o.getScrollContainer();if(f)return r=n(e).y-n(f).y+d,u=f.clientHeight,c=f.scrollTop,void((c>r||r+25>c+u)&&(f.scrollTop=c>r?r:r-u+25))}i=s.getViewPort(o.editor.getWin()),r=s.getPos(e).y+d,c=i.y,u=i.h,(r<i.y||r+25>c+u)&&o.editor.getWin().scrollTo(0,c>r?r:r-u+25)}},placeCaretAt:function(e,t){this.setRng(i.getCaretRangeFromPoint(e,t,this.editor.getDoc()))},_moveEndPoint:function(t,n,r){var i=n,o=new e(n,i),a=this.dom.schema.getNonEmptyElements();do{if(3==n.nodeType&&0!==d(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(a[n.nodeName]&&!/^(TD|TH)$/.test(n.nodeName))return void(r?t.setStartBefore(n):"BR"==n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(s.ie&&s.ie<11&&this.dom.isBlock(n)&&this.dom.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?o.next():o.prev());"BODY"==i.nodeName&&(r?t.setStart(i,0):t.setEnd(i,i.childNodes.length))},destroy:function(){this.win=null,this.controlSelection.destroy()}},c}),r(X,[j,m],function(e,t){function n(t){this.compare=function(n,i){function o(e){var n={};return r(t.getAttribs(e),function(r){var i=r.nodeName.toLowerCase();0!==i.indexOf("_")&&"style"!==i&&"data-mce-style"!==i&&(n[i]=t.getAttrib(e,i))}),n}function a(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(n=t[r],"undefined"==typeof n)return!1;if(e[r]!=n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0}return n.nodeName!=i.nodeName?!1:a(o(n),o(i))&&a(t.parseStyle(t.getAttrib(n,"style")),t.parseStyle(t.getAttrib(i,"style")))?!e.isBookmarkNode(n)&&!e.isBookmarkNode(i):!1}}var r=t.each;return n}),r(K,[m],function(e){function t(e,t){function r(e){return e.replace(/%(\w+)/g,"")}var i,o,a=e.dom,s="",l,c;if(c=e.settings.preview_styles,c===!1)return"";if(c||(c="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof t){if(t=e.formatter.get(t),!t)return;t=t[0]}return i=t.block||t.inline||"span",o=a.create(i),n(t.styles,function(e,t){e=r(e),e&&a.setStyle(o,t,e)}),n(t.attributes,function(e,t){e=r(e),e&&a.setAttrib(o,t,e)}),n(t.classes,function(e){e=r(e),a.hasClass(o,e)||a.addClass(o,e)}),e.fire("PreviewFormats"),a.setStyles(o,{position:"absolute",left:-65535}),e.getBody().appendChild(o),l=a.getStyle(e.getBody(),"fontSize",!0),l=/px$/.test(l)?parseInt(l,10):0,n(c.split(" "),function(t){var n=a.getStyle(o,t,!0);if(!("background-color"==t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=a.getStyle(e.getBody(),t,!0),"#ffffff"==a.toHex(n).toLowerCase())||"color"==t&&"#000000"==a.toHex(n).toLowerCase())){if("font-size"==t&&/em|%$/.test(n)){if(0===l)return;n=parseFloat(n,10)/(/%$/.test(n)?100:1),n=n*l+"px"}"border"==t&&n&&(s+="padding:0 2px;"),s+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),a.remove(o),s}var n=e.each;return{getCssText:t}}),r(G,[p,_,g],function(e,t,n){function r(e,t){var n=o[e];n||(o[e]=n=[]),o[e].push(t)}function i(e,t){s(o[e],function(e){e(t)})}var o=[],a=e.filter,s=e.each;return r("pre",function(r){function i(t){return c(t.previousSibling)&&-1!=e.indexOf(u,t.previousSibling)}function o(e,t){n(t).remove(),n(e).append("<br><br>").append(t.childNodes)}var l=r.selection.getRng(),c,u;c=t.matchNodeNames("pre"),l.collapsed||(u=r.selection.getSelectedBlocks(),s(a(a(u,c),i),function(e){o(e.previousSibling,e)}))}),{postProcess:i}}),r(J,[y,T,j,X,m,K,G],function(e,t,n,r,i,o,a){return function(s){function l(e){return e.nodeType&&(e=e.nodeName),!!s.schema.getTextBlockElements()[e.toLowerCase()]}function c(e){return/^(TH|TD)$/.test(e.nodeName)}function u(e){return e&&/^(IMG)$/.test(e.nodeName)}function d(e,t){return Y.getParents(e,t,Y.getRoot())}function f(e){return 1===e.nodeType&&"_mce_caret"===e.id}function h(){g({valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(e,t,n){ue(n,function(t,n){Y.setAttrib(e,n,t)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),ue("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){g(e,{block:e,remove:"all"})}),g(s.settings.formats)}function p(){s.addShortcut("meta+b","bold_desc","Bold"),s.addShortcut("meta+i","italic_desc","Italic"),s.addShortcut("meta+u","underline_desc","Underline");for(var e=1;6>=e;e++)s.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);s.addShortcut("access+7","",["FormatBlock",!1,"p"]),s.addShortcut("access+8","",["FormatBlock",!1,"div"]),s.addShortcut("access+9","",["FormatBlock",!1,"address"])}function m(e){return e?j[e]:j}function g(e,t){e&&("string"!=typeof e?ue(e,function(e,t){g(t,e)}):(t=t.length?t:[t],ue(t,function(e){e.deep===oe&&(e.deep=!e.selector),e.split===oe&&(e.split=!e.selector||e.inline),e.remove===oe&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),j[e]=t))}function v(e){return e&&j[e]&&delete j[e],j}function y(e,t){var n=m(t);if(n)for(var r=0;r<n.length;r++)if(n[r].inherit===!1&&Y.is(e,n[r].selector))return!0;return!1}function b(e){var t;return s.dom.getParent(e,function(e){return t=s.dom.getStyle(e,"text-decoration"),t&&"none"!==t}),t}function C(e){var t;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(t=b(e.parentNode),s.dom.getStyle(e,"color")&&t?s.dom.setStyle(e,"text-decoration",t):s.dom.getStyle(e,"text-decoration")===t&&s.dom.setStyle(e,"text-decoration",null))}function x(t,n,r){function i(e,t){if(t=t||d,e){if(t.onformat&&t.onformat(e,t,n,r),ue(t.styles,function(t,r){Y.setStyle(e,r,L(t,n))}),t.styles){var i=Y.getAttrib(e,"style");i&&e.setAttribute("data-mce-style",i)}ue(t.attributes,function(t,r){Y.setAttrib(e,r,L(t,n))}),ue(t.classes,function(t){t=L(t,n),Y.hasClass(e,t)||Y.addClass(e,t)})}}function o(){function t(t,n){var i=new e(n);for(r=i.prev2();r;r=i.prev2()){if(3==r.nodeType&&r.data.length>0)return r;if(r.childNodes.length>1||r==t||"BR"==r.tagName)return r}}var n=s.selection.getRng(),i=n.startContainer,o=n.endContainer;if(i!=o&&0===n.endOffset){var a=t(i,o),l=3==a.nodeType?a.data.length:a.childNodes.length;n.setEnd(a,l)}return n}function c(e,r,o){var a=[],s,c,h=!0;s=d.inline||d.block,c=Y.create(s),i(c),K.walk(e,function(e){function r(e){var m,v,y,b,C;return C=h,m=e.nodeName.toLowerCase(),v=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&ae(e)&&(C=h,h="true"===ae(e),b=!0),B(m,"br")?(p=0,void(d.block&&Y.remove(e))):d.wrapper&&N(e,t,n)?void(p=0):h&&!b&&d.block&&!d.wrapper&&l(m)&&G(v,s)?(e=Y.rename(e,s),i(e),a.push(e),void(p=0)):d.selector&&(ue(u,function(t){return"collapsed"in t&&t.collapsed!==g?void 0:Y.is(e,t.selector)&&!f(e)?(i(e,t),y=!0,!1):void 0}),!d.inline||y)?void(p=0):void(!h||b||!G(s,m)||!G(v,s)||!o&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||f(e)||d.inline&&J(e)?(p=0,ue(de(e.childNodes),r),b&&(h=C),p=0):(p||(p=Y.clone(c,ne),e.parentNode.insertBefore(p,e),a.push(p)),p.appendChild(e)))}var p;ue(e,r)}),d.links===!0&&ue(a,function(e){function t(e){"A"===e.nodeName&&i(e,d),ue(de(e.childNodes),t)}t(e)}),ue(a,function(e){function r(e){var t=0;return ue(e.childNodes,function(e){P(e)||ce(e)||t++}),t}function o(e){var t,n;return ue(e.childNodes,function(e){return 1!=e.nodeType||ce(e)||f(e)?void 0:(t=e,ne)}),t&&!ce(t)&&A(t,d)&&(n=Y.clone(t,ne),i(n),Y.replace(n,e,re),Y.remove(t,1)),n||e}var s;if(s=r(e),(a.length>1||!J(e))&&0===s)return void Y.remove(e,1);if(d.inline||d.wrapper){if(d.exact||1!==s||(e=o(e)),ue(u,function(t){ue(Y.select(t.inline,e),function(e){ce(e)||F(t,n,e,t.exact?e:null)})}),N(e.parentNode,t,n))return Y.remove(e,1),e=0,re;d.merge_with_parents&&Y.getParent(e.parentNode,function(r){return N(r,t,n)?(Y.remove(e,1),e=0,re):void 0}),e&&d.merge_siblings!==!1&&(e=V(W(e),e),e=V(e,W(e,re)))}})}var u=m(t),d=u[0],h,p,g=!r&&X.isCollapsed();if("false"!==ae(X.getNode())){if(d){if(r)r.nodeType?(p=Y.createRng(),p.setStartBefore(r),p.setEndAfter(r),c(O(p,u),null,!0)):c(r,null,!0);else if(g&&d.inline&&!Y.select("td[data-mce-selected],th[data-mce-selected]").length)$("apply",t,n);else{var v=s.selection.getNode();Q||!u[0].defaultBlock||Y.getParent(v,Y.isBlock)||x(u[0].defaultBlock),s.selection.setRng(o()),h=X.getBookmark(),c(O(X.getRng(re),u),h),d.styles&&(d.styles.color||d.styles.textDecoration)&&(fe(v,C,"childNodes"),C(v)),X.moveToBookmark(h),q(X.getRng(re)),s.nodeChanged()}a.postProcess(t,s)}}else{r=X.getNode();for(var y=0,b=u.length;b>y;y++)if(u[y].ceFalseOverride&&Y.is(r,u[y].selector))return void i(r,u[y])}}function w(e,t,n,r){function i(e){var n,r,o,a,s;if(1===e.nodeType&&ae(e)&&(a=y,y="true"===ae(e),s=!0),n=de(e.childNodes),y&&!s)for(r=0,o=h.length;o>r&&!F(h[r],t,e,e);r++);if(p.deep&&n.length){for(r=0,o=n.length;o>r;r++)i(n[r]);s&&(y=a)}}function o(n){var i;return ue(d(n.parentNode).reverse(),function(n){var o;i||"_start"==n.id||"_end"==n.id||(o=N(n,e,t,r),o&&o.split!==!1&&(i=n))}),i}function a(e,n,r,i){var o,a,s,l,c,u;if(e){for(u=e.parentNode,o=n.parentNode;o&&o!=u;o=o.parentNode){for(a=Y.clone(o,ne),c=0;c<h.length;c++)if(F(h[c],t,a,a)){a=0;break}a&&(s&&a.appendChild(s),l||(l=a),s=a)}!i||p.mixed&&J(e)||(n=Y.split(e,n)),s&&(r.parentNode.insertBefore(s,r),l.appendChild(r))}return n}function l(e){return a(o(e),e,e,!0)}function u(e){var t=Y.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return ce(n)&&(n=n[e?"firstChild":"lastChild"]),3==n.nodeType&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),Y.remove(t,!0),n}function f(e){var t,n,r=e.commonAncestorContainer;if(e=O(e,h,re),p.split){if(t=U(e,re),n=U(e),t!=n){if(/^(TR|TH|TD)$/.test(t.nodeName)&&t.firstChild&&(t="TR"==t.nodeName?t.firstChild.firstChild||t:t.firstChild||t),r&&/^T(HEAD|BODY|FOOT|R)$/.test(r.nodeName)&&c(n)&&n.firstChild&&(n=n.firstChild||n),
-Y.isChildOf(t,n)&&!J(n)&&!c(t)&&!c(n))return t=H(t,"span",{id:"_start","data-mce-type":"bookmark"}),l(t),void(t=u(re));t=H(t,"span",{id:"_start","data-mce-type":"bookmark"}),n=H(n,"span",{id:"_end","data-mce-type":"bookmark"}),l(t),l(n),t=u(re),n=u()}else t=n=l(t);e.startContainer=t.parentNode?t.parentNode:t,e.startOffset=Z(t),e.endContainer=n.parentNode?n.parentNode:n,e.endOffset=Z(n)+1}K.walk(e,function(e){ue(e,function(e){i(e),1===e.nodeType&&"underline"===s.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===b(e.parentNode)&&F({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})}var h=m(e),p=h[0],g,v,y=!0;if(n)return void(n.nodeType?(v=Y.createRng(),v.setStartBefore(n),v.setEndAfter(n),f(v)):f(n));if("false"!==ae(X.getNode()))X.isCollapsed()&&p.inline&&!Y.select("td[data-mce-selected],th[data-mce-selected]").length?$("remove",e,t,r):(g=X.getBookmark(),f(X.getRng(re)),X.moveToBookmark(g),p.inline&&_(e,t,X.getStart())&&q(X.getRng(!0)),s.nodeChanged());else{n=X.getNode();for(var C=0,x=h.length;x>C&&(!h[C].ceFalseOverride||!F(h[C],t,n,n));C++);}}function E(e,t,n){var r=m(e);!_(e,t,n)||"toggle"in r[0]&&!r[0].toggle?x(e,t,n):w(e,t,n)}function N(e,t,n,r){function i(e,t,i){var o,a,s=t[i],l;if(t.onmatch)return t.onmatch(e,t,i);if(s)if(s.length===oe){for(o in s)if(s.hasOwnProperty(o)){if(a="attributes"===i?Y.getAttrib(e,o):D(e,o),r&&!a&&!t.exact)return;if((!r||t.exact)&&!B(a,M(L(s[o],n),o)))return}}else for(l=0;l<s.length;l++)if("attributes"===i?Y.getAttrib(e,s[l]):D(e,s[l]))return t;return t}var o=m(t),a,s,l;if(o&&e)for(s=0;s<o.length;s++)if(a=o[s],A(e,a)&&i(e,a,"attributes")&&i(e,a,"styles")){if(l=a.classes)for(s=0;s<l.length;s++)if(!Y.hasClass(e,l[s]))return;return a}}function _(e,t,n){function r(n){var r=Y.getRoot();return n===r?!1:(n=Y.getParent(n,function(n){return y(n,e)?!0:n.parentNode===r||!!N(n,e,t,!0)}),N(n,e,t))}var i;return n?r(n):(n=X.getNode(),r(n)?re:(i=X.getStart(),i!=n&&r(i)?re:ne))}function S(e,t){var n,r=[],i={};return n=X.getStart(),Y.getParent(n,function(n){var o,a;for(o=0;o<e.length;o++)a=e[o],!i[a]&&N(n,a,t)&&(i[a]=!0,r.push(a))},Y.getRoot()),r}function k(e){var t=m(e),n,r,i,o,a;if(t)for(n=X.getStart(),r=d(n),o=t.length-1;o>=0;o--){if(a=t[o].selector,!a||t[o].defaultBlock)return re;for(i=r.length-1;i>=0;i--)if(Y.is(r[i],a))return re}return ne}function T(e,t,n){var r;return ie||(ie={},r={},s.on("NodeChange",function(e){var t=d(e.element),n={};t=i.grep(t,function(e){return 1==e.nodeType&&!e.getAttribute("data-mce-bogus")}),ue(ie,function(e,i){ue(t,function(o){return N(o,i,{},e.similar)?(r[i]||(ue(e,function(e){e(!0,{node:o,format:i,parents:t})}),r[i]=e),n[i]=e,!1):y(o,i)?!1:void 0})}),ue(r,function(i,o){n[o]||(delete r[o],ue(i,function(n){n(!1,{node:e.element,format:o,parents:t})}))})})),ue(e.split(","),function(e){ie[e]||(ie[e]=[],ie[e].similar=n),ie[e].push(t)}),this}function R(e){return o.getCssText(s,e)}function A(e,t){return B(e,t.inline)?re:B(e,t.block)?re:t.selector?1==e.nodeType&&Y.is(e,t.selector):void 0}function B(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function D(e,t){return M(Y.getStyle(e,t),t)}function M(e,t){return"color"!=t&&"backgroundColor"!=t||(e=Y.toHex(e)),"fontWeight"==t&&700==e&&(e="bold"),"fontFamily"==t&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function L(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function P(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function H(e,t,n){var r=Y.create(t,n);return e.parentNode.insertBefore(r,e),r.appendChild(e),r}function O(t,n,r){function i(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var r,i,o,a,s;if(r=i=e?g:y,a=e?"previousSibling":"nextSibling",s=Y.getRoot(),3==r.nodeType&&!P(r)&&(e?v>0:b<r.nodeValue.length))return r;for(;;){if(!n[0].block_expand&&J(i))return i;for(o=i[a];o;o=o[a])if(!ce(o)&&!P(o)&&!t(o))return i;if(i==s||i.parentNode==s){r=i;break}i=i.parentNode}return r}function o(e,t){for(t===oe&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)e=e.childNodes[t],e&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}}function a(e){for(var t=e;t;){if(1===t.nodeType&&ae(t))return"false"===ae(t)?t:e;t=t.parentNode}return e}function c(t,n,i){function o(e,t){var n,o,a=e.nodeValue;return"undefined"==typeof t&&(t=i?a.length:0),i?(n=a.lastIndexOf(" ",t),o=a.lastIndexOf("\xa0",t),n=n>o?n:o,-1===n||r||n++):(n=a.indexOf(" ",t),o=a.indexOf("\xa0",t),n=-1!==n&&(-1===o||o>n)?n:o),n}var a,l,c,u;if(3===t.nodeType){if(c=o(t,n),-1!==c)return{container:t,offset:c};u=t}for(a=new e(t,Y.getParent(t,J)||s.getBody());l=a[i?"prev":"next"]();)if(3===l.nodeType){if(u=l,c=o(l),-1!==c)return{container:l,offset:c}}else if(J(l))break;return u?(n=i?0:u.length,{container:u,offset:n}):void 0}function u(e,r){var i,o,a,s;for(3==e.nodeType&&0===e.nodeValue.length&&e[r]&&(e=e[r]),i=d(e),o=0;o<i.length;o++)for(a=0;a<n.length;a++)if(s=n[a],!("collapsed"in s&&s.collapsed!==t.collapsed)&&Y.is(i[o],s.selector))return i[o];return e}function f(e,t){var r,i=Y.getRoot();if(n[0].wrapper||(r=Y.getParent(e,n[0].block,i)),r||(r=Y.getParent(3==e.nodeType?e.parentNode:e,function(e){return e!=i&&l(e)})),r&&n[0].wrapper&&(r=d(r,"ul,ol").reverse()[0]||r),!r)for(r=e;r[t]&&!J(r[t])&&(r=r[t],!B(r,"br")););return r||e}var h,p,m,g=t.startContainer,v=t.startOffset,y=t.endContainer,b=t.endOffset;if(1==g.nodeType&&g.hasChildNodes()&&(h=g.childNodes.length-1,g=g.childNodes[v>h?h:v],3==g.nodeType&&(v=0)),1==y.nodeType&&y.hasChildNodes()&&(h=y.childNodes.length-1,y=y.childNodes[b>h?h:b-1],3==y.nodeType&&(b=y.nodeValue.length)),g=a(g),y=a(y),(ce(g.parentNode)||ce(g))&&(g=ce(g)?g:g.parentNode,g=g.nextSibling||g,3==g.nodeType&&(v=0)),(ce(y.parentNode)||ce(y))&&(y=ce(y)?y:y.parentNode,y=y.previousSibling||y,3==y.nodeType&&(b=y.length)),n[0].inline&&(t.collapsed&&(m=c(g,v,!0),m&&(g=m.container,v=m.offset),m=c(y,b),m&&(y=m.container,b=m.offset)),p=o(y,b),p.node)){for(;p.node&&0===p.offset&&p.node.previousSibling;)p=o(p.node.previousSibling);p.node&&p.offset>0&&3===p.node.nodeType&&" "===p.node.nodeValue.charAt(p.offset-1)&&p.offset>1&&(y=p.node,y.splitText(p.offset-1))}return(n[0].inline||n[0].block_expand)&&(n[0].inline&&3==g.nodeType&&0!==v||(g=i(!0)),n[0].inline&&3==y.nodeType&&b!==y.nodeValue.length||(y=i())),n[0].selector&&n[0].expand!==ne&&!n[0].inline&&(g=u(g,"previousSibling"),y=u(y,"nextSibling")),(n[0].block||n[0].selector)&&(g=f(g,"previousSibling"),y=f(y,"nextSibling"),n[0].block&&(J(g)||(g=i(!0)),J(y)||(y=i()))),1==g.nodeType&&(v=Z(g),g=g.parentNode),1==y.nodeType&&(b=Z(y)+1,y=y.parentNode),{startContainer:g,startOffset:v,endContainer:y,endOffset:b}}function I(e,t){return t.links&&"A"==e.tagName}function F(e,t,n,r){var i,o,a;if(!A(n,e)&&!I(n,e))return ne;if("all"!=e.remove)for(ue(e.styles,function(i,o){i=M(L(i,t),o),"number"==typeof o&&(o=i,r=0),(e.remove_similar||!r||B(D(r,o),i))&&Y.setStyle(n,o,""),a=1}),a&&""===Y.getAttrib(n,"style")&&(n.removeAttribute("style"),n.removeAttribute("data-mce-style")),ue(e.attributes,function(e,i){var o;if(e=L(e,t),"number"==typeof i&&(i=e,r=0),!r||B(Y.getAttrib(r,i),e)){if("class"==i&&(e=Y.getAttrib(n,i),e&&(o="",ue(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(o+=(o?" ":"")+e)}),o)))return void Y.setAttrib(n,i,o);"class"==i&&n.removeAttribute("className"),te.test(i)&&n.removeAttribute("data-mce-"+i),n.removeAttribute(i)}}),ue(e.classes,function(e){e=L(e,t),r&&!Y.hasClass(r,e)||Y.removeClass(n,e)}),o=Y.getAttribs(n),i=0;i<o.length;i++)if(0!==o[i].nodeName.indexOf("_"))return ne;return"none"!=e.remove?(z(n,e),re):void 0}function z(e,t){function n(e,t,n){return e=W(e,t,n),!e||"BR"==e.nodeName||J(e)}var r=e.parentNode,i;t.block&&(Q?r==Y.getRoot()&&(t.list_block&&B(e,t.list_block)||ue(de(e.childNodes),function(e){G(Q,e.nodeName.toLowerCase())?i?i.appendChild(e):(i=H(e,Q),Y.setAttribs(i,s.settings.forced_root_block_attrs)):i=0})):J(e)&&!J(r)&&(n(e,ne)||n(e.firstChild,re,1)||e.insertBefore(Y.create("br"),e.firstChild),n(e,re)||n(e.lastChild,ne,1)||e.appendChild(Y.create("br")))),t.selector&&t.inline&&!B(t.inline,e)||Y.remove(e,1)}function W(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1==e.nodeType||!P(e))return e}function V(e,t){function n(e,t){for(i=e;i;i=i[t]){if(3==i.nodeType&&0!==i.nodeValue.length)return e;if(1==i.nodeType&&!ce(i))return i}return e}var i,o,a=new r(Y);if(e&&t&&(e=n(e,"previousSibling"),t=n(t,"nextSibling"),a.compare(e,t))){for(i=e.nextSibling;i&&i!=t;)o=i,i=i.nextSibling,e.appendChild(o);return Y.remove(t),ue(de(t.childNodes),function(t){e.appendChild(t)}),e}return t}function U(t,n){var r,i,o;return r=t[n?"startContainer":"endContainer"],i=t[n?"startOffset":"endOffset"],1==r.nodeType&&(o=r.childNodes.length-1,!n&&i&&i--,r=r.childNodes[i>o?o:i]),3===r.nodeType&&n&&i>=r.nodeValue.length&&(r=new e(r,s.getBody()).next()||r),3!==r.nodeType||n||0!==i||(r=new e(r,s.getBody()).prev()||r),r}function $(t,n,r,i){function o(e){var t=Y.create("span",{id:g,"data-mce-bogus":!0,style:v?"color:red":""});return e&&t.appendChild(s.getDoc().createTextNode(ee)),t}function a(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==ee||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function c(e){for(;e;){if(e.id===g)return e;e=e.parentNode}}function u(t){var n;if(t)for(n=new e(t,t),t=n.current();t;t=n.next())if(3===t.nodeType)return t}function d(e,t){var n,r;if(e)r=X.getRng(!0),a(e)?(t!==!1&&(r.setStartBefore(e),r.setEndBefore(e)),Y.remove(e)):(n=u(e),n.nodeValue.charAt(0)===ee&&(n.deleteData(0,1),r.startContainer==n&&r.startOffset>0&&r.setStart(n,r.startOffset-1),r.endContainer==n&&r.endOffset>0&&r.setEnd(n,r.endOffset-1)),Y.remove(e,1)),X.setRng(r);else if(e=c(X.getStart()),!e)for(;e=Y.get(g);)d(e,!1)}function f(){var e,t,i,a,s,l,d;e=X.getRng(!0),a=e.startOffset,l=e.startContainer,d=l.nodeValue,t=c(X.getStart()),t&&(i=u(t)),d&&a>0&&a<d.length&&/\w/.test(d.charAt(a))&&/\w/.test(d.charAt(a-1))?(s=X.getBookmark(),e.collapse(!0),e=O(e,m(n)),e=K.split(e),x(n,r,e),X.moveToBookmark(s)):(t&&i.nodeValue===ee?x(n,r,t):(t=o(!0),i=t.firstChild,e.insertNode(t),a=1,x(n,r,t)),X.setCursorLocation(i,a))}function h(){var e=X.getRng(!0),t,a,s,c,u,d,f=[],h,p;for(t=e.startContainer,a=e.startOffset,u=t,3==t.nodeType&&(a!=t.nodeValue.length&&(c=!0),u=u.parentNode);u;){if(N(u,n,r,i)){d=u;break}u.nextSibling&&(c=!0),f.push(u),u=u.parentNode}if(d)if(c)s=X.getBookmark(),e.collapse(!0),e=O(e,m(n),!0),e=K.split(e),w(n,r,e),X.moveToBookmark(s);else{for(p=o(),u=p,h=f.length-1;h>=0;h--)u.appendChild(Y.clone(f[h],!1)),u=u.firstChild;u.appendChild(Y.doc.createTextNode(ee)),u=u.firstChild;var g=Y.getParent(d,l);g&&Y.isEmpty(g)?d.parentNode.replaceChild(p,d):Y.insertAfter(p,d),X.setCursorLocation(u,1),Y.isEmpty(d)&&Y.remove(d)}}function p(){var e;e=c(X.getStart()),e&&!Y.isEmpty(e)&&fe(e,function(e){1!=e.nodeType||e.id===g||Y.isEmpty(e)||Y.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var g="_mce_caret",v=s.settings.caret_debug;s._hasCaretEvents||(le=function(){var e=[],t;if(a(c(X.getStart()),e))for(t=e.length;t--;)Y.setAttrib(e[t],"data-mce-bogus","1")},se=function(e){var t=e.keyCode;d(),8==t&&X.isCollapsed()&&X.getStart().innerHTML==ee&&d(c(X.getStart())),37!=t&&39!=t||d(c(X.getStart())),p()},s.on("SetContent",function(e){e.selection&&p()}),s._hasCaretEvents=!0),"apply"==t?f():h()}function q(t){var n=t.startContainer,r=t.startOffset,i,o,a,s,l;if((t.startContainer!=t.endContainer||!u(t.startContainer.childNodes[t.startOffset]))&&(3==n.nodeType&&r>=n.nodeValue.length&&(r=Z(n),n=n.parentNode,i=!0),1==n.nodeType))for(s=n.childNodes,n=s[Math.min(r,s.length-1)],o=new e(n,Y.getParent(n,Y.isBlock)),(r>s.length-1||i)&&o.next(),a=o.current();a;a=o.next())if(3==a.nodeType&&!P(a))return l=Y.create("a",{"data-mce-bogus":"all"},ee),a.parentNode.insertBefore(l,a),t.setStart(a,0),X.setRng(t),void Y.remove(l)}var j={},Y=s.dom,X=s.selection,K=new t(Y),G=s.schema.isValidChild,J=Y.isBlock,Q=s.settings.forced_root_block,Z=Y.nodeIndex,ee="\ufeff",te=/^(src|href|style)$/,ne=!1,re=!0,ie,oe,ae=Y.getContentEditable,se,le,ce=n.isBookmarkNode,ue=i.each,de=i.grep,fe=i.walk,he=i.extend;he(this,{get:m,register:g,unregister:v,apply:x,remove:w,toggle:E,match:_,matchAll:S,matchNode:N,canApply:k,formatChanged:T,getCssText:R}),h(),p(),s.on("BeforeGetContent",function(e){le&&"raw"!=e.format&&le()}),s.on("mouseup keydown",function(e){se&&se(e)})}}),r(Q,[I,h],function(e,t){return function(e){function n(){return e.serializer.getTrimmedContent()}function r(t){e.setDirty(t)}function i(e){o.typing=!1,o.add({},e)}var o=this,a=0,s=[],l,c,u=0;return e.on("init",function(){o.add()}),e.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&o.beforeChange()}),e.on("ExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&i(e)}),e.on("ObjectResizeStart Cut",function(){o.beforeChange()}),e.on("SaveContent ObjectResized blur",i),e.on("DragEnd",i),e.on("KeyUp",function(a){var l=a.keyCode;a.isDefaultPrevented()||((l>=33&&36>=l||l>=37&&40>=l||45==l||13==l||a.ctrlKey)&&(i(),e.nodeChanged()),(46==l||8==l||t.mac&&(91==l||93==l))&&e.nodeChanged(),c&&o.typing&&(e.isDirty()||(r(s[0]&&n()!=s[0].content),e.isDirty()&&e.fire("change",{level:s[0],lastLevel:null})),e.fire("TypingUndo"),c=!1,e.nodeChanged()))}),e.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented()){if(t>=33&&36>=t||t>=37&&40>=t||45==t)return void(o.typing&&i(e));var n=e.ctrlKey&&!e.altKey||e.metaKey;!(16>t||t>20)||224==t||91==t||o.typing||n||(o.beforeChange(),o.typing=!0,o.add({},e),c=!0)}}),e.on("MouseDown",function(e){o.typing&&i(e)}),e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo"),e.on("AddUndo Undo Redo ClearUndos",function(t){t.isDefaultPrevented()||e.nodeChanged()}),o={data:s,typing:!1,beforeChange:function(){u||(l=e.selection.getBookmark(2,!0))},add:function(t,i){var o,c=e.settings,d;if(t=t||{},t.content=n(),u||e.removed)return null;if(d=s[a],e.fire("BeforeAddUndo",{level:t,lastLevel:d,originalEvent:i}).isDefaultPrevented())return null;if(d&&d.content==t.content)return null;if(s[a]&&(s[a].beforeBookmark=l),c.custom_undo_redo_levels&&s.length>c.custom_undo_redo_levels){for(o=0;o<s.length-1;o++)s[o]=s[o+1];s.length--,a=s.length}t.bookmark=e.selection.getBookmark(2,!0),a<s.length-1&&(s.length=a+1),s.push(t),a=s.length-1;var f={level:t,lastLevel:d,originalEvent:i};return e.fire("AddUndo",f),a>0&&(r(!0),e.fire("change",f)),t},undo:function(){var t;return o.typing&&(o.add(),o.typing=!1),a>0&&(t=s[--a],e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(t.beforeBookmark),r(!0),e.fire("undo",{level:t})),t},redo:function(){var t;return a<s.length-1&&(t=s[++a],e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(t.bookmark),r(!0),e.fire("redo",{level:t})),t},clear:function(){s=[],a=0,o.typing=!1,e.fire("ClearUndos")},hasUndo:function(){return a>0||o.typing&&s[0]&&n()!=s[0].content},hasRedo:function(){return a<s.length-1&&!this.typing},transact:function(e){o.beforeChange();try{u++,e()}finally{u--}o.add()}}}}),r(Z,[y,T,h],function(e,t,n){var r=n.ie&&n.ie<11;return function(i){function o(o){function h(e){return e&&a.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==a.getContentEditable(e)}function p(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)}function m(e){var t;a.isBlock(e)&&(t=s.getRng(),e.appendChild(a.create("span",null,"\xa0")),s.select(e),e.lastChild.outerHTML="",s.setRng(t))}function g(e){var t=e,n=[],r;if(t){for(;t=t.firstChild;){if(a.isBlock(t))return;1!=t.nodeType||d[t.nodeName.toLowerCase()]||n.push(t)}for(r=n.length;r--;)t=n[r],!t.hasChildNodes()||t.firstChild==t.lastChild&&""===t.firstChild.nodeValue?a.remove(t):"A"==t.nodeName&&" "===(t.innerText||t.textContent)&&a.remove(t)}}function v(t){function r(e){for(;e;){if(1==e.nodeType||3==e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}var i,o,l,c=t,u;if(t){if(n.ie&&n.ie<9&&L&&L.firstChild&&L.firstChild==L.lastChild&&"BR"==L.firstChild.tagName&&a.remove(L.firstChild),/^(LI|DT|DD)$/.test(t.nodeName)){var d=r(t.firstChild);d&&/^(UL|OL|DL)$/.test(d.nodeName)&&t.insertBefore(a.doc.createTextNode("\xa0"),t.firstChild)}if(l=a.createRng(),n.ie||t.normalize(),t.hasChildNodes()){for(i=new e(t,t);o=i.current();){if(3==o.nodeType){l.setStart(o,0),l.setEnd(o,0);break}if(f[o.nodeName.toLowerCase()]){l.setStartBefore(o),l.setEndBefore(o);break}c=o,o=i.next()}o||(l.setStart(c,0),l.setEnd(c,0))}else"BR"==t.nodeName?t.nextSibling&&a.isBlock(t.nextSibling)?((!P||9>P)&&(u=a.create("br"),t.parentNode.insertBefore(u,t)),l.setStartBefore(t),l.setEndBefore(t)):(l.setStartAfter(t),l.setEndAfter(t)):(l.setStart(t,0),l.setEnd(t,0));s.setRng(l),a.remove(u),s.scrollIntoView(t)}}function y(e){var t=l.forced_root_block;t&&t.toLowerCase()===e.tagName.toLowerCase()&&a.setAttribs(e,l.forced_root_block_attrs)}function b(e){e.innerHTML=r?"":'<br data-mce-bogus="1">'}function C(e){var t=D,n,i,o,s=u.getTextInlineElements();if(e||"TABLE"==z?(n=a.create(e||V),y(n)):n=L.cloneNode(!1),o=n,l.keep_styles!==!1)do if(s[t.nodeName]){if("_mce_caret"==t.id)continue;i=t.cloneNode(!1),a.setAttrib(i,"id",""),n.hasChildNodes()?(i.appendChild(n.firstChild),n.appendChild(i)):(o=i,n.appendChild(i))}while((t=t.parentNode)&&t!=B);return r||(o.innerHTML='<br data-mce-bogus="1">'),n}function x(t){var n,r,i;if(3==D.nodeType&&(t?M>0:M<D.nodeValue.length))return!1;if(D.parentNode==L&&U&&!t)return!0;if(t&&1==D.nodeType&&D==L.firstChild)return!0;if("TABLE"===D.nodeName||D.previousSibling&&"TABLE"==D.previousSibling.nodeName)return U&&!t||!U&&t;for(n=new e(D,L),3==D.nodeType&&(t&&0===M?n.prev():t||M!=D.nodeValue.length||n.next());r=n.current();){if(1===r.nodeType){if(!r.getAttribute("data-mce-bogus")&&(i=r.nodeName.toLowerCase(),d[i]&&"br"!==i))return!1}else if(3===r.nodeType&&!/^[ \t\r\n]*$/.test(r.nodeValue))return!1;t?n.prev():n.next()}return!0}function w(e,t){var n,r,o,s,l,c,d=V||"P";if(r=a.getParent(e,a.isBlock),!r||!h(r)){if(r=r||B,c=r==i.getBody()||p(r)?r.nodeName.toLowerCase():r.parentNode.nodeName.toLowerCase(),!r.hasChildNodes())return n=a.create(d),y(n),r.appendChild(n),R.setStart(n,0),R.setEnd(n,0),n;for(s=e;s.parentNode!=r;)s=s.parentNode;for(;s&&!a.isBlock(s);)o=s,s=s.previousSibling;if(o&&u.isValidChild(c,d.toLowerCase())){for(n=a.create(d),y(n),o.parentNode.insertBefore(n,o),s=o;s&&!a.isBlock(s);)l=s.nextSibling,n.appendChild(s),s=l;R.setStart(e,t),R.setEnd(e,t)}}return e}function E(){function e(e){for(var t=F[e?"firstChild":"lastChild"];t&&1!=t.nodeType;)t=t[e?"nextSibling":"previousSibling"];return t===L}function t(){var e=F.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:F}if(F!=i.getBody()){var n=F.parentNode.nodeName;/^(OL|UL|LI)$/.test(n)&&(V="LI"),O=V?C(V):a.create("BR"),e(!0)&&e()?"LI"==n?a.insertAfter(O,t()):a.replace(O,F):e(!0)?"LI"==n?(a.insertAfter(O,t()),O.appendChild(a.doc.createTextNode(" ")),O.appendChild(F)):F.parentNode.insertBefore(O,F):e()?(a.insertAfter(O,t()),m(O)):(F=t(),A=R.cloneRange(),A.setStartAfter(L),A.setEndAfter(F),I=A.extractContents(),"LI"==V&&"LI"==I.firstChild.nodeName?(O=I.firstChild,a.insertAfter(I,F)):(a.insertAfter(I,F),a.insertAfter(O,F))),a.remove(L),v(O),c.add()}}function N(){i.execCommand("InsertLineBreak",!1,o)}function _(e){do 3===e.nodeType&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;while(e)}function S(e){var t=a.getRoot(),n,r;for(n=e;n!==t&&"false"!==a.getContentEditable(n);)"true"===a.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==t?r:t}function k(e){var t;r||(e.normalize(),t=e.lastChild,t&&!/^(left|right)$/gi.test(a.getStyle(t,"float",!0))||a.add(e,"br"))}function T(){O=/^(H[1-6]|PRE|FIGURE)$/.test(z)&&"HGROUP"!=W?C(V):C(),l.end_container_on_empty_block&&h(F)&&a.isEmpty(L)?O=a.split(F,L):a.insertAfter(O,L),v(O)}var R,A,B,D,M,L,P,H,O,I,F,z,W,V,U;if(R=s.getRng(!0),!o.isDefaultPrevented()){if(!R.collapsed)return void i.execCommand("Delete");if(new t(a).normalize(R),D=R.startContainer,M=R.startOffset,V=(l.force_p_newlines?"p":"")||l.forced_root_block,V=V?V.toUpperCase():"",P=a.doc.documentMode,H=o.shiftKey,1==D.nodeType&&D.hasChildNodes()&&(U=M>D.childNodes.length-1,D=D.childNodes[Math.min(M,D.childNodes.length-1)]||D,M=U&&3==D.nodeType?D.nodeValue.length:0),B=S(D)){if(c.beforeChange(),!a.isBlock(B)&&B!=a.getRoot())return void(V&&!H||N());if((V&&!H||!V&&H)&&(D=w(D,M)),L=a.getParent(D,a.isBlock),F=L?a.getParent(L.parentNode,a.isBlock):null,z=L?L.nodeName.toUpperCase():"",W=F?F.nodeName.toUpperCase():"","LI"!=W||o.ctrlKey||(L=F,z=W),/^(LI|DT|DD)$/.test(z)){if(!V&&H)return void N();if(a.isEmpty(L))return void E()}if("PRE"==z&&l.br_in_pre!==!1){if(!H)return void N()}else if(!V&&!H&&"LI"!=z||V&&H)return void N();V&&L===i.getBody()||(V=V||"P",x()?T():x(!0)?(O=L.parentNode.insertBefore(C(),L),m(O),v(L)):(A=R.cloneRange(),A.setEndAfter(L),I=A.extractContents(),_(I),O=I.firstChild,a.insertAfter(I,L),g(O),k(L),a.isEmpty(L)&&b(L),O.normalize(),a.isEmpty(O)?(a.remove(O),T()):v(O)),a.setAttrib(O,"id",""),i.fire("NewBlock",{newBlock:O}),c.add())}}}var a=i.dom,s=i.selection,l=i.settings,c=i.undoManager,u=i.schema,d=u.getNonEmptyElements(),f=u.getMoveCaretBeforeOnEnterElements();i.on("keydown",function(e){13==e.keyCode&&o(e)!==!1&&e.preventDefault()})}}),r(ee,[],function(){return function(e){function t(){var t=i.getStart(),s=e.getBody(),l,c,u,d,f,h,p,m=-16777215,g,v,y,b,C;if(C=n.forced_root_block,t&&1===t.nodeType&&C){for(;t&&t!=s;){if(a[t.nodeName])return;t=t.parentNode}if(l=i.getRng(),l.setStart){c=l.startContainer,u=l.startOffset,d=l.endContainer,f=l.endOffset;try{v=e.getDoc().activeElement===s}catch(x){}}else l.item&&(t=l.item(0),l=e.getDoc().body.createTextRange(),l.moveToElementText(t)),v=l.parentElement().ownerDocument===e.getDoc(),y=l.duplicate(),y.collapse(!0),u=-1*y.move("character",m),y.collapsed||(y=l.duplicate(),y.collapse(!1),f=-1*y.move("character",m)-u);for(t=s.firstChild,b=s.nodeName.toLowerCase();t;)if((3===t.nodeType||1==t.nodeType&&!a[t.nodeName])&&o.isValidChild(b,C.toLowerCase())){if(3===t.nodeType&&0===t.nodeValue.length){p=t,t=t.nextSibling,r.remove(p);continue}h||(h=r.create(C,e.settings.forced_root_block_attrs),t.parentNode.insertBefore(h,t),g=!0),p=t,t=t.nextSibling,h.appendChild(p)}else h=null,t=t.nextSibling;if(g&&v){if(l.setStart)l.setStart(c,u),l.setEnd(d,f),i.setRng(l);else try{l=e.getDoc().body.createTextRange(),l.moveToElementText(s),l.collapse(!0),l.moveStart("character",u),f>0&&l.moveEnd("character",f),l.select()}catch(x){}e.nodeChanged()}}}var n=e.settings,r=e.dom,i=e.selection,o=e.schema,a=o.getBlockElements();n.forced_root_block&&e.on("NodeChange",t)}}),r(te,[z,y,_,$,k,W],function(e,t,n,r,i,o){function a(e){return e>0}function s(e){return 0>e}function l(e,n,r,i,o){var l=new t(e,i);if(s(n)){if(C(e)&&(e=l.prev(!0),r(e)))return e;for(;e=l.prev(o);)if(r(e))return e}if(a(n)){if(C(e)&&(e=l.next(!0),r(e)))return e;for(;e=l.next(o);)if(r(e))return e}return null}function c(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode)if(b(e))return e;return t}function u(e,t){for(;e&&e!=t;){if(x(e))return e;e=e.parentNode}return null}function d(e,t,n){return u(e.container(),n)==u(t.container(),n)}function f(e,t,n){return c(e.container(),n)==c(t.container(),n)}function h(e,t){var n,r;return t?(n=t.container(),r=t.offset(),N(n)?n.childNodes[r+e]:null):null}function p(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n}function m(e,t,n){return u(t,e)==u(n,e)}function g(e,t,n){var r,i;for(i=e?"previousSibling":"nextSibling";n&&n!=t;){if(r=n[i],w(r)&&(r=r[i]),C(r)){if(m(t,r,n))return r;break}if(_(r))break;n=n.parentNode}return null}function v(e,t,r){var o,a,s,l,c=E(g,!0,t),u=E(g,!1,t);if(a=r.startContainer,s=r.startOffset,i.isCaretContainerBlock(a)){if(N(a)||(a=a.parentNode),l=a.getAttribute("data-mce-caret"),"before"==l&&(o=a.nextSibling,C(o)))return S(o);if("after"==l&&(o=a.previousSibling,C(o)))return k(o)}if(!r.collapsed)return r;if(n.isText(a)){if(w(a)){if(1===e){if(o=u(a))return S(o);if(o=c(a))return k(o)}if(-1===e){if(o=c(a))return k(o);if(o=u(a))return S(o)}return r}if(i.endsWithCaretContainer(a)&&s>=a.data.length-1)return 1===e&&(o=u(a))?S(o):r;if(i.startsWithCaretContainer(a)&&1>=s)return-1===e&&(o=c(a))?k(o):r;if(s===a.data.length)return o=u(a),o?S(o):r;if(0===s)return o=c(a),o?k(o):r}return r}function y(e,t){return C(h(e,t))}var b=n.isContentEditableTrue,C=n.isContentEditableFalse,x=n.matchStyleValues("display","block table table-cell table-caption"),w=i.isCaretContainer,E=e.curry,N=n.isElement,_=o.isCaretCandidate,S=E(p,!0),k=E(p,!1);return{isForwards:a,isBackwards:s,findNode:l,getEditingHost:c,getParentBlock:u,isInSameBlock:d,isInSameEditingHost:f,isBeforeContentEditableFalse:E(y,0),isAfterContentEditableFalse:E(y,-1),normalizeRange:v}}),r(ne,[_,W,$,te,p,z],function(e,t,n,r,i,o){function a(e,t){for(var n=[];e&&e!=t;)n.push(e),e=e.parentNode;return n}function s(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null}function l(e,t){if(h(e)){if(m(t.previousSibling)&&!d(t.previousSibling))return n.before(t);if(d(t))return n(t,0)}if(p(e)){if(m(t.nextSibling)&&!d(t.nextSibling))return n.after(t);if(d(t))return n(t,t.data.length)}return p(e)?n.after(t):n.before(t)}function c(e,t,c){var y,b,C,x,w,E,N;if(!f(c)||!t)return null;if(N=t,y=N.container(),b=N.offset(),d(y)){if(p(e)&&b>0)return n(y,--b);if(h(e)&&b<y.length)return n(y,++b);C=y}else{if(p(e)&&b>0&&(x=s(y,b-1),m(x)))return!g(x)&&(w=r.findNode(x,e,v,x))?d(w)?n(w,w.data.length):n.after(w):d(x)?n(x,x.data.length):n.before(x);if(h(e)&&b<y.childNodes.length&&(x=s(y,b),m(x)))return!g(x)&&(w=r.findNode(x,e,v,x))?d(w)?n(w,0):n.before(w):d(x)?n(x,0):n.after(x);C=N.getNode()}return(h(e)&&N.isAtEnd()||p(e)&&N.isAtStart())&&(C=r.findNode(C,e,o.constant(!0),c,!0),v(C))?l(e,C):(x=r.findNode(C,e,v,c),E=i.last(i.filter(a(y,c),u)),!E||x&&E.contains(x)?x?l(e,x):null:N=h(e)?n.after(E):n.before(E))}var u=e.isContentEditableFalse,d=e.isText,f=e.isElement,h=r.isForwards,p=r.isBackwards,m=t.isCaretCandidate,g=t.isAtomic,v=t.isEditableCaretCandidate;return function(e){return{next:function(t){return c(1,t,e)},prev:function(t){return c(-1,t,e)}}}}),r(re,[P,h,m,X,T,y,ne,$,_],function(e,n,r,i,o,a,s,l,c){var u=r.each,d=r.extend,f=r.map,h=r.inArray,p=r.explode,m=n.ie,g=n.ie&&n.ie<11,v=!0,y=!1,b=c.matchNodeNames("td th");return function(r){function c(e,t,n,i){var o,a,s=0;if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||i&&i.skip_focus||r.focus(),i=r.fire("BeforeExecCommand",{command:e,ui:t,value:n}),i.isDefaultPrevented())return!1;if(a=e.toLowerCase(),o=H.exec[a])return o(a,t,n),r.fire("ExecCommand",{command:e,ui:t,value:n}),!0;if(u(r.plugins,function(i){return i.execCommand&&i.execCommand(e,t,n)?(r.fire("ExecCommand",{command:e,ui:t,value:n}),s=!0,!1):void 0}),s)return s;if(r.theme&&r.theme.execCommand&&r.theme.execCommand(e,t,n))return r.fire("ExecCommand",{command:e,ui:t,value:n}),!0;try{s=r.getDoc().execCommand(e,t,n)}catch(l){}return s?(r.fire("ExecCommand",{command:e,ui:t,value:n}),!0):!1}function C(e){var t;if(!r.quirks.isHidden()){if(e=e.toLowerCase(),t=H.state[e])return t(e);try{return r.getDoc().queryCommandState(e)}catch(n){}return!1}}function x(e){var t;if(!r.quirks.isHidden()){if(e=e.toLowerCase(),t=H.value[e])return t(e);try{return r.getDoc().queryCommandValue(e)}catch(n){}}}function w(e,t){t=t||"exec",u(e,function(e,n){u(n.toLowerCase().split(","),function(n){H[t][n]=e})})}function E(e,t,n){e=e.toLowerCase(),H.exec[e]=function(e,i,o,a){return t.call(n||r,i,o,a)}}function N(e){if(e=e.toLowerCase(),H.exec[e])return!0;try{return r.getDoc().queryCommandSupported(e)}catch(t){}return!1}function _(e,t,n){e=e.toLowerCase(),H.state[e]=function(){return t.call(n||r)}}function S(e,t,n){e=e.toLowerCase(),H.value[e]=function(){return t.call(n||r)}}function k(e){return e=e.toLowerCase(),!!H.exec[e]}function T(e,n,i){return n===t&&(n=y),i===t&&(i=null),r.getDoc().execCommand(e,n,i)}function R(e){return P.match(e)}function A(e,n){P.toggle(e,n?{value:n}:t),r.nodeChanged()}function B(e){I=L.getBookmark(e)}function D(){L.moveToBookmark(I)}var M,L,P,H={state:{},exec:{},value:{}},O=r.settings,I;r.on("PreInit",function(){M=r.dom,L=r.selection,O=r.settings,P=r.formatter}),d(this,{execCommand:c,queryCommandState:C,queryCommandValue:x,queryCommandSupported:N,addCommands:w,addCommand:E,addQueryStateHandler:_,addQueryValueHandler:S,hasCustomCommand:k}),w({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){r.undoManager.add()},"Cut,Copy,Paste":function(e){var t=r.getDoc(),i;try{T(e)}catch(o){i=v}if(i||!t.queryCommandSupported(e)){var a=r.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");n.mac&&(a=a.replace(/Ctrl\+/g,"\u2318+")),r.notificationManager.open({text:a,type:"error"})}},unlink:function(){if(L.isCollapsed()){var e=L.getNode();return void("A"==e.tagName&&r.dom.remove(e,!0))}P.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"==t&&(t="justify"),u("left,center,right,justify".split(","),function(e){t!=e&&P.remove("align"+e)}),"none"!=t&&A("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;T(e),t=M.getParent(L.getNode(),"ol,ul"),t&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(B(),M.split(n,t),D()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){A(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){A(e,n)},FontSize:function(e,t,n){var r,i;n>=1&&7>=n&&(i=p(O.font_size_style_values),r=p(O.font_size_classes),n=r?r[n-1]||n:i[n-1]||n),A(e,n)},RemoveFormat:function(e){P.remove(e)},mceBlockQuote:function(){A("blockquote")},FormatBlock:function(e,t,n){return A(n||"p")},mceCleanup:function(){var e=L.getBookmark();r.setContent(r.getContent({cleanup:v}),{cleanup:v}),L.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var i=n||L.getNode();i!=r.getBody()&&(B(),r.dom.remove(i,v),D())},mceSelectNodeDepth:function(e,t,n){var i=0;M.getParent(L.getNode(),function(e){return 1==e.nodeType&&i++==n?(L.select(e),y):void 0},r.getBody())},mceSelectNode:function(e,t,n){L.select(n)},mceInsertContent:function(t,n,o){function a(e){function t(e){return r[e]&&3==r[e].nodeType}var n,r,i;return n=L.getRng(!0),r=n.startContainer,i=n.startOffset,3==r.nodeType&&(i>0?e=e.replace(/^&nbsp;/," "):t("previousSibling")||(e=e.replace(/^ /,"&nbsp;")),i<r.length?e=e.replace(/&nbsp;(<br>|)$/," "):t("nextSibling")||(e=e.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),e}function c(){var e,t,n;e=L.getRng(!0),t=e.startContainer,n=e.startOffset,3==t.nodeType&&e.collapsed&&("\xa0"===t.data[n]?(t.deleteData(n,1),/[\u00a0| ]$/.test(o)||(o+=" ")):"\xa0"===t.data[n-1]&&(t.deleteData(n-1,1),/[\u00a0| ]$/.test(o)||(o=" "+o)))}function d(e){if(T)for(_=e.firstChild;_;_=_.walk(!0))A[_.name]&&_.attr("data-mce-new","true")}function f(){if(T){var e=r.getBody(),t=new i(M);u(M.select("*[data-mce-new]"),function(n){n.removeAttribute("data-mce-new");for(var r=n.parentNode;r&&r!=e;r=r.parentNode)t.compare(r,n)&&M.remove(n,!0)})}}function h(e){return e&&!r.schema.getShortEndedElements()[e.nodeName]}function p(e){function t(e){for(var t=r.getBody();e&&e!==t;e=e.parentNode)if("false"===r.dom.getContentEditable(e))return e;return null}function n(e){var t=l.fromRangeStart(e),n=new s(r.getBody());return t=n.next(t),t?t.toRange():void 0}var i,o,a;if(e){if(L.scrollIntoView(e),i=t(e))return M.remove(e),void L.select(i);N=M.createRng(),_=e.previousSibling,_&&3==_.nodeType?(N.setStart(_,_.nodeValue.length),m||(S=e.nextSibling,S&&3==S.nodeType&&(_.appendData(S.data),S.parentNode.removeChild(S)))):(N.setStartBefore(e),N.setEndBefore(e)),o=M.getParent(e,M.isBlock),M.remove(e),o&&M.isEmpty(o)&&(r.$(o).empty(),N.setStart(o,0),N.setEnd(o,0),
-!b(o)&&(a=n(N))?(N=a,M.remove(o)):M.add(o,M.create("br",{"data-mce-bogus":"1"}))),L.setRng(N)}}var g,v,y,C,x,w,E,N,_,S,k,T,R,A=r.schema.getTextInlineElements();"string"!=typeof o&&(T=o.merge,R=o.data,o=o.content),/^ | $/.test(o)&&(o=a(o)),g=r.parser,v=new e({validate:O.validate},r.schema),k='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',w={content:o,format:"html",selection:!0},r.fire("BeforeSetContent",w),o=w.content,-1==o.indexOf("{$caret}")&&(o+="{$caret}"),o=o.replace(/\{\$caret\}/,k),N=L.getRng();var B=N.startContainer||(N.parentElement?N.parentElement():null),D=r.getBody();B===D&&L.isCollapsed()&&M.isBlock(D.firstChild)&&h(D.firstChild)&&M.isEmpty(D.firstChild)&&(N=M.createRng(),N.setStart(D.firstChild,0),N.setEnd(D.firstChild,0),L.setRng(N)),L.isCollapsed()||(r.selection.setRng(r.selection.getRng()),r.getDoc().execCommand("Delete",!1,null),c()),y=L.getNode();var P={context:y.nodeName.toLowerCase(),data:R};if(x=g.parse(o,P),d(x),_=x.lastChild,"mce_marker"==_.attr("id"))for(E=_,_=_.prev;_;_=_.walk(!0))if(3==_.type||!M.isBlock(_.name)){r.schema.isValidChild(_.parent.name,"span")&&_.parent.insert(E,_,"br"===_.name);break}if(r._selectionOverrides.showBlockCaretContainer(y),P.invalid){for(L.setContent(k),y=L.getNode(),C=r.getBody(),9==y.nodeType?y=_=C:_=y;_!==C;)y=_,_=_.parentNode;o=y==C?C.innerHTML:M.getOuterHTML(y),o=v.serialize(g.parse(o.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return v.serialize(x)}))),y==C?M.setHTML(C,o):M.setOuterHTML(y,o)}else o=v.serialize(x),_=y.firstChild,S=y.lastChild,!_||_===S&&"BR"===_.nodeName?M.setHTML(y,o):L.setContent(o);f(),p(M.get("mce_marker")),r.fire("SetContent",w),r.addVisual()},mceInsertRawHTML:function(e,t,n){L.setContent("tiny_mce_marker"),r.setContent(r.getContent().replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){A(n)},mceSetContent:function(e,t,n){r.setContent(n)},"Indent,Outdent":function(e){var t,n,i;t=O.indentation,n=/[a-z%]+$/i.exec(t),t=parseInt(t,10),C("InsertUnorderedList")||C("InsertOrderedList")?T(e):(O.forced_root_block||M.getParent(L.getNode(),M.isBlock)||P.apply("div"),u(L.getSelectedBlocks(),function(o){if("false"!==M.getContentEditable(o)&&"LI"!=o.nodeName){var a=r.getParam("indent_use_margin",!1)?"margin":"padding";a+="rtl"==M.getStyle(o,"direction",!0)?"Right":"Left","outdent"==e?(i=Math.max(0,parseInt(o.style[a]||0,10)-t),M.setStyle(o,a,i?i+n:"")):(i=parseInt(o.style[a]||0,10)+t+n,M.setStyle(o,a,i))}}))},mceRepaint:function(){},InsertHorizontalRule:function(){r.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){r.hasVisual=!r.hasVisual,r.addVisual()},mceReplaceContent:function(e,t,n){r.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,L.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=M.getParent(L.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||P.remove("link"),n.href&&P.apply("link",n,r)},selectAll:function(){var e=M.getRoot(),t;L.getRng().setStart?(t=M.createRng(),t.setStart(e,0),t.setEnd(e,e.childNodes.length),L.setRng(t)):(t=L.getRng(),t.item||(t.moveToElementText(e),t.select()))},"delete":function(){T("Delete");var e=r.getBody();M.isEmpty(e)&&(r.setContent(""),e.firstChild&&M.isBlock(e.firstChild)?r.selection.setCursorLocation(e.firstChild,0):r.selection.setCursorLocation(e,0))},mceNewDocument:function(){r.setContent("")},InsertLineBreak:function(e,t,n){function i(){for(var e=new a(h,m),t,n=r.schema.getNonEmptyElements();t=e.next();)if(n[t.nodeName.toLowerCase()]||t.length>0)return!0}var s=n,l,c,u,d=L.getRng(!0);new o(M).normalize(d);var f=d.startOffset,h=d.startContainer;if(1==h.nodeType&&h.hasChildNodes()){var p=f>h.childNodes.length-1;h=h.childNodes[Math.min(f,h.childNodes.length-1)]||h,f=p&&3==h.nodeType?h.nodeValue.length:0}var m=M.getParent(h,M.isBlock),y=m?m.nodeName.toUpperCase():"",b=m?M.getParent(m.parentNode,M.isBlock):null,C=b?b.nodeName.toUpperCase():"",x=s&&s.ctrlKey;"LI"!=C||x||(m=b,y=C),h&&3==h.nodeType&&f>=h.nodeValue.length&&(g||i()||(l=M.create("br"),d.insertNode(l),d.setStartAfter(l),d.setEndAfter(l),c=!0)),l=M.create("br"),d.insertNode(l);var w=M.doc.documentMode;return g&&"PRE"==y&&(!w||8>w)&&l.parentNode.insertBefore(M.doc.createTextNode("\r"),l),u=M.create("span",{},"&nbsp;"),l.parentNode.insertBefore(u,l),L.scrollIntoView(u),M.remove(u),c?(d.setStartBefore(l),d.setEndBefore(l)):(d.setStartAfter(l),d.setEndAfter(l)),L.setRng(d),r.undoManager.add(),v}}),w({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=L.isCollapsed()?[M.getParent(L.getNode(),M.isBlock)]:L.getSelectedBlocks(),r=f(n,function(e){return!!P.matchNode(e,t)});return-1!==h(r,v)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return R(e)},mceBlockQuote:function(){return R("blockquote")},Outdent:function(){var e;if(O.inline_styles){if((e=M.getParent(L.getStart(),M.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return v;if((e=M.getParent(L.getEnd(),M.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return v}return C("InsertUnorderedList")||C("InsertOrderedList")||!O.inline_styles&&!!M.getParent(L.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=M.getParent(L.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),w({"FontSize,FontName":function(e){var t=0,n;return(n=M.getParent(L.getNode(),"span"))&&(t="fontsize"==e?n.style.fontSize:n.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),t}},"value"),w({Undo:function(){r.undoManager.undo()},Redo:function(){r.undoManager.redo()}})}}),r(ie,[m],function(e){function t(e,o){var a=this,s,l;if(e=r(e),o=a.settings=o||{},s=o.base_uri,/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(a.source=e);var c=0===e.indexOf("//");0!==e.indexOf("/")||c||(e=(s?s.protocol||"http":"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(l=o.base_uri?o.base_uri.path:new t(location.href).directory,""===o.base_uri.protocol?e="//mce_host"+a.toAbsPath(l,e):(e=/([^#?]*)([#?]?.*)/.exec(e),e=(s&&s.protocol||"http")+"://mce_host"+a.toAbsPath(l,e[1])+e[2])),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),n(i,function(t,n){var r=e[n];r&&(r=r.replace(/\(mce_at\)/g,"@@")),a[t]=r}),s&&(a.protocol||(a.protocol=s.protocol),a.userInfo||(a.userInfo=s.userInfo),a.port||"mce_host"!==a.host||(a.port=s.port),a.host&&"mce_host"!==a.host||(a.host=s.host),a.source=""),c&&(a.protocol="")}var n=e.each,r=e.trim,i="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),o={ftp:21,http:80,https:443,mailto:25};return t.prototype={setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var n=this,r;if("./"===e)return e;if(e=new t(e,{base_uri:n}),"mce_host"!=e.host&&n.host!=e.host&&e.host||n.port!=e.port||n.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var i=n.getURI(),o=e.getURI();return i==o||"/"==i.charAt(i.length-1)&&i.substr(0,i.length-1)==o?i:(r=n.toRelPath(n.path,e.path),e.query&&(r+="?"+e.query),e.anchor&&(r+="#"+e.anchor),r)},toAbsolute:function(e,n){return e=new t(e,{base_uri:this}),e.getURI(n&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=o[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r=0,i="",o,a;if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(o=0,a=e.length;a>o;o++)if(o>=n.length||e[o]!=n[o]){r=o+1;break}if(e.length<n.length)for(o=0,a=n.length;a>o;o++)if(o>=e.length||e[o]!=n[o]){r=o+1;break}if(1===r)return t;for(o=0,a=e.length-(r-1);a>o;o++)i+="../";for(o=r-1,a=n.length;a>o;o++)i+=o!=r-1?"/"+n[o]:n[o];return i},toAbsPath:function(e,t){var r,i=0,o=[],a,s;for(a=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),n(e,function(e){e&&o.push(e)}),e=o,r=t.length-1,o=[];r>=0;r--)0!==t[r].length&&"."!==t[r]&&(".."!==t[r]?i>0?i--:o.push(t[r]):i++);return r=e.length-i,s=0>=r?o.reverse().join("/"):e.slice(0,r).join("/")+"/"+o.reverse().join("/"),0!==s.indexOf("/")&&(s="/"+s),a&&s.lastIndexOf("/")!==s.length-1&&(s+=a),s},getURI:function(e){var t,n=this;return n.source&&!e||(t="",e||(t+=n.protocol?n.protocol+"://":"//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},t.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}},t.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},t}),r(oe,[m],function(e){function t(){}var n=e.each,r=e.extend,i,o;return t.extend=i=function(e){function t(){var e,t,n,r=this;if(!o&&(r.init&&r.init.apply(r,arguments),t=r.Mixins))for(e=t.length;e--;)n=t[e],n.init&&n.init.apply(r,arguments)}function a(){return this}function s(e,t){return function(){var n=this,r=n._super,i;return n._super=c[e],i=t.apply(n,arguments),n._super=r,i}}var l=this,c=l.prototype,u,d,f;o=!0,u=new l,o=!1,e.Mixins&&(n(e.Mixins,function(t){for(var n in t)"init"!==n&&(e[n]=t[n])}),c.Mixins&&(e.Mixins=c.Mixins.concat(e.Mixins))),e.Methods&&n(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&n(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this,r;return e!==r?(t[n]=e,t):t[n]}}),e.Statics&&n(e.Statics,function(e,n){t[n]=e}),e.Defaults&&c.Defaults&&(e.Defaults=r({},c.Defaults,e.Defaults));for(d in e)f=e[d],"function"==typeof f&&c[d]?u[d]=s(d,f):u[d]=f;return t.prototype=u,t.constructor=t,t.extend=i,t},t}),r(ae,[m],function(e){function t(t){function n(){return!1}function r(){return!0}function i(e,i){var o,s,l,c;if(e=e.toLowerCase(),i=i||{},i.type=e,i.target||(i.target=u),i.preventDefault||(i.preventDefault=function(){i.isDefaultPrevented=r},i.stopPropagation=function(){i.isPropagationStopped=r},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=r},i.isDefaultPrevented=n,i.isPropagationStopped=n,i.isImmediatePropagationStopped=n),t.beforeFire&&t.beforeFire(i),o=d[e])for(s=0,l=o.length;l>s;s++){if(c=o[s],c.once&&a(e,c.func),i.isImmediatePropagationStopped())return i.stopPropagation(),i;if(c.func.call(u,i)===!1)return i.preventDefault(),i}return i}function o(t,r,i,o){var a,s,l;if(r===!1&&(r=n),r)for(r={func:r},o&&e.extend(r,o),s=t.toLowerCase().split(" "),l=s.length;l--;)t=s[l],a=d[t],a||(a=d[t]=[],f(t,!0)),i?a.unshift(r):a.push(r);return c}function a(e,t){var n,r,i,o,a;if(e)for(o=e.toLowerCase().split(" "),n=o.length;n--;){if(e=o[n],r=d[e],!e){for(i in d)f(i,!1),delete d[i];return c}if(r){if(t)for(a=r.length;a--;)r[a].func===t&&(r=r.slice(0,a).concat(r.slice(a+1)),d[e]=r);else r.length=0;r.length||(f(e,!1),delete d[e])}}else{for(e in d)f(e,!1);d={}}return c}function s(e,t,n){return o(e,t,n,{once:!0})}function l(e){return e=e.toLowerCase(),!(!d[e]||0===d[e].length)}var c=this,u,d={},f;t=t||{},u=t.scope||c,f=t.toggleEvent||n,c.fire=i,c.on=o,c.off=a,c.once=s,c.has=l}var n=e.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchend"," ");return t.isNative=function(e){return!!n[e.toLowerCase()]},t}),r(se,[],function(){function e(e){this.create=e.create}return e.create=function(t,n){return new e({create:function(e,r){function i(t){e.set(r,t.value)}function o(e){t.set(n,e.value)}var a;return e.on("change:"+r,o),t.on("change:"+n,i),a=e._bindings,a||(a=e._bindings=[],e.on("destroy",function(){for(var e=a.length;e--;)a[e]()})),a.push(function(){t.off("change:"+n,i)}),t.get(n)}})},e}),r(le,[ae],function(e){function t(t){return t._eventDispatcher||(t._eventDispatcher=new e({scope:t,toggleEvent:function(n,r){e.isNative(n)&&t.toggleNativeEvent&&t.toggleNativeEvent(n,r)}})),t._eventDispatcher}return{fire:function(e,n,r){var i=this;if(i.removed&&"remove"!==e)return n;if(n=t(i).fire(e,n,r),r!==!1&&i.parent)for(var o=i.parent();o&&!n.isPropagationStopped();)o.fire(e,n,!1),o=o.parent();return n},on:function(e,n,r){return t(this).on(e,n,r)},off:function(e,n){return t(this).off(e,n)},once:function(e,n){return t(this).once(e,n)},hasEventListeners:function(e){return t(this).has(e)}}}),r(ce,[se,le,oe,m],function(e,t,n,r){function i(e){return e.nodeType>0}function o(e,t){var n,a;if(e===t)return!0;if(null===e||null===t)return e===t;if("object"!=typeof e||"object"!=typeof t)return e===t;if(r.isArray(t)){if(e.length!==t.length)return!1;for(n=e.length;n--;)if(!o(e[n],t[n]))return!1}if(i(e)||i(t))return e===t;a={};for(n in t){if(!o(e[n],t[n]))return!1;a[n]=!0}for(n in e)if(!a[n]&&!o(e[n],t[n]))return!1;return!0}return n.extend({Mixins:[t],init:function(t){var n,r;t=t||{};for(n in t)r=t[n],r instanceof e&&(t[n]=r.create(this,n));this.data=t},set:function(t,n){var r,i,a=this.data[t];if(n instanceof e&&(n=n.create(this,t)),"object"==typeof t){for(r in t)this.set(r,t[r]);return this}return o(a,n)||(this.data[t]=n,i={target:this,name:t,value:n,oldValue:a},this.fire("change:"+t,i),this.fire("change",i)),this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(t){return e.create(this,t)},destroy:function(){this.fire("destroy")}})}),r(ue,[oe],function(e){function t(e){for(var t=[],n=e.length,r;n--;)r=e[n],r.__checked||(t.push(r),r.__checked=1);for(n=t.length;n--;)delete t[n].__checked;return t}var n=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i=/^\s*|\s*$/g,o,a=e.extend({init:function(e){function t(e){return e?(e=e.toLowerCase(),function(t){return"*"===e||t.type===e}):void 0}function o(e){return e?function(t){return t._name===e}:void 0}function a(e){return e?(e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.classes.contains(e[n]))return!1;return!0}):void 0}function s(e,t,n){return e?function(r){var i=r[e]?r[e]():"";return t?"="===t?i===n:"*="===t?i.indexOf(n)>=0:"~="===t?(" "+i+" ").indexOf(" "+n+" ")>=0:"!="===t?i!=n:"^="===t?0===i.indexOf(n):"$="===t?i.substr(i.length-n.length)===n:!1:!!n}:void 0}function l(e){var t;return e?(e=/(?:not\((.+)\))|(.+)/i.exec(e),e[1]?(t=u(e[1],[]),function(e){return!d(e,t)}):(e=e[2],function(t,n,r){return"first"===e?0===n:"last"===e?n===r-1:"even"===e?n%2===0:"odd"===e?n%2===1:t[e]?t[e]():!1})):void 0}function c(e,r,c){function u(e){e&&r.push(e)}var d;return d=n.exec(e.replace(i,"")),u(t(d[1])),u(o(d[2])),u(a(d[3])),u(s(d[4],d[5],d[6])),u(l(d[7])),r.pseudo=!!d[7],r.direct=c,r}function u(e,t){var n=[],i,o,a;do if(r.exec(""),o=r.exec(e),o&&(e=o[3],n.push(o[1]),o[2])){i=o[3];break}while(o);for(i&&u(i,t),e=[],a=0;a<n.length;a++)">"!=n[a]&&e.push(c(n[a],[],">"===n[a-1]));return t.push(e),t}var d=this.match;this._selectors=u(e,[])},match:function(e,t){var n,r,i,o,a,s,l,c,u,d,f,h,p;for(t=t||this._selectors,n=0,r=t.length;r>n;n++){for(a=t[n],o=a.length,p=e,h=0,i=o-1;i>=0;i--)for(c=a[i];p;){if(c.pseudo)for(f=p.parent().items(),u=d=f.length;u--&&f[u]!==p;);for(s=0,l=c.length;l>s;s++)if(!c[s](p,u,d)){s=l+1;break}if(s===l){h++;break}if(i===o-1)break;p=p.parent()}if(h===o)return!0}return!1},find:function(e){function n(e,t,i){var o,a,s,l,c,u=t[i];for(o=0,a=e.length;a>o;o++){for(c=e[o],s=0,l=u.length;l>s;s++)if(!u[s](c,o,a)){s=l+1;break}if(s===l)i==t.length-1?r.push(c):c.items&&n(c.items(),t,i+1);else if(u.direct)return;c.items&&n(c.items(),t,i)}}var r=[],i,s,l=this._selectors;if(e.items){for(i=0,s=l.length;s>i;i++)n(e.items(),l[i],0);s>1&&(r=t(r))}return o||(o=a.Collection),new o(r)}});return a}),r(de,[m,ue,oe],function(e,t,n){var r,i,o=Array.prototype.push,a=Array.prototype.slice;return i={length:0,init:function(e){e&&this.add(e)},add:function(t){var n=this;return e.isArray(t)?o.apply(n,t):t instanceof r?n.add(t.toArray()):o.call(n,t),n},set:function(e){var t=this,n=t.length,r;for(t.length=0,t.add(e),r=t.length;n>r;r++)delete t[r];return t},filter:function(e){var n=this,i,o,a=[],s,l;for("string"==typeof e?(e=new t(e),l=function(t){return e.match(t)}):l=e,i=0,o=n.length;o>i;i++)s=n[i],l(s)&&a.push(s);return new r(a)},slice:function(){return new r(a.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(t){return e.each(this,t),this},toArray:function(){return e.toArray(this)},indexOf:function(e){for(var t=this,n=t.length;n--&&t[n]!==e;);return n},reverse:function(){return new r(e.toArray(this).reverse())},hasClass:function(e){return this[0]?this[0].classes.contains(e):!1},prop:function(e,t){var n=this,r,i;return t!==r?(n.each(function(n){n[e]&&n[e](t)}),n):(i=n[0],i&&i[e]?i[e]():void 0)},exec:function(t){var n=this,r=e.toArray(arguments).slice(1);return n.each(function(e){e[t]&&e[t].apply(e,r)}),n},remove:function(){for(var e=this.length;e--;)this[e].remove();return this},addClass:function(e){return this.each(function(t){t.classes.add(e)})},removeClass:function(e){return this.each(function(t){t.classes.remove(e)})}},e.each("fire on off show hide append prepend before after reflow".split(" "),function(t){i[t]=function(){var n=e.toArray(arguments);return this.each(function(e){t in e&&e[t].apply(e,n)}),this}}),e.each("text name disabled active selected checked visible parent value data".split(" "),function(e){i[e]=function(t){return this.prop(e,t)}}),r=n.extend(i),t.Collection=r,r}),r(fe,[m,w],function(e,t){var n=0;return{id:function(){return"mceu_"+n++},create:function(n,r,i){var o=document.createElement(n);return t.DOM.setAttribs(o,r),"string"==typeof i?o.innerHTML=i:e.each(i,function(e){e.nodeType&&o.appendChild(e)}),o},createFragment:function(e){return t.DOM.createFragment(e)},getWindowSize:function(){return t.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var r=e.getBoundingClientRect();t=Math.max(r.width||r.right-r.left,e.offsetWidth),n=Math.max(r.height||r.bottom-r.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,n){return t.DOM.getPos(e,n)},getViewPort:function(e){return t.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,n){return t.DOM.addClass(e,n)},removeClass:function(e,n){return t.DOM.removeClass(e,n)},hasClass:function(e,n){return t.DOM.hasClass(e,n)},toggleClass:function(e,n,r){return t.DOM.toggleClass(e,n,r)},css:function(e,n,r){return t.DOM.setStyle(e,n,r)},getRuntimeStyle:function(e,n){return t.DOM.getStyle(e,n,!0)},on:function(e,n,r,i){return t.DOM.bind(e,n,r,i)},off:function(e,n,r){return t.DOM.unbind(e,n,r)},fire:function(e,n,r){return t.DOM.fire(e,n,r)},innerHtml:function(e,n){t.DOM.setHTML(e,n)}}}),r(he,[],function(){return{parseBox:function(e){var t,n=10;if(e)return"number"==typeof e?(e=e||0,{top:e,left:e,bottom:e,right:e}):(e=e.split(" "),t=e.length,1===t?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],n)||0,right:parseInt(e[1],n)||0,bottom:parseInt(e[2],n)||0,left:parseInt(e[3],n)||0})},measureBox:function(e,t){function n(t){var n=document.defaultView;return n?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),n.getComputedStyle(e,null).getPropertyValue(t)):e.currentStyle[t]}function r(e){var t=parseFloat(n(e),10);return isNaN(t)?0:t}return{top:r(t+"TopWidth"),right:r(t+"RightWidth"),bottom:r(t+"BottomWidth"),left:r(t+"LeftWidth")}}}}),r(pe,[m],function(e){function t(){}function n(e){this.cls=[],this.cls._map={},this.onchange=e||t,this.prefix=""}return e.extend(n.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){for(var t=0;t<this.cls.length&&this.cls[t]!==e;t++);this.cls.splice(t,1),delete this.cls._map[e],this._change()}return this},toggle:function(e,t){var n=this.contains(e);return n!==t&&(n?this.remove(e):this.add(e),this._change()),this},contains:function(e){return!!this.cls._map[e]},_change:function(){delete this.clsValue,this.onchange.call(this)}}),n.prototype.toString=function(){var e;if(this.clsValue)return this.clsValue;e="";for(var t=0;t<this.cls.length;t++)t>0&&(e+=" "),e+=this.prefix+this.cls[t];return e},n}),r(me,[u],function(e){var t={},n;return{add:function(r){var i=r.parent();if(i){if(!i._layout||i._layout.isNative())return;t[i._id]||(t[i._id]=i),n||(n=!0,e.requestAnimationFrame(function(){var e,r;n=!1;for(e in t)r=t[e],r.state.get("rendered")&&r.reflow();t={}},document.body))}},remove:function(e){t[e._id]&&delete t[e._id]}}}),r(ge,[oe,m,ae,ce,de,fe,g,he,pe,me],function(e,t,n,r,i,o,a,s,l,c){function u(e){return e._eventDispatcher||(e._eventDispatcher=new n({scope:e,toggleEvent:function(t,r){r&&n.isNative(t)&&(e._nativeEvents||(e._nativeEvents={}),e._nativeEvents[t]=!0,e.state.get("rendered")&&d(e))}})),e._eventDispatcher}function d(e){function t(t){var n=e.getParentCtrl(t.target);n&&n.fire(t.type,t)}function n(){var e=c._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),c._lastHoverCtrl=null)}function r(t){var n=e.getParentCtrl(t.target),r=c._lastHoverCtrl,i=0,o,a,s;if(n!==r){if(c._lastHoverCtrl=n,a=n.parents().toArray().reverse(),a.push(n),r){for(s=r.parents().toArray().reverse(),s.push(r),i=0;i<s.length&&a[i]===s[i];i++);for(o=s.length-1;o>=i;o--)r=s[o],r.fire("mouseleave",{target:r.getEl()})}for(o=i;o<a.length;o++)n=a[o],n.fire("mouseenter",{target:n.getEl()})}}function i(t){t.preventDefault(),"mousewheel"==t.type?(t.deltaY=-1/40*t.wheelDelta,t.wheelDeltaX&&(t.deltaX=-1/40*t.wheelDeltaX)):(t.deltaX=0,t.deltaY=t.detail),t=e.fire("wheel",t)}var o,s,l,c,u,d;if(u=e._nativeEvents){for(l=e.parents().toArray(),l.unshift(e),o=0,s=l.length;!c&&s>o;o++)c=l[o]._eventsRoot;for(c||(c=l[l.length-1]||e),e._eventsRoot=c,s=o,o=0;s>o;o++)l[o]._eventsRoot=c;var p=c._delegates;p||(p=c._delegates={});for(d in u){if(!u)return!1;"wheel"!==d||h?("mouseenter"===d||"mouseleave"===d?c._hasMouseEnter||(a(c.getEl()).on("mouseleave",n).on("mouseover",r),c._hasMouseEnter=1):p[d]||(a(c.getEl()).on(d,t),p[d]=!0),u[d]=!1):f?a(e.getEl()).on("mousewheel",i):a(e.getEl()).on("DOMMouseScroll",i)}}}var f="onmousewheel"in document,h=!1,p="mce-",m,g=0,v={Statics:{classPrefix:p},isRtl:function(){return m.rtl},classPrefix:p,init:function(e){function n(e){var t;for(e=e.split(" "),t=0;t<e.length;t++)i.classes.add(e[t])}var i=this,o,c;i.settings=e=t.extend({},i.Defaults,e),i._id=e.id||"mceu_"+g++,i._aria={role:e.role},i._elmCache={},i.$=a,i.state=new r({visible:!0,active:!1,disabled:!1,value:""}),i.data=new r(e.data),i.classes=new l(function(){i.state.get("rendered")&&(i.getEl().className=this.toString())}),i.classes.prefix=i.classPrefix,o=e.classes,o&&(i.Defaults&&(c=i.Defaults.classes,c&&o!=c&&n(c)),n(o)),t.each("title text name visible disabled active value".split(" "),function(t){t in e&&i[t](e[t])}),i.on("click",function(){return i.disabled()?!1:void 0}),i.settings=e,i.borderBox=s.parseBox(e.border),i.paddingBox=s.parseBox(e.padding),i.marginBox=s.parseBox(e.margin),e.hidden&&i.hide()},Properties:"parent,name",getContainerElm:function(){return document.body},getParentCtrl:function(e){for(var t,n=this.getRoot().controlIdLookup;e&&n&&!(t=n[e.id]);)e=e.parentNode;return t},initLayoutRect:function(){var e=this,t=e.settings,n,r,i=e.getEl(),a,l,c,u,d,f,h,p;n=e.borderBox=e.borderBox||s.measureBox(i,"border"),e.paddingBox=e.paddingBox||s.measureBox(i,"padding"),e.marginBox=e.marginBox||s.measureBox(i,"margin"),p=o.getSize(i),f=t.minWidth,h=t.minHeight,c=f||p.width,u=h||p.height,a=t.width,l=t.height,d=t.autoResize,d="undefined"!=typeof d?d:!a&&!l,a=a||c,l=l||u;var m=n.left+n.right,g=n.top+n.bottom,v=t.maxWidth||65535,y=t.maxHeight||65535;return e._layoutRect=r={x:t.x||0,y:t.y||0,w:a,h:l,deltaW:m,deltaH:g,contentW:a-m,contentH:l-g,innerW:a-m,innerH:l-g,startMinWidth:f||0,startMinHeight:h||0,minW:Math.min(c,v),minH:Math.min(u,y),maxW:v,maxH:y,autoResize:d,scrollW:0},e._lastLayoutRect={},r},layoutRect:function(e){var t=this,n=t._layoutRect,r,i,o,a,s,l;return n||(n=t.initLayoutRect()),e?(o=n.deltaW,a=n.deltaH,e.x!==s&&(n.x=e.x),e.y!==s&&(n.y=e.y),e.minW!==s&&(n.minW=e.minW),e.minH!==s&&(n.minH=e.minH),i=e.w,i!==s&&(i=i<n.minW?n.minW:i,i=i>n.maxW?n.maxW:i,n.w=i,n.innerW=i-o),i=e.h,i!==s&&(i=i<n.minH?n.minH:i,i=i>n.maxH?n.maxH:i,n.h=i,n.innerH=i-a),i=e.innerW,i!==s&&(i=i<n.minW-o?n.minW-o:i,i=i>n.maxW-o?n.maxW-o:i,n.innerW=i,n.w=i+o),i=e.innerH,i!==s&&(i=i<n.minH-a?n.minH-a:i,i=i>n.maxH-a?n.maxH-a:i,n.innerH=i,n.h=i+a),e.contentW!==s&&(n.contentW=e.contentW),e.contentH!==s&&(n.contentH=e.contentH),r=t._lastLayoutRect,r.x===n.x&&r.y===n.y&&r.w===n.w&&r.h===n.h||(l=m.repaintControls,l&&l.map&&!l.map[t._id]&&(l.push(t),l.map[t._id]=!0),r.x=n.x,r.y=n.y,r.w=n.w,r.h=n.h),t):n},repaint:function(){var e=this,t,n,r,i,o,a,s,l,c,u;c=document.createRange?function(e){return e}:Math.round,t=e.getEl().style,i=e._layoutRect,l=e._lastRepaintRect||{},o=e.borderBox,a=o.left+o.right,s=o.top+o.bottom,i.x!==l.x&&(t.left=c(i.x)+"px",l.x=i.x),i.y!==l.y&&(t.top=c(i.y)+"px",l.y=i.y),i.w!==l.w&&(u=c(i.w-a),t.width=(u>=0?u:0)+"px",l.w=i.w),i.h!==l.h&&(u=c(i.h-s),t.height=(u>=0?u:0)+"px",l.h=i.h),e._hasBody&&i.innerW!==l.innerW&&(u=c(i.innerW),r=e.getEl("body"),r&&(n=r.style,n.width=(u>=0?u:0)+"px"),l.innerW=i.innerW),e._hasBody&&i.innerH!==l.innerH&&(u=c(i.innerH),r=r||e.getEl("body"),r&&(n=n||r.style,n.height=(u>=0?u:0)+"px"),l.innerH=i.innerH),e._lastRepaintRect=l,e.fire("repaint",{},!1)},updateLayoutRect:function(){var e=this;e.parent()._lastRect=null,o.css(e.getEl(),{width:"",height:""}),e._layoutRect=e._lastRepaintRect=e._lastLayoutRect=null,e.initLayoutRect()},on:function(e,t){function n(e){var t,n;return"string"!=typeof e?e:function(i){return t||r.parentsAndSelf().each(function(r){var i=r.settings.callbacks;return i&&(t=i[e])?(n=r,!1):void 0}),t?t.call(n,i):(i.action=e,void this.fire("execute",i))}}var r=this;return u(r).on(e,n(t)),r},off:function(e,t){return u(this).off(e,t),this},fire:function(e,t,n){var r=this;if(t=t||{},t.control||(t.control=r),t=u(r).fire(e,t),n!==!1&&r.parent)for(var i=r.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return u(this).has(e)},parents:function(e){var t=this,n,r=new i;for(n=t.parent();n;n=n.parent())r.add(n);return e&&(r=r.filter(e)),r},parentsAndSelf:function(e){return new i(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=a("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,r=n.getEl(n.ariaTarget);return"undefined"==typeof t?n._aria[e]:(n._aria[e]=t,n.state.get("rendered")&&r.setAttribute("role"==e?e:"aria-"+e,t),n)},encode:function(e,t){return t!==!1&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return m.translate?m.translate(e):e},before:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t),!0),t},after:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t)),t},remove:function(){var e=this,t=e.getEl(),n=e.parent(),r,i;if(e.items){var o=e.items().toArray();for(i=o.length;i--;)o[i].remove()}n&&n.items&&(r=[],n.items().each(function(t){t!==e&&r.push(t)}),n.items().set(r),n._lastRect=null),e._eventsRoot&&e._eventsRoot==e&&a(t).off();var s=e.getRoot().controlIdLookup;return s&&delete s[e._id],t&&t.parentNode&&t.parentNode.removeChild(t),e.state.set("rendered",!1),e.state.destroy(),e.fire("remove"),e},renderBefore:function(e){return a(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return a(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'"></div>'},postRender:function(){var e=this,t=e.settings,n,r,i,o,s;e.$el=a(e.getEl()),e.state.set("rendered",!0);for(o in t)0===o.indexOf("on")&&e.on(o.substr(2),t[o]);if(e._eventsRoot){for(i=e.parent();!s&&i;i=i.parent())s=i._eventsRoot;if(s)for(o in s._nativeEvents)e._nativeEvents[o]=!0}d(e),t.style&&(n=e.getEl(),n&&(n.setAttribute("style",t.style),n.style.cssText=t.style)),e.settings.border&&(r=e.borderBox,e.$el.css({"border-top-width":r.top,"border-right-width":r.right,"border-bottom-width":r.bottom,"border-left-width":r.left}));var l=e.getRoot();l.controlIdLookup||(l.controlIdLookup={}),l.controlIdLookup[e._id]=e;for(var u in e._aria)e.aria(u,e._aria[u]);e.state.get("visible")===!1&&(e.getEl().style.display="none"),e.bindStates(),e.state.on("change:visible",function(t){var n=t.value,r;e.state.get("rendered")&&(e.getEl().style.display=n===!1?"none":"",e.getEl().getBoundingClientRect()),r=e.parent(),r&&(r._lastRect=null),e.fire(n?"show":"hide"),c.add(e)}),e.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){function t(e,t){var n,r,i=e;for(n=r=0;i&&i!=t&&i.nodeType;)n+=i.offsetLeft||0,r+=i.offsetTop||0,i=i.offsetParent;return{x:n,y:r}}var n=this.getEl(),r=n.parentNode,i,o,a,s,l,c,u=t(n,r);return i=u.x,o=u.y,a=n.offsetWidth,s=n.offsetHeight,l=r.clientWidth,c=r.clientHeight,"end"==e?(i-=l-a,o-=c-s):"center"==e&&(i-=l/2-a/2,o-=c/2-s/2),r.scrollLeft=i,r.scrollTop=o,this},getRoot:function(){for(var e=this,t,n=[];e;){if(e.rootControl){t=e.rootControl;break}n.push(e),t=e,e=e.parent()}t||(t=this);for(var r=n.length;r--;)n[r].rootControl=t;return t},reflow:function(){c.remove(this);var e=this.parent();return e._layout&&!e._layout.isNative()&&e.reflow(),this}};return t.each("text title visible disabled active value".split(" "),function(e){v[e]=function(t){return 0===arguments.length?this.state.get(e):("undefined"!=typeof t&&this.state.set(e,t),this)}}),m=e.extend(v)}),r(ve,[],function(){var e={},t;return{add:function(t,n){e[t.toLowerCase()]=n},has:function(t){return!!e[t.toLowerCase()]},create:function(n,r){var i,o,a;if(!t){a=tinymce.ui;for(o in a)e[o.toLowerCase()]=a[o];t=!0}if("string"==typeof n?(r=r||{},r.type=n):(r=n,n=r.type),n=n.toLowerCase(),i=e[n],!i)throw new Error("Could not find control by type: "+n);return i=new i(r),i.type=n,i}}}),r(ye,[],function(){return function(e){function t(e){return e&&1===e.nodeType}function n(e){return e=e||C,t(e)?e.getAttribute("role"):null}function r(e){for(var t,r=e||C;r=r.parentNode;)if(t=n(r))return t}function i(e){var n=C;return t(n)?n.getAttribute("aria-"+e):void 0}function o(e){var t=e.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t||"SELECT"==t}function a(e){return o(e)&&!e.hidden?!0:!!/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(n(e))}function s(e){function t(e){if(1==e.nodeType&&"none"!=e.style.display){a(e)&&n.push(e);for(var r=0;r<e.childNodes.length;r++)t(e.childNodes[r])}}var n=[];return t(e||b.getEl()),n}function l(e){var t,n;e=e||x,n=e.parents().toArray(),
-n.unshift(e);for(var r=0;r<n.length&&(t=n[r],!t.settings.ariaRoot);r++);return t}function c(e){var t=l(e),n=s(t.getEl());t.settings.ariaRemember&&"lastAriaIndex"in t?u(t.lastAriaIndex,n):u(0,n)}function u(e,t){return 0>e?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function d(e,t){var n=-1,r=l();t=t||s(r.getEl());for(var i=0;i<t.length;i++)t[i]===C&&(n=i);n+=e,r.lastAriaIndex=u(n,t)}function f(){var e=r();"tablist"==e?d(-1,s(C.parentNode)):x.parent().submenu?v():d(-1)}function h(){var e=n(),t=r();"tablist"==t?d(1,s(C.parentNode)):"menuitem"==e&&"menu"==t&&i("haspopup")?y():d(1)}function p(){d(-1)}function m(){var e=n(),t=r();"menuitem"==e&&"menubar"==t?y():"button"==e&&i("haspopup")?y({key:"down"}):d(1)}function g(e){var t=r();if("tablist"==t){var n=s(x.getEl("body"))[0];n&&n.focus()}else d(e.shiftKey?-1:1)}function v(){x.fire("cancel")}function y(e){e=e||{},x.fire("click",{target:C,aria:e})}var b=e.root,C,x;try{C=document.activeElement}catch(w){C=document.body}return x=b.getParentCtrl(C),b.on("keydown",function(e){function t(e,t){o(C)||"slider"!==n(C)&&t(e)!==!1&&e.preventDefault()}if(!e.isDefaultPrevented())switch(e.keyCode){case 37:t(e,f);break;case 39:t(e,h);break;case 38:t(e,p);break;case 40:t(e,m);break;case 27:v();break;case 14:case 13:case 32:t(e,y);break;case 9:g(e)!==!1&&e.preventDefault()}}),b.on("focusin",function(e){C=e.target,x=e.control}),{focusFirst:c}}}),r(be,[ge,de,ue,ve,ye,m,g,pe,me],function(e,t,n,r,i,o,a,s,l){var c={};return e.extend({init:function(e){var n=this;n._super(e),e=n.settings,e.fixed&&n.state.set("fixed",!0),n._items=new t,n.isRtl()&&n.classes.add("rtl"),n.bodyClasses=new s(function(){n.state.get("rendered")&&(n.getEl("body").className=this.toString())}),n.bodyClasses.prefix=n.classPrefix,n.classes.add("container"),n.bodyClasses.add("container-body"),e.containerCls&&n.classes.add(e.containerCls),n._layout=r.create((e.layout||"")+"layout"),n.settings.items?n.add(n.settings.items):n.add(n.render()),n._hasBody=!0},items:function(){return this._items},find:function(e){return e=c[e]=c[e]||new n(e),e.find(this)},add:function(e){var t=this;return t.items().add(t.create(e)).parent(t),t},focus:function(e){var t=this,n,r,i;return e&&(r=t.keyboardNav||t.parents().eq(-1)[0].keyboardNav)?void r.focusFirst(t):(i=t.find("*"),t.statusbar&&i.add(t.statusbar.items()),i.each(function(e){return e.settings.autofocus?(n=null,!1):void(e.canFocus&&(n=n||e))}),n&&n.focus(),t)},replace:function(e,t){for(var n,r=this.items(),i=r.length;i--;)if(r[i]===e){r[i]=t;break}i>=0&&(n=t.getEl(),n&&n.parentNode.removeChild(n),n=e.getEl(),n&&n.parentNode.removeChild(n)),t.parent(this)},create:function(t){var n=this,i,a=[];return o.isArray(t)||(t=[t]),o.each(t,function(t){t&&(t instanceof e||("string"==typeof t&&(t={type:t}),i=o.extend({},n.settings.defaults,t),t.type=i.type=i.type||t.type||n.settings.defaultType||(i.defaults?i.defaults.type:null),t=r.create(i)),a.push(t))}),a},renderNew:function(){var e=this;return e.items().each(function(t,n){var r;t.parent(e),t.state.get("rendered")||(r=e.getEl("body"),r.hasChildNodes()&&n<=r.childNodes.length-1?a(r.childNodes[n]).before(t.renderHtml()):a(r).append(t.renderHtml()),t.postRender(),l.add(t))}),e._layout.applyClasses(e.items().filter(":visible")),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){var t=this;return t.items().set(t.create(e).concat(t.items().toArray())),t.renderNew()},insert:function(e,t,n){var r=this,i,o,a;return e=r.create(e),i=r.items(),!n&&t<i.length-1&&(t+=1),t>=0&&t<i.length&&(o=i.slice(0,t).toArray(),a=i.slice(t).toArray(),i.set(o.concat(e,a))),r.renderNew()},fromJSON:function(e){var t=this;for(var n in e)t.find("#"+n).value(e[n]);return t},toJSON:function(){var e=this,t={};return e.find("*").each(function(e){var n=e.name(),r=e.value();n&&"undefined"!=typeof r&&(t[n]=r)}),t},renderHtml:function(){var e=this,t=e._layout,n=this.settings.role;return e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'"'+(n?' role="'+this.settings.role+'"':"")+'><div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"},postRender:function(){var e=this,t;return e.items().exec("postRender"),e._super(),e._layout.postRender(e),e.state.set("rendered",!0),e.settings.style&&e.$el.css(e.settings.style),e.settings.border&&(t=e.borderBox,e.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),e.parent()||(e.keyboardNav=new i({root:e})),e},initLayoutRect:function(){var e=this,t=e._super();return e._layout.recalc(e),t},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;return n&&n.w==t.w&&n.h==t.h?void 0:(e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0)},reflow:function(){var t;if(l.remove(this),this.visible()){for(e.repaintControls=[],e.repaintControls.map={},this.recalc(),t=e.repaintControls.length;t--;)e.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),e.repaintControls=[]}return this}})}),r(Ce,[g],function(e){function t(e){var t,n,r,i,o,a,s,l,c=Math.max;return t=e.documentElement,n=e.body,r=c(t.scrollWidth,n.scrollWidth),i=c(t.clientWidth,n.clientWidth),o=c(t.offsetWidth,n.offsetWidth),a=c(t.scrollHeight,n.scrollHeight),s=c(t.clientHeight,n.clientHeight),l=c(t.offsetHeight,n.offsetHeight),{width:o>r?i:r,height:l>a?s:a}}function n(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<t.length;n++)e[t[n]]=e.changedTouches[0][t[n]]}return function(r,i){function o(){return s.getElementById(i.handle||r)}var a,s=i.document||document,l,c,u,d,f,h;i=i||{},c=function(r){var c=t(s),p,m;n(r),r.preventDefault(),l=r.button,p=o(),f=r.screenX,h=r.screenY,m=window.getComputedStyle?window.getComputedStyle(p,null).getPropertyValue("cursor"):p.runtimeStyle.cursor,a=e("<div>").css({position:"absolute",top:0,left:0,width:c.width,height:c.height,zIndex:2147483647,opacity:1e-4,cursor:m}).appendTo(s.body),e(s).on("mousemove touchmove",d).on("mouseup touchend",u),i.start(r)},d=function(e){return n(e),e.button!==l?u(e):(e.deltaX=e.screenX-f,e.deltaY=e.screenY-h,e.preventDefault(),void i.drag(e))},u=function(t){n(t),e(s).off("mousemove touchmove",d).off("mouseup touchend",u),a.remove(),i.stop&&i.stop(t)},this.destroy=function(){e(o()).off()},e(o()).on("mousedown touchstart",c)}}),r(xe,[g,Ce],function(e,t){return{init:function(){var e=this;e.on("repaint",e.renderScroll)},renderScroll:function(){function n(){function t(t,a,s,l,c,u){var d,f,h,p,m,g,v,y,b;if(f=i.getEl("scroll"+t)){if(y=a.toLowerCase(),b=s.toLowerCase(),e(i.getEl("absend")).css(y,i.layoutRect()[l]-1),!c)return void e(f).css("display","none");e(f).css("display","block"),d=i.getEl("body"),h=i.getEl("scroll"+t+"t"),p=d["client"+s]-2*o,p-=n&&r?f["client"+u]:0,m=d["scroll"+s],g=p/m,v={},v[y]=d["offset"+a]+o,v[b]=p,e(f).css(v),v={},v[y]=d["scroll"+a]*g,v[b]=p*g,e(h).css(v)}}var n,r,a;a=i.getEl("body"),n=a.scrollWidth>a.clientWidth,r=a.scrollHeight>a.clientHeight,t("h","Left","Width","contentW",n,"Height"),t("v","Top","Height","contentH",r,"Width")}function r(){function n(n,r,a,s,l){var c,u=i._id+"-scroll"+n,d=i.classPrefix;e(i.getEl()).append('<div id="'+u+'" class="'+d+"scrollbar "+d+"scrollbar-"+n+'"><div id="'+u+'t" class="'+d+'scrollbar-thumb"></div></div>'),i.draghelper=new t(u+"t",{start:function(){c=i.getEl("body")["scroll"+r],e("#"+u).addClass(d+"active")},drag:function(e){var t,u,d,f,h=i.layoutRect();u=h.contentW>h.innerW,d=h.contentH>h.innerH,f=i.getEl("body")["client"+a]-2*o,f-=u&&d?i.getEl("scroll"+n)["client"+l]:0,t=f/i.getEl("body")["scroll"+a],i.getEl("body")["scroll"+r]=c+e["delta"+s]/t},stop:function(){e("#"+u).removeClass(d+"active")}})}i.classes.add("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}var i=this,o=2;i.settings.autoScroll&&(i._hasScroll||(i._hasScroll=!0,r(),i.on("wheel",function(e){var t=i.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),e(i.getEl("body")).on("scroll",n)),n())}}}),r(we,[be,xe],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),"undefined"==typeof n?n='<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+t.renderHtml(e)+"</div>":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1" role="group">'+(e._preBodyHtml||"")+n+"</div>"}})}),r(Ee,[fe],function(e){function t(t,n,r){var i,o,a,s,l,c,u,d,f,h;return f=e.getViewPort(),o=e.getPos(n),a=o.x,s=o.y,t.state.get("fixed")&&"static"==e.getRuntimeStyle(document.body,"position")&&(a-=f.x,s-=f.y),i=t.getEl(),h=e.getSize(i),l=h.width,c=h.height,h=e.getSize(n),u=h.width,d=h.height,r=(r||"").split(""),"b"===r[0]&&(s+=d),"r"===r[1]&&(a+=u),"c"===r[0]&&(s+=Math.round(d/2)),"c"===r[1]&&(a+=Math.round(u/2)),"b"===r[3]&&(s-=c),"r"===r[4]&&(a-=l),"c"===r[3]&&(s-=Math.round(c/2)),"c"===r[4]&&(a-=Math.round(l/2)),{x:a,y:s,w:l,h:c}}return{testMoveRel:function(n,r){for(var i=e.getViewPort(),o=0;o<r.length;o++){var a=t(this,n,r[o]);if(this.state.get("fixed")){if(a.x>0&&a.x+a.w<i.w&&a.y>0&&a.y+a.h<i.h)return r[o]}else if(a.x>i.x&&a.x+a.w<i.w+i.x&&a.y>i.y&&a.y+a.h<i.h+i.y)return r[o]}return r[0]},moveRel:function(e,n){"string"!=typeof n&&(n=this.testMoveRel(e,n));var r=t(this,e,n);return this.moveTo(r.x,r.y)},moveBy:function(e,t){var n=this,r=n.layoutRect();return n.moveTo(r.x+e,r.y+t),n},moveTo:function(t,n){function r(e,t,n){return 0>e?0:e+n>t?(e=t-n,0>e?0:e):e}var i=this;if(i.settings.constrainToViewport){var o=e.getViewPort(window),a=i.layoutRect();t=r(t,o.w+o.x,a.w),n=r(n,o.h+o.y,a.h)}return i.state.get("rendered")?i.layoutRect({x:t,y:n}).repaint():(i.settings.x=t,i.settings.y=n),i.fire("move",{x:t,y:n}),i}}}),r(Ne,[fe],function(e){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,n){if(1>=t||1>=n){var r=e.getWindowSize();t=1>=t?t*r.w:t,n=1>=n?n*r.h:n}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:n,w:t,h:n}).reflow()},resizeBy:function(e,t){var n=this,r=n.layoutRect();return n.resizeTo(r.w+e,r.h+t)}}}),r(_e,[we,Ee,Ne,fe,g,u],function(e,t,n,r,i,o){function a(e,t){for(;e;){if(e==t)return!0;e=e.parent()}}function s(e){for(var t=v.length;t--;){var n=v[t],r=n.getParentCtrl(e.target);if(n.settings.autohide){if(r&&(a(r,n)||n.parent()===r))continue;e=n.fire("autohide",{target:e.target}),e.isDefaultPrevented()||n.hide()}}}function l(){p||(p=function(e){2!=e.button&&s(e)},i(document).on("click touchstart",p))}function c(){m||(m=function(){var e;for(e=v.length;e--;)d(v[e])},i(window).on("scroll",m))}function u(){if(!g){var e=document.documentElement,t=e.clientWidth,n=e.clientHeight;g=function(){document.all&&t==e.clientWidth&&n==e.clientHeight||(t=e.clientWidth,n=e.clientHeight,C.hideAll())},i(window).on("resize",g)}}function d(e){function t(t,n){for(var r,i=0;i<v.length;i++)if(v[i]!=e)for(r=v[i].parent();r&&(r=r.parent());)r==e&&v[i].fixed(t).moveBy(0,n).repaint()}var n=r.getViewPort().y;e.settings.autofix&&(e.state.get("fixed")?e._autoFixY>n&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),t(!1,e._autoFixY-n)):(e._autoFixY=e.layoutRect().y,e._autoFixY<n&&(e.fixed(!0).layoutRect({y:0}).repaint(),t(!0,n-e._autoFixY))))}function f(e,t){var n,r=C.zIndex||65535,o;if(e)y.push(t);else for(n=y.length;n--;)y[n]===t&&y.splice(n,1);if(y.length)for(n=0;n<y.length;n++)y[n].modal&&(r++,o=y[n]),y[n].getEl().style.zIndex=r,y[n].zIndex=r,r++;var a=i("#"+t.classPrefix+"modal-block",t.getContainerElm())[0];o?i(a).css("z-index",o.zIndex-1):a&&(a.parentNode.removeChild(a),b=!1),C.currentZIndex=r}function h(e){var t;for(t=v.length;t--;)v[t]===e&&v.splice(t,1);for(t=y.length;t--;)y[t]===e&&y.splice(t,1)}var p,m,g,v=[],y=[],b,C=e.extend({Mixins:[t,n],init:function(e){var t=this;t._super(e),t._eventsRoot=t,t.classes.add("floatpanel"),e.autohide&&(l(),u(),v.push(t)),e.autofix&&(c(),t.on("move",function(){d(this)})),t.on("postrender show",function(e){if(e.control==t){var n,r=t.classPrefix;t.modal&&!b&&(n=i("#"+r+"modal-block",t.getContainerElm()),n[0]||(n=i('<div id="'+r+'modal-block" class="'+r+"reset "+r+'fade"></div>').appendTo(t.getContainerElm())),o.setTimeout(function(){n.addClass(r+"in"),i(t.getEl()).addClass(r+"in")}),b=!0),f(!0,t)}}),t.on("show",function(){t.parents().each(function(e){return e.state.get("fixed")?(t.fixed(!0),!1):void 0})}),e.popover&&(t._preBodyHtml='<div class="'+t.classPrefix+'arrow"></div>',t.classes.add("popover").add("bottom").add(t.isRtl()?"end":"start")),t.aria("label",e.ariaLabel),t.aria("labelledby",t._id),t.aria("describedby",t.describedBy||t._id+"-none")},fixed:function(e){var t=this;if(t.state.get("fixed")!=e){if(t.state.get("rendered")){var n=r.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.classes.toggle("fixed",e),t.state.set("fixed",e)}return t},show:function(){var e=this,t,n=e._super();for(t=v.length;t--&&v[t]!==e;);return-1===t&&v.push(e),n},hide:function(){return h(this),f(!1,this),this._super()},hideAll:function(){C.hideAll()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||(e.remove(),f(!1,e)),e},remove:function(){h(this),this._super()},postRender:function(){var e=this;return e.settings.bodyRole&&this.getEl("body").setAttribute("role",e.settings.bodyRole),e._super()}});return C.hideAll=function(){for(var e=v.length;e--;){var t=v[e];t&&t.settings.autohide&&(t.hide(),v.splice(e,1))}},C}),r(Se,[_e,we,fe,g,Ce,he,h,u],function(e,t,n,r,i,o,a,s){function l(e){var t="width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0",n=r("meta[name=viewport]")[0],i;a.overrideViewPort!==!1&&(n||(n=document.createElement("meta"),n.setAttribute("name","viewport"),document.getElementsByTagName("head")[0].appendChild(n)),i=n.getAttribute("content"),i&&"undefined"!=typeof f&&(f=i),n.setAttribute("content",e?t:f))}function c(e){for(var t=0;t<d.length;t++)if(d[t]._fullscreen)return;r([document.documentElement,document.body]).removeClass(e+"fullscreen")}function u(){function e(){var e,t=n.getWindowSize(),r;for(e=0;e<d.length;e++)r=d[e].layoutRect(),d[e].moveTo(d[e].settings.x||Math.max(0,t.w/2-r.w/2),d[e].settings.y||Math.max(0,t.h/2-r.h/2))}if(!a.desktop){var t={w:window.innerWidth,h:window.innerHeight};s.setInterval(function(){var e=window.innerWidth,n=window.innerHeight;t.w==e&&t.h==n||(t={w:e,h:n},r(window).trigger("resize"))},100)}r(window).on("resize",e)}var d=[],f="",h=e.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(e){var r=this;r._super(e),r.isRtl()&&r.classes.add("rtl"),r.classes.add("window"),r.bodyClasses.add("window-body"),r.state.set("fixed",!0),e.buttons&&(r.statusbar=new t({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:r.isRtl()?"start":"end",defaults:{type:"button"},items:e.buttons}),r.statusbar.classes.add("foot"),r.statusbar.parent(r)),r.on("click",function(e){var t=r.classPrefix+"close";(n.hasClass(e.target,t)||n.hasClass(e.target.parentNode,t))&&r.close()}),r.on("cancel",function(){r.close()}),r.aria("describedby",r.describedBy||r._id+"-none"),r.aria("label",e.title),r._fullscreen=!1},recalc:function(){var e=this,t=e.statusbar,r,i,o,a;e._fullscreen&&(e.layoutRect(n.getWindowSize()),e.layoutRect().contentH=e.layoutRect().innerH),e._super(),r=e.layoutRect(),e.settings.title&&!e._fullscreen&&(i=r.headerW,i>r.w&&(o=r.x-Math.max(0,i/2),e.layoutRect({w:i,x:o}),a=!0)),t&&(t.layoutRect({w:e.layoutRect().innerW}).recalc(),i=t.layoutRect().minW+r.deltaW,i>r.w&&(o=r.x-Math.max(0,i-r.w),e.layoutRect({w:i,x:o}),a=!0)),a&&e.recalc()},initLayoutRect:function(){var e=this,t=e._super(),r=0,i;if(e.settings.title&&!e._fullscreen){i=e.getEl("head");var o=n.getSize(i);t.headerW=o.width,t.headerH=o.height,r+=t.headerH}e.statusbar&&(r+=e.statusbar.layoutRect().h),t.deltaH+=r,t.minH+=r,t.h+=r;var a=n.getWindowSize();return t.x=e.settings.x||Math.max(0,a.w/2-t.w/2),t.y=e.settings.y||Math.max(0,a.h/2-t.h/2),t},renderHtml:function(){var e=this,t=e._layout,n=e._id,r=e.classPrefix,i=e.settings,o="",a="",s=i.html;return e.preRender(),t.preRender(e),i.title&&(o='<div id="'+n+'-head" class="'+r+'window-head"><div id="'+n+'-title" class="'+r+'title">'+e.encode(i.title)+'</div><div id="'+n+'-dragh" class="'+r+'dragh"></div><button type="button" class="'+r+'close" aria-hidden="true"><i class="mce-ico mce-i-remove"></i></button></div>'),i.url&&(s='<iframe src="'+i.url+'" tabindex="-1"></iframe>'),"undefined"==typeof s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'<div id="'+n+'" class="'+e.classes+'" hidefocus="1"><div class="'+e.classPrefix+'reset" role="application">'+o+'<div id="'+n+'-body" class="'+e.bodyClasses+'">'+s+"</div>"+a+"</div></div>"},fullscreen:function(e){var t=this,i=document.documentElement,a,l=t.classPrefix,c;if(e!=t._fullscreen)if(r(window).on("resize",function(){var e;if(t._fullscreen)if(a)t._timer||(t._timer=s.setTimeout(function(){var e=n.getWindowSize();t.moveTo(0,0).resizeTo(e.w,e.h),t._timer=0},50));else{e=(new Date).getTime();var r=n.getWindowSize();t.moveTo(0,0).resizeTo(r.w,r.h),(new Date).getTime()-e>50&&(a=!0)}}),c=t.layoutRect(),t._fullscreen=e,e){t._initial={x:c.x,y:c.y,w:c.w,h:c.h},t.borderBox=o.parseBox("0"),t.getEl("head").style.display="none",c.deltaH-=c.headerH+2,r([i,document.body]).addClass(l+"fullscreen"),t.classes.add("fullscreen");var u=n.getWindowSize();t.moveTo(0,0).resizeTo(u.w,u.h)}else t.borderBox=o.parseBox(t.settings.border),t.getEl("head").style.display="",c.deltaH+=c.headerH,r([i,document.body]).removeClass(l+"fullscreen"),t.classes.remove("fullscreen"),t.moveTo(t._initial.x,t._initial.y).resizeTo(t._initial.w,t._initial.h);return t.reflow()},postRender:function(){var e=this,t;setTimeout(function(){e.classes.add("in"),e.fire("open")},0),e._super(),e.statusbar&&e.statusbar.postRender(),e.focus(),this.dragHelper=new i(e._id+"-dragh",{start:function(){t={x:e.layoutRect().x,y:e.layoutRect().y}},drag:function(n){e.moveTo(t.x+n.deltaX,t.y+n.deltaY)}}),e.on("submit",function(t){t.isDefaultPrevented()||e.close()}),d.push(e),l(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e=this,t;for(e.dragHelper.destroy(),e._super(),e.statusbar&&this.statusbar.remove(),t=d.length;t--;)d[t]===e&&d.splice(t,1);l(d.length>0),c(e.classPrefix)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});return u(),h}),r(ke,[Se],function(e){var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(n){function r(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),o(t)}}}var i,o=n.callback||function(){};switch(n.buttons){case t.OK_CANCEL:i=[r("Ok",!0,!0),r("Cancel",!1)];break;case t.YES_NO:case t.YES_NO_CANCEL:i=[r("Yes",1,!0),r("No",0)],n.buttons==t.YES_NO_CANCEL&&i.push(r("Cancel",-1));break;default:i=[r("Ok",!0,!0)]}return new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:i,title:n.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:n.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:n.onClose,onCancel:function(){o(!1)}}).renderTo(document.body).reflow()},alert:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,t.msgBox(e)},confirm:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,e.buttons=t.OK_CANCEL,t.msgBox(e)}}});return t}),r(Te,[Se,ke],function(e,t){return function(n){function r(){return s.length?s[s.length-1]:void 0}function i(e){n.fire("OpenWindow",{win:e})}function o(e){n.fire("CloseWindow",{win:e})}var a=this,s=[];a.windows=s,n.on("remove",function(){for(var e=s.length;e--;)s[e].close()}),a.open=function(t,r){var a;return n.editorManager.setActive(n),t.title=t.title||" ",t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.height||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body,data:t.data,callbacks:t.commands}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){a.find("form")[0].submit()}},{text:"Cancel",onclick:function(){a.close()}}]),a=new e(t),s.push(a),a.on("close",function(){for(var e=s.length;e--;)s[e]===a&&s.splice(e,1);s.length||n.focus(),o(a)}),t.data&&a.on("postRender",function(){this.find("*").each(function(e){var n=e.name();n in t.data&&e.value(t.data[n])})}),a.features=t||{},a.params=r||{},1===s.length&&n.nodeChanged(),a=a.renderTo().reflow(),i(a),a},a.alert=function(e,r,a){var s;s=t.alert(e,function(){r?r.call(a||this):n.focus()}),s.on("close",function(){o(s)}),i(s)},a.confirm=function(e,n,r){var a;a=t.confirm(e,function(e){n.call(r||this,e)}),a.on("close",function(){o(a)}),i(a)},a.close=function(){r()&&r().close()},a.getParams=function(){return r()?r().params:null},a.setParams=function(e){r()&&(r().params=e)},a.getWindows=function(){return s}}}),r(Re,[ge,Ee],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this,t=e.classPrefix;return'<div id="'+e._id+'" class="'+e.classes+'" role="presentation"><div class="'+t+'tooltip-arrow"></div><div class="'+t+'tooltip-inner">'+e.encode(e.state.get("text"))+"</div></div>"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().lastChild.innerHTML=e.encode(t.value)}),e._super()},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(Ae,[ge,Re],function(e,t){var n,r=e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&r.tooltips!==!1&&(t.on("mouseenter",function(n){var r=t.tooltip().moveTo(-65535);if(n.control==t){var i=r.text(e.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]);r.classes.toggle("tooltip-n","bc-tc"==i),r.classes.toggle("tooltip-nw","bc-tl"==i),r.classes.toggle("tooltip-ne","bc-tr"==i),r.moveRel(t.getEl(),i)}else r.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"}),n.renderTo()),n},postRender:function(){var e=this,t=e.settings;e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},bindStates:function(){function e(e){n.aria("disabled",e),n.classes.toggle("disabled",e)}function t(e){n.aria("pressed",e),n.classes.toggle("active",e)}var n=this;return n.state.on("change:disabled",function(t){e(t.value)}),n.state.on("change:active",function(e){t(e.value)}),n.state.get("disabled")&&e(!0),n.state.get("active")&&t(!0),n._super()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return r}),r(Be,[Ae],function(e){return e.extend({Defaults:{value:0},init:function(e){var t=this;t._super(e),t.classes.add("progress"),t.settings.filter||(t.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this,t=e._id,n=this.classPrefix;return'<div id="'+t+'" class="'+e.classes+'"><div class="'+n+'bar-container"><div class="'+n+'bar"></div></div><div class="'+n+'text">0%</div></div>'},postRender:function(){var e=this;return e._super(),e.value(e.settings.value),e},bindStates:function(){function e(e){e=t.settings.filter(e),t.getEl().lastChild.innerHTML=e+"%",t.getEl().firstChild.firstChild.style.width=e+"%"}var t=this;return t.state.on("change:value",function(t){e(t.value)}),e(t.state.get("value")),t._super()}})}),r(De,[ge,Ee,Be,u],function(e,t,n,r){return e.extend({Mixins:[t],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||e.timeout>0)&&!e.closeButton?t.closeButton=!1:(t.classes.add("has-close"),t.closeButton=!0),e.progressBar&&(t.progressBar=new n),t.on("click",function(e){-1!=e.target.className.indexOf(t.classPrefix+"close")&&t.close()})},renderHtml:function(){var e=this,t=e.classPrefix,n="",r="",i="",o="";return e.icon&&(n='<i class="'+t+"ico "+t+"i-"+e.icon+'"></i>'),e.color&&(o=' style="background-color: '+e.color+'"'),e.closeButton&&(r='<button type="button" class="'+t+'close" aria-hidden="true">\xd7</button>'),e.progressBar&&(i=e.progressBar.renderHtml()),'<div id="'+e._id+'" class="'+e.classes+'"'+o+' role="presentation">'+n+'<div class="'+t+'notification-inner">'+e.state.get("text")+"</div>"+i+r+"</div>"},postRender:function(){var e=this;return r.setTimeout(function(){e.$el.addClass(e.classPrefix+"in")}),e._super()},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().childNodes[1].innerHTML=t.value}),e.progressBar&&e.progressBar.bindStates(),e._super()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||e.remove(),e},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(Me,[De,u],function(e,t){return function(n){function r(){return l.length?l[l.length-1]:void 0}function i(){t.requestAnimationFrame(function(){o(),a()})}function o(){for(var e=0;e<l.length;e++)l[e].moveTo(0,0)}function a(){if(l.length>0){var e=l.slice(0,1)[0],t=n.inline?n.getElement():n.getContentAreaContainer();if(e.moveRel(t,"tc-tc"),l.length>1)for(var r=1;r<l.length;r++)l[r].moveRel(l[r-1].getEl(),"bc-tc")}}var s=this,l=[];s.notifications=l,n.on("remove",function(){for(var e=l.length;e--;)l[e].close()}),n.on("ResizeEditor",a),n.on("ResizeWindow",i),s.open=function(t){var r;return n.editorManager.setActive(n),r=new e(t),l.push(r),t.timeout>0&&(r.timer=setTimeout(function(){r.close()},t.timeout)),r.on("close",function(){var e=l.length;for(r.timer&&n.getWin().clearTimeout(r.timer);e--;)l[e]===r&&l.splice(e,1);a()}),r.renderTo(),a(),r},s.close=function(){r()&&r().close()},s.getNotifications=function(){return l},n.on("SkinLoaded",function(){var e=n.settings.service_message;e&&n.notificationManager.open({text:e,type:"warning",timeout:0,icon:""})})}}),r(Le,[w],function(e){function t(t,n,r){for(var i=[];n&&n!=t;n=n.parentNode)i.push(e.nodeIndex(n,r));return i}function n(e,t){var n,r,i;for(r=e,n=t.length-1;n>=0;n--){if(i=r.childNodes,t[n]>i.length-1)return null;r=i[t[n]]}return r}return{create:t,resolve:n}}),r(Pe,[I,T,y,Le,A,C,h,m,u,k],function(e,t,n,r,i,o,a,s,l,c){return function(u){function d(e,t){try{u.getDoc().execCommand(e,!1,t)}catch(n){}}function f(){var e=u.getDoc().documentMode;return e?e:6}function h(e){return e.isDefaultPrevented()}function p(e){var t,n;e.dataTransfer&&(u.selection.isCollapsed()&&"IMG"==e.target.tagName&&ee.select(e.target),t=u.selection.getContent(),t.length>0&&(n=se+escape(u.id)+","+escape(t),e.dataTransfer.setData(le,n)))}function m(e){var t;return e.dataTransfer&&(t=e.dataTransfer.getData(le),t&&t.indexOf(se)>=0)?(t=t.substr(se.length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null}function g(e){u.queryCommandSupported("mceInsertClipboardContent")?u.execCommand("mceInsertClipboardContent",!1,{content:e}):u.execCommand("mceInsertContent",!1,e)}function v(){function i(e){var t=C.schema.getBlockElements(),n=u.getBody();if("BR"!=e.nodeName)return!1;for(;e!=n&&!t[e.nodeName];e=e.parentNode)if(e.nextSibling)return!1;return!0}function o(e,t){var n;for(n=e.nextSibling;n&&n!=t;n=n.nextSibling)if((3!=n.nodeType||0!==G.trim(n.data).length)&&n!==t)return!1;return n===t}function a(e,t,r){var o,a,s;for(s=C.schema.getNonEmptyElements(),o=new n(r||e,e);a=o[t?"next":"prev"]();){if(s[a.nodeName]&&!i(a))return a;if(3==a.nodeType&&a.data.length>0)return a}}function c(e){var n,r,i,o,s;if(!e.collapsed&&(n=C.getParent(t.getNode(e.startContainer,e.startOffset),C.isBlock),r=C.getParent(t.getNode(e.endContainer,e.endOffset),C.isBlock),s=u.schema.getTextBlockElements(),n!=r&&s[n.nodeName]&&s[r.nodeName]&&"false"!==C.getContentEditable(n)&&"false"!==C.getContentEditable(r)))return e.deleteContents(),i=a(n,!1),o=a(r,!0),C.isEmpty(r)||G(n).append(r.childNodes),G(r).remove(),i?1==i.nodeType?"BR"==i.nodeName?(e.setStartBefore(i),e.setEndBefore(i)):(e.setStartAfter(i),e.setEndAfter(i)):(e.setStart(i,i.data.length),e.setEnd(i,i.data.length)):o&&(1==o.nodeType?(e.setStartBefore(o),e.setEndBefore(o)):(e.setStart(o,0),e.setEnd(o,0))),x.setRng(e),!0}function d(e,n){var r,i,s,l,c,d;if(!e.collapsed)return e;if(c=e.startContainer,d=e.startOffset,3==c.nodeType)if(n){if(d<c.data.length)return e}else if(d>0)return e;if(r=t.getNode(e.startContainer,e.startOffset),s=C.getParent(r,C.isBlock),i=a(u.getBody(),n,r),l=C.getParent(i,C.isBlock),!r||!i)return e;if(l&&s!=l)if(n){if(!o(s,l))return e;1==r.nodeType?"BR"==r.nodeName?e.setStartBefore(r):e.setStartAfter(r):e.setStart(r,r.data.length),1==i.nodeType?e.setEnd(i,0):e.setEndBefore(i)}else{if(!o(l,s))return e;1==i.nodeType?"BR"==i.nodeName?e.setStartBefore(i):e.setStartAfter(i):e.setStart(i,i.data.length),1==r.nodeType?e.setEnd(r,0):e.setEndBefore(r)}return e}function f(e){var t=x.getRng();return t=d(t,e),c(t)?!0:void 0}function v(e,t){function n(e,n){return m=G(n).parents().filter(function(e,t){return!!u.schema.getTextInlineElements()[t.nodeName]}),l=e.cloneNode(!1),m=s.map(m,function(e){return e=e.cloneNode(!1),l.hasChildNodes()?(e.appendChild(l.firstChild),l.appendChild(e)):l.appendChild(e),l.appendChild(e),e}),m.length?(p=C.create("br"),m[0].appendChild(p),C.replace(l,e),t.setStartBefore(p),t.setEndBefore(p),u.selection.setRng(t),p):null}function i(e){return e&&u.schema.getTextBlockElements()[e.tagName]}var o,a,l,c,d,f,h,p,m;if(t.collapsed&&(f=t.startContainer,h=t.startOffset,a=C.getParent(f,C.isBlock),i(a)))if(1==f.nodeType){if(f=f.childNodes[h],f&&"BR"!=f.tagName)return;if(d=e?a.nextSibling:a.previousSibling,C.isEmpty(a)&&i(d)&&C.isEmpty(d)&&n(a,f))return C.remove(d),!0}else if(3==f.nodeType){if(o=r.create(a,f),c=a.cloneNode(!0),f=r.resolve(c,o),e){if(h>=f.data.length)return;f.deleteData(h,1)}else{if(0>=h)return;f.deleteData(h-1,1)}if(C.isEmpty(c))return n(a,f)}}function y(e){var t,n,r;f(e)||(s.each(u.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&u.dom.setAttrib(e,"style",u.dom.getAttrib(e,"style"))}),t=new w(function(){}),t.observe(u.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),u.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null),n=u.selection.getRng(),r=n.startContainer.parentNode,s.each(t.takeRecords(),function(e){if(C.isChildOf(e.target,u.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.setAttribute("style",t):e.target.removeAttribute("style")}s.each(e.addedNodes,function(e){if("SPAN"==e.nodeName&&!e.getAttribute("mce-data-marked")){var t,i;e==r&&(t=n.startOffset,i=e.firstChild),C.remove(e,!0),i&&(n.setStart(i,t),n.setEnd(i,t),u.selection.setRng(n))}})}}),t.disconnect(),s.each(u.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")}))}var b=u.getDoc(),C=u.dom,x=u.selection,w=window.MutationObserver,E,N;w||(E=!0,w=function(){function e(e){var t=e.relatedNode||e.target;n.push({target:t,addedNodes:[t]})}function t(e){var t=e.relatedNode||e.target;n.push({target:t,attributeName:e.attrName})}var n=[],r;this.observe=function(n){r=n,r.addEventListener("DOMSubtreeModified",e,!1),r.addEventListener("DOMNodeInsertedIntoDocument",e,!1),r.addEventListener("DOMNodeInserted",e,!1),
-r.addEventListener("DOMAttrModified",t,!1)},this.disconnect=function(){r.removeEventListener("DOMSubtreeModified",e,!1),r.removeEventListener("DOMNodeInsertedIntoDocument",e,!1),r.removeEventListener("DOMNodeInserted",e,!1),r.removeEventListener("DOMAttrModified",t,!1)},this.takeRecords=function(){return n}}),u.on("keydown",function(e){var t=e.keyCode==Q,n=e.ctrlKey||e.metaKey;if(!h(e)&&(t||e.keyCode==J)){var r=u.selection.getRng(),i=r.startContainer,o=r.startOffset;if(t&&e.shiftKey)return;if(v(t,r))return void e.preventDefault();if(!n&&r.collapsed&&3==i.nodeType&&(t?o<i.data.length:o>0))return;e.preventDefault(),n&&u.selection.getSel().modify("extend",t?"forward":"backward",e.metaKey?"lineboundary":"word"),y(t)}}),u.on("keypress",function(t){if(!h(t)&&!x.isCollapsed()&&t.charCode>31&&!e.metaKeyPressed(t)){var n,r,i,o,a,s;n=u.selection.getRng(),s=String.fromCharCode(t.charCode),t.preventDefault(),r=G(n.startContainer).parents().filter(function(e,t){return!!u.schema.getTextInlineElements()[t.nodeName]}),y(!0),r=r.filter(function(e,t){return!G.contains(u.getBody(),t)}),r.length?(i=C.createFragment(),r.each(function(e,t){t=t.cloneNode(!1),i.hasChildNodes()?(t.appendChild(i.firstChild),i.appendChild(t)):(a=t,i.appendChild(t)),i.appendChild(t)}),a.appendChild(u.getDoc().createTextNode(s)),o=C.getParent(n.startContainer,C.isBlock),C.isEmpty(o)?G(o).empty().append(i):n.insertNode(i),n.setStart(a.firstChild,1),n.setEnd(a.firstChild,1),u.selection.setRng(n)):u.selection.setContent(s)}}),u.addCommand("Delete",function(){y()}),u.addCommand("ForwardDelete",function(){y(!0)}),E||(u.on("dragstart",function(e){N=x.getRng(),p(e)}),u.on("drop",function(e){if(!h(e)){var n=m(e);n&&(e.preventDefault(),l.setEditorTimeout(u,function(){var r=t.getCaretRangeFromPoint(e.x,e.y,b);N&&(x.setRng(N),N=null),y(),x.setRng(r),g(n.html)}))}}),u.on("cut",function(e){h(e)||!e.clipboardData||u.selection.isCollapsed()||(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",u.selection.getContent()),e.clipboardData.setData("text/plain",u.selection.getContent({format:"text"})),l.setEditorTimeout(u,function(){y(!0)}))}))}function y(){function e(e){var t=Z.create("body"),n=e.cloneContents();return t.appendChild(n),ee.serializer.serialize(t,{format:"html"})}function n(n){if(!n.setStart){if(n.item)return!1;var r=n.duplicate();return r.moveToElementText(u.getBody()),t.compareRanges(n,r)}var i=e(n),o=Z.createRng();o.selectNode(u.getBody());var a=e(o);return i===a}u.on("keydown",function(e){var t=e.keyCode,r,i;if(!h(e)&&(t==Q||t==J)){if(r=u.selection.isCollapsed(),i=u.getBody(),r&&!Z.isEmpty(i))return;if(!r&&!n(u.selection.getRng()))return;e.preventDefault(),u.setContent(""),i.firstChild&&Z.isBlock(i.firstChild)?u.selection.setCursorLocation(i.firstChild,0):u.selection.setCursorLocation(i,0),u.nodeChanged()}})}function b(){u.shortcuts.add("meta+a",null,"SelectAll")}function C(){u.settings.content_editable||Z.bind(u.getDoc(),"mousedown mouseup",function(e){var t;if(e.target==u.getDoc().documentElement)if(t=ee.getRng(),u.getBody().focus(),"mousedown"==e.type){if(c.isCaretContainer(t.startContainer))return;ee.placeCaretAt(e.clientX,e.clientY)}else ee.setRng(t)})}function x(){u.on("keydown",function(e){if(!h(e)&&e.keyCode===J){if(!u.getBody().getElementsByTagName("hr").length)return;if(ee.isCollapsed()&&0===ee.getRng(!0).startOffset){var t=ee.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return Z.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(Z.remove(n),e.preventDefault())}}})}function w(){window.Range.prototype.getClientRects||u.on("mousedown",function(e){if(!h(e)&&"HTML"===e.target.nodeName){var t=u.getBody();t.blur(),l.setEditorTimeout(u,function(){t.focus()})}})}function E(){u.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==Z.getContentEditableParent(t)&&(e.preventDefault(),ee.getSel().setBaseAndExtent(t,0,t,1),u.nodeChanged()),"A"==t.nodeName&&Z.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),ee.select(t))})}function N(){function e(){var e=Z.getAttribs(ee.getStart().cloneNode(!1));return function(){var t=ee.getStart();t!==u.getBody()&&(Z.setAttrib(t,"style",null),K(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function t(){return!ee.isCollapsed()&&Z.getParent(ee.getStart(),Z.isBlock)!=Z.getParent(ee.getEnd(),Z.isBlock)}u.on("keypress",function(n){var r;return h(n)||8!=n.keyCode&&46!=n.keyCode||!t()?void 0:(r=e(),u.getDoc().execCommand("delete",!1,null),r(),n.preventDefault(),!1)}),Z.bind(u.getDoc(),"cut",function(n){var r;!h(n)&&t()&&(r=e(),l.setEditorTimeout(u,function(){r()}))})}function _(){document.body.setAttribute("role","application")}function S(){u.on("keydown",function(e){if(!h(e)&&e.keyCode===J&&ee.isCollapsed()&&0===ee.getRng(!0).startOffset){var t=ee.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function k(){f()>7||(d("RespectVisibilityInDesign",!0),u.contentStyles.push(".mceHideBrInPre pre br {display: none}"),Z.addClass(u.getBody(),"mceHideBrInPre"),ne.addNodeFilter("pre",function(e){for(var t=e.length,n,r,o,a;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)o=n[r],a=o.prev,a&&3===a.type&&"\n"!=a.value.charAt(a.value-1)?a.value+="\n":o.parent.insert(new i("#text",3),o,!0).value="\n"}),re.addNodeFilter("pre",function(e){for(var t=e.length,n,r,i,o;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)i=n[r],o=i.prev,o&&3==o.type&&(o.value=o.value.replace(/\r?\n$/,""))}))}function T(){Z.bind(u.getBody(),"mouseup",function(){var e,t=ee.getNode();"IMG"==t.nodeName&&((e=Z.getStyle(t,"width"))&&(Z.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),Z.setStyle(t,"width","")),(e=Z.getStyle(t,"height"))&&(Z.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),Z.setStyle(t,"height","")))})}function R(){u.on("keydown",function(t){var n,r,i,o,a;if(!h(t)&&t.keyCode==e.BACKSPACE&&(n=ee.getRng(),r=n.startContainer,i=n.startOffset,o=Z.getRoot(),a=r,n.collapsed&&0===i)){for(;a&&a.parentNode&&a.parentNode.firstChild==a&&a.parentNode!=o;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(u.formatter.toggle("blockquote",null,a),n=Z.createRng(),n.setStart(r,0),n.setEnd(r,0),ee.setRng(n))}})}function A(){function e(){Y(),d("StyleWithCSS",!1),d("enableInlineTableEditing",!1),te.object_resizing||d("enableObjectResizing",!1)}te.readonly||u.on("BeforeExecCommand MouseDown",e)}function B(){function e(){K(Z.select("a"),function(e){var t=e.parentNode,n=Z.getRoot();if(t.lastChild===e){for(;t&&!Z.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}Z.add(t,"br",{"data-mce-bogus":1})}})}u.on("SetContent ExecCommand",function(t){"setcontent"!=t.type&&"mceInsertLink"!==t.command||e()})}function D(){te.forced_root_block&&u.on("init",function(){d("DefaultParagraphSeparator",te.forced_root_block)})}function M(){u.on("keydown",function(e){var t;h(e)||e.keyCode!=J||(t=u.getDoc().selection.createRange(),t&&t.item&&(e.preventDefault(),u.undoManager.beforeChange(),Z.remove(t.item(0)),u.undoManager.add()))})}function L(){var e;f()>=10&&(e="",K("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"}),u.contentStyles.push(e+"{padding-right: 1px !important}"))}function P(){f()<9&&(ne.addNodeFilter("noscript",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.firstChild,r&&n.attr("data-mce-innertext",r.value)}),re.addNodeFilter("noscript",function(e){for(var t=e.length,n,r,a;t--;)n=e[t],r=e[t].firstChild,r?r.value=o.decode(r.value):(a=n.attributes.map["data-mce-innertext"],a&&(n.attr("data-mce-innertext",null),r=new i("#text",3),r.value=a,r.raw=!0,n.append(r)))}))}function H(){function e(e,t){var n=i.createTextRange();try{n.moveToPoint(e,t)}catch(r){n=null}return n}function t(t){var r;t.button?(r=e(t.x,t.y),r&&(r.compareEndPoints("StartToStart",a)>0?r.setEndPoint("StartToStart",a):r.setEndPoint("EndToEnd",a),r.select())):n()}function n(){var e=r.selection.createRange();a&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&a.select(),Z.unbind(r,"mouseup",n),Z.unbind(r,"mousemove",t),a=o=0}var r=Z.doc,i=r.body,o,a,s;r.documentElement.unselectable=!0,Z.bind(r,"mousedown contextmenu",function(i){if("HTML"===i.target.nodeName){if(o&&n(),s=r.documentElement,s.scrollHeight>s.clientHeight)return;o=1,a=e(i.x,i.y),a&&(Z.bind(r,"mouseup",n),Z.bind(r,"mousemove",t),Z.getRoot().focus(),a.select())}})}function O(){u.on("keyup focusin mouseup",function(t){65==t.keyCode&&e.metaKeyPressed(t)||ee.normalize()},!0)}function I(){u.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}function F(){u.inline||u.on("keydown",function(){document.activeElement==document.body&&u.getWin().focus()})}function z(){u.inline||(u.contentStyles.push("body {min-height: 150px}"),u.on("click",function(e){var t;if("HTML"==e.target.nodeName){if(a.ie>11)return void u.getBody().focus();t=u.selection.getRng(),u.getBody().focus(),u.selection.setRng(t),u.selection.normalize(),u.nodeChanged()}}))}function W(){a.mac&&u.on("keydown",function(t){!e.metaKeyPressed(t)||t.shiftKey||37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),u.selection.getSel().modify("move",37==t.keyCode?"backward":"forward","lineboundary"))})}function V(){d("AutoUrlDetect",!1)}function U(){u.on("click",function(e){var t=e.target;do if("A"===t.tagName)return void e.preventDefault();while(t=t.parentNode)}),u.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")}function $(){u.on("init",function(){u.dom.bind(u.getBody(),"submit",function(e){e.preventDefault()})})}function q(){ne.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"==e[t].attr("class")&&e[t].remove()})}function j(){u.on("dragstart",function(e){p(e)}),u.on("drop",function(e){if(!h(e)){var n=m(e);if(n&&n.id!=u.id){e.preventDefault();var r=t.getCaretRangeFromPoint(e.x,e.y,u.getDoc());ee.setRng(r),g(n.html)}}})}function Y(){var e,t;X()&&(e=u.getBody(),t=e.parentNode,t.removeChild(e),t.appendChild(e),e.focus())}function X(){var e;return ie?(e=u.selection.getSel(),!e||!e.rangeCount||0===e.rangeCount):0}var K=s.each,G=u.$,J=e.BACKSPACE,Q=e.DELETE,Z=u.dom,ee=u.selection,te=u.settings,ne=u.parser,re=u.serializer,ie=a.gecko,oe=a.ie,ae=a.webkit,se="data:text/mce-internal,",le=oe?"Text":"URL";return R(),y(),a.windowsPhone||O(),ae&&(v(),C(),E(),D(),$(),S(),q(),a.iOS?(F(),z(),U()):b()),oe&&a.ie<11&&(x(),_(),k(),T(),M(),L(),P(),H()),a.ie>=11&&(z(),S()),a.ie&&(b(),V(),j()),ie&&(x(),w(),N(),A(),B(),I(),W(),S()),{refreshContentEditable:Y,isHidden:X}}}),r(He,[le,w,m],function(e,t,n){function r(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=o.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()}function i(e,t){function n(e){return!e.hidden&&!e.readonly}var i=r(e,t),s;if(e.delegates||(e.delegates={}),!e.delegates[t])if(e.settings.event_root){if(a||(a={},e.editorManager.on("removeEditor",function(){var t;if(!e.editorManager.activeEditor&&a){for(t in a)e.dom.unbind(r(e,t));a=null}})),a[t])return;s=function(r){for(var i=r.target,a=e.editorManager.editors,s=a.length;s--;){var l=a[s].getBody();(l===i||o.isChildOf(i,l))&&n(a[s])&&a[s].fire(t,r)}},a[t]=s,o.bind(i,t,s)}else s=function(r){n(e)&&e.fire(t,r)},o.bind(i,t,s),e.delegates[t]=s}var o=t.DOM,a,s={bindPendingEventDelegates:function(){var e=this;n.each(e._pendingNativeEvents,function(t){i(e,t)})},toggleNativeEvent:function(e,t){var n=this;"focus"!=e&&"blur"!=e&&(t?n.initialized?i(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(r(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e=this,t;if(e.delegates){for(t in e.delegates)e.dom.unbind(r(e,t),t,e.delegates[t]);delete e.delegates}e.inline||(e.getBody().onload=null,e.dom.unbind(e.getWin()),e.dom.unbind(e.getDoc())),e.dom.unbind(e.getBody()),e.dom.unbind(e.getContainer())}};return s=n.extend({},e,s)}),r(Oe,[],function(){function e(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}}function t(e){var t,n;return t=e.getBody(),n=function(t){e.dom.getParents(t.target,"a").length>0&&t.preventDefault()},e.dom.bind(t,"click",n),{unbind:function(){e.dom.unbind(t,"click",n)}}}function n(n,r){n._clickBlocker&&(n._clickBlocker.unbind(),n._clickBlocker=null),r?(n._clickBlocker=t(n),n.selection.controlSelection.hideResizeRect(),n.readonly=!0,n.getBody().contentEditable=!1):(n.readonly=!1,n.getBody().contentEditable=!0,e(n,"StyleWithCSS",!1),e(n,"enableInlineTableEditing",!1),e(n,"enableObjectResizing",!1),n.focus(),n.nodeChanged())}function r(e,t){var r=e.readonly?"readonly":"design";t!=r&&(e.initialized?n(e,"readonly"==t):e.on("init",function(){n(e,"readonly"==t)}),e.fire("SwitchMode",{mode:t}))}return{setMode:r}}),r(Ie,[m,h],function(e,t){var n=e.each,r=e.explode,i={f9:120,f10:121,f11:122},o=e.makeMap("alt,ctrl,shift,meta,access");return function(a){function s(e){var a,s,l={};n(r(e,"+"),function(e){e in o?l[e]=!0:/^[0-9]{2,}$/.test(e)?l.keyCode=parseInt(e,10):(l.charCode=e.charCodeAt(0),l.keyCode=i[e]||e.toUpperCase().charCodeAt(0))}),a=[l.keyCode];for(s in o)l[s]?a.push(s):l[s]=!1;return l.id=a.join(","),l.access&&(l.alt=!0,t.mac?l.ctrl=!0:l.shift=!0),l.meta&&(t.mac?l.meta=!0:(l.ctrl=!0,l.meta=!1)),l}function l(t,n,i,o){var l;return l=e.map(r(t,">"),s),l[l.length-1]=e.extend(l[l.length-1],{func:i,scope:o||a}),e.extend(l[0],{desc:a.translate(n),subpatterns:l.slice(1)})}function c(e){return e.altKey||e.ctrlKey||e.metaKey}function u(e){return e.keyCode>=112&&e.keyCode<=123}function d(e,t){return t?t.ctrl!=e.ctrlKey||t.meta!=e.metaKey?!1:t.alt!=e.altKey||t.shift!=e.shiftKey?!1:e.keyCode==t.keyCode||e.charCode&&e.charCode==t.charCode?(e.preventDefault(),!0):!1:!1}function f(e){return e.func?e.func.call(e.scope):null}var h=this,p={},m=[];a.on("keyup keypress keydown",function(e){!c(e)&&!u(e)||e.isDefaultPrevented()||(n(p,function(t){return d(e,t)?(m=t.subpatterns.slice(0),"keydown"==e.type&&f(t),!0):void 0}),d(e,m[0])&&(1===m.length&&"keydown"==e.type&&f(m[0]),m.shift()))}),h.add=function(t,i,o,s){var c;return c=o,"string"==typeof o?o=function(){a.execCommand(c,!1,null)}:e.isArray(c)&&(o=function(){a.execCommand(c[0],c[1],c[2])}),n(r(e.trim(t.toLowerCase())),function(e){var t=l(e,i,o,s);p[t.id]=t}),!0},h.remove=function(e){var t=l(e);return p[t.id]?(delete p[t.id],!0):!1}}}),r(Fe,[c,m,z],function(e,t,n){return function(r){function i(e){var t,n;return n={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"},t=n[e.blob().type.toLowerCase()]||"dat",e.id()+"."+t}function o(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t}function a(e){return{id:e.id,blob:e.blob,base64:e.base64,filename:n.constant(i(e))}}function s(e,t,n,a){var s,l,c;s=new XMLHttpRequest,s.open("POST",r.url),s.withCredentials=r.credentials,c=a(),s.upload.onprogress=function(e){var t=Math.round(e.loaded/e.total*100);c.progressBar.value(t)},s.onerror=function(){c.close(),n("Image upload failed due to a XHR Transport error. Code: "+s.status)},s.onload=function(){var e;return c.close(),200!=s.status?void n("HTTP Error: "+s.status):(e=JSON.parse(s.responseText),e&&"string"==typeof e.location?void t(o(r.basePath,e.location)):void n("Invalid JSON: "+s.responseText))},l=new FormData,l.append("file",e.blob(),i(e)),s.send(l)}function l(){return new e(function(e){e([])})}function c(e){return e.then(function(e){return e})["catch"](function(e){return e})}function u(e,t,n){var r=e(n),i=c(r);return delete p[t],p[t]=i,i}function d(e,n){return t.map(e,function(e){var t=e.id();return p[t]?p[t]:u(n,t,e)})}function f(t,n){function i(t){return new e(function(e){var i=r.handler;try{i(a(t),function(n){e({url:n,blobInfo:t,status:!0})},function(n){e({url:"",blobInfo:t,status:!1,error:n})},n)}catch(o){e({url:"",blobInfo:t,status:!1,error:o.message})}})}var o=d(t,i);return e.all(o)}function h(e,t){return r.url||r.handler!==s?f(e,t):l()}var p={};return r=t.extend({credentials:!1,handler:s},r),{upload:h}}}),r(ze,[c],function(e){function t(t){return new e(function(e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="blob",n.onload=function(){200==this.status&&e(this.response)},n.send()})}function n(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}}function r(t){return new e(function(e){var r,i,o;t=n(t);try{r=atob(t.data)}catch(a){return void e(new Blob([]))}for(i=new Uint8Array(r.length),o=0;o<i.length;o++)i[o]=r.charCodeAt(o);e(new Blob([i],{type:t.type}))})}function i(e){return 0===e.indexOf("blob:")?t(e):0===e.indexOf("data:")?r(e):null}function o(t){return new e(function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)})}return{uriToBlob:i,blobToDataUri:o,parseDataUri:n}}),r(We,[c,p,z,ze,h],function(e,t,n,r,i){var o=0;return function(a){function s(s,c){function u(e,t){var n,i;return 0===e.src.indexOf("blob:")?(i=a.getByUri(e.src),void(i&&t({image:e,blobInfo:i}))):(n=r.parseDataUri(e.src).data,i=a.findFirst(function(e){return e.base64()===n}),void(i?t({image:e,blobInfo:i}):r.uriToBlob(e.src).then(function(r){var i="blobid"+o++,s=a.create(i,r,n);a.add(s),t({image:e,blobInfo:s})})))}var d,f;return c||(c=n.constant(!0)),d=t.filter(s.getElementsByTagName("img"),function(e){var t=e.src;return i.fileApi?e.hasAttribute("data-mce-bogus")?!1:e.hasAttribute("data-mce-placeholder")?!1:t&&t!=i.transparentSrc?0===t.indexOf("blob:")?!0:0===t.indexOf("data:")?c(e):!1:!1:!1}),f=t.map(d,function(t){var n;return l[t.src]?new e(function(e){l[t.src].then(function(n){e({image:t,blobInfo:n.blobInfo})})}):(n=new e(function(e){u(t,e)}).then(function(e){return delete l[e.image.src],e})["catch"](function(e){return delete l[t.src],e}),l[t.src]=n,n)}),e.all(f)}var l={};return{findAll:s}}}),r(Ve,[p,z],function(e,t){return function(){function n(e,t,n){return{id:c(e),blob:c(t),base64:c(n),blobUri:c(URL.createObjectURL(t))}}function r(e){i(e.id())||l.push(e)}function i(e){return o(function(t){return t.id()===e})}function o(t){return e.filter(l,t)[0]}function a(e){return o(function(t){return t.blobUri()==e})}function s(){e.each(l,function(e){URL.revokeObjectURL(e.blobUri())}),l=[]}var l=[],c=t.constant;return{create:n,add:r,get:i,getByUri:a,findFirst:o,destroy:s}}}),r(Ue,[p,Fe,We,Ve],function(e,t,n,r){return function(i){function o(e){return function(t){return i.selection?e(t):[]}}function a(e,t,n){var r=0;do r=e.indexOf(t,r),-1!==r&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1);while(-1!==r);return e}function s(e,t,n){return e=a(e,'src="'+t+'"','src="'+n+'"'),e=a(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')}function l(t,n){e.each(i.undoManager.data,function(e){e.content=s(e.content,t,n)})}function c(){return i.notificationManager.open({text:i.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}function u(n){return g||(g=new t({url:y.images_upload_url,basePath:y.images_upload_base_path,credentials:y.images_upload_credentials,handler:y.images_upload_handler})),f().then(o(function(t){var r;return r=e.map(t,function(e){return e.blobInfo}),g.upload(r,c).then(o(function(r){return r=e.map(r,function(e,n){var r=t[n].image;return e.status&&(l(r.src,e.url),i.$(r).attr({src:e.url,"data-mce-src":i.convertURL(e.url,"src")})),{element:r,status:e.status}}),n&&n(r),r}))}))}function d(e){return y.automatic_uploads!==!1?u(e):void 0}function f(){return v||(v=new n(m)),v.findAll(i.getBody(),y.images_dataimg_filter).then(o(function(t){return e.each(t,function(e){l(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri()}),t}))}function h(){m.destroy(),v=g=null}function p(t){return t.replace(/src="(blob:[^"]+)"/g,function(t,n){var r=m.getByUri(n);return r||(r=e.reduce(i.editorManager.editors,function(e,t){return e||t.editorUpload.blobCache.getByUri(n)},null)),r?'src="data:'+r.blob().type+";base64,"+r.base64()+'"':t})}var m=new r,g,v,y=i.settings;return i.on("setContent",function(){i.settings.automatic_uploads!==!1?d():f()}),i.on("RawSaveContent",function(e){e.content=p(e.content)}),i.on("getContent",function(e){e.source_view||"raw"==e.format||(e.content=p(e.content))}),{blobCache:m,uploadImages:u,uploadImagesAuto:d,scanForImages:f,destroy:h}}}),r($e,[k,$,_,T,g,V,u],function(e,t,n,r,i,o,a){var s=n.isContentEditableFalse;return function(t,n){function r(e,n){var r=o.collapse(e.getBoundingClientRect(),n),i,a,s,l,c;return"BODY"==t.tagName?(i=t.ownerDocument.documentElement,a=t.scrollLeft||i.scrollLeft,s=t.scrollTop||i.scrollTop):(c=t.getBoundingClientRect(),a=t.scrollLeft-c.left,s=t.scrollTop-c.top),r.left+=a,r.right+=a,r.top+=s,r.bottom+=s,r.width=1,l=e.offsetWidth-e.clientWidth,l>0&&(n&&(l*=-1),r.left+=l,r.right+=l),r}function l(){var n,r,o,a,s;for(n=i("*[contentEditable=false]",t),a=0;a<n.length;a++)r=n[a],o=r.previousSibling,e.endsWithCaretContainer(o)&&(s=o.data,1==s.length?o.parentNode.removeChild(o):o.deleteData(s.length-1,1)),o=r.nextSibling,e.startsWithCaretContainer(o)&&(s=o.data,1==s.length?o.parentNode.removeChild(o):o.deleteData(0,1));return null}function c(o,a){var l,c,f;return u(),n(a)?(g=e.insertBlock("p",a,o),l=r(a,o),i(g).css("top",l.top),m=i('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(l).appendTo(t),o&&m.addClass("mce-visual-caret-before"),d(),c=a.ownerDocument.createRange(),f=g.firstChild,c.setStart(f,0),c.setEnd(f,1),c):(g=e.insertInline(a,o),c=a.ownerDocument.createRange(),s(g.nextSibling)?(c.setStart(g,0),c.setEnd(g,0)):(c.setStart(g,1),c.setEnd(g,1)),c)}function u(){l(),g&&(e.remove(g),g=null),m&&(m.remove(),m=null),clearInterval(p)}function d(){p=a.setInterval(function(){i("div.mce-visual-caret",t).toggleClass("mce-visual-caret-hidden")},500)}function f(){a.clearInterval(p)}function h(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"}var p,m,g;return{show:c,hide:u,getCss:h,destroy:f}}}),r(qe,[p,_,V],function(e,t,n){function r(i){function o(t){return e.map(t,function(e){return e=n.clone(e),e.node=i,e})}if(e.isArray(i))return e.reduce(i,function(e,t){return e.concat(r(t))},[]);if(t.isElement(i))return o(i.getClientRects());if(t.isText(i)){var a=i.ownerDocument.createRange();return a.setStart(i,0),a.setEnd(i,i.data.length),o(a.getClientRects())}}return{getClientRects:r}}),r(je,[z,p,qe,W,te,ne,$,V],function(e,t,n,r,i,o,a,s){function l(e,t,n,o){for(;o=i.findNode(o,e,r.isEditableCaretCandidate,t);)if(n(o))return}function c(e,r,i,o,a,s){function c(o){var s,l,c;for(c=n.getClientRects(o),-1==e&&(c=c.reverse()),s=0;s<c.length;s++)if(l=c[s],!i(l,h)){if(f.length>0&&r(l,t.last(f))&&u++,l.line=u,a(l))return!0;f.push(l)}}var u=0,d,f=[],h;return(h=t.last(s.getClientRects()))?(d=s.getNode(),c(d),l(e,o,c,d),f):f}function u(e,t){return t.line>e}function d(e,t){return t.line===e}function f(e,n,r,i){function l(n){return 1==e?t.last(n.getClientRects()):t.last(n.getClientRects())}var c=new o(n),u,d,f,h,p=[],m=0,g,v;1==e?(u=c.next,d=s.isBelow,f=s.isAbove,h=a.after(i)):(u=c.prev,d=s.isAbove,f=s.isBelow,h=a.before(i)),v=l(h);do if(h.isVisible()&&(g=l(h),!f(g,v))){if(p.length>0&&d(g,t.last(p))&&m++,g=s.clone(g),g.position=h,g.line=m,r(g))return p;p.push(g)}while(h=u(h));return p}var h=e.curry,p=h(c,-1,s.isAbove,s.isBelow),m=h(c,1,s.isBelow,s.isAbove);return{upUntil:p,downUntil:m,positionsUntil:f,isAboveLine:h(u),isLine:h(d)}}),r(Ye,[z,p,_,qe,V,te,W],function(e,t,n,r,i,o,a){function s(e,t){return Math.abs(e.left-t)}function l(e,t){return Math.abs(e.right-t)}function c(e,n){function r(e,t){return e>=t.left&&e<=t.right}return t.reduce(e,function(e,t){var i,o;return i=Math.min(s(e,n),l(e,n)),o=Math.min(s(t,n),l(t,n)),r(n,t)?t:r(n,e)?e:o==i&&m(t.node)?t:i>o?t:e})}function u(e,t,n,r){for(;r=g(r,e,a.isEditableCaretCandidate,t);)if(n(r))return}function d(e,n){function o(e,i){var o;return o=t.filter(r.getClientRects(i),function(t){return!e(t,n)}),a=a.concat(o),0===o.length}var a=[];return a.push(n),u(-1,e,v(o,i.isAbove),n.node),u(1,e,v(o,i.isBelow),n.node),a}function f(e){return t.filter(t.toArray(e.getElementsByTagName("*")),m)}function h(e,t){return{node:e.node,before:s(e,t)<l(e,t)}}function p(e,n,i){var o,a;return o=r.getClientRects(f(e)),o=t.filter(o,function(e){return i>=e.top&&i<=e.bottom}),a=c(o,n),a&&(a=c(d(e,a),n),a&&m(a.node))?h(a,n):null}var m=n.isContentEditableFalse,g=o.findNode,v=e.curry;return{findClosestClientRect:c,findLineNodeRects:d,closestCaret:p}}),r(Xe,[_,p,z],function(e,t,n){function r(e){function r(e){return i(e)}function a(t){f(e.getBody()).css("cursor",t)}function s(t){return t==g.element||e.dom.isChildOf(t,g.element)?!1:!i(t)}function l(t){var n,r,i,o,s=0,l=0,c,u,d,h;0===t.button&&(n=t.screenX-g.screenX,r=t.screenY-g.screenY,c=Math.max(Math.abs(n),Math.abs(r)),!g.dragging&&c>10&&(g.dragging=!0,a("default"),g.clone=g.element.cloneNode(!0),i=m.getPos(g.element),g.relX=g.clientX-i.x,g.relY=g.clientY-i.y,g.width=g.element.offsetWidth,g.height=g.element.offsetHeight,f(g.clone).css({width:g.width,height:g.height}).removeAttr("data-mce-selected"),g.ghost=f("<div>").css({position:"absolute",opacity:.5,overflow:"hidden",width:g.width,height:g.height}).attr({"data-mce-bogus":"all",unselectable:"on",contenteditable:"false"}).addClass("mce-drag-container mce-reset").append(g.clone).appendTo(e.getBody())[0],o=e.dom.getViewPort(e.getWin()),g.maxX=o.w,g.maxY=o.h),g.dragging&&(e.selection.placeCaretAt(t.clientX,t.clientY),u=g.clientX+n-g.relX,d=g.clientY+r+5,u+g.width>g.maxX&&(s=u+g.width-g.maxX),d+g.height>g.maxY&&(l=d+g.height-g.maxY),h="BODY"!=e.getBody().nodeName?e.getBody().getBoundingClientRect():{left:0,top:0},f(g.ghost).css({left:u-h.left,top:d-h.top,width:g.width-s,height:g.height-l})))}function c(){var t;if(g.dragging&&(e.selection.setRng(e.selection.getSel().getRangeAt(0)),s(e.selection.getNode()))){var n=g.element;if(t=e.fire("drop",{targetClone:n}),t.isDefaultPrevented())return;n=t.targetClone,e.undoManager.transact(function(){e.insertContent(m.getOuterHTML(n)),f(g.element).remove()})}d()}function u(a){var s,u;if(d(),0===a.button&&(s=t.find(e.dom.getParents(a.target),n.or(i,o)),r(s))){if(u=e.fire("dragstart",{target:s}),u.isDefaultPrevented())return;e.on("mousemove",l),e.on("mouseup",c),h!=p&&(m.bind(h,"mousemove",l),m.bind(h,"mouseup",c)),g={screenX:a.screenX,screenY:a.screenY,clientX:a.clientX,clientY:a.clientY,element:s}}}function d(){f(g.ghost).remove(),a(null),e.off("mousemove",l),e.off("mouseup",d),h!=p&&(m.unbind(h,"mousemove",l),m.unbind(h,"mouseup",d)),g={}}var f=e.$,h=document,p=e.getDoc(),m=e.dom,g={};e.on("mousedown",u),e.on("drop",function(t){var n=e.getDoc().elementFromPoint(t.clientX,t.clientY);(i(n)||i(e.dom.getContentEditableParent(n)))&&t.preventDefault()})}var i=e.isContentEditableFalse,o=e.isContentEditableTrue;return{init:r}}),r(Ke,[h,ne,$,k,te,$e,je,Ye,_,T,V,I,z,p,u,Xe,S],function(e,t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g){function v(e,t){for(;t=e(t);)if(t.isVisible())return t;return t}function y(c){function y(e){return c.dom.isBlock(e)}function S(e){e&&c.selection.setRng(e)}function k(){return c.selection.getRng()}function T(e,t){c.selection.scrollIntoView(e,t)}function R(e,t,n){var r;return r=c.fire("ShowCaret",{target:t,direction:e,before:n}),r.isDefaultPrevented()?null:(T(t,-1===e),ne.show(n,t))}function A(e){var t;return ne.hide(),t=c.fire("BeforeObjectSelected",{target:e}),t.isDefaultPrevented()?null:B(e)}function B(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t}function D(e,t){var n=i.isInSameBlock(e,t);return!n&&l.isBr(e.getNode())?!0:n}function M(e,t){return t=i.normalizeRange(e,Q,t),-1==e?n.fromRangeStart(t):n.fromRangeEnd(t)}function L(e){return r.isCaretContainerBlock(e.startContainer)}function P(e,t,n,r){var i,o,a,s;return!r.collapsed&&(i=_(r),x(i))?R(e,i,-1==e):(s=L(r),o=M(e,r),n(o)?A(o.getNode(-1==e)):(o=t(o))?n(o)?R(e,o.getNode(-1==e),1==e):(a=t(o),n(a)&&D(o,a)?R(e,a.getNode(-1==e),1==e):s?U(o.toRange()):null):s?r:null)}function H(e,t,n){var r,i,o,l,c,u,d,f,p;if(p=_(n),r=M(e,n),i=t(Q,a.isAboveLine(1),r),o=h.filter(i,a.isLine(1)),c=h.last(r.getClientRects()),N(r)&&(p=r.getNode()),E(r)&&(p=r.getNode(!0)),!c)return null;if(u=c.left,l=s.findClosestClientRect(o,u),l&&x(l.node))return d=Math.abs(u-l.left),f=Math.abs(u-l.right),R(e,l.node,f>d);if(p){var m=a.positionsUntil(e,Q,a.isAboveLine(1),p);if(l=s.findClosestClientRect(h.filter(m,a.isLine(1)),u))return U(l.position.toRange());if(l=h.last(h.filter(m,a.isLine(0))))return U(l.position.toRange())}}function O(t,r){function i(){var t=c.dom.create(c.settings.forced_root_block);return(!e.ie||e.ie>=11)&&(t.innerHTML='<br data-mce-bogus="1">'),t}var o,a,s;if(r.collapsed&&c.settings.forced_root_block){if(o=c.dom.getParent(r.startContainer,"PRE"),!o)return;a=1==t?ee(n.fromRangeStart(r)):te(n.fromRangeStart(r)),a||(s=i(),1==t?c.$(o).after(s):c.$(o).before(s),c.selection.select(s,!0),c.selection.collapse())}}function I(e,t,n,r){var i;return(i=P(e,t,n,r))?i:(i=O(e,r),i?i:null)}function F(e,t,n){var r;return(r=H(e,t,n))?r:(r=O(e,n),r?r:null)}function z(){return oe("*[data-mce-caret]")[0]}function W(e){e=oe(e),e.attr("data-mce-caret")&&(ne.hide(),e.removeAttr("data-mce-caret"),e.removeAttr("data-mce-bogus"),e.removeAttr("style"),S(k()),T(e[0]))}function V(e){var t,r;return e=i.normalizeRange(1,Q,e),t=n.fromRangeStart(e),x(t.getNode())?R(1,t.getNode(),!t.isAtEnd()):x(t.getNode(!0))?R(1,t.getNode(!0),!1):(r=c.dom.getParent(t.getNode(),f.or(x,C)),x(r)?R(1,r,!1):(ne.hide(),null))}function U(e){var t;return e&&e.collapsed?(t=V(e),t?t:e):e}function $(e){var t,i,o,a;return x(e)?(x(e.previousSibling)&&(o=e.previousSibling),i=te(n.before(e)),i||(t=ee(n.after(e))),t&&w(t.getNode())&&(a=t.getNode()),r.remove(e.previousSibling),r.remove(e.nextSibling),c.dom.remove(e),G(),c.dom.isEmpty(c.getBody())?(c.setContent(""),void c.focus()):o?n.after(o).toRange():a?n.before(a).toRange():i?i.toRange():t?t.toRange():null):null}function q(e,t,n){var r,i;return!n.collapsed&&(r=_(n),x(r))?U($(r)):(i=M(e,n),t(i)?U($(i.getNode(-1==e))):void 0)}function j(){function e(e,t){var n=t(k());n&&!e.isDefaultPrevented()&&(e.preventDefault(),S(n))}function t(e){for(var t=c.getBody();e&&e!=t;){if(C(e)||x(e))return e;e=e.parentNode}return null}function r(e,t,n){return n.collapsed?!1:h.reduce(n.getClientRects(),function(n,r){return n||u.containsXY(r,e,t)},!1)}function i(){var e,r=t(c.selection.getNode());C(r)&&y(r)&&c.dom.isEmpty(r)&&(e=c.dom.create("br",{"data-mce-bogus":"1"}),c.$(r).empty().append(e),c.selection.setRng(n.before(e).toRange()))}function o(e){var t=z();if(t)return"compositionstart"==e.type?(e.preventDefault(),e.stopPropagation(),void W(t)):void("&nbsp;"!=t.innerHTML&&W(t))}function l(e){var t;switch(e.keyCode){case d.DELETE:t=i();break;case d.BACKSPACE:t=i()}t&&e.preventDefault()}var f=b(I,1,ee,N),g=b(I,-1,te,E),v=b(q,1,N),w=b(q,-1,E),_=b(F,-1,a.upUntil),T=b(F,1,a.downUntil);c.on("mouseup",function(){var e=k();e.collapsed&&S(V(e))}),c.on("click",function(e){var n;n=t(e.target),n&&x(n)&&e.preventDefault()}),c.on("mousedown",function(e){var n;if(n=t(e.target))x(n)?(e.preventDefault(),K(A(n))):(G(),r(e.clientX,e.clientY,c.selection.getRng())||c.selection.placeCaretAt(e.clientX,e.clientY));else{G(),ne.hide();var i=s.closestCaret(Q,e.clientX,e.clientY);i&&(e.preventDefault(),c.getBody().focus(),S(R(1,i.node,i.before)))}}),c.on("keydown",function(t){if(!d.modifierPressed(t))switch(t.keyCode){case d.RIGHT:e(t,f);break;case d.DOWN:e(t,T);break;case d.LEFT:e(t,g);break;case d.UP:e(t,_);break;case d.DELETE:e(t,v);break;case d.BACKSPACE:e(t,w);break;default:x(c.selection.getNode())&&t.preventDefault()}}),c.on("keyup compositionstart",function(e){o(e),l(e)},!0),c.on("cut",function(){var e=c.selection.getNode();x(e)&&p.setEditorTimeout(c,function(){S(U($(e)))})}),c.on("getSelectionRange",function(e){var t=e.range;if(ie){if(!ie.parentNode)return void(ie=null);t=t.cloneRange(),t.selectNode(ie),
-e.range=t}}),c.on("setSelectionRange",function(e){var t;t=K(e.range),t&&(e.range=t)}),c.on("focus",function(){p.setEditorTimeout(c,function(){c.selection.setRng(U(c.selection.getRng()))},0)}),m.init(c)}function Y(){var e=c.contentStyles,t=".mce-content-body";e.push(ne.getCss()),e.push(t+" .mce-offscreen-selection {position: absolute;left: -9999999999px;width: 100px;height: 100px;}"+t+" *[contentEditable=false] {cursor: default;}"+t+" *[contentEditable=true] {cursor: text;}")}function X(e){return r.isCaretContainer(e.startContainer)||r.isCaretContainer(e.endContainer)}function K(t){var n,r=c.$,i=c.dom,o,a,s,l,u,d,f,h,p;if(!t)return G(),null;if(t.collapsed){if(G(),!X(t)){if(f=M(1,t),x(f.getNode()))return R(1,f.getNode(),!f.isAtEnd());if(x(f.getNode(!0)))return R(1,f.getNode(!0),!1)}return null}return s=t.startContainer,l=t.startOffset,u=t.endOffset,3==s.nodeType&&0==l&&x(s.parentNode)&&(s=s.parentNode,l=i.nodeIndex(s),s=s.parentNode),1!=s.nodeType?(G(),null):(u==l+1&&(n=s.childNodes[l]),x(n)?(h=p=n.cloneNode(!0),d=c.fire("ObjectSelected",{target:n,targetClone:h}),d.isDefaultPrevented()?(G(),null):(h=d.targetClone,o=r("#"+re),0===o.length&&(o=r('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",re),o.appendTo(c.getBody())),t=c.dom.createRng(),h===p&&e.ie?(o.empty().append(g.ZWSP).append(h).append(g.ZWSP),t.setStart(o[0].firstChild,0),t.setEnd(o[0].lastChild,1)):(o.empty().append("\xa0").append(h).append("\xa0"),t.setStart(o[0].firstChild,1),t.setEnd(o[0].lastChild,0)),o.css({top:i.getPos(n,c.getBody()).y}),c.getBody().focus(),o[0].focus(),a=c.selection.getSel(),a.removeAllRanges(),a.addRange(t),c.$("*[data-mce-selected]").removeAttr("data-mce-selected"),n.setAttribute("data-mce-selected",1),ie=n,t)):(G(),null))}function G(){ie&&(ie.removeAttribute("data-mce-selected"),c.$("#"+re).remove(),ie=null)}function J(){ne.destroy(),ie=null}var Q=c.getBody(),Z=new t(Q),ee=b(v,Z.next),te=b(v,Z.prev),ne=new o(c.getBody(),y),re="sel-"+c.dom.uniqueId(),ie,oe=c.$;return e.ceFalse&&(j(),Y()),{showBlockCaretContainer:W,destroy:J}}var b=f.curry,C=l.isContentEditableTrue,x=l.isContentEditableFalse,w=l.isElement,E=i.isAfterContentEditableFalse,N=i.isBeforeContentEditableFalse,_=c.getSelectedNode;return y}),r(Ge,[w,g,N,R,A,H,P,Y,J,Q,Z,ee,re,ie,E,d,Te,Me,B,M,Pe,h,m,u,He,Oe,Ie,Ue,Ke],function(e,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,C,x,w,E,N,_,S,k,T,R){function A(e,t,i){var o=this,a,s,l;a=o.documentBaseUrl=i.documentBaseURL,s=i.baseURI,l=i.defaultSettings,t=L({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:a,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:o.convertURL,url_converter_scope:o,ie7_compat:!0},l,t),l&&l.external_plugins&&t.external_plugins&&(t.external_plugins=L({},l.external_plugins,t.external_plugins)),o.settings=t,r.language=t.language||"en",r.languageLoad=t.language_load,r.baseURL=i.baseURL,o.id=t.id=e,o.setDirty(!1),o.plugins={},o.documentBaseURI=new p(t.document_base_url||a,{base_uri:s}),o.baseURI=s,o.contentCSS=[],o.contentStyles=[],o.shortcuts=new k(o),o.loadedCSS={},o.editorCommands=new h(o),t.target&&(o.targetElm=t.target),o.suffix=i.suffix,o.editorManager=i,o.inline=t.inline,t.cache_suffix&&(w.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),t.override_viewport===!1&&(w.overrideViewPort=!1),i.fire("SetupEditor",o),o.execCallback("setup",o),o.$=n.overrideDefaults(function(){return{context:o.inline?o.getBody():o.getDoc(),element:o.getBody()}})}var B=e.DOM,D=r.ThemeManager,M=r.PluginManager,L=E.extend,P=E.each,H=E.explode,O=E.inArray,I=E.trim,F=E.resolve,z=g.Event,W=w.gecko,V=w.ie;return A.prototype={render:function(){function e(){B.unbind(window,"ready",e),n.render()}function t(){var e=m.ScriptLoader;if(r.language&&"en"!=r.language&&!r.language_url&&(r.language_url=n.editorManager.baseURL+"/langs/"+r.language+".js"),r.language_url&&e.add(r.language_url),r.theme&&"function"!=typeof r.theme&&"-"!=r.theme.charAt(0)&&!D.urls[r.theme]){var t=r.theme_url;t=t?n.documentBaseURI.toAbsolute(t):"themes/"+r.theme+"/theme"+o+".js",D.load(r.theme,t)}E.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),P(r.external_plugins,function(e,t){M.load(t,e),r.plugins+=" "+t}),P(r.plugins.split(/[ ,]/),function(e){if(e=I(e),e&&!M.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=M.dependencies(e);P(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=M.createUrl(t,e),M.load(e.resource,e)})}else M.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),e.loadQueue(function(){n.removed||n.init()})}var n=this,r=n.settings,i=n.id,o=n.suffix;if(!z.domLoaded)return void B.bind(window,"ready",e);if(n.getElement()&&w.contentEditable){r.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden");var a=n.getElement().form||B.getParent(i,"form");a&&(n.formElement=a,r.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&(B.insertAfter(B.create("input",{type:"hidden",name:i}),i),n.hasHiddenInput=!0),n.formEventDelegate=function(e){n.fire(e.type,e)},B.bind(a,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!r.submit_patch||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return n.editorManager.triggerSave(),n.setDirty(!1),a._mceOldSubmit(a)})),n.windowManager=new v(n),n.notificationManager=new y(n),"xml"==r.encoding&&n.on("GetContent",function(e){e.save&&(e.content=B.encode(e.content))}),r.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&n.save()}),r.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),t()}},init:function(){function e(n){var r=M.get(n),i,o;if(i=M.urls[n]||t.documentBaseUrl.replace(/\/$/,""),n=I(n),r&&-1===O(m,n)){if(P(M.dependencies(n),function(t){e(t)}),t.plugins[n])return;o=new r(t,i,t.$),t.plugins[n]=o,o.init&&(o.init(t,i),m.push(n))}}var t=this,n=t.settings,r=t.getElement(),i,o,a,s,l,c,u,d,f,h,p,m=[];if(this.editorManager.i18n.setCode(n.language),t.rtl=n.rtl_ui||this.editorManager.i18n.rtl,t.editorManager.add(t),n.aria_label=n.aria_label||B.getAttrib(r,"aria-label",t.getLang("aria.rich_text_area")),n.theme&&("function"!=typeof n.theme?(n.theme=n.theme.replace(/-/,""),c=D.get(n.theme),t.theme=new c(t,D.urls[n.theme]),t.theme.init&&t.theme.init(t,D.urls[n.theme]||t.documentBaseUrl.replace(/\/$/,""),t.$)):t.theme=n.theme),P(n.plugins.replace(/\-/g,"").split(/[ ,]/),e),n.render_ui&&t.theme&&(t.orgDisplay=r.style.display,"function"!=typeof n.theme?(i=n.width||r.style.width||r.offsetWidth,o=n.height||r.style.height||r.offsetHeight,a=n.min_height||100,h=/^[0-9\.]+(|px)$/i,h.test(""+i)&&(i=Math.max(parseInt(i,10),100)),h.test(""+o)&&(o=Math.max(parseInt(o,10),a)),l=t.theme.renderUI({targetNode:r,width:i,height:o,deltaWidth:n.delta_width,deltaHeight:n.delta_height}),n.content_editable||(o=(l.iframeHeight||o)+("number"==typeof o?l.deltaHeight||0:""),a>o&&(o=a))):(l=n.theme(t,r),l.editorContainer.nodeType&&(l.editorContainer=l.editorContainer.id=l.editorContainer.id||t.id+"_parent"),l.iframeContainer.nodeType&&(l.iframeContainer=l.iframeContainer.id=l.iframeContainer.id||t.id+"_iframecontainer"),o=l.iframeHeight||r.offsetHeight),t.editorContainer=l.editorContainer),n.content_css&&P(H(n.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toAbsolute(e))}),n.content_style&&t.contentStyles.push(n.content_style),n.content_editable)return r=s=l=null,t.initContentBody();if(t.iframeHTML=n.doctype+"<html><head>",n.document_base_url!=t.documentBaseUrl&&(t.iframeHTML+='<base href="'+t.documentBaseURI.getURI()+'" />'),!w.caretAfter&&n.ie7_compat&&(t.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'),t.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',!/#$/.test(document.location.href))for(p=0;p<t.contentCSS.length;p++){var g=t.contentCSS[p];t.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+E._addCacheSuffix(g)+'" />',t.loadedCSS[g]=!0}d=n.body_id||"tinymce",-1!=d.indexOf("=")&&(d=t.getParam("body_id","","hash"),d=d[t.id]||d),f=n.body_class||"",-1!=f.indexOf("=")&&(f=t.getParam("body_class","","hash"),f=f[t.id]||""),n.content_security_policy&&(t.iframeHTML+='<meta http-equiv="Content-Security-Policy" content="'+n.content_security_policy+'" />'),t.iframeHTML+='</head><body id="'+d+'" class="mce-content-body '+f+'" data-id="'+t.id+'"><br></body></html>';var v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';document.domain!=location.hostname&&w.ie&&w.ie<12&&(u=v);var y=B.create("iframe",{id:t.id+"_ifr",frameBorder:"0",allowTransparency:"true",title:t.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:o,display:"block"}});if(y.onload=function(){y.onload=null,t.fire("load")},B.setAttrib(y,"src",u||'javascript:""'),t.contentAreaContainer=l.iframeContainer,t.iframeElement=y,s=B.add(l.iframeContainer,y),V)try{t.getDoc()}catch(b){s.src=u=v}l.editorContainer&&(B.get(l.editorContainer).style.display=t.orgDisplay,t.hidden=B.isHidden(l.editorContainer)),t.getElement().style.display="none",B.setAttrib(t.id,"aria-hidden",!0),u||t.initContentBody(),r=s=l=null},initContentBody:function(t){var n=this,r=n.settings,s=n.getElement(),h=n.getDoc(),p,m;r.inline||(n.getElement().style.visibility=n.orgVisibility),t||r.content_editable||(h.open(),h.write(n.iframeHTML),h.close()),r.content_editable&&(n.on("remove",function(){var e=this.getBody();B.removeClass(e,"mce-content-body"),B.removeClass(e,"mce-edit-focus"),B.setAttrib(e,"contentEditable",null)}),B.addClass(s,"mce-content-body"),n.contentDocument=h=r.content_document||document,n.contentWindow=r.content_window||window,n.bodyElement=s,r.content_document=r.content_window=null,r.root_name=s.nodeName.toLowerCase()),p=n.getBody(),p.disabled=!0,n.readonly=r.readonly,n.readonly||(n.inline&&"static"==B.getStyle(p,"position",!0)&&(p.style.position="relative"),p.contentEditable=n.getParam("content_editable_state",!0)),p.disabled=!1,n.editorUpload=new T(n),n.schema=new b(r),n.dom=new e(h,{keep_values:!0,url_converter:n.convertURL,url_converter_scope:n,hex_colors:r.force_hex_style_colors,class_filter:r.class_filter,update_styles:!0,root_element:n.inline?n.getBody():null,collect:r.content_editable,schema:n.schema,onSetAttrib:function(e){n.fire("SetAttrib",e)}}),n.parser=new C(r,n.schema),n.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var r=e.length,i,o=n.dom,a,s;r--;)if(i=e[r],a=i.attr(t),s="data-mce-"+t,!i.attributes.map[s]){if(0===a.indexOf("data:")||0===a.indexOf("blob:"))continue;"style"===t?(a=o.serializeStyle(o.parseStyle(a),i.name),a.length||(a=null),i.attr(s,a),i.attr(t,a)):"tabindex"===t?(i.attr(s,a),i.attr(t,null)):i.attr(s,n.convertURL(a,t,i.name))}}),n.parser.addNodeFilter("script",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("type")||"no/type",0!==r.indexOf("mce-")&&n.attr("type","mce-"+r)}),n.parser.addNodeFilter("#cdata",function(e){for(var t=e.length,n;t--;)n=e[t],n.type=8,n.name="#comment",n.value="[CDATA["+n.value+"]]"}),n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t=e.length,r,i=n.schema.getNonEmptyElements();t--;)r=e[t],r.isEmpty(i)&&(r.append(new o("br",1)).shortEnded=!0)}),n.serializer=new a(r,n),n.selection=new l(n.dom,n.getWin(),n.serializer,n),n.formatter=new c(n),n.undoManager=new u(n),n.forceBlocks=new f(n),n.enterKey=new d(n),n._nodeChangeDispatcher=new i(n),n._selectionOverrides=new R(n),n.fire("PreInit"),r.browser_spellcheck||r.gecko_spellcheck||(h.body.spellcheck=!1,B.setAttrib(p,"spellcheck","false")),n.fire("PostRender"),n.quirks=new x(n),r.directionality&&(p.dir=r.directionality),r.nowrap&&(p.style.whiteSpace="nowrap"),r.protect&&n.on("BeforeSetContent",function(e){P(r.protect,function(t){e.content=e.content.replace(t,function(e){return"<!--mce:protected "+escape(e)+"-->"})})}),n.on("SetContent",function(){n.addVisual(n.getBody())}),r.padd_empty_editor&&n.on("PostProcess",function(e){e.content=e.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")}),n.load({initial:!0,format:"html"}),n.startContent=n.getContent({format:"raw"}),n.initialized=!0,n.bindPendingEventDelegates(),n.fire("init"),n.focus(!0),n.nodeChanged({initial:!0}),n.execCallback("init_instance_callback",n),n.on("compositionstart compositionend",function(e){n.composing="compositionstart"===e.type}),n.contentStyles.length>0&&(m="",P(n.contentStyles,function(e){m+=e+"\r\n"}),n.dom.addStyle(m)),P(n.contentCSS,function(e){n.loadedCSS[e]||(n.dom.loadCSS(e),n.loadedCSS[e]=!0)}),r.auto_focus&&N.setEditorTimeout(n,function(){var e;e=r.auto_focus===!0?n:n.editorManager.get(r.auto_focus),e.destroyed||e.focus()},100),s=h=p=null},focus:function(e){function t(e){return n.dom.getParent(e,function(e){return"true"===n.dom.getContentEditable(e)})}var n=this,r=n.selection,i=n.settings.content_editable,o,a,s=n.getDoc(),l=n.getBody(),c;if(!e){if(o=r.getRng(),o.item&&(a=o.item(0)),n.quirks.refreshContentEditable(),c=t(r.getNode()),n.$.contains(l,c))return c.focus(),r.normalize(),void n.editorManager.setActive(n);if(i||(w.opera||n.getBody().focus(),n.getWin().focus()),W||i){if(l.setActive)try{l.setActive()}catch(u){l.focus()}else l.focus();i&&r.normalize()}a&&a.ownerDocument==s&&(o=s.body.createControlRange(),o.addElement(a),o.select())}n.editorManager.setActive(n)},execCallback:function(e){var t=this,n=t.settings[e],r;if(n)return t.callbackLookup&&(r=t.callbackLookup[e])&&(n=r.func,r=r.scope),"string"==typeof n&&(r=n.replace(/\.\w+$/,""),r=r?F(r):0,n=F(n),t.callbackLookup=t.callbackLookup||{},t.callbackLookup[e]={func:n,scope:r}),n.apply(r||t,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||"{#"+r+"}"}):""},getLang:function(e,n){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(n!==t?n:"{#"+e+"}")},getParam:function(e,t,n){var r=e in this.settings?this.settings[e]:t,i;return"hash"===n?(i={},"string"==typeof r?P(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(e){e=e.split("="),e.length>1?i[I(e[0])]=I(e[1]):i[I(e[0])]=I(e)}):i=r,i):r},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addContextToolbar:function(e,t){var n=this,r;n.contextToolbars=n.contextToolbars||[],"string"==typeof e&&(r=e,e=function(e){return n.dom.is(e,r)}),n.contextToolbars.push({predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable=!0:(B.show(e.getContainer()),B.hide(e.id)),e.load(),e.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(V&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(B.hide(e.getContainer()),B.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n=this,r=n.getElement(),i;return r?(e=e||{},e.load=!0,i=n.setContent(r.value!==t?r.value:r.innerHTML,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,i):void 0},save:function(e){var t=this,n=t.getElement(),r,i;if(n&&t.initialized)return e=e||{},e.save=!0,e.element=n,r=e.content=t.getContent(e),e.no_events||t.fire("SaveContent",e),"raw"==e.format&&t.fire("RawSaveContent",e),r=e.content,/TEXTAREA|INPUT/i.test(n.nodeName)?n.value=r:(t.inline||(n.innerHTML=r),(i=B.getParent(t.id,"form"))&&P(i.elements,function(e){return e.name==t.id?(e.value=r,!1):void 0})),e.element=n=null,e.set_dirty!==!1&&t.setDirty(!1),r},setContent:function(e,t){var n=this,r=n.getBody(),i,o;return t=t||{},t.format=t.format||"html",t.set=!0,t.content=e,t.no_events||n.fire("BeforeSetContent",t),e=t.content,0===e.length||/^\s+$/.test(e)?(o=V&&11>V?"":'<br data-mce-bogus="1">',"TABLE"==r.nodeName?e="<tr><td>"+o+"</td></tr>":/^(UL|OL)$/.test(r.nodeName)&&(e="<li>"+o+"</li>"),i=n.settings.forced_root_block,i&&n.schema.isValidChild(r.nodeName.toLowerCase(),i.toLowerCase())?(e=o,e=n.dom.createHTML(i,n.settings.forced_root_block_attrs,e)):V||e||(e='<br data-mce-bogus="1">'),n.dom.setHTML(r,e),n.fire("SetContent",t)):("raw"!==t.format&&(e=new s({validate:n.validate},n.schema).serialize(n.parser.parse(e,{isRootContent:!0}))),t.content=I(e),n.dom.setHTML(r,t.content),t.no_events||n.fire("SetContent",t)),t.content},getContent:function(e){var t=this,n,r=t.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),n="raw"==e.format?t.serializer.getTrimmedContent():"text"==e.format?r.innerText||r.textContent:t.serializer.serialize(r,e),"text"!=e.format?e.content=I(n):e.content=n,e.no_events||t.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=L({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!=t&&this.fire("dirty")},setMode:function(e){S.setMode(this,e)},getContainer:function(){var e=this;return e.container||(e.container=B.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=B.get(this.id)),this.targetElm},getWin:function(){var e=this,t;return e.contentWindow||(t=e.iframeElement,t&&(e.contentWindow=t.contentWindow)),e.contentWindow},getDoc:function(){var e=this,t;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var r=this,i=r.settings;return i.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n=this,r=n.settings,i=n.dom,o;e=e||n.getBody(),n.hasVisual===t&&(n.hasVisual=r.visual),P(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return o=r.visual_table_class||"mce-item-table",t=i.getAttrib(e,"border"),void(t&&"0"!=t||!n.hasVisual?i.removeClass(e,o):i.addClass(e,o));case"A":return void(i.getAttrib(e,"href",!1)||(t=i.getAttrib(e,"name")||e.id,o=r.visual_anchor_class||"mce-item-anchor",t&&n.hasVisual?i.addClass(e,o):i.removeClass(e,o)))}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;e.removed||(e.save(),e.removed=1,e.unbindAllNativeEvents(),e.hasHiddenInput&&B.remove(e.getElement().nextSibling),e.inline||(V&&10>V&&e.getDoc().execCommand("SelectAll",!1,null),B.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null),e.fire("remove"),e.editorManager.remove(e),B.remove(e.getContainer()),e._selectionOverrides.destroy(),e.editorUpload.destroy(),e.destroy())},destroy:function(e){var t=this,n;if(!t.destroyed){if(!e&&!t.removed)return void t.remove();e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.selection.destroy(),t.dom.destroy()),n=t.formElement,n&&(n._mceOldSubmit&&(n.submit=n._mceOldSubmit,n._mceOldSubmit=null),B.unbind(n,"submit reset",t.formEventDelegate)),t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1}},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},L(A.prototype,_),A}),r(Je,[],function(){var e={},t="en";return{setCode:function(e){e&&(t=e,this.rtl=this.data[e]?"rtl"===this.data[e]._dir:!1)},getCode:function(){return t},rtl:!1,add:function(t,n){var r=e[t];r||(e[t]=r={});for(var i in n)r[i]=n[i];this.setCode(t)},translate:function(n){var r;if(r=e[t],r||(r={}),"undefined"==typeof n)return n;if("string"!=typeof n&&n.raw)return n.raw;if(n.push){var i=n.slice(1);n=(r[n[0]]||n[0]).replace(/\{([0-9]+)\}/g,function(e,t){return i[t]})}return(r[n]||n).replace(/{context:\w+}$/,"")},data:e}}),r(Qe,[w,u,h],function(e,t,n){function r(e){function l(){try{return document.activeElement}catch(e){return document.body}}function c(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}function u(e,t){var n;return t.startContainer?(n=e.getDoc().createRange(),n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function d(e){return!!s.getParent(e,r.isEditorUIElement)}function f(r){var f=r.editor;f.on("init",function(){(f.inline||n.ie)&&("onbeforedeactivate"in document&&n.ie<9?f.dom.bind(f.getBody(),"beforedeactivate",function(e){if(e.target==f.getBody())try{f.lastRng=f.selection.getRng()}catch(t){}}):f.on("nodechange mouseup keyup",function(e){var t=l();"nodechange"==e.type&&e.selectionChange||(t&&t.id==f.id+"_ifr"&&(t=f.getBody()),f.dom.isChildOf(t,f.getBody())&&(f.lastRng=f.selection.getRng()))}),n.webkit&&!i&&(i=function(){var t=e.activeEditor;if(t&&t.selection){var n=t.selection.getRng();n&&!n.collapsed&&(f.lastRng=n)}},s.bind(document,"selectionchange",i)))}),f.on("setcontent",function(){f.lastRng=null}),f.on("mousedown",function(){f.selection.lastFocusBookmark=null}),f.on("focusin",function(){var t=e.focusedEditor,n;f.selection.lastFocusBookmark&&(n=u(f,f.selection.lastFocusBookmark),f.selection.lastFocusBookmark=null,f.selection.setRng(n)),t!=f&&(t&&t.fire("blur",{focusedEditor:f}),e.setActive(f),e.focusedEditor=f,f.fire("focus",{blurredEditor:t}),f.focus(!0)),f.lastRng=null}),f.on("focusout",function(){t.setEditorTimeout(f,function(){var t=e.focusedEditor;d(l())||t!=f||(f.fire("blur",{focusedEditor:null}),e.focusedEditor=null,f.selection&&(f.selection.lastFocusBookmark=null))})}),o||(o=function(t){var n=e.activeEditor,r;r=t.target,n&&r.ownerDocument==document&&(n.selection&&r!=n.getBody()&&(n.selection.lastFocusBookmark=c(n.dom,n.lastRng)),r==document.body||d(r)||e.focusedEditor!=n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},s.bind(document,"focusin",o)),f.inline&&!a&&(a=function(t){var n=e.activeEditor;if(n.inline&&!n.dom.isChildOf(t.target,n.getBody())){var r=n.selection.getRng();r.collapsed||(n.lastRng=r)}},s.bind(document,"mouseup",a))}function h(t){e.focusedEditor==t.editor&&(e.focusedEditor=null),e.activeEditor||(s.unbind(document,"selectionchange",i),s.unbind(document,"focusin",o),s.unbind(document,"mouseup",a),i=o=a=null)}e.on("AddEditor",f),e.on("RemoveEditor",h)}var i,o,a,s=e.DOM;return r.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},r}),r(Ze,[Ge,g,w,ie,h,m,c,le,Je,Qe],function(e,t,n,r,i,o,a,s,l,c){function u(e){g(C.editors,function(t){"scroll"===e.type?t.fire("ScrollWindow",e):t.fire("ResizeWindow",e)})}function d(e,n){n!==x&&(n?t(window).on("resize scroll",u):t(window).off("resize scroll",u),x=n)}function f(e){var t=C.editors,n;delete t[e.id];for(var r=0;r<t.length;r++)if(t[r]==e){t.splice(r,1),n=!0;break}return C.activeEditor==e&&(C.activeEditor=t[0]),C.focusedEditor==e&&(C.focusedEditor=null),n}function h(e){return e&&!(e.getContainer()||e.getBody()).parentNode&&(f(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null),e}var p=n.DOM,m=o.explode,g=o.each,v=o.extend,y=0,b,C,x=!1;return C={$:t,majorVersion:"4",minorVersion:"3.10",releaseDate:"2016-04-12",editors:[],i18n:l,activeEditor:null,setup:function(){var e=this,t,n,i="",o,a;if(n=r.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/")),o=window.tinymce||window.tinyMCEPreInit)t=o.base||o.baseURL,i=o.suffix;else{for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){a=s[l].src;var u=a.substring(a.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(a)){-1!=u.indexOf(".min")&&(i=".min"),t=a.substring(0,a.lastIndexOf("/"));break}}!t&&document.currentScript&&(a=document.currentScript.src,-1!=a.indexOf(".min")&&(i=".min"),t=a.substring(0,a.lastIndexOf("/")))}e.baseURL=new r(n).toAbsolute(t),e.documentBaseURL=n,e.baseURI=new r(e.baseURL),e.suffix=i,e.focusManager=new c(e)},overrideDefaults:function(e){var t,n;t=e.base_url,t&&(this.baseURL=new r(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new r(this.baseURL)),n=e.suffix,e.suffix&&(this.suffix=n),this.defaultSettings=e},init:function(n){function r(e){var t=e.id;return t||(t=e.name,t=t&&!p.get(t)?e.name:p.uniqueId(),e.setAttribute("id",t)),t}function i(e){var t=n[e];if(t)return t.apply(u,Array.prototype.slice.call(arguments,2))}function s(e,t){return t.constructor===RegExp?t.test(e.className):p.hasClass(e,t)}function l(e){var t,n=[];if(e.types)return g(e.types,function(e){n=n.concat(p.select(e.selector))}),n;if(e.selector)return p.select(e.selector);if(e.target)return[e.target];switch(e.mode){case"exact":t=e.elements||"",t.length>0&&g(m(t),function(e){var t;(t=p.get(e))?n.push(t):g(document.forms,function(t){g(t.elements,function(t){t.name===e&&(e="mce_editor_"+y++,p.setAttrib(t,"id",e),n.push(t))})})});break;case"textareas":case"specific_textareas":g(p.select("textarea"),function(t){e.editor_deselector&&s(t,e.editor_deselector)||e.editor_selector&&!s(t,e.editor_selector)||n.push(t)})}return n}function c(){function a(t,n,r){if(!h(u.get(t))){var i=new e(t,n,u);d.push(i),i.on("init",function(){++s===m.length&&f(d)}),i.targetElm=i.targetElm||r,i.render()}}var s=0,d=[],m;return p.unbind(window,"ready",c),i("onpageload"),m=t.unique(l(n)),n.types?void g(n.types,function(e){o.each(m,function(t){return p.is(t,e.selector)?(a(r(t),v({},n,e),t),!1):!0})}):void g(m,function(e){a(r(e),n,e)})}var u=this,d,f=function(e){d=e};return u.settings=n,p.bind(window,"ready",c),new a(function(e){d?e(d):f=function(t){e(t)}})},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),d(n,!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),b||(b=function(){t.fire("BeforeUnload")},p.bind(window,"beforeunload",b)),e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t=this,n,r=t.editors,i;{if(e)return"string"==typeof e?(e=e.selector||e,void g(p.select(e),function(e){i=r[e.id],i&&t.remove(i)})):(i=e,r[i.id]?(f(i)&&t.fire("RemoveEditor",{editor:i}),r.length||p.unbind(window,"beforeunload",b),i.remove(),d(r,r.length>0),i):null);for(n=r.length-1;n>=0;n--)t.remove(r[n])}},execCommand:function(t,n,r){var i=this,o=i.get(r);switch(t){case"mceAddEditor":return i.get(r)||new e(r,i.settings,i).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(i.execCommand("mceAddEditor",0,r),!0)}return i.activeEditor?i.activeEditor.execCommand(t,n,r):!1},triggerSave:function(){g(this.editors,function(e){e.save()})},addI18n:function(e,t){l.add(e,t)},translate:function(e){return l.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!=e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}},v(C,s),C.setup(),window.tinymce=window.tinyMCE=C,C}),r(et,[Ze,m],function(e,t){var n=t.each,r=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function e(e,t){n(t,function(t,n){t&&s.setStyle(e,n,t)}),s.rename(e,"span")}function i(e){s=t.dom,l.convert_fonts_to_spans&&n(s.select("font,u,strike",e.node),function(e){o[e.nodeName.toLowerCase()](s,e)})}var o,a,s,l=t.settings;l.inline_styles&&(a=r(l.font_size_legacy_values),o={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:a[parseInt(n.size,10)-1]})},u:function(n,r){"html4"===t.settings.schema&&e(r,{textDecoration:"underline"})},strike:function(t,n){e(n,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",i))})})}),r(tt,[le,m],function(e,t){var n={send:function(e){function r(){!e.async||4==i.readyState||o++>1e4?(e.success&&1e4>o&&200==i.status?e.success.call(e.success_scope,""+i.responseText,i,e):e.error&&e.error.call(e.error_scope,o>1e4?"TIMED_OUT":"GENERAL",i,e),i=null):setTimeout(r,10)}var i,o=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=e.async!==!1,e.data=e.data||"",n.fire("beforeInitialize",{settings:e}),i=new XMLHttpRequest){if(i.overrideMimeType&&i.overrideMimeType(e.content_type),i.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(i.withCredentials=!0),e.content_type&&i.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&t.each(e.requestheaders,function(e){i.setRequestHeader(e.key,e.value)}),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i=n.fire("beforeSend",{xhr:i,settings:e}).xhr,i.send(e.data),!e.async)return r();setTimeout(r,10)}}};return t.extend(n,e),n}),r(nt,[],function(){function e(t,n){var r,i,o,a;if(n=n||'"',null===t)return"null";if(o=typeof t,"string"==o)return i="\bb        t\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=i.indexOf(t),r+1?"\\"+i.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+n;if("object"==o){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(r=0,i="[";r<t.length;r++)i+=(r>0?",":"")+e(t[r],n);return i+"]"}i="{";for(a in t)t.hasOwnProperty(a)&&(i+="function"!=typeof t[a]?(i.length>1?","+n:n)+a+n+":"+e(t[a],n):"");
-return i+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(t){}}}}),r(rt,[nt,tt,m],function(e,t,n){function r(e){this.settings=i({},e),this.count=0}var i=n.extend;return r.sendRPC=function(e){return(new r).send(e)},r.prototype={send:function(n){var r=n.error,o=n.success;n=i(this.settings,n),n.success=function(t,i){t=e.parse(t),"undefined"==typeof t&&(t={error:"JSON Parse error."}),t.error?r.call(n.error_scope||n.scope,t.error,i):o.call(n.success_scope||n.scope,t.result)},n.error=function(e,t){r&&r.call(n.error_scope||n.scope,e,t)},n.data=e.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",t.send(n)}},r}),r(it,[w],function(e){return{callbacks:{},count:0,send:function(n){var r=this,i=e.DOM,o=n.count!==t?n.count:r.count,a="tinymce_jsonp_"+o;r.callbacks[o]=function(e){i.remove(a),delete r.callbacks[o],n.callback(e)},i.add(i.doc.body,"script",{id:a,src:n.url,type:"text/javascript"}),r.count++}}}),r(ot,[],function(){function e(){s=[];for(var e in a)s.push(e);i.length=s.length}function n(){function n(e){var n,r;return r=e!==t?u+e:i.indexOf(",",u),-1===r||r>i.length?null:(n=i.substring(u,r),u=r+1,n)}var r,i,s,u=0;if(a={},c){o.load(l),i=o.getAttribute(l)||"";do{var d=n();if(null===d)break;if(r=n(parseInt(d,32)||0),null!==r){if(d=n(),null===d)break;s=n(parseInt(d,32)||0),r&&(a[r]=s)}}while(null!==r);e()}}function r(){var t,n="";if(c){for(var r in a)t=a[r],n+=(n?",":"")+r.length.toString(32)+","+r+","+t.length.toString(32)+","+t;o.setAttribute(l,n);try{o.save(l)}catch(i){}e()}}var i,o,a,s,l,c;try{if(window.localStorage)return localStorage}catch(u){}return l="tinymce",o=document.documentElement,c=!!o.addBehavior,c&&o.addBehavior("#default#userData"),i={key:function(e){return s[e]},getItem:function(e){return e in a?a[e]:null},setItem:function(e,t){a[e]=""+t,r()},removeItem:function(e){delete a[e],r()},clear:function(){a={},r()}},n(),i}),r(at,[w,d,E,N,m,h],function(e,t,n,r,i,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=r.PluginManager,a.ThemeManager=r.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,i.each(i,function(e,t){a[t]=e}),i.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),r(st,[oe,m],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.bodyClasses.add(this.settings.containerClass)},applyClasses:function(e){var t=this,n=t.settings,r,i,o,a;r=n.firstControlClass,i=n.lastControlClass,e.each(function(e){e.classes.remove(r).remove(i).add(n.controlClass),e.visible()&&(o||(o=e),a=e)}),o&&o.classes.add(r),a&&a.classes.add(i)},renderHtml:function(e){var t=this,n="";return t.applyClasses(e.items()),e.items().each(function(e){n+=e.renderHtml()}),n},recalc:function(){},postRender:function(){},isNative:function(){return!1}})}),r(lt,[st],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'<div id="'+e._id+'-absend" class="'+e.classPrefix+'abs-end"></div>'+this._super(e)}})}),r(ct,[Ae],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t=this,n;t._super(e),e=t.settings,n=t.settings.size,t.on("click mousedown",function(e){e.preventDefault()}),t.on("touchstart",function(e){t.fire("click",e),e.preventDefault()}),e.subtype&&t.classes.add(e.subtype),n&&t.classes.add("btn-"+n),e.icon&&t.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e=this.getEl().firstChild,t;e&&(t=e.style,t.width=t.height="100%"),this._super()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("icon"),i,o=e.state.get("text"),a="";return i=e.settings.image,i?(r="none","string"!=typeof i&&(i=window.getSelection?i[0]:i[1]),i=" style=\"background-image: url('"+i+"')\""):i="",o&&(e.classes.add("btn-has-text"),a='<span class="'+n+'txt">'+e.encode(o)+"</span>"),r=e.settings.icon?n+"ico "+n+"i-"+r:"",'<div id="'+t+'" class="'+e.classes+'" tabindex="-1" aria-labelledby="'+t+'"><button role="presentation" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+i+"></i>":"")+a+"</button></div>"},bindStates:function(){function e(e){var i=n("span."+r,t.getEl());e?(i[0]||(n("button:first",t.getEl()).append('<span class="'+r+'"></span>'),i=n("span."+r,t.getEl())),i.html(t.encode(e))):i.remove(),t.classes.toggle("btn-has-text",!!e)}var t=this,n=t.$,r=t.classPrefix+"txt";return t.state.on("change:text",function(t){e(t.value)}),t.state.on("change:icon",function(n){var r=n.value,i=t.classPrefix;t.settings.icon=r,r=r?i+"ico "+i+"i-"+t.settings.icon:"";var o=t.getEl().firstChild,a=o.getElementsByTagName("i")[0];r?(a&&a==o.firstChild||(a=document.createElement("i"),o.insertBefore(a,o.firstChild)),a.className=r):a&&o.removeChild(a),e(t.state.get("text"))}),t._super()}})}),r(ut,[be],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.classes.add("btn-group"),e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'"><div id="'+e._id+'-body">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}})}),r(dt,[Ae],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'<div id="'+t+'" class="'+e.classes+'" unselectable="on" aria-labelledby="'+t+'-al" tabindex="-1"><i class="'+n+"ico "+n+'i-checkbox"></i><span id="'+t+'-al" class="'+n+'label">'+e.encode(e.state.get("text"))+"</span></div>"},bindStates:function(){function e(e){t.classes.toggle("checked",e),t.aria("checked",e)}var t=this;return t.state.on("change:text",function(e){t.getEl("al").firstChild.data=t.translate(e.value)}),t.state.on("change:checked change:value",function(n){t.fire("change"),e(n.value)}),t.state.on("change:icon",function(e){var n=e.value,r=t.classPrefix;if("undefined"==typeof n)return t.settings.icon;t.settings.icon=n,n=n?r+"ico "+r+"i-"+t.settings.icon:"";var i=t.getEl().firstChild,o=i.getElementsByTagName("i")[0];n?(o&&o==i.firstChild||(o=document.createElement("i"),i.insertBefore(o,i.firstChild)),o.className=n):o&&i.removeChild(o)}),t.state.get("checked")&&e(!0),t._super()}})}),r(ft,[Ae,ve,fe,g],function(e,t,n,r){return e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.classes.add("combobox"),t.subinput=!0,t.ariaTarget="inp",e.menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){var i=n.target,o=t.getEl();if(r.contains(o,i)||i==o)for(;i&&i!=o;)i.id&&-1!=i.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),i=i.parentNode}),t.on("keydown",function(e){"INPUT"==e.target.nodeName&&13==e.keyCode&&t.parents().reverse().each(function(n){var r=t.state.get("value"),i=t.getEl("inp").value;return e.preventDefault(),t.state.set("value",i),r!=i&&t.fire("change"),n.hasEventListeners("submit")&&n.toJSON?(n.fire("submit",{data:n.toJSON()}),!1):void 0})}),t.on("keyup",function(e){"INPUT"==e.target.nodeName&&t.state.set("value",e.target.value)})},showMenu:function(){var e=this,n=e.settings,r;e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(e.getContainerElm()),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control===e.menu&&e.focus()}),e.menu.on("show hide",function(t){t.control.items().each(function(t){t.active(t.value()==e.value())})}).fire("show"),e.menu.on("select",function(t){e.value(t.control.value())}),e.on("focusin",function(t){"INPUT"==t.target.tagName.toUpperCase()&&e.menu.hide()}),e.aria("expanded",!0)),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e=this,t=e.getEl(),i=e.getEl("open"),o=e.layoutRect(),a,s;a=i?o.w-n.getSize(i).width-10:o.w-10;var l=document;return l.all&&(!l.documentMode||l.documentMode<=8)&&(s=e.layoutRect().h-2+"px"),r(t.firstChild).css({width:a,lineHeight:s}),e._super(),e},postRender:function(){var e=this;return r(this.getEl("inp")).on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)}),e._super()},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.classPrefix,i=e.state.get("value")||"",o,a,s="",l="";return"spellcheck"in n&&(l+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(l+=' maxlength="'+n.maxLength+'"'),n.size&&(l+=' size="'+n.size+'"'),n.subtype&&(l+=' type="'+n.subtype+'"'),e.disabled()&&(l+=' disabled="disabled"'),o=n.icon,o&&"caret"!=o&&(o=r+"ico "+r+"i-"+n.icon),a=e.state.get("text"),(o||a)&&(s='<div id="'+t+'-open" class="'+r+"btn "+r+'open" tabIndex="-1" role="button"><button id="'+t+'-action" type="button" hidefocus="1" tabindex="-1">'+("caret"!=o?'<i class="'+o+'"></i>':'<i class="'+r+'caret"></i>')+(a?(o?" ":"")+a:"")+"</button></div>",e.classes.add("has-open")),'<div id="'+t+'" class="'+e.classes+'"><input id="'+t+'-inp" class="'+r+'textbox" value="'+e.encode(i,!1)+'" hidefocus="1"'+l+' placeholder="'+e.encode(n.placeholder)+'" />'+s+"</div>"},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl("inp").value!=t.value&&(e.getEl("inp").value=t.value)}),e.state.on("change:disabled",function(t){e.getEl("inp").disabled=t.value}),e._super()},remove:function(){r(this.getEl("inp")).off(),this._super()}})}),r(ht,[ft],function(e){return e.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl().getElementsByTagName("i")[0];if(t)try{t.style.background=e}catch(n){}},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e._rendered&&e.repaintColor(t.value)}),e._super()}})}),r(pt,[ct,_e],function(e,t){return e.extend({showPanel:function(){var e=this,n=e.settings;if(e.active(!0),e.panel)e.panel.show();else{var r=n.panel;r.type&&(r={layout:"grid",items:r}),r.role=r.role||"dialog",r.popover=!0,r.autohide=!0,r.ariaRoot=!0,e.panel=new t(r).on("hide",function(){e.active(!1)}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}e.panel.moveRel(e.getEl(),n.popoverAlign||(e.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var e=this;e.panel&&e.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}})}),r(mt,[pt,w],function(e,t){var n=t.DOM;return e.extend({init:function(e){this._super(e),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("text"),i=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",o=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"",a="";return r&&(e.classes.add("btn-has-text"),a='<span class="'+n+'txt">'+e.encode(r)+"</span>"),'<div id="'+t+'" class="'+e.classes+'" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">'+(i?'<i class="'+i+'"'+o+"></i>":"")+'<span id="'+t+'-preview" class="'+n+'preview"></span>'+a+'</button><button type="button" class="'+n+'open" hidefocus="1" tabindex="-1"> <i class="'+n+'caret"></i></button></div>'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(r){r.aria&&"down"==r.aria.key||r.control!=e||n.getParent(r.target,"."+e.classPrefix+"open")||(r.stopImmediatePropagation(),t.call(e,r))}),delete e.settings.onclick,e._super()}})}),r(gt,[],function(){function e(e){function i(e,i,o){var a,s,l,c,u,d;return a=0,s=0,l=0,e/=255,i/=255,o/=255,u=t(e,t(i,o)),d=n(e,n(i,o)),u==d?(l=u,{h:0,s:0,v:100*l}):(c=e==u?i-o:o==u?e-i:o-e,a=e==u?3:o==u?1:5,a=60*(a-c/(d-u)),s=(d-u)/d,l=d,{h:r(a),s:r(100*s),v:r(100*l)})}function o(e,i,o){var a,s,l,c;if(e=(parseInt(e,10)||0)%360,i=parseInt(i,10)/100,o=parseInt(o,10)/100,i=n(0,t(i,1)),o=n(0,t(o,1)),0===i)return void(d=f=h=r(255*o));switch(a=e/60,s=o*i,l=s*(1-Math.abs(a%2-1)),c=o-s,Math.floor(a)){case 0:d=s,f=l,h=0;break;case 1:d=l,f=s,h=0;break;case 2:d=0,f=s,h=l;break;case 3:d=0,f=l,h=s;break;case 4:d=l,f=0,h=s;break;case 5:d=s,f=0,h=l;break;default:d=f=h=0}d=r(255*(d+c)),f=r(255*(f+c)),h=r(255*(h+c))}function a(){function e(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+e(d)+e(f)+e(h)}function s(){return{r:d,g:f,b:h}}function l(){return i(d,f,h)}function c(e){var t;return"object"==typeof e?"r"in e?(d=e.r,f=e.g,h=e.b):"v"in e&&o(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(d=parseInt(t[1],10),f=parseInt(t[2],10),h=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(d=parseInt(t[1],16),f=parseInt(t[2],16),h=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(d=parseInt(t[1]+t[1],16),f=parseInt(t[2]+t[2],16),h=parseInt(t[3]+t[3],16)),d=0>d?0:d>255?255:d,f=0>f?0:f>255?255:f,h=0>h?0:h>255?255:h,u}var u=this,d=0,f=0,h=0;e&&c(e),u.toRgb=s,u.toHsv=l,u.toHex=a,u.parse=c}var t=Math.min,n=Math.max,r=Math.round;return e}),r(vt,[Ae,Ce,fe,gt],function(e,t,n,r){return e.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){function e(e,t){var r=n.getPos(e),i,o;return i=t.pageX-r.x,o=t.pageY-r.y,i=Math.max(0,Math.min(i/e.clientWidth,1)),o=Math.max(0,Math.min(o/e.clientHeight,1)),{x:i,y:o}}function i(e,t){var i=(360-e.h)/360;n.css(d,{top:100*i+"%"}),t||n.css(h,{left:e.s+"%",top:100-e.v+"%"}),f.style.background=new r({s:100,v:100,h:e.h}).toHex(),s.color().parse({s:e.s,v:e.v,h:e.h})}function o(t){var n;n=e(f,t),c.s=100*n.x,c.v=100*(1-n.y),i(c),s.fire("change")}function a(t){var n;n=e(u,t),c=l.toHsv(),c.h=360*(1-n.y),i(c,!0),s.fire("change")}var s=this,l=s.color(),c,u,d,f,h;u=s.getEl("h"),d=s.getEl("hp"),f=s.getEl("sv"),h=s.getEl("svp"),s._repaint=function(){c=l.toHsv(),i(c)},s._super(),s._svdraghelper=new t(s._id+"-sv",{start:o,drag:o}),s._hdraghelper=new t(s._id+"-h",{start:a,drag:a}),s._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){var t=this;return arguments.length?(t.color().parse(e),void(t._rendered&&t._repaint())):t.color().toHex()},color:function(){return this._color||(this._color=new r),this._color},renderHtml:function(){function e(){var e,t,n="",i,a;for(i="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",a=o.split(","),e=0,t=a.length-1;t>e;e++)n+='<div class="'+r+'colorpicker-h-chunk" style="height:'+100/t+"%;"+i+a[e]+",endColorstr="+a[e+1]+");-ms-"+i+a[e]+",endColorstr="+a[e+1]+')"></div>';return n}var t=this,n=t._id,r=t.classPrefix,i,o="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000",a="background: -ms-linear-gradient(top,"+o+");background: linear-gradient(to bottom,"+o+");";return i='<div id="'+n+'-h" class="'+r+'colorpicker-h" style="'+a+'">'+e()+'<div id="'+n+'-hp" class="'+r+'colorpicker-h-marker"></div></div>','<div id="'+n+'" class="'+t.classes+'"><div id="'+n+'-sv" class="'+r+'colorpicker-sv"><div class="'+r+'colorpicker-overlay1"><div class="'+r+'colorpicker-overlay2"><div id="'+n+'-svp" class="'+r+'colorpicker-selector1"><div class="'+r+'colorpicker-selector2"></div></div></div></div></div>'+i+"</div>"}})}),r(yt,[Ae],function(e){return e.extend({init:function(e){var t=this;e.delimiter||(e.delimiter="\xbb"),t._super(e),t.classes.add("path"),t.canFocus=!0,t.on("click",function(e){var n,r=e.target;(n=r.getAttribute("data-index"))&&t.fire("select",{value:t.row()[n],index:n})}),t.row(t.settings.row)},focus:function(){var e=this;return e.getEl().firstChild.focus(),e},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){var e=this;return'<div id="'+e._id+'" class="'+e.classes+'">'+e._getDataPathHtml(e.state.get("row"))+"</div>"},bindStates:function(){var e=this;return e.state.on("change:row",function(t){e.innerHtml(e._getDataPathHtml(t.value))}),e._super()},_getDataPathHtml:function(e){var t=this,n=e||[],r,i,o="",a=t.classPrefix;for(r=0,i=n.length;i>r;r++)o+=(r>0?'<div class="'+a+'divider" aria-hidden="true"> '+t.settings.delimiter+" </div>":"")+'<div role="button" class="'+a+"path-item"+(r==i-1?" "+a+"last":"")+'" data-index="'+r+'" tabindex="-1" id="'+t._id+"-"+r+'" aria-level="'+r+'">'+n[r].name+"</div>";return o||(o='<div class="'+a+'path-item">\xa0</div>'),o}})}),r(bt,[yt,Ze],function(e,t){return e.extend({postRender:function(){function e(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}var n=this,r=t.activeEditor;return r.settings.elementpath!==!1&&(n.on("select",function(e){r.focus(),r.selection.select(this.row()[e.index].element),r.nodeChanged()}),r.on("nodeChange",function(t){for(var i=[],o=t.parents,a=o.length;a--;)if(1==o[a].nodeType&&!e(o[a])){var s=r.fire("ResolveName",{name:o[a].nodeName.toLowerCase(),target:o[a]});if(s.isDefaultPrevented()||i.push({name:s.name,element:o[a]}),s.isPropagationStopped())break}n.row(i)})),n._super()}})}),r(Ct,[be],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.classes.add("formitem"),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<div id="'+e._id+'-title" class="'+n+'title">'+e.settings.title+"</div>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}})}),r(xt,[be,Ct,m],function(e,t,n){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,r=e.items();e.settings.formItemDefaults||(e.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),r.each(function(r){var i,o=r.settings.label;o&&(i=new t(n.extend({items:{type:"label",id:r._id+"-l",text:o,flex:0,forId:r._id,disabled:r.disabled()}},e.settings.formItemDefaults)),i.type="formitem",r.aria("labelledby",r._id+"-l"),"undefined"==typeof r.settings.flex&&(r.settings.flex=1),e.replace(r,i),i.add(r))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super(),e.fromJSON(e.settings.data)},bindStates:function(){function e(){var e=0,n=[],r,i,o;if(t.settings.labelGapCalc!==!1)for(o="children"==t.settings.labelGapCalc?t.find("formitem"):t.items(),o.filter("formitem").each(function(t){var r=t.items()[0],i=r.getEl().clientWidth;e=i>e?i:e,n.push(r)}),i=t.settings.labelGap||0,r=n.length;r--;)n[r].settings.minWidth=e+i}var t=this;t._super(),t.on("show",e),e()}})}),r(wt,[xt],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'<fieldset id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<legend id="'+e._id+'-title" class="'+n+'fieldset-title">'+e.settings.title+"</legend>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></fieldset>"}})}),r(Et,[ft,m],function(e,t){return e.extend({init:function(e){var n=this,r=tinymce.activeEditor,i=r.settings,o,a,s;e.spellcheck=!1,s=i.file_picker_types||i.file_browser_callback_types,s&&(s=t.makeMap(s,/[, ]/)),s&&!s[e.filetype]||(a=i.file_picker_callback,!a||s&&!s[e.filetype]?(a=i.file_browser_callback,!a||s&&!s[e.filetype]||(o=function(){a(n.getEl("inp").id,n.value(),e.filetype,window)})):o=function(){var i=n.fire("beforecall").meta;i=t.extend({filetype:e.filetype},i),a.call(r,function(e,t){n.value(e).fire("change",{meta:t})},n.value(),i)}),o&&(e.icon="browse",e.onaction=o),n._super(e)}})}),r(Nt,[lt],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),r(_t,[lt],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v=[],y,b,C,x,w,E,N,_,S,k,T,R,A,B,D,M,L,P,H,O,I,F,z=Math.max,W=Math.min;for(r=e.items().filter(":visible"),i=e.layoutRect(),o=e.paddingBox,a=e.settings,f=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,c=a.spacing||0,"row-reversed"!=f&&"column-reverse"!=f||(r=r.set(r.toArray().reverse()),f=f.split("-")[0]),"column"==f?(S="y",N="h",_="minH",k="maxH",R="innerH",T="top",A="deltaH",B="contentH",H="left",L="w",D="x",M="innerW",P="minW",O="right",I="deltaW",F="contentW"):(S="x",N="w",_="minW",k="maxW",R="innerW",T="left",A="deltaW",B="contentW",H="top",L="h",D="y",M="innerH",P="minH",O="bottom",I="deltaH",F="contentH"),d=i[R]-o[T]-o[T],E=u=0,t=0,n=r.length;n>t;t++)h=r[t],p=h.layoutRect(),m=h.settings,g=m.flex,d-=n-1>t?c:0,g>0&&(u+=g,p[k]&&v.push(h),p.flex=g),d-=p[_],y=o[H]+p[P]+o[O],y>E&&(E=y);if(x={},0>d?x[_]=i[_]-d+i[A]:x[_]=i[R]-d+i[A],x[P]=E+i[I],x[B]=i[R]-d,x[F]=E,x.minW=W(x.minW,i.maxW),x.minH=W(x.minH,i.maxH),x.minW=z(x.minW,i.startMinWidth),x.minH=z(x.minH,i.startMinHeight),!i.autoResize||x.minW==i.minW&&x.minH==i.minH){for(C=d/u,t=0,n=v.length;n>t;t++)h=v[t],p=h.layoutRect(),b=p[k],y=p[_]+p.flex*C,y>b?(d-=p[k]-p[_],u-=p.flex,p.flex=0,p.maxFlexSize=b):p.maxFlexSize=0;for(C=d/u,w=o[T],x={},0===u&&("end"==l?w=d+o[T]:"center"==l?(w=Math.round(i[R]/2-(i[R]-d)/2)+o[T],0>w&&(w=o[T])):"justify"==l&&(w=o[T],c=Math.floor(d/(r.length-1)))),x[D]=o[H],t=0,n=r.length;n>t;t++)h=r[t],p=h.layoutRect(),y=p.maxFlexSize||p[_],"center"===s?x[D]=Math.round(i[M]/2-p[L]/2):"stretch"===s?(x[L]=z(p[P]||0,i[M]-o[H]-o[O]),x[D]=o[H]):"end"===s&&(x[D]=i[M]-p[L]-o.top),p.flex>0&&(y+=p.flex*C),x[N]=y,x[S]=w,h.layoutRect(x),h.recalc&&h.recalc(),w+=y+c}else if(x.w=x.minW,x.h=x.minH,e.layoutRect(x),this.recalc(e),null===e._lastRect){var V=e.parent();V&&(V._lastRect=null,V.recalc())}}})}),r(St,[st],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})},isNative:function(){return!0}})}),r(kt,[ge,Ae,_e,m,Ze,h],function(e,t,n,r,i,o){function a(e){function t(t,n){return function(){var r=this;e.on("nodeChange",function(i){var o=e.formatter,a=null;s(i.parents,function(e){return s(t,function(t){return n?o.matchNode(e,n,{value:t.value})&&(a=t.value):o.matchNode(e,t.value)&&(a=t.value),a?!1:void 0}),a?!1:void 0}),r.value(a)})}}function r(e){e=e.replace(/;$/,"").split(";");for(var t=e.length;t--;)e[t]=e[t].split("=");return e}function i(){function t(e){var n=[];if(e)return s(e,function(e){var o={text:e.title,icon:e.icon};if(e.items)o.menu=t(e.items);else{var a=e.format||"custom"+r++;e.format||(e.name=a,i.push(e)),o.format=a,o.cmd=e.cmd}n.push(o)}),n}function n(){var n;return n=t(e.settings.style_formats_merge?e.settings.style_formats?o.concat(e.settings.style_formats):o:e.settings.style_formats||o)}var r=0,i=[],o=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}];return e.on("init",function(){s(i,function(t){e.formatter.register(t.name,t)})}),{type:"menu",items:n(),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){return this.settings.format?e.formatter.getCssText(this.settings.format):void 0},onPostRender:function(){var t=this;t.parent().on("show",function(){var n,r;n=t.settings.format,n&&(t.disabled(!e.formatter.canApply(n)),t.active(e.formatter.match(n))),r=t.settings.cmd,r&&t.active(e.queryCommandState(r))})},onclick:function(){this.settings.format&&c(this.settings.format),this.settings.cmd&&e.execCommand(this.settings.cmd)}}}}function o(t){return function(){var n=this;e.formatter?e.formatter.formatChanged(t,function(e){n.active(e)}):e.on("init",function(){e.formatter.formatChanged(t,function(e){n.active(e)})})}}function a(t){return function(){function n(){return e.undoManager?e.undoManager[t]():!1}var r=this;t="redo"==t?"hasRedo":"hasUndo",r.disabled(!n()),e.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(){r.disabled(e.readonly||!n())})}}function l(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)}function c(t){t.control&&(t=t.control.value()),t&&e.execCommand("mceToggleFormat",!1,t)}var u;u=i(),s({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,n){e.addButton(n,{tooltip:t,onPostRender:o(n),onclick:function(){c(n)}})}),s({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1]})}),s({blockquote:["Blockquote","mceBlockQuote"],numlist:["Numbered list","InsertOrderedList"],bullist:["Bullet list","InsertUnorderedList"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1],onPostRender:o(n)})}),e.addButton("undo",{tooltip:"Undo",onPostRender:a("undo"),cmd:"undo"}),e.addButton("redo",{tooltip:"Redo",onPostRender:a("redo"),cmd:"redo"}),e.addMenuItem("newdocument",{text:"New document",icon:"newdocument",cmd:"mceNewDocument"}),e.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:a("undo"),cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:a("redo"),cmd:"redo"}),e.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:l,cmd:"mceToggleVisualAid"}),e.addButton("remove",{tooltip:"Remove",icon:"remove",cmd:"Delete"}),s({cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"],bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(t,n){e.addMenuItem(n,{text:t[0],icon:n,shortcut:t[2],cmd:t[1]})}),e.on("mousedown",function(){n.hideAll()}),e.addButton("styleselect",{type:"menubutton",text:"Formats",menu:u}),e.addButton("formatselect",function(){var n=[],i=r(e.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");return s(i,function(t){n.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:i[0][0],values:n,fixedWidth:!0,onselect:c,onPostRender:t(n)}}),e.addButton("fontselect",function(){var n="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",i=[],o=r(e.settings.font_formats||n);return s(o,function(e){i.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:i,fixedWidth:!0,onPostRender:t(i,"fontname"),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}}),e.addButton("fontsizeselect",function(){var n=[],r="8pt 10pt 12pt 14pt 18pt 24pt 36pt",i=e.settings.fontsize_formats||r;return s(i.split(" "),function(e){var t=e,r=e,i=e.split("=");i.length>1&&(t=i[0],r=i[1]),n.push({text:t,value:r})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:n,fixedWidth:!0,onPostRender:t(n,"fontsize"),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}}),e.addMenuItem("formats",{text:"Formats",menu:u})}var s=r.each;i.on("AddEditor",function(t){t.editor.rtl&&(e.rtl=!0),a(t.editor)}),e.translate=function(e){return i.translate(e)},t.tooltips=!o.iOS}),r(Tt,[lt],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,C,x,w,E,N=[],_=[],S,k,T,R,A,B;t=e.settings,i=e.items().filter(":visible"),o=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(i.length)),n=Math.ceil(i.length/r),y=t.spacingH||t.spacing||0,b=t.spacingV||t.spacing||0,C=t.alignH||t.align,x=t.alignV||t.align,g=e.paddingBox,A="reverseRows"in t?t.reverseRows:e.isRtl(),C&&"string"==typeof C&&(C=[C]),x&&"string"==typeof x&&(x=[x]);for(d=0;r>d;d++)N.push(0);for(f=0;n>f;f++)_.push(0);for(f=0;n>f;f++)for(d=0;r>d&&(u=i[f*r+d],u);d++)c=u.layoutRect(),S=c.minW,k=c.minH,N[d]=S>N[d]?S:N[d],_[f]=k>_[f]?k:_[f];for(T=o.innerW-g.left-g.right,w=0,d=0;r>d;d++)w+=N[d]+(d>0?y:0),
-T-=(d>0?y:0)+N[d];for(R=o.innerH-g.top-g.bottom,E=0,f=0;n>f;f++)E+=_[f]+(f>0?b:0),R-=(f>0?b:0)+_[f];if(w+=g.left+g.right,E+=g.top+g.bottom,l={},l.minW=w+(o.w-o.innerW),l.minH=E+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){o.autoResize&&(l=e.layoutRect(l),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH);var D;D="start"==t.packV?0:R>0?Math.floor(R/n):0;var M=0,L=t.flexWidths;if(L)for(d=0;d<L.length;d++)M+=L[d];else M=r;var P=T/M;for(d=0;r>d;d++)N[d]+=L?L[d]*P:P;for(p=g.top,f=0;n>f;f++){for(h=g.left,s=_[f]+D,d=0;r>d&&(B=A?f*r+r-1-d:f*r+d,u=i[B],u);d++)m=u.settings,c=u.layoutRect(),a=Math.max(N[d],c.startMinWidth),c.x=h,c.y=p,v=m.alignH||(C?C[d]||C[0]:null),"center"==v?c.x=h+a/2-c.w/2:"right"==v?c.x=h+a-c.w:"stretch"==v&&(c.w=a),v=m.alignV||(x?x[d]||x[0]:null),"center"==v?c.y=p+s/2-c.h/2:"bottom"==v?c.y=p+s-c.h:"stretch"==v&&(c.h=s),u.layoutRect(c),h+=a+y,u.recalc&&u.recalc();p+=s+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var H=e.parent();H&&(H._lastRect=null,H.recalc())}}})}),r(Rt,[Ae,u],function(e,t){return e.extend({renderHtml:function(){var e=this;return e.classes.add("iframe"),e.canFocus=!1,'<iframe id="'+e._id+'" class="'+e.classes+'" tabindex="-1" src="'+(e.settings.url||"javascript:''")+'" frameborder="0"></iframe>'},src:function(e){this.getEl().src=e},html:function(e,n){var r=this,i=this.getEl().contentWindow.document.body;return i?(i.innerHTML=e,n&&n()):t.setTimeout(function(){r.html(e)}),this}})}),r(At,[Ae],function(e){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("infobox"),t.canFocus=!1},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},help:function(e){this.state.set("help",e)},renderHtml:function(){var e=this,t=e.classPrefix;return'<div id="'+e._id+'" class="'+e.classes+'"><div id="'+e._id+'-body">'+e.encode(e.state.get("text"))+'<button role="button" tabindex="-1"><i class="'+t+"ico "+t+'i-help"></i></button></div></div>'},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl("body").firstChild.data=e.encode(t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e.state.on("change:help",function(t){e.classes.toggle("has-help",t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),r(Bt,[Ae,fe],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("label"),t.canFocus=!1,e.multiline&&t.classes.add("autoscroll"),e.strong&&t.classes.add("strong")},initLayoutRect:function(){var e=this,n=e._super();if(e.settings.multiline){var r=t.getSize(e.getEl());r.width>n.maxW&&(n.minW=n.maxW,e.classes.add("multiline")),e.getEl().style.width=n.minW+"px",n.startMinH=n.h=n.minH=Math.min(n.maxH,t.getSize(e.getEl()).height)}return n},repaint:function(){var e=this;return e.settings.multiline||(e.getEl().style.lineHeight=e.layoutRect().h+"px"),e._super()},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},renderHtml:function(){var e=this,t,n,r=e.settings.forId;return!r&&(n=e.settings.forName)&&(t=e.getRoot().find("#"+n)[0],t&&(r=t._id)),r?'<label id="'+e._id+'" class="'+e.classes+'"'+(r?' for="'+r+'"':"")+">"+e.encode(e.state.get("text"))+"</label>":'<span id="'+e._id+'" class="'+e.classes+'">'+e.encode(e.state.get("text"))+"</span>"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.innerHtml(e.encode(t.value)),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),r(Dt,[be],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){var t=this;t._super(e),t.classes.add("toolbar")},postRender:function(){var e=this;return e.items().each(function(e){e.classes.add("toolbar-item")}),e._super()}})}),r(Mt,[Dt],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),r(Lt,[ct,ve,Mt],function(e,t,n){function r(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}var i=e.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),e=t.settings,t.classes.add("menubtn"),e.fixedWidth&&t.classes.add("fixed-width"),t.aria("haspopup",!0),t.state.set("menu",e.menu||t.render())},showMenu:function(){var e=this,n;return e.menu&&e.menu.visible()?e.hideMenu():(e.menu||(n=e.state.get("menu")||[],n.length?n={type:"menu",items:n}:n.type=n.type||"menu",n.renderTo?e.menu=n.parent(e).show().renderTo():e.menu=t.create(n).parent(e).renderTo(),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control.parent()===e.menu&&(t.stopPropagation(),e.focus(),e.hideMenu())}),e.menu.on("select",function(){e.focus()}),e.menu.on("show hide",function(t){t.control==e.menu&&e.activeMenu("show"==t.type),e.aria("expanded","show"==t.type)}).fire("show")),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),void e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]))},hideMenu:function(){var e=this;e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e=this,t=e._id,r=e.classPrefix,i=e.settings.icon,o,a=e.state.get("text"),s="";return o=e.settings.image,o?(i="none","string"!=typeof o&&(o=window.getSelection?o[0]:o[1]),o=" style=\"background-image: url('"+o+"')\""):o="",a&&(e.classes.add("btn-has-text"),s='<span class="'+r+'txt">'+e.encode(a)+"</span>"),i=e.settings.icon?r+"ico "+r+"i-"+i:"",e.aria("role",e.parent()instanceof n?"menuitem":"button"),'<div id="'+t+'" class="'+e.classes+'" tabindex="-1" aria-labelledby="'+t+'"><button id="'+t+'-open" role="presentation" type="button" tabindex="-1">'+(i?'<i class="'+i+'"'+o+"></i>":"")+s+' <i class="'+r+'caret"></i></button></div>'},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&r(t.target,e.getEl())&&(e.showMenu(),t.aria&&e.menu.items()[0].focus())}),e.on("mouseenter",function(t){var n=t.control,r=e.parent(),o;n&&r&&n instanceof i&&n.parent()==r&&(r.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=n&&(e.menu&&e.menu.visible()&&(o=!0),e.hideMenu())}),o&&(n.focus(),n.showMenu()))}),e._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}});return i}),r(Pt,[Ae,ve,h,u],function(e,t,n,r){return e.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t=this,n;t._super(e),e=t.settings,t.classes.add("menu-item"),e.menu&&t.classes.add("menu-item-expand"),e.preview&&t.classes.add("menu-item-preview"),n=t.state.get("text"),"-"!==n&&"|"!==n||(t.classes.add("menu-item-sep"),t.aria("role","separator"),t.state.set("text","-")),e.selectable&&(t.aria("role","menuitemcheckbox"),t.classes.add("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||t.classes.add("menu-item-normal"),t.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&t.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var e=this,n=e.settings,r,i=e.parent();if(i.items().each(function(t){t!==e&&t.hideMenu()}),n.menu){r=e.menu,r?r.show():(r=n.menu,r.length?r={type:"menu",items:r}:r.type=r.type||"menu",i.settings.itemDefaults&&(r.itemDefaults=i.settings.itemDefaults),r=e.menu=t.create(r).parent(e).renderTo(),r.reflow(),r.on("cancel",function(t){t.stopPropagation(),e.focus(),r.hide()}),r.on("show hide",function(e){e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),r.on("hide",function(t){t.control===r&&e.classes.remove("selected")}),r.submenu=!0),r._parentMenu=i,r.classes.add("menu-sub");var o=r.testMoveRel(e.getEl(),e.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);r.moveRel(e.getEl(),o),r.rel=o,o="menu-sub-"+o,r.classes.remove(r._lastRel).add(o),r._lastRel=o,e.classes.add("selected"),e.aria("expanded",!0)}},hideMenu:function(){var e=this;return e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide(),e.aria("expanded",!1)),e},renderHtml:function(){function e(e){var t,r,i={};for(i=n.mac?{alt:"&#x2325;",ctrl:"&#x2318;",shift:"&#x21E7;",meta:"&#x2318;"}:{meta:"Ctrl"},e=e.split("+"),t=0;t<e.length;t++)r=i[e[t].toLowerCase()],r&&(e[t]=r);return e.join("+")}var t=this,r=t._id,i=t.settings,o=t.classPrefix,a=t.encode(t.state.get("text")),s=t.settings.icon,l="",c=i.shortcut;return s&&t.parent().classes.add("menu-has-icons"),i.image&&(l=" style=\"background-image: url('"+i.image+"')\""),c&&(c=e(c)),s=o+"ico "+o+"i-"+(t.settings.icon||"none"),'<div id="'+r+'" class="'+t.classes+'" tabindex="-1">'+("-"!==a?'<i class="'+s+'"'+l+"></i>\xa0":"")+("-"!==a?'<span id="'+r+'-text" class="'+o+'text">'+a+"</span>":"")+(c?'<div id="'+r+'-shortcut" class="'+o+'menu-shortcut">'+c+"</div>":"")+(i.menu?'<div class="'+o+'caret"></div>':"")+"</div>"},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var i=e.getEl("text");i&&i.setAttribute("style",n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),r.requestAnimationFrame(function(){e.parent().hideAll()})))}),e._super(),e},hover:function(){var e=this;return e.parent().items().each(function(e){e.classes.remove("selected")}),e.classes.toggle("selected",!0),e},active:function(e){return"undefined"!=typeof e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),r(Ht,[g,ge,u],function(e,t,n){return function(r,i){var o=this,a,s=t.classPrefix,l;o.show=function(t,c){function u(){a&&(e(r).append('<div class="'+s+"throbber"+(i?" "+s+"throbber-inline":"")+'"></div>'),c&&c())}return o.hide(),a=!0,t?l=n.setTimeout(u,t):u(),o},o.hide=function(){var e=r.lastChild;return n.clearTimeout(l),e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),a=!1,o}}}),r(Ot,[_e,Pt,Ht,m],function(e,t,n,r){return e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){var t=this;if(e.autohide=!0,e.constrainToViewport=!0,"function"==typeof e.items&&(e.itemsFactory=e.items,e.items=[]),e.itemDefaults)for(var n=e.items,i=n.length;i--;)n[i]=r.extend({},e.itemDefaults,n[i]);t._super(e),t.classes.add("menu")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var e=this;e.hideAll(),e.fire("select")},load:function(){function e(){t.throbber&&(t.throbber.hide(),t.throbber=null)}var t=this,r,i;i=t.settings.itemsFactory,i&&(t.throbber||(t.throbber=new n(t.getEl("body"),!0),0===t.items().length?(t.throbber.show(),t.fire("loading")):t.throbber.show(100,function(){t.items().remove(),t.fire("loading")}),t.on("hide close",e)),t.requestTime=r=(new Date).getTime(),t.settings.itemsFactory(function(n){return 0===n.length?void t.hide():void(t.requestTime===r&&(t.getEl().style.width="",t.getEl("body").style.width="",e(),t.items().remove(),t.getEl("body").innerHTML="",t.add(n),t.renderNew(),t.fire("loaded")))}))},hideAll:function(){var e=this;return this.find("menuitem").exec("hideMenu"),e._super()},preRender:function(){var e=this;return e.items().each(function(t){var n=t.settings;return n.icon||n.image||n.selectable?(e._hasIcons=!0,!1):void 0}),e.settings.itemsFactory&&e.on("postrender",function(){e.settings.itemsFactory&&e.load()}),e._super()}})}),r(It,[Lt,Ot],function(e,t){return e.extend({init:function(e){function t(r){for(var a=0;a<r.length;a++){if(i=r[a].selected||e.value===r[a].value)return o=o||r[a].text,n.state.set("value",r[a].value),!0;if(r[a].menu&&t(r[a].menu))return!0}}var n=this,r,i,o,a;n._super(e),e=n.settings,n._values=r=e.values,r&&("undefined"!=typeof e.value&&t(r),!i&&r.length>0&&(o=r[0].text,n.state.set("value",r[0].value)),n.state.set("menu",r)),n.state.set("text",e.text||o),n.classes.add("listbox"),n.on("select",function(t){var r=t.control;a&&(t.lastControl=a),e.multiple?r.active(!r.active()):n.value(t.control.value()),a=r})},bindStates:function(){function e(e,n){e instanceof t&&e.items().each(function(e){e.hasMenus()||e.active(e.value()===n)})}function n(e,t){var r;if(e)for(var i=0;i<e.length;i++){if(e[i].value===t)return e[i];if(e[i].menu&&(r=n(e[i].menu,t)))return r}}var r=this;return r.on("show",function(t){e(t.control,r.value())}),r.state.on("change:value",function(e){var t=n(r.state.get("menu"),e.value);t?r.text(t.text):r.text(r.settings.text)}),r._super()}})}),r(Ft,[dt],function(e){return e.extend({Defaults:{classes:"radio",role:"radio"}})}),r(zt,[Ae,Ce],function(e,t){return e.extend({renderHtml:function(){var e=this,t=e.classPrefix;return e.classes.add("resizehandle"),"both"==e.settings.direction&&e.classes.add("resizehandle-both"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes+'"><i class="'+t+"ico "+t+'i-resize"></i></div>'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new t(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!=e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),r(Wt,[Ae],function(e){function t(e){var t="";if(e)for(var n=0;n<e.length;n++)t+='<option value="'+e[n]+'">'+e[n]+"</option>";return t}return e.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(e){var t=this;t._super(e),t.settings.size&&(t.size=t.settings.size),t.settings.options&&(t._options=t.settings.options),t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){return e.toJSON?(n=e,!1):void 0}),t.fire("submit",{data:n.toJSON()}))})},options:function(e){return arguments.length?(this.state.set("options",e),this):this.state.get("options")},renderHtml:function(){var e=this,n,r="";return n=t(e._options),e.size&&(r=' size = "'+e.size+'"'),'<select id="'+e._id+'" class="'+e.classes+'"'+r+">"+n+"</select>"},bindStates:function(){var e=this;return e.state.on("change:options",function(n){e.getEl().innerHTML=t(n.value)}),e._super()}})}),r(Vt,[Ae,Ce,fe],function(e,t,n){function r(e,t,n){return t>e&&(e=t),e>n&&(e=n),e}function i(e,t,n){e.setAttribute("aria-"+t,n)}function o(e,t){var r,o,a,s,l,c;"v"==e.settings.orientation?(s="top",a="height",o="h"):(s="left",a="width",o="w"),c=e.getEl("handle"),r=(e.layoutRect()[o]||100)-n.getSize(c)[a],l=r*((t-e._minValue)/(e._maxValue-e._minValue))+"px",c.style[s]=l,c.style.height=e.layoutRect().h+"px",i(c,"valuenow",t),i(c,"valuetext",""+e.settings.previewFilter(t)),i(c,"valuemin",e._minValue),i(c,"valuemax",e._maxValue)}return e.extend({init:function(e){var t=this;e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),t._super(e),t.classes.add("slider"),"v"==e.orientation&&t.classes.add("vertical"),t._minValue=e.minValue||0,t._maxValue=e.maxValue||100,t._initValue=t.state.get("value")},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'<div id="'+t+'" class="'+e.classes+'"><div id="'+t+'-handle" class="'+n+'slider-handle" role="slider" tabindex="-1"></div></div>'},reset:function(){this.value(this._initValue).repaint()},postRender:function(){function e(e,t,n){return(n+e)/(t-e)}function i(e,t,n){return n*(t-e)-e}function o(t,n){function o(o){var a;a=s.value(),a=i(t,n,e(t,n,a)+.05*o),a=r(a,t,n),s.value(a),s.fire("dragstart",{value:a}),s.fire("drag",{value:a}),s.fire("dragend",{value:a})}s.on("keydown",function(e){switch(e.keyCode){case 37:case 38:o(-1);break;case 39:case 40:o(1)}})}function a(e,i,o){var a,l,c,p,m;s._dragHelper=new t(s._id,{handle:s._id+"-handle",start:function(e){a=e[u],l=parseInt(s.getEl("handle").style[d],10),c=(s.layoutRect()[h]||100)-n.getSize(o)[f],s.fire("dragstart",{value:m})},drag:function(t){var n=t[u]-a;p=r(l+n,0,c),o.style[d]=p+"px",m=e+p/c*(i-e),s.value(m),s.tooltip().text(""+s.settings.previewFilter(m)).show().moveRel(o,"bc tc"),s.fire("drag",{value:m})},stop:function(){s.tooltip().hide(),s.fire("dragend",{value:m})}})}var s=this,l,c,u,d,f,h;l=s._minValue,c=s._maxValue,"v"==s.settings.orientation?(u="screenY",d="top",f="height",h="h"):(u="screenX",d="left",f="width",h="w"),s._super(),o(l,c,s.getEl("handle")),a(l,c,s.getEl("handle"))},repaint:function(){this._super(),o(this,this.value())},bindStates:function(){var e=this;return e.state.on("change:value",function(t){o(e,t.value)}),e._super()}})}),r(Ut,[Ae],function(e){return e.extend({renderHtml:function(){var e=this;return e.classes.add("spacer"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes+'"></div>'}})}),r($t,[Lt,fe,g],function(e,t,n){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e=this,r=e.getEl(),i=e.layoutRect(),o,a;return e._super(),o=r.firstChild,a=r.lastChild,n(o).css({width:i.w-t.getSize(a).width,height:i.h-2}),n(a).css({height:i.h-2}),e},activeMenu:function(e){var t=this;n(t.getEl().lastChild).toggleClass(t.classPrefix+"active",e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r,i=e.state.get("icon"),o=e.state.get("text"),a="";return r=e.settings.image,r?(i="none","string"!=typeof r&&(r=window.getSelection?r[0]:r[1]),r=" style=\"background-image: url('"+r+"')\""):r="",i=e.settings.icon?n+"ico "+n+"i-"+i:"",o&&(e.classes.add("btn-has-text"),a='<span class="'+n+'txt">'+e.encode(o)+"</span>"),'<div id="'+t+'" class="'+e.classes+'" role="button" tabindex="-1"><button type="button" hidefocus="1" tabindex="-1">'+(i?'<i class="'+i+'"'+r+"></i>":"")+a+'</button><button type="button" class="'+n+'open" hidefocus="1" tabindex="-1">'+(e._menuBtnText?(i?"\xa0":"")+e._menuBtnText:"")+' <i class="'+n+'caret"></i></button></div>'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(e){var n=e.target;if(e.control==this)for(;n;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==n.nodeName&&-1==n.className.indexOf("open"))return e.stopImmediatePropagation(),void(t&&t.call(this,e));n=n.parentNode}}),delete e.settings.onclick,e._super()}})}),r(qt,[St],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}})}),r(jt,[we,g,fe],function(e,t,n){return e.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var n;this.activeTabId&&(n=this.getEl(this.activeTabId),t(n).removeClass(this.classPrefix+"active"),n.setAttribute("aria-selected","false")),this.activeTabId="t"+e,n=this.getEl("t"+e),n.setAttribute("aria-selected","true"),t(n).addClass(this.classPrefix+"active"),this.items()[e].show().fire("showtab"),this.reflow(),this.items().each(function(t,n){e!=n&&t.hide()})},renderHtml:function(){var e=this,t=e._layout,n="",r=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,i){var o=e._id+"-t"+i;t.aria("role","tabpanel"),t.aria("labelledby",o),n+='<div id="'+o+'" class="'+r+'tab" unselectable="on" role="tab" aria-controls="'+t._id+'" aria-selected="false" tabIndex="-1">'+e.encode(t.settings.title)+"</div>"}),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1"><div id="'+e._id+'-head" class="'+r+'tabs" role="tablist">'+n+'</div><div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+t.renderHtml(e)+"</div></div>"},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.settings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(t.target.parentNode.id==e._id+"-head")for(var r=n.childNodes.length;r--;)n.childNodes[r]==t.target&&e.activateTab(r)})},initLayoutRect:function(){var e=this,t,r,i;r=n.getSize(e.getEl("head")).width,r=0>r?0:r,i=0,e.items().each(function(e){r=Math.max(r,e.layoutRect().minW),i=Math.max(i,e.layoutRect().minH)}),e.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=r,e.settings.h=i,e.layoutRect({x:0,y:0,w:r,h:i})});var o=n.getSize(e.getEl("head")).height;return e.settings.minWidth=r,e.settings.minHeight=i+o,t=e._super(),t.deltaH+=o,t.innerH=t.h-t.deltaH,t}})}),r(Yt,[Ae,m,fe],function(e,t,n){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("textbox"),e.multiline?t.classes.add("multiline"):(t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){return e.toJSON?(n=e,!1):void 0}),t.fire("submit",{data:n.toJSON()}))}),t.on("keyup",function(e){t.state.set("value",e.target.value)}))},repaint:function(){var e=this,t,n,r,i,o=0,a;t=e.getEl().style,n=e._layoutRect,a=e._lastRepaintRect||{};var s=document;return!e.settings.multiline&&s.all&&(!s.documentMode||s.documentMode<=8)&&(t.lineHeight=n.h-o+"px"),r=e.borderBox,i=r.left+r.right+8,o=r.top+r.bottom+(e.settings.multiline?8:0),n.x!==a.x&&(t.left=n.x+"px",a.x=n.x),n.y!==a.y&&(t.top=n.y+"px",a.y=n.y),n.w!==a.w&&(t.width=n.w-i+"px",a.w=n.w),n.h!==a.h&&(t.height=n.h-o+"px",a.h=n.h),e._lastRepaintRect=a,e.fire("repaint",{},!1),e},renderHtml:function(){var e=this,r=e.settings,i,o;return i={id:e._id,hidefocus:"1"},t.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(e){i[e]=r[e]}),e.disabled()&&(i.disabled="disabled"),r.subtype&&(i.type=r.subtype),o=n.create(r.multiline?"textarea":"input",i),o.value=e.state.get("value"),o.className=e.classes,o.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var e=this;e.getEl().value=e.state.get("value"),e._super(),e.$el.on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)})},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl().value!=t.value&&(e.getEl().value=t.value)}),e.state.on("change:disabled",function(t){e.getEl().disabled=t.value}),e._super()},remove:function(){this.$el.off(),this._super()}})}),r(Xt,[],function(){var e=this||window,t=function(){return e.tinymce};return"function"==typeof e.define&&(e.define.amd||e.define("ephox/tinymce",[],t)),{}}),a([l,c,u,d,f,h,m,g,v,y,C,w,E,N,T,A,B,D,M,L,P,H,I,F,j,Y,J,Q,re,ie,oe,ae,le,ue,de,me,ge,ve,ye,be,Ce,xe,we,Ee,Ne,_e,Se,ke,Te,Re,Ae,Be,De,Me,He,Ie,Ge,Je,Qe,Ze,tt,nt,rt,it,ot,at,st,lt,ct,ut,dt,ft,ht,pt,mt,gt,vt,yt,bt,Ct,xt,wt,Et,Nt,_t,St,kt,Tt,Rt,At,Bt,Dt,Mt,Lt,Pt,Ht,Ot,It,Ft,zt,Wt,Vt,Ut,$t,qt,jt,Yt])}(this);
\ No newline at end of file
+// 4.4.1 (2016-07-26)
+!function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;i<e.length;++i){if(n=s[e[i]]||o(e[i]),!n)throw"module definition dependecy not found: "+e[i];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){s[e]=i.apply(null,arguments)})}function i(e){return!!s[e]}function o(t){for(var n=e,r=t.split(/[.\/]/),i=0;i<r.length;++i){if(!n[r[i]])return;n=n[r[i]]}return n}function a(n){var r,i,o,a,l;for(r=0;r<n.length;r++){i=e,o=n[r],a=o.split(/[.\/]/);for(var c=0;c<a.length-1;++c)i[a[c]]===t&&(i[a[c]]={}),i=i[a[c]];i[a[a.length-1]]=s[o]}if(e.AMDLC_TESTS){l=e.privateModules||{};for(o in s)l[o]=s[o];for(r=0;r<n.length;r++)delete l[n[r]];e.privateModules=l}}var s={},l="tinymce/geom/Rect",c="tinymce/util/Promise",u="tinymce/util/Delay",d="tinymce/Env",f="tinymce/dom/EventUtils",h="tinymce/dom/Sizzle",p="tinymce/util/Arr",m="tinymce/util/Tools",g="tinymce/dom/DomQuery",v="tinymce/html/Styles",y="tinymce/dom/TreeWalker",b="tinymce/dom/Range",C="tinymce/html/Entities",x="tinymce/dom/StyleSheetLoader",w="tinymce/dom/DOMUtils",N="tinymce/dom/ScriptLoader",E="tinymce/AddOnManager",_="tinymce/dom/NodeType",S="tinymce/text/Zwsp",k="tinymce/caret/CaretContainer",T="tinymce/dom/RangeUtils",R="tinymce/NodeChange",A="tinymce/html/Node",B="tinymce/html/Schema",D="tinymce/html/SaxParser",L="tinymce/html/DomParser",M="tinymce/html/Writer",P="tinymce/html/Serializer",H="tinymce/dom/Serializer",O="tinymce/dom/TridentSelection",I="tinymce/util/VK",F="tinymce/dom/ControlSelection",z="tinymce/util/Fun",U="tinymce/caret/CaretCandidate",W="tinymce/geom/ClientRect",V="tinymce/text/ExtendingChar",$="tinymce/caret/CaretPosition",q="tinymce/caret/CaretBookmark",j="tinymce/dom/BookmarkManager",Y="tinymce/dom/Selection",X="tinymce/dom/ElementUtils",K="tinymce/fmt/Preview",G="tinymce/fmt/Hooks",J="tinymce/Formatter",Q="tinymce/UndoManager",Z="tinymce/EnterKey",ee="tinymce/ForceBlocks",te="tinymce/caret/CaretUtils",ne="tinymce/caret/CaretWalker",re="tinymce/InsertList",ie="tinymce/InsertContent",oe="tinymce/EditorCommands",ae="tinymce/util/URI",se="tinymce/util/Class",le="tinymce/util/EventDispatcher",ce="tinymce/data/Binding",ue="tinymce/util/Observable",de="tinymce/data/ObservableObject",fe="tinymce/ui/Selector",he="tinymce/ui/Collection",pe="tinymce/ui/DomUtils",me="tinymce/ui/BoxUtils",ge="tinymce/ui/ClassList",ve="tinymce/ui/ReflowQueue",ye="tinymce/ui/Control",be="tinymce/ui/Factory",Ce="tinymce/ui/KeyboardNavigation",xe="tinymce/ui/Container",we="tinymce/ui/DragHelper",Ne="tinymce/ui/Scrollable",Ee="tinymce/ui/Panel",_e="tinymce/ui/Movable",Se="tinymce/ui/Resizable",ke="tinymce/ui/FloatPanel",Te="tinymce/ui/Window",Re="tinymce/ui/MessageBox",Ae="tinymce/WindowManager",Be="tinymce/ui/Tooltip",De="tinymce/ui/Widget",Le="tinymce/ui/Progress",Me="tinymce/ui/Notification",Pe="tinymce/NotificationManager",He="tinymce/dom/NodePath",Oe="tinymce/util/Quirks",Ie="tinymce/EditorObservable",Fe="tinymce/Mode",ze="tinymce/Shortcuts",Ue="tinymce/file/Uploader",We="tinymce/file/Conversions",Ve="tinymce/file/ImageScanner",$e="tinymce/file/BlobCache",qe="tinymce/file/UploadStatus",je="tinymce/EditorUpload",Ye="tinymce/caret/FakeCaret",Xe="tinymce/dom/Dimensions",Ke="tinymce/caret/LineWalker",Ge="tinymce/caret/LineUtils",Je="tinymce/DragDropOverrides",Qe="tinymce/SelectionOverrides",Ze="tinymce/util/Uuid",et="tinymce/Editor",tt="tinymce/util/I18n",nt="tinymce/FocusManager",rt="tinymce/EditorManager",it="tinymce/LegacyInput",ot="tinymce/util/XHR",at="tinymce/util/JSON",st="tinymce/util/JSONRequest",lt="tinymce/util/JSONP",ct="tinymce/util/LocalStorage",ut="tinymce/Compat",dt="tinymce/ui/Layout",ft="tinymce/ui/AbsoluteLayout",ht="tinymce/ui/Button",pt="tinymce/ui/ButtonGroup",mt="tinymce/ui/Checkbox",gt="tinymce/ui/ComboBox",vt="tinymce/ui/ColorBox",yt="tinymce/ui/PanelButton",bt="tinymce/ui/ColorButton",Ct="tinymce/util/Color",xt="tinymce/ui/ColorPicker",wt="tinymce/ui/Path",Nt="tinymce/ui/ElementPath",Et="tinymce/ui/FormItem",_t="tinymce/ui/Form",St="tinymce/ui/FieldSet",kt="tinymce/ui/FilePicker",Tt="tinymce/ui/FitLayout",Rt="tinymce/ui/FlexLayout",At="tinymce/ui/FlowLayout",Bt="tinymce/ui/FormatControls",Dt="tinymce/ui/GridLayout",Lt="tinymce/ui/Iframe",Mt="tinymce/ui/InfoBox",Pt="tinymce/ui/Label",Ht="tinymce/ui/Toolbar",Ot="tinymce/ui/MenuBar",It="tinymce/ui/MenuButton",Ft="tinymce/ui/MenuItem",zt="tinymce/ui/Throbber",Ut="tinymce/ui/Menu",Wt="tinymce/ui/ListBox",Vt="tinymce/ui/Radio",$t="tinymce/ui/ResizeHandle",qt="tinymce/ui/SelectBox",jt="tinymce/ui/Slider",Yt="tinymce/ui/Spacer",Xt="tinymce/ui/SplitButton",Kt="tinymce/ui/StackLayout",Gt="tinymce/ui/TabPanel",Jt="tinymce/ui/TextBox",Qt="tinymce/Register";r(l,[],function(){function e(e,t,n){var r,i,a,s,l,u;return r=t.x,i=t.y,a=e.w,s=e.h,l=t.w,u=t.h,n=(n||"").split(""),"b"===n[0]&&(i+=u),"r"===n[1]&&(r+=l),"c"===n[0]&&(i+=c(u/2)),"c"===n[1]&&(r+=c(l/2)),"b"===n[3]&&(i-=s),"r"===n[4]&&(r-=a),"c"===n[3]&&(i-=c(s/2)),"c"===n[4]&&(r-=c(a/2)),o(r,i,a,s)}function t(t,n,r,i){var o,a;for(a=0;a<i.length;a++)if(o=e(t,n,i[a]),o.x>=r.x&&o.x+o.w<=r.w+r.x&&o.y>=r.y&&o.y+o.h<=r.h+r.y)return i[a];return null}function n(e,t,n){return o(e.x-t,e.y-n,e.w+2*t,e.h+2*n)}function r(e,t){var n,r,i,a;return n=l(e.x,t.x),r=l(e.y,t.y),i=s(e.x+e.w,t.x+t.w),a=s(e.y+e.h,t.y+t.h),0>i-n||0>a-r?null:o(n,r,i-n,a-r)}function i(e,t,n){var r,i,a,s,c,u,d,f,h,p;return c=e.x,u=e.y,d=e.x+e.w,f=e.y+e.h,h=t.x+t.w,p=t.y+t.h,r=l(0,t.x-c),i=l(0,t.y-u),a=l(0,d-h),s=l(0,f-p),c+=r,u+=i,n&&(d+=r,f+=i,c-=a,u-=s),d-=a,f-=s,o(c,u,d-c,f-u)}function o(e,t,n,r){return{x:e,y:t,w:n,h:r}}function a(e){return o(e.left,e.top,e.width,e.height)}var s=Math.min,l=Math.max,c=Math.round;return{inflate:n,relativePosition:e,findBestRelativePosition:t,intersect:r,clamp:i,create:o,fromClientRect:a}}),r(c,[],function(){function e(e,t){return function(){e.apply(t,arguments)}}function t(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],s(t,e(r,this),e(i,this))}function n(e){var t=this;return null===this._state?void this._deferreds.push(e):void l(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var r;try{r=n(t._value)}catch(i){return void e.reject(i)}e.resolve(r)})}function r(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void s(e(n,t),e(r,this),e(i,this))}this._state=!0,this._value=t,o.call(this)}catch(a){i.call(this,a)}}function i(e){this._state=!1,this._value=e,o.call(this)}function o(){for(var e=0,t=this._deferreds.length;t>e;e++)n.call(this,this._deferreds[e]);this._deferreds=null}function a(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function s(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(i){if(r)return;r=!0,n(i)}}if(window.Promise)return window.Promise;var l=t.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)},c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,r){var i=this;return new t(function(t,o){n.call(i,new a(e,r,t,o))})},t.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&c(arguments[0])?arguments[0]:arguments);return new t(function(t,n){function r(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){r(o,e)},n)}e[o]=a,0===--i&&t(e)}catch(l){n(l)}}if(0===e.length)return t([]);for(var i=e.length,o=0;o<e.length;o++)r(o,e[o])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(t){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.race=function(e){return new t(function(t,n){for(var r=0,i=e.length;i>r;r++)e[r].then(t,n)})},t}),r(u,[c],function(e){function t(e,t){function n(e){window.setTimeout(e,0)}var r,i=window.requestAnimationFrame,o=["ms","moz","webkit"];for(r=0;r<o.length&&!i;r++)i=window[o[r]+"RequestAnimationFrame"];i||(i=n),i(e,t)}function n(e,t){return"number"!=typeof t&&(t=0),setTimeout(e,t)}function r(e,t){return"number"!=typeof t&&(t=1),setInterval(e,t)}function i(e){return clearTimeout(e)}function o(e){return clearInterval(e)}var a;return{requestAnimationFrame:function(n,r){return a?void a.then(n):void(a=new e(function(e){r||(r=document.body),t(e,r)}).then(n))},setTimeout:n,setInterval:r,setEditorTimeout:function(e,t,r){return n(function(){e.removed||t()},r)},setEditorInterval:function(e,t,n){var i;return i=r(function(){e.removed?clearInterval(i):t()},n)},throttle:function(e,t){var r,i;return i=function(){var i=arguments;clearTimeout(r),r=n(function(){e.apply(this,i)},t)},i.stop=function(){clearTimeout(r)},i},clearInterval:o,clearTimeout:i}}),r(d,[],function(){function e(e){return"matchMedia"in window?matchMedia(e).matches:!1}var t=navigator,n=t.userAgent,r,i,o,a,s,l,c,u,d,f,h,p,m;r=window.opera&&window.opera.buildNumber,d=/Android/.test(n),i=/WebKit/.test(n),o=!i&&!r&&/MSIE/gi.test(n)&&/Explorer/gi.test(t.appName),o=o&&/MSIE (\w+)\./.exec(n)[1],a=-1==n.indexOf("Trident/")||-1==n.indexOf("rv:")&&-1==t.appName.indexOf("Netscape")?!1:11,s=-1==n.indexOf("Edge/")||o||a?!1:12,o=o||a||s,l=!i&&!a&&/Gecko/.test(n),c=-1!=n.indexOf("Mac"),u=/(iPad|iPhone)/.test(n),f="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,h=e("only screen and (max-device-width: 480px)")&&(d||u),p=e("only screen and (min-width: 800px)")&&(d||u),m=-1!=n.indexOf("Windows Phone"),s&&(i=!1);var g=!u||f||n.match(/AppleWebKit\/(\d*)/)[1]>=534;return{opera:r,webkit:i,ie:o,gecko:l,mac:c,iOS:u,android:d,contentEditable:g,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=o,range:window.getSelection&&"Range"in window,documentMode:o&&!s?document.documentMode||7:10,fileApi:f,ceFalse:o===!1||o>8,desktop:!h&&!p,windowsPhone:m}}),r(f,[u,d],function(e,t){function n(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function r(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function i(e,t){var n,r=t;return n=e.path,n&&n.length>0&&(r=n[0]),e.deepPath&&(n=e.deepPath(),n&&n.length>0&&(r=n[0])),r}function o(e,n){function r(){return!1}function o(){return!0}var a,s=n||{},l;for(a in e)u[a]||(s[a]=e[a]);if(s.target||(s.target=s.srcElement||document),t.experimentalShadowDom&&(s.target=i(e,s.target)),e&&c.test(e.type)&&e.pageX===l&&e.clientX!==l){var d=s.target.ownerDocument||document,f=d.documentElement,h=d.body;s.pageX=e.clientX+(f&&f.scrollLeft||h&&h.scrollLeft||0)-(f&&f.clientLeft||h&&h.clientLeft||0),s.pageY=e.clientY+(f&&f.scrollTop||h&&h.scrollTop||0)-(f&&f.clientTop||h&&h.clientTop||0)}return s.preventDefault=function(){s.isDefaultPrevented=o,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},s.stopPropagation=function(){s.isPropagationStopped=o,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},s.stopImmediatePropagation=function(){s.isImmediatePropagationStopped=o,s.stopPropagation()},s.isDefaultPrevented||(s.isDefaultPrevented=r,s.isPropagationStopped=r,s.isImmediatePropagationStopped=r),"undefined"==typeof s.metaKey&&(s.metaKey=!1),s}function a(t,i,o){function a(){o.domLoaded||(o.domLoaded=!0,i(u))}function s(){("complete"===c.readyState||"interactive"===c.readyState&&c.body)&&(r(c,"readystatechange",s),a())}function l(){try{c.documentElement.doScroll("left")}catch(t){return void e.setTimeout(l)}a()}var c=t.document,u={type:"ready"};return o.domLoaded?void i(u):(c.addEventListener?"complete"===c.readyState?a():n(t,"DOMContentLoaded",a):(n(c,"readystatechange",s),c.documentElement.doScroll&&t.self===t.top&&l()),void n(t,"load",a))}function s(){function e(e,t){var n,r,o,a,s=i[t];if(n=s&&s[e.type])for(r=0,o=n.length;o>r;r++)if(a=n[r],a&&a.func.call(a.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}var t=this,i={},s,c,u,d,f;c=l+(+new Date).toString(32),d="onmouseenter"in document.documentElement,u="onfocusin"in document.documentElement,f={mouseenter:"mouseover",mouseleave:"mouseout"},s=1,t.domLoaded=!1,t.events=i,t.bind=function(r,l,h,p){function m(t){e(o(t||N.event),g)}var g,v,y,b,C,x,w,N=window;if(r&&3!==r.nodeType&&8!==r.nodeType){for(r[c]?g=r[c]:(g=s++,r[c]=g,i[g]={}),p=p||r,l=l.split(" "),y=l.length;y--;)b=l[y],x=m,C=w=!1,"DOMContentLoaded"===b&&(b="ready"),t.domLoaded&&"ready"===b&&"complete"==r.readyState?h.call(p,o({type:b})):(d||(C=f[b],C&&(x=function(t){var n,r;if(n=t.currentTarget,r=t.relatedTarget,r&&n.contains)r=n.contains(r);else for(;r&&r!==n;)r=r.parentNode;r||(t=o(t||N.event),t.type="mouseout"===t.type?"mouseleave":"mouseenter",t.target=n,e(t,g))})),u||"focusin"!==b&&"focusout"!==b||(w=!0,C="focusin"===b?"focus":"blur",x=function(t){t=o(t||N.event),t.type="focus"===t.type?"focusin":"focusout",e(t,g)}),v=i[g][b],v?"ready"===b&&t.domLoaded?h({type:b}):v.push({func:h,scope:p}):(i[g][b]=v=[{func:h,scope:p}],v.fakeName=C,v.capture=w,v.nativeHandler=x,"ready"===b?a(r,x,t):n(r,C||b,x,w)));return r=v=0,h}},t.unbind=function(e,n,o){var a,s,l,u,d,f;if(!e||3===e.nodeType||8===e.nodeType)return t;if(a=e[c]){if(f=i[a],n){for(n=n.split(" "),l=n.length;l--;)if(d=n[l],s=f[d]){if(o)for(u=s.length;u--;)if(s[u].func===o){var h=s.nativeHandler,p=s.fakeName,m=s.capture;s=s.slice(0,u).concat(s.slice(u+1)),s.nativeHandler=h,s.fakeName=p,s.capture=m,f[d]=s}o&&0!==s.length||(delete f[d],r(e,s.fakeName||d,s.nativeHandler,s.capture))}}else{for(d in f)s=f[d],r(e,s.fakeName||d,s.nativeHandler,s.capture);f={}}for(d in f)return t;delete i[a];try{delete e[c]}catch(g){e[c]=null}}return t},t.fire=function(n,r,i){var a;if(!n||3===n.nodeType||8===n.nodeType)return t;i=o(null,i),i.type=r,i.target=n;do a=n[c],a&&e(i,a),n=n.parentNode||n.ownerDocument||n.defaultView||n.parentWindow;while(n&&!i.isPropagationStopped());return t},t.clean=function(e){var n,r,i=t.unbind;if(!e||3===e.nodeType||8===e.nodeType)return t;if(e[c]&&i(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(i(e),r=e.getElementsByTagName("*"),n=r.length;n--;)e=r[n],e[c]&&i(e);return t},t.destroy=function(){i={}},t.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}var l="mce-data-",c=/^(?:mouse|contextmenu)|click/,u={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1};return s.Event=new s,s.Event.bind(window,"ready",function(){}),s}),r(h,[],function(){function e(e,t,n,r){var i,o,a,s,l,c,d,h,p,m;if((t?t.ownerDocument||t:z)!==D&&B(t),t=t||D,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(M&&!r){if(i=ve.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&I(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&x.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(x.qsa&&(!P||!P.test(e))){if(h=d=F,p=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=_(e),(d=t.getAttribute("id"))?h=d.replace(be,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",l=c.length;l--;)c[l]=h+f(c[l]);p=ye.test(e)&&u(t.parentNode)||t,m=c.join(",")}if(m)try{return Z.apply(n,p.querySelectorAll(m)),n}catch(g){}finally{d||t.removeAttribute("id")}}}return k(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[F]=!0,e}function i(e){var t=D.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&typeof e.getElementsByTagName!==Y&&e}function d(){}function f(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=W++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,c=[U,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(l=t[F]||(t[F]={}),(s=l[r])&&s[0]===U&&s[1]===o)return c[2]=s[2];if(l[r]=c,c[2]=e(t,n,a))return!0}}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(t,n,r){for(var i=0,o=n.length;o>i;i++)e(t,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),c&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[F]&&(i=v(i)),o&&!o[F]&&(o=v(o,a)),r(function(r,a,s,l){var c,u,d,f=[],h=[],p=a.length,v=r||m(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?v:g(v,f,e,s,l),b=n?o||(r?e:p||i)?[]:a:y;if(n&&n(y,b,s,l),i)for(c=g(b,h),i(c,[],s,l),u=c.length;u--;)(d=c[u])&&(b[h[u]]=!(y[h[u]]=d));if(r){if(o||e){if(o){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(y[u]=d);o(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=o?te.call(r,d):f[u])>-1&&(r[c]=!(a[c]=d))}}else b=g(b===a?b.splice(p,b.length):b),o?o(null,a,b,l):Z.apply(a,b)})}function y(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),c=h(function(e){return te.call(t,e)>-1},a,!0),u=[function(e,n,r){return!o&&(r||n!==T)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];i>s;s++)if(n=w.relative[e[s].type])u=[h(p(u),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[F]){for(r=++s;i>r&&!w.relative[e[r].type];r++);return v(s>1&&p(u),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&f(e))}u.push(n)}return p(u)}function b(t,n){var i=n.length>0,o=t.length>0,a=function(r,a,s,l,c){var u,d,f,h=0,p="0",m=r&&[],v=[],y=T,b=r||o&&w.find.TAG("*",c),C=U+=null==y?1:Math.random()||.1,x=b.length;for(c&&(T=a!==D&&a);p!==x&&null!=(u=b[p]);p++){if(o&&u){for(d=0;f=t[d++];)if(f(u,a,s)){l.push(u);break}c&&(U=C)}i&&((u=!f&&u)&&h--,r&&m.push(u))}if(h+=p,i&&p!==h){for(d=0;f=n[d++];)f(m,v,a,s);if(r){if(h>0)for(;p--;)m[p]||v[p]||(v[p]=J.call(l));v=g(v)}Z.apply(l,v),c&&!r&&v.length>0&&h+n.length>1&&e.uniqueSort(l)}return c&&(U=C,T=y),m};return i?r(a):a}var C,x,w,N,E,_,S,k,T,R,A,B,D,L,M,P,H,O,I,F="sizzle"+-new Date,z=window.document,U=0,W=0,V=n(),$=n(),q=n(),j=function(e,t){return e===t&&(A=!0),0},Y=typeof t,X=1<<31,K={}.hasOwnProperty,G=[],J=G.pop,Q=G.push,Z=G.push,ee=G.slice,te=G.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},ne="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",re="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe="\\["+re+"*("+ie+")(?:"+re+"*([*^$|!~]?=)"+re+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+re+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp("^"+re+"+|((?:^|[^\\\\])(?:\\\\.)*)"+re+"+$","g"),le=new RegExp("^"+re+"*,"+re+"*"),ce=new RegExp("^"+re+"*([>+~]|"+re+")"+re+"*"),ue=new RegExp("="+re+"*([^\\]'\"]*?)"+re+"*\\]","g"),de=new RegExp(ae),fe=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+re+"*(even|odd|(([+-]|)(\\d*)n|)"+re+"*(?:([+-]|)"+re+"*(\\d+)|))"+re+"*\\)|)","i"),bool:new RegExp("^(?:"+ne+")$","i"),needsContext:new RegExp("^"+re+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+re+"*((?:-\\d)?\\d*)"+re+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,Ce=new RegExp("\\\\([\\da-f]{1,6}"+re+"?|("+re+")|.)","ig"),xe=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Z.apply(G=ee.call(z.childNodes),z.childNodes),G[z.childNodes.length].nodeType}catch(we){Z={apply:G.length?function(e,t){Q.apply(e,ee.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=e.support={},E=e.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},B=e.setDocument=function(e){function t(e){try{return e.top}catch(t){}return null}var n,r=e?e.ownerDocument||e:z,o=r.defaultView;return r!==D&&9===r.nodeType&&r.documentElement?(D=r,L=r.documentElement,M=!E(r),o&&o!==t(o)&&(o.addEventListener?o.addEventListener("unload",function(){B()},!1):o.attachEvent&&o.attachEvent("onunload",function(){B()})),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ge.test(r.getElementsByClassName),x.getById=i(function(e){return L.appendChild(e).id=F,!r.getElementsByName||!r.getElementsByName(F).length}),x.getById?(w.find.ID=function(e,t){if(typeof t.getElementById!==Y&&M){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},w.filter.ID=function(e){var t=e.replace(Ce,xe);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(Ce,xe);return function(e){var n=typeof e.getAttributeNode!==Y&&e.getAttributeNode("id");return n&&n.value===t}}),w.find.TAG=x.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==Y?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=x.getElementsByClassName&&function(e,t){return M?t.getElementsByClassName(e):void 0},H=[],P=[],(x.qsa=ge.test(r.querySelectorAll))&&(i(function(e){e.innerHTML="<select msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+re+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+re+"*(?:value|"+ne+")"),e.querySelectorAll(":checked").length||P.push(":checked")}),i(function(e){var t=r.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+re+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(x.matchesSelector=ge.test(O=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){x.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),H.push("!=",ae)}),P=P.length&&new RegExp(P.join("|")),H=H.length&&new RegExp(H.join("|")),n=ge.test(L.compareDocumentPosition),I=n||ge.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},j=n?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===r||e.ownerDocument===z&&I(z,e)?-1:t===r||t.ownerDocument===z&&I(z,t)?1:R?te.call(R,e)-te.call(R,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,i=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!o||!s)return e===r?-1:t===r?1:o?-1:s?1:R?te.call(R,e)-te.call(R,t):0;if(o===s)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;l[i]===c[i];)i++;return i?a(l[i],c[i]):l[i]===z?-1:c[i]===z?1:0},r):D},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==D&&B(t),n=n.replace(ue,"='$1']"),x.matchesSelector&&M&&(!H||!H.test(n))&&(!P||!P.test(n)))try{var r=O.call(t,n);if(r||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(i){}return e(n,D,null,[t]).length>0},e.contains=function(e,t){return(e.ownerDocument||e)!==D&&B(e),I(e,t)},e.attr=function(e,n){(e.ownerDocument||e)!==D&&B(e);var r=w.attrHandle[n.toLowerCase()],i=r&&K.call(w.attrHandle,n.toLowerCase())?r(e,n,!M):t;return i!==t?i:x.attributes||!M?e.getAttribute(n):(i=e.getAttributeNode(n))&&i.specified?i.value:null},e.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},e.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!x.detectDuplicates,R=!x.sortStable&&e.slice(0),e.sort(j),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return R=null,e},N=e.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=N(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=N(t);return n},w=e.selectors={cacheLength:50,createPseudo:r,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Ce,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(Ce,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=_(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Ce,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=V[e+" "];return t||(t=new RegExp("(^|"+re+")"+e+"("+re+"|$)"))&&V(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Y&&e.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(i){var o=e.attr(i,t);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,h,p,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(u=g[F]||(g[F]={}),c=u[e]||[],h=c[0]===U&&c[1],f=c[0]===U&&c[2],d=h&&g.childNodes[h];d=++h&&d&&d[m]||(f=h=0)||p.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[U,h,f];break}}else if(y&&(c=(t[F]||(t[F]={}))[e])&&c[0]===U)f=c[1];else for(;(d=++h&&d&&d[m]||(f=h=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[F]||(d[F]={}))[e]=[U,f]),d!==t)););return f-=i,f===r||f%r===0&&f/r>=0}}},PSEUDO:function(t,n){var i,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[F]?o(n):o.length>1?(i=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=te.call(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(se,"$1"));return i[F]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(e){return e=e.replace(Ce,xe),function(t){return(t.textContent||t.innerText||N(t)).indexOf(e)>-1}}),lang:r(function(t){return fe.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(Ce,xe).toLowerCase(),function(e){var n;do if(n=M?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===L},focus:function(e){return e===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},w.pseudos.nth=w.pseudos.eq;for(C in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[C]=s(C);for(C in{submit:!0,reset:!0})w.pseudos[C]=l(C);return d.prototype=w.filters=w.pseudos,w.setFilters=new d,_=e.tokenize=function(t,n){var r,i,o,a,s,l,c,u=$[t+" "];if(u)return n?0:u.slice(0);for(s=t,l=[],c=w.preFilter;s;){r&&!(i=le.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),r=!1,(i=ce.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(se," ")}),s=s.slice(r.length));for(a in w.filter)!(i=he[a].exec(s))||c[a]&&!(i=c[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?e.error(t):$(t,l).slice(0)},S=e.compile=function(e,t){var n,r=[],i=[],o=q[e+" "];if(!o){for(t||(t=_(e)),n=t.length;n--;)o=y(t[n]),o[F]?r.push(o):i.push(o);o=q(e,b(i,r)),o.selector=e}return o},k=e.select=function(e,t,n,r){var i,o,a,s,l,c="function"==typeof e&&e,d=!r&&_(e=c.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&M&&w.relative[o[1].type]){if(t=(w.find.ID(a.matches[0].replace(Ce,xe),t)||[])[0],!t)return n;c&&(t=t.parentNode),
+e=e.slice(o.shift().value.length)}for(i=he.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((l=w.find[s])&&(r=l(a.matches[0].replace(Ce,xe),ye.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&f(o),!e)return Z.apply(n,r),n;break}}return(c||S(e,d))(r,t,!M,n,ye.test(e)&&u(t.parentNode)||t),n},x.sortStable=F.split("").sort(j).join("")===F,x.detectDuplicates=!!A,B(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(D.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(ne,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),e}),r(p,[],function(){function e(e){var t=e,n,r;if(!u(e))for(t=[],n=0,r=e.length;r>n;n++)t[n]=e[n];return t}function n(e,n,r){var i,o;if(!e)return 0;if(r=r||e,e.length!==t){for(i=0,o=e.length;o>i;i++)if(n.call(r,e[i],i,e)===!1)return 0}else for(i in e)if(e.hasOwnProperty(i)&&n.call(r,e[i],i,e)===!1)return 0;return 1}function r(e,t){var r=[];return n(e,function(n,i){r.push(t(n,i,e))}),r}function i(e,t){var r=[];return n(e,function(n,i){t&&!t(n,i,e)||r.push(n)}),r}function o(e,t){var n,r;if(e)for(n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function a(e,t,n,r){var i=0;for(arguments.length<3&&(n=e[0]);i<e.length;i++)n=t.call(r,n,e[i],i);return n}function s(e,t,n){var r,i;for(r=0,i=e.length;i>r;r++)if(t.call(n,e[r],r,e))return r;return-1}function l(e,n,r){var i=s(e,n,r);return-1!==i?e[i]:t}function c(e){return e[e.length-1]}var u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return{isArray:u,toArray:e,each:n,map:r,filter:i,indexOf:o,reduce:a,findIndex:s,find:l,last:c}}),r(m,[d,p],function(e,n){function r(e){return null===e||e===t?"":(""+e).replace(h,"")}function i(e,r){return r?"array"==r&&n.isArray(e)?!0:typeof e==r:e!==t}function o(e,t,n){var r;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n}function a(e,t,n){var r=this,i,o,a,s,l,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),a=e[3].match(/(^|\.)(\w+)$/i)[2],o=r.createNS(e[3].replace(/\.\w+$/,""),n),!o[a]){if("static"==e[2])return o[a]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[a]));t[a]||(t[a]=function(){},c=1),o[a]=t[a],r.extend(o[a].prototype,t),e[5]&&(i=r.resolve(e[5]).prototype,s=e[5].match(/\.(\w+)$/i)[1],l=o[a],c?o[a]=function(){return i[s].apply(this,arguments)}:o[a]=function(){return this.parent=i[s],l.apply(this,arguments)},o[a].prototype[a]=o[a],r.each(i,function(e,t){o[a].prototype[t]=i[t]}),r.each(t,function(e,t){i[t]?o[a].prototype[t]=function(){return this.parent=i[t],e.apply(this,arguments)}:t!=a&&(o[a].prototype[t]=e)})),r.each(t["static"],function(e,t){o[a][t]=e})}}function s(e,n){var r,i,o,a=arguments,s;for(r=1,i=a.length;i>r;r++){n=a[r];for(o in n)n.hasOwnProperty(o)&&(s=n[o],s!==t&&(e[o]=s))}return e}function l(e,t,r,i){i=i||this,e&&(r&&(e=e[r]),n.each(e,function(e,n){return t.call(i,e,n,r)===!1?!1:void l(e,t,r,i)}))}function c(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;n<e.length;n++)r=e[n],t[r]||(t[r]={}),t=t[r];return t}function u(e,t){var n,r;for(t=t||window,e=e.split("."),n=0,r=e.length;r>n&&(t=t[e[n]],t);n++);return t}function d(e,t){return!e||i(e,"array")?e:n.map(e.split(t||","),r)}function f(t){var n=e.cacheSuffix;return n&&(t+=(-1===t.indexOf("?")?"?":"&")+n),t}var h=/^\s*|\s*$/g;return{trim:r,isArray:n.isArray,is:i,toArray:n.toArray,makeMap:o,each:n.each,map:n.map,grep:n.filter,inArray:n.indexOf,extend:s,create:a,walk:l,createNS:c,resolve:u,explode:d,_addCacheSuffix:f}}),r(g,[f,h,m,d],function(e,n,r,i){function o(e){return"undefined"!=typeof e}function a(e){return"string"==typeof e}function s(e){return e&&e==e.window}function l(e,t){var n,r,i;for(t=t||w,i=t.createElement("div"),n=t.createDocumentFragment(),i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return n}function c(e,t,n,r){var i;if(a(t))t=l(t,v(e[0]));else if(t.length&&!t.nodeType){if(t=f.makeArray(t),r)for(i=t.length-1;i>=0;i--)c(e,t[i],n,r);else for(i=0;i<t.length;i++)c(e,t[i],n,r);return e}if(t.nodeType)for(i=e.length;i--;)n.call(e[i],t);return e}function u(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")}function d(e,t,n){var r,i;return t=f(t)[0],e.each(function(){var e=this;n&&r==e.parentNode?i.appendChild(e):(r=e.parentNode,i=t.cloneNode(!1),e.parentNode.insertBefore(i,e),i.appendChild(e))}),e}function f(e,t){return new f.fn.init(e,t)}function h(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1}function p(e){return null===e||e===k?"":(""+e).replace(P,"")}function m(e,t){var n,r,i,o,a;if(e)if(n=e.length,n===o){for(r in e)if(e.hasOwnProperty(r)&&(a=e[r],t.call(a,r,a)===!1))break}else for(i=0;n>i&&(a=e[i],t.call(a,i,a)!==!1);i++);return e}function g(e,t){var n=[];return m(e,function(e,r){t(r,e)&&n.push(r)}),n}function v(e){return e?9==e.nodeType?e:e.ownerDocument:w}function y(e,n,r){var i=[],o=e[n];for("string"!=typeof r&&r instanceof f&&(r=r[0]);o&&9!==o.nodeType;){if(r!==t){if(o===r)break;if("string"==typeof r&&f(o).is(r))break}1===o.nodeType&&i.push(o),o=o[n]}return i}function b(e,n,r,i){var o=[];for(i instanceof f&&(i=i[0]);e;e=e[n])if(!r||e.nodeType===r){if(i!==t){if(e===i)break;if("string"==typeof i&&f(e).is(i))break}o.push(e)}return o}function C(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType==n)return e;return null}function x(e,t,n){m(n,function(n,r){e[n]=e[n]||{},e[n][t]=r})}var w=document,N=Array.prototype.push,E=Array.prototype.slice,_=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,S=e.Event,k,T=r.makeMap("children,contents,next,prev"),R=r.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),A=r.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),B={"for":"htmlFor","class":"className",readonly:"readOnly"},D={"float":"cssFloat"},L={},M={},P=/^\s*|\s*$/g;return f.fn=f.prototype={constructor:f,selector:"",context:null,length:0,init:function(e,t){var n=this,r,i;if(!e)return n;if(e.nodeType)return n.context=n[0]=e,n.length=1,n;if(t&&t.nodeType)n.context=t;else{if(t)return f(e).attr(t);n.context=t=document}if(a(e)){if(n.selector=e,r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:_.exec(e),!r)return f(t).find(e);if(r[1])for(i=l(e,v(t)).firstChild;i;)N.call(n,i),i=i.nextSibling;else{if(i=v(t).getElementById(r[2]),!i)return n;if(i.id!==r[2])return n.find(e);n.length=1,n[0]=i}}else this.add(e,!1);return n},toArray:function(){return r.toArray(this)},add:function(e,t){var n=this,r,i;if(a(e))return n.add(f(e));if(t!==!1)for(r=f.unique(n.toArray().concat(f.makeArray(e))),n.length=r.length,i=0;i<r.length;i++)n[i]=r[i];else N.apply(n,f.makeArray(e));return n},attr:function(e,t){var n=this,r;if("object"==typeof e)m(e,function(e,t){n.attr(e,t)});else{if(!o(t)){if(n[0]&&1===n[0].nodeType){if(r=L[e],r&&r.get)return r.get(n[0],e);if(A[e])return n.prop(e)?e:k;t=n[0].getAttribute(e,2),null===t&&(t=k)}return t}this.each(function(){var n;if(1===this.nodeType){if(n=L[e],n&&n.set)return void n.set(this,t);null===t?this.removeAttribute(e,2):this.setAttribute(e,t,2)}})}return n},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if(e=B[e]||e,"object"==typeof e)m(e,function(e,t){n.prop(e,t)});else{if(!o(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each(function(){1==this.nodeType&&(this[e]=t)})}return n},css:function(e,t){function n(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})}function r(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})}var i=this,a,s;if("object"==typeof e)m(e,function(e,t){i.css(e,t)});else if(o(t))e=n(e),"number"!=typeof t||R[e]||(t+="px"),i.each(function(){var n=this.style;if(s=M[e],s&&s.set)return void s.set(this,t);try{this.style[D[e]||e]=t}catch(i){}null!==t&&""!==t||(n.removeProperty?n.removeProperty(r(e)):n.removeAttribute(e))});else{if(a=i[0],s=M[e],s&&s.get)return s.get(a);if(a.ownerDocument.defaultView)try{return a.ownerDocument.defaultView.getComputedStyle(a,null).getPropertyValue(r(e))}catch(l){return k}else if(a.currentStyle)return a.currentStyle[n(e)]}return i},remove:function(){for(var e=this,t,n=this.length;n--;)t=e[n],S.clean(t),t.parentNode&&t.parentNode.removeChild(t);return this},empty:function(){for(var e=this,t,n=this.length;n--;)for(t=e[n];t.firstChild;)t.removeChild(t.firstChild);return this},html:function(e){var t=this,n;if(o(e)){n=t.length;try{for(;n--;)t[n].innerHTML=e}catch(r){f(t[n]).empty().append(e)}return t}return t[0]?t[0].innerHTML:""},text:function(e){var t=this,n;if(o(e)){for(n=t.length;n--;)"innerText"in t[n]?t[n].innerText=e:t[0].textContent=e;return t}return t[0]?t[0].innerText||t[0].textContent:""},append:function(){return c(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return c(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){var e=this;return e[0]&&e[0].parentNode?c(e,arguments,function(e){this.parentNode.insertBefore(e,this)}):e},after:function(){var e=this;return e[0]&&e[0].parentNode?c(e,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):e},appendTo:function(e){return f(e).append(this),this},prependTo:function(e){return f(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return d(this,e)},wrapAll:function(e){return d(this,e,!0)},wrapInner:function(e){return this.each(function(){f(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){f(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),f(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(e,t){var n=this;return"string"!=typeof e?n:(-1!==e.indexOf(" ")?m(e.split(" "),function(){n.toggleClass(this,t)}):n.each(function(n,r){var i,o;o=u(r,e),o!==t&&(i=r.className,o?r.className=p((" "+i+" ").replace(" "+e+" "," ")):r.className+=i?" "+e:e)}),n)},hasClass:function(e){return u(this[0],e)},each:function(e){return m(this,e)},on:function(e,t){return this.each(function(){S.bind(this,e,t)})},off:function(e,t){return this.each(function(){S.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?S.fire(this,e.type,e):S.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new f(E.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,r=[];for(t=0,n=this.length;n>t;t++)f.find(e,this[t],r);return f(r)},filter:function(e){return f("function"==typeof e?g(this.toArray(),function(t,n){return e(n,t)}):f.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof f&&(e=e[0]),this.each(function(n,r){for(;r;){if("string"==typeof e&&f(r).is(e)){t.push(r);break}if(r==e){t.push(r);break}r=r.parentNode}}),f(t)},offset:function(e){var t,n,r,i=0,o=0,a;return e?this.css(e):(t=this[0],t&&(n=t.ownerDocument,r=n.documentElement,t.getBoundingClientRect&&(a=t.getBoundingClientRect(),i=a.left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,o=a.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:o})},push:N,sort:[].sort,splice:[].splice},r.extend(f,{extend:r.extend,makeArray:function(e){return s(e)||e.nodeType?[e]:r.toArray(e)},inArray:h,isArray:r.isArray,each:m,trim:p,grep:g,find:n,expr:n.selectors,unique:n.uniqueSort,text:n.getText,contains:n.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!=t[r].nodeType&&t.splice(r,1);return t=1===t.length?f.find.matchesSelector(t[0],e)?[t[0]]:[]:f.find.matches(e,t)}}),m({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return y(e,"parentNode")},next:function(e){return C(e,"nextSibling",1)},prev:function(e){return C(e,"previousSibling",1)},children:function(e){return b(e.firstChild,"nextSibling",1)},contents:function(e){return r.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){f.fn[e]=function(n){var r=this,i=[];return r.each(function(){var e=t.call(i,this,n,i);e&&(f.isArray(e)?i.push.apply(i,e):i.push(e))}),this.length>1&&(T[e]||(i=f.unique(i)),0===e.indexOf("parents")&&(i=i.reverse())),i=f(i),n?i.filter(n):i}}),m({parentsUntil:function(e,t){return y(e,"parentNode",t)},nextUntil:function(e,t){return b(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return b(e,"previousSibling",1,t).slice(1)}},function(e,t){f.fn[e]=function(n,r){var i=this,o=[];return i.each(function(){var e=t.call(o,this,n,o);e&&(f.isArray(e)?o.push.apply(o,e):o.push(e))}),this.length>1&&(o=f.unique(o),0!==e.indexOf("parents")&&"prevUntil"!==e||(o=o.reverse())),o=f(o),r?o.filter(r):o}}),f.fn.is=function(e){return!!e&&this.filter(e).length>0},f.fn.init.prototype=f.fn,f.overrideDefaults=function(e){function t(r,i){return n=n||e(),0===arguments.length&&(r=n.element),i||(i=n.context),new t.fn.init(r,i)}var n;return f.extend(t,this),t},i.ie&&i.ie<8&&(x(L,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?k:t},size:function(e){var t=e.size;return 20===t?k:t},"class":function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?k:t}}),x(L,"set",{"class":function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),i.ie&&i.ie<9&&(D["float"]="styleFloat",x(M,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),f.attrHooks=L,f.cssHooks=M,f}),r(v,[],function(){return function(e,t){function n(e,t,n,r){function i(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+i(t)+i(n)+i(r)}var r=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,i=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,o=/\s*([^:]+):\s*([^;]+);?/g,a=/\s+$/,s,l,c={},u,d,f,h="\ufeff";for(e=e||{},t&&(d=t.getValidStyles(),f=t.getInvalidStyles()),u=("\\\" \\' \\; \\: ; : "+h).split(" "),l=0;l<u.length;l++)c[u[l]]=h+l,c[h+l]=u[l];return{toHex:function(e){return e.replace(r,n)},parse:function(t){function s(e,t,n){var r,i,o,a;if(r=m[e+"-top"+t],r&&(i=m[e+"-right"+t],i&&(o=m[e+"-bottom"+t],o&&(a=m[e+"-left"+t])))){var s=[r,i,o,a];for(l=s.length-1;l--&&s[l]===s[l+1];);l>-1&&n||(m[e+t]=-1==l?s[0]:s.join(" "),delete m[e+"-top"+t],delete m[e+"-right"+t],delete m[e+"-bottom"+t],delete m[e+"-left"+t])}}function u(e){var t=m[e],n;if(t){for(t=t.split(" "),n=t.length;n--;)if(t[n]!==t[0])return!1;return m[e]=t[0],!0}}function d(e,t,n,r){u(t)&&u(n)&&u(r)&&(m[e]=m[t]+" "+m[n]+" "+m[r],delete m[t],delete m[n],delete m[r])}function f(e){return b=!0,c[e]}function h(e,t){return b&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return c[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function p(t,n,r,i,o,a){if(o=o||a)return o=h(o),"'"+o.replace(/\'/g,"\\'")+"'";if(n=h(n||r||i),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return C&&(n=C.call(x,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"}var m={},g,v,y,b,C=e.url_converter,x=e.url_converter_scope||this;if(t){for(t=t.replace(/[\u0000-\u001F]/g,""),t=t.replace(/\\[\"\';:\uFEFF]/g,f).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,f)});g=o.exec(t);){if(v=g[1].replace(a,"").toLowerCase(),y=g[2].replace(a,""),y=y.replace(/\\[0-9a-f]+/g,function(e){return String.fromCharCode(parseInt(e.substr(1),16))}),v&&y.length>0){if(!e.allow_script_urls&&("behavior"==v||/expression\s*\(|\/\*|\*\//.test(y)))continue;"font-weight"===v&&"700"===y?y="bold":"color"!==v&&"background-color"!==v||(y=y.toLowerCase()),y=y.replace(r,n),y=y.replace(i,p),m[v]=b?h(y,!0):y}o.lastIndex=g.index+g[0].length}s("border","",!0),s("border","-width"),s("border","-color"),s("border","-style"),s("padding",""),s("margin",""),d("border","border-width","border-style","border-color"),"medium none"===m.border&&delete m.border,"none"===m["border-image"]&&delete m["border-image"]}return m},serialize:function(e,t){function n(t){var n,r,o,a;if(n=d[t])for(r=0,o=n.length;o>r;r++)t=n[r],a=e[t],a!==s&&a.length>0&&(i+=(i.length>0?" ":"")+t+": "+a+";")}function r(e,t){var n;return n=f["*"],n&&n[e]?!1:(n=f[t],!n||!n[e])}var i="",o,a;if(t&&d)n("*"),n(t);else for(o in e)a=e[o],a!==s&&a.length>0&&(f&&!r(o,t)||(i+=(i.length>0?" ":"")+o+": "+a+";"));return i}}}}),r(y,[],function(){return function(e,t){function n(e,n,r,i){var o,a;if(e){if(!i&&e[n])return e[n];if(e!=t){if(o=e[r])return o;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(o=a[r])return o}}}function r(e,n,r,i){var o,a,s;if(e){if(o=e[r],t&&o===t)return;if(o){if(!i)for(s=o[n];s;s=s[n])if(!s[n])return s;return o}if(a=e.parentNode,a&&a!==t)return a}}var i=e;this.current=function(){return i},this.next=function(e){return i=n(i,"firstChild","nextSibling",e)},this.prev=function(e){return i=n(i,"lastChild","previousSibling",e)},this.prev2=function(e){return i=r(i,"lastChild","previousSibling",e)}}}),r(b,[m],function(e){function t(n){function r(){return P.createDocumentFragment()}function i(e,t){N(F,e,t)}function o(e,t){N(z,e,t)}function a(e){i(e.parentNode,j(e))}function s(e){i(e.parentNode,j(e)+1)}function l(e){o(e.parentNode,j(e))}function c(e){o(e.parentNode,j(e)+1)}function u(e){e?(M[V]=M[W],M[$]=M[U]):(M[W]=M[V],M[U]=M[$]),M.collapsed=F}function d(e){a(e),c(e)}function f(e){i(e,0),o(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function h(e,t){var n=M[W],r=M[U],i=M[V],o=M[$],a=t.startContainer,s=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?w(n,r,a,s):1===e?w(i,o,a,s):2===e?w(i,o,l,c):3===e?w(n,r,l,c):void 0}function p(){E(I)}function m(){return E(H)}function g(){return E(O)}function v(e){var t=this[W],r=this[U],i,o;3!==t.nodeType&&4!==t.nodeType||!t.nodeValue?(t.childNodes.length>0&&(o=t.childNodes[r]),o?t.insertBefore(e,o):3==t.nodeType?n.insertAfter(e,t):t.appendChild(e)):r?r>=t.nodeValue.length?n.insertAfter(e,t):(i=t.splitText(r),t.parentNode.insertBefore(e,i)):t.parentNode.insertBefore(e,t)}function y(e){var t=M.extractContents();M.insertNode(e),e.appendChild(t),M.selectNode(e)}function b(){return q(new t(n),{startContainer:M[W],startOffset:M[U],endContainer:M[V],endOffset:M[$],collapsed:M.collapsed,commonAncestorContainer:M.commonAncestorContainer})}function C(e,t){var n;if(3==e.nodeType)return e;if(0>t)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n?n:e}function x(){return M[W]==M[V]&&M[U]==M[$]}function w(e,t,r,i){var o,a,s,l,c,u;if(e==r)return t==i?0:i>t?-1:1;for(o=r;o&&o.parentNode!=e;)o=o.parentNode;if(o){for(a=0,s=e.firstChild;s!=o&&t>a;)a++,s=s.nextSibling;return a>=t?-1:1}for(o=e;o&&o.parentNode!=r;)o=o.parentNode;if(o){for(a=0,s=r.firstChild;s!=o&&i>a;)a++,s=s.nextSibling;return i>a?-1:1}for(l=n.findCommonAncestor(e,r),c=e;c&&c.parentNode!=l;)c=c.parentNode;for(c||(c=l),u=r;u&&u.parentNode!=l;)u=u.parentNode;if(u||(u=l),c==u)return 0;for(s=l.firstChild;s;){if(s==c)return-1;if(s==u)return 1;s=s.nextSibling}}function N(e,t,r){var i,o;for(e?(M[W]=t,M[U]=r):(M[V]=t,M[$]=r),i=M[V];i.parentNode;)i=i.parentNode;for(o=M[W];o.parentNode;)o=o.parentNode;o==i?w(M[W],M[U],M[V],M[$])>0&&M.collapse(e):M.collapse(e),M.collapsed=x(),M.commonAncestorContainer=n.findCommonAncestor(M[W],M[V])}function E(e){var t,n=0,r=0,i,o,a,s,l,c;if(M[W]==M[V])return _(e);for(t=M[V],i=t.parentNode;i;t=i,i=i.parentNode){if(i==M[W])return S(t,e);++n}for(t=M[W],i=t.parentNode;i;t=i,i=i.parentNode){if(i==M[V])return k(t,e);++r}for(o=r-n,a=M[W];o>0;)a=a.parentNode,o--;for(s=M[V];0>o;)s=s.parentNode,o++;for(l=a.parentNode,c=s.parentNode;l!=c;l=l.parentNode,c=c.parentNode)a=l,s=c;return T(a,s,e)}function _(e){var t,n,i,o,a,s,l,c,u;if(e!=I&&(t=r()),M[U]==M[$])return t;if(3==M[W].nodeType){if(n=M[W].nodeValue,i=n.substring(M[U],M[$]),e!=O&&(o=M[W],c=M[U],u=M[$]-M[U],0===c&&u>=o.nodeValue.length-1?o.parentNode.removeChild(o):o.deleteData(c,u),M.collapse(F)),e==I)return;return i.length>0&&t.appendChild(P.createTextNode(i)),t}for(o=C(M[W],M[U]),a=M[$]-M[U];o&&a>0;)s=o.nextSibling,l=D(o,e),t&&t.appendChild(l),--a,o=s;return e!=O&&M.collapse(F),t}function S(e,t){var n,i,o,a,s,l;if(t!=I&&(n=r()),i=R(e,t),n&&n.appendChild(i),o=j(e),a=o-M[U],0>=a)return t!=O&&(M.setEndBefore(e),M.collapse(z)),n;for(i=e.previousSibling;a>0;)s=i.previousSibling,l=D(i,t),n&&n.insertBefore(l,n.firstChild),--a,i=s;return t!=O&&(M.setEndBefore(e),M.collapse(z)),n}function k(e,t){var n,i,o,a,s,l;for(t!=I&&(n=r()),o=A(e,t),n&&n.appendChild(o),i=j(e),++i,a=M[$]-i,o=e.nextSibling;o&&a>0;)s=o.nextSibling,l=D(o,t),n&&n.appendChild(l),--a,o=s;return t!=O&&(M.setStartAfter(e),M.collapse(F)),n}function T(e,t,n){var i,o,a,s,l,c,u;for(n!=I&&(o=r()),i=A(e,n),o&&o.appendChild(i),a=j(e),s=j(t),++a,l=s-a,c=e.nextSibling;l>0;)u=c.nextSibling,i=D(c,n),o&&o.appendChild(i),c=u,--l;return i=R(t,n),o&&o.appendChild(i),n!=O&&(M.setStartAfter(e),M.collapse(F)),o}function R(e,t){var n=C(M[V],M[$]-1),r,i,o,a,s,l=n!=M[V];if(n==e)return B(n,l,z,t);for(r=n.parentNode,i=B(r,z,z,t);r;){for(;n;)o=n.previousSibling,a=B(n,l,z,t),t!=I&&i.insertBefore(a,i.firstChild),l=F,n=o;if(r==e)return i;n=r.previousSibling,r=r.parentNode,s=B(r,z,z,t),t!=I&&s.appendChild(i),i=s}}function A(e,t){var n=C(M[W],M[U]),r=n!=M[W],i,o,a,s,l;if(n==e)return B(n,r,F,t);for(i=n.parentNode,o=B(i,z,F,t);i;){for(;n;)a=n.nextSibling,s=B(n,r,F,t),t!=I&&o.appendChild(s),r=F,n=a;if(i==e)return o;n=i.nextSibling,i=i.parentNode,l=B(i,z,F,t),t!=I&&l.appendChild(o),o=l}}function B(e,t,r,i){var o,a,s,l,c;if(t)return D(e,i);if(3==e.nodeType){if(o=e.nodeValue,r?(l=M[U],a=o.substring(l),s=o.substring(0,l)):(l=M[$],a=o.substring(0,l),s=o.substring(l)),i!=O&&(e.nodeValue=s),i==I)return;return c=n.clone(e,z),c.nodeValue=a,c}if(i!=I)return n.clone(e,z)}function D(e,t){return t!=I?t==O?n.clone(e,F):e:void e.parentNode.removeChild(e)}function L(){return n.create("body",null,g()).outerText}var M=this,P=n.doc,H=0,O=1,I=2,F=!0,z=!1,U="startOffset",W="startContainer",V="endContainer",$="endOffset",q=e.extend,j=n.nodeIndex;return q(M,{startContainer:P,startOffset:0,endContainer:P,endOffset:0,collapsed:F,commonAncestorContainer:P,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:i,setEnd:o,setStartBefore:a,setStartAfter:s,setEndBefore:l,setEndAfter:c,collapse:u,selectNode:d,selectNodeContents:f,compareBoundaryPoints:h,deleteContents:p,extractContents:m,cloneContents:g,insertNode:v,surroundContents:y,cloneRange:b,toStringIE:L}),M}return t.prototype.toString=function(){return this.toStringIE()},t}),r(C,[m],function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,r,i,a={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),o[r]||(i="&"+e[n+1]+";",a[r]=i,a[i]=r);return a}}var r=e.makeMap,i,o,a,s=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,u=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,d={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};o={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},a={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},i=n("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var f={encodeRaw:function(e,t){return e.replace(t?s:l,function(e){return o[e]||e})},encodeAllRaw:function(e){return(""+e).replace(c,function(e){return o[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:l,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":o[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||i,e.replace(t?s:l,function(e){return o[e]||n[e]||e})},getEncodeFunc:function(e,t){function a(e,n){return e.replace(n?s:l,function(e){return o[e]||t[e]||"&#"+e.charCodeAt(0)+";"||e})}function c(e,n){return f.encodeNamed(e,n,t)}return t=n(t)||i,e=r(e.replace(/\+/g,",")),e.named&&e.numeric?a:e.named?t?c:f.encodeNamed:e.numeric?f.encodeNumeric:f.encodeRaw},decode:function(e){return e.replace(u,function(e,n){return n?(n="x"===n.charAt(0).toLowerCase()?parseInt(n.substr(1),16):parseInt(n,10),n>65535?(n-=65536,String.fromCharCode(55296+(n>>10),56320+(1023&n))):d[n]||String.fromCharCode(n)):a[e]||i[e]||t(e)})}};return f}),r(x,[m,u],function(e,t){return function(n,r){function i(e){n.getElementsByTagName("head")[0].appendChild(e)}function o(r,o,c){function u(){for(var e=b.passed,t=e.length;t--;)e[t]();b.status=2,b.passed=[],b.failed=[]}function d(){for(var e=b.failed,t=e.length;t--;)e[t]();b.status=3,b.passed=[],b.failed=[]}function f(){var e=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(e&&e[1]<536)}function h(e,n){e()||((new Date).getTime()-y<l?t.setTimeout(n):d())}function p(){h(function(){for(var e=n.styleSheets,t,r=e.length,i;r--;)if(t=e[r],i=t.ownerNode?t.ownerNode:t.owningElement,i&&i.id===g.id)return u(),!0},p)}function m(){h(function(){try{var e=v.sheet.cssRules;return u(),!!e}catch(t){}},m)}var g,v,y,b;if(r=e._addCacheSuffix(r),s[r]?b=s[r]:(b={passed:[],failed:[]},s[r]=b),o&&b.passed.push(o),c&&b.failed.push(c),1!=b.status){if(2==b.status)return void u();if(3==b.status)return void d();if(b.status=1,g=n.createElement("link"),g.rel="stylesheet",g.type="text/css",g.id="u"+a++,g.async=!1,g.defer=!1,y=(new Date).getTime(),"onload"in g&&!f())g.onload=p,g.onerror=d;else{if(navigator.userAgent.indexOf("Firefox")>0)return v=n.createElement("style"),v.textContent='@import "'+r+'"',m(),void i(v);p()}i(g),g.href=r}}var a=0,s={},l;r=r||{},l=r.maxLoadTime||5e3,this.load=o}}),r(w,[h,g,v,f,y,b,C,d,m,x],function(e,n,r,i,o,a,s,l,c,u){function d(e,t){var n={},r=t.keep_values,i;return i={set:function(n,r,i){t.url_converter&&(r=t.url_converter.call(t.url_converter_scope||e,r,i,n[0])),n.attr("data-mce-"+i,r).attr(i,r)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},n={style:{set:function(e,t){return null!==t&&"object"==typeof t?void e.css(t):(r&&e.attr("data-mce-style",t),void e.attr("style",t))},get:function(t){var n=t.attr("data-mce-style")||t.attr("style");return n=e.serializeStyle(e.parseStyle(n),t[0].nodeName)}}},r&&(n.href=n.src=i),n}function f(e,t){var n=t.attr("style");n=e.serializeStyle(e.parseStyle(n),t[0].nodeName),n||(n=null),t.attr("data-mce-style",n)}function h(e,t){var n=0,r,i;if(e)for(r=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)i=e.nodeType,(!t||3!=i||i!=r&&e.nodeValue.length)&&(n++,r=i);return n}function p(e,t){var o=this,a;o.doc=e,o.win=window,o.files={},o.counter=0,o.stdMode=!b||e.documentMode>=8,o.boxModel=!b||"CSS1Compat"==e.compatMode||o.stdMode,o.styleSheetLoader=new u(e),o.boundEvents=[],o.settings=t=t||{},o.schema=t.schema,o.styles=new r({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),o.fixDoc(e),o.events=t.ownEvents?new i(t.proxy):i.Event,o.attrHooks=d(o,t),a=t.schema?t.schema.getBlockElements():{},o.$=n.overrideDefaults(function(){return{context:e,element:o.getRoot()}}),o.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!a[e.nodeName]):!!a[e]}}var m=c.each,g=c.is,v=c.grep,y=c.trim,b=l.ie,C=/^([a-z0-9],?)+$/i,x=/^[ \t\r\n]*$/;return p.prototype={$$:function(e){return"string"==typeof e&&(e=this.get(e)),this.$(e)},root:null,fixDoc:function(e){var t=this.settings,n;if(b&&t.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(t){e.createElement(t)});for(n in t.schema.getCustomElements())e.createElement(n)}},clone:function(e,t){var n=this,r,i;return!b||1!==e.nodeType||t?e.cloneNode(t):(i=n.doc,t?r.firstChild:(r=i.createElement(e.nodeName),m(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),r))},getRoot:function(){var e=this;return e.settings.root_element||e.doc.body},getViewPort:function(e){var t,n;return e=e?e:this.win,t=e.document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t=this,n,r;return e=t.get(e),n=t.getPos(e),r=t.getSize(e),{x:n.x,y:n.y,w:r.w,h:r.h}},getSize:function(e){var t=this,n,r;return e=t.get(e),n=t.getStyle(e,"width"),r=t.getStyle(e,"height"),-1===n.indexOf("px")&&(n=0),-1===r.indexOf("px")&&(r=0),{w:parseInt(n,10)||e.offsetWidth||e.clientWidth,h:parseInt(r,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,n,r,i){var o=this,a,s=[];for(e=o.get(e),i=i===t,r=r||("BODY"!=o.getRoot().nodeName?o.getRoot().parentNode:null),g(n,"string")&&(a=n,n="*"===n?function(e){
+return 1==e.nodeType}:function(e){return o.is(e,a)});e&&e!=r&&e.nodeType&&9!==e.nodeType;){if(!n||n(e)){if(!i)return e;s.push(e)}e=e.parentNode}return i?s:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,e=this.doc.getElementById(e),e&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(t,n){var r=this;return e(t,r.get(n)||r.settings.root_element||r.doc,[])},is:function(n,r){var i;if(n.length===t){if("*"===r)return 1==n.nodeType;if(C.test(r)){for(r=r.toLowerCase().split(/,/),n=n.nodeName.toLowerCase(),i=r.length-1;i>=0;i--)if(r[i]==n)return!0;return!1}}if(n.nodeType&&1!=n.nodeType)return!1;var o=n.nodeType?[n]:n;return e(r,o[0].ownerDocument||o[0],null,o).length>0},add:function(e,t,n,r,i){var o=this;return this.run(e,function(e){var a;return a=g(t,"string")?o.doc.createElement(t):t,o.setAttribs(a,n),r&&(r.nodeType?a.appendChild(r):o.setHTML(a,r)),i?a:e.appendChild(a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var r="",i;r+="<"+e;for(i in t)t.hasOwnProperty(i)&&null!==t[i]&&"undefined"!=typeof t[i]&&(r+=" "+i+'="'+this.encode(t[i])+'"');return"undefined"!=typeof n?r+">"+n+"</"+e+">":r+" />"},createFragment:function(e){var t,n,r=this.doc,i;for(i=r.createElement("div"),t=r.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},remove:function(e,t){return e=this.$$(e),t?e.each(function(){for(var e;e=this.firstChild;)3==e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():e.remove(),e.length>1?e.toArray():e[0]},setStyle:function(e,t,n){e=this.$$(e).css(t,n),this.settings.update_styles&&f(this,e)},getStyle:function(e,n,r){return e=this.$$(e),r?e.css(n):(n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==n&&(n=l.ie&&l.ie<12?"styleFloat":"cssFloat"),e[0]&&e[0].style?e[0].style[n]:t)},setStyles:function(e,t){e=this.$$(e).css(t),this.settings.update_styles&&f(this,e)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,t,n){var r=this,i,o,a=r.settings;""===n&&(n=null),e=r.$$(e),i=e.attr(t),e.length&&(o=r.attrHooks[t],o&&o.set?o.set(e,n,t):e.attr(t,n),i!=n&&a.onSetAttrib&&a.onSetAttrib({attrElm:e,attrName:t,attrValue:n}))},setAttribs:function(e,t){var n=this;n.$$(e).each(function(e,r){m(t,function(e,t){n.setAttrib(r,t,e)})})},getAttrib:function(e,t,n){var r=this,i,o;return e=r.$$(e),e.length&&(i=r.attrHooks[t],o=i&&i.get?i.get(e,t):e.attr(t)),"undefined"==typeof o&&(o=n||""),o},getPos:function(e,t){var r=this,i=0,o=0,a,s=r.doc,l=s.body,c;if(e=r.get(e),t=t||l,e){if(t===l&&e.getBoundingClientRect&&"static"===n(l).css("position"))return c=e.getBoundingClientRect(),t=r.boxModel?s.documentElement:l,i=c.left+(s.documentElement.scrollLeft||l.scrollLeft)-t.clientLeft,o=c.top+(s.documentElement.scrollTop||l.scrollTop)-t.clientTop,{x:i,y:o};for(a=e;a&&a!=t&&a.nodeType;)i+=a.offsetLeft||0,o+=a.offsetTop||0,a=a.offsetParent;for(a=e.parentNode;a&&a!=t&&a.nodeType;)i-=a.scrollLeft||0,o-=a.scrollTop||0,a=a.parentNode}return{x:i,y:o}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t=this,n=t.doc,r,i;if(t!==p.DOM&&n===document){var o=p.DOM.addedStyles;if(o=o||[],o[e])return;o[e]=!0,p.DOM.addedStyles=o}i=n.getElementById("mceDefaultStyles"),i||(i=n.createElement("style"),i.id="mceDefaultStyles",i.type="text/css",r=n.getElementsByTagName("head")[0],r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i)),i.styleSheet?i.styleSheet.cssText+=e:i.appendChild(n.createTextNode(e))},loadCSS:function(e){var t=this,n=t.doc,r;return t!==p.DOM&&n===document?void p.DOM.loadCSS(e):(e||(e=""),r=n.getElementsByTagName("head")[0],void m(e.split(","),function(e){var i;e=c._addCacheSuffix(e),t.files[e]||(t.files[e]=!0,i=t.create("link",{rel:"stylesheet",href:e}),b&&n.documentMode&&n.recalc&&(i.onload=function(){n.recalc&&n.recalc(),i.onload=null}),r.appendChild(i))}))},addClass:function(e,t){this.$$(e).addClass(t)},removeClass:function(e,t){this.toggleClass(e,t,!1)},hasClass:function(e,t){return this.$$(e).hasClass(t)},toggleClass:function(e,t,r){this.$$(e).toggleClass(t,r).each(function(){""===this.className&&n(this).attr("class",null)})},show:function(e){this.$$(e).show()},hide:function(e){this.$$(e).hide()},isHidden:function(e){return"none"==this.$$(e).css("display")},uniqueId:function(e){return(e?e:"mce_")+this.counter++},setHTML:function(e,t){e=this.$$(e),b?e.each(function(e,r){if(r.canHaveHTML!==!1){for(;r.firstChild;)r.removeChild(r.firstChild);try{r.innerHTML="<br>"+t,r.removeChild(r.firstChild)}catch(i){n("<div>").html("<br>"+t).contents().slice(1).appendTo(r)}return t}}):e.html(t)},getOuterHTML:function(e){return e=this.get(e),1==e.nodeType&&"outerHTML"in e?e.outerHTML:n("<div>").append(n(e).clone()).html()},setOuterHTML:function(e,t){var r=this;r.$$(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}r.remove(n(this).html(t),!0)})},decode:s.decode,encode:s.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,r;return n=t.parentNode,r=t.nextSibling,r?n.insertBefore(e,r):n.appendChild(e),e})},replace:function(e,t,n){var r=this;return r.run(t,function(t){return g(t,"array")&&(e=e.cloneNode(!0)),n&&m(v(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n=this,r;return e.nodeName!=t.toUpperCase()&&(r=n.create(t),m(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),n.replace(r,e,1)),r||e},findCommonAncestor:function(e,t){for(var n=e,r;n;){for(r=t;r&&n!=r;)r=r.parentNode;if(n==r)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},toHex:function(e){return this.styles.toHex(c.trim(e))},run:function(e,t,n){var r=this,i;return"string"==typeof e&&(e=r.get(e)),e?(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(i=[],m(e,function(e,o){e&&("string"==typeof e&&(e=r.get(e)),i.push(t.call(n,e,o)))}),i)):!1},getAttribs:function(e){var t;if(e=this.get(e),!e)return[];if(b){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});var n=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;return e.cloneNode(!1).outerHTML.replace(n,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n=this,r,i,a,s,l,c=0;if(e=e.firstChild){s=new o(e,e.parentNode),t=t||(n.schema?n.schema.getNonEmptyElements():null);do{if(a=e.nodeType,1===a){if(e.getAttribute("data-mce-bogus"))continue;if(l=e.nodeName.toLowerCase(),t&&t[l]){if("br"===l){c++;continue}return!1}for(i=n.getAttribs(e),r=i.length;r--;)if(l=i[r].nodeName,"name"===l||"data-mce-bookmark"===l)return!1}if(8==a)return!1;if(3===a&&!x.test(e.nodeValue))return!1}while(e=s.next())}return 1>=c},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new a(this)},nodeIndex:h,split:function(e,t,n){function r(e){function t(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}var n,o=e.childNodes,a=e.nodeType;if(1!=a||"bookmark"!=e.getAttribute("data-mce-type")){for(n=o.length-1;n>=0;n--)r(o[n]);if(9!=a){if(3==a&&e.nodeValue.length>0){var s=y(e.nodeValue).length;if(!i.isBlock(e.parentNode)||s>0||0===s&&t(e))return}else if(1==a&&(o=e.childNodes,1==o.length&&o[0]&&1==o[0].nodeType&&"bookmark"==o[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(o[0],e),o.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;i.remove(e)}return e}}var i=this,o=i.createRng(),a,s,l;return e&&t?(o.setStart(e.parentNode,i.nodeIndex(e)),o.setEnd(t.parentNode,i.nodeIndex(t)),a=o.extractContents(),o=i.createRng(),o.setStart(t.parentNode,i.nodeIndex(t)+1),o.setEnd(e.parentNode,i.nodeIndex(e)+1),s=o.extractContents(),l=e.parentNode,l.insertBefore(r(a),e),n?l.insertBefore(n,e):l.insertBefore(t,e),l.insertBefore(r(s),e),i.remove(e),n||t):void 0},bind:function(e,t,n,r){var i=this;if(c.isArray(e)){for(var o=e.length;o--;)e[o]=i.bind(e[o],t,n,r);return e}return!i.settings.collect||e!==i.doc&&e!==i.win||i.boundEvents.push([e,t,n,r]),i.events.bind(e,t,n,r||i)},unbind:function(e,t,n){var r=this,i;if(c.isArray(e)){for(i=e.length;i--;)e[i]=r.unbind(e[i],t,n);return e}if(r.boundEvents&&(e===r.doc||e===r.win))for(i=r.boundEvents.length;i--;){var o=r.boundEvents[i];e!=o[0]||t&&t!=o[1]||n&&n!=o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null):null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&(n=this.getContentEditable(e),null===n);e=e.parentNode);return n},destroy:function(){var t=this;if(t.boundEvents){for(var n=t.boundEvents.length;n--;){var r=t.boundEvents[n];this.events.unbind(r[0],r[1],r[2])}t.boundEvents=null}e.setDocument&&e.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var r=this,i=t;if(e)for("string"==typeof i&&(i=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(i(e))return e;return null}},p.DOM=new p(document),p.nodeIndex=h,p}),r(N,[w,m],function(e,t){function n(){function e(e,n){function i(){a.remove(l),s&&(s.onreadystatechange=s.onload=s=null),n()}function o(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+e)}var a=r,s,l;l=a.uniqueId(),s=document.createElement("script"),s.id=l,s.type="text/javascript",s.src=t._addCacheSuffix(e),"onreadystatechange"in s?s.onreadystatechange=function(){/loaded|complete/.test(s.readyState)&&i()}:s.onload=i,s.onerror=o,(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}var n=0,a=1,s=2,l={},c=[],u={},d=[],f=0,h;this.isDone=function(e){return l[e]==s},this.markDone=function(e){l[e]=s},this.add=this.load=function(e,t,r){var i=l[e];i==h&&(c.push(e),l[e]=n),t&&(u[e]||(u[e]=[]),u[e].push({func:t,scope:r||this}))},this.remove=function(e){delete l[e],delete u[e]},this.loadQueue=function(e,t){this.loadScripts(c,e,t)},this.loadScripts=function(t,n,r){function c(e){i(u[e],function(e){e.func.call(e.scope)}),u[e]=h}var p;d.push({func:n,scope:r||this}),(p=function(){var n=o(t);t.length=0,i(n,function(t){return l[t]==s?void c(t):void(l[t]!=a&&(l[t]=a,f++,e(t,function(){l[t]=s,f--,c(t),p()})))}),f||(i(d,function(e){e.func.call(e.scope)}),d.length=0)})()}}var r=e.DOM,i=t.each,o=t.grep;return n.ScriptLoader=new n,n}),r(E,[N,m],function(e,n){function r(){var e=this;e.items=[],e.urls={},e.lookup={}}var i=n.each;return r.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:t},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t,n){var i=r.language;if(i&&r.languageLoad!==!1){if(n)if(n=","+n+",",-1!=n.indexOf(","+i.substr(0,2)+","))i=i.substr(0,2);else if(-1==n.indexOf(","+i+","))return;e.ScriptLoader.add(this.urls[t]+"/langs/"+i+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},remove:function(e){delete this.urls[e],delete this.lookup[e]},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var r=this.urls[t];i(n,function(t){e.ScriptLoader.add(r+"/"+t)})},load:function(n,o,a,s){function l(){var r=c.dependencies(n);i(r,function(e){var n=c.createUrl(o,e);c.load(n.resource,n,t,t)}),a&&(s?a.call(s):a.call(e))}var c=this,u=o;c.urls[n]||("object"==typeof o&&(u=o.prefix+o.resource+o.suffix),0!==u.indexOf("/")&&-1==u.indexOf("://")&&(u=r.baseURL+"/"+u),c.urls[n]=u.substring(0,u.lastIndexOf("/")),c.lookup[n]?l():e.ScriptLoader.add(u,l,s))}},r.PluginManager=new r,r.ThemeManager=new r,r}),r(_,[],function(){function e(e){return function(t){return!!t&&t.nodeType==e}}function t(e){return e=e.toLowerCase().split(" "),function(t){var n,r;if(t&&t.nodeType)for(r=t.nodeName.toLowerCase(),n=0;n<e.length;n++)if(r===e[n])return!0;return!1}}function n(e,t){return t=t.toLowerCase().split(" "),function(n){var r,i;if(s(n))for(r=0;r<t.length;r++)if(i=getComputedStyle(n,null).getPropertyValue(e),i===t[r])return!0;return!1}}function r(e,t){return function(n){return s(n)&&n[e]===t}}function i(e,t){return function(n){return s(n)&&n.getAttribute(e)===t}}function o(e){return s(e)&&e.hasAttribute("data-mce-bogus")}function a(e){return function(t){if(s(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1}}var s=e(1);return{isText:e(3),isElement:s,isComment:e(8),isBr:t("br"),isContentEditableTrue:a("true"),isContentEditableFalse:a("false"),matchNodeNames:t,hasPropValue:r,hasAttributeValue:i,matchStyleValues:n,isBogus:o}}),r(S,[],function(){function e(e){return e==n}function t(e){return e.replace(new RegExp(n,"g"),"")}var n="\u200b";return{isZwsp:e,ZWSP:n,trim:t}}),r(k,[_,S],function(e,t){function n(e){return d(e)&&(e=e.parentNode),u(e)&&e.hasAttribute("data-mce-caret")}function r(e){return d(e)&&t.isZwsp(e.data)}function i(e){return n(e)||r(e)}function o(e,n){var r,o,a,s;if(r=e.ownerDocument,a=r.createTextNode(t.ZWSP),s=e.parentNode,n){if(o=e.previousSibling,d(o)){if(i(o))return o;if(c(o))return o.splitText(o.data.length-1)}s.insertBefore(a,e)}else{if(o=e.nextSibling,d(o)){if(i(o))return o;if(l(o))return o.splitText(1),o}e.nextSibling?s.insertBefore(a,e.nextSibling):s.appendChild(a)}return a}function a(e,t,n){var r,i,o;return r=t.ownerDocument,i=r.createElement(e),i.setAttribute("data-mce-caret",n?"before":"after"),i.setAttribute("data-mce-bogus","all"),i.appendChild(r.createTextNode("\xa0")),o=t.parentNode,n?o.insertBefore(i,t):t.nextSibling?o.insertBefore(i,t.nextSibling):o.appendChild(i),i}function s(e){var n;u(e)&&i(e)&&("&nbsp;"!=e.innerHTML?e.removeAttribute("data-mce-caret"):e.parentNode&&e.parentNode.removeChild(e)),d(e)&&(n=t.trim(e.data),0===n.length&&e.parentNode&&e.parentNode.removeChild(e),e.nodeValue=n)}function l(e){return d(e)&&e.data[0]==t.ZWSP}function c(e){return d(e)&&e.data[e.data.length-1]==t.ZWSP}var u=e.isElement,d=e.isText;return{isCaretContainer:i,isCaretContainerBlock:n,isCaretContainerInline:r,insertInline:o,insertBlock:a,remove:s,startsWithCaretContainer:l,endsWithCaretContainer:c}}),r(T,[m,y,_,b,k],function(e,t,n,r,i){function o(e,t){var n=e.childNodes;return t--,t>n.length-1?t=n.length-1:0>t&&(t=0),n[t]||e}function a(e){this.walk=function(t,n){function r(e){var t;return t=e[0],3===t.nodeType&&t===c&&u>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===f&&e.length>0&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e}function i(e,t,n){for(var r=[];e&&e!=n;e=e[t])r.push(e);return r}function a(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function s(e,t,o){var a=o?"nextSibling":"previousSibling";for(g=e,v=g.parentNode;g&&g!=t;g=v)v=g.parentNode,y=i(g==e?g:g[a],a),y.length&&(o||y.reverse(),n(r(y)))}var c=t.startContainer,u=t.startOffset,d=t.endContainer,f=t.endOffset,h,p,m,g,v,y,b;if(b=e.select("td[data-mce-selected],th[data-mce-selected]"),b.length>0)return void l(b,function(e){n([e])});if(1==c.nodeType&&c.hasChildNodes()&&(c=c.childNodes[u]),1==d.nodeType&&d.hasChildNodes()&&(d=o(d,f)),c==d)return n(r([c]));for(h=e.findCommonAncestor(c,d),g=c;g;g=g.parentNode){if(g===d)return s(c,h,!0);if(g===h)break}for(g=d;g;g=g.parentNode){if(g===c)return s(d,h);if(g===h)break}p=a(c,h)||c,m=a(d,h)||d,s(c,p,!0),y=i(p==c?p:p.nextSibling,"nextSibling",m==d?m.nextSibling:m),y.length&&n(r(y)),s(d,m)},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return n==i&&3==n.nodeType?r>0&&r<n.nodeValue.length&&(i=t(n,r),n=i.previousSibling,o>r?(o-=r,n=i=t(i,o).previousSibling,o=i.nodeValue.length,r=0):o=0):(3==n.nodeType&&r>0&&r<n.nodeValue.length&&(n=t(n,r),r=0),3==i.nodeType&&o>0&&o<i.nodeValue.length&&(i=t(i,o).previousSibling,o=i.nodeValue.length)),{startContainer:n,startOffset:r,endContainer:i,endOffset:o}},this.normalize=function(n){function r(r){function a(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)}function s(n,r){for(var i=new t(n,e.getParent(n.parentNode,e.isBlock)||g);n=i[r?"prev":"next"]();)if("BR"===n.nodeName)return!0}function l(e){for(;e&&e!=g;){if(c(e))return!0;e=e.parentNode}return!1}function d(e,t){return e.previousSibling&&e.previousSibling.nodeName==t}function f(n,r){var a,s,l;if(r=r||h,l=e.getParent(r.parentNode,e.isBlock)||g,n&&"BR"==r.nodeName&&C&&e.isEmpty(l))return h=r.parentNode,p=e.nodeIndex(r),void(i=!0);for(a=new t(r,l);v=a[n?"prev":"next"]();){if("false"===e.getContentEditableParent(v)||u(v))return;if(3===v.nodeType&&v.nodeValue.length>0)return h=v,p=n?v.nodeValue.length:0,void(i=!0);if(e.isBlock(v)||y[v.nodeName.toLowerCase()])return;s=v}o&&s&&(h=s,i=!0,p=0)}var h,p,m,g=e.getRoot(),v,y,b,C;if(h=n[(r?"start":"end")+"Container"],p=n[(r?"start":"end")+"Offset"],C=1==h.nodeType&&p===h.childNodes.length,y=e.schema.getNonEmptyElements(),b=r,!u(h)){if(1==h.nodeType&&p>h.childNodes.length-1&&(b=!1),9===h.nodeType&&(h=e.getRoot(),p=0),h===g){if(b&&(v=h.childNodes[p>0?p-1:0])){if(u(v))return;if(y[v.nodeName]||"TABLE"==v.nodeName)return}if(h.hasChildNodes()){if(p=Math.min(!b&&p>0?p-1:p,h.childNodes.length-1),h=h.childNodes[p],p=0,!o&&h===g.lastChild&&"TABLE"===h.nodeName)return;if(l(h)||u(h))return;if(h.hasChildNodes()&&!/TABLE/.test(h.nodeName)){v=h,m=new t(h,g);do{if(c(v)||u(v)){i=!1;break}if(3===v.nodeType&&v.nodeValue.length>0){p=b?0:v.nodeValue.length,h=v,i=!0;break}if(y[v.nodeName.toLowerCase()]&&!a(v)){p=e.nodeIndex(v),h=v.parentNode,"IMG"!=v.nodeName||b||p++,i=!0;break}}while(v=b?m.next():m.prev())}}}o&&(3===h.nodeType&&0===p&&f(!0),1===h.nodeType&&(v=h.childNodes[p],v||(v=h.childNodes[p-1]),!v||"BR"!==v.nodeName||d(v,"A")||s(v)||s(v,!0)||f(!0,v))),b&&!o&&3===h.nodeType&&p===h.nodeValue.length&&f(!1),i&&n["set"+(r?"Start":"End")](h,p)}}var i,o;return o=n.collapsed,r(!0),o||r(),i&&o&&n.collapse(!0),i}}function s(t,n,r){var i,o,a;if(i=r.elementFromPoint(t,n),o=r.body.createTextRange(),i&&"HTML"!=i.tagName||(i=r.body),o.moveToElementText(i),a=e.toArray(o.getClientRects()),a=a.sort(function(e,t){return e=Math.abs(Math.max(e.top-n,e.bottom-n)),t=Math.abs(Math.max(t.top-n,t.bottom-n)),e-t}),a.length>0){n=(a[0].bottom+a[0].top)/2;try{return o.moveToPoint(t,n),o.collapse(!0),o}catch(s){}}return null}var l=e.each,c=n.isContentEditableFalse,u=i.isCaretContainer;return a.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1},a.getCaretRangeFromPoint=function(e,t,n){var r,i;if(n.caretPositionFromPoint)i=n.caretPositionFromPoint(e,t),r=n.createRange(),r.setStart(i.offsetNode,i.offset),r.collapse(!0);else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(n.body.createTextRange){r=n.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(o){r=s(e,t,n)}}return r},a.getSelectedNode=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset==n+1?t.childNodes[n]:null},a.getNode=function(e,t){return 1==e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},a}),r(R,[T,d,u],function(e,t,n){return function(r){function i(e){var t,n;if(n=r.$(e).parentsUntil(r.getBody()).add(e),n.length===a.length){for(t=n.length;t>=0&&n[t]===a[t];t--);if(-1===t)return a=n,!0}return a=n,!1}var o,a=[];"onselectionchange"in r.getDoc()||r.on("NodeChange Click MouseUp KeyUp Focus",function(t){var n,i;n=r.selection.getRng(),i={startContainer:n.startContainer,startOffset:n.startOffset,endContainer:n.endContainer,endOffset:n.endOffset},"nodechange"!=t.type&&e.compareRanges(i,o)||r.fire("SelectionChange"),o=i}),r.on("contextmenu",function(){r.fire("SelectionChange")}),r.on("SelectionChange",function(){var e=r.selection.getStart(!0);!t.range&&r.selection.isCollapsed()||!i(e)&&r.dom.isChildOf(e,r.getBody())&&r.nodeChanged({selectionChange:!0})}),r.on("MouseUp",function(e){e.isDefaultPrevented()||("IMG"==r.selection.getNode().nodeName?n.setEditorTimeout(r,function(){r.nodeChanged()}):r.nodeChanged())}),this.nodeChanged=function(e){var t=r.selection,n,i,o;r.initialized&&t&&!r.settings.disable_nodechange&&!r.readonly&&(o=r.getBody(),n=t.getStart()||o,n.ownerDocument==r.getDoc()&&r.dom.isChildOf(n,o)||(n=o),"IMG"==n.nodeName&&t.isCollapsed()&&(n=n.parentNode),i=[],r.dom.getParent(n,function(e){return e===o?!0:void i.push(e)}),e=e||{},e.element=n,e.parents=i,r.fire("NodeChange",e))}}}),r(A,[],function(){function e(e,t,n){var r,i,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(r=e[a])return r;for(i=e.parent;i&&i!==t;i=i.parent)if(r=i[a])return r}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.prototype={replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n=this,r,i,o;if("string"!=typeof e){for(i in e)n.attr(i,e[i]);return n}if(r=n.attributes){if(t!==o){if(null===t){if(e in r.map)for(delete r.map[e],i=r.length;i--;)if(r[i].name===e)return r=r.splice(i,1),n;return n}if(e in r.map){for(i=r.length;i--;)if(r[i].name===e){r[i].value=t;break}}else r.push({name:e,value:t});return r.map[e]=t,n}return r.map[e]}},clone:function(){var e=this,n=new t(e.name,e.type),r,i,o,a,s;if(o=e.attributes){for(s=[],s.map={},r=0,i=o.length;i>r;r++)a=o[r],"id"!==a.name&&(s[s.length]={name:a.name,value:a.value},s.map[a.name]=a.value);n.attributes=s}return n.value=e.value,n.shortEnded=e.shortEnded,n},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e=this,t,n;for(t=e.firstChild;t;)n=t.next,e.insert(t,e,!0),t=n;e.remove()},remove:function(){var e=this,t=e.parent,n=e.next,r=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):r.next=n,t.lastChild===e?(t.lastChild=r,r&&(r.next=null)):n.prev=r,e.parent=e.next=e.prev=null),e},append:function(e){var t=this,n;return e.parent&&e.remove(),n=t.lastChild,n?(n.next=e,e.prev=n,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e},insert:function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},getAll:function(t){var n=this,r,i=[];for(r=n.firstChild;r;r=e(r,n))r.name===t&&i.push(r);return i},empty:function(){var t=this,n,r,i;if(t.firstChild){for(n=[],i=t.firstChild;i;i=e(i,t))n.push(i);for(r=n.length;r--;)i=n[r],i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}return t.firstChild=t.lastChild=null,t},isEmpty:function(t){var r=this,i=r.firstChild,o,a;if(i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(t[i.name])return!1;for(o=i.attributes.length;o--;)if(a=i.attributes[o].name,"name"===a||0===a.indexOf("data-mce-bookmark"))return!1}if(8===i.type)return!1;if(3===i.type&&!n.test(i.value))return!1}while(i=e(i,r));return!0},walk:function(t){return e(this,null,t)}},t.create=function(e,n){var i,o;if(i=new t(e,r[e]||1),n)for(o in n)i.attr(o,n[o]);return i},t}),r(B,[m],function(e){function t(e,t){return e?e.split(t||" "):[]}function n(e){function n(e,n,r){function i(e,t){var n={},r,i;for(r=0,i=e.length;i>r;r++)n[e[r]]=t||{};return n}var s,c,u,d=arguments;for(r=r||[],n=n||"","string"==typeof r&&(r=t(r)),c=3;c<d.length;c++)"string"==typeof d[c]&&(d[c]=t(d[c])),r.push.apply(r,d[c]);for(e=t(e),s=e.length;s--;)u=[].concat(l,t(n)),a[e[s]]={attributes:i(u),attributesOrder:u,children:i(r,o)}}function r(e,n){var r,i,o,s;for(e=t(e),r=e.length,n=t(n);r--;)for(i=a[e[r]],o=0,s=n.length;s>o;o++)i.attributes[n[o]]={},i.attributesOrder.push(n[o])}var a={},l,c,u,d,f,h;return i[e]?i[e]:(l=t("id accesskey class dir lang style tabindex title"),c=t("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"),u=t("a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment"),"html4"!=e&&(l.push.apply(l,t("contenteditable contextmenu draggable dropzone hidden spellcheck translate")),c.push.apply(c,t("article aside details dialog figure header footer hgroup section nav")),u.push.apply(u,t("audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"))),"html5-strict"!=e&&(l.push("xml:lang"),h=t("acronym applet basefont big font strike tt"),u.push.apply(u,h),s(h,function(e){n(e,"",u)}),f=t("center dir isindex noframes"),c.push.apply(c,f),d=[].concat(c,u),s(f,function(e){n(e,"",d)})),d=d||[].concat(c,u),n("html","manifest","head body"),n("head","","base command link meta noscript script style title"),n("title hr noscript br"),n("base","href target"),n("link","href rel media hreflang type sizes hreflang"),n("meta","name http-equiv content charset"),n("style","media type scoped"),n("script","src async defer type charset"),n("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",d),n("address dt dd div caption","",d),n("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",u),n("blockquote","cite",d),n("ol","reversed start type","li"),n("ul","","li"),n("li","value",d),n("dl","","dt dd"),n("a","href target rel media hreflang type",u),n("q","cite",u),n("ins del","cite datetime",d),n("img","src sizes srcset alt usemap ismap width height"),n("iframe","src name width height",d),n("embed","src type width height"),n("object","data type typemustmatch name usemap form width height",d,"param"),n("param","name value"),n("map","name",d,"area"),n("area","alt coords shape href target rel media hreflang type"),n("table","border","caption colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),n("colgroup","span","col"),n("col","span"),n("tbody thead tfoot","","tr"),n("tr","","td th"),n("td","colspan rowspan headers",d),n("th","colspan rowspan headers scope abbr",d),n("form","accept-charset action autocomplete enctype method name novalidate target",d),n("fieldset","disabled form name",d,"legend"),n("label","form for",u),n("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),n("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==e?d:u),n("select","disabled form multiple name required size","option optgroup"),n("optgroup","disabled label","option"),n("option","disabled label selected value"),n("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),n("menu","type label",d,"li"),n("noscript","",d),"html4"!=e&&(n("wbr"),n("ruby","",u,"rt rp"),n("figcaption","",d),n("mark rt rp summary bdi","",u),n("canvas","width height",d),n("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",d,"track source"),n("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",d,"track source"),n("picture","","img source"),n("source","src srcset type media sizes"),n("track","kind src srclang label default"),n("datalist","",u,"option"),n("article section nav aside header footer","",d),n("hgroup","","h1 h2 h3 h4 h5 h6"),n("figure","",d,"figcaption"),n("time","datetime",u),n("dialog","open",d),n("command","type label icon disabled checked radiogroup command"),n("output","for form name",u),n("progress","value max",u),n("meter","value min max low high optimum",u),n("details","open",d,"summary"),n("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(r("script","language xml:space"),r("style","xml:space"),r("object","declare classid code codebase codetype archive standby align border hspace vspace"),r("embed","align name hspace vspace"),r("param","valuetype type"),r("a","charset name rev shape coords"),r("br","clear"),r("applet","codebase archive code object alt name width height align hspace vspace"),r("img","name longdesc align border hspace vspace"),r("iframe","longdesc frameborder marginwidth marginheight scrolling align"),r("font basefont","size color face"),r("input","usemap align"),r("select","onchange"),r("textarea"),r("h1 h2 h3 h4 h5 h6 div p legend caption","align"),r("ul","type compact"),r("li","type"),r("ol dl menu dir","compact"),r("pre","width xml:space"),r("hr","align noshade size width"),r("isindex","prompt"),r("table","summary width frame rules cellspacing cellpadding align bgcolor"),r("col","width align char charoff valign"),r("colgroup","width align char charoff valign"),r("thead","align char charoff valign"),r("tr","align char charoff valign bgcolor"),r("th","axis align char charoff valign nowrap bgcolor width height"),r("form","accept"),r("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),r("tfoot","align char charoff valign"),r("tbody","align char charoff valign"),r("area","nohref"),r("body","background bgcolor text link vlink alink")),"html4"!=e&&(r("input button select textarea","autofocus"),r("input textarea","placeholder"),r("a","download"),r("link script img","crossorigin"),r("iframe","sandbox seamless allowfullscreen")),s(t("a form meter progress dfn"),function(e){a[e]&&delete a[e].children[e]}),delete a.caption.children.table,delete a.script,i[e]=a,a)}function r(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),s(e,function(e,r){n[r]=n[r.toUpperCase()]="map"==t?a(e,/[, ]/):c(e,/[, ]/)})),n}var i={},o={},a=e.makeMap,s=e.each,l=e.extend,c=e.explode,u=e.inArray;return function(e){function o(t,n,r){var o=e[t];return o?o=a(o,/[, ]/,a(o.toUpperCase(),/[, ]/)):(o=i[t],o||(o=a(n," ",a(n.toUpperCase()," ")),o=l(o,r),i[t]=o)),o}function d(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function f(e){var n,r,i,o,s,l,c,f,h,p,m,g,v,b,x,w,N,E,_,S=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,k=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,T=/[*?+]/;if(e)for(e=t(e,","),y["@"]&&(w=y["@"].attributes,N=y["@"].attributesOrder),n=0,r=e.length;r>n;n++)if(s=S.exec(e[n])){if(b=s[1],h=s[2],x=s[3],f=s[5],g={},v=[],l={attributes:g,attributesOrder:v},"#"===b&&(l.paddEmpty=!0),"-"===b&&(l.removeEmpty=!0),"!"===s[4]&&(l.removeEmptyAttrs=!0),w){for(E in w)g[E]=w[E];v.push.apply(v,N)}if(f)for(f=t(f,"|"),i=0,o=f.length;o>i;i++)if(s=k.exec(f[i])){if(c={},m=s[1],p=s[2].replace(/::/g,":"),b=s[3],_=s[4],"!"===m&&(l.attributesRequired=l.attributesRequired||[],l.attributesRequired.push(p),c.required=!0),"-"===m){delete g[p],v.splice(u(v,p),1);continue}b&&("="===b&&(l.attributesDefault=l.attributesDefault||[],l.attributesDefault.push({name:p,value:_}),c.defaultValue=_),":"===b&&(l.attributesForced=l.attributesForced||[],l.attributesForced.push({name:p,value:_}),c.forcedValue=_),"<"===b&&(c.validValues=a(_,"?"))),T.test(p)?(l.attributePatterns=l.attributePatterns||[],c.pattern=d(p),
+l.attributePatterns.push(c)):(g[p]||v.push(p),g[p]=c)}w||"@"!=h||(w=g,N=v),x&&(l.outputName=h,y[x]=l),T.test(h)?(l.pattern=d(h),C.push(l)):y[h]=l}}function h(e){y={},C=[],f(e),s(N,function(e,t){b[t]=e.children})}function p(e){var n=/^(~)?(.+)$/;e&&(i.text_block_elements=i.block_elements=null,s(t(e,","),function(e){var t=n.exec(e),r="~"===t[1],i=r?"span":"div",o=t[2];if(b[o]=b[i],M[o]=i,r||(R[o.toUpperCase()]={},R[o]={}),!y[o]){var a=y[i];a=l({},a),delete a.removeEmptyAttrs,delete a.removeEmpty,y[o]=a}s(b,function(e,t){e[i]&&(b[t]=e=l({},b[t]),e[o]=e[i])})}))}function m(n){var r=/^([+\-]?)(\w+)\[([^\]]+)\]$/;i[e.schema]=null,n&&s(t(n,","),function(e){var n=r.exec(e),i,o;n&&(o=n[1],i=o?b[n[2]]:b[n[2]]={"#comment":{}},i=b[n[2]],s(t(n[3],"|"),function(e){"-"===o?delete i[e]:i[e]={}}))})}function g(e){var t=y[e],n;if(t)return t;for(n=C.length;n--;)if(t=C[n],t.pattern.test(e))return t}var v=this,y={},b={},C=[],x,w,N,E,_,S,k,T,R,A,B,D,L,M={},P={};e=e||{},N=n(e.schema),e.verify_html===!1&&(e.valid_elements="*[*]"),x=r(e.valid_styles),w=r(e.invalid_styles,"map"),T=r(e.valid_classes,"map"),E=o("whitespace_elements","pre script noscript style textarea video audio iframe object"),_=o("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),S=o("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),k=o("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),A=o("non_empty_elements","td th iframe video audio object script",S),B=o("move_caret_before_on_enter_elements","table",A),D=o("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),R=o("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption",D),L=o("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),s((e.special||"script noscript style textarea").split(" "),function(e){P[e]=new RegExp("</"+e+"[^>]*>","gi")}),e.valid_elements?h(e.valid_elements):(s(N,function(e,t){y[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},b[t]=e.children}),"html5"!=e.schema&&s(t("strong/b em/i"),function(e){e=t(e,"/"),y[e[1]].outputName=e[0]}),s(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){y[e]&&(y[e].removeEmpty=!0)}),s(t("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){y[e].paddEmpty=!0}),s(t("span"),function(e){y[e].removeEmptyAttrs=!0})),p(e.custom_elements),m(e.valid_children),f(e.extended_valid_elements),m("+ol[ul|ol],+ul[ul|ol]"),e.invalid_elements&&s(c(e.invalid_elements),function(e){y[e]&&delete y[e]}),g("span")||f("span[!data-mce-type|*]"),v.children=b,v.getValidStyles=function(){return x},v.getInvalidStyles=function(){return w},v.getValidClasses=function(){return T},v.getBoolAttrs=function(){return k},v.getBlockElements=function(){return R},v.getTextBlockElements=function(){return D},v.getTextInlineElements=function(){return L},v.getShortEndedElements=function(){return S},v.getSelfClosingElements=function(){return _},v.getNonEmptyElements=function(){return A},v.getMoveCaretBeforeOnEnterElements=function(){return B},v.getWhiteSpaceElements=function(){return E},v.getSpecialElements=function(){return P},v.isValidChild=function(e,t){var n=b[e];return!(!n||!n[t])},v.isValid=function(e,t){var n,r,i=g(e);if(i){if(!t)return!0;if(i.attributes[t])return!0;if(n=i.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},v.getElementRule=g,v.getCustomElements=function(){return M},v.addValidElements=f,v.setValidElements=h,v.addCustomElements=p,v.addValidChildren=m,v.elements=y}}),r(D,[B,C,m],function(e,t,n){function r(e,t,n){var r=1,i,o,a,s;for(s=e.getShortEndedElements(),a=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g,a.lastIndex=i=n;o=a.exec(t);){if(i=a.lastIndex,"/"===o[1])r--;else if(!o[1]){if(o[2]in s)continue;r++}if(0===r)break}return i}function i(i,a){function s(){}var l=this;i=i||{},l.schema=a=a||new e,i.fix_self_closing!==!1&&(i.fix_self_closing=!0),o("comment cdata text start end pi doctype".split(" "),function(e){e&&(l[e]=i[e]||s)}),l.parse=function(e){function o(e){var t,n;for(t=h.length;t--&&h[t].name!==e;);if(t>=0){for(n=h.length-1;n>=t;n--)e=h[n],e.valid&&l.end(e.name);h.length=t}}function s(e,t,n,r,o){var a,s,l=/[\s\u0000-\u001F]+/g;if(t=t.toLowerCase(),n=t in x?t:z(n||r||o||""),N&&!y&&0!==t.indexOf("data-")){if(a=T[t],!a&&R){for(s=R.length;s--&&(a=R[s],!a.pattern.test(t)););-1===s&&(a=null)}if(!a)return;if(a.validValues&&!(n in a.validValues))return}if(W[t]&&!i.allow_script_urls){var c=n.replace(l,"");try{c=decodeURIComponent(c)}catch(u){c=unescape(c)}if(V.test(c))return;if(!i.allow_html_data_urls&&$.test(c)&&!/^data:image\//i.test(c))return}p.map[t]=n,p.push({name:t,value:n})}var l=this,c,u=0,d,f,h=[],p,m,g,v,y,b,C,x,w,N,E,_,S,k,T,R,A,B,D,L,M,P,H,O,I,F=0,z=t.decode,U,W=n.makeMap("src,href,data,background,formaction,poster"),V=/((java|vb)script|mhtml):/i,$=/^data:/i;for(P=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-_\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),H=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,C=a.getShortEndedElements(),M=i.self_closing_elements||a.getSelfClosingElements(),x=a.getBoolAttrs(),N=i.validate,b=i.remove_internals,U=i.fix_self_closing,O=a.getSpecialElements();c=P.exec(e);){if(u<c.index&&l.text(z(e.substr(u,c.index-u))),d=c[6])d=d.toLowerCase(),":"===d.charAt(0)&&(d=d.substr(1)),o(d);else if(d=c[7]){if(d=d.toLowerCase(),":"===d.charAt(0)&&(d=d.substr(1)),w=d in C,U&&M[d]&&h.length>0&&h[h.length-1].name===d&&o(d),!N||(E=a.getElementRule(d))){if(_=!0,N&&(T=E.attributes,R=E.attributePatterns),(k=c[8])?(y=-1!==k.indexOf("data-mce-type"),y&&b&&(_=!1),p=[],p.map={},k.replace(H,s)):(p=[],p.map={}),N&&!y){if(A=E.attributesRequired,B=E.attributesDefault,D=E.attributesForced,L=E.removeEmptyAttrs,L&&!p.length&&(_=!1),D)for(m=D.length;m--;)S=D[m],v=S.name,I=S.value,"{$uid}"===I&&(I="mce_"+F++),p.map[v]=I,p.push({name:v,value:I});if(B)for(m=B.length;m--;)S=B[m],v=S.name,v in p.map||(I=S.value,"{$uid}"===I&&(I="mce_"+F++),p.map[v]=I,p.push({name:v,value:I}));if(A){for(m=A.length;m--&&!(A[m]in p.map););-1===m&&(_=!1)}if(S=p.map["data-mce-bogus"]){if("all"===S){u=r(a,e,P.lastIndex),P.lastIndex=u;continue}_=!1}}_&&l.start(d,p,w)}else _=!1;if(f=O[d]){f.lastIndex=u=c.index+c[0].length,(c=f.exec(e))?(_&&(g=e.substr(u,c.index-u)),u=c.index+c[0].length):(g=e.substr(u),u=e.length),_&&(g.length>0&&l.text(g,!0),l.end(d)),P.lastIndex=u;continue}w||(k&&k.indexOf("/")==k.length-1?_&&l.end(d):h.push({name:d,valid:_}))}else(d=c[1])?(">"===d.charAt(0)&&(d=" "+d),i.allow_conditional_comments||"[if"!==d.substr(0,3)||(d=" "+d),l.comment(d)):(d=c[2])?l.cdata(d):(d=c[3])?l.doctype(d):(d=c[4])&&l.pi(d,c[5]);u=c.index+c[0].length}for(u<e.length&&l.text(z(e.substr(u))),m=h.length-1;m>=0;m--)d=h[m],d.valid&&l.end(d.name)}}var o=n.each;return i.findEndTag=r,i}),r(L,[A,B,D,m],function(e,t,n,r){var i=r.makeMap,o=r.each,a=r.explode,s=r.extend;return function(r,l){function c(t){var n,r,o,a,s,c,d,f,h,p,m,g,v,y,b;for(m=i("tr,td,th,tbody,thead,tfoot,table"),p=l.getNonEmptyElements(),g=l.getTextBlockElements(),v=l.getSpecialElements(),n=0;n<t.length;n++)if(r=t[n],r.parent&&!r.fixed)if(g[r.name]&&"li"==r.parent.name){for(y=r.next;y&&g[y.name];)y.name="li",y.fixed=!0,r.parent.insert(y,r.parent),y=y.next;r.unwrap(r)}else{for(a=[r],o=r.parent;o&&!l.isValidChild(o.name,r.name)&&!m[o.name];o=o.parent)a.push(o);if(o&&a.length>1){for(a.reverse(),s=c=u.filterNode(a[0].clone()),h=0;h<a.length-1;h++){for(l.isValidChild(c.name,a[h].name)?(d=u.filterNode(a[h].clone()),c.append(d)):d=c,f=a[h].firstChild;f&&f!=a[h+1];)b=f.next,d.append(f),f=b;c=d}s.isEmpty(p)?o.insert(r,a[0],!0):(o.insert(s,a[0],!0),o.insert(r,s)),o=a[0],(o.isEmpty(p)||o.firstChild===o.lastChild&&"br"===o.firstChild.name)&&o.empty().remove()}else if(r.parent){if("li"===r.name){if(y=r.prev,y&&("ul"===y.name||"ul"===y.name)){y.append(r);continue}if(y=r.next,y&&("ul"===y.name||"ul"===y.name)){y.insert(r,y.firstChild,!0);continue}r.wrap(u.filterNode(new e("ul",1)));continue}l.isValidChild(r.parent.name,"div")&&l.isValidChild("div",r.name)?r.wrap(u.filterNode(new e("div",1))):v[r.name]?r.empty().remove():r.unwrap()}}}var u=this,d={},f=[],h={},p={};r=r||{},r.validate="validate"in r?r.validate:!0,r.root_name=r.root_name||"body",u.schema=l=l||new t,u.filterNode=function(e){var t,n,r;n in d&&(r=h[n],r?r.push(e):h[n]=[e]),t=f.length;for(;t--;)n=f[t].name,n in e.attributes.map&&(r=p[n],r?r.push(e):p[n]=[e]);return e},u.addNodeFilter=function(e,t){o(a(e),function(e){var n=d[e];n||(d[e]=n=[]),n.push(t)})},u.addAttributeFilter=function(e,t){o(a(e),function(e){var n;for(n=0;n<f.length;n++)if(f[n].name===e)return void f[n].callbacks.push(t);f.push({name:e,callbacks:[t]})})},u.parse=function(t,o){function a(){function e(e){e&&(t=e.firstChild,t&&3==t.type&&(t.value=t.value.replace(R,"")),t=e.lastChild,t&&3==t.type&&(t.value=t.value.replace(D,"")))}var t=y.firstChild,n,i;if(l.isValidChild(y.name,I.toLowerCase())){for(;t;)n=t.next,3==t.type||1==t.type&&"p"!==t.name&&!T[t.name]&&!t.attr("data-mce-type")?i?i.append(t):(i=u(I,1),i.attr(r.forced_root_block_attrs),y.insert(i,t),i.append(t)):(e(i),i=null),t=n;e(i)}}function u(t,n){var r=new e(t,n),i;return t in d&&(i=h[t],i?i.push(r):h[t]=[r]),r}function m(e){var t,n,r,i,o=l.getBlockElements();for(t=e.prev;t&&3===t.type;){if(r=t.value.replace(D,""),r.length>0)return void(t.value=r);if(n=t.next){if(3==n.type&&n.value.length){t=t.prev;continue}if(!o[n.name]&&"script"!=n.name&&"style"!=n.name){t=t.prev;continue}}i=t.prev,t.remove(),t=i}}function g(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}var v,y,b,C,x,w,N,E,_,S,k,T,R,A=[],B,D,L,M,P,H,O,I;if(o=o||{},h={},p={},T=s(i("script,style,head,html,body,title,meta,param"),l.getBlockElements()),O=l.getNonEmptyElements(),H=l.children,k=r.validate,I="forced_root_block"in o?o.forced_root_block:r.forced_root_block,P=l.getWhiteSpaceElements(),R=/^[ \t\r\n]+/,D=/[ \t\r\n]+$/,L=/[ \t\r\n]+/g,M=/^[ \t\r\n]+$/,v=new n({validate:k,allow_script_urls:r.allow_script_urls,allow_conditional_comments:r.allow_conditional_comments,self_closing_elements:g(l.getSelfClosingElements()),cdata:function(e){b.append(u("#cdata",4)).value=e},text:function(e,t){var n;B||(e=e.replace(L," "),b.lastChild&&T[b.lastChild.name]&&(e=e.replace(R,""))),0!==e.length&&(n=u("#text",3),n.raw=!!t,b.append(n).value=e)},comment:function(e){b.append(u("#comment",8)).value=e},pi:function(e,t){b.append(u(e,7)).value=t,m(b)},doctype:function(e){var t;t=b.append(u("#doctype",10)),t.value=e,m(b)},start:function(e,t,n){var r,i,o,a,s;if(o=k?l.getElementRule(e):{}){for(r=u(o.outputName||e,1),r.attributes=t,r.shortEnded=n,b.append(r),s=H[b.name],s&&H[r.name]&&!s[r.name]&&A.push(r),i=f.length;i--;)a=f[i].name,a in t.map&&(_=p[a],_?_.push(r):p[a]=[r]);T[e]&&m(r),n||(b=r),!B&&P[e]&&(B=!0)}},end:function(t){var n,r,i,o,a;if(r=k?l.getElementRule(t):{}){if(T[t]&&!B){if(n=b.firstChild,n&&3===n.type)if(i=n.value.replace(R,""),i.length>0)n.value=i,n=n.next;else for(o=n.next,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.next,(0===i.length||M.test(i))&&(n.remove(),n=o),n=o;if(n=b.lastChild,n&&3===n.type)if(i=n.value.replace(D,""),i.length>0)n.value=i,n=n.prev;else for(o=n.prev,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.prev,(0===i.length||M.test(i))&&(n.remove(),n=o),n=o}if(B&&P[t]&&(B=!1),(r.removeEmpty||r.paddEmpty)&&b.isEmpty(O))if(r.paddEmpty)b.empty().append(new e("#text","3")).value="\xa0";else if(!b.attributes.map.name&&!b.attributes.map.id)return a=b.parent,T[b.name]?b.empty().remove():b.unwrap(),void(b=a);b=b.parent}}},l),y=b=new e(o.context||r.root_name,11),v.parse(t),k&&A.length&&(o.context?o.invalid=!0:c(A)),I&&("body"==y.name||o.isRootContent)&&a(),!o.invalid){for(S in h){for(_=d[S],C=h[S],N=C.length;N--;)C[N].parent||C.splice(N,1);for(x=0,w=_.length;w>x;x++)_[x](C,S,o)}for(x=0,w=f.length;w>x;x++)if(_=f[x],_.name in p){for(C=p[_.name],N=C.length;N--;)C[N].parent||C.splice(N,1);for(N=0,E=_.callbacks.length;E>N;N++)_.callbacks[N](C,_.name,o)}}return y},r.remove_trailing_brs&&u.addNodeFilter("br",function(t){var n,r=t.length,i,o=s({},l.getBlockElements()),a=l.getNonEmptyElements(),c,u,d,f,h,p;for(o.body=1,n=0;r>n;n++)if(i=t[n],c=i.parent,o[i.parent.name]&&i===c.lastChild){for(d=i.prev;d;){if(f=d.name,"span"!==f||"bookmark"!==d.attr("data-mce-type")){if("br"!==f)break;if("br"===f){i=null;break}}d=d.prev}i&&(i.remove(),c.isEmpty(a)&&(h=l.getElementRule(c.name),h&&(h.removeEmpty?c.remove():h.paddEmpty&&(c.empty().append(new e("#text",3)).value="\xa0"))))}else{for(u=i;c&&c.firstChild===u&&c.lastChild===u&&(u=c,!o[c.name]);)c=c.parent;u===c&&(p=new e("#text",3),p.value="\xa0",i.replace(p))}}),r.allow_html_in_named_anchor||u.addAttributeFilter("id,name",function(e){for(var t=e.length,n,r,i,o;t--;)if(o=e[t],"a"===o.name&&o.firstChild&&!o.attr("href")){i=o.parent,n=o.lastChild;do r=n.prev,i.insert(n,o),n=r;while(n)}}),r.validate&&l.getValidClasses()&&u.addAttributeFilter("class",function(e){for(var t=e.length,n,r,i,o,a,s=l.getValidClasses(),c,u;t--;){for(n=e[t],r=n.attr("class").split(" "),a="",i=0;i<r.length;i++)o=r[i],u=!1,c=s["*"],c&&c[o]&&(u=!0),c=s[n.name],!u&&c&&c[o]&&(u=!0),u&&(a&&(a+=" "),a+=o);a.length||(a=null),n.attr("class",a)}})}}),r(M,[C,m],function(e,t){var n=t.makeMap;return function(t){var r=[],i,o,a,s,l;return t=t||{},i=t.indent,o=n(t.indent_before||""),a=n(t.indent_after||""),s=e.getEncodeFunc(t.entity_encoding||"raw",t.entities),l="html"==t.element_format,{start:function(e,t,n){var c,u,d,f;if(i&&o[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n")),r.push("<",e),t)for(c=0,u=t.length;u>c;c++)d=t[c],r.push(" ",d.name,'="',s(d.value,!0),'"');!n||l?r[r.length]=">":r[r.length]=" />",n&&i&&a[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n"))},end:function(e){var t;r.push("</",e,">"),i&&a[e]&&r.length>0&&(t=r[r.length-1],t.length>0&&"\n"!==t&&r.push("\n"))},text:function(e,t){e.length>0&&(r[r.length]=t?e:s(e))},cdata:function(e){r.push("<![CDATA[",e,"]]>")},comment:function(e){r.push("<!--",e,"-->")},pi:function(e,t){t?r.push("<?",e," ",s(t),"?>"):r.push("<?",e,"?>"),i&&r.push("\n")},doctype:function(e){r.push("<!DOCTYPE",e,">",i?"\n":"")},reset:function(){r.length=0},getContent:function(){return r.join("").replace(/\n$/,"")}}}}),r(P,[M,B],function(e,t){return function(n,r){var i=this,o=new e(n);n=n||{},n.validate="validate"in n?n.validate:!0,i.schema=r=r||new t,i.writer=o,i.serialize=function(e){function t(e){var n=i[e.type],s,l,c,u,d,f,h,p,m;if(n)n(e);else{if(s=e.name,l=e.shortEnded,c=e.attributes,a&&c&&c.length>1&&(f=[],f.map={},m=r.getElementRule(e.name))){for(h=0,p=m.attributesOrder.length;p>h;h++)u=m.attributesOrder[h],u in c.map&&(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));for(h=0,p=c.length;p>h;h++)u=c[h].name,u in f.map||(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));c=f}if(o.start(e.name,c,l),!l){if(e=e.firstChild)do t(e);while(e=e.next);o.end(s)}}}var i,a;return a=n.validate,i={3:function(e){o.text(e.value,e.raw)},8:function(e){o.comment(e.value)},7:function(e){o.pi(e.name,e.value)},10:function(e){o.doctype(e.value)},4:function(e){o.cdata(e.value)},11:function(e){if(e=e.firstChild)do t(e);while(e=e.next)}},o.reset(),1!=e.type||n.inner?i[11](e):t(e),o.getContent()}}}),r(H,[w,L,D,C,P,A,B,d,m,S],function(e,t,n,r,i,o,a,s,l,c){function u(e){function t(e){return e&&"br"===e.name}var n,r;n=e.lastChild,t(n)&&(r=n.prev,t(r)&&(n.remove(),r.remove()))}var d=l.each,f=l.trim,h=e.DOM,p=["data-mce-selected"];return function(e,o){function m(e){var t=new RegExp(["<span[^>]+data-mce-bogus[^>]+>[\u200b\ufeff]+<\\/span>","\\s?("+p.join("|")+')="[^"]+"'].join("|"),"gi");return e=c.trim(e.replace(t,""))}function g(){var e=o.getBody().innerHTML,t=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,r,i,a,s,l,c=o.schema;for(e=m(e),l=c.getShortEndedElements();s=t.exec(e);)i=t.lastIndex,a=s[0].length,r=l[s[1]]?i:n.findEndTag(c,e,i),e=e.substring(0,i-a)+e.substring(r),t.lastIndex=i-a;return f(e)}function v(e){-1===l.inArray(p,e)&&(C.addAttributeFilter(e,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),p.push(e))}var y,b,C;return o&&(y=o.dom,b=o.schema),y=y||h,b=b||new a(e),e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs="remove_trailing_brs"in e?e.remove_trailing_brs:!0,C=new t(e,b),C.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n=e.length,r;n--;)r=e[n],r.attr("tabindex",r.attributes.map["data-mce-tabindex"]),r.attr(t,null)}),C.addAttributeFilter("src,href,style",function(t,n){for(var r=t.length,i,o,a="data-mce-"+n,s=e.url_converter,l=e.url_converter_scope,c;r--;)i=t[r],o=i.attributes.map[a],o!==c?(i.attr(n,o.length>0?o:null),i.attr(a,null)):(o=i.attributes.map[n],"style"===n?o=y.serializeStyle(y.parseStyle(o),i.name):s&&(o=s.call(l,o,n,i.name)),i.attr(n,o.length>0?o:null))}),C.addAttributeFilter("class",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("class"),r&&(r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null))}),C.addAttributeFilter("data-mce-type",function(e,t,n){for(var r=e.length,i;r--;)i=e[r],"bookmark"!==i.attributes.map["data-mce-type"]||n.cleanup||i.remove()}),C.addNodeFilter("noscript",function(e){for(var t=e.length,n;t--;)n=e[t].firstChild,n&&(n.value=r.decode(n.value))}),C.addNodeFilter("script,style",function(e,t){function n(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var r=e.length,i,o,a;r--;)i=e[r],o=i.firstChild?i.firstChild.value:"","script"===t?(a=i.attr("type"),a&&i.attr("type","mce-no/type"==a?null:a.replace(/^mce\-/,"")),o.length>0&&(i.firstChild.value="// <![CDATA[\n"+n(o)+"\n// ]]>")):o.length>0&&(i.firstChild.value="<!--\n"+n(o)+"\n-->")}),C.addNodeFilter("#comment",function(e){for(var t=e.length,n;t--;)n=e[t],0===n.value.indexOf("[CDATA[")?(n.name="#cdata",n.type=4,n.value=n.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===n.value.indexOf("mce:protected ")&&(n.name="#text",n.type=3,n.raw=!0,n.value=unescape(n.value).substr(14))}),C.addNodeFilter("xml:namespace,input",function(e,t){for(var n=e.length,r;n--;)r=e[n],7===r.type?r.remove():1===r.type&&("input"!==t||"type"in r.attributes.map||r.attr("type","text"))}),e.fix_list_elements&&C.addNodeFilter("ul,ol",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.parent,"ul"!==r.name&&"ol"!==r.name||n.prev&&"li"===n.prev.name&&n.prev.append(n)}),C.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:b,addNodeFilter:C.addNodeFilter,addAttributeFilter:C.addAttributeFilter,serialize:function(t,n){var r=this,o,a,l,h,p,m;return s.ie&&y.select("script,style,select,map").length>0?(p=t.innerHTML,t=t.cloneNode(!1),y.setHTML(t,p)):t=t.cloneNode(!0),o=t.ownerDocument.implementation,o.createHTMLDocument&&(a=o.createHTMLDocument(""),d("BODY"==t.nodeName?t.childNodes:[t],function(e){a.body.appendChild(a.importNode(e,!0))}),t="BODY"!=t.nodeName?a.body.firstChild:a.body,l=y.doc,y.doc=a),n=n||{},n.format=n.format||"html",n.selection&&(n.forced_root_block=""),n.no_events||(n.node=t,r.onPreProcess(n)),m=C.parse(f(n.getInner?t.innerHTML:y.getOuterHTML(t)),n),u(m),h=new i(e,b),n.content=h.serialize(m),n.cleanup||(n.content=c.trim(n.content),n.content=n.content.replace(/\uFEFF/g,"")),n.no_events||r.onPostProcess(n),l&&(y.doc=l),n.node=null,n.content},addRules:function(e){b.addValidElements(e)},setRules:function(e){b.setValidElements(e)},onPreProcess:function(e){o&&o.fire("PreProcess",e)},onPostProcess:function(e){o&&o.fire("PostProcess",e)},addTempAttr:v,trimHtml:m,getTrimmedContent:g}}}),r(O,[],function(){function e(e){function t(t,n){var r,i=0,o,a,s,l,c,u,d=-1,f;if(r=t.duplicate(),r.collapse(n),f=r.parentElement(),f.ownerDocument===e.dom.doc){for(;"false"===f.contentEditable;)f=f.parentNode;if(!f.hasChildNodes())return{node:f,inside:1};for(s=f.children,o=s.length-1;o>=i;)if(u=Math.floor((i+o)/2),l=s[u],r.moveToElementText(l),d=r.compareEndPoints(n?"StartToStart":"EndToEnd",t),d>0)o=u-1;else{if(!(0>d))return{node:l};i=u+1}if(0>d)for(l?r.collapse(!1):(r.moveToElementText(f),r.collapse(!0),l=f,a=!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",1)&&f==r.parentElement();)c++;else for(r.collapse(!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",-1)&&f==r.parentElement();)c++;return{node:l,position:d,offset:c,inside:a}}}function n(){function n(e){var n=t(o,e),r,i,s=0,l,c,u;if(r=n.node,i=n.offset,n.inside&&!r.hasChildNodes())return void a[e?"setStart":"setEnd"](r,0);if(i===c)return void a[e?"setStartBefore":"setEndAfter"](r);if(n.position<0){if(l=n.inside?r.firstChild:r.nextSibling,!l)return void a[e?"setStartAfter":"setEndAfter"](r);if(!i)return void(3==l.nodeType?a[e?"setStart":"setEnd"](l,0):a[e?"setStartBefore":"setEndBefore"](l));for(;l;){if(3==l.nodeType&&(u=l.nodeValue,s+=u.length,s>=i)){r=l,s-=i,s=u.length-s;break}l=l.nextSibling}}else{if(l=r.previousSibling,!l)return a[e?"setStartBefore":"setEndBefore"](r);if(!i)return void(3==r.nodeType?a[e?"setStart":"setEnd"](l,r.nodeValue.length):a[e?"setStartAfter":"setEndAfter"](l));for(;l;){if(3==l.nodeType&&(s+=l.nodeValue.length,s>=i)){r=l,s-=i;break}l=l.previousSibling}}a[e?"setStart":"setEnd"](r,s)}var o=e.getRng(),a=i.createRng(),s,l,c,u,d;if(s=o.item?o.item(0):o.parentElement(),s.ownerDocument!=i.doc)return a;if(l=e.isCollapsed(),o.item)return a.setStart(s.parentNode,i.nodeIndex(s)),a.setEnd(a.startContainer,a.startOffset+1),a;try{n(!0),l||n()}catch(f){if(-2147024809!=f.number)throw f;d=r.getBookmark(2),c=o.duplicate(),c.collapse(!0),s=c.parentElement(),l||(c=o.duplicate(),c.collapse(!1),u=c.parentElement(),u.innerHTML=u.innerHTML),s.innerHTML=s.innerHTML,r.moveToBookmark(d),o=e.getRng(),n(!0),l||n()}return a}var r=this,i=e.dom,o=!1;this.getBookmark=function(n){function r(e){var t,n,r,o,a=[];for(t=e.parentNode,n=i.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(r=t.children,o=r.length;o--;)if(e===r[o]){a.push(o);break}e=t,t=t.parentNode}return a}function o(e){var n;return n=t(a,e),n?{position:n.position,offset:n.offset,indexes:r(n.node),inside:n.inside}:void 0}var a=e.getRng(),s={};return 2===n&&(a.item?s.start={ctrl:!0,indexes:r(a.item(0))}:(s.start=o(!0),e.isCollapsed()||(s.end=o()))),s},this.moveToBookmark=function(e){function t(e){var t,n,r,o;for(t=i.getRoot(),n=e.length-1;n>=0;n--)o=t.children,r=e[n],r<=o.length-1&&(t=o[r]);return t}function n(n){var i=e[n?"start":"end"],a,s,l,c;i&&(a=i.position>0,s=o.createTextRange(),s.moveToElementText(t(i.indexes)),c=i.offset,c!==l?(s.collapse(i.inside||a),s.moveStart("character",a?-c:c)):s.collapse(n),r.setEndPoint(n?"StartToStart":"EndToStart",s),n&&r.collapse(!0))}var r,o=i.doc.body;e.start&&(e.start.ctrl?(r=o.createControlRange(),r.addElement(t(e.start.indexes)),r.select()):(r=o.createTextRange(),n(!0),n(),r.select()))},this.addRange=function(t){function n(e){var t,n,a,d,p;a=i.create("a"),t=e?s:c,n=e?l:u,d=r.duplicate(),t!=f&&t!=f.documentElement||(t=h,n=0),3==t.nodeType?(t.parentNode.insertBefore(a,t),d.moveToElementText(a),d.moveStart("character",n),i.remove(a),r.setEndPoint(e?"StartToStart":"EndToEnd",d)):(p=t.childNodes,p.length?(n>=p.length?i.insertAfter(a,p[p.length-1]):t.insertBefore(a,p[n]),d.moveToElementText(a)):t.canHaveHTML&&(t.innerHTML="<span>&#xFEFF;</span>",a=t.firstChild,d.moveToElementText(a),d.collapse(o)),r.setEndPoint(e?"StartToStart":"EndToEnd",d),i.remove(a))}var r,a,s,l,c,u,d,f=e.dom.doc,h=f.body,p,m;if(s=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset,r=h.createTextRange(),s==c&&1==s.nodeType){if(l==u&&!s.hasChildNodes()){if(s.canHaveHTML)return d=s.previousSibling,d&&!d.hasChildNodes()&&i.isBlock(d)?d.innerHTML="&#xFEFF;":d=null,s.innerHTML="<span>&#xFEFF;</span><span>&#xFEFF;</span>",r.moveToElementText(s.lastChild),r.select(),i.doc.selection.clear(),s.innerHTML="",void(d&&(d.innerHTML=""));l=i.nodeIndex(s),s=s.parentNode}if(l==u-1)try{if(m=s.childNodes[l],a=h.createControlRange(),a.addElement(m),a.select(),p=e.getRng(),p.item&&m===p.item(0))return}catch(g){}}n(!0),n(),r.select()},this.getRangeAt=n}return e}),r(I,[d],function(e){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(t){return e.mac?t.metaKey:t.ctrlKey&&!t.altKey}}}),r(F,[I,m,u,d,_],function(e,t,n,r,i){function o(e,t){for(;t&&t!=e;){if(s(t)||a(t))return t;t=t.parentNode}return null}var a=i.isContentEditableFalse,s=i.isContentEditableTrue;return function(i,s){function l(e){var t=s.settings.object_resizing;return t===!1||r.iOS?!1:("string"!=typeof t&&(t="table,img,div"),"false"===e.getAttribute("data-mce-resize")?!1:e==s.getBody()?!1:s.dom.is(e,t))}function c(t){var n,r,i,o,a;n=t.screenX-L,r=t.screenY-M,U=n*B[2]+O,W=r*B[3]+I,U=5>U?5:U,W=5>W?5:W,i="IMG"==k.nodeName&&s.settings.resize_img_proportional!==!1?!e.modifierPressed(t):e.modifierPressed(t)||"IMG"==k.nodeName&&B[2]*B[3]!==0,i&&(j(n)>j(r)?(W=Y(U*F),U=Y(W/F)):(U=Y(W/F),W=Y(U*F))),_.setStyles(T,{width:U,height:W}),o=B.startPos.x+n,a=B.startPos.y+r,o=o>0?o:0,a=a>0?a:0,_.setStyles(R,{left:o,top:a,display:"block"}),R.innerHTML=U+" &times; "+W,B[2]<0&&T.clientWidth<=U&&_.setStyle(T,"left",P+(O-U)),B[3]<0&&T.clientHeight<=W&&_.setStyle(T,"top",H+(I-W)),n=X.scrollWidth-K,r=X.scrollHeight-G,n+r!==0&&_.setStyles(R,{left:o-n,top:a-r}),z||(s.fire("ObjectResizeStart",{target:k,width:O,height:I}),z=!0)}function u(){function e(e,t){t&&(k.style[e]||!s.schema.isValid(k.nodeName.toLowerCase(),e)?_.setStyle(k,e,t):_.setAttrib(k,e,t))}z=!1,e("width",U),e("height",W),_.unbind(V,"mousemove",c),_.unbind(V,"mouseup",u),$!=V&&(_.unbind($,"mousemove",c),_.unbind($,"mouseup",u)),_.remove(T),_.remove(R),q&&"TABLE"!=k.nodeName||d(k),s.fire("ObjectResized",{target:k,width:U,height:W}),_.setAttrib(k,"style",_.getAttrib(k,"style")),s.nodeChanged()}function d(e,t,n){var i,o,a,d,h;f(),x(),i=_.getPos(e,X),P=i.x,H=i.y,h=e.getBoundingClientRect(),o=h.width||h.right-h.left,a=h.height||h.bottom-h.top,k!=e&&(C(),k=e,U=W=0),d=s.fire("ObjectSelected",{target:e}),l(e)&&!d.isDefaultPrevented()?S(A,function(e,i){function s(t){L=t.screenX,M=t.screenY,O=k.clientWidth,I=k.clientHeight,F=I/O,B=e,e.startPos={x:o*e[0]+P,y:a*e[1]+H},K=X.scrollWidth,G=X.scrollHeight,T=k.cloneNode(!0),_.addClass(T,"mce-clonedresizable"),_.setAttrib(T,"data-mce-bogus","all"),T.contentEditable=!1,T.unSelectabe=!0,_.setStyles(T,{left:P,top:H,margin:0}),T.removeAttribute("data-mce-selected"),X.appendChild(T),_.bind(V,"mousemove",c),_.bind(V,"mouseup",u),$!=V&&(_.bind($,"mousemove",c),_.bind($,"mouseup",u)),R=_.add(X,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},O+" &times; "+I)}var l;return t?void(i==t&&s(n)):(l=_.get("mceResizeHandle"+i),l&&_.remove(l),l=_.add(X,"div",{id:"mceResizeHandle"+i,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+i+"-resize; margin:0; padding:0"}),r.ie&&(l.contentEditable=!1),_.bind(l,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),s(e)}),e.elm=l,void _.setStyles(l,{left:o*e[0]+P-l.offsetWidth/2,top:a*e[1]+H-l.offsetHeight/2}))}):f(),k.setAttribute("data-mce-selected","1")}function f(){var e,t;x(),k&&k.removeAttribute("data-mce-selected");for(e in A)t=_.get("mceResizeHandle"+e),t&&(_.unbind(t),_.remove(t))}function h(e){function t(e,t){if(e)do if(e===t)return!0;while(e=e.parentNode)}var n,r;if(!z&&!s.removed)return S(_.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),r="mousedown"==e.type?e.target:i.getNode(),r=_.$(r).closest(q?"table":"table,img,hr")[0],t(r,X)&&(w(),n=i.getStart(!0),t(n,r)&&t(i.getEnd(!0),r)&&(!q||r!=n&&"IMG"!==n.nodeName))?void d(r):void f()}function p(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function m(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function g(e){var t=e.srcElement,n,r,i,o,a,l,c;n=t.getBoundingClientRect(),l=D.clientX-n.left,c=D.clientY-n.top;for(r in A)if(i=A[r],o=t.offsetWidth*i[0],a=t.offsetHeight*i[1],j(o-l)<8&&j(a-c)<8){B=i;break}z=!0,s.fire("ObjectResizeStart",{target:k,width:k.clientWidth,height:k.clientHeight}),s.getDoc().selection.empty(),d(t,r,D)}function v(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function y(e){return a(o(s.getBody(),e))}function b(e){var t=e.srcElement;if(y(t))return void v(e);if(t!=k){if(s.fire("ObjectSelected",{target:t}),C(),0===t.id.indexOf("mceResizeHandle"))return void(e.returnValue=!1);"IMG"!=t.nodeName&&"TABLE"!=t.nodeName||(f(),k=t,p(t,"resizestart",g))}}function C(){m(k,"resizestart",g)}function x(){for(var e in A){var t=A[e];t.elm&&(_.unbind(t.elm),delete t.elm)}}function w(){try{s.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}}function N(e){var t;if(q){t=V.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(n){}}}function E(){k=T=null,q&&(C(),m(X,"controlselect",b))}var _=s.dom,S=t.each,k,T,R,A,B,D,L,M,P,H,O,I,F,z,U,W,V=s.getDoc(),$=document,q=r.ie&&r.ie<11,j=Math.abs,Y=Math.round,X=s.getBody(),K,G;A={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var J=".mce-content-body";return s.contentStyles.push(J+" div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: box-sizing;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+J+" .mce-resizehandle:hover {background: #000}"+J+" img[data-mce-selected],"+J+" hr[data-mce-selected] {outline: 1px solid black;resize: none}"+J+" .mce-clonedresizable {position: absolute;"+(r.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+J+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}"),s.on("init",function(){q?(s.on("ObjectResized",function(e){"TABLE"!=e.target.nodeName&&(f(),N(e.target))}),p(X,"controlselect",b),s.on("mousedown",function(e){D=e})):(w(),r.ie>=11&&(s.on("mousedown click",function(e){var t=e.target,n=t.nodeName;z||!/^(TABLE|IMG|HR)$/.test(n)||y(t)||(s.selection.select(t,"TABLE"==n),"mousedown"==e.type&&s.nodeChanged())}),s.dom.bind(X,"mscontrolselect",function(e){function t(e){n.setEditorTimeout(s,function(){s.selection.select(e)})}return y(e.target)?(e.preventDefault(),void t(e.target)):void(/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"==e.target.tagName&&t(e.target)))})));var e=n.throttle(function(e){s.composing||h(e)});s.on("nodechange ResizeEditor ResizeWindow drop",e),s.on("keyup compositionend",function(t){k&&"TABLE"==k.nodeName&&e(t)}),s.on("hide blur",f)}),s.on("remove",x),{isResizable:l,showResizeRect:d,hideResizeRect:f,updateResizeRect:h,controlSelect:N,destroy:E}}}),r(z,[],function(){function e(e){return function(){return e}}function t(e){return function(t){return!e(t)}}function n(e,t){return function(n){return e(t(n))}}function r(){var e=a.call(arguments);return function(t){for(var n=0;n<e.length;n++)if(e[n](t))return!0;return!1}}function i(){var e=a.call(arguments);return function(t){for(var n=0;n<e.length;n++)if(!e[n](t))return!1;
+return!0}}function o(e){var t=a.call(arguments);return t.length-1>=e.length?e.apply(this,t.slice(1)):function(){var e=t.concat([].slice.call(arguments));return o.apply(this,e)}}var a=[].slice;return{constant:e,negate:t,and:i,or:r,curry:o,compose:n}}),r(U,[_,p,k],function(e,t,n){function r(e){return m(e)?!1:d(e)?!f(e.parentNode):h(e)||u(e)||p(e)||c(e)}function i(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode){if(c(e))return!1;if(l(e))return!0}return!0}function o(e){return c(e)?t.reduce(e.getElementsByTagName("*"),function(e,t){return e||l(t)},!1)!==!0:!1}function a(e){return h(e)||o(e)}function s(e,t){return r(e)&&i(e,t)}var l=e.isContentEditableTrue,c=e.isContentEditableFalse,u=e.isBr,d=e.isText,f=e.matchNodeNames("script style textarea"),h=e.matchNodeNames("img input textarea hr iframe video audio object"),p=e.matchNodeNames("table"),m=n.isCaretContainer;return{isCaretCandidate:r,isInEditable:i,isAtomic:a,isEditableCaretCandidate:s}}),r(W,[],function(){function e(e){return e?{left:u(e.left),top:u(e.top),bottom:u(e.bottom),right:u(e.right),width:u(e.width),height:u(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}}function t(t,n){return t=e(t),n?t.right=t.left:(t.left=t.left+t.width,t.right=t.left),t.width=0,t}function n(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right}function r(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2}function i(e,t){return e.bottom<t.top?!0:e.top>t.bottom?!1:r(t.top-e.bottom,e,t)}function o(e,t){return e.top>t.bottom?!0:e.bottom<t.top?!1:r(t.bottom-e.top,e,t)}function a(e,t){return e.left<t.left}function s(e,t){return e.right>t.right}function l(e,t){return i(e,t)?-1:o(e,t)?1:a(e,t)?-1:s(e,t)?1:0}function c(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}var u=Math.round;return{clone:e,collapse:t,isEqual:n,isAbove:i,isBelow:o,isLeft:a,isRight:s,compare:l,containsXY:c}}),r(V,[],function(){function e(e){return"string"==typeof e&&e.charCodeAt(0)>=768&&t.test(e)}var t=new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]");return{isExtendingChar:e}}),r($,[z,_,w,T,U,W,V],function(e,t,n,r,i,o,a){function s(e){return"createRange"in e?e.createRange():n.DOM.createRng()}function l(e){return e&&/[\r\n\t ]/.test(e)}function c(e){var t=e.startContainer,n=e.startOffset,r;return!!(l(e.toString())&&v(t.parentNode)&&(r=t.data,l(r[n-1])||l(r[n+1])))}function u(e){function t(e){var t=e.ownerDocument,n=s(t),r=t.createTextNode("\xa0"),i=e.parentNode,a;return i.insertBefore(r,e),n.setStart(r,0),n.setEnd(r,1),a=o.clone(n.getBoundingClientRect()),i.removeChild(r),a}function n(e){var n,r;return r=e.getClientRects(),n=r.length>0?o.clone(r[0]):o.clone(e.getBoundingClientRect()),b(e)&&0===n.left?t(e):n}function r(e,t){return e=o.collapse(e,t),e.width=1,e.right=e.left+1,e}function i(e){0!==e.height&&(u.length>0&&o.isEqual(e,u[u.length-1])||u.push(e))}function l(e,t){var o=s(e.ownerDocument);if(t<e.data.length){if(a.isExtendingChar(e.data[t]))return u;if(a.isExtendingChar(e.data[t-1])&&(o.setStart(e,t),o.setEnd(e,t+1),!c(o)))return i(r(n(o),!1)),u}t>0&&(o.setStart(e,t-1),o.setEnd(e,t),c(o)||i(r(n(o),!1))),t<e.data.length&&(o.setStart(e,t),o.setEnd(e,t+1),c(o)||i(r(n(o),!0)))}var u=[],d,h;if(y(e.container()))return l(e.container(),e.offset()),u;if(f(e.container()))if(e.isAtEnd())h=x(e.container(),e.offset()),y(h)&&l(h,h.data.length),g(h)&&!b(h)&&i(r(n(h),!1));else{if(h=x(e.container(),e.offset()),y(h)&&l(h,0),g(h)&&e.isAtEnd())return i(r(n(h),!1)),u;d=x(e.container(),e.offset()-1),g(d)&&!b(d)&&(p(d)||p(h)||!g(h))&&i(r(n(d),!1)),g(h)&&i(r(n(h),!0))}return u}function d(t,n,r){function i(){return y(t)?0===n:0===n}function o(){return y(t)?n>=t.data.length:n>=t.childNodes.length}function a(){var e;return e=s(t.ownerDocument),e.setStart(t,n),e.setEnd(t,n),e}function l(){return r||(r=u(new d(t,n))),r}function c(){return l().length>0}function f(e){return e&&t===e.container()&&n===e.offset()}function h(e){return x(t,e?n-1:n)}return{container:e.constant(t),offset:e.constant(n),toRange:a,getClientRects:l,isVisible:c,isAtStart:i,isAtEnd:o,isEqual:f,getNode:h}}var f=t.isElement,h=i.isCaretCandidate,p=t.matchStyleValues("display","block table"),m=t.matchStyleValues("float","left right"),g=e.and(f,h,e.negate(m)),v=e.negate(t.matchStyleValues("white-space","pre pre-line pre-wrap")),y=t.isText,b=t.isBr,C=n.nodeIndex,x=r.getNode;return d.fromRangeStart=function(e){return new d(e.startContainer,e.startOffset)},d.fromRangeEnd=function(e){return new d(e.endContainer,e.endOffset)},d.after=function(e){return new d(e.parentNode,C(e)+1)},d.before=function(e){return new d(e.parentNode,C(e))},d}),r(q,[_,w,z,p,$],function(e,t,n,r,i){function o(e){var t=e.parentNode;return v(t)?o(t):t}function a(e){return e?r.reduce(e.childNodes,function(e,t){return v(t)&&"BR"!=t.nodeName?e=e.concat(a(t)):e.push(t),e},[]):[]}function s(e,t){for(;(e=e.previousSibling)&&g(e);)t+=e.data.length;return t}function l(e){return function(t){return e===t}}function c(t){var n,i,s;return n=a(o(t)),i=r.findIndex(n,l(t),t),n=n.slice(0,i+1),s=r.reduce(n,function(e,t,r){return g(t)&&g(n[r-1])&&e++,e},0),n=r.filter(n,e.matchNodeNames(t.nodeName)),i=r.findIndex(n,l(t),t),i-s}function u(e){var t;return t=g(e)?"text()":e.nodeName.toLowerCase(),t+"["+c(e)+"]"}function d(e,t,n){var r=[];for(t=t.parentNode;t!=e&&(!n||!n(t));t=t.parentNode)r.push(t);return r}function f(t,i){var o,a,l=[],c,f,h;return o=i.container(),a=i.offset(),g(o)?c=s(o,a):(f=o.childNodes,a>=f.length?(c="after",a=f.length-1):c="before",o=f[a]),l.push(u(o)),h=d(t,o),h=r.filter(h,n.negate(e.isBogus)),l=l.concat(r.map(h,function(e){return u(e)})),l.reverse().join("/")+","+c}function h(t,n,i){var o=a(t);return o=r.filter(o,function(e,t){return!g(e)||!g(o[t-1])}),o=r.filter(o,e.matchNodeNames(n)),o[i]}function p(e,t){for(var n=e,r=0,o;g(n);){if(o=n.data.length,t>=r&&r+o>=t){e=n,t-=r;break}if(!g(n.nextSibling)){e=n,t=o;break}r+=o,n=n.nextSibling}return t>e.data.length&&(t=e.data.length),new i(e,t)}function m(e,t){var n,o,a;return t?(n=t.split(","),t=n[0].split("/"),a=n.length>1?n[1]:"before",o=r.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),h(e,t[1],parseInt(t[2],10))):null},e),o?g(o)?p(o,parseInt(a,10)):(a="after"===a?y(o)+1:y(o),new i(o.parentNode,a)):null):null}var g=e.isText,v=e.isBogus,y=t.nodeIndex;return{create:f,resolve:m}}),r(j,[d,m,k,q,$,_],function(e,t,n,r,i,o){function a(a){var l=a.dom;this.getBookmark=function(e,c){function u(e,n){var r=0;return t.each(l.select(e),function(e){return"all"!==e.getAttribute("data-mce-bogus")?e==n?!1:void r++:void 0}),r}function d(e){function t(t){var n,r,i,o=t?"start":"end";n=e[o+"Container"],r=e[o+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(i=n.childNodes,n=i[Math.min(t?r:r-1,i.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))}return t(!0),t(),e}function f(e){function t(e,t){var r=e[t?"startContainer":"endContainer"],i=e[t?"startOffset":"endOffset"],o=[],a,s,u=0;if(3==r.nodeType){if(c)for(a=r.previousSibling;a&&3==a.nodeType;a=a.previousSibling)i+=a.nodeValue.length;o.push(i)}else s=r.childNodes,i>=s.length&&s.length&&(u=1,i=Math.max(0,s.length-1)),o.push(l.nodeIndex(s[i],c)+u);for(;r&&r!=n;r=r.parentNode)o.push(l.nodeIndex(r,c));return o}var n=l.getRoot(),r={};return r.start=t(e,!0),a.isCollapsed()||(r.end=t(e)),r}function h(e){function t(e){var t;if(n.isCaretContainer(e)){if(o.isText(e)&&n.isCaretContainerBlock(e)&&(e=e.parentNode),t=e.previousSibling,s(t))return t;if(t=e.nextSibling,s(t))return t}}return t(e.startContainer)||t(e.endContainer)}var p,m,g,v,y,b,C="&#xFEFF;",x;if(2==e)return b=a.getNode(),y=b?b.nodeName:null,p=a.getRng(),s(b)||"IMG"==y?{name:y,index:u(y,b)}:a.tridentSel?a.tridentSel.getBookmark(e):(b=h(p),b?(y=b.tagName,{name:y,index:u(y,b)}):f(p));if(3==e)return p=a.getRng(),{start:r.create(l.getRoot(),i.fromRangeStart(p)),end:r.create(l.getRoot(),i.fromRangeEnd(p))};if(e)return{rng:a.getRng()};if(p=a.getRng(),g=l.uniqueId(),v=a.isCollapsed(),x="overflow:hidden;line-height:0px",p.duplicate||p.item){if(p.item)return b=p.item(0),y=b.nodeName,{name:y,index:u(y,b)};m=p.duplicate();try{p.collapse(),p.pasteHTML('<span data-mce-type="bookmark" id="'+g+'_start" style="'+x+'">'+C+"</span>"),v||(m.collapse(!1),p.moveToElementText(m.parentElement()),0===p.compareEndPoints("StartToEnd",m)&&m.move("character",-1),m.pasteHTML('<span data-mce-type="bookmark" id="'+g+'_end" style="'+x+'">'+C+"</span>"))}catch(w){return null}}else{if(b=a.getNode(),y=b.nodeName,"IMG"==y)return{name:y,index:u(y,b)};m=d(p.cloneRange()),v||(m.collapse(!1),m.insertNode(l.create("span",{"data-mce-type":"bookmark",id:g+"_end",style:x},C))),p=d(p),p.collapse(!0),p.insertNode(l.create("span",{"data-mce-type":"bookmark",id:g+"_start",style:x},C))}return a.moveToBookmark({id:g,keep:1}),{id:g}},this.moveToBookmark=function(n){function i(e){var t=n[e?"start":"end"],r,i,o,a;if(t){for(o=t[0],i=d,r=t.length-1;r>=1;r--){if(a=i.childNodes,t[r]>a.length-1)return;i=a[t[r]]}3===i.nodeType&&(o=Math.min(t[0],i.nodeValue.length)),1===i.nodeType&&(o=Math.min(t[0],i.childNodes.length)),e?u.setStart(i,o):u.setEnd(i,o)}return!0}function o(r){var i=l.get(n.id+"_"+r),o,a,s,c,u=n.keep;if(i&&(o=i.parentNode,"start"==r?(u?(o=i.firstChild,a=1):a=l.nodeIndex(i),f=h=o,p=m=a):(u?(o=i.firstChild,a=1):a=l.nodeIndex(i),h=o,m=a),!u)){for(c=i.previousSibling,s=i.nextSibling,t.each(t.grep(i.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});i=l.get(n.id+"_"+r);)l.remove(i,1);c&&s&&c.nodeType==s.nodeType&&3==c.nodeType&&!e.opera&&(a=c.nodeValue.length,c.appendData(s.nodeValue),l.remove(s),"start"==r?(f=h=c,p=m=a):(h=c,m=a))}}function s(t){return!l.isBlock(t)||t.innerHTML||e.ie||(t.innerHTML='<br data-mce-bogus="1" />'),t}function c(){var e,t;return e=l.createRng(),t=r.resolve(l.getRoot(),n.start),e.setStart(t.container(),t.offset()),t=r.resolve(l.getRoot(),n.end),e.setEnd(t.container(),t.offset()),e}var u,d,f,h,p,m;if(n)if(t.isArray(n.start)){if(u=l.createRng(),d=l.getRoot(),a.tridentSel)return a.tridentSel.moveToBookmark(n);i(!0)&&i()&&a.setRng(u)}else"string"==typeof n.start?a.setRng(c(n)):n.id?(o("start"),o("end"),f&&(u=l.createRng(),u.setStart(s(f),p),u.setEnd(s(h),m),a.setRng(u))):n.name?a.select(l.select(n.name)[n.index]):n.rng&&a.setRng(n.rng)}}var s=o.isContentEditableFalse;return a.isBookmarkNode=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},a}),r(Y,[y,O,F,T,j,_,d,m,$],function(e,n,r,i,o,a,s,l,c){function u(e,t,i,a){var s=this;s.dom=e,s.win=t,s.serializer=i,s.editor=a,s.bookmarkManager=new o(s),s.controlSelection=new r(s,a),s.win.getSelection||(s.tridentSel=new n(s))}var d=l.each,f=l.trim,h=s.ie;return u.prototype={setCursorLocation:function(e,t){var n=this,r=n.dom.createRng();e?(r.setStart(e,t),r.setEnd(e,t),n.setRng(r),n.collapse(!1)):(n._moveEndPoint(r,n.editor.getBody(),!0),n.setRng(r))},getContent:function(e){var n=this,r=n.getRng(),i=n.dom.create("body"),o=n.getSel(),a,s,l;return e=e||{},a=s="",e.get=!0,e.format=e.format||"html",e.selection=!0,n.editor.fire("BeforeGetContent",e),"text"==e.format?n.isCollapsed()?"":r.text||(o.toString?o.toString():""):(r.cloneContents?(l=r.cloneContents(),l&&i.appendChild(l)):r.item!==t||r.htmlText!==t?(i.innerHTML="<br>"+(r.item?r.item(0).outerHTML:r.htmlText),i.removeChild(i.firstChild)):i.innerHTML=r.toString(),/^\s/.test(i.innerHTML)&&(a=" "),/\s+$/.test(i.innerHTML)&&(s=" "),e.getInner=!0,e.content=n.isCollapsed()?"":a+n.serializer.serialize(i,e)+s,n.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n=this,r=n.getRng(),i,o=n.win.document,a,s;if(t=t||{format:"html"},t.set=!0,t.selection=!0,t.content=e,t.no_events||n.editor.fire("BeforeSetContent",t),e=t.content,r.insertNode){e+='<span id="__caret">_</span>',r.startContainer==o&&r.endContainer==o?o.body.innerHTML=e:(r.deleteContents(),0===o.body.childNodes.length?o.body.innerHTML=e:r.createContextualFragment?r.insertNode(r.createContextualFragment(e)):(a=o.createDocumentFragment(),s=o.createElement("div"),a.appendChild(s),s.outerHTML=e,r.insertNode(a))),i=n.dom.get("__caret"),r=o.createRange(),r.setStartBefore(i),r.setEndBefore(i),n.setRng(r),n.dom.remove("__caret");try{n.setRng(r)}catch(l){}}else r.item&&(o.execCommand("Delete",!1,null),r=n.getRng()),/^\s+/.test(e)?(r.pasteHTML('<span id="__mce_tmp">_</span>'+e),n.dom.remove("__mce_tmp")):r.pasteHTML(e);t.no_events||n.editor.fire("SetContent",t)},getStart:function(e){var t=this,n=t.getRng(),r,i,o,a;if(n.duplicate||n.item){if(n.item)return n.item(0);for(o=n.duplicate(),o.collapse(1),r=o.parentElement(),r.ownerDocument!==t.dom.doc&&(r=t.dom.getRoot()),i=a=n.parentElement();a=a.parentNode;)if(a==r){r=i;break}return r}return r=n.startContainer,1==r.nodeType&&r.hasChildNodes()&&(e&&n.collapsed||(r=r.childNodes[Math.min(r.childNodes.length-1,n.startOffset)])),r&&3==r.nodeType?r.parentNode:r},getEnd:function(e){var t=this,n=t.getRng(),r,i;return n.duplicate||n.item?n.item?n.item(0):(n=n.duplicate(),n.collapse(0),r=n.parentElement(),r.ownerDocument!==t.dom.doc&&(r=t.dom.getRoot()),r&&"BODY"==r.nodeName?r.lastChild||r:r):(r=n.endContainer,i=n.endOffset,1==r.nodeType&&r.hasChildNodes()&&(e&&n.collapsed||(r=r.childNodes[i>0?i-1:i])),r&&3==r.nodeType?r.parentNode:r)},getBookmark:function(e,t){return this.bookmarkManager.getBookmark(e,t)},moveToBookmark:function(e){return this.bookmarkManager.moveToBookmark(e)},select:function(e,t){var n=this,r=n.dom,i=r.createRng(),o;if(n.lastFocusBookmark=null,e){if(!t&&n.controlSelection.controlSelect(e))return;o=r.nodeIndex(e),i.setStart(e.parentNode,o),i.setEnd(e.parentNode,o+1),t&&(n._moveEndPoint(i,e,!0),n._moveEndPoint(i,e)),n.setRng(i)}return e},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed},collapse:function(e){var t=this,n=t.getRng(),r;n.item&&(r=n.item(0),n=t.win.document.body.createTextRange(),n.moveToElementText(r)),n.collapse(!!e),t.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){function t(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}}var n=this,r,i,o,a,s,l;if(!n.win)return null;if(a=n.win.document,!e&&n.lastFocusBookmark){var c=n.lastFocusBookmark;return c.startContainer?(i=a.createRange(),i.setStart(c.startContainer,c.startOffset),i.setEnd(c.endContainer,c.endOffset)):i=c,i}if(e&&n.tridentSel)return n.tridentSel.getRangeAt(0);try{(r=n.getSel())&&(i=r.rangeCount>0?r.getRangeAt(0):r.createRange?r.createRange():a.createRange())}catch(u){}if(l=n.editor.fire("GetSelectionRange",{range:i}),l.range!==i)return l.range;if(h&&i&&i.setStart&&a.selection){try{s=a.selection.createRange()}catch(u){}s&&s.item&&(o=s.item(0),i=a.createRange(),i.setStartBefore(o),i.setEndAfter(o))}return i||(i=a.createRange?a.createRange():a.body.createTextRange()),i.setStart&&9===i.startContainer.nodeType&&i.collapsed&&(o=n.dom.getRoot(),i.setStart(o,0),i.setEnd(o,0)),n.selectedRange&&n.explicitRange&&(0===t(i.START_TO_START,i,n.selectedRange)&&0===t(i.END_TO_END,i,n.selectedRange)?i=n.explicitRange:(n.selectedRange=null,n.explicitRange=null)),i},setRng:function(e,t){var n=this,r,i,o;if(e)if(e.select){n.explicitRange=null;try{e.select()}catch(a){}}else if(n.tridentSel){if(e.cloneRange)try{n.tridentSel.addRange(e)}catch(a){}}else{if(r=n.getSel(),o=n.editor.fire("SetSelectionRange",{range:e}),e=o.range,r){n.explicitRange=e;try{r.removeAllRanges(),r.addRange(e)}catch(a){}t===!1&&r.extend&&(r.collapse(e.endContainer,e.endOffset),r.extend(e.startContainer,e.startOffset)),n.selectedRange=r.rangeCount>0?r.getRangeAt(0):null}e.collapsed||e.startContainer!=e.endContainer||!r.setBaseAndExtent||s.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(i=e.startContainer.childNodes[e.startOffset],i&&"IMG"==i.tagName&&n.getSel().setBaseAndExtent(i,0,i,1))}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t=this,n=t.getRng(),r,i,o,a,s,l=t.dom.getRoot();return n?(i=n.startContainer,o=n.endContainer,a=n.startOffset,s=n.endOffset,n.setStart?(r=n.commonAncestorContainer,!n.collapsed&&(i==o&&2>s-a&&i.hasChildNodes()&&(r=i.childNodes[a]),3===i.nodeType&&3===o.nodeType&&(i=i.length===a?e(i.nextSibling,!0):i.parentNode,o=0===s?e(o.previousSibling,!1):o.parentNode,i&&i===o))?i:r&&3==r.nodeType?r.parentNode:r):(r=n.item?n.item(0):n.parentElement(),r.ownerDocument!==t.win.document&&(r=l),r)):l},getSelectedBlocks:function(t,n){var r=this,i=r.dom,o,a,s=[];if(a=i.getRoot(),t=i.getParent(t||r.getStart(),i.isBlock),n=i.getParent(n||r.getEnd(),i.isBlock),t&&t!=a&&s.push(t),t&&n&&t!=n){o=t;for(var l=new e(t,a);(o=l.next())&&o!=n;)i.isBlock(o)&&s.push(o)}return n&&t!=n&&n!=a&&s.push(n),s},isForward:function(){var e=this.dom,t=this.getSel(),n,r;return t&&t.anchorNode&&t.focusNode?(n=e.createRng(),n.setStart(t.anchorNode,t.anchorOffset),n.collapse(!0),r=e.createRng(),r.setStart(t.focusNode,t.focusOffset),r.collapse(!0),n.compareBoundaryPoints(n.START_TO_START,r)<=0):!0},normalize:function(){var e=this,t=e.getRng();return s.range&&new i(e.dom).normalize(t)&&e.setRng(t,e.isForward()),t},selectorChanged:function(e,t){var n=this,r;return n.selectorChangedData||(n.selectorChangedData={},r={},n.editor.on("NodeChange",function(e){var t=e.element,i=n.dom,o=i.getParents(t,null,i.getRoot()),a={};d(n.selectorChangedData,function(e,t){d(o,function(n){return i.is(n,t)?(r[t]||(d(e,function(e){e(!0,{node:n,selector:t,parents:o})}),r[t]=e),a[t]=e,!1):void 0})}),d(r,function(e,n){a[n]||(delete r[n],d(e,function(e){e(!1,{node:t,selector:n,parents:o})}))})})),n.selectorChangedData[e]||(n.selectorChangedData[e]=[]),n.selectorChangedData[e].push(t),n},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){function n(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}}var r,i,o=this,s=o.dom,l=s.getRoot(),c,u,d=0;if(a.isElement(e)){if(t===!1&&(d=e.offsetHeight),"BODY"!=l.nodeName){var f=o.getScrollContainer();if(f)return r=n(e).y-n(f).y+d,u=f.clientHeight,c=f.scrollTop,void((c>r||r+25>c+u)&&(f.scrollTop=c>r?r:r-u+25))}i=s.getViewPort(o.editor.getWin()),r=s.getPos(e).y+d,c=i.y,u=i.h,(r<i.y||r+25>c+u)&&o.editor.getWin().scrollTo(0,c>r?r:r-u+25)}},placeCaretAt:function(e,t){this.setRng(i.getCaretRangeFromPoint(e,t,this.editor.getDoc()))},_moveEndPoint:function(t,n,r){var i=n,o=new e(n,i),a=this.dom.schema.getNonEmptyElements();do{if(3==n.nodeType&&0!==f(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(a[n.nodeName]&&!/^(TD|TH)$/.test(n.nodeName))return void(r?t.setStartBefore(n):"BR"==n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(s.ie&&s.ie<11&&this.dom.isBlock(n)&&this.dom.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?o.next():o.prev());"BODY"==i.nodeName&&(r?t.setStart(i,0):t.setEnd(i,i.childNodes.length))},getBoundingClientRect:function(){var e=this.getRng();return e.collapsed?c.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){this.win=null,this.controlSelection.destroy()}},u}),r(X,[j,m],function(e,t){function n(t){this.compare=function(n,i){function o(e){var n={};return r(t.getAttribs(e),function(r){var i=r.nodeName.toLowerCase();0!==i.indexOf("_")&&"style"!==i&&"data-mce-style"!==i&&"data-mce-fragment"!=i&&(n[i]=t.getAttrib(e,i))}),n}function a(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(n=t[r],"undefined"==typeof n)return!1;if(e[r]!=n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0}return n.nodeName!=i.nodeName?!1:a(o(n),o(i))&&a(t.parseStyle(t.getAttrib(n,"style")),t.parseStyle(t.getAttrib(i,"style")))?!e.isBookmarkNode(n)&&!e.isBookmarkNode(i):!1}}var r=t.each;return n}),r(K,[m],function(e){function t(e,t){function r(e){return e.replace(/%(\w+)/g,"")}var i,o,a=e.dom,s="",l,c;if(c=e.settings.preview_styles,c===!1)return"";if(c||(c="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof t){if(t=e.formatter.get(t),!t)return;t=t[0]}return i=t.block||t.inline||"span",o=a.create(i),n(t.styles,function(e,t){e=r(e),e&&a.setStyle(o,t,e)}),n(t.attributes,function(e,t){e=r(e),e&&a.setAttrib(o,t,e)}),n(t.classes,function(e){e=r(e),a.hasClass(o,e)||a.addClass(o,e)}),e.fire("PreviewFormats"),a.setStyles(o,{position:"absolute",left:-65535}),e.getBody().appendChild(o),l=a.getStyle(e.getBody(),"fontSize",!0),l=/px$/.test(l)?parseInt(l,10):0,n(c.split(" "),function(t){var n=a.getStyle(o,t,!0);if(!("background-color"==t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=a.getStyle(e.getBody(),t,!0),"#ffffff"==a.toHex(n).toLowerCase())||"color"==t&&"#000000"==a.toHex(n).toLowerCase())){if("font-size"==t&&/em|%$/.test(n)){if(0===l)return;n=parseFloat(n,10)/(/%$/.test(n)?100:1),n=n*l+"px"}"border"==t&&n&&(s+="padding:0 2px;"),s+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),a.remove(o),s}var n=e.each;return{getCssText:t}}),r(G,[p,_,g],function(e,t,n){function r(e,t){var n=o[e];n||(o[e]=n=[]),o[e].push(t)}function i(e,t){s(o[e],function(e){e(t)})}var o=[],a=e.filter,s=e.each;return r("pre",function(r){function i(t){return c(t.previousSibling)&&-1!=e.indexOf(u,t.previousSibling)}function o(e,t){n(t).remove(),n(e).append("<br><br>").append(t.childNodes)}var l=r.selection.getRng(),c,u;c=t.matchNodeNames("pre"),l.collapsed||(u=r.selection.getSelectedBlocks(),s(a(a(u,c),i),function(e){o(e.previousSibling,e)}))}),{postProcess:i}}),r(J,[y,T,j,X,m,K,G],function(e,t,n,r,i,o,a){return function(s){function l(e){return e.nodeType&&(e=e.nodeName),!!s.schema.getTextBlockElements()[e.toLowerCase()]}function c(e){return/^(TH|TD)$/.test(e.nodeName)}function u(e){return e&&/^(IMG)$/.test(e.nodeName)}function d(e,t){return Y.getParents(e,t,Y.getRoot())}function f(e){return 1===e.nodeType&&"_mce_caret"===e.id}function h(){g({valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(e,t,n){ue(n,function(t,n){Y.setAttrib(e,n,t)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),ue("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){g(e,{block:e,remove:"all"})}),g(s.settings.formats)}function p(){s.addShortcut("meta+b","bold_desc","Bold"),s.addShortcut("meta+i","italic_desc","Italic"),s.addShortcut("meta+u","underline_desc","Underline");for(var e=1;6>=e;e++)s.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);s.addShortcut("access+7","",["FormatBlock",!1,"p"]),s.addShortcut("access+8","",["FormatBlock",!1,"div"]),s.addShortcut("access+9","",["FormatBlock",!1,"address"])}function m(e){return e?j[e]:j}function g(e,t){e&&("string"!=typeof e?ue(e,function(e,t){g(t,e)}):(t=t.length?t:[t],ue(t,function(e){e.deep===oe&&(e.deep=!e.selector),e.split===oe&&(e.split=!e.selector||e.inline),e.remove===oe&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),j[e]=t))}function v(e){return e&&j[e]&&delete j[e],j}function y(e,t){var n=m(t);if(n)for(var r=0;r<n.length;r++)if(n[r].inherit===!1&&Y.is(e,n[r].selector))return!0;return!1}function b(e){var t;return s.dom.getParent(e,function(e){return t=s.dom.getStyle(e,"text-decoration"),t&&"none"!==t}),t}function C(e){var t;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(t=b(e.parentNode),s.dom.getStyle(e,"color")&&t?s.dom.setStyle(e,"text-decoration",t):s.dom.getStyle(e,"text-decoration")===t&&s.dom.setStyle(e,"text-decoration",null))}function x(t,n,r){function i(e,t){if(t=t||d,e){if(t.onformat&&t.onformat(e,t,n,r),ue(t.styles,function(t,r){Y.setStyle(e,r,M(t,n))}),t.styles){var i=Y.getAttrib(e,"style");i&&e.setAttribute("data-mce-style",i)}ue(t.attributes,function(t,r){Y.setAttrib(e,r,M(t,n))}),ue(t.classes,function(t){t=M(t,n),Y.hasClass(e,t)||Y.addClass(e,t)})}}function o(){function t(t,n){var i=new e(n);for(r=i.prev2();r;r=i.prev2()){if(3==r.nodeType&&r.data.length>0)return r;if(r.childNodes.length>1||r==t||"BR"==r.tagName)return r}}var n=s.selection.getRng(),i=n.startContainer,o=n.endContainer;if(i!=o&&0===n.endOffset){var a=t(i,o),l=3==a.nodeType?a.data.length:a.childNodes.length;n.setEnd(a,l)}return n}function c(e,r,o){var a=[],s,c,h=!0;s=d.inline||d.block,c=Y.create(s),i(c),K.walk(e,function(e){function r(e){var m,v,y,b,C;return C=h,m=e.nodeName.toLowerCase(),v=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&ae(e)&&(C=h,h="true"===ae(e),b=!0),B(m,"br")?(p=0,void(d.block&&Y.remove(e))):d.wrapper&&E(e,t,n)?void(p=0):h&&!b&&d.block&&!d.wrapper&&l(m)&&G(v,s)?(e=Y.rename(e,s),i(e),a.push(e),void(p=0)):d.selector&&(ue(u,function(t){return"collapsed"in t&&t.collapsed!==g?void 0:Y.is(e,t.selector)&&!f(e)?(i(e,t),y=!0,!1):void 0}),!d.inline||y)?void(p=0):void(!h||b||!G(s,m)||!G(v,s)||!o&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||f(e)||d.inline&&J(e)?(p=0,ue(de(e.childNodes),r),b&&(h=C),p=0):(p||(p=Y.clone(c,ne),e.parentNode.insertBefore(p,e),a.push(p)),p.appendChild(e)))}var p;ue(e,r)}),d.links===!0&&ue(a,function(e){function t(e){"A"===e.nodeName&&i(e,d),ue(de(e.childNodes),t)}t(e)}),ue(a,function(e){function r(e){var t=0;return ue(e.childNodes,function(e){P(e)||ce(e)||t++}),t}function o(e){var t,n;return ue(e.childNodes,function(e){return 1!=e.nodeType||ce(e)||f(e)?void 0:(t=e,ne)}),t&&!ce(t)&&A(t,d)&&(n=Y.clone(t,ne),i(n),Y.replace(n,e,re),Y.remove(t,1)),n||e}var s;if(s=r(e),(a.length>1||!J(e))&&0===s)return void Y.remove(e,1);if(d.inline||d.wrapper){if(d.exact||1!==s||(e=o(e)),ue(u,function(t){ue(Y.select(t.inline,e),function(e){ce(e)||F(t,n,e,t.exact?e:null)})}),E(e.parentNode,t,n))return Y.remove(e,1),e=0,re;d.merge_with_parents&&Y.getParent(e.parentNode,function(r){return E(r,t,n)?(Y.remove(e,1),e=0,re):void 0}),e&&d.merge_siblings!==!1&&(e=W(U(e),e),e=W(e,U(e,re)))}})}var u=m(t),d=u[0],h,p,g=!r&&X.isCollapsed();if("false"!==ae(X.getNode())){if(d){if(r)r.nodeType?(p=Y.createRng(),p.setStartBefore(r),p.setEndAfter(r),c(O(p,u),null,!0)):c(r,null,!0);else if(g&&d.inline&&!Y.select("td[data-mce-selected],th[data-mce-selected]").length)$("apply",t,n);else{var v=s.selection.getNode();Q||!u[0].defaultBlock||Y.getParent(v,Y.isBlock)||x(u[0].defaultBlock),s.selection.setRng(o()),h=X.getBookmark(),c(O(X.getRng(re),u),h),d.styles&&(d.styles.color||d.styles.textDecoration)&&(fe(v,C,"childNodes"),C(v)),X.moveToBookmark(h),q(X.getRng(re)),s.nodeChanged()}a.postProcess(t,s)}}else{r=X.getNode();for(var y=0,b=u.length;b>y;y++)if(u[y].ceFalseOverride&&Y.is(r,u[y].selector))return void i(r,u[y])}}function w(e,t,n,r){function i(e){var n,r,o,a,s;if(1===e.nodeType&&ae(e)&&(a=y,y="true"===ae(e),s=!0),n=de(e.childNodes),y&&!s)for(r=0,o=h.length;o>r&&!F(h[r],t,e,e);r++);if(p.deep&&n.length){for(r=0,o=n.length;o>r;r++)i(n[r]);s&&(y=a)}}function o(n){var i;return ue(d(n.parentNode).reverse(),function(n){var o;i||"_start"==n.id||"_end"==n.id||(o=E(n,e,t,r),o&&o.split!==!1&&(i=n))}),i}function a(e,n,r,i){var o,a,s,l,c,u;if(e){for(u=e.parentNode,o=n.parentNode;o&&o!=u;o=o.parentNode){
+for(a=Y.clone(o,ne),c=0;c<h.length;c++)if(F(h[c],t,a,a)){a=0;break}a&&(s&&a.appendChild(s),l||(l=a),s=a)}!i||p.mixed&&J(e)||(n=Y.split(e,n)),s&&(r.parentNode.insertBefore(s,r),l.appendChild(r))}return n}function l(e){return a(o(e),e,e,!0)}function u(e){var t=Y.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return ce(n)&&(n=n[e?"firstChild":"lastChild"]),3==n.nodeType&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),Y.remove(t,!0),n}function f(e){var t,n,r=e.commonAncestorContainer;if(e=O(e,h,re),p.split){if(t=V(e,re),n=V(e),t!=n){if(/^(TR|TH|TD)$/.test(t.nodeName)&&t.firstChild&&(t="TR"==t.nodeName?t.firstChild.firstChild||t:t.firstChild||t),r&&/^T(HEAD|BODY|FOOT|R)$/.test(r.nodeName)&&c(n)&&n.firstChild&&(n=n.firstChild||n),Y.isChildOf(t,n)&&!J(n)&&!c(t)&&!c(n))return t=H(t,"span",{id:"_start","data-mce-type":"bookmark"}),l(t),void(t=u(re));t=H(t,"span",{id:"_start","data-mce-type":"bookmark"}),n=H(n,"span",{id:"_end","data-mce-type":"bookmark"}),l(t),l(n),t=u(re),n=u()}else t=n=l(t);e.startContainer=t.parentNode?t.parentNode:t,e.startOffset=Z(t),e.endContainer=n.parentNode?n.parentNode:n,e.endOffset=Z(n)+1}K.walk(e,function(e){ue(e,function(e){i(e),1===e.nodeType&&"underline"===s.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===b(e.parentNode)&&F({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})}var h=m(e),p=h[0],g,v,y=!0;if(n)return void(n.nodeType?(v=Y.createRng(),v.setStartBefore(n),v.setEndAfter(n),f(v)):f(n));if("false"!==ae(X.getNode()))X.isCollapsed()&&p.inline&&!Y.select("td[data-mce-selected],th[data-mce-selected]").length?$("remove",e,t,r):(g=X.getBookmark(),f(X.getRng(re)),X.moveToBookmark(g),p.inline&&_(e,t,X.getStart())&&q(X.getRng(!0)),s.nodeChanged());else{n=X.getNode();for(var C=0,x=h.length;x>C&&(!h[C].ceFalseOverride||!F(h[C],t,n,n));C++);}}function N(e,t,n){var r=m(e);!_(e,t,n)||"toggle"in r[0]&&!r[0].toggle?x(e,t,n):w(e,t,n)}function E(e,t,n,r){function i(e,t,i){var o,a,s=t[i],l;if(t.onmatch)return t.onmatch(e,t,i);if(s)if(s.length===oe){for(o in s)if(s.hasOwnProperty(o)){if(a="attributes"===i?Y.getAttrib(e,o):D(e,o),r&&!a&&!t.exact)return;if((!r||t.exact)&&!B(a,L(M(s[o],n),o)))return}}else for(l=0;l<s.length;l++)if("attributes"===i?Y.getAttrib(e,s[l]):D(e,s[l]))return t;return t}var o=m(t),a,s,l;if(o&&e)for(s=0;s<o.length;s++)if(a=o[s],A(e,a)&&i(e,a,"attributes")&&i(e,a,"styles")){if(l=a.classes)for(s=0;s<l.length;s++)if(!Y.hasClass(e,l[s]))return;return a}}function _(e,t,n){function r(n){var r=Y.getRoot();return n===r?!1:(n=Y.getParent(n,function(n){return y(n,e)?!0:n.parentNode===r||!!E(n,e,t,!0)}),E(n,e,t))}var i;return n?r(n):(n=X.getNode(),r(n)?re:(i=X.getStart(),i!=n&&r(i)?re:ne))}function S(e,t){var n,r=[],i={};return n=X.getStart(),Y.getParent(n,function(n){var o,a;for(o=0;o<e.length;o++)a=e[o],!i[a]&&E(n,a,t)&&(i[a]=!0,r.push(a))},Y.getRoot()),r}function k(e){var t=m(e),n,r,i,o,a;if(t)for(n=X.getStart(),r=d(n),o=t.length-1;o>=0;o--){if(a=t[o].selector,!a||t[o].defaultBlock)return re;for(i=r.length-1;i>=0;i--)if(Y.is(r[i],a))return re}return ne}function T(e,t,n){var r;return ie||(ie={},r={},s.on("NodeChange",function(e){var t=d(e.element),n={};t=i.grep(t,function(e){return 1==e.nodeType&&!e.getAttribute("data-mce-bogus")}),ue(ie,function(e,i){ue(t,function(o){return E(o,i,{},e.similar)?(r[i]||(ue(e,function(e){e(!0,{node:o,format:i,parents:t})}),r[i]=e),n[i]=e,!1):y(o,i)?!1:void 0})}),ue(r,function(i,o){n[o]||(delete r[o],ue(i,function(n){n(!1,{node:e.element,format:o,parents:t})}))})})),ue(e.split(","),function(e){ie[e]||(ie[e]=[],ie[e].similar=n),ie[e].push(t)}),this}function R(e){return o.getCssText(s,e)}function A(e,t){return B(e,t.inline)?re:B(e,t.block)?re:t.selector?1==e.nodeType&&Y.is(e,t.selector):void 0}function B(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function D(e,t){return L(Y.getStyle(e,t),t)}function L(e,t){return"color"!=t&&"backgroundColor"!=t||(e=Y.toHex(e)),"fontWeight"==t&&700==e&&(e="bold"),"fontFamily"==t&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function M(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function P(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function H(e,t,n){var r=Y.create(t,n);return e.parentNode.insertBefore(r,e),r.appendChild(e),r}function O(t,n,r){function i(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var r,i,o,a,s;if(r=i=e?g:y,a=e?"previousSibling":"nextSibling",s=Y.getRoot(),3==r.nodeType&&!P(r)&&(e?v>0:b<r.nodeValue.length))return r;for(;;){if(!n[0].block_expand&&J(i))return i;for(o=i[a];o;o=o[a])if(!ce(o)&&!P(o)&&!t(o))return i;if(i==s||i.parentNode==s){r=i;break}i=i.parentNode}return r}function o(e,t){for(t===oe&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)e=e.childNodes[t],e&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}}function a(e){for(var t=e;t;){if(1===t.nodeType&&ae(t))return"false"===ae(t)?t:e;t=t.parentNode}return e}function c(t,n,i){function o(e,t){var n,o,a=e.nodeValue;return"undefined"==typeof t&&(t=i?a.length:0),i?(n=a.lastIndexOf(" ",t),o=a.lastIndexOf("\xa0",t),n=n>o?n:o,-1===n||r||n++):(n=a.indexOf(" ",t),o=a.indexOf("\xa0",t),n=-1!==n&&(-1===o||o>n)?n:o),n}var a,l,c,u;if(3===t.nodeType){if(c=o(t,n),-1!==c)return{container:t,offset:c};u=t}for(a=new e(t,Y.getParent(t,J)||s.getBody());l=a[i?"prev":"next"]();)if(3===l.nodeType){if(u=l,c=o(l),-1!==c)return{container:l,offset:c}}else if(J(l))break;return u?(n=i?0:u.length,{container:u,offset:n}):void 0}function u(e,r){var i,o,a,s;for(3==e.nodeType&&0===e.nodeValue.length&&e[r]&&(e=e[r]),i=d(e),o=0;o<i.length;o++)for(a=0;a<n.length;a++)if(s=n[a],!("collapsed"in s&&s.collapsed!==t.collapsed)&&Y.is(i[o],s.selector))return i[o];return e}function f(e,t){var r,i=Y.getRoot();if(n[0].wrapper||(r=Y.getParent(e,n[0].block,i)),r||(r=Y.getParent(3==e.nodeType?e.parentNode:e,function(e){return e!=i&&l(e)})),r&&n[0].wrapper&&(r=d(r,"ul,ol").reverse()[0]||r),!r)for(r=e;r[t]&&!J(r[t])&&(r=r[t],!B(r,"br")););return r||e}var h,p,m,g=t.startContainer,v=t.startOffset,y=t.endContainer,b=t.endOffset;if(1==g.nodeType&&g.hasChildNodes()&&(h=g.childNodes.length-1,g=g.childNodes[v>h?h:v],3==g.nodeType&&(v=0)),1==y.nodeType&&y.hasChildNodes()&&(h=y.childNodes.length-1,y=y.childNodes[b>h?h:b-1],3==y.nodeType&&(b=y.nodeValue.length)),g=a(g),y=a(y),(ce(g.parentNode)||ce(g))&&(g=ce(g)?g:g.parentNode,g=g.nextSibling||g,3==g.nodeType&&(v=0)),(ce(y.parentNode)||ce(y))&&(y=ce(y)?y:y.parentNode,y=y.previousSibling||y,3==y.nodeType&&(b=y.length)),n[0].inline&&(t.collapsed&&(m=c(g,v,!0),m&&(g=m.container,v=m.offset),m=c(y,b),m&&(y=m.container,b=m.offset)),p=o(y,b),p.node)){for(;p.node&&0===p.offset&&p.node.previousSibling;)p=o(p.node.previousSibling);p.node&&p.offset>0&&3===p.node.nodeType&&" "===p.node.nodeValue.charAt(p.offset-1)&&p.offset>1&&(y=p.node,y.splitText(p.offset-1))}return(n[0].inline||n[0].block_expand)&&(n[0].inline&&3==g.nodeType&&0!==v||(g=i(!0)),n[0].inline&&3==y.nodeType&&b!==y.nodeValue.length||(y=i())),n[0].selector&&n[0].expand!==ne&&!n[0].inline&&(g=u(g,"previousSibling"),y=u(y,"nextSibling")),(n[0].block||n[0].selector)&&(g=f(g,"previousSibling"),y=f(y,"nextSibling"),n[0].block&&(J(g)||(g=i(!0)),J(y)||(y=i()))),1==g.nodeType&&(v=Z(g),g=g.parentNode),1==y.nodeType&&(b=Z(y)+1,y=y.parentNode),{startContainer:g,startOffset:v,endContainer:y,endOffset:b}}function I(e,t){return t.links&&"A"==e.tagName}function F(e,t,n,r){var i,o,a;if(!A(n,e)&&!I(n,e))return ne;if("all"!=e.remove)for(ue(e.styles,function(i,o){i=L(M(i,t),o),"number"==typeof o&&(o=i,r=0),(e.remove_similar||!r||B(D(r,o),i))&&Y.setStyle(n,o,""),a=1}),a&&""===Y.getAttrib(n,"style")&&(n.removeAttribute("style"),n.removeAttribute("data-mce-style")),ue(e.attributes,function(e,i){var o;if(e=M(e,t),"number"==typeof i&&(i=e,r=0),!r||B(Y.getAttrib(r,i),e)){if("class"==i&&(e=Y.getAttrib(n,i),e&&(o="",ue(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(o+=(o?" ":"")+e)}),o)))return void Y.setAttrib(n,i,o);"class"==i&&n.removeAttribute("className"),te.test(i)&&n.removeAttribute("data-mce-"+i),n.removeAttribute(i)}}),ue(e.classes,function(e){e=M(e,t),r&&!Y.hasClass(r,e)||Y.removeClass(n,e)}),o=Y.getAttribs(n),i=0;i<o.length;i++)if(0!==o[i].nodeName.indexOf("_"))return ne;return"none"!=e.remove?(z(n,e),re):void 0}function z(e,t){function n(e,t,n){return e=U(e,t,n),!e||"BR"==e.nodeName||J(e)}var r=e.parentNode,i;t.block&&(Q?r==Y.getRoot()&&(t.list_block&&B(e,t.list_block)||ue(de(e.childNodes),function(e){G(Q,e.nodeName.toLowerCase())?i?i.appendChild(e):(i=H(e,Q),Y.setAttribs(i,s.settings.forced_root_block_attrs)):i=0})):J(e)&&!J(r)&&(n(e,ne)||n(e.firstChild,re,1)||e.insertBefore(Y.create("br"),e.firstChild),n(e,re)||n(e.lastChild,ne,1)||e.appendChild(Y.create("br")))),t.selector&&t.inline&&!B(t.inline,e)||Y.remove(e,1)}function U(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1==e.nodeType||!P(e))return e}function W(e,t){function n(e,t){for(i=e;i;i=i[t]){if(3==i.nodeType&&0!==i.nodeValue.length)return e;if(1==i.nodeType&&!ce(i))return i}return e}var i,o,a=new r(Y);if(e&&t&&(e=n(e,"previousSibling"),t=n(t,"nextSibling"),a.compare(e,t))){for(i=e.nextSibling;i&&i!=t;)o=i,i=i.nextSibling,e.appendChild(o);return Y.remove(t),ue(de(t.childNodes),function(t){e.appendChild(t)}),e}return t}function V(t,n){var r,i,o;return r=t[n?"startContainer":"endContainer"],i=t[n?"startOffset":"endOffset"],1==r.nodeType&&(o=r.childNodes.length-1,!n&&i&&i--,r=r.childNodes[i>o?o:i]),3===r.nodeType&&n&&i>=r.nodeValue.length&&(r=new e(r,s.getBody()).next()||r),3!==r.nodeType||n||0!==i||(r=new e(r,s.getBody()).prev()||r),r}function $(t,n,r,i){function o(e){var t=Y.create("span",{id:g,"data-mce-bogus":!0,style:v?"color:red":""});return e&&t.appendChild(s.getDoc().createTextNode(ee)),t}function a(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==ee||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function c(e){for(;e;){if(e.id===g)return e;e=e.parentNode}}function u(t){var n;if(t)for(n=new e(t,t),t=n.current();t;t=n.next())if(3===t.nodeType)return t}function d(e,t){var n,r;if(e)r=X.getRng(!0),a(e)?(t!==!1&&(r.setStartBefore(e),r.setEndBefore(e)),Y.remove(e)):(n=u(e),n.nodeValue.charAt(0)===ee&&(n.deleteData(0,1),r.startContainer==n&&r.startOffset>0&&r.setStart(n,r.startOffset-1),r.endContainer==n&&r.endOffset>0&&r.setEnd(n,r.endOffset-1)),Y.remove(e,1)),X.setRng(r);else if(e=c(X.getStart()),!e)for(;e=Y.get(g);)d(e,!1)}function f(){var e,t,i,a,s,l,d;e=X.getRng(!0),a=e.startOffset,l=e.startContainer,d=l.nodeValue,t=c(X.getStart()),t&&(i=u(t)),d&&a>0&&a<d.length&&/\w/.test(d.charAt(a))&&/\w/.test(d.charAt(a-1))?(s=X.getBookmark(),e.collapse(!0),e=O(e,m(n)),e=K.split(e),x(n,r,e),X.moveToBookmark(s)):(t&&i.nodeValue===ee?x(n,r,t):(t=o(!0),i=t.firstChild,e.insertNode(t),a=1,x(n,r,t)),X.setCursorLocation(i,a))}function h(){var e=X.getRng(!0),t,a,s,c,u,d,f=[],h,p;for(t=e.startContainer,a=e.startOffset,u=t,3==t.nodeType&&(a!=t.nodeValue.length&&(c=!0),u=u.parentNode);u;){if(E(u,n,r,i)){d=u;break}u.nextSibling&&(c=!0),f.push(u),u=u.parentNode}if(d)if(c)s=X.getBookmark(),e.collapse(!0),e=O(e,m(n),!0),e=K.split(e),w(n,r,e),X.moveToBookmark(s);else{for(p=o(),u=p,h=f.length-1;h>=0;h--)u.appendChild(Y.clone(f[h],!1)),u=u.firstChild;u.appendChild(Y.doc.createTextNode(ee)),u=u.firstChild;var g=Y.getParent(d,l);g&&Y.isEmpty(g)?d.parentNode.replaceChild(p,d):Y.insertAfter(p,d),X.setCursorLocation(u,1),Y.isEmpty(d)&&Y.remove(d)}}function p(){var e;e=c(X.getStart()),e&&!Y.isEmpty(e)&&fe(e,function(e){1!=e.nodeType||e.id===g||Y.isEmpty(e)||Y.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var g="_mce_caret",v=s.settings.caret_debug;s._hasCaretEvents||(le=function(){var e=[],t;if(a(c(X.getStart()),e))for(t=e.length;t--;)Y.setAttrib(e[t],"data-mce-bogus","1")},se=function(e){var t=e.keyCode;d(),8==t&&X.isCollapsed()&&X.getStart().innerHTML==ee&&d(c(X.getStart())),37!=t&&39!=t||d(c(X.getStart())),p()},s.on("SetContent",function(e){e.selection&&p()}),s._hasCaretEvents=!0),"apply"==t?f():h()}function q(t){var n=t.startContainer,r=t.startOffset,i,o,a,s,l;if((t.startContainer!=t.endContainer||!u(t.startContainer.childNodes[t.startOffset]))&&(3==n.nodeType&&r>=n.nodeValue.length&&(r=Z(n),n=n.parentNode,i=!0),1==n.nodeType))for(s=n.childNodes,n=s[Math.min(r,s.length-1)],o=new e(n,Y.getParent(n,Y.isBlock)),(r>s.length-1||i)&&o.next(),a=o.current();a;a=o.next())if(3==a.nodeType&&!P(a))return l=Y.create("a",{"data-mce-bogus":"all"},ee),a.parentNode.insertBefore(l,a),t.setStart(a,0),X.setRng(t),void Y.remove(l)}var j={},Y=s.dom,X=s.selection,K=new t(Y),G=s.schema.isValidChild,J=Y.isBlock,Q=s.settings.forced_root_block,Z=Y.nodeIndex,ee="\ufeff",te=/^(src|href|style)$/,ne=!1,re=!0,ie,oe,ae=Y.getContentEditable,se,le,ce=n.isBookmarkNode,ue=i.each,de=i.grep,fe=i.walk,he=i.extend;he(this,{get:m,register:g,unregister:v,apply:x,remove:w,toggle:N,match:_,matchAll:S,matchNode:E,canApply:k,formatChanged:T,getCssText:R}),h(),p(),s.on("BeforeGetContent",function(e){le&&"raw"!=e.format&&le()}),s.on("mouseup keydown",function(e){se&&se(e)})}}),r(Q,[I,d],function(e,t){return function(e){function n(){return e.serializer.getTrimmedContent()}function r(t){e.setDirty(t)}function i(e){o.typing=!1,o.add({},e)}var o=this,a=0,s=[],l,c,u=0;return e.on("init",function(){o.add()}),e.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&o.beforeChange()}),e.on("ExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&i(e)}),e.on("ObjectResizeStart Cut",function(){o.beforeChange()}),e.on("SaveContent ObjectResized blur",i),e.on("DragEnd",i),e.on("KeyUp",function(a){var l=a.keyCode;a.isDefaultPrevented()||((l>=33&&36>=l||l>=37&&40>=l||45==l||13==l||a.ctrlKey)&&(i(),e.nodeChanged()),(46==l||8==l||t.mac&&(91==l||93==l))&&e.nodeChanged(),c&&o.typing&&(e.isDirty()||(r(s[0]&&n()!=s[0].content),e.isDirty()&&e.fire("change",{level:s[0],lastLevel:null})),e.fire("TypingUndo"),c=!1,e.nodeChanged()))}),e.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented()){if(t>=33&&36>=t||t>=37&&40>=t||45==t)return void(o.typing&&i(e));var n=e.ctrlKey&&!e.altKey||e.metaKey;!(16>t||t>20)||224==t||91==t||o.typing||n||(o.beforeChange(),o.typing=!0,o.add({},e),c=!0)}}),e.on("MouseDown",function(e){o.typing&&i(e)}),e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo"),e.on("AddUndo Undo Redo ClearUndos",function(t){t.isDefaultPrevented()||e.nodeChanged()}),o={data:s,typing:!1,beforeChange:function(){u||(l=e.selection.getBookmark(2,!0))},add:function(t,i){var o,c=e.settings,d;if(t=t||{},t.content=n(),u||e.removed)return null;if(d=s[a],e.fire("BeforeAddUndo",{level:t,lastLevel:d,originalEvent:i}).isDefaultPrevented())return null;if(d&&d.content==t.content)return null;if(s[a]&&(s[a].beforeBookmark=l),c.custom_undo_redo_levels&&s.length>c.custom_undo_redo_levels){for(o=0;o<s.length-1;o++)s[o]=s[o+1];s.length--,a=s.length}t.bookmark=e.selection.getBookmark(2,!0),a<s.length-1&&(s.length=a+1),s.push(t),a=s.length-1;var f={level:t,lastLevel:d,originalEvent:i};return e.fire("AddUndo",f),a>0&&(r(!0),e.fire("change",f)),t},undo:function(){var t;return o.typing&&(o.add(),o.typing=!1),a>0&&(t=s[--a],e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(t.beforeBookmark),r(!0),e.fire("undo",{level:t})),t},redo:function(){var t;return a<s.length-1&&(t=s[++a],e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(t.bookmark),r(!0),e.fire("redo",{level:t})),t},clear:function(){s=[],a=0,o.typing=!1,o.data=s,e.fire("ClearUndos")},hasUndo:function(){return a>0||o.typing&&s[0]&&n()!=s[0].content},hasRedo:function(){return a<s.length-1&&!this.typing},transact:function(e){o.beforeChange();try{u++,e()}finally{u--}return o.add()},extra:function(t,n){var r,i;o.transact(t)&&(i=s[a].bookmark,r=s[a-1],e.setContent(r.content,{format:"raw"}),e.selection.moveToBookmark(r.beforeBookmark),o.transact(n)&&(s[a-1].beforeBookmark=i))}}}}),r(Z,[y,T,d],function(e,t,n){var r=n.ie&&n.ie<11;return function(i){function o(o){function h(e){return e&&a.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==a.getContentEditable(e)}function p(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)}function m(e){var t;a.isBlock(e)&&(t=s.getRng(),e.appendChild(a.create("span",null,"\xa0")),s.select(e),e.lastChild.outerHTML="",s.setRng(t))}function g(e){var t=e,n=[],r;if(t){for(;t=t.firstChild;){if(a.isBlock(t))return;1!=t.nodeType||d[t.nodeName.toLowerCase()]||n.push(t)}for(r=n.length;r--;)t=n[r],!t.hasChildNodes()||t.firstChild==t.lastChild&&""===t.firstChild.nodeValue?a.remove(t):"A"==t.nodeName&&" "===(t.innerText||t.textContent)&&a.remove(t)}}function v(t){function r(e){for(;e;){if(1==e.nodeType||3==e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}var i,o,l,c=t,u;if(t){if(n.ie&&n.ie<9&&M&&M.firstChild&&M.firstChild==M.lastChild&&"BR"==M.firstChild.tagName&&a.remove(M.firstChild),/^(LI|DT|DD)$/.test(t.nodeName)){var d=r(t.firstChild);d&&/^(UL|OL|DL)$/.test(d.nodeName)&&t.insertBefore(a.doc.createTextNode("\xa0"),t.firstChild)}if(l=a.createRng(),n.ie||t.normalize(),t.hasChildNodes()){for(i=new e(t,t);o=i.current();){if(3==o.nodeType){l.setStart(o,0),l.setEnd(o,0);break}if(f[o.nodeName.toLowerCase()]){l.setStartBefore(o),l.setEndBefore(o);break}c=o,o=i.next()}o||(l.setStart(c,0),l.setEnd(c,0))}else"BR"==t.nodeName?t.nextSibling&&a.isBlock(t.nextSibling)?((!P||9>P)&&(u=a.create("br"),t.parentNode.insertBefore(u,t)),l.setStartBefore(t),l.setEndBefore(t)):(l.setStartAfter(t),l.setEndAfter(t)):(l.setStart(t,0),l.setEnd(t,0));s.setRng(l),a.remove(u),s.scrollIntoView(t)}}function y(e){var t=l.forced_root_block;t&&t.toLowerCase()===e.tagName.toLowerCase()&&a.setAttribs(e,l.forced_root_block_attrs)}function b(e){e.innerHTML=r?"":'<br data-mce-bogus="1">'}function C(e){var t=D,n,i,o,s=u.getTextInlineElements();if(e||"TABLE"==z?(n=a.create(e||W),y(n)):n=M.cloneNode(!1),o=n,l.keep_styles!==!1)do if(s[t.nodeName]){if("_mce_caret"==t.id)continue;i=t.cloneNode(!1),a.setAttrib(i,"id",""),n.hasChildNodes()?(i.appendChild(n.firstChild),n.appendChild(i)):(o=i,n.appendChild(i))}while((t=t.parentNode)&&t!=B);return r||(o.innerHTML='<br data-mce-bogus="1">'),n}function x(t){var n,r,i;if(3==D.nodeType&&(t?L>0:L<D.nodeValue.length))return!1;if(D.parentNode==M&&V&&!t)return!0;if(t&&1==D.nodeType&&D==M.firstChild)return!0;if("TABLE"===D.nodeName||D.previousSibling&&"TABLE"==D.previousSibling.nodeName)return V&&!t||!V&&t;for(n=new e(D,M),3==D.nodeType&&(t&&0===L?n.prev():t||L!=D.nodeValue.length||n.next());r=n.current();){if(1===r.nodeType){if(!r.getAttribute("data-mce-bogus")&&(i=r.nodeName.toLowerCase(),d[i]&&"br"!==i))return!1}else if(3===r.nodeType&&!/^[ \t\r\n]*$/.test(r.nodeValue))return!1;t?n.prev():n.next()}return!0}function w(e,t){var n,r,o,s,l,c,d=W||"P";if(r=a.getParent(e,a.isBlock),!r||!h(r)){if(r=r||B,c=r==i.getBody()||p(r)?r.nodeName.toLowerCase():r.parentNode.nodeName.toLowerCase(),!r.hasChildNodes())return n=a.create(d),y(n),r.appendChild(n),R.setStart(n,0),R.setEnd(n,0),n;for(s=e;s.parentNode!=r;)s=s.parentNode;for(;s&&!a.isBlock(s);)o=s,s=s.previousSibling;if(o&&u.isValidChild(c,d.toLowerCase())){for(n=a.create(d),y(n),o.parentNode.insertBefore(n,o),s=o;s&&!a.isBlock(s);)l=s.nextSibling,n.appendChild(s),s=l;R.setStart(e,t),R.setEnd(e,t)}}return e}function N(){function e(e){for(var t=F[e?"firstChild":"lastChild"];t&&1!=t.nodeType;)t=t[e?"nextSibling":"previousSibling"];return t===M}function t(){var e=F.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:F}if(F!=i.getBody()){var n=F.parentNode.nodeName;/^(OL|UL|LI)$/.test(n)&&(W="LI"),O=W?C(W):a.create("BR"),e(!0)&&e()?"LI"==n?a.insertAfter(O,t()):a.replace(O,F):e(!0)?"LI"==n?(a.insertAfter(O,t()),O.appendChild(a.doc.createTextNode(" ")),O.appendChild(F)):F.parentNode.insertBefore(O,F):e()?(a.insertAfter(O,t()),m(O)):(F=t(),A=R.cloneRange(),A.setStartAfter(M),A.setEndAfter(F),I=A.extractContents(),"LI"==W&&"LI"==I.firstChild.nodeName?(O=I.firstChild,a.insertAfter(I,F)):(a.insertAfter(I,F),a.insertAfter(O,F))),a.remove(M),v(O),c.add()}}function E(){i.execCommand("InsertLineBreak",!1,o)}function _(e){do 3===e.nodeType&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;while(e)}function S(e){var t=a.getRoot(),n,r;for(n=e;n!==t&&"false"!==a.getContentEditable(n);)"true"===a.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==t?r:t}function k(e){var t;r||(e.normalize(),t=e.lastChild,t&&!/^(left|right)$/gi.test(a.getStyle(t,"float",!0))||a.add(e,"br"))}function T(){O=/^(H[1-6]|PRE|FIGURE)$/.test(z)&&"HGROUP"!=U?C(W):C(),l.end_container_on_empty_block&&h(F)&&a.isEmpty(M)?O=a.split(F,M):a.insertAfter(O,M),v(O)}var R,A,B,D,L,M,P,H,O,I,F,z,U,W,V;if(R=s.getRng(!0),!o.isDefaultPrevented()){if(!R.collapsed)return void i.execCommand("Delete");if(new t(a).normalize(R),D=R.startContainer,L=R.startOffset,W=(l.force_p_newlines?"p":"")||l.forced_root_block,W=W?W.toUpperCase():"",P=a.doc.documentMode,H=o.shiftKey,1==D.nodeType&&D.hasChildNodes()&&(V=L>D.childNodes.length-1,D=D.childNodes[Math.min(L,D.childNodes.length-1)]||D,L=V&&3==D.nodeType?D.nodeValue.length:0),B=S(D)){if(c.beforeChange(),!a.isBlock(B)&&B!=a.getRoot())return void(W&&!H||E());if((W&&!H||!W&&H)&&(D=w(D,L)),M=a.getParent(D,a.isBlock),F=M?a.getParent(M.parentNode,a.isBlock):null,z=M?M.nodeName.toUpperCase():"",U=F?F.nodeName.toUpperCase():"","LI"!=U||o.ctrlKey||(M=F,z=U),/^(LI|DT|DD)$/.test(z)){if(!W&&H)return void E();if(a.isEmpty(M))return void N()}if("PRE"==z&&l.br_in_pre!==!1){if(!H)return void E()}else if(!W&&!H&&"LI"!=z||W&&H)return void E();W&&M===i.getBody()||(W=W||"P",x()?T():x(!0)?(O=M.parentNode.insertBefore(C(),M),m(O),v(M)):(A=R.cloneRange(),A.setEndAfter(M),I=A.extractContents(),_(I),O=I.firstChild,a.insertAfter(I,M),g(O),k(M),a.isEmpty(M)&&b(M),O.normalize(),a.isEmpty(O)?(a.remove(O),T()):v(O)),a.setAttrib(O,"id",""),i.fire("NewBlock",{newBlock:O}),c.add())}}}var a=i.dom,s=i.selection,l=i.settings,c=i.undoManager,u=i.schema,d=u.getNonEmptyElements(),f=u.getMoveCaretBeforeOnEnterElements();i.on("keydown",function(e){13==e.keyCode&&o(e)!==!1&&e.preventDefault()})}}),r(ee,[],function(){return function(e){function t(){var t=i.getStart(),s=e.getBody(),l,c,u,d,f,h,p,m=-16777215,g,v,y,b,C;if(C=n.forced_root_block,t&&1===t.nodeType&&C){for(;t&&t!=s;){if(a[t.nodeName])return;t=t.parentNode}if(l=i.getRng(),l.setStart){c=l.startContainer,u=l.startOffset,d=l.endContainer,f=l.endOffset;try{v=e.getDoc().activeElement===s}catch(x){}}else l.item&&(t=l.item(0),l=e.getDoc().body.createTextRange(),l.moveToElementText(t)),v=l.parentElement().ownerDocument===e.getDoc(),y=l.duplicate(),y.collapse(!0),u=-1*y.move("character",m),y.collapsed||(y=l.duplicate(),y.collapse(!1),f=-1*y.move("character",m)-u);for(t=s.firstChild,b=s.nodeName.toLowerCase();t;)if((3===t.nodeType||1==t.nodeType&&!a[t.nodeName])&&o.isValidChild(b,C.toLowerCase())){if(3===t.nodeType&&0===t.nodeValue.length){p=t,t=t.nextSibling,r.remove(p);continue}h||(h=r.create(C,e.settings.forced_root_block_attrs),t.parentNode.insertBefore(h,t),g=!0),p=t,t=t.nextSibling,h.appendChild(p)}else h=null,t=t.nextSibling;if(g&&v){if(l.setStart)l.setStart(c,u),l.setEnd(d,f),i.setRng(l);else try{l=e.getDoc().body.createTextRange(),l.moveToElementText(s),l.collapse(!0),l.moveStart("character",u),f>0&&l.moveEnd("character",f),l.select()}catch(x){}e.nodeChanged()}}}var n=e.settings,r=e.dom,i=e.selection,o=e.schema,a=o.getBlockElements();n.forced_root_block&&e.on("NodeChange",t)}}),r(te,[z,y,_,$,k,U],function(e,t,n,r,i,o){function a(e){return e>0}function s(e){return 0>e}function l(e,n,r,i,o){var l=new t(e,i);if(s(n)){if(C(e)&&(e=l.prev(!0),r(e)))return e;for(;e=l.prev(o);)if(r(e))return e}if(a(n)){if(C(e)&&(e=l.next(!0),r(e)))return e;for(;e=l.next(o);)if(r(e))return e}return null}function c(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode)if(b(e))return e;return t}function u(e,t){for(;e&&e!=t;){if(x(e))return e;e=e.parentNode}return null}function d(e,t,n){return u(e.container(),n)==u(t.container(),n)}function f(e,t,n){return c(e.container(),n)==c(t.container(),n)}function h(e,t){var n,r;return t?(n=t.container(),r=t.offset(),E(n)?n.childNodes[r+e]:null):null}function p(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n}function m(e,t,n){return u(t,e)==u(n,e)}function g(e,t,n){var r,i;for(i=e?"previousSibling":"nextSibling";n&&n!=t;){if(r=n[i],w(r)&&(r=r[i]),C(r)){if(m(t,r,n))return r;break}if(_(r))break;n=n.parentNode}return null}function v(e,t,r){var o,a,s,l,c=N(g,!0,t),u=N(g,!1,t);if(a=r.startContainer,s=r.startOffset,i.isCaretContainerBlock(a)){if(E(a)||(a=a.parentNode),l=a.getAttribute("data-mce-caret"),"before"==l&&(o=a.nextSibling,C(o)))return S(o);if("after"==l&&(o=a.previousSibling,C(o)))return k(o)}if(!r.collapsed)return r;if(n.isText(a)){if(w(a)){if(1===e){if(o=u(a))return S(o);if(o=c(a))return k(o)}if(-1===e){if(o=c(a))return k(o);if(o=u(a))return S(o)}return r}if(i.endsWithCaretContainer(a)&&s>=a.data.length-1)return 1===e&&(o=u(a))?S(o):r;if(i.startsWithCaretContainer(a)&&1>=s)return-1===e&&(o=c(a))?k(o):r;if(s===a.data.length)return o=u(a),o?S(o):r;if(0===s)return o=c(a),o?k(o):r}return r}function y(e,t){return C(h(e,t))}var b=n.isContentEditableTrue,C=n.isContentEditableFalse,x=n.matchStyleValues("display","block table table-cell table-caption"),w=i.isCaretContainer,N=e.curry,E=n.isElement,_=o.isCaretCandidate,S=N(p,!0),k=N(p,!1);return{isForwards:a,isBackwards:s,findNode:l,getEditingHost:c,getParentBlock:u,isInSameBlock:d,isInSameEditingHost:f,isBeforeContentEditableFalse:N(y,0),isAfterContentEditableFalse:N(y,-1),normalizeRange:v}}),r(ne,[_,U,$,te,p,z],function(e,t,n,r,i,o){function a(e,t){for(var n=[];e&&e!=t;)n.push(e),e=e.parentNode;return n}function s(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null}function l(e,t){if(m(e)){if(v(t.previousSibling)&&!f(t.previousSibling))return n.before(t);if(f(t))return n(t,0)}if(g(e)){if(v(t.nextSibling)&&!f(t.nextSibling))return n.after(t);if(f(t))return n(t,t.data.length)}return g(e)?p(t)?n.before(t):n.after(t):n.before(t)}function c(t,i){var o;return e.isBr(t)?(o=u(1,n.after(t),i),o?!r.isInSameBlock(n.before(t),n.before(o),i):!1):!1}function u(e,t,p){var C,x,w,N,E,_,S;if(!h(p)||!t)return null;if(S=t,C=S.container(),x=S.offset(),f(C)){if(g(e)&&x>0)return n(C,--x);if(m(e)&&x<C.length)return n(C,++x);w=C}else{if(g(e)&&x>0&&(N=s(C,x-1),v(N)))return!y(N)&&(E=r.findNode(N,e,b,N))?f(E)?n(E,E.data.length):n.after(E):f(N)?n(N,N.data.length):n.before(N);if(m(e)&&x<C.childNodes.length&&(N=s(C,x),v(N)))return c(N,p)?u(e,n.after(N),p):!y(N)&&(E=r.findNode(N,e,b,N))?f(E)?n(E,0):n.before(E):f(N)?n(N,0):n.after(N);w=S.getNode()}return(m(e)&&S.isAtEnd()||g(e)&&S.isAtStart())&&(w=r.findNode(w,e,o.constant(!0),p,!0),b(w))?l(e,w):(N=r.findNode(w,e,b,p),_=i.last(i.filter(a(C,p),d)),!_||N&&_.contains(N)?N?l(e,N):null:S=m(e)?n.after(_):n.before(_))}var d=e.isContentEditableFalse,f=e.isText,h=e.isElement,p=e.isBr,m=r.isForwards,g=r.isBackwards,v=t.isCaretCandidate,y=t.isAtomic,b=t.isEditableCaretCandidate;return function(e){return{next:function(t){return u(1,t,e)},prev:function(t){return u(-1,t,e)}}}}),r(re,[m,ne,$],function(e,t,n){var r=function(e){var t=e.firstChild,n=e.lastChild;return t&&"meta"===t.name&&(t=t.next),n&&"mce_marker"===n.attr("id")&&(n=n.prev),t&&t===n?"ul"===t.name||"ol"===t.name:!1},i=function(e){var t=e.firstChild,n=e.lastChild;return t&&"META"===t.nodeName&&t.parentNode.removeChild(t),n&&"mce_marker"===n.id&&n.parentNode.removeChild(n),e},o=function(e,t,n){var r=t.serialize(n),o=e.createFragment(r);return i(o)},a=function(t){return e.grep(t.childNodes,function(e){return"LI"===e.nodeName})},s=function(e){return!e.firstChild},l=function(e){return e.length>0&&s(e[e.length-1])?e.slice(0,-1):e},c=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},u=function(e,t){return!!c(e,t)},d=function(e,t){var n=t.cloneRange(),r=t.cloneRange();return n.setStartBefore(e),r.setEndAfter(e),[n.cloneContents(),r.cloneContents()]},f=function(e,r){var i=n.before(e),o=new t(r),a=o.next(i);return a?a.toRange():null},h=function(e,r){var i=n.after(e),o=new t(r),a=o.prev(i);return a?a.toRange():null},p=function(t,n,r,i){var o=d(t,i),a=t.parentNode;return a.insertBefore(o[0],t),e.each(n,function(e){a.insertBefore(e,t)}),a.insertBefore(o[1],t),a.removeChild(t),h(n[n.length-1],r)},m=function(t,n,r){var i=t.parentNode;return e.each(n,function(e){i.insertBefore(e,t)}),f(t,r)},g=function(e,t,n,r){return r.insertAfter(t.reverse(),e),h(t[0],n)},v=function(e,r,i,s){var u=o(r,e,s),d=c(r,i.startContainer),f=l(a(u.firstChild)),h=1,v=2,y=r.getRoot(),b=function(e){var o=n.fromRangeStart(i),a=new t(r.getRoot()),s=e===h?a.prev(o):a.next(o);return s?c(r,s.getNode())!==d:!0};return b(h)?m(d,f,y):b(v)?g(d,f,y,r):p(d,f,y,i)};return{isListFragment:r,insertAtCaret:v,isParentBlockLi:u,trimListItems:l,listItems:a}}),r(ie,[d,m,P,ne,$,X,_,re],function(e,t,n,r,i,o,a,s){var l=a.matchNodeNames("td th"),c=function(a,c,u){function d(e){function t(e){return r[e]&&3==r[e].nodeType}var n,r,i;return n=D.getRng(!0),r=n.startContainer,i=n.startOffset,3==r.nodeType&&(i>0?e=e.replace(/^&nbsp;/," "):t("previousSibling")||(e=e.replace(/^ /,"&nbsp;")),i<r.length?e=e.replace(/&nbsp;(<br>|)$/," "):t("nextSibling")||(e=e.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),e}function f(){var e,t,n;e=D.getRng(!0),t=e.startContainer,n=e.startOffset,3==t.nodeType&&e.collapsed&&("\xa0"===t.data[n]?(t.deleteData(n,1),/[\u00a0| ]$/.test(c)||(c+=" ")):"\xa0"===t.data[n-1]&&(t.deleteData(n-1,1),/[\u00a0| ]$/.test(c)||(c=" "+c)))}function h(){if(A){var e=a.getBody(),n=new o(L);t.each(L.select("*[data-mce-fragment]"),function(t){for(var r=t.parentNode;r&&r!=e;r=r.parentNode)B[t.nodeName.toLowerCase()]&&n.compare(r,t)&&L.remove(t,!0)})}}function p(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}function m(e){t.each(e.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")})}function g(e){return!!e.getAttribute("data-mce-fragment")}function v(e){return e&&!a.schema.getShortEndedElements()[e.nodeName]}function y(t){function n(e){for(var t=a.getBody();e&&e!==t;e=e.parentNode)if("false"===a.dom.getContentEditable(e))return e;return null}function o(e){var t=i.fromRangeStart(e),n=new r(a.getBody());return t=n.next(t),t?t.toRange():void 0}var s,c,u;if(t){if(D.scrollIntoView(t),s=n(t))return L.remove(t),void D.select(s);S=L.createRng(),k=t.previousSibling,k&&3==k.nodeType?(S.setStart(k,k.nodeValue.length),e.ie||(T=t.nextSibling,T&&3==T.nodeType&&(k.appendData(T.data),T.parentNode.removeChild(T)))):(S.setStartBefore(t),S.setEndBefore(t)),c=L.getParent(t,L.isBlock),L.remove(t),c&&L.isEmpty(c)&&(a.$(c).empty(),S.setStart(c,0),S.setEnd(c,0),l(c)||g(c)||!(u=o(S))?L.add(c,L.create("br",{"data-mce-bogus":"1"})):(S=u,L.remove(c))),D.setRng(S)}}var b,C,x,w,N,E,_,S,k,T,R,A,B=a.schema.getTextInlineElements(),D=a.selection,L=a.dom;/^ | $/.test(c)&&(c=d(c)),b=a.parser,A=u.merge,C=new n({validate:a.settings.validate},a.schema),R='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',E={content:c,format:"html",selection:!0},a.fire("BeforeSetContent",E),c=E.content,-1==c.indexOf("{$caret}")&&(c+="{$caret}"),c=c.replace(/\{\$caret\}/,R),S=D.getRng();var M=S.startContainer||(S.parentElement?S.parentElement():null),P=a.getBody();M===P&&D.isCollapsed()&&L.isBlock(P.firstChild)&&v(P.firstChild)&&L.isEmpty(P.firstChild)&&(S=L.createRng(),S.setStart(P.firstChild,0),S.setEnd(P.firstChild,0),D.setRng(S)),D.isCollapsed()||(a.selection.setRng(a.selection.getRng()),a.getDoc().execCommand("Delete",!1,null),f()),x=D.getNode();var H={context:x.nodeName.toLowerCase(),
+data:u.data};if(N=b.parse(c,H),u.paste===!0&&s.isListFragment(N)&&s.isParentBlockLi(L,x))return S=s.insertAtCaret(C,L,a.selection.getRng(!0),N),a.selection.setRng(S),void a.fire("SetContent",E);if(p(N),k=N.lastChild,"mce_marker"==k.attr("id"))for(_=k,k=k.prev;k;k=k.walk(!0))if(3==k.type||!L.isBlock(k.name)){a.schema.isValidChild(k.parent.name,"span")&&k.parent.insert(_,k,"br"===k.name);break}if(a._selectionOverrides.showBlockCaretContainer(x),H.invalid){for(D.setContent(R),x=D.getNode(),w=a.getBody(),9==x.nodeType?x=k=w:k=x;k!==w;)x=k,k=k.parentNode;c=x==w?w.innerHTML:L.getOuterHTML(x),c=C.serialize(b.parse(c.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return C.serialize(N)}))),x==w?L.setHTML(w,c):L.setOuterHTML(x,c)}else c=C.serialize(N),k=x.firstChild,T=x.lastChild,!k||k===T&&"BR"===k.nodeName?L.setHTML(x,c):D.setContent(c);h(),y(L.get("mce_marker")),m(a.getBody()),a.fire("SetContent",E),a.addVisual()},u=function(e){var n;return"string"!=typeof e?(n=t.extend({paste:e.paste,data:{paste:e.paste}},e),{content:e.content,details:n}):{content:e,details:{}}},d=function(e,t){var n=u(t);c(e,n.content,n.details)};return{insertAtCaret:d}}),r(oe,[d,m,T,y,ie],function(e,n,r,i,o){var a=n.each,s=n.extend,l=n.map,c=n.inArray,u=n.explode,d=e.ie&&e.ie<11,f=!0,h=!1;return function(n){function p(e,t,r,i){var o,s,l=0;if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||i&&i.skip_focus||n.focus(),i=n.fire("BeforeExecCommand",{command:e,ui:t,value:r}),i.isDefaultPrevented())return!1;if(s=e.toLowerCase(),o=B.exec[s])return o(s,t,r),n.fire("ExecCommand",{command:e,ui:t,value:r}),!0;if(a(n.plugins,function(i){return i.execCommand&&i.execCommand(e,t,r)?(n.fire("ExecCommand",{command:e,ui:t,value:r}),l=!0,!1):void 0}),l)return l;if(n.theme&&n.theme.execCommand&&n.theme.execCommand(e,t,r))return n.fire("ExecCommand",{command:e,ui:t,value:r}),!0;try{l=n.getDoc().execCommand(e,t,r)}catch(c){}return l?(n.fire("ExecCommand",{command:e,ui:t,value:r}),!0):!1}function m(e){var t;if(!n.quirks.isHidden()){if(e=e.toLowerCase(),t=B.state[e])return t(e);try{return n.getDoc().queryCommandState(e)}catch(r){}return!1}}function g(e){var t;if(!n.quirks.isHidden()){if(e=e.toLowerCase(),t=B.value[e])return t(e);try{return n.getDoc().queryCommandValue(e)}catch(r){}}}function v(e,t){t=t||"exec",a(e,function(e,n){a(n.toLowerCase().split(","),function(n){B[t][n]=e})})}function y(e,t,r){e=e.toLowerCase(),B.exec[e]=function(e,i,o,a){return t.call(r||n,i,o,a)}}function b(e){if(e=e.toLowerCase(),B.exec[e])return!0;try{return n.getDoc().queryCommandSupported(e)}catch(t){}return!1}function C(e,t,r){e=e.toLowerCase(),B.state[e]=function(){return t.call(r||n)}}function x(e,t,r){e=e.toLowerCase(),B.value[e]=function(){return t.call(r||n)}}function w(e){return e=e.toLowerCase(),!!B.exec[e]}function N(e,r,i){return r===t&&(r=h),i===t&&(i=null),n.getDoc().execCommand(e,r,i)}function E(e){return A.match(e)}function _(e,r){A.toggle(e,r?{value:r}:t),n.nodeChanged()}function S(e){L=R.getBookmark(e)}function k(){R.moveToBookmark(L)}var T,R,A,B={state:{},exec:{},value:{}},D=n.settings,L;n.on("PreInit",function(){T=n.dom,R=n.selection,D=n.settings,A=n.formatter}),s(this,{execCommand:p,queryCommandState:m,queryCommandValue:g,queryCommandSupported:b,addCommands:v,addCommand:y,addQueryStateHandler:C,addQueryValueHandler:x,hasCustomCommand:w}),v({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(t){var r=n.getDoc(),i;try{N(t)}catch(o){i=f}if("paste"!==t||r.queryCommandEnabled(t)||(i=!0),i||!r.queryCommandSupported(t)){var a=n.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");e.mac&&(a=a.replace(/Ctrl\+/g,"\u2318+")),n.notificationManager.open({text:a,type:"error"})}},unlink:function(){if(R.isCollapsed()){var e=R.getNode();return void("A"==e.tagName&&n.dom.remove(e,!0))}A.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"==t&&(t="justify"),a("left,center,right,justify".split(","),function(e){t!=e&&A.remove("align"+e)}),"none"!=t&&_("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;N(e),t=T.getParent(R.getNode(),"ol,ul"),t&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(S(),T.split(n,t),k()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){_(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){_(e,n)},FontSize:function(e,t,n){var r,i;n>=1&&7>=n&&(i=u(D.font_size_style_values),r=u(D.font_size_classes),n=r?r[n-1]||n:i[n-1]||n),_(e,n)},RemoveFormat:function(e){A.remove(e)},mceBlockQuote:function(){_("blockquote")},FormatBlock:function(e,t,n){return _(n||"p")},mceCleanup:function(){var e=R.getBookmark();n.setContent(n.getContent({cleanup:f}),{cleanup:f}),R.moveToBookmark(e)},mceRemoveNode:function(e,t,r){var i=r||R.getNode();i!=n.getBody()&&(S(),n.dom.remove(i,f),k())},mceSelectNodeDepth:function(e,t,r){var i=0;T.getParent(R.getNode(),function(e){return 1==e.nodeType&&i++==r?(R.select(e),h):void 0},n.getBody())},mceSelectNode:function(e,t,n){R.select(n)},mceInsertContent:function(e,t,r){o.insertAtCaret(n,r)},mceInsertRawHTML:function(e,t,r){R.setContent("tiny_mce_marker"),n.setContent(n.getContent().replace(/tiny_mce_marker/g,function(){return r}))},mceToggleFormat:function(e,t,n){_(n)},mceSetContent:function(e,t,r){n.setContent(r)},"Indent,Outdent":function(e){var t,r,i;t=D.indentation,r=/[a-z%]+$/i.exec(t),t=parseInt(t,10),m("InsertUnorderedList")||m("InsertOrderedList")?N(e):(D.forced_root_block||T.getParent(R.getNode(),T.isBlock)||A.apply("div"),a(R.getSelectedBlocks(),function(o){if("false"!==T.getContentEditable(o)&&"LI"!=o.nodeName){var a=n.getParam("indent_use_margin",!1)?"margin":"padding";a+="rtl"==T.getStyle(o,"direction",!0)?"Right":"Left","outdent"==e?(i=Math.max(0,parseInt(o.style[a]||0,10)-t),T.setStyle(o,a,i?i+r:"")):(i=parseInt(o.style[a]||0,10)+t+r,T.setStyle(o,a,i))}}))},mceRepaint:function(){},InsertHorizontalRule:function(){n.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual,n.addVisual()},mceReplaceContent:function(e,t,r){n.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,R.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=T.getParent(R.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||A.remove("link"),n.href&&A.apply("link",n,r)},selectAll:function(){var e=T.getRoot(),t;R.getRng().setStart?(t=T.createRng(),t.setStart(e,0),t.setEnd(e,e.childNodes.length),R.setRng(t)):(t=R.getRng(),t.item||(t.moveToElementText(e),t.select()))},"delete":function(){N("Delete");var e=n.getBody();T.isEmpty(e)&&(n.setContent(""),e.firstChild&&T.isBlock(e.firstChild)?n.selection.setCursorLocation(e.firstChild,0):n.selection.setCursorLocation(e,0))},mceNewDocument:function(){n.setContent("")},InsertLineBreak:function(e,t,o){function a(){for(var e=new i(m,v),t,r=n.schema.getNonEmptyElements();t=e.next();)if(r[t.nodeName.toLowerCase()]||t.length>0)return!0}var s=o,l,c,u,h=R.getRng(!0);new r(T).normalize(h);var p=h.startOffset,m=h.startContainer;if(1==m.nodeType&&m.hasChildNodes()){var g=p>m.childNodes.length-1;m=m.childNodes[Math.min(p,m.childNodes.length-1)]||m,p=g&&3==m.nodeType?m.nodeValue.length:0}var v=T.getParent(m,T.isBlock),y=v?v.nodeName.toUpperCase():"",b=v?T.getParent(v.parentNode,T.isBlock):null,C=b?b.nodeName.toUpperCase():"",x=s&&s.ctrlKey;"LI"!=C||x||(v=b,y=C),m&&3==m.nodeType&&p>=m.nodeValue.length&&(d||a()||(l=T.create("br"),h.insertNode(l),h.setStartAfter(l),h.setEndAfter(l),c=!0)),l=T.create("br"),h.insertNode(l);var w=T.doc.documentMode;return d&&"PRE"==y&&(!w||8>w)&&l.parentNode.insertBefore(T.doc.createTextNode("\r"),l),u=T.create("span",{},"&nbsp;"),l.parentNode.insertBefore(u,l),R.scrollIntoView(u),T.remove(u),c?(h.setStartBefore(l),h.setEndBefore(l)):(h.setStartAfter(l),h.setEndAfter(l)),R.setRng(h),n.undoManager.add(),f}}),v({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=R.isCollapsed()?[T.getParent(R.getNode(),T.isBlock)]:R.getSelectedBlocks(),r=l(n,function(e){return!!A.matchNode(e,t)});return-1!==c(r,f)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return E(e)},mceBlockQuote:function(){return E("blockquote")},Outdent:function(){var e;if(D.inline_styles){if((e=T.getParent(R.getStart(),T.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return f;if((e=T.getParent(R.getEnd(),T.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return f}return m("InsertUnorderedList")||m("InsertOrderedList")||!D.inline_styles&&!!T.getParent(R.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=T.getParent(R.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),v({"FontSize,FontName":function(e){var t=0,n;return(n=T.getParent(R.getNode(),"span"))&&(t="fontsize"==e?n.style.fontSize:n.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),t}},"value"),v({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}}),r(ae,[m],function(e){function t(e,o){var a=this,s,l;if(e=r(e),o=a.settings=o||{},s=o.base_uri,/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(a.source=e);var c=0===e.indexOf("//");0!==e.indexOf("/")||c||(e=(s?s.protocol||"http":"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(l=o.base_uri?o.base_uri.path:new t(location.href).directory,""===o.base_uri.protocol?e="//mce_host"+a.toAbsPath(l,e):(e=/([^#?]*)([#?]?.*)/.exec(e),e=(s&&s.protocol||"http")+"://mce_host"+a.toAbsPath(l,e[1])+e[2])),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),n(i,function(t,n){var r=e[n];r&&(r=r.replace(/\(mce_at\)/g,"@@")),a[t]=r}),s&&(a.protocol||(a.protocol=s.protocol),a.userInfo||(a.userInfo=s.userInfo),a.port||"mce_host"!==a.host||(a.port=s.port),a.host&&"mce_host"!==a.host||(a.host=s.host),a.source=""),c&&(a.protocol="")}var n=e.each,r=e.trim,i="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),o={ftp:21,http:80,https:443,mailto:25};return t.prototype={setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var n=this,r;if("./"===e)return e;if(e=new t(e,{base_uri:n}),"mce_host"!=e.host&&n.host!=e.host&&e.host||n.port!=e.port||n.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var i=n.getURI(),o=e.getURI();return i==o||"/"==i.charAt(i.length-1)&&i.substr(0,i.length-1)==o?i:(r=n.toRelPath(n.path,e.path),e.query&&(r+="?"+e.query),e.anchor&&(r+="#"+e.anchor),r)},toAbsolute:function(e,n){return e=new t(e,{base_uri:this}),e.getURI(n&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=o[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r=0,i="",o,a;if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(o=0,a=e.length;a>o;o++)if(o>=n.length||e[o]!=n[o]){r=o+1;break}if(e.length<n.length)for(o=0,a=n.length;a>o;o++)if(o>=e.length||e[o]!=n[o]){r=o+1;break}if(1===r)return t;for(o=0,a=e.length-(r-1);a>o;o++)i+="../";for(o=r-1,a=n.length;a>o;o++)i+=o!=r-1?"/"+n[o]:n[o];return i},toAbsPath:function(e,t){var r,i=0,o=[],a,s;for(a=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),n(e,function(e){e&&o.push(e)}),e=o,r=t.length-1,o=[];r>=0;r--)0!==t[r].length&&"."!==t[r]&&(".."!==t[r]?i>0?i--:o.push(t[r]):i++);return r=e.length-i,s=0>=r?o.reverse().join("/"):e.slice(0,r).join("/")+"/"+o.reverse().join("/"),0!==s.indexOf("/")&&(s="/"+s),a&&s.lastIndexOf("/")!==s.length-1&&(s+=a),s},getURI:function(e){var t,n=this;return n.source&&!e||(t="",e||(t+=n.protocol?n.protocol+"://":"//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},t.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}},t.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},t}),r(se,[m],function(e){function t(){}var n=e.each,r=e.extend,i,o;return t.extend=i=function(e){function t(){var e,t,n,r=this;if(!o&&(r.init&&r.init.apply(r,arguments),t=r.Mixins))for(e=t.length;e--;)n=t[e],n.init&&n.init.apply(r,arguments)}function a(){return this}function s(e,t){return function(){var n=this,r=n._super,i;return n._super=c[e],i=t.apply(n,arguments),n._super=r,i}}var l=this,c=l.prototype,u,d,f;o=!0,u=new l,o=!1,e.Mixins&&(n(e.Mixins,function(t){for(var n in t)"init"!==n&&(e[n]=t[n])}),c.Mixins&&(e.Mixins=c.Mixins.concat(e.Mixins))),e.Methods&&n(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&n(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this,r;return e!==r?(t[n]=e,t):t[n]}}),e.Statics&&n(e.Statics,function(e,n){t[n]=e}),e.Defaults&&c.Defaults&&(e.Defaults=r({},c.Defaults,e.Defaults));for(d in e)f=e[d],"function"==typeof f&&c[d]?u[d]=s(d,f):u[d]=f;return t.prototype=u,t.constructor=t,t.extend=i,t},t}),r(le,[m],function(e){function t(t){function n(){return!1}function r(){return!0}function i(e,i){var o,s,l,c;if(e=e.toLowerCase(),i=i||{},i.type=e,i.target||(i.target=u),i.preventDefault||(i.preventDefault=function(){i.isDefaultPrevented=r},i.stopPropagation=function(){i.isPropagationStopped=r},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=r},i.isDefaultPrevented=n,i.isPropagationStopped=n,i.isImmediatePropagationStopped=n),t.beforeFire&&t.beforeFire(i),o=d[e])for(s=0,l=o.length;l>s;s++){if(c=o[s],c.once&&a(e,c.func),i.isImmediatePropagationStopped())return i.stopPropagation(),i;if(c.func.call(u,i)===!1)return i.preventDefault(),i}return i}function o(t,r,i,o){var a,s,l;if(r===!1&&(r=n),r)for(r={func:r},o&&e.extend(r,o),s=t.toLowerCase().split(" "),l=s.length;l--;)t=s[l],a=d[t],a||(a=d[t]=[],f(t,!0)),i?a.unshift(r):a.push(r);return c}function a(e,t){var n,r,i,o,a;if(e)for(o=e.toLowerCase().split(" "),n=o.length;n--;){if(e=o[n],r=d[e],!e){for(i in d)f(i,!1),delete d[i];return c}if(r){if(t)for(a=r.length;a--;)r[a].func===t&&(r=r.slice(0,a).concat(r.slice(a+1)),d[e]=r);else r.length=0;r.length||(f(e,!1),delete d[e])}}else{for(e in d)f(e,!1);d={}}return c}function s(e,t,n){return o(e,t,n,{once:!0})}function l(e){return e=e.toLowerCase(),!(!d[e]||0===d[e].length)}var c=this,u,d={},f;t=t||{},u=t.scope||c,f=t.toggleEvent||n,c.fire=i,c.on=o,c.off=a,c.once=s,c.has=l}var n=e.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend"," ");return t.isNative=function(e){return!!n[e.toLowerCase()]},t}),r(ce,[],function(){function e(e){this.create=e.create}return e.create=function(t,n){return new e({create:function(e,r){function i(t){e.set(r,t.value)}function o(e){t.set(n,e.value)}var a;return e.on("change:"+r,o),t.on("change:"+n,i),a=e._bindings,a||(a=e._bindings=[],e.on("destroy",function(){for(var e=a.length;e--;)a[e]()})),a.push(function(){t.off("change:"+n,i)}),t.get(n)}})},e}),r(ue,[le],function(e){function t(t){return t._eventDispatcher||(t._eventDispatcher=new e({scope:t,toggleEvent:function(n,r){e.isNative(n)&&t.toggleNativeEvent&&t.toggleNativeEvent(n,r)}})),t._eventDispatcher}return{fire:function(e,n,r){var i=this;if(i.removed&&"remove"!==e)return n;if(n=t(i).fire(e,n,r),r!==!1&&i.parent)for(var o=i.parent();o&&!n.isPropagationStopped();)o.fire(e,n,!1),o=o.parent();return n},on:function(e,n,r){return t(this).on(e,n,r)},off:function(e,n){return t(this).off(e,n)},once:function(e,n){return t(this).once(e,n)},hasEventListeners:function(e){return t(this).has(e)}}}),r(de,[ce,ue,se,m],function(e,t,n,r){function i(e){return e.nodeType>0}function o(e,t){var n,a;if(e===t)return!0;if(null===e||null===t)return e===t;if("object"!=typeof e||"object"!=typeof t)return e===t;if(r.isArray(t)){if(e.length!==t.length)return!1;for(n=e.length;n--;)if(!o(e[n],t[n]))return!1}if(i(e)||i(t))return e===t;a={};for(n in t){if(!o(e[n],t[n]))return!1;a[n]=!0}for(n in e)if(!a[n]&&!o(e[n],t[n]))return!1;return!0}return n.extend({Mixins:[t],init:function(t){var n,r;t=t||{};for(n in t)r=t[n],r instanceof e&&(t[n]=r.create(this,n));this.data=t},set:function(t,n){var r,i,a=this.data[t];if(n instanceof e&&(n=n.create(this,t)),"object"==typeof t){for(r in t)this.set(r,t[r]);return this}return o(a,n)||(this.data[t]=n,i={target:this,name:t,value:n,oldValue:a},this.fire("change:"+t,i),this.fire("change",i)),this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(t){return e.create(this,t)},destroy:function(){this.fire("destroy")}})}),r(fe,[se],function(e){function t(e){for(var t=[],n=e.length,r;n--;)r=e[n],r.__checked||(t.push(r),r.__checked=1);for(n=t.length;n--;)delete t[n].__checked;return t}var n=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i=/^\s*|\s*$/g,o,a=e.extend({init:function(e){function t(e){return e?(e=e.toLowerCase(),function(t){return"*"===e||t.type===e}):void 0}function o(e){return e?function(t){return t._name===e}:void 0}function a(e){return e?(e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.classes.contains(e[n]))return!1;return!0}):void 0}function s(e,t,n){return e?function(r){var i=r[e]?r[e]():"";return t?"="===t?i===n:"*="===t?i.indexOf(n)>=0:"~="===t?(" "+i+" ").indexOf(" "+n+" ")>=0:"!="===t?i!=n:"^="===t?0===i.indexOf(n):"$="===t?i.substr(i.length-n.length)===n:!1:!!n}:void 0}function l(e){var t;return e?(e=/(?:not\((.+)\))|(.+)/i.exec(e),e[1]?(t=u(e[1],[]),function(e){return!d(e,t)}):(e=e[2],function(t,n,r){return"first"===e?0===n:"last"===e?n===r-1:"even"===e?n%2===0:"odd"===e?n%2===1:t[e]?t[e]():!1})):void 0}function c(e,r,c){function u(e){e&&r.push(e)}var d;return d=n.exec(e.replace(i,"")),u(t(d[1])),u(o(d[2])),u(a(d[3])),u(s(d[4],d[5],d[6])),u(l(d[7])),r.pseudo=!!d[7],r.direct=c,r}function u(e,t){var n=[],i,o,a;do if(r.exec(""),o=r.exec(e),o&&(e=o[3],n.push(o[1]),o[2])){i=o[3];break}while(o);for(i&&u(i,t),e=[],a=0;a<n.length;a++)">"!=n[a]&&e.push(c(n[a],[],">"===n[a-1]));return t.push(e),t}var d=this.match;this._selectors=u(e,[])},match:function(e,t){var n,r,i,o,a,s,l,c,u,d,f,h,p;for(t=t||this._selectors,n=0,r=t.length;r>n;n++){for(a=t[n],o=a.length,p=e,h=0,i=o-1;i>=0;i--)for(c=a[i];p;){if(c.pseudo)for(f=p.parent().items(),u=d=f.length;u--&&f[u]!==p;);for(s=0,l=c.length;l>s;s++)if(!c[s](p,u,d)){s=l+1;break}if(s===l){h++;break}if(i===o-1)break;p=p.parent()}if(h===o)return!0}return!1},find:function(e){function n(e,t,i){var o,a,s,l,c,u=t[i];for(o=0,a=e.length;a>o;o++){for(c=e[o],s=0,l=u.length;l>s;s++)if(!u[s](c,o,a)){s=l+1;break}if(s===l)i==t.length-1?r.push(c):c.items&&n(c.items(),t,i+1);else if(u.direct)return;c.items&&n(c.items(),t,i)}}var r=[],i,s,l=this._selectors;if(e.items){for(i=0,s=l.length;s>i;i++)n(e.items(),l[i],0);s>1&&(r=t(r))}return o||(o=a.Collection),new o(r)}});return a}),r(he,[m,fe,se],function(e,t,n){var r,i,o=Array.prototype.push,a=Array.prototype.slice;return i={length:0,init:function(e){e&&this.add(e)},add:function(t){var n=this;return e.isArray(t)?o.apply(n,t):t instanceof r?n.add(t.toArray()):o.call(n,t),n},set:function(e){var t=this,n=t.length,r;for(t.length=0,t.add(e),r=t.length;n>r;r++)delete t[r];return t},filter:function(e){var n=this,i,o,a=[],s,l;for("string"==typeof e?(e=new t(e),l=function(t){return e.match(t)}):l=e,i=0,o=n.length;o>i;i++)s=n[i],l(s)&&a.push(s);return new r(a)},slice:function(){return new r(a.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(t){return e.each(this,t),this},toArray:function(){return e.toArray(this)},indexOf:function(e){for(var t=this,n=t.length;n--&&t[n]!==e;);return n},reverse:function(){return new r(e.toArray(this).reverse())},hasClass:function(e){return this[0]?this[0].classes.contains(e):!1},prop:function(e,t){var n=this,r,i;return t!==r?(n.each(function(n){n[e]&&n[e](t)}),n):(i=n[0],i&&i[e]?i[e]():void 0)},exec:function(t){var n=this,r=e.toArray(arguments).slice(1);return n.each(function(e){e[t]&&e[t].apply(e,r)}),n},remove:function(){for(var e=this.length;e--;)this[e].remove();return this},addClass:function(e){return this.each(function(t){t.classes.add(e)})},removeClass:function(e){return this.each(function(t){t.classes.remove(e)})}},e.each("fire on off show hide append prepend before after reflow".split(" "),function(t){i[t]=function(){var n=e.toArray(arguments);return this.each(function(e){t in e&&e[t].apply(e,n)}),this}}),e.each("text name disabled active selected checked visible parent value data".split(" "),function(e){i[e]=function(t){return this.prop(e,t)}}),r=n.extend(i),t.Collection=r,r}),r(pe,[m,w],function(e,t){var n=0;return{id:function(){return"mceu_"+n++},create:function(n,r,i){var o=document.createElement(n);return t.DOM.setAttribs(o,r),"string"==typeof i?o.innerHTML=i:e.each(i,function(e){e.nodeType&&o.appendChild(e)}),o},createFragment:function(e){return t.DOM.createFragment(e)},getWindowSize:function(){return t.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var r=e.getBoundingClientRect();t=Math.max(r.width||r.right-r.left,e.offsetWidth),n=Math.max(r.height||r.bottom-r.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,n){return t.DOM.getPos(e,n)},getViewPort:function(e){return t.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,n){return t.DOM.addClass(e,n)},removeClass:function(e,n){return t.DOM.removeClass(e,n)},hasClass:function(e,n){return t.DOM.hasClass(e,n)},toggleClass:function(e,n,r){return t.DOM.toggleClass(e,n,r)},css:function(e,n,r){return t.DOM.setStyle(e,n,r)},getRuntimeStyle:function(e,n){return t.DOM.getStyle(e,n,!0)},on:function(e,n,r,i){return t.DOM.bind(e,n,r,i)},off:function(e,n,r){return t.DOM.unbind(e,n,r)},fire:function(e,n,r){return t.DOM.fire(e,n,r)},innerHtml:function(e,n){t.DOM.setHTML(e,n)}}}),r(me,[],function(){return{parseBox:function(e){var t,n=10;if(e)return"number"==typeof e?(e=e||0,{top:e,left:e,bottom:e,right:e}):(e=e.split(" "),t=e.length,1===t?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],n)||0,right:parseInt(e[1],n)||0,bottom:parseInt(e[2],n)||0,left:parseInt(e[3],n)||0})},measureBox:function(e,t){function n(t){var n=document.defaultView;return n?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),n.getComputedStyle(e,null).getPropertyValue(t)):e.currentStyle[t]}function r(e){var t=parseFloat(n(e),10);return isNaN(t)?0:t}return{top:r(t+"TopWidth"),right:r(t+"RightWidth"),bottom:r(t+"BottomWidth"),left:r(t+"LeftWidth")}}}}),r(ge,[m],function(e){function t(){}function n(e){this.cls=[],this.cls._map={},this.onchange=e||t,this.prefix=""}return e.extend(n.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){for(var t=0;t<this.cls.length&&this.cls[t]!==e;t++);this.cls.splice(t,1),delete this.cls._map[e],this._change()}return this},toggle:function(e,t){var n=this.contains(e);return n!==t&&(n?this.remove(e):this.add(e),this._change()),this},contains:function(e){return!!this.cls._map[e]},_change:function(){delete this.clsValue,this.onchange.call(this)}}),n.prototype.toString=function(){var e;if(this.clsValue)return this.clsValue;e="";for(var t=0;t<this.cls.length;t++)t>0&&(e+=" "),e+=this.prefix+this.cls[t];return e},n}),r(ve,[u],function(e){var t={},n;return{add:function(r){var i=r.parent();if(i){if(!i._layout||i._layout.isNative())return;t[i._id]||(t[i._id]=i),n||(n=!0,e.requestAnimationFrame(function(){var e,r;n=!1;for(e in t)r=t[e],r.state.get("rendered")&&r.reflow();t={}},document.body))}},remove:function(e){t[e._id]&&delete t[e._id]}}}),r(ye,[se,m,le,de,he,pe,g,me,ge,ve],function(e,t,n,r,i,o,a,s,l,c){function u(e){return e._eventDispatcher||(e._eventDispatcher=new n({scope:e,toggleEvent:function(t,r){r&&n.isNative(t)&&(e._nativeEvents||(e._nativeEvents={}),e._nativeEvents[t]=!0,e.state.get("rendered")&&d(e))}})),e._eventDispatcher}function d(e){function t(t){var n=e.getParentCtrl(t.target);n&&n.fire(t.type,t)}function n(){var e=c._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),c._lastHoverCtrl=null)}function r(t){var n=e.getParentCtrl(t.target),r=c._lastHoverCtrl,i=0,o,a,s;if(n!==r){if(c._lastHoverCtrl=n,a=n.parents().toArray().reverse(),a.push(n),r){for(s=r.parents().toArray().reverse(),s.push(r),i=0;i<s.length&&a[i]===s[i];i++);for(o=s.length-1;o>=i;o--)r=s[o],r.fire("mouseleave",{target:r.getEl()})}for(o=i;o<a.length;o++)n=a[o],n.fire("mouseenter",{target:n.getEl()})}}function i(t){t.preventDefault(),"mousewheel"==t.type?(t.deltaY=-1/40*t.wheelDelta,t.wheelDeltaX&&(t.deltaX=-1/40*t.wheelDeltaX)):(t.deltaX=0,t.deltaY=t.detail),t=e.fire("wheel",t)}var o,s,l,c,u,d;if(u=e._nativeEvents){for(l=e.parents().toArray(),l.unshift(e),o=0,s=l.length;!c&&s>o;o++)c=l[o]._eventsRoot;for(c||(c=l[l.length-1]||e),e._eventsRoot=c,s=o,o=0;s>o;o++)l[o]._eventsRoot=c;var p=c._delegates;p||(p=c._delegates={});for(d in u){if(!u)return!1;"wheel"!==d||h?("mouseenter"===d||"mouseleave"===d?c._hasMouseEnter||(a(c.getEl()).on("mouseleave",n).on("mouseover",r),c._hasMouseEnter=1):p[d]||(a(c.getEl()).on(d,t),p[d]=!0),u[d]=!1):f?a(e.getEl()).on("mousewheel",i):a(e.getEl()).on("DOMMouseScroll",i)}}}var f="onmousewheel"in document,h=!1,p="mce-",m,g=0,v={Statics:{classPrefix:p},isRtl:function(){return m.rtl},classPrefix:p,init:function(e){function n(e){var t;for(e=e.split(" "),t=0;t<e.length;t++)i.classes.add(e[t])}var i=this,o,c;i.settings=e=t.extend({},i.Defaults,e),i._id=e.id||"mceu_"+g++,i._aria={role:e.role},i._elmCache={},i.$=a,i.state=new r({visible:!0,active:!1,disabled:!1,value:""}),i.data=new r(e.data),i.classes=new l(function(){i.state.get("rendered")&&(i.getEl().className=this.toString())}),i.classes.prefix=i.classPrefix,o=e.classes,o&&(i.Defaults&&(c=i.Defaults.classes,c&&o!=c&&n(c)),n(o)),t.each("title text name visible disabled active value".split(" "),function(t){t in e&&i[t](e[t])}),i.on("click",function(){return i.disabled()?!1:void 0}),i.settings=e,i.borderBox=s.parseBox(e.border),i.paddingBox=s.parseBox(e.padding),i.marginBox=s.parseBox(e.margin),e.hidden&&i.hide()},Properties:"parent,name",getContainerElm:function(){return document.body},getParentCtrl:function(e){for(var t,n=this.getRoot().controlIdLookup;e&&n&&!(t=n[e.id]);)e=e.parentNode;return t},initLayoutRect:function(){var e=this,t=e.settings,n,r,i=e.getEl(),a,l,c,u,d,f,h,p;n=e.borderBox=e.borderBox||s.measureBox(i,"border"),e.paddingBox=e.paddingBox||s.measureBox(i,"padding"),e.marginBox=e.marginBox||s.measureBox(i,"margin"),p=o.getSize(i),f=t.minWidth,h=t.minHeight,c=f||p.width,u=h||p.height,a=t.width,l=t.height,d=t.autoResize,d="undefined"!=typeof d?d:!a&&!l,a=a||c,l=l||u;var m=n.left+n.right,g=n.top+n.bottom,v=t.maxWidth||65535,y=t.maxHeight||65535;return e._layoutRect=r={x:t.x||0,y:t.y||0,w:a,h:l,deltaW:m,deltaH:g,contentW:a-m,contentH:l-g,innerW:a-m,innerH:l-g,startMinWidth:f||0,startMinHeight:h||0,minW:Math.min(c,v),minH:Math.min(u,y),maxW:v,maxH:y,autoResize:d,scrollW:0},e._lastLayoutRect={},r},layoutRect:function(e){var t=this,n=t._layoutRect,r,i,o,a,s,l;return n||(n=t.initLayoutRect()),e?(o=n.deltaW,a=n.deltaH,e.x!==s&&(n.x=e.x),e.y!==s&&(n.y=e.y),e.minW!==s&&(n.minW=e.minW),e.minH!==s&&(n.minH=e.minH),i=e.w,i!==s&&(i=i<n.minW?n.minW:i,i=i>n.maxW?n.maxW:i,n.w=i,n.innerW=i-o),i=e.h,i!==s&&(i=i<n.minH?n.minH:i,i=i>n.maxH?n.maxH:i,n.h=i,n.innerH=i-a),i=e.innerW,i!==s&&(i=i<n.minW-o?n.minW-o:i,i=i>n.maxW-o?n.maxW-o:i,n.innerW=i,n.w=i+o),i=e.innerH,i!==s&&(i=i<n.minH-a?n.minH-a:i,i=i>n.maxH-a?n.maxH-a:i,n.innerH=i,n.h=i+a),e.contentW!==s&&(n.contentW=e.contentW),e.contentH!==s&&(n.contentH=e.contentH),r=t._lastLayoutRect,r.x===n.x&&r.y===n.y&&r.w===n.w&&r.h===n.h||(l=m.repaintControls,l&&l.map&&!l.map[t._id]&&(l.push(t),l.map[t._id]=!0),r.x=n.x,r.y=n.y,r.w=n.w,r.h=n.h),t):n},repaint:function(){var e=this,t,n,r,i,o,a,s,l,c,u;c=document.createRange?function(e){return e}:Math.round,t=e.getEl().style,i=e._layoutRect,l=e._lastRepaintRect||{},o=e.borderBox,a=o.left+o.right,s=o.top+o.bottom,i.x!==l.x&&(t.left=c(i.x)+"px",l.x=i.x),i.y!==l.y&&(t.top=c(i.y)+"px",l.y=i.y),i.w!==l.w&&(u=c(i.w-a),t.width=(u>=0?u:0)+"px",l.w=i.w),i.h!==l.h&&(u=c(i.h-s),t.height=(u>=0?u:0)+"px",l.h=i.h),e._hasBody&&i.innerW!==l.innerW&&(u=c(i.innerW),r=e.getEl("body"),r&&(n=r.style,n.width=(u>=0?u:0)+"px"),l.innerW=i.innerW),e._hasBody&&i.innerH!==l.innerH&&(u=c(i.innerH),r=r||e.getEl("body"),r&&(n=n||r.style,n.height=(u>=0?u:0)+"px"),l.innerH=i.innerH),e._lastRepaintRect=l,e.fire("repaint",{},!1)},updateLayoutRect:function(){var e=this;e.parent()._lastRect=null,o.css(e.getEl(),{width:"",height:""}),e._layoutRect=e._lastRepaintRect=e._lastLayoutRect=null,e.initLayoutRect()},on:function(e,t){function n(e){var t,n;return"string"!=typeof e?e:function(i){return t||r.parentsAndSelf().each(function(r){var i=r.settings.callbacks;return i&&(t=i[e])?(n=r,!1):void 0}),t?t.call(n,i):(i.action=e,void this.fire("execute",i))}}var r=this;return u(r).on(e,n(t)),r},off:function(e,t){return u(this).off(e,t),this},fire:function(e,t,n){var r=this;if(t=t||{},t.control||(t.control=r),t=u(r).fire(e,t),n!==!1&&r.parent)for(var i=r.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return u(this).has(e)},parents:function(e){var t=this,n,r=new i;for(n=t.parent();n;n=n.parent())r.add(n);return e&&(r=r.filter(e)),r},parentsAndSelf:function(e){return new i(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=a("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,r=n.getEl(n.ariaTarget);return"undefined"==typeof t?n._aria[e]:(n._aria[e]=t,n.state.get("rendered")&&r.setAttribute("role"==e?e:"aria-"+e,t),n)},encode:function(e,t){return t!==!1&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return m.translate?m.translate(e):e},before:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t),!0),t},after:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t)),t},remove:function(){var e=this,t=e.getEl(),n=e.parent(),r,i;if(e.items){var o=e.items().toArray();for(i=o.length;i--;)o[i].remove()}n&&n.items&&(r=[],n.items().each(function(t){t!==e&&r.push(t);
+}),n.items().set(r),n._lastRect=null),e._eventsRoot&&e._eventsRoot==e&&a(t).off();var s=e.getRoot().controlIdLookup;return s&&delete s[e._id],t&&t.parentNode&&t.parentNode.removeChild(t),e.state.set("rendered",!1),e.state.destroy(),e.fire("remove"),e},renderBefore:function(e){return a(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return a(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'"></div>'},postRender:function(){var e=this,t=e.settings,n,r,i,o,s;e.$el=a(e.getEl()),e.state.set("rendered",!0);for(o in t)0===o.indexOf("on")&&e.on(o.substr(2),t[o]);if(e._eventsRoot){for(i=e.parent();!s&&i;i=i.parent())s=i._eventsRoot;if(s)for(o in s._nativeEvents)e._nativeEvents[o]=!0}d(e),t.style&&(n=e.getEl(),n&&(n.setAttribute("style",t.style),n.style.cssText=t.style)),e.settings.border&&(r=e.borderBox,e.$el.css({"border-top-width":r.top,"border-right-width":r.right,"border-bottom-width":r.bottom,"border-left-width":r.left}));var l=e.getRoot();l.controlIdLookup||(l.controlIdLookup={}),l.controlIdLookup[e._id]=e;for(var u in e._aria)e.aria(u,e._aria[u]);e.state.get("visible")===!1&&(e.getEl().style.display="none"),e.bindStates(),e.state.on("change:visible",function(t){var n=t.value,r;e.state.get("rendered")&&(e.getEl().style.display=n===!1?"none":"",e.getEl().getBoundingClientRect()),r=e.parent(),r&&(r._lastRect=null),e.fire(n?"show":"hide"),c.add(e)}),e.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){function t(e,t){var n,r,i=e;for(n=r=0;i&&i!=t&&i.nodeType;)n+=i.offsetLeft||0,r+=i.offsetTop||0,i=i.offsetParent;return{x:n,y:r}}var n=this.getEl(),r=n.parentNode,i,o,a,s,l,c,u=t(n,r);return i=u.x,o=u.y,a=n.offsetWidth,s=n.offsetHeight,l=r.clientWidth,c=r.clientHeight,"end"==e?(i-=l-a,o-=c-s):"center"==e&&(i-=l/2-a/2,o-=c/2-s/2),r.scrollLeft=i,r.scrollTop=o,this},getRoot:function(){for(var e=this,t,n=[];e;){if(e.rootControl){t=e.rootControl;break}n.push(e),t=e,e=e.parent()}t||(t=this);for(var r=n.length;r--;)n[r].rootControl=t;return t},reflow:function(){c.remove(this);var e=this.parent();return e._layout&&!e._layout.isNative()&&e.reflow(),this}};return t.each("text title visible disabled active value".split(" "),function(e){v[e]=function(t){return 0===arguments.length?this.state.get(e):("undefined"!=typeof t&&this.state.set(e,t),this)}}),m=e.extend(v)}),r(be,[],function(){var e={},t;return{add:function(t,n){e[t.toLowerCase()]=n},has:function(t){return!!e[t.toLowerCase()]},create:function(n,r){var i,o,a;if(!t){a=tinymce.ui;for(o in a)e[o.toLowerCase()]=a[o];t=!0}if("string"==typeof n?(r=r||{},r.type=n):(r=n,n=r.type),n=n.toLowerCase(),i=e[n],!i)throw new Error("Could not find control by type: "+n);return i=new i(r),i.type=n,i}}}),r(Ce,[],function(){return function(e){function t(e){return e&&1===e.nodeType}function n(e){return e=e||C,t(e)?e.getAttribute("role"):null}function r(e){for(var t,r=e||C;r=r.parentNode;)if(t=n(r))return t}function i(e){var n=C;return t(n)?n.getAttribute("aria-"+e):void 0}function o(e){var t=e.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t||"SELECT"==t}function a(e){return o(e)&&!e.hidden?!0:!!/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(n(e))}function s(e){function t(e){if(1==e.nodeType&&"none"!=e.style.display){a(e)&&n.push(e);for(var r=0;r<e.childNodes.length;r++)t(e.childNodes[r])}}var n=[];return t(e||b.getEl()),n}function l(e){var t,n;e=e||x,n=e.parents().toArray(),n.unshift(e);for(var r=0;r<n.length&&(t=n[r],!t.settings.ariaRoot);r++);return t}function c(e){var t=l(e),n=s(t.getEl());t.settings.ariaRemember&&"lastAriaIndex"in t?u(t.lastAriaIndex,n):u(0,n)}function u(e,t){return 0>e?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function d(e,t){var n=-1,r=l();t=t||s(r.getEl());for(var i=0;i<t.length;i++)t[i]===C&&(n=i);n+=e,r.lastAriaIndex=u(n,t)}function f(){var e=r();"tablist"==e?d(-1,s(C.parentNode)):x.parent().submenu?v():d(-1)}function h(){var e=n(),t=r();"tablist"==t?d(1,s(C.parentNode)):"menuitem"==e&&"menu"==t&&i("haspopup")?y():d(1)}function p(){d(-1)}function m(){var e=n(),t=r();"menuitem"==e&&"menubar"==t?y():"button"==e&&i("haspopup")?y({key:"down"}):d(1)}function g(e){var t=r();if("tablist"==t){var n=s(x.getEl("body"))[0];n&&n.focus()}else d(e.shiftKey?-1:1)}function v(){x.fire("cancel")}function y(e){e=e||{},x.fire("click",{target:C,aria:e})}var b=e.root,C,x;try{C=document.activeElement}catch(w){C=document.body}return x=b.getParentCtrl(C),b.on("keydown",function(e){function t(e,t){o(C)||"slider"!==n(C)&&t(e)!==!1&&e.preventDefault()}if(!e.isDefaultPrevented())switch(e.keyCode){case 37:t(e,f);break;case 39:t(e,h);break;case 38:t(e,p);break;case 40:t(e,m);break;case 27:v();break;case 14:case 13:case 32:t(e,y);break;case 9:g(e)!==!1&&e.preventDefault()}}),b.on("focusin",function(e){C=e.target,x=e.control}),{focusFirst:c}}}),r(xe,[ye,he,fe,be,Ce,m,g,ge,ve],function(e,t,n,r,i,o,a,s,l){var c={};return e.extend({init:function(e){var n=this;n._super(e),e=n.settings,e.fixed&&n.state.set("fixed",!0),n._items=new t,n.isRtl()&&n.classes.add("rtl"),n.bodyClasses=new s(function(){n.state.get("rendered")&&(n.getEl("body").className=this.toString())}),n.bodyClasses.prefix=n.classPrefix,n.classes.add("container"),n.bodyClasses.add("container-body"),e.containerCls&&n.classes.add(e.containerCls),n._layout=r.create((e.layout||"")+"layout"),n.settings.items?n.add(n.settings.items):n.add(n.render()),n._hasBody=!0},items:function(){return this._items},find:function(e){return e=c[e]=c[e]||new n(e),e.find(this)},add:function(e){var t=this;return t.items().add(t.create(e)).parent(t),t},focus:function(e){var t=this,n,r,i;return e&&(r=t.keyboardNav||t.parents().eq(-1)[0].keyboardNav)?void r.focusFirst(t):(i=t.find("*"),t.statusbar&&i.add(t.statusbar.items()),i.each(function(e){return e.settings.autofocus?(n=null,!1):void(e.canFocus&&(n=n||e))}),n&&n.focus(),t)},replace:function(e,t){for(var n,r=this.items(),i=r.length;i--;)if(r[i]===e){r[i]=t;break}i>=0&&(n=t.getEl(),n&&n.parentNode.removeChild(n),n=e.getEl(),n&&n.parentNode.removeChild(n)),t.parent(this)},create:function(t){var n=this,i,a=[];return o.isArray(t)||(t=[t]),o.each(t,function(t){t&&(t instanceof e||("string"==typeof t&&(t={type:t}),i=o.extend({},n.settings.defaults,t),t.type=i.type=i.type||t.type||n.settings.defaultType||(i.defaults?i.defaults.type:null),t=r.create(i)),a.push(t))}),a},renderNew:function(){var e=this;return e.items().each(function(t,n){var r;t.parent(e),t.state.get("rendered")||(r=e.getEl("body"),r.hasChildNodes()&&n<=r.childNodes.length-1?a(r.childNodes[n]).before(t.renderHtml()):a(r).append(t.renderHtml()),t.postRender(),l.add(t))}),e._layout.applyClasses(e.items().filter(":visible")),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){var t=this;return t.items().set(t.create(e).concat(t.items().toArray())),t.renderNew()},insert:function(e,t,n){var r=this,i,o,a;return e=r.create(e),i=r.items(),!n&&t<i.length-1&&(t+=1),t>=0&&t<i.length&&(o=i.slice(0,t).toArray(),a=i.slice(t).toArray(),i.set(o.concat(e,a))),r.renderNew()},fromJSON:function(e){var t=this;for(var n in e)t.find("#"+n).value(e[n]);return t},toJSON:function(){var e=this,t={};return e.find("*").each(function(e){var n=e.name(),r=e.value();n&&"undefined"!=typeof r&&(t[n]=r)}),t},renderHtml:function(){var e=this,t=e._layout,n=this.settings.role;return e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'"'+(n?' role="'+this.settings.role+'"':"")+'><div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"},postRender:function(){var e=this,t;return e.items().exec("postRender"),e._super(),e._layout.postRender(e),e.state.set("rendered",!0),e.settings.style&&e.$el.css(e.settings.style),e.settings.border&&(t=e.borderBox,e.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),e.parent()||(e.keyboardNav=new i({root:e})),e},initLayoutRect:function(){var e=this,t=e._super();return e._layout.recalc(e),t},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;return n&&n.w==t.w&&n.h==t.h?void 0:(e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0)},reflow:function(){var t;if(l.remove(this),this.visible()){for(e.repaintControls=[],e.repaintControls.map={},this.recalc(),t=e.repaintControls.length;t--;)e.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),e.repaintControls=[]}return this}})}),r(we,[g],function(e){function t(e){var t,n,r,i,o,a,s,l,c=Math.max;return t=e.documentElement,n=e.body,r=c(t.scrollWidth,n.scrollWidth),i=c(t.clientWidth,n.clientWidth),o=c(t.offsetWidth,n.offsetWidth),a=c(t.scrollHeight,n.scrollHeight),s=c(t.clientHeight,n.clientHeight),l=c(t.offsetHeight,n.offsetHeight),{width:o>r?i:r,height:l>a?s:a}}function n(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<t.length;n++)e[t[n]]=e.changedTouches[0][t[n]]}return function(r,i){function o(){return s.getElementById(i.handle||r)}var a,s=i.document||document,l,c,u,d,f,h;i=i||{},c=function(r){var c=t(s),p,m;n(r),r.preventDefault(),l=r.button,p=o(),f=r.screenX,h=r.screenY,m=window.getComputedStyle?window.getComputedStyle(p,null).getPropertyValue("cursor"):p.runtimeStyle.cursor,a=e("<div>").css({position:"absolute",top:0,left:0,width:c.width,height:c.height,zIndex:2147483647,opacity:1e-4,cursor:m}).appendTo(s.body),e(s).on("mousemove touchmove",d).on("mouseup touchend",u),i.start(r)},d=function(e){return n(e),e.button!==l?u(e):(e.deltaX=e.screenX-f,e.deltaY=e.screenY-h,e.preventDefault(),void i.drag(e))},u=function(t){n(t),e(s).off("mousemove touchmove",d).off("mouseup touchend",u),a.remove(),i.stop&&i.stop(t)},this.destroy=function(){e(o()).off()},e(o()).on("mousedown touchstart",c)}}),r(Ne,[g,we],function(e,t){return{init:function(){var e=this;e.on("repaint",e.renderScroll)},renderScroll:function(){function n(){function t(t,a,s,l,c,u){var d,f,h,p,m,g,v,y,b;if(f=i.getEl("scroll"+t)){if(y=a.toLowerCase(),b=s.toLowerCase(),e(i.getEl("absend")).css(y,i.layoutRect()[l]-1),!c)return void e(f).css("display","none");e(f).css("display","block"),d=i.getEl("body"),h=i.getEl("scroll"+t+"t"),p=d["client"+s]-2*o,p-=n&&r?f["client"+u]:0,m=d["scroll"+s],g=p/m,v={},v[y]=d["offset"+a]+o,v[b]=p,e(f).css(v),v={},v[y]=d["scroll"+a]*g,v[b]=p*g,e(h).css(v)}}var n,r,a;a=i.getEl("body"),n=a.scrollWidth>a.clientWidth,r=a.scrollHeight>a.clientHeight,t("h","Left","Width","contentW",n,"Height"),t("v","Top","Height","contentH",r,"Width")}function r(){function n(n,r,a,s,l){var c,u=i._id+"-scroll"+n,d=i.classPrefix;e(i.getEl()).append('<div id="'+u+'" class="'+d+"scrollbar "+d+"scrollbar-"+n+'"><div id="'+u+'t" class="'+d+'scrollbar-thumb"></div></div>'),i.draghelper=new t(u+"t",{start:function(){c=i.getEl("body")["scroll"+r],e("#"+u).addClass(d+"active")},drag:function(e){var t,u,d,f,h=i.layoutRect();u=h.contentW>h.innerW,d=h.contentH>h.innerH,f=i.getEl("body")["client"+a]-2*o,f-=u&&d?i.getEl("scroll"+n)["client"+l]:0,t=f/i.getEl("body")["scroll"+a],i.getEl("body")["scroll"+r]=c+e["delta"+s]/t},stop:function(){e("#"+u).removeClass(d+"active")}})}i.classes.add("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}var i=this,o=2;i.settings.autoScroll&&(i._hasScroll||(i._hasScroll=!0,r(),i.on("wheel",function(e){var t=i.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),e(i.getEl("body")).on("scroll",n)),n())}}}),r(Ee,[xe,Ne],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),"undefined"==typeof n?n='<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+t.renderHtml(e)+"</div>":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1" role="group">'+(e._preBodyHtml||"")+n+"</div>"}})}),r(_e,[pe],function(e){function t(t,n,r){var i,o,a,s,l,c,u,d,f,h;return f=e.getViewPort(),o=e.getPos(n),a=o.x,s=o.y,t.state.get("fixed")&&"static"==e.getRuntimeStyle(document.body,"position")&&(a-=f.x,s-=f.y),i=t.getEl(),h=e.getSize(i),l=h.width,c=h.height,h=e.getSize(n),u=h.width,d=h.height,r=(r||"").split(""),"b"===r[0]&&(s+=d),"r"===r[1]&&(a+=u),"c"===r[0]&&(s+=Math.round(d/2)),"c"===r[1]&&(a+=Math.round(u/2)),"b"===r[3]&&(s-=c),"r"===r[4]&&(a-=l),"c"===r[3]&&(s-=Math.round(c/2)),"c"===r[4]&&(a-=Math.round(l/2)),{x:a,y:s,w:l,h:c}}return{testMoveRel:function(n,r){for(var i=e.getViewPort(),o=0;o<r.length;o++){var a=t(this,n,r[o]);if(this.state.get("fixed")){if(a.x>0&&a.x+a.w<i.w&&a.y>0&&a.y+a.h<i.h)return r[o]}else if(a.x>i.x&&a.x+a.w<i.w+i.x&&a.y>i.y&&a.y+a.h<i.h+i.y)return r[o]}return r[0]},moveRel:function(e,n){"string"!=typeof n&&(n=this.testMoveRel(e,n));var r=t(this,e,n);return this.moveTo(r.x,r.y)},moveBy:function(e,t){var n=this,r=n.layoutRect();return n.moveTo(r.x+e,r.y+t),n},moveTo:function(t,n){function r(e,t,n){return 0>e?0:e+n>t?(e=t-n,0>e?0:e):e}var i=this;if(i.settings.constrainToViewport){var o=e.getViewPort(window),a=i.layoutRect();t=r(t,o.w+o.x,a.w),n=r(n,o.h+o.y,a.h)}return i.state.get("rendered")?i.layoutRect({x:t,y:n}).repaint():(i.settings.x=t,i.settings.y=n),i.fire("move",{x:t,y:n}),i}}}),r(Se,[pe],function(e){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,n){if(1>=t||1>=n){var r=e.getWindowSize();t=1>=t?t*r.w:t,n=1>=n?n*r.h:n}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:n,w:t,h:n}).reflow()},resizeBy:function(e,t){var n=this,r=n.layoutRect();return n.resizeTo(r.w+e,r.h+t)}}}),r(ke,[Ee,_e,Se,pe,g,u],function(e,t,n,r,i,o){function a(e,t){for(;e;){if(e==t)return!0;e=e.parent()}}function s(e){for(var t=v.length;t--;){var n=v[t],r=n.getParentCtrl(e.target);if(n.settings.autohide){if(r&&(a(r,n)||n.parent()===r))continue;e=n.fire("autohide",{target:e.target}),e.isDefaultPrevented()||n.hide()}}}function l(){p||(p=function(e){2!=e.button&&s(e)},i(document).on("click touchstart",p))}function c(){m||(m=function(){var e;for(e=v.length;e--;)d(v[e])},i(window).on("scroll",m))}function u(){if(!g){var e=document.documentElement,t=e.clientWidth,n=e.clientHeight;g=function(){document.all&&t==e.clientWidth&&n==e.clientHeight||(t=e.clientWidth,n=e.clientHeight,C.hideAll())},i(window).on("resize",g)}}function d(e){function t(t,n){for(var r,i=0;i<v.length;i++)if(v[i]!=e)for(r=v[i].parent();r&&(r=r.parent());)r==e&&v[i].fixed(t).moveBy(0,n).repaint()}var n=r.getViewPort().y;e.settings.autofix&&(e.state.get("fixed")?e._autoFixY>n&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),t(!1,e._autoFixY-n)):(e._autoFixY=e.layoutRect().y,e._autoFixY<n&&(e.fixed(!0).layoutRect({y:0}).repaint(),t(!0,n-e._autoFixY))))}function f(e,t){var n,r=C.zIndex||65535,o;if(e)y.push(t);else for(n=y.length;n--;)y[n]===t&&y.splice(n,1);if(y.length)for(n=0;n<y.length;n++)y[n].modal&&(r++,o=y[n]),y[n].getEl().style.zIndex=r,y[n].zIndex=r,r++;var a=i("#"+t.classPrefix+"modal-block",t.getContainerElm())[0];o?i(a).css("z-index",o.zIndex-1):a&&(a.parentNode.removeChild(a),b=!1),C.currentZIndex=r}function h(e){var t;for(t=v.length;t--;)v[t]===e&&v.splice(t,1);for(t=y.length;t--;)y[t]===e&&y.splice(t,1)}var p,m,g,v=[],y=[],b,C=e.extend({Mixins:[t,n],init:function(e){var t=this;t._super(e),t._eventsRoot=t,t.classes.add("floatpanel"),e.autohide&&(l(),u(),v.push(t)),e.autofix&&(c(),t.on("move",function(){d(this)})),t.on("postrender show",function(e){if(e.control==t){var n,r=t.classPrefix;t.modal&&!b&&(n=i("#"+r+"modal-block",t.getContainerElm()),n[0]||(n=i('<div id="'+r+'modal-block" class="'+r+"reset "+r+'fade"></div>').appendTo(t.getContainerElm())),o.setTimeout(function(){n.addClass(r+"in"),i(t.getEl()).addClass(r+"in")}),b=!0),f(!0,t)}}),t.on("show",function(){t.parents().each(function(e){return e.state.get("fixed")?(t.fixed(!0),!1):void 0})}),e.popover&&(t._preBodyHtml='<div class="'+t.classPrefix+'arrow"></div>',t.classes.add("popover").add("bottom").add(t.isRtl()?"end":"start")),t.aria("label",e.ariaLabel),t.aria("labelledby",t._id),t.aria("describedby",t.describedBy||t._id+"-none")},fixed:function(e){var t=this;if(t.state.get("fixed")!=e){if(t.state.get("rendered")){var n=r.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.classes.toggle("fixed",e),t.state.set("fixed",e)}return t},show:function(){var e=this,t,n=e._super();for(t=v.length;t--&&v[t]!==e;);return-1===t&&v.push(e),n},hide:function(){return h(this),f(!1,this),this._super()},hideAll:function(){C.hideAll()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||(e.remove(),f(!1,e)),e},remove:function(){h(this),this._super()},postRender:function(){var e=this;return e.settings.bodyRole&&this.getEl("body").setAttribute("role",e.settings.bodyRole),e._super()}});return C.hideAll=function(){for(var e=v.length;e--;){var t=v[e];t&&t.settings.autohide&&(t.hide(),v.splice(e,1))}},C}),r(Te,[ke,Ee,pe,g,we,me,d,u],function(e,t,n,r,i,o,a,s){function l(e){var t="width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0",n=r("meta[name=viewport]")[0],i;a.overrideViewPort!==!1&&(n||(n=document.createElement("meta"),n.setAttribute("name","viewport"),document.getElementsByTagName("head")[0].appendChild(n)),i=n.getAttribute("content"),i&&"undefined"!=typeof f&&(f=i),n.setAttribute("content",e?t:f))}function c(e){for(var t=0;t<d.length;t++)if(d[t]._fullscreen)return;r([document.documentElement,document.body]).removeClass(e+"fullscreen")}function u(){function e(){var e,t=n.getWindowSize(),r;for(e=0;e<d.length;e++)r=d[e].layoutRect(),d[e].moveTo(d[e].settings.x||Math.max(0,t.w/2-r.w/2),d[e].settings.y||Math.max(0,t.h/2-r.h/2))}if(!a.desktop){var t={w:window.innerWidth,h:window.innerHeight};s.setInterval(function(){var e=window.innerWidth,n=window.innerHeight;t.w==e&&t.h==n||(t={w:e,h:n},r(window).trigger("resize"))},100)}r(window).on("resize",e)}var d=[],f="",h=e.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(e){var r=this;r._super(e),r.isRtl()&&r.classes.add("rtl"),r.classes.add("window"),r.bodyClasses.add("window-body"),r.state.set("fixed",!0),e.buttons&&(r.statusbar=new t({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:r.isRtl()?"start":"end",defaults:{type:"button"},items:e.buttons}),r.statusbar.classes.add("foot"),r.statusbar.parent(r)),r.on("click",function(e){var t=r.classPrefix+"close";(n.hasClass(e.target,t)||n.hasClass(e.target.parentNode,t))&&r.close()}),r.on("cancel",function(){r.close()}),r.aria("describedby",r.describedBy||r._id+"-none"),r.aria("label",e.title),r._fullscreen=!1},recalc:function(){var e=this,t=e.statusbar,r,i,o,a;e._fullscreen&&(e.layoutRect(n.getWindowSize()),e.layoutRect().contentH=e.layoutRect().innerH),e._super(),r=e.layoutRect(),e.settings.title&&!e._fullscreen&&(i=r.headerW,i>r.w&&(o=r.x-Math.max(0,i/2),e.layoutRect({w:i,x:o}),a=!0)),t&&(t.layoutRect({w:e.layoutRect().innerW}).recalc(),i=t.layoutRect().minW+r.deltaW,i>r.w&&(o=r.x-Math.max(0,i-r.w),e.layoutRect({w:i,x:o}),a=!0)),a&&e.recalc()},initLayoutRect:function(){var e=this,t=e._super(),r=0,i;if(e.settings.title&&!e._fullscreen){i=e.getEl("head");var o=n.getSize(i);t.headerW=o.width,t.headerH=o.height,r+=t.headerH}e.statusbar&&(r+=e.statusbar.layoutRect().h),t.deltaH+=r,t.minH+=r,t.h+=r;var a=n.getWindowSize();return t.x=e.settings.x||Math.max(0,a.w/2-t.w/2),t.y=e.settings.y||Math.max(0,a.h/2-t.h/2),t},renderHtml:function(){var e=this,t=e._layout,n=e._id,r=e.classPrefix,i=e.settings,o="",a="",s=i.html;return e.preRender(),t.preRender(e),i.title&&(o='<div id="'+n+'-head" class="'+r+'window-head"><div id="'+n+'-title" class="'+r+'title">'+e.encode(i.title)+'</div><div id="'+n+'-dragh" class="'+r+'dragh"></div><button type="button" class="'+r+'close" aria-hidden="true"><i class="mce-ico mce-i-remove"></i></button></div>'),i.url&&(s='<iframe src="'+i.url+'" tabindex="-1"></iframe>'),"undefined"==typeof s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'<div id="'+n+'" class="'+e.classes+'" hidefocus="1"><div class="'+e.classPrefix+'reset" role="application">'+o+'<div id="'+n+'-body" class="'+e.bodyClasses+'">'+s+"</div>"+a+"</div></div>"},fullscreen:function(e){var t=this,i=document.documentElement,a,l=t.classPrefix,c;if(e!=t._fullscreen)if(r(window).on("resize",function(){var e;if(t._fullscreen)if(a)t._timer||(t._timer=s.setTimeout(function(){var e=n.getWindowSize();t.moveTo(0,0).resizeTo(e.w,e.h),t._timer=0},50));else{e=(new Date).getTime();var r=n.getWindowSize();t.moveTo(0,0).resizeTo(r.w,r.h),(new Date).getTime()-e>50&&(a=!0)}}),c=t.layoutRect(),t._fullscreen=e,e){t._initial={x:c.x,y:c.y,w:c.w,h:c.h},t.borderBox=o.parseBox("0"),t.getEl("head").style.display="none",c.deltaH-=c.headerH+2,r([i,document.body]).addClass(l+"fullscreen"),t.classes.add("fullscreen");var u=n.getWindowSize();t.moveTo(0,0).resizeTo(u.w,u.h)}else t.borderBox=o.parseBox(t.settings.border),t.getEl("head").style.display="",c.deltaH+=c.headerH,r([i,document.body]).removeClass(l+"fullscreen"),t.classes.remove("fullscreen"),t.moveTo(t._initial.x,t._initial.y).resizeTo(t._initial.w,t._initial.h);return t.reflow()},postRender:function(){var e=this,t;setTimeout(function(){e.classes.add("in"),e.fire("open")},0),e._super(),e.statusbar&&e.statusbar.postRender(),e.focus(),this.dragHelper=new i(e._id+"-dragh",{start:function(){t={x:e.layoutRect().x,y:e.layoutRect().y}},drag:function(n){e.moveTo(t.x+n.deltaX,t.y+n.deltaY)}}),e.on("submit",function(t){t.isDefaultPrevented()||e.close()}),d.push(e),l(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e=this,t;for(e.dragHelper.destroy(),e._super(),e.statusbar&&this.statusbar.remove(),t=d.length;t--;)d[t]===e&&d.splice(t,1);l(d.length>0),c(e.classPrefix)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});return u(),h}),r(Re,[Te],function(e){var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(n){function r(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),o(t)}}}var i,o=n.callback||function(){};switch(n.buttons){case t.OK_CANCEL:i=[r("Ok",!0,!0),r("Cancel",!1)];break;case t.YES_NO:case t.YES_NO_CANCEL:i=[r("Yes",1,!0),r("No",0)],n.buttons==t.YES_NO_CANCEL&&i.push(r("Cancel",-1));break;default:i=[r("Ok",!0,!0)]}return new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:i,title:n.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:n.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:n.onClose,onCancel:function(){o(!1)}}).renderTo(document.body).reflow()},alert:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,t.msgBox(e)},confirm:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,e.buttons=t.OK_CANCEL,t.msgBox(e)}}});return t}),r(Ae,[Te,Re],function(e,t){return function(n){function r(){return s.length?s[s.length-1]:void 0}function i(e){n.fire("OpenWindow",{win:e})}function o(e){n.fire("CloseWindow",{win:e})}var a=this,s=[];a.windows=s,n.on("remove",function(){for(var e=s.length;e--;)s[e].close()}),a.open=function(t,r){var a;return n.editorManager.setActive(n),t.title=t.title||" ",t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.height||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body,data:t.data,callbacks:t.commands}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){a.find("form")[0].submit()}},{text:"Cancel",onclick:function(){a.close()}}]),a=new e(t),s.push(a),a.on("close",function(){for(var e=s.length;e--;)s[e]===a&&s.splice(e,1);s.length||n.focus(),o(a)}),t.data&&a.on("postRender",function(){this.find("*").each(function(e){var n=e.name();n in t.data&&e.value(t.data[n])})}),a.features=t||{},a.params=r||{},1===s.length&&n.nodeChanged(),a=a.renderTo().reflow(),i(a),a},a.alert=function(e,r,a){var s;s=t.alert(e,function(){r?r.call(a||this):n.focus()}),s.on("close",function(){o(s)}),i(s)},a.confirm=function(e,n,r){var a;a=t.confirm(e,function(e){n.call(r||this,e)}),a.on("close",function(){o(a)}),i(a)},a.close=function(){r()&&r().close()},a.getParams=function(){return r()?r().params:null},a.setParams=function(e){r()&&(r().params=e)},a.getWindows=function(){return s}}}),r(Be,[ye,_e],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this,t=e.classPrefix;return'<div id="'+e._id+'" class="'+e.classes+'" role="presentation"><div class="'+t+'tooltip-arrow"></div><div class="'+t+'tooltip-inner">'+e.encode(e.state.get("text"))+"</div></div>"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().lastChild.innerHTML=e.encode(t.value)}),e._super()},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(De,[ye,Be],function(e,t){var n,r=e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&r.tooltips!==!1&&(t.on("mouseenter",function(n){var r=t.tooltip().moveTo(-65535);if(n.control==t){var i=r.text(e.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]);r.classes.toggle("tooltip-n","bc-tc"==i),r.classes.toggle("tooltip-nw","bc-tl"==i),r.classes.toggle("tooltip-ne","bc-tr"==i),r.moveRel(t.getEl(),i)}else r.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"}),n.renderTo()),n},postRender:function(){var e=this,t=e.settings;e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},bindStates:function(){function e(e){n.aria("disabled",e),n.classes.toggle("disabled",e)}function t(e){n.aria("pressed",e),n.classes.toggle("active",e)}var n=this;return n.state.on("change:disabled",function(t){e(t.value)}),n.state.on("change:active",function(e){t(e.value)}),n.state.get("disabled")&&e(!0),n.state.get("active")&&t(!0),n._super()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return r}),r(Le,[De],function(e){return e.extend({Defaults:{value:0},init:function(e){var t=this;t._super(e),t.classes.add("progress"),t.settings.filter||(t.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this,t=e._id,n=this.classPrefix;return'<div id="'+t+'" class="'+e.classes+'"><div class="'+n+'bar-container"><div class="'+n+'bar"></div></div><div class="'+n+'text">0%</div></div>'},postRender:function(){var e=this;return e._super(),e.value(e.settings.value),e},bindStates:function(){function e(e){e=t.settings.filter(e),t.getEl().lastChild.innerHTML=e+"%",t.getEl().firstChild.firstChild.style.width=e+"%"}var t=this;return t.state.on("change:value",function(t){e(t.value)}),e(t.state.get("value")),t._super()}})}),r(Me,[ye,_e,Le,u],function(e,t,n,r){return e.extend({Mixins:[t],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||e.timeout>0)&&!e.closeButton?t.closeButton=!1:(t.classes.add("has-close"),t.closeButton=!0),e.progressBar&&(t.progressBar=new n),t.on("click",function(e){-1!=e.target.className.indexOf(t.classPrefix+"close")&&t.close()})},renderHtml:function(){var e=this,t=e.classPrefix,n="",r="",i="",o="";return e.icon&&(n='<i class="'+t+"ico "+t+"i-"+e.icon+'"></i>'),e.color&&(o=' style="background-color: '+e.color+'"'),e.closeButton&&(r='<button type="button" class="'+t+'close" aria-hidden="true">\xd7</button>'),e.progressBar&&(i=e.progressBar.renderHtml()),'<div id="'+e._id+'" class="'+e.classes+'"'+o+' role="presentation">'+n+'<div class="'+t+'notification-inner">'+e.state.get("text")+"</div>"+i+r+"</div>"},postRender:function(){var e=this;return r.setTimeout(function(){e.$el.addClass(e.classPrefix+"in")}),e._super()},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().childNodes[1].innerHTML=t.value}),e.progressBar&&e.progressBar.bindStates(),e._super()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||e.remove(),e},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(Pe,[Me,u],function(e,t){return function(n){function r(){return l.length?l[l.length-1]:void 0}function i(){t.requestAnimationFrame(function(){o(),a()})}function o(){for(var e=0;e<l.length;e++)l[e].moveTo(0,0)}function a(){if(l.length>0){var e=l.slice(0,1)[0],t=n.inline?n.getElement():n.getContentAreaContainer();if(e.moveRel(t,"tc-tc"),l.length>1)for(var r=1;r<l.length;r++)l[r].moveRel(l[r-1].getEl(),"bc-tc")}}var s=this,l=[];s.notifications=l,n.on("remove",function(){for(var e=l.length;e--;)l[e].close()}),n.on("ResizeEditor",a),n.on("ResizeWindow",i),s.open=function(t){var r;return n.editorManager.setActive(n),r=new e(t),l.push(r),t.timeout>0&&(r.timer=setTimeout(function(){r.close()},t.timeout)),r.on("close",function(){var e=l.length;for(r.timer&&n.getWin().clearTimeout(r.timer);e--;)l[e]===r&&l.splice(e,1);a()}),r.renderTo(),a(),r},s.close=function(){r()&&r().close()},s.getNotifications=function(){return l},n.on("SkinLoaded",function(){var e=n.settings.service_message;e&&n.notificationManager.open({text:e,type:"warning",timeout:0,icon:""})})}}),r(He,[w],function(e){function t(t,n,r){for(var i=[];n&&n!=t;n=n.parentNode)i.push(e.nodeIndex(n,r));return i}function n(e,t){var n,r,i;for(r=e,n=t.length-1;n>=0;n--){if(i=r.childNodes,t[n]>i.length-1)return null;r=i[t[n]]}return r}return{create:t,resolve:n}}),r(Oe,[I,T,y,He,A,C,d,m,u,k,$,ne],function(e,t,n,r,i,o,a,s,l,c,u,d){return function(f){function h(e,t){try{f.getDoc().execCommand(e,!1,t)}catch(n){}}function p(){var e=f.getDoc().documentMode;return e?e:6}function m(e){return e.isDefaultPrevented()}function g(e){var t,n;e.dataTransfer&&(f.selection.isCollapsed()&&"IMG"==e.target.tagName&&re.select(e.target),t=f.selection.getContent(),t.length>0&&(n=ue+escape(f.id)+","+escape(t),e.dataTransfer.setData(de,n)))}function v(e){var t;return e.dataTransfer&&(t=e.dataTransfer.getData(de),t&&t.indexOf(ue)>=0)?(t=t.substr(ue.length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null}function y(e){f.queryCommandSupported("mceInsertClipboardContent")?f.execCommand("mceInsertClipboardContent",!1,{content:e}):f.execCommand("mceInsertContent",!1,e)}function b(){function i(e){var t=C.schema.getBlockElements(),n=f.getBody();if("BR"!=e.nodeName)return!1;for(;e!=n&&!t[e.nodeName];e=e.parentNode)if(e.nextSibling)return!1;return!0}function o(e,t){var n;for(n=e.nextSibling;n&&n!=t;n=n.nextSibling)if((3!=n.nodeType||0!==Z.trim(n.data).length)&&n!==t)return!1;return n===t}function a(e,t,r){var o,a,s;for(s=C.schema.getNonEmptyElements(),o=new n(r||e,e);a=o[t?"next":"prev"]();){if(s[a.nodeName]&&!i(a))return a;if(3==a.nodeType&&a.data.length>0)return a}}function c(e){var n,r,i,o,s;if(!e.collapsed&&(n=C.getParent(t.getNode(e.startContainer,e.startOffset),C.isBlock),r=C.getParent(t.getNode(e.endContainer,e.endOffset),C.isBlock),s=f.schema.getTextBlockElements(),n!=r&&s[n.nodeName]&&s[r.nodeName]&&"false"!==C.getContentEditable(n)&&"false"!==C.getContentEditable(r)))return e.deleteContents(),
+i=a(n,!1),o=a(r,!0),C.isEmpty(r)||Z(n).append(r.childNodes),Z(r).remove(),i?1==i.nodeType?"BR"==i.nodeName?(e.setStartBefore(i),e.setEndBefore(i)):(e.setStartAfter(i),e.setEndAfter(i)):(e.setStart(i,i.data.length),e.setEnd(i,i.data.length)):o&&(1==o.nodeType?(e.setStartBefore(o),e.setEndBefore(o)):(e.setStart(o,0),e.setEnd(o,0))),x.setRng(e),!0}function u(e,n){var r,i,s,l,c,u;if(!e.collapsed)return e;if(c=e.startContainer,u=e.startOffset,3==c.nodeType)if(n){if(u<c.data.length)return e}else if(u>0)return e;if(r=t.getNode(e.startContainer,e.startOffset),s=C.getParent(r,C.isBlock),i=a(f.getBody(),n,r),l=C.getParent(i,C.isBlock),!r||!i)return e;if(l&&s!=l)if(n){if(!o(s,l))return e;1==r.nodeType?"BR"==r.nodeName?e.setStartBefore(r):e.setStartAfter(r):e.setStart(r,r.data.length),1==i.nodeType?e.setEnd(i,0):e.setEndBefore(i)}else{if(!o(l,s))return e;1==i.nodeType?"BR"==i.nodeName?e.setStartBefore(i):e.setStartAfter(i):e.setStart(i,i.data.length),1==r.nodeType?e.setEnd(r,0):e.setEndBefore(r)}return e}function d(e){var t=x.getRng();return t=u(t,e),c(t)?!0:void 0}function h(e,t){function n(e,n){return m=Z(n).parents().filter(function(e,t){return!!f.schema.getTextInlineElements()[t.nodeName]}),l=e.cloneNode(!1),m=s.map(m,function(e){return e=e.cloneNode(!1),l.hasChildNodes()?(e.appendChild(l.firstChild),l.appendChild(e)):l.appendChild(e),l.appendChild(e),e}),m.length?(p=C.create("br"),m[0].appendChild(p),C.replace(l,e),t.setStartBefore(p),t.setEndBefore(p),f.selection.setRng(t),p):null}function i(e){return e&&f.schema.getTextBlockElements()[e.tagName]}var o,a,l,c,u,d,h,p,m;if(t.collapsed&&(d=t.startContainer,h=t.startOffset,a=C.getParent(d,C.isBlock),i(a)))if(1==d.nodeType){if(d=d.childNodes[h],d&&"BR"!=d.tagName)return;if(u=e?a.nextSibling:a.previousSibling,C.isEmpty(a)&&i(u)&&C.isEmpty(u)&&n(a,d))return C.remove(u),!0}else if(3==d.nodeType){if(o=r.create(a,d),c=a.cloneNode(!0),d=r.resolve(c,o),e){if(h>=d.data.length)return;d.deleteData(h,1)}else{if(0>=h)return;d.deleteData(h-1,1)}if(C.isEmpty(c))return n(a,d)}}function p(e){var t,n,r;d(e)||(s.each(f.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&f.dom.setAttrib(e,"style",f.dom.getAttrib(e,"style"))}),t=new w(function(){}),t.observe(f.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),f.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null),n=f.selection.getRng(),r=n.startContainer.parentNode,s.each(t.takeRecords(),function(e){if(C.isChildOf(e.target,f.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.setAttribute("style",t):e.target.removeAttribute("style")}s.each(e.addedNodes,function(e){if("SPAN"==e.nodeName&&!e.getAttribute("mce-data-marked")){var t,i;e==r&&(t=n.startOffset,i=e.firstChild),C.remove(e,!0),i&&(n.setStart(i,t),n.setEnd(i,t),f.selection.setRng(n))}})}}),t.disconnect(),s.each(f.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")}))}var b=f.getDoc(),C=f.dom,x=f.selection,w=window.MutationObserver,N,E;w||(N=!0,w=function(){function e(e){var t=e.relatedNode||e.target;n.push({target:t,addedNodes:[t]})}function t(e){var t=e.relatedNode||e.target;n.push({target:t,attributeName:e.attrName})}var n=[],r;this.observe=function(n){r=n,r.addEventListener("DOMSubtreeModified",e,!1),r.addEventListener("DOMNodeInsertedIntoDocument",e,!1),r.addEventListener("DOMNodeInserted",e,!1),r.addEventListener("DOMAttrModified",t,!1)},this.disconnect=function(){r.removeEventListener("DOMSubtreeModified",e,!1),r.removeEventListener("DOMNodeInsertedIntoDocument",e,!1),r.removeEventListener("DOMNodeInserted",e,!1),r.removeEventListener("DOMAttrModified",t,!1)},this.takeRecords=function(){return n}}),f.on("keydown",function(e){var t=e.keyCode==te,n=e.ctrlKey||e.metaKey;if(!m(e)&&(t||e.keyCode==ee)){var r=f.selection.getRng(),i=r.startContainer,o=r.startOffset;if(t&&e.shiftKey)return;if(h(t,r))return void e.preventDefault();if(!n&&r.collapsed&&3==i.nodeType&&(t?o<i.data.length:o>0))return;e.preventDefault(),n&&f.selection.getSel().modify("extend",t?"forward":"backward",e.metaKey?"lineboundary":"word"),p(t)}}),f.on("keypress",function(t){if(!m(t)&&!x.isCollapsed()&&t.charCode>31&&!e.metaKeyPressed(t)){var n,r,i,o,a,s;n=f.selection.getRng(),s=String.fromCharCode(t.charCode),t.preventDefault(),r=Z(n.startContainer).parents().filter(function(e,t){return!!f.schema.getTextInlineElements()[t.nodeName]}),p(!0),r=r.filter(function(e,t){return!Z.contains(f.getBody(),t)}),r.length?(i=C.createFragment(),r.each(function(e,t){t=t.cloneNode(!1),i.hasChildNodes()?(t.appendChild(i.firstChild),i.appendChild(t)):(a=t,i.appendChild(t)),i.appendChild(t)}),a.appendChild(f.getDoc().createTextNode(s)),o=C.getParent(n.startContainer,C.isBlock),C.isEmpty(o)?Z(o).empty().append(i):n.insertNode(i),n.setStart(a.firstChild,1),n.setEnd(a.firstChild,1),f.selection.setRng(n)):f.selection.setContent(s)}}),f.addCommand("Delete",function(){p()}),f.addCommand("ForwardDelete",function(){p(!0)}),N||(f.on("dragstart",function(e){E=x.getRng(),g(e)}),f.on("drop",function(e){if(!m(e)){var n=v(e);n&&(e.preventDefault(),l.setEditorTimeout(f,function(){var r=t.getCaretRangeFromPoint(e.x,e.y,b);E&&(x.setRng(E),E=null),p(),x.setRng(r),y(n.html)}))}}),f.on("cut",function(e){m(e)||!e.clipboardData||f.selection.isCollapsed()||(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",f.selection.getContent()),e.clipboardData.setData("text/plain",f.selection.getContent({format:"text"})),l.setEditorTimeout(f,function(){p(!0)}))}))}function C(){function e(e){var t=ne.create("body"),n=e.cloneContents();return t.appendChild(n),re.serializer.serialize(t,{format:"html"})}function n(n){if(!n.setStart){if(n.item)return!1;var r=n.duplicate();return r.moveToElementText(f.getBody()),t.compareRanges(n,r)}var i=e(n),o=ne.createRng();o.selectNode(f.getBody());var a=e(o);return i===a}f.on("keydown",function(e){var t=e.keyCode,r,i;if(!m(e)&&(t==te||t==ee)){if(r=f.selection.isCollapsed(),i=f.getBody(),r&&!ne.isEmpty(i))return;if(!r&&!n(f.selection.getRng()))return;e.preventDefault(),f.setContent(""),i.firstChild&&ne.isBlock(i.firstChild)?f.selection.setCursorLocation(i.firstChild,0):f.selection.setCursorLocation(i,0),f.nodeChanged()}})}function x(){f.shortcuts.add("meta+a",null,"SelectAll")}function w(){f.settings.content_editable||ne.bind(f.getDoc(),"mousedown mouseup",function(e){var t;if(e.target==f.getDoc().documentElement)if(t=re.getRng(),f.getBody().focus(),"mousedown"==e.type){if(c.isCaretContainer(t.startContainer))return;re.placeCaretAt(e.clientX,e.clientY)}else re.setRng(t)})}function N(){f.on("keydown",function(e){if(!m(e)&&e.keyCode===ee){if(!f.getBody().getElementsByTagName("hr").length)return;if(re.isCollapsed()&&0===re.getRng(!0).startOffset){var t=re.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return ne.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(ne.remove(n),e.preventDefault())}}})}function E(){window.Range.prototype.getClientRects||f.on("mousedown",function(e){if(!m(e)&&"HTML"===e.target.nodeName){var t=f.getBody();t.blur(),l.setEditorTimeout(f,function(){t.focus()})}})}function _(){f.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==ne.getContentEditableParent(t)&&(e.preventDefault(),re.getSel().setBaseAndExtent(t,0,t,1),f.nodeChanged()),"A"==t.nodeName&&ne.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),re.select(t))})}function S(){function e(){var e=ne.getAttribs(re.getStart().cloneNode(!1));return function(){var t=re.getStart();t!==f.getBody()&&(ne.setAttrib(t,"style",null),Q(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function t(){return!re.isCollapsed()&&ne.getParent(re.getStart(),ne.isBlock)!=ne.getParent(re.getEnd(),ne.isBlock)}f.on("keypress",function(n){var r;return m(n)||8!=n.keyCode&&46!=n.keyCode||!t()?void 0:(r=e(),f.getDoc().execCommand("delete",!1,null),r(),n.preventDefault(),!1)}),ne.bind(f.getDoc(),"cut",function(n){var r;!m(n)&&t()&&(r=e(),l.setEditorTimeout(f,function(){r()}))})}function k(){document.body.setAttribute("role","application")}function T(){f.on("keydown",function(e){if(!m(e)&&e.keyCode===ee&&re.isCollapsed()&&0===re.getRng(!0).startOffset){var t=re.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function R(){p()>7||(h("RespectVisibilityInDesign",!0),f.contentStyles.push(".mceHideBrInPre pre br {display: none}"),ne.addClass(f.getBody(),"mceHideBrInPre"),oe.addNodeFilter("pre",function(e){for(var t=e.length,n,r,o,a;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)o=n[r],a=o.prev,a&&3===a.type&&"\n"!=a.value.charAt(a.value-1)?a.value+="\n":o.parent.insert(new i("#text",3),o,!0).value="\n"}),ae.addNodeFilter("pre",function(e){for(var t=e.length,n,r,i,o;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)i=n[r],o=i.prev,o&&3==o.type&&(o.value=o.value.replace(/\r?\n$/,""))}))}function A(){ne.bind(f.getBody(),"mouseup",function(){var e,t=re.getNode();"IMG"==t.nodeName&&((e=ne.getStyle(t,"width"))&&(ne.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),ne.setStyle(t,"width","")),(e=ne.getStyle(t,"height"))&&(ne.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),ne.setStyle(t,"height","")))})}function B(){f.on("keydown",function(t){var n,r,i,o,a;if(!m(t)&&t.keyCode==e.BACKSPACE&&(n=re.getRng(),r=n.startContainer,i=n.startOffset,o=ne.getRoot(),a=r,n.collapsed&&0===i)){for(;a&&a.parentNode&&a.parentNode.firstChild==a&&a.parentNode!=o;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(f.formatter.toggle("blockquote",null,a),n=ne.createRng(),n.setStart(r,0),n.setEnd(r,0),re.setRng(n))}})}function D(){function e(){K(),h("StyleWithCSS",!1),h("enableInlineTableEditing",!1),ie.object_resizing||h("enableObjectResizing",!1)}ie.readonly||f.on("BeforeExecCommand MouseDown",e)}function L(){function e(){Q(ne.select("a"),function(e){var t=e.parentNode,n=ne.getRoot();if(t.lastChild===e){for(;t&&!ne.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}ne.add(t,"br",{"data-mce-bogus":1})}})}f.on("SetContent ExecCommand",function(t){"setcontent"!=t.type&&"mceInsertLink"!==t.command||e()})}function M(){ie.forced_root_block&&f.on("init",function(){h("DefaultParagraphSeparator",ie.forced_root_block)})}function P(){f.on("keydown",function(e){var t;m(e)||e.keyCode!=ee||(t=f.getDoc().selection.createRange(),t&&t.item&&(e.preventDefault(),f.undoManager.beforeChange(),ne.remove(t.item(0)),f.undoManager.add()))})}function H(){var e;p()>=10&&(e="",Q("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"}),f.contentStyles.push(e+"{padding-right: 1px !important}"))}function O(){p()<9&&(oe.addNodeFilter("noscript",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.firstChild,r&&n.attr("data-mce-innertext",r.value)}),ae.addNodeFilter("noscript",function(e){for(var t=e.length,n,r,a;t--;)n=e[t],r=e[t].firstChild,r?r.value=o.decode(r.value):(a=n.attributes.map["data-mce-innertext"],a&&(n.attr("data-mce-innertext",null),r=new i("#text",3),r.value=a,r.raw=!0,n.append(r)))}))}function I(){function e(e,t){var n=i.createTextRange();try{n.moveToPoint(e,t)}catch(r){n=null}return n}function t(t){var r;t.button?(r=e(t.x,t.y),r&&(r.compareEndPoints("StartToStart",a)>0?r.setEndPoint("StartToStart",a):r.setEndPoint("EndToEnd",a),r.select())):n()}function n(){var e=r.selection.createRange();a&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&a.select(),ne.unbind(r,"mouseup",n),ne.unbind(r,"mousemove",t),a=o=0}var r=ne.doc,i=r.body,o,a,s;r.documentElement.unselectable=!0,ne.bind(r,"mousedown contextmenu",function(i){if("HTML"===i.target.nodeName){if(o&&n(),s=r.documentElement,s.scrollHeight>s.clientHeight)return;o=1,a=e(i.x,i.y),a&&(ne.bind(r,"mouseup",n),ne.bind(r,"mousemove",t),ne.getRoot().focus(),a.select())}})}function F(){f.on("keyup focusin mouseup",function(t){65==t.keyCode&&e.metaKeyPressed(t)||re.normalize()},!0)}function z(){f.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}function U(){f.inline||f.on("keydown",function(){document.activeElement==document.body&&f.getWin().focus()})}function W(){f.inline||(f.contentStyles.push("body {min-height: 150px}"),f.on("click",function(e){var t;if("HTML"==e.target.nodeName){if(a.ie>11)return void f.getBody().focus();t=f.selection.getRng(),f.getBody().focus(),f.selection.setRng(t),f.selection.normalize(),f.nodeChanged()}}))}function V(){a.mac&&f.on("keydown",function(t){!e.metaKeyPressed(t)||t.shiftKey||37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),f.selection.getSel().modify("move",37==t.keyCode?"backward":"forward","lineboundary"))})}function $(){h("AutoUrlDetect",!1)}function q(){f.on("click",function(e){var t=e.target;do if("A"===t.tagName)return void e.preventDefault();while(t=t.parentNode)}),f.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")}function j(){f.on("init",function(){f.dom.bind(f.getBody(),"submit",function(e){e.preventDefault()})})}function Y(){oe.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"==e[t].attr("class")&&e[t].remove()})}function X(){f.on("dragstart",function(e){g(e)}),f.on("drop",function(e){if(!m(e)){var n=v(e);if(n&&n.id!=f.id){e.preventDefault();var r=t.getCaretRangeFromPoint(e.x,e.y,f.getDoc());re.setRng(r),y(n.html)}}})}function K(){var e,t;G()&&(e=f.getBody(),t=e.parentNode,t.removeChild(e),t.appendChild(e),e.focus())}function G(){var e;return se?(e=f.selection.getSel(),!e||!e.rangeCount||0===e.rangeCount):0}function J(){function t(e){var t=new d(e.getBody()),n=e.selection.getRng(),r=u.fromRangeStart(n),i=u.fromRangeEnd(n);return!e.selection.isCollapsed()&&!t.prev(r)&&!t.next(i)}f.on("keypress",function(n){!m(n)&&!re.isCollapsed()&&n.charCode>31&&!e.metaKeyPressed(n)&&t(f)&&(n.preventDefault(),f.setContent(String.fromCharCode(n.charCode)),f.selection.select(f.getBody(),!0),f.selection.collapse(!1),f.nodeChanged())}),f.on("keydown",function(e){var n=e.keyCode;m(e)||n!=te&&n!=ee||t(f)&&(e.preventDefault(),f.setContent(""),f.nodeChanged())})}var Q=s.each,Z=f.$,ee=e.BACKSPACE,te=e.DELETE,ne=f.dom,re=f.selection,ie=f.settings,oe=f.parser,ae=f.serializer,se=a.gecko,le=a.ie,ce=a.webkit,ue="data:text/mce-internal,",de=le?"Text":"URL";return B(),C(),a.windowsPhone||F(),ce&&(J(),b(),w(),_(),M(),j(),T(),Y(),a.iOS?(U(),W(),q()):x()),le&&a.ie<11&&(N(),k(),R(),A(),P(),H(),O(),I()),a.ie>=11&&(W(),T()),a.ie&&(x(),$(),X()),se&&(J(),N(),E(),S(),D(),L(),z(),V(),T()),{refreshContentEditable:K,isHidden:G}}}),r(Ie,[ue,w,m],function(e,t,n){function r(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=o.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()}function i(e,t){function n(e){return!e.hidden&&!e.readonly}var i=r(e,t),s;if(e.delegates||(e.delegates={}),!e.delegates[t])if(e.settings.event_root){if(a||(a={},e.editorManager.on("removeEditor",function(){var t;if(!e.editorManager.activeEditor&&a){for(t in a)e.dom.unbind(r(e,t));a=null}})),a[t])return;s=function(r){for(var i=r.target,a=e.editorManager.editors,s=a.length;s--;){var l=a[s].getBody();(l===i||o.isChildOf(i,l))&&n(a[s])&&a[s].fire(t,r)}},a[t]=s,o.bind(i,t,s)}else s=function(r){n(e)&&e.fire(t,r)},o.bind(i,t,s),e.delegates[t]=s}var o=t.DOM,a,s={bindPendingEventDelegates:function(){var e=this;n.each(e._pendingNativeEvents,function(t){i(e,t)})},toggleNativeEvent:function(e,t){var n=this;"focus"!=e&&"blur"!=e&&(t?n.initialized?i(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(r(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e=this,t;if(e.delegates){for(t in e.delegates)e.dom.unbind(r(e,t),t,e.delegates[t]);delete e.delegates}e.inline||(e.getBody().onload=null,e.dom.unbind(e.getWin()),e.dom.unbind(e.getDoc())),e.dom.unbind(e.getBody()),e.dom.unbind(e.getContainer())}};return s=n.extend({},e,s)}),r(Fe,[],function(){function e(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}}function t(e){var t,n;return t=e.getBody(),n=function(t){e.dom.getParents(t.target,"a").length>0&&t.preventDefault()},e.dom.bind(t,"click",n),{unbind:function(){e.dom.unbind(t,"click",n)}}}function n(n,r){n._clickBlocker&&(n._clickBlocker.unbind(),n._clickBlocker=null),r?(n._clickBlocker=t(n),n.selection.controlSelection.hideResizeRect(),n.readonly=!0,n.getBody().contentEditable=!1):(n.readonly=!1,n.getBody().contentEditable=!0,e(n,"StyleWithCSS",!1),e(n,"enableInlineTableEditing",!1),e(n,"enableObjectResizing",!1),n.focus(),n.nodeChanged())}function r(e,t){var r=e.readonly?"readonly":"design";t!=r&&(e.initialized?n(e,"readonly"==t):e.on("init",function(){n(e,"readonly"==t)}),e.fire("SwitchMode",{mode:t}))}return{setMode:r}}),r(ze,[m,d],function(e,t){var n=e.each,r=e.explode,i={f9:120,f10:121,f11:122},o=e.makeMap("alt,ctrl,shift,meta,access");return function(a){function s(e){var a,s,l={};n(r(e,"+"),function(e){e in o?l[e]=!0:/^[0-9]{2,}$/.test(e)?l.keyCode=parseInt(e,10):(l.charCode=e.charCodeAt(0),l.keyCode=i[e]||e.toUpperCase().charCodeAt(0))}),a=[l.keyCode];for(s in o)l[s]?a.push(s):l[s]=!1;return l.id=a.join(","),l.access&&(l.alt=!0,t.mac?l.ctrl=!0:l.shift=!0),l.meta&&(t.mac?l.meta=!0:(l.ctrl=!0,l.meta=!1)),l}function l(t,n,i,o){var l;return l=e.map(r(t,">"),s),l[l.length-1]=e.extend(l[l.length-1],{func:i,scope:o||a}),e.extend(l[0],{desc:a.translate(n),subpatterns:l.slice(1)})}function c(e){return e.altKey||e.ctrlKey||e.metaKey}function u(e){return e.keyCode>=112&&e.keyCode<=123}function d(e,t){return t?t.ctrl!=e.ctrlKey||t.meta!=e.metaKey?!1:t.alt!=e.altKey||t.shift!=e.shiftKey?!1:e.keyCode==t.keyCode||e.charCode&&e.charCode==t.charCode?(e.preventDefault(),!0):!1:!1}function f(e){return e.func?e.func.call(e.scope):null}var h=this,p={},m=[];a.on("keyup keypress keydown",function(e){!c(e)&&!u(e)||e.isDefaultPrevented()||(n(p,function(t){return d(e,t)?(m=t.subpatterns.slice(0),"keydown"==e.type&&f(t),!0):void 0}),d(e,m[0])&&(1===m.length&&"keydown"==e.type&&f(m[0]),m.shift()))}),h.add=function(t,i,o,s){var c;return c=o,"string"==typeof o?o=function(){a.execCommand(c,!1,null)}:e.isArray(c)&&(o=function(){a.execCommand(c[0],c[1],c[2])}),n(r(e.trim(t.toLowerCase())),function(e){var t=l(e,i,o,s);p[t.id]=t}),!0},h.remove=function(e){var t=l(e);return p[t.id]?(delete p[t.id],!0):!1}}}),r(Ue,[c,m,z],function(e,t,n){return function(r,i){function o(e){var t,n;return n={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"},t=n[e.blob().type.toLowerCase()]||"dat",e.id()+"."+t}function a(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t}function s(e){return{id:e.id,blob:e.blob,base64:e.base64,filename:n.constant(o(e))}}function l(e,t,n,r){var s,l;s=new XMLHttpRequest,s.open("POST",i.url),s.withCredentials=i.credentials,s.upload.onprogress=function(e){r(e.loaded/e.total*100)},s.onerror=function(){n("Image upload failed due to a XHR Transport error. Code: "+s.status)},s.onload=function(){var e;return 200!=s.status?void n("HTTP Error: "+s.status):(e=JSON.parse(s.responseText),e&&"string"==typeof e.location?void t(a(i.basePath,e.location)):void n("Invalid JSON: "+s.responseText))},l=new FormData,l.append("file",e.blob(),o(e)),s.send(l)}function c(){return new e(function(e){e([])})}function u(e,t){return{url:t,blobInfo:e,status:!0}}function d(e,t){return{url:"",blobInfo:e,status:!1,error:t}}function f(e,n){t.each(y[e],function(e){e(n)}),delete y[e]}function h(t,n,i){return r.markPending(t.blobUri()),new e(function(e){var o,a,l=function(){};try{var c=function(){o&&(o.close(),a=l)},h=function(n){c(),r.markUploaded(t.blobUri(),n),f(t.blobUri(),u(t,n)),e(u(t,n))},p=function(){c(),r.removeFailed(t.blobUri()),f(t.blobUri(),d(t,p)),e(d(t,p))};a=function(e){0>e||e>100||(o||(o=i()),o.progressBar.value(e))},n(s(t),h,p,a)}catch(m){e(d(t,m.message))}})}function p(e){return e===l}function m(t){var n=t.blobUri();return new e(function(e){y[n]=y[n]||[],y[n].push(e)})}function g(n,o){return n=t.grep(n,function(e){return!r.isUploaded(e.blobUri())}),e.all(t.map(n,function(e){return r.isPending(e.blobUri())?m(e):h(e,i.handler,o)}))}function v(e,t){return!i.url&&p(i.handler)?c():g(e,t)}var y={};return i=t.extend({credentials:!1,handler:l},i),{upload:v}}}),r(We,[c],function(e){function t(t){return new e(function(e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="blob",n.onload=function(){200==this.status&&e(this.response)},n.send()})}function n(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}}function r(t){return new e(function(e){var r,i,o;t=n(t);try{r=atob(t.data)}catch(a){return void e(new Blob([]))}for(i=new Uint8Array(r.length),o=0;o<i.length;o++)i[o]=r.charCodeAt(o);e(new Blob([i],{type:t.type}))})}function i(e){return 0===e.indexOf("blob:")?t(e):0===e.indexOf("data:")?r(e):null}function o(t){return new e(function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)})}return{uriToBlob:i,blobToDataUri:o,parseDataUri:n}}),r(Ve,[c,p,z,We,d],function(e,t,n,r,i){var o=0;return function(a,s){function l(l,u){function d(e,t){var n,i;return 0===e.src.indexOf("blob:")?(i=s.getByUri(e.src),void(i&&t({image:e,blobInfo:i}))):(n=r.parseDataUri(e.src).data,i=s.findFirst(function(e){return e.base64()===n}),void(i?t({image:e,blobInfo:i}):r.uriToBlob(e.src).then(function(r){var i="blobid"+o++,a=s.create(i,r,n);s.add(a),t({image:e,blobInfo:a})})))}var f,h;return u||(u=n.constant(!0)),f=t.filter(l.getElementsByTagName("img"),function(e){var t=e.src;return i.fileApi?e.hasAttribute("data-mce-bogus")?!1:e.hasAttribute("data-mce-placeholder")?!1:t&&t!=i.transparentSrc?0===t.indexOf("blob:")?!a.isUploaded(t):0===t.indexOf("data:")?u(e):!1:!1:!1}),h=t.map(f,function(t){var n;return c[t.src]?new e(function(e){c[t.src].then(function(n){e({image:t,blobInfo:n.blobInfo})})}):(n=new e(function(e){d(t,e)}).then(function(e){return delete c[e.image.src],e})["catch"](function(e){return delete c[t.src],e}),c[t.src]=n,n)}),e.all(h)}var c={};return{findAll:l}}}),r($e,[p,z],function(e,t){return function(){function n(e,t,n){return{id:u(e),blob:u(t),base64:u(n),blobUri:u(URL.createObjectURL(t))}}function r(e){i(e.id())||c.push(e)}function i(e){return o(function(t){return t.id()===e})}function o(t){return e.filter(c,t)[0]}function a(e){return o(function(t){return t.blobUri()==e})}function s(t){c=e.filter(c,function(e){return e.blobUri()===t?(URL.revokeObjectURL(e.blobUri()),!1):!0})}function l(){e.each(c,function(e){URL.revokeObjectURL(e.blobUri())}),c=[]}var c=[],u=t.constant;return{create:n,add:r,get:i,getByUri:a,findFirst:o,removeByUri:s,destroy:l}}}),r(qe,[],function(){return function(){function e(e,t){return{status:e,resultUri:t}}function t(e){return e in d}function n(e){var t=d[e];return t?t.resultUri:null}function r(e){return t(e)?d[e].status===c:!1}function i(e){return t(e)?d[e].status===u:!1}function o(t){d[t]=e(c,null)}function a(t,n){d[t]=e(u,n)}function s(e){delete d[e]}function l(){d={}}var c=1,u=2,d={};return{hasBlobUri:t,getResultUri:n,isPending:r,isUploaded:i,markPending:o,markUploaded:a,removeFailed:s,destroy:l}}}),r(je,[p,Ue,Ve,$e,qe],function(e,t,n,r,i){return function(o){function a(e){return function(t){return o.selection?e(t):[]}}function s(e,t,n){var r=0;do r=e.indexOf(t,r),-1!==r&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1);while(-1!==r);return e}function l(e,t,n){return e=s(e,'src="'+t+'"','src="'+n+'"'),e=s(e,'data-mce-src="'+t+'"','data-mce-src="'+n+'"')}function c(t,n){e.each(o.undoManager.data,function(e){e.content=l(e.content,t,n)})}function u(){return o.notificationManager.open({text:o.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}function d(e,t){y.removeByUri(e.src),c(e.src,t),o.$(e).attr({src:t,"data-mce-src":o.convertURL(t,"src")})}function f(n){return b||(b=new t(w,{url:x.images_upload_url,basePath:x.images_upload_base_path,credentials:x.images_upload_credentials,handler:x.images_upload_handler})),m().then(a(function(t){var r;return r=e.map(t,function(e){return e.blobInfo}),b.upload(r,u).then(a(function(r){return r=e.map(r,function(e,n){var r=t[n].image;return e.status&&o.settings.images_replace_blob_uris!==!1&&d(r,e.url),{element:r,status:e.status}}),n&&n(r),r}))}))}function h(e){return x.automatic_uploads!==!1?f(e):void 0}function p(e){return x.images_dataimg_filter?x.images_dataimg_filter(e):!0}function m(){return C||(C=new n(w,y)),C.findAll(o.getBody(),p).then(a(function(t){return e.each(t,function(e){c(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),t}))}function g(){y.destroy(),w.destroy(),C=b=null}function v(t){return t.replace(/src="(blob:[^"]+)"/g,function(t,n){var r=w.getResultUri(n);if(r)return'src="'+r+'"';var i=y.getByUri(n);return i||(i=e.reduce(o.editorManager.editors,function(e,t){return e||t.editorUpload.blobCache.getByUri(n)},null)),i?'src="data:'+i.blob().type+";base64,"+i.base64()+'"':t})}var y=new r,b,C,x=o.settings,w=new i;return o.on("setContent",function(){o.settings.automatic_uploads!==!1?h():m()}),o.on("RawSaveContent",function(e){e.content=v(e.content)}),o.on("getContent",function(e){e.source_view||"raw"==e.format||(e.content=v(e.content))}),o.on("PostRender",function(){o.parser.addNodeFilter("img",function(t){e.each(t,function(e){var t=e.attr("src");if(!y.getByUri(t)){var n=w.getResultUri(t);n&&e.attr("src",n)}})})}),{blobCache:y,uploadImages:f,uploadImagesAuto:h,scanForImages:m,destroy:g}}}),r(Ye,[k,$,_,T,g,W,u],function(e,t,n,r,i,o,a){var s=n.isContentEditableFalse;return function(t,n){function r(e,n){var r=o.collapse(e.getBoundingClientRect(),n),i,a,s,l,c;return"BODY"==t.tagName?(i=t.ownerDocument.documentElement,a=t.scrollLeft||i.scrollLeft,s=t.scrollTop||i.scrollTop):(c=t.getBoundingClientRect(),a=t.scrollLeft-c.left,s=t.scrollTop-c.top),r.left+=a,r.right+=a,r.top+=s,r.bottom+=s,r.width=1,l=e.offsetWidth-e.clientWidth,l>0&&(n&&(l*=-1),r.left+=l,r.right+=l),r}function l(){var n,r,o,a,s;for(n=i("*[contentEditable=false]",t),a=0;a<n.length;a++)r=n[a],o=r.previousSibling,e.endsWithCaretContainer(o)&&(s=o.data,1==s.length?o.parentNode.removeChild(o):o.deleteData(s.length-1,1)),o=r.nextSibling,e.startsWithCaretContainer(o)&&(s=o.data,1==s.length?o.parentNode.removeChild(o):o.deleteData(0,1));return null}function c(o,a){var l,c,f;return u(),n(a)?(g=e.insertBlock("p",a,o),l=r(a,o),i(g).css("top",l.top),m=i('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(l).appendTo(t),o&&m.addClass("mce-visual-caret-before"),d(),c=a.ownerDocument.createRange(),f=g.firstChild,c.setStart(f,0),c.setEnd(f,1),c):(g=e.insertInline(a,o),c=a.ownerDocument.createRange(),s(g.nextSibling)?(c.setStart(g,0),c.setEnd(g,0)):(c.setStart(g,1),c.setEnd(g,1)),c)}function u(){l(),g&&(e.remove(g),g=null),m&&(m.remove(),m=null),clearInterval(p)}function d(){p=a.setInterval(function(){i("div.mce-visual-caret",t).toggleClass("mce-visual-caret-hidden")},500)}function f(){a.clearInterval(p)}function h(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"}var p,m,g;return{show:c,hide:u,getCss:h,destroy:f}}}),r(Xe,[p,_,W],function(e,t,n){function r(i){function o(t){return e.map(t,function(e){return e=n.clone(e),e.node=i,e})}if(e.isArray(i))return e.reduce(i,function(e,t){return e.concat(r(t))},[]);if(t.isElement(i))return o(i.getClientRects());if(t.isText(i)){var a=i.ownerDocument.createRange();return a.setStart(i,0),a.setEnd(i,i.data.length),o(a.getClientRects())}}return{getClientRects:r}}),r(Ke,[z,p,Xe,U,te,ne,$,W],function(e,t,n,r,i,o,a,s){function l(e,t,n,o){for(;o=i.findNode(o,e,r.isEditableCaretCandidate,t);)if(n(o))return}function c(e,r,i,o,a,s){function c(o){var s,l,c;for(c=n.getClientRects(o),-1==e&&(c=c.reverse()),s=0;s<c.length;s++)if(l=c[s],!i(l,h)){if(f.length>0&&r(l,t.last(f))&&u++,l.line=u,a(l))return!0;f.push(l)}}var u=0,d,f=[],h;return(h=t.last(s.getClientRects()))?(d=s.getNode(),c(d),l(e,o,c,d),f):f}function u(e,t){return t.line>e}function d(e,t){return t.line===e}function f(e,n,r,i){function l(n){return 1==e?t.last(n.getClientRects()):t.last(n.getClientRects())}var c=new o(n),u,d,f,h,p=[],m=0,g,v;1==e?(u=c.next,d=s.isBelow,f=s.isAbove,h=a.after(i)):(u=c.prev,d=s.isAbove,f=s.isBelow,h=a.before(i)),v=l(h);do if(h.isVisible()&&(g=l(h),!f(g,v))){if(p.length>0&&d(g,t.last(p))&&m++,g=s.clone(g),g.position=h,g.line=m,r(g))return p;p.push(g)}while(h=u(h));return p}var h=e.curry,p=h(c,-1,s.isAbove,s.isBelow),m=h(c,1,s.isBelow,s.isAbove);return{upUntil:p,downUntil:m,positionsUntil:f,isAboveLine:h(u),isLine:h(d)}}),r(Ge,[z,p,_,Xe,W,te,U],function(e,t,n,r,i,o,a){function s(e,t){return Math.abs(e.left-t)}function l(e,t){return Math.abs(e.right-t)}function c(e,n){function r(e,t){return e>=t.left&&e<=t.right}return t.reduce(e,function(e,t){var i,o;return i=Math.min(s(e,n),l(e,n)),o=Math.min(s(t,n),l(t,n)),r(n,t)?t:r(n,e)?e:o==i&&m(t.node)?t:i>o?t:e})}function u(e,t,n,r){for(;r=g(r,e,a.isEditableCaretCandidate,t);)if(n(r))return}function d(e,n){function o(e,i){var o;return o=t.filter(r.getClientRects(i),function(t){return!e(t,n)}),a=a.concat(o),0===o.length}var a=[];return a.push(n),u(-1,e,v(o,i.isAbove),n.node),u(1,e,v(o,i.isBelow),n.node),a}function f(e){return t.filter(t.toArray(e.getElementsByTagName("*")),m)}function h(e,t){return{node:e.node,before:s(e,t)<l(e,t)}}function p(e,n,i){var o,a;return o=r.getClientRects(f(e)),o=t.filter(o,function(e){return i>=e.top&&i<=e.bottom}),a=c(o,n),a&&(a=c(d(e,a),n),a&&m(a.node))?h(a,n):null}var m=n.isContentEditableFalse,g=o.findNode,v=e.curry;return{findClosestClientRect:c,findLineNodeRects:d,closestCaret:p}}),r(Je,[_,p,z],function(e,t,n){function r(e){function r(e){return i(e)}function a(t){f(e.getBody()).css("cursor",t)}function s(t){return t==g.element||e.dom.isChildOf(t,g.element)?!1:!i(t)}function l(t){var n,r,i,o,s=0,l=0,c,u,d,h;0===t.button&&(n=t.screenX-g.screenX,r=t.screenY-g.screenY,c=Math.max(Math.abs(n),Math.abs(r)),!g.dragging&&c>10&&(g.dragging=!0,a("default"),g.clone=g.element.cloneNode(!0),i=m.getPos(g.element),g.relX=g.clientX-i.x,g.relY=g.clientY-i.y,g.width=g.element.offsetWidth,g.height=g.element.offsetHeight,f(g.clone).css({width:g.width,height:g.height}).removeAttr("data-mce-selected"),g.ghost=f("<div>").css({position:"absolute",opacity:.5,overflow:"hidden",width:g.width,height:g.height}).attr({"data-mce-bogus":"all",unselectable:"on",contenteditable:"false"}).addClass("mce-drag-container mce-reset").append(g.clone).appendTo(e.getBody())[0],o=e.dom.getViewPort(e.getWin()),g.maxX=o.w,g.maxY=o.h),g.dragging&&(e._selectionOverrides.hideFakeCaret(),e.selection.placeCaretAt(t.clientX,t.clientY),u=g.clientX+n-g.relX,d=g.clientY+r+5,u+g.width>g.maxX&&(s=u+g.width-g.maxX),d+g.height>g.maxY&&(l=d+g.height-g.maxY),h="BODY"!=e.getBody().nodeName?e.getBody().getBoundingClientRect():{left:0,top:0},f(g.ghost).css({left:u-h.left,top:d-h.top,width:g.width-s,height:g.height-l})))}function c(t){var n;if(g.dragging&&(e.selection.setRng(e.selection.getSel().getRangeAt(0)),s(e.selection.getNode()))){var r=g.element;if(n=e.fire("drop",{targetClone:r,clientX:t.clientX,clientY:t.clientY}),n.isDefaultPrevented())return;r=n.targetClone,e.undoManager.transact(function(){e.insertContent(m.getOuterHTML(r)),f(g.element).remove()})}d()}function u(a){var s,u;if(d(),0===a.button&&(s=t.find(e.dom.getParents(a.target),n.or(i,o)),r(s))){if(u=e.fire("dragstart",{target:s}),u.isDefaultPrevented())return;e.on("mousemove",l),e.on("mouseup",c),h!=p&&(m.bind(h,"mousemove",l),m.bind(h,"mouseup",c)),g={screenX:a.screenX,screenY:a.screenY,clientX:a.clientX,clientY:a.clientY,element:s
+}}}function d(){f(g.ghost).remove(),a(null),e.off("mousemove",l),e.off("mouseup",d),h!=p&&(m.unbind(h,"mousemove",l),m.unbind(h,"mouseup",d)),g={}}var f=e.$,h=document,p=e.getDoc(),m=e.dom,g={};e.on("mousedown",u),e.on("drop",function(t){var n="undefined"!=typeof t.clientX?e.getDoc().elementFromPoint(t.clientX,t.clientY):null;(i(n)||i(e.dom.getContentEditableParent(n)))&&t.preventDefault()})}var i=e.isContentEditableFalse,o=e.isContentEditableTrue;return{init:r}}),r(Qe,[d,ne,$,k,te,Ye,Ke,Ge,_,T,W,I,z,p,u,Je,S],function(e,t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g){function v(e,t){for(;t=e(t);)if(t.isVisible())return t;return t}function y(c){function y(e){return c.dom.isBlock(e)}function S(e){e&&c.selection.setRng(e)}function k(){return c.selection.getRng()}function T(e,t){c.selection.scrollIntoView(e,t)}function R(e,t,n){var r;return r=c.fire("ShowCaret",{target:t,direction:e,before:n}),r.isDefaultPrevented()?null:(T(t,-1===e),ie.show(n,t))}function A(e){var t;return ie.hide(),t=c.fire("BeforeObjectSelected",{target:e}),t.isDefaultPrevented()?null:B(e)}function B(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t}function D(e,t){var n=i.isInSameBlock(e,t);return!n&&l.isBr(e.getNode())?!0:n}function L(e,t){return t=i.normalizeRange(e,ee,t),-1==e?n.fromRangeStart(t):n.fromRangeEnd(t)}function M(e){return r.isCaretContainerBlock(e.startContainer)}function P(e,t,n,r){var i,o,a,s;return!r.collapsed&&(i=_(r),x(i))?R(e,i,-1==e):(s=M(r),o=L(e,r),n(o)?A(o.getNode(-1==e)):(o=t(o))?n(o)?R(e,o.getNode(-1==e),1==e):(a=t(o),n(a)&&D(o,a)?R(e,a.getNode(-1==e),1==e):s?V(o.toRange()):null):s?r:null)}function H(e,t,n){var r,i,o,l,c,u,d,f,p;if(p=_(n),r=L(e,n),i=t(ee,a.isAboveLine(1),r),o=h.filter(i,a.isLine(1)),c=h.last(r.getClientRects()),E(r)&&(p=r.getNode()),N(r)&&(p=r.getNode(!0)),!c)return null;if(u=c.left,l=s.findClosestClientRect(o,u),l&&x(l.node))return d=Math.abs(u-l.left),f=Math.abs(u-l.right),R(e,l.node,f>d);if(p){var m=a.positionsUntil(e,ee,a.isAboveLine(1),p);if(l=s.findClosestClientRect(h.filter(m,a.isLine(1)),u))return V(l.position.toRange());if(l=h.last(h.filter(m,a.isLine(0))))return V(l.position.toRange())}}function O(t,r){function i(){var t=c.dom.create(c.settings.forced_root_block);return(!e.ie||e.ie>=11)&&(t.innerHTML='<br data-mce-bogus="1">'),t}var o,a,s;if(r.collapsed&&c.settings.forced_root_block){if(o=c.dom.getParent(r.startContainer,"PRE"),!o)return;a=1==t?ne(n.fromRangeStart(r)):re(n.fromRangeStart(r)),a||(s=i(),1==t?c.$(o).after(s):c.$(o).before(s),c.selection.select(s,!0),c.selection.collapse())}}function I(e,t,n,r){var i;return(i=P(e,t,n,r))?i:(i=O(e,r),i?i:null)}function F(e,t,n){var r;return(r=H(e,t,n))?r:(r=O(e,n),r?r:null)}function z(){return se("*[data-mce-caret]")[0]}function U(e){e=se(e),e.attr("data-mce-caret")&&(ie.hide(),e.removeAttr("data-mce-caret"),e.removeAttr("data-mce-bogus"),e.removeAttr("style"),S(k()),T(e[0]))}function W(e){var t,r;return e=i.normalizeRange(1,ee,e),t=n.fromRangeStart(e),x(t.getNode())?R(1,t.getNode(),!t.isAtEnd()):x(t.getNode(!0))?R(1,t.getNode(!0),!1):(r=c.dom.getParent(t.getNode(),f.or(x,C)),x(r)?R(1,r,!1):(ie.hide(),null))}function V(e){var t;return e&&e.collapsed?(t=W(e),t?t:e):e}function $(e){var t,i,o,a;return x(e)?(x(e.previousSibling)&&(o=e.previousSibling),i=re(n.before(e)),i||(t=ne(n.after(e))),t&&w(t.getNode())&&(a=t.getNode()),r.remove(e.previousSibling),r.remove(e.nextSibling),c.dom.remove(e),J(),c.dom.isEmpty(c.getBody())?(c.setContent(""),void c.focus()):o?n.after(o).toRange():a?n.before(a).toRange():i?i.toRange():t?t.toRange():null):null}function q(e,t,n){var r=c.dom,i,o,a,s;if(-1===e){if(N(n)&&y(n.getNode(!0)))return $(n.getNode(!0))}else if(E(t)&&y(t.getNode()))return $(t.getNode());if(s=c.schema.getTextBlockElements(),i=r.getParent(t.getNode(),r.isBlock),o=r.getParent(n.getNode(),r.isBlock),i===o||!s[i.nodeName]||!s[o.nodeName])return null;for(;a=i.firstChild;)o.appendChild(a);return c.dom.remove(i),n.toRange()}function j(e,t,n,i){var o,a,s,l;return!i.collapsed&&(o=_(i),x(o))?V($(o)):(a=L(e,i),n(a)&&r.isCaretContainerBlock(i.startContainer)?(l=-1==e?te.prev(a):te.next(a),l?V(l.toRange()):i):t(a)?V($(a.getNode(-1==e))):(s=-1==e?te.prev(a):te.next(a),t(s)?-1===e?q(e,a,s):q(e,s,a):void 0))}function Y(){function e(e,t){var n=t(k());n&&!e.isDefaultPrevented()&&(e.preventDefault(),S(n))}function r(e){for(var t=c.getBody();e&&e!=t;){if(C(e)||x(e))return e;e=e.parentNode}return null}function i(e,t,n){return n.collapsed?!1:h.reduce(n.getClientRects(),function(n,r){return n||u.containsXY(r,e,t)},!1)}function o(e){var t=!1;e.on("touchstart",function(){t=!1}),e.on("touchmove",function(){t=!0}),e.on("touchend",function(e){var n=r(e.target);x(n)?t||(e.preventDefault(),G(A(n))):J()})}function l(){var e,t=r(c.selection.getNode());C(t)&&y(t)&&c.dom.isEmpty(t)&&(e=c.dom.create("br",{"data-mce-bogus":"1"}),c.$(t).empty().append(e),c.selection.setRng(n.before(e).toRange()))}function f(e){var t=z();if(t)return"compositionstart"==e.type?(e.preventDefault(),e.stopPropagation(),void U(t)):void("&nbsp;"!=t.innerHTML&&U(t))}function g(e){var t;switch(e.keyCode){case d.DELETE:t=l();break;case d.BACKSPACE:t=l()}t&&e.preventDefault()}var v=b(I,1,ne,E),w=b(I,-1,re,N),_=b(j,1,E,N),T=b(j,-1,N,E),B=b(F,-1,a.upUntil),D=b(F,1,a.downUntil);c.on("mouseup",function(){var e=k();e.collapsed&&S(W(e))}),c.on("click",function(e){var t;t=r(e.target),t&&x(t)&&e.preventDefault()});var L=function(e){var r=new t(e);if(!e.firstChild)return!1;var i=n.before(e.firstChild),o=r.next(i);return o&&!E(o)&&!N(o)},M=function(e,t){var n=c.dom.getParent(e,c.dom.isBlock),r=c.dom.getParent(t,c.dom.isBlock);return n===r},P=function(e,t){var n=c.dom.getParent(e,c.dom.isBlock),r=c.dom.getParent(t,c.dom.isBlock);return n&&!M(n,r)&&L(n)};o(c),c.on("mousedown",function(e){var t;if(t=r(e.target))x(t)?(e.preventDefault(),G(A(t))):(J(),i(e.clientX,e.clientY,c.selection.getRng())||c.selection.placeCaretAt(e.clientX,e.clientY));else{J(),ie.hide();var n=s.closestCaret(ee,e.clientX,e.clientY);n&&(P(e.target,n.node)||(e.preventDefault(),c.getBody().focus(),S(R(1,n.node,n.before))))}}),c.on("keydown",function(t){if(!d.modifierPressed(t))switch(t.keyCode){case d.RIGHT:e(t,v);break;case d.DOWN:e(t,D);break;case d.LEFT:e(t,w);break;case d.UP:e(t,B);break;case d.DELETE:e(t,_);break;case d.BACKSPACE:e(t,T);break;default:x(c.selection.getNode())&&t.preventDefault()}}),c.on("keyup compositionstart",function(e){f(e),g(e)},!0),c.on("cut",function(){var e=c.selection.getNode();x(e)&&p.setEditorTimeout(c,function(){S(V($(e)))})}),c.on("getSelectionRange",function(e){var t=e.range;if(ae){if(!ae.parentNode)return void(ae=null);t=t.cloneRange(),t.selectNode(ae),e.range=t}}),c.on("setSelectionRange",function(e){var t;t=G(e.range),t&&(e.range=t)}),c.on("focus",function(){p.setEditorTimeout(c,function(){c.selection.setRng(V(c.selection.getRng()))},0)}),m.init(c)}function X(){var e=c.contentStyles,t=".mce-content-body";e.push(ie.getCss()),e.push(t+" .mce-offscreen-selection {position: absolute;left: -9999999999px;width: 100px;height: 100px;}"+t+" *[contentEditable=false] {cursor: default;}"+t+" *[contentEditable=true] {cursor: text;}")}function K(e){return r.isCaretContainer(e.startContainer)||r.isCaretContainer(e.endContainer)}function G(t){var n,r=c.$,i=c.dom,o,a,s,l,u,d,f,h,p;if(!t)return J(),null;if(t.collapsed){if(J(),!K(t)){if(f=L(1,t),x(f.getNode()))return R(1,f.getNode(),!f.isAtEnd());if(x(f.getNode(!0)))return R(1,f.getNode(!0),!1)}return null}return s=t.startContainer,l=t.startOffset,u=t.endOffset,3==s.nodeType&&0==l&&x(s.parentNode)&&(s=s.parentNode,l=i.nodeIndex(s),s=s.parentNode),1!=s.nodeType?(J(),null):(u==l+1&&(n=s.childNodes[l]),x(n)?(h=p=n.cloneNode(!0),d=c.fire("ObjectSelected",{target:n,targetClone:h}),d.isDefaultPrevented()?(J(),null):(h=d.targetClone,o=r("#"+oe),0===o.length&&(o=r('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",oe),o.appendTo(c.getBody())),t=c.dom.createRng(),h===p&&e.ie?(o.empty().append(g.ZWSP).append(h).append(g.ZWSP),t.setStart(o[0].firstChild,0),t.setEnd(o[0].lastChild,1)):(o.empty().append("\xa0").append(h).append("\xa0"),t.setStart(o[0].firstChild,1),t.setEnd(o[0].lastChild,0)),o.css({top:i.getPos(n,c.getBody()).y}),o[0].focus(),a=c.selection.getSel(),a.removeAllRanges(),a.addRange(t),c.$("*[data-mce-selected]").removeAttr("data-mce-selected"),n.setAttribute("data-mce-selected",1),ae=n,t)):(J(),null))}function J(){ae&&(ae.removeAttribute("data-mce-selected"),c.$("#"+oe).remove(),ae=null)}function Q(){ie.destroy(),ae=null}function Z(){ie.hide()}var ee=c.getBody(),te=new t(ee),ne=b(v,te.next),re=b(v,te.prev),ie=new o(c.getBody(),y),oe="sel-"+c.dom.uniqueId(),ae,se=c.$;return e.ceFalse&&(Y(),X()),{showBlockCaretContainer:U,hideFakeCaret:Z,destroy:Q}}var b=f.curry,C=l.isContentEditableTrue,x=l.isContentEditableFalse,w=l.isElement,N=i.isAfterContentEditableFalse,E=i.isBeforeContentEditableFalse,_=c.getSelectedNode;return y}),r(Ze,[],function(){var e=0,t=function(){var e=function(){return Math.round(4294967295*Math.random()).toString(36)},t=(new Date).getTime();return"s"+t.toString(36)+e()+e()+e()},n=function(n){return n+e++ +t()};return{uuid:n}}),r(et,[w,g,E,R,A,H,P,Y,J,Q,Z,ee,oe,ae,N,f,Ae,Pe,B,L,Oe,d,m,u,Ie,Fe,ze,je,Qe,Ze],function(e,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,C,x,w,N,E,_,S,k,T,R,A){function B(e,t,i){var o=this,a,s,l;a=o.documentBaseUrl=i.documentBaseURL,s=i.baseURI,l=i.defaultSettings,t=P({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:a,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:o.convertURL,url_converter_scope:o,ie7_compat:!0},l,t),l&&l.external_plugins&&t.external_plugins&&(t.external_plugins=P({},l.external_plugins,t.external_plugins)),o.settings=t,r.language=t.language||"en",r.languageLoad=t.language_load,r.baseURL=i.baseURL,o.id=t.id=e,o.setDirty(!1),o.plugins={},o.documentBaseURI=new p(t.document_base_url||a,{base_uri:s}),o.baseURI=s,o.contentCSS=[],o.contentStyles=[],o.shortcuts=new k(o),o.loadedCSS={},o.editorCommands=new h(o),t.target&&(o.targetElm=t.target),o.suffix=i.suffix,o.editorManager=i,o.inline=t.inline,o.settings.content_editable=o.inline,t.cache_suffix&&(w.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),t.override_viewport===!1&&(w.overrideViewPort=!1),i.fire("SetupEditor",o),o.execCallback("setup",o),o.$=n.overrideDefaults(function(){return{context:o.inline?o.getBody():o.getDoc(),element:o.getBody()}})}var D=e.DOM,L=r.ThemeManager,M=r.PluginManager,P=N.extend,H=N.each,O=N.explode,I=N.inArray,F=N.trim,z=N.resolve,U=g.Event,W=w.gecko,V=w.ie;return B.prototype={render:function(){function e(){D.unbind(window,"ready",e),n.render()}function t(){var e=m.ScriptLoader;if(r.language&&"en"!=r.language&&!r.language_url&&(r.language_url=n.editorManager.baseURL+"/langs/"+r.language+".js"),r.language_url&&e.add(r.language_url),r.theme&&"function"!=typeof r.theme&&"-"!=r.theme.charAt(0)&&!L.urls[r.theme]){var t=r.theme_url;t=t?n.documentBaseURI.toAbsolute(t):"themes/"+r.theme+"/theme"+o+".js",L.load(r.theme,t)}N.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),H(r.external_plugins,function(e,t){M.load(t,e),r.plugins+=" "+t}),H(r.plugins.split(/[ ,]/),function(e){if(e=F(e),e&&!M.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=M.dependencies(e);H(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=M.createUrl(t,e),M.load(e.resource,e)})}else M.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),e.loadQueue(function(){n.removed||n.init()})}var n=this,r=n.settings,i=n.id,o=n.suffix;if(!U.domLoaded)return void D.bind(window,"ready",e);if(n.getElement()&&w.contentEditable){r.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden");var a=n.getElement().form||D.getParent(i,"form");a&&(n.formElement=a,r.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&(D.insertAfter(D.create("input",{type:"hidden",name:i}),i),n.hasHiddenInput=!0),n.formEventDelegate=function(e){n.fire(e.type,e)},D.bind(a,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!r.submit_patch||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return n.editorManager.triggerSave(),n.setDirty(!1),a._mceOldSubmit(a)})),n.windowManager=new v(n),n.notificationManager=new y(n),"xml"==r.encoding&&n.on("GetContent",function(e){e.save&&(e.content=D.encode(e.content))}),r.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&n.save()}),r.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),n.editorManager.add(n),t()}},init:function(){function e(n){var r=M.get(n),i,o;if(i=M.urls[n]||t.documentBaseUrl.replace(/\/$/,""),n=F(n),r&&-1===I(m,n)){if(H(M.dependencies(n),function(t){e(t)}),t.plugins[n])return;o=new r(t,i,t.$),t.plugins[n]=o,o.init&&(o.init(t,i),m.push(n))}}var t=this,n=t.settings,r=t.getElement(),i,o,a,s,l,c,u,d,f,h,p,m=[];if(this.editorManager.i18n.setCode(n.language),t.rtl=n.rtl_ui||this.editorManager.i18n.rtl,n.aria_label=n.aria_label||D.getAttrib(r,"aria-label",t.getLang("aria.rich_text_area")),n.theme&&("function"!=typeof n.theme?(n.theme=n.theme.replace(/-/,""),c=L.get(n.theme),t.theme=new c(t,L.urls[n.theme]),t.theme.init&&t.theme.init(t,L.urls[n.theme]||t.documentBaseUrl.replace(/\/$/,""),t.$)):t.theme=n.theme),H(n.plugins.replace(/\-/g,"").split(/[ ,]/),e),n.render_ui&&t.theme&&(t.orgDisplay=r.style.display,"function"!=typeof n.theme?(i=n.width||r.style.width||r.offsetWidth,o=n.height||r.style.height||r.offsetHeight,a=n.min_height||100,h=/^[0-9\.]+(|px)$/i,h.test(""+i)&&(i=Math.max(parseInt(i,10),100)),h.test(""+o)&&(o=Math.max(parseInt(o,10),a)),l=t.theme.renderUI({targetNode:r,width:i,height:o,deltaWidth:n.delta_width,deltaHeight:n.delta_height}),n.content_editable||(o=(l.iframeHeight||o)+("number"==typeof o?l.deltaHeight||0:""),a>o&&(o=a))):(l=n.theme(t,r),l.editorContainer.nodeType&&(l.editorContainer=l.editorContainer.id=l.editorContainer.id||t.id+"_parent"),l.iframeContainer.nodeType&&(l.iframeContainer=l.iframeContainer.id=l.iframeContainer.id||t.id+"_iframecontainer"),o=l.iframeHeight||r.offsetHeight),t.editorContainer=l.editorContainer),n.content_css&&H(O(n.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toAbsolute(e))}),n.content_style&&t.contentStyles.push(n.content_style),n.content_editable)return r=s=l=null,t.initContentBody();if(t.iframeHTML=n.doctype+"<html><head>",n.document_base_url!=t.documentBaseUrl&&(t.iframeHTML+='<base href="'+t.documentBaseURI.getURI()+'" />'),!w.caretAfter&&n.ie7_compat&&(t.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'),t.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',!/#$/.test(document.location.href))for(p=0;p<t.contentCSS.length;p++){var g=t.contentCSS[p];t.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+N._addCacheSuffix(g)+'" />',t.loadedCSS[g]=!0}d=n.body_id||"tinymce",-1!=d.indexOf("=")&&(d=t.getParam("body_id","","hash"),d=d[t.id]||d),f=n.body_class||"",-1!=f.indexOf("=")&&(f=t.getParam("body_class","","hash"),f=f[t.id]||""),n.content_security_policy&&(t.iframeHTML+='<meta http-equiv="Content-Security-Policy" content="'+n.content_security_policy+'" />'),t.iframeHTML+='</head><body id="'+d+'" class="mce-content-body '+f+'" data-id="'+t.id+'"><br></body></html>';var v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';document.domain!=location.hostname&&w.ie&&w.ie<12&&(u=v);var y=D.create("iframe",{id:t.id+"_ifr",frameBorder:"0",allowTransparency:"true",title:t.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:o,display:"block"}});if(y.onload=function(){y.onload=null,t.fire("load")},D.setAttrib(y,"src",u||'javascript:""'),t.contentAreaContainer=l.iframeContainer,t.iframeElement=y,s=D.add(l.iframeContainer,y),V)try{t.getDoc()}catch(b){s.src=u=v}l.editorContainer&&(D.get(l.editorContainer).style.display=t.orgDisplay,t.hidden=D.isHidden(l.editorContainer)),t.getElement().style.display="none",D.setAttrib(t.id,"aria-hidden",!0),u||t.initContentBody(),r=s=l=null},initContentBody:function(t){var n=this,r=n.settings,s=n.getElement(),h=n.getDoc(),p,m;r.inline||(n.getElement().style.visibility=n.orgVisibility),t||r.content_editable||(h.open(),h.write(n.iframeHTML),h.close()),r.content_editable&&(n.on("remove",function(){var e=this.getBody();D.removeClass(e,"mce-content-body"),D.removeClass(e,"mce-edit-focus"),D.setAttrib(e,"contentEditable",null)}),D.addClass(s,"mce-content-body"),n.contentDocument=h=r.content_document||document,n.contentWindow=r.content_window||window,n.bodyElement=s,r.content_document=r.content_window=null,r.root_name=s.nodeName.toLowerCase()),p=n.getBody(),p.disabled=!0,n.readonly=r.readonly,n.readonly||(n.inline&&"static"==D.getStyle(p,"position",!0)&&(p.style.position="relative"),p.contentEditable=n.getParam("content_editable_state",!0)),p.disabled=!1,n.editorUpload=new T(n),n.schema=new b(r),n.dom=new e(h,{keep_values:!0,url_converter:n.convertURL,url_converter_scope:n,hex_colors:r.force_hex_style_colors,class_filter:r.class_filter,update_styles:!0,root_element:n.inline?n.getBody():null,collect:r.content_editable,schema:n.schema,onSetAttrib:function(e){n.fire("SetAttrib",e)}}),n.parser=new C(r,n.schema),n.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var r=e.length,i,o=n.dom,a,s;r--;)if(i=e[r],a=i.attr(t),s="data-mce-"+t,!i.attributes.map[s]){if(0===a.indexOf("data:")||0===a.indexOf("blob:"))continue;"style"===t?(a=o.serializeStyle(o.parseStyle(a),i.name),a.length||(a=null),i.attr(s,a),i.attr(t,a)):"tabindex"===t?(i.attr(s,a),i.attr(t,null)):i.attr(s,n.convertURL(a,t,i.name))}}),n.parser.addNodeFilter("script",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("type")||"no/type",0!==r.indexOf("mce-")&&n.attr("type","mce-"+r)}),n.parser.addNodeFilter("#cdata",function(e){for(var t=e.length,n;t--;)n=e[t],n.type=8,n.name="#comment",n.value="[CDATA["+n.value+"]]"}),n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t=e.length,r,i=n.schema.getNonEmptyElements();t--;)r=e[t],r.isEmpty(i)&&(r.append(new o("br",1)).shortEnded=!0)}),n.serializer=new a(r,n),n.selection=new l(n.dom,n.getWin(),n.serializer,n),n.formatter=new c(n),n.undoManager=new u(n),n.forceBlocks=new f(n),n.enterKey=new d(n),n._nodeChangeDispatcher=new i(n),n._selectionOverrides=new R(n),n.fire("PreInit"),r.browser_spellcheck||r.gecko_spellcheck||(h.body.spellcheck=!1,D.setAttrib(p,"spellcheck","false")),n.quirks=new x(n),n.fire("PostRender"),r.directionality&&(p.dir=r.directionality),r.nowrap&&(p.style.whiteSpace="nowrap"),r.protect&&n.on("BeforeSetContent",function(e){H(r.protect,function(t){e.content=e.content.replace(t,function(e){return"<!--mce:protected "+escape(e)+"-->"})})}),n.on("SetContent",function(){n.addVisual(n.getBody())}),r.padd_empty_editor&&n.on("PostProcess",function(e){e.content=e.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")}),n.load({initial:!0,format:"html"}),n.startContent=n.getContent({format:"raw"}),n.initialized=!0,n.bindPendingEventDelegates(),n.fire("init"),n.focus(!0),n.nodeChanged({initial:!0}),n.execCallback("init_instance_callback",n),n.on("compositionstart compositionend",function(e){n.composing="compositionstart"===e.type}),n.contentStyles.length>0&&(m="",H(n.contentStyles,function(e){m+=e+"\r\n"}),n.dom.addStyle(m)),H(n.contentCSS,function(e){n.loadedCSS[e]||(n.dom.loadCSS(e),n.loadedCSS[e]=!0)}),r.auto_focus&&E.setEditorTimeout(n,function(){var e;e=r.auto_focus===!0?n:n.editorManager.get(r.auto_focus),e.destroyed||e.focus()},100),s=h=p=null},focus:function(e){function t(e){return n.dom.getParent(e,function(e){return"true"===n.dom.getContentEditable(e)})}var n=this,r=n.selection,i=n.settings.content_editable,o,a,s=n.getDoc(),l=n.getBody(),c;if(!e){if(o=r.getRng(),o.item&&(a=o.item(0)),n.quirks.refreshContentEditable(),c=t(r.getNode()),n.$.contains(l,c))return c.focus(),r.normalize(),void n.editorManager.setActive(n);if(i||(w.opera||n.getBody().focus(),n.getWin().focus()),W||i){if(l.setActive)try{l.setActive()}catch(u){l.focus()}else l.focus();i&&r.normalize()}a&&a.ownerDocument==s&&(o=s.body.createControlRange(),o.addElement(a),o.select())}n.editorManager.setActive(n)},execCallback:function(e){var t=this,n=t.settings[e],r;if(n)return t.callbackLookup&&(r=t.callbackLookup[e])&&(n=r.func,r=r.scope),"string"==typeof n&&(r=n.replace(/\.\w+$/,""),r=r?z(r):0,n=z(n),t.callbackLookup=t.callbackLookup||{},t.callbackLookup[e]={func:n,scope:r}),n.apply(r||t,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?(e=n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||"{#"+r+"}"}),this.editorManager.translate(e)):""},getLang:function(e,n){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(n!==t?n:"{#"+e+"}")},getParam:function(e,t,n){var r=e in this.settings?this.settings[e]:t,i;return"hash"===n?(i={},"string"==typeof r?H(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(e){e=e.split("="),e.length>1?i[F(e[0])]=F(e[1]):i[F(e[0])]=F(e)}):i=r,i):r},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addContextToolbar:function(e,t){var n=this,r;n.contextToolbars=n.contextToolbars||[],"string"==typeof e&&(r=e,e=function(e){return n.dom.is(e,r)}),n.contextToolbars.push({id:A.uuid("mcet"),predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable=!0:(D.show(e.getContainer()),D.hide(e.id)),e.load(),e.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(V&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(D.hide(e.getContainer()),D.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n=this,r=n.getElement(),i;return r?(e=e||{},e.load=!0,i=n.setContent(r.value!==t?r.value:r.innerHTML,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,i):void 0},save:function(e){var t=this,n=t.getElement(),r,i;if(n&&t.initialized)return e=e||{},e.save=!0,e.element=n,r=e.content=t.getContent(e),e.no_events||t.fire("SaveContent",e),"raw"==e.format&&t.fire("RawSaveContent",e),r=e.content,/TEXTAREA|INPUT/i.test(n.nodeName)?n.value=r:(t.inline||(n.innerHTML=r),(i=D.getParent(t.id,"form"))&&H(i.elements,function(e){return e.name==t.id?(e.value=r,!1):void 0})),e.element=n=null,e.set_dirty!==!1&&t.setDirty(!1),r},setContent:function(e,t){var n=this,r=n.getBody(),i,o;return t=t||{},t.format=t.format||"html",t.set=!0,t.content=e,t.no_events||n.fire("BeforeSetContent",t),e=t.content,0===e.length||/^\s+$/.test(e)?(o=V&&11>V?"":'<br data-mce-bogus="1">',"TABLE"==r.nodeName?e="<tr><td>"+o+"</td></tr>":/^(UL|OL)$/.test(r.nodeName)&&(e="<li>"+o+"</li>"),i=n.settings.forced_root_block,i&&n.schema.isValidChild(r.nodeName.toLowerCase(),i.toLowerCase())?(e=o,e=n.dom.createHTML(i,n.settings.forced_root_block_attrs,e)):V||e||(e='<br data-mce-bogus="1">'),n.dom.setHTML(r,e),n.fire("SetContent",t)):("raw"!==t.format&&(e=new s({validate:n.validate},n.schema).serialize(n.parser.parse(e,{isRootContent:!0}))),t.content=F(e),n.dom.setHTML(r,t.content),t.no_events||n.fire("SetContent",t)),t.content},getContent:function(e){var t=this,n,r=t.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),n="raw"==e.format?t.serializer.getTrimmedContent():"text"==e.format?r.innerText||r.textContent:t.serializer.serialize(r,e),"text"!=e.format?e.content=F(n):e.content=n,e.no_events||t.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=P({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!=t&&this.fire("dirty")},setMode:function(e){S.setMode(this,e)},getContainer:function(){var e=this;return e.container||(e.container=D.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=D.get(this.id)),this.targetElm},getWin:function(){var e=this,t;return e.contentWindow||(t=e.iframeElement,t&&(e.contentWindow=t.contentWindow)),e.contentWindow},getDoc:function(){var e=this,t;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var r=this,i=r.settings;return i.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n=this,r=n.settings,i=n.dom,o;e=e||n.getBody(),n.hasVisual===t&&(n.hasVisual=r.visual),H(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return o=r.visual_table_class||"mce-item-table",t=i.getAttrib(e,"border"),void(t&&"0"!=t||!n.hasVisual?i.removeClass(e,o):i.addClass(e,o));case"A":return void(i.getAttrib(e,"href",!1)||(t=i.getAttrib(e,"name")||e.id,o=r.visual_anchor_class||"mce-item-anchor",t&&n.hasVisual?i.addClass(e,o):i.removeClass(e,o)))}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;e.removed||(e.save(),e.removed=1,e.unbindAllNativeEvents(),e.hasHiddenInput&&D.remove(e.getElement().nextSibling),e.inline||(V&&10>V&&e.getDoc().execCommand("SelectAll",!1,null),D.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null),e.fire("remove"),e.editorManager.remove(e),D.remove(e.getContainer()),e._selectionOverrides.destroy(),e.editorUpload.destroy(),e.destroy())},destroy:function(e){var t=this,n;if(!t.destroyed){if(!e&&!t.removed)return void t.remove();e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.selection.destroy(),t.dom.destroy()),n=t.formElement,n&&(n._mceOldSubmit&&(n.submit=n._mceOldSubmit,n._mceOldSubmit=null),D.unbind(n,"submit reset",t.formEventDelegate)),t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1}},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},P(B.prototype,_),B}),r(tt,[],function(){var e={},t="en";return{setCode:function(e){e&&(t=e,this.rtl=this.data[e]?"rtl"===this.data[e]._dir:!1)},getCode:function(){return t},rtl:!1,add:function(t,n){var r=e[t];r||(e[t]=r={});for(var i in n)r[i]=n[i];this.setCode(t)},translate:function(n){var r;if(r=e[t],r||(r={}),"undefined"==typeof n)return n;if("string"!=typeof n&&n.raw)return n.raw;if(n.push){var i=n.slice(1);n=(r[n[0]]||n[0]).replace(/\{([0-9]+)\}/g,function(e,t){return i[t]})}return(r[n]||n).replace(/{context:\w+}$/,"")},data:e}}),r(nt,[w,u,d],function(e,t,n){function r(e){function l(){try{return document.activeElement}catch(e){return document.body}}function c(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}function u(e,t){var n;return t.startContainer?(n=e.getDoc().createRange(),n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function d(e){return!!s.getParent(e,r.isEditorUIElement)}function f(r){var f=r.editor;f.on("init",function(){(f.inline||n.ie)&&("onbeforedeactivate"in document&&n.ie<9?f.dom.bind(f.getBody(),"beforedeactivate",function(e){if(e.target==f.getBody())try{f.lastRng=f.selection.getRng()}catch(t){}}):f.on("nodechange mouseup keyup",function(e){var t=l();"nodechange"==e.type&&e.selectionChange||(t&&t.id==f.id+"_ifr"&&(t=f.getBody()),f.dom.isChildOf(t,f.getBody())&&(f.lastRng=f.selection.getRng()))}),n.webkit&&!i&&(i=function(){var t=e.activeEditor;if(t&&t.selection){var n=t.selection.getRng();n&&!n.collapsed&&(f.lastRng=n)}},s.bind(document,"selectionchange",i)))}),f.on("setcontent",function(){f.lastRng=null}),f.on("mousedown",function(){f.selection.lastFocusBookmark=null}),f.on("focusin",function(){var t=e.focusedEditor,n;f.selection.lastFocusBookmark&&(n=u(f,f.selection.lastFocusBookmark),f.selection.lastFocusBookmark=null,f.selection.setRng(n)),t!=f&&(t&&t.fire("blur",{focusedEditor:f}),e.setActive(f),e.focusedEditor=f,f.fire("focus",{blurredEditor:t}),f.focus(!0)),f.lastRng=null}),f.on("focusout",function(){t.setEditorTimeout(f,function(){var t=e.focusedEditor;d(l())||t!=f||(f.fire("blur",{focusedEditor:null}),e.focusedEditor=null,f.selection&&(f.selection.lastFocusBookmark=null))})}),o||(o=function(t){var n=e.activeEditor,r;r=t.target,n&&r.ownerDocument==document&&(n.selection&&r!=n.getBody()&&(n.selection.lastFocusBookmark=c(n.dom,n.lastRng)),r==document.body||d(r)||e.focusedEditor!=n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},s.bind(document,"focusin",o)),f.inline&&!a&&(a=function(t){var n=e.activeEditor,r=n.dom;if(n.inline&&r&&!r.isChildOf(t.target,n.getBody())){var i=n.selection.getRng();i.collapsed||(n.lastRng=i)}},s.bind(document,"mouseup",a))}function h(t){e.focusedEditor==t.editor&&(e.focusedEditor=null),e.activeEditor||(s.unbind(document,"selectionchange",i),
+s.unbind(document,"focusin",o),s.unbind(document,"mouseup",a),i=o=a=null)}e.on("AddEditor",f),e.on("RemoveEditor",h)}var i,o,a,s=e.DOM;return r.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},r}),r(rt,[et,g,w,ae,d,m,c,ue,tt,nt],function(e,t,n,r,i,o,a,s,l,c){function u(e){g(C.editors,function(t){"scroll"===e.type?t.fire("ScrollWindow",e):t.fire("ResizeWindow",e)})}function d(e,n){n!==x&&(n?t(window).on("resize scroll",u):t(window).off("resize scroll",u),x=n)}function f(e){var t=C.editors,n;delete t[e.id];for(var r=0;r<t.length;r++)if(t[r]==e){t.splice(r,1),n=!0;break}return C.activeEditor==e&&(C.activeEditor=t[0]),C.focusedEditor==e&&(C.focusedEditor=null),n}function h(e){return e&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(f(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null),e}var p=n.DOM,m=o.explode,g=o.each,v=o.extend,y=0,b,C,x=!1;return C={$:t,majorVersion:"4",minorVersion:"4.1",releaseDate:"2016-07-26",editors:[],i18n:l,activeEditor:null,setup:function(){var e=this,t,n,i="",o,a;if(n=r.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/")),o=window.tinymce||window.tinyMCEPreInit)t=o.base||o.baseURL,i=o.suffix;else{for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){a=s[l].src;var u=a.substring(a.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(a)){-1!=u.indexOf(".min")&&(i=".min"),t=a.substring(0,a.lastIndexOf("/"));break}}!t&&document.currentScript&&(a=document.currentScript.src,-1!=a.indexOf(".min")&&(i=".min"),t=a.substring(0,a.lastIndexOf("/")))}e.baseURL=new r(n).toAbsolute(t),e.documentBaseURL=n,e.baseURI=new r(e.baseURL),e.suffix=i,e.focusManager=new c(e)},overrideDefaults:function(e){var t,n;t=e.base_url,t&&(this.baseURL=new r(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new r(this.baseURL)),n=e.suffix,e.suffix&&(this.suffix=n),this.defaultSettings=e},init:function(n){function r(e,t){return e.inline&&t.tagName.toLowerCase()in C}function i(e,t){window.console&&!window.test&&window.console.log(e,t)}function s(e){var t=e.id;return t||(t=e.name,t=t&&!p.get(t)?e.name:p.uniqueId(),e.setAttribute("id",t)),t}function l(e){var t=n[e];if(t)return t.apply(f,Array.prototype.slice.call(arguments,2))}function c(e,t){return t.constructor===RegExp?t.test(e.className):p.hasClass(e,t)}function u(e){var t,n=[];if(e.types)return g(e.types,function(e){n=n.concat(p.select(e.selector))}),n;if(e.selector)return p.select(e.selector);if(e.target)return[e.target];switch(e.mode){case"exact":t=e.elements||"",t.length>0&&g(m(t),function(e){var t;(t=p.get(e))?n.push(t):g(document.forms,function(t){g(t.elements,function(t){t.name===e&&(e="mce_editor_"+y++,p.setAttrib(t,"id",e),n.push(t))})})});break;case"textareas":case"specific_textareas":g(p.select("textarea"),function(t){e.editor_deselector&&c(t,e.editor_deselector)||e.editor_selector&&!c(t,e.editor_selector)||n.push(t)})}return n}function d(){function a(t,n,r){var i=new e(t,n,f);m.push(i),i.on("init",function(){++c===y.length&&x(m)}),i.targetElm=i.targetElm||r,i.render()}var c=0,m=[],y;return p.unbind(window,"ready",d),l("onpageload"),y=t.unique(u(n)),n.types?void g(n.types,function(e){o.each(y,function(t){return p.is(t,e.selector)?(a(s(t),v({},n,e),t),!1):!0})}):(o.each(y,function(e){h(f.get(e.id))}),y=o.grep(y,function(e){return!f.get(e.id)}),void g(y,function(e){r(n,e)?i("Could not initialize inline editor on invalid inline target element",e):a(s(e),n,e)}))}var f=this,b,C;C=o.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option tbody tfoot thead tr script noscript style textarea video audio iframe object menu"," ");var x=function(e){b=e};return f.settings=n,p.bind(window,"ready",d),new a(function(e){b?e(b):x=function(t){e(t)}})},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),d(n,!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),b||(b=function(){t.fire("BeforeUnload")},p.bind(window,"beforeunload",b)),e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t=this,n,r=t.editors,i;{if(e)return"string"==typeof e?(e=e.selector||e,void g(p.select(e),function(e){i=r[e.id],i&&t.remove(i)})):(i=e,r[i.id]?(f(i)&&t.fire("RemoveEditor",{editor:i}),r.length||p.unbind(window,"beforeunload",b),i.remove(),d(r,r.length>0),i):null);for(n=r.length-1;n>=0;n--)t.remove(r[n])}},execCommand:function(t,n,r){var i=this,o=i.get(r);switch(t){case"mceAddEditor":return i.get(r)||new e(r,i.settings,i).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(i.execCommand("mceAddEditor",0,r),!0)}return i.activeEditor?i.activeEditor.execCommand(t,n,r):!1},triggerSave:function(){g(this.editors,function(e){e.save()})},addI18n:function(e,t){l.add(e,t)},translate:function(e){return l.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!=e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}},v(C,s),C.setup(),window.tinymce=window.tinyMCE=C,C}),r(it,[rt,m],function(e,t){var n=t.each,r=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function e(e,t){n(t,function(t,n){t&&s.setStyle(e,n,t)}),s.rename(e,"span")}function i(e){s=t.dom,l.convert_fonts_to_spans&&n(s.select("font,u,strike",e.node),function(e){o[e.nodeName.toLowerCase()](s,e)})}var o,a,s,l=t.settings;l.inline_styles&&(a=r(l.font_size_legacy_values),o={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:a[parseInt(n.size,10)-1]})},u:function(n,r){"html4"===t.settings.schema&&e(r,{textDecoration:"underline"})},strike:function(t,n){e(n,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",i))})})}),r(ot,[ue,m],function(e,t){var n={send:function(e){function r(){!e.async||4==i.readyState||o++>1e4?(e.success&&1e4>o&&200==i.status?e.success.call(e.success_scope,""+i.responseText,i,e):e.error&&e.error.call(e.error_scope,o>1e4?"TIMED_OUT":"GENERAL",i,e),i=null):setTimeout(r,10)}var i,o=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=e.async!==!1,e.data=e.data||"",n.fire("beforeInitialize",{settings:e}),i=new XMLHttpRequest){if(i.overrideMimeType&&i.overrideMimeType(e.content_type),i.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(i.withCredentials=!0),e.content_type&&i.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&t.each(e.requestheaders,function(e){i.setRequestHeader(e.key,e.value)}),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i=n.fire("beforeSend",{xhr:i,settings:e}).xhr,i.send(e.data),!e.async)return r();setTimeout(r,10)}}};return t.extend(n,e),n}),r(at,[],function(){function e(t,n){var r,i,o,a;if(n=n||'"',null===t)return"null";if(o=typeof t,"string"==o)return i="\bb      t\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=i.indexOf(t),r+1?"\\"+i.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+n;if("object"==o){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(r=0,i="[";r<t.length;r++)i+=(r>0?",":"")+e(t[r],n);return i+"]"}i="{";for(a in t)t.hasOwnProperty(a)&&(i+="function"!=typeof t[a]?(i.length>1?","+n:n)+a+n+":"+e(t[a],n):"");return i+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(t){}}}}),r(st,[at,ot,m],function(e,t,n){function r(e){this.settings=i({},e),this.count=0}var i=n.extend;return r.sendRPC=function(e){return(new r).send(e)},r.prototype={send:function(n){var r=n.error,o=n.success;n=i(this.settings,n),n.success=function(t,i){t=e.parse(t),"undefined"==typeof t&&(t={error:"JSON Parse error."}),t.error?r.call(n.error_scope||n.scope,t.error,i):o.call(n.success_scope||n.scope,t.result)},n.error=function(e,t){r&&r.call(n.error_scope||n.scope,e,t)},n.data=e.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",t.send(n)}},r}),r(lt,[w],function(e){return{callbacks:{},count:0,send:function(n){var r=this,i=e.DOM,o=n.count!==t?n.count:r.count,a="tinymce_jsonp_"+o;r.callbacks[o]=function(e){i.remove(a),delete r.callbacks[o],n.callback(e)},i.add(i.doc.body,"script",{id:a,src:n.url,type:"text/javascript"}),r.count++}}}),r(ct,[],function(){function e(){s=[];for(var e in a)s.push(e);i.length=s.length}function n(){function n(e){var n,r;return r=e!==t?u+e:i.indexOf(",",u),-1===r||r>i.length?null:(n=i.substring(u,r),u=r+1,n)}var r,i,s,u=0;if(a={},c){o.load(l),i=o.getAttribute(l)||"";do{var d=n();if(null===d)break;if(r=n(parseInt(d,32)||0),null!==r){if(d=n(),null===d)break;s=n(parseInt(d,32)||0),r&&(a[r]=s)}}while(null!==r);e()}}function r(){var t,n="";if(c){for(var r in a)t=a[r],n+=(n?",":"")+r.length.toString(32)+","+r+","+t.length.toString(32)+","+t;o.setAttribute(l,n);try{o.save(l)}catch(i){}e()}}var i,o,a,s,l,c;try{if(window.localStorage)return localStorage}catch(u){}return l="tinymce",o=document.documentElement,c=!!o.addBehavior,c&&o.addBehavior("#default#userData"),i={key:function(e){return s[e]},getItem:function(e){return e in a?a[e]:null},setItem:function(e,t){a[e]=""+t,r()},removeItem:function(e){delete a[e],r()},clear:function(){a={},r()}},n(),i}),r(ut,[w,f,N,E,m,d],function(e,t,n,r,i,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=r.PluginManager,a.ThemeManager=r.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,i.each(i,function(e,t){a[t]=e}),i.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),r(dt,[se,m],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.bodyClasses.add(this.settings.containerClass)},applyClasses:function(e){var t=this,n=t.settings,r,i,o,a;r=n.firstControlClass,i=n.lastControlClass,e.each(function(e){e.classes.remove(r).remove(i).add(n.controlClass),e.visible()&&(o||(o=e),a=e)}),o&&o.classes.add(r),a&&a.classes.add(i)},renderHtml:function(e){var t=this,n="";return t.applyClasses(e.items()),e.items().each(function(e){n+=e.renderHtml()}),n},recalc:function(){},postRender:function(){},isNative:function(){return!1}})}),r(ft,[dt],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'<div id="'+e._id+'-absend" class="'+e.classPrefix+'abs-end"></div>'+this._super(e)}})}),r(ht,[De],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t=this,n;t._super(e),e=t.settings,n=t.settings.size,t.on("click mousedown",function(e){e.preventDefault()}),t.on("touchstart",function(e){t.fire("click",e),e.preventDefault()}),e.subtype&&t.classes.add(e.subtype),n&&t.classes.add("btn-"+n),e.icon&&t.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e=this.getEl().firstChild,t;e&&(t=e.style,t.width=t.height="100%"),this._super()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("icon"),i,o=e.state.get("text"),a="";return i=e.settings.image,i?(r="none","string"!=typeof i&&(i=window.getSelection?i[0]:i[1]),i=" style=\"background-image: url('"+i+"')\""):i="",o&&(e.classes.add("btn-has-text"),a='<span class="'+n+'txt">'+e.encode(o)+"</span>"),r=e.settings.icon?n+"ico "+n+"i-"+r:"",'<div id="'+t+'" class="'+e.classes+'" tabindex="-1" aria-labelledby="'+t+'"><button role="presentation" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+i+"></i>":"")+a+"</button></div>"},bindStates:function(){function e(e){var i=n("span."+r,t.getEl());e?(i[0]||(n("button:first",t.getEl()).append('<span class="'+r+'"></span>'),i=n("span."+r,t.getEl())),i.html(t.encode(e))):i.remove(),t.classes.toggle("btn-has-text",!!e)}var t=this,n=t.$,r=t.classPrefix+"txt";return t.state.on("change:text",function(t){e(t.value)}),t.state.on("change:icon",function(n){var r=n.value,i=t.classPrefix;t.settings.icon=r,r=r?i+"ico "+i+"i-"+t.settings.icon:"";var o=t.getEl().firstChild,a=o.getElementsByTagName("i")[0];r?(a&&a==o.firstChild||(a=document.createElement("i"),o.insertBefore(a,o.firstChild)),a.className=r):a&&o.removeChild(a),e(t.state.get("text"))}),t._super()}})}),r(pt,[xe],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.classes.add("btn-group"),e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'"><div id="'+e._id+'-body">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}})}),r(mt,[De],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'<div id="'+t+'" class="'+e.classes+'" unselectable="on" aria-labelledby="'+t+'-al" tabindex="-1"><i class="'+n+"ico "+n+'i-checkbox"></i><span id="'+t+'-al" class="'+n+'label">'+e.encode(e.state.get("text"))+"</span></div>"},bindStates:function(){function e(e){t.classes.toggle("checked",e),t.aria("checked",e)}var t=this;return t.state.on("change:text",function(e){t.getEl("al").firstChild.data=t.translate(e.value)}),t.state.on("change:checked change:value",function(n){t.fire("change"),e(n.value)}),t.state.on("change:icon",function(e){var n=e.value,r=t.classPrefix;if("undefined"==typeof n)return t.settings.icon;t.settings.icon=n,n=n?r+"ico "+r+"i-"+t.settings.icon:"";var i=t.getEl().firstChild,o=i.getElementsByTagName("i")[0];n?(o&&o==i.firstChild||(o=document.createElement("i"),i.insertBefore(o,i.firstChild)),o.className=n):o&&i.removeChild(o)}),t.state.get("checked")&&e(!0),t._super()}})}),r(gt,[De,be,pe,g],function(e,t,n,r){return e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.classes.add("combobox"),t.subinput=!0,t.ariaTarget="inp",e.menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){var i=n.target,o=t.getEl();if(r.contains(o,i)||i==o)for(;i&&i!=o;)i.id&&-1!=i.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),i=i.parentNode}),t.on("keydown",function(e){"INPUT"==e.target.nodeName&&13==e.keyCode&&t.parents().reverse().each(function(n){var r=t.state.get("value"),i=t.getEl("inp").value;return e.preventDefault(),t.state.set("value",i),r!=i&&t.fire("change"),n.hasEventListeners("submit")&&n.toJSON?(n.fire("submit",{data:n.toJSON()}),!1):void 0})}),t.on("keyup",function(e){"INPUT"==e.target.nodeName&&t.state.set("value",e.target.value)})},showMenu:function(){var e=this,n=e.settings,r;e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(e.getContainerElm()),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control===e.menu&&e.focus()}),e.menu.on("show hide",function(t){t.control.items().each(function(t){t.active(t.value()==e.value())})}).fire("show"),e.menu.on("select",function(t){e.value(t.control.value())}),e.on("focusin",function(t){"INPUT"==t.target.tagName.toUpperCase()&&e.menu.hide()}),e.aria("expanded",!0)),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e=this,t=e.getEl(),i=e.getEl("open"),o=e.layoutRect(),a,s;a=i?o.w-n.getSize(i).width-10:o.w-10;var l=document;return l.all&&(!l.documentMode||l.documentMode<=8)&&(s=e.layoutRect().h-2+"px"),r(t.firstChild).css({width:a,lineHeight:s}),e._super(),e},postRender:function(){var e=this;return r(this.getEl("inp")).on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)}),e._super()},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.classPrefix,i=e.state.get("value")||"",o,a,s="",l="";return"spellcheck"in n&&(l+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(l+=' maxlength="'+n.maxLength+'"'),n.size&&(l+=' size="'+n.size+'"'),n.subtype&&(l+=' type="'+n.subtype+'"'),e.disabled()&&(l+=' disabled="disabled"'),o=n.icon,o&&"caret"!=o&&(o=r+"ico "+r+"i-"+n.icon),a=e.state.get("text"),(o||a)&&(s='<div id="'+t+'-open" class="'+r+"btn "+r+'open" tabIndex="-1" role="button"><button id="'+t+'-action" type="button" hidefocus="1" tabindex="-1">'+("caret"!=o?'<i class="'+o+'"></i>':'<i class="'+r+'caret"></i>')+(a?(o?" ":"")+a:"")+"</button></div>",e.classes.add("has-open")),'<div id="'+t+'" class="'+e.classes+'"><input id="'+t+'-inp" class="'+r+'textbox" value="'+e.encode(i,!1)+'" hidefocus="1"'+l+' placeholder="'+e.encode(n.placeholder)+'" />'+s+"</div>"},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl("inp").value!=t.value&&(e.getEl("inp").value=t.value)}),e.state.on("change:disabled",function(t){e.getEl("inp").disabled=t.value}),e._super()},remove:function(){r(this.getEl("inp")).off(),this._super()}})}),r(vt,[gt],function(e){return e.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl().getElementsByTagName("i")[0];if(t)try{t.style.background=e}catch(n){}},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.state.get("rendered")&&e.repaintColor(t.value)}),e._super()}})}),r(yt,[ht,ke],function(e,t){return e.extend({showPanel:function(){var e=this,n=e.settings;if(e.active(!0),e.panel)e.panel.show();else{var r=n.panel;r.type&&(r={layout:"grid",items:r}),r.role=r.role||"dialog",r.popover=!0,r.autohide=!0,r.ariaRoot=!0,e.panel=new t(r).on("hide",function(){e.active(!1)}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}e.panel.moveRel(e.getEl(),n.popoverAlign||(e.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var e=this;e.panel&&e.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}})}),r(bt,[yt,w],function(e,t){var n=t.DOM;return e.extend({init:function(e){this._super(e),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("text"),i=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",o=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"",a="";return r&&(e.classes.add("btn-has-text"),a='<span class="'+n+'txt">'+e.encode(r)+"</span>"),'<div id="'+t+'" class="'+e.classes+'" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">'+(i?'<i class="'+i+'"'+o+"></i>":"")+'<span id="'+t+'-preview" class="'+n+'preview"></span>'+a+'</button><button type="button" class="'+n+'open" hidefocus="1" tabindex="-1"> <i class="'+n+'caret"></i></button></div>'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(r){r.aria&&"down"==r.aria.key||r.control!=e||n.getParent(r.target,"."+e.classPrefix+"open")||(r.stopImmediatePropagation(),t.call(e,r))}),delete e.settings.onclick,e._super()}})}),r(Ct,[],function(){function e(e){function i(e,i,o){var a,s,l,c,u,d;return a=0,s=0,l=0,e/=255,i/=255,o/=255,u=t(e,t(i,o)),d=n(e,n(i,o)),u==d?(l=u,{h:0,s:0,v:100*l}):(c=e==u?i-o:o==u?e-i:o-e,a=e==u?3:o==u?1:5,a=60*(a-c/(d-u)),s=(d-u)/d,l=d,{h:r(a),s:r(100*s),v:r(100*l)})}function o(e,i,o){var a,s,l,c;if(e=(parseInt(e,10)||0)%360,i=parseInt(i,10)/100,o=parseInt(o,10)/100,i=n(0,t(i,1)),o=n(0,t(o,1)),0===i)return void(d=f=h=r(255*o));switch(a=e/60,s=o*i,l=s*(1-Math.abs(a%2-1)),c=o-s,Math.floor(a)){case 0:d=s,f=l,h=0;break;case 1:d=l,f=s,h=0;break;case 2:d=0,f=s,h=l;break;case 3:d=0,f=l,h=s;break;case 4:d=l,f=0,h=s;break;case 5:d=s,f=0,h=l;break;default:d=f=h=0}d=r(255*(d+c)),f=r(255*(f+c)),h=r(255*(h+c))}function a(){function e(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+e(d)+e(f)+e(h)}function s(){return{r:d,g:f,b:h}}function l(){return i(d,f,h)}function c(e){var t;return"object"==typeof e?"r"in e?(d=e.r,f=e.g,h=e.b):"v"in e&&o(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(d=parseInt(t[1],10),f=parseInt(t[2],10),h=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(d=parseInt(t[1],16),f=parseInt(t[2],16),h=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(d=parseInt(t[1]+t[1],16),f=parseInt(t[2]+t[2],16),h=parseInt(t[3]+t[3],16)),d=0>d?0:d>255?255:d,f=0>f?0:f>255?255:f,h=0>h?0:h>255?255:h,u}var u=this,d=0,f=0,h=0;e&&c(e),u.toRgb=s,u.toHsv=l,u.toHex=a,u.parse=c}var t=Math.min,n=Math.max,r=Math.round;return e}),r(xt,[De,we,pe,Ct],function(e,t,n,r){return e.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){function e(e,t){var r=n.getPos(e),i,o;return i=t.pageX-r.x,o=t.pageY-r.y,i=Math.max(0,Math.min(i/e.clientWidth,1)),o=Math.max(0,Math.min(o/e.clientHeight,1)),{x:i,y:o}}function i(e,t){var i=(360-e.h)/360;n.css(d,{top:100*i+"%"}),t||n.css(h,{left:e.s+"%",top:100-e.v+"%"}),f.style.background=new r({s:100,v:100,h:e.h}).toHex(),s.color().parse({s:e.s,v:e.v,h:e.h})}function o(t){var n;n=e(f,t),c.s=100*n.x,c.v=100*(1-n.y),i(c),s.fire("change")}function a(t){var n;n=e(u,t),c=l.toHsv(),c.h=360*(1-n.y),i(c,!0),s.fire("change")}var s=this,l=s.color(),c,u,d,f,h;u=s.getEl("h"),d=s.getEl("hp"),f=s.getEl("sv"),h=s.getEl("svp"),s._repaint=function(){c=l.toHsv(),i(c)},s._super(),s._svdraghelper=new t(s._id+"-sv",{start:o,drag:o}),s._hdraghelper=new t(s._id+"-h",{start:a,drag:a}),s._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){var t=this;return arguments.length?(t.color().parse(e),void(t._rendered&&t._repaint())):t.color().toHex()},color:function(){return this._color||(this._color=new r),this._color},renderHtml:function(){function e(){var e,t,n="",i,a;for(i="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",a=o.split(","),e=0,t=a.length-1;t>e;e++)n+='<div class="'+r+'colorpicker-h-chunk" style="height:'+100/t+"%;"+i+a[e]+",endColorstr="+a[e+1]+");-ms-"+i+a[e]+",endColorstr="+a[e+1]+')"></div>';return n}var t=this,n=t._id,r=t.classPrefix,i,o="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000",a="background: -ms-linear-gradient(top,"+o+");background: linear-gradient(to bottom,"+o+");";return i='<div id="'+n+'-h" class="'+r+'colorpicker-h" style="'+a+'">'+e()+'<div id="'+n+'-hp" class="'+r+'colorpicker-h-marker"></div></div>','<div id="'+n+'" class="'+t.classes+'"><div id="'+n+'-sv" class="'+r+'colorpicker-sv"><div class="'+r+'colorpicker-overlay1"><div class="'+r+'colorpicker-overlay2"><div id="'+n+'-svp" class="'+r+'colorpicker-selector1"><div class="'+r+'colorpicker-selector2"></div></div></div></div></div>'+i+"</div>"}})}),r(wt,[De],function(e){return e.extend({init:function(e){var t=this;e.delimiter||(e.delimiter="\xbb"),t._super(e),t.classes.add("path"),t.canFocus=!0,t.on("click",function(e){var n,r=e.target;(n=r.getAttribute("data-index"))&&t.fire("select",{value:t.row()[n],index:n})}),t.row(t.settings.row)},focus:function(){var e=this;return e.getEl().firstChild.focus(),e},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){var e=this;return'<div id="'+e._id+'" class="'+e.classes+'">'+e._getDataPathHtml(e.state.get("row"))+"</div>"},bindStates:function(){var e=this;return e.state.on("change:row",function(t){e.innerHtml(e._getDataPathHtml(t.value))}),e._super()},_getDataPathHtml:function(e){var t=this,n=e||[],r,i,o="",a=t.classPrefix;for(r=0,i=n.length;i>r;r++)o+=(r>0?'<div class="'+a+'divider" aria-hidden="true"> '+t.settings.delimiter+" </div>":"")+'<div role="button" class="'+a+"path-item"+(r==i-1?" "+a+"last":"")+'" data-index="'+r+'" tabindex="-1" id="'+t._id+"-"+r+'" aria-level="'+r+'">'+n[r].name+"</div>";return o||(o='<div class="'+a+'path-item">\xa0</div>'),o}})}),r(Nt,[wt],function(e){return e.extend({postRender:function(){function e(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}var t=this,n=t.settings.editor;return n.settings.elementpath!==!1&&(t.on("select",function(e){n.focus(),n.selection.select(this.row()[e.index].element),n.nodeChanged()}),n.on("nodeChange",function(r){for(var i=[],o=r.parents,a=o.length;a--;)if(1==o[a].nodeType&&!e(o[a])){var s=n.fire("ResolveName",{name:o[a].nodeName.toLowerCase(),target:o[a]});if(s.isDefaultPrevented()||i.push({name:s.name,element:o[a]}),s.isPropagationStopped())break}t.row(i)})),t._super()}})}),r(Et,[xe],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.classes.add("formitem"),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<div id="'+e._id+'-title" class="'+n+'title">'+e.settings.title+"</div>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}})}),r(_t,[xe,Et,m],function(e,t,n){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,r=e.items();e.settings.formItemDefaults||(e.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),r.each(function(r){var i,o=r.settings.label;o&&(i=new t(n.extend({items:{type:"label",id:r._id+"-l",text:o,flex:0,forId:r._id,disabled:r.disabled()}},e.settings.formItemDefaults)),i.type="formitem",r.aria("labelledby",r._id+"-l"),"undefined"==typeof r.settings.flex&&(r.settings.flex=1),e.replace(r,i),i.add(r))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super(),e.fromJSON(e.settings.data)},bindStates:function(){function e(){var e=0,n=[],r,i,o;if(t.settings.labelGapCalc!==!1)for(o="children"==t.settings.labelGapCalc?t.find("formitem"):t.items(),o.filter("formitem").each(function(t){var r=t.items()[0],i=r.getEl().clientWidth;e=i>e?i:e,n.push(r)}),i=t.settings.labelGap||0,r=n.length;r--;)n[r].settings.minWidth=e+i}var t=this;t._super(),t.on("show",e),e()}})}),r(St,[_t],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'<fieldset id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<legend id="'+e._id+'-title" class="'+n+'fieldset-title">'+e.settings.title+"</legend>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></fieldset>"}})}),r(kt,[gt,m],function(e,t){return e.extend({init:function(e){var n=this,r=tinymce.activeEditor,i=r.settings,o,a,s;e.spellcheck=!1,s=i.file_picker_types||i.file_browser_callback_types,s&&(s=t.makeMap(s,/[, ]/)),s&&!s[e.filetype]||(a=i.file_picker_callback,!a||s&&!s[e.filetype]?(a=i.file_browser_callback,!a||s&&!s[e.filetype]||(o=function(){a(n.getEl("inp").id,n.value(),e.filetype,window)})):o=function(){var i=n.fire("beforecall").meta;i=t.extend({filetype:e.filetype},i),a.call(r,function(e,t){n.value(e).fire("change",{meta:t})},n.value(),i)}),o&&(e.icon="browse",e.onaction=o),n._super(e)}})}),r(Tt,[ft],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),r(Rt,[ft],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v=[],y,b,C,x,w,N,E,_,S,k,T,R,A,B,D,L,M,P,H,O,I,F,z=Math.max,U=Math.min;for(r=e.items().filter(":visible"),i=e.layoutRect(),o=e.paddingBox,a=e.settings,f=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,c=a.spacing||0,"row-reversed"!=f&&"column-reverse"!=f||(r=r.set(r.toArray().reverse()),f=f.split("-")[0]),"column"==f?(S="y",E="h",_="minH",k="maxH",R="innerH",T="top",A="deltaH",B="contentH",H="left",M="w",D="x",L="innerW",P="minW",O="right",I="deltaW",F="contentW"):(S="x",E="w",_="minW",k="maxW",R="innerW",T="left",A="deltaW",B="contentW",H="top",M="h",D="y",L="innerH",P="minH",O="bottom",I="deltaH",F="contentH"),d=i[R]-o[T]-o[T],N=u=0,t=0,n=r.length;n>t;t++)h=r[t],p=h.layoutRect(),m=h.settings,g=m.flex,d-=n-1>t?c:0,g>0&&(u+=g,p[k]&&v.push(h),p.flex=g),d-=p[_],y=o[H]+p[P]+o[O],y>N&&(N=y);if(x={},0>d?x[_]=i[_]-d+i[A]:x[_]=i[R]-d+i[A],x[P]=N+i[I],x[B]=i[R]-d,x[F]=N,x.minW=U(x.minW,i.maxW),x.minH=U(x.minH,i.maxH),x.minW=z(x.minW,i.startMinWidth),x.minH=z(x.minH,i.startMinHeight),!i.autoResize||x.minW==i.minW&&x.minH==i.minH){for(C=d/u,t=0,n=v.length;n>t;t++)h=v[t],p=h.layoutRect(),b=p[k],y=p[_]+p.flex*C,y>b?(d-=p[k]-p[_],u-=p.flex,p.flex=0,p.maxFlexSize=b):p.maxFlexSize=0;for(C=d/u,w=o[T],x={},0===u&&("end"==l?w=d+o[T]:"center"==l?(w=Math.round(i[R]/2-(i[R]-d)/2)+o[T],0>w&&(w=o[T])):"justify"==l&&(w=o[T],c=Math.floor(d/(r.length-1)))),x[D]=o[H],t=0,n=r.length;n>t;t++)h=r[t],p=h.layoutRect(),y=p.maxFlexSize||p[_],"center"===s?x[D]=Math.round(i[L]/2-p[M]/2):"stretch"===s?(x[M]=z(p[P]||0,i[L]-o[H]-o[O]),x[D]=o[H]):"end"===s&&(x[D]=i[L]-p[M]-o.top),p.flex>0&&(y+=p.flex*C),x[E]=y,x[S]=w,h.layoutRect(x),h.recalc&&h.recalc(),w+=y+c}else if(x.w=x.minW,x.h=x.minH,e.layoutRect(x),this.recalc(e),null===e._lastRect){var W=e.parent();W&&(W._lastRect=null,W.recalc())}}})}),r(At,[dt],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})},isNative:function(){return!0}})}),r(Bt,[ye,De,ke,m,rt,d],function(e,t,n,r,i,o){function a(e){function t(t,n){return function(){var r=this;e.on("nodeChange",function(i){var o=e.formatter,a=null;s(i.parents,function(e){return s(t,function(t){return n?o.matchNode(e,n,{value:t.value})&&(a=t.value):o.matchNode(e,t.value)&&(a=t.value),a?!1:void 0}),a?!1:void 0}),r.value(a)})}}function r(e){e=e.replace(/;$/,"").split(";");for(var t=e.length;t--;)e[t]=e[t].split("=");return e}function i(){function t(e){var n=[];if(e)return s(e,function(e){var o={text:e.title,icon:e.icon};if(e.items)o.menu=t(e.items);else{
+var a=e.format||"custom"+r++;e.format||(e.name=a,i.push(e)),o.format=a,o.cmd=e.cmd}n.push(o)}),n}function n(){var n;return n=t(e.settings.style_formats_merge?e.settings.style_formats?o.concat(e.settings.style_formats):o:e.settings.style_formats||o)}var r=0,i=[],o=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}];return e.on("init",function(){s(i,function(t){e.formatter.register(t.name,t)})}),{type:"menu",items:n(),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){return this.settings.format?e.formatter.getCssText(this.settings.format):void 0},onPostRender:function(){var t=this;t.parent().on("show",function(){var n,r;n=t.settings.format,n&&(t.disabled(!e.formatter.canApply(n)),t.active(e.formatter.match(n))),r=t.settings.cmd,r&&t.active(e.queryCommandState(r))})},onclick:function(){this.settings.format&&c(this.settings.format),this.settings.cmd&&e.execCommand(this.settings.cmd)}}}}function o(t){return function(){var n=this;e.formatter?e.formatter.formatChanged(t,function(e){n.active(e)}):e.on("init",function(){e.formatter.formatChanged(t,function(e){n.active(e)})})}}function a(t){return function(){function n(){return e.undoManager?e.undoManager[t]():!1}var r=this;t="redo"==t?"hasRedo":"hasUndo",r.disabled(!n()),e.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(){r.disabled(e.readonly||!n())})}}function l(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)}function c(t){t.control&&(t=t.control.value()),t&&e.execCommand("mceToggleFormat",!1,t)}var u;u=i(),s({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,n){e.addButton(n,{tooltip:t,onPostRender:o(n),onclick:function(){c(n)}})}),s({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1]})}),s({blockquote:["Blockquote","mceBlockQuote"],numlist:["Numbered list","InsertOrderedList"],bullist:["Bullet list","InsertUnorderedList"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1],onPostRender:o(n)})}),e.addButton("undo",{tooltip:"Undo",onPostRender:a("undo"),cmd:"undo"}),e.addButton("redo",{tooltip:"Redo",onPostRender:a("redo"),cmd:"redo"}),e.addMenuItem("newdocument",{text:"New document",icon:"newdocument",cmd:"mceNewDocument"}),e.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:a("undo"),cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:a("redo"),cmd:"redo"}),e.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:l,cmd:"mceToggleVisualAid"}),e.addButton("remove",{tooltip:"Remove",icon:"remove",cmd:"Delete"}),s({cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"],bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(t,n){e.addMenuItem(n,{text:t[0],icon:n,shortcut:t[2],cmd:t[1]})}),e.on("mousedown",function(){n.hideAll()}),e.addButton("styleselect",{type:"menubutton",text:"Formats",menu:u}),e.addButton("formatselect",function(){var n=[],i=r(e.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");return s(i,function(t){n.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:i[0][0],values:n,fixedWidth:!0,onselect:c,onPostRender:t(n)}}),e.addButton("fontselect",function(){var n="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",i=[],o=r(e.settings.font_formats||n);return s(o,function(e){i.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:i,fixedWidth:!0,onPostRender:t(i,"fontname"),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}}),e.addButton("fontsizeselect",function(){var n=[],r="8pt 10pt 12pt 14pt 18pt 24pt 36pt",i=e.settings.fontsize_formats||r;return s(i.split(" "),function(e){var t=e,r=e,i=e.split("=");i.length>1&&(t=i[0],r=i[1]),n.push({text:t,value:r})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:n,fixedWidth:!0,onPostRender:t(n,"fontsize"),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}}),e.addMenuItem("formats",{text:"Formats",menu:u})}var s=r.each;i.on("AddEditor",function(t){t.editor.rtl&&(e.rtl=!0),a(t.editor)}),e.translate=function(e){return i.translate(e)},t.tooltips=!o.iOS}),r(Dt,[ft],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,C,x,w,N,E=[],_=[],S,k,T,R,A,B;t=e.settings,i=e.items().filter(":visible"),o=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(i.length)),n=Math.ceil(i.length/r),y=t.spacingH||t.spacing||0,b=t.spacingV||t.spacing||0,C=t.alignH||t.align,x=t.alignV||t.align,g=e.paddingBox,A="reverseRows"in t?t.reverseRows:e.isRtl(),C&&"string"==typeof C&&(C=[C]),x&&"string"==typeof x&&(x=[x]);for(d=0;r>d;d++)E.push(0);for(f=0;n>f;f++)_.push(0);for(f=0;n>f;f++)for(d=0;r>d&&(u=i[f*r+d],u);d++)c=u.layoutRect(),S=c.minW,k=c.minH,E[d]=S>E[d]?S:E[d],_[f]=k>_[f]?k:_[f];for(T=o.innerW-g.left-g.right,w=0,d=0;r>d;d++)w+=E[d]+(d>0?y:0),T-=(d>0?y:0)+E[d];for(R=o.innerH-g.top-g.bottom,N=0,f=0;n>f;f++)N+=_[f]+(f>0?b:0),R-=(f>0?b:0)+_[f];if(w+=g.left+g.right,N+=g.top+g.bottom,l={},l.minW=w+(o.w-o.innerW),l.minH=N+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){o.autoResize&&(l=e.layoutRect(l),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH);var D;D="start"==t.packV?0:R>0?Math.floor(R/n):0;var L=0,M=t.flexWidths;if(M)for(d=0;d<M.length;d++)L+=M[d];else L=r;var P=T/L;for(d=0;r>d;d++)E[d]+=M?M[d]*P:P;for(p=g.top,f=0;n>f;f++){for(h=g.left,s=_[f]+D,d=0;r>d&&(B=A?f*r+r-1-d:f*r+d,u=i[B],u);d++)m=u.settings,c=u.layoutRect(),a=Math.max(E[d],c.startMinWidth),c.x=h,c.y=p,v=m.alignH||(C?C[d]||C[0]:null),"center"==v?c.x=h+a/2-c.w/2:"right"==v?c.x=h+a-c.w:"stretch"==v&&(c.w=a),v=m.alignV||(x?x[d]||x[0]:null),"center"==v?c.y=p+s/2-c.h/2:"bottom"==v?c.y=p+s-c.h:"stretch"==v&&(c.h=s),u.layoutRect(c),h+=a+y,u.recalc&&u.recalc();p+=s+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var H=e.parent();H&&(H._lastRect=null,H.recalc())}}})}),r(Lt,[De,u],function(e,t){return e.extend({renderHtml:function(){var e=this;return e.classes.add("iframe"),e.canFocus=!1,'<iframe id="'+e._id+'" class="'+e.classes+'" tabindex="-1" src="'+(e.settings.url||"javascript:''")+'" frameborder="0"></iframe>'},src:function(e){this.getEl().src=e},html:function(e,n){var r=this,i=this.getEl().contentWindow.document.body;return i?(i.innerHTML=e,n&&n()):t.setTimeout(function(){r.html(e)}),this}})}),r(Mt,[De],function(e){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("infobox"),t.canFocus=!1},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},help:function(e){this.state.set("help",e)},renderHtml:function(){var e=this,t=e.classPrefix;return'<div id="'+e._id+'" class="'+e.classes+'"><div id="'+e._id+'-body">'+e.encode(e.state.get("text"))+'<button role="button" tabindex="-1"><i class="'+t+"ico "+t+'i-help"></i></button></div></div>'},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl("body").firstChild.data=e.encode(t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e.state.on("change:help",function(t){e.classes.toggle("has-help",t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),r(Pt,[De,pe],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("label"),t.canFocus=!1,e.multiline&&t.classes.add("autoscroll"),e.strong&&t.classes.add("strong")},initLayoutRect:function(){var e=this,n=e._super();if(e.settings.multiline){var r=t.getSize(e.getEl());r.width>n.maxW&&(n.minW=n.maxW,e.classes.add("multiline")),e.getEl().style.width=n.minW+"px",n.startMinH=n.h=n.minH=Math.min(n.maxH,t.getSize(e.getEl()).height)}return n},repaint:function(){var e=this;return e.settings.multiline||(e.getEl().style.lineHeight=e.layoutRect().h+"px"),e._super()},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},renderHtml:function(){var e=this,t,n,r=e.settings.forId;return!r&&(n=e.settings.forName)&&(t=e.getRoot().find("#"+n)[0],t&&(r=t._id)),r?'<label id="'+e._id+'" class="'+e.classes+'"'+(r?' for="'+r+'"':"")+">"+e.encode(e.state.get("text"))+"</label>":'<span id="'+e._id+'" class="'+e.classes+'">'+e.encode(e.state.get("text"))+"</span>"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.innerHtml(e.encode(t.value)),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),r(Ht,[xe],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){var t=this;t._super(e),t.classes.add("toolbar")},postRender:function(){var e=this;return e.items().each(function(e){e.classes.add("toolbar-item")}),e._super()}})}),r(Ot,[Ht],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),r(It,[ht,be,Ot],function(e,t,n){function r(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}var i=e.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),e=t.settings,t.classes.add("menubtn"),e.fixedWidth&&t.classes.add("fixed-width"),t.aria("haspopup",!0),t.state.set("menu",e.menu||t.render())},showMenu:function(){var e=this,n;return e.menu&&e.menu.visible()?e.hideMenu():(e.menu||(n=e.state.get("menu")||[],n.length?n={type:"menu",items:n}:n.type=n.type||"menu",n.renderTo?e.menu=n.parent(e).show().renderTo():e.menu=t.create(n).parent(e).renderTo(),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control.parent()===e.menu&&(t.stopPropagation(),e.focus(),e.hideMenu())}),e.menu.on("select",function(){e.focus()}),e.menu.on("show hide",function(t){t.control==e.menu&&e.activeMenu("show"==t.type),e.aria("expanded","show"==t.type)}).fire("show")),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),void e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]))},hideMenu:function(){var e=this;e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e=this,t=e._id,r=e.classPrefix,i=e.settings.icon,o,a=e.state.get("text"),s="";return o=e.settings.image,o?(i="none","string"!=typeof o&&(o=window.getSelection?o[0]:o[1]),o=" style=\"background-image: url('"+o+"')\""):o="",a&&(e.classes.add("btn-has-text"),s='<span class="'+r+'txt">'+e.encode(a)+"</span>"),i=e.settings.icon?r+"ico "+r+"i-"+i:"",e.aria("role",e.parent()instanceof n?"menuitem":"button"),'<div id="'+t+'" class="'+e.classes+'" tabindex="-1" aria-labelledby="'+t+'"><button id="'+t+'-open" role="presentation" type="button" tabindex="-1">'+(i?'<i class="'+i+'"'+o+"></i>":"")+s+' <i class="'+r+'caret"></i></button></div>'},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&r(t.target,e.getEl())&&(e.showMenu(),t.aria&&e.menu.items()[0].focus())}),e.on("mouseenter",function(t){var n=t.control,r=e.parent(),o;n&&r&&n instanceof i&&n.parent()==r&&(r.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=n&&(e.menu&&e.menu.visible()&&(o=!0),e.hideMenu())}),o&&(n.focus(),n.showMenu()))}),e._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}});return i}),r(Ft,[De,be,d,u],function(e,t,n,r){return e.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t=this,n;t._super(e),e=t.settings,t.classes.add("menu-item"),e.menu&&t.classes.add("menu-item-expand"),e.preview&&t.classes.add("menu-item-preview"),n=t.state.get("text"),"-"!==n&&"|"!==n||(t.classes.add("menu-item-sep"),t.aria("role","separator"),t.state.set("text","-")),e.selectable&&(t.aria("role","menuitemcheckbox"),t.classes.add("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||t.classes.add("menu-item-normal"),t.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&t.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var e=this,n=e.settings,r,i=e.parent();if(i.items().each(function(t){t!==e&&t.hideMenu()}),n.menu){r=e.menu,r?r.show():(r=n.menu,r.length?r={type:"menu",items:r}:r.type=r.type||"menu",i.settings.itemDefaults&&(r.itemDefaults=i.settings.itemDefaults),r=e.menu=t.create(r).parent(e).renderTo(),r.reflow(),r.on("cancel",function(t){t.stopPropagation(),e.focus(),r.hide()}),r.on("show hide",function(e){e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),r.on("hide",function(t){t.control===r&&e.classes.remove("selected")}),r.submenu=!0),r._parentMenu=i,r.classes.add("menu-sub");var o=r.testMoveRel(e.getEl(),e.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);r.moveRel(e.getEl(),o),r.rel=o,o="menu-sub-"+o,r.classes.remove(r._lastRel).add(o),r._lastRel=o,e.classes.add("selected"),e.aria("expanded",!0)}},hideMenu:function(){var e=this;return e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide(),e.aria("expanded",!1)),e},renderHtml:function(){function e(e){var t,r,i={};for(i=n.mac?{alt:"&#x2325;",ctrl:"&#x2318;",shift:"&#x21E7;",meta:"&#x2318;"}:{meta:"Ctrl"},e=e.split("+"),t=0;t<e.length;t++)r=i[e[t].toLowerCase()],r&&(e[t]=r);return e.join("+")}var t=this,r=t._id,i=t.settings,o=t.classPrefix,a=t.encode(t.state.get("text")),s=t.settings.icon,l="",c=i.shortcut;return s&&t.parent().classes.add("menu-has-icons"),i.image&&(l=" style=\"background-image: url('"+i.image+"')\""),c&&(c=e(c)),s=o+"ico "+o+"i-"+(t.settings.icon||"none"),'<div id="'+r+'" class="'+t.classes+'" tabindex="-1">'+("-"!==a?'<i class="'+s+'"'+l+"></i>\xa0":"")+("-"!==a?'<span id="'+r+'-text" class="'+o+'text">'+a+"</span>":"")+(c?'<div id="'+r+'-shortcut" class="'+o+'menu-shortcut">'+c+"</div>":"")+(i.menu?'<div class="'+o+'caret"></div>':"")+"</div>"},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var i=e.getEl("text");i&&i.setAttribute("style",n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),r.requestAnimationFrame(function(){e.parent().hideAll()})))}),e._super(),e},hover:function(){var e=this;return e.parent().items().each(function(e){e.classes.remove("selected")}),e.classes.toggle("selected",!0),e},active:function(e){return"undefined"!=typeof e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),r(zt,[g,ye,u],function(e,t,n){return function(r,i){var o=this,a,s=t.classPrefix,l;o.show=function(t,c){function u(){a&&(e(r).append('<div class="'+s+"throbber"+(i?" "+s+"throbber-inline":"")+'"></div>'),c&&c())}return o.hide(),a=!0,t?l=n.setTimeout(u,t):u(),o},o.hide=function(){var e=r.lastChild;return n.clearTimeout(l),e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),a=!1,o}}}),r(Ut,[ke,Ft,zt,m],function(e,t,n,r){return e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){var t=this;if(e.autohide=!0,e.constrainToViewport=!0,"function"==typeof e.items&&(e.itemsFactory=e.items,e.items=[]),e.itemDefaults)for(var n=e.items,i=n.length;i--;)n[i]=r.extend({},e.itemDefaults,n[i]);t._super(e),t.classes.add("menu")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var e=this;e.hideAll(),e.fire("select")},load:function(){function e(){t.throbber&&(t.throbber.hide(),t.throbber=null)}var t=this,r,i;i=t.settings.itemsFactory,i&&(t.throbber||(t.throbber=new n(t.getEl("body"),!0),0===t.items().length?(t.throbber.show(),t.fire("loading")):t.throbber.show(100,function(){t.items().remove(),t.fire("loading")}),t.on("hide close",e)),t.requestTime=r=(new Date).getTime(),t.settings.itemsFactory(function(n){return 0===n.length?void t.hide():void(t.requestTime===r&&(t.getEl().style.width="",t.getEl("body").style.width="",e(),t.items().remove(),t.getEl("body").innerHTML="",t.add(n),t.renderNew(),t.fire("loaded")))}))},hideAll:function(){var e=this;return this.find("menuitem").exec("hideMenu"),e._super()},preRender:function(){var e=this;return e.items().each(function(t){var n=t.settings;return n.icon||n.image||n.selectable?(e._hasIcons=!0,!1):void 0}),e.settings.itemsFactory&&e.on("postrender",function(){e.settings.itemsFactory&&e.load()}),e._super()}})}),r(Wt,[It,Ut],function(e,t){return e.extend({init:function(e){function t(r){for(var a=0;a<r.length;a++){if(i=r[a].selected||e.value===r[a].value)return o=o||r[a].text,n.state.set("value",r[a].value),!0;if(r[a].menu&&t(r[a].menu))return!0}}var n=this,r,i,o,a;n._super(e),e=n.settings,n._values=r=e.values,r&&("undefined"!=typeof e.value&&t(r),!i&&r.length>0&&(o=r[0].text,n.state.set("value",r[0].value)),n.state.set("menu",r)),n.state.set("text",e.text||o),n.classes.add("listbox"),n.on("select",function(t){var r=t.control;a&&(t.lastControl=a),e.multiple?r.active(!r.active()):n.value(t.control.value()),a=r})},bindStates:function(){function e(e,n){e instanceof t&&e.items().each(function(e){e.hasMenus()||e.active(e.value()===n)})}function n(e,t){var r;if(e)for(var i=0;i<e.length;i++){if(e[i].value===t)return e[i];if(e[i].menu&&(r=n(e[i].menu,t)))return r}}var r=this;return r.on("show",function(t){e(t.control,r.value())}),r.state.on("change:value",function(e){var t=n(r.state.get("menu"),e.value);t?r.text(t.text):r.text(r.settings.text)}),r._super()}})}),r(Vt,[mt],function(e){return e.extend({Defaults:{classes:"radio",role:"radio"}})}),r($t,[De,we],function(e,t){return e.extend({renderHtml:function(){var e=this,t=e.classPrefix;return e.classes.add("resizehandle"),"both"==e.settings.direction&&e.classes.add("resizehandle-both"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes+'"><i class="'+t+"ico "+t+'i-resize"></i></div>'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new t(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!=e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),r(qt,[De],function(e){function t(e){var t="";if(e)for(var n=0;n<e.length;n++)t+='<option value="'+e[n]+'">'+e[n]+"</option>";return t}return e.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(e){var t=this;t._super(e),t.settings.size&&(t.size=t.settings.size),t.settings.options&&(t._options=t.settings.options),t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){return e.toJSON?(n=e,!1):void 0}),t.fire("submit",{data:n.toJSON()}))})},options:function(e){return arguments.length?(this.state.set("options",e),this):this.state.get("options")},renderHtml:function(){var e=this,n,r="";return n=t(e._options),e.size&&(r=' size = "'+e.size+'"'),'<select id="'+e._id+'" class="'+e.classes+'"'+r+">"+n+"</select>"},bindStates:function(){var e=this;return e.state.on("change:options",function(n){e.getEl().innerHTML=t(n.value)}),e._super()}})}),r(jt,[De,we,pe],function(e,t,n){function r(e,t,n){return t>e&&(e=t),e>n&&(e=n),e}function i(e,t,n){e.setAttribute("aria-"+t,n)}function o(e,t){var r,o,a,s,l,c;"v"==e.settings.orientation?(s="top",a="height",o="h"):(s="left",a="width",o="w"),c=e.getEl("handle"),r=(e.layoutRect()[o]||100)-n.getSize(c)[a],l=r*((t-e._minValue)/(e._maxValue-e._minValue))+"px",c.style[s]=l,c.style.height=e.layoutRect().h+"px",i(c,"valuenow",t),i(c,"valuetext",""+e.settings.previewFilter(t)),i(c,"valuemin",e._minValue),i(c,"valuemax",e._maxValue)}return e.extend({init:function(e){var t=this;e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),t._super(e),t.classes.add("slider"),"v"==e.orientation&&t.classes.add("vertical"),t._minValue=e.minValue||0,t._maxValue=e.maxValue||100,t._initValue=t.state.get("value")},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'<div id="'+t+'" class="'+e.classes+'"><div id="'+t+'-handle" class="'+n+'slider-handle" role="slider" tabindex="-1"></div></div>'},reset:function(){this.value(this._initValue).repaint()},postRender:function(){function e(e,t,n){return(n+e)/(t-e)}function i(e,t,n){return n*(t-e)-e}function o(t,n){function o(o){var a;a=s.value(),a=i(t,n,e(t,n,a)+.05*o),a=r(a,t,n),s.value(a),s.fire("dragstart",{value:a}),s.fire("drag",{value:a}),s.fire("dragend",{value:a})}s.on("keydown",function(e){switch(e.keyCode){case 37:case 38:o(-1);break;case 39:case 40:o(1)}})}function a(e,i,o){var a,l,c,p,m;s._dragHelper=new t(s._id,{handle:s._id+"-handle",start:function(e){a=e[u],l=parseInt(s.getEl("handle").style[d],10),c=(s.layoutRect()[h]||100)-n.getSize(o)[f],s.fire("dragstart",{value:m})},drag:function(t){var n=t[u]-a;p=r(l+n,0,c),o.style[d]=p+"px",m=e+p/c*(i-e),s.value(m),s.tooltip().text(""+s.settings.previewFilter(m)).show().moveRel(o,"bc tc"),s.fire("drag",{value:m})},stop:function(){s.tooltip().hide(),s.fire("dragend",{value:m})}})}var s=this,l,c,u,d,f,h;l=s._minValue,c=s._maxValue,"v"==s.settings.orientation?(u="screenY",d="top",f="height",h="h"):(u="screenX",d="left",f="width",h="w"),s._super(),o(l,c,s.getEl("handle")),a(l,c,s.getEl("handle"))},repaint:function(){this._super(),o(this,this.value())},bindStates:function(){var e=this;return e.state.on("change:value",function(t){o(e,t.value)}),e._super()}})}),r(Yt,[De],function(e){return e.extend({renderHtml:function(){var e=this;return e.classes.add("spacer"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes+'"></div>'}})}),r(Xt,[It,pe,g],function(e,t,n){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e=this,r=e.getEl(),i=e.layoutRect(),o,a;return e._super(),o=r.firstChild,a=r.lastChild,n(o).css({width:i.w-t.getSize(a).width,height:i.h-2}),n(a).css({height:i.h-2}),e},activeMenu:function(e){var t=this;n(t.getEl().lastChild).toggleClass(t.classPrefix+"active",e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r,i=e.state.get("icon"),o=e.state.get("text"),a="";return r=e.settings.image,r?(i="none","string"!=typeof r&&(r=window.getSelection?r[0]:r[1]),r=" style=\"background-image: url('"+r+"')\""):r="",i=e.settings.icon?n+"ico "+n+"i-"+i:"",o&&(e.classes.add("btn-has-text"),a='<span class="'+n+'txt">'+e.encode(o)+"</span>"),'<div id="'+t+'" class="'+e.classes+'" role="button" tabindex="-1"><button type="button" hidefocus="1" tabindex="-1">'+(i?'<i class="'+i+'"'+r+"></i>":"")+a+'</button><button type="button" class="'+n+'open" hidefocus="1" tabindex="-1">'+(e._menuBtnText?(i?"\xa0":"")+e._menuBtnText:"")+' <i class="'+n+'caret"></i></button></div>'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(e){var n=e.target;if(e.control==this)for(;n;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==n.nodeName&&-1==n.className.indexOf("open"))return e.stopImmediatePropagation(),void(t&&t.call(this,e));n=n.parentNode}}),delete e.settings.onclick,e._super()}})}),r(Kt,[At],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}})}),r(Gt,[Ee,g,pe],function(e,t,n){return e.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var n;this.activeTabId&&(n=this.getEl(this.activeTabId),t(n).removeClass(this.classPrefix+"active"),n.setAttribute("aria-selected","false")),this.activeTabId="t"+e,n=this.getEl("t"+e),n.setAttribute("aria-selected","true"),t(n).addClass(this.classPrefix+"active"),this.items()[e].show().fire("showtab"),this.reflow(),this.items().each(function(t,n){e!=n&&t.hide()})},renderHtml:function(){var e=this,t=e._layout,n="",r=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,i){var o=e._id+"-t"+i;t.aria("role","tabpanel"),t.aria("labelledby",o),n+='<div id="'+o+'" class="'+r+'tab" unselectable="on" role="tab" aria-controls="'+t._id+'" aria-selected="false" tabIndex="-1">'+e.encode(t.settings.title)+"</div>"}),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1"><div id="'+e._id+'-head" class="'+r+'tabs" role="tablist">'+n+'</div><div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+t.renderHtml(e)+"</div></div>"},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.settings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(t.target.parentNode.id==e._id+"-head")for(var r=n.childNodes.length;r--;)n.childNodes[r]==t.target&&e.activateTab(r)})},initLayoutRect:function(){var e=this,t,r,i;r=n.getSize(e.getEl("head")).width,r=0>r?0:r,i=0,e.items().each(function(e){r=Math.max(r,e.layoutRect().minW),i=Math.max(i,e.layoutRect().minH)}),e.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=r,e.settings.h=i,e.layoutRect({x:0,y:0,w:r,h:i})});var o=n.getSize(e.getEl("head")).height;return e.settings.minWidth=r,e.settings.minHeight=i+o,t=e._super(),t.deltaH+=o,t.innerH=t.h-t.deltaH,t}})}),r(Jt,[De,m,pe],function(e,t,n){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("textbox"),e.multiline?t.classes.add("multiline"):(t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){return e.toJSON?(n=e,!1):void 0}),t.fire("submit",{data:n.toJSON()}))}),t.on("keyup",function(e){t.state.set("value",e.target.value)}))},repaint:function(){var e=this,t,n,r,i,o=0,a;t=e.getEl().style,n=e._layoutRect,a=e._lastRepaintRect||{};var s=document;return!e.settings.multiline&&s.all&&(!s.documentMode||s.documentMode<=8)&&(t.lineHeight=n.h-o+"px"),r=e.borderBox,i=r.left+r.right+8,o=r.top+r.bottom+(e.settings.multiline?8:0),n.x!==a.x&&(t.left=n.x+"px",a.x=n.x),n.y!==a.y&&(t.top=n.y+"px",a.y=n.y),n.w!==a.w&&(t.width=n.w-i+"px",a.w=n.w),n.h!==a.h&&(t.height=n.h-o+"px",a.h=n.h),e._lastRepaintRect=a,e.fire("repaint",{},!1),e},renderHtml:function(){var e=this,r=e.settings,i,o;return i={id:e._id,hidefocus:"1"},t.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(e){i[e]=r[e]}),e.disabled()&&(i.disabled="disabled"),r.subtype&&(i.type=r.subtype),o=n.create(r.multiline?"textarea":"input",i),o.value=e.state.get("value"),o.className=e.classes,o.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var e=this;e.getEl().value=e.state.get("value"),e._super(),e.$el.on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)})},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl().value!=t.value&&(e.getEl().value=t.value)}),e.state.on("change:disabled",function(t){e.getEl().disabled=t.value}),e._super()},remove:function(){this.$el.off(),this._super()}})}),r(Qt,[],function(){var e=this||window,t=function(){return e.tinymce};return"function"==typeof e.define&&(e.define.amd||e.define("ephox/tinymce",[],t)),{}}),a([l,c,u,d,f,h,m,g,v,y,C,w,N,E,T,A,B,D,L,M,P,H,I,F,j,Y,J,Q,oe,ae,se,le,ue,fe,he,ve,ye,be,Ce,xe,we,Ne,Ee,_e,Se,ke,Te,Re,Ae,Be,De,Le,Me,Pe,Ie,ze,et,tt,nt,rt,ot,at,st,lt,ct,ut,dt,ft,ht,pt,mt,gt,vt,yt,bt,Ct,xt,wt,Nt,Et,_t,St,kt,Tt,Rt,At,Bt,Dt,Lt,Mt,Pt,Ht,Ot,It,Ft,zt,Ut,Wt,Vt,$t,qt,jt,Yt,Xt,Kt,Gt,Jt])}(this);
\ No newline at end of file
index 9fcfafb81926ae825312a2d0d5238f5557dfd909..20d22c43dc4fe82a5715d371d80b7c78190785c5 100644 (file)
Binary files a/wp-includes/js/tinymce/wp-tinymce.js.gz and b/wp-includes/js/tinymce/wp-tinymce.js.gz differ
index e0f1b1e3faf52e90741ffda8032498368a4827b1..b268d7e4921ffc1fd4407266b29770ff4024b048 100644 (file)
@@ -225,7 +225,7 @@ var twemoji = (function (
 
     // RegExp based on emoji's official Unicode standards
     // http://www.unicode.org/Public/UNIDATA/EmojiSources.txt
-    re = /\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc41\u200d\ud83d\udde8|(?:[\u0023\u002a\u0030-\u0039])\ufe0f?\u20e3|(?:(?:[\u261d\u270c])(?:\ufe0f|(?!\ufe0e))|\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca\udfcb]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd75\udd90\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0]|\ud83e\udd18|[\u26f9\u270a\u270b\u270d])(?:\ud83c[\udffb-\udfff]|)|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf21\udf24-\udf84\udf86-\udf93\udf96\udf97\udf99-\udf9b\udf9e-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcc-\udff0\udff3-\udff5\udff7-\udfff]|\ud83d[\udc00-\udc41\udc44\udc45\udc51-\udc65\udc6a-\udc6d\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfd\udcff-\udd3d\udd49-\udd4e\udd50-\udd67\udd6f\udd70\udd73\udd74\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\udecb-\uded0\udee0-\udee5\udee9\udeeb\udeec\udef0\udef3]|\ud83e[\udd10-\udd17\udd80-\udd84\uddc0]|[\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\u2602-\u2604\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638\u2692\u2694\u2696\u2697\u2699\u269b\u269c\u26b0\u26b1\u26c8\u26ce\u26cf\u26d1\u26d3\u26e9\u26f0\u26f1\u26f4\u26f7\u26f8\u2705\u271d\u2721\u2728\u274c\u274e\u2753-\u2755\u2763\u2795-\u2797\u27b0\u27bf\ue50a]|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37]|[\u00a9\u00ae\u203c\u2049\u2122\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600\u2601\u260e\u2611\u2614\u2615\u2639\u263a\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2693\u26a0\u26a1\u26aa\u26ab\u26bd\u26be\u26c4\u26c5\u26d4\u26ea\u26f2\u26f3\u26f5\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u2733\u2734\u2744\u2747\u2757\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))/g,
+    re = /\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|(?:[\u0023\u002a\u0030-\u0039])\ufe0f?\u20e3|(?:(?:\ud83c\udfcb|\ud83d[\udd75\udd90]|[\u261d\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0]|\ud83e[\udd18-\udd1e\udd26\udd30\udd33-\udd39\udd3c-\udd3e]|[\u270a\u270b])(?:\ud83c[\udffb-\udfff]|)|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a-\udc6d\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\udecc\uded0-\uded2\udeeb\udeec\udef4-\udef6]|\ud83e[\udd10-\udd17\udd20-\udd25\udd27\udd3a\udd40-\udd45\udd47-\udd4b\udd50-\udd5e\udd80-\udd91\uddc0]|[\u23e9-\u23ec\u23f0\u23f3\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a]|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcc-\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd74\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u00a9\u00ae\u203c\u2049\u2122\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2694\u2696\u2697\u2699\u269b\u269c\u26a0\u26a1\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f7\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))/g,
 
     // avoid runtime RegExp creation for not so smart,
     // not JIT based, and old browsers / engines
index df8a493d09d82d408cb03e4818e83fc4230d3b9b..78c0f6a67075bd66c93cf743ea2ffcb6ae9d6251 100644 (file)
@@ -1 +1 @@
-var twemoji=function(){"use strict";function a(a){return document.createTextNode(a)}function b(a){return a.replace(u,h)}function c(a,b){return"".concat(b.base,b.size,"/",a,b.ext)}function d(a,b){for(var c,e,f=a.childNodes,g=f.length;g--;)c=f[g],e=c.nodeType,3===e?b.push(c):1!==e||v.test(c.nodeName)||d(c,b);return b}function e(a){return o(a.indexOf(t)<0?a.replace(s,""):a)}function f(b,c){for(var f,g,h,i,j,k,l,m,n,o,p,q,s,t=d(b,[]),u=t.length;u--;){for(h=!1,i=document.createDocumentFragment(),j=t[u],k=j.nodeValue,m=0;l=r.exec(k);){if(n=l.index,n!==m&&i.appendChild(a(k.slice(m,n))),p=l[0],q=e(p),m=n+p.length,s=c.callback(q,c)){o=new Image,o.onerror=c.onerror,o.setAttribute("draggable","false"),f=c.attributes(p,q);for(g in f)f.hasOwnProperty(g)&&0!==g.indexOf("on")&&!o.hasAttribute(g)&&o.setAttribute(g,f[g]);o.className=c.className,o.alt=p,o.src=s,h=!0,i.appendChild(o)}o||i.appendChild(a(p)),o=null}h&&(m<k.length&&i.appendChild(a(k.slice(m))),j.parentNode.replaceChild(i,j))}return b}function g(a,c){return m(a,function(a){var d,f,g=a,h=e(a),i=c.callback(h,c);if(i){g="<img ".concat('class="',c.className,'" ','draggable="false" ','alt="',a,'"',' src="',i,'"'),d=c.attributes(a,h);for(f in d)d.hasOwnProperty(f)&&0!==f.indexOf("on")&&-1===g.indexOf(" "+f+"=")&&(g=g.concat(" ",f,'="',b(d[f]),'"'));g=g.concat(">")}return g})}function h(a){return q[a]}function i(){return null}function j(a){return"number"==typeof a?a+"x"+a:a}function k(a){var b="string"==typeof a?parseInt(a,16):a;return 65536>b?w(b):(b-=65536,w(55296+(b>>10),56320+(1023&b)))}function l(a,b){return b&&"function"!=typeof b||(b={callback:b}),("string"==typeof a?g:f)(a,{callback:b.callback||c,attributes:"function"==typeof b.attributes?b.attributes:i,base:"string"==typeof b.base?b.base:p.base,ext:b.ext||p.ext,size:b.folder||j(b.size||p.size),className:b.className||p.className,onerror:b.onerror||p.onerror})}function m(a,b){return String(a).replace(r,b)}function n(a){r.lastIndex=0;var b=r.test(a);return r.lastIndex=0,b}function o(a,b){for(var c=[],d=0,e=0,f=0;f<a.length;)d=a.charCodeAt(f++),e?(c.push((65536+(e-55296<<10)+(d-56320)).toString(16)),e=0):d>=55296&&56319>=d?e=d:c.push(d.toString(16));return c.join(b||"-")}var p={base:"https://twemoji.maxcdn.com/2/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:k,toCodePoint:o},onerror:function(){this.parentNode&&this.parentNode.replaceChild(a(this.alt),this)},parse:l,replace:m,test:n},q={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},r=/\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc41\u200d\ud83d\udde8|(?:[\u0023\u002a\u0030-\u0039])\ufe0f?\u20e3|(?:(?:[\u261d\u270c])(?:\ufe0f|(?!\ufe0e))|\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca\udfcb]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd75\udd90\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0]|\ud83e\udd18|[\u26f9\u270a\u270b\u270d])(?:\ud83c[\udffb-\udfff]|)|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf21\udf24-\udf84\udf86-\udf93\udf96\udf97\udf99-\udf9b\udf9e-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcc-\udff0\udff3-\udff5\udff7-\udfff]|\ud83d[\udc00-\udc41\udc44\udc45\udc51-\udc65\udc6a-\udc6d\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfd\udcff-\udd3d\udd49-\udd4e\udd50-\udd67\udd6f\udd70\udd73\udd74\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\udecb-\uded0\udee0-\udee5\udee9\udeeb\udeec\udef0\udef3]|\ud83e[\udd10-\udd17\udd80-\udd84\uddc0]|[\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\u2602-\u2604\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638\u2692\u2694\u2696\u2697\u2699\u269b\u269c\u26b0\u26b1\u26c8\u26ce\u26cf\u26d1\u26d3\u26e9\u26f0\u26f1\u26f4\u26f7\u26f8\u2705\u271d\u2721\u2728\u274c\u274e\u2753-\u2755\u2763\u2795-\u2797\u27b0\u27bf\ue50a]|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37]|[\u00a9\u00ae\u203c\u2049\u2122\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600\u2601\u260e\u2611\u2614\u2615\u2639\u263a\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2693\u26a0\u26a1\u26aa\u26ab\u26bd\u26be\u26c4\u26c5\u26d4\u26ea\u26f2\u26f3\u26f5\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u2733\u2734\u2744\u2747\u2757\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))/g,s=/\uFE0F/g,t=String.fromCharCode(8205),u=/[&<>'"]/g,v=/IFRAME|NOFRAMES|NOSCRIPT|SCRIPT|SELECT|STYLE|TEXTAREA|[a-z]/,w=String.fromCharCode;return p}();
\ No newline at end of file
+var twemoji=function(){"use strict";function a(a){return document.createTextNode(a)}function b(a){return a.replace(u,h)}function c(a,b){return"".concat(b.base,b.size,"/",a,b.ext)}function d(a,b){for(var c,e,f=a.childNodes,g=f.length;g--;)c=f[g],e=c.nodeType,3===e?b.push(c):1!==e||v.test(c.nodeName)||d(c,b);return b}function e(a){return o(a.indexOf(t)<0?a.replace(s,""):a)}function f(b,c){for(var f,g,h,i,j,k,l,m,n,o,p,q,s,t=d(b,[]),u=t.length;u--;){for(h=!1,i=document.createDocumentFragment(),j=t[u],k=j.nodeValue,m=0;l=r.exec(k);){if(n=l.index,n!==m&&i.appendChild(a(k.slice(m,n))),p=l[0],q=e(p),m=n+p.length,s=c.callback(q,c)){o=new Image,o.onerror=c.onerror,o.setAttribute("draggable","false"),f=c.attributes(p,q);for(g in f)f.hasOwnProperty(g)&&0!==g.indexOf("on")&&!o.hasAttribute(g)&&o.setAttribute(g,f[g]);o.className=c.className,o.alt=p,o.src=s,h=!0,i.appendChild(o)}o||i.appendChild(a(p)),o=null}h&&(m<k.length&&i.appendChild(a(k.slice(m))),j.parentNode.replaceChild(i,j))}return b}function g(a,c){return m(a,function(a){var d,f,g=a,h=e(a),i=c.callback(h,c);if(i){g="<img ".concat('class="',c.className,'" ','draggable="false" ','alt="',a,'"',' src="',i,'"'),d=c.attributes(a,h);for(f in d)d.hasOwnProperty(f)&&0!==f.indexOf("on")&&g.indexOf(" "+f+"=")===-1&&(g=g.concat(" ",f,'="',b(d[f]),'"'));g=g.concat(">")}return g})}function h(a){return q[a]}function i(){return null}function j(a){return"number"==typeof a?a+"x"+a:a}function k(a){var b="string"==typeof a?parseInt(a,16):a;return b<65536?w(b):(b-=65536,w(55296+(b>>10),56320+(1023&b)))}function l(a,b){return b&&"function"!=typeof b||(b={callback:b}),("string"==typeof a?g:f)(a,{callback:b.callback||c,attributes:"function"==typeof b.attributes?b.attributes:i,base:"string"==typeof b.base?b.base:p.base,ext:b.ext||p.ext,size:b.folder||j(b.size||p.size),className:b.className||p.className,onerror:b.onerror||p.onerror})}function m(a,b){return String(a).replace(r,b)}function n(a){r.lastIndex=0;var b=r.test(a);return r.lastIndex=0,b}function o(a,b){for(var c=[],d=0,e=0,f=0;f<a.length;)d=a.charCodeAt(f++),e?(c.push((65536+(e-55296<<10)+(d-56320)).toString(16)),e=0):55296<=d&&d<=56319?e=d:c.push(d.toString(16));return c.join(b||"-")}var p={base:"https://twemoji.maxcdn.com/2/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:k,toCodePoint:o},onerror:function(){this.parentNode&&this.parentNode.replaceChild(a(this.alt),this)},parse:l,replace:m,test:n},q={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},r=/\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|(?:[\u0023\u002a\u0030-\u0039])\ufe0f?\u20e3|(?:(?:\ud83c\udfcb|\ud83d[\udd75\udd90]|[\u261d\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0]|\ud83e[\udd18-\udd1e\udd26\udd30\udd33-\udd39\udd3c-\udd3e]|[\u270a\u270b])(?:\ud83c[\udffb-\udfff]|)|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a-\udc6d\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\udecc\uded0-\uded2\udeeb\udeec\udef4-\udef6]|\ud83e[\udd10-\udd17\udd20-\udd25\udd27\udd3a\udd40-\udd45\udd47-\udd4b\udd50-\udd5e\udd80-\udd91\uddc0]|[\u23e9-\u23ec\u23f0\u23f3\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a]|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcc-\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd74\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u00a9\u00ae\u203c\u2049\u2122\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2694\u2696\u2697\u2699\u269b\u269c\u26a0\u26a1\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f7\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))/g,s=/\uFE0F/g,t=String.fromCharCode(8205),u=/[&<>'"]/g,v=/IFRAME|NOFRAMES|NOSCRIPT|SCRIPT|SELECT|STYLE|TEXTAREA|[a-z]/,w=String.fromCharCode;return p}();
\ No newline at end of file
index 744c9fac4319f6026aad80a9923f45638a2e8928..a8d1a7efaca7f15f7dc9d014f01b3f0931fc5262 100644 (file)
@@ -1 +1 @@
-function getUserSetting(a,b){var c=getAllUserSettings();return c.hasOwnProperty(a)?c[a]:"undefined"!=typeof b?b:""}function setUserSetting(a,b,c){if("object"!=typeof userSettings)return!1;var d=userSettings.uid,e=wpCookies.getHash("wp-settings-"+d),f=userSettings.url,g=!!userSettings.secure;return a=a.toString().replace(/[^A-Za-z0-9_-]/g,""),b="number"==typeof b?parseInt(b,10):b.toString().replace(/[^A-Za-z0-9_-]/g,""),e=e||{},c?delete e[a]:e[a]=b,wpCookies.setHash("wp-settings-"+d,e,31536e3,f,"",g),wpCookies.set("wp-settings-time-"+d,userSettings.time,31536e3,f,"",g),a}function deleteUserSetting(a){return setUserSetting(a,"",1)}function getAllUserSettings(){return"object"!=typeof userSettings?{}:wpCookies.getHash("wp-settings-"+userSettings.uid)||{}}var wpCookies={each:function(a,b,c){var d,e;if(!a)return 0;if(c=c||a,"undefined"!=typeof a.length){for(d=0,e=a.length;e>d;d++)if(b.call(c,a[d],d,a)===!1)return 0}else for(d in a)if(a.hasOwnProperty(d)&&b.call(c,a[d],d,a)===!1)return 0;return 1},getHash:function(a){var b,c=this.get(a);return c&&this.each(c.split("&"),function(a){a=a.split("="),b=b||{},b[a[0]]=a[1]}),b},setHash:function(a,b,c,d,e,f){var g="";this.each(b,function(a,b){g+=(g?"&":"")+b+"="+a}),this.set(a,g,c,d,e,f)},get:function(a){var b,c,d=document.cookie,e=a+"=";if(d){if(c=d.indexOf("; "+e),-1===c){if(c=d.indexOf(e),0!==c)return null}else c+=2;return b=d.indexOf(";",c),-1===b&&(b=d.length),decodeURIComponent(d.substring(c+e.length,b))}},set:function(a,b,c,d,e,f){var g=new Date;"object"==typeof c&&c.toGMTString?c=c.toGMTString():parseInt(c,10)?(g.setTime(g.getTime()+1e3*parseInt(c,10)),c=g.toGMTString()):c="",document.cookie=a+"="+encodeURIComponent(b)+(c?"; expires="+c:"")+(d?"; path="+d:"")+(e?"; domain="+e:"")+(f?"; secure":"")},remove:function(a,b,c,d){this.set(a,"",-1e3,b,c,d)}};
\ No newline at end of file
+function getUserSetting(a,b){var c=getAllUserSettings();return c.hasOwnProperty(a)?c[a]:"undefined"!=typeof b?b:""}function setUserSetting(a,b,c){if("object"!=typeof userSettings)return!1;var d=userSettings.uid,e=wpCookies.getHash("wp-settings-"+d),f=userSettings.url,g=!!userSettings.secure;return a=a.toString().replace(/[^A-Za-z0-9_-]/g,""),b="number"==typeof b?parseInt(b,10):b.toString().replace(/[^A-Za-z0-9_-]/g,""),e=e||{},c?delete e[a]:e[a]=b,wpCookies.setHash("wp-settings-"+d,e,31536e3,f,"",g),wpCookies.set("wp-settings-time-"+d,userSettings.time,31536e3,f,"",g),a}function deleteUserSetting(a){return setUserSetting(a,"",1)}function getAllUserSettings(){return"object"!=typeof userSettings?{}:wpCookies.getHash("wp-settings-"+userSettings.uid)||{}}var wpCookies={each:function(a,b,c){var d,e;if(!a)return 0;if(c=c||a,"undefined"!=typeof a.length){for(d=0,e=a.length;d<e;d++)if(b.call(c,a[d],d,a)===!1)return 0}else for(d in a)if(a.hasOwnProperty(d)&&b.call(c,a[d],d,a)===!1)return 0;return 1},getHash:function(a){var b,c=this.get(a);return c&&this.each(c.split("&"),function(a){a=a.split("="),b=b||{},b[a[0]]=a[1]}),b},setHash:function(a,b,c,d,e,f){var g="";this.each(b,function(a,b){g+=(g?"&":"")+b+"="+a}),this.set(a,g,c,d,e,f)},get:function(a){var b,c,d=document.cookie,e=a+"=";if(d){if(c=d.indexOf("; "+e),c===-1){if(c=d.indexOf(e),0!==c)return null}else c+=2;return b=d.indexOf(";",c),b===-1&&(b=d.length),decodeURIComponent(d.substring(c+e.length,b))}},set:function(a,b,c,d,e,f){var g=new Date;"object"==typeof c&&c.toGMTString?c=c.toGMTString():parseInt(c,10)?(g.setTime(g.getTime()+1e3*parseInt(c,10)),c=g.toGMTString()):c="",document.cookie=a+"="+encodeURIComponent(b)+(c?"; expires="+c:"")+(d?"; path="+d:"")+(e?"; domain="+e:"")+(f?"; secure":"")},remove:function(a,b,c,d){this.set(a,"",-1e3,b,c,d)}};
\ No newline at end of file
index 14f419a06bc2b2ceee0c17a96b6701b1b98fb5c5..2507cbc2f4edca376a9ca102382aa3099ce7f057 100644 (file)
@@ -4,8 +4,7 @@ window.wp = window.wp || {};
        'use strict';
 
        var $containerPolite,
-               $containerAssertive,
-               role;
+               $containerAssertive;
 
        /**
         * Update the ARIA live notification area text node.
@@ -21,6 +20,9 @@ window.wp = window.wp || {};
                // Clear previous messages to allow repeated strings being read out.
                clear();
 
+               // Ensure only text is sent to screen readers.
+               message = $( '<p>' ).html( message ).text();
+
                if ( $containerAssertive && 'assertive' === ariaLive ) {
                        $containerAssertive.text( message );
                } else if ( $containerPolite ) {
@@ -39,11 +41,9 @@ window.wp = window.wp || {};
         */
        function addContainer( ariaLive ) {
                ariaLive = ariaLive || 'polite';
-               role = 'assertive' === ariaLive ? 'alert' : 'status';
 
                var $container = $( '<div>', {
                        'id': 'wp-a11y-speak-' + ariaLive,
-                       'role': role,
                        'aria-live': ariaLive,
                        'aria-relevant': 'additions text',
                        'aria-atomic': 'true',
index 736d66447db3cdc497e54f72b4b8d79b4d6f7f5f..c0c8929fe84f861559a6c71e380838167901adc2 100644 (file)
@@ -1 +1 @@
-window.wp=window.wp||{},function(a,b){"use strict";function c(a,b){e(),g&&"assertive"===b?g.text(a):f&&f.text(a)}function d(a){a=a||"polite",h="assertive"===a?"alert":"status";var c=b("<div>",{id:"wp-a11y-speak-"+a,role:h,"aria-live":a,"aria-relevant":"additions text","aria-atomic":"true","class":"screen-reader-text wp-a11y-speak-region"});return b(document.body).append(c),c}function e(){b(".wp-a11y-speak-region").text("")}var f,g,h;b(document).ready(function(){f=b("#wp-a11y-speak-polite"),g=b("#wp-a11y-speak-assertive"),f.length||(f=d("polite")),g.length||(g=d("assertive"))}),a.a11y=a.a11y||{},a.a11y.speak=c}(window.wp,window.jQuery);
\ No newline at end of file
+window.wp=window.wp||{},function(a,b){"use strict";function c(a,c){e(),a=b("<p>").html(a).text(),g&&"assertive"===c?g.text(a):f&&f.text(a)}function d(a){a=a||"polite";var c=b("<div>",{id:"wp-a11y-speak-"+a,"aria-live":a,"aria-relevant":"additions text","aria-atomic":"true","class":"screen-reader-text wp-a11y-speak-region"});return b(document.body).append(c),c}function e(){b(".wp-a11y-speak-region").text("")}var f,g;b(document).ready(function(){f=b("#wp-a11y-speak-polite"),g=b("#wp-a11y-speak-assertive"),f.length||(f=d("polite")),g.length||(g=d("assertive"))}),a.a11y=a.a11y||{},a.a11y.speak=c}(window.wp,window.jQuery);
\ No newline at end of file
index 054fb2c02f64cbb5b2218a551860e4355e5334f5..51a3503ca6d4fb97afd2081e1b9f19f2184208f7 100644 (file)
@@ -1 +1 @@
-var wpAjax=jQuery.extend({unserialize:function(a){var b,c,d,e,f={};if(!a)return f;b=a.split("?"),b[1]&&(a=b[1]),c=a.split("&");for(d in c)(!jQuery.isFunction(c.hasOwnProperty)||c.hasOwnProperty(d))&&(e=c[d].split("="),f[e[0]]=e[1]);return f},parseAjaxResponse:function(a,b,c){var d={},e=jQuery("#"+b).empty(),f="";return a&&"object"==typeof a&&a.getElementsByTagName("wp_ajax")?(d.responses=[],d.errors=!1,jQuery("response",a).each(function(){var b,e=jQuery(this),g=jQuery(this.firstChild);b={action:e.attr("action"),what:g.get(0).nodeName,id:g.attr("id"),oldId:g.attr("old_id"),position:g.attr("position")},b.data=jQuery("response_data",g).text(),b.supplemental={},jQuery("supplemental",g).children().each(function(){b.supplemental[this.nodeName]=jQuery(this).text()}).length||(b.supplemental=!1),b.errors=[],jQuery("wp_error",g).each(function(){var e,g,h,i=jQuery(this).attr("code");e={code:i,message:this.firstChild.nodeValue,data:!1},g=jQuery('wp_error_data[code="'+i+'"]',a),g&&(e.data=g.get()),h=jQuery("form-field",g).text(),h&&(i=h),c&&wpAjax.invalidateForm(jQuery("#"+c+' :input[name="'+i+'"]').parents(".form-field:first")),f+="<p>"+e.message+"</p>",b.errors.push(e),d.errors=!0}).length||(b.errors=!1),d.responses.push(b)}),f.length&&e.html('<div class="error">'+f+"</div>"),d):isNaN(a)?!e.html('<div class="error"><p>'+a+"</p></div>"):(a=parseInt(a,10),-1==a?!e.html('<div class="error"><p>'+wpAjax.noPerm+"</p></div>"):0===a?!e.html('<div class="error"><p>'+wpAjax.broken+"</p></div>"):!0)},invalidateForm:function(a){return jQuery(a).addClass("form-invalid").find("input").one("change wp-check-valid-field",function(){jQuery(this).closest(".form-invalid").removeClass("form-invalid")})},validateForm:function(a){return a=jQuery(a),!wpAjax.invalidateForm(a.find(".form-required").filter(function(){return""===jQuery("input:visible",this).val()})).length}},wpAjax||{noPerm:"You do not have permission to do that.",broken:"An unidentified error has occurred."});jQuery(document).ready(function(a){a("form.validate").submit(function(){return wpAjax.validateForm(a(this))})});
\ No newline at end of file
+var wpAjax=jQuery.extend({unserialize:function(a){var b,c,d,e,f={};if(!a)return f;b=a.split("?"),b[1]&&(a=b[1]),c=a.split("&");for(d in c)jQuery.isFunction(c.hasOwnProperty)&&!c.hasOwnProperty(d)||(e=c[d].split("="),f[e[0]]=e[1]);return f},parseAjaxResponse:function(a,b,c){var d={},e=jQuery("#"+b).empty(),f="";return a&&"object"==typeof a&&a.getElementsByTagName("wp_ajax")?(d.responses=[],d.errors=!1,jQuery("response",a).each(function(){var b,e=jQuery(this),g=jQuery(this.firstChild);b={action:e.attr("action"),what:g.get(0).nodeName,id:g.attr("id"),oldId:g.attr("old_id"),position:g.attr("position")},b.data=jQuery("response_data",g).text(),b.supplemental={},jQuery("supplemental",g).children().each(function(){b.supplemental[this.nodeName]=jQuery(this).text()}).length||(b.supplemental=!1),b.errors=[],jQuery("wp_error",g).each(function(){var e,g,h,i=jQuery(this).attr("code");e={code:i,message:this.firstChild.nodeValue,data:!1},g=jQuery('wp_error_data[code="'+i+'"]',a),g&&(e.data=g.get()),h=jQuery("form-field",g).text(),h&&(i=h),c&&wpAjax.invalidateForm(jQuery("#"+c+' :input[name="'+i+'"]').parents(".form-field:first")),f+="<p>"+e.message+"</p>",b.errors.push(e),d.errors=!0}).length||(b.errors=!1),d.responses.push(b)}),f.length&&e.html('<div class="error">'+f+"</div>"),d):isNaN(a)?!e.html('<div class="error"><p>'+a+"</p></div>"):(a=parseInt(a,10),-1==a?!e.html('<div class="error"><p>'+wpAjax.noPerm+"</p></div>"):0!==a||!e.html('<div class="error"><p>'+wpAjax.broken+"</p></div>"))},invalidateForm:function(a){return jQuery(a).addClass("form-invalid").find("input").one("change wp-check-valid-field",function(){jQuery(this).closest(".form-invalid").removeClass("form-invalid")})},validateForm:function(a){return a=jQuery(a),!wpAjax.invalidateForm(a.find(".form-required").filter(function(){return""===jQuery("input:visible",this).val()})).length}},wpAjax||{noPerm:"You do not have permission to do that.",broken:"An unidentified error has occurred."});jQuery(document).ready(function(a){a("form.validate").submit(function(){return wpAjax.validateForm(a(this))})});
\ No newline at end of file
index 60ea47d3874ec6237a101a3e9dfa83c67d30f6a6..16f67080eacc794b4c327ed504917deefb73ab75 100644 (file)
@@ -26,6 +26,7 @@
                        share_dialog_close = document.querySelector( '.wp-embed-share-dialog-close' ),
                        share_input = document.querySelectorAll( '.wp-embed-share-input' ),
                        share_dialog_tabs = document.querySelectorAll( '.wp-embed-share-tab-button button' ),
+                       featured_image = document.querySelector( '.wp-embed-featured-image img' ),
                        i;
 
                if ( share_input ) {
                 */
                sendEmbedMessage( 'height', Math.ceil( document.body.getBoundingClientRect().height ) );
 
+               // Send the document's height again after the featured image has been loaded.
+               if ( featured_image ) {
+                       featured_image.addEventListener( 'load', function() {
+                               sendEmbedMessage( 'height', Math.ceil( document.body.getBoundingClientRect().height ) );
+                       } );
+               }
+
                /**
                 * Detect clicks to external (_top) links.
                 */
index 17132167f58cdb44329b4540d0e5293325dd55fa..cbb96ed4eec4b90203f51436e5af7bb141d1535b 100644 (file)
@@ -1 +1 @@
-!function(a,b){"use strict";function c(b,c){a.parent.postMessage({message:b,value:c,secret:g},"*")}function d(){function d(){l.className=l.className.replace("hidden",""),b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]').focus()}function e(){l.className+=" hidden",b.querySelector(".wp-embed-share-dialog-open").focus()}function f(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');c.setAttribute("aria-selected","false"),b.querySelector("#"+c.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),a.target.setAttribute("aria-selected","true"),b.querySelector("#"+a.target.getAttribute("aria-controls")).setAttribute("aria-hidden","false")}function g(a){var c,d,e=a.target,f=e.parentElement.previousElementSibling,g=e.parentElement.nextElementSibling;if(37===a.keyCode)c=f;else{if(39!==a.keyCode)return!1;c=g}"rtl"===b.documentElement.getAttribute("dir")&&(c=c===f?g:f),c&&(d=c.firstElementChild,e.setAttribute("tabindex","-1"),e.setAttribute("aria-selected",!1),b.querySelector("#"+e.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),d.setAttribute("tabindex","0"),d.setAttribute("aria-selected","true"),d.focus(),b.querySelector("#"+d.getAttribute("aria-controls")).setAttribute("aria-hidden","false"))}function h(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');n!==a.target||a.shiftKey?c===a.target&&a.shiftKey&&(n.focus(),a.preventDefault()):(c.focus(),a.preventDefault())}function i(a){var b,d=a.target;b=d.hasAttribute("href")?d.getAttribute("href"):d.parentElement.getAttribute("href"),b&&(c("link",b),a.preventDefault())}if(!k){k=!0;var j,l=b.querySelector(".wp-embed-share-dialog"),m=b.querySelector(".wp-embed-share-dialog-open"),n=b.querySelector(".wp-embed-share-dialog-close"),o=b.querySelectorAll(".wp-embed-share-input"),p=b.querySelectorAll(".wp-embed-share-tab-button button");if(o)for(j=0;j<o.length;j++)o[j].addEventListener("click",function(a){a.target.select()});if(m&&m.addEventListener("click",function(){d()}),n&&n.addEventListener("click",function(){e()}),p)for(j=0;j<p.length;j++)p[j].addEventListener("click",f),p[j].addEventListener("keydown",g);b.addEventListener("keydown",function(a){27===a.keyCode&&-1===l.className.indexOf("hidden")?e():9===a.keyCode&&h(a)},!1),a.self!==a.top&&(c("height",Math.ceil(b.body.getBoundingClientRect().height)),b.addEventListener("click",i))}}function e(){a.self!==a.top&&(clearTimeout(i),i=setTimeout(function(){c("height",Math.ceil(b.body.getBoundingClientRect().height))},100))}function f(){a.self===a.top||g||(g=a.location.hash.replace(/.*secret=([\d\w]{10}).*/,"$1"),clearTimeout(h),h=setTimeout(function(){f()},100))}var g,h,i,j=b.querySelector&&a.addEventListener,k=!1;j&&(f(),b.documentElement.className=b.documentElement.className.replace(/\bno-js\b/,"")+" js",b.addEventListener("DOMContentLoaded",d,!1),a.addEventListener("load",d,!1),a.addEventListener("resize",e,!1))}(window,document);
\ No newline at end of file
+!function(a,b){"use strict";function c(b,c){a.parent.postMessage({message:b,value:c,secret:g},"*")}function d(){function d(){l.className=l.className.replace("hidden",""),b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]').focus()}function e(){l.className+=" hidden",b.querySelector(".wp-embed-share-dialog-open").focus()}function f(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');c.setAttribute("aria-selected","false"),b.querySelector("#"+c.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),a.target.setAttribute("aria-selected","true"),b.querySelector("#"+a.target.getAttribute("aria-controls")).setAttribute("aria-hidden","false")}function g(a){var c,d,e=a.target,f=e.parentElement.previousElementSibling,g=e.parentElement.nextElementSibling;if(37===a.keyCode)c=f;else{if(39!==a.keyCode)return!1;c=g}"rtl"===b.documentElement.getAttribute("dir")&&(c=c===f?g:f),c&&(d=c.firstElementChild,e.setAttribute("tabindex","-1"),e.setAttribute("aria-selected",!1),b.querySelector("#"+e.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),d.setAttribute("tabindex","0"),d.setAttribute("aria-selected","true"),d.focus(),b.querySelector("#"+d.getAttribute("aria-controls")).setAttribute("aria-hidden","false"))}function h(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');n!==a.target||a.shiftKey?c===a.target&&a.shiftKey&&(n.focus(),a.preventDefault()):(c.focus(),a.preventDefault())}function i(a){var b,d=a.target;b=d.hasAttribute("href")?d.getAttribute("href"):d.parentElement.getAttribute("href"),b&&(c("link",b),a.preventDefault())}if(!k){k=!0;var j,l=b.querySelector(".wp-embed-share-dialog"),m=b.querySelector(".wp-embed-share-dialog-open"),n=b.querySelector(".wp-embed-share-dialog-close"),o=b.querySelectorAll(".wp-embed-share-input"),p=b.querySelectorAll(".wp-embed-share-tab-button button"),q=b.querySelector(".wp-embed-featured-image img");if(o)for(j=0;j<o.length;j++)o[j].addEventListener("click",function(a){a.target.select()});if(m&&m.addEventListener("click",function(){d()}),n&&n.addEventListener("click",function(){e()}),p)for(j=0;j<p.length;j++)p[j].addEventListener("click",f),p[j].addEventListener("keydown",g);b.addEventListener("keydown",function(a){27===a.keyCode&&-1===l.className.indexOf("hidden")?e():9===a.keyCode&&h(a)},!1),a.self!==a.top&&(c("height",Math.ceil(b.body.getBoundingClientRect().height)),q&&q.addEventListener("load",function(){c("height",Math.ceil(b.body.getBoundingClientRect().height))}),b.addEventListener("click",i))}}function e(){a.self!==a.top&&(clearTimeout(i),i=setTimeout(function(){c("height",Math.ceil(b.body.getBoundingClientRect().height))},100))}function f(){a.self===a.top||g||(g=a.location.hash.replace(/.*secret=([\d\w]{10}).*/,"$1"),clearTimeout(h),h=setTimeout(function(){f()},100))}var g,h,i,j=b.querySelector&&a.addEventListener,k=!1;j&&(f(),b.documentElement.className=b.documentElement.className.replace(/\bno-js\b/,"")+" js",b.addEventListener("DOMContentLoaded",d,!1),a.addEventListener("load",d,!1),a.addEventListener("resize",e,!1))}(window,document);
\ No newline at end of file
index 10cf4f19b8896f739ed38372fed4923bdfbd5693..0292141492d5ade3101397bd612d3669a12071fb 100644 (file)
@@ -1 +1 @@
-!function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c<i.length;c++)if(d=i[c],!d.getAttribute("data-secret")){if(f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f),g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}else;}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll('iframe[data-secret="'+d.secret+'"]'),k=b.querySelectorAll('blockquote[data-secret="'+d.secret+'"]');for(e=0;e<k.length;e++)k[e].style.display="none";for(e=0;e<j.length;e++)if(f=j[e],c.source===f.contentWindow){if(f.removeAttribute("style"),"height"===d.message){if(g=parseInt(d.value,10),g>1e3)g=1e3;else if(200>~~g)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);
\ No newline at end of file
+!function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c<i.length;c++)if(d=i[c],!d.getAttribute("data-secret")){if(f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f),g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}else;}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll('iframe[data-secret="'+d.secret+'"]'),k=b.querySelectorAll('blockquote[data-secret="'+d.secret+'"]');for(e=0;e<k.length;e++)k[e].style.display="none";for(e=0;e<j.length;e++)if(f=j[e],c.source===f.contentWindow){if(f.removeAttribute("style"),"height"===d.message){if(g=parseInt(d.value,10),g>1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);
\ No newline at end of file
index f242a12f2677bf5176312fb17c876a878002e969..ff73a885c91fd612b2f5eccbc205d9a647309ede 100644 (file)
@@ -14,7 +14,7 @@
                var canvas = document.createElement( 'canvas' ),
                        context = canvas.getContext && canvas.getContext( '2d' ),
                        stringFromCharCode = String.fromCharCode,
-                       tonedata, tone, tone2;
+                       flag, flag2, tonedata, tone, tone2;
 
                if ( ! context || ! context.fillText ) {
                        return false;
                                 * to a larger image (4-5KB data URL).
                                 */
                                context.fillText( stringFromCharCode( 55356, 56806, 55356, 56826 ), 0, 0 );
-                               return canvas.toDataURL().length > 3000;
+                               if ( canvas.toDataURL().length < 3000 ) {
+                                       return false;
+                               }
+
+                               context.clearRect( 0, 0, canvas.width, canvas.height );
+
+                               /*
+                                * Test for rainbow flag compatibility. As the rainbow flag was added out of sequence with
+                                * the usual Unicode release cycle, some browsers support it, and some don't, even if their
+                                * Unicode support is up to date.
+                                *
+                                * To test for support, we try to render it, and compare the rendering to how it would look if
+                                * the browser doesn't render it correctly (white flag emoji + rainbow emoji).
+                                */
+                               context.fillText( stringFromCharCode( 55356, 57331, 65039, 8205, 55356, 57096 ), 0, 0 );
+                               flag = canvas.toDataURL();
+
+                               context.clearRect( 0, 0, canvas.width, canvas.height );
+
+                               context.fillText( stringFromCharCode( 55356, 57331, 55356, 57096 ), 0, 0 );
+                               flag2 = canvas.toDataURL();
+
+                               return flag !== flag2;
                        case 'diversity':
                                /*
                                 * This tests if the browser supports the Emoji Diversity specification, by rendering an
                                 */
                                context.fillText( stringFromCharCode( 55356, 57135 ), 0, 0 );
                                return context.getImageData( 16, 16, 1, 1 ).data[0] !== 0;
+                       case 'unicode9':
+                               /*
+                                * Do Unicode 9 emoji render?
+                                * ¯\_(ツ)_/¯
+                                */
+                               context.fillText( stringFromCharCode( 55358, 56631 ), 0, 0 );
+                               return context.getImageData( 16, 16, 1, 1 ).data[0] !== 0;
                }
 
                return false;
                document.getElementsByTagName( 'head' )[0].appendChild( script );
        }
 
-       tests = Array( 'simple', 'flag', 'unicode8', 'diversity' );
+       tests = Array( 'simple', 'flag', 'unicode8', 'diversity', 'unicode9' );
 
        settings.supports = {
                everything: true,
index 937787fb9322169fb79d4806f96197f0daf59504..8ad29f7103c41a76d4e7d236abf0858f1ea3634a 100644 (file)
@@ -1 +1 @@
-!function(a,b,c){function d(a){var c,d,e,f=b.createElement("canvas"),g=f.getContext&&f.getContext("2d"),h=String.fromCharCode;if(!g||!g.fillText)return!1;switch(g.textBaseline="top",g.font="600 32px Arial",a){case"flag":return g.fillText(h(55356,56806,55356,56826),0,0),f.toDataURL().length>3e3;case"diversity":return g.fillText(h(55356,57221),0,0),c=g.getImageData(16,16,1,1).data,d=c[0]+","+c[1]+","+c[2]+","+c[3],g.fillText(h(55356,57221,55356,57343),0,0),c=g.getImageData(16,16,1,1).data,e=c[0]+","+c[1]+","+c[2]+","+c[3],d!==e;case"simple":return g.fillText(h(55357,56835),0,0),0!==g.getImageData(16,16,1,1).data[0];case"unicode8":return g.fillText(h(55356,57135),0,0),0!==g.getImageData(16,16,1,1).data[0]}return!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i;for(i=Array("simple","flag","unicode8","diversity"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
\ No newline at end of file
+!function(a,b,c){function d(a){var c,d,e,f,g,h=b.createElement("canvas"),i=h.getContext&&h.getContext("2d"),j=String.fromCharCode;if(!i||!i.fillText)return!1;switch(i.textBaseline="top",i.font="600 32px Arial",a){case"flag":return i.fillText(j(55356,56806,55356,56826),0,0),!(h.toDataURL().length<3e3)&&(i.clearRect(0,0,h.width,h.height),i.fillText(j(55356,57331,65039,8205,55356,57096),0,0),c=h.toDataURL(),i.clearRect(0,0,h.width,h.height),i.fillText(j(55356,57331,55356,57096),0,0),d=h.toDataURL(),c!==d);case"diversity":return i.fillText(j(55356,57221),0,0),e=i.getImageData(16,16,1,1).data,f=e[0]+","+e[1]+","+e[2]+","+e[3],i.fillText(j(55356,57221,55356,57343),0,0),e=i.getImageData(16,16,1,1).data,g=e[0]+","+e[1]+","+e[2]+","+e[3],f!==g;case"simple":return i.fillText(j(55357,56835),0,0),0!==i.getImageData(16,16,1,1).data[0];case"unicode8":return i.fillText(j(55356,57135),0,0),0!==i.getImageData(16,16,1,1).data[0];case"unicode9":return i.fillText(j(55358,56631),0,0),0!==i.getImageData(16,16,1,1).data[0]}return!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i;for(i=Array("simple","flag","unicode8","diversity","unicode9"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
\ No newline at end of file
index 12792b854c1e22e075166ee947cbcdf7bfc4de9a..ef72bc4f3685f88ef0e49dc96c7b616546fc301a 100644 (file)
@@ -1,4 +1,4 @@
 // Source: wp-includes/js/twemoji.min.js
-var twemoji=function(){"use strict";function a(a){return document.createTextNode(a)}function b(a){return a.replace(u,h)}function c(a,b){return"".concat(b.base,b.size,"/",a,b.ext)}function d(a,b){for(var c,e,f=a.childNodes,g=f.length;g--;)c=f[g],e=c.nodeType,3===e?b.push(c):1!==e||v.test(c.nodeName)||d(c,b);return b}function e(a){return o(a.indexOf(t)<0?a.replace(s,""):a)}function f(b,c){for(var f,g,h,i,j,k,l,m,n,o,p,q,s,t=d(b,[]),u=t.length;u--;){for(h=!1,i=document.createDocumentFragment(),j=t[u],k=j.nodeValue,m=0;l=r.exec(k);){if(n=l.index,n!==m&&i.appendChild(a(k.slice(m,n))),p=l[0],q=e(p),m=n+p.length,s=c.callback(q,c)){o=new Image,o.onerror=c.onerror,o.setAttribute("draggable","false"),f=c.attributes(p,q);for(g in f)f.hasOwnProperty(g)&&0!==g.indexOf("on")&&!o.hasAttribute(g)&&o.setAttribute(g,f[g]);o.className=c.className,o.alt=p,o.src=s,h=!0,i.appendChild(o)}o||i.appendChild(a(p)),o=null}h&&(m<k.length&&i.appendChild(a(k.slice(m))),j.parentNode.replaceChild(i,j))}return b}function g(a,c){return m(a,function(a){var d,f,g=a,h=e(a),i=c.callback(h,c);if(i){g="<img ".concat('class="',c.className,'" ','draggable="false" ','alt="',a,'"',' src="',i,'"'),d=c.attributes(a,h);for(f in d)d.hasOwnProperty(f)&&0!==f.indexOf("on")&&-1===g.indexOf(" "+f+"=")&&(g=g.concat(" ",f,'="',b(d[f]),'"'));g=g.concat(">")}return g})}function h(a){return q[a]}function i(){return null}function j(a){return"number"==typeof a?a+"x"+a:a}function k(a){var b="string"==typeof a?parseInt(a,16):a;return 65536>b?w(b):(b-=65536,w(55296+(b>>10),56320+(1023&b)))}function l(a,b){return b&&"function"!=typeof b||(b={callback:b}),("string"==typeof a?g:f)(a,{callback:b.callback||c,attributes:"function"==typeof b.attributes?b.attributes:i,base:"string"==typeof b.base?b.base:p.base,ext:b.ext||p.ext,size:b.folder||j(b.size||p.size),className:b.className||p.className,onerror:b.onerror||p.onerror})}function m(a,b){return String(a).replace(r,b)}function n(a){r.lastIndex=0;var b=r.test(a);return r.lastIndex=0,b}function o(a,b){for(var c=[],d=0,e=0,f=0;f<a.length;)d=a.charCodeAt(f++),e?(c.push((65536+(e-55296<<10)+(d-56320)).toString(16)),e=0):d>=55296&&56319>=d?e=d:c.push(d.toString(16));return c.join(b||"-")}var p={base:"https://twemoji.maxcdn.com/2/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:k,toCodePoint:o},onerror:function(){this.parentNode&&this.parentNode.replaceChild(a(this.alt),this)},parse:l,replace:m,test:n},q={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},r=/\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc41\u200d\ud83d\udde8|(?:[\u0023\u002a\u0030-\u0039])\ufe0f?\u20e3|(?:(?:[\u261d\u270c])(?:\ufe0f|(?!\ufe0e))|\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca\udfcb]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd75\udd90\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0]|\ud83e\udd18|[\u26f9\u270a\u270b\u270d])(?:\ud83c[\udffb-\udfff]|)|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf21\udf24-\udf84\udf86-\udf93\udf96\udf97\udf99-\udf9b\udf9e-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcc-\udff0\udff3-\udff5\udff7-\udfff]|\ud83d[\udc00-\udc41\udc44\udc45\udc51-\udc65\udc6a-\udc6d\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfd\udcff-\udd3d\udd49-\udd4e\udd50-\udd67\udd6f\udd70\udd73\udd74\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\udecb-\uded0\udee0-\udee5\udee9\udeeb\udeec\udef0\udef3]|\ud83e[\udd10-\udd17\udd80-\udd84\uddc0]|[\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\u2602-\u2604\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638\u2692\u2694\u2696\u2697\u2699\u269b\u269c\u26b0\u26b1\u26c8\u26ce\u26cf\u26d1\u26d3\u26e9\u26f0\u26f1\u26f4\u26f7\u26f8\u2705\u271d\u2721\u2728\u274c\u274e\u2753-\u2755\u2763\u2795-\u2797\u27b0\u27bf\ue50a]|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37]|[\u00a9\u00ae\u203c\u2049\u2122\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600\u2601\u260e\u2611\u2614\u2615\u2639\u263a\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2693\u26a0\u26a1\u26aa\u26ab\u26bd\u26be\u26c4\u26c5\u26d4\u26ea\u26f2\u26f3\u26f5\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u2733\u2734\u2744\u2747\u2757\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))/g,s=/\uFE0F/g,t=String.fromCharCode(8205),u=/[&<>'"]/g,v=/IFRAME|NOFRAMES|NOSCRIPT|SCRIPT|SELECT|STYLE|TEXTAREA|[a-z]/,w=String.fromCharCode;return p}();
+var twemoji=function(){"use strict";function a(a){return document.createTextNode(a)}function b(a){return a.replace(u,h)}function c(a,b){return"".concat(b.base,b.size,"/",a,b.ext)}function d(a,b){for(var c,e,f=a.childNodes,g=f.length;g--;)c=f[g],e=c.nodeType,3===e?b.push(c):1!==e||v.test(c.nodeName)||d(c,b);return b}function e(a){return o(a.indexOf(t)<0?a.replace(s,""):a)}function f(b,c){for(var f,g,h,i,j,k,l,m,n,o,p,q,s,t=d(b,[]),u=t.length;u--;){for(h=!1,i=document.createDocumentFragment(),j=t[u],k=j.nodeValue,m=0;l=r.exec(k);){if(n=l.index,n!==m&&i.appendChild(a(k.slice(m,n))),p=l[0],q=e(p),m=n+p.length,s=c.callback(q,c)){o=new Image,o.onerror=c.onerror,o.setAttribute("draggable","false"),f=c.attributes(p,q);for(g in f)f.hasOwnProperty(g)&&0!==g.indexOf("on")&&!o.hasAttribute(g)&&o.setAttribute(g,f[g]);o.className=c.className,o.alt=p,o.src=s,h=!0,i.appendChild(o)}o||i.appendChild(a(p)),o=null}h&&(m<k.length&&i.appendChild(a(k.slice(m))),j.parentNode.replaceChild(i,j))}return b}function g(a,c){return m(a,function(a){var d,f,g=a,h=e(a),i=c.callback(h,c);if(i){g="<img ".concat('class="',c.className,'" ','draggable="false" ','alt="',a,'"',' src="',i,'"'),d=c.attributes(a,h);for(f in d)d.hasOwnProperty(f)&&0!==f.indexOf("on")&&g.indexOf(" "+f+"=")===-1&&(g=g.concat(" ",f,'="',b(d[f]),'"'));g=g.concat(">")}return g})}function h(a){return q[a]}function i(){return null}function j(a){return"number"==typeof a?a+"x"+a:a}function k(a){var b="string"==typeof a?parseInt(a,16):a;return b<65536?w(b):(b-=65536,w(55296+(b>>10),56320+(1023&b)))}function l(a,b){return b&&"function"!=typeof b||(b={callback:b}),("string"==typeof a?g:f)(a,{callback:b.callback||c,attributes:"function"==typeof b.attributes?b.attributes:i,base:"string"==typeof b.base?b.base:p.base,ext:b.ext||p.ext,size:b.folder||j(b.size||p.size),className:b.className||p.className,onerror:b.onerror||p.onerror})}function m(a,b){return String(a).replace(r,b)}function n(a){r.lastIndex=0;var b=r.test(a);return r.lastIndex=0,b}function o(a,b){for(var c=[],d=0,e=0,f=0;f<a.length;)d=a.charCodeAt(f++),e?(c.push((65536+(e-55296<<10)+(d-56320)).toString(16)),e=0):55296<=d&&d<=56319?e=d:c.push(d.toString(16));return c.join(b||"-")}var p={base:"https://twemoji.maxcdn.com/2/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:k,toCodePoint:o},onerror:function(){this.parentNode&&this.parentNode.replaceChild(a(this.alt),this)},parse:l,replace:m,test:n},q={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},r=/\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|(?:[\u0023\u002a\u0030-\u0039])\ufe0f?\u20e3|(?:(?:\ud83c\udfcb|\ud83d[\udd75\udd90]|[\u261d\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0]|\ud83e[\udd18-\udd1e\udd26\udd30\udd33-\udd39\udd3c-\udd3e]|[\u270a\u270b])(?:\ud83c[\udffb-\udfff]|)|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a-\udc6d\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\udecc\uded0-\uded2\udeeb\udeec\udef4-\udef6]|\ud83e[\udd10-\udd17\udd20-\udd25\udd27\udd3a\udd40-\udd45\udd47-\udd4b\udd50-\udd5e\udd80-\udd91\uddc0]|[\u23e9-\u23ec\u23f0\u23f3\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a]|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcc-\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd74\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u00a9\u00ae\u203c\u2049\u2122\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2694\u2696\u2697\u2699\u269b\u269c\u26a0\u26a1\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f7\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))/g,s=/\uFE0F/g,t=String.fromCharCode(8205),u=/[&<>'"]/g,v=/IFRAME|NOFRAMES|NOSCRIPT|SCRIPT|SELECT|STYLE|TEXTAREA|[a-z]/,w=String.fromCharCode;return p}();
 // Source: wp-includes/js/wp-emoji.min.js
-!function(a,b){function c(){function c(){if(!i){if("undefined"==typeof a.twemoji){if(j>600)return;return a.clearTimeout(g),g=a.setTimeout(c,50),void j++}f=a.twemoji,i=!0,h&&new h(function(a){for(var b,c,f,g,h=a.length;h--;){if(b=a[h].addedNodes,c=a[h].removedNodes,f=b.length,1===f&&1===c.length&&3===b[0].nodeType&&"IMG"===c[0].nodeName&&b[0].data===c[0].alt&&"load-failed"===c[0].getAttribute("data-error"))return;for(;f--;){if(g=b[f],3===g.nodeType){if(!g.parentNode)continue;if(k)for(;g.nextSibling&&3===g.nextSibling.nodeType;)g.nodeValue=g.nodeValue+g.nextSibling.nodeValue,g.parentNode.removeChild(g.nextSibling);g=g.parentNode}!g||1!==g.nodeType||g.className&&"string"==typeof g.className&&-1!==g.className.indexOf("wp-exclude-emoji")||d(g.textContent)&&e(g)}}}).observe(document.body,{childList:!0,subtree:!0}),e(document.body)}}function d(a){var b=/[\u203C\u2049\u20E3\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2300\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692\u2693\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753\u2754\u2755\u2757\u2763\u2764\u2795\u2796\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05\u2B06\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]/,c=/[\uDC00-\uDFFF]/;return a?c.test(a)||b.test(a):!1}function e(a,c){var d;return!b.supports.everything&&f&&a&&("string"==typeof a||a.childNodes&&a.childNodes.length)?(c=c||{},d={base:b.baseUrl,ext:b.ext,className:c.className||"emoji",callback:function(a,c){switch(a){case"a9":case"ae":case"2122":case"2194":case"2660":case"2663":case"2665":case"2666":return!1}return b.supports.everythingExceptFlag&&!/^1f1(?:e[6-9a-f]|f[0-9a-f])-1f1(?:e[6-9a-f]|f[0-9a-f])$/.test(a)?!1:"".concat(c.base,a,c.ext)},onerror:function(){f.parentNode&&(this.setAttribute("data-error","load-failed"),f.parentNode.replaceChild(document.createTextNode(f.alt),f))}},"object"==typeof c.imgAttr&&(d.attributes=function(){return c.imgAttr}),f.parse(a,d)):a}var f,g,h=a.MutationObserver||a.WebKitMutationObserver||a.MozMutationObserver,i=!1,j=0,k=a.navigator.userAgent.indexOf("Trident/7.0")>0;return b&&(b.DOMReady?c():b.readyCallback=c),{parse:e,test:d}}a.wp=a.wp||{},a.wp.emoji=new c}(window,window._wpemojiSettings);
\ No newline at end of file
+!function(a,b){function c(){function c(){return!j.implementation.hasFeature||j.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")}function d(){if(!k){if("undefined"==typeof a.twemoji){if(l>600)return;return a.clearTimeout(h),h=a.setTimeout(d,50),void l++}g=a.twemoji,k=!0,i&&new i(function(a){for(var b,c,d,g,h=a.length;h--;){if(b=a[h].addedNodes,c=a[h].removedNodes,d=b.length,1===d&&1===c.length&&3===b[0].nodeType&&"IMG"===c[0].nodeName&&b[0].data===c[0].alt&&"load-failed"===c[0].getAttribute("data-error"))return;for(;d--;){if(g=b[d],3===g.nodeType){if(!g.parentNode)continue;if(m)for(;g.nextSibling&&3===g.nextSibling.nodeType;)g.nodeValue=g.nodeValue+g.nextSibling.nodeValue,g.parentNode.removeChild(g.nextSibling);g=g.parentNode}!g||1!==g.nodeType||g.className&&"string"==typeof g.className&&g.className.indexOf("wp-exclude-emoji")!==-1||e(g.textContent)&&f(g)}}}).observe(j.body,{childList:!0,subtree:!0}),f(j.body)}}function e(a){var b=/[\u203C\u2049\u20E3\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2300\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692\u2693\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753\u2754\u2755\u2757\u2763\u2764\u2795\u2796\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05\u2B06\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]/,c=/[\uDC00-\uDFFF]/;return!!a&&(c.test(a)||b.test(a))}function f(a,d){var e;return!b.supports.everything&&g&&a&&("string"==typeof a||a.childNodes&&a.childNodes.length)?(d=d||{},e={base:c()?b.svgUrl:b.baseUrl,ext:c()?b.svgExt:b.ext,className:d.className||"emoji",callback:function(a,c){switch(a){case"a9":case"ae":case"2122":case"2194":case"2660":case"2663":case"2665":case"2666":return!1}return!(b.supports.everythingExceptFlag&&!/^1f1(?:e[6-9a-f]|f[0-9a-f])-1f1(?:e[6-9a-f]|f[0-9a-f])$/.test(a)&&!/^(1f3f3-fe0f-200d-1f308|1f3f4-200d-2620-fe0f)$/.test(a))&&"".concat(c.base,a,c.ext)},onerror:function(){g.parentNode&&(this.setAttribute("data-error","load-failed"),g.parentNode.replaceChild(j.createTextNode(g.alt),g))}},"object"==typeof d.imgAttr&&(e.attributes=function(){return d.imgAttr}),g.parse(a,e)):a}var g,h,i=a.MutationObserver||a.WebKitMutationObserver||a.MozMutationObserver,j=a.document,k=!1,l=0,m=a.navigator.userAgent.indexOf("Trident/7.0")>0;return b&&(b.DOMReady?d():b.readyCallback=d),{parse:f,test:e}}a.wp=a.wp||{},a.wp.emoji=new c}(window,window._wpemojiSettings);
\ No newline at end of file
index dafcc36fdd3c722f0352460e584e3ba2cb91c7b4..46cddd02be69ef8740b3bccf1b08450033a63aa1 100644 (file)
@@ -3,12 +3,34 @@
        function wpEmoji() {
                var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver,
 
+               // Compression and maintain local scope
+               document = window.document,
+
                // Private
                twemoji, timer,
                loaded = false,
                count = 0,
                ie11 = window.navigator.userAgent.indexOf( 'Trident/7.0' ) > 0;
 
+               /**
+                * Detect if the browser supports SVG.
+                *
+                * @since 4.6.0
+                *
+                * @return {Boolean} True if the browser supports svg, false if not.
+                */
+               function browserSupportsSvgAsImage() {
+                       if ( !! document.implementation.hasFeature ) {
+                               // Source: Modernizr
+                               // https://github.com/Modernizr/Modernizr/blob/master/feature-detects/svg/asimg.js
+                               return document.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#Image', '1.1' );
+                       }
+
+                       // document.implementation.hasFeature is deprecated. It can be presumed
+                       // if future browsers remove it, the browser will support SVGs as images.
+                       return true;
+               }
+
                /**
                 * Runs when the document load event is fired, so we can do our first parse of the page.
                 *
                function test( text ) {
                        // Single char. U+20E3 to detect keycaps. U+00A9 "copyright sign" and U+00AE "registered sign" not included.
                        var single = /[\u203C\u2049\u20E3\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2300\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692\u2693\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753\u2754\u2755\u2757\u2763\u2764\u2795\u2796\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05\u2B06\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]/,
-                       // Surrogate pair range. Only tests for the second half. 
+                       // Surrogate pair range. Only tests for the second half.
                        pair = /[\uDC00-\uDFFF]/;
 
                        if ( text ) {
 
                        args = args || {};
                        params = {
-                               base: settings.baseUrl,
-                               ext: settings.ext,
+                               base: browserSupportsSvgAsImage() ? settings.svgUrl : settings.baseUrl,
+                               ext:  browserSupportsSvgAsImage() ? settings.svgExt : settings.ext,
                                className: args.className || 'emoji',
                                callback: function( icon, options ) {
                                        // Ignore some standard characters that TinyMCE recommends in its character map.
                                                        return false;
                                        }
 
-                                       if ( settings.supports.everythingExceptFlag && ! /^1f1(?:e[6-9a-f]|f[0-9a-f])-1f1(?:e[6-9a-f]|f[0-9a-f])$/.test( icon ) ) {
-
+                                       if ( settings.supports.everythingExceptFlag &&
+                                               ! /^1f1(?:e[6-9a-f]|f[0-9a-f])-1f1(?:e[6-9a-f]|f[0-9a-f])$/.test( icon ) && // Country flags
+                                               ! /^(1f3f3-fe0f-200d-1f308|1f3f4-200d-2620-fe0f)$/.test( icon )             // Rainbow and pirate flags
+                                       ) {
                                                return false;
                                        }
 
index 74f0150bccec139c8aff73895027aaa701b2fa3c..e8ad3d671cb588a632e7a12d95d043415139d46f 100644 (file)
@@ -1 +1 @@
-!function(a,b){function c(){function c(){if(!i){if("undefined"==typeof a.twemoji){if(j>600)return;return a.clearTimeout(g),g=a.setTimeout(c,50),void j++}f=a.twemoji,i=!0,h&&new h(function(a){for(var b,c,f,g,h=a.length;h--;){if(b=a[h].addedNodes,c=a[h].removedNodes,f=b.length,1===f&&1===c.length&&3===b[0].nodeType&&"IMG"===c[0].nodeName&&b[0].data===c[0].alt&&"load-failed"===c[0].getAttribute("data-error"))return;for(;f--;){if(g=b[f],3===g.nodeType){if(!g.parentNode)continue;if(k)for(;g.nextSibling&&3===g.nextSibling.nodeType;)g.nodeValue=g.nodeValue+g.nextSibling.nodeValue,g.parentNode.removeChild(g.nextSibling);g=g.parentNode}!g||1!==g.nodeType||g.className&&"string"==typeof g.className&&-1!==g.className.indexOf("wp-exclude-emoji")||d(g.textContent)&&e(g)}}}).observe(document.body,{childList:!0,subtree:!0}),e(document.body)}}function d(a){var b=/[\u203C\u2049\u20E3\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2300\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692\u2693\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753\u2754\u2755\u2757\u2763\u2764\u2795\u2796\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05\u2B06\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]/,c=/[\uDC00-\uDFFF]/;return a?c.test(a)||b.test(a):!1}function e(a,c){var d;return!b.supports.everything&&f&&a&&("string"==typeof a||a.childNodes&&a.childNodes.length)?(c=c||{},d={base:b.baseUrl,ext:b.ext,className:c.className||"emoji",callback:function(a,c){switch(a){case"a9":case"ae":case"2122":case"2194":case"2660":case"2663":case"2665":case"2666":return!1}return b.supports.everythingExceptFlag&&!/^1f1(?:e[6-9a-f]|f[0-9a-f])-1f1(?:e[6-9a-f]|f[0-9a-f])$/.test(a)?!1:"".concat(c.base,a,c.ext)},onerror:function(){f.parentNode&&(this.setAttribute("data-error","load-failed"),f.parentNode.replaceChild(document.createTextNode(f.alt),f))}},"object"==typeof c.imgAttr&&(d.attributes=function(){return c.imgAttr}),f.parse(a,d)):a}var f,g,h=a.MutationObserver||a.WebKitMutationObserver||a.MozMutationObserver,i=!1,j=0,k=a.navigator.userAgent.indexOf("Trident/7.0")>0;return b&&(b.DOMReady?c():b.readyCallback=c),{parse:e,test:d}}a.wp=a.wp||{},a.wp.emoji=new c}(window,window._wpemojiSettings);
\ No newline at end of file
+!function(a,b){function c(){function c(){return!j.implementation.hasFeature||j.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")}function d(){if(!k){if("undefined"==typeof a.twemoji){if(l>600)return;return a.clearTimeout(h),h=a.setTimeout(d,50),void l++}g=a.twemoji,k=!0,i&&new i(function(a){for(var b,c,d,g,h=a.length;h--;){if(b=a[h].addedNodes,c=a[h].removedNodes,d=b.length,1===d&&1===c.length&&3===b[0].nodeType&&"IMG"===c[0].nodeName&&b[0].data===c[0].alt&&"load-failed"===c[0].getAttribute("data-error"))return;for(;d--;){if(g=b[d],3===g.nodeType){if(!g.parentNode)continue;if(m)for(;g.nextSibling&&3===g.nextSibling.nodeType;)g.nodeValue=g.nodeValue+g.nextSibling.nodeValue,g.parentNode.removeChild(g.nextSibling);g=g.parentNode}!g||1!==g.nodeType||g.className&&"string"==typeof g.className&&g.className.indexOf("wp-exclude-emoji")!==-1||e(g.textContent)&&f(g)}}}).observe(j.body,{childList:!0,subtree:!0}),f(j.body)}}function e(a){var b=/[\u203C\u2049\u20E3\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2300\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692\u2693\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753\u2754\u2755\u2757\u2763\u2764\u2795\u2796\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05\u2B06\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]/,c=/[\uDC00-\uDFFF]/;return!!a&&(c.test(a)||b.test(a))}function f(a,d){var e;return!b.supports.everything&&g&&a&&("string"==typeof a||a.childNodes&&a.childNodes.length)?(d=d||{},e={base:c()?b.svgUrl:b.baseUrl,ext:c()?b.svgExt:b.ext,className:d.className||"emoji",callback:function(a,c){switch(a){case"a9":case"ae":case"2122":case"2194":case"2660":case"2663":case"2665":case"2666":return!1}return!(b.supports.everythingExceptFlag&&!/^1f1(?:e[6-9a-f]|f[0-9a-f])-1f1(?:e[6-9a-f]|f[0-9a-f])$/.test(a)&&!/^(1f3f3-fe0f-200d-1f308|1f3f4-200d-2620-fe0f)$/.test(a))&&"".concat(c.base,a,c.ext)},onerror:function(){g.parentNode&&(this.setAttribute("data-error","load-failed"),g.parentNode.replaceChild(j.createTextNode(g.alt),g))}},"object"==typeof d.imgAttr&&(e.attributes=function(){return d.imgAttr}),g.parse(a,e)):a}var g,h,i=a.MutationObserver||a.WebKitMutationObserver||a.MozMutationObserver,j=a.document,k=!1,l=0,m=a.navigator.userAgent.indexOf("Trident/7.0")>0;return b&&(b.DOMReady?d():b.readyCallback=d),{parse:f,test:e}}a.wp=a.wp||{},a.wp.emoji=new c}(window,window._wpemojiSettings);
\ No newline at end of file
index 529f1b324f59f0df59e34310a1e27a20ae0644ba..901673cec750b8afc67061769a1ccd243d81dc2f 100644 (file)
@@ -1 +1 @@
-!function(a){var b=function(){var a=document.getElementById("post-revisions"),b=a?a.getElementsByTagName("input"):[];a.onclick=function(){var a,c,d=0;for(a=0;a<b.length;a++)d+=b[a].checked?1:0,c=b[a].getAttribute("name"),b[a].checked||!("left"==c&&1>d||"right"==c&&d>1&&(!b[a-1]||!b[a-1].checked))||b[a+1]&&b[a+1].checked&&"right"==b[a+1].getAttribute("name")?("left"==c||"right"==c)&&(b[a].style.visibility="visible"):b[a].style.visibility="hidden"},a.onclick()};a&&a.addEventListener?a.addEventListener("load",b,!1):a&&a.attachEvent&&a.attachEvent("onload",b)}(window);
\ No newline at end of file
+!function(a){var b=function(){var a=document.getElementById("post-revisions"),b=a?a.getElementsByTagName("input"):[];a.onclick=function(){var a,c,d=0;for(a=0;a<b.length;a++)d+=b[a].checked?1:0,c=b[a].getAttribute("name"),b[a].checked||!("left"==c&&1>d||"right"==c&&1<d&&(!b[a-1]||!b[a-1].checked))||b[a+1]&&b[a+1].checked&&"right"==b[a+1].getAttribute("name")?"left"!=c&&"right"!=c||(b[a].style.visibility="visible"):b[a].style.visibility="hidden"},a.onclick()};a&&a.addEventListener?a.addEventListener("load",b,!1):a&&a.attachEvent&&a.attachEvent("onload",b)}(window);
\ No newline at end of file
index 117e892f727b80a634b69f426967264e8628468f..2b8e51339bff79fddf2665d6654397b3ea771684 100644 (file)
@@ -297,10 +297,28 @@ wpList = {
                        res = wpAjax.parseAjaxResponse(r, s.response, s.element);
                        rres = r;
 
-                       if ( !res || res.errors ) {
+                       if ( true === res ) {
+                               return true;
+                       }
+
+                       if ( ! res || res.errors ) {
                                element.stop().stop().css( 'backgroundColor', '#FF3333' )[isClass?'removeClass':'addClass'](s.dimClass).show().queue( function() { list.wpList.recolor(); $(this).dequeue(); } );
                                return false;
                        }
+
+                       if ( 'undefined' !== typeof res.responses[0].supplemental.comment_link ) {
+                               var submittedOn = element.find( '.submitted-on' ),
+                                       commentLink = submittedOn.find( 'a' );
+
+                               // Comment is approved; link the date field.
+                               if ( '' !== res.responses[0].supplemental.comment_link ) {
+                                       submittedOn.html( $('<a></a>').text( submittedOn.text() ).prop( 'href', res.responses[0].supplemental.comment_link ) );
+
+                               // Comment is not approved; unlink the date field.
+                               } else if ( commentLink.length ) {
+                                       submittedOn.text( commentLink.text() );
+                               }
+                       }
                };
 
                s.complete = function(x, st) {
index be53c4b57c33842024b22638e15fef491aea84b2..719aa1aebb96f05a58efcaefb72334087e5c09ed 100644 (file)
@@ -1 +1 @@
-!function(a){var b,c={add:"ajaxAdd",del:"ajaxDel",dim:"ajaxDim",process:"process",recolor:"recolor"};b={settings:{url:ajaxurl,type:"POST",response:"ajax-response",what:"",alt:"alternate",altOffset:0,addColor:null,delColor:null,dimAddColor:null,dimDelColor:null,confirm:null,addBefore:null,addAfter:null,delBefore:null,delAfter:null,dimBefore:null,dimAfter:null},nonce:function(b,c){var d=wpAjax.unserialize(b.attr("href"));return c.nonce||d._ajax_nonce||a("#"+c.element+' input[name="_ajax_nonce"]').val()||d._wpnonce||a("#"+c.element+' input[name="_wpnonce"]').val()||0},parseData:function(b,c){var d,e=[];try{d=a(b).attr("data-wp-lists")||"",d=d.match(new RegExp(c+":[\\S]+")),d&&(e=d[0].split(":"))}catch(f){}return e},pre:function(b,c,d){var e,f;return c=a.extend({},this.wpList.settings,{element:null,nonce:0,target:b.get(0)},c||{}),a.isFunction(c.confirm)&&("add"!=d&&(e=a("#"+c.element).css("backgroundColor"),a("#"+c.element).css("backgroundColor","#FF9966")),f=c.confirm.call(this,b,c,d,e),"add"!=d&&a("#"+c.element).css("backgroundColor",e),!f)?!1:c},ajaxAdd:function(c,d){c=a(c),d=d||{};var e,f,g,h,i,j=this,k=b.parseData(c,"add");return d=b.pre.call(j,c,d,"add"),d.element=k[2]||c.attr("id")||d.element||null,k[3]?d.addColor="#"+k[3]:d.addColor=d.addColor||"#FFFF33",d?c.is('[id="'+d.element+'-submit"]')?d.element?(d.action="add-"+d.what,d.nonce=b.nonce(c,d),e=a("#"+d.element+" :input").not('[name="_ajax_nonce"], [name="_wpnonce"], [name="action"]'),(f=wpAjax.validateForm("#"+d.element))?(d.data=a.param(a.extend({_ajax_nonce:d.nonce,action:d.action},wpAjax.unserialize(k[4]||""))),g=a.isFunction(e.fieldSerialize)?e.fieldSerialize():e.serialize(),g&&(d.data+="&"+g),a.isFunction(d.addBefore)&&(d=d.addBefore(d),!d)?!0:d.data.match(/_ajax_nonce=[a-f0-9]+/)?(d.success=function(c){return h=wpAjax.parseAjaxResponse(c,d.response,d.element),i=c,!h||h.errors?!1:!0===h?!0:(jQuery.each(h.responses,function(){b.add.call(j,this.data,a.extend({},d,{pos:this.position||0,id:this.id||0,oldId:this.oldId||null}))}),j.wpList.recolor(),a(j).trigger("wpListAddEnd",[d,j.wpList]),void b.clear.call(j,"#"+d.element))},d.complete=function(b,c){if(a.isFunction(d.addAfter)){var e=a.extend({xml:b,status:c,parsed:h},d);d.addAfter(i,e)}},a.ajax(d),!1):!0):!1):!0:!b.add.call(j,c,d):!1},ajaxDel:function(c,d){c=a(c),d=d||{};var e,f,g,h=this,i=b.parseData(c,"delete");return d=b.pre.call(h,c,d,"delete"),d.element=i[2]||d.element||null,i[3]?d.delColor="#"+i[3]:d.delColor=d.delColor||"#faa",d&&d.element?(d.action="delete-"+d.what,d.nonce=b.nonce(c,d),d.data=a.extend({action:d.action,id:d.element.split("-").pop(),_ajax_nonce:d.nonce},wpAjax.unserialize(i[4]||"")),a.isFunction(d.delBefore)&&(d=d.delBefore(d,h),!d)?!0:d.data._ajax_nonce?(e=a("#"+d.element),"none"!=d.delColor?e.css("backgroundColor",d.delColor).fadeOut(350,function(){h.wpList.recolor(),a(h).trigger("wpListDelEnd",[d,h.wpList])}):(h.wpList.recolor(),a(h).trigger("wpListDelEnd",[d,h.wpList])),d.success=function(b){return f=wpAjax.parseAjaxResponse(b,d.response,d.element),g=b,!f||f.errors?(e.stop().stop().css("backgroundColor","#faa").show().queue(function(){h.wpList.recolor(),a(this).dequeue()}),!1):void 0},d.complete=function(b,c){a.isFunction(d.delAfter)&&e.queue(function(){var e=a.extend({xml:b,status:c,parsed:f},d);d.delAfter(g,e)}).dequeue()},a.ajax(d),!1):!0):!1},ajaxDim:function(c,d){if("none"==a(c).parent().css("display"))return!1;c=a(c),d=d||{};var e,f,g,h,i,j,k=this,l=b.parseData(c,"dim");return d=b.pre.call(k,c,d,"dim"),d.element=l[2]||d.element||null,d.dimClass=l[3]||d.dimClass||null,l[4]?d.dimAddColor="#"+l[4]:d.dimAddColor=d.dimAddColor||"#FFFF33",l[5]?d.dimDelColor="#"+l[5]:d.dimDelColor=d.dimDelColor||"#FF3333",d&&d.element&&d.dimClass?(d.action="dim-"+d.what,d.nonce=b.nonce(c,d),d.data=a.extend({action:d.action,id:d.element.split("-").pop(),dimClass:d.dimClass,_ajax_nonce:d.nonce},wpAjax.unserialize(l[6]||"")),a.isFunction(d.dimBefore)&&(d=d.dimBefore(d),!d)?!0:(e=a("#"+d.element),f=e.toggleClass(d.dimClass).is("."+d.dimClass),g=b.getColor(e),e.toggleClass(d.dimClass),h=f?d.dimAddColor:d.dimDelColor,"none"!=h?e.animate({backgroundColor:h},"fast").queue(function(){e.toggleClass(d.dimClass),a(this).dequeue()}).animate({backgroundColor:g},{complete:function(){a(this).css("backgroundColor",""),a(k).trigger("wpListDimEnd",[d,k.wpList])}}):a(k).trigger("wpListDimEnd",[d,k.wpList]),d.data._ajax_nonce?(d.success=function(b){return i=wpAjax.parseAjaxResponse(b,d.response,d.element),j=b,!i||i.errors?(e.stop().stop().css("backgroundColor","#FF3333")[f?"removeClass":"addClass"](d.dimClass).show().queue(function(){k.wpList.recolor(),a(this).dequeue()}),!1):void 0},d.complete=function(b,c){a.isFunction(d.dimAfter)&&e.queue(function(){var e=a.extend({xml:b,status:c,parsed:i},d);d.dimAfter(j,e)}).dequeue()},a.ajax(d),!1):!0)):!0},getColor:function(a){var b=jQuery(a).css("backgroundColor");return b||"#ffffff"},add:function(c,d){c=a("string"==typeof c?a.trim(c):c);var e,f,g,h=a(this),i=!1,j={pos:0,id:0,oldId:null};return"string"==typeof d&&(d={what:d}),d=a.extend(j,this.wpList.settings,d),c.length&&d.what?(d.oldId&&(i=a("#"+d.what+"-"+d.oldId)),!d.id||d.id==d.oldId&&i&&i.length||a("#"+d.what+"-"+d.id).remove(),i&&i.length?(i.before(c),i.remove()):isNaN(d.pos)?(e="after","-"==d.pos.substr(0,1)&&(d.pos=d.pos.substr(1),e="before"),f=h.find("#"+d.pos),1===f.length?f[e](c):h.append(c)):("comment"!=d.what||0===a("#"+d.element).length)&&(d.pos<0?h.prepend(c):h.append(c)),d.alt&&((h.children(":visible").index(c[0])+d.altOffset)%2?c.removeClass(d.alt):c.addClass(d.alt)),"none"!=d.addColor&&(g=b.getColor(c),c.css("backgroundColor",d.addColor).animate({backgroundColor:g},{complete:function(){a(this).css("backgroundColor","")}})),h.each(function(){this.wpList.process(c)}),c):!1},clear:function(b){var c,d,e=this;b=a(b),e.wpList&&b.parents("#"+e.id).length||b.find(":input").each(function(){a(this).parents(".form-no-clear").length||(c=this.type.toLowerCase(),d=this.tagName.toLowerCase(),"text"==c||"password"==c||"textarea"==d?this.value="":"checkbox"==c||"radio"==c?this.checked=!1:"select"==d&&(this.selectedIndex=null))})},process:function(b){var c=this,d=a(b||document);d.delegate('form[data-wp-lists^="add:'+c.id+':"]',"submit",function(){return c.wpList.add(this)}),d.delegate('a[data-wp-lists^="add:'+c.id+':"], input[data-wp-lists^="add:'+c.id+':"]',"click",function(){return c.wpList.add(this)}),d.delegate('[data-wp-lists^="delete:'+c.id+':"]',"click",function(){return c.wpList.del(this)}),d.delegate('[data-wp-lists^="dim:'+c.id+':"]',"click",function(){return c.wpList.dim(this)})},recolor:function(){var b,c,d=this;d.wpList.settings.alt&&(b=a(".list-item:visible",d),b.length||(b=a(d).children(":visible")),c=[":even",":odd"],d.wpList.settings.altOffset%2&&c.reverse(),b.filter(c[0]).addClass(d.wpList.settings.alt).end().filter(c[1]).removeClass(d.wpList.settings.alt))},init:function(){var a=this;a.wpList.process=function(b){a.each(function(){this.wpList.process(b)})},a.wpList.recolor=function(){a.each(function(){this.wpList.recolor()})}}},a.fn.wpList=function(d){return this.each(function(){var e=this;this.wpList={settings:a.extend({},b.settings,{what:b.parseData(this,"list")[1]||""},d)},a.each(c,function(a,c){e.wpList[a]=function(a,d){return b[c].call(e,a,d)}})}),b.init.call(this),this.wpList.process(),this}}(jQuery);
\ No newline at end of file
+!function(a){var b,c={add:"ajaxAdd",del:"ajaxDel",dim:"ajaxDim",process:"process",recolor:"recolor"};b={settings:{url:ajaxurl,type:"POST",response:"ajax-response",what:"",alt:"alternate",altOffset:0,addColor:null,delColor:null,dimAddColor:null,dimDelColor:null,confirm:null,addBefore:null,addAfter:null,delBefore:null,delAfter:null,dimBefore:null,dimAfter:null},nonce:function(b,c){var d=wpAjax.unserialize(b.attr("href"));return c.nonce||d._ajax_nonce||a("#"+c.element+' input[name="_ajax_nonce"]').val()||d._wpnonce||a("#"+c.element+' input[name="_wpnonce"]').val()||0},parseData:function(b,c){var d,e=[];try{d=a(b).attr("data-wp-lists")||"",d=d.match(new RegExp(c+":[\\S]+")),d&&(e=d[0].split(":"))}catch(f){}return e},pre:function(b,c,d){var e,f;return c=a.extend({},this.wpList.settings,{element:null,nonce:0,target:b.get(0)},c||{}),!(a.isFunction(c.confirm)&&("add"!=d&&(e=a("#"+c.element).css("backgroundColor"),a("#"+c.element).css("backgroundColor","#FF9966")),f=c.confirm.call(this,b,c,d,e),"add"!=d&&a("#"+c.element).css("backgroundColor",e),!f))&&c},ajaxAdd:function(c,d){c=a(c),d=d||{};var e,f,g,h,i,j=this,k=b.parseData(c,"add");return d=b.pre.call(j,c,d,"add"),d.element=k[2]||c.attr("id")||d.element||null,k[3]?d.addColor="#"+k[3]:d.addColor=d.addColor||"#FFFF33",!!d&&(c.is('[id="'+d.element+'-submit"]')?!d.element||(d.action="add-"+d.what,d.nonce=b.nonce(c,d),e=a("#"+d.element+" :input").not('[name="_ajax_nonce"], [name="_wpnonce"], [name="action"]'),!!(f=wpAjax.validateForm("#"+d.element))&&(d.data=a.param(a.extend({_ajax_nonce:d.nonce,action:d.action},wpAjax.unserialize(k[4]||""))),g=a.isFunction(e.fieldSerialize)?e.fieldSerialize():e.serialize(),g&&(d.data+="&"+g),!(!a.isFunction(d.addBefore)||(d=d.addBefore(d)))||(!d.data.match(/_ajax_nonce=[a-f0-9]+/)||(d.success=function(c){return h=wpAjax.parseAjaxResponse(c,d.response,d.element),i=c,!(!h||h.errors)&&(!0===h||(jQuery.each(h.responses,function(){b.add.call(j,this.data,a.extend({},d,{pos:this.position||0,id:this.id||0,oldId:this.oldId||null}))}),j.wpList.recolor(),a(j).trigger("wpListAddEnd",[d,j.wpList]),void b.clear.call(j,"#"+d.element)))},d.complete=function(b,c){if(a.isFunction(d.addAfter)){var e=a.extend({xml:b,status:c,parsed:h},d);d.addAfter(i,e)}},a.ajax(d),!1)))):!b.add.call(j,c,d))},ajaxDel:function(c,d){c=a(c),d=d||{};var e,f,g,h=this,i=b.parseData(c,"delete");return d=b.pre.call(h,c,d,"delete"),d.element=i[2]||d.element||null,i[3]?d.delColor="#"+i[3]:d.delColor=d.delColor||"#faa",!(!d||!d.element)&&(d.action="delete-"+d.what,d.nonce=b.nonce(c,d),d.data=a.extend({action:d.action,id:d.element.split("-").pop(),_ajax_nonce:d.nonce},wpAjax.unserialize(i[4]||"")),!(!a.isFunction(d.delBefore)||(d=d.delBefore(d,h)))||(!d.data._ajax_nonce||(e=a("#"+d.element),"none"!=d.delColor?e.css("backgroundColor",d.delColor).fadeOut(350,function(){h.wpList.recolor(),a(h).trigger("wpListDelEnd",[d,h.wpList])}):(h.wpList.recolor(),a(h).trigger("wpListDelEnd",[d,h.wpList])),d.success=function(b){if(f=wpAjax.parseAjaxResponse(b,d.response,d.element),g=b,!f||f.errors)return e.stop().stop().css("backgroundColor","#faa").show().queue(function(){h.wpList.recolor(),a(this).dequeue()}),!1},d.complete=function(b,c){a.isFunction(d.delAfter)&&e.queue(function(){var e=a.extend({xml:b,status:c,parsed:f},d);d.delAfter(g,e)}).dequeue()},a.ajax(d),!1)))},ajaxDim:function(c,d){if("none"==a(c).parent().css("display"))return!1;c=a(c),d=d||{};var e,f,g,h,i,j,k=this,l=b.parseData(c,"dim");return d=b.pre.call(k,c,d,"dim"),d.element=l[2]||d.element||null,d.dimClass=l[3]||d.dimClass||null,l[4]?d.dimAddColor="#"+l[4]:d.dimAddColor=d.dimAddColor||"#FFFF33",l[5]?d.dimDelColor="#"+l[5]:d.dimDelColor=d.dimDelColor||"#FF3333",!(d&&d.element&&d.dimClass)||(d.action="dim-"+d.what,d.nonce=b.nonce(c,d),d.data=a.extend({action:d.action,id:d.element.split("-").pop(),dimClass:d.dimClass,_ajax_nonce:d.nonce},wpAjax.unserialize(l[6]||"")),!(!a.isFunction(d.dimBefore)||(d=d.dimBefore(d)))||(e=a("#"+d.element),f=e.toggleClass(d.dimClass).is("."+d.dimClass),g=b.getColor(e),e.toggleClass(d.dimClass),h=f?d.dimAddColor:d.dimDelColor,"none"!=h?e.animate({backgroundColor:h},"fast").queue(function(){e.toggleClass(d.dimClass),a(this).dequeue()}).animate({backgroundColor:g},{complete:function(){a(this).css("backgroundColor",""),a(k).trigger("wpListDimEnd",[d,k.wpList])}}):a(k).trigger("wpListDimEnd",[d,k.wpList]),!d.data._ajax_nonce||(d.success=function(b){if(i=wpAjax.parseAjaxResponse(b,d.response,d.element),j=b,!0===i)return!0;if(!i||i.errors)return e.stop().stop().css("backgroundColor","#FF3333")[f?"removeClass":"addClass"](d.dimClass).show().queue(function(){k.wpList.recolor(),a(this).dequeue()}),!1;if("undefined"!=typeof i.responses[0].supplemental.comment_link){var c=e.find(".submitted-on"),g=c.find("a");""!==i.responses[0].supplemental.comment_link?c.html(a("<a></a>").text(c.text()).prop("href",i.responses[0].supplemental.comment_link)):g.length&&c.text(g.text())}},d.complete=function(b,c){a.isFunction(d.dimAfter)&&e.queue(function(){var e=a.extend({xml:b,status:c,parsed:i},d);d.dimAfter(j,e)}).dequeue()},a.ajax(d),!1)))},getColor:function(a){var b=jQuery(a).css("backgroundColor");return b||"#ffffff"},add:function(c,d){c=a("string"==typeof c?a.trim(c):c);var e,f,g,h=a(this),i=!1,j={pos:0,id:0,oldId:null};return"string"==typeof d&&(d={what:d}),d=a.extend(j,this.wpList.settings,d),!(!c.length||!d.what)&&(d.oldId&&(i=a("#"+d.what+"-"+d.oldId)),!d.id||d.id==d.oldId&&i&&i.length||a("#"+d.what+"-"+d.id).remove(),i&&i.length?(i.before(c),i.remove()):isNaN(d.pos)?(e="after","-"==d.pos.substr(0,1)&&(d.pos=d.pos.substr(1),e="before"),f=h.find("#"+d.pos),1===f.length?f[e](c):h.append(c)):"comment"==d.what&&0!==a("#"+d.element).length||(d.pos<0?h.prepend(c):h.append(c)),d.alt&&((h.children(":visible").index(c[0])+d.altOffset)%2?c.removeClass(d.alt):c.addClass(d.alt)),"none"!=d.addColor&&(g=b.getColor(c),c.css("backgroundColor",d.addColor).animate({backgroundColor:g},{complete:function(){a(this).css("backgroundColor","")}})),h.each(function(){this.wpList.process(c)}),c)},clear:function(b){var c,d,e=this;b=a(b),e.wpList&&b.parents("#"+e.id).length||b.find(":input").each(function(){a(this).parents(".form-no-clear").length||(c=this.type.toLowerCase(),d=this.tagName.toLowerCase(),"text"==c||"password"==c||"textarea"==d?this.value="":"checkbox"==c||"radio"==c?this.checked=!1:"select"==d&&(this.selectedIndex=null))})},process:function(b){var c=this,d=a(b||document);d.delegate('form[data-wp-lists^="add:'+c.id+':"]',"submit",function(){return c.wpList.add(this)}),d.delegate('a[data-wp-lists^="add:'+c.id+':"], input[data-wp-lists^="add:'+c.id+':"]',"click",function(){return c.wpList.add(this)}),d.delegate('[data-wp-lists^="delete:'+c.id+':"]',"click",function(){return c.wpList.del(this)}),d.delegate('[data-wp-lists^="dim:'+c.id+':"]',"click",function(){return c.wpList.dim(this)})},recolor:function(){var b,c,d=this;d.wpList.settings.alt&&(b=a(".list-item:visible",d),b.length||(b=a(d).children(":visible")),c=[":even",":odd"],d.wpList.settings.altOffset%2&&c.reverse(),b.filter(c[0]).addClass(d.wpList.settings.alt).end().filter(c[1]).removeClass(d.wpList.settings.alt))},init:function(){var a=this;a.wpList.process=function(b){a.each(function(){this.wpList.process(b)})},a.wpList.recolor=function(){a.each(function(){this.wpList.recolor()})}}},a.fn.wpList=function(d){return this.each(function(){var e=this;this.wpList={settings:a.extend({},b.settings,{what:b.parseData(this,"list")[1]||""},d)},a.each(c,function(a,c){e.wpList[a]=function(a,d){return b[c].call(e,a,d)}})}),b.init.call(this),this.wpList.process(),this}}(jQuery);
\ No newline at end of file
index 84cb5510bbdece7103385d6bb98b3498bc4fbb49..527441dda9504c1c1eeb394117e23b164eb77620 100644 (file)
@@ -30,7 +30,7 @@ window.wp = window.wp || {};
                        };
 
                return function ( data ) {
-                       compiled = compiled || _.template( $( '#tmpl-' + id ).html(), null, options );
+                       compiled = compiled || _.template( $( '#tmpl-' + id ).html(),  options );
                        return compiled( data );
                };
        });
@@ -48,8 +48,9 @@ window.wp = window.wp || {};
                 *
                 * Sends a POST request to WordPress.
                 *
-                * @param  {string} action The slug of the action to fire in WordPress.
-                * @param  {object} data   The data to populate $_POST with.
+                * @param  {(string|object)} action  The slug of the action to fire in WordPress or options passed
+                *                                   to jQuery.ajax.
+                * @param  {object=}         data    Optional. The data to populate $_POST with.
                 * @return {$.promise}     A jQuery promise that represents the request,
                 *                         decorated with an abort() method.
                 */
@@ -64,8 +65,9 @@ window.wp = window.wp || {};
                 *
                 * Sends a POST request to WordPress.
                 *
-                * @param  {string} action  The slug of the action to fire in WordPress.
-                * @param  {object} options The options passed to jQuery.ajax.
+                * @param  {(string|object)} action  The slug of the action to fire in WordPress or options passed
+                *                                   to jQuery.ajax.
+                * @param  {object=}         options Optional. The options passed to jQuery.ajax.
                 * @return {$.promise}      A jQuery promise that represents the request,
                 *                          decorated with an abort() method.
                 */
@@ -96,8 +98,7 @@ window.wp = window.wp || {};
 
                                // Use with PHP's wp_send_json_success() and wp_send_json_error()
                                deferred.jqXHR = $.ajax( options ).done( function( response ) {
-                                       // Treat a response of `1` as successful for backwards
-                                       // compatibility with existing handlers.
+                                       // Treat a response of 1 as successful for backward compatibility with existing handlers.
                                        if ( response === '1' || response === 1 )
                                                response = { success: true };
 
index 18db8302e04e635bf50df67c641d0fa0e6cd8239..35de4622ce6a29200956be0ccbd163ee7c5c7404 100644 (file)
@@ -1 +1 @@
-window.wp=window.wp||{},function(a){var b="undefined"==typeof _wpUtilSettings?{}:_wpUtilSettings;wp.template=_.memoize(function(b){var c,d={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){return(c=c||_.template(a("#tmpl-"+b).html(),null,d))(e)}}),wp.ajax={settings:b.ajax||{},post:function(a,b){return wp.ajax.send({data:_.isObject(a)?a:_.extend(b||{},{action:a})})},send:function(b,c){var d,e;return _.isObject(b)?c=b:(c=c||{},c.data=_.extend(c.data||{},{action:b})),c=_.defaults(c||{},{type:"POST",url:wp.ajax.settings.url,context:this}),e=a.Deferred(function(b){c.success&&b.done(c.success),c.error&&b.fail(c.error),delete c.success,delete c.error,b.jqXHR=a.ajax(c).done(function(a){("1"===a||1===a)&&(a={success:!0}),_.isObject(a)&&!_.isUndefined(a.success)?b[a.success?"resolveWith":"rejectWith"](this,[a.data]):b.rejectWith(this,[a])}).fail(function(){b.rejectWith(this,arguments)})}),d=e.promise(),d.abort=function(){return e.jqXHR.abort(),this},d}}}(jQuery);
\ No newline at end of file
+window.wp=window.wp||{},function(a){var b="undefined"==typeof _wpUtilSettings?{}:_wpUtilSettings;wp.template=_.memoize(function(b){var c,d={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){return(c=c||_.template(a("#tmpl-"+b).html(),d))(e)}}),wp.ajax={settings:b.ajax||{},post:function(a,b){return wp.ajax.send({data:_.isObject(a)?a:_.extend(b||{},{action:a})})},send:function(b,c){var d,e;return _.isObject(b)?c=b:(c=c||{},c.data=_.extend(c.data||{},{action:b})),c=_.defaults(c||{},{type:"POST",url:wp.ajax.settings.url,context:this}),e=a.Deferred(function(b){c.success&&b.done(c.success),c.error&&b.fail(c.error),delete c.success,delete c.error,b.jqXHR=a.ajax(c).done(function(a){"1"!==a&&1!==a||(a={success:!0}),_.isObject(a)&&!_.isUndefined(a.success)?b[a.success?"resolveWith":"rejectWith"](this,[a.data]):b.rejectWith(this,[a])}).fail(function(){b.rejectWith(this,arguments)})}),d=e.promise(),d.abort=function(){return e.jqXHR.abort(),this},d}}}(jQuery);
\ No newline at end of file
index 39925e5d2511a4cf61dbad3b87fb2abd3cd28b35..db03036fa6da025466a16b419dc28b69911131d2 100644 (file)
@@ -2,8 +2,8 @@ var wpLink;
 
 ( function( $, wpLinkL10n, wp ) {
        var editor, searchTimer, River, Query, correctedURL, linkNode,
-               emailRegexp = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,
-               urlRegexp = /^(https?|ftp):\/\/[A-Z0-9.-]+\.[A-Z]{2,4}[^ "]*$/i,
+               emailRegexp = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,63}$/i,
+               urlRegexp = /^(https?|ftp):\/\/[A-Z0-9.-]+\.[A-Z]{2,63}[^ "]*$/i,
                inputs = {},
                rivers = {},
                isTouch = ( 'ontouchend' in document );
@@ -19,6 +19,7 @@ var wpLink;
                keySensitivity: 100,
                lastSearch: '',
                textarea: '',
+               modalOpen: false,
 
                init: function() {
                        inputs.wrap = $('#wp-link-wrap');
@@ -97,6 +98,7 @@ var wpLink;
                                $body = $( document.body );
 
                        $body.addClass( 'modal-open' );
+                       wpLink.modalOpen = true;
                        linkNode = node;
 
                        wpLink.range = null;
@@ -228,7 +230,7 @@ var wpLink;
                                onlyText = this.hasSelectedText( linkNode );
 
                        if ( linkNode ) {
-                               linkText = linkNode.innerText || linkNode.textContent;
+                               linkText = linkNode.textContent || linkNode.innerText;
                                href = editor.dom.getAttrib( linkNode, 'href' );
 
                                if ( ! $.trim( linkText ) ) {
@@ -274,6 +276,7 @@ var wpLink;
 
                close: function( reset ) {
                        $( document.body ).removeClass( 'modal-open' );
+                       wpLink.modalOpen = false;
 
                        if ( reset !== 'noReset' ) {
                                if ( ! wpLink.isMCE() ) {
@@ -431,6 +434,10 @@ var wpLink;
                        editor.focus();
                        editor.nodeChanged();
 
+                       if ( link && editor.plugins.wplink ) {
+                               editor.plugins.wplink.checkLink( link );
+                       }
+
                        // Audible confirmation message when a link has been inserted in the Editor.
                        wp.a11y.speak( wpLinkL10n.linkInserted );
                },
index bbdd026723f837ad7eee0571cf30f1f4a611444b..327bcbd7c5fbe8d0ebda0bddc48507b7fd3292f2 100644 (file)
@@ -1 +1 @@
-var wpLink;!function(a,b,c){function d(){return j||e.dom.getParent(e.selection.getNode(),"a[href]")}var e,f,g,h,i,j,k=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,l=/^(https?|ftp):\/\/[A-Z0-9.-]+\.[A-Z]{2,4}[^ "]*$/i,m={},n={},o="ontouchend"in document;wpLink={timeToTriggerRiver:150,minRiverAJAXDuration:200,riverBottomThreshold:5,keySensitivity:100,lastSearch:"",textarea:"",init:function(){m.wrap=a("#wp-link-wrap"),m.dialog=a("#wp-link"),m.backdrop=a("#wp-link-backdrop"),m.submit=a("#wp-link-submit"),m.close=a("#wp-link-close"),m.text=a("#wp-link-text"),m.url=a("#wp-link-url"),m.nonce=a("#_ajax_linking_nonce"),m.openInNewTab=a("#wp-link-target"),m.search=a("#wp-link-search"),n.search=new g(a("#search-results")),n.recent=new g(a("#most-recent-results")),n.elements=m.dialog.find(".query-results"),m.queryNotice=a("#query-notice-message"),m.queryNoticeTextDefault=m.queryNotice.find(".query-notice-default"),m.queryNoticeTextHint=m.queryNotice.find(".query-notice-hint"),m.dialog.keydown(wpLink.keydown),m.dialog.keyup(wpLink.keyup),m.submit.click(function(a){a.preventDefault(),wpLink.update()}),m.close.add(m.backdrop).add("#wp-link-cancel button").click(function(a){a.preventDefault(),wpLink.close()}),n.elements.on("river-select",wpLink.updateFields),m.search.on("focus.wplink",function(){m.queryNoticeTextDefault.hide(),m.queryNoticeTextHint.removeClass("screen-reader-text").show()}).on("blur.wplink",function(){m.queryNoticeTextDefault.show(),m.queryNoticeTextHint.addClass("screen-reader-text").hide()}),m.search.on("keyup input",function(){window.clearTimeout(f),f=window.setTimeout(function(){wpLink.searchInternalLinks()},500)}),m.url.on("paste",function(){setTimeout(wpLink.correctURL,0)}),m.url.on("blur",wpLink.correctURL)},correctURL:function(){var b=a.trim(m.url.val());b&&i!==b&&!/^(?:[a-z]+:|#|\?|\.|\/)/.test(b)&&(m.url.val("http://"+b),i=b)},open:function(b,c,d,f){var g,h=a(document.body);h.addClass("modal-open"),j=f,wpLink.range=null,b&&(window.wpActiveEditor=b),window.wpActiveEditor&&(this.textarea=a("#"+window.wpActiveEditor).get(0),"undefined"!=typeof window.tinymce&&(h.append(m.backdrop,m.wrap),g=window.tinymce.get(window.wpActiveEditor),e=g&&!g.isHidden()?g:null,e&&window.tinymce.isIE&&(e.windowManager.wplinkBookmark=e.selection.getBookmark())),!wpLink.isMCE()&&document.selection&&(this.textarea.focus(),this.range=document.selection.createRange()),m.wrap.show(),m.backdrop.show(),wpLink.refresh(c,d),a(document).trigger("wplink-open",m.wrap))},isMCE:function(){return e&&!e.isHidden()},refresh:function(a,b){var c="";n.search.refresh(),n.recent.refresh(),wpLink.isMCE()?wpLink.mceRefresh(a,b):(m.wrap.hasClass("has-text-field")||m.wrap.addClass("has-text-field"),document.selection?c=document.selection.createRange().text||b||"":"undefined"!=typeof this.textarea.selectionStart&&this.textarea.selectionStart!==this.textarea.selectionEnd&&(b=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd)||b||""),m.text.val(b),wpLink.setDefaultValues()),o?m.url.focus().blur():window.setTimeout(function(){m.url[0].select(),m.url.focus()}),n.recent.ul.children().length||n.recent.ajax(),i=m.url.val().replace(/^http:\/\//,"")},hasSelectedText:function(a){var b,c,d,f=e.selection.getContent();if(/</.test(f)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(f)||-1===f.indexOf("href=")))return!1;if(a){if(c=a.childNodes,0===c.length)return!1;for(d=c.length-1;d>=0;d--)if(b=c[d],3!=b.nodeType&&!window.tinymce.dom.BookmarkManager.isBookmarkNode(b))return!1}return!0},mceRefresh:function(c,f){var g,h,i=d(),j=this.hasSelectedText(i);i?(g=i.innerText||i.textContent,h=e.dom.getAttrib(i,"href"),a.trim(g)||(g=f||""),c&&(l.test(c)||k.test(c))&&(h=c),"_wp_link_placeholder"!==h?(m.url.val(h),m.openInNewTab.prop("checked","_blank"===e.dom.getAttrib(i,"target")),m.submit.val(b.update)):this.setDefaultValues(g),c&&c!==h?m.search.val(c):m.search.val(""),window.setTimeout(function(){wpLink.searchInternalLinks()})):(g=e.selection.getContent({format:"text"})||f||"",this.setDefaultValues(g)),j?(m.text.val(g),m.wrap.addClass("has-text-field")):(m.text.val(""),m.wrap.removeClass("has-text-field"))},close:function(b){a(document.body).removeClass("modal-open"),"noReset"!==b&&(wpLink.isMCE()?(e.plugins.wplink&&e.plugins.wplink.close(),e.focus()):(wpLink.textarea.focus(),wpLink.range&&(wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select()))),m.backdrop.hide(),m.wrap.hide(),i=!1,a(document).trigger("wplink-close",m.wrap)},getAttrs:function(){return wpLink.correctURL(),{href:a.trim(m.url.val()),target:m.openInNewTab.prop("checked")?"_blank":""}},buildHtml:function(a){var b='<a href="'+a.href+'"';return a.target&&(b+=' target="'+a.target+'"'),b+">"},update:function(){wpLink.isMCE()?wpLink.mceUpdate():wpLink.htmlUpdate()},htmlUpdate:function(){var a,d,e,f,g,h,i,j=wpLink.textarea;j&&(a=wpLink.getAttrs(),d=m.text.val(),a.href&&(e=wpLink.buildHtml(a),document.selection&&wpLink.range?(j.focus(),wpLink.range.text=e+(d||wpLink.range.text)+"</a>",wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select(),wpLink.range=null):"undefined"!=typeof j.selectionStart&&(f=j.selectionStart,g=j.selectionEnd,i=d||j.value.substring(f,g),e=e+i+"</a>",h=f+e.length,f!==g||i||(h-=4),j.value=j.value.substring(0,f)+e+j.value.substring(g,j.value.length),j.selectionStart=j.selectionEnd=h),wpLink.close(),j.focus(),c.a11y.speak(b.linkInserted)))},mceUpdate:function(){var a,f,g=wpLink.getAttrs();return window.tinymce.isIE&&e.windowManager.wplinkBookmark&&(e.selection.moveToBookmark(e.windowManager.wplinkBookmark),e.windowManager.wplinkBookmark=null),g.href?(a=d(),m.wrap.hasClass("has-text-field")&&(f=m.text.val()||g.href),a?(f&&("innerText"in a?a.innerText=f:a.textContent=f),g["data-wplink-edit"]=null,e.dom.setAttribs(a,g)):f?e.selection.setNode(e.dom.create("a",g,e.dom.encode(f))):e.execCommand("mceInsertLink",!1,g),wpLink.close("noReset"),e.focus(),e.nodeChanged(),void c.a11y.speak(b.linkInserted)):(e.execCommand("unlink"),void wpLink.close())},updateFields:function(a,b){m.url.val(b.children(".item-permalink").val())},getUrlFromSelection:function(b){return b||(this.isMCE()?b=e.selection.getContent({format:"text"}):document.selection&&wpLink.range?b=wpLink.range.text:"undefined"!=typeof this.textarea.selectionStart&&(b=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd))),b=a.trim(b),b&&k.test(b)?"mailto:"+b:b&&l.test(b)?b.replace(/&amp;|&#0?38;/gi,"&"):""},setDefaultValues:function(a){m.url.val(this.getUrlFromSelection(a)),m.search.val(""),wpLink.searchInternalLinks(),m.submit.val(b.save)},searchInternalLinks:function(){var a,b=m.search.val()||"";if(b.length>2){if(n.recent.hide(),n.search.show(),wpLink.lastSearch==b)return;wpLink.lastSearch=b,a=m.search.parent().find(".spinner").addClass("is-active"),n.search.change(b),n.search.ajax(function(){a.removeClass("is-active")})}else n.search.hide(),n.recent.show()},next:function(){n.search.next(),n.recent.next()},prev:function(){n.search.prev(),n.recent.prev()},keydown:function(a){var b,c;27===a.keyCode?(wpLink.close(),a.stopImmediatePropagation()):9===a.keyCode&&(c=a.target.id,"wp-link-submit"!==c||a.shiftKey?"wp-link-close"===c&&a.shiftKey&&(m.submit.focus(),a.preventDefault()):(m.close.focus(),a.preventDefault())),(38===a.keyCode||40===a.keyCode)&&(!document.activeElement||"link-title-field"!==document.activeElement.id&&"url-field"!==document.activeElement.id)&&(b=38===a.keyCode?"prev":"next",clearInterval(wpLink.keyInterval),wpLink[b](),wpLink.keyInterval=setInterval(wpLink[b],wpLink.keySensitivity),a.preventDefault())},keyup:function(a){(38===a.keyCode||40===a.keyCode)&&(clearInterval(wpLink.keyInterval),a.preventDefault())},delayedCallback:function(a,b){var c,d,e,f;return b?(setTimeout(function(){return d?a.apply(f,e):void(c=!0)},b),function(){return c?a.apply(this,arguments):(e=arguments,f=this,void(d=!0))}):a}},g=function(b,c){var d=this;this.element=b,this.ul=b.children("ul"),this.contentHeight=b.children("#link-selector-height"),this.waiting=b.find(".river-waiting"),this.change(c),this.refresh(),a("#wp-link .query-results, #wp-link #link-selector").scroll(function(){d.maybeLoad()}),b.on("click","li",function(b){d.select(a(this),b)})},a.extend(g.prototype,{refresh:function(){this.deselect(),this.visible=this.element.is(":visible")},show:function(){this.visible||(this.deselect(),this.element.show(),this.visible=!0)},hide:function(){this.element.hide(),this.visible=!1},select:function(a,b){var c,d,e,f;a.hasClass("unselectable")||a==this.selected||(this.deselect(),this.selected=a.addClass("selected"),c=a.outerHeight(),d=this.element.height(),e=a.position().top,f=this.element.scrollTop(),0>e?this.element.scrollTop(f+e):e+c>d&&this.element.scrollTop(f+e-d+c),this.element.trigger("river-select",[a,b,this]))},deselect:function(){this.selected&&this.selected.removeClass("selected"),this.selected=!1},prev:function(){if(this.visible){var a;this.selected&&(a=this.selected.prev("li"),a.length&&this.select(a))}},next:function(){if(this.visible){var b=this.selected?this.selected.next("li"):a("li:not(.unselectable):first",this.element);b.length&&this.select(b)}},ajax:function(a){var b=this,c=1==this.query.page?0:wpLink.minRiverAJAXDuration,d=wpLink.delayedCallback(function(c,d){b.process(c,d),a&&a(c,d)},c);this.query.ajax(d)},change:function(a){this.query&&this._search==a||(this._search=a,this.query=new h(a),this.element.scrollTop(0))},process:function(c,d){var e="",f=!0,g="",h=1==d.page;c?a.each(c,function(){g=f?"alternate":"",g+=this.title?"":" no-title",e+=g?'<li class="'+g+'">':"<li>",e+='<input type="hidden" class="item-permalink" value="'+this.permalink+'" />',e+='<span class="item-title">',e+=this.title?this.title:b.noTitle,e+='</span><span class="item-info">'+this.info+"</span></li>",f=!f}):h&&(e+='<li class="unselectable no-matches-found"><span class="item-title"><em>'+b.noMatchesFound+"</em></span></li>"),this.ul[h?"html":"append"](e)},maybeLoad:function(){var a=this,b=this.element,c=b.scrollTop()+b.height();!this.query.ready()||c<this.contentHeight.height()-wpLink.riverBottomThreshold||setTimeout(function(){var c=b.scrollTop(),d=c+b.height();!a.query.ready()||d<a.contentHeight.height()-wpLink.riverBottomThreshold||(a.waiting.addClass("is-active"),b.scrollTop(c+a.waiting.outerHeight()),a.ajax(function(){a.waiting.removeClass("is-active")}))},wpLink.timeToTriggerRiver)}}),h=function(a){this.page=1,this.allLoaded=!1,this.querying=!1,this.search=a},a.extend(h.prototype,{ready:function(){return!(this.querying||this.allLoaded)},ajax:function(b){var c=this,d={action:"wp-link-ajax",page:this.page,_ajax_linking_nonce:m.nonce.val()};this.search&&(d.search=this.search),this.querying=!0,a.post(window.ajaxurl,d,function(a){c.page++,c.querying=!1,c.allLoaded=!a,b(a,d)},"json")}}),a(document).ready(wpLink.init)}(jQuery,window.wpLinkL10n,window.wp);
\ No newline at end of file
+var wpLink;!function(a,b,c){function d(){return j||e.dom.getParent(e.selection.getNode(),"a[href]")}var e,f,g,h,i,j,k=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,63}$/i,l=/^(https?|ftp):\/\/[A-Z0-9.-]+\.[A-Z]{2,63}[^ "]*$/i,m={},n={},o="ontouchend"in document;wpLink={timeToTriggerRiver:150,minRiverAJAXDuration:200,riverBottomThreshold:5,keySensitivity:100,lastSearch:"",textarea:"",modalOpen:!1,init:function(){m.wrap=a("#wp-link-wrap"),m.dialog=a("#wp-link"),m.backdrop=a("#wp-link-backdrop"),m.submit=a("#wp-link-submit"),m.close=a("#wp-link-close"),m.text=a("#wp-link-text"),m.url=a("#wp-link-url"),m.nonce=a("#_ajax_linking_nonce"),m.openInNewTab=a("#wp-link-target"),m.search=a("#wp-link-search"),n.search=new g(a("#search-results")),n.recent=new g(a("#most-recent-results")),n.elements=m.dialog.find(".query-results"),m.queryNotice=a("#query-notice-message"),m.queryNoticeTextDefault=m.queryNotice.find(".query-notice-default"),m.queryNoticeTextHint=m.queryNotice.find(".query-notice-hint"),m.dialog.keydown(wpLink.keydown),m.dialog.keyup(wpLink.keyup),m.submit.click(function(a){a.preventDefault(),wpLink.update()}),m.close.add(m.backdrop).add("#wp-link-cancel button").click(function(a){a.preventDefault(),wpLink.close()}),n.elements.on("river-select",wpLink.updateFields),m.search.on("focus.wplink",function(){m.queryNoticeTextDefault.hide(),m.queryNoticeTextHint.removeClass("screen-reader-text").show()}).on("blur.wplink",function(){m.queryNoticeTextDefault.show(),m.queryNoticeTextHint.addClass("screen-reader-text").hide()}),m.search.on("keyup input",function(){window.clearTimeout(f),f=window.setTimeout(function(){wpLink.searchInternalLinks()},500)}),m.url.on("paste",function(){setTimeout(wpLink.correctURL,0)}),m.url.on("blur",wpLink.correctURL)},correctURL:function(){var b=a.trim(m.url.val());b&&i!==b&&!/^(?:[a-z]+:|#|\?|\.|\/)/.test(b)&&(m.url.val("http://"+b),i=b)},open:function(b,c,d,f){var g,h=a(document.body);h.addClass("modal-open"),wpLink.modalOpen=!0,j=f,wpLink.range=null,b&&(window.wpActiveEditor=b),window.wpActiveEditor&&(this.textarea=a("#"+window.wpActiveEditor).get(0),"undefined"!=typeof window.tinymce&&(h.append(m.backdrop,m.wrap),g=window.tinymce.get(window.wpActiveEditor),e=g&&!g.isHidden()?g:null,e&&window.tinymce.isIE&&(e.windowManager.wplinkBookmark=e.selection.getBookmark())),!wpLink.isMCE()&&document.selection&&(this.textarea.focus(),this.range=document.selection.createRange()),m.wrap.show(),m.backdrop.show(),wpLink.refresh(c,d),a(document).trigger("wplink-open",m.wrap))},isMCE:function(){return e&&!e.isHidden()},refresh:function(a,b){var c="";n.search.refresh(),n.recent.refresh(),wpLink.isMCE()?wpLink.mceRefresh(a,b):(m.wrap.hasClass("has-text-field")||m.wrap.addClass("has-text-field"),document.selection?c=document.selection.createRange().text||b||"":"undefined"!=typeof this.textarea.selectionStart&&this.textarea.selectionStart!==this.textarea.selectionEnd&&(b=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd)||b||""),m.text.val(b),wpLink.setDefaultValues()),o?m.url.focus().blur():window.setTimeout(function(){m.url[0].select(),m.url.focus()}),n.recent.ul.children().length||n.recent.ajax(),i=m.url.val().replace(/^http:\/\//,"")},hasSelectedText:function(a){var b,c,d,f=e.selection.getContent();if(/</.test(f)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(f)||f.indexOf("href=")===-1))return!1;if(a){if(c=a.childNodes,0===c.length)return!1;for(d=c.length-1;d>=0;d--)if(b=c[d],3!=b.nodeType&&!window.tinymce.dom.BookmarkManager.isBookmarkNode(b))return!1}return!0},mceRefresh:function(c,f){var g,h,i=d(),j=this.hasSelectedText(i);i?(g=i.textContent||i.innerText,h=e.dom.getAttrib(i,"href"),a.trim(g)||(g=f||""),c&&(l.test(c)||k.test(c))&&(h=c),"_wp_link_placeholder"!==h?(m.url.val(h),m.openInNewTab.prop("checked","_blank"===e.dom.getAttrib(i,"target")),m.submit.val(b.update)):this.setDefaultValues(g),c&&c!==h?m.search.val(c):m.search.val(""),window.setTimeout(function(){wpLink.searchInternalLinks()})):(g=e.selection.getContent({format:"text"})||f||"",this.setDefaultValues(g)),j?(m.text.val(g),m.wrap.addClass("has-text-field")):(m.text.val(""),m.wrap.removeClass("has-text-field"))},close:function(b){a(document.body).removeClass("modal-open"),wpLink.modalOpen=!1,"noReset"!==b&&(wpLink.isMCE()?(e.plugins.wplink&&e.plugins.wplink.close(),e.focus()):(wpLink.textarea.focus(),wpLink.range&&(wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select()))),m.backdrop.hide(),m.wrap.hide(),i=!1,a(document).trigger("wplink-close",m.wrap)},getAttrs:function(){return wpLink.correctURL(),{href:a.trim(m.url.val()),target:m.openInNewTab.prop("checked")?"_blank":""}},buildHtml:function(a){var b='<a href="'+a.href+'"';return a.target&&(b+=' target="'+a.target+'"'),b+">"},update:function(){wpLink.isMCE()?wpLink.mceUpdate():wpLink.htmlUpdate()},htmlUpdate:function(){var a,d,e,f,g,h,i,j=wpLink.textarea;j&&(a=wpLink.getAttrs(),d=m.text.val(),a.href&&(e=wpLink.buildHtml(a),document.selection&&wpLink.range?(j.focus(),wpLink.range.text=e+(d||wpLink.range.text)+"</a>",wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select(),wpLink.range=null):"undefined"!=typeof j.selectionStart&&(f=j.selectionStart,g=j.selectionEnd,i=d||j.value.substring(f,g),e=e+i+"</a>",h=f+e.length,f!==g||i||(h-=4),j.value=j.value.substring(0,f)+e+j.value.substring(g,j.value.length),j.selectionStart=j.selectionEnd=h),wpLink.close(),j.focus(),c.a11y.speak(b.linkInserted)))},mceUpdate:function(){var a,f,g=wpLink.getAttrs();return window.tinymce.isIE&&e.windowManager.wplinkBookmark&&(e.selection.moveToBookmark(e.windowManager.wplinkBookmark),e.windowManager.wplinkBookmark=null),g.href?(a=d(),m.wrap.hasClass("has-text-field")&&(f=m.text.val()||g.href),a?(f&&("innerText"in a?a.innerText=f:a.textContent=f),g["data-wplink-edit"]=null,e.dom.setAttribs(a,g)):f?e.selection.setNode(e.dom.create("a",g,e.dom.encode(f))):e.execCommand("mceInsertLink",!1,g),wpLink.close("noReset"),e.focus(),e.nodeChanged(),a&&e.plugins.wplink&&e.plugins.wplink.checkLink(a),void c.a11y.speak(b.linkInserted)):(e.execCommand("unlink"),void wpLink.close())},updateFields:function(a,b){m.url.val(b.children(".item-permalink").val())},getUrlFromSelection:function(b){return b||(this.isMCE()?b=e.selection.getContent({format:"text"}):document.selection&&wpLink.range?b=wpLink.range.text:"undefined"!=typeof this.textarea.selectionStart&&(b=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd))),b=a.trim(b),b&&k.test(b)?"mailto:"+b:b&&l.test(b)?b.replace(/&amp;|&#0?38;/gi,"&"):""},setDefaultValues:function(a){m.url.val(this.getUrlFromSelection(a)),m.search.val(""),wpLink.searchInternalLinks(),m.submit.val(b.save)},searchInternalLinks:function(){var a,b=m.search.val()||"";if(b.length>2){if(n.recent.hide(),n.search.show(),wpLink.lastSearch==b)return;wpLink.lastSearch=b,a=m.search.parent().find(".spinner").addClass("is-active"),n.search.change(b),n.search.ajax(function(){a.removeClass("is-active")})}else n.search.hide(),n.recent.show()},next:function(){n.search.next(),n.recent.next()},prev:function(){n.search.prev(),n.recent.prev()},keydown:function(a){var b,c;27===a.keyCode?(wpLink.close(),a.stopImmediatePropagation()):9===a.keyCode&&(c=a.target.id,"wp-link-submit"!==c||a.shiftKey?"wp-link-close"===c&&a.shiftKey&&(m.submit.focus(),a.preventDefault()):(m.close.focus(),a.preventDefault())),38!==a.keyCode&&40!==a.keyCode||(!document.activeElement||"link-title-field"!==document.activeElement.id&&"url-field"!==document.activeElement.id)&&(b=38===a.keyCode?"prev":"next",clearInterval(wpLink.keyInterval),wpLink[b](),wpLink.keyInterval=setInterval(wpLink[b],wpLink.keySensitivity),a.preventDefault())},keyup:function(a){38!==a.keyCode&&40!==a.keyCode||(clearInterval(wpLink.keyInterval),a.preventDefault())},delayedCallback:function(a,b){var c,d,e,f;return b?(setTimeout(function(){return d?a.apply(f,e):void(c=!0)},b),function(){return c?a.apply(this,arguments):(e=arguments,f=this,void(d=!0))}):a}},g=function(b,c){var d=this;this.element=b,this.ul=b.children("ul"),this.contentHeight=b.children("#link-selector-height"),this.waiting=b.find(".river-waiting"),this.change(c),this.refresh(),a("#wp-link .query-results, #wp-link #link-selector").scroll(function(){d.maybeLoad()}),b.on("click","li",function(b){d.select(a(this),b)})},a.extend(g.prototype,{refresh:function(){this.deselect(),this.visible=this.element.is(":visible")},show:function(){this.visible||(this.deselect(),this.element.show(),this.visible=!0)},hide:function(){this.element.hide(),this.visible=!1},select:function(a,b){var c,d,e,f;a.hasClass("unselectable")||a==this.selected||(this.deselect(),this.selected=a.addClass("selected"),c=a.outerHeight(),d=this.element.height(),e=a.position().top,f=this.element.scrollTop(),e<0?this.element.scrollTop(f+e):e+c>d&&this.element.scrollTop(f+e-d+c),this.element.trigger("river-select",[a,b,this]))},deselect:function(){this.selected&&this.selected.removeClass("selected"),this.selected=!1},prev:function(){if(this.visible){var a;this.selected&&(a=this.selected.prev("li"),a.length&&this.select(a))}},next:function(){if(this.visible){var b=this.selected?this.selected.next("li"):a("li:not(.unselectable):first",this.element);b.length&&this.select(b)}},ajax:function(a){var b=this,c=1==this.query.page?0:wpLink.minRiverAJAXDuration,d=wpLink.delayedCallback(function(c,d){b.process(c,d),a&&a(c,d)},c);this.query.ajax(d)},change:function(a){this.query&&this._search==a||(this._search=a,this.query=new h(a),this.element.scrollTop(0))},process:function(c,d){var e="",f=!0,g="",h=1==d.page;c?a.each(c,function(){g=f?"alternate":"",g+=this.title?"":" no-title",e+=g?'<li class="'+g+'">':"<li>",e+='<input type="hidden" class="item-permalink" value="'+this.permalink+'" />',e+='<span class="item-title">',e+=this.title?this.title:b.noTitle,e+='</span><span class="item-info">'+this.info+"</span></li>",f=!f}):h&&(e+='<li class="unselectable no-matches-found"><span class="item-title"><em>'+b.noMatchesFound+"</em></span></li>"),this.ul[h?"html":"append"](e)},maybeLoad:function(){var a=this,b=this.element,c=b.scrollTop()+b.height();!this.query.ready()||c<this.contentHeight.height()-wpLink.riverBottomThreshold||setTimeout(function(){var c=b.scrollTop(),d=c+b.height();!a.query.ready()||d<a.contentHeight.height()-wpLink.riverBottomThreshold||(a.waiting.addClass("is-active"),b.scrollTop(c+a.waiting.outerHeight()),a.ajax(function(){a.waiting.removeClass("is-active")}))},wpLink.timeToTriggerRiver)}}),h=function(a){this.page=1,this.allLoaded=!1,this.querying=!1,this.search=a},a.extend(h.prototype,{ready:function(){return!(this.querying||this.allLoaded)},ajax:function(b){var c=this,d={action:"wp-link-ajax",page:this.page,_ajax_linking_nonce:m.nonce.val()};this.search&&(d.search=this.search),this.querying=!0,a.post(window.ajaxurl,d,function(a){c.page++,c.querying=!1,c.allLoaded=!a,b(a,d)},"json")}}),a(document).ready(wpLink.init)}(jQuery,window.wpLinkL10n,window.wp);
\ No newline at end of file
index b16a128e22837ebad28cab82da24aa4337374be1..8be3f79d565bfb7fc07facd73e417828bc7d32cb 100644 (file)
@@ -34,8 +34,9 @@
 /**
  * You can override this in a plugin.
  *
- * The wp_kses_allowed_html filter is more powerful and supplies context.
- * CUSTOM_TAGS is not recommended and should be considered deprecated.
+ * The {@see 'wp_kses_allowed_html'} filter is more powerful and supplies context.
+ *
+ * `CUSTOM_TAGS` is not recommended and should be considered deprecated.
  *
  * @see wp_kses_allowed_html()
  *
@@ -626,7 +627,7 @@ function wp_kses_allowed_html( $context = '' ) {
 
        if ( is_array( $context ) ) {
                /**
-                * Filter HTML elements allowed for a given context.
+                * Filters HTML elements allowed for a given context.
                 *
                 * @since 3.5.0
                 *
@@ -667,19 +668,19 @@ function wp_kses_allowed_html( $context = '' ) {
 /**
  * You add any kses hooks here.
  *
- * There is currently only one kses WordPress hook and it is called here. All
- * parameters are passed to the hooks and expected to receive a string.
+ * There is currently only one kses WordPress hook, {@see 'pre_kses'}, and it is called here.
+ * All parameters are passed to the hooks and expected to receive a string.
  *
  * @since 1.0.0
  *
  * @param string $string            Content to filter through kses
  * @param array  $allowed_html      List of allowed HTML elements
  * @param array  $allowed_protocols Allowed protocol in links
- * @return string Filtered content through 'pre_kses' hook
+ * @return string Filtered content through {@see 'pre_kses'} hook.
  */
 function wp_kses_hook( $string, $allowed_html, $allowed_protocols ) {
        /**
-        * Filter content to be run through kses.
+        * Filters content to be run through kses.
         *
         * @since 2.3.0
         *
@@ -1432,7 +1433,7 @@ function wp_kses_named_entities($matches) {
 /**
  * Callback for wp_kses_normalize_entities() regular expression.
  *
- * This function helps {@see wp_kses_normalize_entities()} to only accept 16-bit
+ * This function helps wp_kses_normalize_entities() to only accept 16-bit
  * values and nothing more for `&#number;` entities.
  *
  * @access private
@@ -1641,8 +1642,8 @@ function kses_init_filters() {
  * A quick procedural method to removing all of the filters that kses uses for
  * content in WordPress Loop.
  *
- * Does not remove the kses_init() function from 'init' hook (priority is
- * default). Also does not remove kses_init() function from 'set_current_user'
+ * Does not remove the kses_init() function from {@see 'init'} hook (priority is
+ * default). Also does not remove kses_init() function from {@see 'set_current_user'}
  * hook (priority is also default).
  *
  * @since 2.0.6
@@ -1664,8 +1665,8 @@ function kses_remove_filters() {
 /**
  * Sets up most of the Kses filters for input form content.
  *
- * If you remove the kses_init() function from 'init' hook and
- * 'set_current_user' (priority is default), then none of the Kses filter hooks
+ * If you remove the kses_init() function from {@see 'init'} hook and
+ * {@see 'set_current_user'} (priority is default), then none of the Kses filter hooks
  * will be added.
  *
  * First removes all of the Kses filters in case the current user does not need
@@ -1704,23 +1705,84 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
        $css_array = explode( ';', trim( $css ) );
 
        /**
-        * Filter list of allowed CSS attributes.
+        * Filters list of allowed CSS attributes.
         *
         * @since 2.8.1
+        * @since 4.4.0 Added support for `min-height`, `max-height`, `min-width`, and `max-width`.
+        * @since 4.6.0 Added support for `list-style-type`.
         *
         * @param array $attr List of allowed CSS attributes.
         */
-       $allowed_attr = apply_filters( 'safe_style_css', array( 'text-align', 'margin', 'color', 'float',
-       'border', 'background', 'background-color', 'border-bottom', 'border-bottom-color',
-       'border-bottom-style', 'border-bottom-width', 'border-collapse', 'border-color', 'border-left',
-       'border-left-color', 'border-left-style', 'border-left-width', 'border-right', 'border-right-color',
-       'border-right-style', 'border-right-width', 'border-spacing', 'border-style', 'border-top',
-       'border-top-color', 'border-top-style', 'border-top-width', 'border-width', 'caption-side',
-       'clear', 'cursor', 'direction', 'font', 'font-family', 'font-size', 'font-style',
-       'font-variant', 'font-weight', 'height', 'min-height','max-height' , 'letter-spacing', 'line-height', 'margin-bottom',
-       'margin-left', 'margin-right', 'margin-top', 'overflow', 'padding', 'padding-bottom',
-       'padding-left', 'padding-right', 'padding-top', 'text-decoration', 'text-indent', 'vertical-align',
-       'width', 'min-width', 'max-width' ) );
+       $allowed_attr = apply_filters( 'safe_style_css', array(
+               'background',
+               'background-color',
+
+               'border',
+               'border-width',
+               'border-color',
+               'border-style',
+               'border-right',
+               'border-right-color',
+               'border-right-style',
+               'border-right-width',
+               'border-bottom',
+               'border-bottom-color',
+               'border-bottom-style',
+               'border-bottom-width',
+               'border-left',
+               'border-left-color',
+               'border-left-style',
+               'border-left-width',
+               'border-top',
+               'border-top-color',
+               'border-top-style',
+               'border-top-width',
+
+               'border-spacing',
+               'border-collapse',
+               'caption-side',
+
+               'color',
+               'font',
+               'font-family',
+               'font-size',
+               'font-style',
+               'font-variant',
+               'font-weight',
+               'letter-spacing',
+               'line-height',
+               'text-decoration',
+               'text-indent',
+               'text-align',
+
+               'height',
+               'min-height',
+               'max-height',
+
+               'width',
+               'min-width',
+               'max-width',
+
+               'margin',
+               'margin-right',
+               'margin-bottom',
+               'margin-left',
+               'margin-top',
+
+               'padding',
+               'padding-right',
+               'padding-bottom',
+               'padding-left',
+               'padding-top',
+
+               'clear',
+               'cursor',
+               'direction',
+               'float',
+               'overflow',
+               'vertical-align',
+               'list-style-type',
+       ) );
 
        if ( empty($allowed_attr) )
                return $css;
index bfc659897ec0d6e14565e7388ff99833653a23bf..c63777451cd17ad7a37ced382658a29325d8fd52 100644 (file)
@@ -32,7 +32,7 @@ function get_locale() {
 
        if ( isset( $locale ) ) {
                /**
-                * Filter WordPress install's locale ID.
+                * Filters WordPress install's locale ID.
                 *
                 * @since 1.5.0
                 *
@@ -94,7 +94,7 @@ function translate( $text, $domain = 'default' ) {
        $translations = $translations->translate( $text );
 
        /**
-        * Filter text with its translation.
+        * Filters text with its translation.
         *
         * @since 2.0.11
         *
@@ -145,7 +145,7 @@ function translate_with_gettext_context( $text, $context, $domain = 'default' )
        $translations = get_translations_for_domain( $domain );
        $translations = $translations->translate( $text, $context );
        /**
-        * Filter text with its translation based on context information.
+        * Filters text with its translation based on context information.
         *
         * @since 2.8.0
         *
@@ -334,7 +334,7 @@ function _n( $single, $plural, $number, $domain = 'default' ) {
        $translation = $translations->translate_plural( $single, $plural, $number );
 
        /**
-        * Filter the singular or plural form of a string.
+        * Filters the singular or plural form of a string.
         *
         * @since 2.2.0
         *
@@ -374,7 +374,7 @@ function _nx($single, $plural, $number, $context, $domain = 'default') {
        $translation = $translations->translate_plural( $single, $plural, $number, $context );
 
        /**
-        * Filter the singular or plural form of a string with gettext context.
+        * Filters the singular or plural form of a string with gettext context.
         *
         * @since 2.8.0
         *
@@ -509,27 +509,32 @@ function translate_nooped_plural( $nooped_plural, $count, $domain = 'default' )
  *
  * @since 1.5.0
  *
- * @global array $l10n
+ * @global array $l10n          An array of all currently loaded text domains.
+ * @global array $l10n_unloaded An array of all text domains that have been unloaded again.
  *
  * @param string $domain Text domain. Unique identifier for retrieving translated strings.
  * @param string $mofile Path to the .mo file.
  * @return bool True on success, false on failure.
  */
 function load_textdomain( $domain, $mofile ) {
-       global $l10n;
+       global $l10n, $l10n_unloaded;
+
+       $l10n_unloaded = (array) $l10n_unloaded;
 
        /**
-        * Filter text domain and/or MO file path for loading translations.
+        * Filters whether to override the .mo file loading.
         *
         * @since 2.9.0
         *
-        * @param bool   $override Whether to override the text domain. Default false.
+        * @param bool   $override Whether to override the .mo file loading. Default false.
         * @param string $domain   Text domain. Unique identifier for retrieving translated strings.
         * @param string $mofile   Path to the MO file.
         */
        $plugin_override = apply_filters( 'override_load_textdomain', false, $domain, $mofile );
 
        if ( true == $plugin_override ) {
+               unset( $l10n_unloaded[ $domain ] );
+
                return true;
        }
 
@@ -544,7 +549,7 @@ function load_textdomain( $domain, $mofile ) {
        do_action( 'load_textdomain', $domain, $mofile );
 
        /**
-        * Filter MO file path for loading translations for a specific text domain.
+        * Filters MO file path for loading translations for a specific text domain.
         *
         * @since 2.9.0
         *
@@ -561,6 +566,8 @@ function load_textdomain( $domain, $mofile ) {
        if ( isset( $l10n[$domain] ) )
                $mo->merge_with( $l10n[$domain] );
 
+       unset( $l10n_unloaded[ $domain ] );
+
        $l10n[$domain] = &$mo;
 
        return true;
@@ -571,26 +578,32 @@ function load_textdomain( $domain, $mofile ) {
  *
  * @since 3.0.0
  *
- * @global array $l10n
+ * @global array $l10n          An array of all currently loaded text domains.
+ * @global array $l10n_unloaded An array of all text domains that have been unloaded again.
  *
  * @param string $domain Text domain. Unique identifier for retrieving translated strings.
  * @return bool Whether textdomain was unloaded.
  */
 function unload_textdomain( $domain ) {
-       global $l10n;
+       global $l10n, $l10n_unloaded;
+
+       $l10n_unloaded = (array) $l10n_unloaded;
 
        /**
-        * Filter the text domain for loading translation.
+        * Filters whether to override the text domain unloading.
         *
         * @since 3.0.0
         *
-        * @param bool   $override Whether to override unloading the text domain. Default false.
+        * @param bool   $override Whether to override the text domain unloading. Default false.
         * @param string $domain   Text domain. Unique identifier for retrieving translated strings.
         */
        $plugin_override = apply_filters( 'override_unload_textdomain', false, $domain );
 
-       if ( $plugin_override )
+       if ( $plugin_override ) {
+               $l10n_unloaded[ $domain ] = true;
+
                return true;
+       }
 
        /**
         * Fires before the text domain is unloaded.
@@ -603,6 +616,9 @@ function unload_textdomain( $domain ) {
 
        if ( isset( $l10n[$domain] ) ) {
                unset( $l10n[$domain] );
+
+               $l10n_unloaded[ $domain ] = true;
+
                return true;
        }
 
@@ -619,7 +635,7 @@ function unload_textdomain( $domain ) {
  *
  * @since 1.5.0
  *
- * @param string $locale Optional. Locale to load. Default is the value of {@see get_locale()}.
+ * @param string $locale Optional. Locale to load. Default is the value of get_locale().
  * @return bool Whether the textdomain was loaded.
  */
 function load_default_textdomain( $locale = null ) {
@@ -648,74 +664,76 @@ function load_default_textdomain( $locale = null ) {
 }
 
 /**
- * Load a plugin's translated strings.
+ * Loads a plugin's translated strings.
  *
  * If the path is not given then it will be the root of the plugin directory.
  *
  * The .mo file should be named based on the text domain with a dash, and then the locale exactly.
  *
  * @since 1.5.0
+ * @since 4.6.0 The function now tries to load the .mo file from the languages directory first.
  *
  * @param string $domain          Unique identifier for retrieving translated strings
- * @param string $deprecated      Use the $plugin_rel_path parameter instead.
+ * @param string $deprecated      Optional. Use the $plugin_rel_path parameter instead. Defaukt false.
  * @param string $plugin_rel_path Optional. Relative path to WP_PLUGIN_DIR where the .mo file resides.
  *                                Default false.
  * @return bool True when textdomain is successfully loaded, false otherwise.
  */
 function load_plugin_textdomain( $domain, $deprecated = false, $plugin_rel_path = false ) {
-       $locale = get_locale();
        /**
-        * Filter a plugin's locale.
+        * Filters a plugin's locale.
         *
         * @since 3.0.0
         *
         * @param string $locale The plugin's current locale.
         * @param string $domain Text domain. Unique identifier for retrieving translated strings.
         */
-       $locale = apply_filters( 'plugin_locale', $locale, $domain );
+       $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
+
+       $mofile = $domain . '-' . $locale . '.mo';
 
-       if ( false !== $plugin_rel_path ) {
+       // Try to load from the languages directory first.
+       if ( load_textdomain( $domain, WP_LANG_DIR . '/plugins/' . $mofile ) ) {
+               return true;
+       }
+
+       if ( false !== $plugin_rel_path ) {
                $path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/' );
        } elseif ( false !== $deprecated ) {
-               _deprecated_argument( __FUNCTION__, '2.7' );
+               _deprecated_argument( __FUNCTION__, '2.7.0' );
                $path = ABSPATH . trim( $deprecated, '/' );
        } else {
                $path = WP_PLUGIN_DIR;
        }
 
-       // Load the textdomain according to the plugin first
-       $mofile = $domain . '-' . $locale . '.mo';
-       if ( $loaded = load_textdomain( $domain, $path . '/'. $mofile ) )
-               return $loaded;
-
-       // Otherwise, load from the languages directory
-       $mofile = WP_LANG_DIR . '/plugins/' . $mofile;
-       return load_textdomain( $domain, $mofile );
+       return load_textdomain( $domain, $path . '/' . $mofile );
 }
 
 /**
  * Load the translated strings for a plugin residing in the mu-plugins directory.
  *
  * @since 3.0.0
+ * @since 4.6.0 The function now tries to load the .mo file from the languages directory first.
  *
  * @param string $domain             Text domain. Unique identifier for retrieving translated strings.
- * @param string $mu_plugin_rel_path Relative to WPMU_PLUGIN_DIR directory in which the .mo file resides.
- *                                   Default empty string.
+ * @param string $mu_plugin_rel_path Optional. Relative to `WPMU_PLUGIN_DIR` directory in which the .mo
+ *                                   file resides. Default empty string.
  * @return bool True when textdomain is successfully loaded, false otherwise.
  */
 function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) {
        /** This filter is documented in wp-includes/l10n.php */
        $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
-       $path = trailingslashit( WPMU_PLUGIN_DIR . '/' . ltrim( $mu_plugin_rel_path, '/' ) );
 
-       // Load the textdomain according to the plugin first
        $mofile = $domain . '-' . $locale . '.mo';
-       if ( $loaded = load_textdomain( $domain, $path . $mofile ) )
-               return $loaded;
 
-       // Otherwise, load from the languages directory
-       $mofile = WP_LANG_DIR . '/plugins/' . $mofile;
-       return load_textdomain( $domain, $mofile );
+       // Try to load from the languages directory first.
+       if ( load_textdomain( $domain, WP_LANG_DIR . '/plugins/' . $mofile ) ) {
+               return true;
+       }
+
+       $path = trailingslashit( WPMU_PLUGIN_DIR . '/' . ltrim( $mu_plugin_rel_path, '/' ) );
+
+       return load_textdomain( $domain, $path . '/' . $mofile );
 }
 
 /**
@@ -727,6 +745,7 @@ function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) {
  * The .mo files must be named based on the locale exactly.
  *
  * @since 1.5.0
+ * @since 4.6.0 The function now tries to load the .mo file from the languages directory first.
  *
  * @param string $domain Text domain. Unique identifier for retrieving translated strings.
  * @param string $path   Optional. Path to the directory containing the .mo file.
@@ -734,28 +753,28 @@ function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) {
  * @return bool True when textdomain is successfully loaded, false otherwise.
  */
 function load_theme_textdomain( $domain, $path = false ) {
-       $locale = get_locale();
        /**
-        * Filter a theme's locale.
+        * Filters a theme's locale.
         *
         * @since 3.0.0
         *
         * @param string $locale The theme's current locale.
         * @param string $domain Text domain. Unique identifier for retrieving translated strings.
         */
-       $locale = apply_filters( 'theme_locale', $locale, $domain );
+       $locale = apply_filters( 'theme_locale', get_locale(), $domain );
 
-       if ( ! $path )
-               $path = get_template_directory();
+       $mofile = $domain . '-' . $locale . '.mo';
 
-       // Load the textdomain according to the theme
-       $mofile = untrailingslashit( $path ) . "/{$locale}.mo";
-       if ( $loaded = load_textdomain( $domain, $mofile ) )
-               return $loaded;
+       // Try to load from the languages directory first.
+       if ( load_textdomain( $domain, WP_LANG_DIR . '/themes/' . $mofile ) ) {
+               return true;
+       }
 
-       // Otherwise, load from the languages directory
-       $mofile = WP_LANG_DIR . "/themes/{$domain}-{$locale}.mo";
-       return load_textdomain( $domain, $mofile );
+       if ( ! $path ) {
+               $path = get_template_directory();
+       }
+
+       return load_textdomain( $domain, $path . '/' . $locale . '.mo' );
 }
 
 /**
@@ -779,6 +798,65 @@ function load_child_theme_textdomain( $domain, $path = false ) {
        return load_theme_textdomain( $domain, $path );
 }
 
+/**
+ * Loads plugin and theme textdomains just-in-time.
+ *
+ * When a textdomain is encountered for the first time, we try to load
+ * the translation file from `wp-content/languages`, removing the need
+ * to call load_plugin_texdomain() or load_theme_texdomain().
+ *
+ * Holds a cached list of available .mo files to improve performance.
+ *
+ * @since 4.6.0
+ * @access private
+ *
+ * @see get_translations_for_domain()
+ * @global array $l10n_unloaded An array of all text domains that have been unloaded again.
+ *
+ * @param string $domain Text domain. Unique identifier for retrieving translated strings.
+ * @return bool True when the textdomain is successfully loaded, false otherwise.
+ */
+function _load_textdomain_just_in_time( $domain ) {
+       global $l10n_unloaded;
+
+       $l10n_unloaded = (array) $l10n_unloaded;
+
+       static $cached_mofiles = null;
+
+       // Short-circuit if domain is 'default' which is reserved for core.
+       if ( 'default' === $domain || isset( $l10n_unloaded[ $domain ] ) ) {
+               return false;
+       }
+
+       if ( null === $cached_mofiles ) {
+               $cached_mofiles = array();
+
+               $locations = array(
+                       WP_LANG_DIR . '/plugins',
+                       WP_LANG_DIR . '/themes',
+               );
+
+               foreach ( $locations as $location ) {
+                       foreach ( get_available_languages( $location ) as $file ) {
+                               $cached_mofiles[] = "{$location}/{$file}.mo";
+                       }
+               }
+       }
+
+       $locale = get_locale();
+       $mofile = "{$domain}-{$locale}.mo";
+
+       if ( in_array( WP_LANG_DIR . '/plugins/' . $mofile, $cached_mofiles ) ) {
+               return load_textdomain( $domain, WP_LANG_DIR . '/plugins/' . $mofile );
+       }
+
+       if ( in_array( WP_LANG_DIR . '/themes/' . $mofile, $cached_mofiles ) ) {
+               return load_textdomain( $domain, WP_LANG_DIR . '/themes/' . $mofile );
+       }
+
+       return false;
+}
+
 /**
  * Return the Translations instance for a text domain.
  *
@@ -793,7 +871,7 @@ function load_child_theme_textdomain( $domain, $path = false ) {
  */
 function get_translations_for_domain( $domain ) {
        global $l10n;
-       if ( isset( $l10n[ $domain ] ) ) {
+       if ( isset( $l10n[ $domain ] ) || ( _load_textdomain_just_in_time( $domain ) && isset( $l10n[ $domain ] ) ) ) {
                return $l10n[ $domain ];
        }
 
index 11c4e400227d20207364ee8677ba33b18e0da2ae..9d7a5f6c04c9d8476dd5f284d1daa080452a12da 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 /**
- * Display the permalink for the current post.
+ * Displays the permalink for the current post.
  *
  * @since 1.2.0
  * @since 4.4.0 Added the `$post` parameter.
@@ -16,7 +16,7 @@
  */
 function the_permalink( $post = 0 ) {
        /**
-        * Filter the display of the permalink for the current post.
+        * Filters the display of the permalink for the current post.
         *
         * @since 1.5.0
         * @since 4.4.0 Added the `$post` parameter.
@@ -28,18 +28,20 @@ function the_permalink( $post = 0 ) {
 }
 
 /**
- * Retrieve trailing slash string, if site is set for adding trailing slashes.
+ * Retrieves a trailing-slashed string if the site is set for adding trailing slashes.
  *
  * Conditionally adds a trailing slash if the permalink structure has a trailing
  * slash, strips the trailing slash if not. The string is passed through the
- * 'user_trailingslashit' filter. Will remove trailing slash from string, if
+ * {@see 'user_trailingslashit'} filter. Will remove trailing slash from string, if
  * site is not set to have them.
  *
  * @since 2.2.0
+ *
  * @global WP_Rewrite $wp_rewrite
  *
- * @param string $string URL with or without a trailing slash.
- * @param string $type_of_url The type of URL being considered (e.g. single, category, etc) for use in the filter.
+ * @param string $string      URL with or without a trailing slash.
+ * @param string $type_of_url Optional. The type of URL being considered (e.g. single, category, etc)
+ *                            for use in the filter. Default empty string.
  * @return string The URL with the trailing slash appended or stripped.
  */
 function user_trailingslashit($string, $type_of_url = '') {
@@ -50,8 +52,7 @@ function user_trailingslashit($string, $type_of_url = '') {
                $string = untrailingslashit($string);
 
        /**
-        * Filter the trailing slashed string, depending on whether the site is set
-        * to use training slashes.
+        * Filters the trailing-slashed string, depending on whether the site is set to use trailing slashes.
         *
         * @since 2.2.0
         *
@@ -64,14 +65,14 @@ function user_trailingslashit($string, $type_of_url = '') {
 }
 
 /**
- * Display permalink anchor for current post.
+ * Displays the permalink anchor for the current post.
  *
  * The permalink mode title will use the post title for the 'a' element 'id'
  * attribute. The id mode uses 'post-' with the post ID for the 'id' attribute.
  *
  * @since 0.71
  *
- * @param string $mode Permalink mode can be either 'title', 'id', or default, which is 'id'.
+ * @param string $mode Optional. Permalink mode. Accepts 'title' or 'id'. Default 'id'.
  */
 function permalink_anchor( $mode = 'id' ) {
        $post = get_post();
@@ -88,7 +89,7 @@ function permalink_anchor( $mode = 'id' ) {
 }
 
 /**
- * Retrieve full permalink for current post or post ID.
+ * Retrieves the full permalink for the current post or post ID.
  *
  * This function is an alias for get_permalink().
  *
@@ -106,7 +107,7 @@ function get_the_permalink( $post = 0, $leavename = false ) {
 }
 
 /**
- * Retrieve full permalink for current post or post ID.
+ * Retrieves the full permalink for the current post or post ID.
  *
  * @since 1.0.0
  *
@@ -149,7 +150,7 @@ function get_permalink( $post = 0, $leavename = false ) {
        $permalink = get_option('permalink_structure');
 
        /**
-        * Filter the permalink structure for a post before token replacement occurs.
+        * Filters the permalink structure for a post before token replacement occurs.
         *
         * Only applies to posts with post_type of 'post'.
         *
@@ -171,7 +172,7 @@ function get_permalink( $post = 0, $leavename = false ) {
                                usort($cats, '_usort_terms_by_ID'); // order by ID
 
                                /**
-                                * Filter the category that gets used in the %category% permalink token.
+                                * Filters the category that gets used in the %category% permalink token.
                                 *
                                 * @since 3.5.0
                                 *
@@ -190,7 +191,9 @@ function get_permalink( $post = 0, $leavename = false ) {
                        // having to assign it explicitly
                        if ( empty($category) ) {
                                $default_category = get_term( get_option( 'default_category' ), 'category' );
-                               $category = is_wp_error( $default_category ) ? '' : $default_category->slug;
+                               if ( $default_category && ! is_wp_error( $default_category ) ) {
+                                       $category = $default_category->slug;
+                               }
                        }
                }
 
@@ -222,7 +225,7 @@ function get_permalink( $post = 0, $leavename = false ) {
        }
 
        /**
-        * Filter the permalink for a post.
+        * Filters the permalink for a post.
         *
         * Only applies to posts with post_type of 'post'.
         *
@@ -236,15 +239,15 @@ function get_permalink( $post = 0, $leavename = false ) {
 }
 
 /**
- * Retrieve the permalink for a post with a custom post type.
+ * Retrieves the permalink for a post of a custom post type.
  *
  * @since 3.0.0
  *
  * @global WP_Rewrite $wp_rewrite
  *
- * @param int $id         Optional. Post ID.
- * @param bool $leavename Optional, defaults to false. Whether to keep post name.
- * @param bool $sample    Optional, defaults to false. Is it a sample permalink.
+ * @param int $id         Optional. Post ID. Default uses the global `$post`.
+ * @param bool $leavename Optional, defaults to false. Whether to keep post name. Default false.
+ * @param bool $sample    Optional, defaults to false. Is it a sample permalink. Default false.
  * @return string|WP_Error The post permalink.
  */
 function get_post_permalink( $id = 0, $leavename = false, $sample = false ) {
@@ -281,7 +284,7 @@ function get_post_permalink( $id = 0, $leavename = false, $sample = false ) {
        }
 
        /**
-        * Filter the permalink for a post with a custom post type.
+        * Filters the permalink for a post of a custom post type.
         *
         * @since 3.0.0
         *
@@ -294,15 +297,16 @@ function get_post_permalink( $id = 0, $leavename = false, $sample = false ) {
 }
 
 /**
- * Retrieve the permalink for current page or page ID.
+ * Retrieves the permalink for the current page or page ID.
  *
  * Respects page_on_front. Use this one.
  *
  * @since 1.5.0
  *
- * @param int|object $post      Optional. Post ID or object.
- * @param bool       $leavename Optional, defaults to false. Whether to keep page name.
- * @param bool       $sample    Optional, defaults to false. Is it a sample permalink.
+ * @param int|WP_Post $post      Optional. Post ID or object. Default uses the global `$post`.
+ * @param bool        $leavename Optional. Whether to keep the page name. Default false.
+ * @param bool        $sample    Optional. Whether it should be treated as a sample permalink.
+ *                               Default false.
  * @return string The page permalink.
  */
 function get_page_link( $post = false, $leavename = false, $sample = false ) {
@@ -314,7 +318,7 @@ function get_page_link( $post = false, $leavename = false, $sample = false ) {
                $link = _get_page_link( $post, $leavename, $sample );
 
        /**
-        * Filter the permalink for a page.
+        * Filters the permalink for a page.
         *
         * @since 1.5.0
         *
@@ -326,7 +330,7 @@ function get_page_link( $post = false, $leavename = false, $sample = false ) {
 }
 
 /**
- * Retrieve the page permalink.
+ * Retrieves the page permalink.
  *
  * Ignores page_on_front. Internal use only.
  *
@@ -335,9 +339,10 @@ function get_page_link( $post = false, $leavename = false, $sample = false ) {
  *
  * @global WP_Rewrite $wp_rewrite
  *
- * @param int|object $post      Optional. Post ID or object.
- * @param bool       $leavename Optional. Leave name.
- * @param bool       $sample    Optional. Sample permalink.
+ * @param int|WP_Post $post      Optional. Post ID or object. Default uses the global `$post`.
+ * @param bool        $leavename Optional. Whether to keep the page name. Default false.
+ * @param bool        $sample    Optional. Whether it should be treated as a sample permalink.
+ *                               Default false.
  * @return string The page permalink.
  */
 function _get_page_link( $post = false, $leavename = false, $sample = false ) {
@@ -361,7 +366,7 @@ function _get_page_link( $post = false, $leavename = false, $sample = false ) {
        }
 
        /**
-        * Filter the permalink for a non-page_on_front page.
+        * Filters the permalink for a non-page_on_front page.
         *
         * @since 2.1.0
         *
@@ -372,7 +377,7 @@ function _get_page_link( $post = false, $leavename = false, $sample = false ) {
 }
 
 /**
- * Retrieve permalink for attachment.
+ * Retrieves the permalink for an attachment.
  *
  * This can be used in the WordPress Loop or outside of it.
  *
@@ -380,8 +385,8 @@ function _get_page_link( $post = false, $leavename = false, $sample = false ) {
  *
  * @global WP_Rewrite $wp_rewrite
  *
- * @param int|object $post      Optional. Post ID or object.
- * @param bool       $leavename Optional. Leave name.
+ * @param int|object $post      Optional. Post ID or object. Default uses the global `$post`.
+ * @param bool       $leavename Optional. Whether to keep the page name. Default false.
  * @return string The attachment permalink.
  */
 function get_attachment_link( $post = null, $leavename = false ) {
@@ -419,7 +424,7 @@ function get_attachment_link( $post = null, $leavename = false ) {
                $link = home_url( '/?attachment_id=' . $post->ID );
 
        /**
-        * Filter the permalink for an attachment.
+        * Filters the permalink for an attachment.
         *
         * @since 2.0.0
         *
@@ -430,7 +435,7 @@ function get_attachment_link( $post = null, $leavename = false ) {
 }
 
 /**
- * Retrieve the permalink for the year archives.
+ * Retrieves the permalink for the year archives.
  *
  * @since 1.5.0
  *
@@ -439,7 +444,7 @@ function get_attachment_link( $post = null, $leavename = false ) {
  * @param int|bool $year False for current year or year for permalink.
  * @return string The permalink for the specified year archive.
  */
-function get_year_link($year) {
+function get_year_link( $year ) {
        global $wp_rewrite;
        if ( !$year )
                $year = gmdate('Y', current_time('timestamp'));
@@ -452,7 +457,7 @@ function get_year_link($year) {
        }
 
        /**
-        * Filter the year archive permalink.
+        * Filters the year archive permalink.
         *
         * @since 1.5.0
         *
@@ -463,7 +468,7 @@ function get_year_link($year) {
 }
 
 /**
- * Retrieve the permalink for the month archives with year.
+ * Retrieves the permalink for the month archives with year.
  *
  * @since 1.0.0
  *
@@ -489,7 +494,7 @@ function get_month_link($year, $month) {
        }
 
        /**
-        * Filter the month archive permalink.
+        * Filters the month archive permalink.
         *
         * @since 1.5.0
         *
@@ -501,7 +506,7 @@ function get_month_link($year, $month) {
 }
 
 /**
- * Retrieve the permalink for the day archives with year and month.
+ * Retrieves the permalink for the day archives with year and month.
  *
  * @since 1.0.0
  *
@@ -532,7 +537,7 @@ function get_day_link($year, $month, $day) {
        }
 
        /**
-        * Filter the day archive permalink.
+        * Filters the day archive permalink.
         *
         * @since 1.5.0
         *
@@ -545,18 +550,18 @@ function get_day_link($year, $month, $day) {
 }
 
 /**
- * Display the permalink for the feed type.
+ * Displays the permalink for the feed type.
  *
  * @since 3.0.0
  *
  * @param string $anchor The link's anchor text.
- * @param string $feed   Optional, defaults to default feed. Feed type.
+ * @param string $feed   Optional. Feed type. Default empty.
  */
 function the_feed_link( $anchor, $feed = '' ) {
        $link = '<a href="' . esc_url( get_feed_link( $feed ) ) . '">' . $anchor . '</a>';
 
        /**
-        * Filter the feed link anchor tag.
+        * Filters the feed link anchor tag.
         *
         * @since 3.0.0
         *
@@ -568,16 +573,16 @@ function the_feed_link( $anchor, $feed = '' ) {
 }
 
 /**
- * Retrieve the permalink for the feed type.
+ * Retrieves the permalink for the feed type.
  *
  * @since 1.5.0
  *
  * @global WP_Rewrite $wp_rewrite
  *
- * @param string $feed Optional, defaults to default feed. Feed type.
+ * @param string $feed Optional. Feed type. Default empty.
  * @return string The feed permalink.
  */
-function get_feed_link($feed = '') {
+function get_feed_link( $feed = '' ) {
        global $wp_rewrite;
 
        $permalink = $wp_rewrite->get_feed_permastruct();
@@ -604,7 +609,7 @@ function get_feed_link($feed = '') {
        }
 
        /**
-        * Filter the feed type permalink.
+        * Filters the feed type permalink.
         *
         * @since 1.5.0
         *
@@ -615,15 +620,15 @@ function get_feed_link($feed = '') {
 }
 
 /**
- * Retrieve the permalink for the post comments feed.
+ * Retrieves the permalink for the post comments feed.
  *
  * @since 2.2.0
  *
- * @param int    $post_id Optional. Post ID.
- * @param string $feed    Optional. Feed type.
+ * @param int    $post_id Optional. Post ID. Default is the ID of the global `$post`.
+ * @param string $feed    Optional. Feed type. Default empty.
  * @return string The permalink for the comments feed for the given post.
  */
-function get_post_comments_feed_link($post_id = 0, $feed = '') {
+function get_post_comments_feed_link( $post_id = 0, $feed = '' ) {
        $post_id = absint( $post_id );
 
        if ( ! $post_id )
@@ -664,7 +669,7 @@ function get_post_comments_feed_link($post_id = 0, $feed = '') {
        }
 
        /**
-        * Filter the post comments feed permalink.
+        * Filters the post comments feed permalink.
         *
         * @since 1.5.1
         *
@@ -674,7 +679,7 @@ function get_post_comments_feed_link($post_id = 0, $feed = '') {
 }
 
 /**
- * Display the comment feed link for a post.
+ * Displays the comment feed link for a post.
  *
  * Prints out the comment feed link for a post. Link text is placed in the
  * anchor. If no link text is specified, default text is used. If no post ID is
@@ -682,9 +687,9 @@ function get_post_comments_feed_link($post_id = 0, $feed = '') {
  *
  * @since 2.5.0
  *
- * @param string $link_text Descriptive text.
- * @param int    $post_id   Optional post ID. Default to current post.
- * @param string $feed      Optional. Feed format.
+ * @param string $link_text Optional. Descriptive link text. Default 'Comments Feed'.
+ * @param int    $post_id   Optional. Post ID. Default is the ID of the global `$post`.
+ * @param string $feed      Optional. Feed format. Default empty.
  */
 function post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' ) {
        $url = get_post_comments_feed_link( $post_id, $feed );
@@ -694,7 +699,7 @@ function post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' ) {
 
        $link = '<a href="' . esc_url( $url ) . '">' . $link_text . '</a>';
        /**
-        * Filter the post comment feed link anchor tag.
+        * Filters the post comment feed link anchor tag.
         *
         * @since 2.8.0
         *
@@ -706,15 +711,15 @@ function post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' ) {
 }
 
 /**
- * Retrieve the feed link for a given author.
+ * Retrieves the feed link for a given author.
  *
  * Returns a link to the feed for all posts by a given author. A specific feed
  * can be requested or left blank to get the default feed.
  *
  * @since 2.5.0
  *
- * @param int    $author_id ID of an author.
- * @param string $feed      Optional. Feed type.
+ * @param int    $author_id Author ID.
+ * @param string $feed      Optional. Feed type. Default empty.
  * @return string Link to the feed for the author specified by $author_id.
  */
 function get_author_feed_link( $author_id, $feed = '' ) {
@@ -737,7 +742,7 @@ function get_author_feed_link( $author_id, $feed = '' ) {
        }
 
        /**
-        * Filter the feed link for a given author.
+        * Filters the feed link for a given author.
         *
         * @since 1.5.1
         *
@@ -750,15 +755,15 @@ function get_author_feed_link( $author_id, $feed = '' ) {
 }
 
 /**
- * Retrieve the feed link for a category.
+ * Retrieves the feed link for a category.
  *
  * Returns a link to the feed for all posts in a given category. A specific feed
  * can be requested or left blank to get the default feed.
  *
  * @since 2.5.0
  *
- * @param int    $cat_id ID of a category.
- * @param string $feed   Optional. Feed type.
+ * @param int    $cat_id Category ID.
+ * @param string $feed   Optional. Feed type. Default empty.
  * @return string Link to the feed for the category specified by $cat_id.
  */
 function get_category_feed_link( $cat_id, $feed = '' ) {
@@ -766,16 +771,16 @@ function get_category_feed_link( $cat_id, $feed = '' ) {
 }
 
 /**
- * Retrieve the feed link for a term.
+ * Retrieves the feed link for a term.
  *
  * Returns a link to the feed for all posts in a given term. A specific feed
  * can be requested or left blank to get the default feed.
  *
  * @since 3.0.0
  *
- * @param int    $term_id  ID of a category.
- * @param string $taxonomy Optional. Taxonomy of $term_id
- * @param string $feed     Optional. Feed type.
+ * @param int    $term_id  Term ID.
+ * @param string $taxonomy Optional. Taxonomy of `$term_id`. Default 'category'.
+ * @param string $feed     Optional. Feed type. Default empty.
  * @return string|false Link to the feed for the term specified by $term_id and $taxonomy.
  */
 function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) {
@@ -813,7 +818,7 @@ function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) {
 
        if ( 'category' == $taxonomy ) {
                /**
-                * Filter the category feed link.
+                * Filters the category feed link.
                 *
                 * @since 1.5.1
                 *
@@ -823,7 +828,7 @@ function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) {
                $link = apply_filters( 'category_feed_link', $link, $feed );
        } elseif ( 'post_tag' == $taxonomy ) {
                /**
-                * Filter the post tag feed link.
+                * Filters the post tag feed link.
                 *
                 * @since 2.3.0
                 *
@@ -833,7 +838,7 @@ function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) {
                $link = apply_filters( 'tag_feed_link', $link, $feed );
        } else {
                /**
-                * Filter the feed link for a taxonomy other than 'category' or 'post_tag'.
+                * Filters the feed link for a taxonomy other than 'category' or 'post_tag'.
                 *
                 * @since 3.0.0
                 *
@@ -848,12 +853,12 @@ function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) {
 }
 
 /**
- * Retrieve permalink for feed of tag.
+ * Retrieves the permalink for a tag feed.
  *
  * @since 2.3.0
  *
  * @param int    $tag_id Tag ID.
- * @param string $feed   Optional. Feed type.
+ * @param string $feed   Optional. Feed type. Default empty.
  * @return string The feed permalink for the given tag.
  */
 function get_tag_feed_link( $tag_id, $feed = '' ) {
@@ -861,17 +866,17 @@ function get_tag_feed_link( $tag_id, $feed = '' ) {
 }
 
 /**
- * Retrieve edit tag link.
+ * Retrieves the edit link for a tag.
  *
  * @since 2.7.0
  *
- * @param int    $tag_id   Tag ID
- * @param string $taxonomy Taxonomy
+ * @param int    $tag_id   Tag ID.
+ * @param string $taxonomy Optional. Taxonomy slug. Default 'post_tag'.
  * @return string The edit tag link URL for the given tag.
  */
 function get_edit_tag_link( $tag_id, $taxonomy = 'post_tag' ) {
        /**
-        * Filter the edit link for a tag (or term in another taxonomy).
+        * Filters the edit link for a tag (or term in another taxonomy).
         *
         * @since 2.7.0
         *
@@ -881,20 +886,21 @@ function get_edit_tag_link( $tag_id, $taxonomy = 'post_tag' ) {
 }
 
 /**
- * Display or retrieve edit tag link with formatting.
+ * Displays or retrieves the edit link for a tag with formatting.
  *
  * @since 2.7.0
  *
- * @param string $link   Optional. Anchor text.
- * @param string $before Optional. Display before edit link.
- * @param string $after  Optional. Display after edit link.
- * @param object $tag    Tag object.
+ * @param string  $link   Optional. Anchor text. Default empty.
+ * @param string  $before Optional. Display before edit link. Default empty.
+ * @param string  $after  Optional. Display after edit link. Default empty.
+ * @param WP_Term $tag    Optional. Term object. If null, the queried object will be inspected.
+ *                        Default null.
  */
 function edit_tag_link( $link = '', $before = '', $after = '', $tag = null ) {
        $link = edit_term_link( $link, '', '', $tag, false );
 
        /**
-        * Filter the anchor tag for the edit link for a tag (or term in another taxonomy).
+        * Filters the anchor tag for the edit link for a tag (or term in another taxonomy).
         *
         * @since 2.7.0
         *
@@ -910,9 +916,11 @@ function edit_tag_link( $link = '', $before = '', $after = '', $tag = null ) {
  * @since 4.5.0 The `$taxonomy` argument was made optional.
  *
  * @param int    $term_id     Term ID.
- * @param string $taxonomy    Optional. Taxonomy. Defaults to the taxonomy of the term identified by `$term_id`.
- * @param string $object_type Optional. The object type. Used to highlight the proper post type menu on the linked page.
- *                            Defaults to the first object_type associated with the taxonomy.
+ * @param string $taxonomy    Optional. Taxonomy. Defaults to the taxonomy of the term identified
+ *                            by `$term_id`.
+ * @param string $object_type Optional. The object type. Used to highlight the proper post type
+ *                            menu on the linked page. Defaults to the first object_type associated
+ *                            with the taxonomy.
  * @return string|null The edit term link URL for the given term, or null on failure.
  */
 function get_edit_term_link( $term_id, $taxonomy = '', $object_type = '' ) {
@@ -944,7 +952,7 @@ function get_edit_term_link( $term_id, $taxonomy = '', $object_type = '' ) {
        }
 
        /**
-        * Filter the edit link for a term.
+        * Filters the edit link for a term.
         *
         * @since 3.1.0
         *
@@ -957,7 +965,7 @@ function get_edit_term_link( $term_id, $taxonomy = '', $object_type = '' ) {
 }
 
 /**
- * Display or retrieve edit term link with formatting.
+ * Displays or retrieves the edit term link with formatting.
  *
  * @since 3.1.0
  *
@@ -985,7 +993,7 @@ function edit_term_link( $link = '', $before = '', $after = '', $term = null, $e
        $link = '<a href="' . get_edit_term_link( $term->term_id, $term->taxonomy ) . '">' . $link . '</a>';
 
        /**
-        * Filter the anchor tag for the edit link of a term.
+        * Filters the anchor tag for the edit link of a term.
         *
         * @since 3.1.0
         *
@@ -1001,13 +1009,13 @@ function edit_term_link( $link = '', $before = '', $after = '', $term = null, $e
 }
 
 /**
- * Retrieve permalink for search.
+ * Retrieves the permalink for a search.
  *
  * @since  3.0.0
  *
  * @global WP_Rewrite $wp_rewrite
  *
- * @param string $query Optional. The query string to use. If empty the current query is used.
+ * @param string $query Optional. The query string to use. If empty the current query is used. Default empty.
  * @return string The search permalink.
  */
 function get_search_link( $query = '' ) {
@@ -1030,7 +1038,7 @@ function get_search_link( $query = '' ) {
        }
 
        /**
-        * Filter the search permalink.
+        * Filters the search permalink.
         *
         * @since 3.0.0
         *
@@ -1041,14 +1049,14 @@ function get_search_link( $query = '' ) {
 }
 
 /**
- * Retrieve the permalink for the feed of the search results.
+ * Retrieves the permalink for the search results feed.
  *
  * @since 2.5.0
  *
  * @global WP_Rewrite $wp_rewrite
  *
- * @param string $search_query Optional. Search query.
- * @param string $feed         Optional. Feed type.
+ * @param string $search_query Optional. Search query. Default empty.
+ * @param string $feed         Optional. Feed type. Default empty.
  * @return string The search results feed permalink.
  */
 function get_search_feed_link($search_query = '', $feed = '') {
@@ -1068,7 +1076,7 @@ function get_search_feed_link($search_query = '', $feed = '') {
        }
 
        /**
-        * Filter the search feed link.
+        * Filters the search feed link.
         *
         * @since 2.5.0
         *
@@ -1080,14 +1088,14 @@ function get_search_feed_link($search_query = '', $feed = '') {
 }
 
 /**
- * Retrieve the permalink for the comments feed of the search results.
+ * Retrieves the permalink for the search results comments feed.
  *
  * @since 2.5.0
  *
  * @global WP_Rewrite $wp_rewrite
  *
- * @param string $search_query Optional. Search query.
- * @param string $feed         Optional. Feed type.
+ * @param string $search_query Optional. Search query. Default empty.
+ * @param string $feed         Optional. Feed type. Default empty.
  * @return string The comments feed search results permalink.
  */
 function get_search_comments_feed_link($search_query = '', $feed = '') {
@@ -1153,7 +1161,7 @@ function get_post_type_archive_link( $post_type ) {
        }
 
        /**
-        * Filter the post type archive permalink.
+        * Filters the post type archive permalink.
         *
         * @since 3.1.0
         *
@@ -1164,12 +1172,12 @@ function get_post_type_archive_link( $post_type ) {
 }
 
 /**
- * Retrieve the permalink for a post type archive feed.
+ * Retrieves the permalink for a post type archive feed.
  *
  * @since 3.1.0
  *
  * @param string $post_type Post type
- * @param string $feed      Optional. Feed type
+ * @param string $feed      Optional. Feed type. Default empty.
  * @return string|false The post type feed permalink.
  */
 function get_post_type_archive_feed_link( $post_type, $feed = '' ) {
@@ -1191,7 +1199,7 @@ function get_post_type_archive_feed_link( $post_type, $feed = '' ) {
        }
 
        /**
-        * Filter the post type archive feed link.
+        * Filters the post type archive feed link.
         *
         * @since 3.1.0
         *
@@ -1202,16 +1210,18 @@ function get_post_type_archive_feed_link( $post_type, $feed = '' ) {
 }
 
 /**
- * Retrieve URL used for the post preview.
+ * Retrieves the URL used for the post preview.
  *
- * Get the preview post URL. Allows additional query args to be appended.
+ * Allows additional query args to be appended.
  *
  * @since 4.4.0
  *
- * @param int|WP_Post $post         Optional. Post ID or `WP_Post` object. Defaults to global post.
+ * @param int|WP_Post $post         Optional. Post ID or `WP_Post` object. Defaults to global `$post`.
  * @param array       $query_args   Optional. Array of additional query args to be appended to the link.
- * @param string      $preview_link Optional. Base preview link to be used if it should differ from the post permalink.
- * @return string URL used for the post preview.
+ *                                  Default empty array.
+ * @param string      $preview_link Optional. Base preview link to be used if it should differ from the
+ *                                  post permalink. Default empty.
+ * @return string|null URL used for the post preview, or null if the post does not exist.
  */
 function get_preview_post_link( $post = null, $query_args = array(), $preview_link = '' ) {
        $post = get_post( $post );
@@ -1230,7 +1240,7 @@ function get_preview_post_link( $post = null, $query_args = array(), $preview_li
        }
 
        /**
-        * Filter the URL used for a post preview.
+        * Filters the URL used for a post preview.
         *
         * @since 2.0.5
         * @since 4.0.0 Added the `$post` parameter.
@@ -1242,15 +1252,15 @@ function get_preview_post_link( $post = null, $query_args = array(), $preview_li
 }
 
 /**
- * Retrieve edit posts link for post.
+ * Retrieves the edit post link for post.
  *
  * Can be used within the WordPress loop or outside of it. Can be used with
  * pages, posts, attachments, and revisions.
  *
  * @since 2.3.0
  *
- * @param int    $id      Optional. Post ID.
- * @param string $context Optional, defaults to display. How to write the '&', defaults to '&amp;'.
+ * @param int    $id      Optional. Post ID. Default is the ID of the global `$post`.
+ * @param string $context Optional. How to output the '&' character. Default '&amp;'.
  * @return string|null The edit post link for the given post. null if the post type is invalid or does
  *                     not allow an editing UI.
  */
@@ -1279,7 +1289,7 @@ function get_edit_post_link( $id = 0, $context = 'display' ) {
        }
 
        /**
-        * Filter the post edit link.
+        * Filters the post edit link.
         *
         * @since 2.3.0
         *
@@ -1292,16 +1302,16 @@ function get_edit_post_link( $id = 0, $context = 'display' ) {
 }
 
 /**
- * Display edit post link for post.
+ * Displays the edit post link for post.
  *
  * @since 1.0.0
  * @since 4.4.0 The `$class` argument was added.
  *
- * @param string $text   Optional. Anchor text.
- * @param string $before Optional. Display before edit link.
- * @param string $after  Optional. Display after edit link.
- * @param int    $id     Optional. Post ID.
- * @param string $class  Optional. Add custom class to link.
+ * @param string $text   Optional. Anchor text. If null, default is 'Edit This'. Default null.
+ * @param string $before Optional. Display before edit link. Default empty.
+ * @param string $after  Optional. Display after edit link. Default empty.
+ * @param int    $id     Optional. Post ID. Default is the ID of the global `$post`.
+ * @param string $class  Optional. Add custom class to link. Default 'post-edit-link'.
  */
 function edit_post_link( $text = null, $before = '', $after = '', $id = 0, $class = 'post-edit-link' ) {
        if ( ! $post = get_post( $id ) ) {
@@ -1319,7 +1329,7 @@ function edit_post_link( $text = null, $before = '', $after = '', $id = 0, $clas
        $link = '<a class="' . esc_attr( $class ) . '" href="' . esc_url( $url ) . '">' . $text . '</a>';
 
        /**
-        * Filter the post edit link anchor tag.
+        * Filters the post edit link anchor tag.
         *
         * @since 2.3.0
         *
@@ -1331,20 +1341,20 @@ function edit_post_link( $text = null, $before = '', $after = '', $id = 0, $clas
 }
 
 /**
- * Retrieve delete posts link for post.
+ * Retrieves the delete posts link for post.
  *
  * Can be used within the WordPress loop or outside of it, with any post type.
  *
  * @since 2.9.0
  *
- * @param int    $id           Optional. Post ID.
+ * @param int    $id           Optional. Post ID. Default is the ID of the global `$post`.
  * @param string $deprecated   Not used.
- * @param bool   $force_delete Whether to bypass trash and force deletion. Default is false.
+ * @param bool   $force_delete Optional. Whether to bypass trash and force deletion. Default false.
  * @return string|void The delete post link URL for the given post.
  */
 function get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false ) {
        if ( ! empty( $deprecated ) )
-               _deprecated_argument( __FUNCTION__, '3.0' );
+               _deprecated_argument( __FUNCTION__, '3.0.0' );
 
        if ( !$post = get_post( $id ) )
                return;
@@ -1361,7 +1371,7 @@ function get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false
        $delete_link = add_query_arg( 'action', $action, admin_url( sprintf( $post_type_object->_edit_link, $post->ID ) ) );
 
        /**
-        * Filter the post delete link.
+        * Filters the post delete link.
         *
         * @since 2.9.0
         *
@@ -1373,7 +1383,7 @@ function get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false
 }
 
 /**
- * Retrieve edit comment link.
+ * Retrieves the edit comment link.
  *
  * @since 2.3.0
  *
@@ -1389,7 +1399,7 @@ function get_edit_comment_link( $comment_id = 0 ) {
        $location = admin_url('comment.php?action=editcomment&amp;c=') . $comment->comment_ID;
 
        /**
-        * Filter the comment edit link.
+        * Filters the comment edit link.
         *
         * @since 2.3.0
         *
@@ -1399,13 +1409,13 @@ function get_edit_comment_link( $comment_id = 0 ) {
 }
 
 /**
- * Display edit comment link with formatting.
+ * Displays the edit comment link with formatting.
  *
  * @since 1.0.0
  *
- * @param string $text   Optional. Anchor text.
- * @param string $before Optional. Display before edit link.
- * @param string $after  Optional. Display after edit link.
+ * @param string $text   Optional. Anchor text. If null, default is 'Edit This'. Default null.
+ * @param string $before Optional. Display before edit link. Default empty.
+ * @param string $after  Optional. Display after edit link. Default empty.
  */
 function edit_comment_link( $text = null, $before = '', $after = '' ) {
        $comment = get_comment();
@@ -1421,7 +1431,7 @@ function edit_comment_link( $text = null, $before = '', $after = '' ) {
        $link = '<a class="comment-edit-link" href="' . esc_url( get_edit_comment_link( $comment ) ) . '">' . $text . '</a>';
 
        /**
-        * Filter the comment edit link anchor tag.
+        * Filters the comment edit link anchor tag.
         *
         * @since 2.3.0
         *
@@ -1433,11 +1443,11 @@ function edit_comment_link( $text = null, $before = '', $after = '' ) {
 }
 
 /**
- * Display edit bookmark link.
+ * Displays the edit bookmark link.
  *
  * @since 2.7.0
  *
- * @param int|stdClass $link Optional. Bookmark ID.
+ * @param int|stdClass $link Optional. Bookmark ID. Default is the id of the current bookmark.
  * @return string|void The edit bookmark link URL.
  */
 function get_edit_bookmark_link( $link = 0 ) {
@@ -1449,7 +1459,7 @@ function get_edit_bookmark_link( $link = 0 ) {
        $location = admin_url('link.php?action=edit&amp;link_id=') . $link->link_id;
 
        /**
-        * Filter the bookmark edit link.
+        * Filters the bookmark edit link.
         *
         * @since 2.7.0
         *
@@ -1460,14 +1470,14 @@ function get_edit_bookmark_link( $link = 0 ) {
 }
 
 /**
- * Display edit bookmark link anchor content.
+ * Displays the edit bookmark link anchor content.
  *
  * @since 2.7.0
  *
- * @param string $link     Optional. Anchor text.
- * @param string $before   Optional. Display before edit link.
- * @param string $after    Optional. Display after edit link.
- * @param int    $bookmark Optional. Bookmark ID.
+ * @param string $link     Optional. Anchor text. Default empty.
+ * @param string $before   Optional. Display before edit link. Default empty.
+ * @param string $after    Optional. Display after edit link. Default empty.
+ * @param int    $bookmark Optional. Bookmark ID. Default is the current bookmark.
  */
 function edit_bookmark_link( $link = '', $before = '', $after = '', $bookmark = null ) {
        $bookmark = get_bookmark($bookmark);
@@ -1481,7 +1491,7 @@ function edit_bookmark_link( $link = '', $before = '', $after = '', $bookmark =
        $link = '<a href="' . esc_url( get_edit_bookmark_link( $bookmark ) ) . '">' . $link . '</a>';
 
        /**
-        * Filter the bookmark edit link anchor tag.
+        * Filters the bookmark edit link anchor tag.
         *
         * @since 2.7.0
         *
@@ -1492,7 +1502,7 @@ function edit_bookmark_link( $link = '', $before = '', $after = '', $bookmark =
 }
 
 /**
- * Retrieve edit user link
+ * Retrieves the edit user link.
  *
  * @since 3.5.0
  *
@@ -1517,7 +1527,7 @@ function get_edit_user_link( $user_id = null ) {
                $link = add_query_arg( 'user_id', $user->ID, self_admin_url( 'user-edit.php' ) );
 
        /**
-        * Filter the user edit link.
+        * Filters the user edit link.
         *
         * @since 3.5.0
         *
@@ -1530,35 +1540,37 @@ function get_edit_user_link( $user_id = null ) {
 // Navigation links
 
 /**
- * Retrieve previous post that is adjacent to current post.
+ * Retrieves the previous post that is adjacent to the current post.
  *
  * @since 1.5.0
  *
- * @param bool         $in_same_term   Optional. Whether post should be in a same taxonomy term.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
+ * @param bool         $in_same_term   Optional. Whether post should be in a same taxonomy term. Default false.
+ * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
  * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists.
+ * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
+ *                             corresponding post exists.
  */
 function get_previous_post( $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
        return get_adjacent_post( $in_same_term, $excluded_terms, true, $taxonomy );
 }
 
 /**
- * Retrieve next post that is adjacent to current post.
+ * Retrieves the next post that is adjacent to the current post.
  *
  * @since 1.5.0
  *
- * @param bool         $in_same_term   Optional. Whether post should be in a same taxonomy term.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
+ * @param bool         $in_same_term   Optional. Whether post should be in a same taxonomy term. Default false.
+ * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
  * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists.
+ * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
+ *                             corresponding post exists.
  */
 function get_next_post( $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
        return get_adjacent_post( $in_same_term, $excluded_terms, false, $taxonomy );
 }
 
 /**
- * Retrieve adjacent post.
+ * Retrieves the adjacent post.
  *
  * Can either be next or previous post.
  *
@@ -1566,11 +1578,12 @@ function get_next_post( $in_same_term = false, $excluded_terms = '', $taxonomy =
  *
  * @global wpdb $wpdb WordPress database abstraction object.
  *
- * @param bool         $in_same_term   Optional. Whether post should be in a same taxonomy term.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
- * @param bool         $previous       Optional. Whether to retrieve previous post.
+ * @param bool         $in_same_term   Optional. Whether post should be in a same taxonomy term. Default false.
+ * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
+ * @param bool         $previous       Optional. Whether to retrieve previous post. Default true
  * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists.
+ * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
+ *                             corresponding post exists.
  */
 function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) {
        global $wpdb;
@@ -1588,7 +1601,7 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo
                if ( ! empty( $excluded_terms ) && ! is_array( $excluded_terms ) ) {
                        // back-compat, $excluded_terms used to be $excluded_terms with IDs separated by " and "
                        if ( false !== strpos( $excluded_terms, ' and ' ) ) {
-                               _deprecated_argument( __FUNCTION__, '3.3', sprintf( __( 'Use commas instead of %s to separate excluded terms.' ), "'and'" ) );
+                               _deprecated_argument( __FUNCTION__, '3.3.0', sprintf( __( 'Use commas instead of %s to separate excluded terms.' ), "'and'" ) );
                                $excluded_terms = explode( ' and ', $excluded_terms );
                        } else {
                                $excluded_terms = explode( ',', $excluded_terms );
@@ -1616,7 +1629,7 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo
                }
 
                /**
-                * Filter the IDs of terms excluded from adjacent post queries.
+                * Filters the IDs of terms excluded from adjacent post queries.
                 *
                 * The dynamic portion of the hook name, `$adjacent`, refers to the type
                 * of adjacency, 'next' or 'previous'.
@@ -1666,7 +1679,7 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo
        $order = $previous ? 'DESC' : 'ASC';
 
        /**
-        * Filter the JOIN clause in the SQL for an adjacent post query.
+        * Filters the JOIN clause in the SQL for an adjacent post query.
         *
         * The dynamic portion of the hook name, `$adjacent`, refers to the type
         * of adjacency, 'next' or 'previous'.
@@ -1683,7 +1696,7 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo
        $join = apply_filters( "get_{$adjacent}_post_join", $join, $in_same_term, $excluded_terms, $taxonomy, $post );
 
        /**
-        * Filter the WHERE clause in the SQL for an adjacent post query.
+        * Filters the WHERE clause in the SQL for an adjacent post query.
         *
         * The dynamic portion of the hook name, `$adjacent`, refers to the type
         * of adjacency, 'next' or 'previous'.
@@ -1700,7 +1713,7 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo
        $where = apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare( "WHERE p.post_date $op %s AND p.post_type = %s $where", $current_post_date, $post->post_type ), $in_same_term, $excluded_terms, $taxonomy, $post );
 
        /**
-        * Filter the ORDER BY clause in the SQL for an adjacent post query.
+        * Filters the ORDER BY clause in the SQL for an adjacent post query.
         *
         * The dynamic portion of the hook name, `$adjacent`, refers to the type
         * of adjacency, 'next' or 'previous'.
@@ -1735,15 +1748,15 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo
 }
 
 /**
- * Get adjacent post relational link.
+ * Retrieves the adjacent post relational link.
  *
  * Can either be next or previous post relational link.
  *
  * @since 2.8.0
  *
- * @param string       $title          Optional. Link title format.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
+ * @param string       $title          Optional. Link title format. Default '%title'.
+ * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
+ * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
  * @param bool         $previous       Optional. Whether to display link to previous or next post. Default true.
  * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
  * @return string|void The adjacent post relational link URL.
@@ -1774,7 +1787,7 @@ function get_adjacent_post_rel_link( $title = '%title', $in_same_term = false, $
        $adjacent = $previous ? 'previous' : 'next';
 
        /**
-        * Filter the adjacent post relational link.
+        * Filters the adjacent post relational link.
         *
         * The dynamic portion of the hook name, `$adjacent`, refers to the type
         * of adjacency, 'next' or 'previous'.
@@ -1787,13 +1800,13 @@ function get_adjacent_post_rel_link( $title = '%title', $in_same_term = false, $
 }
 
 /**
- * Display relational links for the posts adjacent to the current post.
+ * Displays the relational links for the posts adjacent to the current post.
  *
  * @since 2.8.0
  *
- * @param string       $title          Optional. Link title format.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
+ * @param string       $title          Optional. Link title format. Default '%title'.
+ * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
+ * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
  * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
  */
 function adjacent_posts_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
@@ -1802,11 +1815,14 @@ function adjacent_posts_rel_link( $title = '%title', $in_same_term = false, $exc
 }
 
 /**
- * Display relational links for the posts adjacent to the current post for single post pages.
+ * Displays relational links for the posts adjacent to the current post for single post pages.
+ *
+ * This is meant to be attached to actions like 'wp_head'. Do not call this directly in plugins
+ * or theme templates.
  *
- * This is meant to be attached to actions like 'wp_head'. Do not call this directly in plugins or theme templates.
  * @since 3.0.0
  *
+ * @see adjacent_posts_rel_link()
  */
 function adjacent_posts_rel_link_wp_head() {
        if ( ! is_single() || is_attachment() ) {
@@ -1816,13 +1832,15 @@ function adjacent_posts_rel_link_wp_head() {
 }
 
 /**
- * Display relational link for the next post adjacent to the current post.
+ * Displays the relational link for the next post adjacent to the current post.
  *
  * @since 2.8.0
  *
- * @param string       $title          Optional. Link title format.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
+ * @see get_adjacent_post_rel_link()
+ *
+ * @param string       $title          Optional. Link title format. Default '%title'.
+ * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
+ * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
  * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
  */
 function next_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
@@ -1830,12 +1848,14 @@ function next_post_rel_link( $title = '%title', $in_same_term = false, $excluded
 }
 
 /**
- * Display relational link for the previous post adjacent to the current post.
+ * Displays the relational link for the previous post adjacent to the current post.
  *
  * @since 2.8.0
  *
- * @param string       $title          Optional. Link title format.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term.
+ * @see get_adjacent_post_rel_link()
+ *
+ * @param string       $title          Optional. Link title format. Default '%title'.
+ * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
  * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default true.
  * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
  */
@@ -1844,7 +1864,7 @@ function prev_post_rel_link( $title = '%title', $in_same_term = false, $excluded
 }
 
 /**
- * Retrieve boundary post.
+ * Retrieves the boundary post.
  *
  * Boundary being either the first or last post by publish date within the constraints specified
  * by $in_same_term or $excluded_terms.
@@ -1852,8 +1872,10 @@ function prev_post_rel_link( $title = '%title', $in_same_term = false, $excluded
  * @since 2.8.0
  *
  * @param bool         $in_same_term   Optional. Whether returned post should be in a same taxonomy term.
+ *                                     Default false.
  * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
- * @param bool         $start          Optional. Whether to retrieve first or last post.
+ *                                     Default empty.
+ * @param bool         $start          Optional. Whether to retrieve first or last post. Default true
  * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
  * @return null|array Array containing the boundary post object if successful, null otherwise.
  */
@@ -1902,14 +1924,14 @@ function get_boundary_post( $in_same_term = false, $excluded_terms = '', $start
 }
 
 /**
- * Get previous post link that is adjacent to the current post.
+ * Retrieves the previous post link that is adjacent to the current post.
  *
  * @since 3.7.0
  *
- * @param string       $format         Optional. Link anchor format.
- * @param string       $link           Optional. Link permalink format.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
+ * @param string       $format         Optional. Link anchor format. Default '&laquo; %link'.
+ * @param string       $link           Optional. Link permalink format. Default '%title%'.
+ * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
+ * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
  * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
  * @return string The link URL of the previous post in relation to the current post.
  */
@@ -1918,15 +1940,16 @@ function get_previous_post_link( $format = '&laquo; %link', $link = '%title', $i
 }
 
 /**
- * Display previous post link that is adjacent to the current post.
+ * Displays the previous post link that is adjacent to the current post.
  *
  * @since 1.5.0
+ *
  * @see get_previous_post_link()
  *
- * @param string       $format         Optional. Link anchor format.
- * @param string       $link           Optional. Link permalink format.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
+ * @param string       $format         Optional. Link anchor format. Default '&laquo; %link'.
+ * @param string       $link           Optional. Link permalink format. Default '%title'.
+ * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
+ * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
  * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
  */
 function previous_post_link( $format = '&laquo; %link', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
@@ -1934,14 +1957,14 @@ function previous_post_link( $format = '&laquo; %link', $link = '%title', $in_sa
 }
 
 /**
- * Get next post link that is adjacent to the current post.
+ * Retrieves the next post link that is adjacent to the current post.
  *
  * @since 3.7.0
  *
- * @param string       $format         Optional. Link anchor format.
- * @param string       $link           Optional. Link permalink format.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
+ * @param string       $format         Optional. Link anchor format. Default '&laquo; %link'.
+ * @param string       $link           Optional. Link permalink format. Default '%title'.
+ * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
+ * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
  * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
  * @return string The link URL of the next post in relation to the current post.
  */
@@ -1950,15 +1973,15 @@ function get_next_post_link( $format = '%link &raquo;', $link = '%title', $in_sa
 }
 
 /**
- * Display next post link that is adjacent to the current post.
+ * Displays the next post link that is adjacent to the current post.
  *
  * @since 1.5.0
  * @see get_next_post_link()
  *
- * @param string       $format         Optional. Link anchor format.
- * @param string       $link           Optional. Link permalink format.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
+ * @param string       $format         Optional. Link anchor format. Default '&laquo; %link'.
+ * @param string       $link           Optional. Link permalink format. Default '%title'
+ * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
+ * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
  * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
  */
 function next_post_link( $format = '%link &raquo;', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
@@ -1966,7 +1989,7 @@ function next_post_link( $format = '%link &raquo;', $link = '%title', $in_same_t
 }
 
 /**
- * Get adjacent post link.
+ * Retrieves the adjacent post link.
  *
  * Can be either next post link or previous.
  *
@@ -1974,8 +1997,8 @@ function next_post_link( $format = '%link &raquo;', $link = '%title', $in_same_t
  *
  * @param string       $format         Link anchor format.
  * @param string       $link           Link permalink format.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded terms IDs.
+ * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
+ * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded terms IDs. Default empty.
  * @param bool         $previous       Optional. Whether to display link to previous or next post. Default true.
  * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
  * @return string The link URL of the previous or next post in relation to the current post.
@@ -2011,7 +2034,7 @@ function get_adjacent_post_link( $format, $link, $in_same_term = false, $exclude
        $adjacent = $previous ? 'previous' : 'next';
 
        /**
-        * Filter the adjacent post link.
+        * Filters the adjacent post link.
         *
         * The dynamic portion of the hook name, `$adjacent`, refers to the type
         * of adjacency, 'next' or 'previous'.
@@ -2029,7 +2052,7 @@ function get_adjacent_post_link( $format, $link, $in_same_term = false, $exclude
 }
 
 /**
- * Display adjacent post link.
+ * Displays the adjacent post link.
  *
  * Can be either next post link or previous.
  *
@@ -2037,8 +2060,8 @@ function get_adjacent_post_link( $format, $link, $in_same_term = false, $exclude
  *
  * @param string       $format         Link anchor format.
  * @param string       $link           Link permalink format.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded category IDs.
+ * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
+ * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded category IDs. Default empty.
  * @param bool         $previous       Optional. Whether to display link to previous or next post. Default true.
  * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
  */
@@ -2047,13 +2070,13 @@ function adjacent_post_link( $format, $link, $in_same_term = false, $excluded_te
 }
 
 /**
- * Retrieve links for page numbers.
+ * Retrieves the link for a page number.
  *
  * @since 1.5.0
  *
  * @global WP_Rewrite $wp_rewrite
  *
- * @param int  $pagenum Optional. Page ID.
+ * @param int  $pagenum Optional. Page ID. Default 1.
  * @param bool $escape  Optional. Whether to escape the URL for display, with esc_url(). Defaults to true.
  *                         Otherwise, prepares the URL with esc_url_raw().
  * @return string The link URL for the given page number.
@@ -2108,7 +2131,7 @@ function get_pagenum_link($pagenum = 1, $escape = true ) {
        }
 
        /**
-        * Filter the page number link for the current request.
+        * Filters the page number link for the current request.
         *
         * @since 2.5.0
         *
@@ -2123,7 +2146,7 @@ function get_pagenum_link($pagenum = 1, $escape = true ) {
 }
 
 /**
- * Retrieve next posts page link.
+ * Retrieves the next posts page link.
  *
  * Backported from 2.1.3 to 2.0.10.
  *
@@ -2131,7 +2154,7 @@ function get_pagenum_link($pagenum = 1, $escape = true ) {
  *
  * @global int $paged
  *
- * @param int $max_page Optional. Max pages.
+ * @param int $max_page Optional. Max pages. Default 0.
  * @return string|void The link URL for next posts page.
  */
 function get_next_posts_page_link($max_page = 0) {
@@ -2147,12 +2170,12 @@ function get_next_posts_page_link($max_page = 0) {
 }
 
 /**
- * Display or return the next posts page link.
+ * Displays or retrieves the next posts page link.
  *
  * @since 0.71
  *
- * @param int   $max_page Optional. Max pages.
- * @param bool  $echo     Optional. Echo or return;
+ * @param int   $max_page Optional. Max pages. Default 0.
+ * @param bool  $echo     Optional. Whether to echo the link. Default true.
  * @return string|void The link URL for next posts page if `$echo = false`.
  */
 function next_posts( $max_page = 0, $echo = true ) {
@@ -2165,7 +2188,7 @@ function next_posts( $max_page = 0, $echo = true ) {
 }
 
 /**
- * Return the next posts page link.
+ * Retrieves the next posts page link.
  *
  * @since 2.7.0
  *
@@ -2173,7 +2196,7 @@ function next_posts( $max_page = 0, $echo = true ) {
  * @global WP_Query $wp_query
  *
  * @param string $label    Content for link text.
- * @param int    $max_page Optional. Max pages.
+ * @param int    $max_page Optional. Max pages. Default 0.
  * @return string|void HTML-formatted next posts page link.
  */
 function get_next_posts_link( $label = null, $max_page = 0 ) {
@@ -2192,7 +2215,7 @@ function get_next_posts_link( $label = null, $max_page = 0 ) {
 
        if ( !is_single() && ( $nextpage <= $max_page ) ) {
                /**
-                * Filter the anchor tag attributes for the next posts page link.
+                * Filters the anchor tag attributes for the next posts page link.
                 *
                 * @since 2.7.0
                 *
@@ -2205,19 +2228,19 @@ function get_next_posts_link( $label = null, $max_page = 0 ) {
 }
 
 /**
- * Display the next posts page link.
+ * Displays the next posts page link.
  *
  * @since 0.71
  *
  * @param string $label    Content for link text.
- * @param int    $max_page Optional. Max pages.
+ * @param int    $max_page Optional. Max pages. Default 0.
  */
 function next_posts_link( $label = null, $max_page = 0 ) {
        echo get_next_posts_link( $label, $max_page );
 }
 
 /**
- * Retrieve previous posts page link.
+ * Retrieves the previous posts page link.
  *
  * Will only return string, if not on a single page or post.
  *
@@ -2241,11 +2264,11 @@ function get_previous_posts_page_link() {
 }
 
 /**
- * Display or return the previous posts page link.
+ * Displays or retrieves the previous posts page link.
  *
  * @since 0.71
  *
- * @param bool $echo Optional. Echo or return;
+ * @param bool $echo Optional. Whether to echo the link. Default true.
  * @return string|void The previous posts page link if `$echo = false`.
  */
 function previous_posts( $echo = true ) {
@@ -2258,7 +2281,7 @@ function previous_posts( $echo = true ) {
 }
 
 /**
- * Return the previous posts page link.
+ * Retrieves the previous posts page link.
  *
  * @since 2.7.0
  *
@@ -2275,7 +2298,7 @@ function get_previous_posts_link( $label = null ) {
 
        if ( !is_single() && $paged > 1 ) {
                /**
-                * Filter the anchor tag attributes for the previous posts page link.
+                * Filters the anchor tag attributes for the previous posts page link.
                 *
                 * @since 2.7.0
                 *
@@ -2287,7 +2310,7 @@ function get_previous_posts_link( $label = null ) {
 }
 
 /**
- * Display the previous posts page link.
+ * Displays the previous posts page link.
  *
  * @since 0.71
  *
@@ -2298,13 +2321,21 @@ function previous_posts_link( $label = null ) {
 }
 
 /**
- * Return post pages link navigation for previous and next pages.
+ * Retrieves the post pages link navigation for previous and next pages.
  *
  * @since 2.8.0
  *
  * @global WP_Query $wp_query
  *
- * @param string|array $args Optional args.
+ * @param string|array $args {
+ *     Optional. Arguments to build the post pages link navigation.
+ *
+ *     @type string $sep      Separator character. Default '&#8212;'.
+ *     @type string $prelabel Link text to display for the previous page link.
+ *                            Default '&laquo; Previous Page'.
+ *     @type string $nxtlabel Link text to display for the next page link.
+ *                            Default 'Next Page &raquo;'.
+ * }
  * @return string The posts link navigation.
  */
 function get_posts_nav_link( $args = array() ) {
@@ -2339,13 +2370,13 @@ function get_posts_nav_link( $args = array() ) {
 }
 
 /**
- * Display post pages link navigation for previous and next pages.
+ * Displays the post pages link navigation for previous and next pages.
  *
  * @since 0.71
  *
- * @param string $sep      Optional. Separator for posts navigation links.
- * @param string $prelabel Optional. Label for previous pages.
- * @param string $nxtlabel Optional Label for next pages.
+ * @param string $sep      Optional. Separator for posts navigation links. Default empty.
+ * @param string $prelabel Optional. Label for previous pages. Default empty.
+ * @param string $nxtlabel Optional Label for next pages. Default empty.
  */
 function posts_nav_link( $sep = '', $prelabel = '', $nxtlabel = '' ) {
        $args = array_filter( compact('sep', 'prelabel', 'nxtlabel') );
@@ -2353,7 +2384,7 @@ function posts_nav_link( $sep = '', $prelabel = '', $nxtlabel = '' ) {
 }
 
 /**
- * Return navigation to next/previous post when applicable.
+ * Retrieves the navigation to next/previous post, when applicable.
  *
  * @since 4.1.0
  * @since 4.4.0 Introduced the `in_same_term`, `excluded_terms`, and `taxonomy` arguments.
@@ -2407,19 +2438,19 @@ function get_the_post_navigation( $args = array() ) {
 }
 
 /**
- * Display navigation to next/previous post when applicable.
+ * Displays the navigation to next/previous post, when applicable.
  *
  * @since 4.1.0
  *
- * @param array $args Optional. See {@see get_the_post_navigation()} for available
- *                    arguments. Default empty array.
+ * @param array $args Optional. See get_the_post_navigation() for available arguments.
+ *                    Default empty array.
  */
 function the_post_navigation( $args = array() ) {
        echo get_the_post_navigation( $args );
 }
 
 /**
- * Return navigation to next/previous set of posts when applicable.
+ * Returns the navigation to next/previous set of posts, when applicable.
  *
  * @since 4.1.0
  *
@@ -2466,25 +2497,24 @@ function get_the_posts_navigation( $args = array() ) {
 }
 
 /**
- * Display navigation to next/previous set of posts when applicable.
+ * Displays the navigation to next/previous set of posts, when applicable.
  *
  * @since 4.1.0
  *
- * @param array $args Optional. See {@see get_the_posts_navigation()} for available
- *                    arguments. Default empty array.
+ * @param array $args Optional. See get_the_posts_navigation() for available arguments.
+ *                    Default empty array.
  */
 function the_posts_navigation( $args = array() ) {
        echo get_the_posts_navigation( $args );
 }
 
 /**
- * Return a paginated navigation to next/previous set of posts,
- * when applicable.
+ * Retrieves a paginated navigation to next/previous set of posts, when applicable.
  *
  * @since 4.1.0
  *
  * @param array $args {
- *     Optional. Default pagination arguments, {@see paginate_links()}.
+ *     Optional. Default pagination arguments, see paginate_links().
  *
  *     @type string $screen_reader_text Screen reader text for navigation element.
  *                                      Default 'Posts navigation'.
@@ -2520,12 +2550,11 @@ function get_the_posts_pagination( $args = array() ) {
 }
 
 /**
- * Display a paginated navigation to next/previous set of posts,
- * when applicable.
+ * Displays a paginated navigation to next/previous set of posts, when applicable.
  *
  * @since 4.1.0
  *
- * @param array $args Optional. See {@see get_the_posts_pagination()} for available arguments.
+ * @param array $args Optional. See get_the_posts_pagination() for available arguments.
  *                    Default empty array.
  */
 function the_posts_pagination( $args = array() ) {
@@ -2555,7 +2584,7 @@ function _navigation_markup( $links, $class = 'posts-navigation', $screen_reader
        </nav>';
 
        /**
-        * Filter the navigation markup template.
+        * Filters the navigation markup template.
         *
         * Note: The filtered template HTML must contain specifiers for the navigation
         * class (%1$s), the screen-reader-text value (%2$s), and placement of the
@@ -2578,14 +2607,14 @@ function _navigation_markup( $links, $class = 'posts-navigation', $screen_reader
 }
 
 /**
- * Retrieve comments page number link.
+ * Retrieves the comments page number link.
  *
  * @since 2.7.0
  *
  * @global WP_Rewrite $wp_rewrite
  *
- * @param int $pagenum  Optional. Page number.
- * @param int $max_page Optional. The maximum number of comment pages.
+ * @param int $pagenum  Optional. Page number. Default 1.
+ * @param int $max_page Optional. The maximum number of comment pages. Default 0.
  * @return string The comments page number link URL.
  */
 function get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) {
@@ -2612,7 +2641,7 @@ function get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) {
        $result .= '#comments';
 
        /**
-        * Filter the comments page number link for the current request.
+        * Filters the comments page number link for the current request.
         *
         * @since 2.7.0
         *
@@ -2622,14 +2651,14 @@ function get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) {
 }
 
 /**
- * Return the link to next comments page.
+ * Retrieves the link to the next comments page.
  *
  * @since 2.7.1
  *
  * @global WP_Query $wp_query
  *
- * @param string $label    Optional. Label for link text.
- * @param int    $max_page Optional. Max page.
+ * @param string $label    Optional. Label for link text. Default empty.
+ * @param int    $max_page Optional. Max page. Default 0.
  * @return string|void HTML-formatted link for the next page of comments.
  */
 function get_next_comments_link( $label = '', $max_page = 0 ) {
@@ -2659,7 +2688,7 @@ function get_next_comments_link( $label = '', $max_page = 0 ) {
                $label = __('Newer Comments &raquo;');
 
        /**
-        * Filter the anchor tag attributes for the next comments page link.
+        * Filters the anchor tag attributes for the next comments page link.
         *
         * @since 2.7.0
         *
@@ -2669,23 +2698,23 @@ function get_next_comments_link( $label = '', $max_page = 0 ) {
 }
 
 /**
- * Display the link to next comments page.
+ * Displays the link to the next comments page.
  *
  * @since 2.7.0
  *
- * @param string $label    Optional. Label for link text.
- * @param int    $max_page Optional. Max page.
+ * @param string $label    Optional. Label for link text. Default empty.
+ * @param int    $max_page Optional. Max page. Default 0.
  */
 function next_comments_link( $label = '', $max_page = 0 ) {
        echo get_next_comments_link( $label, $max_page );
 }
 
 /**
- * Return the previous comments page link.
+ * Retrieves the link to the previous comments page.
  *
  * @since 2.7.1
  *
- * @param string $label Optional. Label for comments link text.
+ * @param string $label Optional. Label for comments link text. Default empty.
  * @return string|void HTML-formatted link for the previous page of comments.
  */
 function get_previous_comments_link( $label = '' ) {
@@ -2703,7 +2732,7 @@ function get_previous_comments_link( $label = '' ) {
                $label = __('&laquo; Older Comments');
 
        /**
-        * Filter the anchor tag attributes for the previous comments page link.
+        * Filters the anchor tag attributes for the previous comments page link.
         *
         * @since 2.7.0
         *
@@ -2713,28 +2742,28 @@ function get_previous_comments_link( $label = '' ) {
 }
 
 /**
- * Display the previous comments page link.
+ * Displays the link to the previous comments page.
  *
  * @since 2.7.0
  *
- * @param string $label Optional. Label for comments link text.
+ * @param string $label Optional. Label for comments link text. Default empty.
  */
 function previous_comments_link( $label = '' ) {
        echo get_previous_comments_link( $label );
 }
 
 /**
- * Create pagination links for the comments on the current post.
+ * Displays or retrieves pagination links for the comments on the current post.
  *
  * @see paginate_links()
  * @since 2.7.0
  *
  * @global WP_Rewrite $wp_rewrite
  *
- * @param string|array $args Optional args. See paginate_links().
+ * @param string|array $args Optional args. See paginate_links(). Default empty array.
  * @return string|void Markup for pagination links.
  */
-function paginate_comments_links($args = array()) {
+function paginate_comments_links( $args = array() ) {
        global $wp_rewrite;
 
        if ( ! is_singular() )
@@ -2765,15 +2794,17 @@ function paginate_comments_links($args = array()) {
 }
 
 /**
- * Returns navigation to next/previous set of comments when applicable.
+ * Retrieves navigation to next/previous set of comments, when applicable.
  *
  * @since 4.4.0
  *
  * @param array $args {
  *     Optional. Default comments navigation arguments.
  *
- *     @type string $prev_text          Anchor text to display in the previous comments link. Default 'Older comments'.
- *     @type string $next_text          Anchor text to display in the next comments link. Default 'Newer comments'.
+ *     @type string $prev_text          Anchor text to display in the previous comments link.
+ *                                      Default 'Older comments'.
+ *     @type string $next_text          Anchor text to display in the next comments link.
+ *                                      Default 'Newer comments'.
  *     @type string $screen_reader_text Screen reader text for nav element. Default 'Comments navigation'.
  * }
  * @return string Markup for comments links.
@@ -2807,19 +2838,18 @@ function get_the_comments_navigation( $args = array() ) {
 }
 
 /**
- * Displays navigation to next/previous set of comments when applicable.
+ * Displays navigation to next/previous set of comments, when applicable.
  *
  * @since 4.4.0
  *
- * @param array $args See {@see get_the_comments_navigation()} for available arguments.
+ * @param array $args See get_the_comments_navigation() for available arguments. Default empty array.
  */
 function the_comments_navigation( $args = array() ) {
        echo get_the_comments_navigation( $args );
 }
 
 /**
- * Returns a paginated navigation to next/previous set of comments,
- * when applicable.
+ * Retrieves a paginated navigation to next/previous set of comments, when applicable.
  *
  * @since 4.4.0
  *
@@ -2852,24 +2882,24 @@ function get_the_comments_pagination( $args = array() ) {
 }
 
 /**
- * Displays a paginated navigation to next/previous set of comments,
- * when applicable.
+ * Displays a paginated navigation to next/previous set of comments, when applicable.
  *
  * @since 4.4.0
  *
- * @param array $args See {@see get_the_comments_pagination()} for available arguments.
+ * @param array $args See get_the_comments_pagination() for available arguments. Default empty array.
  */
 function the_comments_pagination( $args = array() ) {
        echo get_the_comments_pagination( $args );
 }
 
 /**
- * Retrieve the Press This bookmarklet link.
- *
- * Use this in 'a' element 'href' attribute.
+ * Retrieves the Press This bookmarklet link.
  *
  * @since 2.6.0
  *
+ * @global bool   $is_IE      Whether the browser matches an Internet Explorer user agent.
+ * @global string $wp_version WP version.
+ *
  * @global bool          $is_IE
  * @global string        $wp_version
  * @global WP_Press_This $wp_press_this
@@ -2884,7 +2914,7 @@ function get_shortcut_link() {
        $link = '';
 
        if ( $is_IE ) {
-               /**
+               /*
                 * Return the old/shorter bookmarklet code for MSIE 8 and lower,
                 * since they only support a max length of ~2000 characters for
                 * bookmark[let] URLs, which is way to small for our smarter one.
@@ -2916,7 +2946,7 @@ function get_shortcut_link() {
        $link = str_replace( array( "\r", "\n", "\t" ),  '', $link );
 
        /**
-        * Filter the Press This bookmarklet link.
+        * Filters the Press This bookmarklet link.
         *
         * @since 2.6.0
         *
@@ -2926,30 +2956,29 @@ function get_shortcut_link() {
 }
 
 /**
- * Retrieve the URL for the current site where the front end is accessible.
+ * Retrieves the URL for the current site where the front end is accessible.
  *
  * Returns the 'home' option with the appropriate protocol, 'https' if
- * {@see is_ssl()} and 'http' otherwise. If `$scheme` is 'http' or 'https',
+ * is_ssl() and 'http' otherwise. If `$scheme` is 'http' or 'https',
  * `is_ssl()` is overridden.
  *
  * @since 3.0.0
  *
- * @param  string      $path   Optional. Path relative to the home url. Default empty.
- * @param  string|null $scheme Optional. Scheme to give the home url context. Accepts
+ * @param  string      $path   Optional. Path relative to the home URL. Default empty.
+ * @param  string|null $scheme Optional. Scheme to give the home URL context. Accepts
  *                             'http', 'https', 'relative', 'rest', or null. Default null.
- * @return string Home url link with optional path appended.
+ * @return string Home URL link with optional path appended.
  */
 function home_url( $path = '', $scheme = null ) {
        return get_home_url( null, $path, $scheme );
 }
 
 /**
- * Retrieve the URL for a given site where the front end is accessible.
+ * Retrieves the URL for a given site where the front end is accessible.
  *
  * Returns the 'home' option with the appropriate protocol, 'https' if
- * {@see is_ssl()} and 'http' otherwise. If `$scheme` is 'http' or 'https',
- * `is_ssl()` is
- * overridden.
+ * is_ssl() and 'http' otherwise. If `$scheme` is 'http' or 'https',
+ * `is_ssl()` is overridden.
  *
  * @since 3.0.0
  *
@@ -2987,7 +3016,7 @@ function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
                $url .= '/' . ltrim( $path, '/' );
 
        /**
-        * Filter the home URL.
+        * Filters the home URL.
         *
         * @since 3.0.0
         *
@@ -3001,7 +3030,7 @@ function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
 }
 
 /**
- * Retrieve the URL for the current site where WordPress application files
+ * Retrieves the URL for the current site where WordPress application files
  * (e.g. wp-blog-header.php or the wp-admin/ folder) are accessible.
  *
  * Returns the 'site_url' option with the appropriate protocol, 'https' if
@@ -3010,30 +3039,30 @@ function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
  *
  * @since 3.0.0
  *
- * @param string $path   Optional. Path relative to the site url.
- * @param string $scheme Optional. Scheme to give the site url context. See set_url_scheme().
- * @return string Site url link with optional path appended.
+ * @param string $path   Optional. Path relative to the site URL. Default empty.
+ * @param string $scheme Optional. Scheme to give the site URL context. See set_url_scheme().
+ * @return string Site URL link with optional path appended.
  */
 function site_url( $path = '', $scheme = null ) {
        return get_site_url( null, $path, $scheme );
 }
 
 /**
- * Retrieve the URL for a given site where WordPress application files
+ * Retrieves the URL for a given site where WordPress application files
  * (e.g. wp-blog-header.php or the wp-admin/ folder) are accessible.
  *
  * Returns the 'site_url' option with the appropriate protocol, 'https' if
- * {@see is_ssl()} and 'http' otherwise. If `$scheme` is 'http' or 'https',
+ * is_ssl() and 'http' otherwise. If `$scheme` is 'http' or 'https',
  * `is_ssl()` is overridden.
  *
  * @since 3.0.0
  *
  * @param int    $blog_id Optional. Site ID. Default null (current site).
- * @param string $path    Optional. Path relative to the site url. Default empty.
- * @param string $scheme  Optional. Scheme to give the site url context. Accepts
+ * @param string $path    Optional. Path relative to the site URL. Default empty.
+ * @param string $scheme  Optional. Scheme to give the site URL context. Accepts
  *                        'http', 'https', 'login', 'login_post', 'admin', or
  *                        'relative'. Default null.
- * @return string Site url link with optional path appended.
+ * @return string Site URL link with optional path appended.
  */
 function get_site_url( $blog_id = null, $path = '', $scheme = null ) {
        if ( empty( $blog_id ) || !is_multisite() ) {
@@ -3050,7 +3079,7 @@ function get_site_url( $blog_id = null, $path = '', $scheme = null ) {
                $url .= '/' . ltrim( $path, '/' );
 
        /**
-        * Filter the site URL.
+        * Filters the site URL.
         *
         * @since 2.7.0
         *
@@ -3064,29 +3093,30 @@ function get_site_url( $blog_id = null, $path = '', $scheme = null ) {
 }
 
 /**
- * Retrieve the url to the admin area for the current site.
+ * Retrieves the URL to the admin area for the current site.
  *
  * @since 2.6.0
  *
- * @param string $path   Optional path relative to the admin url.
- * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
- * @return string Admin url link with optional path appended.
+ * @param string $path   Optional path relative to the admin URL.
+ * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl().
+ *                       'http' or 'https' can be passed to force those schemes.
+ * @return string Admin URL link with optional path appended.
  */
 function admin_url( $path = '', $scheme = 'admin' ) {
        return get_admin_url( null, $path, $scheme );
 }
 
 /**
- * Retrieves the url to the admin area for a given site.
+ * Retrieves the URL to the admin area for a given site.
  *
  * @since 3.0.0
  *
  * @param int    $blog_id Optional. Site ID. Default null (current site).
- * @param string $path    Optional. Path relative to the admin url. Default empty.
+ * @param string $path    Optional. Path relative to the admin URL. Default empty.
  * @param string $scheme  Optional. The scheme to use. Accepts 'http' or 'https',
  *                        to force those schemes. Default 'admin', which obeys
- *                        {@see force_ssl_admin()} and {@see is_ssl()}.
- * @return string Admin url link with optional path appended.
+ *                        force_ssl_admin() and is_ssl().
+ * @return string Admin URL link with optional path appended.
  */
 function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) {
        $url = get_site_url($blog_id, 'wp-admin/', $scheme);
@@ -3095,7 +3125,7 @@ function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) {
                $url .= ltrim( $path, '/' );
 
        /**
-        * Filter the admin area URL.
+        * Filters the admin area URL.
         *
         * @since 2.8.0
         *
@@ -3107,13 +3137,14 @@ function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) {
 }
 
 /**
- * Retrieve the url to the includes directory.
+ * Retrieves the URL to the includes directory.
  *
  * @since 2.6.0
  *
- * @param string $path   Optional. Path relative to the includes url.
- * @param string $scheme Optional. Scheme to give the includes url context.
- * @return string Includes url link with optional path appended.
+ * @param string $path   Optional. Path relative to the includes URL. Default empty.
+ * @param string $scheme Optional. Scheme to give the includes URL context. Accepts
+ *                       'http', 'https', or 'relative'. Default null.
+ * @return string Includes URL link with optional path appended.
  */
 function includes_url( $path = '', $scheme = null ) {
        $url = site_url( '/' . WPINC . '/', $scheme );
@@ -3122,7 +3153,7 @@ function includes_url( $path = '', $scheme = null ) {
                $url .= ltrim($path, '/');
 
        /**
-        * Filter the URL to the includes directory.
+        * Filters the URL to the includes directory.
         *
         * @since 2.8.0
         *
@@ -3134,21 +3165,21 @@ function includes_url( $path = '', $scheme = null ) {
 }
 
 /**
- * Retrieve the url to the content directory.
+ * Retrieves the URL to the content directory.
  *
  * @since 2.6.0
  *
- * @param string $path Optional. Path relative to the content url.
- * @return string Content url link with optional path appended.
+ * @param string $path Optional. Path relative to the content URL. Default empty.
+ * @return string Content URL link with optional path appended.
  */
-function content_url($path = '') {
+function content_url( $path = '' ) {
        $url = set_url_scheme( WP_CONTENT_URL );
 
        if ( $path && is_string( $path ) )
                $url .= '/' . ltrim($path, '/');
 
        /**
-        * Filter the URL to the content directory.
+        * Filters the URL to the content directory.
         *
         * @since 2.8.0
         *
@@ -3160,7 +3191,7 @@ function content_url($path = '') {
 }
 
 /**
- * Retrieve a URL within the plugins or mu-plugins directory.
+ * Retrieves a URL within the plugins or mu-plugins directory.
  *
  * Defaults to the plugins directory URL if no arguments are supplied.
  *
@@ -3197,7 +3228,7 @@ function plugins_url( $path = '', $plugin = '' ) {
                $url .= '/' . ltrim($path, '/');
 
        /**
-        * Filter the URL to the plugins directory.
+        * Filters the URL to the plugins directory.
         *
         * @since 2.8.0
         *
@@ -3211,17 +3242,20 @@ function plugins_url( $path = '', $plugin = '' ) {
 }
 
 /**
- * Retrieve the site url for the current network.
+ * Retrieves the site URL for the current network.
  *
- * Returns the site url with the appropriate protocol, 'https' if
+ * Returns the site URL with the appropriate protocol, 'https' if
  * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
  * overridden.
  *
  * @since 3.0.0
  *
- * @param string $path   Optional. Path relative to the site url.
- * @param string $scheme Optional. Scheme to give the site url context. See set_url_scheme().
- * @return string Site url link with optional path appended.
+ * @see set_url_scheme()
+ *
+ * @param string $path   Optional. Path relative to the site URL. Default empty.
+ * @param string $scheme Optional. Scheme to give the site URL context. Accepts
+ *                       'http', 'https', or 'relative'. Default null.
+ * @return string Site URL link with optional path appended.
  */
 function network_site_url( $path = '', $scheme = null ) {
        if ( ! is_multisite() )
@@ -3238,7 +3272,7 @@ function network_site_url( $path = '', $scheme = null ) {
                $url .= ltrim( $path, '/' );
 
        /**
-        * Filter the network site URL.
+        * Filters the network site URL.
         *
         * @since 3.0.0
         *
@@ -3252,18 +3286,18 @@ function network_site_url( $path = '', $scheme = null ) {
 }
 
 /**
- * Retrieves the home url for the current network.
+ * Retrieves the home URL for the current network.
  *
- * Returns the home url with the appropriate protocol, 'https' {@see is_ssl()}
+ * Returns the home URL with the appropriate protocol, 'https' is_ssl()
  * and 'http' otherwise. If `$scheme` is 'http' or 'https', `is_ssl()` is
  * overridden.
  *
  * @since 3.0.0
  *
- * @param  string $path   Optional. Path relative to the home url. Default empty.
- * @param  string $scheme Optional. Scheme to give the home url context. Accepts
+ * @param  string $path   Optional. Path relative to the home URL. Default empty.
+ * @param  string $scheme Optional. Scheme to give the home URL context. Accepts
  *                        'http', 'https', or 'relative'. Default null.
- * @return string Home url link with optional path appended.
+ * @return string Home URL link with optional path appended.
  */
 function network_home_url( $path = '', $scheme = null ) {
        if ( ! is_multisite() )
@@ -3284,7 +3318,7 @@ function network_home_url( $path = '', $scheme = null ) {
                $url .= ltrim( $path, '/' );
 
        /**
-        * Filter the network home URL.
+        * Filters the network home URL.
         *
         * @since 3.0.0
         *
@@ -3298,13 +3332,14 @@ function network_home_url( $path = '', $scheme = null ) {
 }
 
 /**
- * Retrieve the url to the admin area for the network.
+ * Retrieves the URL to the admin area for the network.
  *
  * @since 3.0.0
  *
- * @param string $path   Optional path relative to the admin url.
- * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
- * @return string Admin url link with optional path appended.
+ * @param string $path   Optional path relative to the admin URL. Default empty.
+ * @param string $scheme Optional. The scheme to use. Default is 'admin', which obeys force_ssl_admin()
+ *                       and is_ssl(). 'http' or 'https' can be passed to force those schemes.
+ * @return string Admin URL link with optional path appended.
  */
 function network_admin_url( $path = '', $scheme = 'admin' ) {
        if ( ! is_multisite() )
@@ -3316,7 +3351,7 @@ function network_admin_url( $path = '', $scheme = 'admin' ) {
                $url .= ltrim($path, '/');
 
        /**
-        * Filter the network admin URL.
+        * Filters the network admin URL.
         *
         * @since 3.0.0
         *
@@ -3328,13 +3363,14 @@ function network_admin_url( $path = '', $scheme = 'admin' ) {
 }
 
 /**
- * Retrieve the url to the admin area for the current user.
+ * Retrieves the URL to the admin area for the current user.
  *
  * @since 3.0.0
  *
- * @param string $path   Optional path relative to the admin url.
- * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
- * @return string Admin url link with optional path appended.
+ * @param string $path   Optional. Path relative to the admin URL. Default empty.
+ * @param string $scheme Optional. The scheme to use. Default is 'admin', which obeys force_ssl_admin()
+ *                       and is_ssl(). 'http' or 'https' can be passed to force those schemes.
+ * @return string Admin URL link with optional path appended.
  */
 function user_admin_url( $path = '', $scheme = 'admin' ) {
        $url = network_site_url('wp-admin/user/', $scheme);
@@ -3343,7 +3379,7 @@ function user_admin_url( $path = '', $scheme = 'admin' ) {
                $url .= ltrim($path, '/');
 
        /**
-        * Filter the user admin URL for the current user.
+        * Filters the user admin URL for the current user.
         *
         * @since 3.1.0
         *
@@ -3355,15 +3391,16 @@ function user_admin_url( $path = '', $scheme = 'admin' ) {
 }
 
 /**
- * Retrieve the url to the admin area for either the current site or the network depending on context.
+ * Retrieves the URL to the admin area for either the current site or the network depending on context.
  *
  * @since 3.1.0
  *
- * @param string $path   Optional path relative to the admin url.
- * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
- * @return string Admin url link with optional path appended.
+ * @param string $path   Optional. Path relative to the admin URL. Default empty.
+ * @param string $scheme Optional. The scheme to use. Default is 'admin', which obeys force_ssl_admin()
+ *                       and is_ssl(). 'http' or 'https' can be passed to force those schemes.
+ * @return string Admin URL link with optional path appended.
  */
-function self_admin_url($path = '', $scheme = 'admin') {
+function self_admin_url( $path = '', $scheme = 'admin' ) {
        if ( is_network_admin() )
                return network_admin_url($path, $scheme);
        elseif ( is_user_admin() )
@@ -3378,7 +3415,7 @@ function self_admin_url($path = '', $scheme = 'admin') {
  * @since 3.4.0
  * @since 4.4.0 The 'rest' scheme was added.
  *
- * @param string      $url    Absolute url that includes a scheme
+ * @param string      $url    Absolute URL that includes a scheme
  * @param string|null $scheme Optional. Scheme to give $url. Currently 'http', 'https', 'login',
  *                            'login_post', 'admin', 'relative', 'rest', 'rpc', or null. Default null.
  * @return string $url URL with chosen scheme.
@@ -3407,7 +3444,7 @@ function set_url_scheme( $url, $scheme = null ) {
        }
 
        /**
-        * Filter the resulting URL after setting the scheme.
+        * Filters the resulting URL after setting the scheme.
         *
         * @since 3.4.0
         *
@@ -3420,18 +3457,20 @@ function set_url_scheme( $url, $scheme = null ) {
 }
 
 /**
- * Get the URL to the user's dashboard.
+ * Retrieves the URL to the user's dashboard.
  *
- * If a user does not belong to any site, the global user dashboard is used. If the user belongs to the current site,
- * the dashboard for the current site is returned. If the user cannot edit the current site, the dashboard to the user's
- * primary site is returned.
+ * If a user does not belong to any site, the global user dashboard is used. If the user
+ * belongs to the current site, the dashboard for the current site is returned. If the user
+ * cannot edit the current site, the dashboard to the user's primary site is returned.
  *
  * @since 3.1.0
  *
  * @param int    $user_id Optional. User ID. Defaults to current user.
- * @param string $path    Optional path relative to the dashboard. Use only paths known to both site and user admins.
- * @param string $scheme  The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
- * @return string Dashboard url link with optional path appended.
+ * @param string $path    Optional path relative to the dashboard. Use only paths known to
+ *                        both site and user admins. Default empty.
+ * @param string $scheme  The scheme to use. Default is 'admin', which obeys force_ssl_admin()
+ *                        and is_ssl(). 'http' or 'https' can be passed to force those schemes.
+ * @return string Dashboard URL link with optional path appended.
  */
 function get_dashboard_url( $user_id = 0, $path = '', $scheme = 'admin' ) {
        $user_id = $user_id ? (int) $user_id : get_current_user_id();
@@ -3455,7 +3494,7 @@ function get_dashboard_url( $user_id = 0, $path = '', $scheme = 'admin' ) {
        }
 
        /**
-        * Filter the dashboard URL for a user.
+        * Filters the dashboard URL for a user.
         *
         * @since 3.1.0
         *
@@ -3469,14 +3508,14 @@ function get_dashboard_url( $user_id = 0, $path = '', $scheme = 'admin' ) {
 }
 
 /**
- * Get the URL to the user's profile editor.
+ * Retrieves the URL to the user's profile editor.
  *
  * @since 3.1.0
  *
  * @param int    $user_id Optional. User ID. Defaults to current user.
- * @param string $scheme  The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl().
- *                        'http' or 'https' can be passed to force those schemes.
- * @return string Dashboard url link with optional path appended.
+ * @param string $scheme  Optional. The scheme to use. Default is 'admin', which obeys force_ssl_admin()
+ *                        and is_ssl(). 'http' or 'https' can be passed to force those schemes.
+ * @return string Dashboard URL link with optional path appended.
  */
 function get_edit_profile_url( $user_id = 0, $scheme = 'admin' ) {
        $user_id = $user_id ? (int) $user_id : get_current_user_id();
@@ -3489,7 +3528,7 @@ function get_edit_profile_url( $user_id = 0, $scheme = 'admin' ) {
                $url = get_dashboard_url( $user_id, 'profile.php', $scheme );
 
        /**
-        * Filter the URL for a user's profile editor.
+        * Filters the URL for a user's profile editor.
         *
         * @since 3.1.0
         *
@@ -3502,58 +3541,105 @@ function get_edit_profile_url( $user_id = 0, $scheme = 'admin' ) {
 }
 
 /**
- * Output rel=canonical for singular queries.
+ * Returns the canonical URL for a post.
+ *
+ * When the post is the same as the current requested page the function will handle the
+ * pagination arguments too.
+ *
+ * @since 4.6.0
+ *
+ * @param int|WP_Post $post Optional. Post ID or object. Default is global `$post`.
+ * @return string|false The canonical URL, or false if the post does not exist or has not
+ *                      been published yet.
+ */
+function wp_get_canonical_url( $post = null ) {
+       $post = get_post( $post );
+
+       if ( ! $post ) {
+               return false;
+       }
+
+       if ( 'publish' !== $post->post_status ) {
+               return false;
+       }
+
+       $canonical_url = get_permalink( $post );
+
+       // If a canonical is being generated for the current page, make sure it has pagination if needed.
+       if ( $post->ID === get_queried_object_id() ) {
+               $page = get_query_var( 'page', 0 );
+               if ( $page >= 2 ) {
+                       if ( '' == get_option( 'permalink_structure' ) ) {
+                               $canonical_url = add_query_arg( 'page', $page, $canonical_url );
+                       } else {
+                               $canonical_url = trailingslashit( $canonical_url ) . user_trailingslashit( $page, 'single_paged' );
+                       }
+               }
+
+               $cpage = get_query_var( 'cpage', 0 );
+               if ( $cpage ) {
+                       $canonical_url = get_comments_pagenum_link( $cpage );
+               }
+       }
+
+       /**
+        * Filters the canonical URL for a post.
+        *
+        * @since 4.6.0
+        *
+        * @param string  $string The post's canonical URL.
+        * @param WP_Post $post   Post object.
+        */
+       return apply_filters( 'get_canonical_url', $canonical_url, $post );
+}
+
+/**
+ * Outputs rel=canonical for singular queries.
  *
  * @since 2.9.0
+ * @since 4.6.0 Adjusted to use wp_get_canonical_url().
  */
 function rel_canonical() {
        if ( ! is_singular() ) {
                return;
        }
 
-       if ( ! $id = get_queried_object_id() ) {
+       $id = get_queried_object_id();
+
+       if ( 0 === $id ) {
                return;
        }
 
-       $url = get_permalink( $id );
-
-       $page = get_query_var( 'page' );
-       if ( $page >= 2 ) {
-               if ( '' == get_option( 'permalink_structure' ) ) {
-                       $url = add_query_arg( 'page', $page, $url );
-               } else {
-                       $url = trailingslashit( $url ) . user_trailingslashit( $page, 'single_paged' );
-               }
-       }
+       $url = wp_get_canonical_url( $id );
 
-       $cpage = get_query_var( 'cpage' );
-       if ( $cpage ) {
-               $url = get_comments_pagenum_link( $cpage );
+       if ( ! empty( $url ) ) {
+               echo '<link rel="canonical" href="' . esc_url( $url ) . '" />' . "\n";
        }
-       echo '<link rel="canonical" href="' . esc_url( $url ) . "\" />\n";
 }
 
 /**
- * Return a shortlink for a post, page, attachment, or a site.
+ * Returns a shortlink for a post, page, attachment, or site.
  *
- * This function exists to provide a shortlink tag that all themes and plugins can target. A plugin must hook in to
- * provide the actual shortlinks. Default shortlink support is limited to providing ?p= style links for posts.
- * Plugins can short-circuit this function via the pre_get_shortlink filter or filter the output
- * via the get_shortlink filter.
+ * This function exists to provide a shortlink tag that all themes and plugins can target.
+ * A plugin must hook in to provide the actual shortlinks. Default shortlink support is
+ * limited to providing ?p= style links for posts. Plugins can short-circuit this function
+ * via the {@see 'pre_get_shortlink'} filter or filter the output via the {@see 'get_shortlink'}
+ * filter.
  *
  * @since 3.0.0.
  *
- * @param int    $id          A post or site id. Default is 0, which means the current post or site.
- * @param string $context     Whether the id is a 'site' id, 'post' id, or 'media' id.
- *                            If 'post', the post_type of the post is consulted.
- *                            If 'query', the current query is consulted to determine the id and context.
- *                            Default is 'post'.
- * @param bool   $allow_slugs Whether to allow post slugs in the shortlink. It is up to the plugin how and whether to honor this.
- * @return string A shortlink or an empty string if no shortlink exists for the requested resource or if shortlinks are not enabled.
+ * @param int    $id          Optional. A post or site id. Default is 0, which means the current post or site.
+ * @param string $context     Optional. Whether the id is a 'site' id, 'post' id, or 'media' id. If 'post',
+ *                            the post_type of the post is consulted. If 'query', the current query is consulted
+ *                            to determine the id and context. Default 'post'.
+ * @param bool   $allow_slugs Optional. Whether to allow post slugs in the shortlink. It is up to the plugin how
+ *                            and whether to honor this. Default true.
+ * @return string A shortlink or an empty string if no shortlink exists for the requested resource or if shortlinks
+ *                are not enabled.
  */
-function wp_get_shortlink($id = 0, $context = 'post', $allow_slugs = true) {
+function wp_get_shortlink( $id = 0, $context = 'post', $allow_slugs = true ) {
        /**
-        * Filter whether to preempt generating a shortlink for the given post.
+        * Filters whether to preempt generating a shortlink for the given post.
         *
         * Passing a truthy value to the filter will effectively short-circuit the
         * shortlink-generation process, returning that value instead.
@@ -3595,7 +3681,7 @@ function wp_get_shortlink($id = 0, $context = 'post', $allow_slugs = true) {
        }
 
        /**
-        * Filter the shortlink for a post.
+        * Filters the shortlink for a post.
         *
         * @since 3.0.0
         *
@@ -3608,9 +3694,9 @@ function wp_get_shortlink($id = 0, $context = 'post', $allow_slugs = true) {
 }
 
 /**
- *  Inject rel=shortlink into head if a shortlink is defined for the current page.
+ * Injects rel=shortlink into the head if a shortlink is defined for the current page.
  *
- *  Attached to the wp_head action.
+ * Attached to the {@see 'wp_head'} action.
  *
  * @since 3.0.0
  */
@@ -3624,9 +3710,9 @@ function wp_shortlink_wp_head() {
 }
 
 /**
- * Send a Link: rel=shortlink header if a shortlink is defined for the current page.
+ * Sends a Link: rel=shortlink header if a shortlink is defined for the current page.
  *
- * Attached to the wp action.
+ * Attached to the {@see 'wp'} action.
  *
  * @since 3.0.0
  */
@@ -3643,18 +3729,18 @@ function wp_shortlink_header() {
 }
 
 /**
- * Display the Short Link for a Post
+ * Displays the shortlink for a post.
  *
  * Must be called from inside "The Loop"
  *
- * Call like the_shortlink(__('Shortlinkage FTW'))
+ * Call like the_shortlink( __( 'Shortlinkage FTW' ) )
  *
  * @since 3.0.0
  *
  * @param string $text   Optional The link text or HTML to be displayed. Defaults to 'This is the short link.'
  * @param string $title  Optional The tooltip for the link. Must be sanitized. Defaults to the sanitized post title.
- * @param string $before Optional HTML to display before the link.
- * @param string $after  Optional HTML to display after the link.
+ * @param string $before Optional HTML to display before the link. Default empty.
+ * @param string $after  Optional HTML to display after the link. Default empty.
  */
 function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) {
        $post = get_post();
@@ -3671,7 +3757,7 @@ function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) {
                $link = '<a rel="shortlink" href="' . esc_url( $shortlink ) . '" title="' . $title . '">' . $text . '</a>';
 
                /**
-                * Filter the shortlink anchor tag for a post.
+                * Filters the short link anchor tag for a post.
                 *
                 * @since 3.0.0
                 *
@@ -3687,7 +3773,7 @@ function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) {
 
 
 /**
- * Retrieve the avatar URL.
+ * Retrieves the avatar URL.
  *
  * @since 4.2.0
  *
@@ -3719,7 +3805,7 @@ function get_avatar_url( $id_or_email, $args = null ) {
 }
 
 /**
- * Retrieve default data about the avatar.
+ * Retrieves default data about the avatar.
  *
  * @since 4.2.0
  *
@@ -3816,7 +3902,7 @@ function get_avatar_data( $id_or_email, $args = null ) {
        $args['found_avatar'] = false;
 
        /**
-        * Filter whether to retrieve the avatar URL early.
+        * Filters whether to retrieve the avatar URL early.
         *
         * Passing a non-null value in the 'url' member of the return array will
         * effectively short circuit get_avatar_data(), passing the value through
@@ -3861,7 +3947,7 @@ function get_avatar_data( $id_or_email, $args = null ) {
                $user = get_user_by( 'id', (int) $id_or_email->post_author );
        } elseif ( $id_or_email instanceof WP_Comment ) {
                /**
-                * Filter the list of allowed comment types for retrieving avatars.
+                * Filters the list of allowed comment types for retrieving avatars.
                 *
                 * @since 3.0.0
                 *
@@ -3918,7 +4004,7 @@ function get_avatar_data( $id_or_email, $args = null ) {
        );
 
        /**
-        * Filter the avatar URL.
+        * Filters the avatar URL.
         *
         * @since 4.2.0
         *
@@ -3930,7 +4016,7 @@ function get_avatar_data( $id_or_email, $args = null ) {
        $args['url'] = apply_filters( 'get_avatar_url', $url, $id_or_email, $args );
 
        /**
-        * Filter the avatar data.
+        * Filters the avatar data.
         *
         * @since 4.2.0
         *
index a6135be121b5584ec53e3c7bdcbcd74ced74a138..11c36fda977063f42d3ba44815fd6630d4cdce18 100644 (file)
@@ -184,6 +184,23 @@ function wp_maintenance() {
        if ( ( time() - $upgrading ) >= 600 )
                return;
 
+       /**
+        * Filters whether to enable maintenance mode.
+        *
+        * This filter runs before it can be used by plugins. It is designed for
+        * non-web runtimes. If this filter returns true, maintenance mode will be
+        * active and the request will end. If false, the request will be allowed to
+        * continue processing even if maintenance mode should be active.
+        *
+        * @since 4.6.0
+        *
+        * @param bool $enable_checks Whether to enable maintenance mode. Default true.
+        * @param int  $upgrading     The timestamp set in the .maintenance file.
+        */
+       if ( ! apply_filters( 'enable_maintenance_mode', true, $upgrading ) ) {
+               return;
+       }
+
        if ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) {
                require_once( WP_CONTENT_DIR . '/maintenance.php' );
                die();
@@ -285,6 +302,22 @@ function timer_stop( $display = 0, $precision = 3 ) {
  * @access private
  */
 function wp_debug_mode() {
+       /**
+        * Filters whether to allow the debug mode check to occur.
+        *
+        * This filter runs before it can be used by plugins. It is designed for
+        * non-web run-times. Returning false causes the `WP_DEBUG` and related
+        * constants to not be checked and the default php values for errors
+        * will be used unless you take care to update them yourself.
+        *
+        * @since 4.6.0
+        *
+        * @param bool $enable_debug_mode Whether to enable debug mode checks to occur. Default true.
+        */
+       if ( ! apply_filters( 'enable_wp_debug_mode_checks', true ) ){
+               return;
+       }
+
        if ( WP_DEBUG ) {
                error_reporting( E_ALL );
 
@@ -331,7 +364,7 @@ function wp_set_lang_dir() {
                         */
                        define( 'WP_LANG_DIR', WP_CONTENT_DIR . '/languages' );
                        if ( !defined( 'LANGDIR' ) ) {
-                               // Old static relative path maintained for limited backwards compatibility - won't work in some cases
+                               // Old static relative path maintained for limited backward compatibility - won't work in some cases.
                                define( 'LANGDIR', 'wp-content/languages' );
                        }
                } else {
@@ -344,7 +377,7 @@ function wp_set_lang_dir() {
                         */
                        define( 'WP_LANG_DIR', ABSPATH . WPINC . '/languages' );
                        if ( !defined( 'LANGDIR' ) ) {
-                               // Old relative path maintained for backwards compatibility
+                               // Old relative path maintained for backward compatibility.
                                define( 'LANGDIR', WPINC . '/languages' );
                        }
                }
@@ -476,8 +509,8 @@ function wp_start_object_cache() {
                wp_cache_init();
 
        if ( function_exists( 'wp_cache_add_global_groups' ) ) {
-               wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites' ) );
-               wp_cache_add_non_persistent_groups( array( 'comment', 'counts', 'plugins' ) );
+               wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'site-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites' ) );
+               wp_cache_add_non_persistent_groups( array( 'counts', 'plugins' ) );
        }
 }
 
@@ -558,7 +591,7 @@ function wp_get_active_and_valid_plugins() {
 
        // Check for hacks file if the option is enabled
        if ( get_option( 'hack_file' ) && file_exists( ABSPATH . 'my-hacks.php' ) ) {
-               _deprecated_file( 'my-hacks.php', '1.5' );
+               _deprecated_file( 'my-hacks.php', '1.5.0' );
                array_unshift( $plugins, ABSPATH . 'my-hacks.php' );
        }
 
@@ -657,7 +690,7 @@ function wp_clone( $object ) {
 /**
  * Whether the current request is for an administrative interface page.
  *
- * Does not check if the user is an administrator; {@see current_user_can()}
+ * Does not check if the user is an administrator; current_user_can()
  * for checking roles and capabilities.
  *
  * @since 1.5.1
@@ -680,7 +713,7 @@ function is_admin() {
  *
  * e.g. `/wp-admin/`
  *
- * Does not check if the user is an administrator; {@see current_user_can()}
+ * Does not check if the user is an administrator; current_user_can()
  * for checking roles and capabilities.
  *
  * @since 3.1.0
@@ -703,7 +736,7 @@ function is_blog_admin() {
  *
  * e.g. `/wp-admin/network/`
  *
- * Does not check if the user is an administrator; {@see current_user_can()}
+ * Does not check if the user is an administrator; current_user_can()
  * for checking roles and capabilities.
  *
  * @since 3.1.0
@@ -728,7 +761,7 @@ function is_network_admin() {
  *
  * Does not inform on whether the user is an admin! Use capability
  * checks to tell if the user should be accessing a section or not
- * {@see current_user_can()}.
+ * current_user_can().
  *
  * @since 3.1.0
  *
@@ -776,6 +809,29 @@ function get_current_blog_id() {
        return absint($blog_id);
 }
 
+/**
+ * Retrieves the current network ID.
+ *
+ * @since 4.6.0
+ *
+ * @global WP_Network $current_site The current network.
+ *
+ * @return int The ID of the current network.
+ */
+function get_current_network_id() {
+       if ( ! is_multisite() ) {
+               return 1;
+       }
+
+       $current_site = get_current_site();
+
+       if ( ! isset( $current_site->id ) ) {
+               return get_main_network_id();
+       }
+
+       return absint( $current_site->id );
+}
+
 /**
  * Attempt an early load of translations.
  *
@@ -895,3 +951,79 @@ function wp_installing( $is_installing = null ) {
 
        return (bool) $installing;
 }
+
+/**
+ * Determines if SSL is used.
+ *
+ * @since 2.6.0
+ * @since 4.6.0 Moved from functions.php to load.php.
+ *
+ * @return bool True if SSL, otherwise false.
+ */
+function is_ssl() {
+       if ( isset( $_SERVER['HTTPS'] ) ) {
+               if ( 'on' == strtolower( $_SERVER['HTTPS'] ) ) {
+                       return true;
+               }
+
+               if ( '1' == $_SERVER['HTTPS'] ) {
+                       return true;
+               }
+       } elseif ( isset($_SERVER['SERVER_PORT'] ) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
+               return true;
+       }
+       return false;
+}
+
+/**
+ * Converts a shorthand byte value to an integer byte value.
+ *
+ * @since 2.3.0
+ * @since 4.6.0 Moved from media.php to load.php.
+ *
+ * @link http://php.net/manual/en/function.ini-get.php
+ * @link http://php.net/manual/en/faq.using.php#faq.using.shorthandbytes
+ *
+ * @param string $value A (PHP ini) byte value, either shorthand or ordinary.
+ * @return int An integer byte value.
+ */
+function wp_convert_hr_to_bytes( $value ) {
+       $value = strtolower( trim( $value ) );
+       $bytes = (int) $value;
+
+       if ( false !== strpos( $value, 'g' ) ) {
+               $bytes *= GB_IN_BYTES;
+       } elseif ( false !== strpos( $value, 'm' ) ) {
+               $bytes *= MB_IN_BYTES;
+       } elseif ( false !== strpos( $value, 'k' ) ) {
+               $bytes *= KB_IN_BYTES;
+       }
+
+       // Deal with large (float) values which run into the maximum integer size.
+       return min( $bytes, PHP_INT_MAX );
+}
+
+/**
+ * Determines whether a PHP ini value is changeable at runtime.
+ *
+ * @since 4.6.0
+ *
+ * @link http://php.net/manual/en/function.ini-get-all.php
+ *
+ * @param string $setting The name of the ini setting to check.
+ * @return bool True if the value is changeable at runtime. False otherwise.
+ */
+function wp_is_ini_value_changeable( $setting ) {
+       static $ini_all;
+
+       if ( ! isset( $ini_all ) ) {
+               $ini_all = ini_get_all();
+       }
+
+       // Bit operator to workaround https://bugs.php.net/bug.php?id=44936 which changes access level to 63 in PHP 5.2.6 - 5.2.17.
+       if ( isset( $ini_all[ $setting ]['access'] ) && ( INI_ALL === ( $ini_all[ $setting ]['access'] & 7 ) || INI_USER === ( $ini_all[ $setting ]['access'] & 7 ) ) ) {
+               return true;
+       }
+
+       return false;
+}
index cfca86e8a16fc9260e33f573dacb2fac03cf6e9a..b8ad4637216520d4d4dee3a4f7bfaaa86cd6ede6 100644 (file)
 <?php
 /**
- * Date and Time Locale object
+ * Locale API
  *
  * @package WordPress
  * @subpackage i18n
+ * @since 1.2.0
  */
 
-/**
- * Class that loads the calendar locale.
- *
- * @since 2.1.0
- */
-class WP_Locale {
-       /**
-        * Stores the translated strings for the full weekday names.
-        *
-        * @since 2.1.0
-        * @var array
-        */
-       public $weekday;
-
-       /**
-        * Stores the translated strings for the one character weekday names.
-        *
-        * There is a hack to make sure that Tuesday and Thursday, as well
-        * as Sunday and Saturday, don't conflict. See init() method for more.
-        *
-        * @see WP_Locale::init() for how to handle the hack.
-        *
-        * @since 2.1.0
-        * @var array
-        */
-       public $weekday_initial;
-
-       /**
-        * Stores the translated strings for the abbreviated weekday names.
-        *
-        * @since 2.1.0
-        * @var array
-        */
-       public $weekday_abbrev;
-
-       /**
-        * Stores the default start of the week.
-        *
-        * @since 4.4.0
-        * @var string
-        */
-       public $start_of_week;
-
-       /**
-        * Stores the translated strings for the full month names.
-        *
-        * @since 2.1.0
-        * @var array
-        */
-       public $month;
-
-       /**
-        * Stores the translated strings for the abbreviated month names.
-        *
-        * @since 2.1.0
-        * @var array
-        */
-       public $month_abbrev;
-
-       /**
-        * Stores the translated strings for 'am' and 'pm'.
-        *
-        * Also the capitalized versions.
-        *
-        * @since 2.1.0
-        * @var array
-        */
-       public $meridiem;
-
-       /**
-        * The text direction of the locale language.
-        *
-        * Default is left to right 'ltr'.
-        *
-        * @since 2.1.0
-        * @var string
-        */
-       public $text_direction = 'ltr';
-
-       /**
-        * The thousands separator and decimal point values used for localizing numbers.
-        *
-        * @since 2.3.0
-        * @access public
-        * @var array
-        */
-       public $number_format;
-
-       /**
-        * Sets up the translated strings and object properties.
-        *
-        * The method creates the translatable strings for various
-        * calendar elements. Which allows for specifying locale
-        * specific calendar names and text direction.
-        *
-        * @since 2.1.0
-        * @access private
-        *
-        * @global string $text_direction
-        * @global string $wp_version
-        */
-       public function init() {
-               // The Weekdays
-               $this->weekday[0] = /* translators: weekday */ __('Sunday');
-               $this->weekday[1] = /* translators: weekday */ __('Monday');
-               $this->weekday[2] = /* translators: weekday */ __('Tuesday');
-               $this->weekday[3] = /* translators: weekday */ __('Wednesday');
-               $this->weekday[4] = /* translators: weekday */ __('Thursday');
-               $this->weekday[5] = /* translators: weekday */ __('Friday');
-               $this->weekday[6] = /* translators: weekday */ __('Saturday');
-
-               // The first letter of each day.
-               $this->weekday_initial[ __( 'Sunday' ) ]    = /* translators: one-letter abbreviation of the weekday */ _x( 'S', 'Sunday initial' );
-               $this->weekday_initial[ __( 'Monday' ) ]    = /* translators: one-letter abbreviation of the weekday */ _x( 'M', 'Monday initial' );
-               $this->weekday_initial[ __( 'Tuesday' ) ]   = /* translators: one-letter abbreviation of the weekday */ _x( 'T', 'Tuesday initial' );
-               $this->weekday_initial[ __( 'Wednesday' ) ] = /* translators: one-letter abbreviation of the weekday */ _x( 'W', 'Wednesday initial' );
-               $this->weekday_initial[ __( 'Thursday' ) ]  = /* translators: one-letter abbreviation of the weekday */ _x( 'T', 'Thursday initial' );
-               $this->weekday_initial[ __( 'Friday' ) ]    = /* translators: one-letter abbreviation of the weekday */ _x( 'F', 'Friday initial' );
-               $this->weekday_initial[ __( 'Saturday' ) ]  = /* translators: one-letter abbreviation of the weekday */ _x( 'S', 'Saturday initial' );
-
-               // Abbreviations for each day.
-               $this->weekday_abbrev[__('Sunday')]    = /* translators: three-letter abbreviation of the weekday */ __('Sun');
-               $this->weekday_abbrev[__('Monday')]    = /* translators: three-letter abbreviation of the weekday */ __('Mon');
-               $this->weekday_abbrev[__('Tuesday')]   = /* translators: three-letter abbreviation of the weekday */ __('Tue');
-               $this->weekday_abbrev[__('Wednesday')] = /* translators: three-letter abbreviation of the weekday */ __('Wed');
-               $this->weekday_abbrev[__('Thursday')]  = /* translators: three-letter abbreviation of the weekday */ __('Thu');
-               $this->weekday_abbrev[__('Friday')]    = /* translators: three-letter abbreviation of the weekday */ __('Fri');
-               $this->weekday_abbrev[__('Saturday')]  = /* translators: three-letter abbreviation of the weekday */ __('Sat');
-
-               // The Months
-               $this->month['01'] = /* translators: month name */ __( 'January' );
-               $this->month['02'] = /* translators: month name */ __( 'February' );
-               $this->month['03'] = /* translators: month name */ __( 'March' );
-               $this->month['04'] = /* translators: month name */ __( 'April' );
-               $this->month['05'] = /* translators: month name */ __( 'May' );
-               $this->month['06'] = /* translators: month name */ __( 'June' );
-               $this->month['07'] = /* translators: month name */ __( 'July' );
-               $this->month['08'] = /* translators: month name */ __( 'August' );
-               $this->month['09'] = /* translators: month name */ __( 'September' );
-               $this->month['10'] = /* translators: month name */ __( 'October' );
-               $this->month['11'] = /* translators: month name */ __( 'November' );
-               $this->month['12'] = /* translators: month name */ __( 'December' );
-
-               // The Months, genitive
-               $this->month_genitive['01'] = /* translators: month name, genitive */ _x( 'January', 'genitive' );
-               $this->month_genitive['02'] = /* translators: month name, genitive */ _x( 'February', 'genitive' );
-               $this->month_genitive['03'] = /* translators: month name, genitive */ _x( 'March', 'genitive' );
-               $this->month_genitive['04'] = /* translators: month name, genitive */ _x( 'April', 'genitive' );
-               $this->month_genitive['05'] = /* translators: month name, genitive */ _x( 'May', 'genitive' );
-               $this->month_genitive['06'] = /* translators: month name, genitive */ _x( 'June', 'genitive' );
-               $this->month_genitive['07'] = /* translators: month name, genitive */ _x( 'July', 'genitive' );
-               $this->month_genitive['08'] = /* translators: month name, genitive */ _x( 'August', 'genitive' );
-               $this->month_genitive['09'] = /* translators: month name, genitive */ _x( 'September', 'genitive' );
-               $this->month_genitive['10'] = /* translators: month name, genitive */ _x( 'October', 'genitive' );
-               $this->month_genitive['11'] = /* translators: month name, genitive */ _x( 'November', 'genitive' );
-               $this->month_genitive['12'] = /* translators: month name, genitive */ _x( 'December', 'genitive' );
-
-               // Abbreviations for each month.
-               $this->month_abbrev[ __( 'January' ) ]   = /* translators: three-letter abbreviation of the month */ _x( 'Jan', 'January abbreviation' );
-               $this->month_abbrev[ __( 'February' ) ]  = /* translators: three-letter abbreviation of the month */ _x( 'Feb', 'February abbreviation' );
-               $this->month_abbrev[ __( 'March' ) ]     = /* translators: three-letter abbreviation of the month */ _x( 'Mar', 'March abbreviation' );
-               $this->month_abbrev[ __( 'April' ) ]     = /* translators: three-letter abbreviation of the month */ _x( 'Apr', 'April abbreviation' );
-               $this->month_abbrev[ __( 'May' ) ]       = /* translators: three-letter abbreviation of the month */ _x( 'May', 'May abbreviation' );
-               $this->month_abbrev[ __( 'June' ) ]      = /* translators: three-letter abbreviation of the month */ _x( 'Jun', 'June abbreviation' );
-               $this->month_abbrev[ __( 'July' ) ]      = /* translators: three-letter abbreviation of the month */ _x( 'Jul', 'July abbreviation' );
-               $this->month_abbrev[ __( 'August' ) ]    = /* translators: three-letter abbreviation of the month */ _x( 'Aug', 'August abbreviation' );
-               $this->month_abbrev[ __( 'September' ) ] = /* translators: three-letter abbreviation of the month */ _x( 'Sep', 'September abbreviation' );
-               $this->month_abbrev[ __( 'October' ) ]   = /* translators: three-letter abbreviation of the month */ _x( 'Oct', 'October abbreviation' );
-               $this->month_abbrev[ __( 'November' ) ]  = /* translators: three-letter abbreviation of the month */ _x( 'Nov', 'November abbreviation' );
-               $this->month_abbrev[ __( 'December' ) ]  = /* translators: three-letter abbreviation of the month */ _x( 'Dec', 'December abbreviation' );
-
-               // The Meridiems
-               $this->meridiem['am'] = __('am');
-               $this->meridiem['pm'] = __('pm');
-               $this->meridiem['AM'] = __('AM');
-               $this->meridiem['PM'] = __('PM');
-
-               // Numbers formatting
-               // See http://php.net/number_format
-
-               /* translators: $thousands_sep argument for http://php.net/number_format, default is , */
-               $thousands_sep = __( 'number_format_thousands_sep' );
-
-               if ( version_compare( PHP_VERSION, '5.4', '>=' ) ) {
-                       // Replace space with a non-breaking space to avoid wrapping.
-                       $thousands_sep = str_replace( ' ', '&nbsp;', $thousands_sep );
-               } else {
-                       // PHP < 5.4.0 does not support multiple bytes in thousands separator.
-                       $thousands_sep = str_replace( array( '&nbsp;', '&#160;' ), ' ', $thousands_sep );
-               }
-
-               $this->number_format['thousands_sep'] = ( 'number_format_thousands_sep' === $thousands_sep ) ? ',' : $thousands_sep;
-
-               /* translators: $dec_point argument for http://php.net/number_format, default is . */
-               $decimal_point = __( 'number_format_decimal_point' );
-
-               $this->number_format['decimal_point'] = ( 'number_format_decimal_point' === $decimal_point ) ? '.' : $decimal_point;
-
-               // Set text direction.
-               if ( isset( $GLOBALS['text_direction'] ) )
-                       $this->text_direction = $GLOBALS['text_direction'];
-               /* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */
-               elseif ( 'rtl' == _x( 'ltr', 'text direction' ) )
-                       $this->text_direction = 'rtl';
-
-               if ( 'rtl' === $this->text_direction && strpos( $GLOBALS['wp_version'], '-src' ) ) {
-                       $this->text_direction = 'ltr';
-                       add_action( 'all_admin_notices', array( $this, 'rtl_src_admin_notice' ) );
-               }
-       }
-
-       /**
-        * Outputs an admin notice if the /build directory must be used for RTL.
-        *
-        * @since 3.8.0
-        * @access public
-        */
-       public function rtl_src_admin_notice() {
-               /* translators: %s: Name of the directory (build) */
-               echo '<div class="error"><p>' . sprintf( __( 'The %s directory of the develop repository must be used for RTL.' ), '<code>build</code>' ) . '</p></div>';
-       }
-
-       /**
-        * Retrieve the full translated weekday word.
-        *
-        * Week starts on translated Sunday and can be fetched
-        * by using 0 (zero). So the week starts with 0 (zero)
-        * and ends on Saturday with is fetched by using 6 (six).
-        *
-        * @since 2.1.0
-        * @access public
-        *
-        * @param int $weekday_number 0 for Sunday through 6 Saturday
-        * @return string Full translated weekday
-        */
-       public function get_weekday($weekday_number) {
-               return $this->weekday[$weekday_number];
-       }
-
-       /**
-        * Retrieve the translated weekday initial.
-        *
-        * The weekday initial is retrieved by the translated
-        * full weekday word. When translating the weekday initial
-        * pay attention to make sure that the starting letter does
-        * not conflict.
-        *
-        * @since 2.1.0
-        * @access public
-        *
-        * @param string $weekday_name
-        * @return string
-        */
-       public function get_weekday_initial($weekday_name) {
-               return $this->weekday_initial[$weekday_name];
-       }
-
-       /**
-        * Retrieve the translated weekday abbreviation.
-        *
-        * The weekday abbreviation is retrieved by the translated
-        * full weekday word.
-        *
-        * @since 2.1.0
-        * @access public
-        *
-        * @param string $weekday_name Full translated weekday word
-        * @return string Translated weekday abbreviation
-        */
-       public function get_weekday_abbrev($weekday_name) {
-               return $this->weekday_abbrev[$weekday_name];
-       }
-
-       /**
-        * Retrieve the full translated month by month number.
-        *
-        * The $month_number parameter has to be a string
-        * because it must have the '0' in front of any number
-        * that is less than 10. Starts from '01' and ends at
-        * '12'.
-        *
-        * You can use an integer instead and it will add the
-        * '0' before the numbers less than 10 for you.
-        *
-        * @since 2.1.0
-        * @access public
-        *
-        * @param string|int $month_number '01' through '12'
-        * @return string Translated full month name
-        */
-       public function get_month($month_number) {
-               return $this->month[zeroise($month_number, 2)];
-       }
-
-       /**
-        * Retrieve translated version of month abbreviation string.
-        *
-        * The $month_name parameter is expected to be the translated or
-        * translatable version of the month.
-        *
-        * @since 2.1.0
-        * @access public
-        *
-        * @param string $month_name Translated month to get abbreviated version
-        * @return string Translated abbreviated month
-        */
-       public function get_month_abbrev($month_name) {
-               return $this->month_abbrev[$month_name];
-       }
-
-       /**
-        * Retrieve translated version of meridiem string.
-        *
-        * The $meridiem parameter is expected to not be translated.
-        *
-        * @since 2.1.0
-        * @access public
-        *
-        * @param string $meridiem Either 'am', 'pm', 'AM', or 'PM'. Not translated version.
-        * @return string Translated version
-        */
-       public function get_meridiem($meridiem) {
-               return $this->meridiem[$meridiem];
-       }
-
-       /**
-        * Global variables are deprecated. For backwards compatibility only.
-        *
-        * @deprecated For backwards compatibility only.
-        * @access private
-        *
-        * @global array $weekday
-        * @global array $weekday_initial
-        * @global array $weekday_abbrev
-        * @global array $month
-        * @global array $month_abbrev
-        *
-        * @since 2.1.0
-        */
-       public function register_globals() {
-               $GLOBALS['weekday']         = $this->weekday;
-               $GLOBALS['weekday_initial'] = $this->weekday_initial;
-               $GLOBALS['weekday_abbrev']  = $this->weekday_abbrev;
-               $GLOBALS['month']           = $this->month;
-               $GLOBALS['month_abbrev']    = $this->month_abbrev;
-       }
-
-       /**
-        * Constructor which calls helper methods to set up object variables
-        *
-        * @since 2.1.0
-        */
-       public function __construct() {
-               $this->init();
-               $this->register_globals();
-       }
-
-       /**
-        * Checks if current locale is RTL.
-        *
-        * @since 3.0.0
-        * @return bool Whether locale is RTL.
-        */
-       public function is_rtl() {
-               return 'rtl' == $this->text_direction;
-       }
-
-       /**
-        * Register date/time format strings for general POT.
-        *
-        * Private, unused method to add some date/time formats translated
-        * on wp-admin/options-general.php to the general POT that would
-        * otherwise be added to the admin POT.
-        *
-        * @since 3.6.0
-        */
-       public function _strings_for_pot() {
-               /* translators: localized date format, see http://php.net/date */
-               __( 'F j, Y' );
-               /* translators: localized time format, see http://php.net/date */
-               __( 'g:i a' );
-               /* translators: localized date and time format, see http://php.net/date */
-               __( 'F j, Y g:i a' );
-       }
-}
+/** WP_Locale class */
+require_once ABSPATH . WPINC . '/class-wp-locale.php';
 
 /**
  * Checks if current locale is RTL.
index 8d7c758c500aeeec6ab48adf92b7ca3b31a6f2f5..7d2d2bf48b389daee87ab5c7731e85dedd6fa5b8 100644 (file)
@@ -1232,23 +1232,23 @@ function wp_print_media_templates() {
        </script>
 
        <script type="text/html" id="tmpl-crop-content">
-               <img class="crop-image" src="{{ data.url }}" alt="">
+               <img class="crop-image" src="{{ data.url }}" alt="<?php esc_attr_e( 'Image crop area preview. Requires mouse interaction.' ); ?>">
                <div class="upload-errors"></div>
        </script>
 
        <script type="text/html" id="tmpl-site-icon-preview">
                <h2><?php _e( 'Preview' ); ?></h2>
-               <strong><?php _e( 'As a browser icon' ); ?></strong>
+               <strong aria-hidden="true"><?php _e( 'As a browser icon' ); ?></strong>
                <div class="favicon-preview">
-                       <img src="images/browser.png" class="browser-preview" width="182" height="" alt="" />
+                       <img src="<?php echo esc_url( admin_url( 'images/' . ( is_rtl() ? 'browser-rtl.png' : 'browser.png' ) ) ); ?>" class="browser-preview" width="182" height="" alt="" />
 
                        <div class="favicon">
                                <img id="preview-favicon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
                        </div>
-                       <span class="browser-title"><?php bloginfo( 'name' ); ?></span>
+                       <span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
                </div>
 
-               <strong><?php _e( 'As an app icon' ); ?></strong>
+               <strong aria-hidden="true"><?php _e( 'As an app icon' ); ?></strong>
                <div class="app-icon-preview">
                        <img id="preview-app-icon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
                </div>
index 9f35f798e1a90cbe43dd377cd6a1c4924bc5882f..bc7a90ced893918263f73892385af15935c09b70 100644 (file)
@@ -95,7 +95,7 @@ function image_constrain_size_for_editor( $width, $height, $size = 'medium', $co
        }
 
        /**
-        * Filter the maximum image size dimensions for the editor.
+        * Filters the maximum image size dimensions for the editor.
         *
         * @since 2.5.0
         *
@@ -148,7 +148,7 @@ function image_hwstring( $width, $height ) {
  * function won't create a new resized copy, it will just return an already
  * resized one if it exists.
  *
- * A plugin may use the 'image_downsize' filter to hook into and offer image
+ * A plugin may use the {@see 'image_downsize'} filter to hook into and offer image
  * resizing services for images. The hook must return an array with the same
  * elements that are returned in the function. The first element being the URL
  * to the new image that was resized.
@@ -168,7 +168,7 @@ function image_downsize( $id, $size = 'medium' ) {
                return false;
 
        /**
-        * Filter whether to preempt the output of image_downsize().
+        * Filters whether to preempt the output of image_downsize().
         *
         * Passing a truthy value to the filter will effectively short-circuit
         * down-sizing the image, returning that value as output instead.
@@ -309,12 +309,12 @@ function set_post_thumbnail_size( $width = 0, $height = 0, $crop = false ) {
 /**
  * Gets an img tag for an image attachment, scaling it down if requested.
  *
- * The filter 'get_image_tag_class' allows for changing the class name for the
+ * The {@see 'get_image_tag_class'} filter allows for changing the class name for the
  * image without having to use regular expressions on the HTML content. The
  * parameters are: what WordPress will use for the class, the Attachment ID,
  * image align value, and the size the image should be.
  *
- * The second filter 'get_image_tag' has the HTML content, which can then be
+ * The second filter, {@see 'get_image_tag'}, has the HTML content, which can then be
  * further manipulated by a plugin to change all attribute values and even HTML
  * content.
  *
@@ -339,7 +339,7 @@ function get_image_tag( $id, $alt, $title, $align, $size = 'medium' ) {
        $class = 'align' . esc_attr($align) .' size-' . esc_attr($size) . ' wp-image-' . $id;
 
        /**
-        * Filter the value of the attachment's image tag class attribute.
+        * Filters the value of the attachment's image tag class attribute.
         *
         * @since 2.6.0
         *
@@ -354,7 +354,7 @@ function get_image_tag( $id, $alt, $title, $align, $size = 'medium' ) {
        $html = '<img src="' . esc_attr($img_src) . '" alt="' . esc_attr($alt) . '" ' . $title . $hwstring . 'class="' . $class . '" />';
 
        /**
-        * Filter the HTML content for the image tag.
+        * Filters the HTML content for the image tag.
         *
         * @since 2.6.0
         *
@@ -431,7 +431,7 @@ function wp_constrain_dimensions( $current_width, $current_height, $max_width =
        }
 
        /**
-        * Filter dimensions to constrain down-sampled images to.
+        * Filters dimensions to constrain down-sampled images to.
         *
         * @since 4.1.0
         *
@@ -477,7 +477,7 @@ function image_resize_dimensions( $orig_w, $orig_h, $dest_w, $dest_h, $crop = fa
                return false;
 
        /**
-        * Filter whether to preempt calculating the image resize dimensions.
+        * Filters whether to preempt calculating the image resize dimensions.
         *
         * Passing a non-null value to the filter will effectively short-circuit
         * image_resize_dimensions(), returning that value instead.
@@ -562,7 +562,7 @@ function image_resize_dimensions( $orig_w, $orig_h, $dest_w, $dest_h, $crop = fa
  * Resizes an image to make a thumbnail or intermediate size.
  *
  * The returned array has the file size, the image width, and image height. The
- * filter 'image_make_intermediate_size' can be used to hook in and change the
+ * {@see 'image_make_intermediate_size'} filter can be used to hook in and change the
  * values of the returned array. The only parameter is the resized file path.
  *
  * @since 2.5.0
@@ -591,6 +591,36 @@ function image_make_intermediate_size( $file, $width, $height, $crop = false ) {
        return false;
 }
 
+/**
+ * Helper function to test if aspect ratios for two images match.
+ *
+ * @since 4.6.0
+ *
+ * @param int $source_width  Width of the first image in pixels.
+ * @param int $source_height Height of the first image in pixels.
+ * @param int $target_width  Width of the second image in pixels.
+ * @param int $target_height Height of the second image in pixels.
+ * @return bool True if aspect ratios match within 1px. False if not.
+ */
+function wp_image_matches_ratio( $source_width, $source_height, $target_width, $target_height ) {
+       /*
+        * To test for varying crops, we constrain the dimensions of the larger image
+        * to the dimensions of the smaller image and see if they match.
+        */
+       if ( $source_width > $target_width ) {
+               $constrained_size = wp_constrain_dimensions( $source_width, $source_height, $target_width );
+               $expected_size = array( $target_width, $target_height );
+       } else {
+               $constrained_size = wp_constrain_dimensions( $target_width, $target_height, $source_width );
+               $expected_size = array( $source_width, $source_height );
+       }
+
+       // If the image dimensions are within 1px of the expected size, we consider it a match.
+       $matched = ( abs( $constrained_size[0] - $expected_size[0] ) <= 1 && abs( $constrained_size[1] - $expected_size[1] ) <= 1 );
+
+       return $matched;
+}
+
 /**
  * Retrieves the image's intermediate size (resized) path, width, and height.
  *
@@ -623,64 +653,73 @@ function image_make_intermediate_size( $file, $width, $height, $crop = false ) {
  *     @type string $file   Image's path relative to uploads directory
  *     @type int    $width  Width of image
  *     @type int    $height Height of image
- *     @type string $path   Optional. Image's absolute filesystem path. Only returned if registered
- *                          size is passed to `$size` parameter.
- *     @type string $url    Optional. Image's URL. Only returned if registered size is passed to `$size`
- *                          parameter.
+ *     @type string $path   Image's absolute filesystem path.
+ *     @type string $url    Image's URL.
  * }
  */
 function image_get_intermediate_size( $post_id, $size = 'thumbnail' ) {
-       if ( !is_array( $imagedata = wp_get_attachment_metadata( $post_id ) ) )
+       if ( ! $size || ! is_array( $imagedata = wp_get_attachment_metadata( $post_id ) ) || empty( $imagedata['sizes'] )  ) {
                return false;
+       }
+
+       $data = array();
 
-       // get the best one for a specified set of dimensions
-       if ( is_array($size) && !empty($imagedata['sizes']) ) {
+       // Find the best match when '$size' is an array.
+       if ( is_array( $size ) ) {
                $candidates = array();
 
                foreach ( $imagedata['sizes'] as $_size => $data ) {
                        // If there's an exact match to an existing image size, short circuit.
                        if ( $data['width'] == $size[0] && $data['height'] == $size[1] ) {
-                               list( $data['width'], $data['height'] ) = image_constrain_size_for_editor( $data['width'], $data['height'], $size );
-
-                               /** This filter is documented in wp-includes/media.php */
-                               return apply_filters( 'image_get_intermediate_size', $data, $post_id, $size );
+                               $candidates[ $data['width'] * $data['height'] ] = $data;
+                               break;
                        }
-                       // If it's not an exact match but it's at least the dimensions requested.
+
+                       // If it's not an exact match, consider larger sizes with the same aspect ratio.
                        if ( $data['width'] >= $size[0] && $data['height'] >= $size[1] ) {
-                               $candidates[ $data['width'] * $data['height'] ] = $_size;
+                               // If '0' is passed to either size, we test ratios against the original file.
+                               if ( 0 === $size[0] || 0 === $size[1] ) {
+                                       $same_ratio = wp_image_matches_ratio( $data['width'], $data['height'], $imagedata['width'], $imagedata['height'] );
+                               } else {
+                                       $same_ratio = wp_image_matches_ratio( $data['width'], $data['height'], $size[0], $size[1] );
+                               }
+
+                               if ( $same_ratio ) {
+                                       $candidates[ $data['width'] * $data['height'] ] = $data;
+                               }
                        }
                }
 
                if ( ! empty( $candidates ) ) {
-                       // find for the smallest image not smaller than the desired size
-                       ksort( $candidates );
-                       foreach ( $candidates as $_size ) {
-                               $data = $imagedata['sizes'][$_size];
-
-                               // Skip images with unexpectedly divergent aspect ratios (crops)
-                               // First, we calculate what size the original image would be if constrained to a box the size of the current image in the loop
-                               $maybe_cropped = image_resize_dimensions($imagedata['width'], $imagedata['height'], $data['width'], $data['height'], false );
-                               // If the size doesn't match within one pixel, then it is of a different aspect ratio, so we skip it, unless it's the thumbnail size
-                               if ( 'thumbnail' != $_size &&
-                                 ( ! $maybe_cropped
-                                   || ( $maybe_cropped[4] != $data['width'] && $maybe_cropped[4] + 1 != $data['width'] )
-                                   || ( $maybe_cropped[5] != $data['height'] && $maybe_cropped[5] + 1 != $data['height'] )
-                                 ) ) {
-                                 continue;
-                               }
-                               // If we're still here, then we're going to use this size.
-                               list( $data['width'], $data['height'] ) = image_constrain_size_for_editor( $data['width'], $data['height'], $size );
-
-                               /** This filter is documented in wp-includes/media.php */
-                               return apply_filters( 'image_get_intermediate_size', $data, $post_id, $size );
+                       // Sort the array by size if we have more than one candidate.
+                       if ( 1 < count( $candidates ) ) {
+                               ksort( $candidates );
                        }
+
+                       $data = array_shift( $candidates );
+               /*
+                * When the size requested is smaller than the thumbnail dimensions, we
+                * fall back to the thumbnail size to maintain backwards compatibility with
+                * pre 4.6 versions of WordPress.
+                */
+               } elseif ( ! empty( $imagedata['sizes']['thumbnail'] ) && $imagedata['sizes']['thumbnail']['width'] >= $size[0] && $imagedata['sizes']['thumbnail']['width'] >= $size[1] ) {
+                       $data = $imagedata['sizes']['thumbnail'];
+               } else {
+                       return false;
                }
+
+               // Constrain the width and height attributes to the requested values.
+               list( $data['width'], $data['height'] ) = image_constrain_size_for_editor( $data['width'], $data['height'], $size );
+
+       } elseif ( ! empty( $imagedata['sizes'][ $size ] ) ) {
+               $data = $imagedata['sizes'][ $size ];
        }
 
-       if ( is_array($size) || empty($size) || empty($imagedata['sizes'][$size]) )
+       // If we still don't have a match at this point, return false.
+       if ( empty( $data ) ) {
                return false;
+       }
 
-       $data = $imagedata['sizes'][$size];
        // include the full filesystem path of the intermediate file
        if ( empty($data['path']) && !empty($data['file']) ) {
                $file_url = wp_get_attachment_url($post_id);
@@ -689,7 +728,7 @@ function image_get_intermediate_size( $post_id, $size = 'thumbnail' ) {
        }
 
        /**
-        * Filter the output of image_get_intermediate_size()
+        * Filters the output of image_get_intermediate_size()
         *
         * @since 4.4.0
         *
@@ -720,7 +759,7 @@ function get_intermediate_image_sizes() {
                $image_sizes = array_merge( $image_sizes, array_keys( $_wp_additional_image_sizes ) );
 
        /**
-        * Filter the list of intermediate image sizes.
+        * Filters the list of intermediate image sizes.
         *
         * @since 2.5.0
         *
@@ -767,7 +806,7 @@ function wp_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon
                }
        }
        /**
-        * Filter the image src result.
+        * Filters the image src result.
         *
         * @since 4.3.0
         *
@@ -840,7 +879,7 @@ function wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon = fa
                }
 
                /**
-                * Filter the list of attachment image attributes.
+                * Filters the list of attachment image attributes.
                 *
                 * @since 2.8.0
                 *
@@ -1008,7 +1047,7 @@ function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac
         * If src is an intermediate size GIF, the full size is excluded from srcset to keep a flattened GIF from becoming animated.
         */
        if ( ! isset( $image_sizes['thumbnail']['mime-type'] ) || 'image/gif' !== $image_sizes['thumbnail']['mime-type'] ) {
-               $image_sizes['full'] = array(
+               $image_sizes[] = array(
                        'width'  => $image_meta['width'],
                        'height' => $image_meta['height'],
                        'file'   => $image_basename,
@@ -1043,7 +1082,7 @@ function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac
        $image_edited = preg_match( '/-e[0-9]{13}/', wp_basename( $image_src ), $image_edit_hash );
 
        /**
-        * Filter the maximum image width to be included in a 'srcset' attribute.
+        * Filters the maximum image width to be included in a 'srcset' attribute.
         *
         * @since 4.4.0
         *
@@ -1085,28 +1124,15 @@ function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac
                }
 
                /*
-                * Filter out images that are wider than '$max_srcset_image_width' unless
+                * Filters out images that are wider than '$max_srcset_image_width' unless
                 * that file is in the 'src' attribute.
                 */
                if ( $max_srcset_image_width && $image['width'] > $max_srcset_image_width && ! $is_src ) {
                        continue;
                }
 
-               /**
-                * To check for varying crops, we calculate the expected size of the smaller
-                * image if the larger were constrained by the width of the smaller and then
-                * see if it matches what we're expecting.
-                */
-               if ( $image_width > $image['width'] ) {
-                       $constrained_size = wp_constrain_dimensions( $image_width, $image_height, $image['width'] );
-                       $expected_size = array( $image['width'], $image['height'] );
-               } else {
-                       $constrained_size = wp_constrain_dimensions( $image['width'], $image['height'], $image_width );
-                       $expected_size = array( $image_width, $image_height );
-               }
-
                // If the image dimensions are within 1px of the expected size, use it.
-               if ( abs( $constrained_size[0] - $expected_size[0] ) <= 1 && abs( $constrained_size[1] - $expected_size[1] ) <= 1 ) {
+               if ( wp_image_matches_ratio( $image_width, $image_height, $image['width'], $image['height'] ) ) {
                        // Add the URL, descriptor, and value to the sources array to be returned.
                        $source = array(
                                'url'        => $image_baseurl . $image['file'],
@@ -1124,7 +1150,7 @@ function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac
        }
 
        /**
-        * Filter an image's 'srcset' sources.
+        * Filters an image's 'srcset' sources.
         *
         * @since 4.4.0
         *
@@ -1142,7 +1168,7 @@ function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac
         * @param array  $size_array    Array of width and height values in pixels (in that order).
         * @param string $image_src     The 'src' of the image.
         * @param array  $image_meta    The image meta data as returned by 'wp_get_attachment_metadata()'.
-        * @param int    $attachment_id Image attachment ID or 0.
+        * @param int    $attachment_id Image attachment ID or 0.
         */
        $sources = apply_filters( 'wp_calculate_image_srcset', $sources, $size_array, $image_src, $image_meta, $attachment_id );
 
@@ -1154,7 +1180,7 @@ function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac
        $srcset = '';
 
        foreach ( $sources as $source ) {
-               $srcset .= $source['url'] . ' ' . $source['value'] . $source['descriptor'] . ', ';
+               $srcset .= str_replace( ' ', '%20', $source['url'] ) . ' ' . $source['value'] . $source['descriptor'] . ', ';
        }
 
        return rtrim( $srcset, ', ' );
@@ -1232,7 +1258,7 @@ function wp_calculate_image_sizes( $size, $image_src = null, $image_meta = null,
        $sizes = sprintf( '(max-width: %1$dpx) 100vw, %1$dpx', $width );
 
        /**
-        * Filter the output of 'wp_calculate_image_sizes()'.
+        * Filters the output of 'wp_calculate_image_sizes()'.
         *
         * @since 4.4.0
         *
@@ -1387,8 +1413,8 @@ function wp_image_add_srcset_and_sizes( $image, $image_meta, $attachment_id ) {
 /**
  * Adds a 'wp-post-image' class to post thumbnails. Internal use only.
  *
- * Uses the 'begin_fetch_post_thumbnail_html' and 'end_fetch_post_thumbnail_html' action hooks to
- * dynamically add/remove itself so as to only filter post thumbnails.
+ * Uses the {@see 'begin_fetch_post_thumbnail_html'} and {@see 'end_fetch_post_thumbnail_html'}
+ * action hooks to dynamically add/remove itself so as to only filter post thumbnails.
  *
  * @ignore
  * @since 2.9.0
@@ -1434,7 +1460,7 @@ add_shortcode('caption', 'img_caption_shortcode');
  * Builds the Caption shortcode output.
  *
  * Allows a plugin to replace the content that would otherwise be returned. The
- * filter is 'img_caption_shortcode' and passes an empty string, the attr
+ * filter is {@see 'img_caption_shortcode'} and passes an empty string, the attr
  * parameter and the content parameter values.
  *
  * The supported attributes for the shortcode are 'id', 'align', 'width', and
@@ -1467,7 +1493,7 @@ function img_caption_shortcode( $attr, $content = null ) {
        }
 
        /**
-        * Filter the default caption shortcode output.
+        * Filters the default caption shortcode output.
         *
         * If the filtered output isn't empty, it will be used instead of generating
         * the default caption template.
@@ -1506,7 +1532,7 @@ function img_caption_shortcode( $attr, $content = null ) {
        $width = $html5 ? $atts['width'] : ( 10 + $atts['width'] );
 
        /**
-        * Filter the width of an image's caption.
+        * Filters the width of an image's caption.
         *
         * By default, the caption is 10 pixels greater than the width of the image,
         * to prevent post content from running up against a floated image.
@@ -1589,7 +1615,7 @@ function gallery_shortcode( $attr ) {
        }
 
        /**
-        * Filter the default gallery shortcode output.
+        * Filters the default gallery shortcode output.
         *
         * If the filtered output isn't empty, it will be used instead of generating
         * the default gallery template.
@@ -1673,7 +1699,7 @@ function gallery_shortcode( $attr ) {
        $gallery_style = '';
 
        /**
-        * Filter whether to print default gallery styles.
+        * Filters whether to print default gallery styles.
         *
         * @since 3.1.0
         *
@@ -1707,7 +1733,7 @@ function gallery_shortcode( $attr ) {
        $gallery_div = "<div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}'>";
 
        /**
-        * Filter the default gallery shortcode CSS styles.
+        * Filters the default gallery shortcode CSS styles.
         *
         * @since 2.5.0
         *
@@ -1875,7 +1901,7 @@ function wp_playlist_shortcode( $attr ) {
        }
 
        /**
-        * Filter the playlist output.
+        * Filters the playlist output.
         *
         * Passing a non-empty value to the filter will short-circuit generation
         * of the default playlist output, returning the passed value instead.
@@ -2035,7 +2061,7 @@ function wp_playlist_shortcode( $attr ) {
 
        if ( 1 === $instance ) {
                /**
-                * Print and enqueue playlist scripts, styles, and JavaScript templates.
+                * Prints and enqueues playlist scripts, styles, and JavaScript templates.
                 *
                 * @since 3.9.0
                 *
@@ -2052,8 +2078,6 @@ function wp_playlist_shortcode( $attr ) {
                echo (int) $theme_width;
        ?>"<?php if ( 'video' === $safe_type ):
                echo ' height="', (int) $theme_height, '"';
-       else:
-               echo ' style="visibility: hidden"';
        endif; ?>></<?php echo $safe_type ?>>
        <div class="wp-playlist-next"></div>
        <div class="wp-playlist-prev"></div>
@@ -2081,7 +2105,7 @@ add_shortcode( 'playlist', 'wp_playlist_shortcode' );
  */
 function wp_mediaelement_fallback( $url ) {
        /**
-        * Filter the Mediaelement fallback output for no-JS.
+        * Filters the Mediaelement fallback output for no-JS.
         *
         * @since 3.6.0
         *
@@ -2100,7 +2124,7 @@ function wp_mediaelement_fallback( $url ) {
  */
 function wp_get_audio_extensions() {
        /**
-        * Filter the list of supported audio formats.
+        * Filters the list of supported audio formats.
         *
         * @since 3.6.0
         *
@@ -2135,7 +2159,7 @@ function wp_get_attachment_id3_keys( $attachment, $context = 'display' ) {
        }
 
        /**
-        * Filter the editable list of keys to look up data from an attachment's metadata.
+        * Filters the editable list of keys to look up data from an attachment's metadata.
         *
         * @since 3.9.0
         *
@@ -2163,7 +2187,7 @@ function wp_get_attachment_id3_keys( $attachment, $context = 'display' ) {
  *     @type string $autoplay The 'autoplay' attribute for the `<audio>` element. Default empty.
  *     @type string $preload  The 'preload' attribute for the `<audio>` element. Default 'none'.
  *     @type string $class    The 'class' attribute for the `<audio>` element. Default 'wp-audio-shortcode'.
- *     @type string $style    The 'style' attribute for the `<audio>` element. Default 'width: 100%; visibility: hidden;'.
+ *     @type string $style    The 'style' attribute for the `<audio>` element. Default 'width: 100%;'.
  * }
  * @param string $content Shortcode content.
  * @return string|void HTML content to display audio.
@@ -2175,7 +2199,7 @@ function wp_audio_shortcode( $attr, $content = '' ) {
        $instance++;
 
        /**
-        * Filter the default audio shortcode output.
+        * Filters the default audio shortcode output.
         *
         * If the filtered output isn't empty, it will be used instead of generating the default audio template.
         *
@@ -2200,7 +2224,7 @@ function wp_audio_shortcode( $attr, $content = '' ) {
                'autoplay' => '',
                'preload'  => 'none',
                'class'    => 'wp-audio-shortcode',
-               'style'    => 'width: 100%; visibility: hidden;'
+               'style'    => 'width: 100%;'
        );
        foreach ( $default_types as $type ) {
                $defaults_atts[$type] = '';
@@ -2243,7 +2267,7 @@ function wp_audio_shortcode( $attr, $content = '' ) {
        }
 
        /**
-        * Filter the media library used for the audio shortcode.
+        * Filters the media library used for the audio shortcode.
         *
         * @since 3.6.0
         *
@@ -2256,7 +2280,7 @@ function wp_audio_shortcode( $attr, $content = '' ) {
        }
 
        /**
-        * Filter the class attribute for the audio shortcode output container.
+        * Filters the class attribute for the audio shortcode output container.
         *
         * @since 3.6.0
         *
@@ -2310,7 +2334,7 @@ function wp_audio_shortcode( $attr, $content = '' ) {
        $html .= '</audio>';
 
        /**
-        * Filter the audio shortcode output.
+        * Filters the audio shortcode output.
         *
         * @since 3.6.0
         *
@@ -2333,7 +2357,7 @@ add_shortcode( 'audio', 'wp_audio_shortcode' );
  */
 function wp_get_video_extensions() {
        /**
-        * Filter the list of supported video formats.
+        * Filters the list of supported video formats.
         *
         * @since 3.6.0
         *
@@ -2379,7 +2403,7 @@ function wp_video_shortcode( $attr, $content = '' ) {
        $instance++;
 
        /**
-        * Filter the default video shortcode output.
+        * Filters the default video shortcode output.
         *
         * If the filtered output isn't empty, it will be used instead of generating
         * the default video template.
@@ -2480,7 +2504,7 @@ function wp_video_shortcode( $attr, $content = '' ) {
        }
 
        /**
-        * Filter the media library used for the video shortcode.
+        * Filters the media library used for the video shortcode.
         *
         * @since 3.6.0
         *
@@ -2493,7 +2517,7 @@ function wp_video_shortcode( $attr, $content = '' ) {
        }
 
        /**
-        * Filter the class attribute for the video shortcode output container.
+        * Filters the class attribute for the video shortcode output container.
         *
         * @since 3.6.0
         *
@@ -2568,7 +2592,7 @@ function wp_video_shortcode( $attr, $content = '' ) {
        $output = sprintf( '<div style="%s" class="wp-video">%s</div>', $width_rule, $html );
 
        /**
-        * Filter the output of the video shortcode.
+        * Filters the output of the video shortcode.
         *
         * @since 3.6.0
         *
@@ -2651,7 +2675,7 @@ function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false )
        $adjacent = $prev ? 'previous' : 'next';
 
        /**
-        * Filter the adjacent image link.
+        * Filters the adjacent image link.
         *
         * The dynamic portion of the hook name, `$adjacent`, refers to the type of adjacency,
         * either 'next', or 'previous'.
@@ -2778,26 +2802,6 @@ function wp_expand_dimensions( $example_width, $example_height, $max_width, $max
        return wp_constrain_dimensions( $example_width * 1000000, $example_height * 1000000, $max_width, $max_height );
 }
 
-/**
- * Converts a shorthand byte value to an integer byte value.
- *
- * @since 2.3.0
- *
- * @param string $size A shorthand byte value.
- * @return int An integer byte value.
- */
-function wp_convert_hr_to_bytes( $size ) {
-       $size  = strtolower( $size );
-       $bytes = (int) $size;
-       if ( strpos( $size, 'k' ) !== false )
-               $bytes = intval( $size ) * KB_IN_BYTES;
-       elseif ( strpos( $size, 'm' ) !== false )
-               $bytes = intval($size) * MB_IN_BYTES;
-       elseif ( strpos( $size, 'g' ) !== false )
-               $bytes = intval( $size ) * GB_IN_BYTES;
-       return $bytes;
-}
-
 /**
  * Determines the maximum upload size allowed in php.ini.
  *
@@ -2810,7 +2814,7 @@ function wp_max_upload_size() {
        $p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) );
 
        /**
-        * Filter the maximum upload size allowed in php.ini.
+        * Filters the maximum upload size allowed in php.ini.
         *
         * @since 2.5.0
         *
@@ -2888,7 +2892,7 @@ function _wp_image_editor_choose( $args = array() ) {
        require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php';
 
        /**
-        * Filter the list of image editing library classes.
+        * Filters the list of image editing library classes.
         *
         * @since 3.5.0
         *
@@ -2920,7 +2924,7 @@ function _wp_image_editor_choose( $args = array() ) {
 }
 
 /**
- * Prints default plupload arguments.
+ * Prints default Plupload arguments.
  *
  * @since 3.4.0
  */
@@ -2932,6 +2936,11 @@ function wp_plupload_default_settings() {
                return;
 
        $max_upload_size = wp_max_upload_size();
+       $allowed_extensions = array_keys( get_allowed_mime_types() );
+       $extensions = array();
+       foreach ( $allowed_extensions as $extension ) {
+               $extensions = array_merge( $extensions, explode( '|', $extension ) );
+       }
 
        $defaults = array(
                'runtimes'            => 'html5,flash,silverlight,html4',
@@ -2941,6 +2950,7 @@ function wp_plupload_default_settings() {
                'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ),
                'filters' => array(
                        'max_file_size'   => $max_upload_size . 'b',
+                       'mime_types'      => array( array( 'extensions' => implode( ',', $extensions ) ) ),
                ),
        );
 
@@ -2953,7 +2963,7 @@ function wp_plupload_default_settings() {
        }
 
        /**
-        * Filter the Plupload default settings.
+        * Filters the Plupload default settings.
         *
         * @since 3.4.0
         *
@@ -2966,7 +2976,7 @@ function wp_plupload_default_settings() {
        );
 
        /**
-        * Filter the Plupload default parameters.
+        * Filters the Plupload default parameters.
         *
         * @since 3.4.0
         *
@@ -3058,10 +3068,14 @@ function wp_prepare_attachment_for_js( $attachment ) {
 
        if ( $post_parent ) {
                $parent_type = get_post_type_object( $post_parent->post_type );
+
                if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $attachment->post_parent ) ) {
                        $response['uploadedToLink'] = get_edit_post_link( $attachment->post_parent, 'raw' );
                }
-               $response['uploadedToTitle'] = $post_parent->post_title ? $post_parent->post_title : __( '(no title)' );
+
+               if ( $parent_type && current_user_can( 'read_post', $attachment->post_parent ) ) {
+                       $response['uploadedToTitle'] = $post_parent->post_title ? $post_parent->post_title : __( '(no title)' );
+               }
        }
 
        $attached_file = get_attached_file( $attachment->ID );
@@ -3184,7 +3198,7 @@ function wp_prepare_attachment_for_js( $attachment ) {
                $response['compat'] = get_compat_media_markup( $attachment->ID, array( 'in_modal' => true ) );
 
        /**
-        * Filter the attachment data prepared for JavaScript.
+        * Filters the attachment data prepared for JavaScript.
         *
         * @since 3.5.0
         *
@@ -3455,7 +3469,7 @@ function wp_enqueue_media( $args = array() ) {
        );
 
        /**
-        * Filter the media view settings.
+        * Filters the media view settings.
         *
         * @since 3.5.0
         *
@@ -3465,7 +3479,7 @@ function wp_enqueue_media( $args = array() ) {
        $settings = apply_filters( 'media_view_settings', $settings, $post );
 
        /**
-        * Filter the media view strings.
+        * Filters the media view strings.
         *
         * @since 3.5.0
         *
@@ -3526,7 +3540,7 @@ function get_attached_media( $type, $post = 0 ) {
        );
 
        /**
-        * Filter arguments used to retrieve media attached to the given post.
+        * Filters arguments used to retrieve media attached to the given post.
         *
         * @since 3.6.0
         *
@@ -3539,7 +3553,7 @@ function get_attached_media( $type, $post = 0 ) {
        $children = get_children( $args );
 
        /**
-        * Filter the list of media attached to the given post.
+        * Filters the list of media attached to the given post.
         *
         * @since 3.6.0
         *
@@ -3563,7 +3577,7 @@ function get_media_embedded_in_content( $content, $types = null ) {
        $html = array();
 
        /**
-        * Filter the embedded media types that are allowed to be returned from the content blob.
+        * Filters the embedded media types that are allowed to be returned from the content blob.
         *
         * @since 4.2.0
         *
@@ -3633,7 +3647,7 @@ function get_post_galleries( $post, $html = true ) {
        }
 
        /**
-        * Filter the list of all found galleries in the given post.
+        * Filters the list of all found galleries in the given post.
         *
         * @since 3.6.0
         *
@@ -3657,7 +3671,7 @@ function get_post_gallery( $post = 0, $html = true ) {
        $gallery = reset( $galleries );
 
        /**
-        * Filter the first-found post gallery.
+        * Filters the first-found post gallery.
         *
         * @since 3.6.0
         *
@@ -3759,7 +3773,7 @@ function attachment_url_to_postid( $url ) {
        $post_id = $wpdb->get_var( $sql );
 
        /**
-        * Filter an attachment id found by URL.
+        * Filters an attachment id found by URL.
         *
         * @since 4.2.0
         *
index bfdd59566cef3bf1cf0a3f77e1168cd652036feb..8833d3e987b34d95e39251f407e30d630be1ca08 100644 (file)
@@ -52,7 +52,7 @@ function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique =
        $meta_value = sanitize_meta( $meta_key, $meta_value, $meta_type );
 
        /**
-        * Filter whether to add metadata of a specific type.
+        * Filters whether to add metadata of a specific type.
         *
         * The dynamic portion of the hook, `$meta_type`, refers to the meta
         * object type (comment, post, or user). Returning a non-null value
@@ -168,7 +168,7 @@ function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_v
        $meta_value = sanitize_meta( $meta_key, $meta_value, $meta_type );
 
        /**
-        * Filter whether to update metadata of a specific type.
+        * Filters whether to update metadata of a specific type.
         *
         * The dynamic portion of the hook, `$meta_type`, refers to the meta
         * object type (comment, post, or user). Returning a non-null value
@@ -328,7 +328,7 @@ function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $d
        $meta_value = wp_unslash($meta_value);
 
        /**
-        * Filter whether to delete metadata of a specific type.
+        * Filters whether to delete metadata of a specific type.
         *
         * The dynamic portion of the hook, `$meta_type`, refers to the meta
         * object type (comment, post, or user). Returning a non-null value
@@ -469,7 +469,7 @@ function get_metadata($meta_type, $object_id, $meta_key = '', $single = false) {
        }
 
        /**
-        * Filter whether to retrieve metadata of a specific type.
+        * Filters whether to retrieve metadata of a specific type.
         *
         * The dynamic portion of the hook, `$meta_type`, refers to the meta
         * object type (comment, post, or user). Returning a non-null value
@@ -921,7 +921,7 @@ function is_protected_meta( $meta_key, $meta_type = null ) {
        $protected = ( '_' == $meta_key[0] );
 
        /**
-        * Filter whether a meta key is protected.
+        * Filters whether a meta key is protected.
         *
         * @since 3.2.0
         *
@@ -937,51 +937,275 @@ function is_protected_meta( $meta_key, $meta_type = null ) {
  *
  * @since 3.1.3
  *
- * @param string $meta_key   Meta key
- * @param mixed  $meta_value Meta value to sanitize
- * @param string $meta_type  Type of meta
- * @return mixed Sanitized $meta_value
+ * @param string $meta_key       Meta key.
+ * @param mixed  $meta_value     Meta value to sanitize.
+ * @param string $object_type    Type of object the meta is registered to.
+ *
+ * @return mixed Sanitized $meta_value.
  */
-function sanitize_meta( $meta_key, $meta_value, $meta_type ) {
-
+function sanitize_meta( $meta_key, $meta_value, $object_type ) {
        /**
-        * Filter the sanitization of a specific meta key of a specific meta type.
+        * Filters the sanitization of a specific meta key of a specific meta type.
         *
         * The dynamic portions of the hook name, `$meta_type`, and `$meta_key`,
         * refer to the metadata object type (comment, post, or user) and the meta
-        * key value,
-        * respectively.
+        * key value, respectively.
         *
         * @since 3.3.0
         *
-        * @param mixed  $meta_value Meta value to sanitize.
-        * @param string $meta_key   Meta key.
-        * @param string $meta_type  Meta type.
+        * @param mixed  $meta_value      Meta value to sanitize.
+        * @param string $meta_key        Meta key.
+        * @param string $object_type     Object type.
         */
-       return apply_filters( "sanitize_{$meta_type}_meta_{$meta_key}", $meta_value, $meta_key, $meta_type );
+       return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}", $meta_value, $meta_key, $object_type );
 }
 
 /**
- * Register meta key
+ * Registers a meta key.
  *
  * @since 3.3.0
+ * @since 4.6.0 {@link https://make.wordpress.org/core/2016/07/08/enhancing-register_meta-in-4-6/ Modified
+ *              to support an array of data to attach to registered meta keys}. Previous arguments for
+ *              `$sanitize_callback` and `$auth_callback` have been folded into this array.
+ *
+ * @param string $object_type    Type of object this meta is registered to.
+ * @param string $meta_key       Meta key to register.
+ * @param array  $args {
+ *     Data used to describe the meta key when registered.
  *
- * @param string       $meta_type         Type of meta
- * @param string       $meta_key          Meta key
- * @param string|array $sanitize_callback A function or method to call when sanitizing the value of $meta_key.
- * @param string|array $auth_callback     Optional. A function or method to call when performing edit_post_meta, add_post_meta, and delete_post_meta capability checks.
+ *     @type string $type              The type of data associated with this meta key.
+ *     @type string $description       A description of the data attached to this meta key.
+ *     @type bool   $single            Whether the meta key has one value per object, or an array of values per object.
+ *     @type string $sanitize_callback A function or method to call when sanitizing `$meta_key` data.
+ *     @type string $auth_callback     Optional. A function or method to call when performing edit_post_meta, add_post_meta, and delete_post_meta capability checks.
+ *     @type bool   $show_in_rest      Whether data associated with this meta key can be considered public.
+ * }
+ * @param string|array $deprecated Deprecated. Use `$args` instead.
+ *
+ * @return bool True if the meta key was successfully registered in the global array, false if not.
+ *                       Registering a meta key with distinct sanitize and auth callbacks will fire those
+ *                       callbacks, but will not add to the global registry.
  */
-function register_meta( $meta_type, $meta_key, $sanitize_callback, $auth_callback = null ) {
-       if ( is_callable( $sanitize_callback ) )
-               add_filter( "sanitize_{$meta_type}_meta_{$meta_key}", $sanitize_callback, 10, 3 );
+function register_meta( $object_type, $meta_key, $args, $deprecated = null ) {
+       global $wp_meta_keys;
 
-       if ( empty( $auth_callback ) ) {
-               if ( is_protected_meta( $meta_key, $meta_type ) )
-                       $auth_callback = '__return_false';
-               else
-                       $auth_callback = '__return_true';
+       if ( ! is_array( $wp_meta_keys ) ) {
+               $wp_meta_keys = array();
+       }
+
+       $defaults = array(
+               'type'              => 'string',
+               'description'       => '',
+               'single'            => false,
+               'sanitize_callback' => null,
+               'auth_callback'     => null,
+               'show_in_rest'      => false,
+       );
+
+       // There used to be individual args for sanitize and auth callbacks
+       $has_old_sanitize_cb = false;
+       $has_old_auth_cb = false;
+
+       if ( is_callable( $args ) ) {
+               $args = array(
+                       'sanitize_callback' => $args,
+               );
+
+               $has_old_sanitize_cb = true;
+       } else {
+               $args = (array) $args;
+       }
+
+       if ( is_callable( $deprecated ) ) {
+               $args['auth_callback'] = $deprecated;
+               $has_old_auth_cb = true;
+       }
+
+       /**
+        * Filters the registration arguments when registering meta.
+        *
+        * @since 4.6.0
+        *
+        * @param array  $args        Array of meta registration arguments.
+        * @param array  $defaults    Array of default arguments.
+        * @param string $object_type Object type.
+        * @param string $meta_key    Meta key.
+        */
+       $args = apply_filters( 'register_meta_args', $args, $defaults, $object_type, $meta_key );
+       $args = wp_parse_args( $args, $defaults );
+
+       // If `auth_callback` is not provided, fall back to `is_protected_meta()`.
+       if ( empty( $args['auth_callback'] ) ) {
+               if ( is_protected_meta( $meta_key, $object_type ) ) {
+                       $args['auth_callback'] = '__return_false';
+               } else {
+                       $args['auth_callback'] = '__return_true';
+               }
+       }
+
+       // Back-compat: old sanitize and auth callbacks are applied to all of an object type.
+       if ( is_callable( $args['sanitize_callback'] ) ) {
+               add_filter( "sanitize_{$object_type}_meta_{$meta_key}", $args['sanitize_callback'], 10, 3 );
+       }
+
+       if ( is_callable( $args['auth_callback'] ) ) {
+               add_filter( "auth_{$object_type}_meta_{$meta_key}", $args['auth_callback'], 10, 6 );
+       }
+
+       // Global registry only contains meta keys registered with the array of arguments added in 4.6.0.
+       if ( ! $has_old_auth_cb && ! $has_old_sanitize_cb ) {
+               $wp_meta_keys[ $object_type ][ $meta_key ] = $args;
+
+               return true;
+       }
+
+       return false;
+}
+
+/**
+ * Checks if a meta key is registered.
+ *
+ * @since 4.6.0
+ *
+ * @param string $object_type    The type of object.
+ * @param string $meta_key       The meta key.
+ *
+ * @return bool True if the meta key is registered to the object type. False if not.
+ */
+function registered_meta_key_exists( $object_type, $meta_key ) {
+       global $wp_meta_keys;
+
+       if ( ! is_array( $wp_meta_keys ) ) {
+               return false;
+       }
+
+       if ( ! isset( $wp_meta_keys[ $object_type ] ) ) {
+               return false;
+       }
+
+       if ( isset( $wp_meta_keys[ $object_type ][ $meta_key ] ) ) {
+               return true;
+       }
+
+       return false;
+}
+
+/**
+ * Unregisters a meta key from the list of registered keys.
+ *
+ * @since 4.6.0
+ *
+ * @param string $object_type The type of object.
+ * @param string $meta_key    The meta key.
+ * @return bool True if successful. False if the meta key was not registered.
+ */
+function unregister_meta_key( $object_type, $meta_key ) {
+       global $wp_meta_keys;
+
+       if ( ! registered_meta_key_exists( $object_type, $meta_key ) ) {
+               return false;
+       }
+
+       $args = $wp_meta_keys[ $object_type ][ $meta_key ];
+
+       if ( isset( $args['sanitize_callback'] ) && is_callable( $args['sanitize_callback'] ) ) {
+               remove_filter( "sanitize_{$object_type}_meta_{$meta_key}", $args['sanitize_callback'] );
+       }
+
+       if ( isset( $args['auth_callback'] ) && is_callable( $args['auth_callback'] ) ) {
+               remove_filter( "auth_{$object_type}_meta_{$meta_key}", $args['auth_callback'] );
+       }
+
+       unset( $wp_meta_keys[ $object_type ][ $meta_key ] );
+
+       // Do some clean up
+       if ( empty( $wp_meta_keys[ $object_type ] ) ) {
+               unset( $wp_meta_keys[ $object_type ] );
+       }
+
+       return true;
+}
+
+/**
+ * Retrieves a list of registered meta keys for an object type.
+ *
+ * @since 4.6.0
+ *
+ * @param string $object_type The type of object. Post, comment, user, term.
+ * @return array List of registered meta keys.
+ */
+function get_registered_meta_keys( $object_type ) {
+       global $wp_meta_keys;
+
+       if ( ! is_array( $wp_meta_keys ) || ! isset( $wp_meta_keys[ $object_type ] ) ) {
+               return array();
+       }
+
+       return $wp_meta_keys[ $object_type ];
+}
+
+/**
+ * Retrieves registered metadata for a specified object.
+ *
+ * @since 4.6.0
+ *
+ * @param string $object_type Type of object to request metadata for. (e.g. comment, post, term, user)
+ * @param int    $object_id   ID of the object the metadata is for.
+ * @param string $meta_key    Optional. Registered metadata key. If not specified, retrieve all registered
+ *                            metadata for the specified object.
+ * @return mixed A single value or array of values for a key if specified. An array of all registered keys
+ *               and values for an object ID if not.
+ */
+function get_registered_metadata( $object_type, $object_id, $meta_key = '' ) {
+       if ( ! empty( $meta_key ) ) {
+               if ( ! registered_meta_key_exists( $object_type, $meta_key ) ) {
+                       return false;
+               }
+               $meta_keys = get_registered_meta_keys( $object_type );
+               $meta_key_data = $meta_keys[ $meta_key ];
+
+               $data = get_metadata( $object_type, $object_id, $meta_key, $meta_key_data['single'] );
+
+               return $data;
+       }
+
+       $data = get_metadata( $object_type, $object_id );
+
+       $meta_keys = get_registered_meta_keys( $object_type );
+       $registered_data = array();
+
+       // Someday, array_filter()
+       foreach ( $meta_keys as $k => $v ) {
+               if ( isset( $data[ $k ] ) ) {
+                       $registered_data[ $k ] = $data[ $k ];
+               }
+       }
+
+       return $registered_data;
+}
+
+/**
+ * Filter out `register_meta()` args based on a whitelist.
+ * `register_meta()` args may change over time, so requiring the whitelist
+ * to be explicitly turned off is a warranty seal of sorts.
+ *
+ * @access private
+ * @since  4.6.0
+ *
+ * @param  array $args         Arguments from `register_meta()`.
+ * @param  array $default_args Default arguments for `register_meta()`.
+ *
+ * @return array Filtered arguments.
+ */
+function _wp_register_meta_args_whitelist( $args, $default_args ) {
+       $whitelist = array_keys( $default_args );
+
+       // In an anonymous function world, this would be better as an array_filter()
+       foreach ( $args as $key => $value ) {
+               if ( ! in_array( $key, $whitelist ) ) {
+                       unset( $args[ $key ] );
+               }
        }
 
-       if ( is_callable( $auth_callback ) )
-               add_filter( "auth_{$meta_type}_meta_{$meta_key}", $auth_callback, 10, 6 );
+       return $args;
 }
index 9108d59e38b21cfe1470208c68cf34a5a8f4ab66..ccafd047688de2830b867a17a7c10b8b53be0a5f 100644 (file)
@@ -235,7 +235,7 @@ function get_blog_details( $fields = null, $get_all = true ) {
        restore_current_blog();
 
        /**
-        * Filter a blog's details.
+        * Filters a blog's details.
         *
         * @since MU
         *
@@ -447,6 +447,7 @@ function clean_blog_cache( $blog ) {
        $domain_path_key = md5( $blog->domain . $blog->path );
 
        wp_cache_delete( $blog_id, 'sites' );
+       wp_cache_delete( $blog_id, 'site-details' );
        wp_cache_delete( $blog_id , 'blog-details' );
        wp_cache_delete( $blog_id . 'short' , 'blog-details' );
        wp_cache_delete(  $domain_path_key, 'blog-lookup' );
@@ -454,6 +455,156 @@ function clean_blog_cache( $blog ) {
        wp_cache_delete( 'current_blog_' . $blog->domain . $blog->path, 'site-options' );
        wp_cache_delete( 'get_id_from_blogname_' . trim( $blog->path, '/' ), 'blog-details' );
        wp_cache_delete( $domain_path_key, 'blog-id-cache' );
+
+       /**
+        * Fires immediately after a site has been removed from the object cache.
+        *
+        * @since 4.6.0
+        *
+        * @param int     $id              Blog ID.
+        * @param WP_Site $blog            Site object.
+        * @param string  $domain_path_key md5 hash of domain and path.
+        */
+       do_action( 'clean_site_cache', $blog_id, $blog, $domain_path_key );
+
+       wp_cache_set( 'last_changed', microtime(), 'sites' );
+}
+
+/**
+ * Retrieves site data given a site ID or site object.
+ *
+ * Site data will be cached and returned after being passed through a filter.
+ * If the provided site is empty, the current site global will be used.
+ *
+ * @since 4.6.0
+ *
+ * @param WP_Site|int|null $site Optional. Site to retrieve. Default is the current site.
+ * @return WP_Site|null The site object or null if not found.
+ */
+function get_site( $site = null ) {
+       if ( empty( $site ) ) {
+               $site = get_current_blog_id();
+       }
+
+       if ( $site instanceof WP_Site ) {
+               $_site = $site;
+       } elseif ( is_object( $site ) ) {
+               $_site = new WP_Site( $site );
+       } else {
+               $_site = WP_Site::get_instance( $site );
+       }
+
+       if ( ! $_site ) {
+               return null;
+       }
+
+       /**
+        * Fires after a site is retrieved.
+        *
+        * @since 4.6.0
+        *
+        * @param WP_Site $_site Site data.
+        */
+       $_site = apply_filters( 'get_site', $_site );
+
+       return $_site;
+}
+
+/**
+ * Adds any sites from the given ids to the cache that do not already exist in cache.
+ *
+ * @since 4.6.0
+ * @access private
+ *
+ * @see update_site_cache()
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @param array $ids ID list.
+ */
+function _prime_site_caches( $ids ) {
+       global $wpdb;
+
+       $non_cached_ids = _get_non_cached_ids( $ids, 'sites' );
+       if ( ! empty( $non_cached_ids ) ) {
+               $fresh_sites = $wpdb->get_results( sprintf( "SELECT * FROM $wpdb->blogs WHERE blog_id IN (%s)", join( ",", array_map( 'intval', $non_cached_ids ) ) ) );
+
+               update_site_cache( $fresh_sites );
+       }
+}
+
+/**
+ * Updates sites in cache.
+ *
+ * @since 4.6.0
+ *
+ * @param array $sites Array of site objects.
+ */
+function update_site_cache( $sites ) {
+       if ( ! $sites ) {
+               return;
+       }
+
+       foreach ( $sites as $site ) {
+               wp_cache_add( $site->blog_id, $site, 'sites' );
+               wp_cache_add( $site->blog_id . 'short', $site, 'blog-details' );
+       }
+}
+
+/**
+ * Retrieves a list of sites matching requested arguments.
+ *
+ * @since 4.6.0
+ *
+ * @see WP_Site_Query::parse_query()
+ *
+ * @param string|array $args {
+ *     Optional. Array or query string of site query parameters. Default empty.
+ *
+ *     @type array        $site__in          Array of site IDs to include. Default empty.
+ *     @type array        $site__not_in      Array of site IDs to exclude. Default empty.
+ *     @type bool         $count             Whether to return a site count (true) or array of site objects.
+ *                                           Default false.
+ *     @type array        $date_query        Date query clauses to limit sites by. See WP_Date_Query.
+ *                                           Default null.
+ *     @type string       $fields            Site fields to return. Accepts 'ids' for site IDs only or empty
+ *                                           for all fields. Default empty.
+ *     @type int          $ID                A site ID to only return that site. Default empty.
+ *     @type int          $number            Maximum number of sites to retrieve. Default null (no limit).
+ *     @type int          $offset            Number of sites to offset the query. Used to build LIMIT clause.
+ *                                           Default 0.
+ *     @type bool         $no_found_rows     Whether to disable the `SQL_CALC_FOUND_ROWS` query. Default true.
+ *     @type string|array $orderby           Site status or array of statuses. Accepts 'id', 'domain', 'path',
+ *                                           'network_id', 'last_updated', 'registered', 'domain_length',
+ *                                           'path_length', 'site__in' and 'network__in'. Also accepts false,
+ *                                           an empty array, or 'none' to disable `ORDER BY` clause.
+ *                                           Default 'id'.
+ *     @type string       $order             How to order retrieved sites. Accepts 'ASC', 'DESC'. Default 'ASC'.
+ *     @type int          $network_id        Limit results to those affiliated with a given network ID.
+ *                                           Default current network ID.
+ *     @type array        $network__in       Array of network IDs to include affiliated sites for. Default empty.
+ *     @type array        $network__not_in   Array of network IDs to exclude affiliated sites for. Default empty.
+ *     @type string       $domain            Limit results to those affiliated with a given domain.
+ *                                           Default empty.
+ *     @type array        $domain__in        Array of domains to include affiliated sites for. Default empty.
+ *     @type array        $domain__not_in    Array of domains to exclude affiliated sites for. Default empty.
+ *     @type string       $path              Limit results to those affiliated with a given path.
+ *                                           Default empty.
+ *     @type array        $path__in          Array of paths to include affiliated sites for. Default empty.
+ *     @type array        $path__not_in      Array of paths to exclude affiliated sites for. Default empty.
+ *     @type int          $public            Limit results to public sites. Accepts '1' or '0'. Default empty.
+ *     @type int          $archived          Limit results to archived sites. Accepts '1' or '0'. Default empty.
+ *     @type int          $mature            Limit results to mature sites. Accepts '1' or '0'. Default empty.
+ *     @type int          $spam              Limit results to spam sites. Accepts '1' or '0'. Default empty.
+ *     @type int          $deleted           Limit results to deleted sites. Accepts '1' or '0'. Default empty.
+ *     @type string       $search            Search term(s) to retrieve matching sites for. Default empty.
+ *     @type bool         $update_site_cache Whether to prime the cache for found sites. Default false.
+ * }
+ * @return array List of sites.
+ */
+function get_sites( $args = array() ) {
+       $query = new WP_Site_Query();
+
+       return $query->query( $args );
 }
 
 /**
@@ -487,7 +638,7 @@ function get_blog_option( $id, $option, $default = false ) {
        restore_current_blog();
 
        /**
-        * Filter a blog option value.
+        * Filters a blog option value.
         *
         * The dynamic portion of the hook name, `$option`, refers to the blog option name.
         *
@@ -574,7 +725,7 @@ function update_blog_option( $id, $option, $value, $deprecated = null ) {
        $id = (int) $id;
 
        if ( null !== $deprecated  )
-               _deprecated_argument( __FUNCTION__, '3.1' );
+               _deprecated_argument( __FUNCTION__, '3.1.0' );
 
        if ( get_current_blog_id() == $id )
                return update_option( $option, $value );
@@ -660,9 +811,9 @@ function switch_to_blog( $new_blog, $deprecated = null ) {
                        if ( is_array( $global_groups ) ) {
                                wp_cache_add_global_groups( $global_groups );
                        } else {
-                               wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites' ) );
+                               wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites', 'site-details' ) );
                        }
-                       wp_cache_add_non_persistent_groups( array( 'comment', 'counts', 'plugins' ) );
+                       wp_cache_add_non_persistent_groups( array( 'counts', 'plugins' ) );
                }
        }
 
@@ -731,9 +882,9 @@ function restore_current_blog() {
                        if ( is_array( $global_groups ) ) {
                                wp_cache_add_global_groups( $global_groups );
                        } else {
-                               wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites' ) );
+                               wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites', 'site-details' ) );
                        }
-                       wp_cache_add_non_persistent_groups( array( 'comment', 'counts', 'plugins' ) );
+                       wp_cache_add_non_persistent_groups( array( 'counts', 'plugins' ) );
                }
        }
 
@@ -808,7 +959,7 @@ function update_blog_status( $blog_id, $pref, $value, $deprecated = null ) {
        global $wpdb;
 
        if ( null !== $deprecated  )
-               _deprecated_argument( __FUNCTION__, '3.1' );
+               _deprecated_argument( __FUNCTION__, '3.1.0' );
 
        if ( ! in_array( $pref, array( 'site_id', 'domain', 'path', 'registered', 'last_updated', 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id') ) )
                return $value;
@@ -909,6 +1060,127 @@ function get_last_updated( $deprecated = '', $start = 0, $quantity = 40 ) {
        return $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", $wpdb->siteid, $start, $quantity ) , ARRAY_A );
 }
 
+/**
+ * Retrieves a list of networks.
+ *
+ * @since 4.6.0
+ *
+ * @param string|array $args Optional. Array or string of arguments. See WP_Network_Query::parse_query()
+ *                           for information on accepted arguments. Default empty array.
+ * @return int|array List of networks or number of found networks if `$count` argument is true.
+ */
+function get_networks( $args = array() ) {
+       $query = new WP_Network_Query();
+
+       return $query->query( $args );
+}
+
+/**
+ * Retrieves network data given a network ID or network object.
+ *
+ * Network data will be cached and returned after being passed through a filter.
+ * If the provided network is empty, the current network global will be used.
+ *
+ * @since 4.6.0
+ *
+ * @global WP_Network $current_site
+ *
+ * @param WP_Network|int|null $network Optional. Network to retrieve. Default is the current network.
+ * @return WP_Network|null The network object or null if not found.
+ */
+function get_network( $network = null ) {
+       global $current_site;
+       if ( empty( $network ) && isset( $current_site ) ) {
+               $network = $current_site;
+       }
+
+       if ( $network instanceof WP_Network ) {
+               $_network = $network;
+       } elseif ( is_object( $network ) ) {
+               $_network = new WP_Network( $network );
+       } else {
+               $_network = WP_Network::get_instance( $network );
+       }
+
+       if ( ! $_network ) {
+               return null;
+       }
+
+       /**
+        * Fires after a network is retrieved.
+        *
+        * @since 4.6.0
+        *
+        * @param WP_Network $_network Network data.
+        */
+       $_network = apply_filters( 'get_network', $_network );
+
+       return $_network;
+}
+
+/**
+ * Removes a network from the object cache.
+ *
+ * @since 4.6.0
+ *
+ * @param int|array $ids Network ID or an array of network IDs to remove from cache.
+ */
+function clean_network_cache( $ids ) {
+       foreach ( (array) $ids as $id ) {
+               wp_cache_delete( $id, 'networks' );
+
+               /**
+                * Fires immediately after a network has been removed from the object cache.
+                *
+                * @since 4.6.0
+                *
+                * @param int $id Network ID.
+                */
+               do_action( 'clean_network_cache', $id );
+       }
+
+       wp_cache_set( 'last_changed', microtime(), 'networks' );
+}
+
+/**
+ * Updates the network cache of given networks.
+ *
+ * Will add the networks in $networks to the cache. If network ID already exists
+ * in the network cache then it will not be updated. The network is added to the
+ * cache using the network group with the key using the ID of the networks.
+ *
+ * @since 4.6.0
+ *
+ * @param array $networks Array of network row objects.
+ */
+function update_network_cache( $networks ) {
+       foreach ( (array) $networks as $network ) {
+               wp_cache_add( $network->id, $network, 'networks' );
+       }
+}
+
+/**
+ * Adds any networks from the given IDs to the cache that do not already exist in cache.
+ *
+ * @since 4.6.0
+ * @access private
+ *
+ * @see update_network_cache()
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @param array $network_ids Array of network IDs.
+ */
+function _prime_network_caches( $network_ids ) {
+       global $wpdb;
+
+       $non_cached_ids = _get_non_cached_ids( $network_ids, 'networks' );
+       if ( !empty( $non_cached_ids ) ) {
+               $fresh_networks = $wpdb->get_results( sprintf( "SELECT $wpdb->site.* FROM $wpdb->site WHERE id IN (%s)", join( ",", array_map( 'intval', $non_cached_ids ) ) ) );
+
+               update_network_cache( $fresh_networks );
+       }
+}
+
 /**
  * Handler for updating the blog date when a post is published or an already published post is changed.
  *
index dd17201e4c8ef1b9b8a5f04e9fbb8a16be692b1c..98719f8ba5b464f5db769472a6785212866bb1bc 100644 (file)
@@ -140,7 +140,7 @@ function ms_subdomain_constants() {
                if ( $subdomain_error_warn ) {
                        trigger_error( __( '<strong>Conflicting values for the constants VHOST and SUBDOMAIN_INSTALL.</strong> The value of SUBDOMAIN_INSTALL will be assumed to be your subdomain configuration setting.' ) . ' ' . $vhost_deprecated, E_USER_WARNING );
                } else {
-                       _deprecated_argument( 'define()', '3.0', $vhost_deprecated );
+                       _deprecated_argument( 'define()', '3.0.0', $vhost_deprecated );
                }
                return;
        }
index 19224d78d72a0e3f9da92e066975907a5f9c7bab..7e43fccd836fb25d870814448ef11cdb31455f23 100644 (file)
@@ -24,7 +24,7 @@
  * @return int Current site ID.
  */
 function get_dashboard_blog() {
-    _deprecated_function( __FUNCTION__, '3.1' );
+    _deprecated_function( __FUNCTION__, '3.1.0' );
     if ( $blog = get_site_option( 'dashboard_blog' ) )
         return get_blog_details( $blog );
 
@@ -41,7 +41,7 @@ function get_dashboard_blog() {
  * @param int $len Optional. The length of password to generate. Default 8.
  */
 function generate_random_password( $len = 8 ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'wp_generate_password()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'wp_generate_password()' );
        return wp_generate_password( $len );
 }
 
@@ -61,7 +61,7 @@ function generate_random_password( $len = 8 ) {
  * @param string $user_login Optional. Username for the user to check. Default empty.
  */
 function is_site_admin( $user_login = '' ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'is_super_admin()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'is_super_admin()' );
 
        if ( empty( $user_login ) ) {
                $user_id = get_current_user_id();
@@ -86,7 +86,7 @@ if ( !function_exists( 'graceful_fail' ) ) :
  * @see wp_die()
  */
 function graceful_fail( $message ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'wp_die()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'wp_die()' );
        $message = apply_filters( 'graceful_fail', $message );
        $message_template = apply_filters( 'graceful_fail_template',
 '<!DOCTYPE html>
@@ -126,7 +126,7 @@ endif;
  * @param string $username Username.
  */
 function get_user_details( $username ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'get_user_by()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'get_user_by()' );
        return get_user_by('login', $username);
 }
 
@@ -140,7 +140,7 @@ function get_user_details( $username ) {
  * @param int $post_id Post ID.
  */
 function clear_global_post_cache( $post_id ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'clean_post_cache()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'clean_post_cache()' );
 }
 
 /**
@@ -151,7 +151,7 @@ function clear_global_post_cache( $post_id ) {
  * @see is_main_site()
  */
 function is_main_blog() {
-       _deprecated_function( __FUNCTION__, '3.0', 'is_main_site()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'is_main_site()' );
        return is_main_site();
 }
 
@@ -167,7 +167,7 @@ function is_main_blog() {
  * @return string|bool Either false or the valid email address.
  */
 function validate_email( $email, $check_domain = true) {
-       _deprecated_function( __FUNCTION__, '3.0', 'is_email()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'is_email()' );
        return is_email( $email, $check_domain );
 }
 
@@ -183,7 +183,7 @@ function validate_email( $email, $check_domain = true) {
  * @param string $deprecated Unused.
  */
 function get_blog_list( $start = 0, $num = 10, $deprecated = '' ) {
-       _deprecated_function( __FUNCTION__, '3.0', 'wp_get_sites()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'wp_get_sites()' );
 
        global $wpdb;
        $blogs = $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' ORDER BY registered DESC", $wpdb->siteid), ARRAY_A );
@@ -216,7 +216,7 @@ function get_blog_list( $start = 0, $num = 10, $deprecated = '' ) {
  * @return array List of "most active" sites.
  */
 function get_most_active_blogs( $num = 10, $display = true ) {
-       _deprecated_function( __FUNCTION__, '3.0' );
+       _deprecated_function( __FUNCTION__, '3.0.0' );
 
        $blogs = get_blog_list( 0, 'all', false ); // $blog_id -> $details
        if ( is_array( $blogs ) ) {
@@ -267,7 +267,7 @@ function get_most_active_blogs( $num = 10, $display = true ) {
  * @param string $url Optional. Redirect URL. Default empty.
  */
 function wpmu_admin_do_redirect( $url = '' ) {
-       _deprecated_function( __FUNCTION__, '3.3' );
+       _deprecated_function( __FUNCTION__, '3.3.0' );
 
        $ref = '';
        if ( isset( $_GET['ref'] ) )
@@ -307,7 +307,7 @@ function wpmu_admin_do_redirect( $url = '' ) {
  * @return string
  */
 function wpmu_admin_redirect_add_updated_param( $url = '' ) {
-       _deprecated_function( __FUNCTION__, '3.3' );
+       _deprecated_function( __FUNCTION__, '3.3.0' );
 
        if ( strpos( $url, 'updated=true' ) === false ) {
                if ( strpos( $url, '?' ) === false )
@@ -332,7 +332,7 @@ function wpmu_admin_redirect_add_updated_param( $url = '' ) {
  * @return int
  */
 function get_user_id_from_string( $string ) {
-       _deprecated_function( __FUNCTION__, '3.6', 'get_user_by()' );
+       _deprecated_function( __FUNCTION__, '3.6.0', 'get_user_by()' );
 
        if ( is_email( $string ) )
                $user = get_user_by( 'email', $string );
@@ -357,7 +357,7 @@ function get_user_id_from_string( $string ) {
  * @return string
  */
 function get_blogaddress_by_domain( $domain, $path ) {
-       _deprecated_function( __FUNCTION__, '3.7' );
+       _deprecated_function( __FUNCTION__, '3.7.0' );
 
        if ( is_subdomain_install() ) {
                $url = "http://" . $domain.$path;
@@ -388,7 +388,7 @@ function get_blogaddress_by_domain( $domain, $path ) {
  * @return string|int The ID of the newly created blog
  */
 function create_empty_blog( $domain, $path, $weblog_title, $site_id = 1 ) {
-       _deprecated_function( __FUNCTION__, '4.4' );
+       _deprecated_function( __FUNCTION__, '4.4.0' );
 
        if ( empty($path) )
                $path = '/';
@@ -424,7 +424,7 @@ function create_empty_blog( $domain, $path, $weblog_title, $site_id = 1 ) {
  * @return array|false The network admins
  */
 function get_admin_users_for_domain( $sitedomain = '', $path = '' ) {
-       _deprecated_function( __FUNCTION__, '4.4' );
+       _deprecated_function( __FUNCTION__, '4.4.0' );
 
        global $wpdb;
 
@@ -438,3 +438,77 @@ function get_admin_users_for_domain( $sitedomain = '', $path = '' ) {
 
        return false;
 }
+
+/**
+ * Return an array of sites for a network or networks.
+ *
+ * @since 3.7.0
+ * @deprecated 4.6.0
+ * @see get_sites()
+ *
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @param array $args {
+ *     Array of default arguments. Optional.
+ *
+ *     @type int|array $network_id A network ID or array of network IDs. Set to null to retrieve sites
+ *                                 from all networks. Defaults to current network ID.
+ *     @type int       $public     Retrieve public or non-public sites. Default null, for any.
+ *     @type int       $archived   Retrieve archived or non-archived sites. Default null, for any.
+ *     @type int       $mature     Retrieve mature or non-mature sites. Default null, for any.
+ *     @type int       $spam       Retrieve spam or non-spam sites. Default null, for any.
+ *     @type int       $deleted    Retrieve deleted or non-deleted sites. Default null, for any.
+ *     @type int       $limit      Number of sites to limit the query to. Default 100.
+ *     @type int       $offset     Exclude the first x sites. Used in combination with the $limit parameter. Default 0.
+ * }
+ * @return array An empty array if the install is considered "large" via wp_is_large_network(). Otherwise,
+ *               an associative array of site data arrays, each containing the site (network) ID, blog ID,
+ *               site domain and path, dates registered and modified, and the language ID. Also, boolean
+ *               values for whether the site is public, archived, mature, spam, and/or deleted.
+ */
+function wp_get_sites( $args = array() ) {
+       global $wpdb;
+
+       _deprecated_function( __FUNCTION__, '4.6.0', 'get_sites()' );
+
+       if ( wp_is_large_network() )
+               return array();
+
+       $defaults = array(
+               'network_id' => $wpdb->siteid,
+               'public'     => null,
+               'archived'   => null,
+               'mature'     => null,
+               'spam'       => null,
+               'deleted'    => null,
+               'limit'      => 100,
+               'offset'     => 0,
+       );
+
+       $args = wp_parse_args( $args, $defaults );
+
+       // Backwards compatibility
+       if( is_array( $args['network_id'] ) ){
+               $args['network__in'] = $args['network_id'];
+               $args['network_id'] = null;
+       }
+
+       if( is_numeric( $args['limit'] ) ){
+               $args['number'] = $args['limit'];
+               $args['limit'] = null;
+       }
+
+       // Make sure count is disabled.
+       $args['count'] = false;
+
+       $_sites  = get_sites( $args );
+
+       $results = array();
+
+       foreach ( $_sites as $_site ) {
+               $_site = get_site( $_site );
+               $results[] = $_site->to_array();
+       }
+
+       return $results;
+}
index dfb25daa0c264c487356be5987530dd4f2e9bcaf..a253a61dac97f1ccd9b6020e217e9e64d67d0496 100644 (file)
@@ -115,7 +115,7 @@ function get_user_count() {
  */
 function get_blog_count( $network_id = 0 ) {
        if ( func_num_args() )
-               _deprecated_argument( __FUNCTION__, '3.1' );
+               _deprecated_argument( __FUNCTION__, '3.1.0' );
 
        return get_site_option( 'blog_count' );
 }
@@ -138,10 +138,9 @@ function get_blog_post( $blog_id, $post_id ) {
 }
 
 /**
- * Add a user to a blog.
+ * Adds a user to a blog.
  *
- * Use the 'add_user_to_blog' action to fire an event when
- * users are added to a blog.
+ * Use the {@see 'add_user_to_blog'} action to fire an event when users are added to a blog.
  *
  * @since MU 1.0
  *
@@ -187,10 +186,10 @@ function add_user_to_blog( $blog_id, $user_id, $role ) {
 /**
  * Remove a user from a blog.
  *
- * Use the 'remove_user_from_blog' action to fire an event when
+ * Use the {@see 'remove_user_from_blog'} action to fire an event when
  * users are removed from a blog.
  *
- * Accepts an optional $reassign parameter, if you want to
+ * Accepts an optional `$reassign` parameter, if you want to
  * reassign the user's blog posts to another user upon removal.
  *
  * @since MU 1.0
@@ -305,8 +304,6 @@ function get_blog_permalink( $blog_id, $post_id ) {
  * @return int 0 if no blog found, otherwise the ID of the matching blog
  */
 function get_blog_id_from_url( $domain, $path = '/' ) {
-       global $wpdb;
-
        $domain = strtolower( $domain );
        $path = strtolower( $path );
        $id = wp_cache_get( md5( $domain . $path ), 'blog-id-cache' );
@@ -316,7 +313,13 @@ function get_blog_id_from_url( $domain, $path = '/' ) {
        elseif ( $id )
                return (int) $id;
 
-       $id = $wpdb->get_var( $wpdb->prepare( "SELECT blog_id FROM $wpdb->blogs WHERE domain = %s and path = %s /* get_blog_id_from_url */", $domain, $path ) );
+       $args = array(
+               'domain' => $domain,
+               'path' => $path,
+               'fields' => 'ids',
+       );
+       $result = get_sites( $args );
+       $id = array_shift( $result );
 
        if ( ! $id ) {
                wp_cache_set( md5( $domain . $path ), -1, 'blog-id-cache' );
@@ -374,7 +377,7 @@ function is_email_address_unsafe( $user_email ) {
        }
 
        /**
-        * Filter whether an email address is unsafe.
+        * Filters whether an email address is unsafe.
         *
         * @since 3.5.0
         *
@@ -497,7 +500,7 @@ function wpmu_validate_user_signup($user_name, $user_email) {
        $result = array('user_name' => $user_name, 'orig_username' => $orig_username, 'user_email' => $user_email, 'errors' => $errors);
 
        /**
-        * Filter the validated user registration details.
+        * Filters the validated user registration details.
         *
         * This does not allow you to override the username or email of the user during
         * registration. The values are solely used for validation and error handling.
@@ -527,7 +530,7 @@ function wpmu_validate_user_signup($user_name, $user_email) {
  * $user parameter to the function, where $user is the other user, is
  * effectively an override of this limitation.
  *
- * Filter 'wpmu_validate_blog_signup' if you want to modify
+ * Filter {@see 'wpmu_validate_blog_signup'} if you want to modify
  * the way that WordPress validates new site signups.
  *
  * @since MU
@@ -585,7 +588,7 @@ function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
                $errors->add('blogname', __('Sorry, site names must have letters too!'));
 
        /**
-        * Filter the new site name during registration.
+        * Filters the new site name during registration.
         *
         * The name is the site's subdomain or the site's subdirectory
         * path depending on the network settings.
@@ -631,7 +634,7 @@ function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
        $result = array('domain' => $mydomain, 'path' => $path, 'blogname' => $blogname, 'blog_title' => $blog_title, 'user' => $user, 'errors' => $errors);
 
        /**
-        * Filter site details and error messages following registration.
+        * Filters site details and error messages following registration.
         *
         * @since MU
         *
@@ -749,11 +752,11 @@ function wpmu_signup_user( $user, $user_email, $meta = array() ) {
  * This is the notification function used when site registration
  * is enabled.
  *
- * Filter 'wpmu_signup_blog_notification' to bypass this function or
+ * Filter {@see 'wpmu_signup_blog_notification'} to bypass this function or
  * replace it with your own notification behavior.
  *
- * Filter 'wpmu_signup_blog_notification_email' and
- * 'wpmu_signup_blog_notification_subject' to change the content
+ * Filter {@see 'wpmu_signup_blog_notification_email'} and
+ * {@see 'wpmu_signup_blog_notification_subject'} to change the content
  * and subject line of the email sent to newly registered users.
  *
  * @since MU
@@ -769,7 +772,7 @@ function wpmu_signup_user( $user, $user_email, $meta = array() ) {
  */
 function wpmu_signup_blog_notification( $domain, $path, $title, $user, $user_email, $key, $meta = array() ) {
        /**
-        * Filter whether to bypass the new site email notification.
+        * Filters whether to bypass the new site email notification.
         *
         * @since MU
         *
@@ -799,7 +802,7 @@ function wpmu_signup_blog_notification( $domain, $path, $title, $user, $user_ema
        $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
        $message = sprintf(
                /**
-                * Filter the message content of the new blog notification email.
+                * Filters the message content of the new blog notification email.
                 *
                 * Content should be formatted for transmission via wp_mail().
                 *
@@ -825,7 +828,7 @@ function wpmu_signup_blog_notification( $domain, $path, $title, $user, $user_ema
        // TODO: Don't hard code activation link.
        $subject = sprintf(
                /**
-                * Filter the subject of the new blog notification email.
+                * Filters the subject of the new blog notification email.
                 *
                 * @since MU
                 *
@@ -855,11 +858,11 @@ function wpmu_signup_blog_notification( $domain, $path, $title, $user, $user_ema
  * This is the notification function used when no new site has
  * been requested.
  *
- * Filter 'wpmu_signup_user_notification' to bypass this function or
+ * Filter {@see 'wpmu_signup_user_notification'} to bypass this function or
  * replace it with your own notification behavior.
  *
- * Filter 'wpmu_signup_user_notification_email' and
- * 'wpmu_signup_user_notification_subject' to change the content
+ * Filter {@see 'wpmu_signup_user_notification_email'} and
+ * {@see 'wpmu_signup_user_notification_subject'} to change the content
  * and subject line of the email sent to newly registered users.
  *
  * @since MU
@@ -872,7 +875,7 @@ function wpmu_signup_blog_notification( $domain, $path, $title, $user, $user_ema
  */
 function wpmu_signup_user_notification( $user, $user_email, $key, $meta = array() ) {
        /**
-        * Filter whether to bypass the email notification for new user sign-up.
+        * Filters whether to bypass the email notification for new user sign-up.
         *
         * @since MU
         *
@@ -892,7 +895,7 @@ function wpmu_signup_user_notification( $user, $user_email, $key, $meta = array(
        $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
        $message = sprintf(
                /**
-                * Filter the content of the notification email for new user sign-up.
+                * Filters the content of the notification email for new user sign-up.
                 *
                 * Content should be formatted for transmission via wp_mail().
                 *
@@ -913,7 +916,7 @@ function wpmu_signup_user_notification( $user, $user_email, $key, $meta = array(
        // TODO: Don't hard code activation link.
        $subject = sprintf(
                /**
-                * Filter the subject of the notification email of new user signup.
+                * Filters the subject of the notification email of new user signup.
                 *
                 * @since MU
                 *
@@ -937,7 +940,7 @@ function wpmu_signup_user_notification( $user, $user_email, $key, $meta = array(
 /**
  * Activate a signup.
  *
- * Hook to 'wpmu_activate_user' or 'wpmu_activate_blog' for events
+ * Hook to {@see 'wpmu_activate_user'} or {@see 'wpmu_activate_blog'} for events
  * that should happen only when users or sites are self-created (since
  * those actions are not called when users and sites are created
  * by a Super Admin).
@@ -1032,9 +1035,9 @@ function wpmu_activate_signup($key) {
  * Create a user.
  *
  * This function runs when a user self-registers as well as when
- * a Super Admin creates a new user. Hook to 'wpmu_new_user' for events
+ * a Super Admin creates a new user. Hook to {@see 'wpmu_new_user'} for events
  * that should affect all new users, but only on Multisite (otherwise
- * use 'user_register').
+ * use {@see'user_register'}).
  *
  * @since MU
  *
@@ -1070,7 +1073,7 @@ function wpmu_create_user( $user_name, $password, $email ) {
  * Create a site.
  *
  * This function runs when a user self-registers a new site as well
- * as when a Super Admin creates a new site. Hook to 'wpmu_new_blog'
+ * as when a Super Admin creates a new site. Hook to {@see 'wpmu_new_blog'}
  * for events that should affect all new sites.
  *
  * On subdirectory installs, $domain is the same as the main site's
@@ -1148,13 +1151,15 @@ function wpmu_create_blog( $domain, $path, $title, $user_id, $meta = array(), $s
         */
        do_action( 'wpmu_new_blog', $blog_id, $user_id, $domain, $path, $site_id, $meta );
 
+       wp_cache_set( 'last_changed', microtime(), 'sites' );
+
        return $blog_id;
 }
 
 /**
  * Notifies the network admin that a new site has been activated.
  *
- * Filter 'newblog_notify_siteadmin' to change the content of
+ * Filter {@see 'newblog_notify_siteadmin'} to change the content of
  * the notification email.
  *
  * @since MU
@@ -1184,7 +1189,7 @@ Remote IP: %3$s
 
 Disable these notifications: %4$s' ), $blogname, $siteurl, wp_unslash( $_SERVER['REMOTE_ADDR'] ), $options_site_url);
        /**
-        * Filter the message body of the new site activation email sent
+        * Filters the message body of the new site activation email sent
         * to the network administrator.
         *
         * @since MU
@@ -1200,7 +1205,7 @@ Disable these notifications: %4$s' ), $blogname, $siteurl, wp_unslash( $_SERVER[
 /**
  * Notifies the network admin that a new user has been activated.
  *
- * Filter 'newuser_notify_siteadmin' to change the content of
+ * Filter {@see 'newuser_notify_siteadmin'} to change the content of
  * the notification email.
  *
  * @since MU
@@ -1226,7 +1231,7 @@ Remote IP: %2$s
 Disable these notifications: %3$s'), $user->user_login, wp_unslash( $_SERVER['REMOTE_ADDR'] ), $options_site_url);
 
        /**
-        * Filter the message body of the new user activation email sent
+        * Filters the message body of the new user activation email sent
         * to the network administrator.
         *
         * @since MU
@@ -1255,12 +1260,18 @@ Disable these notifications: %3$s'), $user->user_login, wp_unslash( $_SERVER['RE
  * @return int
  */
 function domain_exists($domain, $path, $site_id = 1) {
-       global $wpdb;
        $path = trailingslashit( $path );
-       $result = $wpdb->get_var( $wpdb->prepare("SELECT blog_id FROM $wpdb->blogs WHERE domain = %s AND path = %s AND site_id = %d", $domain, $path, $site_id) );
+       $args = array(
+               'network_id' => $site_id,
+               'domain' => $domain,
+               'path' => $path,
+               'fields' => 'ids',
+       );
+       $result = get_sites( $args );
+       $result = array_shift( $result );
 
        /**
-        * Filter whether a blogname is taken.
+        * Filters whether a blogname is taken.
         *
         * @since 3.5.0
         *
@@ -1402,9 +1413,9 @@ function install_blog_defaults($blog_id, $user_id) {
 /**
  * Notify a user that their blog activation has been successful.
  *
- * Filter 'wpmu_welcome_notification' to disable or bypass.
+ * Filter {@see 'wpmu_welcome_notification'} to disable or bypass.
  *
- * Filter 'update_welcome_email' and 'update_welcome_subject' to
+ * Filter {@see 'update_welcome_email'} and {@see 'update_welcome_subject'} to
  * modify the content and subject line of the notification email.
  *
  * @since MU
@@ -1420,7 +1431,7 @@ function wpmu_welcome_notification( $blog_id, $user_id, $password, $title, $meta
        $current_site = get_current_site();
 
        /**
-        * Filter whether to bypass the welcome email after site activation.
+        * Filters whether to bypass the welcome email after site activation.
         *
         * Returning false disables the welcome email.
         *
@@ -1464,7 +1475,7 @@ We hope you enjoy your new site. Thanks!
        $welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );
 
        /**
-        * Filter the content of the welcome email after site activation.
+        * Filters the content of the welcome email after site activation.
         *
         * Content should be formatted for transmission via wp_mail().
         *
@@ -1491,7 +1502,7 @@ We hope you enjoy your new site. Thanks!
                $current_site->site_name = 'WordPress';
 
        /**
-        * Filter the subject of the welcome email after site activation.
+        * Filters the subject of the welcome email after site activation.
         *
         * @since MU
         *
@@ -1505,9 +1516,9 @@ We hope you enjoy your new site. Thanks!
 /**
  * Notify a user that their account activation has been successful.
  *
- * Filter 'wpmu_welcome_user_notification' to disable or bypass.
+ * Filter {@see 'wpmu_welcome_user_notification'} to disable or bypass.
  *
- * Filter 'update_welcome_user_email' and 'update_welcome_user_subject' to
+ * Filter {@see 'update_welcome_user_email'} and {@see 'update_welcome_user_subject'} to
  * modify the content and subject line of the notification email.
  *
  * @since MU
@@ -1521,7 +1532,7 @@ function wpmu_welcome_user_notification( $user_id, $password, $meta = array() )
        $current_site = get_current_site();
 
        /**
-        * Filter whether to bypass the welcome email after user activation.
+        * Filters whether to bypass the welcome email after user activation.
         *
         * Returning false disables the welcome email.
         *
@@ -1569,7 +1580,7 @@ function wpmu_welcome_user_notification( $user_id, $password, $meta = array() )
                $current_site->site_name = 'WordPress';
 
        /**
-        * Filter the subject of the welcome email after user activation.
+        * Filters the subject of the welcome email after user activation.
         *
         * @since MU
         *
@@ -1924,7 +1935,7 @@ function signup_nonce_check( $result ) {
  */
 function maybe_redirect_404() {
        /**
-        * Filter the redirect URL for 404s on the main site.
+        * Filters the redirect URL for 404s on the main site.
         *
         * The filter is only evaluated if the NOBLOGREDIRECT constant is defined.
         *
@@ -1998,10 +2009,10 @@ function add_existing_user_to_blog( $details = false ) {
 }
 
 /**
- * Add a newly created user to the appropriate blog
+ * Adds a newly created user to the appropriate blog
  *
  * To add a user in general, use add_user_to_blog(). This function
- * is specifically hooked into the wpmu_activate_user action.
+ * is specifically hooked into the {@see 'wpmu_activate_user'} action.
  *
  * @since MU
  * @see add_user_to_blog()
@@ -2200,7 +2211,7 @@ function wp_update_network_counts() {
 /**
  * Update the count of sites for the current network.
  *
- * If enabled through the 'enable_live_network_counts' filter, update the sites count
+ * If enabled through the {@see 'enable_live_network_counts'} filter, update the sites count
  * on a network when a site is created or its status is updated.
  *
  * @since 3.7.0
@@ -2209,7 +2220,7 @@ function wp_maybe_update_network_site_counts() {
        $is_small_network = ! wp_is_large_network( 'sites' );
 
        /**
-        * Filter whether to update network site or user counts when a new site is created.
+        * Filters whether to update network site or user counts when a new site is created.
         *
         * @since 3.7.0
         *
@@ -2227,7 +2238,7 @@ function wp_maybe_update_network_site_counts() {
 /**
  * Update the network-wide users count.
  *
- * If enabled through the 'enable_live_network_counts' filter, update the users count
+ * If enabled through the {@see 'enable_live_network_counts'} filter, update the users count
  * on a network when a user is created or its status is updated.
  *
  * @since 3.7.0
@@ -2252,7 +2263,14 @@ function wp_maybe_update_network_user_counts() {
 function wp_update_network_site_counts() {
        global $wpdb;
 
-       $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE site_id = %d AND spam = '0' AND deleted = '0' and archived = '0'", $wpdb->siteid) );
+       $count = get_sites( array(
+               'network_id' => $wpdb->siteid,
+               'spam'       => 0,
+               'deleted'    => 0,
+               'archived'   => 0,
+               'count'      => true,
+       ) );
+
        update_site_option( 'blog_count', $count );
 }
 
@@ -2279,7 +2297,7 @@ function wp_update_network_user_counts() {
  */
 function get_space_used() {
        /**
-        * Filter the amount of storage space used by the current site.
+        * Filters the amount of storage space used by the current site.
         *
         * @since 3.5.0
         *
@@ -2311,7 +2329,7 @@ function get_space_allowed() {
                $space_allowed = 100;
 
        /**
-        * Filter the upload quota for the current site.
+        * Filters the upload quota for the current site.
         *
         * @since 3.7.0
         *
@@ -2377,7 +2395,7 @@ function upload_size_limit_filter( $size ) {
  * Whether or not we have a large network.
  *
  * The default criteria for a large network is either more than 10,000 users or more than 10,000 sites.
- * Plugins can alter this criteria using the 'wp_is_large_network' filter.
+ * Plugins can alter this criteria using the {@see 'wp_is_large_network'} filter.
  *
  * @since 3.3.0
  * @param string $using 'sites or 'users'. Default is 'sites'.
@@ -2387,7 +2405,7 @@ function wp_is_large_network( $using = 'sites' ) {
        if ( 'users' == $using ) {
                $count = get_user_count();
                /**
-                * Filter whether the network is considered large.
+                * Filters whether the network is considered large.
                 *
                 * @since 3.3.0
                 *
@@ -2403,85 +2421,6 @@ function wp_is_large_network( $using = 'sites' ) {
        return apply_filters( 'wp_is_large_network', $count > 10000, 'sites', $count );
 }
 
-
-/**
- * Return an array of sites for a network or networks.
- *
- * @since 3.7.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array $args {
- *     Array of default arguments. Optional.
- *
- *     @type int|array $network_id A network ID or array of network IDs. Set to null to retrieve sites
- *                                 from all networks. Defaults to current network ID.
- *     @type int       $public     Retrieve public or non-public sites. Default null, for any.
- *     @type int       $archived   Retrieve archived or non-archived sites. Default null, for any.
- *     @type int       $mature     Retrieve mature or non-mature sites. Default null, for any.
- *     @type int       $spam       Retrieve spam or non-spam sites. Default null, for any.
- *     @type int       $deleted    Retrieve deleted or non-deleted sites. Default null, for any.
- *     @type int       $limit      Number of sites to limit the query to. Default 100.
- *     @type int       $offset     Exclude the first x sites. Used in combination with the $limit parameter. Default 0.
- * }
- * @return array An empty array if the install is considered "large" via wp_is_large_network(). Otherwise,
- *               an associative array of site data arrays, each containing the site (network) ID, blog ID,
- *               site domain and path, dates registered and modified, and the language ID. Also, boolean
- *               values for whether the site is public, archived, mature, spam, and/or deleted.
- */
-function wp_get_sites( $args = array() ) {
-       global $wpdb;
-
-       if ( wp_is_large_network() )
-               return array();
-
-       $defaults = array(
-               'network_id' => $wpdb->siteid,
-               'public'     => null,
-               'archived'   => null,
-               'mature'     => null,
-               'spam'       => null,
-               'deleted'    => null,
-               'limit'      => 100,
-               'offset'     => 0,
-       );
-
-       $args = wp_parse_args( $args, $defaults );
-
-       $query = "SELECT * FROM $wpdb->blogs WHERE 1=1 ";
-
-       if ( isset( $args['network_id'] ) && ( is_array( $args['network_id'] ) || is_numeric( $args['network_id'] ) ) ) {
-               $network_ids = implode( ',', wp_parse_id_list( $args['network_id'] ) );
-               $query .= "AND site_id IN ($network_ids) ";
-       }
-
-       if ( isset( $args['public'] ) )
-               $query .= $wpdb->prepare( "AND public = %d ", $args['public'] );
-
-       if ( isset( $args['archived'] ) )
-               $query .= $wpdb->prepare( "AND archived = %d ", $args['archived'] );
-
-       if ( isset( $args['mature'] ) )
-               $query .= $wpdb->prepare( "AND mature = %d ", $args['mature'] );
-
-       if ( isset( $args['spam'] ) )
-               $query .= $wpdb->prepare( "AND spam = %d ", $args['spam'] );
-
-       if ( isset( $args['deleted'] ) )
-               $query .= $wpdb->prepare( "AND deleted = %d ", $args['deleted'] );
-
-       if ( isset( $args['limit'] ) && $args['limit'] ) {
-               if ( isset( $args['offset'] ) && $args['offset'] )
-                       $query .= $wpdb->prepare( "LIMIT %d , %d ", $args['offset'], $args['limit'] );
-               else
-                       $query .= $wpdb->prepare( "LIMIT %d ", $args['limit'] );
-       }
-
-       $site_results = $wpdb->get_results( $query, ARRAY_A );
-
-       return $site_results;
-}
-
 /**
  * Retrieves a list of reserved site on a sub-directory Multisite install.
  *
@@ -2496,7 +2435,7 @@ function get_subdirectory_reserved_names() {
        );
 
        /**
-        * Filter reserved site names on a sub-directory Multisite install.
+        * Filters reserved site names on a sub-directory Multisite install.
         *
         * @since 3.0.0
         * @since 4.4.0 'wp-admin', 'wp-content', 'wp-includes', 'wp-json', and 'embed' were added
index a1923155231969fc001775d005741062b223d421..9fbaa5fa0d253e5ff7f97ee516e00f58a7b0c25b 100644 (file)
@@ -68,10 +68,9 @@ function wp_get_active_network_plugins() {
  * @return true|string Returns true on success, or drop-in file to include.
  */
 function ms_site_check() {
-       $blog = get_blog_details();
 
        /**
-        * Filter checking the status of the current blog.
+        * Filters checking the status of the current blog.
         *
         * @since 3.0.0
         *
@@ -85,6 +84,8 @@ function ms_site_check() {
        if ( is_super_admin() )
                return true;
 
+       $blog = get_blog_details();
+
        if ( '1' == $blog->deleted ) {
                if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) )
                        return WP_CONTENT_DIR . '/blog-deleted.php';
@@ -120,7 +121,8 @@ function ms_site_check() {
  * Retrieve the closest matching network for a domain and path.
  *
  * @since 3.9.0
- * @since 4.4.0 Converted to a wrapper for WP_Network::get_by_path()
+ *
+ * @internal In 4.4.0, converted to a wrapper for WP_Network::get_by_path()
  *
  * @param string   $domain   Domain to check.
  * @param string   $path     Path to check.
@@ -135,16 +137,16 @@ function get_network_by_path( $domain, $path, $segments = null ) {
  * Retrieve an object containing information about the requested network.
  *
  * @since 3.9.0
- * @since 4.4.0 Converted to leverage WP_Network
+ *
+ * @internal In 4.6.0, converted to use get_network()
  *
  * @param object|int $network The network's database row or ID.
  * @return WP_Network|false Object containing network information if found, false if not.
  */
 function wp_get_network( $network ) {
-       if ( ! is_object( $network ) ) {
-               $network = WP_Network::get_instance( $network );
-       } else {
-               $network = new WP_Network( $network );
+       $network = get_network( $network );
+       if ( null === $network ) {
+               return false;
        }
 
        return $network;
@@ -163,12 +165,10 @@ function wp_get_network( $network ) {
  * @return object|false Site object if successful. False when no site is found.
  */
 function get_site_by_path( $domain, $path, $segments = null ) {
-       global $wpdb;
-
        $path_segments = array_filter( explode( '/', trim( $path, '/' ) ) );
 
        /**
-        * Filter the number of path segments to consider when searching for a site.
+        * Filters the number of path segments to consider when searching for a site.
         *
         * @since 3.9.0
         *
@@ -231,27 +231,25 @@ function get_site_by_path( $domain, $path, $segments = null ) {
        $domains = array( $domain );
        if ( 'www.' === substr( $domain, 0, 4 ) ) {
                $domains[] = substr( $domain, 4 );
-               $search_domains = "'" . implode( "', '", $wpdb->_escape( $domains ) ) . "'";
        }
 
-       if ( count( $paths ) > 1 ) {
-               $search_paths = "'" . implode( "', '", $wpdb->_escape( $paths ) ) . "'";
+       $args = array(
+               'domain__in' => $domains,
+               'path__in' => $paths,
+               'number' => 1,
+       );
+
+       if ( count( $domains ) > 1 ) {
+               $args['orderby']['domain_length'] = 'DESC';
        }
 
-       if ( count( $domains ) > 1 && count( $paths ) > 1 ) {
-               $site = $wpdb->get_row( "SELECT * FROM $wpdb->blogs WHERE domain IN ($search_domains) AND path IN ($search_paths) ORDER BY CHAR_LENGTH(domain) DESC, CHAR_LENGTH(path) DESC LIMIT 1" );
-       } elseif ( count( $domains ) > 1 ) {
-               $sql = $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE path = %s", $paths[0] );
-               $sql .= " AND domain IN ($search_domains) ORDER BY CHAR_LENGTH(domain) DESC LIMIT 1";
-               $site = $wpdb->get_row( $sql );
-       } elseif ( count( $paths ) > 1 ) {
-               $sql = $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE domain = %s", $domains[0] );
-               $sql .= " AND path IN ($search_paths) ORDER BY CHAR_LENGTH(path) DESC LIMIT 1";
-               $site = $wpdb->get_row( $sql );
-       } else {
-               $site = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE domain = %s AND path = %s", $domains[0], $paths[0] ) );
+       if ( count( $paths ) > 1 ) {
+               $args['orderby']['path_length'] = 'DESC';
        }
 
+       $result = get_sites( $args );
+       $site = array_shift( $result );
+
        if ( $site ) {
                // @todo get_blog_details()
                return $site;
@@ -260,6 +258,193 @@ function get_site_by_path( $domain, $path, $segments = null ) {
        return false;
 }
 
+/**
+ * Identifies the network and site of a requested domain and path and populates the
+ * corresponding network and site global objects as part of the multisite bootstrap process.
+ *
+ * Prior to 4.6.0, this was a procedural block in `ms-settings.php`. It was wrapped into
+ * a function to facilitate unit tests. It should not be used outside of core.
+ *
+ * Usually, it's easier to query the site first, which then declares its network.
+ * In limited situations, we either can or must find the network first.
+ *
+ * If a network and site are found, a `true` response will be returned so that the
+ * request can continue.
+ *
+ * If neither a network or site is found, `false` or a URL string will be returned
+ * so that either an error can be shown or a redirect can occur.
+ *
+ * @since 4.6.0
+ * @access private
+ *
+ * @global wpdb       $wpdb         WordPress database abstraction object.
+ * @global WP_Network $current_site The current network.
+ * @global WP_Site    $current_blog The current site.
+ *
+ * @param string $domain    The requested domain.
+ * @param string $path      The requested path.
+ * @param bool   $subdomain Optional. Whether a subdomain (true) or subdirectory (false) configuration.
+ *                          Default false.
+ * @return bool|string True if bootstrap successfully populated `$current_blog` and `$current_site`.
+ *                     False if bootstrap could not be properly completed.
+ *                     Redirect URL if parts exist, but the request as a whole can not be fulfilled.
+ */
+function ms_load_current_site_and_network( $domain, $path, $subdomain = false ) {
+       global $wpdb, $current_site, $current_blog;
+
+       // If the network is defined in wp-config.php, we can simply use that.
+       if ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ) {
+               $current_site = new stdClass;
+               $current_site->id = defined( 'SITE_ID_CURRENT_SITE' ) ? SITE_ID_CURRENT_SITE : 1;
+               $current_site->domain = DOMAIN_CURRENT_SITE;
+               $current_site->path = PATH_CURRENT_SITE;
+               if ( defined( 'BLOG_ID_CURRENT_SITE' ) ) {
+                       $current_site->blog_id = BLOG_ID_CURRENT_SITE;
+               } elseif ( defined( 'BLOGID_CURRENT_SITE' ) ) { // deprecated.
+                       $current_site->blog_id = BLOGID_CURRENT_SITE;
+               }
+
+               if ( 0 === strcasecmp( $current_site->domain, $domain ) && 0 === strcasecmp( $current_site->path, $path ) ) {
+                       $current_blog = get_site_by_path( $domain, $path );
+               } elseif ( '/' !== $current_site->path && 0 === strcasecmp( $current_site->domain, $domain ) && 0 === stripos( $path, $current_site->path ) ) {
+                       // If the current network has a path and also matches the domain and path of the request,
+                       // we need to look for a site using the first path segment following the network's path.
+                       $current_blog = get_site_by_path( $domain, $path, 1 + count( explode( '/', trim( $current_site->path, '/' ) ) ) );
+               } else {
+                       // Otherwise, use the first path segment (as usual).
+                       $current_blog = get_site_by_path( $domain, $path, 1 );
+               }
+
+       } elseif ( ! $subdomain ) {
+               /*
+                * A "subdomain" install can be re-interpreted to mean "can support any domain".
+                * If we're not dealing with one of these installs, then the important part is determining
+                * the network first, because we need the network's path to identify any sites.
+                */
+               if ( ! $current_site = wp_cache_get( 'current_network', 'site-options' ) ) {
+                       // Are there even two networks installed?
+                       $one_network = $wpdb->get_row( "SELECT * FROM $wpdb->site LIMIT 2" ); // [sic]
+                       if ( 1 === $wpdb->num_rows ) {
+                               $current_site = new WP_Network( $one_network );
+                               wp_cache_add( 'current_network', $current_site, 'site-options' );
+                       } elseif ( 0 === $wpdb->num_rows ) {
+                               // A network not found hook should fire here.
+                               return false;
+                       }
+               }
+
+               if ( empty( $current_site ) ) {
+                       $current_site = WP_Network::get_by_path( $domain, $path, 1 );
+               }
+
+               if ( empty( $current_site ) ) {
+                       /**
+                        * Fires when a network cannot be found based on the requested domain and path.
+                        *
+                        * At the time of this action, the only recourse is to redirect somewhere
+                        * and exit. If you want to declare a particular network, do so earlier.
+                        *
+                        * @since 4.4.0
+                        *
+                        * @param string $domain       The domain used to search for a network.
+                        * @param string $path         The path used to search for a path.
+                        */
+                       do_action( 'ms_network_not_found', $domain, $path );
+
+                       return false;
+               } elseif ( $path === $current_site->path ) {
+                       $current_blog = get_site_by_path( $domain, $path );
+               } else {
+                       // Search the network path + one more path segment (on top of the network path).
+                       $current_blog = get_site_by_path( $domain, $path, substr_count( $current_site->path, '/' ) );
+               }
+       } else {
+               // Find the site by the domain and at most the first path segment.
+               $current_blog = get_site_by_path( $domain, $path, 1 );
+               if ( $current_blog ) {
+                       $current_site = WP_Network::get_instance( $current_blog->site_id ? $current_blog->site_id : 1 );
+               } else {
+                       // If you don't have a site with the same domain/path as a network, you're pretty screwed, but:
+                       $current_site = WP_Network::get_by_path( $domain, $path, 1 );
+               }
+       }
+
+       // The network declared by the site trumps any constants.
+       if ( $current_blog && $current_blog->site_id != $current_site->id ) {
+               $current_site = WP_Network::get_instance( $current_blog->site_id );
+       }
+
+       // No network has been found, bail.
+       if ( empty( $current_site ) ) {
+               /** This action is documented in wp-includes/ms-settings.php */
+               do_action( 'ms_network_not_found', $domain, $path );
+
+               return false;
+       }
+
+       // During activation of a new subdomain, the requested site does not yet exist.
+       if ( empty( $current_blog ) && wp_installing() ) {
+               $current_blog = new stdClass;
+               $current_blog->blog_id = $blog_id = 1;
+               $current_blog->public = 1;
+       }
+
+       // No site has been found, bail.
+       if ( empty( $current_blog ) ) {
+               // We're going to redirect to the network URL, with some possible modifications.
+               $scheme = is_ssl() ? 'https' : 'http';
+               $destination = "$scheme://{$current_site->domain}{$current_site->path}";
+
+               /**
+                * Fires when a network can be determined but a site cannot.
+                *
+                * At the time of this action, the only recourse is to redirect somewhere
+                * and exit. If you want to declare a particular site, do so earlier.
+                *
+                * @since 3.9.0
+                *
+                * @param object $current_site The network that had been determined.
+                * @param string $domain       The domain used to search for a site.
+                * @param string $path         The path used to search for a site.
+                */
+               do_action( 'ms_site_not_found', $current_site, $domain, $path );
+
+               if ( $subdomain && ! defined( 'NOBLOGREDIRECT' ) ) {
+                       // For a "subdomain" install, redirect to the signup form specifically.
+                       $destination .= 'wp-signup.php?new=' . str_replace( '.' . $current_site->domain, '', $domain );
+               } elseif ( $subdomain ) {
+                       // For a "subdomain" install, the NOBLOGREDIRECT constant
+                       // can be used to avoid a redirect to the signup form.
+                       // Using the ms_site_not_found action is preferred to the constant.
+                       if ( '%siteurl%' !== NOBLOGREDIRECT ) {
+                               $destination = NOBLOGREDIRECT;
+                       }
+               } elseif ( 0 === strcasecmp( $current_site->domain, $domain ) ) {
+                       /*
+                        * If the domain we were searching for matches the network's domain,
+                        * it's no use redirecting back to ourselves -- it'll cause a loop.
+                        * As we couldn't find a site, we're simply not installed.
+                        */
+                       return false;
+               }
+
+               return $destination;
+       }
+
+       // Figure out the current network's main site.
+       if ( empty( $current_site->blog_id ) ) {
+               if ( $current_blog->domain === $current_site->domain && $current_blog->path === $current_site->path ) {
+                       $current_site->blog_id = $current_blog->blog_id;
+               } elseif ( ! $current_site->blog_id = wp_cache_get( 'network:' . $current_site->id . ':main_site', 'site-options' ) ) {
+                       $current_site->blog_id = $wpdb->get_var( $wpdb->prepare( "SELECT blog_id FROM $wpdb->blogs WHERE domain = %s AND path = %s",
+                               $current_site->domain, $current_site->path ) );
+                       wp_cache_add( 'network:' . $current_site->id . ':main_site', $current_site->blog_id, 'site-options' );
+               }
+       }
+
+       return true;
+}
+
 /**
  * Displays a failure message.
  *
@@ -334,7 +519,7 @@ function ms_not_installed( $domain, $path ) {
  * @return object
  */
 function get_current_site_name( $current_site ) {
-       _deprecated_function( __FUNCTION__, '3.9', 'get_current_site()' );
+       _deprecated_function( __FUNCTION__, '3.9.0', 'get_current_site()' );
        return $current_site;
 }
 
@@ -354,6 +539,6 @@ function get_current_site_name( $current_site ) {
  */
 function wpmu_current_site() {
        global $current_site;
-       _deprecated_function( __FUNCTION__, '3.9' );
+       _deprecated_function( __FUNCTION__, '3.9.0' );
        return $current_site;
 }
index 351a926b49d85bddb9f51332775792b715f0bdea..1afa77adc47bc1ba8f6c0cba9f8f7c4b2b49dc13 100644 (file)
  * @since 3.0.0
  */
 
+/**
+ * Objects representing the current network and current site.
+ *
+ * These may be populated through a custom `sunrise.php`. If not, then this
+ * file will attempt to populate them based on the current request.
+ *
+ * @global WP_Network $current_site The current network.
+ * @global object     $current_blog The current site.
+ * @since 3.0.0
+ */
+global $current_site, $current_blog;
+
 /** WP_Network class */
 require_once( ABSPATH . WPINC . '/class-wp-network.php' );
 
@@ -29,12 +41,10 @@ if ( defined( 'SUNRISE' ) ) {
 /** Check for and define SUBDOMAIN_INSTALL and the deprecated VHOST constant. */
 ms_subdomain_constants();
 
+// This block will process a request if the current network or current site objects
+// have not been populated in the global scope through something like `sunrise.php`.
 if ( !isset( $current_site ) || !isset( $current_blog ) ) {
 
-       // Given the domain and path, let's try to identify the network and site.
-       // Usually, it's easier to query the site first, which declares its network.
-       // In limited situations, though, we either can or must find the network first.
-
        $domain = strtolower( stripslashes( $_SERVER['HTTP_HOST'] ) );
        if ( substr( $domain, -3 ) == ':80' ) {
                $domain = substr( $domain, 0, -3 );
@@ -50,154 +60,17 @@ if ( !isset( $current_site ) || !isset( $current_blog ) ) {
        }
        list( $path ) = explode( '?', $path );
 
-       // If the network is defined in wp-config.php, we can simply use that.
-       if ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ) {
-               $current_site = new stdClass;
-               $current_site->id = defined( 'SITE_ID_CURRENT_SITE' ) ? SITE_ID_CURRENT_SITE : 1;
-               $current_site->domain = DOMAIN_CURRENT_SITE;
-               $current_site->path = PATH_CURRENT_SITE;
-               if ( defined( 'BLOG_ID_CURRENT_SITE' ) ) {
-                       $current_site->blog_id = BLOG_ID_CURRENT_SITE;
-               } elseif ( defined( 'BLOGID_CURRENT_SITE' ) ) { // deprecated.
-                       $current_site->blog_id = BLOGID_CURRENT_SITE;
-               }
-
-               if ( 0 === strcasecmp( $current_site->domain, $domain ) && 0 === strcasecmp( $current_site->path, $path ) ) {
-                       $current_blog = get_site_by_path( $domain, $path );
-               } elseif ( '/' !== $current_site->path && 0 === strcasecmp( $current_site->domain, $domain ) && 0 === stripos( $path, $current_site->path ) ) {
-                       // If the current network has a path and also matches the domain and path of the request,
-                       // we need to look for a site using the first path segment following the network's path.
-                       $current_blog = get_site_by_path( $domain, $path, 1 + count( explode( '/', trim( $current_site->path, '/' ) ) ) );
-               } else {
-                       // Otherwise, use the first path segment (as usual).
-                       $current_blog = get_site_by_path( $domain, $path, 1 );
-               }
-
-       } elseif ( ! is_subdomain_install() ) {
-               /*
-                * A "subdomain" install can be re-interpreted to mean "can support any domain".
-                * If we're not dealing with one of these installs, then the important part is determining
-                * the network first, because we need the network's path to identify any sites.
-                */
-               if ( ! $current_site = wp_cache_get( 'current_network', 'site-options' ) ) {
-                       // Are there even two networks installed?
-                       $one_network = $wpdb->get_row( "SELECT * FROM $wpdb->site LIMIT 2" ); // [sic]
-                       if ( 1 === $wpdb->num_rows ) {
-                               $current_site = new WP_Network( $one_network );
-                               wp_cache_add( 'current_network', $current_site, 'site-options' );
-                       } elseif ( 0 === $wpdb->num_rows ) {
-                               ms_not_installed( $domain, $path );
-                       }
-               }
-               if ( empty( $current_site ) ) {
-                       $current_site = WP_Network::get_by_path( $domain, $path, 1 );
-               }
-
-               if ( empty( $current_site ) ) {
-                       /**
-                        * Fires when a network cannot be found based on the requested domain and path.
-                        *
-                        * At the time of this action, the only recourse is to redirect somewhere
-                        * and exit. If you want to declare a particular network, do so earlier.
-                        *
-                        * @since 4.4.0
-                        *
-                        * @param string $domain       The domain used to search for a network.
-                        * @param string $path         The path used to search for a path.
-                        */
-                       do_action( 'ms_network_not_found', $domain, $path );
-
-                       ms_not_installed( $domain, $path );
-               } elseif ( $path === $current_site->path ) {
-                       $current_blog = get_site_by_path( $domain, $path );
-               } else {
-                       // Search the network path + one more path segment (on top of the network path).
-                       $current_blog = get_site_by_path( $domain, $path, substr_count( $current_site->path, '/' ) );
-               }
-       } else {
-               // Find the site by the domain and at most the first path segment.
-               $current_blog = get_site_by_path( $domain, $path, 1 );
-               if ( $current_blog ) {
-                       $current_site = WP_Network::get_instance( $current_blog->site_id ? $current_blog->site_id : 1 );
-               } else {
-                       // If you don't have a site with the same domain/path as a network, you're pretty screwed, but:
-                       $current_site = WP_Network::get_by_path( $domain, $path, 1 );
-               }
-       }
-
-       // The network declared by the site trumps any constants.
-       if ( $current_blog && $current_blog->site_id != $current_site->id ) {
-               $current_site = WP_Network::get_instance( $current_blog->site_id );
-       }
-
-       // No network has been found, bail.
-       if ( empty( $current_site ) ) {
-               /** This action is documented in wp-includes/ms-settings.php */
-               do_action( 'ms_network_not_found', $domain, $path );
+       $bootstrap_result = ms_load_current_site_and_network( $domain, $path, is_subdomain_install() );
 
+       if ( true === $bootstrap_result ) {
+               // `$current_blog` and `$current_site are now populated.
+       } elseif ( false === $bootstrap_result ) {
                ms_not_installed( $domain, $path );
-       }
-
-       // During activation of a new subdomain, the requested site does not yet exist.
-       if ( empty( $current_blog ) && wp_installing() ) {
-               $current_blog = new stdClass;
-               $current_blog->blog_id = $blog_id = 1;
-               $current_blog->public = 1;
-       }
-
-       // No site has been found, bail.
-       if ( empty( $current_blog ) ) {
-               // We're going to redirect to the network URL, with some possible modifications.
-               $scheme = is_ssl() ? 'https' : 'http';
-               $destination = "$scheme://{$current_site->domain}{$current_site->path}";
-
-               /**
-                * Fires when a network can be determined but a site cannot.
-                *
-                * At the time of this action, the only recourse is to redirect somewhere
-                * and exit. If you want to declare a particular site, do so earlier.
-                *
-                * @since 3.9.0
-                *
-                * @param object $current_site The network that had been determined.
-                * @param string $domain       The domain used to search for a site.
-                * @param string $path         The path used to search for a site.
-                */
-               do_action( 'ms_site_not_found', $current_site, $domain, $path );
-
-               if ( is_subdomain_install() && ! defined( 'NOBLOGREDIRECT' ) ) {
-                       // For a "subdomain" install, redirect to the signup form specifically.
-                       $destination .= 'wp-signup.php?new=' . str_replace( '.' . $current_site->domain, '', $domain );
-               } elseif ( is_subdomain_install() ) {
-                       // For a "subdomain" install, the NOBLOGREDIRECT constant
-                       // can be used to avoid a redirect to the signup form.
-                       // Using the ms_site_not_found action is preferred to the constant.
-                       if ( '%siteurl%' !== NOBLOGREDIRECT ) {
-                               $destination = NOBLOGREDIRECT;
-                       }
-               } elseif ( 0 === strcasecmp( $current_site->domain, $domain ) ) {
-                       /*
-                        * If the domain we were searching for matches the network's domain,
-                        * it's no use redirecting back to ourselves -- it'll cause a loop.
-                        * As we couldn't find a site, we're simply not installed.
-                        */
-                       ms_not_installed( $domain, $path );
-               }
-
-               header( 'Location: ' . $destination );
+       } else {
+               header( 'Location: ' . $bootstrap_result );
                exit;
        }
-
-       // Figure out the current network's main site.
-       if ( empty( $current_site->blog_id ) ) {
-               if ( $current_blog->domain === $current_site->domain && $current_blog->path === $current_site->path ) {
-                       $current_site->blog_id = $current_blog->blog_id;
-               } elseif ( ! $current_site->blog_id = wp_cache_get( 'network:' . $current_site->id . ':main_site', 'site-options' ) ) {
-                       $current_site->blog_id = $wpdb->get_var( $wpdb->prepare( "SELECT blog_id FROM $wpdb->blogs WHERE domain = %s AND path = %s",
-                               $current_site->domain, $current_site->path ) );
-                       wp_cache_add( 'network:' . $current_site->id . ':main_site', $current_site->blog_id, 'site-options' );
-               }
-       }
+       unset( $bootstrap_result );
 
        $blog_id = $current_blog->blog_id;
        $public  = $current_blog->public;
@@ -231,3 +104,11 @@ if ( ! $current_blog instanceof WP_Site ) {
 
 // Define upload directory constants
 ms_upload_constants();
+
+/**
+ * Fires after the current site and network have been detected and loaded
+ * in multisite's bootstrap.
+ *
+ * @since 4.6.0
+ */
+do_action( 'ms_loaded' );
index e947eb857190f8ee34802d9c52501fbea240d34a..62a66d39ae1d323ce847fd6d2d82b56f13842d4a 100644 (file)
 <?php
 /**
- * Navigation Menu template functions
+ * Nav Menu API: Template functions
  *
  * @package WordPress
  * @subpackage Nav_Menus
  * @since 3.0.0
  */
 
-/**
- * Create HTML list of nav menu items.
- *
- * @since 3.0.0
- * @uses Walker
- */
-class Walker_Nav_Menu extends Walker {
-       /**
-        * What the class handles.
-        *
-        * @see Walker::$tree_type
-        * @since 3.0.0
-        * @var string
-        */
-       public $tree_type = array( 'post_type', 'taxonomy', 'custom' );
-
-       /**
-        * Database fields to use.
-        *
-        * @see Walker::$db_fields
-        * @since 3.0.0
-        * @todo Decouple this.
-        * @var array
-        */
-       public $db_fields = array( 'parent' => 'menu_item_parent', 'id' => 'db_id' );
-
-       /**
-        * Starts the list before the elements are added.
-        *
-        * @see Walker::start_lvl()
-        *
-        * @since 3.0.0
-        *
-        * @param string $output Passed by reference. Used to append additional content.
-        * @param int    $depth  Depth of menu item. Used for padding.
-        * @param array  $args   An array of arguments. @see wp_nav_menu()
-        */
-       public function start_lvl( &$output, $depth = 0, $args = array() ) {
-               $indent = str_repeat("\t", $depth);
-               $output .= "\n$indent<ul class=\"sub-menu\">\n";
-       }
-
-       /**
-        * Ends the list of after the elements are added.
-        *
-        * @see Walker::end_lvl()
-        *
-        * @since 3.0.0
-        *
-        * @param string $output Passed by reference. Used to append additional content.
-        * @param int    $depth  Depth of menu item. Used for padding.
-        * @param array  $args   An array of arguments. @see wp_nav_menu()
-        */
-       public function end_lvl( &$output, $depth = 0, $args = array() ) {
-               $indent = str_repeat("\t", $depth);
-               $output .= "$indent</ul>\n";
-       }
-
-       /**
-        * Start the element output.
-        *
-        * @see Walker::start_el()
-        *
-        * @since 3.0.0
-        * @since 4.4.0 'nav_menu_item_args' filter was added.
-        *
-        * @param string $output Passed by reference. Used to append additional content.
-        * @param object $item   Menu item data object.
-        * @param int    $depth  Depth of menu item. Used for padding.
-        * @param array  $args   An array of arguments. @see wp_nav_menu()
-        * @param int    $id     Current item ID.
-        */
-       public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
-               $indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
-
-               $classes = empty( $item->classes ) ? array() : (array) $item->classes;
-               $classes[] = 'menu-item-' . $item->ID;
-
-               /**
-                * Filter the arguments for a single nav menu item.
-                *
-                * @since 4.4.0
-                *
-                * @param array  $args  An array of arguments.
-                * @param object $item  Menu item data object.
-                * @param int    $depth Depth of menu item. Used for padding.
-                */
-               $args = apply_filters( 'nav_menu_item_args', $args, $item, $depth );
-
-               /**
-                * Filter the CSS class(es) applied to a menu item's list item element.
-                *
-                * @since 3.0.0
-                * @since 4.1.0 The `$depth` parameter was added.
-                *
-                * @param array  $classes The CSS classes that are applied to the menu item's `<li>` element.
-                * @param object $item    The current menu item.
-                * @param array  $args    An array of {@see wp_nav_menu()} arguments.
-                * @param int    $depth   Depth of menu item. Used for padding.
-                */
-               $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args, $depth ) );
-               $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
-
-               /**
-                * Filter the ID applied to a menu item's list item element.
-                *
-                * @since 3.0.1
-                * @since 4.1.0 The `$depth` parameter was added.
-                *
-                * @param string $menu_id The ID that is applied to the menu item's `<li>` element.
-                * @param object $item    The current menu item.
-                * @param array  $args    An array of {@see wp_nav_menu()} arguments.
-                * @param int    $depth   Depth of menu item. Used for padding.
-                */
-               $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args, $depth );
-               $id = $id ? ' id="' . esc_attr( $id ) . '"' : '';
-
-               $output .= $indent . '<li' . $id . $class_names .'>';
-
-               $atts = array();
-               $atts['title']  = ! empty( $item->attr_title ) ? $item->attr_title : '';
-               $atts['target'] = ! empty( $item->target )     ? $item->target     : '';
-               $atts['rel']    = ! empty( $item->xfn )        ? $item->xfn        : '';
-               $atts['href']   = ! empty( $item->url )        ? $item->url        : '';
-
-               /**
-                * Filter the HTML attributes applied to a menu item's anchor element.
-                *
-                * @since 3.6.0
-                * @since 4.1.0 The `$depth` parameter was added.
-                *
-                * @param array $atts {
-                *     The HTML attributes applied to the menu item's `<a>` element, empty strings are ignored.
-                *
-                *     @type string $title  Title attribute.
-                *     @type string $target Target attribute.
-                *     @type string $rel    The rel attribute.
-                *     @type string $href   The href attribute.
-                * }
-                * @param object $item  The current menu item.
-                * @param array  $args  An array of {@see wp_nav_menu()} arguments.
-                * @param int    $depth Depth of menu item. Used for padding.
-                */
-               $atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args, $depth );
-
-               $attributes = '';
-               foreach ( $atts as $attr => $value ) {
-                       if ( ! empty( $value ) ) {
-                               $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
-                               $attributes .= ' ' . $attr . '="' . $value . '"';
-                       }
-               }
-
-               /** This filter is documented in wp-includes/post-template.php */
-               $title = apply_filters( 'the_title', $item->title, $item->ID );
-
-               /**
-                * Filter a menu item's title.
-                *
-                * @since 4.4.0
-                *
-                * @param string $title The menu item's title.
-                * @param object $item  The current menu item.
-                * @param array  $args  An array of {@see wp_nav_menu()} arguments.
-                * @param int    $depth Depth of menu item. Used for padding.
-                */
-               $title = apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth );
-
-               $item_output = $args->before;
-               $item_output .= '<a'. $attributes .'>';
-               $item_output .= $args->link_before . $title . $args->link_after;
-               $item_output .= '</a>';
-               $item_output .= $args->after;
-
-               /**
-                * Filter a menu item's starting output.
-                *
-                * The menu item's starting output only includes `$args->before`, the opening `<a>`,
-                * the menu item's title, the closing `</a>`, and `$args->after`. Currently, there is
-                * no filter for modifying the opening and closing `<li>` for a menu item.
-                *
-                * @since 3.0.0
-                *
-                * @param string $item_output The menu item's starting HTML output.
-                * @param object $item        Menu item data object.
-                * @param int    $depth       Depth of menu item. Used for padding.
-                * @param array  $args        An array of {@see wp_nav_menu()} arguments.
-                */
-               $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
-       }
-
-       /**
-        * Ends the element output, if needed.
-        *
-        * @see Walker::end_el()
-        *
-        * @since 3.0.0
-        *
-        * @param string $output Passed by reference. Used to append additional content.
-        * @param object $item   Page data object. Not used.
-        * @param int    $depth  Depth of page. Not Used.
-        * @param array  $args   An array of arguments. @see wp_nav_menu()
-        */
-       public function end_el( &$output, $item, $depth = 0, $args = array() ) {
-               $output .= "</li>\n";
-       }
-
-} // Walker_Nav_Menu
+/** Walker_Nav_Menu class */
+require_once ABSPATH . WPINC . '/class-walker-nav-menu.php';
 
 /**
  * Displays a navigation menu.
@@ -235,10 +29,10 @@ class Walker_Nav_Menu extends Walker {
  *     @type string        $container_id    The ID that is applied to the container. Default empty.
  *     @type callable|bool $fallback_cb     If the menu doesn't exists, a callback function will fire.
  *                                          Default is 'wp_page_menu'. Set to false for no fallback.
- *     @type string        $before          Text before the link text. Default empty.
- *     @type string        $after           Text after the link text. Default empty.
- *     @type string        $link_before     Text before the link. Default empty.
- *     @type string        $link_after      Text after the link. Default empty.
+ *     @type string        $before          Text before the link markup. Default empty.
+ *     @type string        $after           Text after the link markup. Default empty.
+ *     @type string        $link_before     Text before the link text. Default empty.
+ *     @type string        $link_after      Text after the link text. Default empty.
  *     @type bool          $echo            Whether to echo the menu or return it. Default true.
  *     @type int           $depth           How many levels of the hierarchy are to be included. 0 means all. Default 0.
  *     @type object        $walker          Instance of a custom walker class. Default empty.
@@ -258,7 +52,7 @@ function wp_nav_menu( $args = array() ) {
 
        $args = wp_parse_args( $args, $defaults );
        /**
-        * Filter the arguments used to display a navigation menu.
+        * Filters the arguments used to display a navigation menu.
         *
         * @since 3.0.0
         *
@@ -270,7 +64,7 @@ function wp_nav_menu( $args = array() ) {
        $args = (object) $args;
 
        /**
-        * Filter whether to short-circuit the wp_nav_menu() output.
+        * Filters whether to short-circuit the wp_nav_menu() output.
         *
         * Returning a non-null value to the filter will short-circuit
         * wp_nav_menu(), echoing that value if $args->echo is true,
@@ -340,7 +134,7 @@ function wp_nav_menu( $args = array() ) {
        $show_container = false;
        if ( $args->container ) {
                /**
-                * Filter the list of HTML tags that are valid for use as menu containers.
+                * Filters the list of HTML tags that are valid for use as menu containers.
                 *
                 * @since 3.0.0
                 *
@@ -377,7 +171,7 @@ function wp_nav_menu( $args = array() ) {
        unset( $menu_items, $menu_item );
 
        /**
-        * Filter the sorted list of menu item objects before generating the menu's HTML.
+        * Filters the sorted list of menu item objects before generating the menu's HTML.
         *
         * @since 3.1.0
         *
@@ -406,7 +200,7 @@ function wp_nav_menu( $args = array() ) {
        $wrap_class = $args->menu_class ? $args->menu_class : '';
 
        /**
-        * Filter the HTML list content for navigation menus.
+        * Filters the HTML list content for navigation menus.
         *
         * @since 3.0.0
         *
@@ -417,7 +211,7 @@ function wp_nav_menu( $args = array() ) {
         */
        $items = apply_filters( 'wp_nav_menu_items', $items, $args );
        /**
-        * Filter the HTML list content for a specific navigation menu.
+        * Filters the HTML list content for a specific navigation menu.
         *
         * @since 3.0.0
         *
@@ -439,7 +233,7 @@ function wp_nav_menu( $args = array() ) {
                $nav_menu .= '</' . $args->container . '>';
 
        /**
-        * Filter the HTML content for navigation menus.
+        * Filters the HTML content for navigation menus.
         *
         * @since 3.0.0
         *
index 70a450e3958b4a867beeda3975be10d188ff6c8a..ae573c5c3e9a1f8e8eae776864b0266bb9a27b74 100644 (file)
@@ -39,7 +39,7 @@ function wp_get_nav_menu_object( $menu ) {
        }
 
        /**
-        * Filter the nav_menu term retrieved for wp_get_nav_menu_object().
+        * Filters the nav_menu term retrieved for wp_get_nav_menu_object().
         *
         * @since 4.3.0
         *
@@ -126,13 +126,13 @@ function register_nav_menu( $location, $description ) {
        register_nav_menus( array( $location => $description ) );
 }
 /**
- * Returns all registered navigation menu locations in a theme.
+ * Retrieves all registered navigation menu locations in a theme.
  *
  * @since 3.0.0
  *
  * @global array $_wp_registered_nav_menus
  *
- * @return array
+ * @return array Registered navigation menu locations. If none are registered, an empty array.
  */
 function get_registered_nav_menus() {
        global $_wp_registered_nav_menus;
@@ -142,10 +142,12 @@ function get_registered_nav_menus() {
 }
 
 /**
- * Returns an array with the registered navigation menu locations and the menu assigned to it
+ * Retrieves all registered navigation menu locations and the menus assigned to them.
  *
  * @since 3.0.0
- * @return array
+ *
+ * @return array Registered navigation menu locations and the menus assigned them.
+ *               If none are registered, an empty array.
  */
 
 function get_nav_menu_locations() {
@@ -171,7 +173,7 @@ function has_nav_menu( $location ) {
        }
 
        /**
-        * Filter whether a nav menu is assigned to the specified location.
+        * Filters whether a nav menu is assigned to the specified location.
         *
         * @since 4.3.0
         *
@@ -534,7 +536,7 @@ function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item
  * @since 4.1.0 Default value of the 'orderby' argument was changed from 'none'
  *              to 'name'.
  *
- * @param array $args Optional. Array of arguments passed on to {@see get_terms()}.
+ * @param array $args Optional. Array of arguments passed on to get_terms().
  *                    Default empty array.
  * @return array Menu objects.
  */
@@ -543,7 +545,7 @@ function wp_get_nav_menus( $args = array() ) {
        $args = wp_parse_args( $args, $defaults );
 
        /**
-        * Filter the navigation menu objects being returned.
+        * Filters the navigation menu objects being returned.
         *
         * @since 3.0.0
         *
@@ -611,7 +613,7 @@ function _is_valid_nav_menu_item( $item ) {
  * @staticvar array $fetched
  *
  * @param string $menu Menu name, ID, or slug.
- * @param array  $args Optional. Arguments to pass to {@see get_posts()}.
+ * @param array  $args Optional. Arguments to pass to get_posts().
  * @return false|array $items Array of menu items, otherwise false.
  */
 function wp_get_nav_menu_items( $menu, $args = array() ) {
@@ -689,7 +691,7 @@ function wp_get_nav_menu_items( $menu, $args = array() ) {
        }
 
        /**
-        * Filter the navigation menu items being returned.
+        * Filters the navigation menu items being returned.
         *
         * @since 3.0.0
         *
@@ -798,7 +800,7 @@ function wp_setup_nav_menu_item( $menu_item ) {
                        $menu_item->target = ! isset( $menu_item->target ) ? get_post_meta( $menu_item->ID, '_menu_item_target', true ) : $menu_item->target;
 
                        /**
-                        * Filter a navigation menu item's title attribute.
+                        * Filters a navigation menu item's title attribute.
                         *
                         * @since 3.0.0
                         *
@@ -808,7 +810,7 @@ function wp_setup_nav_menu_item( $menu_item ) {
 
                        if ( ! isset( $menu_item->description ) ) {
                                /**
-                                * Filter a navigation menu item's description.
+                                * Filters a navigation menu item's description.
                                 *
                                 * @since 3.0.0
                                 *
@@ -869,7 +871,7 @@ function wp_setup_nav_menu_item( $menu_item ) {
        }
 
        /**
-        * Filter a navigation menu item object.
+        * Filters a navigation menu item object.
         *
         * @since 3.0.0
         *
index 842981dd4850cc217452136df201209f723c398c..2f3cdd1e7527be5a3ad5a34892c9a869ff383682 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 /**
- * Retrieve option value based on name of option.
+ * Retrieves an option value based on an option name.
  *
  * If the option does not exist or does not have a value, then the return value
  * will be false. This is useful to check whether you need to install an option
@@ -16,8 +16,8 @@
  *
  * If the option was serialized then it will be unserialized when it is returned.
  *
- * Any scalar values will be returned as strings. You may coerce the return type of a given option by registering a
- * 'option_{$option}' filter callback.
+ * Any scalar values will be returned as strings. You may coerce the return type of
+ * a given option by registering an {@see 'option_$option'} filter callback.
  *
  * @since 1.5.0
  *
@@ -35,7 +35,7 @@ function get_option( $option, $default = false ) {
                return false;
 
        /**
-        * Filter the value of an existing option before it is retrieved.
+        * Filters the value of an existing option before it is retrieved.
         *
         * The dynamic portion of the hook name, `$option`, refers to the option name.
         *
@@ -61,7 +61,7 @@ function get_option( $option, $default = false ) {
                $notoptions = wp_cache_get( 'notoptions', 'options' );
                if ( isset( $notoptions[ $option ] ) ) {
                        /**
-                        * Filter the default value for an option.
+                        * Filters the default value for an option.
                         *
                         * The dynamic portion of the hook name, `$option`, refers to the option name.
                         *
@@ -121,7 +121,7 @@ function get_option( $option, $default = false ) {
                $value = untrailingslashit( $value );
 
        /**
-        * Filter the value of an existing option.
+        * Filters the value of an existing option.
         *
         * The dynamic portion of the hook name, `$option`, refers to the option name.
         *
@@ -266,7 +266,7 @@ function update_option( $option, $value, $autoload = null ) {
        $old_value = get_option( $option );
 
        /**
-        * Filter a specific option before its value is (maybe) serialized and updated.
+        * Filters a specific option before its value is (maybe) serialized and updated.
         *
         * The dynamic portion of the hook name, `$option`, refers to the option name.
         *
@@ -280,7 +280,7 @@ function update_option( $option, $value, $autoload = null ) {
        $value = apply_filters( 'pre_update_option_' . $option, $value, $old_value, $option );
 
        /**
-        * Filter an option before its value is (maybe) serialized and updated.
+        * Filters an option before its value is (maybe) serialized and updated.
         *
         * @since 3.9.0
         *
@@ -295,7 +295,7 @@ function update_option( $option, $value, $autoload = null ) {
                return false;
 
        /** This filter is documented in wp-includes/option.php */
-       if ( apply_filters( 'default_option_' . $option, false ) === $old_value ) {
+       if ( apply_filters( 'default_option_' . $option, false, $option ) === $old_value ) {
                // Default setting for new options is 'yes'.
                if ( null === $autoload ) {
                        $autoload = 'yes';
@@ -399,7 +399,7 @@ function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' )
        global $wpdb;
 
        if ( !empty( $deprecated ) )
-               _deprecated_argument( __FUNCTION__, '2.3' );
+               _deprecated_argument( __FUNCTION__, '2.3.0' );
 
        $option = trim($option);
        if ( empty($option) )
@@ -416,7 +416,7 @@ function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' )
        $notoptions = wp_cache_get( 'notoptions', 'options' );
        if ( !is_array( $notoptions ) || !isset( $notoptions[$option] ) )
                /** This filter is documented in wp-includes/option.php */
-               if ( apply_filters( 'default_option_' . $option, false ) !== get_option( $option ) )
+               if ( apply_filters( 'default_option_' . $option, false, $option ) !== get_option( $option ) )
                        return false;
 
        $serialized_value = maybe_serialize( $value );
@@ -609,7 +609,7 @@ function delete_transient( $transient ) {
 function get_transient( $transient ) {
 
        /**
-        * Filter the value of an existing transient.
+        * Filters the value of an existing transient.
         *
         * The dynamic portion of the hook name, `$transient`, refers to the transient name.
         *
@@ -651,7 +651,7 @@ function get_transient( $transient ) {
        }
 
        /**
-        * Filter an existing transient's value.
+        * Filters an existing transient's value.
         *
         * The dynamic portion of the hook name, `$transient`, refers to the transient name.
         *
@@ -684,7 +684,7 @@ function set_transient( $transient, $value, $expiration = 0 ) {
        $expiration = (int) $expiration;
 
        /**
-        * Filter a specific transient before its value is set.
+        * Filters a specific transient before its value is set.
         *
         * The dynamic portion of the hook name, `$transient`, refers to the transient name.
         *
@@ -699,7 +699,7 @@ function set_transient( $transient, $value, $expiration = 0 ) {
        $value = apply_filters( 'pre_set_transient_' . $transient, $value, $expiration, $transient );
 
        /**
-        * Filter the expiration for a transient before its value is set.
+        * Filters the expiration for a transient before its value is set.
         *
         * The dynamic portion of the hook name, `$transient`, refers to the transient name.
         *
@@ -844,13 +844,14 @@ function get_user_setting( $name, $default = false ) {
  * Add or update user interface setting.
  *
  * Both $name and $value can contain only ASCII letters, numbers and underscores.
+ *
  * This function has to be used before any output has started as it calls setcookie().
  *
  * @since 2.8.0
  *
  * @param string $name  The name of the setting.
  * @param string $value The value for the setting.
- * @return bool|void true if set successfully/false if not.
+ * @return bool|null True if set successfully, false if not. Null if the current user can't be established.
  */
 function set_user_setting( $name, $value ) {
        if ( headers_sent() ) {
@@ -867,12 +868,13 @@ function set_user_setting( $name, $value ) {
  * Delete user interface settings.
  *
  * Deleting settings would reset them to the defaults.
+ *
  * This function has to be used before any output has started as it calls setcookie().
  *
  * @since 2.7.0
  *
  * @param string $names The name or array of names of the setting to be deleted.
- * @return bool|void true if deleted successfully/false if not.
+ * @return bool|null True if deleted successfully, false if not. Null if the current user can't be established.
  */
 function delete_user_setting( $names ) {
        if ( headers_sent() ) {
@@ -941,11 +943,13 @@ function get_all_user_settings() {
  * Private. Set all user interface settings.
  *
  * @since 2.8.0
+ * @access private
  *
  * @global array $_updated_user_settings
  *
- * @param array $user_settings
- * @return bool|void
+ * @param array $user_settings User settings.
+ * @return bool|null False if the current user can't be found, null if the current
+ *                   user is not a super admin or a member of the site, otherwise true.
  */
 function wp_set_all_user_settings( $user_settings ) {
        global $_updated_user_settings;
@@ -1088,7 +1092,7 @@ function get_network_option( $network_id, $option, $default = false ) {
        }
 
        /**
-        * Filter an existing network option before it is retrieved.
+        * Filters an existing network option before it is retrieved.
         *
         * The dynamic portion of the hook name, `$option`, refers to the option name.
         *
@@ -1115,7 +1119,7 @@ function get_network_option( $network_id, $option, $default = false ) {
        if ( isset( $notoptions[ $option ] ) ) {
 
                /**
-                * Filter a specific default network option.
+                * Filters a specific default network option.
                 *
                 * The dynamic portion of the hook name, `$option`, refers to the option name.
                 *
@@ -1159,7 +1163,7 @@ function get_network_option( $network_id, $option, $default = false ) {
        }
 
        /**
-        * Filter the value of an existing network option.
+        * Filters the value of an existing network option.
         *
         * The dynamic portion of the hook name, `$option`, refers to the option name.
         *
@@ -1207,7 +1211,7 @@ function add_network_option( $network_id, $option, $value ) {
        wp_protect_special_option( $option );
 
        /**
-        * Filter the value of a specific network option before it is added.
+        * Filters the value of a specific network option before it is added.
         *
         * The dynamic portion of the hook name, `$option`, refers to the option name.
         *
@@ -1223,7 +1227,7 @@ function add_network_option( $network_id, $option, $value ) {
        $notoptions_key = "$network_id:notoptions";
 
        if ( ! is_multisite() ) {
-               $result = add_option( $option, $value );
+               $result = add_option( $option, $value, '', 'no' );
        } else {
                $cache_key = "$network_id:$option";
 
@@ -1401,7 +1405,7 @@ function update_network_option( $network_id, $option, $value ) {
        $old_value = get_network_option( $network_id, $option, false );
 
        /**
-        * Filter a specific network option before its value is updated.
+        * Filters a specific network option before its value is updated.
         *
         * The dynamic portion of the hook name, `$option`, refers to the option name.
         *
@@ -1431,7 +1435,7 @@ function update_network_option( $network_id, $option, $value ) {
        }
 
        if ( ! is_multisite() ) {
-               $result = update_option( $option, $value );
+               $result = update_option( $option, $value, 'no' );
        } else {
                $value = sanitize_option( $option, $value );
 
@@ -1538,7 +1542,7 @@ function delete_site_transient( $transient ) {
 function get_site_transient( $transient ) {
 
        /**
-        * Filter the value of an existing site transient.
+        * Filters the value of an existing site transient.
         *
         * The dynamic portion of the hook name, `$transient`, refers to the transient name.
         *
@@ -1579,7 +1583,7 @@ function get_site_transient( $transient ) {
        }
 
        /**
-        * Filter the value of an existing site transient.
+        * Filters the value of an existing site transient.
         *
         * The dynamic portion of the hook name, `$transient`, refers to the transient name.
         *
@@ -1611,7 +1615,7 @@ function get_site_transient( $transient ) {
 function set_site_transient( $transient, $value, $expiration = 0 ) {
 
        /**
-        * Filter the value of a specific site transient before it is set.
+        * Filters the value of a specific site transient before it is set.
         *
         * The dynamic portion of the hook name, `$transient`, refers to the transient name.
         *
@@ -1626,7 +1630,7 @@ function set_site_transient( $transient, $value, $expiration = 0 ) {
        $expiration = (int) $expiration;
 
        /**
-        * Filter the expiration for a site transient before its value is set.
+        * Filters the expiration for a site transient before its value is set.
         *
         * The dynamic portion of the hook name, `$transient`, refers to the transient name.
         *
index 466359e987f3651cb76d0971c844992779dc39ea..03eeae482d6eeb27bb93602b69d604663133be06 100644 (file)
@@ -30,7 +30,7 @@ if ( !function_exists('set_current_user') ) :
  * @return WP_User returns wp_set_current_user()
  */
 function set_current_user($id, $name = '') {
-       _deprecated_function( __FUNCTION__, '3.0', 'wp_set_current_user()' );
+       _deprecated_function( __FUNCTION__, '3.0.0', 'wp_set_current_user()' );
        return wp_set_current_user($id, $name);
 }
 endif;
@@ -46,7 +46,7 @@ if ( !function_exists('get_currentuserinfo') ) :
  * @return bool|WP_User False on XMLRPC Request and invalid auth cookie, WP_User instance otherwise.
  */
 function get_currentuserinfo() {
-       _deprecated_function( __FUNCTION__, '4.5', 'wp_get_current_user()' );
+       _deprecated_function( __FUNCTION__, '4.5.0', 'wp_get_current_user()' );
 
        return _wp_get_current_user();
 }
@@ -64,7 +64,7 @@ if ( !function_exists('get_userdatabylogin') ) :
  * @return bool|object False on failure, User DB row object
  */
 function get_userdatabylogin($user_login) {
-       _deprecated_function( __FUNCTION__, '3.3', "get_user_by('login')" );
+       _deprecated_function( __FUNCTION__, '3.3.0', "get_user_by('login')" );
        return get_user_by('login', $user_login);
 }
 endif;
@@ -81,7 +81,7 @@ if ( !function_exists('get_user_by_email') ) :
  * @return bool|object False on failure, User DB row object
  */
 function get_user_by_email($email) {
-       _deprecated_function( __FUNCTION__, '3.3', "get_user_by('email')" );
+       _deprecated_function( __FUNCTION__, '3.3.0', "get_user_by('email')" );
        return get_user_by('email', $email);
 }
 endif;
@@ -102,12 +102,12 @@ if ( !function_exists('wp_setcookie') ) :
  * @param bool $remember Optional. Remember that the user is logged in
  */
 function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) {
-       _deprecated_function( __FUNCTION__, '2.5', 'wp_set_auth_cookie()' );
+       _deprecated_function( __FUNCTION__, '2.5.0', 'wp_set_auth_cookie()' );
        $user = get_user_by('login', $username);
        wp_set_auth_cookie($user->ID, $remember);
 }
 else :
-       _deprecated_function( 'wp_setcookie', '2.5', 'wp_set_auth_cookie()' );
+       _deprecated_function( 'wp_setcookie', '2.5.0', 'wp_set_auth_cookie()' );
 endif;
 
 if ( !function_exists('wp_clearcookie') ) :
@@ -119,11 +119,11 @@ if ( !function_exists('wp_clearcookie') ) :
  * @see wp_clear_auth_cookie()
  */
 function wp_clearcookie() {
-       _deprecated_function( __FUNCTION__, '2.5', 'wp_clear_auth_cookie()' );
+       _deprecated_function( __FUNCTION__, '2.5.0', 'wp_clear_auth_cookie()' );
        wp_clear_auth_cookie();
 }
 else :
-       _deprecated_function( 'wp_clearcookie', '2.5', 'wp_clear_auth_cookie()' );
+       _deprecated_function( 'wp_clearcookie', '2.5.0', 'wp_clear_auth_cookie()' );
 endif;
 
 if ( !function_exists('wp_get_cookie_login') ):
@@ -139,11 +139,11 @@ if ( !function_exists('wp_get_cookie_login') ):
  * @return bool Always returns false
  */
 function wp_get_cookie_login() {
-       _deprecated_function( __FUNCTION__, '2.5' );
+       _deprecated_function( __FUNCTION__, '2.5.0' );
        return false;
 }
 else :
-       _deprecated_function( 'wp_get_cookie_login', '2.5' );
+       _deprecated_function( 'wp_get_cookie_login', '2.5.0' );
 endif;
 
 if ( !function_exists('wp_login') ) :
@@ -169,7 +169,7 @@ if ( !function_exists('wp_login') ) :
  * @return bool False on login failure, true on successful check
  */
 function wp_login($username, $password, $deprecated = '') {
-       _deprecated_function( __FUNCTION__, '2.5', 'wp_signon()' );
+       _deprecated_function( __FUNCTION__, '2.5.0', 'wp_signon()' );
        global $error;
 
        $user = wp_authenticate($username, $password);
@@ -181,7 +181,7 @@ function wp_login($username, $password, $deprecated = '') {
        return false;
 }
 else :
-       _deprecated_function( 'wp_login', '2.5', 'wp_signon()' );
+       _deprecated_function( 'wp_login', '2.5.0', 'wp_signon()' );
 endif;
 
 /**
@@ -198,11 +198,11 @@ endif;
 if ( ! class_exists( 'wp_atom_server', false ) ) {
        class wp_atom_server {
                public function __call( $name, $arguments ) {
-                       _deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Protocol plugin' );
+                       _deprecated_function( __CLASS__ . '::' . $name, '3.5.0', 'the Atom Publishing Protocol plugin' );
                }
 
                public static function __callStatic( $name, $arguments ) {
-                       _deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Protocol plugin' );
+                       _deprecated_function( __CLASS__ . '::' . $name, '3.5.0', 'the Atom Publishing Protocol plugin' );
                }
        }
 }
index 65419a88f0cd97f7d116e248cfab47f251486698..511e6acac6ceb19514c82ab878f59fcc893743c7 100644 (file)
@@ -154,10 +154,10 @@ if ( !function_exists( 'wp_mail' ) ) :
  *
  * The default content type is 'text/plain' which does not allow using HTML.
  * However, you can set the content type of the email by using the
- * 'wp_mail_content_type' filter.
+ * {@see 'wp_mail_content_type'} filter.
  *
  * The default charset is based on the charset used on the blog. The charset can
- * be set using the 'wp_mail_charset' filter.
+ * be set using the {@see 'wp_mail_charset'} filter.
  *
  * @since 1.2.1
  *
@@ -174,7 +174,7 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
        // Compact the input, apply the filters, and extract them back out
 
        /**
-        * Filter the wp_mail() arguments.
+        * Filters the wp_mail() arguments.
         *
         * @since 2.2.0
         *
@@ -216,6 +216,8 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
        }
 
        // Headers
+       $cc = $bcc = $reply_to = array();
+
        if ( empty( $headers ) ) {
                $headers = array();
        } else {
@@ -227,8 +229,6 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
                        $tempheaders = $headers;
                }
                $headers = array();
-               $cc = array();
-               $bcc = array();
 
                // If it's actually got contents
                if ( !empty( $tempheaders ) ) {
@@ -291,6 +291,9 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
                                        case 'bcc':
                                                $bcc = array_merge( (array) $bcc, explode( ',', $content ) );
                                                break;
+                                       case 'reply-to':
+                                               $reply_to = array_merge( (array) $reply_to, explode( ',', $content ) );
+                                               break;
                                        default:
                                                // Add it to our grand headers array
                                                $headers[trim( $name )] = trim( $content );
@@ -329,78 +332,67 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
        }
 
        /**
-        * Filter the email address to send from.
+        * Filters the email address to send from.
         *
         * @since 2.2.0
         *
         * @param string $from_email Email address to send from.
         */
-       $phpmailer->From = apply_filters( 'wp_mail_from', $from_email );
+       $from_email = apply_filters( 'wp_mail_from', $from_email );
 
        /**
-        * Filter the name to associate with the "from" email address.
+        * Filters the name to associate with the "from" email address.
         *
         * @since 2.3.0
         *
         * @param string $from_name Name associated with the "from" email address.
         */
-       $phpmailer->FromName = apply_filters( 'wp_mail_from_name', $from_name );
+       $from_name = apply_filters( 'wp_mail_from_name', $from_name );
+
+       $phpmailer->setFrom( $from_email, $from_name );
 
        // Set destination addresses
        if ( !is_array( $to ) )
                $to = explode( ',', $to );
 
-       foreach ( (array) $to as $recipient ) {
-               try {
-                       // Break $recipient into name and address parts if in the format "Foo <bar@baz.com>"
-                       $recipient_name = '';
-                       if ( preg_match( '/(.*)<(.+)>/', $recipient, $matches ) ) {
-                               if ( count( $matches ) == 3 ) {
-                                       $recipient_name = $matches[1];
-                                       $recipient = $matches[2];
-                               }
-                       }
-                       $phpmailer->AddAddress( $recipient, $recipient_name);
-               } catch ( phpmailerException $e ) {
-                       continue;
-               }
-       }
-
        // Set mail's subject and body
        $phpmailer->Subject = $subject;
        $phpmailer->Body    = $message;
 
-       // Add any CC and BCC recipients
-       if ( !empty( $cc ) ) {
-               foreach ( (array) $cc as $recipient ) {
-                       try {
-                               // Break $recipient into name and address parts if in the format "Foo <bar@baz.com>"
-                               $recipient_name = '';
-                               if ( preg_match( '/(.*)<(.+)>/', $recipient, $matches ) ) {
-                                       if ( count( $matches ) == 3 ) {
-                                               $recipient_name = $matches[1];
-                                               $recipient = $matches[2];
-                                       }
-                               }
-                               $phpmailer->AddCc( $recipient, $recipient_name );
-                       } catch ( phpmailerException $e ) {
-                               continue;
-                       }
+       // Use appropriate methods for handling addresses, rather than treating them as generic headers
+       $address_headers = compact( 'to', 'cc', 'bcc', 'reply_to' );
+
+       foreach ( $address_headers as $address_header => $addresses ) {
+               if ( empty( $addresses ) ) {
+                       continue;
                }
-       }
 
-       if ( !empty( $bcc ) ) {
-               foreach ( (array) $bcc as $recipient) {
+               foreach ( (array) $addresses as $address ) {
                        try {
                                // Break $recipient into name and address parts if in the format "Foo <bar@baz.com>"
                                $recipient_name = '';
-                               if ( preg_match( '/(.*)<(.+)>/', $recipient, $matches ) ) {
+
+                               if ( preg_match( '/(.*)<(.+)>/', $address, $matches ) ) {
                                        if ( count( $matches ) == 3 ) {
                                                $recipient_name = $matches[1];
-                                               $recipient = $matches[2];
+                                               $address        = $matches[2];
                                        }
                                }
-                               $phpmailer->AddBcc( $recipient, $recipient_name );
+
+                               switch ( $address_header ) {
+                                       case 'to':
+                                               $phpmailer->addAddress( $address, $recipient_name );
+                                               break;
+                                       case 'cc':
+                                               $phpmailer->addCc( $address, $recipient_name );
+                                               break;
+                                       case 'bcc':
+                                               $phpmailer->addBcc( $address, $recipient_name );
+                                               break;
+                                       case 'reply_to':
+                                               $phpmailer->addReplyTo( $address, $recipient_name );
+                                               break;
+                               }
                        } catch ( phpmailerException $e ) {
                                continue;
                        }
@@ -416,7 +408,7 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
                $content_type = 'text/plain';
 
        /**
-        * Filter the wp_mail() content type.
+        * Filters the wp_mail() content type.
         *
         * @since 2.3.0
         *
@@ -437,7 +429,7 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
        // Set the content-type and charset
 
        /**
-        * Filter the default wp_mail() charset.
+        * Filters the default wp_mail() charset.
         *
         * @since 2.3.0
         *
@@ -513,7 +505,7 @@ function wp_authenticate($username, $password) {
        $password = trim($password);
 
        /**
-        * Filter whether a set of user login credentials are valid.
+        * Filters whether a set of user login credentials are valid.
         *
         * A WP_User object is returned if the credentials authenticate a user.
         * WP_Error or null otherwise.
@@ -610,7 +602,7 @@ function wp_validate_auth_cookie($cookie = '', $scheme = '') {
        $token = $cookie_elements['token'];
        $expired = $expiration = $cookie_elements['expiration'];
 
-       // Allow a grace period for POST and AJAX requests
+       // Allow a grace period for POST and Ajax requests
        if ( defined('DOING_AJAX') || 'POST' == $_SERVER['REQUEST_METHOD'] ) {
                $expired += HOUR_IN_SECONDS;
        }
@@ -667,7 +659,7 @@ function wp_validate_auth_cookie($cookie = '', $scheme = '') {
                return false;
        }
 
-       // AJAX/POST grace period set above
+       // Ajax/POST grace period set above
        if ( $expiration < time() ) {
                $GLOBALS['login_grace_period'] = 1;
        }
@@ -693,7 +685,7 @@ if ( !function_exists('wp_generate_auth_cookie') ) :
  * @since 2.5.0
  *
  * @param int    $user_id    User ID
- * @param int    $expiration Cookie expiration in seconds
+ * @param int    $expiration The time the cookie expires as a UNIX timestamp.
  * @param string $scheme     Optional. The cookie scheme to use: auth, secure_auth, or logged_in
  * @param string $token      User's session token to use for this cookie
  * @return string Authentication cookie contents. Empty string if user does not exist.
@@ -720,13 +712,13 @@ function wp_generate_auth_cookie( $user_id, $expiration, $scheme = 'auth', $toke
        $cookie = $user->user_login . '|' . $expiration . '|' . $token . '|' . $hash;
 
        /**
-        * Filter the authentication cookie.
+        * Filters the authentication cookie.
         *
         * @since 2.5.0
         *
         * @param string $cookie     Authentication cookie.
         * @param int    $user_id    User ID.
-        * @param int    $expiration Authentication cookie expiration in seconds.
+        * @param int    $expiration The time the cookie expires as a UNIX timestamp.
         * @param string $scheme     Cookie scheme used. Accepts 'auth', 'secure_auth', or 'logged_in'.
         * @param string $token      User's session token used.
         */
@@ -802,7 +794,7 @@ if ( !function_exists('wp_set_auth_cookie') ) :
 function wp_set_auth_cookie( $user_id, $remember = false, $secure = '', $token = '' ) {
        if ( $remember ) {
                /**
-                * Filter the duration of the authentication cookie expiration period.
+                * Filters the duration of the authentication cookie expiration period.
                 *
                 * @since 2.8.0
                 *
@@ -831,7 +823,7 @@ function wp_set_auth_cookie( $user_id, $remember = false, $secure = '', $token =
        $secure_logged_in_cookie = $secure && 'https' === parse_url( get_option( 'home' ), PHP_URL_SCHEME );
 
        /**
-        * Filter whether the connection is secure.
+        * Filters whether the connection is secure.
         *
         * @since 3.1.0
         *
@@ -841,7 +833,7 @@ function wp_set_auth_cookie( $user_id, $remember = false, $secure = '', $token =
        $secure = apply_filters( 'secure_auth_cookie', $secure, $user_id );
 
        /**
-        * Filter whether to use a secure cookie when logged-in.
+        * Filters whether to use a secure cookie when logged-in.
         *
         * @since 3.1.0
         *
@@ -873,23 +865,25 @@ function wp_set_auth_cookie( $user_id, $remember = false, $secure = '', $token =
         * @since 2.5.0
         *
         * @param string $auth_cookie Authentication cookie.
-        * @param int    $expire      Login grace period in seconds. Default 43,200 seconds, or 12 hours.
-        * @param int    $expiration  Duration in seconds the authentication cookie should be valid.
-        *                            Default 1,209,600 seconds, or 14 days.
+        * @param int    $expire      The time the login grace period expires as a UNIX timestamp.
+        *                            Default is 12 hours past the cookie's expiration time.
+        * @param int    $expiration  The time when the authentication cookie expires as a UNIX timestamp.
+        *                            Default is 14 days from now.
         * @param int    $user_id     User ID.
         * @param string $scheme      Authentication scheme. Values include 'auth', 'secure_auth', or 'logged_in'.
         */
        do_action( 'set_auth_cookie', $auth_cookie, $expire, $expiration, $user_id, $scheme );
 
        /**
-        * Fires immediately before the secure authentication cookie is set.
+        * Fires immediately before the logged-in authentication cookie is set.
         *
         * @since 2.6.0
         *
         * @param string $logged_in_cookie The logged-in cookie.
-        * @param int    $expire           Login grace period in seconds. Default 43,200 seconds, or 12 hours.
-        * @param int    $expiration       Duration in seconds the authentication cookie should be valid.
-        *                                 Default 1,209,600 seconds, or 14 days.
+        * @param int    $expire           The time the login grace period expires as a UNIX timestamp.
+        *                                 Default is 12 hours past the cookie's expiration time.
+        * @param int    $expiration       The time when the logged-in authentication cookie expires as a UNIX timestamp.
+        *                                 Default is 14 days from now.
         * @param int    $user_id          User ID.
         * @param string $scheme           Authentication scheme. Default 'logged_in'.
         */
@@ -965,7 +959,7 @@ function auth_redirect() {
        $secure = ( is_ssl() || force_ssl_admin() );
 
        /**
-        * Filter whether to use a secure authentication redirect.
+        * Filters whether to use a secure authentication redirect.
         *
         * @since 3.1.0
         *
@@ -1045,7 +1039,7 @@ if ( !function_exists('check_admin_referer') ) :
  */
 function check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) {
        if ( -1 == $action )
-               _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2' );
+               _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2.0' );
 
        $adminurl = strtolower(admin_url());
        $referer = strtolower(wp_get_referer());
@@ -1073,7 +1067,7 @@ endif;
 
 if ( !function_exists('check_ajax_referer') ) :
 /**
- * Verifies the AJAX request to prevent processing requests external of the blog.
+ * Verifies the Ajax request to prevent processing requests external of the blog.
  *
  * @since 2.0.3
  *
@@ -1099,11 +1093,11 @@ function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) {
        $result = wp_verify_nonce( $nonce, $action );
 
        /**
-        * Fires once the AJAX request has been validated or not.
+        * Fires once the Ajax request has been validated or not.
         *
         * @since 2.1.0
         *
-        * @param string    $action The AJAX nonce action.
+        * @param string    $action The Ajax nonce action.
         * @param false|int $result False if the nonce is invalid, 1 if the nonce is valid and generated between
         *                          0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.
         */
@@ -1125,6 +1119,19 @@ if ( !function_exists('wp_redirect') ) :
 /**
  * Redirects to another page.
  *
+ * Note: wp_redirect() does not exit automatically, and should almost always be
+ * followed by a call to `exit;`:
+ *
+ *     wp_redirect( $url );
+ *     exit;
+ *
+ * Exiting can also be selectively manipulated by using wp_redirect() as a conditional
+ * in conjunction with the {@see 'wp_redirect'} and {@see 'wp_redirect_location'} hooks:
+ *
+ *     if ( wp_redirect( $url ) {
+ *         exit;
+ *     }
+ *
  * @since 1.5.1
  *
  * @global bool $is_IIS
@@ -1137,7 +1144,7 @@ function wp_redirect($location, $status = 302) {
        global $is_IIS;
 
        /**
-        * Filter the redirect location.
+        * Filters the redirect location.
         *
         * @since 2.1.0
         *
@@ -1147,7 +1154,7 @@ function wp_redirect($location, $status = 302) {
        $location = apply_filters( 'wp_redirect', $location, $status );
 
        /**
-        * Filter the redirect status code.
+        * Filters the redirect status code.
         *
         * @since 2.3.0
         *
@@ -1241,7 +1248,7 @@ function wp_safe_redirect($location, $status = 302) {
        $location = wp_sanitize_redirect($location);
 
        /**
-        * Filter the redirect fallback URL for when the provided redirect is not safe (local).
+        * Filters the redirect fallback URL for when the provided redirect is not safe (local).
         *
         * @since 4.3.0
         *
@@ -1305,7 +1312,7 @@ function wp_validate_redirect($location, $default = '') {
        $wpp = parse_url(home_url());
 
        /**
-        * Filter the whitelist of hosts to redirect to.
+        * Filters the whitelist of hosts to redirect to.
         *
         * @since 2.3.0
         *
@@ -1333,7 +1340,7 @@ if ( ! function_exists('wp_notify_postauthor') ) :
  */
 function wp_notify_postauthor( $comment_id, $deprecated = null ) {
        if ( null !== $deprecated ) {
-               _deprecated_argument( __FUNCTION__, '3.8' );
+               _deprecated_argument( __FUNCTION__, '3.8.0' );
        }
 
        $comment = get_comment( $comment_id );
@@ -1350,7 +1357,7 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
        }
 
        /**
-        * Filter the list of email addresses to receive a comment notification.
+        * Filters the list of email addresses to receive a comment notification.
         *
         * By default, only post authors are notified of comments. This filter allows
         * others to be added.
@@ -1372,7 +1379,7 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
        $emails = array_flip( $emails );
 
        /**
-        * Filter whether to notify comment authors of their comments on their own posts.
+        * Filters whether to notify comment authors of their comments on their own posts.
         *
         * By default, comment authors aren't notified of their comments on their own
         * posts. This filter allows you to override that.
@@ -1478,7 +1485,7 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
                $message_headers .= $reply_to . "\n";
 
        /**
-        * Filter the comment notification email text.
+        * Filters the comment notification email text.
         *
         * @since 1.5.2
         *
@@ -1488,7 +1495,7 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
        $notify_message = apply_filters( 'comment_notification_text', $notify_message, $comment->comment_ID );
 
        /**
-        * Filter the comment notification email subject.
+        * Filters the comment notification email subject.
         *
         * @since 1.5.2
         *
@@ -1498,7 +1505,7 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
        $subject = apply_filters( 'comment_notification_subject', $subject, $comment->comment_ID );
 
        /**
-        * Filter the comment notification email headers.
+        * Filters the comment notification email headers.
         *
         * @since 1.5.2
         *
@@ -1535,7 +1542,7 @@ function wp_notify_moderator($comment_id) {
        $maybe_notify = get_option( 'moderation_notify' );
 
        /**
-        * Filter whether to send the site moderator email notifications, overriding the site setting.
+        * Filters whether to send the site moderator email notifications, overriding the site setting.
         *
         * @since 4.4.0
         *
@@ -1610,7 +1617,7 @@ function wp_notify_moderator($comment_id) {
        $message_headers = '';
 
        /**
-        * Filter the list of recipients for comment moderation emails.
+        * Filters the list of recipients for comment moderation emails.
         *
         * @since 3.7.0
         *
@@ -1620,7 +1627,7 @@ function wp_notify_moderator($comment_id) {
        $emails = apply_filters( 'comment_moderation_recipients', $emails, $comment_id );
 
        /**
-        * Filter the comment moderation email text.
+        * Filters the comment moderation email text.
         *
         * @since 1.5.2
         *
@@ -1630,7 +1637,7 @@ function wp_notify_moderator($comment_id) {
        $notify_message = apply_filters( 'comment_moderation_text', $notify_message, $comment_id );
 
        /**
-        * Filter the comment moderation email subject.
+        * Filters the comment moderation email subject.
         *
         * @since 1.5.2
         *
@@ -1640,7 +1647,7 @@ function wp_notify_moderator($comment_id) {
        $subject = apply_filters( 'comment_moderation_subject', $subject, $comment_id );
 
        /**
-        * Filter the comment moderation email headers.
+        * Filters the comment moderation email headers.
         *
         * @since 2.8.0
         *
@@ -1669,11 +1676,13 @@ function wp_password_change_notification( $user ) {
        // send a copy of password change notification to the admin
        // but check to see if it's the admin whose password we're changing, and skip this
        if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) ) {
-               $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
+               /* translators: %s: user name */
+               $message = sprintf( __( 'Password changed for user: %s' ), $user->user_login ) . "\r\n";
                // The blogname option is escaped with esc_html on the way into the database in sanitize_option
                // we want to reverse this for the plain text arena of emails.
                $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
-               wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), $blogname), $message);
+               /* translators: %s: site title */
+               wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Password Changed' ), $blogname ), $message );
        }
 }
 endif;
@@ -1687,6 +1696,7 @@ if ( !function_exists('wp_new_user_notification') ) :
  * @since 2.0.0
  * @since 4.3.0 The `$plaintext_pass` parameter was changed to `$notify`.
  * @since 4.3.1 The `$plaintext_pass` parameter was deprecated. `$notify` added as a third parameter.
+ * @since 4.6.0 The `$notify` parameter accepts 'user' for sending notification only to the user created.
  *
  * @global wpdb         $wpdb      WordPress database object for queries.
  * @global PasswordHash $wp_hasher Portable PHP password hashing framework instance.
@@ -1694,7 +1704,7 @@ if ( !function_exists('wp_new_user_notification') ) :
  * @param int    $user_id    User ID.
  * @param null   $deprecated Not used (argument deprecated).
  * @param string $notify     Optional. Type of notification that should happen. Accepts 'admin' or an empty
- *                           string (admin only), or 'both' (admin and user). Default empty.
+ *                           string (admin only), 'user', or 'both' (admin and user). Default empty.
  */
 function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) {
        if ( $deprecated !== null ) {
@@ -1708,11 +1718,13 @@ function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' )
        // we want to reverse this for the plain text arena of emails.
        $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
 
-       $message  = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n";
-       $message .= sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n";
-       $message .= sprintf(__('Email: %s'), $user->user_email) . "\r\n";
+       if ( 'user' !== $notify ) {
+               $message  = sprintf( __( 'New user registration on your site %s:' ), $blogname ) . "\r\n\r\n";
+               $message .= sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n";
+               $message .= sprintf( __( 'Email: %s' ), $user->user_email ) . "\r\n";
 
-       @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);
+               @wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] New User Registration' ), $blogname ), $message );
+       }
 
        // `$deprecated was pre-4.3 `$plaintext_pass`. An empty `$plaintext_pass` didn't sent a user notifcation.
        if ( 'admin' === $notify || ( empty( $deprecated ) && empty( $notify ) ) ) {
@@ -1756,7 +1768,7 @@ if ( !function_exists('wp_nonce_tick') ) :
  */
 function wp_nonce_tick() {
        /**
-        * Filter the lifespan of nonces in seconds.
+        * Filters the lifespan of nonces in seconds.
         *
         * @since 2.5.0
         *
@@ -1788,7 +1800,7 @@ function wp_verify_nonce( $nonce, $action = -1 ) {
        $uid = (int) $user->ID;
        if ( ! $uid ) {
                /**
-                * Filter whether the user who generated the nonce is logged out.
+                * Filters whether the user who generated the nonce is logged out.
                 *
                 * @since 3.5.0
                 *
@@ -1900,7 +1912,7 @@ function wp_salt( $scheme = 'auth' ) {
        static $cached_salts = array();
        if ( isset( $cached_salts[ $scheme ] ) ) {
                /**
-                * Filter the WordPress salt.
+                * Filters the WordPress salt.
                 *
                 * @since 2.5.0
                 *
@@ -2047,7 +2059,7 @@ function wp_check_password($password, $hash, $user_id = '') {
                }
 
                /**
-                * Filter whether the plaintext password matches the encrypted password.
+                * Filters whether the plaintext password matches the encrypted password.
                 *
                 * @since 2.5.0
                 *
@@ -2100,7 +2112,7 @@ function wp_generate_password( $length = 12, $special_chars = true, $extra_speci
        }
 
        /**
-        * Filter the randomly-generated password.
+        * Filters the randomly-generated password.
         *
         * @since 3.0.0
         *
@@ -2289,7 +2301,7 @@ function get_avatar( $id_or_email, $size = 96, $default = '', $alt = '', $args =
        }
 
        /**
-        * Filter whether to retrieve the avatar URL early.
+        * Filters whether to retrieve the avatar URL early.
         *
         * Passing a non-null value will effectively short-circuit get_avatar(), passing
         * the value through the {@see 'get_avatar'} filter and returning early.
@@ -2348,7 +2360,7 @@ function get_avatar( $id_or_email, $size = 96, $default = '', $alt = '', $args =
        );
 
        /**
-        * Filter the avatar to retrieve.
+        * Filters the avatar to retrieve.
         *
         * @since 2.5.0
         * @since 4.2.0 The `$args` parameter was added.
index 7f6217dedf5e880c057ff493deacc1554493d0d5..ca4985f1f030840bde3786f62c602228a6d6ad62 100644 (file)
@@ -8,7 +8,7 @@
  * To hook methods, you'll need to pass an array one of two ways.
  *
  * Any of the syntaxes explained in the PHP documentation for the
- * {@link http://us2.php.net/manual/en/language.pseudo-types.php#language.types.callback 'callback'}
+ * {@link https://secure.php.net/manual/en/language.pseudo-types.php#language.types.callback 'callback'}
  * type are valid.
  *
  * Also see the {@link https://codex.wordpress.org/Plugin_API Plugin API} for
@@ -465,8 +465,7 @@ function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1)
  * possible to create new action hooks by simply calling this function,
  * specifying the name of the new hook using the `$tag` parameter.
  *
- * You can pass extra arguments to the hooks, much like you can with
- * {@see apply_filters()}.
+ * You can pass extra arguments to the hooks, much like you can with apply_filters().
  *
  * @since 1.2.0
  *
@@ -656,6 +655,60 @@ function remove_all_actions($tag, $priority = false) {
        return remove_all_filters($tag, $priority);
 }
 
+/**
+ * Fires functions attached to a deprecated filter hook.
+ *
+ * When a filter hook is deprecated, the apply_filters() call is replaced with
+ * apply_filters_deprecated(), which triggers a deprecation notice and then fires
+ * the original filter hook.
+ *
+ * @since 4.6.0
+ *
+ * @see _deprecated_hook()
+ *
+ * @param string $tag         The name of the filter hook.
+ * @param array  $args        Array of additional function arguments to be passed to apply_filters().
+ * @param string $version     The version of WordPress that deprecated the hook.
+ * @param string $replacement Optional. The hook that should have been used. Default false.
+ * @param string $message     Optional. A message regarding the change. Default null.
+ */
+function apply_filters_deprecated( $tag, $args, $version, $replacement = false, $message = null ) {
+       if ( ! has_filter( $tag ) ) {
+               return $args[0];
+       }
+
+       _deprecated_hook( $tag, $version, $replacement, $message );
+
+       return apply_filters_ref_array( $tag, $args );
+}
+
+/**
+ * Fires functions attached to a deprecated action hook.
+ *
+ * When an action hook is deprecated, the do_action() call is replaced with
+ * do_action_deprecated(), which triggers a deprecation notice and then fires
+ * the original hook.
+ *
+ * @since 4.6.0
+ *
+ * @see _deprecated_hook()
+ *
+ * @param string $tag         The name of the action hook.
+ * @param array  $args        Array of additional function arguments to be passed to do_action().
+ * @param string $version     The version of WordPress that deprecated the hook.
+ * @param string $replacement Optional. The hook that should have been used.
+ * @param string $message     Optional. A message regarding the change.
+ */
+function do_action_deprecated( $tag, $args, $version, $replacement = false, $message = null ) {
+       if ( ! has_action( $tag ) ) {
+               return;
+       }
+
+       _deprecated_hook( $tag, $version, $replacement, $message );
+
+       do_action_ref_array( $tag, $args );
+}
+
 //
 // Functions for handling plugins.
 //
@@ -675,13 +728,16 @@ function remove_all_actions($tag, $priority = false) {
 function plugin_basename( $file ) {
        global $wp_plugin_paths;
 
+       // $wp_plugin_paths contains normalized paths.
+       $file = wp_normalize_path( $file );
+
+       arsort( $wp_plugin_paths );
        foreach ( $wp_plugin_paths as $dir => $realdir ) {
                if ( strpos( $file, $realdir ) === 0 ) {
                        $file = $dir . substr( $file, strlen( $realdir ) );
                }
        }
 
-       $file = wp_normalize_path( $file );
        $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
        $mu_plugin_dir = wp_normalize_path( WPMU_PLUGIN_DIR );
 
@@ -697,7 +753,7 @@ function plugin_basename( $file ) {
  *
  * @since 3.9.0
  *
- * @see plugin_basename()
+ * @see wp_normalize_path()
  *
  * @global array $wp_plugin_paths
  *
@@ -829,7 +885,7 @@ function register_deactivation_hook($file, $function) {
  */
 function register_uninstall_hook( $file, $callback ) {
        if ( is_array( $callback ) && is_object( $callback[0] ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Only a static class method or function can be used in an uninstall hook.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Only a static class method or function can be used in an uninstall hook.' ), '3.1.0' );
                return;
        }
 
index 8085745199b330d807deaf73bbeef81a19f2d91e..be152523f0615a97e815fdc062a16fb1fd187dc9 100644 (file)
@@ -56,12 +56,12 @@ function the_title( $before = '', $after = '', $echo = true ) {
 /**
  * Sanitize the current title when retrieving or displaying.
  *
- * Works like {@link the_title()}, except the parameters can be in a string or
+ * Works like the_title(), except the parameters can be in a string or
  * an array. See the function for what can be override in the $args parameter.
  *
- * The title before it is displayed will have the tags stripped and {@link
- * esc_attr()} before it is passed to the user or displayed. The default
- * as with {@link the_title()}, is to display the title.
+ * The title before it is displayed will have the tags stripped and esc_attr()
+ * before it is passed to the user or displayed. The default as with the_title(),
+ * is to display the title.
  *
  * @since 2.3.0
  *
@@ -117,7 +117,7 @@ function get_the_title( $post = 0 ) {
                if ( ! empty( $post->post_password ) ) {
 
                        /**
-                        * Filter the text prepended to the post title for protected posts.
+                        * Filters the text prepended to the post title for protected posts.
                         *
                         * The filter is only applied on the front end.
                         *
@@ -132,7 +132,7 @@ function get_the_title( $post = 0 ) {
                } elseif ( isset( $post->post_status ) && 'private' == $post->post_status ) {
 
                        /**
-                        * Filter the text prepended to the post title of private posts.
+                        * Filters the text prepended to the post title of private posts.
                         *
                         * The filter is only applied on the front end.
                         *
@@ -148,7 +148,7 @@ function get_the_title( $post = 0 ) {
        }
 
        /**
-        * Filter the post title.
+        * Filters the post title.
         *
         * @since 0.71
         *
@@ -178,7 +178,7 @@ function the_guid( $post = 0 ) {
        $id   = isset( $post->ID ) ? $post->ID : 0;
 
        /**
-        * Filter the escaped Global Unique Identifier (guid) of the post.
+        * Filters the escaped Global Unique Identifier (guid) of the post.
         *
         * @since 4.2.0
         *
@@ -209,7 +209,7 @@ function get_the_guid( $post = 0 ) {
        $id   = isset( $post->ID ) ? $post->ID : 0;
 
        /**
-        * Filter the Global Unique Identifier (guid) of the post.
+        * Filters the Global Unique Identifier (guid) of the post.
         *
         * @since 1.5.0
         *
@@ -231,7 +231,7 @@ function the_content( $more_link_text = null, $strip_teaser = false) {
        $content = get_the_content( $more_link_text, $strip_teaser );
 
        /**
-        * Filter the post content.
+        * Filters the post content.
         *
         * @since 0.71
         *
@@ -262,8 +262,17 @@ function get_the_content( $more_link_text = null, $strip_teaser = false ) {
 
        $post = get_post();
 
-       if ( null === $more_link_text )
-               $more_link_text = __( '(more&hellip;)' );
+       if ( null === $more_link_text ) {
+               $more_link_text = sprintf(
+                       '<span aria-label="%1$s">%2$s</span>',
+                       sprintf(
+                               /* translators: %s: Name of current post */
+                               __( 'Continue reading %s' ),
+                               the_title_attribute( array( 'echo' => false ) )
+                       ),
+                       __( '(more&hellip;)' )
+               );
+       }
 
        $output = '';
        $has_teaser = false;
@@ -303,7 +312,7 @@ function get_the_content( $more_link_text = null, $strip_teaser = false ) {
                        if ( ! empty( $more_link_text ) )
 
                                /**
-                                * Filter the Read More link text.
+                                * Filters the Read More link text.
                                 *
                                 * @since 2.8.0
                                 *
@@ -342,7 +351,7 @@ function _convert_urlencoded_to_entities( $match ) {
 function the_excerpt() {
 
        /**
-        * Filter the displayed post excerpt.
+        * Filters the displayed post excerpt.
         *
         * @since 0.71
         *
@@ -364,7 +373,7 @@ function the_excerpt() {
  */
 function get_the_excerpt( $post = null ) {
        if ( is_bool( $post ) ) {
-               _deprecated_argument( __FUNCTION__, '2.3' );
+               _deprecated_argument( __FUNCTION__, '2.3.0' );
        }
 
        $post = get_post( $post );
@@ -377,7 +386,7 @@ function get_the_excerpt( $post = null ) {
        }
 
        /**
-        * Filter the retrieved post excerpt.
+        * Filters the retrieved post excerpt.
         *
         * @since 1.2.0
         * @since 4.5.0 Introduced the `$post` parameter.
@@ -415,15 +424,17 @@ function post_class( $class = '', $post_id = null ) {
 }
 
 /**
- * Retrieve the classes for the post div as an array.
+ * Retrieves the classes for the post div as an array.
  *
  * The class names are many. If the post is a sticky, then the 'sticky'
  * class name. The class 'hentry' is always added to each post. If the post has a
  * post thumbnail, 'has-post-thumbnail' is added as a class. For each taxonomy that
  * the post belongs to, a class will be added of the format '{$taxonomy}-{$slug}' -
- * eg 'category-foo' or 'my_custom_taxonomy-bar'. The 'post_tag' taxonomy is a special
+ * eg 'category-foo' or 'my_custom_taxonomy-bar'.
+ *
+ * The 'post_tag' taxonomy is a special
  * case; the class has the 'tag-' prefix instead of 'post_tag-'. All classes are
- * passed through the filter, 'post_class' with the list of classes, followed by
+ * passed through the filter, {@see 'post_class'}, with the list of classes, followed by
  * $class parameter value, with the post ID as the last parameter.
  *
  * @since 2.7.0
@@ -521,7 +532,7 @@ function get_post_class( $class = '', $post_id = null ) {
        $classes = array_map( 'esc_attr', $classes );
 
        /**
-        * Filter the list of CSS classes for the current post.
+        * Filters the list of CSS classes for the current post.
         *
         * @since 2.7.0
         *
@@ -745,7 +756,7 @@ function get_body_class( $class = '' ) {
        $classes = array_map( 'esc_attr', $classes );
 
        /**
-        * Filter the list of CSS body classes for the current post or page.
+        * Filters the list of CSS body classes for the current post or page.
         *
         * @since 2.8.0
         *
@@ -841,7 +852,7 @@ function wp_link_pages( $args = '' ) {
        $params = wp_parse_args( $args, $defaults );
 
        /**
-        * Filter the arguments used in retrieving page links for paginated posts.
+        * Filters the arguments used in retrieving page links for paginated posts.
         *
         * @since 3.0.0
         *
@@ -859,7 +870,7 @@ function wp_link_pages( $args = '' ) {
                                        $link = _wp_link_page( $i ) . $link . '</a>';
                                }
                                /**
-                                * Filter the HTML output of individual page number links.
+                                * Filters the HTML output of individual page number links.
                                 *
                                 * @since 3.6.0
                                 *
@@ -897,7 +908,7 @@ function wp_link_pages( $args = '' ) {
        }
 
        /**
-        * Filter the HTML output of page links for paginated posts.
+        * Filters the HTML output of page links for paginated posts.
         *
         * @since 3.6.0
         *
@@ -994,7 +1005,7 @@ function the_meta() {
                        $value = implode($values,', ');
 
                        /**
-                        * Filter the HTML output of the li element in the post custom fields list.
+                        * Filters the HTML output of the li element in the post custom fields list.
                         *
                         * @since 2.2.0
                         *
@@ -1078,7 +1089,7 @@ function wp_dropdown_pages( $args = '' ) {
        }
 
        /**
-        * Filter the HTML output of a list of pages as a drop down.
+        * Filters the HTML output of a list of pages as a drop down.
         *
         * @since 2.1.0
         * @since 4.4.0 `$r` and `$pages` added as arguments.
@@ -1154,7 +1165,7 @@ function wp_list_pages( $args = '' ) {
        $exclude_array = ( $r['exclude'] ) ? explode( ',', $r['exclude'] ) : array();
 
        /**
-        * Filter the array of pages to exclude from the pages list.
+        * Filters the array of pages to exclude from the pages list.
         *
         * @since 2.1.0
         *
@@ -1188,7 +1199,7 @@ function wp_list_pages( $args = '' ) {
        }
 
        /**
-        * Filter the HTML output of the pages to list.
+        * Filters the HTML output of the pages to list.
         *
         * @since 1.5.1
         * @since 4.4.0 `$pages` added as arguments.
@@ -1209,11 +1220,10 @@ function wp_list_pages( $args = '' ) {
 }
 
 /**
- * Display or retrieve list of pages with optional home link.
+ * Displays or retrieves a list of pages with an optional home link.
  *
- * The arguments are listed below and part of the arguments are for {@link
- * wp_list_pages()} function. Check that function for more info on those
- * arguments.
+ * The arguments are listed below and part of the arguments are for wp_list_pages()} function.
+ * Check that function for more info on those arguments.
  *
  * @since 2.7.0
  * @since 4.4.0 Added `menu_id`, `container`, `before`, `after`, and `walker` arguments.
@@ -1254,7 +1264,7 @@ function wp_page_menu( $args = array() ) {
        $args = wp_parse_args( $args, $defaults );
 
        /**
-        * Filter the arguments used to generate a page-based menu.
+        * Filters the arguments used to generate a page-based menu.
         *
         * @since 2.7.0
         *
@@ -1325,7 +1335,7 @@ function wp_page_menu( $args = array() ) {
        $menu = "<{$container}{$attrs}>" . $menu . "</{$container}>\n";
 
        /**
-        * Filter the HTML output of a page-based menu.
+        * Filters the HTML output of a page-based menu.
         *
         * @since 2.7.0
         *
@@ -1407,7 +1417,7 @@ function walk_page_dropdown_tree() {
  */
 function the_attachment_link( $id = 0, $fullsize = false, $deprecated = false, $permalink = false ) {
        if ( !empty( $deprecated ) )
-               _deprecated_argument( __FUNCTION__, '2.5' );
+               _deprecated_argument( __FUNCTION__, '2.5.0' );
 
        if ( $fullsize )
                echo wp_get_attachment_link($id, 'full', $permalink);
@@ -1453,7 +1463,7 @@ function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = fals
                $link_text = $_post->post_title;
 
        /**
-        * Filter a retrieved attachment page link.
+        * Filters a retrieved attachment page link.
         *
         * @since 2.7.0
         *
@@ -1503,7 +1513,7 @@ function prepend_attachment($content) {
        }
 
        /**
-        * Filter the attachment markup to be prepended to the post content.
+        * Filters the attachment markup to be prepended to the post content.
         *
         * @since 2.0.0
         *
@@ -1537,7 +1547,7 @@ function get_the_password_form( $post = 0 ) {
        ';
 
        /**
-        * Filter the HTML output for the protected post password form.
+        * Filters the HTML output for the protected post password form.
         *
         * If modifying the password field, please note that the core database schema
         * limits the password field to 20 characters regardless of the value of the
@@ -1621,7 +1631,7 @@ function wp_post_revision_title( $revision, $link = true ) {
        if ( !in_array( $revision->post_type, array( 'post', 'page', 'revision' ) ) )
                return false;
 
-       /* translators: revision date format, see http://php.net/date */
+       /* translators: revision date format, see https://secure.php.net/date */
        $datef = _x( 'F j, Y @ H:i:s', 'revision date format' );
        /* translators: 1: date */
        $autosavef = _x( '%1$s [Autosave]', 'post revision title extra' );
@@ -1657,7 +1667,7 @@ function wp_post_revision_title_expanded( $revision, $link = true ) {
                return false;
 
        $author = get_the_author_meta( 'display_name', $revision->post_author );
-       /* translators: revision date format, see http://php.net/date */
+       /* translators: revision date format, see https://secure.php.net/date */
        $datef = _x( 'F j, Y @ H:i:s', 'revision date format' );
 
        $gravatar = get_avatar( $revision->post_author, 24 );
@@ -1684,7 +1694,7 @@ function wp_post_revision_title_expanded( $revision, $link = true ) {
                $revision_date_author = sprintf( $autosavef, $revision_date_author );
 
        /**
-        * Filter the formatted author and date for a revision.
+        * Filters the formatted author and date for a revision.
         *
         * @since 4.4.0
         *
@@ -1714,7 +1724,7 @@ function wp_list_post_revisions( $post_id = 0, $type = 'all' ) {
        // $args array with (parent, format, right, left, type) deprecated since 3.6
        if ( is_array( $type ) ) {
                $type = ! empty( $type['type'] ) ? $type['type']  : $type;
-               _deprecated_argument( __FUNCTION__, '3.6' );
+               _deprecated_argument( __FUNCTION__, '3.6.0' );
        }
 
        if ( ! $revisions = wp_get_post_revisions( $post->ID ) )
index 2862bdc93cc02df5f6139946491eb563daa370d4..4722565d96df52e150a55f422376dc71a362f9df 100644 (file)
@@ -119,7 +119,7 @@ function get_the_post_thumbnail( $post = null, $size = 'post-thumbnail', $attr =
        $post_thumbnail_id = get_post_thumbnail_id( $post );
 
        /**
-        * Filter the post thumbnail size.
+        * Filters the post thumbnail size.
         *
         * @since 2.9.0
         *
@@ -163,7 +163,7 @@ function get_the_post_thumbnail( $post = null, $size = 'post-thumbnail', $attr =
                $html = '';
        }
        /**
-        * Filter the post thumbnail HTML.
+        * Filters the post thumbnail HTML.
         *
         * @since 2.9.0
         *
@@ -210,3 +210,44 @@ function the_post_thumbnail_url( $size = 'post-thumbnail' ) {
                echo esc_url( $url );
        }
 }
+
+/**
+ * Returns the post thumbnail caption.
+ *
+ * @since 4.6.0
+ *
+ * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
+ * @return string Post thumbnail caption.
+ */
+function get_the_post_thumbnail_caption( $post = null ) {
+       $post_thumbnail_id = get_post_thumbnail_id( $post );
+       if ( ! $post_thumbnail_id ) {
+               return '';
+       }
+
+       $caption = wp_get_attachment_caption( $post_thumbnail_id );
+
+       if ( ! $caption ) {
+               $caption = '';
+       }
+
+       return $caption;
+}
+
+/**
+ * Displays the post thumbnail caption.
+ *
+ * @since 4.6.0
+ *
+ * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
+ */
+function the_post_thumbnail_caption( $post = null ) {
+       /**
+        * Filters the displayed post thumbnail caption.
+        *
+        * @since 4.6.0
+        *
+        * @param string $caption Caption for the given attachment.
+        */
+       echo apply_filters( 'the_post_thumbnail_caption', get_the_post_thumbnail_caption( $post ) );
+}
index ccb11de7283c7d5d01913ea32e8798ec1c46f55e..d03317276392f05374c07dea1258b7952c3c4375 100644 (file)
@@ -13,6 +13,8 @@
 /**
  * Creates the initial post types when 'init' action is fired.
  *
+ * See {@see 'init'}.
+ *
  * @since 2.9.0
  */
 function create_initial_post_types() {
@@ -197,7 +199,7 @@ function get_attached_file( $attachment_id, $unfiltered = false ) {
        }
 
        /**
-        * Filter the attached file based on the given ID.
+        * Filters the attached file based on the given ID.
         *
         * @since 2.1.0
         *
@@ -224,7 +226,7 @@ function update_attached_file( $attachment_id, $file ) {
                return false;
 
        /**
-        * Filter the path to the attached file to update.
+        * Filters the path to the attached file to update.
         *
         * @since 2.1.0
         *
@@ -259,7 +261,7 @@ function _wp_relative_upload_path( $path ) {
        }
 
        /**
-        * Filter the relative path to an uploaded file.
+        * Filters the relative path to an uploaded file.
         *
         * @since 2.9.0
         *
@@ -286,11 +288,10 @@ function _wp_relative_upload_path( $path ) {
  * example of what is possible.
  *
  * The arguments listed as defaults are for this function and also of the
- * {@link get_posts()} function. The arguments are combined with the
- * get_children defaults and are then passed to the {@link get_posts()}
- * function, which accepts additional arguments. You can replace the defaults in
- * this function, listed below and the additional arguments listed in the
- * {@link get_posts()} function.
+ * get_posts() function. The arguments are combined with the get_children defaults
+ * and are then passed to the get_posts() function, which accepts additional arguments.
+ * You can replace the defaults in this function, listed below and the additional
+ * arguments listed in the get_posts() function.
  *
  * The 'post_parent' is the most important argument and important attention
  * needs to be paid to the $args parameter. If you pass either an object or an
@@ -412,8 +413,8 @@ function get_extended( $post ) {
 /**
  * Retrieves post data given a post ID or post object.
  *
- * See {@link sanitize_post()} for optional $filter values. Also, the parameter
- * $post, must be given as a variable, since it is passed by reference.
+ * See sanitize_post() for optional $filter values. Also, the parameter
+ * `$post`, must be given as a variable, since it is passed by reference.
  *
  * @since 1.5.1
  *
@@ -578,7 +579,7 @@ function get_post_status( $ID = '' ) {
        }
 
        /**
-        * Filter the post status.
+        * Filters the post status.
         *
         * @since 4.4.0
         *
@@ -818,7 +819,7 @@ function post_type_exists( $post_type ) {
 }
 
 /**
- * Retrieve the post type of the current post or of a given post.
+ * Retrieves the post type of the current post or of a given post.
  *
  * @since 2.1.0
  *
@@ -833,16 +834,17 @@ function get_post_type( $post = null ) {
 }
 
 /**
- * Retrieve a post type object by name.
+ * Retrieves a post type object by name.
  *
  * @since 3.0.0
+ * @since 4.6.0 Object returned is now an instance of WP_Post_Type.
  *
  * @global array $wp_post_types List of post types.
  *
  * @see register_post_type()
  *
  * @param string $post_type The name of a registered post type.
- * @return object|null A post type object.
+ * @return WP_Post_Type|null WP_Post_Type object if it exists, null otherwise.
  */
 function get_post_type_object( $post_type ) {
        global $wp_post_types;
@@ -881,21 +883,30 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
 }
 
 /**
- * Register a post type. Do not use before init.
+ * Registers a post type.
  *
- * A function for creating or modifying a post type based on the
- * parameters given. The function will accept an array (second optional
- * parameter), along with a string for the post type name.
+ * Note: Post type registrations should not be hooked before the
+ * {@see 'init'} action. Also, any taxonomy connections should be
+ * registered via the `$taxonomies` argument to ensure consistency
+ * when hooks such as {@see 'parse_query'} or {@see 'pre_get_posts'}
+ * are used.
+ *
+ * Post types can support any number of built-in core features such
+ * as meta boxes, custom fields, post thumbnails, post statuses,
+ * comments, and more. See the `$supports` argument for a complete
+ * list of supported features.
  *
  * @since 2.9.0
  * @since 3.0.0 The `show_ui` argument is now enforced on the new post screen.
- * @since 4.4.0 The `show_ui` argument is now enforced on the post type listing screen and post editing screen.
+ * @since 4.4.0 The `show_ui` argument is now enforced on the post type listing
+ *              screen and post editing screen.
+ * @since 4.6.0 Post type object returned is now an instance of WP_Post_Type.
  *
- * @global array      $wp_post_types List of post types.
- * @global WP_Rewrite $wp_rewrite    Used for default feeds.
- * @global WP         $wp            Used to add query vars.
+ * @global array $wp_post_types List of post types.
  *
- * @param string $post_type Post type key, must not exceed 20 characters.
+ * @param string $post_type Post type key. Must not exceed 20 characters and may
+ *                          only contain lowercase alphanumeric characters, dashes,
+ *                          and underscores. See sanitize_key().
  * @param array|string $args {
  *     Array or string of arguments for registering a post type.
  *
@@ -903,7 +914,8 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
  *                                             Default is value of $labels['name'].
  *     @type array       $labels               An array of labels for this post type. If not set, post
  *                                             labels are inherited for non-hierarchical types and page
- *                                             labels for hierarchical ones. {@see get_post_type_labels()}.
+ *                                             labels for hierarchical ones. See get_post_type_labels() for a full
+ *                                             list of supported labels.
  *     @type string      $description          A short descriptive summary of what the post type is.
  *                                             Default empty.
  *     @type bool        $public               Whether a post type is intended for use publicly either via
@@ -916,7 +928,7 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
  *     @type bool        $exclude_from_search  Whether to exclude posts with this post type from front end search
  *                                             results. Default is the opposite value of $public.
  *     @type bool        $publicly_queryable   Whether queries can be performed on the front end for the post type
- *                                             as part of {@see parse_request()}. Endpoints would include:
+ *                                             as part of parse_request(). Endpoints would include:
  *                                             * ?post_type={post_type_key}
  *                                             * ?{post_type_key}={single_post_slug}
  *                                             * ?{post_type_query_var}={single_post_slug}
@@ -947,17 +959,23 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
  *                                             array('story', 'stories'). Default 'post'.
  *     @type array       $capabilities         Array of capabilities for this post type. $capability_type is used
  *                                             as a base to construct capabilities by default.
- *                                             {@see get_post_type_capabilities()}.
+ *                                             See get_post_type_capabilities().
  *     @type bool        $map_meta_cap         Whether to use the internal default meta capability handling.
  *                                             Default false.
- *     @type array       $supports             An alias for calling {@see add_post_type_support()} directly.
- *                                             Defaults to array containing 'title' & 'editor'.
+ *     @type array       $supports             Core feature(s) the post type supports. Serves as an alias for calling
+ *                                             add_post_type_support() directly. Core features include 'title',
+ *                                             'editor', 'comments', 'revisions', 'trackbacks', 'author', 'excerpt',
+ *                                             'page-attributes', 'thumbnail', 'custom-fields', and 'post-formats'.
+ *                                             Additionally, the 'revisions' feature dictates whether the post type
+ *                                             will store revisions, and the 'comments' feature dictates whether the
+ *                                             comments count will show on the edit screen. Defaults is an array
+ *                                             containing 'title' and 'editor'.
  *     @type callable    $register_meta_box_cb Provide a callback function that sets up the meta boxes for the
  *                                             edit form. Do remove_meta_box() and add_meta_box() calls in the
  *                                             callback. Default null.
  *     @type array       $taxonomies           An array of taxonomy identifiers that will be registered for the
- *                                             post type. Taxonomies can be registered later with
- *                                             {@see register_taxonomy()} or {@see register_taxonomy_for_object_type()}.
+ *                                             post type. Taxonomies can be registered later with register_taxonomy()
+ *                                             or register_taxonomy_for_object_type().
  *                                             Default empty array.
  *     @type bool|string $has_archive          Whether there should be post type archives, or if a string, the
  *                                             archive slug to use. Will generate the proper rewrite rules if
@@ -993,10 +1011,10 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
  *     @type string      $_edit_link           FOR INTERNAL USE ONLY! URL segment to use for edit link of
  *                                             this post type. Default 'post.php?post=%d'.
  * }
- * @return object|WP_Error The registered post type object, or an error object.
+ * @return WP_Post_Type|WP_Error The registered post type object, or an error object.
  */
 function register_post_type( $post_type, $args = array() ) {
-       global $wp_post_types, $wp_rewrite, $wp;
+       global $wp_post_types;
 
        if ( ! is_array( $wp_post_types ) ) {
                $wp_post_types = array();
@@ -1004,191 +1022,34 @@ function register_post_type( $post_type, $args = array() ) {
 
        // Sanitize post type name
        $post_type = sanitize_key( $post_type );
-       $args      = wp_parse_args( $args );
-
-       /**
-        * Filter the arguments for registering a post type.
-        *
-        * @since 4.4.0
-        *
-        * @param array  $args      Array of arguments for registering a post type.
-        * @param string $post_type Post type key.
-        */
-       $args = apply_filters( 'register_post_type_args', $args, $post_type );
-
-       $has_edit_link = ! empty( $args['_edit_link'] );
-
-       // Args prefixed with an underscore are reserved for internal use.
-       $defaults = array(
-               'labels'               => array(),
-               'description'          => '',
-               'public'               => false,
-               'hierarchical'         => false,
-               'exclude_from_search'  => null,
-               'publicly_queryable'   => null,
-               'show_ui'              => null,
-               'show_in_menu'         => null,
-               'show_in_nav_menus'    => null,
-               'show_in_admin_bar'    => null,
-               'menu_position'        => null,
-               'menu_icon'            => null,
-               'capability_type'      => 'post',
-               'capabilities'         => array(),
-               'map_meta_cap'         => null,
-               'supports'             => array(),
-               'register_meta_box_cb' => null,
-               'taxonomies'           => array(),
-               'has_archive'          => false,
-               'rewrite'              => true,
-               'query_var'            => true,
-               'can_export'           => true,
-               'delete_with_user'     => null,
-               '_builtin'             => false,
-               '_edit_link'           => 'post.php?post=%d',
-       );
-       $args = array_merge( $defaults, $args );
-       $args = (object) $args;
-
-       $args->name = $post_type;
 
        if ( empty( $post_type ) || strlen( $post_type ) > 20 ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Post type names must be between 1 and 20 characters in length.' ), '4.2' );
+               _doing_it_wrong( __FUNCTION__, __( 'Post type names must be between 1 and 20 characters in length.' ), '4.2.0' );
                return new WP_Error( 'post_type_length_invalid', __( 'Post type names must be between 1 and 20 characters in length.' ) );
        }
 
-       // If not set, default to the setting for public.
-       if ( null === $args->publicly_queryable )
-               $args->publicly_queryable = $args->public;
-
-       // If not set, default to the setting for public.
-       if ( null === $args->show_ui )
-               $args->show_ui = $args->public;
-
-       // If not set, default to the setting for show_ui.
-       if ( null === $args->show_in_menu || ! $args->show_ui )
-               $args->show_in_menu = $args->show_ui;
-
-       // If not set, default to the whether the full UI is shown.
-       if ( null === $args->show_in_admin_bar )
-               $args->show_in_admin_bar = (bool) $args->show_in_menu;
-
-       // If not set, default to the setting for public.
-       if ( null === $args->show_in_nav_menus )
-               $args->show_in_nav_menus = $args->public;
-
-       // If not set, default to true if not public, false if public.
-       if ( null === $args->exclude_from_search )
-               $args->exclude_from_search = !$args->public;
-
-       // Back compat with quirky handling in version 3.0. #14122.
-       if ( empty( $args->capabilities ) && null === $args->map_meta_cap && in_array( $args->capability_type, array( 'post', 'page' ) ) )
-               $args->map_meta_cap = true;
-
-       // If not set, default to false.
-       if ( null === $args->map_meta_cap )
-               $args->map_meta_cap = false;
-
-       // If there's no specified edit link and no UI, remove the edit link.
-       if ( ! $args->show_ui && ! $has_edit_link ) {
-               $args->_edit_link = '';
-       }
-
-       $args->cap = get_post_type_capabilities( $args );
-       unset( $args->capabilities );
+       $post_type_object = new WP_Post_Type( $post_type, $args );
+       $post_type_object->add_supports();
+       $post_type_object->add_rewrite_rules();
+       $post_type_object->register_meta_boxes();
 
-       if ( is_array( $args->capability_type ) )
-               $args->capability_type = $args->capability_type[0];
+       $wp_post_types[ $post_type ] = $post_type_object;
 
-       if ( ! empty( $args->supports ) ) {
-               add_post_type_support( $post_type, $args->supports );
-               unset( $args->supports );
-       } elseif ( false !== $args->supports ) {
-               // Add default features
-               add_post_type_support( $post_type, array( 'title', 'editor' ) );
-       }
-
-       if ( false !== $args->query_var ) {
-               if ( true === $args->query_var )
-                       $args->query_var = $post_type;
-               else
-                       $args->query_var = sanitize_title_with_dashes( $args->query_var );
-
-               if ( $wp && is_post_type_viewable( $args ) ) {
-                       $wp->add_query_var( $args->query_var );
-               }
-       }
-
-       if ( false !== $args->rewrite && ( is_admin() || '' != get_option( 'permalink_structure' ) ) ) {
-               if ( ! is_array( $args->rewrite ) )
-                       $args->rewrite = array();
-               if ( empty( $args->rewrite['slug'] ) )
-                       $args->rewrite['slug'] = $post_type;
-               if ( ! isset( $args->rewrite['with_front'] ) )
-                       $args->rewrite['with_front'] = true;
-               if ( ! isset( $args->rewrite['pages'] ) )
-                       $args->rewrite['pages'] = true;
-               if ( ! isset( $args->rewrite['feeds'] ) || ! $args->has_archive )
-                       $args->rewrite['feeds'] = (bool) $args->has_archive;
-               if ( ! isset( $args->rewrite['ep_mask'] ) ) {
-                       if ( isset( $args->permalink_epmask ) )
-                               $args->rewrite['ep_mask'] = $args->permalink_epmask;
-                       else
-                               $args->rewrite['ep_mask'] = EP_PERMALINK;
-               }
-
-               if ( $args->hierarchical )
-                       add_rewrite_tag( "%$post_type%", '(.+?)', $args->query_var ? "{$args->query_var}=" : "post_type=$post_type&pagename=" );
-               else
-                       add_rewrite_tag( "%$post_type%", '([^/]+)', $args->query_var ? "{$args->query_var}=" : "post_type=$post_type&name=" );
-
-               if ( $args->has_archive ) {
-                       $archive_slug = $args->has_archive === true ? $args->rewrite['slug'] : $args->has_archive;
-                       if ( $args->rewrite['with_front'] )
-                               $archive_slug = substr( $wp_rewrite->front, 1 ) . $archive_slug;
-                       else
-                               $archive_slug = $wp_rewrite->root . $archive_slug;
-
-                       add_rewrite_rule( "{$archive_slug}/?$", "index.php?post_type=$post_type", 'top' );
-                       if ( $args->rewrite['feeds'] && $wp_rewrite->feeds ) {
-                               $feeds = '(' . trim( implode( '|', $wp_rewrite->feeds ) ) . ')';
-                               add_rewrite_rule( "{$archive_slug}/feed/$feeds/?$", "index.php?post_type=$post_type" . '&feed=$matches[1]', 'top' );
-                               add_rewrite_rule( "{$archive_slug}/$feeds/?$", "index.php?post_type=$post_type" . '&feed=$matches[1]', 'top' );
-                       }
-                       if ( $args->rewrite['pages'] )
-                               add_rewrite_rule( "{$archive_slug}/{$wp_rewrite->pagination_base}/([0-9]{1,})/?$", "index.php?post_type=$post_type" . '&paged=$matches[1]', 'top' );
-               }
-
-               $permastruct_args = $args->rewrite;
-               $permastruct_args['feed'] = $permastruct_args['feeds'];
-               add_permastruct( $post_type, "{$args->rewrite['slug']}/%$post_type%", $permastruct_args );
-       }
-
-       // Register the post type meta box if a custom callback was specified.
-       if ( $args->register_meta_box_cb )
-               add_action( 'add_meta_boxes_' . $post_type, $args->register_meta_box_cb, 10, 1 );
-
-       $args->labels = get_post_type_labels( $args );
-       $args->label = $args->labels->name;
-
-       $wp_post_types[ $post_type ] = $args;
-
-       add_action( 'future_' . $post_type, '_future_post_hook', 5, 2 );
-
-       foreach ( $args->taxonomies as $taxonomy ) {
-               register_taxonomy_for_object_type( $taxonomy, $post_type );
-       }
+       $post_type_object->add_hooks();
+       $post_type_object->register_taxonomies();
 
        /**
         * Fires after a post type is registered.
         *
         * @since 3.3.0
+        * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object.
         *
-        * @param string $post_type Post type.
-        * @param object $args      Arguments used to register the post type.
+        * @param string       $post_type        Post type.
+        * @param WP_Post_Type $post_type_object Arguments used to register the post type.
         */
-       do_action( 'registered_post_type', $post_type, $args );
+       do_action( 'registered_post_type', $post_type, $post_type_object );
 
-       return $args;
+       return $post_type_object;
 }
 
 /**
@@ -1198,67 +1059,31 @@ function register_post_type( $post_type, $args = array() ) {
  *
  * @since 4.5.0
  *
- * @global WP_Rewrite $wp_rewrite             WordPress rewrite component.
- * @global WP         $wp                     Current WordPress environment instance.
- * @global array      $_wp_post_type_features Used to remove post type features.
- * @global array      $post_type_meta_caps    Used to remove meta capabilities.
- * @global array      $wp_post_types          List of post types.
+ * @global array $wp_post_types List of post types.
  *
  * @param string $post_type Post type to unregister.
  * @return bool|WP_Error True on success, WP_Error on failure or if the post type doesn't exist.
  */
 function unregister_post_type( $post_type ) {
+       global $wp_post_types;
+
        if ( ! post_type_exists( $post_type ) ) {
-               return new WP_Error( 'invalid_post_type', __( 'Invalid post type' ) );
+               return new WP_Error( 'invalid_post_type', __( 'Invalid post type.' ) );
        }
 
-       $post_type_args = get_post_type_object( $post_type );
+       $post_type_object = get_post_type_object( $post_type );
 
        // Do not allow unregistering internal post types.
-       if ( $post_type_args->_builtin ) {
+       if ( $post_type_object->_builtin ) {
                return new WP_Error( 'invalid_post_type', __( 'Unregistering a built-in post type is not allowed' ) );
        }
 
-       global $wp, $wp_rewrite, $_wp_post_type_features, $post_type_meta_caps, $wp_post_types;
-
-       // Remove query var.
-       if ( false !== $post_type_args->query_var ) {
-               $wp->remove_query_var( $post_type_args->query_var );
-       }
+       $post_type_object->remove_supports();
+       $post_type_object->remove_rewrite_rules();
+       $post_type_object->unregister_meta_boxes();
+       $post_type_object->remove_hooks();
+       $post_type_object->unregister_taxonomies();
 
-       // Remove any rewrite rules, permastructs, and rules.
-       if ( false !== $post_type_args->rewrite ) {
-               remove_rewrite_tag( "%$post_type%" );
-               remove_permastruct( $post_type );
-               foreach ( $wp_rewrite->extra_rules_top as $regex => $query ) {
-                       if ( false !== strpos( $query, "index.php?post_type=$post_type" ) ) {
-                               unset( $wp_rewrite->extra_rules_top[ $regex ] );
-                       }
-               }
-       }
-
-       // Remove registered custom meta capabilities.
-       foreach ( $post_type_args->cap as $cap ) {
-               unset( $post_type_meta_caps[ $cap ] );
-       }
-
-       // Remove all post type support.
-       unset( $_wp_post_type_features[ $post_type ] );
-
-       // Unregister the post type meta box if a custom callback was specified.
-       if ( $post_type_args->register_meta_box_cb ) {
-               remove_action( 'add_meta_boxes_' . $post_type, $post_type_args->register_meta_box_cb );
-       }
-
-       // Remove the post type from all taxonomies.
-       foreach ( get_object_taxonomies( $post_type ) as $taxonomy ) {
-               unregister_taxonomy_for_object_type( $taxonomy, $post_type );
-       }
-
-       // Remove the future post hook action.
-       remove_action( 'future_' . $post_type, '_future_post_hook', 5 );
-
-       // Remove the post type.
        unset( $wp_post_types[ $post_type ] );
 
        /**
@@ -1395,52 +1220,58 @@ function _post_type_meta_capabilities( $capabilities = null ) {
 }
 
 /**
- * Build an object with all post type labels out of a post type object
+ * Builds an object with all post type labels out of a post type object.
  *
  * Accepted keys of the label array in the post type object:
  *
- * - name - general name for the post type, usually plural. The same and overridden
- *          by $post_type_object->label. Default is Posts/Pages
- * - singular_name - name for one object of this post type. Default is Post/Page
- * - add_new - Default is Add New for both hierarchical and non-hierarchical types.
- *             When internationalizing this string, please use a gettext context
- *             {@link https://codex.wordpress.org/I18n_for_WordPress_Developers#Disambiguation_by_context}
- *             matching your post type. Example: `_x( 'Add New', 'product' );`.
- * - add_new_item - Default is Add New Post/Add New Page.
- * - edit_item - Default is Edit Post/Edit Page.
- * - new_item - Default is New Post/New Page.
- * - view_item - Default is View Post/View Page.
- * - search_items - Default is Search Posts/Search Pages.
- * - not_found - Default is No posts found/No pages found.
- * - not_found_in_trash - Default is No posts found in Trash/No pages found in Trash.
- * - parent_item_colon - This string isn't used on non-hierarchical types. In hierarchical
- * ones the default is 'Parent Page:'.
- * - all_items - String for the submenu. Default is All Posts/All Pages.
- * - archives - String for use with archives in nav menus. Default is Post Archives/Page Archives.
- * - insert_into_item - String for the media frame button. Default is Insert into post/Insert into page.
- * - uploaded_to_this_item - String for the media frame filter. Default is Uploaded to this post/Uploaded to this page.
- * - featured_image - Default is Featured Image.
- * - set_featured_image - Default is Set featured image.
- * - remove_featured_image - Default is Remove featured image.
- * - use_featured_image - Default is Use as featured image.
- * - menu_name - Default is the same as `name`.
- * - filter_items_list - String for the table views hidden heading.
- * - items_list_navigation - String for the table pagination hidden heading.
- * - items_list - String for the table hidden heading.
+ * - `name` - General name for the post type, usually plural. The same and overridden
+ *          by `$post_type_object->label`. Default is 'Posts' / 'Pages'.
+ * - `singular_name` - Name for one object of this post type. Default is 'Post' / 'Page'.
+ * - `add_new` - Default is 'Add New' for both hierarchical and non-hierarchical types.
+ *             When internationalizing this string, please use a {@link https://codex.wordpress.org/I18n_for_WordPress_Developers#Disambiguation_by_context gettext context}
+ *             matching your post type. Example: `_x( 'Add New', 'product', 'textdomain' );`.
+ * - `add_new_item` - Label for adding a new singular item. Default is 'Add New Post' / 'Add New Page'.
+ * - `edit_item` - Label for editing a singular item. Default is 'Edit Post' / 'Edit Page'.
+ * - `new_item` - Label for the new item page title. Default is 'New Post' / 'New Page'.
+ * - `view_item` - Label for viewing a singular item. Default is 'View Post' / 'View Page'.
+ * - `search_items` - Label for searching plural items. Default is 'Search Posts' / 'Search Pages'.
+ * - `not_found` - Label used when no items are found. Default is 'No posts found' / 'No pages found'.
+ * - `not_found_in_trash` - Label used when no items are in the trash. Default is 'No posts found in Trash' /
+ *                        'No pages found in Trash'.
+ * - `parent_item_colon` - Label used to prefix parents of hierarchical items. Not used on non-hierarchical
+ *                       post types. Default is 'Parent Page:'.
+ * - `all_items` - Label to signify all items in a submenu link. Default is 'All Posts' / 'All Pages'.
+ * - `archives` - Label for archives in nav menus. Default is 'Post Archives' / 'Page Archives'.
+ * - `insert_into_item` - Label for the media frame button. Default is 'Insert into post' / 'Insert into page'.
+ * - `uploaded_to_this_item` - Label for the media frame filter. Default is 'Uploaded to this post' /
+ *                           'Uploaded to this page'.
+ * - `featured_image` - Label for the Featured Image meta box title. Default is 'Featured Image'.
+ * - `set_featured_image` - Label for setting the featured image. Default is 'Set featured image'.
+ * - `remove_featured_image` - Label for removing the featured image. Default is 'Remove featured image'.
+ * - `use_featured_image` - Label in the media frame for using a featured image. Default is 'Use as featured image'.
+ * - `menu_name` - Label for the menu name. Default is the same as `name`.
+ * - `filter_items_list` - Label for the table views hidden heading. Default is 'Filter posts list' /
+ *                       'Filter pages list'.
+ * - `items_list_navigation` - Label for the table pagination hidden heading. Default is 'Posts list navigation' /
+ *                           'Pages list navigation'.
+ * - `items_list` - Label for the table hidden heading. Default is 'Posts list' / 'Pages list'.
  *
  * Above, the first default value is for non-hierarchical post types (like posts)
  * and the second one is for hierarchical post types (like pages).
  *
+ * Note: To set labels used in post type admin notices, see the {@see 'post_updated_messages'} filter.
+ *
  * @since 3.0.0
  * @since 4.3.0 Added the `featured_image`, `set_featured_image`, `remove_featured_image`,
  *              and `use_featured_image` labels.
  * @since 4.4.0 Added the `insert_into_item`, `uploaded_to_this_item`, `filter_items_list`,
  *              `items_list_navigation`, and `items_list` labels.
+ * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object.
  *
  * @access private
  *
- * @param object $post_type_object Post type object.
- * @return object object with all the labels as member variables.
+ * @param object|WP_Post_Type $post_type_object Post type object.
+ * @return object Object with all the labels as member variables.
  */
 function get_post_type_labels( $post_type_object ) {
        $nohier_vs_hier_defaults = array(
@@ -1476,7 +1307,7 @@ function get_post_type_labels( $post_type_object ) {
        $default_labels = clone $labels;
 
        /**
-        * Filter the labels of a specific post type.
+        * Filters the labels of a specific post type.
         *
         * The dynamic portion of the hook name, `$post_type`, refers to
         * the post type slug.
@@ -1693,8 +1524,9 @@ function set_post_type( $post_id = 0, $post_type = 'post' ) {
  *
  * @since 4.4.0
  * @since 4.5.0 Added the ability to pass a post type name in addition to object.
+ * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object.
  *
- * @param object $post_type Post type name or object.
+ * @param string|WP_Post_Type $post_type Post type name or object.
  * @return bool Whether the post type should be considered viewable.
  */
 function is_post_type_viewable( $post_type ) {
@@ -2039,7 +1871,7 @@ function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) {
                if ( $prefixed ) {
 
                        /**
-                        * Filter the value of a specific post field to edit.
+                        * Filters the value of a specific post field to edit.
                         *
                         * The dynamic portion of the hook name, `$field`, refers to the post
                         * field name.
@@ -2052,7 +1884,7 @@ function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) {
                        $value = apply_filters( "edit_{$field}", $value, $post_id );
 
                        /**
-                        * Filter the value of a specific post field to edit.
+                        * Filters the value of a specific post field to edit.
                         *
                         * The dynamic portion of the hook name, `$field_no_prefix`, refers to
                         * the post field name.
@@ -2079,7 +1911,7 @@ function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) {
                if ( $prefixed ) {
 
                        /**
-                        * Filter the value of a specific post field before saving.
+                        * Filters the value of a specific post field before saving.
                         *
                         * The dynamic portion of the hook name, `$field`, refers to the post
                         * field name.
@@ -2091,7 +1923,7 @@ function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) {
                        $value = apply_filters( "pre_{$field}", $value );
 
                        /**
-                        * Filter the value of a specific field before saving.
+                        * Filters the value of a specific field before saving.
                         *
                         * The dynamic portion of the hook name, `$field_no_prefix`, refers
                         * to the post field name.
@@ -2105,7 +1937,7 @@ function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) {
                        $value = apply_filters( "pre_post_{$field}", $value );
 
                        /**
-                        * Filter the value of a specific post field before saving.
+                        * Filters the value of a specific post field before saving.
                         *
                         * The dynamic portion of the hook name, `$field`, refers to the post
                         * field name.
@@ -2122,7 +1954,7 @@ function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) {
                if ( $prefixed ) {
 
                        /**
-                        * Filter the value of a specific post field for display.
+                        * Filters the value of a specific post field for display.
                         *
                         * The dynamic portion of the hook name, `$field`, refers to the post
                         * field name.
@@ -2139,12 +1971,13 @@ function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) {
                } else {
                        $value = apply_filters( "post_{$field}", $value, $post_id, $context );
                }
-       }
 
-       if ( 'attribute' == $context )
-               $value = esc_attr($value);
-       elseif ( 'js' == $context )
-               $value = esc_js($value);
+               if ( 'attribute' == $context ) {
+                       $value = esc_attr( $value );
+               } elseif ( 'js' == $context ) {
+                       $value = esc_js( $value );
+               }
+       }
 
        return $value;
 }
@@ -2167,7 +2000,18 @@ function stick_post( $post_id ) {
        if ( ! in_array($post_id, $stickies) )
                $stickies[] = $post_id;
 
-       update_option('sticky_posts', $stickies);
+       $updated = update_option( 'sticky_posts', $stickies );
+
+       if ( $updated ) {
+               /**
+                * Fires once a post has been added to the sticky list.
+                *
+                * @since 4.6.0
+                *
+                * @param int $post_id ID of the post that was stuck.
+                */
+               do_action( 'post_stuck', $post_id );
+       }
 }
 
 /**
@@ -2194,7 +2038,18 @@ function unstick_post( $post_id ) {
 
        array_splice($stickies, $offset, 1);
 
-       update_option('sticky_posts', $stickies);
+       $updated = update_option( 'sticky_posts', $stickies );
+
+       if ( $updated ) {
+               /**
+                * Fires once a post has been removed from the sticky list.
+                *
+                * @since 4.6.0
+                *
+                * @param int $post_id ID of the post that was unstuck.
+                */
+               do_action( 'post_unstuck', $post_id );
+       }
 }
 
 /**
@@ -2341,7 +2196,7 @@ function get_post_mime_types() {
        );
 
        /**
-        * Filter the default list of post mime types.
+        * Filters the default list of post mime types.
         *
         * @since 2.5.0
         *
@@ -2486,7 +2341,7 @@ function wp_delete_post( $postid = 0, $force_delete = false ) {
                return wp_delete_attachment( $postid, $force_delete );
 
        /**
-        * Filter whether a post deletion should take place.
+        * Filters whether a post deletion should take place.
         *
         * @since 4.4.0
         *
@@ -2851,8 +2706,10 @@ function wp_untrash_post_comments( $post = null ) {
  *
  * @param int   $post_id Optional. The Post ID. Does not default to the ID of the
  *                       global $post. Default 0.
- * @param array $args    Optional. Category arguments. Default empty.
- * @return array List of categories.
+ * @param array $args    Optional. Category arguments. See wp_get_object_terms(). Default empty.
+ * @return array List of categories. If the `$fields` argument passed via `$args` is 'all' or
+ *               'all_with_object_id', an array of WP_Term objects will be returned. If `$fields`
+ *               is 'ids', an array of category ids. If `$fields` is 'names', an array of category names.
  */
 function wp_get_post_categories( $post_id = 0, $args = array() ) {
        $post_id = (int) $post_id;
@@ -2869,7 +2726,7 @@ function wp_get_post_categories( $post_id = 0, $args = array() ) {
  *
  * There is only one default for this function, called 'fields' and by default
  * is set to 'all'. There are other defaults that can be overridden in
- * {@link wp_get_object_terms()}.
+ * wp_get_object_terms().
  *
  * @since 2.3.0
  *
@@ -2887,14 +2744,14 @@ function wp_get_post_tags( $post_id = 0, $args = array() ) {
  *
  * There is only one default for this function, called 'fields' and by default
  * is set to 'all'. There are other defaults that can be overridden in
- * {@link wp_get_object_terms()}.
+ * wp_get_object_terms().
  *
  * @since 2.8.0
  *
  * @param int    $post_id  Optional. The Post ID. Does not default to the ID of the
  *                         global $post. Default 0.
  * @param string $taxonomy Optional. The taxonomy for which to retrieve terms. Default 'post_tag'.
- * @param array  $args     Optional. {@link wp_get_object_terms()} arguments. Default empty array.
+ * @param array  $args     Optional. wp_get_object_terms() arguments. Default empty array.
  * @return array|WP_Error  List of post terms or empty array if no terms were found. WP_Error object
  *                         if `$taxonomy` doesn't exist.
  */
@@ -2923,7 +2780,7 @@ function wp_get_post_terms( $post_id = 0, $taxonomy = 'post_tag', $args = array(
 function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
 
        if ( is_numeric( $args ) ) {
-               _deprecated_argument( __FUNCTION__, '3.1', __( 'Passing an integer number of posts is deprecated. Pass an array of arguments instead.' ) );
+               _deprecated_argument( __FUNCTION__, '3.1.0', __( 'Passing an integer number of posts is deprecated. Pass an array of arguments instead.' ) );
                $args = array( 'numberposts' => absint( $args ) );
        }
 
@@ -3004,6 +2861,8 @@ function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
  *     @type int    $menu_order            The order the post should be displayed in. Default 0.
  *     @type string $post_mime_type        The mime type of the post. Default empty.
  *     @type string $guid                  Global Unique ID for referencing the post. Default empty.
+ *     @type array  $post_category         Array of category names, slugs, or IDs.
+ *                                         Defaults to value of the 'default_category' option.
  *     @type array  $tax_input             Array of taxonomy terms keyed by their taxonomy name. Default empty.
  *     @type array  $meta_input            Array of post meta values keyed by their post meta key. Default empty.
  * }
@@ -3084,7 +2943,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
                && post_type_supports( $post_type, 'excerpt' );
 
        /**
-        * Filter whether the post should be considered "empty".
+        * Filters whether the post should be considered "empty".
         *
         * The post is considered "empty" if both:
         * 1. The post type supports the title, editor, and excerpt fields
@@ -3252,7 +3111,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
        }
 
        /**
-        * Filter the post parent -- used to check for and prevent hierarchy loops.
+        * Filters the post parent -- used to check for and prevent hierarchy loops.
         *
         * @since 3.1.0
         *
@@ -3306,7 +3165,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
 
        if ( 'attachment' === $post_type ) {
                /**
-                * Filter attachment post data before it is updated in or added to the database.
+                * Filters attachment post data before it is updated in or added to the database.
                 *
                 * @since 3.9.0
                 *
@@ -3316,7 +3175,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
                $data = apply_filters( 'wp_insert_attachment_data', $data, $postarr );
        } else {
                /**
-                * Filter slashed post data just before it is inserted into the database.
+                * Filters slashed post data just before it is inserted into the database.
                 *
                 * @since 2.7.0
                 *
@@ -3423,6 +3282,27 @@ function wp_insert_post( $postarr, $wp_error = false ) {
                }
        }
 
+       // Set or remove featured image.
+       if ( isset( $postarr['_thumbnail_id'] ) ) {
+               $thumbnail_support = current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports( $post_type, 'thumbnail' ) || 'revision' === $post_type;
+               if ( ! $thumbnail_support && 'attachment' === $post_type && $post_mime_type ) {
+                       if ( wp_attachment_is( 'audio', $post_ID ) ) {
+                               $thumbnail_support = post_type_supports( 'attachment:audio', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:audio' );
+                       } elseif ( wp_attachment_is( 'video', $post_ID ) ) {
+                               $thumbnail_support = post_type_supports( 'attachment:video', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:video' );
+                       }
+               }
+
+               if ( $thumbnail_support ) {
+                       $thumbnail_id = intval( $postarr['_thumbnail_id'] );
+                       if ( -1 === $thumbnail_id ) {
+                               delete_post_thumbnail( $post_ID );
+                       } else {
+                               set_post_thumbnail( $post_ID, $thumbnail_id );
+                       }
+               }
+       }
+
        clean_post_cache( $post_ID );
 
        $post = get_post( $post_ID );
@@ -3669,7 +3549,7 @@ function check_and_publish_future_post( $post_id ) {
                return;
        }
 
-       // wp_publish_post(_ returns no meaningful value.
+       // wp_publish_post() returns no meaningful value.
        wp_publish_post( $post_id );
 }
 
@@ -3706,7 +3586,7 @@ function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p
                $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_ID ) );
 
                /**
-                * Filter whether the post slug would make a bad attachment slug.
+                * Filters whether the post slug would make a bad attachment slug.
                 *
                 * @since 3.1.0
                 *
@@ -3734,7 +3614,7 @@ function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p
                $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_type, $post_ID, $post_parent ) );
 
                /**
-                * Filter whether the post slug would make a bad hierarchical post slug.
+                * Filters whether the post slug would make a bad hierarchical post slug.
                 *
                 * @since 3.1.0
                 *
@@ -3780,7 +3660,7 @@ function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p
                }
 
                /**
-                * Filter whether the post slug would be bad as a flat slug.
+                * Filters whether the post slug would be bad as a flat slug.
                 *
                 * @since 3.1.0
                 *
@@ -3800,7 +3680,7 @@ function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p
        }
 
        /**
-        * Filter the unique post slug.
+        * Filters the unique post slug.
         *
         * @since 3.3.0
         *
@@ -3956,8 +3836,8 @@ function wp_set_post_categories( $post_ID = 0, $post_categories = array(), $appe
  * When a post is saved, the post status is "transitioned" from one status to another,
  * though this does not always mean the status has actually changed before and after
  * the save. This function fires a number of action hooks related to that transition:
- * the generic 'transition_post_status' action, as well as the dynamic hooks
- * `"{$old_status}_to_{$new_status}"` and `"{$new_status}_{$post->post_type}"`. Note
+ * the generic {@see 'transition_post_status'} action, as well as the dynamic hooks
+ * {@see '$old_status_to_$new_status'} and {@see '$new_status_$post->post_type'}. Note
  * that the function does not transition the post object in the database.
  *
  * For instance: When publishing a post for the first time, the post status may transition
@@ -4041,7 +3921,7 @@ function add_ping( $post_id, $uri ) {
        $new = implode("\n", $pung);
 
        /**
-        * Filter the new ping URL to add for the given post.
+        * Filters the new ping URL to add for the given post.
         *
         * @since 2.0.0
         *
@@ -4078,7 +3958,7 @@ function get_enclosed( $post_id ) {
        }
 
        /**
-        * Filter the list of enclosures already enclosed for the given post.
+        * Filters the list of enclosures already enclosed for the given post.
         *
         * @since 2.0.0
         *
@@ -4105,7 +3985,7 @@ function get_pung( $post_id ) {
        $pung = preg_split('/\s/', $pung);
 
        /**
-        * Filter the list of already-pinged URLs for the given post.
+        * Filters the list of already-pinged URLs for the given post.
         *
         * @since 2.0.0
         *
@@ -4131,7 +4011,7 @@ function get_to_ping( $post_id ) {
        $to_ping = preg_split('/\s/', $to_ping, -1, PREG_SPLIT_NO_EMPTY);
 
        /**
-        * Filter the list of URLs yet to ping for the given post.
+        * Filters the list of URLs yet to ping for the given post.
         *
         * @since 2.0.0
         *
@@ -4228,6 +4108,24 @@ function get_page( $page, $output = OBJECT, $filter = 'raw') {
 function get_page_by_path( $page_path, $output = OBJECT, $post_type = 'page' ) {
        global $wpdb;
 
+       $last_changed = wp_cache_get( 'last_changed', 'posts' );
+       if ( false === $last_changed ) {
+               $last_changed = microtime();
+               wp_cache_set( 'last_changed', $last_changed, 'posts' );
+       }
+
+       $hash = md5( $page_path . serialize( $post_type ) );
+       $cache_key = "get_page_by_path:$hash:$last_changed";
+       $cached = wp_cache_get( $cache_key, 'posts' );
+       if ( false !== $cached ) {
+               // Special case: '0' is a bad `$page_path`.
+               if ( '0' === $cached || 0 === $cached ) {
+                       return;
+               } else {
+                       return get_post( $cached, $output );
+               }
+       }
+
        $page_path = rawurlencode(urldecode($page_path));
        $page_path = str_replace('%2F', '/', $page_path);
        $page_path = str_replace('%20', ' ', $page_path);
@@ -4282,6 +4180,9 @@ function get_page_by_path( $page_path, $output = OBJECT, $post_type = 'page' ) {
                }
        }
 
+       // We cache misses as well as hits.
+       wp_cache_set( $cache_key, $foundid, 'posts' );
+
        if ( $foundid ) {
                return get_post( $foundid, $output );
        }
@@ -4425,11 +4326,12 @@ function _page_traverse_name( $page_id, &$children, &$result ){
  * Sub pages will be in the "directory" under the parent page post name.
  *
  * @since 1.5.0
+ * @since 4.6.0 Converted the `$page` parameter to optional.
  *
- * @param WP_Post|object|int $page Page object or page ID.
+ * @param WP_Post|object|int $page Optional. Page ID or WP_Post object. Default is global $post.
  * @return string|false Page URI, false on error.
  */
-function get_page_uri( $page ) {
+function get_page_uri( $page = 0 ) {
        if ( ! $page instanceof WP_Post ) {
                $page = get_post( $page );
        }
@@ -4441,13 +4343,13 @@ function get_page_uri( $page ) {
 
        foreach ( $page->ancestors as $parent ) {
                $parent = get_post( $parent );
-               if ( $parent ) {
+               if ( $parent && $parent->post_name ) {
                        $uri = $parent->post_name . '/' . $uri;
                }
        }
 
        /**
-        * Filter the URI for a page.
+        * Filters the URI for a page.
         *
         * @since 4.4.0
         *
@@ -4742,7 +4644,7 @@ function get_pages( $args = array() ) {
        $pages = array_map( 'get_post', $pages );
 
        /**
-        * Filter the retrieved list of pages.
+        * Filters the retrieved list of pages.
         *
         * @since 2.1.0
         *
@@ -4953,7 +4855,7 @@ function wp_get_attachment_metadata( $post_id = 0, $unfiltered = false ) {
                return $data;
 
        /**
-        * Filter the attachment meta data.
+        * Filters the attachment meta data.
         *
         * @since 2.1.0
         *
@@ -4979,7 +4881,7 @@ function wp_update_attachment_metadata( $post_id, $data ) {
                return false;
 
        /**
-        * Filter the updated attachment meta data.
+        * Filters the updated attachment meta data.
         *
         * @since 2.1.0
         *
@@ -5043,7 +4945,7 @@ function wp_get_attachment_url( $post_id = 0 ) {
        }
 
        /**
-        * Filter the attachment URL.
+        * Filters the attachment URL.
         *
         * @since 2.1.0
         *
@@ -5058,6 +4960,37 @@ function wp_get_attachment_url( $post_id = 0 ) {
        return $url;
 }
 
+/**
+ * Retrieves the caption for an attachment.
+ *
+ * @since 4.6.0
+ *
+ * @param int $post_id Optional. Attachment ID. Default is the ID of the global `$post`.
+ * @return string|false False on failure. Attachment caption on success.
+ */
+function wp_get_attachment_caption( $post_id = 0 ) {
+       $post_id = (int) $post_id;
+       if ( ! $post = get_post( $post_id ) ) {
+               return false;
+       }
+
+       if ( 'attachment' !== $post->post_type ) {
+               return false;
+       }
+
+       $caption = $post->post_excerpt;
+
+       /**
+        * Filters the attachment caption.
+        *
+        * @since 4.6.0
+        *
+        * @param string $caption Caption for the given attachment.
+        * @param int    $post_id Attachment ID.
+        */
+       return apply_filters( 'wp_get_attachment_caption', $caption, $post->ID );
+}
+
 /**
  * Retrieve thumbnail for an attachment.
  *
@@ -5077,7 +5010,7 @@ function wp_get_attachment_thumb_file( $post_id = 0 ) {
 
        if ( !empty($imagedata['thumb']) && ($thumbfile = str_replace(basename($file), $imagedata['thumb'], $file)) && file_exists($thumbfile) ) {
                /**
-                * Filter the attachment thumbnail file path.
+                * Filters the attachment thumbnail file path.
                 *
                 * @since 2.1.0
                 *
@@ -5114,7 +5047,7 @@ function wp_get_attachment_thumb_url( $post_id = 0 ) {
        $url = str_replace(basename($url), basename($thumb), $url);
 
        /**
-        * Filter the attachment thumbnail URL.
+        * Filters the attachment thumbnail URL.
         *
         * @since 2.1.0
         *
@@ -5129,12 +5062,12 @@ function wp_get_attachment_thumb_url( $post_id = 0 ) {
  *
  * @since 4.2.0
  *
- * @param string      $type    Attachment type. Accepts 'image', 'audio', or 'video'.
- * @param int|WP_Post $post_id Optional. Attachment ID. Default 0.
+ * @param string      $type Attachment type. Accepts 'image', 'audio', or 'video'.
+ * @param int|WP_Post $post Optional. Attachment ID or object. Default is global $post.
  * @return bool True if one of the accepted types, false otherwise.
  */
-function wp_attachment_is( $type, $post_id = 0 ) {
-       if ( ! $post = get_post( $post_id ) ) {
+function wp_attachment_is( $type, $post = null ) {
+       if ( ! $post = get_post( $post ) ) {
                return false;
        }
 
@@ -5180,10 +5113,10 @@ function wp_attachment_is( $type, $post_id = 0 ) {
  * @since 4.2.0 Modified into wrapper for wp_attachment_is() and
  *              allowed WP_Post object to be passed.
  *
- * @param int|WP_Post $post Optional. Attachment ID. Default 0.
+ * @param int|WP_Post $post Optional. Attachment ID or object. Default is global $post.
  * @return bool Whether the attachment is an image.
  */
-function wp_attachment_is_image( $post = 0 ) {
+function wp_attachment_is_image( $post = null ) {
        return wp_attachment_is( 'image', $post );
 }
 
@@ -5225,7 +5158,7 @@ function wp_mime_type_icon( $mime = 0 ) {
 
                if ( !is_array($icon_files) ) {
                        /**
-                        * Filter the icon directory path.
+                        * Filters the icon directory path.
                         *
                         * @since 2.0.0
                         *
@@ -5234,7 +5167,7 @@ function wp_mime_type_icon( $mime = 0 ) {
                        $icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/media' );
 
                        /**
-                        * Filter the icon directory URI.
+                        * Filters the icon directory URI.
                         *
                         * @since 2.0.0
                         *
@@ -5243,7 +5176,7 @@ function wp_mime_type_icon( $mime = 0 ) {
                        $icon_dir_uri = apply_filters( 'icon_dir_uri', includes_url( 'images/media' ) );
 
                        /**
-                        * Filter the list of icon directory URIs.
+                        * Filters the list of icon directory URIs.
                         *
                         * @since 2.5.0
                         *
@@ -5303,7 +5236,7 @@ function wp_mime_type_icon( $mime = 0 ) {
        }
 
        /**
-        * Filter the mime type icon.
+        * Filters the mime type icon.
         *
         * @since 2.1.0
         *
@@ -5410,7 +5343,7 @@ function get_posts_by_author_sql( $post_type, $full = true, $post_author = null,
                }
 
                /**
-                * Filter the capability to read private posts for a custom post type
+                * Filters the capability to read private posts for a custom post type
                 * when generating SQL for getting posts by author.
                 *
                 * @since 2.2.0
@@ -5479,13 +5412,13 @@ function get_posts_by_author_sql( $post_type, $full = true, $post_author = null,
  */
 function get_lastpostdate( $timezone = 'server', $post_type = 'any' ) {
        /**
-        * Filter the date the last post was published.
+        * Filters the date the last post was published.
         *
         * @since 2.3.0
         *
         * @param string $date     Date the last post was published.
         * @param string $timezone Location to use for getting the post published date.
-        *                         See {@see get_lastpostdate()} for accepted `$timezone` values.
+        *                         See get_lastpostdate() for accepted `$timezone` values.
         */
        return apply_filters( 'get_lastpostdate', _get_last_post_time( $timezone, 'date', $post_type ), $timezone );
 }
@@ -5500,7 +5433,7 @@ function get_lastpostdate( $timezone = 'server', $post_type = 'any' ) {
  * @since 1.2.0
  * @since 4.4.0 The `$post_type` argument was added.
  *
- * @param string $timezone  Optional. The timezone for the timestamp. See {@see get_lastpostdate()}
+ * @param string $timezone  Optional. The timezone for the timestamp. See get_lastpostdate()
  *                          for information on accepted values.
  *                          Default 'server'.
  * @param string $post_type Optional. The post type to check. Default 'any'.
@@ -5515,7 +5448,7 @@ function get_lastpostmodified( $timezone = 'server', $post_type = 'any' ) {
         * @param string $lastpostmodified Date the last post was modified.
         *                                 Returning anything other than false will short-circuit the function.
         * @param string $timezone         Location to use for getting the post modified date.
-        *                                 See {@see get_lastpostdate()} for accepted `$timezone` values.
+        *                                 See get_lastpostdate() for accepted `$timezone` values.
         * @param string $post_type        The post type to check.
         */
        $lastpostmodified = apply_filters( 'pre_get_lastpostmodified', false, $timezone, $post_type );
@@ -5531,13 +5464,13 @@ function get_lastpostmodified( $timezone = 'server', $post_type = 'any' ) {
        }
 
        /**
-        * Filter the date the last post was modified.
+        * Filters the date the last post was modified.
         *
         * @since 2.3.0
         *
         * @param string $lastpostmodified Date the last post was modified.
         * @param string $timezone         Location to use for getting the post modified date.
-        *                                 See {@see get_lastpostdate()} for accepted `$timezone` values.
+        *                                 See get_lastpostdate() for accepted `$timezone` values.
         */
        return apply_filters( 'get_lastpostmodified', $lastpostmodified, $timezone );
 }
@@ -5842,8 +5775,7 @@ function _transition_post_status( $new_status, $old_status, $post ) {
  *
  * @param int     $deprecated Not used. Can be set to null. Never implemented. Not marked
  *                            as deprecated with _deprecated_argument() as it conflicts with
- *                            wp_transition_post_status() and the default filter for
- *                            {@see _future_post_hook()}.
+ *                            wp_transition_post_status() and the default filter for _future_post_hook().
  * @param WP_Post $post       Post object.
  */
 function _future_post_hook( $deprecated, $post ) {
@@ -5903,7 +5835,7 @@ function wp_get_post_parent_id( $post_ID ) {
  * Check the given subset of the post hierarchy for hierarchy loops.
  *
  * Prevents loops from forming and breaks those that it finds. Attached
- * to the 'wp_insert_post_parent' filter.
+ * to the {@see 'wp_insert_post_parent'} filter.
  *
  * @since 3.1.0
  *
@@ -6109,7 +6041,7 @@ function wp_add_trashed_suffix_to_post_name_for_trashed_posts( $post_name, $post
 }
 
 /**
- * Adds a trashed suffix For a given post.
+ * Adds a trashed suffix for a given post.
  *
  * Store its desired (i.e. current) slug so it can try to reclaim it
  * if the post is untrashed.
@@ -6120,6 +6052,7 @@ function wp_add_trashed_suffix_to_post_name_for_trashed_posts( $post_name, $post
  * @access private
  *
  * @param WP_Post $post The post.
+ * @return string New slug for the post.
  */
 function wp_add_trashed_suffix_to_post_name_for_post( $post ) {
        global $wpdb;
index 988787a96e07874e30d8b540f77162bcdf0b5008..c5c1ae657ec0db81b56b099a24e78d3a8b9fe23a 100644 (file)
@@ -77,17 +77,22 @@ function set_query_var( $var, $value ) {
 }
 
 /**
- * Set up The Loop with query parameters.
+ * Sets up The Loop with query parameters.
  *
- * This will override the current WordPress Loop and shouldn't be used more than
- * once. This must not be used within the WordPress Loop.
+ * Note: This function will completely override the main query and isn't intended for use
+ * by plugins or themes. Its overly-simplistic approach to modifying the main query can be
+ * problematic and should be avoided wherever possible. In most cases, there are better,
+ * more performant options for modifying the main query such as via the {@see 'pre_get_posts'}
+ * action within WP_Query.
+ *
+ * This must not be used within the WordPress Loop.
  *
  * @since 1.5.0
  *
  * @global WP_Query $wp_query Global WP_Query instance.
  *
- * @param string $query
- * @return array List of posts
+ * @param array|string $query Array or string of WP_Query arguments.
+ * @return array List of post objects.
  */
 function query_posts($query) {
        $GLOBALS['wp_query'] = new WP_Query();
@@ -95,11 +100,11 @@ function query_posts($query) {
 }
 
 /**
- * Destroy the previous query and set up a new query.
+ * Destroys the previous query and sets up a new query.
  *
- * This should be used after {@link query_posts()} and before another {@link
- * query_posts()}. This will remove obscure bugs that occur when the previous
- * wp_query object is not destroyed properly before another is set up.
+ * This should be used after query_posts() and before another query_posts().
+ * This will remove obscure bugs that occur when the previous WP_Query object
+ * is not destroyed properly before another is set up.
  *
  * @since 2.3.0
  *
@@ -146,7 +151,7 @@ function is_archive() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -167,7 +172,7 @@ function is_post_type_archive( $post_types = '' ) {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -188,7 +193,7 @@ function is_attachment( $attachment = '' ) {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -212,7 +217,7 @@ function is_author( $author = '' ) {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -236,7 +241,7 @@ function is_category( $category = '' ) {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -260,7 +265,7 @@ function is_tag( $tag = '' ) {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -268,7 +273,7 @@ function is_tag( $tag = '' ) {
 }
 
 /**
- * Is the query for an existing taxonomy archive page?
+ * Is the query for an existing custom taxonomy archive page?
  *
  * If the $taxonomy parameter is specified, this function will additionally
  * check if the query is for that specific $taxonomy.
@@ -283,13 +288,13 @@ function is_tag( $tag = '' ) {
  *
  * @param string|array     $taxonomy Optional. Taxonomy slug or slugs.
  * @param int|string|array $term     Optional. Term ID, name, slug or array of Term IDs, names, and slugs.
- * @return bool
+ * @return bool True for custom taxonomy archive pages, false for built-in taxonomies (category and tag archives).
  */
 function is_tax( $taxonomy = '', $term = '' ) {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -309,7 +314,7 @@ function is_date() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -329,7 +334,7 @@ function is_day() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -350,7 +355,7 @@ function is_feed( $feeds = '' ) {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -370,7 +375,7 @@ function is_comment_feed() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -399,7 +404,7 @@ function is_front_page() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -407,28 +412,28 @@ function is_front_page() {
 }
 
 /**
- * Is the query for the blog homepage?
- *
- * This is the page which shows the time based blog content of your site.
+ * Determines if the query is for the blog homepage.
  *
- * Depends on the site's "Front page displays" Reading Settings 'show_on_front' and 'page_for_posts'.
+ * The blog homepage is the page that shows the time-based blog content of the site.
  *
- * If you set a static page for the front page of your site, this function will return
- * true only on the page you set as the "Posts page".
+ * is_home() is dependent on the site's "Front page displays" Reading Settings 'show_on_front'
+ * and 'page_for_posts'.
  *
- * @see is_front_page()
+ * If a static page is set for the front page of the site, this function will return true only
+ * on the page you set as the "Posts page".
  *
  * @since 1.5.0
  *
+ * @see is_front_page()
  * @global WP_Query $wp_query Global WP_Query instance.
  *
- * @return bool True if blog view homepage.
+ * @return bool True if blog view homepage, otherwise false.
  */
 function is_home() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -448,7 +453,7 @@ function is_month() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -475,7 +480,7 @@ function is_page( $page = '' ) {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -495,7 +500,7 @@ function is_paged() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -515,7 +520,7 @@ function is_preview() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -535,7 +540,7 @@ function is_robots() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -555,7 +560,7 @@ function is_search() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -584,7 +589,7 @@ function is_single( $post = '' ) {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -611,7 +616,7 @@ function is_singular( $post_types = '' ) {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -631,7 +636,7 @@ function is_time() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -651,7 +656,7 @@ function is_trackback() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -671,7 +676,7 @@ function is_year() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -691,7 +696,7 @@ function is_404() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -711,7 +716,7 @@ function is_embed() {
        global $wp_query;
 
        if ( ! isset( $wp_query ) ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
+               _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
                return false;
        }
 
@@ -737,7 +742,7 @@ function is_main_query() {
                        '<code>is_main_query()</code>',
                        __( 'https://codex.wordpress.org/Function_Reference/is_main_query' )
                );
-               _doing_it_wrong( __FUNCTION__, $message, '3.7' );
+               _doing_it_wrong( __FUNCTION__, $message, '3.7.0' );
        }
 
        global $wp_query;
@@ -1468,6 +1473,7 @@ class WP_Query {
         * @since 4.5.0 Removed the `$comments_popup` parameter.
         *              Introduced the `$comment_status` and `$ping_status` parameters.
         *              Introduced `RAND(x)` syntax for `$orderby`, which allows an integer seed value to random sorts.
+        * @since 4.6.0 Added 'post_name__in' support for `$orderby`. Introduced the `$lazy_load_term_meta` argument.
         * @access public
         *
         * @param string|array $query {
@@ -1488,7 +1494,7 @@ class WP_Query {
         *     @type int          $comments_per_page       The number of comments to return per page.
         *                                                 Default 'comments_per_page' option.
         *     @type array        $date_query              An associative array of WP_Date_Query arguments.
-        *                                                 {@see WP_Date_Query::__construct()}
+        *                                                 See WP_Date_Query::__construct().
         *     @type int          $day                     Day of the month. Default empty. Accepts numbers 1-31.
         *     @type bool         $exact                   Whether to search by exact keyword. Default false.
         *     @type string|array $fields                  Which fields to return. Single field or all fields (string),
@@ -1502,8 +1508,7 @@ class WP_Query {
         *                                                 numbers 1-12. Default empty.
         *     @type string       $meta_compare            Comparison operator to test the 'meta_value'.
         *     @type string       $meta_key                Custom field key.
-        *     @type array        $meta_query              An associative array of WP_Meta_Query arguments.
-        *                                                 {@see WP_Meta_Query}
+        *     @type array        $meta_query              An associative array of WP_Meta_Query arguments. See WP_Meta_Query.
         *     @type string       $meta_value              Custom field value.
         *     @type int          $meta_value_num          Custom field value number.
         *     @type int          $menu_order              The menu order of the posts.
@@ -1523,7 +1528,8 @@ class WP_Query {
         *                                                 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand',
         *                                                 'RAND(x)' (where 'x' is an integer seed value),
         *                                                 'comment_count', 'meta_value', 'meta_value_num', 'post__in',
-        *                                                 and the array keys of `$meta_query`.
+        *                                                 'post_name__in', 'post_parent__in', and the array keys
+        *                                                 of `$meta_query`.
         *     @type int          $p                       Post ID.
         *     @type int          $page                    Show the number of posts that would show up on page X of a
         *                                                 static front page.
@@ -1562,10 +1568,14 @@ class WP_Query {
         *     @type array        $tag_slug__in            An array of tag slugs (OR in). unless 'ignore_sticky_posts' is
         *                                                 true. Note: a string of comma-separated IDs will NOT work.
         *     @type array        $tax_query               An associative array of WP_Tax_Query arguments.
-        *                                                 {@see WP_Tax_Query->queries}
+        *                                                 See WP_Tax_Query->queries.
         *     @type string       $title                   Post title.
         *     @type bool         $update_post_meta_cache  Whether to update the post meta cache. Default true.
         *     @type bool         $update_post_term_cache  Whether to update the post term cache. Default true.
+        *     @type bool         $lazy_load_term_meta     Whether to lazy-load term meta. Setting to false will
+        *                                                 disable cache priming for term meta, so that each
+        *                                                 get_term_meta() call will hit the database.
+        *                                                 Defaults to the value of `$update_post_term_cache`.
         *     @type int          $w                       The week number of the year. Default empty. Accepts numbers 0-53.
         *     @type int          $year                    The four-digit year. Default empty. Accepts any four-digit year.
         * }
@@ -1591,7 +1601,7 @@ class WP_Query {
                $qv['monthnum'] = absint($qv['monthnum']);
                $qv['day'] = absint($qv['day']);
                $qv['w'] = absint($qv['w']);
-               $qv['m'] = preg_replace( '|[^0-9]|', '', $qv['m'] );
+               $qv['m'] = is_scalar( $qv['m'] ) ? preg_replace( '|[^0-9]|', '', $qv['m'] ) : '';
                $qv['paged'] = absint($qv['paged']);
                $qv['cat'] = preg_replace( '|[^0-9,-]|', '', $qv['cat'] ); // comma separated list of positive or negative integers
                $qv['author'] = preg_replace( '|[^0-9,-]|', '', $qv['author'] ); // comma separated list of positive or negative integers
@@ -2233,7 +2243,7 @@ class WP_Query {
                }
 
                /**
-                * Filter stopwords used when parsing search terms.
+                * Filters stopwords used when parsing search terms.
                 *
                 * @since 3.7.0
                 *
@@ -2523,7 +2533,7 @@ class WP_Query {
                $page = 1;
 
                if ( isset( $q['caller_get_posts'] ) ) {
-                       _deprecated_argument( 'WP_Query', '3.1', __( '"caller_get_posts" is deprecated. Use "ignore_sticky_posts" instead.' ) );
+                       _deprecated_argument( 'WP_Query', '3.1.0', __( '"caller_get_posts" is deprecated. Use "ignore_sticky_posts" instead.' ) );
                        if ( !isset( $q['ignore_sticky_posts'] ) )
                                $q['ignore_sticky_posts'] = $q['caller_get_posts'];
                }
@@ -2544,6 +2554,10 @@ class WP_Query {
                if ( !isset($q['update_post_term_cache']) )
                        $q['update_post_term_cache'] = true;
 
+               if ( ! isset( $q['lazy_load_term_meta'] ) ) {
+                       $q['lazy_load_term_meta'] = $q['update_post_term_cache'];
+               }
+
                if ( !isset($q['update_post_meta_cache']) )
                        $q['update_post_meta_cache'] = true;
 
@@ -2745,7 +2759,8 @@ class WP_Query {
                        $where .= " AND $wpdb->posts.post_name = '" . $q['attachment'] . "'";
                } elseif ( is_array( $q['post_name__in'] ) && ! empty( $q['post_name__in'] ) ) {
                        $q['post_name__in'] = array_map( 'sanitize_title_for_query', $q['post_name__in'] );
-                       $where .= " AND $wpdb->posts.post_name IN ('" . implode( "' ,'", $q['post_name__in'] ) . "')";
+                       $post_name__in = "'" . implode( "','", $q['post_name__in'] ) . "'";
+                       $where .= " AND $wpdb->posts.post_name IN ($post_name__in)";
                }
 
                // If an attachment is requested by number, let it supersede any post number.
@@ -2787,7 +2802,7 @@ class WP_Query {
 
                if ( ! $q['suppress_filters'] ) {
                        /**
-                        * Filter the search SQL that is used in the WHERE clause of WP_Query.
+                        * Filters the search SQL that is used in the WHERE clause of WP_Query.
                         *
                         * @since 3.0.0
                         *
@@ -2963,6 +2978,8 @@ class WP_Query {
                        $orderby = "FIELD( {$wpdb->posts}.ID, $post__in )";
                } elseif ( $q['orderby'] == 'post_parent__in' && ! empty( $post_parent__in ) ) {
                        $orderby = "FIELD( {$wpdb->posts}.post_parent, $post_parent__in )";
+               } elseif ( $q['orderby'] == 'post_name__in' && ! empty( $post_name__in ) ) {
+                       $orderby = "FIELD( {$wpdb->posts}.post_name, $post_name__in )";
                } else {
                        $orderby_array = array();
                        if ( is_array( $q['orderby'] ) ) {
@@ -3009,7 +3026,7 @@ class WP_Query {
 
                        if ( ! $q['suppress_filters'] ) {
                                /**
-                                * Filter the ORDER BY used when ordering search results.
+                                * Filters the ORDER BY used when ordering search results.
                                 *
                                 * @since 3.7.0
                                 *
@@ -3174,7 +3191,7 @@ class WP_Query {
                 */
                if ( !$q['suppress_filters'] ) {
                        /**
-                        * Filter the WHERE clause of the query.
+                        * Filters the WHERE clause of the query.
                         *
                         * @since 1.5.0
                         *
@@ -3184,7 +3201,7 @@ class WP_Query {
                        $where = apply_filters_ref_array( 'posts_where', array( $where, &$this ) );
 
                        /**
-                        * Filter the JOIN clause of the query.
+                        * Filters the JOIN clause of the query.
                         *
                         * @since 1.5.0
                         *
@@ -3224,7 +3241,7 @@ class WP_Query {
 
                        if ( !$q['suppress_filters'] ) {
                                /**
-                                * Filter the JOIN clause of the comments feed query before sending.
+                                * Filters the JOIN clause of the comments feed query before sending.
                                 *
                                 * @since 2.2.0
                                 *
@@ -3234,7 +3251,7 @@ class WP_Query {
                                $cjoin = apply_filters_ref_array( 'comment_feed_join', array( $cjoin, &$this ) );
 
                                /**
-                                * Filter the WHERE clause of the comments feed query before sending.
+                                * Filters the WHERE clause of the comments feed query before sending.
                                 *
                                 * @since 2.2.0
                                 *
@@ -3244,7 +3261,7 @@ class WP_Query {
                                $cwhere = apply_filters_ref_array( 'comment_feed_where', array( $cwhere, &$this ) );
 
                                /**
-                                * Filter the GROUP BY clause of the comments feed query before sending.
+                                * Filters the GROUP BY clause of the comments feed query before sending.
                                 *
                                 * @since 2.2.0
                                 *
@@ -3254,7 +3271,7 @@ class WP_Query {
                                $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( $cgroupby, &$this ) );
 
                                /**
-                                * Filter the ORDER BY clause of the comments feed query before sending.
+                                * Filters the ORDER BY clause of the comments feed query before sending.
                                 *
                                 * @since 2.8.0
                                 *
@@ -3264,7 +3281,7 @@ class WP_Query {
                                $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );
 
                                /**
-                                * Filter the LIMIT clause of the comments feed query before sending.
+                                * Filters the LIMIT clause of the comments feed query before sending.
                                 *
                                 * @since 2.8.0
                                 *
@@ -3302,7 +3319,7 @@ class WP_Query {
                 */
                if ( !$q['suppress_filters'] ) {
                        /**
-                        * Filter the WHERE clause of the query.
+                        * Filters the WHERE clause of the query.
                         *
                         * Specifically for manipulating paging queries.
                         *
@@ -3314,7 +3331,7 @@ class WP_Query {
                        $where = apply_filters_ref_array( 'posts_where_paged', array( $where, &$this ) );
 
                        /**
-                        * Filter the GROUP BY clause of the query.
+                        * Filters the GROUP BY clause of the query.
                         *
                         * @since 2.0.0
                         *
@@ -3324,7 +3341,7 @@ class WP_Query {
                        $groupby = apply_filters_ref_array( 'posts_groupby', array( $groupby, &$this ) );
 
                        /**
-                        * Filter the JOIN clause of the query.
+                        * Filters the JOIN clause of the query.
                         *
                         * Specifically for manipulating paging queries.
                         *
@@ -3336,7 +3353,7 @@ class WP_Query {
                        $join = apply_filters_ref_array( 'posts_join_paged', array( $join, &$this ) );
 
                        /**
-                        * Filter the ORDER BY clause of the query.
+                        * Filters the ORDER BY clause of the query.
                         *
                         * @since 1.5.1
                         *
@@ -3346,7 +3363,7 @@ class WP_Query {
                        $orderby = apply_filters_ref_array( 'posts_orderby', array( $orderby, &$this ) );
 
                        /**
-                        * Filter the DISTINCT clause of the query.
+                        * Filters the DISTINCT clause of the query.
                         *
                         * @since 2.1.0
                         *
@@ -3356,7 +3373,7 @@ class WP_Query {
                        $distinct = apply_filters_ref_array( 'posts_distinct', array( $distinct, &$this ) );
 
                        /**
-                        * Filter the LIMIT clause of the query.
+                        * Filters the LIMIT clause of the query.
                         *
                         * @since 2.1.0
                         *
@@ -3366,7 +3383,7 @@ class WP_Query {
                        $limits = apply_filters_ref_array( 'post_limits', array( $limits, &$this ) );
 
                        /**
-                        * Filter the SELECT clause of the query.
+                        * Filters the SELECT clause of the query.
                         *
                         * @since 2.1.0
                         *
@@ -3376,7 +3393,7 @@ class WP_Query {
                        $fields = apply_filters_ref_array( 'posts_fields', array( $fields, &$this ) );
 
                        /**
-                        * Filter all query clauses at once, for convenience.
+                        * Filters all query clauses at once, for convenience.
                         *
                         * Covers the WHERE, GROUP BY, JOIN, ORDER BY, DISTINCT,
                         * fields (SELECT), and LIMITS clauses.
@@ -3409,12 +3426,12 @@ class WP_Query {
                do_action( 'posts_selection', $where . $groupby . $orderby . $limits . $join );
 
                /*
-                * Filter again for the benefit of caching plugins.
+                * Filters again for the benefit of caching plugins.
                 * Regular plugins should use the hooks above.
                 */
                if ( !$q['suppress_filters'] ) {
                        /**
-                        * Filter the WHERE clause of the query.
+                        * Filters the WHERE clause of the query.
                         *
                         * For use by caching plugins.
                         *
@@ -3426,7 +3443,7 @@ class WP_Query {
                        $where = apply_filters_ref_array( 'posts_where_request', array( $where, &$this ) );
 
                        /**
-                        * Filter the GROUP BY clause of the query.
+                        * Filters the GROUP BY clause of the query.
                         *
                         * For use by caching plugins.
                         *
@@ -3438,7 +3455,7 @@ class WP_Query {
                        $groupby = apply_filters_ref_array( 'posts_groupby_request', array( $groupby, &$this ) );
 
                        /**
-                        * Filter the JOIN clause of the query.
+                        * Filters the JOIN clause of the query.
                         *
                         * For use by caching plugins.
                         *
@@ -3450,7 +3467,7 @@ class WP_Query {
                        $join = apply_filters_ref_array( 'posts_join_request', array( $join, &$this ) );
 
                        /**
-                        * Filter the ORDER BY clause of the query.
+                        * Filters the ORDER BY clause of the query.
                         *
                         * For use by caching plugins.
                         *
@@ -3462,7 +3479,7 @@ class WP_Query {
                        $orderby = apply_filters_ref_array( 'posts_orderby_request', array( $orderby, &$this ) );
 
                        /**
-                        * Filter the DISTINCT clause of the query.
+                        * Filters the DISTINCT clause of the query.
                         *
                         * For use by caching plugins.
                         *
@@ -3474,7 +3491,7 @@ class WP_Query {
                        $distinct = apply_filters_ref_array( 'posts_distinct_request', array( $distinct, &$this ) );
 
                        /**
-                        * Filter the SELECT clause of the query.
+                        * Filters the SELECT clause of the query.
                         *
                         * For use by caching plugins.
                         *
@@ -3486,7 +3503,7 @@ class WP_Query {
                        $fields = apply_filters_ref_array( 'posts_fields_request', array( $fields, &$this ) );
 
                        /**
-                        * Filter the LIMIT clause of the query.
+                        * Filters the LIMIT clause of the query.
                         *
                         * For use by caching plugins.
                         *
@@ -3498,7 +3515,7 @@ class WP_Query {
                        $limits = apply_filters_ref_array( 'post_limits_request', array( $limits, &$this ) );
 
                        /**
-                        * Filter all query clauses at once, for convenience.
+                        * Filters all query clauses at once, for convenience.
                         *
                         * For use by caching plugins.
                         *
@@ -3534,18 +3551,39 @@ class WP_Query {
 
                if ( !$q['suppress_filters'] ) {
                        /**
-                        * Filter the completed SQL query before sending.
+                        * Filters the completed SQL query before sending.
                         *
                         * @since 2.0.0
                         *
-                        * @param array    $request The complete SQL query.
+                        * @param string   $request The complete SQL query.
                         * @param WP_Query &$this   The WP_Query instance (passed by reference).
                         */
                        $this->request = apply_filters_ref_array( 'posts_request', array( $this->request, &$this ) );
                }
 
+               /**
+                * Filters the posts array before the query takes place.
+                *
+                * Return a non-null value to bypass WordPress's default post queries.
+                *
+                * Filtering functions that require pagination information are encouraged to set
+                * the `found_posts` and `max_num_pages` properties of the WP_Query object,
+                * passed to the filter by reference. If WP_Query does not perform a database
+                * query, it will not have enough information to generate these values itself.
+                *
+                * @since 4.6.0
+                *
+                * @param array|null $posts Return an array of post data to short-circuit WP's query,
+                *                          or null to allow WP to run its normal queries.
+                * @param WP_Query   $this  The WP_Query instance, passed by reference.
+                */
+               $this->posts = apply_filters_ref_array( 'posts_pre_query', array( null, &$this ) );
+
                if ( 'ids' == $q['fields'] ) {
-                       $this->posts = $wpdb->get_col( $this->request );
+                       if ( null === $this->posts ) {
+                               $this->posts = $wpdb->get_col( $this->request );
+                       }
+
                        $this->posts = array_map( 'intval', $this->posts );
                        $this->post_count = count( $this->posts );
                        $this->set_found_posts( $q, $limits );
@@ -3554,7 +3592,10 @@ class WP_Query {
                }
 
                if ( 'id=>parent' == $q['fields'] ) {
-                       $this->posts = $wpdb->get_results( $this->request );
+                       if ( null === $this->posts ) {
+                               $this->posts = $wpdb->get_results( $this->request );
+                       }
+
                        $this->post_count = count( $this->posts );
                        $this->set_found_posts( $q, $limits );
 
@@ -3569,58 +3610,61 @@ class WP_Query {
                        return $r;
                }
 
-               $split_the_query = ( $old_request == $this->request && "$wpdb->posts.*" == $fields && !empty( $limits ) && $q['posts_per_page'] < 500 );
-
-               /**
-                * Filter whether to split the query.
-                *
-                * Splitting the query will cause it to fetch just the IDs of the found posts
-                * (and then individually fetch each post by ID), rather than fetching every
-                * complete row at once. One massive result vs. many small results.
-                *
-                * @since 3.4.0
-                *
-                * @param bool     $split_the_query Whether or not to split the query.
-                * @param WP_Query $this            The WP_Query instance.
-                */
-               $split_the_query = apply_filters( 'split_the_query', $split_the_query, $this );
-
-               if ( $split_the_query ) {
-                       // First get the IDs and then fill in the objects
-
-                       $this->request = "SELECT $found_rows $distinct $wpdb->posts.ID FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits";
+               if ( null === $this->posts ) {
+                       $split_the_query = ( $old_request == $this->request && "$wpdb->posts.*" == $fields && !empty( $limits ) && $q['posts_per_page'] < 500 );
 
                        /**
-                        * Filter the Post IDs SQL request before sending.
+                        * Filters whether to split the query.
+                        *
+                        * Splitting the query will cause it to fetch just the IDs of the found posts
+                        * (and then individually fetch each post by ID), rather than fetching every
+                        * complete row at once. One massive result vs. many small results.
                         *
                         * @since 3.4.0
                         *
-                        * @param string   $request The post ID request.
-                        * @param WP_Query $this    The WP_Query instance.
+                        * @param bool     $split_the_query Whether or not to split the query.
+                        * @param WP_Query $this            The WP_Query instance.
                         */
-                       $this->request = apply_filters( 'posts_request_ids', $this->request, $this );
+                       $split_the_query = apply_filters( 'split_the_query', $split_the_query, $this );
 
-                       $ids = $wpdb->get_col( $this->request );
+                       if ( $split_the_query ) {
+                               // First get the IDs and then fill in the objects
 
-                       if ( $ids ) {
-                               $this->posts = $ids;
-                               $this->set_found_posts( $q, $limits );
-                               _prime_post_caches( $ids, $q['update_post_term_cache'], $q['update_post_meta_cache'] );
+                               $this->request = "SELECT $found_rows $distinct $wpdb->posts.ID FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits";
+
+                               /**
+                                * Filters the Post IDs SQL request before sending.
+                                *
+                                * @since 3.4.0
+                                *
+                                * @param string   $request The post ID request.
+                                * @param WP_Query $this    The WP_Query instance.
+                                */
+                               $this->request = apply_filters( 'posts_request_ids', $this->request, $this );
+
+                               $ids = $wpdb->get_col( $this->request );
+
+                               if ( $ids ) {
+                                       $this->posts = $ids;
+                                       $this->set_found_posts( $q, $limits );
+                                       _prime_post_caches( $ids, $q['update_post_term_cache'], $q['update_post_meta_cache'] );
+                               } else {
+                                       $this->posts = array();
+                               }
                        } else {
-                               $this->posts = array();
+                               $this->posts = $wpdb->get_results( $this->request );
+                               $this->set_found_posts( $q, $limits );
                        }
-               } else {
-                       $this->posts = $wpdb->get_results( $this->request );
-                       $this->set_found_posts( $q, $limits );
                }
 
-               // Convert to WP_Post objects
-               if ( $this->posts )
+               // Convert to WP_Post objects.
+               if ( $this->posts ) {
                        $this->posts = array_map( 'get_post', $this->posts );
+               }
 
                if ( ! $q['suppress_filters'] ) {
                        /**
-                        * Filter the raw post results array, prior to status checks.
+                        * Filters the raw post results array, prior to status checks.
                         *
                         * @since 2.3.0
                         *
@@ -3692,7 +3736,7 @@ class WP_Query {
 
                        if ( $this->is_preview && $this->posts && current_user_can( $edit_cap, $this->posts[0]->ID ) ) {
                                /**
-                                * Filter the single post for preview mode.
+                                * Filters the single post for preview mode.
                                 *
                                 * @since 2.7.0
                                 *
@@ -3751,7 +3795,7 @@ class WP_Query {
 
                if ( ! $q['suppress_filters'] ) {
                        /**
-                        * Filter the array of retrieved posts after they've been fetched and
+                        * Filters the array of retrieved posts after they've been fetched and
                         * internally processed.
                         *
                         * @since 1.5.0
@@ -3778,7 +3822,7 @@ class WP_Query {
                        $this->posts = array();
                }
 
-               if ( $q['update_post_term_cache'] ) {
+               if ( $q['lazy_load_term_meta'] ) {
                        wp_queue_posts_for_term_meta_lazyload( $this->posts );
                }
 
@@ -3807,7 +3851,7 @@ class WP_Query {
 
                if ( ! empty( $limits ) ) {
                        /**
-                        * Filter the query to run for retrieving the found posts.
+                        * Filters the query to run for retrieving the found posts.
                         *
                         * @since 2.1.0
                         *
@@ -3820,7 +3864,7 @@ class WP_Query {
                }
 
                /**
-                * Filter the number of found posts for the query.
+                * Filters the number of found posts for the query.
                 *
                 * @since 2.1.0
                 *
@@ -3879,9 +3923,9 @@ class WP_Query {
        }
 
        /**
-        * Whether there are more posts available in the loop.
+        * Determines whether there are more posts available in the loop.
         *
-        * Calls action 'loop_end', when the loop is complete.
+        * Calls the {@see 'loop_end'} action when the loop is complete.
         *
         * @since 1.5.0
         * @access public
@@ -4119,7 +4163,7 @@ class WP_Query {
        }
 
        /**
-        * Make private properties readable for backwards compatibility.
+        * Make private properties readable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -4134,7 +4178,7 @@ class WP_Query {
        }
 
        /**
-        * Make private properties checkable for backwards compatibility.
+        * Make private properties checkable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -4149,7 +4193,7 @@ class WP_Query {
        }
 
        /**
-        * Make private/protected methods readable for backwards compatibility.
+        * Make private/protected methods readable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -4326,7 +4370,7 @@ class WP_Query {
        }
 
        /**
-        * Is the query for an existing taxonomy archive page?
+        * Is the query for an existing custom taxonomy archive page?
         *
         * If the $taxonomy parameter is specified, this function will additionally
         * check if the query is for that specific $taxonomy.
@@ -4341,7 +4385,7 @@ class WP_Query {
         *
         * @param mixed $taxonomy Optional. Taxonomy slug or slugs.
         * @param mixed $term     Optional. Term ID, name, slug or array of Term IDs, names, and slugs.
-        * @return bool
+        * @return bool True for custom taxonomy archive pages, false for built-in taxonomies (category and tag archives).
         */
        public function is_tax( $taxonomy = '', $term = '' ) {
                global $wp_taxonomies;
@@ -4380,7 +4424,7 @@ class WP_Query {
         * @return bool
         */
        public function is_comments_popup() {
-               _deprecated_function( __FUNCTION__, '4.5' );
+               _deprecated_function( __FUNCTION__, '4.5.0' );
 
                return false;
        }
@@ -4793,7 +4837,7 @@ class WP_Query {
                }
 
                /**
-                * Filter the "pages" derived from splitting the post content.
+                * Filters the "pages" derived from splitting the post content.
                 *
                 * "Pages" are determined by splitting the post content based on the presence
                 * of `<!-- nextpage -->` tags.
@@ -4938,7 +4982,7 @@ function wp_old_slug_redirect() {
                }
 
                /**
-                * Filter the old slug redirect URL.
+                * Filters the old slug redirect URL.
                 *
                 * @since 4.4.0
                 *
index 9fee68601d24ff7a1b5f8c676e9cb40370999388..2054885f1cb45833c631ae94cc6965b972554bd5 100644 (file)
@@ -4,4 +4,4 @@
  *
  * @package WordPress
  */
-_deprecated_file( basename(__FILE__), '2.1', null, __( 'This file no longer needs to be included.' ) );
+_deprecated_file( basename(__FILE__), '2.1.0', null, __( 'This file no longer needs to be included.' ) );
index a0ffabf9fcd68a22663e18b2cff36bb56e2cef44..aa05672ddea4757b740f415b5a362fc040aa7f44 100644 (file)
@@ -4,4 +4,4 @@
  *
  * @package WordPress
  */
-_deprecated_file( basename(__FILE__), '3.1', null, __( 'This file no longer needs to be included.' ) );
+_deprecated_file( basename(__FILE__), '3.1.0', null, __( 'This file no longer needs to be included.' ) );
index 2375676c043bc95febb3b53d52bb187387170d16..13bfa596ece1714567ff3a90a0882985fb1460e4 100644 (file)
@@ -159,7 +159,7 @@ function rest_api_loaded() {
  */
 function rest_get_url_prefix() {
        /**
-        * Filter the REST URL prefix.
+        * Filters the REST URL prefix.
         *
         * @since 4.4.0
         *
@@ -206,9 +206,9 @@ function get_rest_url( $blog_id = null, $path = '/', $scheme = 'rest' ) {
        }
 
        /**
-        * Filter the REST URL.
+        * Filters the REST URL.
         *
-        * Use this filter to adjust the url returned by the `get_rest_url` function.
+        * Use this filter to adjust the url returned by the get_rest_url() function.
         *
         * @since 4.4.0
         *
@@ -269,7 +269,7 @@ function rest_get_server() {
 
        if ( empty( $wp_rest_server ) ) {
                /**
-                * Filter the REST Server Class.
+                * Filters the REST Server Class.
                 *
                 * This filter allows you to adjust the server class used by the API, using a
                 * different class to handle requests.
@@ -548,10 +548,12 @@ function rest_output_link_header() {
  *
  * @since 4.4.0
  *
- * @global mixed $wp_rest_auth_cookie
+ * @global mixed          $wp_rest_auth_cookie
+ * @global WP_REST_Server $wp_rest_server      REST server instance.
  *
- * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it,
- *                               or another value if not.
+ * @param WP_Error|mixed $result Error from another authentication handler,
+ *                               null if we should handle it, or another value
+ *                               if not.
  * @return WP_Error|mixed|bool WP_Error if the cookie is invalid, the $result, otherwise true.
  */
 function rest_cookie_check_errors( $result ) {
@@ -559,7 +561,7 @@ function rest_cookie_check_errors( $result ) {
                return $result;
        }
 
-       global $wp_rest_auth_cookie;
+       global $wp_rest_auth_cookie, $wp_rest_server;
 
        /*
         * Is cookie authentication being used? (If we get an auth
@@ -592,6 +594,9 @@ function rest_cookie_check_errors( $result ) {
                return new WP_Error( 'rest_cookie_invalid_nonce', __( 'Cookie nonce is invalid' ), array( 'status' => 403 ) );
        }
 
+       // Send a refreshed nonce in header.
+       $wp_rest_server->send_header( 'X-WP-Nonce', wp_create_nonce( 'wp_rest' ) );
+
        return true;
 }
 
index 6e0720e5ad9694ab4d0d059f6209a8e655657b9d..80c58bf5b184a3f232e81d614016b783e68839ea 100644 (file)
@@ -20,8 +20,7 @@
  * does not distinguish between arguments of the same name for different request methods.
  * For instance, in a request with `GET id=1` and `POST id=2`, `$request['id']` will equal
  * 2 (`POST`) not 1 (`GET`). For more precision between request methods, use
- * {@see WP_REST_Request::get_body_params()}, {@see WP_REST_Request::get_url_params()},
- * etc.
+ * WP_REST_Request::get_body_params(), WP_REST_Request::get_url_params(), etc.
  *
  * @since 4.4.0
  *
@@ -184,7 +183,7 @@ class WP_REST_Request implements ArrayAccess {
         *
         * @link http://stackoverflow.com/q/18185366
         * @link http://wiki.nginx.org/Pitfalls#Missing_.28disappearing.29_HTTP_headers
-        * @link http://nginx.org/en/docs/http/ngx_http_core_module.html#underscores_in_headers
+        * @link https://nginx.org/en/docs/http/ngx_http_core_module.html#underscores_in_headers
         *
         * @since 4.4.0
         * @access public
@@ -374,7 +373,7 @@ class WP_REST_Request implements ArrayAccess {
                $order[] = 'defaults';
 
                /**
-                * Filter the parameter order.
+                * Filters the parameter order.
                 *
                 * The order affects which parameters are checked when using get_param() and family.
                 * This acts similarly to PHP's `request_order` setting.
@@ -971,7 +970,7 @@ class WP_REST_Request implements ArrayAccess {
                }
 
                /**
-                * Filter the request generated from a URL.
+                * Filters the request generated from a URL.
                 *
                 * @since 4.5.0
                 *
index 4acc8b634d77bdd56a681cfd666bda2ff02e0a18..65ae87251f04fcc2ae9d975cb0cc59219f684b07 100644 (file)
@@ -51,8 +51,8 @@ class WP_REST_Response extends WP_HTTP_Response {
         * @since 4.4.0
         * @access public
         *
-        * @link http://tools.ietf.org/html/rfc5988
-        * @link http://www.iana.org/assignments/link-relations/link-relations.xml
+        * @link https://tools.ietf.org/html/rfc5988
+        * @link https://www.iana.org/assignments/link-relations/link-relations.xml
         *
         * @param string $rel        Link relation. Either an IANA registered type,
         *                           or an absolute URL.
@@ -147,8 +147,8 @@ class WP_REST_Response extends WP_HTTP_Response {
         * @since 4.4.0
         * @access public
         *
-        * @link http://tools.ietf.org/html/rfc5988
-        * @link http://www.iana.org/assignments/link-relations/link-relations.xml
+        * @link https://tools.ietf.org/html/rfc5988
+        * @link https://www.iana.org/assignments/link-relations/link-relations.xml
         *
         * @param string $rel   Link relation. Either an IANA registered type, or an absolute URL.
         * @param string $link  Target IRI for the link.
@@ -275,7 +275,7 @@ class WP_REST_Response extends WP_HTTP_Response {
                );
 
                /**
-                * Filter extra CURIEs available on API responses.
+                * Filters extra CURIEs available on API responses.
                 *
                 * CURIEs allow a shortened version of URI relations. This allows a more
                 * usable form for custom relations than using the full URI. These work
@@ -293,7 +293,7 @@ class WP_REST_Response extends WP_HTTP_Response {
                 *
                 * Well-behaved clients should expand and normalise these back to their
                 * full URI relation, however some naive clients may not resolve these
-                * correctly, so adding new CURIEs may break backwards compatibility.
+                * correctly, so adding new CURIEs may break backward compatibility.
                 *
                 * @since 4.5.0
                 *
index ebf58de2bbae7791f739d83ac5719fcba8993d0e..7a459066905dc271fd59c4850b7e6c43adc946ee 100644 (file)
@@ -226,11 +226,17 @@ class WP_REST_Server {
        public function serve_request( $path = null ) {
                $content_type = isset( $_GET['_jsonp'] ) ? 'application/javascript' : 'application/json';
                $this->send_header( 'Content-Type', $content_type . '; charset=' . get_option( 'blog_charset' ) );
+               $this->send_header( 'X-Robots-Tag', 'noindex' );
+
+               $api_root = get_rest_url();
+               if ( ! empty( $api_root ) ) {
+                       $this->send_header( 'Link', '<' . esc_url_raw( $api_root ) . '>; rel="https://api.w.org/"' );
+               }
 
                /*
                 * Mitigate possible JSONP Flash attacks.
                 *
-                * http://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/
+                * https://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/
                 */
                $this->send_header( 'X-Content-Type-Options', 'nosniff' );
                $this->send_header( 'Access-Control-Expose-Headers', 'X-WP-Total, X-WP-TotalPages' );
@@ -251,7 +257,7 @@ class WP_REST_Server {
                }
 
                /**
-                * Filter whether the REST API is enabled.
+                * Filters whether the REST API is enabled.
                 *
                 * @since 4.4.0
                 *
@@ -260,7 +266,7 @@ class WP_REST_Server {
                $enabled = apply_filters( 'rest_enabled', true );
 
                /**
-                * Filter whether jsonp is enabled.
+                * Filters whether jsonp is enabled.
                 *
                 * @since 4.4.0
                 *
@@ -280,14 +286,8 @@ class WP_REST_Server {
                                return false;
                        }
 
-                       // Check for invalid characters (only alphanumeric allowed).
-                       if ( is_string( $_GET['_jsonp'] ) ) {
-                               $jsonp_callback = preg_replace( '/[^\w\.]/', '', wp_unslash( $_GET['_jsonp'] ), -1, $illegal_char_count );
-                               if ( 0 !== $illegal_char_count ) {
-                                       $jsonp_callback = null;
-                               }
-                       }
-                       if ( null === $jsonp_callback ) {
+                       $jsonp_callback = $_GET['_jsonp'];
+                       if ( ! wp_check_jsonp_callback( $jsonp_callback ) ) {
                                echo $this->json_error( 'rest_callback_invalid', __( 'The JSONP callback function is invalid.' ), 400 );
                                return false;
                        }
@@ -335,7 +335,7 @@ class WP_REST_Server {
                }
 
                /**
-                * Filter the API response.
+                * Filters the API response.
                 *
                 * Allows modification of the response before returning.
                 *
@@ -361,7 +361,7 @@ class WP_REST_Server {
                $this->set_status( $code );
 
                /**
-                * Filter whether the request has already been served.
+                * Filters whether the request has already been served.
                 *
                 * Allow sending the request manually - by returning true, the API result
                 * will not be sent to the client.
@@ -395,7 +395,7 @@ class WP_REST_Server {
 
                        if ( $jsonp_callback ) {
                                // Prepend '/**/' to mitigate possible JSONP Flash attacks
-                               // http://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/
+                               // https://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/
                                echo '/**/' . $jsonp_callback . '(' . $result . ')';
                        } else {
                                echo $result;
@@ -619,7 +619,7 @@ class WP_REST_Server {
                );
 
                /**
-                * Filter the enveloped form of a response.
+                * Filters the enveloped form of a response.
                 *
                 * @since 4.4.0
                 *
@@ -699,7 +699,7 @@ class WP_REST_Server {
        public function get_routes() {
 
                /**
-                * Filter the array of available endpoints.
+                * Filters the array of available endpoints.
                 *
                 * @since 4.4.0
                 *
@@ -801,7 +801,7 @@ class WP_REST_Server {
         */
        public function dispatch( $request ) {
                /**
-                * Filter the pre-calculated result of a REST dispatch request.
+                * Filters the pre-calculated result of a REST dispatch request.
                 *
                 * Allow hijacking the request before dispatching by returning a non-empty. The returned value
                 * will be used to serve the request instead.
@@ -853,8 +853,6 @@ class WP_REST_Server {
                                        $request->set_url_params( $args );
                                        $request->set_attributes( $handler );
 
-                                       $request->sanitize_params();
-
                                        $defaults = array();
 
                                        foreach ( $handler['args'] as $arg => $options ) {
@@ -869,6 +867,8 @@ class WP_REST_Server {
                                        if ( is_wp_error( $check_required ) ) {
                                                $response = $check_required;
                                        }
+
+                                       $request->sanitize_params();
                                }
 
                                if ( ! is_wp_error( $response ) ) {
@@ -879,14 +879,14 @@ class WP_REST_Server {
                                                if ( is_wp_error( $permission ) ) {
                                                        $response = $permission;
                                                } else if ( false === $permission || null === $permission ) {
-                                                       $response = new WP_Error( 'rest_forbidden', __( "You don't have permission to do this." ), array( 'status' => 403 ) );
+                                                       $response = new WP_Error( 'rest_forbidden', __( 'Sorry, you are not allowed to do that.' ), array( 'status' => 403 ) );
                                                }
                                        }
                                }
 
                                if ( ! is_wp_error( $response ) ) {
                                        /**
-                                        * Filter the REST dispatch request result.
+                                        * Filters the REST dispatch request result.
                                         *
                                         * Allow plugins to override dispatching the request.
                                         *
@@ -982,7 +982,7 @@ class WP_REST_Server {
                $response->add_link( 'help', 'http://v2.wp-api.org/' );
 
                /**
-                * Filter the API root index data.
+                * Filters the API root index data.
                 *
                 * This contains the data describing the API. This includes information
                 * about supported authentication schemes, supported namespaces, routes
@@ -1025,7 +1025,7 @@ class WP_REST_Server {
                $response->add_link( 'up', rest_url( '/' ) );
 
                /**
-                * Filter the namespace index data.
+                * Filters the namespace index data.
                 *
                 * This typically is just the route data for the namespace, but you can
                 * add any data you'd like here.
@@ -1059,7 +1059,7 @@ class WP_REST_Server {
                        }
 
                        /**
-                        * Filter the REST endpoint data.
+                        * Filters the REST endpoint data.
                         *
                         * @since 4.4.0
                         *
@@ -1069,7 +1069,7 @@ class WP_REST_Server {
                }
 
                /**
-                * Filter the publicly-visible data for routes.
+                * Filters the publicly-visible data for routes.
                 *
                 * This data is exposed on indexes and can be used by clients or
                 * developers to investigate the site and find out how to use it. It
index 653399e32c66c2b5bc32ed00af13c4e7ca393aff..b588621944d02907df01146df1eefc584b1c4f87 100644 (file)
@@ -38,7 +38,7 @@ function _wp_post_revision_fields( $post = array(), $deprecated = false ) {
        }
 
        /**
-        * Filter the list of fields saved in post revisions.
+        * Filters the list of fields saved in post revisions.
         *
         * Included by default: 'post_title', 'post_content' and 'post_excerpt'.
         *
@@ -138,7 +138,7 @@ function wp_save_post_revision( $post_id ) {
                }
 
                /**
-                * Filter whether the post has changed since the last revision.
+                * Filters whether the post has changed since the last revision.
                 *
                 * By default a revision is saved only if one of the revisioned fields has changed.
                 * This filter can override that so a revision is saved even if nothing has changed.
@@ -162,7 +162,7 @@ function wp_save_post_revision( $post_id ) {
                        }
 
                        /**
-                        * Filter whether a post has changed.
+                        * Filters whether a post has changed.
                         *
                         * By default a revision is saved only if one of the revisioned fields has changed.
                         * This filter allows for additional checks to determine if there were changes.
@@ -322,7 +322,7 @@ function _wp_put_post_revision( $post = null, $autosave = false ) {
  *
  * @param int|WP_Post $post   The post ID or object.
  * @param string      $output Optional. OBJECT, ARRAY_A, or ARRAY_N.
- * @param string      $filter Optional sanitation filter. @see sanitize_post().
+ * @param string      $filter Optional sanitation filter. See sanitize_post().
  * @return WP_Post|array|null Null if error or post object if success.
  */
 function wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') {
@@ -378,14 +378,6 @@ function wp_restore_post_revision( $revision_id, $fields = null ) {
        if ( ! $post_id || is_wp_error( $post_id ) )
                return $post_id;
 
-       // Add restore from details
-       $restore_details = array(
-               'restored_revision_id' => $revision_id,
-               'restored_by_user'     => get_current_user_id(),
-               'restored_time'        => time()
-       );
-       update_post_meta( $post_id, '_post_restored_from', $restore_details );
-
        // Update last edit user
        update_post_meta( $post_id, '_edit_last', get_current_user_id() );
 
@@ -500,7 +492,7 @@ function wp_revisions_to_keep( $post ) {
                $num = 0;
 
        /**
-        * Filter the number of revisions to save for the given post.
+        * Filters the number of revisions to save for the given post.
         *
         * Overrides the value of WP_POST_REVISIONS.
         *
@@ -538,6 +530,7 @@ function _set_preview( $post ) {
        $post->post_excerpt = $preview->post_excerpt;
 
        add_filter( 'get_the_terms', '_wp_preview_terms_filter', 10, 3 );
+       add_filter( 'get_post_metadata', '_wp_preview_post_thumbnail_filter', 10, 3 );
 
        return $post;
 }
@@ -553,7 +546,7 @@ function _show_post_preview() {
                $id = (int) $_GET['preview_id'];
 
                if ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) )
-                       wp_die( __('You do not have permission to preview drafts.') );
+                       wp_die( __('Sorry, you are not allowed to preview drafts.') );
 
                add_filter('the_preview', '_set_preview');
        }
@@ -585,6 +578,34 @@ function _wp_preview_terms_filter( $terms, $post_id, $taxonomy ) {
        return $terms;
 }
 
+/**
+ * Filters post thumbnail lookup to set the post thumbnail.
+ *
+ * @since 4.6.0
+ * @access private
+ *
+ * @param null|array|string $value    The value to return - a single metadata value, or an array of values.
+ * @param int               $post_id  Post ID.
+ * @param string            $meta_key Meta key.
+ * @return null|array The default return value or the post thumbnail meta array.
+ */
+function _wp_preview_post_thumbnail_filter( $value, $post_id, $meta_key ) {
+       if ( ! $post = get_post() ) {
+               return $value;
+       }
+
+       if ( empty( $_REQUEST['_thumbnail_id'] ) || $post->ID != $post_id || '_thumbnail_id' != $meta_key || 'revision' == $post->post_type ) {
+               return $value;
+       }
+
+       $thumbnail_id = intval( $_REQUEST['_thumbnail_id'] );
+       if ( $thumbnail_id <= 0 ) {
+               return '';
+       }
+
+       return strval( $thumbnail_id );
+}
+
 /**
  * Gets the post revision version.
  *
index 0763dc500e25919aee9a4353d6890da210828987..705e5f2bc88bcb34e75f609ce1b0a28d1718434c 100644 (file)
@@ -144,7 +144,7 @@ function add_rewrite_rule( $regex, $query, $after = 'bottom' ) {
  * Add a new rewrite tag (like %postname%).
  *
  * The $query parameter is optional. If it is omitted you must ensure that
- * you call this on, or before, the 'init' hook. This is because $query defaults
+ * you call this on, or before, the {@see 'init'} hook. This is because $query defaults
  * to "$tag=", and for this to work a new query var has to be added.
  *
  * @since 2.1.0
@@ -202,7 +202,7 @@ function remove_rewrite_tag( $tag ) {
 function add_permastruct( $name, $struct, $args = array() ) {
        global $wp_rewrite;
 
-       // backwards compatibility for the old parameters: $with_front and $ep_mask
+       // Back-compat for the old parameters: $with_front and $ep_mask.
        if ( ! is_array( $args ) )
                $args = array( 'with_front' => $args );
        if ( func_num_args() == 4 )
@@ -311,7 +311,7 @@ function add_rewrite_endpoint( $name, $places, $query_var = true ) {
 }
 
 /**
- * Filter the URL base for taxonomies.
+ * Filters the URL base for taxonomies.
  *
  * To remove any manually prepended /index.php/.
  *
@@ -463,7 +463,7 @@ function url_to_postid( $url ) {
        global $wp_rewrite;
 
        /**
-        * Filter the URL to derive the post ID from.
+        * Filters the URL to derive the post ID from.
         *
         * @since 2.2.0
         *
index e6fc2b18ffe56b087f7fceae0d853e91af53e9b2..034a3e5db4f6e271de60c8ee0efa4dd0f8e98461 100644 (file)
@@ -5,5 +5,5 @@
  * @package WordPress
  */
 
-_deprecated_file( basename(__FILE__), '2.1', WPINC . '/rss.php' );
+_deprecated_file( basename(__FILE__), '2.1.0', WPINC . '/rss.php' );
 require_once( ABSPATH . WPINC . '/rss.php' );
index 548ccf23498742afea940138f8f2f8bd2072aba7..4c3fb15160b3b683eb5804f8a5d75b5ceba64629 100644 (file)
@@ -16,7 +16,7 @@
 /**
  * Deprecated. Use SimplePie (class-simplepie.php) instead.
  */
-_deprecated_file( basename( __FILE__ ), '3.0', WPINC . '/class-simplepie.php' );
+_deprecated_file( basename( __FILE__ ), '3.0.0', WPINC . '/class-simplepie.php' );
 
 /**
  * Fires before MagpieRSS is loaded, to optionally replace it.
@@ -63,12 +63,12 @@ class MagpieRSS {
                # if PHP xml isn't compiled in, die
                #
                if ( !function_exists('xml_parser_create') )
-                       trigger_error( "Failed to load PHP's XML Extension. http://www.php.net/manual/en/ref.xml.php" );
+                       trigger_error( "Failed to load PHP's XML Extension. https://secure.php.net/manual/en/ref.xml.php" );
 
                $parser = @xml_parser_create();
 
                if ( !is_resource($parser) )
-                       trigger_error( "Failed to create an instance of PHP's XML parser. http://www.php.net/manual/en/ref.xml.php");
+                       trigger_error( "Failed to create an instance of PHP's XML parser. https://secure.php.net/manual/en/ref.xml.php");
 
                $this->parser = $parser;
 
@@ -114,7 +114,7 @@ class MagpieRSS {
                // check for a namespace, and split if found
                $ns     = false;
                if ( strpos( $element, ':' ) ) {
-                       list($ns, $el) = split( ':', $element, 2);
+                       list($ns, $el) = explode( ':', $element, 2);
                }
                if ( $ns and $ns != 'rdf' ) {
                        $this->current_namespace = $ns;
index 2d33e43411c0984971477c62ab739423b0db0874..c9c490ff2241a2c68e5c691713db8d019a731492 100644 (file)
@@ -35,7 +35,7 @@ require( ABSPATH . WPINC . '/functions.wp-styles.php' );
  * Register all WordPress scripts.
  *
  * Localizes some of them.
- * args order: $scripts->add( 'handle', 'url', 'dependencies', 'query-string', 1 );
+ * args order: `$scripts->add( 'handle', 'url', 'dependencies', 'query-string', 1 );`
  * when last arg === 1 queues the script for the footer
  *
  * @since 2.6.0
@@ -124,7 +124,7 @@ function wp_default_scripts( &$scripts ) {
 
        $scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), false, 1 );
        did_action( 'init' ) && $scripts->localize( 'wp-ajax-response', 'wpAjax', array(
-               'noPerm' => __('You do not have permission to do that.'),
+               'noPerm' => __('Sorry, you are not allowed to do that.'),
                'broken' => __('An unidentified error has occurred.')
        ) );
 
@@ -138,7 +138,7 @@ function wp_default_scripts( &$scripts ) {
        $scripts->add( 'heartbeat', "/wp-includes/js/heartbeat$suffix.js", array('jquery'), false, 1 );
        did_action( 'init' ) && $scripts->localize( 'heartbeat', 'heartbeatSettings',
                /**
-                * Filter the Heartbeat settings.
+                * Filters the Heartbeat settings.
                 *
                 * @since 3.6.0
                 *
@@ -152,7 +152,7 @@ function wp_default_scripts( &$scripts ) {
                'beforeunload' => __('Your session has expired. You can log in again from this page or go to the login page.'),
 
                /**
-                * Filter the authentication check interval.
+                * Filters the authentication check interval.
                 *
                 * @since 3.6.0
                 *
@@ -229,6 +229,7 @@ function wp_default_scripts( &$scripts ) {
                'noResults' => __( 'No search results.' ),
                /* translators: Number of results found when using jQuery UI Autocomplete */
                'oneResult' => __( '1 result found. Use up and down arrow keys to navigate.' ),
+               /* translators: %d: Number of results found when using jQuery UI Autocomplete */
                'manyResults' => __( '%d results found. Use up and down arrow keys to navigate.' ),
        ) );
 
@@ -247,8 +248,9 @@ function wp_default_scripts( &$scripts ) {
 
        // Masonry v2 depended on jQuery. v3 does not. The older jquery-masonry handle is a shiv.
        // It sets jQuery as a dependency, as the theme may have been implicitly loading it this way.
-       $scripts->add( 'masonry', "/wp-includes/js/masonry.min.js", array(), '3.1.2', 1 );
-       $scripts->add( 'jquery-masonry', "/wp-includes/js/jquery/jquery.masonry$dev_suffix.js", array( 'jquery', 'masonry' ), '3.1.2', 1 );
+       $scripts->add( 'imagesloaded', "/wp-includes/js/imagesloaded.min.js", array(), '3.2.0', 1 );
+       $scripts->add( 'masonry', "/wp-includes/js/masonry.min.js", array( 'imagesloaded' ), '3.3.2', 1 );
+       $scripts->add( 'jquery-masonry', "/wp-includes/js/jquery/jquery.masonry$dev_suffix.js", array( 'jquery', 'masonry' ), '3.1.2a', 1 );
 
        $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20121105', 1 );
        did_action( 'init' ) && $scripts->localize( 'thickbox', 'thickboxL10n', array(
@@ -333,22 +335,31 @@ function wp_default_scripts( &$scripts ) {
 
        $scripts->add( 'imgareaselect', "/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js", array('jquery'), false, 1 );
 
-       $scripts->add( 'mediaelement', "/wp-includes/js/mediaelement/mediaelement-and-player.min.js", array('jquery'), '2.18.1-a', 1 );
+       $scripts->add( 'mediaelement', "/wp-includes/js/mediaelement/mediaelement-and-player.min.js", array('jquery'), '2.22.0', 1 );
        did_action( 'init' ) && $scripts->localize( 'mediaelement', 'mejsL10n', array(
                'language' => get_bloginfo( 'language' ),
                'strings'  => array(
-                       'Close'               => __( 'Close' ),
-                       'Fullscreen'          => __( 'Fullscreen' ),
-                       'Download File'       => __( 'Download File' ),
-                       'Download Video'      => __( 'Download Video' ),
-                       'Play/Pause'          => __( 'Play/Pause' ),
-                       'Mute Toggle'         => __( 'Mute Toggle' ),
-                       'None'                => __( 'None' ),
-                       'Turn off Fullscreen' => __( 'Turn off Fullscreen' ),
-                       'Go Fullscreen'       => __( 'Go Fullscreen' ),
-                       'Unmute'              => __( 'Unmute' ),
-                       'Mute'                => __( 'Mute' ),
-                       'Captions/Subtitles'  => __( 'Captions/Subtitles' )
+                       'Close'                   => __( 'Close' ),
+                       'Fullscreen'              => __( 'Fullscreen' ),
+                       'Turn off Fullscreen'     => __( 'Turn off Fullscreen' ),
+                       'Go Fullscreen'           => __( 'Go Fullscreen' ),
+                       'Download File'           => __( 'Download File' ),
+                       'Download Video'          => __( 'Download Video' ),
+                       'Play'                    => __( 'Play' ),
+                       'Pause'                   => __( 'Pause' ),
+                       'Captions/Subtitles'      => __( 'Captions/Subtitles' ),
+                       'None'                    => __( 'None', 'no captions/subtitles' ),
+                       'Time Slider'             => __( 'Time Slider' ),
+                       /* translators: %1: number of seconds (30 by default) */
+                       'Skip back %1 seconds'    => __( 'Skip back %1 seconds' ),
+                       'Video Player'            => __( 'Video Player' ),
+                       'Audio Player'            => __( 'Audio Player' ),
+                       'Volume Slider'           => __( 'Volume Slider' ),
+                       'Mute Toggle'             => __( 'Mute Toggle' ),
+                       'Unmute'                  => __( 'Unmute' ),
+                       'Mute'                    => __( 'Mute' ),
+                       'Use Up/Down Arrow keys to increase or decrease volume.' => __( 'Use Up/Down Arrow keys to increase or decrease volume.' ),
+                       'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.' => __( 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.' ),
                ),
        ) );
 
@@ -359,7 +370,7 @@ function wp_default_scripts( &$scripts ) {
        );
        did_action( 'init' ) && $scripts->localize( 'mediaelement', '_wpmejsSettings',
                /**
-                * Filter the MediaElement configuration settings.
+                * Filters the MediaElement configuration settings.
                 *
                 * @since 4.4.0
                 *
@@ -378,6 +389,7 @@ function wp_default_scripts( &$scripts ) {
 
        $scripts->add( 'password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array( 'jquery', 'zxcvbn-async' ), false, 1 );
        did_action( 'init' ) && $scripts->localize( 'password-strength-meter', 'pwsL10n', array(
+               'unknown'  => _x( 'Password strength unknown', 'password strength' ),
                'short'    => _x( 'Very weak', 'password strength' ),
                'bad'      => _x( 'Weak', 'password strength' ),
                'good'     => _x( 'Medium', 'password strength' ),
@@ -388,6 +400,7 @@ function wp_default_scripts( &$scripts ) {
        $scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter', 'wp-util' ), false, 1 );
        did_action( 'init' ) && $scripts->localize( 'user-profile', 'userProfileL10n', array(
                'warn'     => __( 'Your new password has not been saved.' ),
+               'warnWeak' => __( 'Confirm use of weak password.' ),
                'show'     => __( 'Show' ),
                'hide'     => __( 'Hide' ),
                'cancel'   => __( 'Cancel' ),
@@ -443,7 +456,7 @@ function wp_default_scripts( &$scripts ) {
                'cancel'             => __( 'Cancel' ),
                'close'              => __( 'Close' ),
                'cheatin'            => __( 'Cheatin&#8217; uh?' ),
-               'notAllowed'         => __( 'You are not allowed to customize the appearance of this site.' ),
+               'notAllowed'         => __( 'Sorry, you are not allowed to customize this site.' ),
                'previewIframeTitle' => __( 'Site Preview' ),
                'loginIframeTitle'   => __( 'Session expired' ),
                'collapseSidebar'    => __( 'Collapse Sidebar' ),
@@ -483,7 +496,7 @@ function wp_default_scripts( &$scripts ) {
        if ( is_admin() ) {
                $scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 );
                did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array(
-                       'noPerm' => __('You do not have permission to do that.'),
+                       'noPerm' => __('Sorry, you are not allowed to do that.'),
                        'broken' => __('An unidentified error has occurred.')
                ));
 
@@ -494,6 +507,7 @@ function wp_default_scripts( &$scripts ) {
                        'replyApprove' => __( 'Approve and Reply' ),
                        'reply' => __( 'Reply' ),
                        'warnQuickEdit' => __( "Are you sure you want to edit this comment?\nThe changes you made will be lost." ),
+                       'warnCommentChanges' => __( "Are you sure you want to do this?\nThe comment changes you made will be lost." ),
                        'docTitleComments' => __( 'Comments' ),
                        /* translators: %s: comments count */
                        'docTitleCommentsCount' => __( 'Comments (%s)' ),
@@ -593,25 +607,83 @@ function wp_default_scripts( &$scripts ) {
                did_action( 'init' ) && $scripts->localize( 'updates', '_wpUpdatesSettings', array(
                        'ajax_nonce' => wp_create_nonce( 'updates' ),
                        'l10n'       => array(
-                               'updating'          => __( 'Updating...' ), // no ellipsis
-                               'updated'           => __( 'Updated!' ),
-                               'updateFailedShort' => __( 'Update Failed!' ),
-                               /* translators: Error string for a failed update */
-                               'updateFailed'      => __( 'Update Failed: %s' ),
-                               /* translators: Plugin name and version */
-                               'updatingLabel'     => __( 'Updating %s...' ), // no ellipsis
-                               /* translators: Plugin name and version */
-                               'updatedLabel'      => __( '%s updated!' ),
-                               /* translators: Plugin name and version */
-                               'updateFailedLabel' => __( '%s update failed' ),
+                               /* translators: %s: Search string */
+                               'searchResults'              => __( 'Search results for &#8220;%s&#8221;' ),
+                               'searchResultsLabel'         => __( 'Search Results' ),
+                               'noPlugins'                  => __( 'You do not appear to have any plugins available at this time.' ),
+                               'noItemsSelected'            => __( 'Please select at least one item to perform this action on.' ),
+                               'updating'                   => __( 'Updating...' ), // No ellipsis.
+                               'updated'                    => __( 'Updated!' ),
+                               'update'                     => __( 'Update' ),
+                               'updateNow'                  => __( 'Update Now' ),
+                               /* translators: %s: Plugin name and version */
+                               'updateNowLabel'             => __( 'Update %s now' ),
+                               'updateFailedShort'          => __( 'Update Failed!' ),
+                               /* translators: %s: Error string for a failed update */
+                               'updateFailed'               => __( 'Update Failed: %s' ),
+                               /* translators: %s: Plugin name and version */
+                               'updatingLabel'              => __( 'Updating %s...' ), // No ellipsis.
+                               /* translators: %s: Plugin name and version */
+                               'updatedLabel'               => __( '%s updated!' ),
+                               /* translators: %s: Plugin name and version */
+                               'updateFailedLabel'          => __( '%s update failed' ),
                                /* translators: JavaScript accessible string */
-                               'updatingMsg'       => __( 'Updating... please wait.' ), // no ellipsis
+                               'updatingMsg'                => __( 'Updating... please wait.' ), // No ellipsis.
                                /* translators: JavaScript accessible string */
-                               'updatedMsg'        => __( 'Update completed successfully.' ),
+                               'updatedMsg'                 => __( 'Update completed successfully.' ),
                                /* translators: JavaScript accessible string */
-                               'updateCancel'      => __( 'Update canceled.' ),
-                               'beforeunload'      => __( 'Plugin updates may not complete if you navigate away from this page.' ),
-                       )
+                               'updateCancel'               => __( 'Update canceled.' ),
+                               'beforeunload'               => __( 'Updates may not complete if you navigate away from this page.' ),
+                               'installNow'                 => __( 'Install Now' ),
+                               /* translators: %s: Plugin name */
+                               'installNowLabel'            => __( 'Install %s now' ),
+                               'installing'                 => __( 'Installing...' ),
+                               'installed'                  => __( 'Installed!' ),
+                               'installFailedShort'         => __( 'Install Failed!' ),
+                               /* translators: %s: Error string for a failed installation */
+                               'installFailed'              => __( 'Installation failed: %s' ),
+                               /* translators: %s: Plugin name and version */
+                               'pluginInstallingLabel'      => _x( 'Installing %s...', 'plugin' ), // no ellipsis
+                               /* translators: %s: Theme name and version */
+                               'themeInstallingLabel'       => _x( 'Installing %s...', 'theme' ), // no ellipsis
+                               /* translators: %s: Plugin name and version */
+                               'pluginInstalledLabel'       => _x( '%s installed!', 'plugin' ),
+                               /* translators: %s: Theme name and version */
+                               'themeInstalledLabel'        => _x( '%s installed!', 'theme' ),
+                               /* translators: %s: Plugin name and version */
+                               'pluginInstallFailedLabel'   => _x( '%s installation failed', 'plugin' ),
+                               /* translators: %s: Theme name and version */
+                               'themeInstallFailedLabel'    => _x( '%s installation failed', 'theme' ),
+                               'installingMsg'              => __( 'Installing... please wait.' ),
+                               'installedMsg'               => __( 'Installation completed successfully.' ),
+                               /* translators: %s: Activation URL */
+                               'importerInstalledMsg'       => __( 'Importer installed successfully. <a href="%s">Run importer</a>' ),
+                               /* translators: %s: Theme name */
+                               'aysDelete'                  => __( 'Are you sure you want to delete %s?' ),
+                               /* translators: %s: Plugin name */
+                               'aysDeleteUninstall'         => __( 'Are you sure you want to delete %s and its data?' ),
+                               'aysBulkDelete'              => __( 'Are you sure you want to delete the selected plugins and their data?' ),
+                               'aysBulkDeleteThemes'        => __( 'Caution: These themes may be active on other sites in the network. Are you sure you want to proceed?' ),
+                               'deleting'                   => __( 'Deleting...' ),
+                               /* translators: %s: Error string for a failed deletion */
+                               'deleteFailed'               => __( 'Deletion failed: %s' ),
+                               'deleted'                    => __( 'Deleted!' ),
+                               'livePreview'                => __( 'Live Preview' ),
+                               'activatePlugin'             => is_network_admin() ? __( 'Network Activate' ) : __( 'Activate' ),
+                               'activateTheme'              => is_network_admin() ? __( 'Network Enable' ) : __( 'Activate' ),
+                               /* translators: %s: Plugin name */
+                               'activatePluginLabel'        => is_network_admin() ? _x( 'Network Activate %s', 'plugin' ) : _x( 'Activate %s', 'plugin' ),
+                               /* translators: %s: Theme name */
+                               'activateThemeLabel'         => is_network_admin() ? _x( 'Network Activate %s', 'theme' ) : _x( 'Activate %s', 'theme' ),
+                               'activateImporter'           => __( 'Run Importer' ),
+                               /* translators: %s: Importer name */
+                               'activateImporterLabel'      => __( 'Run %s' ),
+                               'unknownError'               => __( 'An unknown error occurred' ),
+                               'connectionError'            => __( 'Connection lost or the server is busy. Please try again later.' ),
+                               'nonceError'                 => __( 'An error has occurred. Please reload the page and try again.' ),
+                               'pluginsFound'               => __( 'Number of plugins found: %d' ),
+                               'noPluginsFound'             => __( 'No plugins found. Try a different search.' ),
+                       ),
                ) );
 
                $scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' );
@@ -695,6 +767,7 @@ function wp_default_styles( &$styles ) {
        $styles->text_direction = function_exists( 'is_rtl' ) && is_rtl() ? 'rtl' : 'ltr';
        $styles->default_dirs = array('/wp-admin/', '/wp-includes/css/');
 
+       // Open Sans is no longer used by core, but may be relied upon by themes and plugins.
        $open_sans_font_url = '';
 
        /* translators: If there are characters in your language that are not supported
@@ -741,15 +814,15 @@ function wp_default_styles( &$styles ) {
        $styles->add( 'site-icon',           "/wp-admin/css/site-icon$suffix.css" );
        $styles->add( 'l10n',                "/wp-admin/css/l10n$suffix.css" );
 
-       $styles->add( 'wp-admin', false, array( 'open-sans', 'dashicons', 'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus', 'widgets', 'site-icon', 'l10n' ) );
+       $styles->add( 'wp-admin', false, array( 'dashicons', 'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus', 'widgets', 'site-icon', 'l10n' ) );
 
-       $styles->add( 'login',               "/wp-admin/css/login$suffix.css", array( 'open-sans', 'dashicons', 'buttons', 'forms', 'l10n' ) );
-       $styles->add( 'install',             "/wp-admin/css/install$suffix.css", array( 'open-sans', 'buttons' ) );
+       $styles->add( 'login',               "/wp-admin/css/login$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n' ) );
+       $styles->add( 'install',             "/wp-admin/css/install$suffix.css", array( 'buttons' ) );
        $styles->add( 'wp-color-picker',     "/wp-admin/css/color-picker$suffix.css" );
        $styles->add( 'customize-controls',  "/wp-admin/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'ie', 'imgareaselect' ) );
        $styles->add( 'customize-widgets',   "/wp-admin/css/customize-widgets$suffix.css", array( 'wp-admin', 'colors' ) );
        $styles->add( 'customize-nav-menus', "/wp-admin/css/customize-nav-menus$suffix.css", array( 'wp-admin', 'colors' ) );
-       $styles->add( 'press-this',          "/wp-admin/css/press-this$suffix.css", array( 'open-sans', 'buttons' ) );
+       $styles->add( 'press-this',          "/wp-admin/css/press-this$suffix.css", array( 'buttons' ) );
 
        $styles->add( 'ie', "/wp-admin/css/ie$suffix.css" );
        $styles->add_data( 'ie', 'conditional', 'lte IE 7' );
@@ -757,10 +830,9 @@ function wp_default_styles( &$styles ) {
        // Common dependencies
        $styles->add( 'buttons',   "/wp-includes/css/buttons$suffix.css" );
        $styles->add( 'dashicons', "/wp-includes/css/dashicons$suffix.css" );
-       $styles->add( 'open-sans', $open_sans_font_url );
 
        // Includes CSS
-       $styles->add( 'admin-bar',            "/wp-includes/css/admin-bar$suffix.css", array( 'open-sans', 'dashicons' ) );
+       $styles->add( 'admin-bar',            "/wp-includes/css/admin-bar$suffix.css", array( 'dashicons' ) );
        $styles->add( 'wp-auth-check',        "/wp-includes/css/wp-auth-check$suffix.css", array( 'dashicons' ) );
        $styles->add( 'editor-buttons',       "/wp-includes/css/editor$suffix.css", array( 'dashicons' ) );
        $styles->add( 'media-views',          "/wp-includes/css/media-views$suffix.css", array( 'buttons', 'dashicons', 'wp-mediaelement' ) );
@@ -772,7 +844,7 @@ function wp_default_styles( &$styles ) {
        // External libraries and friends
        $styles->add( 'imgareaselect',       '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.8' );
        $styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array( 'dashicons' ) );
-       $styles->add( 'mediaelement',        "/wp-includes/js/mediaelement/mediaelementplayer.min.css", array(), '2.18.1' );
+       $styles->add( 'mediaelement',        "/wp-includes/js/mediaelement/mediaelementplayer.min.css", array(), '2.22.0' );
        $styles->add( 'wp-mediaelement',     "/wp-includes/js/mediaelement/wp-mediaelement$suffix.css", array( 'mediaelement' ) );
        $styles->add( 'thickbox',            '/wp-includes/js/thickbox/thickbox.css', array( 'dashicons' ) );
 
@@ -781,6 +853,7 @@ function wp_default_styles( &$styles ) {
        $styles->add( 'farbtastic',       "/wp-admin/css/farbtastic$suffix.css", array(), '1.3u1' );
        $styles->add( 'jcrop',            "/wp-includes/js/jcrop/jquery.Jcrop.min.css", array(), '0.9.12' );
        $styles->add( 'colors-fresh', false, array( 'wp-admin', 'buttons' ) ); // Old handle.
+       $styles->add( 'open-sans', $open_sans_font_url ); // No longer used in core as of 4.6
 
        // RTL CSS
        $rtl_styles = array(
@@ -841,7 +914,55 @@ function wp_just_in_time_script_localization() {
                'autosaveInterval' => AUTOSAVE_INTERVAL,
                'blog_id' => get_current_blog_id(),
        ) );
+}
+
+/**
+ * Localizes the jQuery UI datepicker.
+ *
+ * @since 4.6.0
+ *
+ * @link http://api.jqueryui.com/datepicker/#options
+ *
+ * @global WP_Locale $wp_locale The WordPress date and time locale object.
+ */
+function wp_localize_jquery_ui_datepicker() {
+       global $wp_locale;
+
+       if ( ! wp_script_is( 'jquery-ui-datepicker', 'enqueued' ) ) {
+               return;
+       }
+
+       // Convert the PHP date format into jQuery UI's format.
+       $datepicker_date_format = str_replace(
+               array(
+                       'd', 'j', 'l', 'z', // Day.
+                       'F', 'M', 'n', 'm', // Month.
+                       'Y', 'y'            // Year.
+               ),
+               array(
+                       'dd', 'd', 'DD', 'o',
+                       'MM', 'M', 'm', 'mm',
+                       'yy', 'y'
+               ),
+               get_option( 'date_format' )
+       );
+
+       $datepicker_defaults = wp_json_encode( array(
+               'closeText'       => __( 'Close' ),
+               'currentText'     => __( 'Today' ),
+               'monthNames'      => array_values( $wp_locale->month ),
+               'monthNamesShort' => array_values( $wp_locale->month_abbrev ),
+               'nextText'        => __( 'Next' ),
+               'prevText'        => __( 'Previous' ),
+               'dayNames'        => array_values( $wp_locale->weekday ),
+               'dayNamesShort'   => array_values( $wp_locale->weekday_abbrev ),
+               'dayNamesMin'     => array_values( $wp_locale->weekday_initial ),
+               'dateFormat'      => $datepicker_date_format,
+               'firstDay'        => absint( get_option( 'start_of_week' ) ),
+               'isRTL'           => $wp_locale->is_rtl(),
+       ) );
 
+       wp_add_inline_script( 'jquery-ui-datepicker', "jQuery(document).ready(function(jQuery){jQuery.datepicker.setDefaults({$datepicker_defaults});});" );
 }
 
 /**
@@ -924,7 +1045,7 @@ function print_head_scripts() {
        $wp_scripts->do_head_items();
 
        /**
-        * Filter whether to print the head scripts.
+        * Filters whether to print the head scripts.
         *
         * @since 2.8.0
         *
@@ -959,7 +1080,7 @@ function print_footer_scripts() {
        $wp_scripts->do_footer_items();
 
        /**
-        * Filter whether to print the footer scripts.
+        * Filters whether to print the footer scripts.
         *
         * @since 2.8.0
         *
@@ -1095,7 +1216,7 @@ function print_admin_styles() {
        $wp_styles->do_items(false);
 
        /**
-        * Filter whether to print the admin styles.
+        * Filters whether to print the admin styles.
         *
         * @since 2.8.0
         *
@@ -1131,7 +1252,7 @@ function print_late_styles() {
        $wp_styles->do_footer_items();
 
        /**
-        * Filter whether to print the styles queued too late for the HTML head.
+        * Filters whether to print the styles queued too late for the HTML head.
         *
         * @since 3.3.0
         *
index 409fe30a406c7399985617da4d2acc1da7e680bc..63ab8fe589696fc75c5255f390778a691a93b5e4 100644 (file)
@@ -40,7 +40,7 @@ abstract class WP_Session_Tokens {
         */
        final public static function get_instance( $user_id ) {
                /**
-                * Filter the session token manager used.
+                * Filters the session token manager used.
                 *
                 * @since 4.0.0
                 *
@@ -108,7 +108,7 @@ abstract class WP_Session_Tokens {
         *
         * This function generates a token and stores it with the associated
         * expiration time (and potentially other session information via the
-        * `attach_session_information` filter).
+        * {@see 'attach_session_information'} filter).
         *
         * @since 4.0.0
         * @access public
@@ -118,7 +118,7 @@ abstract class WP_Session_Tokens {
         */
        final public function create( $expiration ) {
                /**
-                * Filter the information attached to the newly created session.
+                * Filters the information attached to the newly created session.
                 *
                 * Could be used in the future to attach information such as
                 * IP address or user agent to a session.
index 132d63a5dca10da426dfc91b76fdafe659ad2edf..e27670844923d1dce7df034d943af75f92228598 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
- * WordPress API for creating bbcode like tags or what WordPress calls
- * "shortcodes." The tag and attribute parsing or regular expression code is
+ * WordPress API for creating bbcode-like tags or what WordPress calls
+ * "shortcodes". The tag and attribute parsing or regular expression code is
  * based on the Textpattern tag parser.
  *
  * A few examples are below:
@@ -537,7 +537,7 @@ function shortcode_atts( $pairs, $atts, $shortcode = '' ) {
                        $out[$name] = $default;
        }
        /**
-        * Filter a shortcode's default attributes.
+        * Filters a shortcode's default attributes.
         *
         * If the third parameter of the shortcode_atts() function is present then this filter is available.
         * The third parameter, $shortcode, is the name of the shortcode.
index 9323bd9a07ebd089f6d101a13efda659e885926b..104a4afdb557ad57bdad931cc251caa089546254 100644 (file)
@@ -14,7 +14,7 @@
  * Creates the initial taxonomies.
  *
  * This function fires twice: in wp-settings.php before plugins are loaded (for
- * backwards compatibility reasons), and again on the {@see 'init'} action. We must
+ * backward compatibility reasons), and again on the {@see 'init'} action. We must
  * avoid registering rewrite rules before the {@see 'init'} action.
  *
  * @since 2.8.0
@@ -29,7 +29,7 @@ function create_initial_taxonomies() {
        } else {
 
                /**
-                * Filter the post formats rewrite base.
+                * Filters the post formats rewrite base.
                 *
                 * @since 3.1.0
                 *
@@ -357,7 +357,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
        $args = wp_parse_args( $args );
 
        /**
-        * Filter the arguments for registering a taxonomy.
+        * Filters the arguments for registering a taxonomy.
         *
         * @since 4.4.0
         *
@@ -389,7 +389,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
        $args = array_merge( $defaults, $args );
 
        if ( empty( $taxonomy ) || strlen( $taxonomy ) > 32 ) {
-               _doing_it_wrong( __FUNCTION__, __( 'Taxonomy names must be between 1 and 32 characters in length.' ), '4.2' );
+               _doing_it_wrong( __FUNCTION__, __( 'Taxonomy names must be between 1 and 32 characters in length.' ), '4.2.0' );
                return new WP_Error( 'taxonomy_length_invalid', __( 'Taxonomy names must be between 1 and 32 characters in length.' ) );
        }
 
@@ -475,7 +475,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
 
        $wp_taxonomies[ $taxonomy ] = (object) $args;
 
-       // register callback handling for metabox
+       // Register callback handling for meta box.
        add_filter( 'wp_ajax_add-' . $taxonomy, '_wp_ajax_add_hierarchical_term' );
 
        /**
@@ -505,7 +505,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
  */
 function unregister_taxonomy( $taxonomy ) {
        if ( ! taxonomy_exists( $taxonomy ) ) {
-               return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) );
+               return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
        }
 
        $taxonomy_args = get_taxonomy( $taxonomy );
@@ -528,7 +528,7 @@ function unregister_taxonomy( $taxonomy ) {
                remove_permastruct( $taxonomy );
        }
 
-       // Unregister callback handling for metabox.
+       // Unregister callback handling for meta box.
        remove_filter( 'wp_ajax_add-' . $taxonomy, '_wp_ajax_add_hierarchical_term' );
 
        // Remove the taxonomy.
@@ -621,7 +621,7 @@ function get_taxonomy_labels( $tax ) {
        $default_labels = clone $labels;
 
        /**
-        * Filter the labels of a specific taxonomy.
+        * Filters the labels of a specific taxonomy.
         *
         * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
         *
@@ -736,7 +736,7 @@ function get_objects_in_term( $term_ids, $taxonomies, $args = array() ) {
        }
        foreach ( (array) $taxonomies as $taxonomy ) {
                if ( ! taxonomy_exists( $taxonomy ) ) {
-                       return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) );
+                       return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
                }
        }
 
@@ -826,7 +826,7 @@ function get_term( $term, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
        }
 
        if ( $taxonomy && ! taxonomy_exists( $taxonomy ) ) {
-               return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) );
+               return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
        }
 
        if ( $term instanceof WP_Term ) {
@@ -849,7 +849,7 @@ function get_term( $term, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
        }
 
        /**
-        * Filter a term.
+        * Filters a term.
         *
         * @since 2.3.0
         * @since 4.4.0 `$_term` can now also be a WP_Term object.
@@ -860,7 +860,7 @@ function get_term( $term, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
        $_term = apply_filters( 'get_term', $_term, $taxonomy );
 
        /**
-        * Filter a taxonomy.
+        * Filters a taxonomy.
         *
         * The dynamic portion of the filter name, `$taxonomy`, refers
         * to the taxonomy slug.
@@ -902,6 +902,13 @@ function get_term( $term, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
  * If $value does not exist, the return value will be false. If $taxonomy exists
  * and $field and $value combinations exist, the Term will be returned.
  *
+ * This function will always return the first term that matches the `$field`-
+ * `$value`-`$taxonomy` combination specified in the parameters. If your query
+ * is likely to match more than one term (as is likely to be the case when
+ * `$field` is 'name', for example), consider using get_terms() instead; that
+ * way, you will get all matching terms, and can provide your own logic for
+ * deciding which one was intended.
+ *
  * @todo Better formatting for DocBlock.
  *
  * @since 2.3.0
@@ -981,8 +988,9 @@ function get_term_by( $field, $value, $taxonomy = '', $output = OBJECT, $filter
  * @return array|WP_Error List of Term IDs. WP_Error returned if `$taxonomy` does not exist.
  */
 function get_term_children( $term_id, $taxonomy ) {
-       if ( ! taxonomy_exists($taxonomy) )
-               return new WP_Error('invalid_taxonomy', __('Invalid taxonomy'));
+       if ( ! taxonomy_exists( $taxonomy ) ) {
+               return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
+       }
 
        $term_id = intval( $term_id );
 
@@ -1174,32 +1182,7 @@ function get_term_to_edit( $id, $taxonomy ) {
 function get_terms( $args = array(), $deprecated = '' ) {
        global $wpdb;
 
-       $defaults = array(
-               'taxonomy'               => null,
-               'orderby'                => 'name',
-               'order'                  => 'ASC',
-               'hide_empty'             => true,
-               'include'                => array(),
-               'exclude'                => array(),
-               'exclude_tree'           => array(),
-               'number'                 => '',
-               'offset'                 => '',
-               'fields'                 => 'all',
-               'name'                   => '',
-               'slug'                   => '',
-               'hierarchical'           => true,
-               'search'                 => '',
-               'name__like'             => '',
-               'description__like'      => '',
-               'pad_counts'             => false,
-               'get'                    => '',
-               'child_of'               => 0,
-               'parent'                 => '',
-               'childless'              => false,
-               'cache_domain'           => 'core',
-               'update_term_meta_cache' => true,
-               'meta_query'             => ''
-       );
+       $term_query = new WP_Term_Query();
 
        /*
         * Legacy argument format ($taxonomy, $args) takes precedence.
@@ -1208,537 +1191,48 @@ function get_terms( $args = array(), $deprecated = '' ) {
         * (a) a second non-empty parameter is passed, or
         * (b) the first parameter shares no keys with the default array (ie, it's a list of taxonomies)
         */
-       $key_intersect  = array_intersect_key( $defaults, (array) $args );
+       $_args = wp_parse_args( $args );
+       $key_intersect  = array_intersect_key( $term_query->query_var_defaults, (array) $_args );
        $do_legacy_args = $deprecated || empty( $key_intersect );
 
-       $taxonomies = null;
        if ( $do_legacy_args ) {
                $taxonomies = (array) $args;
-               $args = $deprecated;
-       } elseif ( isset( $args['taxonomy'] ) && null !== $args['taxonomy'] ) {
-               $taxonomies = (array) $args['taxonomy'];
-               unset( $args['taxonomy'] );
-       }
-
-       $empty_array = array();
-
-       if ( $taxonomies ) {
-               foreach ( $taxonomies as $taxonomy ) {
-                       if ( ! taxonomy_exists($taxonomy) ) {
-                               return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) );
-                       }
-               }
-       }
-
-       /**
-        * Filter the terms query default arguments.
-        *
-        * Use 'get_terms_args' to filter the passed arguments.
-        *
-        * @since 4.4.0
-        *
-        * @param array $defaults   An array of default get_terms() arguments.
-        * @param array $taxonomies An array of taxonomies.
-        */
-       $args = wp_parse_args( $args, apply_filters( 'get_terms_defaults', $defaults, $taxonomies ) );
-
-       $args['number'] = absint( $args['number'] );
-       $args['offset'] = absint( $args['offset'] );
-
-       // Save queries by not crawling the tree in the case of multiple taxes or a flat tax.
-       $has_hierarchical_tax = false;
-       if ( $taxonomies ) {
-               foreach ( $taxonomies as $_tax ) {
-                       if ( is_taxonomy_hierarchical( $_tax ) ) {
-                               $has_hierarchical_tax = true;
-                       }
-               }
-       }
-
-       if ( ! $has_hierarchical_tax ) {
-               $args['hierarchical'] = false;
-               $args['pad_counts'] = false;
-       }
-
-       // 'parent' overrides 'child_of'.
-       if ( 0 < intval( $args['parent'] ) ) {
-               $args['child_of'] = false;
-       }
-
-       if ( 'all' == $args['get'] ) {
-               $args['childless'] = false;
-               $args['child_of'] = 0;
-               $args['hide_empty'] = 0;
-               $args['hierarchical'] = false;
-               $args['pad_counts'] = false;
-       }
-
-       /**
-        * Filter the terms query arguments.
-        *
-        * @since 3.1.0
-        *
-        * @param array $args       An array of get_terms() arguments.
-        * @param array $taxonomies An array of taxonomies.
-        */
-       $args = apply_filters( 'get_terms_args', $args, $taxonomies );
-
-       // Avoid the query if the queried parent/child_of term has no descendants.
-       $child_of = $args['child_of'];
-       $parent   = $args['parent'];
-
-       if ( $child_of ) {
-               $_parent = $child_of;
-       } elseif ( $parent ) {
-               $_parent = $parent;
+               $args = wp_parse_args( $deprecated );
+               $args['taxonomy'] = $taxonomies;
        } else {
-               $_parent = false;
-       }
-
-       if ( $_parent ) {
-               $in_hierarchy = false;
-               foreach ( $taxonomies as $_tax ) {
-                       $hierarchy = _get_term_hierarchy( $_tax );
-
-                       if ( isset( $hierarchy[ $_parent ] ) ) {
-                               $in_hierarchy = true;
-                       }
-               }
-
-               if ( ! $in_hierarchy ) {
-                       return $empty_array;
+               $args = wp_parse_args( $args );
+               if ( isset( $args['taxonomy'] ) && null !== $args['taxonomy'] ) {
+                       $args['taxonomy'] = (array) $args['taxonomy'];
                }
        }
 
-       $_orderby = strtolower( $args['orderby'] );
-       if ( 'count' == $_orderby ) {
-               $orderby = 'tt.count';
-       } elseif ( 'name' == $_orderby ) {
-               $orderby = 't.name';
-       } elseif ( 'slug' == $_orderby ) {
-               $orderby = 't.slug';
-       } elseif ( 'include' == $_orderby && ! empty( $args['include'] ) ) {
-               $include = implode( ',', array_map( 'absint', $args['include'] ) );
-               $orderby = "FIELD( t.term_id, $include )";
-       } elseif ( 'term_group' == $_orderby ) {
-               $orderby = 't.term_group';
-       } elseif ( 'description' == $_orderby ) {
-               $orderby = 'tt.description';
-       } elseif ( 'none' == $_orderby ) {
-               $orderby = '';
-       } elseif ( empty( $_orderby ) || 'id' == $_orderby || 'term_id' === $_orderby ) {
-               $orderby = 't.term_id';
-       } else {
-               $orderby = 't.name';
-       }
-
-       /**
-        * Filter the ORDERBY clause of the terms query.
-        *
-        * @since 2.8.0
-        *
-        * @param string $orderby    `ORDERBY` clause of the terms query.
-        * @param array  $args       An array of terms query arguments.
-        * @param array  $taxonomies An array of taxonomies.
-        */
-       $orderby = apply_filters( 'get_terms_orderby', $orderby, $args, $taxonomies );
-
-       $order = strtoupper( $args['order'] );
-       if ( ! empty( $orderby ) ) {
-               $orderby = "ORDER BY $orderby";
-       } else {
-               $order = '';
-       }
-
-       if ( '' !== $order && ! in_array( $order, array( 'ASC', 'DESC' ) ) ) {
-               $order = 'ASC';
-       }
-
-       $where_conditions = array();
-
-       if ( $taxonomies ) {
-               $where_conditions[] = "tt.taxonomy IN ('" . implode("', '", array_map( 'esc_sql', $taxonomies ) ) . "')";
-       }
-
-       $exclude = $args['exclude'];
-       $exclude_tree = $args['exclude_tree'];
-       $include = $args['include'];
-
-       $inclusions = '';
-       if ( ! empty( $include ) ) {
-               $exclude = '';
-               $exclude_tree = '';
-               $inclusions = implode( ',', wp_parse_id_list( $include ) );
-       }
-
-       if ( ! empty( $inclusions ) ) {
-               $where_conditions[] = 't.term_id IN ( ' . $inclusions . ' )';
-       }
-
-       $exclusions = array();
-       if ( ! empty( $exclude_tree ) ) {
-               $exclude_tree = wp_parse_id_list( $exclude_tree );
-               $excluded_children = $exclude_tree;
-               foreach ( $exclude_tree as $extrunk ) {
-                       $excluded_children = array_merge(
-                               $excluded_children,
-                               (array) get_terms( $taxonomies[0], array( 'child_of' => intval( $extrunk ), 'fields' => 'ids', 'hide_empty' => 0 ) )
-                       );
+       if ( ! empty( $args['taxonomy'] ) ) {
+               foreach ( $args['taxonomy'] as $taxonomy ) {
+                       if ( ! taxonomy_exists( $taxonomy ) ) {
+                               return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
+                       }
                }
-               $exclusions = array_merge( $excluded_children, $exclusions );
        }
 
-       if ( ! empty( $exclude ) ) {
-               $exclusions = array_merge( wp_parse_id_list( $exclude ), $exclusions );
-       }
-
-       // 'childless' terms are those without an entry in the flattened term hierarchy.
-       $childless = (bool) $args['childless'];
-       if ( $childless ) {
-               foreach ( $taxonomies as $_tax ) {
-                       $term_hierarchy = _get_term_hierarchy( $_tax );
-                       $exclusions = array_merge( array_keys( $term_hierarchy ), $exclusions );
-               }
-       }
+       $terms = $term_query->query( $args );
 
-       if ( ! empty( $exclusions ) ) {
-               $exclusions = 't.term_id NOT IN (' . implode( ',', array_map( 'intval', $exclusions ) ) . ')';
-       } else {
-               $exclusions = '';
+       // Count queries are not filtered, for legacy reasons.
+       if ( ! is_array( $terms ) ) {
+               return $terms;
        }
 
        /**
-        * Filter the terms to exclude from the terms query.
+        * Filters the found terms.
         *
         * @since 2.3.0
+        * @since 4.6.0 Added the `$term_query` parameter.
         *
-        * @param string $exclusions `NOT IN` clause of the terms query.
-        * @param array  $args       An array of terms query arguments.
-        * @param array  $taxonomies An array of taxonomies.
-        */
-       $exclusions = apply_filters( 'list_terms_exclusions', $exclusions, $args, $taxonomies );
-
-       if ( ! empty( $exclusions ) ) {
-               // Must do string manipulation here for backward compatibility with filter.
-               $where_conditions[] = preg_replace( '/^\s*AND\s*/', '', $exclusions );
-       }
-
-       if ( ! empty( $args['name'] ) ) {
-               $names = (array) $args['name'];
-               foreach ( $names as &$_name ) {
-                       // `sanitize_term_field()` returns slashed data.
-                       $_name = stripslashes( sanitize_term_field( 'name', $_name, 0, reset( $taxonomies ), 'db' ) );
-               }
-
-               $where_conditions[] = "t.name IN ('" . implode( "', '", array_map( 'esc_sql', $names ) ) . "')";
-       }
-
-       if ( ! empty( $args['slug'] ) ) {
-               if ( is_array( $args['slug'] ) ) {
-                       $slug = array_map( 'sanitize_title', $args['slug'] );
-                       $where_conditions[] = "t.slug IN ('" . implode( "', '", $slug ) . "')";
-               } else {
-                       $slug = sanitize_title( $args['slug'] );
-                       $where_conditions[] = "t.slug = '$slug'";
-               }
-       }
-
-       if ( ! empty( $args['name__like'] ) ) {
-               $where_conditions[] = $wpdb->prepare( "t.name LIKE %s", '%' . $wpdb->esc_like( $args['name__like'] ) . '%' );
-       }
-
-       if ( ! empty( $args['description__like'] ) ) {
-               $where_conditions[] = $wpdb->prepare( "tt.description LIKE %s", '%' . $wpdb->esc_like( $args['description__like'] ) . '%' );
-       }
-
-       if ( '' !== $parent ) {
-               $parent = (int) $parent;
-               $where_conditions[] = "tt.parent = '$parent'";
-       }
-
-       $hierarchical = $args['hierarchical'];
-       if ( 'count' == $args['fields'] ) {
-               $hierarchical = false;
-       }
-       if ( $args['hide_empty'] && !$hierarchical ) {
-               $where_conditions[] = 'tt.count > 0';
-       }
-
-       $number = $args['number'];
-       $offset = $args['offset'];
-
-       // Don't limit the query results when we have to descend the family tree.
-       if ( $number && ! $hierarchical && ! $child_of && '' === $parent ) {
-               if ( $offset ) {
-                       $limits = 'LIMIT ' . $offset . ',' . $number;
-               } else {
-                       $limits = 'LIMIT ' . $number;
-               }
-       } else {
-               $limits = '';
-       }
-
-       if ( ! empty( $args['search'] ) ) {
-               $like = '%' . $wpdb->esc_like( $args['search'] ) . '%';
-               $where_conditions[] = $wpdb->prepare( '((t.name LIKE %s) OR (t.slug LIKE %s))', $like, $like );
-       }
-
-       // Meta query support.
-       $join = '';
-       $distinct = '';
-
-       $mquery = new WP_Meta_Query();
-       $mquery->parse_query_vars( $args );
-       $mq_sql = $mquery->get_sql( 'term', 't', 'term_id' );
-       $meta_clauses = $mquery->get_clauses();
-
-       if ( ! empty( $meta_clauses ) ) {
-               $join .= $mq_sql['join'];
-               $where_conditions[] = preg_replace( '/^\s*AND\s*/', '', $mq_sql['where'] );
-               $distinct .= "DISTINCT";
-
-               // 'orderby' support.
-               $allowed_keys = array();
-               $primary_meta_key   = null;
-               $primary_meta_query = reset( $meta_clauses );
-               if ( ! empty( $primary_meta_query['key'] ) ) {
-                       $primary_meta_key = $primary_meta_query['key'];
-                       $allowed_keys[] = $primary_meta_key;
-               }
-               $allowed_keys[] = 'meta_value';
-               $allowed_keys[] = 'meta_value_num';
-               $allowed_keys   = array_merge( $allowed_keys, array_keys( $meta_clauses ) );
-
-               if ( ! empty( $args['orderby'] ) && in_array( $args['orderby'], $allowed_keys ) ) {
-                       switch( $args['orderby'] ) {
-                               case $primary_meta_key:
-                               case 'meta_value':
-                                       if ( ! empty( $primary_meta_query['type'] ) ) {
-                                               $orderby = "ORDER BY CAST({$primary_meta_query['alias']}.meta_value AS {$primary_meta_query['cast']})";
-                                       } else {
-                                               $orderby = "ORDER BY {$primary_meta_query['alias']}.meta_value";
-                                       }
-                                       break;
-
-                               case 'meta_value_num':
-                                       $orderby = "ORDER BY {$primary_meta_query['alias']}.meta_value+0";
-                                       break;
-
-                               default:
-                                       if ( array_key_exists( $args['orderby'], $meta_clauses ) ) {
-                                               // $orderby corresponds to a meta_query clause.
-                                               $meta_clause = $meta_clauses[ $args['orderby'] ];
-                                               $orderby = "ORDER BY CAST({$meta_clause['alias']}.meta_value AS {$meta_clause['cast']})";
-                                       }
-                                       break;
-                       }
-               }
-       }
-
-       $selects = array();
-       switch ( $args['fields'] ) {
-               case 'all':
-                       $selects = array( 't.*', 'tt.*' );
-                       break;
-               case 'ids':
-               case 'id=>parent':
-                       $selects = array( 't.term_id', 'tt.parent', 'tt.count', 'tt.taxonomy' );
-                       break;
-               case 'names':
-                       $selects = array( 't.term_id', 'tt.parent', 'tt.count', 't.name', 'tt.taxonomy' );
-                       break;
-               case 'count':
-                       $orderby = '';
-                       $order = '';
-                       $selects = array( 'COUNT(*)' );
-                       break;
-               case 'id=>name':
-                       $selects = array( 't.term_id', 't.name', 'tt.count', 'tt.taxonomy' );
-                       break;
-               case 'id=>slug':
-                       $selects = array( 't.term_id', 't.slug', 'tt.count', 'tt.taxonomy' );
-                       break;
-       }
-
-       $_fields = $args['fields'];
-
-       /**
-        * Filter the fields to select in the terms query.
-        *
-        * Field lists modified using this filter will only modify the term fields returned
-        * by the function when the `$fields` parameter set to 'count' or 'all'. In all other
-        * cases, the term fields in the results array will be determined by the `$fields`
-        * parameter alone.
-        *
-        * Use of this filter can result in unpredictable behavior, and is not recommended.
-        *
-        * @since 2.8.0
-        *
-        * @param array $selects    An array of fields to select for the terms query.
-        * @param array $args       An array of term query arguments.
-        * @param array $taxonomies An array of taxonomies.
+        * @param array         $terms      Array of found terms.
+        * @param array         $taxonomies An array of taxonomies.
+        * @param array         $args       An array of get_terms() arguments.
+        * @param WP_Term_Query $term_query The WP_Term_Query object.
         */
-       $fields = implode( ', ', apply_filters( 'get_terms_fields', $selects, $args, $taxonomies ) );
-
-       $join .= " INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id";
-
-       $where = implode( ' AND ', $where_conditions );
-
-       $pieces = array( 'fields', 'join', 'where', 'distinct', 'orderby', 'order', 'limits' );
-
-       /**
-        * Filter the terms query SQL clauses.
-        *
-        * @since 3.1.0
-        *
-        * @param array $pieces     Terms query SQL clauses.
-        * @param array $taxonomies An array of taxonomies.
-        * @param array $args       An array of terms query arguments.
-        */
-       $clauses = apply_filters( 'terms_clauses', compact( $pieces ), $taxonomies, $args );
-
-       $fields = isset( $clauses[ 'fields' ] ) ? $clauses[ 'fields' ] : '';
-       $join = isset( $clauses[ 'join' ] ) ? $clauses[ 'join' ] : '';
-       $where = isset( $clauses[ 'where' ] ) ? $clauses[ 'where' ] : '';
-       $distinct = isset( $clauses[ 'distinct' ] ) ? $clauses[ 'distinct' ] : '';
-       $orderby = isset( $clauses[ 'orderby' ] ) ? $clauses[ 'orderby' ] : '';
-       $order = isset( $clauses[ 'order' ] ) ? $clauses[ 'order' ] : '';
-       $limits = isset( $clauses[ 'limits' ] ) ? $clauses[ 'limits' ] : '';
-
-       if ( $where ) {
-               $where = "WHERE $where";
-       }
-
-       $query = "SELECT $distinct $fields FROM $wpdb->terms AS t $join $where $orderby $order $limits";
-
-       // $args can be anything. Only use the args defined in defaults to compute the key.
-       $key = md5( serialize( wp_array_slice_assoc( $args, array_keys( $defaults ) ) ) . serialize( $taxonomies ) . $query );
-       $last_changed = wp_cache_get( 'last_changed', 'terms' );
-       if ( ! $last_changed ) {
-               $last_changed = microtime();
-               wp_cache_set( 'last_changed', $last_changed, 'terms' );
-       }
-       $cache_key = "get_terms:$key:$last_changed";
-       $cache = wp_cache_get( $cache_key, 'terms' );
-       if ( false !== $cache ) {
-               if ( 'all' === $_fields ) {
-                       $cache = array_map( 'get_term', $cache );
-               }
-
-               /**
-                * Filter the given taxonomy's terms cache.
-                *
-                * @since 2.3.0
-                *
-                * @param array $cache      Cached array of terms for the given taxonomy.
-                * @param array $taxonomies An array of taxonomies.
-                * @param array $args       An array of get_terms() arguments.
-                */
-               return apply_filters( 'get_terms', $cache, $taxonomies, $args );
-       }
-
-       if ( 'count' == $_fields ) {
-               return $wpdb->get_var( $query );
-       }
-
-       $terms = $wpdb->get_results($query);
-       if ( 'all' == $_fields ) {
-               update_term_cache( $terms );
-       }
-
-       // Prime termmeta cache.
-       if ( $args['update_term_meta_cache'] ) {
-               $term_ids = wp_list_pluck( $terms, 'term_id' );
-               update_termmeta_cache( $term_ids );
-       }
-
-       if ( empty($terms) ) {
-               wp_cache_add( $cache_key, array(), 'terms', DAY_IN_SECONDS );
-
-               /** This filter is documented in wp-includes/taxonomy.php */
-               return apply_filters( 'get_terms', array(), $taxonomies, $args );
-       }
-
-       if ( $child_of ) {
-               foreach ( $taxonomies as $_tax ) {
-                       $children = _get_term_hierarchy( $_tax );
-                       if ( ! empty( $children ) ) {
-                               $terms = _get_term_children( $child_of, $terms, $_tax );
-                       }
-               }
-       }
-
-       // Update term counts to include children.
-       if ( $args['pad_counts'] && 'all' == $_fields ) {
-               foreach ( $taxonomies as $_tax ) {
-                       _pad_term_counts( $terms, $_tax );
-               }
-       }
-
-       // Make sure we show empty categories that have children.
-       if ( $hierarchical && $args['hide_empty'] && is_array( $terms ) ) {
-               foreach ( $terms as $k => $term ) {
-                       if ( ! $term->count ) {
-                               $children = get_term_children( $term->term_id, $term->taxonomy );
-                               if ( is_array( $children ) ) {
-                                       foreach ( $children as $child_id ) {
-                                               $child = get_term( $child_id, $term->taxonomy );
-                                               if ( $child->count ) {
-                                                       continue 2;
-                                               }
-                                       }
-                               }
-
-                               // It really is empty.
-                               unset($terms[$k]);
-                       }
-               }
-       }
-
-       $_terms = array();
-       if ( 'id=>parent' == $_fields ) {
-               foreach ( $terms as $term ) {
-                       $_terms[ $term->term_id ] = $term->parent;
-               }
-       } elseif ( 'ids' == $_fields ) {
-               foreach ( $terms as $term ) {
-                       $_terms[] = $term->term_id;
-               }
-       } elseif ( 'names' == $_fields ) {
-               foreach ( $terms as $term ) {
-                       $_terms[] = $term->name;
-               }
-       } elseif ( 'id=>name' == $_fields ) {
-               foreach ( $terms as $term ) {
-                       $_terms[ $term->term_id ] = $term->name;
-               }
-       } elseif ( 'id=>slug' == $_fields ) {
-               foreach ( $terms as $term ) {
-                       $_terms[ $term->term_id ] = $term->slug;
-               }
-       }
-
-       if ( ! empty( $_terms ) ) {
-               $terms = $_terms;
-       }
-
-       // Hierarchical queries are not limited, so 'offset' and 'number' must be handled now.
-       if ( $hierarchical && $number && is_array( $terms ) ) {
-               if ( $offset >= count( $terms ) ) {
-                       $terms = array();
-               } else {
-                       $terms = array_slice( $terms, $offset, $number, true );
-               }
-       }
-
-       wp_cache_add( $cache_key, $terms, 'terms', DAY_IN_SECONDS );
-
-       if ( 'all' === $_fields ) {
-               $terms = array_map( 'get_term', $terms );
-       }
-
-       /** This filter is documented in wp-includes/taxonomy.php */
-       return apply_filters( 'get_terms', $terms, $taxonomies, $args );
+       return apply_filters( 'get_terms', $terms, $term_query->query_vars['taxonomy'], $term_query->query_vars, $term_query );
 }
 
 /**
@@ -2047,7 +1541,7 @@ function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {
        if ( 'edit' == $context ) {
 
                /**
-                * Filter a term field to edit before it is sanitized.
+                * Filters a term field to edit before it is sanitized.
                 *
                 * The dynamic portion of the filter name, `$field`, refers to the term field.
                 *
@@ -2060,7 +1554,7 @@ function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {
                $value = apply_filters( "edit_term_{$field}", $value, $term_id, $taxonomy );
 
                /**
-                * Filter the taxonomy field to edit before it is sanitized.
+                * Filters the taxonomy field to edit before it is sanitized.
                 *
                 * The dynamic portions of the filter name, `$taxonomy` and `$field`, refer
                 * to the taxonomy slug and taxonomy field, respectively.
@@ -2079,7 +1573,7 @@ function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {
        } elseif ( 'db' == $context ) {
 
                /**
-                * Filter a term field value before it is sanitized.
+                * Filters a term field value before it is sanitized.
                 *
                 * The dynamic portion of the filter name, `$field`, refers to the term field.
                 *
@@ -2091,7 +1585,7 @@ function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {
                $value = apply_filters( "pre_term_{$field}", $value, $taxonomy );
 
                /**
-                * Filter a taxonomy field before it is sanitized.
+                * Filters a taxonomy field before it is sanitized.
                 *
                 * The dynamic portions of the filter name, `$taxonomy` and `$field`, refer
                 * to the taxonomy slug and field name, respectively.
@@ -2105,9 +1599,9 @@ function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {
                // Back compat filters
                if ( 'slug' == $field ) {
                        /**
-                        * Filter the category nicename before it is sanitized.
+                        * Filters the category nicename before it is sanitized.
                         *
-                        * Use the pre_{$taxonomy}_{$field} hook instead.
+                        * Use the {@see 'pre_$taxonomy_$field'} hook instead.
                         *
                         * @since 2.0.3
                         *
@@ -2119,7 +1613,7 @@ function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {
        } elseif ( 'rss' == $context ) {
 
                /**
-                * Filter the term field for use in RSS.
+                * Filters the term field for use in RSS.
                 *
                 * The dynamic portion of the filter name, `$field`, refers to the term field.
                 *
@@ -2131,7 +1625,7 @@ function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {
                $value = apply_filters( "term_{$field}_rss", $value, $taxonomy );
 
                /**
-                * Filter the taxonomy field for use in RSS.
+                * Filters the taxonomy field for use in RSS.
                 *
                 * The dynamic portions of the hook name, `$taxonomy`, and `$field`, refer
                 * to the taxonomy slug and field name, respectively.
@@ -2145,7 +1639,7 @@ function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {
                // Use display filters by default.
 
                /**
-                * Filter the term field sanitized for display.
+                * Filters the term field sanitized for display.
                 *
                 * The dynamic portion of the filter name, `$field`, refers to the term field name.
                 *
@@ -2159,7 +1653,7 @@ function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {
                $value = apply_filters( "term_{$field}", $value, $term_id, $taxonomy, $context );
 
                /**
-                * Filter the taxonomy field sanitized for display.
+                * Filters the taxonomy field sanitized for display.
                 *
                 * The dynamic portions of the filter name, `$taxonomy`, and `$field`, refer
                 * to the taxonomy slug and taxonomy field, respectively.
@@ -2189,7 +1683,7 @@ function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {
  * @since 2.3.0
  *
  * @param string       $taxonomy Taxonomy name.
- * @param array|string $args     Optional. Array of arguments that get passed to {@see get_terms()}.
+ * @param array|string $args     Optional. Array of arguments that get passed to get_terms().
  *                               Default empty array.
  * @return array|int|WP_Error Number of terms in that taxonomy or WP_Error if the taxonomy does not exist.
  */
@@ -2197,7 +1691,7 @@ function wp_count_terms( $taxonomy, $args = array() ) {
        $defaults = array('hide_empty' => false);
        $args = wp_parse_args($args, $defaults);
 
-       // backwards compatibility
+       // backward compatibility
        if ( isset($args['ignore_empty']) ) {
                $args['hide_empty'] = $args['ignore_empty'];
                unset($args['ignore_empty']);
@@ -2482,7 +1976,7 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
 
        foreach ( $taxonomies as $taxonomy ) {
                if ( ! taxonomy_exists($taxonomy) )
-                       return new WP_Error('invalid_taxonomy', __('Invalid taxonomy'));
+                       return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
        }
 
        if ( !is_array($object_ids) )
@@ -2628,9 +2122,9 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
        }
 
        // Update termmeta cache, if necessary.
-       if ( $args['update_term_meta_cache'] && ( 'all' === $fields || 'all_with_object_ids' === $fields || 'term_id' === $fields ) ) {
-               if ( 'term_id' === $fields ) {
-                       $term_ids = $fields;
+       if ( $args['update_term_meta_cache'] && ( 'all' === $fields || 'all_with_object_id' === $fields || 'ids' === $fields ) ) {
+               if ( 'ids' === $fields ) {
+                       $term_ids = $terms;
                } else {
                        $term_ids = wp_list_pluck( $terms, 'term_id' );
                }
@@ -2657,7 +2151,7 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
        }
 
        /**
-        * Filter the terms for a given object or objects.
+        * Filters the terms for a given object or objects.
         *
         * @since 4.2.0
         *
@@ -2670,7 +2164,7 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
        $terms = apply_filters( 'get_object_terms', $terms, $object_id_array, $taxonomy_array, $args );
 
        /**
-        * Filter the terms for a given object or objects.
+        * Filters the terms for a given object or objects.
         *
         * The `$taxonomies` parameter passed to this filter is formatted as a SQL fragment. The
         * {@see 'get_object_terms'} filter is recommended as an alternative.
@@ -2681,7 +2175,7 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
         * @param int|array $object_ids Object ID or array of IDs.
         * @param string    $taxonomies SQL-formatted (comma-separated and quoted) list of taxonomy names.
         * @param array     $args       An array of arguments for retrieving terms for the given object(s).
-        *                              See {@see wp_get_object_terms()} for details.
+        *                              See wp_get_object_terms() for details.
         */
        return apply_filters( 'wp_get_object_terms', $terms, $object_ids, $taxonomies, $args );
 }
@@ -2727,16 +2221,16 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
  *     @type string $slug        The term slug to use. Default empty string.
  * }
  * @return array|WP_Error An array containing the `term_id` and `term_taxonomy_id`,
- *                        {@see WP_Error} otherwise.
+ *                        WP_Error otherwise.
  */
 function wp_insert_term( $term, $taxonomy, $args = array() ) {
        global $wpdb;
 
        if ( ! taxonomy_exists($taxonomy) ) {
-               return new WP_Error('invalid_taxonomy', __('Invalid taxonomy'));
+               return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
        }
        /**
-        * Filter a term before it is sanitized and inserted into the database.
+        * Filters a term before it is sanitized and inserted into the database.
         *
         * @since 3.0.0
         *
@@ -2747,11 +2241,11 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
        if ( is_wp_error( $term ) ) {
                return $term;
        }
-       if ( is_int($term) && 0 == $term ) {
-               return new WP_Error('invalid_term_id', __('Invalid term ID'));
+       if ( is_int( $term ) && 0 == $term ) {
+               return new WP_Error( 'invalid_term_id', __( 'Invalid term ID.' ) );
        }
-       if ( '' == trim($term) ) {
-               return new WP_Error('empty_term_name', __('A name is required for this term'));
+       if ( '' == trim( $term ) ) {
+               return new WP_Error( 'empty_term_name', __( 'A name is required for this term.' ) );
        }
        $defaults = array( 'alias_of' => '', 'description' => '', 'parent' => 0, 'slug' => '');
        $args = wp_parse_args( $args, $defaults );
@@ -2915,7 +2409,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
        do_action( "create_$taxonomy", $term_id, $tt_id );
 
        /**
-        * Filter the term ID after a new term is created.
+        * Filters the term ID after a new term is created.
         *
         * @since 2.3.0
         *
@@ -2980,8 +2474,9 @@ function wp_set_object_terms( $object_id, $terms, $taxonomy, $append = false ) {
 
        $object_id = (int) $object_id;
 
-       if ( ! taxonomy_exists($taxonomy) )
-               return new WP_Error('invalid_taxonomy', __('Invalid taxonomy'));
+       if ( ! taxonomy_exists( $taxonomy ) ) {
+               return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
+       }
 
        if ( !is_array($terms) )
                $terms = array($terms);
@@ -3118,7 +2613,7 @@ function wp_remove_object_terms( $object_id, $terms, $taxonomy ) {
        $object_id = (int) $object_id;
 
        if ( ! taxonomy_exists( $taxonomy ) ) {
-               return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) );
+               return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
        }
 
        if ( ! is_array( $terms ) ) {
@@ -3239,7 +2734,7 @@ function wp_unique_term_slug( $slug, $term ) {
        // If we didn't get a unique slug, try appending a number to make it unique.
 
        /**
-        * Filter whether the proposed unique term slug is bad.
+        * Filters whether the proposed unique term slug is bad.
         *
         * @since 4.3.0
         *
@@ -3269,7 +2764,7 @@ function wp_unique_term_slug( $slug, $term ) {
        }
 
        /**
-        * Filter the unique term slug.
+        * Filters the unique term slug.
         *
         * @since 4.3.0
         *
@@ -3314,7 +2809,7 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
        global $wpdb;
 
        if ( ! taxonomy_exists( $taxonomy ) ) {
-               return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) );
+               return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
        }
 
        $term_id = (int) $term_id;
@@ -3350,8 +2845,9 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
        $parsed_args['name'] = $name;
        $parsed_args['description'] = $description;
 
-       if ( '' == trim($name) )
-               return new WP_Error('empty_term_name', __('A name is required for this term'));
+       if ( '' == trim( $name ) ) {
+               return new WP_Error( 'empty_term_name', __( 'A name is required for this term.' ) );
+       }
 
        if ( $parsed_args['parent'] > 0 && ! term_exists( (int) $parsed_args['parent'] ) ) {
                return new WP_Error( 'missing_parent', __( 'Parent term does not exist.' ) );
@@ -3389,7 +2885,7 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
        }
 
        /**
-        * Filter the term parent.
+        * Filters the term parent.
         *
         * Hook to this filter to see if it will cause a hierarchy loop.
         *
@@ -3469,13 +2965,6 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
         */
        do_action( 'edited_term_taxonomy', $tt_id, $taxonomy );
 
-       // Clean the relationship caches for all object types using this term.
-       $objects = $wpdb->get_col( $wpdb->prepare( "SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $tt_id ) );
-       $tax_object = get_taxonomy( $taxonomy );
-       foreach ( $tax_object->object_type as $object_type ) {
-               clean_object_term_cache( $objects, $object_type );
-       }
-
        /**
         * Fires after a term has been updated, but before the term cache has been cleaned.
         *
@@ -3758,15 +3247,43 @@ function clean_term_cache($ids, $taxonomy = '', $clean_taxonomy = true) {
 /**
  * Retrieves the taxonomy relationship to the term object id.
  *
+ * Upstream functions (like get_the_terms() and is_object_in_term()) are
+ * responsible for populating the object-term relationship cache. The current
+ * function only fetches relationship data that is already in the cache.
+ *
  * @since 2.3.0
  *
  * @param int    $id       Term object ID.
  * @param string $taxonomy Taxonomy name.
- * @return bool|mixed Empty array if $terms found, but not `$taxonomy`. False if nothing is in cache
- *                    for `$taxonomy` and `$id`.
+ * @return bool|array Array of `WP_Term` objects, if cached False if cache is empty for `$taxonomy` and `$id`.
  */
 function get_object_term_cache( $id, $taxonomy ) {
-       return wp_cache_get( $id, "{$taxonomy}_relationships" );
+       $_term_ids = wp_cache_get( $id, "{$taxonomy}_relationships" );
+
+       // We leave the priming of relationship caches to upstream functions.
+       if ( false === $_term_ids ) {
+               return false;
+       }
+
+       // Backward compatibility for if a plugin is putting objects into the cache, rather than IDs.
+       $term_ids = array();
+       foreach ( $_term_ids as $term_id ) {
+               if ( is_numeric( $term_id ) ) {
+                       $term_ids[] = intval( $term_id );
+               } elseif ( isset( $term_id->term_id ) ) {
+                       $term_ids[] = intval( $term_id->term_id );
+               }
+       }
+
+       // Fill the term objects.
+       _prime_term_caches( $term_ids );
+
+       $terms = array();
+       foreach ( $term_ids as $term_id ) {
+               $terms[] = wp_cache_get( $term_id, 'terms' );
+       }
+
+       return array_map( 'get_term', $terms );
 }
 
 /**
@@ -3816,8 +3333,9 @@ function update_object_term_cache($object_ids, $object_type) {
        ) );
 
        $object_terms = array();
-       foreach ( (array) $terms as $term )
-               $object_terms[$term->object_id][$term->taxonomy][] = $term;
+       foreach ( (array) $terms as $term ) {
+               $object_terms[ $term->object_id ][ $term->taxonomy ][] = $term->term_id;
+       }
 
        foreach ( $ids as $id ) {
                foreach ( $taxonomies as $taxonomy ) {
@@ -4023,6 +3541,32 @@ function _pad_term_counts( &$terms, $taxonomy ) {
                        $terms_by_id[$id]->count = count($items);
 }
 
+/**
+ * Adds any terms from the given IDs to the cache that do not already exist in cache.
+ *
+ * @since 4.6.0
+ * @access private
+ *
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @param array $term_ids          Array of term IDs.
+ * @param bool  $update_meta_cache Optional. Whether to update the meta cache. Default true.
+ */
+function _prime_term_caches( $term_ids, $update_meta_cache = true ) {
+       global $wpdb;
+
+       $non_cached_ids = _get_non_cached_ids( $term_ids, 'terms' );
+       if ( ! empty( $non_cached_ids ) ) {
+               $fresh_terms = $wpdb->get_results( sprintf( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE t.term_id IN (%s)", join( ",", array_map( 'intval', $non_cached_ids ) ) ) );
+
+               update_term_cache( $fresh_terms, $update_meta_cache );
+
+               if ( $update_meta_cache ) {
+                       update_termmeta_cache( $non_cached_ids );
+               }
+       }
+}
+
 //
 // Default callbacks
 //
@@ -4207,7 +3751,7 @@ function _split_shared_term( $term_id, $term_taxonomy_id, $record = true ) {
                }
        }
 
-       // Keep a record of term_ids that have been split, keyed by old term_id. See {@see wp_get_split_term()}.
+       // Keep a record of term_ids that have been split, keyed by old term_id. See wp_get_split_term().
        if ( $record ) {
                $split_term_data = get_option( '_split_terms', array() );
                if ( ! isset( $split_term_data[ $term_id ] ) ) {
@@ -4563,7 +4107,7 @@ function get_term_link( $term, $taxonomy = '' ) {
        if ( 'post_tag' == $taxonomy ) {
 
                /**
-                * Filter the tag link.
+                * Filters the tag link.
                 *
                 * @since 2.3.0
                 * @deprecated 2.5.0 Use 'term_link' instead.
@@ -4575,7 +4119,7 @@ function get_term_link( $term, $taxonomy = '' ) {
        } elseif ( 'category' == $taxonomy ) {
 
                /**
-                * Filter the category link.
+                * Filters the category link.
                 *
                 * @since 1.5.0
                 * @deprecated 2.5.0 Use 'term_link' instead.
@@ -4587,7 +4131,7 @@ function get_term_link( $term, $taxonomy = '' ) {
        }
 
        /**
-        * Filter the term link.
+        * Filters the term link.
         *
         * @since 2.5.0
         *
@@ -4730,7 +4274,7 @@ function is_object_in_term( $object_id, $taxonomy, $terms = null ) {
        $object_terms = get_object_term_cache( $object_id, $taxonomy );
        if ( false === $object_terms ) {
                $object_terms = wp_get_object_terms( $object_id, $taxonomy, array( 'update_term_meta_cache' => false ) );
-               wp_cache_set( $object_id, $object_terms, "{$taxonomy}_relationships" );
+               wp_cache_set( $object_id, wp_list_pluck( $object_terms, 'term_id' ), "{$taxonomy}_relationships" );
        }
 
        if ( is_wp_error( $object_terms ) )
@@ -4828,7 +4372,7 @@ function get_ancestors( $object_id = 0, $object_type = '', $resource_type = '' )
        }
 
        /**
-        * Filter a given object's ancestors.
+        * Filters a given object's ancestors.
         *
         * @since 3.1.0
         * @since 4.1.1 Introduced the `$resource_type` parameter.
index 68c66b198bc25d5cffef3b93cb9c2148e5a29777..025f1a84791d57f6cad9155eb82dfc2a19808d26 100644 (file)
@@ -12,7 +12,7 @@ if ( defined('WP_USE_THEMES') && WP_USE_THEMES )
        do_action( 'template_redirect' );
 
 /**
- * Filter whether to allow 'HEAD' requests to generate content.
+ * Filters whether to allow 'HEAD' requests to generate content.
  *
  * Provides a significant performance bump by exiting before the page
  * content loads for 'HEAD' requests. See #14348.
@@ -65,7 +65,7 @@ if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) :
                $template = get_index_template();
        endif;
        /**
-        * Filter the path of the current template before including it.
+        * Filters the path of the current template before including it.
         *
         * @since 3.0.0
         *
index b2e4e242284ef965365a42d891f403b5c93d8df3..380bb47b390022b07aebed2d76497d83d868c0a8 100644 (file)
@@ -11,7 +11,7 @@
  *
  * Used to quickly retrieve the path of a template without including the file
  * extension. It will also check the parent theme, if the file exists, with
- * the use of {@link locate_template()}. Allows for more generic template location
+ * the use of locate_template(). Allows for more generic template location
  * without the use of the other get_*_template() functions.
  *
  * @since 1.5.0
@@ -29,7 +29,7 @@ function get_query_template( $type, $templates = array() ) {
        $template = locate_template( $templates );
 
        /**
-        * Filter the path of the queried template by type.
+        * Filters the path of the queried template by type.
         *
         * The dynamic portion of the hook name, `$type`, refers to the filename -- minus the file
         * extension and any non-alphanumeric characters delimiting words -- of the file to load.
index 2e8ebc3ed3ea4a1b3bc1a3c45a8b1ab537aa8357..f7e0b30f2b0a63d93429f1520ac23a28d2f9a548 100644 (file)
@@ -2,15 +2,15 @@
 /**
  * @package WordPress
  * @subpackage Theme_Compat
- * @deprecated 3.0
+ * @deprecated 3.0.0
  *
- * This file is here for Backwards compatibility with old themes and will be removed in a future version
+ * This file is here for backward compatibility with old themes and will be removed in a future version
  *
  */
 _deprecated_file(
        /* translators: %s: template name */
        sprintf( __( 'Theme without %s' ), basename( __FILE__ ) ),
-       '3.0',
+       '3.0.0',
        null,
        /* translators: %s: template name */
        sprintf( __( 'Please include a %s template in your theme.' ), basename( __FILE__ ) )
index fca4f38a621663e3594f55de579d97fcc09b19be..f706c6833d49f4fb4c8568a1e7e2aefc3dae2204 100644 (file)
                        $thumbnail_id = get_the_ID();
                }
 
-               $aspect_ratio = 1;
-               $measurements = array( 1, 1 );
-               $image_size   = 'full'; // Fallback.
+               if ( $thumbnail_id ) {
+                       $aspect_ratio = 1;
+                       $measurements = array( 1, 1 );
+                       $image_size   = 'full'; // Fallback.
 
-               $meta = wp_get_attachment_metadata( $thumbnail_id );
-               if ( ! empty( $meta['sizes'] ) ) {
-                       foreach ( $meta['sizes'] as $size => $data ) {
-                               if ( $data['width'] / $data['height'] > $aspect_ratio ) {
-                                       $aspect_ratio = $data['width'] / $data['height'];
-                                       $measurements = array( $data['width'], $data['height'] );
-                                       $image_size   = $size;
+                       $meta = wp_get_attachment_metadata( $thumbnail_id );
+                       if ( ! empty( $meta['sizes'] ) ) {
+                               foreach ( $meta['sizes'] as $size => $data ) {
+                                       if ( $data['width'] / $data['height'] > $aspect_ratio ) {
+                                               $aspect_ratio = $data['width'] / $data['height'];
+                                               $measurements = array( $data['width'], $data['height'] );
+                                               $image_size   = $size;
+                                       }
                                }
                        }
-               }
 
-               /**
-                * Filter the thumbnail image size for use in the embed template.
-                *
-                * @since 4.4.0
-                * @since 4.5.0 Added `$thumbnail_id` parameter.
-                *
-                * @param string $image_size   Thumbnail image size.
-                * @param int    $thumbnail_id Attachment ID.
-                */
-               $image_size = apply_filters( 'embed_thumbnail_image_size', $image_size, $thumbnail_id );
+                       /**
+                        * Filters the thumbnail image size for use in the embed template.
+                        *
+                        * @since 4.4.0
+                        * @since 4.5.0 Added `$thumbnail_id` parameter.
+                        *
+                        * @param string $image_size   Thumbnail image size.
+                        * @param int    $thumbnail_id Attachment ID.
+                        */
+                       $image_size = apply_filters( 'embed_thumbnail_image_size', $image_size, $thumbnail_id );
 
-               $shape = $measurements[0] / $measurements[1] >= 1.75 ? 'rectangular' : 'square';
+                       $shape = $measurements[0] / $measurements[1] >= 1.75 ? 'rectangular' : 'square';
 
-               /**
-                * Filter the thumbnail shape for use in the embed template.
-                *
-                * Rectangular images are shown above the title while square images
-                * are shown next to the content.
-                *
-                * @since 4.4.0
-                * @since 4.5.0 Added `$thumbnail_id` parameter.
-                *
-                * @param string $shape        Thumbnail image shape. Either 'rectangular' or 'square'.
-                * @param int    $thumbnail_id Attachment ID.
-                */
-               $shape = apply_filters( 'embed_thumbnail_image_shape', $shape, $thumbnail_id );
+                       /**
+                        * Filters the thumbnail shape for use in the embed template.
+                        *
+                        * Rectangular images are shown above the title while square images
+                        * are shown next to the content.
+                        *
+                        * @since 4.4.0
+                        * @since 4.5.0 Added `$thumbnail_id` parameter.
+                        *
+                        * @param string $shape        Thumbnail image shape. Either 'rectangular' or 'square'.
+                        * @param int    $thumbnail_id Attachment ID.
+                        */
+                       $shape = apply_filters( 'embed_thumbnail_image_shape', $shape, $thumbnail_id );
+               }
 
-               if ( 'rectangular' === $shape ) : ?>
+               if ( $thumbnail_id && 'rectangular' === $shape ) : ?>
                        <div class="wp-embed-featured-image rectangular">
                                <a href="<?php the_permalink(); ?>" target="_top">
                                        <?php echo wp_get_attachment_image( $thumbnail_id, $image_size ); ?>
@@ -78,7 +80,7 @@
                        </a>
                </p>
 
-               <?php if ( 'square' === $shape ) : ?>
+               <?php if ( $thumbnail_id && 'square' === $shape ) : ?>
                        <div class="wp-embed-featured-image square">
                                <a href="<?php the_permalink(); ?>" target="_top">
                                        <?php echo wp_get_attachment_image( $thumbnail_id, $image_size ); ?>
@@ -90,7 +92,7 @@
 
                <?php
                /**
-                * Print additional content after the embed excerpt.
+                * Prints additional content after the embed excerpt.
                 *
                 * @since 4.4.0
                 */
                        <div class="wp-embed-meta">
                                <?php
                                /**
-                                * Print additional meta content in the embed template.
+                                * Prints additional meta content in the embed template.
                                 *
                                 * @since 4.4.0
                                 */
index 6ca651d4c5e11a68ac2f5ee10d71ed659a02ca26..532a9795b379c87bc0e3c922bad704f04176785f 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 /**
- * Print scripts or data before the closing body tag in the embed template.
+ * Prints scripts or data before the closing body tag in the embed template.
  *
  * @since 4.4.0
  */
index 61f91b19dc9ef8ea3ec52b87c4028326282f8989..6d9655236b653e2304c8735bdf33fec21ced40d1 100644 (file)
@@ -2,15 +2,14 @@
 /**
  * @package WordPress
  * @subpackage Theme_Compat
- * @deprecated 3.0
- *
- * This file is here for Backwards compatibility with old themes and will be removed in a future version
+ * @deprecated 3.0.0
  *
+ * This file is here for backward compatibility with old themes and will be removed in a future version
  */
 _deprecated_file(
        /* translators: %s: template name */
        sprintf( __( 'Theme without %s' ), basename( __FILE__ ) ),
-       '3.0',
+       '3.0.0',
        null,
        /* translators: %s: template name */
        sprintf( __( 'Please include a %s template in your theme.' ), basename( __FILE__ ) )
index f831134308844032e80be64ba920c6138c235897..9c0743aa26032d32b09e201a1605abf14fd343ab 100644 (file)
@@ -22,7 +22,7 @@ if ( ! headers_sent() ) {
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <?php
        /**
-        * Print scripts or data in the embed template <head> tag.
+        * Prints scripts or data in the embed template <head> tag.
         *
         * @since 4.4.0
         */
index 432ae5b01fa4a42c3e4c3b27afa2b0326e96f636..831144fe4c221b779231882fbadcc5be7e544934 100644 (file)
@@ -2,15 +2,14 @@
 /**
  * @package WordPress
  * @subpackage Theme_Compat
- * @deprecated 3.0
- *
- * This file is here for Backwards compatibility with old themes and will be removed in a future version
+ * @deprecated 3.0.0
  *
+ * This file is here for backward compatibility with old themes and will be removed in a future version.
  */
 _deprecated_file(
        /* translators: %s: template name */
        sprintf( __( 'Theme without %s' ), basename( __FILE__ ) ),
-       '3.0',
+       '3.0.0',
        null,
        /* translators: %s: template name */
        sprintf( __( 'Please include a %s template in your theme.' ), basename( __FILE__ ) )
index 23fa6303280c48753dc9915e0ff817715c1dbfbb..acf6ae794ba94b3c341ebcbd5c48a6e47e3967d0 100644 (file)
@@ -2,15 +2,14 @@
 /**
  * @package WordPress
  * @subpackage Theme_Compat
- * @deprecated 3.0
- *
- * This file is here for Backwards compatibility with old themes and will be removed in a future version
+ * @deprecated 3.0.0
  *
+ * This file is here for backward compatibility with old themes and will be removed in a future version.
  */
 _deprecated_file(
        /* translators: %s: template name */
        sprintf( __( 'Theme without %s' ), basename( __FILE__ ) ),
-       '3.0',
+       '3.0.0',
        null,
        /* translators: %s: template name */
        sprintf( __( 'Please include a %s template in your theme.' ), basename( __FILE__ ) )
index f4dfaeedc2b0ed9bb800c5c536b2bded9a55c804..e71e417e16e5328218ec7be453f7714ce56baa3c 100644 (file)
@@ -151,7 +151,7 @@ function is_child_theme() {
  */
 function get_stylesheet() {
        /**
-        * Filter the name of current stylesheet.
+        * Filters the name of current stylesheet.
         *
         * @since 1.5.0
         *
@@ -173,7 +173,7 @@ function get_stylesheet_directory() {
        $stylesheet_dir = "$theme_root/$stylesheet";
 
        /**
-        * Filter the stylesheet directory path for current theme.
+        * Filters the stylesheet directory path for current theme.
         *
         * @since 1.5.0
         *
@@ -197,7 +197,7 @@ function get_stylesheet_directory_uri() {
        $stylesheet_dir_uri = "$theme_root_uri/$stylesheet";
 
        /**
-        * Filter the stylesheet directory URI.
+        * Filters the stylesheet directory URI.
         *
         * @since 1.5.0
         *
@@ -209,10 +209,10 @@ function get_stylesheet_directory_uri() {
 }
 
 /**
- * Retrieve URI of current theme stylesheet.
+ * Retrieves the URI of current theme stylesheet.
  *
- * The stylesheet file name is 'style.css' which is appended to {@link
- * get_stylesheet_directory_uri() stylesheet directory URI} path.
+ * The stylesheet file name is 'style.css' which is appended to the stylesheet directory URI path.
+ * See get_stylesheet_directory_uri().
  *
  * @since 1.5.0
  *
@@ -222,7 +222,7 @@ function get_stylesheet_uri() {
        $stylesheet_dir_uri = get_stylesheet_directory_uri();
        $stylesheet_uri = $stylesheet_dir_uri . '/style.css';
        /**
-        * Filter the URI of the current theme stylesheet.
+        * Filters the URI of the current theme stylesheet.
         *
         * @since 1.5.0
         *
@@ -233,7 +233,7 @@ function get_stylesheet_uri() {
 }
 
 /**
- * Retrieve localized stylesheet URI.
+ * Retrieves the localized stylesheet URI.
  *
  * The stylesheet directory for the localized stylesheet files are located, by
  * default, in the base theme directory. The name of the locale file will be the
@@ -241,7 +241,8 @@ function get_stylesheet_uri() {
  * stylesheet will be checked for existence, for example 'ltr.css'.
  *
  * The theme may change the location of the stylesheet directory by either using
- * the 'stylesheet_directory_uri' filter or the 'locale_stylesheet_uri' filter.
+ * the {@see 'stylesheet_directory_uri'} or {@see 'locale_stylesheet_uri'} filters.
+ *
  * If you want to change the location of the stylesheet files for the entire
  * WordPress workflow, then change the former. If you just have the locale in a
  * separate folder, then change the latter.
@@ -264,7 +265,7 @@ function get_locale_stylesheet_uri() {
        else
                $stylesheet_uri = '';
        /**
-        * Filter the localized stylesheet URI.
+        * Filters the localized stylesheet URI.
         *
         * @since 2.1.0
         *
@@ -283,7 +284,7 @@ function get_locale_stylesheet_uri() {
  */
 function get_template() {
        /**
-        * Filter the name of the current theme.
+        * Filters the name of the current theme.
         *
         * @since 1.5.0
         *
@@ -305,7 +306,7 @@ function get_template_directory() {
        $template_dir = "$theme_root/$template";
 
        /**
-        * Filter the current theme directory path.
+        * Filters the current theme directory path.
         *
         * @since 1.5.0
         *
@@ -329,7 +330,7 @@ function get_template_directory_uri() {
        $template_dir_uri = "$theme_root_uri/$template";
 
        /**
-        * Filter the current theme directory URI.
+        * Filters the current theme directory URI.
         *
         * @since 1.5.0
         *
@@ -434,7 +435,7 @@ function search_theme_directories( $force = false ) {
        }
 
        /**
-        * Filter whether to get the cache of the registered theme directories.
+        * Filters whether to get the cache of the registered theme directories.
         *
         * @since 3.4.0
         *
@@ -551,7 +552,7 @@ function get_theme_root( $stylesheet_or_template = false ) {
        }
 
        /**
-        * Filter the absolute path to the themes directory.
+        * Filters the absolute path to the themes directory.
         *
         * @since 1.5.0
         *
@@ -600,7 +601,7 @@ function get_theme_root_uri( $stylesheet_or_template = false, $theme_root = fals
        }
 
        /**
-        * Filter the URI for themes directory.
+        * Filters the URI for themes directory.
         *
         * @since 1.5.0
         *
@@ -664,7 +665,7 @@ function locale_stylesheet() {
  * Switches the theme.
  *
  * Accepts one argument: $stylesheet of the theme. It also accepts an additional function signature
- * of two arguments: $template then $stylesheet. This is for backwards compatibility.
+ * of two arguments: $template then $stylesheet. This is for backward compatibility.
  *
  * @since 2.5.0
  *
@@ -760,7 +761,7 @@ function switch_theme( $stylesheet ) {
  * But if it doesn't exist, it'll fall back to the latest core default theme that does exist.
  * Will switch theme to the fallback theme if current theme does not validate.
  *
- * You can use the 'validate_current_theme' filter to return false to
+ * You can use the {@see 'validate_current_theme'} filter to return false to
  * disable this functionality.
  *
  * @since 1.5.0
@@ -770,7 +771,7 @@ function switch_theme( $stylesheet ) {
  */
 function validate_current_theme() {
        /**
-        * Filter whether to validate the current theme.
+        * Filters whether to validate the current theme.
         *
         * @since 2.7.0
         *
@@ -841,7 +842,7 @@ function get_theme_mods() {
  * Retrieve theme modification value for the current theme.
  *
  * If the modification name does not exist, then the $default will be passed
- * through {@link http://php.net/sprintf sprintf()} PHP function with the first
+ * through {@link https://secure.php.net/sprintf sprintf()} PHP function with the first
  * string the template directory URI and the second string the stylesheet
  * directory URI.
  *
@@ -856,7 +857,7 @@ function get_theme_mod( $name, $default = false ) {
 
        if ( isset( $mods[$name] ) ) {
                /**
-                * Filter the theme modification, or 'theme_mod', value.
+                * Filters the theme modification, or 'theme_mod', value.
                 *
                 * The dynamic portion of the hook name, `$name`, refers to
                 * the key name of the modification array. For example,
@@ -890,7 +891,7 @@ function set_theme_mod( $name, $value ) {
        $old_value = isset( $mods[ $name ] ) ? $mods[ $name ] : false;
 
        /**
-        * Filter the theme mod value on save.
+        * Filters the theme mod value on save.
         *
         * The dynamic portion of the hook name, `$name`, refers to the key name of
         * the modification array. For example, 'header_textcolor', 'header_image',
@@ -1070,7 +1071,7 @@ function get_header_image_tag( $attr = array() ) {
        $html .= ' />';
 
        /**
-        * Filter the markup of header images.
+        * Filters the markup of header images.
         *
         * @since 4.4.0
         *
@@ -1503,7 +1504,7 @@ function get_editor_stylesheets() {
        }
 
        /**
-        * Filter the array of stylesheets applied to the editor.
+        * Filters the array of stylesheets applied to the editor.
         *
         * @since 4.3.0
         *
@@ -1513,17 +1514,24 @@ function get_editor_stylesheets() {
 }
 
 /**
- * Allows a theme to register its support of a certain feature
+ * Registers theme support for a given feature.
  *
  * Must be called in the theme's functions.php file to work.
- * If attached to a hook, it must be after_setup_theme.
- * The init hook may be too late for some features.
+ * If attached to a hook, it must be {@see 'after_setup_theme'}.
+ * The {@see 'init'} hook may be too late for some features.
  *
  * @since 2.9.0
+ * @since 3.6.0 The `html5` feature was added
+ * @since 3.9.0 The `html5` feature now also accepts 'gallery' and 'caption'
+ * @since 4.1.0 The `title-tag` feature was added
+ * @since 4.5.0 The `customize-selective-refresh-widgets` feature was added
  *
  * @global array $_wp_theme_features
  *
- * @param string $feature The feature being added.
+ * @param string $feature  The feature being added. Likely core values include 'post-formats',
+ *                         'post-thumbnails', 'html5', 'custom-logo', 'custom-header-uploads',
+ *                         'custom-header', 'custom-background', 'title-tag', etc.
+ * @param mixed  $args,... Optional extra arguments to pass along with certain features.
  * @return void|bool False on failure, void otherwise.
  */
 function add_theme_support( $feature ) {
@@ -1535,6 +1543,22 @@ function add_theme_support( $feature ) {
                $args = array_slice( func_get_args(), 1 );
 
        switch ( $feature ) {
+               case 'post-thumbnails':
+                       // All post types are already supported.
+                       if ( true === get_theme_support( 'post-thumbnails' ) ) {
+                               return;
+                       }
+
+                       /*
+                        * Merge post types with any that already declared their support
+                        * for post thumbnails.
+                        */
+                       if ( is_array( $args[0] ) && isset( $_wp_theme_features['post-thumbnails'] ) ) {
+                               $args[0] = array_unique( array_merge( $_wp_theme_features['post-thumbnails'][0], $args[0] ) );
+                       }
+
+                       break;
+
                case 'post-formats' :
                        if ( is_array( $args[0] ) ) {
                                $post_formats = get_post_format_slugs();
@@ -1618,7 +1642,7 @@ function add_theme_support( $feature ) {
                        // the constant is always accurate (and is not defined later,  overriding our value).
                        // As stated above, the first value wins.
                        // Once we get to wp_loaded (just-in-time), define any constants we haven't already.
-                       // Constants are lame. Don't reference them. This is just for backwards compatibility.
+                       // Constants are lame. Don't reference them. This is just for backward compatibility.
 
                        if ( defined( 'NO_HEADER_TEXT' ) )
                                $args[0]['header-text'] = ! NO_HEADER_TEXT;
@@ -1702,7 +1726,7 @@ function add_theme_support( $feature ) {
                        if ( did_action( 'wp_loaded' ) ) {
                                /* translators: 1: Theme support 2: hook name */
                                _doing_it_wrong( "add_theme_support( 'title-tag' )", sprintf( __( 'Theme support for %1$s should be registered before the %2$s hook.' ),
-                                       '<code>title-tag</code>', '<code>wp_loaded</code>' ), '4.1' );
+                                       '<code>title-tag</code>', '<code>wp_loaded</code>' ), '4.1.0' );
 
                                return false;
                        }
@@ -1930,7 +1954,7 @@ function current_theme_supports( $feature ) {
        }
 
        /**
-        * Filter whether the current theme supports a specific feature.
+        * Filters whether the current theme supports a specific feature.
         *
         * The dynamic portion of the hook name, `$feature`, refers to the specific theme
         * feature. Possible values include 'post-formats', 'post-thumbnails', 'custom-background',
@@ -1997,7 +2021,9 @@ function _delete_attachment_theme_mod( $id ) {
 }
 
 /**
- * Checks if a theme has been changed and runs 'after_switch_theme' hook on the next WP load
+ * Checks if a theme has been changed and runs 'after_switch_theme' hook on the next WP load.
+ *
+ * See {@see 'after_switch_theme'}.
  *
  * @since 3.3.0
  */
index 3fe0d937289b6a9ffe7954833966ac07f6893ee3..59b618c31a1445ab3b79912e2d596d91bc5f0d89 100644 (file)
@@ -55,7 +55,7 @@ function wp_version_check( $extra_stats = array(), $force_check = false ) {
        }
 
        /**
-        * Filter the locale requested for WordPress core translations.
+        * Filters the locale requested for WordPress core translations.
         *
         * @since 2.8.0
         *
@@ -265,7 +265,7 @@ function wp_update_plugins( $extra_stats = array() ) {
        $locales = array_values( get_available_languages() );
 
        /**
-        * Filter the locales requested for plugin translations.
+        * Filters the locales requested for plugin translations.
         *
         * @since 3.7.0
         * @since 4.5.0 The default value of the `$locales` parameter changed to include all locales.
@@ -439,7 +439,7 @@ function wp_update_themes( $extra_stats = array() ) {
        $locales = array_values( get_available_languages() );
 
        /**
-        * Filter the locales requested for theme translations.
+        * Filters the locales requested for theme translations.
         *
         * @since 3.7.0
         * @since 4.5.0 The default value of the `$locales` parameter changed to include all locales.
@@ -579,7 +579,7 @@ function wp_get_update_data() {
 
        $update_data = array( 'counts' => $counts, 'title' => $update_title );
        /**
-        * Filter the returned array of update data for plugins, themes, and WordPress core.
+        * Filters the returned array of update data for plugins, themes, and WordPress core.
         *
         * @since 3.5.0
         *
@@ -684,21 +684,18 @@ if ( ( ! is_main_site() && ! is_network_admin() ) || ( defined( 'DOING_AJAX' ) &
 
 add_action( 'admin_init', '_maybe_update_core' );
 add_action( 'wp_version_check', 'wp_version_check' );
-add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );
 
 add_action( 'load-plugins.php', 'wp_update_plugins' );
 add_action( 'load-update.php', 'wp_update_plugins' );
 add_action( 'load-update-core.php', 'wp_update_plugins' );
 add_action( 'admin_init', '_maybe_update_plugins' );
 add_action( 'wp_update_plugins', 'wp_update_plugins' );
-add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
 
 add_action( 'load-themes.php', 'wp_update_themes' );
 add_action( 'load-update.php', 'wp_update_themes' );
 add_action( 'load-update-core.php', 'wp_update_themes' );
 add_action( 'admin_init', '_maybe_update_themes' );
 add_action( 'wp_update_themes', 'wp_update_themes' );
-add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
 
 add_action( 'update_option_WPLANG', 'wp_clean_update_cache' , 10, 0 );
 
index 69cc86c0d670ffaedcf97a08fba4645085f66954..6d473ef4c8485242e43c3e56beae03f45a1078ff 100644 (file)
@@ -27,6 +27,8 @@
  */
 function wp_signon( $credentials = array(), $secure_cookie = '' ) {
        if ( empty($credentials) ) {
+               $credentials = array(); // Back-compat for plugins passing an empty string.
+
                if ( ! empty($_POST['log']) )
                        $credentials['user_login'] = $_POST['log'];
                if ( ! empty($_POST['pwd']) )
@@ -59,7 +61,7 @@ function wp_signon( $credentials = array(), $secure_cookie = '' ) {
                $secure_cookie = is_ssl();
 
        /**
-        * Filter whether to use a secure sign-on cookie.
+        * Filters whether to use a secure sign-on cookie.
         *
         * @since 3.1.0
         *
@@ -145,7 +147,7 @@ function wp_authenticate_username_password($user, $username, $password) {
        }
 
        /**
-        * Filter whether the given user can be authenticated with the provided $password.
+        * Filters whether the given user can be authenticated with the provided $password.
         *
         * @since 2.5.0
         *
@@ -295,14 +297,14 @@ function wp_authenticate_cookie($user, $username, $password) {
 function wp_authenticate_spam_check( $user ) {
        if ( $user instanceof WP_User && is_multisite() ) {
                /**
-                * Filter whether the user has been marked as a spammer.
+                * Filters whether the user has been marked as a spammer.
                 *
                 * @since 3.7.0
                 *
                 * @param bool    $spammed Whether the user is considered a spammer.
                 * @param WP_User $user    User to check against.
                 */
-               $spammed = apply_filters( 'check_is_user_spammed', is_user_spammy(), $user );
+               $spammed = apply_filters( 'check_is_user_spammed', is_user_spammy( $user ), $user );
 
                if ( $spammed )
                        return new WP_Error( 'spammer_account', __( '<strong>ERROR</strong>: Your account has been marked as a spammer.' ) );
@@ -311,12 +313,12 @@ function wp_authenticate_spam_check( $user ) {
 }
 
 /**
- * Validate the logged-in cookie.
+ * Validates the logged-in cookie.
  *
  * Checks the logged-in cookie if the previous auth cookie could not be
  * validated and parsed.
  *
- * This is a callback for the determine_current_user filter, rather than API.
+ * This is a callback for the {@see 'determine_current_user'} filter, rather than API.
  *
  * @since 3.9.0
  *
@@ -360,7 +362,7 @@ function count_user_posts( $userid, $post_type = 'post', $public_only = false )
        $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts $where" );
 
        /**
-        * Filter the number of posts a user has written.
+        * Filters the number of posts a user has written.
         *
         * @since 2.7.0
         * @since 4.1.0 Added `$post_type` argument.
@@ -450,7 +452,7 @@ function get_user_option( $option, $user = 0, $deprecated = '' ) {
        global $wpdb;
 
        if ( !empty( $deprecated ) )
-               _deprecated_argument( __FUNCTION__, '3.0' );
+               _deprecated_argument( __FUNCTION__, '3.0.0' );
 
        if ( empty( $user ) )
                $user = get_current_user_id();
@@ -467,7 +469,7 @@ function get_user_option( $option, $user = 0, $deprecated = '' ) {
                $result = false;
 
        /**
-        * Filter a specific user option value.
+        * Filters a specific user option value.
         *
         * The dynamic portion of the hook name, `$option`, refers to the user option name.
         *
@@ -542,7 +544,7 @@ function delete_user_option( $user_id, $option_name, $global = false ) {
  *
  * @see WP_User_Query
  *
- * @param array $args Optional. Arguments to retrieve users. See {@see WP_User_Query::prepare_query()}
+ * @param array $args Optional. Arguments to retrieve users. See WP_User_Query::prepare_query().
  *                    for more information on accepted arguments.
  * @return array List of users.
  */
@@ -578,6 +580,25 @@ function get_blogs_of_user( $user_id, $all = false ) {
        if ( empty( $user_id ) )
                return array();
 
+       /**
+        * Filters the list of a user's sites before it is populated.
+        *
+        * Passing a non-null value to the filter will effectively short circuit
+        * get_blogs_of_user(), returning that value instead.
+        *
+        * @since 4.6.0
+        *
+        * @param null|array $blogs   An array of WP_Site objects of which the user is a member.
+        * @param int        $user_id User ID.
+        * @param bool       $all     Whether the returned array should contain all sites, including
+        *                            those marked 'deleted', 'archived', or 'spam'. Default false.
+        */
+       $blogs = apply_filters( 'pre_get_blogs_of_user', null, $user_id, $all );
+
+       if ( null !== $blogs ) {
+               return $blogs;
+       }
+
        $keys = get_user_meta( $user_id );
        if ( empty( $keys ) )
                return array();
@@ -648,7 +669,7 @@ function get_blogs_of_user( $user_id, $all = false ) {
        }
 
        /**
-        * Filter the list of blogs a user belongs to.
+        * Filters the list of blogs a user belongs to.
         *
         * @since MU
         *
@@ -948,7 +969,7 @@ function setup_userdata($for_user_id = '') {
  *
  * @param array|string $args {
  *     Optional. Array or string of arguments to generate a drop-down of users.
- *     {@see WP_User_Query::prepare_query() for additional available arguments.
+ *     See WP_User_Query::prepare_query() for additional available arguments.
  *
  *     @type string       $show_option_all         Text to show as the drop-down default (all).
  *                                                 Default empty.
@@ -1021,7 +1042,7 @@ function wp_dropdown_users( $args = '' ) {
        $option_none_value = $r['option_none_value'];
 
        /**
-        * Filter the query arguments for the user drop-down.
+        * Filters the query arguments for the user drop-down.
         *
         * @since 4.4.0
         *
@@ -1084,7 +1105,7 @@ function wp_dropdown_users( $args = '' ) {
        }
 
        /**
-        * Filter the wp_dropdown_users() HTML output.
+        * Filters the wp_dropdown_users() HTML output.
         *
         * @since 2.3.0
         *
@@ -1135,7 +1156,7 @@ function sanitize_user_field($field, $value, $user_id, $context) {
                } else {
 
                        /**
-                        * Filter a user field value in the 'edit' context.
+                        * Filters a user field value in the 'edit' context.
                         *
                         * The dynamic portion of the hook name, `$field`, refers to the prefixed user
                         * field being filtered, such as 'user_login', 'user_email', 'first_name', etc.
@@ -1159,7 +1180,7 @@ function sanitize_user_field($field, $value, $user_id, $context) {
                } else {
 
                        /**
-                        * Filter the value of a user field in the 'db' context.
+                        * Filters the value of a user field in the 'db' context.
                         *
                         * The dynamic portion of the hook name, `$field`, refers to the prefixed user
                         * field being filtered, such as 'user_login', 'user_email', 'first_name', etc.
@@ -1179,7 +1200,7 @@ function sanitize_user_field($field, $value, $user_id, $context) {
                } else {
 
                        /**
-                        * Filter the value of a user field in a standard context.
+                        * Filters the value of a user field in a standard context.
                         *
                         * The dynamic portion of the hook name, `$field`, refers to the prefixed user
                         * field being filtered, such as 'user_login', 'user_email', 'first_name', etc.
@@ -1303,7 +1324,7 @@ function validate_username( $username ) {
        $valid = ( $sanitized == $username && ! empty( $sanitized ) );
 
        /**
-        * Filter whether the provided username is valid or not.
+        * Filters whether the provided username is valid or not.
         *
         * @since 2.0.1
         *
@@ -1393,7 +1414,7 @@ function wp_insert_user( $userdata ) {
        $sanitized_user_login = sanitize_user( $userdata['user_login'], true );
 
        /**
-        * Filter a username after it has been sanitized.
+        * Filters a username after it has been sanitized.
         *
         * This filter is called before the user is created or updated.
         *
@@ -1418,7 +1439,7 @@ function wp_insert_user( $userdata ) {
        }
 
        /**
-        * Filter the list of blacklisted usernames.
+        * Filters the list of blacklisted usernames.
         *
         * @since 4.4.0
         *
@@ -1449,7 +1470,7 @@ function wp_insert_user( $userdata ) {
        $meta = array();
 
        /**
-        * Filter a user's nicename before the user is created or updated.
+        * Filters a user's nicename before the user is created or updated.
         *
         * @since 2.0.3
         *
@@ -1460,7 +1481,7 @@ function wp_insert_user( $userdata ) {
        $raw_user_url = empty( $userdata['user_url'] ) ? '' : $userdata['user_url'];
 
        /**
-        * Filter a user's URL before the user is created or updated.
+        * Filters a user's URL before the user is created or updated.
         *
         * @since 2.0.3
         *
@@ -1471,7 +1492,7 @@ function wp_insert_user( $userdata ) {
        $raw_user_email = empty( $userdata['user_email'] ) ? '' : $userdata['user_email'];
 
        /**
-        * Filter a user's email before the user is created or updated.
+        * Filters a user's email before the user is created or updated.
         *
         * @since 2.0.3
         *
@@ -1493,7 +1514,7 @@ function wp_insert_user( $userdata ) {
        $nickname = empty( $userdata['nickname'] ) ? $user_login : $userdata['nickname'];
 
        /**
-        * Filter a user's nickname before the user is created or updated.
+        * Filters a user's nickname before the user is created or updated.
         *
         * @since 2.0.3
         *
@@ -1504,7 +1525,7 @@ function wp_insert_user( $userdata ) {
        $first_name = empty( $userdata['first_name'] ) ? '' : $userdata['first_name'];
 
        /**
-        * Filter a user's first name before the user is created or updated.
+        * Filters a user's first name before the user is created or updated.
         *
         * @since 2.0.3
         *
@@ -1515,7 +1536,7 @@ function wp_insert_user( $userdata ) {
        $last_name = empty( $userdata['last_name'] ) ? '' : $userdata['last_name'];
 
        /**
-        * Filter a user's last name before the user is created or updated.
+        * Filters a user's last name before the user is created or updated.
         *
         * @since 2.0.3
         *
@@ -1541,7 +1562,7 @@ function wp_insert_user( $userdata ) {
        }
 
        /**
-        * Filter a user's display name before the user is created or updated.
+        * Filters a user's display name before the user is created or updated.
         *
         * @since 2.0.3
         *
@@ -1552,7 +1573,7 @@ function wp_insert_user( $userdata ) {
        $description = empty( $userdata['description'] ) ? '' : $userdata['description'];
 
        /**
-        * Filter a user's description before the user is created or updated.
+        * Filters a user's description before the user is created or updated.
         *
         * @since 2.0.3
         *
@@ -1604,7 +1625,7 @@ function wp_insert_user( $userdata ) {
        $user = new WP_User( $user_id );
 
        /**
-        * Filter a user's meta values and keys before the user is created or updated.
+        * Filters a user's meta values and keys before the user is created or updated.
         *
         * Does not include contact methods. These are added using `wp_get_user_contact_methods( $user )`.
         *
@@ -1723,7 +1744,7 @@ function wp_update_user($userdata) {
                $userdata['user_pass'] = wp_hash_password( $userdata['user_pass'] );
 
                /**
-                * Filter whether to send the password change email.
+                * Filters whether to send the password change email.
                 *
                 * @since 4.3.0
                 *
@@ -1739,7 +1760,7 @@ function wp_update_user($userdata) {
 
        if ( isset( $userdata['user_email'] ) && $user['user_email'] !== $userdata['user_email'] ) {
                /**
-                * Filter whether to send the email change email.
+                * Filters whether to send the email change email.
                 *
                 * @since 4.3.0
                 *
@@ -1788,7 +1809,7 @@ All at ###SITENAME###
                        );
 
                        /**
-                        * Filter the contents of the email sent when the user's password is changed.
+                        * Filters the contents of the email sent when the user's password is changed.
                         *
                         * @since 4.3.0
                         *
@@ -1843,7 +1864,7 @@ All at ###SITENAME###
                        );
 
                        /**
-                        * Filter the contents of the email sent when the user's email is changed.
+                        * Filters the contents of the email sent when the user's email is changed.
                         *
                         * @since 4.3.0
                         *
@@ -1899,7 +1920,7 @@ All at ###SITENAME###
  * A simpler way of inserting a user into the database.
  *
  * Creates a new user with just the username, password, and email. For more
- * complex user creation use {@see wp_insert_user()} to specify more information.
+ * complex user creation use wp_insert_user() to specify more information.
  *
  * @since 2.0.0
  * @see wp_insert_user() More complete way to create a new user
@@ -1957,7 +1978,7 @@ function wp_get_user_contact_methods( $user = null ) {
        }
 
        /**
-        * Filter the user contact methods.
+        * Filters the user contact methods.
         *
         * @since 2.9.0
         *
@@ -1993,7 +2014,7 @@ function wp_get_password_hint() {
        $hint = __( 'Hint: The password should be at least twelve characters long. To make it stronger, use upper and lower case letters, numbers, and symbols like ! " ? $ % ^ &amp; ).' );
 
        /**
-        * Filter the text describing the site's password complexity policy.
+        * Filters the text describing the site's password complexity policy.
         *
         * @since 4.1.0
         *
@@ -2020,6 +2041,8 @@ function get_password_reset_key( $user ) {
        /**
         * Fires before a new password is retrieved.
         *
+        * Use the {@see 'retrieve_password'} hook instead.
+        *
         * @since 1.5.0
         * @deprecated 1.5.1 Misspelled. Use 'retrieve_password' hook instead.
         *
@@ -2036,15 +2059,20 @@ function get_password_reset_key( $user ) {
         */
        do_action( 'retrieve_password', $user->user_login );
 
+       $allow = true;
+       if ( is_multisite() && is_user_spammy( $user ) ) {
+               $allow = false;
+       }
+
        /**
-        * Filter whether to allow a password to be reset.
+        * Filters whether to allow a password to be reset.
         *
         * @since 2.7.0
         *
         * @param bool $allow         Whether to allow the password to be reset. Default true.
         * @param int  $user_data->ID The ID of the user attempting to reset a password.
         */
-       $allow = apply_filters( 'allow_password_reset', true, $user->ID );
+       $allow = apply_filters( 'allow_password_reset', $allow, $user->ID );
 
        if ( ! $allow ) {
                return new WP_Error( 'no_password_reset', __( 'Password reset is not allowed for this user' ) );
@@ -2117,7 +2145,7 @@ function check_password_reset_key($key, $login) {
        }
 
        /**
-        * Filter the expiration time of password reset keys.
+        * Filters the expiration time of password reset keys.
         *
         * @since 4.3.0
         *
@@ -2151,7 +2179,7 @@ function check_password_reset_key($key, $login) {
                $user_id = $row->ID;
 
                /**
-                * Filter the return value of check_password_reset_key() when an
+                * Filters the return value of check_password_reset_key() when an
                 * old-style key is used.
                 *
                 * @since 3.7.0 Previously plain-text keys were stored in the database.
@@ -2214,7 +2242,7 @@ function register_new_user( $user_login, $user_email ) {
 
        $sanitized_user_login = sanitize_user( $user_login );
        /**
-        * Filter the email address of a user being registered.
+        * Filters the email address of a user being registered.
         *
         * @since 2.1.0
         *
@@ -2263,7 +2291,7 @@ function register_new_user( $user_login, $user_email ) {
        do_action( 'register_post', $sanitized_user_login, $user_email, $errors );
 
        /**
-        * Filter the errors encountered when a new user is being registered.
+        * Filters the errors encountered when a new user is being registered.
         *
         * The filtered WP_Error object may, for example, contain errors for an invalid
         * or existing username or email address. A WP_Error object should always returned,
@@ -2305,15 +2333,18 @@ function register_new_user( $user_login, $user_email ) {
 }
 
 /**
- * Initiate email notifications related to the creation of new users.
+ * Initiates email notifications related to the creation of new users.
  *
  * Notifications are sent both to the site admin and to the newly created user.
  *
  * @since 4.4.0
+ * @since 4.6.0 Converted the `$notify` parameter to accept 'user' for sending
+ *              notifications only to the user created.
  *
  * @param int    $user_id ID of the newly created user.
- * @param string $notify  Optional. Type of notification that should happen. Accepts 'admin' or an empty string
- *                        (admin only), or 'both' (admin and user). Default 'both'.
+ * @param string $notify  Optional. Type of notification that should happen. Accepts 'admin'
+ *                        or an empty string (admin only), 'user', or 'both' (admin and user).
+ *                        Default 'both'.
  */
 function wp_send_new_user_notifications( $user_id, $notify = 'both' ) {
        wp_new_user_notification( $user_id, null, $notify );
@@ -2454,7 +2485,7 @@ function _wp_get_current_user() {
        }
 
        /**
-        * Filter the current user.
+        * Filters the current user.
         *
         * The default filters use this to determine the current user from the
         * request's cookies, if available.
index c903101997a60c37b49606514f44332a8c062b67..9c9cb33dd467c0d070e8c9e527b7939da0add0bc 100644 (file)
@@ -59,7 +59,7 @@ if ( isset($_SERVER['HTTP_USER_AGENT']) ) {
                if ( stripos( $_SERVER['HTTP_USER_AGENT'], 'chromeframe' ) !== false ) {
                        $is_admin = is_admin();
                        /**
-                        * Filter whether Google Chrome Frame should be used, if available.
+                        * Filters whether Google Chrome Frame should be used, if available.
                         *
                         * @since 3.2.0
                         *
index 6024172daeb2a78ba579f2a2318488353b2c87a9..9abd1a7b51977f85e5bb4a4f254b064990fc0c57 100644 (file)
@@ -4,21 +4,21 @@
  *
  * @global string $wp_version
  */
-$wp_version = '4.5.3';
+$wp_version = '4.6';
 
 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
  *
  * @global int $wp_db_version
  */
-$wp_db_version = 36686;
+$wp_db_version = 37965;
 
 /**
  * Holds the TinyMCE version
  *
  * @global string $tinymce_version
  */
-$tinymce_version = '4310-20160418';
+$tinymce_version = '4401-20160726';
 
 /**
  * Holds the required PHP version
index 6c559c37e7e40cff615f02c50fa606d3f58ced1d..3540be9b30e1b8deab9646b7363ccb555acf9c35 100644 (file)
@@ -114,10 +114,10 @@ function register_widget($widget_class) {
 }
 
 /**
- * Unregister a widget
+ * Unregisters a widget.
  *
- * Unregisters a WP_Widget widget. Useful for unregistering default widgets.
- * Run within a function hooked to the widgets_init action.
+ * Unregisters a WP_Widget widget. Useful for un-registering default widgets.
+ * Run within a function hooked to the {@see 'widgets_init'} action.
  *
  * @since 2.8.0
  *
@@ -125,7 +125,7 @@ function register_widget($widget_class) {
  *
  * @global WP_Widget_Factory $wp_widget_factory
  *
- * @param string $widget_class The name of a class that extends WP_Widget
+ * @param string $widget_class The name of a class that extends WP_Widget.
  */
 function unregister_widget($widget_class) {
        global $wp_widget_factory;
@@ -521,7 +521,7 @@ function wp_register_widget_control( $id, $name, $control_callback, $options = a
  *
  * @param string   $id_base         The base ID of a widget created by extending WP_Widget.
  * @param callable $update_callback Update callback method for the widget.
- * @param array    $options         Optional. Widget control options. See {@see wp_register_widget_control()}.
+ * @param array    $options         Optional. Widget control options. See wp_register_widget_control().
  *                                  Default empty array.
  */
 function _register_widget_update_callback( $id_base, $update_callback, $options = array() ) {
@@ -552,7 +552,7 @@ function _register_widget_update_callback( $id_base, $update_callback, $options
  * @param int|string $id            Widget ID.
  * @param string     $name          Name attribute for the widget.
  * @param callable   $form_callback Form callback.
- * @param array      $options       Optional. Widget control options. See {@see wp_register_widget_control()}.
+ * @param array      $options       Optional. Widget control options. See wp_register_widget_control().
  *                                  Default empty array.
  */
 function _register_widget_form_callback($id, $name, $form_callback, $options = array()) {
@@ -672,7 +672,7 @@ function dynamic_sidebar( $index = 1 ) {
                $params[0]['before_widget'] = sprintf($params[0]['before_widget'], $id, $classname_);
 
                /**
-                * Filter the parameters passed to a widget's display callback.
+                * Filters the parameters passed to a widget's display callback.
                 *
                 * Note: The filter is evaluated on both the front end and back end,
                 * including for the Inactive Widgets sidebar on the Widgets screen.
@@ -755,7 +755,7 @@ function dynamic_sidebar( $index = 1 ) {
        do_action( 'dynamic_sidebar_after', $index, true );
 
        /**
-        * Filter whether a sidebar has widgets.
+        * Filters whether a sidebar has widgets.
         *
         * Note: The filter is also evaluated for empty sidebars, and on both the front end
         * and back end, including the Inactive Widgets sidebar on the Widgets screen.
@@ -780,7 +780,7 @@ function dynamic_sidebar( $index = 1 ) {
  * the widget with that callback/$id_base AND that ID is found.
  *
  * NOTE: $widget_id and $id_base are the same for single widgets. To be effective
- * this function has to run after widgets have initialized, at action 'init' or later.
+ * this function has to run after widgets have initialized, at action {@see 'init'} or later.
  *
  * @since 2.2.0
  *
@@ -853,7 +853,7 @@ function is_active_sidebar( $index ) {
        $is_active_sidebar = ! empty( $sidebars_widgets[$index] );
 
        /**
-        * Filter whether a dynamic sidebar is considered "active".
+        * Filters whether a dynamic sidebar is considered "active".
         *
         * @since 3.9.0
         *
@@ -904,7 +904,7 @@ function wp_get_sidebars_widgets( $deprecated = true ) {
                unset($sidebars_widgets['array_version']);
 
        /**
-        * Filter the list of sidebars and their widgets.
+        * Filters the list of sidebars and their widgets.
         *
         * @since 2.7.0
         *
@@ -1429,10 +1429,9 @@ function wp_widget_rss_process( $widget_rss, $check_feed = true ) {
 }
 
 /**
- * Register all of the default WordPress widgets on startup.
+ * Registers all of the default WordPress widgets on startup.
  *
- * Calls 'widgets_init' action after all of the WordPress widgets have been
- * registered.
+ * Calls {@see 'widgets_init'} action after all of the WordPress widgets have been registered.
  *
  * @since 2.2.0
  */
index d465525913749874455b689278b28fd34853ca53..336845845716c37a3cd9cdd32ecf18deaae56a40 100644 (file)
@@ -14,7 +14,7 @@
  *
  * @see WP_Widget
  */
- class WP_Nav_Menu_Widget extends WP_Widget {
+class WP_Nav_Menu_Widget extends WP_Widget {
 
        /**
         * Sets up a new Custom Menu widget instance.
@@ -61,7 +61,7 @@
                );
 
                /**
-                * Filter the arguments for the Custom Menu widget.
+                * Filters the arguments for the Custom Menu widget.
                 *
                 * @since 4.2.0
                 * @since 4.4.0 Added the `$instance` parameter.
         * @access public
         *
         * @param array $instance Current settings.
+        * @global WP_Customize_Manager $wp_customize
         */
        public function form( $instance ) {
+               global $wp_customize;
                $title = isset( $instance['title'] ) ? $instance['title'] : '';
                $nav_menu = isset( $instance['nav_menu'] ) ? $instance['nav_menu'] : '';
 
                ?>
                <p class="nav-menu-widget-no-menus-message" <?php if ( ! empty( $menus ) ) { echo ' style="display:none" '; } ?>>
                        <?php
-                       if ( isset( $GLOBALS['wp_customize'] ) && $GLOBALS['wp_customize'] instanceof WP_Customize_Manager ) {
+                       if ( $wp_customize instanceof WP_Customize_Manager ) {
                                $url = 'javascript: wp.customize.panel( "nav_menus" ).focus();';
                        } else {
                                $url = admin_url( 'nav-menus.php' );
                                        <?php endforeach; ?>
                                </select>
                        </p>
+                       <?php if ( $wp_customize instanceof WP_Customize_Manager ) : ?>
+                               <p class="edit-selected-nav-menu" style="<?php if ( ! $nav_menu ) { echo 'display: none;'; } ?>">
+                                       <button type="button" class="button"><?php _e( 'Edit Menu' ) ?></button>
+                               </p>
+                       <?php endif; ?>
                </div>
                <?php
        }
index ba12572bcbee35e228fe531b279c9164c68eb432..f36b47ee8ed7b2dc2b7f211db4f0a16d354e6acc 100644 (file)
@@ -60,7 +60,7 @@ class WP_Widget_Archives extends WP_Widget {
                <select id="<?php echo esc_attr( $dropdown_id ); ?>" name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'>
                        <?php
                        /**
-                        * Filter the arguments for the Archives widget drop-down.
+                        * Filters the arguments for the Archives widget drop-down.
                         *
                         * @since 2.8.0
                         *
@@ -101,7 +101,7 @@ class WP_Widget_Archives extends WP_Widget {
                <ul>
                <?php
                /**
-                * Filter the arguments for the Archives widget.
+                * Filters the arguments for the Archives widget.
                 *
                 * @since 2.8.0
                 *
index 2fbc62a2e85a3ebd9ecd8282fc666768e839674f..2e52423d123dac337f3382f65523525c68585fb7 100644 (file)
@@ -72,7 +72,7 @@ class WP_Widget_Categories extends WP_Widget {
                        $cat_args['id'] = $dropdown_id;
 
                        /**
-                        * Filter the arguments for the Categories widget drop-down.
+                        * Filters the arguments for the Categories widget drop-down.
                         *
                         * @since 2.8.0
                         *
@@ -105,7 +105,7 @@ class WP_Widget_Categories extends WP_Widget {
                $cat_args['title_li'] = '';
 
                /**
-                * Filter the arguments for the Categories widget.
+                * Filters the arguments for the Categories widget.
                 *
                 * @since 2.8.0
                 *
index 68d86f16d7c2f75cf2c0d4174fe79cc4f37534e1..b3bda4cef57a059c33189945ac936c3846cb7f43 100644 (file)
@@ -69,7 +69,7 @@ class WP_Widget_Links extends WP_Widget {
                );
 
                /**
-                * Filter the arguments for the Links widget.
+                * Filters the arguments for the Links widget.
                 *
                 * @since 2.6.0
                 * @since 4.4.0 The `$instance` parameter was added.
index 2de9844a52d93ea9598a2b7ebaf6ec1fb927bf4b..e4a3b51ac96d8f8a99990c90d21be0f6d0968ec5 100644 (file)
@@ -59,7 +59,7 @@ class WP_Widget_Meta extends WP_Widget {
                        <li><a href="<?php echo esc_url( get_bloginfo( 'comments_rss2_url' ) ); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
                        <?php
                        /**
-                        * Filter the "Powered by WordPress" text in the Meta widget.
+                        * Filters the "Powered by WordPress" text in the Meta widget.
                         *
                         * @since 3.6.0
                         *
index 165f33487d66eb1716b3f4b2376a6dd9aea1a6d5..9fd2afc573c57eb1c20adbf59404b8ead4c73987 100644 (file)
@@ -44,7 +44,7 @@ class WP_Widget_Pages extends WP_Widget {
        public function widget( $args, $instance ) {
 
                /**
-                * Filter the widget title.
+                * Filters the widget title.
                 *
                 * @since 2.6.0
                 *
@@ -61,7 +61,7 @@ class WP_Widget_Pages extends WP_Widget {
                        $sortby = 'menu_order, post_title';
 
                /**
-                * Filter the arguments for the Pages widget.
+                * Filters the arguments for the Pages widget.
                 *
                 * @since 2.8.0
                 *
index 71fb4d2f5a69b4e3d683c45fa46919eb0dc072a0..fb78e88c7943053a1363d2b0533a6397a705252b 100644 (file)
@@ -44,7 +44,7 @@ class WP_Widget_Recent_Comments extends WP_Widget {
         */
        public function recent_comments_style() {
                /**
-                * Filter the Recent Comments default widget styles.
+                * Filters the Recent Comments default widget styles.
                 *
                 * @since 3.1.0
                 *
@@ -85,7 +85,7 @@ class WP_Widget_Recent_Comments extends WP_Widget {
                        $number = 5;
 
                /**
-                * Filter the arguments for the Recent Comments widget.
+                * Filters the arguments for the Recent Comments widget.
                 *
                 * @since 3.4.0
                 *
@@ -173,6 +173,6 @@ class WP_Widget_Recent_Comments extends WP_Widget {
         * @deprecated 4.4.0 Fragment caching was removed in favor of split queries.
         */
        public function flush_widget_cache() {
-               _deprecated_function( __METHOD__, '4.4' );
+               _deprecated_function( __METHOD__, '4.4.0' );
        }
 }
index fdb54a0ff2edc87854b8c243e75027e26e095b5d..9483b97e27421ddc8623ee4272fe5991ca8dd7af 100644 (file)
@@ -58,7 +58,7 @@ class WP_Widget_Recent_Posts extends WP_Widget {
                $show_date = isset( $instance['show_date'] ) ? $instance['show_date'] : false;
 
                /**
-                * Filter the arguments for the Recent Posts widget.
+                * Filters the arguments for the Recent Posts widget.
                 *
                 * @since 3.4.0
                 *
index 1251e1d29eb8428481fdc83efac54a087139e836..ae0832acbffbc37a44a3dc219b22c5474dc5013b 100644 (file)
@@ -54,7 +54,7 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
                }
 
                /**
-                * Filter the taxonomy used in the Tag Cloud widget.
+                * Filters the taxonomy used in the Tag Cloud widget.
                 *
                 * @since 2.8.0
                 * @since 3.0.0 Added taxonomy drop-down.
index a8ec3d4fd81dff90fe6d5dd186780f2d75f74b5a..a379fd719dc316e995179d15575f461c830bc4ad 100644 (file)
@@ -50,7 +50,7 @@ class WP_Widget_Text extends WP_Widget {
                $widget_text = ! empty( $instance['text'] ) ? $instance['text'] : '';
 
                /**
-                * Filter the content of the Text widget.
+                * Filters the content of the Text widget.
                 *
                 * @since 2.3.0
                 * @since 4.4.0 Added the `$this` parameter.
index 066e851fa3e45270fe0a46908be12246a882fc49..2f8dbcf96968353f799f6fab46a737f408c762e4 100644 (file)
@@ -670,7 +670,7 @@ class wpdb {
        }
 
        /**
-        * PHP5 style magic getter, used to lazy-load expensive data.
+        * Makes private properties readable for backward compatibility.
         *
         * @since 3.5.0
         *
@@ -685,7 +685,7 @@ class wpdb {
        }
 
        /**
-        * Magic function, for backwards compatibility.
+        * Makes private properties settable for backward compatibility.
         *
         * @since 3.5.0
         *
@@ -705,7 +705,7 @@ class wpdb {
        }
 
        /**
-        * Magic function, for backwards compatibility.
+        * Makes private properties check-able for backward compatibility.
         *
         * @since 3.5.0
         *
@@ -718,7 +718,7 @@ class wpdb {
        }
 
        /**
-        * Magic function, for backwards compatibility.
+        * Makes private properties un-settable for backward compatibility.
         *
         * @since 3.5.0
         *
@@ -735,31 +735,62 @@ class wpdb {
         */
        public function init_charset() {
                if ( function_exists('is_multisite') && is_multisite() ) {
-                       $this->charset = 'utf8';
+                       $charset = 'utf8';
                        if ( defined( 'DB_COLLATE' ) && DB_COLLATE ) {
-                               $this->collate = DB_COLLATE;
+                               $collate = DB_COLLATE;
                        } else {
-                               $this->collate = 'utf8_general_ci';
+                               $collate = 'utf8_general_ci';
                        }
                } elseif ( defined( 'DB_COLLATE' ) ) {
-                       $this->collate = DB_COLLATE;
+                       $collate = DB_COLLATE;
                }
 
                if ( defined( 'DB_CHARSET' ) ) {
-                       $this->charset = DB_CHARSET;
+                       $charset = DB_CHARSET;
                }
 
+               $charset_collate = $this->determine_charset( $charset, $collate );
+
+               $this->charset = $charset_collate['charset'];
+               $this->collate = $charset_collate['collate'];
+       }
+
+       /**
+        * Determines the best charset and collation to use given a charset and collation.
+        *
+        * For example, when able, utf8mb4 should be used instead of utf8.
+        *
+        * @since 4.6.0
+        * @access public
+        *
+        * @param string $charset The character set to check.
+        * @param string $collate The collation to check.
+        * @return array The most appropriate character set and collation to use.
+        */
+       public function determine_charset( $charset, $collate ) {
                if ( ( $this->use_mysqli && ! ( $this->dbh instanceof mysqli ) ) || empty( $this->dbh ) ) {
-                       return;
+                       return compact( 'charset', 'collate' );
                }
 
-               if ( 'utf8' === $this->charset && $this->has_cap( 'utf8mb4' ) ) {
-                       $this->charset = 'utf8mb4';
+               if ( 'utf8' === $charset && $this->has_cap( 'utf8mb4' ) ) {
+                       $charset = 'utf8mb4';
                }
 
-               if ( 'utf8mb4' === $this->charset && ( ! $this->collate || stripos( $this->collate, 'utf8_' ) === 0 ) ) {
-                       $this->collate = 'utf8mb4_unicode_ci';
+               if ( 'utf8mb4' === $charset ) {
+                       // _general_ is outdated, so we can upgrade it to _unicode_, instead.
+                       if ( ! $collate || 'utf8_general_ci' === $collate ) {
+                               $collate = 'utf8mb4_unicode_ci';
+                       } else {
+                               $collate = str_replace( 'utf8_', 'utf8mb4_', $collate );
+                       }
                }
+
+               // _unicode_520_ is a better collation, we should use that when it's available.
+               if ( $this->has_cap( 'utf8mb4_520' ) && 'utf8mb4_unicode_ci' === $collate ) {
+                       $collate = 'utf8mb4_unicode_520_ci';
+               }
+
+               return compact( 'charset', 'collate' );
        }
 
        /**
@@ -780,21 +811,19 @@ class wpdb {
                        if ( $this->use_mysqli ) {
                                if ( function_exists( 'mysqli_set_charset' ) && $this->has_cap( 'set_charset' ) ) {
                                        mysqli_set_charset( $dbh, $charset );
-                               } else {
-                                       $query = $this->prepare( 'SET NAMES %s', $charset );
-                                       if ( ! empty( $collate ) )
-                                               $query .= $this->prepare( ' COLLATE %s', $collate );
-                                       mysqli_query( $dbh, $query );
                                }
+                               $query = $this->prepare( 'SET NAMES %s', $charset );
+                               if ( ! empty( $collate ) )
+                                       $query .= $this->prepare( ' COLLATE %s', $collate );
+                               mysqli_query( $dbh, $query );
                        } else {
                                if ( function_exists( 'mysql_set_charset' ) && $this->has_cap( 'set_charset' ) ) {
                                        mysql_set_charset( $charset, $dbh );
-                               } else {
-                                       $query = $this->prepare( 'SET NAMES %s', $charset );
-                                       if ( ! empty( $collate ) )
-                                               $query .= $this->prepare( ' COLLATE %s', $collate );
-                                       mysql_query( $query, $dbh );
                                }
+                               $query = $this->prepare( 'SET NAMES %s', $charset );
+                               if ( ! empty( $collate ) )
+                                       $query .= $this->prepare( ' COLLATE %s', $collate );
+                               mysql_query( $query, $dbh );
                        }
                }
        }
@@ -841,7 +870,7 @@ class wpdb {
                $modes = array_change_key_case( $modes, CASE_UPPER );
 
                /**
-                * Filter the list of incompatible SQL modes to exclude.
+                * Filters the list of incompatible SQL modes to exclude.
                 *
                 * @since 3.9.0
                 *
@@ -1106,7 +1135,7 @@ class wpdb {
         */
        function _weak_escape( $string ) {
                if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) )
-                       _deprecated_function( __METHOD__, '3.6', 'wpdb::prepare() or esc_sql()' );
+                       _deprecated_function( __METHOD__, '3.6.0', 'wpdb::prepare() or esc_sql()' );
                return addslashes( $string );
        }
 
@@ -1133,9 +1162,9 @@ class wpdb {
                $class = get_class( $this );
                if ( function_exists( '__' ) ) {
                        /* translators: %s: database access abstraction class, usually wpdb or a class extending wpdb */
-                       _doing_it_wrong( $class, sprintf( __( '%s must set a database connection for use with escaping.' ), $class ), E_USER_NOTICE );
+                       _doing_it_wrong( $class, sprintf( __( '%s must set a database connection for use with escaping.' ), $class ), '3.6.0' );
                } else {
-                       _doing_it_wrong( $class, sprintf( '%s must set a database connection for use with escaping.', $class ), E_USER_NOTICE );
+                       _doing_it_wrong( $class, sprintf( '%s must set a database connection for use with escaping.', $class ), '3.6.0' );
                }
                return addslashes( $string );
        }
@@ -1180,7 +1209,7 @@ class wpdb {
         */
        public function escape( $data ) {
                if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) )
-                       _deprecated_function( __METHOD__, '3.6', 'wpdb::prepare() or esc_sql()' );
+                       _deprecated_function( __METHOD__, '3.6.0', 'wpdb::prepare() or esc_sql()' );
                if ( is_array( $data ) ) {
                        foreach ( $data as $k => $v ) {
                                if ( is_array( $v ) )
@@ -1225,22 +1254,22 @@ class wpdb {
         * Does not support sign, padding, alignment, width or precision specifiers.
         * Does not support argument numbering/swapping.
         *
-        * May be called like {@link http://php.net/sprintf sprintf()} or like {@link http://php.net/vsprintf vsprintf()}.
+        * May be called like {@link https://secure.php.net/sprintf sprintf()} or like {@link https://secure.php.net/vsprintf vsprintf()}.
         *
         * Both %d and %s should be left unquoted in the query string.
         *
         *     wpdb::prepare( "SELECT * FROM `table` WHERE `column` = %s AND `field` = %d", 'foo', 1337 )
         *     wpdb::prepare( "SELECT DATE_FORMAT(`field`, '%%c') FROM `table` WHERE `column` = %s", 'foo' );
         *
-        * @link http://php.net/sprintf Description of syntax.
+        * @link https://secure.php.net/sprintf Description of syntax.
         * @since 2.3.0
         *
         * @param string      $query    Query statement with sprintf()-like placeholders
         * @param array|mixed $args     The array of variables to substitute into the query's placeholders if being called like
-        *                              {@link http://php.net/vsprintf vsprintf()}, or the first variable to substitute into the query's placeholders if
-        *                              being called like {@link http://php.net/sprintf sprintf()}.
+        *                              {@link https://secure.php.net/vsprintf vsprintf()}, or the first variable to substitute into the query's placeholders if
+        *                              being called like {@link https://secure.php.net/sprintf sprintf()}.
         * @param mixed       $args,... further variables to substitute into the query's placeholders if being called like
-        *                              {@link http://php.net/sprintf sprintf()}.
+        *                              {@link https://secure.php.net/sprintf sprintf()}.
         * @return string|void Sanitized query string, if there is a query to prepare.
         */
        public function prepare( $query, $args ) {
@@ -1249,7 +1278,7 @@ class wpdb {
 
                // This is not meant to be foolproof -- but it will catch obviously incorrect usage.
                if ( strpos( $query, '%' ) === false ) {
-                       _doing_it_wrong( 'wpdb::prepare', sprintf( __( 'The query argument of %s must have a placeholder.' ), 'wpdb::prepare()' ), '3.9' );
+                       _doing_it_wrong( 'wpdb::prepare', sprintf( __( 'The query argument of %s must have a placeholder.' ), 'wpdb::prepare()' ), '3.9.0' );
                }
 
                $args = func_get_args();
@@ -1576,10 +1605,10 @@ class wpdb {
        }
 
        /**
-        * Check that the connection to the database is still up. If not, try to reconnect.
+        * Checks that the connection to the database is still up. If not, try to reconnect.
         *
         * If this function is unable to reconnect, it will forcibly die, or if after the
-        * the template_redirect hook has been fired, return false instead.
+        * the {@see 'template_redirect'} hook has been fired, return false instead.
         *
         * If $allow_bail is false, the lack of database connection will need
         * to be handled manually.
@@ -1681,7 +1710,7 @@ class wpdb {
                }
 
                /**
-                * Filter the database query.
+                * Filters the database query.
                 *
                 * Some queries are made before the plugins have been loaded,
                 * and thus cannot be filtered with this method.
@@ -1711,18 +1740,28 @@ class wpdb {
 
                $this->check_current_query = true;
 
-               // Keep track of the last query for debug..
+               // Keep track of the last query for debug.
                $this->last_query = $query;
 
                $this->_do_query( $query );
 
-               // MySQL server has gone away, try to reconnect
+               // MySQL server has gone away, try to reconnect.
                $mysql_errno = 0;
                if ( ! empty( $this->dbh ) ) {
                        if ( $this->use_mysqli ) {
-                               $mysql_errno = mysqli_errno( $this->dbh );
+                               if ( $this->dbh instanceof mysqli ) {
+                                       $mysql_errno = mysqli_errno( $this->dbh );
+                               } else {
+                                       // $dbh is defined, but isn't a real connection.
+                                       // Something has gone horribly wrong, let's try a reconnect.
+                                       $mysql_errno = 2006;
+                               }
                        } else {
-                               $mysql_errno = mysql_errno( $this->dbh );
+                               if ( is_resource( $this->dbh ) ) {
+                                       $mysql_errno = mysql_errno( $this->dbh );
+                               } else {
+                                       $mysql_errno = 2006;
+                               }
                        }
                }
 
@@ -1735,11 +1774,19 @@ class wpdb {
                        }
                }
 
-               // If there is an error then take note of it..
+               // If there is an error then take note of it.
                if ( $this->use_mysqli ) {
-                       $this->last_error = mysqli_error( $this->dbh );
+                       if ( $this->dbh instanceof mysqli ) {
+                               $this->last_error = mysqli_error( $this->dbh );
+                       } else {
+                               $this->last_error = __( 'Unable to retrieve the error message from MySQL' );
+                       }
                } else {
-                       $this->last_error = mysql_error( $this->dbh );
+                       if ( is_resource( $this->dbh ) ) {
+                               $this->last_error = mysql_error( $this->dbh );
+                       } else {
+                               $this->last_error = __( 'Unable to retrieve the error message from MySQL' );
+                       }
                }
 
                if ( $this->last_error ) {
@@ -2374,7 +2421,7 @@ class wpdb {
                $tablekey = strtolower( $table );
 
                /**
-                * Filter the table charset value before the DB is checked.
+                * Filters the table charset value before the DB is checked.
                 *
                 * Passing a non-null value to the filter will effectively short-circuit
                 * checking the DB for the charset, returning that value instead.
@@ -2478,7 +2525,7 @@ class wpdb {
                $columnkey = strtolower( $column );
 
                /**
-                * Filter the column charset value before the DB is checked.
+                * Filters the column charset value before the DB is checked.
                 *
                 * Passing a non-null value to the filter will short-circuit
                 * checking the DB for the charset, returning that value instead.
@@ -3163,7 +3210,7 @@ class wpdb {
         * @return bool True if collation is supported, false if version does not
         */
        public function supports_collation() {
-               _deprecated_function( __FUNCTION__, '3.5', 'wpdb::has_cap( \'collation\' )' );
+               _deprecated_function( __FUNCTION__, '3.5.0', 'wpdb::has_cap( \'collation\' )' );
                return $this->has_cap( 'collation' );
        }
 
@@ -3189,7 +3236,8 @@ class wpdb {
         * Determine if a database supports a particular feature.
         *
         * @since 2.7.0
-        * @since 4.1.0 Support was added for the 'utf8mb4' feature.
+        * @since 4.1.0 Added support for the 'utf8mb4' feature.
+        * @since 4.6.0 Added support for the 'utf8mb4_520' feature.
         *
         * @see wpdb::db_version()
         *
@@ -3228,6 +3276,8 @@ class wpdb {
                                } else {
                                        return version_compare( $client_version, '5.5.3', '>=' );
                                }
+                       case 'utf8mb4_520' : // @since 4.6.0
+                               return version_compare( $version, '5.6', '>=' );
                }
 
                return false;
index 832a62f8b33f33263f99723663010a4d4468ae1d..8eeacddc15327a64ac2abba8931e3ee6dede9f48 100644 (file)
@@ -159,7 +159,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
                                $processed_line = htmlspecialchars( $line );
 
                                /**
-                                * Contextually filter a diffed line.
+                                * Contextually filters a diffed line.
                                 *
                                 * Filters TextDiff processing of diffed line. By default, diffs are processed with
                                 * htmlspecialchars. Use this filter to remove or change the processing. Passes a context
@@ -458,7 +458,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
        }
 
        /**
-        * Make private properties readable for backwards compatibility.
+        * Make private properties readable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -473,7 +473,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
        }
 
        /**
-        * Make private properties settable for backwards compatibility.
+        * Make private properties settable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -489,7 +489,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
        }
 
        /**
-        * Make private properties checkable for backwards compatibility.
+        * Make private properties checkable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
@@ -504,7 +504,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
        }
 
        /**
-        * Make private properties un-settable for backwards compatibility.
+        * Make private properties un-settable for backward compatibility.
         *
         * @since 4.0.0
         * @access public
index b196f736da518a16f231e0b1f0c80bee477d3dfe..ea3a50b49e53d9e575693f8f111586d1f50e069c 100644 (file)
@@ -46,7 +46,7 @@ else
 
 foreach ( (array)$cats as $cat ) :
        /**
-        * Filter the OPML outline link category name.
+        * Filters the OPML outline link category name.
         *
         * @since 2.2.0
         *
@@ -60,7 +60,7 @@ foreach ( (array)$cats as $cat ) :
        $bookmarks = get_bookmarks(array("category" => $cat->term_id));
        foreach ( (array)$bookmarks as $bookmark ) :
                /**
-                * Filter the OPML outline link title text.
+                * Filters the OPML outline link title text.
                 *
                 * @since 2.2.0
                 *
index 94a8b541e7087af0bbfd60b28edae3fb170a0308..76dda74b763291416cdb409f3ee6fc83cdfc0d20 100644 (file)
@@ -19,7 +19,9 @@
  */
 
 /** Define ABSPATH as this file's directory */
-define( 'ABSPATH', dirname(__FILE__) . '/' );
+if ( ! defined( 'ABSPATH' ) ) {
+       define( 'ABSPATH', dirname( __FILE__ ) . '/' );
+}
 
 error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
 
index ed3878c293fe1a074193ce209de414ad0fdc59b7..01c754f00de1b127f83c024c38397e2386d92dfe 100644 (file)
@@ -45,7 +45,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
        // Shake it!
        $shake_error_codes = array( 'empty_password', 'empty_email', 'invalid_email', 'invalidcombo', 'empty_username', 'invalid_username', 'incorrect_password' );
        /**
-        * Filter the error codes array for shaking the login form.
+        * Filters the error codes array for shaking the login form.
         *
         * @since 3.0.0
         *
@@ -106,15 +106,16 @@ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
        }
 
        /**
-        * Filter link URL of the header logo above login form.
+        * Filters link URL of the header logo above login form.
         *
         * @since 2.1.0
         *
         * @param string $login_header_url Login header logo URL.
         */
        $login_header_url = apply_filters( 'login_headerurl', $login_header_url );
+
        /**
-        * Filter the title attribute of the header logo above login form.
+        * Filters the title attribute of the header logo above login form.
         *
         * @since 2.1.0
         *
@@ -139,7 +140,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
        $classes[] =' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
 
        /**
-        * Filter the login page body classes.
+        * Filters the login page body classes.
         *
         * @since 3.5.0
         *
@@ -151,6 +152,14 @@ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
        ?>
        </head>
        <body class="login <?php echo esc_attr( implode( ' ', $classes ) ); ?>">
+       <?php
+       /**
+        * Fires in the login page header after the body tag is opened.
+        *
+        * @since 4.6.0
+        */
+       do_action( 'login_header' );
+       ?>
        <div id="login">
                <h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
        <?php
@@ -158,7 +167,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
        unset( $login_header_url, $login_header_title );
 
        /**
-        * Filter the message to display above the login form.
+        * Filters the message to display above the login form.
         *
         * @since 2.1.0
         *
@@ -188,7 +197,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
                }
                if ( ! empty( $errors ) ) {
                        /**
-                        * Filter the error messages displayed above the login form.
+                        * Filters the error messages displayed above the login form.
                         *
                         * @since 2.1.0
                         *
@@ -198,7 +207,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
                }
                if ( ! empty( $messages ) ) {
                        /**
-                        * Filter instructional messages displayed above the login form.
+                        * Filters instructional messages displayed above the login form.
                         *
                         * @since 2.5.0
                         *
@@ -219,7 +228,10 @@ function login_footer($input_id = '') {
 
        // Don't allow interim logins to navigate away from the page.
        if ( ! $interim_login ): ?>
-       <p id="backtoblog"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php printf( __( '&larr; Back to %s' ), get_bloginfo( 'title', 'display' ) ); ?></a></p>
+       <p id="backtoblog"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php
+               /* translators: %s: site title */
+               printf( _x( '&larr; Back to %s', 'site' ), get_bloginfo( 'title', 'display' ) );
+       ?></a></p>
        <?php endif; ?>
 
        </div>
@@ -286,7 +298,7 @@ function retrieve_password() {
        if ( empty( $_POST['user_login'] ) ) {
                $errors->add('empty_username', __('<strong>ERROR</strong>: Enter a username or email address.'));
        } elseif ( strpos( $_POST['user_login'], '@' ) ) {
-               $user_data = get_user_by( 'email', trim( $_POST['user_login'] ) );
+               $user_data = get_user_by( 'email', trim( wp_unslash( $_POST['user_login'] ) ) );
                if ( empty( $user_data ) )
                        $errors->add('invalid_email', __('<strong>ERROR</strong>: There is no user registered with that email address.'));
        } else {
@@ -341,7 +353,7 @@ function retrieve_password() {
        $title = sprintf( __('[%s] Password Reset'), $blogname );
 
        /**
-        * Filter the subject of the password reset email.
+        * Filters the subject of the password reset email.
         *
         * @since 2.8.0
         * @since 4.4.0 Added the `$user_login` and `$user_data` parameters.
@@ -353,7 +365,7 @@ function retrieve_password() {
        $title = apply_filters( 'retrieve_password_title', $title, $user_login, $user_data );
 
        /**
-        * Filter the message body of the password reset mail.
+        * Filters the message body of the password reset mail.
         *
         * @since 2.8.0
         * @since 4.1.0 Added `$user_login` and `$user_data` parameters.
@@ -436,7 +448,7 @@ case 'postpass' :
        $hasher = new PasswordHash( 8, true );
 
        /**
-        * Filter the life span of the post password cookie.
+        * Filters the life span of the post password cookie.
         *
         * By default, the cookie expires 10 days from creation. To turn this
         * into a session cookie, return 0.
@@ -472,7 +484,7 @@ case 'logout' :
        }
 
        /**
-        * Filter the log out redirect URL.
+        * Filters the log out redirect URL.
         *
         * @since 4.2.0
         *
@@ -506,7 +518,7 @@ case 'retrievepassword' :
 
        $lostpassword_redirect = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
        /**
-        * Filter the URL redirected to after submitting the lostpassword/retrievepassword form.
+        * Filters the URL redirected to after submitting the lostpassword/retrievepassword form.
         *
         * @since 3.0.0
         *
@@ -675,7 +687,7 @@ break;
 case 'register' :
        if ( is_multisite() ) {
                /**
-                * Filter the Multisite sign up URL.
+                * Filters the Multisite sign up URL.
                 *
                 * @since 3.0.0
                 *
@@ -705,7 +717,7 @@ case 'register' :
 
        $registration_redirect = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
        /**
-        * Filter the registration redirect URL.
+        * Filters the registration redirect URL.
         *
         * @since 3.0.0
         *
@@ -781,7 +793,7 @@ default:
 
        $reauth = empty($_REQUEST['reauth']) ? false : true;
 
-       $user = wp_signon( '', $secure_cookie );
+       $user = wp_signon( array(), $secure_cookie );
 
        if ( empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) {
                if ( headers_sent() ) {
@@ -796,7 +808,7 @@ default:
 
        $requested_redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
        /**
-        * Filter the login redirect URL.
+        * Filters the login redirect URL.
         *
         * @since 3.0.0
         *
@@ -863,7 +875,7 @@ default:
        }
 
        /**
-        * Filter the login page errors.
+        * Filters the login page errors.
         *
         * @since 3.6.0
         *
index 5efb57fcc1a57a8c114ba237bf236cf9662efbea..62c9a119033a996f87b018cd4f75e9552145b8ac 100644 (file)
@@ -66,7 +66,6 @@ for ( $i = 1; $i <= $count; $i++ ) {
        $content_transfer_encoding = '';
        $post_author = 1;
        $author_found = false;
-       $dmonths = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
        foreach ($message as $line) {
                // Body signal.
                if ( strlen($line) < 3 )
@@ -163,7 +162,7 @@ for ( $i = 1; $i <= $count; $i++ ) {
        $content = trim($content);
 
        /**
-        * Filter the original content of the email.
+        * Filters the original content of the email.
         *
         * Give Post-By-Email extending plugins full access to the content, either
         * the raw content, or the content of the last quoted-printable section.
@@ -189,7 +188,7 @@ for ( $i = 1; $i <= $count; $i++ ) {
        $content = trim($content);
 
        /**
-        * Filter the content of the post submitted by email before saving.
+        * Filters the content of the post submitted by email before saving.
         *
         * @since 1.2.0
         *
index a4bb3708dd8ffe1641ba4a185b200dc21831d97c..dc3b25a7cb7b1486c9bc2f64ccad26876a866558 100644 (file)
@@ -20,6 +20,7 @@ define( 'WPINC', 'wp-includes' );
 // Include files required for initialization.
 require( ABSPATH . WPINC . '/load.php' );
 require( ABSPATH . WPINC . '/default-constants.php' );
+require( ABSPATH . WPINC . '/plugin.php' );
 
 /*
  * These can't be directly globalized in version.php. When updating,
@@ -69,9 +70,21 @@ timer_start();
 // Check if we're in WP_DEBUG mode.
 wp_debug_mode();
 
+/**
+ * Filters whether to enable loading of the advanced-cache.php drop-in.
+ *
+ * This filter runs before it can be used by plugins. It is designed for non-web
+ * run-times. If false is returned, advanced-cache.php will never be loaded.
+ *
+ * @since 4.6.0
+ *
+ * @param bool $enable_advanced_cache Whether to enable loading advanced-cache.php (if present).
+ *                                    Default true.
+ */
+if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) ) {
 // For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
-if ( WP_CACHE )
        WP_DEBUG ? include( WP_CONTENT_DIR . '/advanced-cache.php' ) : @include( WP_CONTENT_DIR . '/advanced-cache.php' );
+}
 
 // Define WP_LANG_DIR if not set.
 wp_set_lang_dir();
@@ -81,10 +94,10 @@ require( ABSPATH . WPINC . '/compat.php' );
 require( ABSPATH . WPINC . '/functions.php' );
 require( ABSPATH . WPINC . '/class-wp.php' );
 require( ABSPATH . WPINC . '/class-wp-error.php' );
-require( ABSPATH . WPINC . '/plugin.php' );
 require( ABSPATH . WPINC . '/pomo/mo.php' );
 
 // Include the wpdb class and, if present, a db.php database drop-in.
+global $wpdb;
 require_wp_db();
 
 // Set the database table prefix and the format specifiers for database table columns.
@@ -99,6 +112,8 @@ require( ABSPATH . WPINC . '/default-filters.php' );
 
 // Initialize multisite if enabled.
 if ( is_multisite() ) {
+       require( ABSPATH . WPINC . '/class-wp-site-query.php' );
+       require( ABSPATH . WPINC . '/class-wp-network-query.php' );
        require( ABSPATH . WPINC . '/ms-blogs.php' );
        require( ABSPATH . WPINC . '/ms-settings.php' );
 } elseif ( ! defined( 'MULTISITE' ) ) {
@@ -142,6 +157,7 @@ require( ABSPATH . WPINC . '/author-template.php' );
 require( ABSPATH . WPINC . '/post.php' );
 require( ABSPATH . WPINC . '/class-walker-page.php' );
 require( ABSPATH . WPINC . '/class-walker-page-dropdown.php' );
+require( ABSPATH . WPINC . '/class-wp-post-type.php' );
 require( ABSPATH . WPINC . '/class-wp-post.php' );
 require( ABSPATH . WPINC . '/post-template.php' );
 require( ABSPATH . WPINC . '/revision.php' );
@@ -167,6 +183,7 @@ require( ABSPATH . WPINC . '/deprecated.php' );
 require( ABSPATH . WPINC . '/script-loader.php' );
 require( ABSPATH . WPINC . '/taxonomy.php' );
 require( ABSPATH . WPINC . '/class-wp-term.php' );
+require( ABSPATH . WPINC . '/class-wp-term-query.php' );
 require( ABSPATH . WPINC . '/class-wp-tax-query.php' );
 require( ABSPATH . WPINC . '/update.php' );
 require( ABSPATH . WPINC . '/canonical.php' );
@@ -183,6 +200,7 @@ require( ABSPATH . WPINC . '/class-wp-http-proxy.php' );
 require( ABSPATH . WPINC . '/class-wp-http-cookie.php' );
 require( ABSPATH . WPINC . '/class-wp-http-encoding.php' );
 require( ABSPATH . WPINC . '/class-wp-http-response.php' );
+require( ABSPATH . WPINC . '/class-wp-http-requests-response.php' );
 require( ABSPATH . WPINC . '/widgets.php' );
 require( ABSPATH . WPINC . '/class-wp-widget.php' );
 require( ABSPATH . WPINC . '/class-wp-widget-factory.php' );
@@ -383,10 +401,10 @@ $GLOBALS['wp']->init();
  * Fires after WordPress has finished loading but before any headers are sent.
  *
  * Most of WP is loaded at this stage, and the user is authenticated. WP continues
- * to load on the init hook that follows (e.g. widgets), and many plugins instantiate
+ * to load on the {@see 'init'} hook that follows (e.g. widgets), and many plugins instantiate
  * themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.).
  *
- * If you wish to plug an action once WP is loaded, use the wp_loaded hook below.
+ * If you wish to plug an action once WP is loaded, use the {@see 'wp_loaded'} hook below.
  *
  * @since 1.5.0
  */
@@ -404,7 +422,7 @@ if ( is_multisite() ) {
 /**
  * This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated.
  *
- * AJAX requests should use wp-admin/admin-ajax.php. admin-ajax.php can handle requests for
+ * Ajax requests should use wp-admin/admin-ajax.php. admin-ajax.php can handle requests for
  * users not logged in.
  *
  * @link https://codex.wordpress.org/AJAX_in_Plugins
index bd46d02c2f58a46352a51f4ac2b3e0d511fb2402..99bd2afb9fe0b595e40a4d431e453fb8c2f4b74a 100644 (file)
@@ -91,11 +91,15 @@ do_action( 'before_signup_form' );
  *
  * @since MU
  *
- * @param string $blogname The new site name
- * @param string $blog_title The new site title
- * @param array $errors
+ * @param string          $blogname   The new site name.
+ * @param string          $blog_title The new site title.
+ * @param WP_Error|string $errors     A WP_Error object containing existing errors. Defaults to empty string.
  */
 function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) {
+       if ( ! is_wp_error( $errors ) ) {
+               $errors = new WP_Error();
+       }
+
        $current_site = get_current_site();
        // Blog name
        if ( !is_subdomain_install() )
@@ -112,12 +116,15 @@ function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) {
        else
                echo '<input name="blogname" type="text" id="blogname" value="'.esc_attr($blogname).'" maxlength="60" /><span class="suffix_address">.' . ( $site_domain = preg_replace( '|^www\.|', '', $current_site->domain ) ) . '</span><br />';
 
-       if ( !is_user_logged_in() ) {
-               if ( !is_subdomain_install() )
+       if ( ! is_user_logged_in() ) {
+               if ( ! is_subdomain_install() ) {
                        $site = $current_site->domain . $current_site->path . __( 'sitename' );
-               else
+               } else {
                        $site = __( 'domain' ) . '.' . $site_domain . $current_site->path;
-               echo '<p>(<strong>' . sprintf( __('Your address will be %s.'), $site ) . '</strong>) ' . __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed, so choose carefully!' ) . '</p>';
+               }
+
+               /* translators: %s: site address */
+               echo '<p>(<strong>' . sprintf( __( 'Your address will be %s.' ), $site ) . '</strong>) ' . __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed, so choose carefully!' ) . '</p>';
        }
 
        // Blog Title
@@ -183,7 +190,7 @@ function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) {
         *
         * @since 3.0.0
         *
-        * @param array $errors An array possibly containing 'blogname' or 'blog_title' errors.
+        * @param WP_Error $errors A WP_Error object possibly containing 'blogname' or 'blog_title' errors.
         */
        do_action( 'signup_blogform', $errors );
 }
@@ -208,17 +215,21 @@ function validate_blog_form() {
  *
  * @since MU
  *
- * @param string $user_name The entered username
- * @param string $user_email The entered email address
- * @param array $errors
+ * @param string          $user_name  The entered username.
+ * @param string          $user_email The entered email address.
+ * @param WP_Error|string $errors     A WP_Error object containing existing errors. Defaults to empty string.
  */
 function show_user_form($user_name = '', $user_email = '', $errors = '') {
+       if ( ! is_wp_error( $errors ) ) {
+               $errors = new WP_Error();
+       }
+
        // User name
        echo '<label for="user_name">' . __('Username:') . '</label>';
        if ( $errmsg = $errors->get_error_message('user_name') ) {
                echo '<p class="error">'.$errmsg.'</p>';
        }
-       echo '<input name="user_name" type="text" id="user_name" value="'. esc_attr($user_name) .'" maxlength="60" /><br />';
+       echo '<input name="user_name" type="text" id="user_name" value="'. esc_attr( $user_name ) .'" autocapitalize="none" autocorrect="off" maxlength="60" /><br />';
        _e( '(Must be at least 4 characters, letters and numbers only.)' );
        ?>
 
@@ -236,7 +247,7 @@ function show_user_form($user_name = '', $user_email = '', $errors = '') {
         *
         * @since 3.0.0
         *
-        * @param array $errors An array possibly containing 'user_name' or 'user_email' errors.
+        * @param WP_Error $errors A WP_Error object containing containing 'user_name' or 'user_email' errors.
         */
        do_action( 'signup_extra_fields', $errors );
 }
@@ -257,9 +268,9 @@ function validate_user_form() {
  *
  * @since MU
  *
- * @param string $blogname The new site name
- * @param string $blog_title The new site title.
- * @param array $errors
+ * @param string          $blogname   The new site name
+ * @param string          $blog_title The new site title.
+ * @param WP_Error|string $errors     A WP_Error object containing existing errors. Defaults to empty string.
  */
 function signup_another_blog( $blogname = '', $blog_title = '', $errors = '' ) {
        $current_user = wp_get_current_user();
@@ -275,16 +286,16 @@ function signup_another_blog( $blogname = '', $blog_title = '', $errors = '' ) {
        );
 
        /**
-        * Filter the default site sign-up variables.
+        * Filters the default site sign-up variables.
         *
         * @since 3.0.0
         *
         * @param array $signup_defaults {
         *     An array of default site sign-up variables.
         *
-        *     @type string $blogname   The site blogname.
-        *     @type string $blog_title The site title.
-        *     @type array  $errors     An array possibly containing 'blogname' or 'blog_title' errors.
+        *     @type string   $blogname   The site blogname.
+        *     @type string   $blog_title The site title.
+        *     @type WP_Error $errors     A WP_Error object possibly containing 'blogname' or 'blog_title' errors.
         * }
         */
        $filtered_results = apply_filters( 'signup_another_blog_init', $signup_defaults );
@@ -386,17 +397,19 @@ function validate_another_blog_signup() {
        }
 
        /**
-        * Filter the new site meta variables.
+        * Filters the new site meta variables.
+        *
+        * Use the {@see 'add_signup_meta'} filter instead.
         *
         * @since MU
-        * @deprecated 3.0.0 Use the 'add_signup_meta' filter instead.
+        * @deprecated 3.0.0 Use the {@see 'add_signup_meta'} filter instead.
         *
         * @param array $blog_meta_defaults An array of default blog meta variables.
         */
        $meta_defaults = apply_filters( 'signup_create_blog_meta', $blog_meta_defaults );
 
        /**
-        * Filter the new default site meta variables.
+        * Filters the new default site meta variables.
         *
         * @since 3.0.0
         *
@@ -430,7 +443,7 @@ function validate_another_blog_signup() {
  * @param string $blog_title The site title.
  * @param string $user_name  The username.
  * @param string $user_email The user's email address.
- * @param array  $meta       Any additional meta from the 'add_signup_meta' filter in validate_blog_signup().
+ * @param array  $meta       Any additional meta from the {@see 'add_signup_meta'} filter in validate_blog_signup().
  * @param int    $blog_id    The site ID.
  */
 function confirm_another_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = array(), $blog_id = 0 ) {
@@ -451,9 +464,13 @@ function confirm_another_blog_signup( $domain, $path, $blog_title, $user_name, $
        );
 
        ?>
-       <h2><?php printf( __( 'The site %s is yours.' ), $site ); ?></h2>
+       <h2><?php
+               /* translators: %s: site name */
+               printf( __( 'The site %s is yours.' ), $site );
+       ?></h2>
        <p>
                <?php printf(
+                       /* translators: 1: home URL, 2: site address, 3: login URL, 4: username */
                        __( '<a href="%1$s">%2$s</a> is your new site. <a href="%3$s">Log in</a> as &#8220;%4$s&#8221; using your existing password.' ),
                        esc_url( $home_url ),
                        untrailingslashit( $domain . $path ),
@@ -475,9 +492,9 @@ function confirm_another_blog_signup( $domain, $path, $blog_title, $user_name, $
  *
  * @since MU
  *
- * @param string $user_name The username
- * @param string $user_email The user's email
- * @param array $errors
+ * @param string          $user_name  The username.
+ * @param string          $user_email The user's email.
+ * @param WP_Error|string $errors     A WP_Error object containing existing errors. Defaults to empty string.
  */
 function signup_user( $user_name = '', $user_email = '', $errors = '' ) {
        global $active_signup;
@@ -494,16 +511,16 @@ function signup_user( $user_name = '', $user_email = '', $errors = '' ) {
        );
 
        /**
-        * Filter the default user variables used on the user sign-up form.
+        * Filters the default user variables used on the user sign-up form.
         *
         * @since 3.0.0
         *
         * @param array $signup_user_defaults {
         *     An array of default user variables.
         *
-        *     @type string $user_name  The user username.
-        *     @type string $user_email The user email address.
-        *     @type array  $errors     An array of possible errors relevant to the sign-up user.
+        *     @type string   $user_name  The user username.
+        *     @type string   $user_email The user email address.
+        *     @type WP_Error $errors     A WP_Error object with possible errors relevant to the sign-up user.
         * }
         */
        $filtered_results = apply_filters( 'signup_user_init', $signup_user_defaults );
@@ -513,7 +530,10 @@ function signup_user( $user_name = '', $user_email = '', $errors = '' ) {
 
        ?>
 
-       <h2><?php printf( __( 'Get your own %s account in seconds' ), get_current_site()->site_name ) ?></h2>
+       <h2><?php
+               /* translators: %s: name of the network */
+               printf( __( 'Get your own %s account in seconds' ), get_current_site()->site_name );
+       ?></h2>
        <form id="setupform" method="post" action="wp-signup.php" novalidate="novalidate">
                <input type="hidden" name="stage" value="validate-user-signup" />
                <?php
@@ -597,11 +617,11 @@ function confirm_user_signup($user_name, $user_email) {
  *
  * @since MU
  *
- * @param string $user_name The username
- * @param string $user_email The user's email address
- * @param string $blogname The site name
- * @param string $blog_title The site title
- * @param array $errors
+ * @param string          $user_name  The username.
+ * @param string          $user_email The user's email address.
+ * @param string          $blogname   The site name.
+ * @param string          $blog_title The site title.
+ * @param WP_Error|string $errors     A WP_Error object containing existing errors. Defaults to empty string.
  */
 function signup_blog($user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '') {
        if ( !is_wp_error($errors) )
@@ -616,18 +636,18 @@ function signup_blog($user_name = '', $user_email = '', $blogname = '', $blog_ti
        );
 
        /**
-        * Filter the default site creation variables for the site sign-up form.
+        * Filters the default site creation variables for the site sign-up form.
         *
         * @since 3.0.0
         *
         * @param array $signup_blog_defaults {
         *     An array of default site creation variables.
         *
-        *     @type string $user_name  The user username.
-        *     @type string $user_email The user email address.
-        *     @type string $blogname   The blogname.
-        *     @type string $blog_title The title of the site.
-        *     @type array  $errors     An array of possible errors relevant to new site creation variables.
+        *     @type string   $user_name  The user username.
+        *     @type string   $user_email The user email address.
+        *     @type string   $blogname   The blogname.
+        *     @type string   $blog_title The title of the site.
+        *     @type WP_Error $errors     A WP_Error object with possible errors relevant to new site creation variables.
         * }
         */
        $filtered_results = apply_filters( 'signup_blog_init', $signup_blog_defaults );
@@ -722,7 +742,7 @@ function validate_blog_signup() {
  * @param string $blog_title The new site title
  * @param string $user_name The user's username
  * @param string $user_email The user's email address
- * @param array $meta Any additional meta from the 'add_signup_meta' filter in validate_blog_signup()
+ * @param array $meta Any additional meta from the {@see 'add_signup_meta'} filter in validate_blog_signup()
  */
 function confirm_blog_signup( $domain, $path, $blog_title, $user_name = '', $user_email = '', $meta = array() ) {
        ?>
@@ -739,7 +759,10 @@ function confirm_blog_signup( $domain, $path, $blog_title, $user_name = '', $use
                <ul id="noemail-tips">
                        <li><p><strong><?php _e( 'Wait a little longer. Sometimes delivery of email can be delayed by processes outside of our control.' ) ?></strong></p></li>
                        <li><p><?php _e( 'Check the junk or spam folder of your email client. Sometime emails wind up there by mistake.' ) ?></p></li>
-                       <li><?php printf( __( 'Have you entered your email correctly? You have entered %s, if it&#8217;s incorrect, you will not receive your email.' ), $user_email ) ?></li>
+                       <li><?php
+                               /* translators: %s: email address */
+                               printf( __( 'Have you entered your email correctly? You have entered %s, if it&#8217;s incorrect, you will not receive your email.' ), $user_email );
+                       ?></li>
                </ul>
        </p>
        <?php
@@ -758,7 +781,7 @@ function confirm_blog_signup( $domain, $path, $blog_title, $user_name = '', $use
  */
 function signup_get_available_languages() {
        /**
-        * Filter the list of available languages for front-end site signups.
+        * Filters the list of available languages for front-end site signups.
         *
         * Passing an empty array to this hook will disable output of the setting on the
         * signup form, and the default language will be used when creating the site.
@@ -782,8 +805,9 @@ function signup_get_available_languages() {
 
 // Main
 $active_signup = get_site_option( 'registration', 'none' );
+
 /**
- * Filter the type of site sign-up.
+ * Filters the type of site sign-up.
  *
  * @since 3.0.0
  *
@@ -798,8 +822,10 @@ $i18n_signup['none'] = _x('none', 'Multisite active signup type');
 $i18n_signup['blog'] = _x('blog', 'Multisite active signup type');
 $i18n_signup['user'] = _x('user', 'Multisite active signup type');
 
-if ( is_super_admin() )
+if ( is_super_admin() ) {
+       /* translators: 1: type of site sign-up; 2: network settings URL */
        echo '<div class="mu_alert">' . sprintf( __( 'Greetings Site Administrator! You are currently allowing &#8220;%s&#8221; registrations. To change or disable registration go to your <a href="%s">Options page</a>.' ), $i18n_signup[$active_signup], esc_url( network_admin_url( 'settings.php' ) ) ) . '</div>';
+}
 
 $newblogname = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null;
 
@@ -808,7 +834,8 @@ if ( $active_signup == 'none' ) {
        _e( 'Registration has been disabled.' );
 } elseif ( $active_signup == 'blog' && !is_user_logged_in() ) {
        $login_url = wp_login_url( network_site_url( 'wp-signup.php' ) );
-       echo sprintf( __( 'You must first <a href="%s">log in</a>, and then you can create a new site.' ), $login_url );
+       /* translators: %s: login URL */
+       printf( __( 'You must first <a href="%s">log in</a>, and then you can create a new site.' ), $login_url );
 } else {
        $stage = isset( $_POST['stage'] ) ?  $_POST['stage'] : 'default';
        switch ( $stage ) {
index b3cbc6d6750bd4a76001ab1cb291cd29f5533cf6..e8d5223ff120a98b3f8e67e2ec2e63840c2ff153 100644 (file)
@@ -71,7 +71,7 @@ include_once(ABSPATH . WPINC . '/class-wp-xmlrpc-server.php');
 $post_default_title = "";
 
 /**
- * Filter the class used for handling XML-RPC requests.
+ * Filters the class used for handling XML-RPC requests.
  *
  * @since 3.1.0
  *
@@ -95,7 +95,7 @@ exit;
  * @param string $msg Information describing logging reason.
  */
 function logIO( $io, $msg ) {
-       _deprecated_function( __FUNCTION__, '3.4', 'error_log()' );
+       _deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' );
        if ( ! empty( $GLOBALS['xmlrpc_logging'] ) )
                error_log( $io . ' - ' . $msg );
 }
\ No newline at end of file